!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@538433c"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6d6cc722-40af-4ba3-8611-a9fd90e59763",e._sentryDebugIdIdentifier="sentry-dbid-6d6cc722-40af-4ba3-8611-a9fd90e59763")}catch(e){}}(),(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["25734"],{59833:function(e,t,n){"use strict";n.d(t,{A:()=>r});let r={coverTheme:"coverTheme-PJLqY5"}},53170:function(e,t,n){"use strict";n.d(t,{A:()=>r});let r={grabber:"grabber-thsQdT"}},24311:function(e,t,n){"use strict";n.d(t,{A:()=>r});let r={input:"input-y4v6N4",textarea:"textarea-GbEjRX",autogrowing:"autogrowing-_ipn9Y",inputText:"inputText-pV_yWb",inputWithButtonWrapper:"inputWithButtonWrapper-qFTACT",primary:"primary-MUgbK6","secondary-outline":"secondary-outline-JXafwf",secondaryOutline:"secondary-outline-JXafwf",inputWithButtonInput:"inputWithButtonInput-KDznfS",start:"start-p226EZ",end:"end-LEvC6s",segmentedInputContainer:"segmentedInputContainer-BnsX3X",inputWithButtonButton:"inputWithButtonButton-SsgPne",focus:"focus-nqjos7",leading:"leading-hoxUwz",trailing:"trailing-cHz8Pv",error:"error-QSGsmD",disabled:"disabled-bZ2Wej",readOnly:"readOnly-yVYuPy",wrapper:"wrapper-JJvHsG",position_leading:"position_leading-_w7oUS",positionLeading:"position_leading-_w7oUS",size_sm:"size_sm-nn6jzC",sizeSm:"size_sm-nn6jzC",size_md:"size_md-UKpzt4",sizeMd:"size_md-UKpzt4",position_trailing:"position_trailing-kaOmCa",positionTrailing:"position_trailing-kaOmCa",unstyled:"unstyled-IJLUJU"}},12215:function(e){var t,n;t=function(){function e(){for(var e=0,t={};e1){if("number"==typeof(o=e({path:"/"},r.defaults,o)).expires){var a,s=new Date;s.setMilliseconds(s.getMilliseconds()+864e5*o.expires),o.expires=s}o.expires=o.expires?o.expires.toUTCString():"";try{a=JSON.stringify(i),/^[\{\[]/.test(a)&&(i=a)}catch(e){}i=n.write?n.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var l="";for(var u in o)o[u]&&(l+="; "+u,!0!==o[u]&&(l+="="+o[u]));return document.cookie=t+"="+i+l}t||(a={});for(var c=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,p=0;pT,Route:()=>k,Router:()=>E,default:()=>P,exec:()=>a,getCurrentUrl:()=>h,route:()=>g,subscribers:()=>f});var r=n(50172),i={};function o(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t,n){var r,o=/(?:\?([^#]*))?(#.*)?$/,a=e.match(o),s={};if(a&&a[1])for(var l=a[1].split("&"),c=0;ch.indexOf("?")||g)){r=!1;break}if(s[m]=decodeURIComponent(b),g||_){s[m]=e.slice(f).map(decodeURIComponent).join("/");break}}else if(t[f]!==e[f]){r=!1;break}return(!0===n.default||!1!==r)&&s}function s(e,t){return e.rankt.rank?-1:e.index-t.index}function l(e,t){var n;return e.index=t,e.rank=(n=e).props.default?0:u(n.props.path).map(c).join(""),e.props}function u(e){return e.replace(/(^\/+|\/+$)/g,"").split("/")}function c(e){return":"==e.charAt(0)?1+"*+?".indexOf(e.charAt(e.length-1))||4:5}var d=null,p=[],f=[],m={};function h(){var e;return""+((e=d&&d.location?d.location:d&&d.getCurrentLocation?d.getCurrentLocation():"undefined"!=typeof location?location:m).pathname||"")+(e.search||"")}function g(e,t){var n,r;return void 0===t&&(t=!1),"string"!=typeof e&&e.url&&(t=e.replace,e=e.url),function(e){for(var t=p.length;t--;)if(p[t].canRoute(e))return!0;return!1}(e)&&(n=e,r=t?"replace":"push",d&&d[r]?d[r](n):"undefined"!=typeof history&&history[r+"State"]&&history[r+"State"](null,null,n)),_(e)}function _(e){for(var t=!1,n=0;n0},t.prototype.routeTo=function(e){this.setState({url:e});var t=this.canRoute(e);return this.updating||this.forceUpdate(),t},t.prototype.componentWillMount=function(){p.push(this),this.updating=!0},t.prototype.componentDidMount=function(){var e=this;d&&(this.unlisten=d.listen(function(t){e.routeTo(""+(t.pathname||"")+(t.search||""))})),this.updating=!1},t.prototype.componentWillUnmount=function(){"function"==typeof this.unlisten&&this.unlisten(),p.splice(p.indexOf(this),1)},t.prototype.componentWillUpdate=function(){this.updating=!0},t.prototype.componentDidUpdate=function(){this.updating=!1},t.prototype.getMatchingChildren=function(e,t,n){return e.filter(l).sort(s).map(function(e){var i=a(t,e.props.path,e.props);if(i){if(!1!==n){var s={url:t,matches:i};return o(s,i),delete s.ref,delete s.key,(0,r.cloneElement)(e,s)}return e}}).filter(Boolean)},t.prototype.render=function(e,t){var n=e.children,i=e.onChange,o=t.url,a=this.getMatchingChildren((0,r.toChildArray)(n),o,!0),s=a[0]||null,l=this.previousUrl;return o!==l&&(this.previousUrl=o,"function"==typeof i&&i({router:this,url:o,previous:l,active:a,current:s})),s},t}(r.Component),T=function(e){return(0,r.createElement)("a",o({onClick:v},e))},k=function(e){return(0,r.createElement)(e.component,e)};E.subscribers=f,E.getCurrentUrl=h,E.route=g,E.Router=E,E.Route=k,E.Link=T,E.exec=a;let P=E},12550:function(e,t,n){var r=n(25814),i=n(60471);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},41814:function(e,t,n){"use strict";n.d(t,{r:()=>a});var r=n(4006),i=n(10996),o=n(59833);function a(e){let{children:t}=e;return(0,r.Y)(i.NP,{theme:o.A.coverTheme,children:t})}},23623:function(e,t,n){"use strict";n.d(t,{a:()=>o});var r=n(4006),i=n(10996);let o=e=>{let{children:t,disable:n}=e;return n?(0,r.Y)(r.FK,{children:t}):(0,r.Y)(i.NP,{theme:"dark-theme",children:t})}},9266:function(e,t,n){"use strict";n.d(t,{Ay:()=>$,Be:()=>G});var r=n(69277),i=n(70408),o=n(79785),a=n(4006),s=n(32485),l=n.n(s),u=n(12215),c=n(87677),d=n(48697),p=n(17402),f=n(41814),m=n(97432),h=n(33764),g=n(86160),_=n(84605),b=n(53989),v=n(85478),y=n(34835),w=n(39520),S=n(86500),E=n(53928),T=n(68349),k=n(89490),P=n(35369),I=n(76977),A=n(45974),R=n(63136),C=n(54754),N=n(21398),U=n(11510),x=n(61554),L=n(49095),M=n(28194),D=n(56262),F=n(39318),B=n(41086),O=n(82776),Y=n(57324),W=n(82121);function q(){let e=(0,o._)(["By ",""]);return q=function(){return e},e}let H="intro_popup_last_hidden_at";function G(e){let{includePrice:t=!0,includeRankingDetail:r=!0,includeByline:i=!0,includeBadge:o=!1,rankingDetailOverrideText:s=null,language:l="en"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=l||e.language,{iTemplate:c}=I18N.i(l||e.language),d=(0,O.getByLine)(e),p=null;return r&&(p=s||(e.rankingDetailByLanguage&&"en"!==u&&e.rankingDetailByLanguage[u]?e.rankingDetailByLanguage[u].rankingDetail:e.rankingDetail)),(0,a.FD)(C.r,{separator:" \xb7 ",children:[i&&d?(0,a.FD)(I.pT,{inline:!0,gap:4,children:[c(q(),d),o&&(0,a.Y)(N.Ic,{module:"../user_badge/UserBadge",resolve:e=>e.UserStatusSymbols,onRequest:()=>Promise.resolve().then(n.bind(n,49095)),size:"sm",tier:e.author_bestseller_tier,userId:e.author_id,whileLoading:e.author_bestseller_tier?(0,a.Y)(I.pT,{alignItems:"center",children:(0,a.Y)(L.UserStatusSymbols,{size:"sm",tier:e.author_bestseller_tier})}):(0,a.Y)(a.FK,{})})]}):null,p,t&&function(e,t){let{language:n}=t,r=!e.disable_monthly_subscriptions&&e.plans&&e.plans.filter(e=>"month"===e.interval).sort((e,t)=>e.amount-t.amount)[0],i=!e.disable_annual_subscriptions&&e.plans&&e.plans.filter(e=>"year"===e.interval).sort((e,t)=>e.amount-t.amount)[0],o=r||i;if(o)return(0,M.xB)(o,{language:n})}(e,{language:l})]})}let $=(0,p.memo)(e=>{var t,n;let{publication:o,user:s,post:l,onHide:c,freeSignup:d,hidden:m,alwaysShow:h,showOnMount:g,freeSignupEmail:_,email:b,referralCode:w,blurbs:E,launchWelcomePage:k}=e,{getConfigFor:P}=(0,v.mJ)(),I=P("welcome_page_query_params"),[A,R]=(0,p.useState)(!1),[C,N]=(0,p.useState)(!!(k||h)),U=(e,t)=>{var n;return I&&null!=(n=(0,B.y)(e))?n:t},[x]=(0,p.useState)(U("no_skip",void 0)),[L]=(0,p.useState)(U("no_blurbs",!1)),[M]=(0,p.useState)(()=>{let e=U("hero_text",void 0);return e?decodeURIComponent(e):void 0});(0,p.useEffect)(()=>{let e=e=>{"Escape"===e.key&&G(!0)};if(C)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[C]),(0,p.useEffect)(()=>{if(k&&!$()||q()){if("undefined"!=typeof window&&(0,T.iQ)(document.documentElement,"has-intro-popup"),(0,B.y)("r")){let e=(0,B.y)("r");s&&(0,O.userReferralKey)(s)===e||(0,S.u4)(S.qY.COVER_PAGE_REFERRAL_VISIT,{referral_key:e,referring_user:(0,O.userFromReferralKey)(e)})}W()}else c&&c(),(0,y.E)({hide_intro_popup:!0}),"undefined"!=typeof window&&(0,T.vy)(document.documentElement,"has-intro-popup"),!h&&"undefined"!=typeof window&&(0,T.nB)(document.documentElement,"show-intro-popup")&&(0,T.vy)(document.documentElement,"show-intro-popup");return["no_skip","no_blurbs","hero_text","hide_intro_popup"].forEach(e=>(0,T.qm)(e)),()=>{"undefined"!=typeof window&&(0,T.vy)(document.documentElement,"has-intro-popup"),G(!0)}},[]);let W=()=>{"undefined"!=typeof window&&((0,T.iQ)(document.documentElement,"show-intro-popup"),(0,S.u4)(S.qY.COVER_PAGE_SHOWN,{has_cover_photo:!!o.cover_photo_url,has_free_signup_email:!!_,has_free_signup:!!d,functional_version:!0,launch_welcome_page:k,always_show:h,hidden:m,screen_height:"undefined"!=typeof window?window.innerHeight:null,screen_width:"undefined"!=typeof window?window.innerWidth:null}),h||(0,S.b8)("pageview",{dl:"".concat(document.location.origin,"/welcome").concat(document.location.search)})),N(!0)},q=(0,p.useCallback)(()=>!!h||!m&&(!!g||!!A||!$()&&!!(null==l||l&&!(0,D.isPaidAudience)(l.audience))&&!d&&(!s||!s.is_free_subscribed&&!s.is_subscribed)),[h,d,m,l,g,A,s]),G=e=>{e||(j(),setTimeout(()=>{(0,y.E)({hide_intro_popup:!0})},500)),c&&c(),!h&&"undefined"!=typeof window&&(0,T.nB)(document.documentElement,"show-intro-popup")&&(0,T.vy)(document.documentElement,"show-intro-popup")},$=()=>{let e=u.get(H);if(e&&new Date(e)>new Date(Date.now()-864e5))return!0;return!1},j=()=>{u.set(H,new Date().toJSON(),{expires:3650})},J=async e=>{(0,S.u4)(S.qY.COVER_PAGE_EMAIL_SUBMITTED,{is_paying_sub:!!e.body.prompt_to_login,has_plans:!!o.plans,functional_version:!0,homepage_type:o.homepage_type}),j(),R(!0),(0,y.E)({freeSignup:!0,freeSignupEmail:e.body.email});let t=h?"/":document.location.href;e.body.prompt_to_login?setTimeout(()=>{document.location.href=(0,F.yRP)("/account/login",{redirect:t,email:e.body.email})},30):document.location.href=(0,F.yRP)("/subscribe",(0,r._)((0,i._)((0,r._)({next:t,later:!0,just_signed_up:!0},e.body.subscription_id&&{subscription_id:e.body.subscription_id},e.body.referral_token&&{referral_token:e.body.referral_token}),{requires_confirmation:e.body.requires_confirmation?"true":"",utm_source:Y.VU.coverPage,email:e.body.email,skip_redirect_check:!0}),o.section&&{specific_section_ids:String(o.section.id)}))};return C&&q()?(0,a.Y)(f.r,{children:(0,a.Y)("div",{className:"intro-popup",children:(0,a.Y)("div",{className:"intro-popup-page",children:(0,a.Y)(V,{source:"cover_page",email:b,pub:o,user:null!=s?s:null,freeSignup:d,freeSignupEmail:_,referralCode:w,forceSignup:null!=(n=null!=(t=(0,B.y)("force"))?t:x)?n:void 0,onMaybeLater:x?void 0:()=>{(0,S.u4)(S.qY.COVER_PAGE_MAYBE_LATER_CLICKED,{functional_version:!0}),G()},onFreeSignup:J,onSubscribeInApp:()=>G(),blurbs:E,hideBlurbs:L,overrideSubtitle:M})})})}):null}),V=e=>{let{autoFocus:t=!0,pub:i,user:o,email:s,freeSignup:u,freeSignupEmail:d,referralCode:f,source:h,forceSignup:y,submitButtonText:w,onMaybeLater:T,onFreeSignup:A,onSubscribeInApp:C,blurbs:L,hideBlurbs:M,overrideSubtitle:D}=e,O=(0,p.useContext)(b.l9),q=(0,U.Iu)(),{iString:H}=(0,_.GO)(),{getConfigFor:G}=(0,v.mJ)(),$=(0,B.y)("referralCode"),V=(0,B.y)("refSource"),z=H("Learn More"),X=O.getSettingFor("welcome_page_opt_out_text"),Z="No thanks"===X?H("No thanks"):null!=X?X:H("No thanks"),Q=(0,F.DNs)(i,{params:(0,r._)({utm_source:Y.VU.subscribeEmail,utm_content:Y.fL.learnMore},$&&{referralCode:$},V&&{refSource:V})});(0,p.useEffect)(()=>{"subscribe_page"===h&&(0,S.u4)(S.qY.SUBSCRIBE_EMAIL_FULL_SCREEN_SHOWN,{functional_version:!0}),(0,S.u4)(S.qY.FULL_EMAIL_FORM_SHOWN,{source:h,functional_version:!0}),(0,E.jN)(E.ti.TRACK_REGISTRATION_SHOWN)},[h]);let ee=L&&!M?L.filter(e=>""!=e.description):[],et=!y&&!i.invite_only&&q&&!(null==o?void 0:o.reader_installed_at)&&G("welcome_page_app_button");return(0,a.FD)("div",{className:"full-email-form",children:[(0,a.FD)("div",{className:"vertically-centered",children:[T&&!i.invite_only&&(0,a.Y)(J,{onClick:T}),(0,a.Y)(j,{pub:i,overrideSubtitle:D}),!i.invite_only||o&&o.is_free_subscribed?(0,a.FD)(a.FK,{children:[(0,a.Y)(I.Ye,{justifyContent:"center",style:{width:"100%"},children:(0,a.FD)(I.I1,{gap:4,style:{width:"100%",maxWidth:"380px"},children:[(0,a.Y)(I.I1,{className:W.A.emailFormContainer,justifyContent:"center",alignItems:"center",children:(0,a.Y)(m.A,{email:s,isWelcomePageColor:!0,freeSignup:u,freeSignupEmail:d,pub:i,referralCode:f,source:h,submitButtonText:w,user:o,onConfirmationRequired:"enabled"===i.payments_state?()=>null:void 0,onSuccess:A||(()=>document.location.href="proxy.php?url=/"),autoFocus:t})}),(0,a.Y)(k.az,{paddingX:{mobile:16,desktop:0},paddingTop:16,className:W.A.tosText,children:(0,a.Y)(x.U,{includeCheckbox:!1,addSubscribePreamble:!0,color:"secondary",textAlign:"center",pub:i})})]})}),!y&&(T?(0,a.FD)(P.$n,{priority:"quaternary",className:W.A.maybeLater,onClick:T,"data-testid":"maybeLater",children:[Z,(0,a.Y)(c.A,{size:20})]}):(0,a.FD)(P.$n,{priority:"quaternary",className:W.A.maybeLater,href:Q,localNavigation:!1,children:[z,(0,a.Y)(c.A,{size:20})]}))]}):(0,a.Y)(N.Ic,{onRequest:()=>Promise.all([n.e("85929"),n.e("60273")]).then(n.bind(n,66312)),resolve:e=>e.InviteActions,module:"./InviteActions",pub:i,user:o,freeSignupEmail:d}),!!(null==ee?void 0:ee.length)&&(0,a.Y)("div",{className:"blurb-buffer"}),!!(null==ee?void 0:ee.length)&&(0,a.Y)(I.Ye,{className:"blurbs",gap:20,children:ee.map(e=>(0,a.FD)(I.I1,{gap:8,className:"blurb",children:[(0,a.Y)(R.EY.B4,{className:l()("blurb-text",W.A.blurbText),children:(0,a.Y)(K,{text:"“".concat(e.description,"”")})}),(0,a.FD)(R.EY.B4,{weight:"semibold",className:l()("blurb-text",W.A.blurbText),children:[e.author_name||e.recommendingPublication.email_from_name||e.recommendingPublication.copyright,", ",(0,a.Y)("a",{href:(0,F.$_T)(e.recommendingPublication),children:e.recommendingPublication.name})]})]}))})]}),et&&(0,a.Y)(g.T,{publication:i,user:o,email:s,onSubscribeSuccess:C})]})},j=e=>{let{pub:t,overrideSubtitle:n}=e,{getSettingFor:i}=(0,b.Pu)(),{language:o}=(0,_.GO)(),{title:s,subtitle:u,logoUrl:c,coverPhotoUrl:d,hideTitle:p,hideSubtitle:f}=((e,t)=>{let n,r,i,o,a,s,{getConfigFor:l}=(0,v.mJ)();if(l("section_specific_welcome_pages")&&e.section){var u;n=e.section.name,r=e.section.description,i=null!=(u=e.section.logo_url)?u:e.logo_url,a=!!((o=e.section.cover_photo_url)&&e.section.hide_intro_title),s=!!(o&&e.section.hide_intro_subtitle)}else n=e.name,r=e.hero_text,i=e.logo_url,a=!!((o=e.cover_photo_url)&&e.hide_intro_title),s=!!(o&&e.hide_intro_subtitle);return t&&(r=t),{title:n,subtitle:r,logoUrl:i,coverPhotoUrl:o,hideTitle:a,hideSubtitle:s}})(t,n),m=i("display_welcome_page_details"),g=d&&(0,F.d4Y)(d);return(0,a.FD)(a.FK,{children:[d?(0,a.Y)(h.o,{className:"publication-cover-photo",src:d,imageProps:{quality:"auto:best"},maxWidth:1360,loading:"eager",style:(0,r._)({},g&&g.width&&{height:"min(35vh, ".concat(680*g.height/g.width,"px)")})}):c&&(0,a.Y)(k.az,{paddingBottom:32,"data-testid":"intro-popup-logo",children:(0,a.Y)(A.Nq,{logoUrl:c,size:88})}),!p&&(0,a.Y)("h1",{className:l()("publication-name",{"no-logo":!c,"with-cover":d},W.A.balancedText),children:s}),!f&&u&&(0,a.Y)("p",{className:l()("publication-tagline with-cover",{verbose:!0,"with-cover":d},W.A.balancedText),children:u}),(0,a.Y)("div",{className:"publication-meta",children:G(t,{includePrice:!1,includeBadge:!0,rankingDetailOverrideText:t.rankingDetailFreeSubscriberCount,includeRankingDetail:!!m,language:o})})]})},J=e=>{let{onClick:t}=e;return(0,a.Y)(P.K0,{onClick:t,"aria-label":"Close","data-testid":"close-welcome-modal",priority:"tertiary",className:W.A.closeWelcomeModal,children:(0,a.Y)(d.A,{size:20})})},K=e=>{let{text:t}=e,{truncatedText:n,measureRef:r}=(0,w.L)({text:t,truncationRules:[{minLines:5,truncateTo:4}],ellipsesText:"...”"}),i=n?"".concat(n,"...”"):t;return(0,a.FD)("div",{style:{position:"relative"},children:[(0,a.Y)("div",{children:i}),(0,a.Y)("div",{ref:r,style:{visibility:"hidden",position:"absolute",width:"100%"}})]})}},34206:function(e,t,n){"use strict";n.d(t,{Ay:()=>S,Me:()=>_,Oo:()=>b,YV:()=>g});var r=n(99851),i=n(69277),o=n(70408),a=n(32641),s=n(4006),l=n(32485),u=n.n(l),c=n(17402),d=n(84565),p=n(86500),f=n(94729),m=n(63136),h=n(82776);function g(e,t){if("undefined"==typeof window||void 0===window.Stripe)return null;let n={};return t&&t.stripe_user_id?h.NO_PLATFORM_CUSTOMER_CLONE_COUNTRIES.includes(t.stripe_country)&&(n.stripeAccount=t.stripe_user_id):console.warn("No publication passed for Stripe connection"),window.Stripe(e,n)}function _(e){return e.elements({locale:window._preloads&&window._preloads.language||"auto"}).create("card",{style:{base:{fontSize:"14px",lineHeight:"40px",fontFamily:'-apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'}},disableLink:!0})}class b extends c.Component{componentDidMount(){!this.props.disabled&&(this.props.element&&this.props.element.mount(this.elementContainer),this.props.addressElement&&this.props.addressElement.mount(this.addressContainer))}componentDidUpdate(e){this.props.disabled||(this.props.element&&!e.element&&this.props.element.mount(this.elementContainer),this.props.addressElement&&!e.addressElement&&this.props.addressElement.mount(this.addressContainer))}componentWillUnmount(){try{this.props.element&&this.props.element.unmount(this.elementContainer),this.props.addressElement&&this.props.addressElement.unmount(this.addressContainer)}catch(e){}}render(){let{className:e,element:t,isPaymentElement:n,addressElement:r,disabled:i}=this.props;return t||n?(0,s.FD)("div",{className:u()("fancy-stripe",e,{"payment-element":n}),children:[r&&(0,s.Y)("div",{ref:this.assignAddressContainer,style:{paddingBottom:"24px"}}),(0,s.Y)("div",{ref:this.assignElementContainer}),i&&(0,s.Y)(m.EY.B4,{translated:!0,color:"error",children:"This type of purchase is currently unavailable in your region."})]}):null}constructor(...e){super(...e),(0,r._)(this,"elementContainer",void 0),(0,r._)(this,"addressContainer",void 0),(0,r._)(this,"assignElementContainer",e=>{this.elementContainer=e}),(0,r._)(this,"assignAddressContainer",e=>{this.addressContainer=e})}}class v extends c.Component{async componentDidMount(){let e=!1;if(this.state.paymentRequest){try{let t=await this.state.paymentRequest.canMakePayment();t&&t.applePay&&(e=!0)}catch(e){console.error(e)}(0,p.u4)(p.qY.APPLE_PAY_SETUP_FINISHED,{success:e})}if(await this.setState({canMount:e}),e){if(this.button||await new Promise(e=>setTimeout(e,0)),!this.state.stripeButton)return void console.error("stripeButton not ready");if(this.state.stripeButton.mount(this.button),!this.state.paymentRequest)return void console.error("paymentRequest not ready");this.state.paymentRequest.on("token",e=>this.onTokenReceived(e)),this.state.paymentRequest.update({currency:this.props.plan.currency,total:this.getPaymentTotal()})}else this.props.onVisibilityChanged&&this.props.onVisibilityChanged(!1)}componentDidUpdate(e){let t=!1;for(let i of["pub","plan","quantity","coupon","notRecurring","variableAmount"]){var n,r;if(e[i]!==this.props[i]||"coupon"===i&&e[i]&&(null==(n=e[i])?void 0:n.loading)&&(!this.props[i]||!(null==(r=this.props[i])?void 0:r.loading))){t=!0;break}}t&&this.state.paymentRequest&&this.state.paymentRequest.update({currency:this.props.plan.currency,total:this.getPaymentTotal()})}componentWillUnmount(){if(this.state.paymentRequest&&this.state.paymentRequest.off("token"),this.state.stripeButton)try{this.state.stripeButton.unmount(this.button)}catch(e){}}async onTokenReceived(e){(0,p.u4)(p.qY.APPLE_PAY_ATTEMPED);try{if(!this.props.onSuccess)return void console.error("No onSuccess handler for Apple Pay");await this.props.onSuccess({email:e.payerEmail,name:e.payerName,stripe_token:e.token}),e.complete("success"),(0,p.u4)(p.qY.APPLE_PAY_SUCCEEDED)}catch(t){console.error("Apple Pay submission failed:",e,t),e.complete("fail"),(0,p.u4)(p.qY.APPLE_PAY_FAILED,{reason:t.message})}}getPaymentTotal(){var e,t,n,r;let i,{pub:o,plan:a,quantity:s,coupon:l,notRecurring:u,variableAmount:c}=this.props,d=0,p=Math.max(0,("trial_period_days"in a?a.trial_period_days:null)||0,l&&!l.error&&!l.loading&&l.trial_period_days||0,o.trial_end_override&&Math.ceil((o.trial_end_override-Date.now()/1e3)/60/60/24));u&&(p=0);let f=("metadata"in a&&(null==(e=a.metadata)?void 0:e.founding)?null!=(t=c||a.amount)?t:0:null!=(n=a.amount)?n:0)*(s||1),m=f;return l&&!l.error&&!l.loading&&(l.percent_off?m=Math.round(m*(1-(l.percent_off_precise||l.percent_off)/100)):l.amount_off&&(m=Math.max(0,m-l.amount_off)),m<=0&&(m=f,"once"===l.duration?"year"===a.interval?d+=12*a.interval_count:d+=a.interval_count:"repeating"===l.duration&&(d+=null!=(r=l.duration_in_months)?r:0))),u?i="one-time":(i="".concat(this.props.plan.interval,"ly"),this.props.quantity>1&&(i+=" per person"),d?(p>15&&(d+=Math.floor(p/30)),i+=" with ".concat(d,"-month trial")):p&&(i+=" with ".concat(p,"-day trial"))),{label:i,amount:m}}render(){var e;let{children:t,className:n,error:r}=this.props,{canMount:i}=null!=(e=this.state)?e:{};return void 0===i||i||"undefined"==typeof window?(0,s.FD)("div",{className:"apple-pay-parent-container",children:[i?(0,s.Y)("div",{className:"apple-pay-element ".concat(n||""),ref:this.assignButton}):(0,s.Y)("p",{className:"apple-pay-loader ".concat(n||""),children:"Loading…"}),r&&(0,s.Y)("div",{className:"error",children:r}),t]}):null}constructor(e,t){if(super(e,t),(0,r._)(this,"button",void 0),(0,r._)(this,"assignButton",e=>{this.button=e}),e.stripe&&e.pub.stripe_country){(0,p.u4)(p.qY.APPLE_PAY_SETUP_STARTED);try{const t=e.stripe.paymentRequest({country:this.props.pub.stripe_country,currency:this.props.plan.currency,total:this.getPaymentTotal(),requestPayerName:!0,requestPayerEmail:!0}),n=e.stripe.elements().create("paymentRequestButton",{paymentRequest:t});this.state={paymentRequest:t,stripeButton:n}}catch(e){console.error(e),(0,p.u4)(p.qY.APPLE_PAY_SETUP_FINISHED,{success:!1})}}}}class y extends c.Component{render(){let e=this.props,{children:t,ref:n,defaultValue:r}=e,o=(0,a._)(e,["children","ref","defaultValue"]);return this.state,(0,s.FD)("div",{className:"fancy-input",children:[(0,s.Y)("input",(0,i._)({ref:this.assignInput,defaultValue:r},o)),t]})}blur(){this._input&&this._input.blur()}constructor(...e){super(...e),(0,r._)(this,"_input",void 0),(0,r._)(this,"assignInput",e=>{this._input=e})}}class w extends c.Component{getInputs(){let e=[];if(this.base)for(let t of Array.from(this.base.getElementsByTagName("*")))["INPUT","TEXTAREA","SELECT"].includes(t.nodeName)&&t.getAttribute("name")&&"g-recaptcha-response"!==t.id&&e.push(t);return e}resetErrors(){this.setState({_paramErrors:{},_otherErrors:[]})}clear(){for(let e of(this.resetErrors(),this.getInputs()))e.blur&&e.blur(),"checkbox"===e.type?e.checked=!1:"select"===e.type?e.selectedIndex=-1:"radio"===e.type?e.checked=!1:"target"in e&&e.target?e.target.value="":e.value=""}handleStripeChange(e){let{error:t}=e;t?this.setState({_stripeError:t.message}):this.setState({_stripeError:null})}componentDidMount(){this._mountTime=new Date,this._stripeCardOrPaymentElement&&this._stripeCardOrPaymentElement.addEventListener("change",e=>this.handleStripeChange(e))}componentDidUpdate(e){let{country:t,currency:n,email:r,name:o,pub:a,stripeClientSecret:s,stripeElementAppearance:l,themeVariables:u,useStripePaymentElement:c,enableLink:d}=this.props;if(c){var p,f;if(e.useStripePaymentElement||(null==(p=this._stripeCardOrPaymentElement)||p.destroy(),this._stripeCardOrPaymentElement=null),s!==e.stripeClientSecret)if(s){this.setState({loading:!0});let e=this.props.isPlatformCustomer?this._stripe:this._connectedStripe;if(!e)return void console.error("Stripe instance not available in componentDidUpdate");({elements:this._stripeElements,addressElement:this._stripeAddressElement,paymentElement:this._stripeCardOrPaymentElement}=function(e,t){let{withAddressElement:n=!1,currency:r,email:o,name:a,country:s,stripeElementAppearance:l={},themeVariables:{color_theme_accent:u,color_theme_bg_contrast_1:c,print_on_pop:d,print_on_web_bg_color:p,print_secondary_on_web_bg_color:f}={},enableLink:m=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},h={clientSecret:t,currency:r,appearance:(0,i._)({theme:"flat",variables:{borderRadius:"8px",colorBackground:c||void 0,colorPrimary:u||"rgb(255, 103, 25)",accessibleColorOnColorPrimary:d||void 0,colorText:p||void 0,colorTextPlaceholder:f||void 0,colorTextSecondary:f||void 0}},l),locale:window._preloads&&window._preloads.language||"auto"},g=e.elements(h);return{elements:g,addressElement:n?g.create("address",{mode:"billing",defaultValues:{name:a,address:{country:s}}}):void 0,paymentElement:g.create("payment",{layout:{type:"tabs",defaultCollapsed:!1},defaultValues:{billingDetails:{email:o,name:a,address:{country:s}}},wallets:{link:m?"auto":"never"},terms:{card:"never",applePay:"never",googlePay:"never"}})}}(e,s,{withAddressElement:(null==a?void 0:a.stripe_country)==="IN",currency:n,email:r,name:null!=o?o:void 0,country:t,stripeElementAppearance:l,themeVariables:u,enableLink:d})),this.setState({loading:!1})}else e.stripeClientSecret&&(null==(f=this._stripeCardOrPaymentElement)||f.destroy(),this._stripeCardOrPaymentElement=null)}}componentWillUnmount(){this._stripeCardOrPaymentElement&&this._stripeCardOrPaymentElement.destroy()}onInputBlur(e){this.props.analyticsName&&this._mountTime&&new Date().getTime()-this._mountTime.getTime()>1e3&&e.target&&e.target.value&&!e.target._blurTracked&&((0,p.u4)("".concat(this.props.analyticsName," Input Filled"),{name:e.target.name}),e.target._blurTracked=!0)}async onPaymentRequestAttempt(e){let t=await this.handleSubmitAsync(null,e);if(t)throw t}handleSubmit(e){e&&e.preventDefault(),this.handleSubmitAsync(e).catch(e=>{console.error(e)})}async handleSubmitAsync(e){let t,n,r,i,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.preventDefault(),this.props.analyticsName&&(0,p.u4)("".concat(this.props.analyticsName," Submit Pressed")),this.props.loading||this.state.loading||this.props.disableSubmit)return;this.resetErrors(),this.setState({loading:!0});let a=null;if(this.stripeElement&&!o.stripe_token&&!this.props.useStripePaymentElement){let{token:e=null,error:t}=this._stripe?await this._stripe.createToken(this._stripeCardOrPaymentElement):{error:{message:""}};if(e)a=e;else{this.setState({loading:!1,_stripeError:t&&t.message}),this.props.analyticsName&&(console.log("error",t),(0,p.u4)("".concat(this.props.analyticsName," Missing Payment"),{type:t&&t.type,code:t&&t.code,decline_code:t&&t.decline_code,reason:t&&t.message}));return}}if(this.stripeElement&&this.props.useStripePaymentElement){var s,l,u,c=this;if(t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c.props.isPlatformCustomer?c._stripe:c._connectedStripe;return t?c._stripeElements?t.confirmSetup({elements:c._stripeElements,redirect:"if_required",confirmParams:e}):void console.error("Stripe elements not available"):void console.error("Stripe instance not available")},!this.props.performSubmit){let{setupIntent:e}=await t();if(!e)return void this.setState({loading:!1});n=e.payment_method}}let d={};for(let e of this.getInputs())if(e.blur&&e.blur(),"checkbox"==e.type)d[e.name]=!!e.checked;else if("radio"==e.type)e.checked&&(d[e.name]=e.value);else if("select"===e.type){let t=e.options[e.selectedIndex];t?d[e.name]=t.value:console.error("No selected option in select element")}else d[e.name]=e.value;if(Object.keys(o).forEach(e=>{!d[e]&&o[e]&&(d[e]=o[e])}),a?d.stripe_token=a:n&&(d.paymentMethodId=n),this.props.prepareData)try{let t=await this.props.prepareData(d,e);t&&(d=t)}catch(e){throw this.setState({loading:!1}),e}this.props.onChangeLoadingState&&this.props.onChangeLoadingState(!0);try{this.props.performSubmit?r=this.props.useStripePaymentElement?await this.props.performSubmit(d,{confirmSetup:t}):await this.props.performSubmit(d):this.props.action?r=this.props.method&&"get"===this.props.method?{body:await (0,f.x6)(this.props.action,{query:d,method:this.props.method})}:{body:await (0,f.x6)(this.props.action,{json:d,method:this.props.method||"POST"})}:this.props.onSubmit&&this.props.onSubmit(d)}catch(t){let e=t.response&&t.response.body instanceof ReadableStream;t.response&&t.body&&e?t.response={body:t.body,status:null==(l=t.response)?void 0:l.status}:t.response&&t.body&&!t.response.body&&(t.response.body=t.body),i=t}if((null==r||null==(s=r.body)?void 0:s.confirmPaymentUrl)&&r.body.clientSecret&&this._connectedStripe){(0,p.u4)(p.qY.PAYMENT_CONFIRMATION_STARTED);let e=await this._connectedStripe.confirmCardPayment(r.body.clientSecret);if(e.error){(0,p.u4)(p.qY.PAYMENT_CONFIRMATION_FAILED,{error:null==(u=e.error)?void 0:u.message});let t={error:e.error.message||"Failed to confirm payment"};i={response:{body:t,text:JSON.stringify(t)}}}else(0,p.u4)(p.qY.PAYMENT_CONFIRMATION_SUCCEEDED)}if(this.setState({loading:!1}),this.props.onChangeLoadingState&&this.props.onChangeLoadingState(!1),i){if(this.processErrors(i.response),this.props.onError&&this.props.onError(i,d),!i.response)throw i}else this.props.onSuccess&&this.props.onSuccess(r,d);return i}processErrors(e){let t={},n=[];if(e&&e.body&&e.body.errors){let r=this.getInputs();e.body.errors.forEach(e=>{!0!==this.props.noInlineErrors&&e.param&&r.filter(t=>t.getAttribute("name")===e.param).length>0?t[e.param]?(console.log("Discarding repeated error"),console.log(e)):t[e.param]=e:n.push(e)})}else e&&e.body&&"string"==typeof e.body.error?n.push({msg:e.body.error}):n.push({msg:"Something went wrong"});this.setState({_paramErrors:t,_otherErrors:n}),this.props.analyticsName&&(0,p.u4)("".concat(this.props.analyticsName," Error"),{paramErrors:JSON.stringify(t),otherErrors:JSON.stringify(n)})}render(){var e;let t=this.props,n=null!=(e=this.state)?e:{},r=t.autoLock&&n.loading||t.loading,a=!1,l=!1,d=t.getConfigFor("disable_card_element_in_europe")&&!t.useStripePaymentElement&&t.pub&&h.EEA_COUNTRIES.includes(t.pub.stripe_country)&&(!t.currency||"eur"===t.currency),p=e=>{let f=[];return c.Children.toArray(e).forEach(e=>{if(!e)return null;if("object"==typeof e&&(e.type===y||"input"===e.type||"textarea"===e.type||"select"===e.type)&&e.props&&"name"in e.props&&e.props.name){let t=e.props.name;if(f.push((0,c.cloneElement)(e,{disabled:r||"disabled"in e.props&&e.props.disabled,onChange:t=>{let n=e.props&&"onChange"in e.props&&e.props.onChange||e.props&&"onInput"in e.props&&e.props.onInput;n&&"function"==typeof n&&n(t),this.props.onChange&&this.props.onChange(t)},onInput:t=>{e.props&&"onInput"in e.props&&e.props.onInput&&"function"==typeof e.props.onInput&&e.props.onInput(t),this.props.onInput&&this.props.onInput(t)},onBlur:t=>{this.onInputBlur(t),e.props&&"onBlur"in e.props&&e.props.onBlur&&"function"==typeof e.props.onBlur&&e.props.onBlur(t)}})),n._paramErrors[null!=t?t:"undefined"]&&!r){let e=n._paramErrors[null!=t?t:"undefined"];if(!e)return void console.error("No error for",t);e.msgHTML?f.push((0,s.Y)("div",(0,o._)((0,i._)({className:"error"},t&&{name:t}),{dangerouslySetInnerHTML:{__html:e.msgHTML}}))):f.push((0,s.Y)("div",(0,o._)((0,i._)({className:"error"},t&&{name:t}),{children:e.msg||"Invalid"})))}}else if("object"==typeof e&&e.props&&"type"in e.props&&"submit"===e.props.type)f.push((0,c.cloneElement)(e,{disabled:r||"disabled"in e.props&&e.props.disabled,loading:r||"loading"in e.props&&e.props.loading,onClick:t=>{e.props&&"onClick"in e.props&&e.props.onClick&&"function"==typeof e.props.onClick&&!1!==e.props.onClick(t)&&this.handleSubmit(t)}}));else if("object"==typeof e&&e.props&&"id"in e.props&&"error-container"===e.props.id){if(n._otherErrors&&!r){let t=n._otherErrors.map(e=>e.msgHTML?(0,s.Y)("div",{className:"error other-error",dangerouslySetInnerHTML:{__html:e.msgHTML}}):(0,s.Y)("div",{className:"error other-error",children:e.msg})).concat(e.props&&e.props.children?c.Children.toArray(e.props.children):[]);f.push((0,c.cloneElement)(e,{},t))}}else if("object"==typeof e&&"type"in e&&e.type===b){if(a)throw Error("Can only handle one stripe element");a=!0,f.push((0,c.cloneElement)(e,{ref:t=>{e.props&&e.props.ref&&e.props.ref(t),this.stripeElement=t},element:this._stripeCardOrPaymentElement,isPaymentElement:this.props.useStripePaymentElement,addressElement:this._stripeAddressElement,disabled:d})),!n._stripeError&&this._stripeCardOrPaymentElement||r||"undefined"==typeof window||f.push((0,s.Y)("div",{className:u()("error",t.stripeErrorClassName),role:"alert",children:n._stripeError||"Stripe payments not loaded. Are there blocked scripts?"}))}else if("object"==typeof e&&"type"in e&&e.type===v){if(l)throw Error("Can only handle one stripe payment request button");l=!0,f.push((0,c.cloneElement)(e,{ref:t=>{e.props&&e.props.ref&&e.props.ref(t),this.stripePaymentRequestButton=t},stripe:this._stripe,onSuccess:t=>(e.props&&"onSuccess"in e.props&&e.props.onSuccess&&"function"==typeof e.props.onSuccess&&e.props.onSuccess(t),this.onPaymentRequestAttempt(t))}))}else"object"==typeof e&&"props"in e&&e.props&&e.props.children?f.push((0,c.cloneElement)(e,{},p(e.props.children))):f.push(e)}),f};return(0,s.Y)("form",(0,o._)((0,i._)({className:"form ".concat(t.className||""),action:t.noJsAction||t.action,method:t.method&&["get","post"].includes(t.method.toLowerCase())&&t.method.toLowerCase()||"post",autoComplete:t.autoComplete,onSubmit:e=>this.handleSubmit(e),noValidate:!0},t.enctype&&{enctype:t.enctype},t.id&&{id:t.id}),{children:p(t.children)}))}constructor(e,t){super(e,t),(0,r._)(this,"_stripe",void 0),(0,r._)(this,"_connectedStripe",void 0),(0,r._)(this,"_stripeCardOrPaymentElement",void 0),(0,r._)(this,"_mountTime",void 0),(0,r._)(this,"_stripeElements",void 0),(0,r._)(this,"_stripeAddressElement",void 0),(0,r._)(this,"stripeElement",void 0),(0,r._)(this,"stripePaymentRequestButton",void 0),this.state={_paramErrors:{},_otherErrors:[],_stripeError:null,loading:!1},this.props.stripe_publishable_key&&(this._stripe=g(this.props.stripe_publishable_key,this.props.pub),this._stripe&&(this.props.useStripePaymentElement||(this._stripeCardOrPaymentElement=_(this._stripe)),this._connectedStripe=function(e,t){if("undefined"==typeof window||void 0===window.Stripe||!(null==t?void 0:t.stripe_user_id))return null;let n={stripeAccount:t.stripe_user_id};return window.Stripe(e,n)}(this.props.stripe_publishable_key,this.props.pub)))}}let S=(0,d.yq)(w)},56778:function(e,t,n){"use strict";n.d(t,{A:()=>u});var r=n(99851),i=n(4006),o=n(32485),a=n.n(o),s=n(17402),l=n(68349);class u extends s.Component{async componentDidMount(){"undefined"!=typeof window&&(this.ref||await new Promise(e=>setTimeout(e,0)),this.checkVisibility(),(this.props.parent||window).addEventListener("scroll",this.checkVisibility))}componentWillUnmount(){"undefined"!=typeof window&&(this.props.parent||window).removeEventListener("scroll",this.checkVisibility)}render(){let{className:e,children:t}=this.props;return(0,i.Y)("div",{ref:this.assignRef,className:a()("visibility-check",e),children:t})}constructor(...e){super(...e),(0,r._)(this,"ref",void 0),(0,r._)(this,"assignRef",e=>{this.ref=e}),(0,r._)(this,"checkVisibility",()=>{if(!this.ref)return;let e=this.ref.getBoundingClientRect(),t=this.props.threshold||0,n=this.props.parent?this.props.parent.clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight),r=!(e.bottom<0-t||e.top>=n+t);(0,l.qr)(this,async(e,t)=>{if(e.isVisible!==r)this.setState({isVisible:r});else if(!t.noDedupe)return;let n=r?"hadFirstVisible":"hadFirstInvisible",i=!e[n];i&&this.setState({[n]:!0}),(await Promise.all([r&&t.onVisible&&t.onVisible(),r&&t.onFirstVisible&&i&&t.onFirstVisible(),!r&&t.onInvisible&&t.onInvisible(),!r&&t.onFirstInvisible&&i&&t.onFirstInvisible()])).reduce((e,t)=>!0===t||e)&&this.checkVisibility()})})}}},74322:function(e,t,n){"use strict";n.d(t,{P:()=>l,v:()=>s});var r=n(4006),i=n(17402),o=n(85902);let a=(0,i.createContext)(!1);function s(e){let{children:t,context:n}=e;return(0,r.Y)(o.vd,{context:n,children:(0,r.Y)(a.Provider,{value:!0,children:t})})}function l(){return(0,i.useContext)(a)}},51440:function(e,t,n){"use strict";n.d(t,{PC:()=>s,U6:()=>a});var r=n(32641),i=n(4006),o=n(17402);let a=(0,o.createContext)({country:"US"});function s(e){var{children:t}=e,n=(0,r._)(e,["children"]);let s=(0,o.useMemo)(()=>n,Object.values(n));return(0,i.Y)(a.Provider,{value:s,children:t})}a.displayName="LocaleContext"},25006:function(e,t,n){"use strict";n.d(t,{Eo:()=>c,df:()=>u,pP:()=>l});var r,i,o=n(4006),a=n(17402);let s="undefined"!=typeof window&&null!=(i=null==(r=window._preloads)?void 0:r.pub)?i:null,l=(0,a.createContext)(s);function u(){return(0,a.useContext)(l)}function c(e){let{children:t,pub:n}=e;return(0,o.Y)(l.Provider,{value:null!=n?n:null,children:t})}l.displayName="PubContext"},25757:function(e,t,n){"use strict";n.d(t,{$5:()=>l,dX:()=>u});var r=n(53928),i=n(66565),o=n(44803),a=n(82260),s=n(39318);function l(e){let t=(0,i.zj)();t.properties.is_free_subscribed||e||(t.properties.is_free_subscribed=!0,c())}function u(){if("undefined"==typeof window)return;let e=new URL(location.toString());e.searchParams.get("just_signed_up")&&(e.searchParams.delete("just_signed_up"),history.replaceState({},"",e),c())}function c(){var e,t;let n,l=(0,i.zj)();(0,i.BU)("sign_up"),(0,i.b8)("event",{ec:"Signup",ea:"Signup Success"}),(0,i.e$)("conversion",(null==l?void 0:l.adwordsAccountId)&&(null==l?void 0:l.adwordsEventSendTo)?{send_to:"".concat(l.adwordsAccountId,"/").concat("Yo9oCMOM1MYDEKuN5pYB")}:{});let u=(0,i.wJ)();u&&(new Image().src="proxy.php?url=https://www.facebook.com/tr?id=".concat(u,"&ev=CompleteRegistration")),(0,a.F)("signup"),"undefined"!=typeof window&&window.PARSELY&&window.PARSELY.loaded&&window.PARSELY.conversions&&window.PARSELY.conversions.trackNewsletterSignup&&window.PARSELY.conversions.trackNewsletterSignup("Newsletter Sign Up"),"bankless"===(null!=(t=null==(n="undefined"!=typeof window?null==(e=window._preloads)?void 0:e.pub:void 0)?void 0:n.subdomain)?t:null)&&(window.history.replaceState({},document.title,(0,s.oRR)({plan:"free"})),(0,o.MY)()),(0,r.G1)()}n(82776)},86500:function(e,t,n){"use strict";n.d(t,{$5:()=>r.$5,Bu:()=>a.T,Jw:()=>o.Jw,TM:()=>o.TM,YT:()=>o.YT,b8:()=>i.b8,fN:()=>o.fN,kE:()=>o.kE,qY:()=>o.qY,sM:()=>o.sM,u4:()=>o.u4});var r=n(25757),i=n(66565),o=n(44803),a=n(43880)},44803:function(e,t,n){"use strict";n.d(t,{Jw:()=>U,MY:()=>Y,TM:()=>R,YT:()=>D,fN:()=>N,fe:()=>O,j6:()=>P,kE:()=>M,qY:()=>w,sH:()=>x,sM:()=>L,u4:()=>C,wc:()=>B});var r,i,o=n(69277),a=n(72343),s=n(53928),l=n(4392),u=n(66565),c=n(7354),d=n(13022),p=n(82260),f=n(68349),m=n(40659),h=n(16291),g=n(18189),_=n(39318),b=n(41086),v=n(94402),y=n(82776);let w=g.q,S="undefined"!=typeof window,E=!!(S&&window.navigator&&window.navigator.sendBeacon),T=!(0,f.lT)()&&E,k=new c.W({batchOptions:T?{maxBatchSize:8,maxBatchDataSize:1e4}:void 0,send:function(e,t){S&&(T&&t&&e.push(q(e,t)),new Image().src=(0,_.yRP)(T?"/api/v1/firehose/batch":"/api/v1/firehose",{_:new Date().getTime(),d:e.join(",")}))},beacon:function(e,t){if(!S)return;e.push(q(e,"beacon",t));let n=new Blob([JSON.stringify(e)],{type:"application/json"});navigator.sendBeacon("/api/v1/firehose/batch",n)}}),P=()=>{S&&T&&(window.addEventListener("beforeunload",e=>{k.sendBeacon(e)}),window.addEventListener("pagehide",e=>{k.sendBeacon(e)}),document.addEventListener("visibilitychange",e=>{"hidden"===document.visibilityState&&k.sendBeacon(e)}),setInterval(()=>{k.intervalFlush()},6e4))},I=S&&window!=window.top&&(0,v.G)(f.QT),A="browser";function R(){return I}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};try{var n;if(["development","test"].includes((n="production",void 0!==n)?n:"")&&!e)throw Error("`undefined` event passed to FRONTEND track call");H(e,Object.assign({},t))}catch(e){try{window.Sentry&&window.Sentry.captureException(e)}catch(t){console.error("Failed to track event",e)}}}function N(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};C(w.PUBLICATION_VISITED,(0,o._)({visited_publication_id:e.id,visited_publication_subdomain:e.subdomain,source:t},n,(0,y.extractEventAttributionDataFromRecord)((0,m.cf)())))}function U(e){let{post:t,hasPaywall:n,surface:r,markRead:i,user:a,trackerUuid:s}=e;C(w.POST_SEEN,(0,o._)({post_id:t.id,post_audience:t.audience,post_type:t.type,has_paywall:n,post_age_minutes:t.post_date&&(0,h.A)().diff(t.post_date,"minute"),surface:r,tracker_uuid:s},(0,y.extractEventAttributionDataFromRecord)((0,m.cf)()))),(!a||i)&&x(t.id)}function x(e){return fetch("/api/v1/posts/".concat(e,"/seen"),{method:"POST"})}function L(e){let{post:t,hasPaywall:n,surface:r,trackerUuid:i}=e;C(w.POST_BOTTOM_SEEN,{post_id:t.id,post_audience:t.audience,post_type:t.type,has_paywall:n,surface:r,tracker_uuid:i})}function M(e){let{post:t}=e;(null==t?void 0:t.id)&&(C(w.POST_PAGE_PINGBACK,{seconds:0,post_id:t.id}),setTimeout(()=>{C(w.POST_PAGE_PINGBACK,{seconds:10,post_id:t.id})},1e4))}function D(e){let{previous:t,url:n}=e;!t||n.includes("_no_an=true")||Y()}S&&(navigator.standalone||(null==(r=(i=window).matchMedia)?void 0:r.call(i,"(display-mode: standalone)").matches))&&(A="standalone");let F=()=>document.location.pathname.startsWith("/p/"),B=()=>{var e,t,n;let r=window._preloads,i=(null==r||null==(e=r.post)?void 0:e.id)&&(null==r?void 0:r.pub),o=!!(null==r||null==(t=r.post)?void 0:t.slug)&&(null==r||null==(n=r.post)?void 0:n.slug)===document.location.pathname.split("/")[document.location.pathname.split("/").length-1];return!!(i&&F()&&o)},O=e=>e?e.is_subscribed?"Paid subs":e.is_free_subscribed?"Free subs":"Anonymous":"Anonymous";function Y(){var e,t,n;let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("undefined"==typeof document||document.location.pathname.startsWith("/embed")&&S&&(null==(n=window)||null==(t=n._preloads)||null==(e=t.pub)?void 0:e.embed_tracking_disabled))return;H(w.PAGES,Object.assign(function(){let e={};if(S){let t=window._preloads&&"post"in window._preloads&&window._preloads.post,n=window.location&&/^\/p\/([^\/]+)/.exec(window.location.pathname),r=window.location&&/\/p-(\d+)/.exec(window.location.pathname);if(n&&n[1]){let r=n[1];t&&t.slug===r&&(e.post_id=t.id,e.post_audience=t.audience,e.post_type=t.type),e.post_slug=r}else r&&r[1]&&(e.post_id=parseInt(r[1]))}return e}(),r));let i=(0,u.wJ)();if(i&&(new Image().src="proxy.php?url=https://www.facebook.com/tr?id=".concat(i,"&ev=PageView")),(0,p.F)("pageview"),(0,u.b8)("pageview"),(0,u.BU)("page_view"),S&&!F()&&(0,s.Mz)({path:document.location.pathname,title:document.title,sections:"",authors:""}),S&&window.PARSELY&&window.PARSELY.loaded&&window.PARSELY.beacon&&window.PARSELY.beacon.trackPageView){let e={url:document.location.origin+document.location.pathname+document.location.search,urlref:document.referrer||"",js:1,data:{}};if((0,d.Ay)("add_section_and_tag_metadata")){if(F()&&!B())return;if(F()){let t=window._preloads;e.data={audience:O(null==t?void 0:t.user)}}}window.PARSELY.beacon.trackPageView(e)}}function W(e){var t,n,r,i,o,s,u,c,d;let p=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=null;try{m=Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){}let h={event:e,timestamp:new Date().toISOString(),properties:Object.assign({browserSessionId:l.O,iframeVisitId:I,r:(0,b.y)("r"),magicUserId:"undefined"!=typeof window&&(null==(r=window)||null==(n=r._preloads)||null==(t=n.user)?void 0:t.is_magic)?window._preloads.user.id:void 0},p),context:{client_type:"web",displayMode:A,page:{referrer:document.referrer,title:document.title,url:document.location.href,height:null!=(s="undefined"!=typeof window&&window.innerHeight)?s:0,width:null!=(u="undefined"!=typeof window&&window.innerWidth)?u:0},campaign:(0,a.tm)(),timezone:m,screen:{height:null!=(c="undefined"!=typeof window&&(null==(i=window.screen)?void 0:i.height))?c:0,width:null!=(d="undefined"!=typeof window&&(null==(o=window.screen)?void 0:o.width))?d:0}}};return(0,f.Cw)(JSON.stringify(h))}function q(e,t,n){let r=e.length,i=e.map(e=>e.length).reduce((e,t)=>e+t,0);return W(w.FIREHOSE_BATCH_SENT,{dataSize:i,batchSize:r,batchType:t,eventType:null==n?void 0:n.type})}function H(e){var t,n,r;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"==typeof window||"undefined"==typeof document)return;let o=W(e,i);k.add(o),(null==(r=window)||null==(n=r._preloads)||null==(t=n.user)?void 0:t.is_global_admin)&&console.log("EVENT: ".concat(e),i)}},94729:function(e,t,n){"use strict";n.d(t,{Qd:()=>u,fk:()=>l,x6:()=>s});var r=n(99851),i=n(69277),o=n(32641),a=n(68349);async function s(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,i._)({cache:"no-cache"},n),{query:a,json:s}=r,u=(0,o._)(r,["query","json"]),c=e;if(a){let t=(a instanceof URLSearchParams?a:new URLSearchParams(Object.entries(a).reduce((e,t)=>{let[n,r]=t;return void 0!==r&&(Array.isArray(r)?r.forEach(t=>{void 0!==t&&e.push(["".concat(n,"[]"),t])}):e.push([n,r])),e},[]))).toString();t&&(-1!==e.indexOf("?")?c+="&".concat(t):c+="?".concat(t))}s&&(u.body=JSON.stringify(s),u.headers instanceof Headers||(u.headers=new Headers(u.headers)),u.headers.set("Content-Type","application/json")),u.method&&(u.method=u.method.toUpperCase());let d=await fetch(c,u);if(!d.ok){let e;try{e=await d.json()}catch(t){e={}}throw new l(d,e)}return(null==(t=d.headers.get("Content-Type"))?void 0:t.startsWith("application/json"))?d.json():d.text()}class l extends Error{getMessage(e){return(0,a.LJ)(this.body,e)}constructor(e,t){const n=URL.parse?URL.parse(e.url):null;super("".concat(e.status,": ").concat(e.statusText)),(0,r._)(this,"response",void 0),(0,r._)(this,"body",void 0),(0,r._)(this,"url",void 0),this.response=e,this.body=t,this.name="FetchError",this.url=n}}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Something went wrong.";return e instanceof l?e.getMessage():t}},74894:function(e,t,n){"use strict";n.d(t,{M$:()=>a,Om:()=>l,Zu:()=>s});var r=n(83673),i=n.n(r);n(94729);var o=n(46009);function a(e,t){var n;return null!=(n=(null==t?void 0:t.cover_image)||(null==t?void 0:t.podcast_art_url)||(null==e?void 0:e.podcast_art_url))?n:null}let s=function(e){var t,n;let r,{includeNonLive:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=null!=(n=null==(t=e.sections)?void 0:t.filter(e=>{let{is_podcast:t,is_live:n}=e;return t&&(a||n)}).map(t=>{var n;let r=(0,o.lL)({pub:e,section:t});return{slug:t.slug,podcastTitle:null!=(n=r.title)?n:"",description:r.description,artUrl:r.artUrl,sectionId:t.id}}))?n:[];return e.podcast_enabled&&(r=(0,o.j_)({pub:e})),i()([r&&{slug:e.subdomain,podcastTitle:r.title,description:r.description,artUrl:r.artUrl,sectionId:null},...s])};function l(e){var t,n;let{pub:r,section:i}=e;return i?null!=(t=i.spotify_podcast_settings)?t:null:null!=(n=r.spotify_podcast_settings)?n:null}},17186:function(e,t,n){"use strict";n.d(t,{X3:()=>a,xm:()=>o});var r=n(87369),i=n.n(r);let o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"undefined"!=typeof window?i().get(e,t):t},a=(e,t)=>{if("undefined"!=typeof window)return i().set(e,t)}},68349:function(e,t,n){"use strict";n.d(t,{A9:()=>em,Cw:()=>eb,EW:()=>F,Eh:()=>eR,FK:()=>ef,Gr:()=>ec,H7:()=>er,Hm:()=>B,I5:()=>q,LJ:()=>H,LQ:()=>eB,Lm:()=>e_,NN:()=>D,P7:()=>eD,Q2:()=>Z,QT:()=>ek,Sd:()=>ep,TJ:()=>eN,Tf:()=>el,Uj:()=>x,V2:()=>ew,Wy:()=>eF,YK:()=>ed,aS:()=>eI,ar:()=>en,cH:()=>eu,cX:()=>z,dJ:()=>ey,dO:()=>U,gI:()=>K,gK:()=>eA,gm:()=>j,iQ:()=>ei,jL:()=>eg,lT:()=>V,lW:()=>ee,m0:()=>J,nB:()=>ea,nr:()=>X,o7:()=>G,qm:()=>eP,qr:()=>eE,rr:()=>$,sg:()=>L,uX:()=>Y,vL:()=>eT,vy:()=>eo,wb:()=>eS,wp:()=>eC,zY:()=>M,zs:()=>W});var r=n(69277),i=n(79785),o=n(4006),a=n(99862),s=n(72343),l=n(14242);n(74894);var u=n(16291),c=n(96400);n(35884);var d=n(39318),p=n(9036),f=n(98949),m=n(82776);function h(){let e=(0,i._)(["","% off first month"]);return h=function(){return e},e}function g(){let e=(0,i._)(["","% off first year"]);return g=function(){return e},e}function _(){let e=(0,i._)(["","% off first week"]);return _=function(){return e},e}function b(){let e=(0,i._)(["","% off first day"]);return b=function(){return e},e}function v(){let e=(0,i._)(["","% off first payment"]);return v=function(){return e},e}function y(){let e=(0,i._)(["","% off forever"]);return y=function(){return e},e}function w(){let e=(0,i._)([""," off first month"]);return w=function(){return e},e}function S(){let e=(0,i._)([""," off first year"]);return S=function(){return e},e}function E(){let e=(0,i._)([""," off first week"]);return E=function(){return e},e}function T(){let e=(0,i._)([""," off first day"]);return T=function(){return e},e}function k(){let e=(0,i._)([""," off first payment"]);return k=function(){return e},e}function P(){let e=(0,i._)([""," off forever"]);return P=function(){return e},e}function I(){let e=(0,i._)([" at ",""]);return I=function(){return e},e}function A(){let e=(0,i._)([" at ",""]);return A=function(){return e},e}function R(){let e=(0,i._)([" at ",""]);return R=function(){return e},e}function C(){let e=(0,i._)([" at ",""]);return C=function(){return e},e}let N="undefined"==typeof window||!window.addEventListener;N||window.addEventListener("load",()=>{N=!0},!1),"undefined"!=typeof window&&window._preloads;let U="undefined"!=typeof window?new l.A:null,x=e=>{N?e():window.addEventListener("load",e,!1)},L=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this,r=null;return function(){null!==r&&clearTimeout(r),"undefined"!=typeof window&&(r=window.setTimeout(()=>e.apply(n,arguments),t))}},M=function(e,t){var n,r,i,o,a,s;let l,{language:u="en"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{iTemplate:d,iPlural:p}=c.TH.i(u);if(e&&!e.loading&&!e.error){if(e.trial_period_days)l=p("1 day free trial","%1 day free trial",e.trial_period_days);else if(e.extra_seats)l=p("an additional seat","%1 additional seats",e.extra_seats);else if(e.percent_off)if("once"===e.duration)if(t)switch(t.interval){case"month":l=d(h(),Math.round(e.percent_off_precise||e.percent_off));break;case"year":l=d(g(),Math.round(e.percent_off_precise||e.percent_off));break;case"week":l=d(_(),Math.round(e.percent_off_precise||e.percent_off));break;case"day":l=d(b(),Math.round(e.percent_off_precise||e.percent_off))}else l=d(v(),Math.round(e.percent_off_precise||e.percent_off));else l="repeating"===e.duration?null===e.duration_in_months||e.duration_in_months%12==0?p("%2% off for 1 year","%2% off for %1 years",(null!=(n=e.duration_in_months)?n:0)/12,"".concat(Math.round(e.percent_off_precise||e.percent_off))):p("%2% off for 1 month","%2% off for %1 months",e.duration_in_months,"".concat(Math.round(e.percent_off_precise||e.percent_off))):d(y(),Math.round(e.percent_off_precise||e.percent_off));else if(e.amount_off)if("once"===e.duration)if(t)switch(t.interval){case"month":l=d(w(),(0,m.centsToPriceString)(e.amount_off,t.currency));break;case"year":l=d(S(),(0,m.centsToPriceString)(e.amount_off,t.currency));break;case"week":l=d(E(),(0,m.centsToPriceString)(e.amount_off,t.currency));break;case"day":l=d(T(),(0,m.centsToPriceString)(e.amount_off,t.currency))}else{let n=(0,m.centsToPriceString)(e.amount_off,null!=(r=null==t?void 0:t.currency)?r:"");l=d(k(),n)}else if("repeating"===e.duration)if(null===e.duration_in_months||e.duration_in_months%12==0){let n=(0,m.centsToPriceString)(e.amount_off,null!=(i=null==t?void 0:t.currency)?i:"");l=p("%2 off for 1 year","%2 off for %1 years",(null!=(o=e.duration_in_months)?o:0)/12,n)}else{let n=(0,m.centsToPriceString)(e.amount_off,null!=(a=null==t?void 0:t.currency)?a:"");l=p("%2 off for 1 month","%2 off for %1 months",e.duration_in_months,n)}else{let n=(0,m.centsToPriceString)(e.amount_off,null!=(s=null==t?void 0:t.currency)?s:"");l=d(P(),n)}return l}},D=function(e,t){let n=new Image;n.onload=()=>{n.onload=n.onerror=null,t&&t(n)},n.onerror=n.onload,n.src=e},F=e=>{let t=document.createElement("a");return t.href=e,(t.hostname||"").replace(/\.localhost$/,"")},B=e=>{let t=document.createElement("a");return t.href=e,t.pathname||""},O=e=>{let t=document.createElement("a");return t.href=e,(t.pathname||"")+(t.search||"")+(t.hash||"")},Y=(e,t)=>{var n;return H((null==e?void 0:e.body)||(null==e||null==(n=e.response)?void 0:n.body),t)},W=e=>{var t,n,r;let i=(null==e?void 0:e.body)||(null==e||null==(t=e.response)?void 0:t.body);return i&&i.error?{msg:i.error}:i&&i.errors&&i.errors.length>0?{html:null==(n=i.errors[i.errors.length-1])?void 0:n.msgHTML,msg:null==(r=i.errors[i.errors.length-1])?void 0:r.msg}:void 0},q=(e,t)=>{let n;try{n=e?JSON.parse(e&&e.responseText):e}catch(e){}return H(n,t)},H=(e,t)=>{if(t=t||"Something went wrong",e&&e.error)return e.error;if(e&&e.errors&&e.errors.length>0){var n;return(null==(n=e.errors[e.errors.length-1])?void 0:n.msg)||t}return t},G=function(){return[(0,o.Y)("input",{type:"email",name:"fake_email",placeholder:"email",style:{position:"absolute",top:-1e4,left:-1e4},"aria-hidden":"true",tabIndex:-1}),(0,o.Y)("input",{type:"password",name:"fake_password",placeholder:"password",style:{position:"absolute",top:-1e4,left:-1e4},"aria-hidden":"true",tabIndex:-1})]},$=function(){if("undefined"!=typeof navigator||"undefined"!=typeof window){let e=navigator.userAgent||navigator.vendor||window.opera;if(e&&(0,f.fJ)(e,{checkFirst4:!0}))return!0}return!1},V=()=>"undefined"!=typeof window&&!!window.navigator&&!!window.navigator.userAgent&&/(MSIE|Trident)/i.test(window.navigator.userAgent),j=()=>"undefined"!=typeof window&&!!window.navigator&&!!window.navigator.userAgent&&/Firefox/i.test(window.navigator.userAgent),J=()=>"undefined"!=typeof window&&!!window.navigator&&!!window.navigator.userAgent&&/Android/i.test(window.navigator.userAgent),K=()=>!!Q(),z=e=>{if("undefined"==typeof window||e||(e=window.navigator),!e)return!1;let t=e;return t.userAgentData&&t.userAgentData.platform?/macOS/.test(t.userAgentData.platform):/Mac/.test(e.platform)},X=()=>!!navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:z();return e?"⌘":"^"},Q=()=>"undefined"==typeof window?null:(0,f.UN)(),ee=e=>{if("undefined"!=typeof window&&e){if(navigator.clipboard&&navigator.clipboard.writeText)return void navigator.clipboard.writeText(e).catch(()=>{et(e)});et(e)}},et=e=>{var t,n,r;let i;(t=window,n=document,r=navigator,{copy:e=>{let o,a;(i=n.createElement("textArea")).value=e,n.body.appendChild(i),r.userAgent.match(/ipad|iphone/i)?((o=n.createRange()).selectNodeContents(i),(a=t.getSelection()).removeAllRanges(),a.addRange(o),i.setSelectionRange(0,999999)):i.select(),n.execCommand("copy"),n.body.removeChild(i)}}).copy(e);let o=t=>{t&&t.clipboardData?(t.clipboardData.setData("text/plain",e),t.preventDefault()):window.clipboardData&&window.clipboardData.setData("Text",e)};Q()||window.addEventListener("copy",o),setTimeout(()=>{try{let t=document.createElement("input");t.style="position: absolute; top: 0; right: 0; height: 1px; width: 1px;",document.documentElement.appendChild(t),t.value=e,t.contentEditable="true",t.readOnly=!1;let n=document.createRange();n.selectNodeContents(t);let r=window.getSelection();null==r||r.removeAllRanges(),null==r||r.addRange(n),t.setSelectionRange(0,999999),document.execCommand("copy"),document.documentElement.removeChild(t)}catch(e){}window.removeEventListener("copy",o)},0)},en=()=>"undefined"!=typeof window&&window.location.hash?decodeURIComponent(window.location.hash.slice(1)):null,er=function(e){let t=en();if(!t)return;let n=document.getElementById(t);n&&("number"!=typeof e&&(e=-122),document.documentElement.scrollTop=Math.max(0,((e,t)=>{let n="offset".concat((0,m.toTitleCase)(t)),r=0;for(;e&&e!==document.body;)r+=e[n],e="offsetParent"in e&&e.offsetParent||e.parentNode;return r})(n,"top")+e))},ei=(e,t)=>{e.className+=" ".concat(t)},eo=(e,t)=>{e&&(e.className=e.className.replace(RegExp("\\b".concat(t,"\\b"),"g"),"").trim())},ea=(e,t)=>RegExp("\\b".concat(t,"\\b"),"g").test(e.className),es=()=>{let e,t;return"undefined"!=typeof document&&void 0!==document.addEventListener&&(void 0!==document.hidden?(e="visibilitychange",t="hidden"):void 0!==document.msHidden?(e="msvisibilitychange",t="msHidden"):void 0!==document.webkitHidden&&(e="webkitvisibilitychange",t="webkitHidden")),{visibilityChange:e,hidden:t}},el=()=>{let{hidden:e}=es();return!e||!document[e]},eu=e=>{let{visibilityChange:t}=es();t&&document.addEventListener(t,e,!1)},ec=e=>{let{visibilityChange:t}=es();t&&document.removeEventListener(t,e,!1)},ed=e=>new Promise((t,n)=>{if(!window.FileReader)return void n(TypeError("File reader API not found"));let r=new FileReader;r.onerror=n,r.onload=()=>{t(r.result)},r.readAsDataURL(e)}),ep=async e=>{let t,n;if(e){try{t=await ed(e)}catch(e){console.error("Failed to get data URL from file:",e),alert(e.message);return}try{n=await new Promise((t,n)=>{if(!window.FileReader)return void n(TypeError("File reader API not found"));if(!window.DataView)return void n(TypeError("DataView API not found"));let r=new FileReader;r.onerror=n,r.onload=()=>{let e=new DataView(r.result);if(65496!=e.getUint16(0,!1))return t(-2);let n=e.byteLength,i=2;for(;i=e.getUint16(i+2,!1))return t(-1);let n=e.getUint16(i,!1);if(i+=2,65505==n){if(0x45786966!=e.getUint32(i+=2,!1))return t(-1);let n=18761==e.getUint16(i+=6,!1);i+=e.getUint32(i+4,n);let r=e.getUint16(i,n);i+=2;for(let o=0;o{switch(e){case 2:return"rotateY(180deg)";case 3:return"rotateZ(-180deg)";case 4:return"rotateZ(-180deg) rotateY(180deg)";case 5:return"rotateZ(-90deg) rotateY(180deg)";case 6:return"rotateZ(90deg)";case 7:return"rotateZ(90deg) rotateY(180deg)";case 8:return"rotateZ(-90deg)";default:return""}},em=()=>Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)-window.innerHeight,eh=function(){let{redirect:e,email:t,justTrying:n,with_password:r=!1,useOriginalUrl:i=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"string"!=typeof e&&(e=(0,d.RY1)({useOriginalUrl:i})),(0,d.yRP)("/account/login",{redirect:e||"",email:t||"",with_password:r?"1":"",justTrying:n||""})},eg=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};document.location.href=eh(e)},e_=e=>{window.location.assign((0,d.FCy)(e))},eb=e=>{let t,n,r,i,o,a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",u="",c=0;for(e=ev(e);c>2,o=(3&t)<<4|n>>4,a=(15&n)<<2|r>>6,s=63&r,isNaN(n)?a=s=64:isNaN(r)&&(s=64),u=u+l.charAt(i)+l.charAt(o)+l.charAt(a)+l.charAt(s);return u},ev=e=>{let t="";for(let n=0;n127&&r<2048?t+=String.fromCharCode(r>>6|192):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128)),t+=String.fromCharCode(63&r|128))}return t},ey=e=>{let t=[window.scrollX,window.scrollY];ew(e),window.scrollTo(...t)},ew=function(e){let{event:t=null,local_navigation:n=!0,replace:i=!1,newTab:o=!1,state:l,campaign:u}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t&&t.preventDefault(),!e||"string"!=typeof e)return;try{let t=new URL(e);if(!["http:","https:","substack:"].includes(t.protocol))return}catch(e){}if(e.startsWith("#")&&n){if(window.location.hash!==e){var c;i&&(null==(c=window.history)?void 0:c.replaceState)?window.history.replaceState(null!=l?l:window.history.state,null,e):window.location.hash=e}er();return}if(n&&F(e)&&F(e)!==F(window.location.href)&&(n=!1),!n&&u&&(e=(0,s.P)(e,u)),o||t&&("metaKey"in t&&t.metaKey||"ctrlKey"in t&&t.ctrlKey))return void window.open(e,"_blank");let d=history.state;if(n){if(u&&(0,s.x4)((0,r._)({},u)),"react-router"===window.__SUBSTACK_ROUTER_TYPE__)return void window.__reactRouterNavigate(O(e),{replace:i,state:l});if((0,a.route)(O(e),i)){void 0!==l?history.replaceState(l,""):i&&void 0!==d&&history.replaceState(d,""),setTimeout(()=>er(),0);return}}window.location.href=e},eS=(e,t)=>new Promise(n=>{e.setState(t,n)}),eE=(e,t)=>new Promise((n,r)=>{let i=async function(){for(var i=arguments.length,o=Array(i),a=0;a3&&void 0!==arguments[3]?arguments[3]:{};return"function"==typeof t&&(n=t,t="lock"),await eE(e,async function(i){for(var o=arguments.length,a=Array(o>1?o-1:0),s=1;s{let e=window.crypto||window.msCrypto;if("function"==typeof(null==e?void 0:e.randomUUID))return e.randomUUID();if(e)return"".concat(1e7,"-",1e3,"-",4e3,"-",8e3,"-",1e11).replace(/[018]/g,t=>(Number(t)^e.getRandomValues(new Uint8Array(1))[0]&15>>Number(t)/4).toString(16));let t=new Date().getTime(),n="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let r=16*Math.random();return t>0?(r=(t+r)%16|0,t=Math.floor(t/16)):(r=(n+r)%16|0,n=Math.floor(n/16)),("x"===e?r:3&r|8).toString(16)})},eP=function(e){var t;let{stripHash:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("undefined"!=typeof window&&(null==(t=window.history)?void 0:t.replaceState)){let t=(0,p.m)(window.location.href);if(Array.isArray(e))for(let n of e)delete t[n];else delete t[e];let r="".concat((0,d.yRP)(window.location.pathname,t)).concat(n?"":window.location.hash);window.history.replaceState(window.history.state,document.title,r)}},eI=()=>"undefined"!=typeof window&&(void 0!==document.webkitCurrentFullScreenElement?null!==document.webkitCurrentFullScreenElement:void 0!==document.fullscreenElement&&null!==document.fullscreenElement),eA=e=>"undefined"!=typeof window&&(e.requestFullScreen?(e.requestFullScreen(),!0):e.webkitRequestFullScreen?(e.webkitRequestFullScreen(),!0):!!e.mozRequestFullScreen&&(e.mozRequestFullScreen(),!0)),eR=()=>{if(!eI())return!1;if(document.exitFullscreen)return document.exitFullscreen(),!0;if(document.webkitExitFullscreen)document.webkitExitFullscreen();else if(document.mozCancelFullScreen)return document.mozCancelFullScreen(),!0;else if(document.msExitFullscreen)return document.msExitFullscreen(),!0;return!1},eC=()=>"undefined"!=typeof window&&!!document.pictureInPictureElement&&!!document.exitPictureInPicture&&(document.exitPictureInPicture(),!0),eN=e=>{let t=document.createElement("a");document.body.appendChild(t),t.href=e,t.target="_blank",t.click(),document.body.removeChild(t)},eU=new Intl.DateTimeFormat(void 0,{timeStyle:"short"}),ex=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),eL=new Intl.DateTimeFormat(void 0,{dateStyle:"long"}),eM=new Intl.DateTimeFormat(void 0,{dateStyle:"long"});function eD(e,t){return new Intl.DateTimeFormat(t,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}).format(e)}let eF=function(e){let{includeTime:t,language:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,u.A)(e).locale(n||"en"),i=(0,u.A)(),{iTemplate:o}=c.TH.i(n);return r.isBefore(i.startOf("year"))?eL.format(r.toDate())+(t?o(I(),eU.format(r.toDate())):""):r.isBefore(i.startOf("day"))?ex.format(r.toDate())+(t?o(A(),eU.format(r.toDate())):""):r.isAfter(i.endOf("year"))?eM.format(r.toDate())+(t?o(R(),eU.format(r.toDate())):""):r.isAfter(i.endOf("day"))?ex.format(r.toDate())+(t?o(C(),eU.format(r.toDate())):""):eU.format(r.toDate())},eB=()=>"undefined"!=typeof window&&!!window._preloads.isDevelopmentEnvironment},81929:function(e,t,n){"use strict";n.d(t,{Jq:()=>b,Oi:()=>h,vw:()=>_});var r=n(69277),i=n(70408),o=n(32641),a=n(4006),s=n(32485),l=n.n(s),u=n(17402),c=n(89490),d=n(35369),p=n(76977),f=n(63136);n(67140);var m=n(62614);let h={size:14,strokeWidth:2.5},g={display:"flex",height:20,paddingX:6,paddingY:2,gap:4,font:"text",fontSize:11,fontWeight:"medium",alignItems:"center"},_=(0,u.forwardRef)((e,t)=>{var{className:n,theme:s="default",priority:u="secondary",leading:f,trailing:h,children:_,fillIcon:b,radius:v="xs",onClick:y,href:w}=e,S=(0,o._)(e,["className","theme","priority","leading","trailing","children","fillIcon","radius","onClick","href"]);let E=void 0!==y||void 0!==w;return(0,a.FD)(d.Nm,(0,i._)((0,r._)({},g,S),{className:l()(n,function(e){let{theme:t="default",priority:n="secondary",clickable:o,radius:a="xs"}=e;return l()(m.A.tag,m.A["theme_".concat(t)],m.A["priority_".concat(n)],o&&m.A.clickable,(0,c.iF)((0,i._)((0,r._)({},g),{cursor:o?"pointer":"inherit",radius:a})))}({theme:s,priority:u,clickable:E,radius:v})),onClick:y,href:w,ref:t,tabIndex:E?0:-1,children:[f&&(0,a.Y)(p.pT,{className:l()(m.A.leading,b&&m.A.fillIcon),alignItems:"center",children:f}),_,h&&(0,a.Y)(p.pT,{className:l()(m.A.trailing,b&&m.A.fillIcon),alignItems:"center",children:h})]}))}),b=(0,u.forwardRef)((e,t)=>{var{className:n,priority:s="primary",leading:u,trailing:c,children:h,fillIcon:_,radius:b="xs",onClick:v,href:y,title:w}=e,S=(0,o._)(e,["className","priority","leading","trailing","children","fillIcon","radius","onClick","href","title"]);let E=void 0!==v||void 0!==y;return(0,a.FD)(d.Nm,(0,i._)((0,r._)((0,i._)((0,r._)({},S),{className:l()(n,m.A.tag,m.A.media,m.A["priority_".concat(s)],E&&m.A.clickable),onClick:v,href:y,ref:t,radius:b,cursor:E?"pointer":"inherit",tabIndex:E?0:-1,minWidth:0,title:null!=w?w:void 0}),g),{children:[u&&(0,a.Y)(p.pT,{className:l()(m.A.leading,_&&m.A.fillIcon),alignItems:"center",children:u}),(0,a.Y)(f.EY,{ellipsis:!0,children:h}),c&&(0,a.Y)(p.pT,{className:l()(m.A.trailing,_&&m.A.fillIcon),alignItems:"center",children:c})]}))});b.displayName="MediaTag"},17028:function(e,t,n){"use strict";n.d(t,{$n:()=>r.$n,EY:()=>a.EY,I1:()=>o.I1,I4:()=>i.I4,Jb:()=>r.az,K0:()=>r.K0,Nm:()=>r.Nm,QW:()=>s.Q,VP:()=>o.VP,Ye:()=>o.Ye,Yq:()=>a.Yq,az:()=>i.az,cG:()=>l.c,fI:()=>o.fI,iC:()=>u.iC,iF:()=>i.iF,mZ:()=>r.mZ,nS:()=>a.nS,ov:()=>o.ov,pT:()=>o.pT,vj:()=>l.v,yw:()=>i.yw});var r=n(35369),i=n(89490),o=n(76977),a=n(63136),s=n(92028),l=n(16074),u=n(53168)},13892:function(e,t,n){"use strict";n.d(t,{A:()=>r});let r=(0,n(89490).I4)({display:"contents"},"a")},32087:function(e,t,n){"use strict";n.d(t,{b:()=>u,m:()=>c});var r=n(4006),i=n(17402),o=n(10996),a=n(84555),s=n(72550),l=n(65996);let u=e=>{let{theme:t,children:n}=e,{variables:i}=(0,a.d)({appTheme:t});return i?(0,r.Y)(o.NP,{theme:l.A.appTheme,variables:null!=i?i:void 0,children:n}):(0,r.Y)(r.FK,{children:n})};function c(e){let{theme:t,children:n}=e,a=(0,i.useMemo)(()=>(0,s.zC)(t),[t]);return(0,r.Y)(o.NP,{theme:l.A.appTheme,variables:null!=a?a:void 0,children:n})}},32848:function(e,t,n){"use strict";n.d(t,{C8:()=>h,K5:()=>_,NL:()=>b,Of:()=>f,n7:()=>g,xA:()=>v});var r=n(69277),i=n(70408),o=n(32641),a=n(50014),s=n.n(a),l=n(17402),u=n(94729),c=n(38704),d=n(82776);let p={hasLoadedOnce:!1,publications:[],subscriptions:[],publicationUsers:[],publicationMap:new Map,subscriptionMap:new Map,publicationUserMap:new Map,publicationsWithPledges:[]};function f(e){let{isLoggedIn:t}=e,[n,o]=(0,l.useState)((0,i._)((0,r._)({},p),{hasLoadedOnce:!t})),a=e=>{o(t=>{let n=s()([...t.publications,...e.publications],e=>e.id),r=s()([...t.subscriptions,...e.subscriptions],e=>e.publication_id),i=s()([...t.publicationUsers,...e.publicationUsers],e=>e.publication_id);return{hasLoadedOnce:!0,publications:n,subscriptions:r,publicationUsers:i,publicationMap:new Map(n.map(e=>[e.id,e])),subscriptionMap:new Map(r.map(e=>[e.publication_id,e])),publicationUserMap:new Map(i.map(e=>[e.publication_id,e])),publicationsWithPledges:[...t.publicationsWithPledges,...e.publicationsWithPledges]}})};(0,l.useEffect)(()=>{if("serviceWorker"in navigator){let e=async e=>{var t;if((null==(t=e.data)?void 0:t.type)==="subscriptions-update"){let{payload:t}=e.data;t.ok&&a(t.json)}};return navigator.serviceWorker.addEventListener("message",e),()=>{navigator.serviceWorker.removeEventListener("message",e)}}},[]),(0,l.useEffect)(()=>{t&&(async()=>{try{for await(let e of y("/api/v1/subscriptions/page",{getPageInit(e,t){let n=null==e?void 0:e.nextCursor;return n?(0,i._)((0,r._)({},t),{query:(0,i._)((0,r._)({},t.query),{cursor:n})}):null}}))a(e)}catch(e){console.warn(e)}})()},[t]);let d=(e,t)=>{let{subscription:n,publicationUser:a}=t;o(t=>{var o,s,l;let u;return t=n?(0,i._)((0,r._)({},t),{subscriptions:t.subscriptions.map(e=>e.publication_id===n.publication_id?n:e),subscriptionMap:(0,c.Jb)(t.subscriptionMap,e,n)}):m(t,e),t=a?(0,i._)((0,r._)({},t),{publicationUsers:(o=t.publicationUsers,s=t=>t.publication_id===e,l=a,(u=(o=o.slice()).findIndex(s))>=0?o[u]=l:o.push(l),o),publicationUserMap:(0,c.Jb)(t.publicationUserMap,e,a)}):(0,i._)((0,r._)({},t),{publicationUsers:t.publicationUsers.filter(t=>t.publication_id!==e),publicationUserMap:(0,c.QT)(t.publicationUserMap,e)})})},f=async e=>{try{let t=await (0,u.x6)("/api/v1/subscription/".concat(e));d(e,t)}catch(t){t instanceof u.fk&&(404===t.response.status?o(t=>m(t,e)):console.error(t))}};return{result:n,isLoading:!1,hasLoadedOnce:n.hasLoadedOnce,refetch:async()=>n,refetchPublication:f,updatePublication:d,removeByPubId:e=>o(t=>m(t,e)),updateSubscriptions:e=>{o(t=>(0,i._)((0,r._)({},t),{subscriptions:e,subscriptionMap:new Map(e.map(e=>[e.publication_id,e]))}))}}}function m(e,t){let n=e.subscriptions.filter(e=>e.publication_id!==t);return(0,i._)((0,r._)({},e),{subscriptions:n,subscriptionMap:new Map(n.map(e=>[e.publication_id,e]))})}let h=(0,l.createContext)({result:null,isLoading:!1,hasLoadedOnce:!1,refetch:()=>Promise.resolve(p),refetchPublication:()=>Promise.resolve(),updatePublication(){},removeByPubId:()=>{},updateSubscriptions:()=>{}});function g(){return(0,l.useContext)(h)}function _(e){var t;let{subscriptionMap:n,publicationUserMap:r,publicationsWithPledges:i}=null!=(t=g().result)?t:{subscriptionMap:new Map,publicationUserMap:new Map,publicationsWithPledges:[]};return{subscription:n.get(e),publicationUser:r.get(e),is_pledged:!!(null==i?void 0:i.includes(e))}}function b(e){let{subscription:t,publicationUser:n,is_pledged:r}=_(e),i=(null==t?void 0:t.membership_state)==="free_signup",o=(null==t?void 0:t.membership_state)==="subscribed",a=!!(null==t?void 0:t.is_founding),s=!!(n&&(0,d.isAtLeastContributorRole)(n.role));return{subscription:t,publicationUser:n,isFreeSubscribed:i,isPaid:o,isSubscribed:i||o||s,isAuthor:s,isFounding:a,isPledged:r}}function v(e){var t,n;let{publicationUsers:r}=null!=(t=g().result)?t:{publicationUsers:[]};return null!=(n=r.find(t=>t.publication_id===e))?n:null}async function*y(e,t){var{getPageInit:n}=t,r=(0,o._)(t,["getPageInit"]);let i=await (0,u.x6)(e,r);yield i;let a=n(i,r);for(;null!=a;)i=await (0,u.x6)(e,a),yield i,a=n(i,r)}},40659:function(e,t,n){"use strict";n.d(t,{Fg:()=>v,HM:()=>_,cf:()=>p,l:()=>f,rG:()=>y,wX:()=>g});var r=n(4006),i=n(17402),o=n(25006),a=n(17186),s=n(49807),l=n(82776),u=n(84985);let c="session_attribution";function d(e){try{(0,a.X3)(c,e)}catch(e){console.error("cannot set attribution data",e)}}function p(){let e;try{var t;e=null!=(t=(0,a.xm)(c))?t:{}}catch(e){return{}}return(0,l.extractAttributionDataFromRecord)(e)}function f(){if("undefined"!=typeof window&&"undefined"!=typeof document){if(null==window.location)return;let e={href:window.location.href,referrer:document.referrer,timestamp:+new Date};window.location.hostname===s.sXh.hostname&&function(e){let t=(0,a.xm)(c);if(null==t)d({sessionStart:e.timestamp,originalReferrer:e.referrer,landingPage:e.href,landingSurface:m(e.href),landingSurfaceId:h(e.href),landingPublicationId:e.publicationId,visits:[e]});else{var n,r;let i,o=+new Date;(null==(n=t.visits)?void 0:n.length)===0&&(i=!0),(null==t||null==(r=t.visits)?void 0:r.length)>0&&o-t.visits[0].timestamp>=9e5&&(i=!0),(null==e.referrer||""==e.referrer)&&(i=!0),e.timestamp-t.sessionStart<700&&null==t.landingPublicationId&&null!=e.publicationId&&(i=!0),d({sessionStart:i?e.timestamp:t.sessionStart,originalReferrer:i?e.referrer:t.originalReferrer,landingPage:i?e.href:t.landingPage,landingSurface:i?m(e.href):t.landingSurface,landingSurfaceId:i?h(e.href):t.landingSurfaceId,landingPublicationId:i?e.publicationId:t.landingPublicationId,visits:[e,...t.visits].slice(0,20)})}}(e)}}let m=e=>{let t=new URL((0,s.Ewe)()).hostname;if(null==e)return"feed";let n=new URL(e);return t!==n.hostname?"publisher":n.pathname.startsWith("/chat/")?"chat":e.includes("/note/c-")?"note":e.includes("/post/p-")||n.pathname.startsWith("/p/")||n.pathname.startsWith("/inbox/post/")?"post":e.includes("/profile")||n.pathname.startsWith("/@")?"profile":void 0},h=e=>{if(null==e)return;let t=e.match(/\/[a-z]-(\w+)$/i);return t?t[1]:void 0},g=()=>{let{iframeRef:e,frameReady:t,setFrameReady:n,setAttributionParams:a}=b(),l=(0,o.df)();(0,i.useEffect)(()=>(window.addEventListener("message",c),()=>window.removeEventListener("message",c)),[]);let c=e=>{var t;(null==(t=e.data)?void 0:t.attributionReady)===!0&&n()};return((0,i.useEffect)(()=>{var n,r;if(t&&(null==e||null==(n=e.current)?void 0:n.contentWindow)){let t=e.current.contentWindow,n={href:window.location.href,referrer:document.referrer,timestamp:+new Date,type:"log_and_fetch_attribution",publicationId:null!=(r=null==l?void 0:l.id)?r:void 0};null==t||t.postMessage(n,"".concat((0,s.Ewe)()))}},[t,l]),(0,i.useEffect)(()=>{let e=e=>{var t;(null==(t=e.data)?void 0:t.attributionData)!=null&&a(e.data.attributionData)};return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[]),"undefined"==typeof window)?null:(0,r.Y)("iframe",{className:u.A.visitedSurfacesIFrame,ref:e,src:"".concat((0,s.Ewe)(),"/session-attribution-frame"),width:"0",height:"0"})},_=(0,i.createContext)({iframeRef:null,getSessionAttribution:()=>({}),isDefaultValue:!0,frameReady:!1,setFrameReady:()=>{},attributionParams:null,setAttributionParams:()=>{}}),b=()=>(0,i.useContext)(_),v=e=>{let t,{children:n}=e,o=b(),[a,s]=(0,i.useState)(!1),l=(0,i.useRef)(null),[u,c]=(0,i.useState)(null);return t=o.isDefaultValue?{iframeRef:l,getSessionAttribution:()=>null!=u?u:p(),isDefaultValue:!1,frameReady:a,setFrameReady:()=>s(!0),attributionParams:u,setAttributionParams:c}:{iframeRef:o.iframeRef,getSessionAttribution:o.getSessionAttribution,isDefaultValue:!1,frameReady:o.frameReady,setFrameReady:o.setFrameReady,attributionParams:o.attributionParams,setAttributionParams:o.setAttributionParams},(0,r.Y)(_.Provider,{value:t,children:n})};function y(){let{attributionParams:e}=b();return null!=e?e:{}}},3843:function(e,t,n){"use strict";n.d(t,{Fh:()=>s,ai:()=>l,im:()=>r,wk:()=>i});let r={test1:"SubstackInc",badnews:"ryangrim",dmortberg:"danielortberg",offthechain:"APompliano",on:"SubstackInc",petition:"petition",popularinformation:"JuddLegum",shane:"shanesnow",signalproblems:"A_W_Gordon",sinocism:"niubi",taibbi:"mtaibbi",thefirstand15th:"tressiemcphd",thenewsletter:"jbouie",numlock:"WaltHickey"},i=900;var o,a,s=((o={}).ARR10K="arr10k",o.ARR1K="arr1k",o),l=((a={}).List1K="list1k",a.List100="list100",a)},54584:function(e,t,n){"use strict";n.d(t,{Ns:()=>o});var r=n(69843),i=n.n(r);let o=(e,t,n)=>{var r,o;return!!e&&!!t&&!!n&&!!e.allow_upgrades&&!t.is_founding&&(null==n||null==(r=n.metadata)||!r.founding||!!(null==e?void 0:e.include_founding_plans))&&((null==(o=t.plan)?void 0:o.interval)!=="month"||"month"!==n.interval)&&((e,t)=>{if(!e||!t||"error"in e&&e.error)return!1;let n="metadata"in t?t.metadata:void 0;return(null==n?!void 0:!n.unlimited_group)&&((null==n?void 0:n.no_coupons)?"founding_only"in e&&!!e.founding_only&&!!n.founding||"include_founding_plans"in e&&!!e.include_founding_plans&&!!n.founding:"forever"!==t.interval&&(!e.yearly_only||"year"===t.interval)&&(!e.monthly_only||"month"===t.interval)&&(!e.founding_only||!!(null==n?void 0:n.founding))&&("repeating"!==e.duration||("month"!==t.interval||!!i()(e.duration_in_months)||e.duration_in_months%t.interval_count==0)&&("year"!==t.interval||!!i()(e.duration_in_months)||e.duration_in_months%(12*t.interval_count)==0))&&(!e.amount_off||!e.currency||e.currency===t.currency))})(e,n)}},56458:function(e,t,n){"use strict";n.d(t,{$P:()=>L,Ed:()=>b,Fk:()=>g,G8:()=>T,Jh:()=>A,Jy:()=>d,NJ:()=>x,QN:()=>w,QP:()=>y,Vr:()=>R,XP:()=>_,Xk:()=>N,a8:()=>v,aw:()=>c,cK:()=>f,fP:()=>S,fk:()=>P,m4:()=>E,pf:()=>I,rI:()=>C,th:()=>p,wq:()=>U,zN:()=>m});var r=n(4016),i=n(27162),o=n(67734),a=n(39318),s=n(49807),l=n(82776);let u=e=>{var t;return!!(null==e?void 0:e.sections)&&(null==(t=e.sections)?void 0:t.length)>0},c=e=>!!(null==e?void 0:e.podcast_enabled),d=e=>!!e&&(e=>{if(!e)return 0;let t=[];return u(e)&&(t=p(e)),+!!c(e)+t.length})(e)>0,p=e=>e&&u(e)?e.sections.filter(e=>e.is_podcast):[],f=e=>!!e&&!!(e.is_free_subscribed&&!e.is_subscribed),m=e=>!!e&&"enabled"===e.payments_state,h=function(e){let{usePreview:t=!1,useDraft:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};switch(null==e?void 0:e.type){case"newsletter":return n?e.draftVoiceoverUpload:e.voiceoverUpload;case"podcast":if(t)return n?e.draftPodcastPreviewUpload:e.podcastPreviewUpload;return n?e.draftPodcastUpload:e.podcastUpload;case"video":return n?e.draftVideoUpload:e.videoUpload;default:return null}},g=function(e){let{usePreview:t=!1,useDraft:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return null;let r=h(e,{usePreview:t,useDraft:n});if(r){var i;return null!=(i=r.duration)?i:null}if((null==e?void 0:e.type)==="podcast"&&!t){let t=n?e.draft_podcast_duration:e.podcast_duration;return null!=t?t:null}return null},_=e=>!!e&&"podcast"===e.type&&!!e.podcastUpload&&!!e.podcastUpload.is_free_preview,b=e=>{var t;let{post:n}=e;return!!n&&!!(null==(t=n.podcastFields)?void 0:t.free_podcast_url)},v=e=>{var t,n;return e.is_www?null!=(n=e.logo_url)?n:void 0:e.logo_url||e.cover_photo_url||e.author_photo_url||(null==(t=e.author)?void 0:t.photo_url)},y=e=>{var t;return e&&"plans"in e&&Array.isArray(null==e?void 0:e.plans)&&null!=(t=e.plans.find(e=>(0,i.T)({plan:e})))?t:null},w=e=>!!y(e),S=e=>{let{pub:t,currency:n}=e,r=y(t);return r?(0,o.oW)(r,n):null},E=e=>{var t,n;if((0,r.s7)({pub:e}))return"Founders";let i=y(e);return null!=(n=null==i||null==(t=i.metadata)?void 0:t.short_description)?n:null},T=(e,t)=>(null==t?void 0:t.audience)==="founding"&&E(e)||"paid",k=e=>{let{pub:t,url:n}=e;return!!n.includes("api.substack.com")&&(n.includes("/feed/podcast/".concat(t.id,"/s/"))||n.includes("/feed/podcast/".concat(t.id,".rss")))},P=e=>!!e&&!!e.podcast_enabled&&(!e.podcast_feed_url||!k({pub:e,url:e.podcast_feed_url})),I=e=>{var t;let{pub:n,section:r}=e;if(!r.is_podcast)return!1;let i=(null==(t=r.podcastSettings)?void 0:t.podcast_feed_url)||null;return!i||!k({pub:n,url:i})},A=e=>{var t,n;let{pub:r,includeMainPub:i,excludePodcasts:o}=e;if(!r)return[];let u=[];return i&&u.push({name:r.name,description:null!=(n=r.hero_text)?n:"",logoUrl:r.logo_url,sectionId:null,linkUrl:(0,a.qy7)(r),defaultOn:!0}),null==(t=r.sections)||t.forEach(e=>{(!o||!e.is_podcast||(0,l.sectionIsSpecificallyMarkedAsNewsletter)({section:e,pub:r}))&&u.push({name:e.name,description:e.description,logoUrl:e.logo_url,sectionId:e.id,linkUrl:(0,s.Dor)(r,{section:e}),defaultOn:e.is_default_on})}),u};function R(e){let{sub:t}=e;return!!t&&!!t.plan&&!!t.is_founding&&"metadata"in t.plan&&!!t.plan.metadata&&!t.plan.metadata.fixed_price}let C=e=>{var t;let{post:n,section:r,pub:i}=e;return!!n.videoUpload&&("video"===n.type||!!(null==(t=n.podcastFields)?void 0:t.hide_from_feed)||!!(!r&&!i.podcast_enabled)||!!(r&&!r.is_podcast))};function N(e){var t;let{post:n,pub:r,section:i}=e;return(null==(t=n.podcastFields)||!t.hide_from_feed)&&(i?i.is_podcast:c(r))}let U=e=>{var t,n,r,i,o;return!!(null==e||null==(r=e.videoUpload)||null==(n=r.extractedAudio)||null==(t=n.transcription)?void 0:t.transcript_url)||!!(null==e||null==(o=e.podcastUpload)||null==(i=o.transcription)?void 0:i.transcript_url)},x=e=>{var t,n,r,i,o,a;return null!=(a=null!=(o=null==e||null==(n=e.videoUpload)||null==(t=n.extractedAudio)?void 0:t.transcription)?o:null==e||null==(r=e.podcastUpload)?void 0:r.transcription)?a:null==e||null==(i=e.videoUpload)?void 0:i.transcription},L=e=>{var t,n;let{pub:r}=e;return(null==r||null==(t=r.theme)?void 0:t.home_posts)==="list"&&!!(null==r||null==(n=r.theme)?void 0:n.hide_images_from_list)}},4016:function(e,t,n){"use strict";n.d(t,{C3:()=>I,JQ:()=>d,NO:()=>function e(t){return"pub"in t?e({pubId:t.pub.id}):10845===t.pubId},O3:()=>p,S2:()=>s,Tu:()=>A,V6:()=>l,d4:()=>h,dm:()=>E,eh:()=>P,lu:()=>u,ob:()=>m,ot:()=>k,rD:()=>w,ri:()=>g,s7:()=>a,wj:()=>f,zM:()=>_});var r=n(83673),i=n.n(r);let o=new Set([0x83c163a,0x82bc701,0x81adcb6,0x8455987,0x8487b09,0x85eb9a5,0x861de49,0x8653d00,0x868d293,0x86f9884,0x872b528,0x8798da8,0x87d48d6,0x8809a67,0x883f640,0x8961657,0x8aedf0b,0x8bc9b46,0x8559743,0x887329b,0x888f704,0x88a9886,0x8910626,0x8999664,0x89d3d02,0x8a084ae,0x8c6f81e,0x8cb3c01,0x8cf2aa9,0x90a54a4,0x9aa80e8]);function a(e){let{pub:t,includeTheRampart:n=!1}=e;return!!t&&(!!n&&1620566===t.id||87281===t.id)}function s(e){let{pub:t}=e;return!!t&&228030===t.id}let l=e=>"privatewires"===e?"https://privatewires.net":"pwprod"===e?"https://pirate-wires-island.vercel.app":"piratewires"===e?"https://www.piratewires.com":"thefreedomfrequency"===e?"https://thefreedomfrequency.org":"preamblestaging521"===e?"https://staging-thepreamble.vercel.app":"sharonmcmahon"===e?"https://thepreamble.com":void 0;function u(e){var t;let{pub:n}=e;return!!n&&[260347,3116199].includes(null!=(t=n.id)?t:0)}let c=[/the front page/i,/tgif/i,/things worth remembering/i],d=e=>{let{pub:t}=e;return i()(c.map(e=>t.sections.find(t=>t.name.match(e)))).map(e=>e.id)};function p(e){let{pub:t}=e;return 220361===t.id}function f(e){let{pub:t}=e;return 2325511===t.id}function m(e){let{pub:t}=e;return 5619506===t.id}function h(e){let{pub:t}=e;return 2857530===t.id}function g(e){let{pub:t}=e;return 471923===t.id}function _(e){let{post:t}=e;return!!t&&o.has(t.id)&&!!t.podcast_preview_upload_id}let b={87908:"morning-shots",87934:"the-triad",87969:"press-pass",87950:"overtime",87957:"bulwark-podcast",87956:"screen-time",87963:"the-next-level",104848:"george-conway-explains-it-all",87971:"the-focus-group",87958:"beg-to-differ",87975:"movie-aisle",87961:"the-secret-podcast",87964:"between-us",87978:"thursday-night-bulwark",135716:"the-michael-steele-podcast",111316:"shield-of-the-republic"},v={62624:"morning-shots",62631:"the-triad",62634:"overtime",62636:"press-pass",62639:"bulwark-podcast",62641:"beg-to-differ",62642:"the-secret-podcast",62644:"the-next-level",62645:"movie-aisle",62646:"between-us",62647:"the-focus-group",62648:"thursday-night-bulwark"},y=new Set(["beg-to-differ","between-us","bulwark-podcast","george-conway-explains-it-all","the-focus-group","the-next-level","the-secret-podcast","thursday-night-bulwark","the-michael-steele-podcast"]),w=e=>{let{sectionId:t}=e;return!!t&&(y.has(b[t])||y.has(v[t]))},S=new Set(["between-us","the-secret-podcast","thursday-night-bulwark"]),E=e=>{let{sectionId:t}=e;return!!t&&(S.has(b[t])||S.has(v[t]))},T=new Set(["bulwark-podcast","the-focus-group","beg-to-differ","george-conway-explains-it-all","the-next-level","the-michael-steele-podcast","shield-of-the-republic"]),k=e=>{let{sectionId:t}=e;return t&&(T.has(b[t])||T.has(v[t]))?["audio","video"]:["audio"]},P=e=>{let{user:t}=e;return t.is_founding?"/account/gifts/founding":"/subscribe?gift=true"};function I(e){let{pub:t}=e;return"privatewires"===t.subdomain||"pwprod"===t.subdomain||"piratewires"===t.subdomain}function A(e){var t;let{post:n,pub:r}=e;if(!I({pub:r}))return!1;let i=null!=(t=n.draft_section_id)?t:n.section_id;if(i&&r.sections){let e=r.sections.find(e=>e.id===i);if(e&&"Pirate Wires Daily"===e.name)return!0}return!1}},56262:function(e,t,n){"use strict";n.r(t),n.d(t,{getAllAudiences:()=>d,getAudiencesForPublicListing:()=>p,getCommentAuthor:()=>I,getCoverImageUrl:()=>A,getDurationForPostPreview:()=>C,getFoundingAudiences:()=>m,getFreePodcastUrl:()=>R,getPaidAudiences:()=>f,getPostAuthor:()=>P,getPreamble:()=>N,isFoundingAudience:()=>g,isPaidAudience:()=>h,isSubscriptionLevel:()=>_,previewSubHasFullAccessToPost:()=>k,pubRoleHasFullAccessToPost:()=>E,pubRolesHaveFullAccessToPost:()=>T,subHasFullAccessToPost:()=>w,userHasCommentAccess:()=>S,userHasFullAccessToPost:()=>y});var r=n(69277),i=n(32641),o=n(82776);let a=["founding","only_paid","everyone","only_free"],s=["founding","only_paid","everyone"],l=["founding","only_paid"],u=["founding"],c=["free","paid","founding"];function d(){return[...a]}function p(){return[...s]}function f(){return[...l]}function m(){return[...u]}function h(e){return f().includes(e)}function g(e){return m().includes(e)}function _(e){return c.map(String).includes(e)}function b(e,t){if(!t||(null==e?void 0:e.subscription_publication_id)===t){if((null==e?void 0:e.is_founding)||(null==e?void 0:e.is_contributor))return"founding";if(null==e?void 0:e.is_subscribed)return"paid"}return"free"}function v(e){switch(e){case"founding":return["founding"];case"only_paid":return["paid","founding"];case"only_free":return["free"];case"everyone":return["free","paid","founding"];default:throw Error("Unknown audience: ".concat(e))}}function y(e,t){if(!t)return!1;if(!t.audience)throw Error("Post has no audience");if(e&&e.is_contributor&&e.subscription_publication_id===t.publication_id)return!0;let n=b(e,t.publication_id);return v(t.audience).includes(n)}function w(e,t){if(!t)return!1;if(!t.audience)throw Error("Post has no audience");let n=function(e,t){if(!t||(null==e?void 0:e.publication_id)===t){if((null==e?void 0:e.membership_state)==="subscribed"&&(null==e?void 0:e.is_founding))return"founding";if((null==e?void 0:e.membership_state)==="subscribed")return"paid"}return"free"}(e,t.publication_id);return v(t.audience).includes(n)}function S(e,t){if(!t)return!1;if(e&&e.is_contributor&&e.subscription_publication_id===t.publication_id)return!0;let n=b(e,t.publication_id);return"everyone"===t.write_comment_permissions?!!e:"only_paid"===t.write_comment_permissions&&("founding"===n||"paid"===n)}function E(e,t){if(!t)return!1;if(!t.audience)throw Error("Post has no audience");let n=(0,o.isAtLeastContributorRole)(null==e?void 0:e.role)||(null==e?void 0:e.membership_state)==="subscribed"&&(null==e?void 0:e.is_founding)?"founding":(null==e?void 0:e.membership_state)==="subscribed"?"paid":"free";return v(t.audience).includes(n)}function T(e,t){return!!(t&&E(null==e?void 0:e[t.publication_id],t))}function k(e,t,n){let{audienceOverride:r}=n;if(!t)return!1;if(!t.audience&&!r)throw Error("Post has no audience");return v(null!=r?r:t.audience).includes(e)}function P(e,t){var n;let a=null==t||null==(n=t.publishedBylines)?void 0:n[0];if(a)return a;let s=e.contributors.find(e=>e.owner);if(s){let{user_id:e}=s,t=(0,i._)(s,["user_id"]);return(0,r._)({id:e},t)}let l=e.contributors.find(e=>(0,o.isAtLeastContributorRole)(e.role));if(l){let{user_id:e}=l,t=(0,i._)(l,["user_id"]);return(0,r._)({id:e},t)}return{id:e.author_id,name:e.author_name,photo_url:e.author_photo_url,bio:e.author_bio}}function I(e){var t,n,r,i,o,a,s,l,u,c,d,p,f,m,h,g,_,b;return{id:null!=(u=null!=(l=null==(t=e.user)?void 0:t.id)?l:e.user_id)?u:-1,name:null!=(d=null!=(c=null==(n=e.user)?void 0:n.name)?c:e.name)?d:"",handle:null!=(p=null==(r=e.user)?void 0:r.handle)?p:e.handle,photo_url:null!=(f=null==(i=e.user)?void 0:i.photo_url)?f:e.photo_url,bestseller_tier:null!=(h=null!=(m=null==(o=e.user)?void 0:o.bestseller_tier)?m:e.user_bestseller_tier)?h:null,status:null!=(_=null!=(g=null==(a=e.user)?void 0:a.status)?g:e.userStatus)?_:null,primary_publication:null!=(b=null==(s=e.user)?void 0:s.primary_publication)?b:e.user_primary_publication}}function A(e){return!e.cover_image||/12634ced-0eb6-4238-a94a-70ab242c5ad8/.test(e.cover_image)||/fa15c776-f514-42fe-8ee0-4c94148a0a8a/.test(e.cover_image)||/8826edac-0d50-4ba0-b861-f3ed9336878b/.test(e.cover_image)||/49be2356-6491-4a6f-84a5-15e99d23b6d1/.test(e.cover_image)?null:e.cover_image}function R(e){var t,n;let{post:r}=e;return null!=(n=null==(t=r.podcastFields)?void 0:t.free_podcast_url)?n:null}function C(e){var t,n,r,i,o,a,s,l;let{post:u}=e;return null!=(l=null!=(s=null!=(a=null!=(o=null==(t=u.videoUpload)?void 0:t.duration)?o:null==(r=u.podcastUpload)||null==(n=r.full_podcast_info)?void 0:n.duration)?a:null==(i=u.podcastUpload)?void 0:i.duration)?s:u.podcast_duration)?l:0}function N(e,t,n){let{is_freemail:r,is_free_preview:i,sectionEmailRenderElements:a}=n,s=(e,n)=>{var r,i;let o=!("section"in t&&(null==(r=t.section)?void 0:r.ignore_publication_email_settings));return null!=(i=null==a?void 0:a[n])?i:o?null==e?void 0:e[n]:null};return i?s(e.email_render_elements,"free_preview_preamble"):(0,o.isPaidPub)(e)?"everyone"===t.audience?s(e,r?"public_post_free_signup_preamble":"public_post_subscriber_preamble"):h(t.audience)?s(e,"subscriber_post_subscriber_preamble"):void 0:s(e.email_render_elements,"email_preamble_for_free_writer")}},58278:function(e,t,n){"use strict";n.d(t,{HN:()=>u,ID:()=>c,JG:()=>s,d9:()=>a,uB:()=>l});var r=n(12550),i=n.n(r),o=n(82776);let a=function(e){let{softMax:t=32,hardMax:n=48,extension:r=!1,extensionSeparator:o="-"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=s(e);if(a.length>t){let e=a.indexOf("-",t);-1!==e&&(a=a.substr(0,e))}a.length>n&&(a=a.substr(0,n));let l=r&&"string"==typeof r?r:i()().substr(0,3);return a?r&&(a+="".concat(o).concat(l)):a=l,a},s=function(e){let{hashIfEmpty:t=!1,allowUnicode:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(e||"").toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/\s+/g,"-").replace(/&/g,"-and-").replace(n?RegExp("[^\\p{L}\\p{N}-]+","gu"):/[^\w-]+/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"");return e&&"string"==typeof e&&!r&&t?Array.from(e).map(e=>e.codePointAt(0)).map(e=>{var t;return null!=(t=null==e?void 0:e.toString(16))?t:""}).join("").substring(0,12):r},l=(e,t)=>s((0,o.truncateText)(e,500,{ellipsis:""}),{allowUnicode:t}),u=(e,t)=>{let n=l(e,!0),r=l(e,!1);return t<0x3f9b46c&&n!==r?r:n},c=e=>{var t;let n,{pub:r,slugOrId:i}=e,{id:o,slug:s}=isNaN(n=parseInt(i))||"".concat(n)!==i?{slug:a(i),id:null}:{slug:null,id:n};return r.authorPagesInfo&&null!=(t=r.authorPagesInfo.find(e=>o?e.user_id===o:a(e.name)===s))?t:null}},50129:function(e,t,n){"use strict";n.d(t,{CP:()=>s,Qg:()=>i,_d:()=>l,bO:()=>u,nJ:()=>r});let r={draft:"draft",review_required:"review_required",edit_review_required:"edit_review_required",published:"published",flagged:"flagged",blocked:"blocked",deleted:"deleted",moderator_approved:"moderator_approved",moderator_removed:"moderator_removed",new_commenter_approval_required:"new_commenter_approval_required"},i=new Set([r.review_required,r.edit_review_required,r.published,r.moderator_approved,r.new_commenter_approval_required]);var o,a,s=((o={}).Removed="removed",o.Unavailable="unavailable",o.BlockedYou="blocked-you",o.YouBlocked="you-blocked",o.YouMuted="you-muted",o.Geoblocked="geoblocked",o);function l(e){return"missing"===e.type}var u=((a={}).comments_disabled="comments_disabled",a.free_subscription_required="free_subscription_required",a.paid_subscription_required="paid_subscription_required",a.founding_subscription_required="founding_subscription_required",a)},19945:function(e,t,n){"use strict";n.d(t,{F7:()=>o,Tb:()=>i,pQ:()=>r});let r=["list","grid","grid-groups","custom"],i={layout:"stacked",navPosition:"top",navStyle:"text"},o={backgroundColor:null,layout:"default",publicationNameBackgroundColor:null,publicationNamePosition:"bottom",publicationNameSize:50,publicationNameStyle:"text",showPublicationName:!0}},37764:function(e,t,n){"use strict";n.d(t,{E:()=>i.E,HG:()=>r.HG,S8:()=>a.S8,Tb:()=>l.Tb,Yj:()=>o.Y,hn:()=>s.h,j3:()=>a.j3,tL:()=>a.tL});var r=n(12632);n(15606);var i=n(47851),o=n(43708),a=n(75914);n(23246);var s=n(53217),l=n(19945);n(96129)},49807:function(e,t,n){"use strict";n.d(t,{$_T:()=>l.$_,AAD:()=>b,ADu:()=>F,AF5:()=>H,BpC:()=>l.Bp,Bss:()=>eu,Bte:()=>O,D0i:()=>p.D0,Dlv:()=>$,Dor:()=>X,EVw:()=>d.EV,EWE:()=>l.EW,Ewe:()=>l.Ew,FCy:()=>p.FC,H$$:()=>I,Hj9:()=>J,Hr8:()=>u.Hr,I_8:()=>E,I_S:()=>p.I_,JQq:()=>et,LG3:()=>A,LRz:()=>em,M$q:()=>u.M$,MGs:()=>Q,MWx:()=>P,PcW:()=>ei,Pmx:()=>l.Pm,PuM:()=>er,Q6R:()=>_,QMq:()=>D,RKl:()=>w,RVH:()=>u.RV,RYA:()=>u.RY,Rtp:()=>eb,SJN:()=>U,ScI:()=>eg,Sns:()=>K,Tkp:()=>u.Tk,UUj:()=>M,U_V:()=>eo,VRc:()=>u.VR,Vvu:()=>u.Vv,W$o:()=>m.W$,Xrv:()=>L,Z96:()=>C,Zgx:()=>u.Zg,_h3:()=>B,_nG:()=>en,ahR:()=>ec,bzS:()=>V,cSL:()=>z,d4Y:()=>d.d4,d5y:()=>l.d5,dJ9:()=>d.dJ,e$6:()=>S,eV6:()=>y,eX$:()=>p.eX,ehp:()=>ed,erJ:()=>G,fmI:()=>m.fm,gAK:()=>es,gTK:()=>x,gYq:()=>m.gY,ii9:()=>j,j5y:()=>q,jED:()=>T,jQ6:()=>ev,jQM:()=>ep,jS:()=>el,k5Q:()=>ey,kGL:()=>u.kG,lz6:()=>eh,muC:()=>R,naY:()=>e_,o4H:()=>m.o4,oT5:()=>u.oT,pU7:()=>v,pi1:()=>u.pi,py2:()=>p.py,q$n:()=>u.q$,qdI:()=>l.qd,rfn:()=>m.rf,sWz:()=>W,sXh:()=>l.sX,so2:()=>u.so,stX:()=>p.st,tLs:()=>ea,tvl:()=>h,v6Q:()=>g,vrI:()=>N,w1V:()=>u.w1,w4p:()=>l.w4,wVQ:()=>Z,wu9:()=>p.wu,wv4:()=>ef,xJz:()=>l.xJ,xWO:()=>Y,xdH:()=>k,xiU:()=>u.xi,yRP:()=>l.yR});var r=n(69277),i=n(70408),o=n(98111),a=n(4016),s=n(58278),l=n(92636),u=n(70189),c=n(41086),d=n(39891),p=n(18947),f=n(82776),m=n(28700);let h="/".concat("inbox"),g="/".concat("chat"),_="/".concat("activity"),b="/explore",v="/".concat("search");function y(e){let{root:t,user:n,addBase:r,skipToken:i=!1,doNotAutoSubmit:o=!1,params:a={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t?/[&?]$/.test(t)||(t.includes("?")||t.endsWith("%%")?t+="&":t+="?"):t=r?"".concat((0,l.$_)(e),"/subscribe?"):"/subscribe?",null==n?void 0:n.email)a.autoSubmit=!o,a.email=null==n?void 0:n.email;else if(!a.token&&!i){var s;a.token="undefined"!=typeof window&&(null==(s=window._preloads)?void 0:s.original_url)?(0,c.y)(window._preloads.original_url,"token"):null}return t+(0,l.Bp)(a)}function w(e){var t,n;let{pub:i,user:o,params:s}=e;return y(i,{addBase:!0,user:o,params:(0,r._)({},s,(0,a.s7)({pub:i})?{plan:"yearly300usd",upgrade_to_founding:!0}:{selectedPlanId:null==(n=i.plans)||null==(t=n.find(e=>{var t;return null==(t=e.metadata)?void 0:t.founding}))?void 0:t.id})})}function S(e){var t,n;let{pubId:r,postId:i,commentId:o,params:a,noBase:s,jumpToDestination:u}=e,c=!u&&(0,l.PH)()&&(!r||"undefined"!=typeof window&&(null==(n=window._preloads)||null==(t=n.pub)?void 0:t.id)===r),d=c?"/publish":s?"":(0,l.Ew)();return(0,l.yR)("".concat(d,"/chat").concat(r&&!c?"/".concat(r):"").concat(i?"/post/".concat(i):"").concat(o?"/reply/".concat(o):""),a)}function E(e){let{pub:t,params:n}=e;return(0,l.yR)("".concat((0,l.qd)(),"/send-reader-gifts/").concat(t.id),n)}function T(e){let{pub:t,params:n}=e;return(0,l.yR)("".concat((0,l.$_)(t),"/account/gifts"),n)}function k(e){let{giftId:t,token:n,params:i}=e;return(0,l.yR)("".concat((0,l.qd)(),"/accept-gift/").concat(t),(0,r._)({token:n},i))}function P(e){return"".concat((0,l.$_)(e),"/account")}function I(e){let{pub:t,params:n}=e;return(0,l.yR)("".concat((0,l.$_)(t),"/publish/stats/earnings"),n)}function A(e){let{pub:t}=e;return(0,l.yR)("".concat((0,l.$_)(t),"/account"),{extra_seats:!0})}function R(e){let{addBase:t=!1,baseUrlOptions:n={},section:r="",params:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(0,l.yR)("".concat(function(e){let{addBase:t,baseUrlOptions:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?(0,l.$_)(e,n):"";return"".concat(r,"/publish")}(e,{addBase:t,baseUrlOptions:n}),"/settings"),i);return r&&(o+="#".concat(r)),o}function C(e){let{addBase:t,params:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?(0,l.$_)(e):"",i="".concat(r,"/publish/home");return n?(0,l.yR)(i,n):i}function N(e,t){let{addBase:n,params:o,referrer:a}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=n?(0,l.$_)(e):"",u="".concat(s,"/meetings/book/").concat(t),c=(0,i._)((0,r._)({},o),{referrer:a});return o||a?(0,l.yR)(u,c):u}function U(e){let{addBase:t,params:n,referrer:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t?(0,l.$_)(e):"",s="".concat(a,"/meetings"),u=(0,i._)((0,r._)({},n),{referrer:o});return n||o?(0,l.yR)(s,u):s}function x(e){let{user_id:t,user_name:n,utm_source:r,utm_campaign:i,redirect:o}=e,a="".concat((0,l.qd)(),"/users/").concat(t),u=(0,s.JG)(n,{hashIfEmpty:!0});return u&&(a+="-".concat(u)),(0,l.yR)(a,{utm_source:r,utm_campaign:i,redirect:o})}function L(e){let{liveStreamId:t,utm_source:n,utm_campaign:i,params:o}=e;return(0,l.yR)("".concat((0,l.qd)(),"/live-stream/").concat(t),(0,r._)({utm_source:n,utm_campaign:i},o))}function M(e){let{liveStreamId:t,utm_source:n,utm_campaign:i,noBase:o,params:a}=e,s=o?"":(0,l.$_)();return(0,l.yR)("".concat(s,"/live-stream/").concat(t),(0,r._)({utm_source:n,utm_campaign:i},a))}function D(e){let{pub:t,utm_source:n,utm_campaign:r,utm_medium:i}=e;return(0,l.yR)("".concat((0,l.$_)(t),"/livestream"),{utm_source:n,utm_campaign:r,utm_medium:i})}function F(e){let{noBase:t,isGif:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?"":(0,l.$_)();return"".concat(r,"/live-stream/").concat(e,"/preview.").concat(n?"gif":"jpg")}function B(e){let{tab:t,utm_source:n,utm_campaign:r,redirect:i}=e;return(0,l.yR)("".concat((0,l.qd)(),"/").concat(t),{utm_source:n,utm_campaign:r,redirect:i})}function O(e){let{subdomain:t,utm_source:n,utm_campaign:r,redirect:i}=e;return(0,l.yR)("".concat((0,l.qd)(),"/pub/").concat(t),{utm_source:n,utm_campaign:r,redirect:i})}function Y(e){let{pubKey:t,utm_source:n,utm_campaign:r,r:i,redirect:o,modal:a}=e;return(0,l.yR)("".concat((0,l.qd)(),"/pub/").concat(t,"/chat"),{utm_source:n,utm_campaign:r,redirect:o,modal:a,r:i})}function W(e){let{postId:t,targetReplyId:n,utm_source:r,utm_campaign:i,showTarget:o,redirect:a,modal:s}=e;return(0,l.yR)("".concat((0,l.qd)(),"/chat/posts/").concat(t),{target_reply_id:n,utm_source:r,utm_campaign:i,showTarget:o,redirect:a,modal:s})}function q(e){let{commentId:t,targetReplyId:n,utm_source:r,utm_campaign:i,showTarget:o,redirect:a,modal:s}=e;return(0,l.yR)("".concat((0,l.qd)(),"/chat/replies/").concat(t),{target_reply_id:n,showTarget:o,utm_source:r,utm_campaign:i,redirect:a,modal:s})}function H(e){let{urlParams:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,u.Zg)(e,{baseUrl:(0,l.qd)(),urlParams:t})}function G(e){let{pub:t,params:n,section:r}=e;return r?(0,l.yR)("".concat((0,l.$_)(t),"/listen/").concat(r.slug,"/archive"),n):(0,l.yR)("".concat((0,l.$_)(t),"/podcast/archive"),n)}function $(e){let t=e.trim();if(/\s/.test(t))return null;try{let e=new URL(t);if(!["http:","https:"].includes(e.protocol))return null;return e}catch(e){return null}}let V=(e,t,n,r)=>{switch(e){case"user":default:return x({user_id:t,user_name:n,utm_source:"mentions"});case"pub":return r?(0,l.yR)(r,{utm_source:"mentions"}):""}};function j(e,t){let{addBase:n=!1,query:r={}}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,l.yR)("".concat(n?(0,l.$_)(e):"","/t/").concat(t.slug),r)}function J(e){if(e){if(e.startsWith(l.w4)||e.startsWith("https://res.cloudinary.com")||e.startsWith("https://bucketeer"))return!0;let t="https://".concat((0,f.getPostMediaBucketName)(),".s3.amazonaws.com");if(e.startsWith(t))return!0}return!1}function K(e){return!!function(e){let t;if(!e)return null;try{t=new URL(e)}catch(e){return null}if(!t.hostname.startsWith("open.substack.com"))return null;let n=/\/pub\/([^/?#]+)\/p\/([^/?#]+)/.exec(t.pathname);return n&&n[1]&&n[2]?{subdomain:n[1],slug:n[2],urlParams:Object.fromEntries(t.searchParams)}:null}(e)}function z(e,t){var n,r;let{addBase:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.section?X(e,{addBase:i,section:t.section}):t.post?(0,p.wu)(e,t.post,{noBase:!i}):t.postTag?j(e,t.postTag,{addBase:i}):i&&/^\/[^/]/.test(null!=(n=t.link_url)?n:"")?"".concat((0,l.$_)(e)).concat(t.link_url):null!=(r=t.link_url)?r:""}function X(e){let{addBase:t,section:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(n=n||(null==e?void 0:e.section)))throw Error("Section not found");let r=t?(0,l.$_)(e):"";return"".concat(r,"/s/").concat(n.slug||n.id)}let Z=e=>{var t;let n="".concat(null!=(t=null==e?void 0:e.base)?t:"","/api/v1/fb/auth");return e?(0,l.yR)(n,e):n};function Q(e,t){let{token:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,l.yR)("".concat((0,l.$_)(e),"/api/v1/post/pdf"),{postId:t,token:n})}function ee(e){var t;let n=e.match(/^https?:\/\/open\.substack\.com(?:\.localhost:5000)?\/pub\/([^\/]+)/);return n||(n=e.match(/^https?:\/\/([^\.]+)\.substack\.com/))?null!=(t=n[1])?t:null:null}function et(e){let{url:t,currentSubdomain:n,currentCustomDomain:r}=e;if(K(t))return n===ee(t);let i=!!t.match(/http:\/\/\w*\.substack\.com\.localhost:5000/),o=n?(0,a.V6)(n):void 0;return o?new URL(o).hostname.replace(/^www\./,"")===new URL(t).hostname.replace(/^www\./,""):r&&!i?r.replace(/^www\./,"")===new URL(t).hostname.replace(/^www\./,""):n===ee(t)}let en=function(e){let{addBase:t,params:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?(0,l.$_)(e):"";return(0,l.yR)("".concat(r,"/account/cancel"),n)},er=function(e,t){let{addBase:n,referrer:o,params:a}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=n?(0,l.$_)(e):"",u="".concat(s,"/publish/posts/detail/").concat(t),c=(0,i._)((0,r._)({},a),{referrer:o});return a||o?(0,l.yR)(u,c):u},ei=function(e,t){let{pinnedEntityId:n,addBase:o,referrer:a,params:s}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=o?(0,l.$_)(e):"",c="".concat(u,"/publish/posts/detail/").concat(t,"/discussion"),d=(0,i._)((0,r._)({},s),{referrer:a,pinnedEntityId:n});return s||a?(0,l.yR)(c,d):c},eo=function(e,t){let{addBase:n,referrer:o,params:a,selectionForQuote:s,alreadyPublished:u}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},c=n?(0,l.$_)(e):"",d="".concat(c,"/publish/posts/detail/").concat(t,"/share-center"),p=(0,i._)((0,r._)({},a),{referrer:o,selectionForQuote:s,alreadyPublished:u});return a||o||s||u?(0,l.yR)(d,p):d},ea=function(e,t){let{addBase:n,params:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!(null==e?void 0:e.id))return"";let o=n?(0,l.$_)(e):"";return(0,l.yR)("".concat(o,"/leaderboard?"),(0,r._)({},i,(null==t?void 0:t.id)&&{referrer_token:t.id.toString(36)}))},es=(e,t)=>{if(!e)return"";let n=(0,l.$_)(e);return"".concat(o.T.SURVEY_URL_PREFIX).concat(n,"/survey/").concat(t,"?token=").concat(o.T.SURVEY_TOKEN)};function el(e){return"".concat((0,l.Ew)(),"/browse/").concat(e)}function eu(e,t){return(0,l.c$)("/collection/".concat(e),t)}function ec(e){return(0,l.c$)(h,e)}function ed(e){return(0,l.c$)(g,e)}function ep(e){return(0,l.c$)(_,e)}function ef(e){return"".concat((0,l.Ew)(),"/api/v1/list/cover_image/").concat(e.id,".jpg")}function em(e){let{userId:t,userName:n}=e;return"".concat(t,"-").concat((0,s.d9)(n))}function eh(e){let{userId:t,userName:n,noBase:r=!0}=e,i=em({userId:t,userName:n}),o=r?"":(0,l.Ew)();return"".concat(o,"/api/v1/user/").concat(i,"/public_profile")}function eg(e){return!!e&&e.includes("generic.png")}function e_(){let{utm_medium:e,post_id:t,publication_subdomain:n,downloadAll:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.yR)("".concat((0,l.$_)({subdomain:null!=n?n:""},{forceSubdomain:!0}),"/publish/post/").concat(t),{tab:"clips",utm_medium:e,downloadAll:r})}function eb(e){let{categoryId:t,ranking:n,utm_source:r,focusedPubId:i,backAction:o}=e;return(0,l.yR)("".concat((0,l.$_)(),"/leaderboard/").concat(t).concat("for-you"===t?"":"/".concat("trending"===n?"rising":n)),{utm_source:r,focusedPubId:i,backAction:o})}function ev(){return"".concat((0,l.Ew)(),"/explore")}function ey(e){let{query:t,utm_source:n,fromSuggestedSearch:r,searching:i}=e;return(0,l.yR)("/search/".concat(encodeURIComponent(t)),{utm_source:n,fromSuggestedSearch:r,searching:i})}},39318:function(e,t,n){"use strict";n.d(t,{$_T:()=>_.$_T,ADu:()=>eg,Aih:()=>eL,BpC:()=>_.BpC,CHS:()=>P,Cv_:()=>e8,D09:()=>g.D0,DNs:()=>F,DS2:()=>eQ,Dlv:()=>_.Dlv,EVw:()=>_.EVw,EWE:()=>_.EWE,EZZ:()=>eG,Erh:()=>m.Er,Ewe:()=>_.Ewe,FCy:()=>_.FCy,G79:()=>e9,Gn4:()=>eW,H10:()=>ez,H_d:()=>eC,I_S:()=>_.I_S,J2y:()=>ek,Ji1:()=>g.Ji,L56:()=>T,LJG:()=>ev,M:()=>C,MYz:()=>e$,Nlh:()=>ex,OFB:()=>ea,OKG:()=>eT,Ojn:()=>eF,P1Q:()=>z,P5z:()=>es,Po_:()=>em,Pzx:()=>eX,Q1d:()=>eO,RF$:()=>V,RPh:()=>ef,RY1:()=>X,SAZ:()=>eb,T$x:()=>eV,T86:()=>eI,TRu:()=>ew,Tnu:()=>ey,Tvl:()=>en,U4Y:()=>et,UuW:()=>eZ,W$o:()=>h.W$,WY0:()=>q,XV8:()=>U,Xt9:()=>D,YL9:()=>ej,Z96:()=>_.Z96,_cT:()=>eR,_nG:()=>_._nG,a7q:()=>Z,aJp:()=>j,b1y:()=>eJ,bGb:()=>B,bgT:()=>eq,c8C:()=>N,cxW:()=>v.cx,cxh:()=>e4,d4Y:()=>_.d4Y,dJ9:()=>_.dJ9,dVy:()=>eY,eV6:()=>er,ed9:()=>eP,f5H:()=>eo,fOI:()=>S,fsB:()=>eE,fxv:()=>H,gEL:()=>eU,gKg:()=>e2,gWk:()=>G,gYq:()=>_.gYq,hdL:()=>k,laT:()=>eu,mWT:()=>ec,man:()=>e6,muC:()=>_.muC,my9:()=>W,nUM:()=>ei,n_I:()=>el,oMA:()=>I,oOP:()=>E,oRR:()=>w,oSl:()=>eH,oT5:()=>p.oT,pIF:()=>g.pI,pJR:()=>eA,q$g:()=>A,qCG:()=>e3,qw6:()=>eN,qy7:()=>M,r$1:()=>e1,rDG:()=>x,rfn:()=>_.rfn,rj:()=>Q,rmE:()=>eK,sTG:()=>e5,stX:()=>_.stX,t6y:()=>L,t77:()=>J,tFi:()=>$,tbS:()=>eD,w8b:()=>Y,wHz:()=>v.wH,wpu:()=>K,wu9:()=>_.wu9,xPB:()=>ee,yRA:()=>O,yRP:()=>_.yRP,yX_:()=>e0,zw3:()=>v.zw});var r=n(69277),i=n(70408),o=n(32641),a=n(69843),s=n.n(a),l=n(3843),u=n(66684),c=n(4016),d=n(58278),p=n(70189),f=n(9036),m=n(18947),h=n(28700),g=n(46058),_=n(49807),b=n(57324),v=n(55298);let y=[/\/embed$/,/\/embed\/podcast\//];function w(e,t){let{skipHash:n=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof e&&(t=e,e=document.location.pathname+document.location.search+document.location.hash);let r=(0,_.yRP)(e.split("?")[0].split("#")[0],Object.assign((0,f.m)(e),t));return -1===e.indexOf("#")||n||(r+=e.substr(e.indexOf("#"))),r}(0,_.$_T)();let S=function(e){let{params:t={},signedIn:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,_.D0i)(n,e);return(0,_.yRP)("".concat((0,_.$_T)(e),"/"),(0,r._)({lli:i},t))},E=e=>!e||!e.startsWith("/")||e.startsWith("//")||!/\.svg(\?|#|$)/.test(e)?e:"".concat(_.w4p,"/").concat(e),T=e=>(e||"").replace(/^(\w+:)?\/\//g,""),k=e=>{let t=(0,_.Ewe)();return"".concat(t,"/discover/stocks/").concat(e)},P=e=>{let t=(0,_.$_T)({subdomain:"admin"});return e?"".concat(t,"/users/").concat(e):t},I=(e,t)=>{let n=(0,_.$_T)({subdomain:"admin"});return(0,_.yRP)("".concat(n,"/customer_support_mode"),{for_pub:t?t.subdomain:void 0,redirect:e})},A=function(){let{utm_source:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=_.xJz;return(0,_.yRP)((0,_.d5y)("".concat("reader",".").concat(t)),{utm_source:e})},R=function(e){let{query:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=_.xJz;return(0,_.yRP)("".concat((0,_.d5y)(n)).concat(e),t)},C=e=>R("/activity",{query:e}),N=e=>R("/inbox/saved",e),U=function(e,t){let{params:n={},redirect:i=null,source:o=null,postUuid:a=null,inbox:s=null,hostOverride:l=null}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e||!t)return"";let u=l?a?"".concat(l,"/p/").concat(a):"".concat(l,"/p/").concat(t):a?"".concat((0,_.qdI)(),"/pub/").concat(e,"/drafts/").concat(a):"".concat((0,_.qdI)(),"/pub/").concat(e,"/p/").concat(t),c=(0,r._)({utm_source:o,redirect:i,inbox:s},n);return(0,_.yRP)(u,c)};function x(e,t,n,r){let{maxParents:i=3,token:o}=r;if(!n||!n.ancestor_path)return(0,m.Er)(e,t,n);let a=n.ancestor_path.split("."),s=a.length{let{pub:t,section:n,addBase:r=!0}=e,i=r?(0,_.$_T)(t):"";return n?"".concat(i,"/listen/").concat(n.slug||n.id):"".concat(i,"/podcast")},M=function(e){let{params:t,section:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n?"/s/".concat(n.slug||n.id):"";return(0,_.yRP)("".concat(r,"/archive"),t)},D=function(e){let{addBase:t,params:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?(0,_.$_T)(e):"";return(0,_.yRP)("".concat(r,"/archive"),n)},F=function(e){let{addBase:t,params:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?(0,_.$_T)(e):"";return(0,_.yRP)("".concat(r,"/about"),n)},B=function(e){let{addBase:t,params:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t?(0,_.$_T)(e):"";return(0,_.yRP)("".concat(r,"/sitemap"),n)},O=function(e){let t,{params:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.primary_publication)t=(0,_.$_T)(e.primary_publication);else{if(!e.subdomain)return;t=(0,_.$_T)({subdomain:e.subdomain})}let r="".concat(t,"/publish/home");return(0,_.yRP)(r,n)},Y=function(e,t){let{addBase:n,tab:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n?(0,_.$_T)(e):"",o={tab:r};return"string"==typeof t?o.email=t:t&&"object"==typeof t&&"email"in t?o.email=t.email:t&&"object"==typeof t&&"userId"in t&&(o.userId=t.userId),(0,_.yRP)("".concat(i,"/publish/subscribers/details"),o)},W=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,_.yRP)("".concat((0,_.$_T)(e),"/subscribe"),t);return -1===n.indexOf("?")?"".concat(n,"?"):n},q=function(e){return"".concat((0,_.$_T)(e),"/subscribe?plan=founding&")},H=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,_.yRP)("/account/login",e)},G=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?(0,_.yRP)("".concat((0,_.Ewe)(),"/refer/").concat(e),t):null},$=function(){let{utm_source:e,section:t,highlightNotification:n,modal:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,_.yRP)("".concat((0,_.Ewe)(),"/settings"),{utm_source:e,section:t,highlightNotification:n,modal:r})},V=function(){let{utm_source:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,_.yRP)("".concat((0,_.Ewe)(),"/settings/subscriptions"),{utm_source:e})},j=e=>"".concat((0,_.$_T)(e),"/?utm_source=").concat(b.VU.substack,"&utm_medium=").concat(b.Jn.email,"&utm_content=").concat(b.fL.share,"&action=share"),J=(e,t)=>{var{startAtSubscribeFlow:n}=t,i=(0,o._)(t,["startAtSubscribeFlow"]);let a="".concat((0,_.$_T)(e),"/listen");if(i){let e=(0,_.BpC)(i);e&&(a+="?".concat(e))}return n?er(e,(0,r._)({addBase:!0,next:a,skipPodcastSetupPage:!0},i)):a},K=function(e){var t;let{addBase:n,params:o,noSection:a,section:s,user:l,startAtSubscribeFlow:u}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d="";if(n&&(d+=(0,_.$_T)(e)),(s=null!=(t=null!=s?s:(null==e?void 0:e.is_www)?null:null==e?void 0:e.section)?t:null)&&!a&&(d+="/s/".concat(s.slug||s.id)),d+="/account/add-podcast",l&&l.email&&!(0,c.lu)({pub:e})&&(o=(0,i._)((0,r._)({},o),{email:l.email}),d+="/email"),o){let e=(0,_.BpC)(o);e&&(d+="?".concat(e))}return u?er(e,(0,r._)({addBase:!0,next:d,skipPodcastSetupPage:!0},o)):d},z=e=>{for(let t=0;t{let{useOriginalUrl:t}=e;if(t&&"undefined"!=typeof window&&window._preloads.original_url)try{let e=new URL(window._preloads.original_url);return"".concat(e.pathname).concat(e.search).concat(e.hash)}catch(e){}return"".concat(document.location.pathname).concat(document.location.search).concat(document.location.hash)},Z=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{for_pub:t,email:n,prefilled_email:r,with_password:i,error:o,message:a,change_user:s,justTrying:l,useOriginalUrl:u,isOAuth:c,only_allow_signin:d}=e,{redirect:p}=e;return"string"!=typeof p&&(p=X({useOriginalUrl:null!=u&&u})),(0,_.yRP)("".concat((0,_.Ewe)(),"/sign-in"),{redirect:p,for_pub:t,email:n,prefilled_email:r,with_password:i,error:o,message:a,change_user:s,justTrying:l,isOAuth:c,only_allow_signin:d})},Q=function(){let{params:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,_.yRP)("".concat((0,_.Ewe)(),"/profile/edit"),e)},ee=function(){let{isAbbreviated:e,redirect:t,postRedirectToast:n,pubId:i=null,referringUserKey:o=null,params:a={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=null;if(t)try{s=new URL(t),n&&s.searchParams.set("profile-setup-message",n)}catch(e){s=new URL((0,_.Ewe)())}let l=(0,r._)({action:"signup",isAbbreviated:e,redirect:s?s.toString():null,pubId:i},a);return o&&(l.r=o),(0,_.yRP)("".concat((0,_.Ewe)(),"/"),l)},et=(e,t)=>"".concat((0,_.Ewe)(),"/discover").concat(e?"/category/".concat(e.slug):"/recomendations").concat("all"===t?"/all":""),en=function(){let{query:e,params:t={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n="".concat((0,_.Ewe)(),"/search");return e&&(n="".concat((0,_.Ewe)(),"/search/").concat(encodeURIComponent(e))),w(n,t)};function er(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};var{signedIn:n=!1,addBase:i=!1,root:a,user:s}=t,l=(0,o._)(t,["signedIn","addBase","root","user"]);let u=(0,_.D0i)(n,e);return(0,_.eV6)(e,{root:a,user:s,addBase:i,params:(0,r._)({},void 0===u?{}:{lli:u},l)})}let ei=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,_.yRP)("".concat((0,_.$_T)(e),"/recommendations"),t)},eo=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return w("".concat((0,_.Ewe)(),"/signup"),e)},ea=function(e){let{addBase:t,baseUrlOptions:n,params:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t?(0,_.$_T)(e,n):"";return(0,_.yRP)("".concat(i,"/publish/recommendations"),r)},es=function(e){let{addBase:t,baseUrlOptions:n,params:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t?(0,_.$_T)(e,n):"";return(0,_.yRP)("".concat(i,"/publish/settings/homepage_links"),r)},el=e=>"".concat((0,_.$_T)(e),"/invite"),eu=function(e,t){let{utm_source:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,_.gYq)(e,{utm_source:n})},ec=e=>{let{pub:t,token:n=null}=e,{section:r}=t;if(r){var i;return(null==(i=r.podcastSettings)?void 0:i.podcast_feed_url)?r.podcastSettings.podcast_feed_url:ed({pubId:t.id,sectionId:r.id,token:n})}return t.podcast_feed_url?t.podcast_feed_url:ed({pubId:t.id,sectionId:null,token:n})};function ed(e){let{pubId:t,sectionId:n,token:r}=e;if(n){let e="".concat((0,_.$_T)({subdomain:"api"}),"/feed/podcast/").concat(t,"/s/");return r?e+="".concat(n,"/private/").concat(r,".rss"):e+="".concat(n,".rss"),e}let i="".concat((0,_.$_T)({subdomain:"api"}),"/feed/podcast/").concat(t);return r?i+="/private/".concat(r,".rss"):i+=".rss",i}let ep=function(e){let{noOverride:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?e.support_email&&!t?e.support_email:"support+".concat(e.subdomain,"@substack.com"):"support@substack.com"},ef=(e,t)=>"https://support.substack.com/hc/en-us?s=".concat(encodeURIComponent(ep(e,t))),em=(e,t)=>{let n=eh(e,t);return(0,_.dJ9)(n,null,{skipDomainValidation:!0,quality:"auto:best",version:4})},eh=(e,t)=>(0,_.yRP)("".concat((0,_.$_T)(e,{forceSubdomain:!0}),"/api/v1/post_preview/").concat(t.id,"/twitter.jpg"),{isDraft:t.is_draft||t.is_scheduled}),eg=e=>{let t=e_(e);return(0,_.dJ9)(t,null,{skipDomainValidation:!0,quality:"auto:best",version:1})},e_=e=>"".concat((0,_.Ewe)(),"/live-stream/").concat(e.liveStream.id,"/card.jpg"),eb=(e,t,n,r,i)=>{let o=ev(e,t,n,r);return(0,_.dJ9)(o,null,{skipDomainValidation:!0,quality:"auto:best",version:11,attachment:!!i,filename:i})},ev=(e,t,n,i)=>(0,_.yRP)("".concat((0,_.$_T)(e,{forceSubdomain:!0}),"/api/v1/post_selection_image/").concat(t.id,"/").concat(n,".jpg"),(0,r._)({},i)),ey=(e,t,n)=>(0,_.yRP)("".concat((0,_.$_T)(e,{forceSubdomain:!0}),"/api/v1/post_selection_image/").concat(t.id,"/image/").concat(n,".jpg")),ew=e=>(0,_.dJ9)("".concat(eS(e)),null,{quality:"auto:best",version:9,skipDomainValidation:!0}),eS=e=>{let{hashString:t}=n(82776),r="".concat((0,_.$_T)(e,{forceSubdomain:!0}),"/twitter/subscribe-card.jpg"),i=t(JSON.stringify({subdomain:e.subdomain,homepage_type:e.homepage_type,logo_url:e.logo_url,name:e.name,hero_text:e.hero_text,author_name:e.author_name,author_bio:e.author_bio,author_photo_url:e.author_photo_url,theme:e.theme,theme_var_background_pop:e.theme_var_background_pop,theme_var_cover_bg_color:e.theme_var_cover_bg_color}));return i?r+="?v=".concat(i):r+="?v=bust",r},eE=(e,t,n,r)=>{let i=eT(e,t,n);return(0,_.dJ9)(i,null,{quality:"auto:best",skipDomainValidation:!0,version:13,attachment:!!r,filename:r})},eT=(e,t,o)=>{let{hashString:a}=n(82776),s=a("".concat(t.social_title+t.title+t.description+t.cover_image));return(0,_.yRP)("".concat((0,_.$_T)(e,{forceSubdomain:!0}),"/api/v1/press_kit/").concat(t.id,".jpg"),(0,i._)((0,r._)({},o),{isDraft:"is_draft"in t&&t.is_draft,hash:s}))},ek=e=>{let{pub:t,postId:n,variant:r,type:i,aspectRatio:o,mode:a,audience:s,preloadS3Assets:l,version:u}=e,c=(e=>{let{pub:t,postId:n,variant:r,type:i,aspectRatio:o,mode:a,audience:s,preloadS3Assets:l}=e,u="".concat((0,_.$_T)(t),"/api/v1/press_kit/asset/").concat(n,"/").concat(r,"/").concat(i),c=new URLSearchParams;o&&c.append("aspectRatio",o),a&&c.append("mode",a),s&&c.append("audience",s),l&&c.append("preloadS3Assets","true");let d=c.toString();return d?"".concat(u,"?").concat(d):u})({pub:t,postId:n,variant:r,type:i,aspectRatio:o,mode:a,audience:s,preloadS3Assets:l});return(0,_.dJ9)(c,null,{quality:"auto:best",version:u})},eP=function(e,t,n,r){let{useRootDomain:i=!1}=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=eI(e,t,n,{useRootDomain:i});return(0,_.dJ9)(o,null,{quality:"auto:best",skipDomainValidation:!0,version:10,attachment:!!r,filename:r})},eI=function(e,t,n){let{useRootDomain:i=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=null;if(Object.values(l.Fh).includes(t))o="arr";else if(Object.values(l.ai).includes(t))o="subscribers";else throw Error("endpoint for milestone not found [".concat(t,"]"));return(0,_.yRP)("".concat(i?(0,_.$_T)():(0,_.$_T)(e,{forceSubdomain:!0}),"/api/v1/milestone_assets/").concat(o,".jpg"),(0,r._)({milestone:t},n,i&&{subdomain:e.subdomain}))},eA=function(e,t,n){let{fileToDownload:r="",useRootDomain:i=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=eR(e,t,n,{useRootDomain:i});return(0,_.dJ9)(o,null,{quality:"auto:best",skipDomainValidation:!0,version:10,attachment:!!r,filename:r})},eR=function(e,t,n){let{useRootDomain:i=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,_.yRP)("".concat(i?(0,_.$_T)():(0,_.$_T)(e,{forceSubdomain:!0}),"/api/v1/subscription_note_assets/").concat(t.id,".png"),(0,r._)({},n,i&&{subdomain:e.subdomain}))},eC=function(e,t,n){let{fileToDownload:r="",useRootDomain:i=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=eN(e,t,n,{useRootDomain:i});return(0,_.dJ9)(o,null,{quality:"auto:best",skipDomainValidation:!0,version:10,attachment:!!r,filename:r})},eN=function(e,t,n){let{useRootDomain:i=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return(0,_.yRP)("".concat(i?(0,_.$_T)():(0,_.$_T)(e,{forceSubdomain:!0}),"/api/v1/pledge_note_assets/").concat(t.id,".jpg"),(0,r._)({},n,i&&{subdomain:e.subdomain}))},eU=function(e,t,n){let{fileToDownload:r="",useRootDomain:i=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=ex(e,n,{useRootDomain:i});return(0,_.dJ9)(o,null,{quality:"auto:best",skipDomainValidation:!0,version:11,attachment:!!r,filename:r})},ex=function(e,t){let{useRootDomain:n=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,_.yRP)("".concat(n?(0,_.$_T)():(0,_.$_T)(e,{forceSubdomain:!0}),"/api/v1/publication_assets/image.jpg"),(0,r._)({},t,n&&{subdomain:e.subdomain}))},eL=e=>{let{userId:t,variant:n,aspectRatio:r}=e;return(0,_.dJ9)(eM({userId:t,variant:n,aspectRatio:r}),null,{quality:"auto:best",skipDomainValidation:!0,version:1})},eM=e=>{let{userId:t,variant:n,aspectRatio:r}=e;return(0,_.yRP)("".concat((0,_.$_T)(),"/api/v1/profile/assets/").concat(t,"/").concat(n),{aspectRatio:r})},eD=e=>{let{noteId:t,variant:n,type:r,aspectRatio:i="stories"}=e;return(0,_.yRP)("".concat((0,_.$_T)(),"/api/v1/note/asset/").concat(t,"/").concat(n,"/").concat(r),{aspectRatio:"stories"===i?void 0:"grid"})},eF=e=>{let t=eB(e);return(0,_.dJ9)(t,null,{quality:"auto:best",version:9})},eB=e=>(0,_.yRP)("/api/v1/latex/jpeg",{expression:e}),eO=e=>"substack://publications/".concat(e.id,"/threads"),eY=e=>e.startsWith("/publish"),eW=e=>{var t,n;let r;return(r=(0,_.Dlv)(e))&&r.pathname.startsWith("/p/")&&null!=(n=null==(t=(0,_.Dlv)(e))?void 0:t.pathname.split("/")[2])?n:null},eq=function(){let{redirect:e,for_pub:t,utm_source:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e=e||"",(0,_.yRP)("".concat((0,_.Ewe)(),"/sign-out"),{redirect:e,for_pub:t,utm_source:n})},eH=550,eG=728,e$=[424,848,1272,1456],eV=1200,ej=2880,eJ=320,eK=550,ez=function(e){var t,n;let{post:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return;let i="substack-video";if("audio"===e.media_type&&(s()(e.thumbnail_id)||1===e.thumbnail_id))return null==r||null==(t=r.podcast_episode_image_info)?void 0:t.url;let o=e.post_id?"https://".concat(i,".s3.amazonaws.com/video_upload/post/").concat(e.post_id):"https://".concat(i,".s3.amazonaws.com/video_upload/user/").concat(e.user_id);return"".concat(o,"/").concat(e.id,"/transcoded-").concat((null!=(n=e.thumbnail_id)?n:1).toString().padStart(5,"0"),".png")},eX=function(e){var t;let{isStatic:r,post:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{videoPlayerDimensions:o}=n(82776),{height:a,width:s}=o(e,{isStatic:r});return(0,_.dJ9)(null!=(t=ez(e,{post:i}))?t:"",2*s,{crop:s/a<1920/1080?"pad":"fill",height:2*a,trailingSegments:r?["l_".concat("play_button_usfui2",",w_144,e_colorize:0")]:[]})},eZ=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(0,_.yRP)("https://substack.com/app-link/publications/".concat(e.id,"/drafts/").concat(t),n)},eQ=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,_.yRP)("".concat((0,_.Ewe)(),"/app"),e)},e0=function(){let{pathOnly:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t="/img/podcast/generic.png";return e?t:"".concat((0,_.Ewe)()).concat(t)},e1=()=>{let e=e0({pathOnly:!0});return(0,_.dJ9)(e,1400)},e2=e=>(0,_.yRP)("https://twitter.com/intent/tweet",e),e6=e=>{let{text:t,query:n}=e;return(0,_.yRP)("https://bsky.app/intent/compose",(0,i._)((0,r._)({},n),{text:t}))},e8=e=>{var t;let{post:n,height:r}=e;return(null==(t=n.videoUpload)?void 0:t.is_mux)?"/api/v1/video/upload/".concat(n.videoUpload.id,"/preview.gif?height=").concat(r):null},e4=e=>{let{userId:t,pub:n,addBase:r=!1}=e;if(!n.authorPagesInfo)return null;let i=n.authorPagesInfo.find(e=>e.user_id===t);if(!i)return null;let o=r?(0,_.$_T)(n):"";return"".concat(o,"/w/").concat((0,d.d9)(i.name))},e3=e=>{let{campaignId:t,medium:n,userId:r,pubId:i,url:o,postId:a,referrer:s}=e,l=null;o&&(l=encodeURIComponent((0,u.A)(o)));let c=null;s&&(c=encodeURIComponent((0,u.A)(s)));let d=a?String(a).replace(/\D/g,""):null;return a&&/\D/.test(String(a))&&console.log('Corrupted postId detected: "'.concat(a,'" (cleaned to: "').concat(d,'")'),{medium:n,campaignId:t,pubId:i,userId:r,url:o,postId:a}),"".concat((0,_.$_T)(),"/sponsorship-campaigns/").concat(t,"/link?pub_id=").concat(i,"&medium=").concat(n).concat(r?"&user_id=".concat(r):"").concat(d?"&post_id=".concat(d):"").concat(c?"&referrer=".concat(c):"").concat(l?"&url=".concat(l):"")},e5=e=>{let{campaignId:t,pub:n}=e;return"".concat((0,_.$_T)(n),"/publish/sponsorship-campaigns/").concat(t)},e9=(e,t)=>e&&t?"".concat((0,_.$_T)(e),"/api/v1/video/upload/").concat(t,"/download"):""},80856:function(e,t,n){"use strict";n.d(t,{Ru:()=>a,_:()=>u,_4:()=>o,an:()=>c,gB:()=>l,iQ:()=>s,lk:()=>i});var r=n(92636);let i=function(){let{utm_source:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.yR)("".concat((0,r.Ew)(),"/tos"),{utm_source:e})},o=function(){let{utm_source:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.yR)("".concat((0,r.Ew)(),"/pa"),{utm_source:e})},a=function(){let{pub:e,utm_source:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e?(0,r.yR)("".concat((0,r.$_)(e),"/tos"),{utm_source:t}):i({utm_source:t})},s=function(){let{utm_source:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat((0,r.yR)("".concat((0,r.Ew)(),"/ccpa"),{utm_source:e}),"#personal-data-collected")},l=function(){let{utm_source:e,hash:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat((0,r.yR)("".concat((0,r.Ew)(),"/privacy"),{utm_source:e})).concat(t?"#".concat(t):"")},u=function(){let{pub:e,utm_source:t,hash:n=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e)return"".concat(l({utm_source:t,hash:n}));let i=n?"#".concat(n):"";return"".concat((0,r.yR)("".concat((0,r.$_)(e),"/privacy"),{utm_source:t})).concat(i)},c=function(){let{utm_source:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"".concat((0,r.yR)("".concat((0,r.Ew)(),"/accessibility"),{utm_source:e}))}},28700:function(e,t,n){"use strict";n.d(t,{W$:()=>d,dt:()=>a,fm:()=>l,gY:()=>u,o4:()=>c,rf:()=>s});var r=n(69277),i=n(58278),o=n(92636);function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,o.c$)("/profile/".concat(e),(0,r._)({},t))}function s(e,t){let{searchParams:n,noBase:r,baseUrl:a}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=r?"":null!=a?a:(0,o.Ew)(),l="".concat(s,"/profile/").concat(function(e){let{id:t,name:n,handle:r}=e;if(r)return"@".concat(r);let o=(0,i.JG)(n,{hashIfEmpty:!0});return"".concat(t).concat(o?"-".concat(o):"")}({id:e,name:t}));return(0,o.yR)(l,n)}let l=function(e){let{searchParams:t,noBase:n,baseUrl:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=n?"":null!=r?r:(0,o.Ew)(),a="".concat(i,"/@").concat(e);return(0,o.yR)(a,t)};function u(e){let{utm_source:t,utm_content:n,utm_campaign:i,noBase:o,baseUrl:a,noHandle:u,extraParams:c}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},d=(0,r._)({},c,t||n||i?{utm_source:t,utm_content:n,utm_campaign:i}:void 0),p=u?void 0:(null==e?void 0:e.handle)||(null==e?void 0:e.author_handle);return p?l(p,{noBase:o,baseUrl:a,searchParams:d}):s(e.author_id||e.user_id||e.id,e.user_profile_name||e.author_name||e.name,{noBase:o,baseUrl:a,searchParams:d})}function c(e,t,n){return(0,o.c$)("".concat(u(e,{noBase:!0}),"/").concat(null!=t?t:"subscribers"),n)}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,o.yR)("".concat((0,o.Ew)(),"/profile/start"),e)}},82776:function(e,t,n){"use strict";n.r(t),n.d(t,{AUDIENCE_ADJECTIVES:()=>eA,CENTS_PER_EMAIL:()=>ej,CORE_SUPPORTED_LANGUAGES:()=>eq,ChatError:()=>eX,DEFAULT_GIFT_LENGTH_DAYS:()=>eU,DEFAULT_GRANT_NUMBER:()=>ex,DEFAULT_MAX_BYLINES:()=>rf,DEFAULT_PREVIEW_LIMIT:()=>ea,DEFAULT_PREVIEW_LIMIT_EMAIL:()=>es,DEFAULT_PROFILE_PAGE_SUBSCRIPTIONS_LIMIT:()=>eo,EEA_COUNTRIES:()=>tb,EU_COUNTRIES:()=>t_,GIFT_LENGTH_MONTHS:()=>eN,GRACE_PERIOD_COUPON_TRIAL_DAYS:()=>ei,GRACE_PERIOD_DAYS:()=>et,HOMEPAGE_TYPE_CHANGE_CUTOFF:()=>eC,LINK_SUPPORTED_COUNTRIES:()=>tv,LIVE_STREAM_CONTENT_WARNINGS:()=>rL,MANUAL_BILLING_DAYS_UNTIL_DUE:()=>en,MAX_BANK_PAYMENT_ATTEMPTS:()=>eu,MAX_FILE_SIZE:()=>W,MAX_MEDIA_FILE_SIZE:()=>O,MAX_MEDIA_UPLOAD_CHUNK_SIZE:()=>Y,MAX_PG_BIGINT:()=>em,MAX_PG_INT:()=>ep,MAX_PODCAST_FIELD_LENGTH:()=>eg,MAX_PODCAST_FILE_SIZE:()=>B,MAX_SECTION_DESCRIPTION_LENGTH:()=>e_,MIN_MONTH_GAP_BETWEEN_PAUSES:()=>el,MISSING_IMAGE_HEIGHT:()=>w.xS,MISSING_IMAGE_URL:()=>w.lJ,MISSING_IMAGE_WIDTH:()=>w.GD,MONTH_NAMES:()=>eO,NO_PLATFORM_CUSTOMER_CLONE_COUNTRIES:()=>e$,NO_REPLY_EMAIL:()=>e7,NZD_COUNTRIES:()=>ty,OLD_PODCAST_CATEGORIES:()=>eB,PODCAST_CATEGORIES:()=>eF,PODCAST_SECTIONS_TO_MARK_AS_NEWSLETTERS:()=>eJ,PUBLICATION_TIER_DESCRIPTIONS:()=>rc,PUB_IDS_TO_NOT_SHOW_FOLLOW_PROMPT_ON:()=>x,READ_WORDS_PER_MINUTE:()=>ec,SCHEDULED_LIVE_STREAM_NOTIFY_WINDOW_HOURS:()=>eK,SECURITY_QUESTIONS:()=>eI,SENDER_REMINDER_2_DELAY_SINCE_LAST_REMINDER:()=>eM,SENDER_REMINDER_3_DELAY_SINCE_LAST_REMINDER:()=>eD,SENDER_REMINDER_DELAY:()=>eL,SPEAK_WORDS_PER_MINUTE:()=>ed,SPECIAL_SUBDOMAINS:()=>eP,STRIPE_COUNTRIES_WITH_TRANSFERS_ENABLED:()=>rM,STRIPE_DAYS_UNTIL_DUE:()=>er,STRIPE_TAX_ID_TYPES:()=>eY,SUBSCRIPTION_WORDS:()=>n2,SUBSTACK_PUBLICATION_IDS:()=>X,SUBSTACK_PUBLICATION_ID_BETA:()=>j,SUBSTACK_PUBLICATION_ID_BLOGOLD:()=>V,SUBSTACK_PUBLICATION_ID_COMPANY:()=>H,SUBSTACK_PUBLICATION_ID_LIBRARYOLD:()=>G,SUBSTACK_PUBLICATION_ID_ON:()=>q,SUBSTACK_PUBLICATION_ID_PRODUCTLAB:()=>z,SUBSTACK_PUBLICATION_ID_READ:()=>J,SUBSTACK_PUBLICATION_ID_STORIESOLD:()=>$,SUBSTACK_PUBLICATION_ID_THREADSPILOT:()=>K,SUBSTACK_USER_ID:()=>Z,SUBSTACK_USER_IDS:()=>ee,SUBSTACK_WRITERS_USER_ID:()=>Q,SUPPORTED_CURRENCIES:()=>tw,SUPPORTED_LANGUAGES:()=>eW,SUPPORTED_LANGUAGES_IN_LANGUAGE:()=>eH,SUPPORTED_SEARCH_LANGUAGES:()=>eG,TERSE_AUDIENCE_ADJECTIVES:()=>eR,TRANSPARENT_IMAGE_URL:()=>w.rd,WEEK_IN_SECONDS:()=>eV,anonymousName:()=>n0,areCommentsLocked:()=>ng,areHuesEqual:()=>tq,assertIsDefined:()=>L,assertIsError:()=>M,averageVectors:()=>rU,balanceTextWithCharacterWidths:()=>th,baschezScoreToEmojis:()=>tX,baschezToCategory:()=>tz,canDeleteComment:()=>nS,canDeletePost:()=>nT,canEditComment:()=>nw,canManageCommentAsPrimaryUser:()=>ny,canPostComments:()=>n_,canReplyToPost:()=>e9,canReportComment:()=>nk,canSeeCommenterEmails:()=>nf,canSeeComments:()=>nm,canSeeTranscription:()=>nh,centsToDollarString:()=>tR,centsToPriceString:()=>tA,colorLightness:()=>t$,colorLuma:()=>tV,commentsEnabledForPost:()=>nc,couldPostCommentsIfSubscribed:()=>nb,coverPageFreeSubscriberCount:()=>t7,currencySymbol:()=>tP,decimalToPercent:()=>ni,defaultAudienceForPub:()=>nA,defaultCommentLevelForPub:()=>nx,defaultSendEmailForPub:()=>nL,dollarFormatter:()=>tC,dollarStringToCents:()=>tN,endsWithPunctuation:()=>tl,ensureInList:()=>rN,escapeNewlines:()=>nu,extractAttributionDataFromRecord:()=>rF,extractEventAttributionDataFromRecord:()=>rB,flowTextBasedOnWidth:()=>rI,formatArray:()=>tJ,formatBytes:()=>nX,formatEllipsis:()=>ts,formatPercentForDisplay:()=>nr,formatPodcastDuration:()=>r_,formatPodcastDurationLower:()=>rb,formattedBytesToNumber:()=>nZ,foundingMemberDescription:()=>n9,fromEnv:()=>rk,getAttributionDirectMap:()=>rn,getAttributionOptions:()=>ri,getAttributionPatternMatchPlatforms:()=>rr,getByLine:()=>eZ,getBylineUsers:()=>nG,getCopyrightedContentBucketName:()=>eT,getCurrencyForCountry:()=>tS,getGiftValueText:()=>tL,getGlobalBanMessage:()=>eb,getImageUrlFromBucketKey:()=>eE,getInitalPayment:()=>tx,getModerationPolicyName:()=>ew,getNext5HoursAfterMidnight:()=>rg,getNumberWithCommas:()=>t9,getOpennodePaymentUrl:()=>n7,getPlanTitle:()=>rE,getPostCtaPresentParticiple:()=>nY,getPostCtaText:()=>nO,getPostEmbedMeta:()=>e1,getPostMediaBucketName:()=>eS,getPrintedByline:()=>n$,getPrintedPostType:()=>nW,getPublicationBanMessage:()=>ey,getReadableAttribution:()=>rt,getRemovedContentBucketName:()=>ek,getRestackEmailSubject:()=>nq,getScheduledAt:()=>no,getSectionBasedSubjectOverride:()=>rD,getSubscribeText:()=>e0,getSubscriptionSentenceWithCustomWords:()=>n4,getSubscriptionWord:()=>n3,getSuperscriptNumberString:()=>n5,getTrialEndOverride:()=>nM,getUserBanMessage:()=>ev,getValidAudienceLevels:()=>nC,getWithIndefiniteArticle:()=>ry,get_month_name:()=>nD,guessFirstName:()=>y.$k,guessLastName:()=>y.fF,handleDocumentLinkClick:()=>nK,hasFoundingPlan:()=>nR,hashString:()=>rw,hexToHSV:()=>tO,hexToRgb:()=>tY,hidePaidPostsFor:()=>e6,isAppAttribution:()=>ro,isAtLeastContributorRole:()=>e2,isBigIntId:()=>eh,isDefaultMarblePhoto:()=>w.DH,isIntId:()=>ef,isNotMainEntry:()=>nz,isNotesAttribution:()=>ra,isPaidPub:()=>nI,isPinnable:()=>rp,isProbablyEmail:()=>rl,isSearchEngineCrawlerQuick:()=>nQ,isSubstackNetworkAttribution:()=>rs,isTouchDevice:()=>rA,isUUID:()=>nV,isValidCommentLevel:()=>nU,isZeroDecimalCurrency:()=>tT,joinLines:()=>tZ,kFormatter:()=>rS,longestSetOfWordsBelowCost:()=>tm,mode:()=>nB,normalizeHex:()=>tB,numberToHumanFileSize:()=>re,numberToOrderOfMagnitude:()=>t8,numberToOrderOfMagnitudeString:()=>t4,numberToOrdinal:()=>t2,numberToRoughRankingString:()=>t5,numberToRoughShortString:()=>t3,numberToString:()=>t6,onlyOwnsRootComment:()=>nE,oxfordComma:()=>nF,paymentPeriodToPlan:()=>rd,pluralize:()=>ns,possessive:()=>nl,postSocialDescription:()=>n1,preventOrphans:()=>to,profilePageFreeSubscriberCountString:()=>nn,pubCurrency:()=>tE,pubHasPaymentsEnabled:()=>nP,pubRoleForManagingComment:()=>nv,pubUsesZeroDecimalCurrency:()=>tk,pubsWithCustomSubscriptionWords:()=>n8,randomString:()=>tQ,resolveTwitterShareText:()=>eQ,restacksEnabledForPost:()=>nd,rgbToHex:()=>tW,rgbaToString:()=>tH,roughFreeSubscriberCount:()=>ne,roughFreeSubscriberCountString:()=>nt,roundPriceUp:()=>tU,sanitizeInlineText:()=>ru,satoshiToBitcoin:()=>tI,secondsToHHMMSS:()=>tD,secondsToLargestUnit:()=>tM,sectionIsSpecificallyMarkedAsNewsletter:()=>ez,setDateToMidnightPST:()=>rh,shouldHidePostFromArchive:()=>nH,shouldUseInlineComments:()=>e8,showCommentsOnPost:()=>np,simpleBalanceText:()=>tc,sortSubscriptions:()=>e3,spellOutNumber:()=>na,startsWithVowel:()=>rv,streamToBuffer:()=>rP,stringCost:()=>tf,stripInvalidBytes:()=>te,subscriptionTypeText:()=>e5,textLengthAlphaNumericMinimumValidator:()=>rT,toFlagEmoji:()=>rx,toMillis:()=>nj,toSentenceCase:()=>t1,toTitleCase:()=>t0,transformDocumentLink:()=>nJ,truncAndFormatArray:()=>tj,truncateBytes:()=>tt,truncateNumber:()=>tK,truncateText:()=>tr,truncateToValidBytes:()=>tn,truncateWords:()=>ti,twitterScreenNames:()=>U,userFromReferralKey:()=>rC,userReferralKey:()=>rR,validCommentLevels:()=>nN,validateColor:()=>tG,validateHex:()=>tF,videoPlayerDimensions:()=>rm});var r=n(99851),i=n(69277),o=n(70408),a=n(79785),s=n(2404),l=n.n(s),u=n(69843),c=n.n(u),d=n(6585),p=n.n(d),f=n(3843),m=n(98111),h=n(4016);n(50129);var g=n(2256),_=n(44289),b=n(48863),v=n(60639),y=n(50963),w=n(18742),S=n(65606),E=n(49705).Buffer;function T(){let e=(0,a._)(["Your account is currently suspended. We've removed your publication from public view due to a violation of Substack's ",". If you believe this is a mistake, visit our"]);return T=function(){return e},e}function k(){let e=(0,a._)(["We've removed your publication from public view due to a violation of Substack's ",". If you believe this was a mistake, you can submit an appeal to our Standards & Enforcement team"]);return k=function(){return e},e}function P(){let e=(0,a._)(["","k"]);return P=function(){return e},e}function I(){let e=(0,a._)(["","m"]);return I=function(){return e},e}function A(){let e=(0,a._)(["","b"]);return A=function(){return e},e}function R(){let e=(0,a._)(["","t"]);return R=function(){return e},e}function C(){let e=(0,a._)(["Over "," subscribers"]);return C=function(){return e},e}function N(){let e=(0,a._)(["Get "," in your inbox"]);return N=function(){return e},e}let U=f.im,x=[21267,260347];function L(e){if(null==e)throw new v.uV("Expected value to be defined, but received ".concat(e))}function M(e){if(!(e instanceof Error))throw new v.uV("Expected value to be an Error, but received ".concat(e))}let D=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],F=["CA","AU","HK","NZ"],B=0x15e00000,O=0x500000000,Y=0x3200000,W=0x2bc00000,q=1,H=46438,G=86696,$=81318,V=87805,j=508885,J=737237,K=1014268,z=1056696,X=[1,46438,86696,81318,87805,508885,737237,1014268,1056696],Z=0x4d8b0ef,Q=0x27ead30,ee=[0x4d8b0ef,0x27ead30],et=16,en=45,er=30,ei=2/24,eo=1e3,ea=356,es=256,el=6,eu=3,ec=220,ed=150,ep=0x7fffffff;function ef(e){return"number"==typeof e&&Number.isInteger(e)&&e>0&&e<=ep}let em=Number.MAX_SAFE_INTEGER;function eh(e){return"number"==typeof e&&Number.isInteger(e)&&e>0&&e<=em}let eg=25e4,e_=1e3;function eb(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"general";return"Your account is currently suspended. Something you posted may have violated Substack's ".concat(ew(e),". If you believe this is a mistake, you can submit an appeal to our Standards & Enforcement team here:")}function ev(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iTemplate:n}=I18N.i(t);return n(T(),ew(e,t))}function ey(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iTemplate:n}=I18N.i(t);return n(k(),ew(e,t))}function ew(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iString:n}=I18N.i(t);switch(e){case"hate":return n("Hate policy");case"illegal":return n("Illegal & Harmful Activities policy");case"impersonation":return n("Impersonation policy");case"plagiarism":return n("Plagiarism policy");case"porn":return n("Nudity, Porn, & Erotica policy");case"private_information":return n("Private Information policy");case"spam":return n("Spam & Phishing policy");default:return n("Content Guidelines, Terms of Service, or Publisher Agreement")}}function eS(){let e="substack-post-media";if(!e)throw new v.uV("postMediaBucketName is not defined");return e}function eE(e){return"https://".concat(eS(),".s3.amazonaws.com/").concat(e)}function eT(){return"substack-post-media"===eS()?"substack-copyrighted-media":"substack-copyrighted-media-staging"}function ek(){return"substack-post-media"===eS()?"substack-removed-media":"substack-removed-media-staging"}let eP=["cdn","cloudinary","delivery","jobs","mailgun","mail","support","www","callback","api","admin","reader","sublink","random","your","dashboard","open"],eI=["In what city or town did your parents meet?","What was your first teacher's last name?","What is your earliest memory?","What was the make and model of your first car?","What was the first concert you attended?","Where did you go on your first date?","What was your first favorite band?","What was your first computer or smartphone?","What is your least favorite color?","What was the first video game you beat?","Who was your favorite artist, musician, or celebrity when you were a teenager?"],eA={everyone:"public",only_free:"free-only",only_paid:"subscribers-only",founding:"founding-only"},eR={everyone:"public",only_free:"free-only",only_paid:"subscriber's",founding:"subscriber's"},eC=new Date("2020-01-16"),eN=1,eU=30,ex=3,eL=2592e5,eM=6048e5,eD=1728e6,eF={Arts:["Books","Design","Fashion & Beauty","Food","Performing Arts","Visual Arts"],Business:["Careers","Entrepreneurship","Investing","Management","Marketing","Non-Profit"],Comedy:["Comedy Interviews","Improv","Stand-Up"],Education:["Courses","How To","Language Learning","Self-Improvement"],Fiction:["Comedy Fiction","Drama","Science Fiction"],Government:[],History:[],"Health & Fitness":["Alternative Health","Fitness","Medicine","Mental Health","Nutrition","Sexuality"],"Kids & Family":["Education for Kids","Parenting","Pets & Animals","Stories for Kids"],Leisure:["Animation & Manga","Automotive","Aviation","Crafts","Games","Hobbies","Home & Garden","Video Games"],Music:["Music Commentary","Music History","Music Interviews"],News:["Business News","Daily News","Entertainment News","News Commentary","Politics","Sports News","Tech News"],"Religion & Spirituality":["Buddhism","Christianity","Hinduism","Islam","Judaism","Religion","Spirituality"],Science:["Astronomy","Chemistry","Earth Sciences","Life Sciences","Mathematics","Natural Sciences","Nature","Physics","Social Sciences"],"Society & Culture":["Documentary","Personal Journals","Philosophy","Places & Travel","Relationships"],Sports:["Baseball","Basketball","Cricket","Fantasy Sports","Football","Golf","Hockey","Rugby","Running","Soccer","Swimming","Tennis","Volleyball","Wilderness","Wrestling"],Technology:[],"True Crime":[],"TV & Film":["After Shows","Film History","Film Interviews","Film Reviews","TV Reviews"]},eB={Arts:["Books","Design","Fashion & Beauty","Food","Literature","Performing Arts","Visual Arts"],Business:["Business News","Careers","Investing","Management & Marketing","Shopping"],Comedy:[],Education:["Educational Technology","Higher Education","K-12","Language Courses","Training"],"Games & Hobbies":["Automotive","Aviation","Hobbies","Other Games","Video Games"],"Government & Organizations":["Local","National","Non-Profit","Regional"],Health:["Alternative Health","Fitness & Nutrition","Self-Help","Sexuality"],"Kids & Family":[],Music:[],"News & Politics":[],"Religion & Spirituality":["Buddhism","Christianity","Hinduism","Islam","Judaism","Other","Spirituality"],"Science & Medicine":["Medicine","Natural Sciences","Social Sciences"],"Society & Culture":["History","Personal Journals","Philosophy","Places & Travel"],"Sports & Recreation":["Amateur","College & High School","Outdoor","Professional"],Technology:["Gadgets","Tech News","Podcasting","Software How-To"],"TV & Film":[]},eO=["January","February","March","April","May","June","July","August","September","October","November","December"],eY=[{name:"eu_vat",description:"European VAT number"},{name:"au_abn",description:"Australian Business Number (AU ABN)"},{name:"au_arn",description:"Australian Taxation Office Reference Number"},{name:"br_cnpj",description:"Brazilian CNPJ number"},{name:"br_cpf",description:"Brazilian CPF number"},{name:"bg_uic",description:"Bulgaria Unified Identification Code"},{name:"ca_bn",description:"Canadian BN"},{name:"ca_gst_hst",description:"Canadian GST/HST number"},{name:"ca_pst_bc",description:"Canadian PST number (British Columbia)"},{name:"ca_pst_mb",description:"Canadian PST number (Manitoba)"},{name:"ca_pst_sk",description:"Canadian PST number (Saskatchewan)"},{name:"ca_qst",description:"Canadian QST number (Qu\xe9bec)"},{name:"cl_tin",description:"Chilean TIN"},{name:"eu_oss_vat",description:"European One Stop Shop VAT number for non-Union scheme"},{name:"ge_va",description:"Georgian VAT"},{name:"hk_br",description:"Hong Kong BR number"},{name:"hu_tin",description:"Hungary tax number (ad\xf3sz\xe1m)"},{name:"is_vat",description:"Icelandic VAT"},{name:"in_gst",description:"Indian GST number"},{name:"id_npwp",description:"Indonesian NPWP number"},{name:"il_vat",description:"Israel VAT"},{name:"jp_cn",description:"Japanese Corporate Number (*Hōjin Bangō*)"},{name:"jp_rn",description:"Japanese Registered Foreign Businesses' Registration Number (*Tōroku Kokugai Jigyōsha no Tōroku Bangō*) "},{name:"li_uid",description:"Liechtensteinian UID number"},{name:"my_frp",description:"Malaysian FRP number"},{name:"my_itn",description:"Malaysian ITN C"},{name:"my_sst",description:"Malaysian SST number"},{name:"mx_rfc",description:"Mexican RFC number"},{name:"nz_gst",description:"New Zealand GST number"},{name:"no_vat",description:"Norwegian VAT number"},{name:"ru_inn",description:"Russian INN"},{name:"ru_kpp",description:"Russian KPP"},{name:"sa_vat",description:"Saudi Arabia VAT"},{name:"sg_gst",description:"Singaporean GST"},{name:"sg_uen",description:"Singaporean UEN"},{name:"si_tin",description:"Slovenia tax number (davčna številka)"},{name:"za_vat",description:"South African VAT number"},{name:"kr_brn",description:"Korean BRN"},{name:"es_cif",description:"Spanish CIF number"},{name:"ch_vat",description:"Switzerland VAT number"},{name:"tw_vat",description:"Taiwanese VAT"},{name:"th_vat",description:"Thai VAT"},{name:"ua_vat",description:"Ukrainian VAT"},{name:"ae_trn",description:"United Arab Emirates TRN"},{name:"gb_vat",description:"United Kingdom VAT number"},{name:"us_ein",description:"United States EIN"}],eW={ca:"Catalan",da:"Danish",de:"German",es:"Spanish",fr:"French",it:"Italian",ja:"Japanese",nb:"Norwegian",nl:"Dutch",pl:"Polish",pt:"Portuguese","pt-br":"Brazilian Portuguese",sv:"Swedish",tr:"Turkish"},eq=["en","ca","da","de","es","fr","it","ja","nb","nl","pl","pt","sv","tr"],eH={ca:"Catal\xe0",da:"Dansk",de:"Deutsch",es:"Espa\xf1ol",fr:"Fran\xe7ais",it:"Italiano",ja:"日本語",nb:"Norsk",nl:"Nederlands",pl:"Polski",pt:"Portugu\xeas","pt-br":"Portugu\xeas do Brasil",sv:"Svenska",tr:"T\xfcrk\xe7e"},eG=["ar","cs","de","el","en","es","fr","hi","hu","id","it","ja","ko","la","nl","no","pl","pt","ro","ru","sv","th","tr","vi","zh"],e$=["IN"],eV=604800,ej=.0064,eJ={therampart:{sectionIds:[62635]},thebulwark:{sectionIds:[87956]}},eK=3,ez=e=>{var t;let{section:n,pub:r}=e;return!!(null==(t=eJ[r.subdomain])?void 0:t.sectionIds.includes(n.id))};class eX extends Error{constructor({status:e,errType:t,errMessage:n,pub:a,body:s}){super(n),(0,r._)(this,"name",void 0),(0,r._)(this,"status",void 0),(0,r._)(this,"response",void 0),this.name=this.constructor.name,this.status=e,this.response={body:(0,o._)((0,i._)({},s),{status:t,error:n})},a&&(this.response.body.publication=a),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}function eZ(e){var t,n,r,i;let{skipMultiContributorCheck:o=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("popularinformation"===e.subdomain)return"Judd Legum";if("whyisthisinteresting"===e.subdomain)return"Noah & Colin";if("informant"===e.subdomain)return"Nick Martin";if("colinmeloy"===e.subdomain)return"Colin Meloy";if("petition"===e.subdomain||"russiandissent"===e.subdomain)return null;if("mattlabash"===e.subdomain)return"Matt Labash";if("wmbrown"===e.subdomain)return"Matt Hranek";if("bigtechontrial"===e.subdomain)return"Matt Stoller";if("thegreenspoon"===e.subdomain)return"Greta and Fanny";if("exponentialview"===e.subdomain)return"Azeem Azhar";if("thegodpod"===e.subdomain)return"God";if(!o&&"object"==typeof e&&"contributors"in e&&(null==(i=e.contributors)?void 0:i.length)>1)return null;let a=e.name||e.subdomain;for(let i of["object"==typeof e&&"contributors"in e&&(null==(n=e.contributors)||null==(t=n[0])?void 0:t.name),"object"==typeof e&&"author_name"in e&&e.author_name,e.email_from_name,null==e||null==(r=e.author)?void 0:r.name])if(i&&(i=i.split(/(,|\||\s-|-\s|\bfrom\b|\bat\b)/g)[0].trim())&&!i.startsWith(a)&&!a.startsWith(i)&&!i.endsWith(a)&&!a.endsWith(i))return i;return null}function eQ(e){var t;let{pub:n,post:r}=e,i=(null==n?void 0:n.twitter_screen_name)||n&&U[null==n?void 0:n.subdomain],o=null!=(t=null==r?void 0:r.title)?t:null==n?void 0:n.name;return n&&!r&&(o="Subscribe to ".concat(o)),i&&(!r||n&&(!r.publishedBylines.length||r.publishedBylines.some(e=>e.id===n.author_id)))&&(o+=", by @".concat(i)),o}function e0(e){let{now:t=!1,isFreeSubscribed:n=!1,isMobile:r=!1,isPledged:i=!1,pledgesEnabled:o=!1,language:a,foundingUpsell:s,isFoundingSubscribed:l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return"Subscribe";let{iString:u}=I18N.i(a||e.language);return n4(e,()=>{if(n&&e.plans&&s&&!l)return u("Upgrade to founding");if(n&&e.plans&&r&&t)return u("Upgrade now");if(n&&e.plans&&r&&!t)return u("Upgrade");if(n&&e.plans&&!r&&t)return u("Upgrade to paid now");if(n&&e.plans&&!r&&!t)return u("Upgrade to paid");else if(n&&o&&!i&&t)return u("Pledge your support now");else if(n&&o&&!i&&!t)return u("Pledge your support");else if(t)return u("Subscribe now");return u("Subscribe")},a=>(n&&e.plans?t1(r?a.upgrade:a.upgradeToPaid):n&&o&&!i?"Pledge your support":t1(n3(e,"subscribe")))+(t?" now":""))}function e1(e){let{date:t,bylines:r,like_count:i,comment_count:o,language:a="en"}=e,{iPlural:s}=I18N.i(a),l=n(16291).A,u=[];return u.push(l(t).locale(a).fromNow()),i&&u.push(s("1 like","%1 likes",i)),o&&u.push(s("1 comment","%1 comments",o)),r&&r.length&&u.push(tJ(r.map(e=>e.name).filter(e=>null!==e),a)),u.join(" \xb7 ")}function e2(e){return!!e&&_.q.includes(e)}let e6=["astralcodexten"];function e8(e,t){return!(!["astralcodexten","company","library","on","blog","stories"].includes(null==e?void 0:e.subdomain)&&((null==t?void 0:t.type)!=="podcast"||(0,h.lu)({pub:e}))&&((null==t?void 0:t.type)!=="video"||(0,h.lu)({pub:e})))}let e4=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.toUpperCase().replace(/^(THE|A|AN)\s+/,"")};function e3(e){return e.sort((e,t)=>{var n,r;if(!e)return 1;if(!t||"subscribed"===e.membership_state&&"subscribed"!==t.membership_state)return -1;if("subscribed"===t.membership_state&&"subscribed"!==e.membership_state)return 1;let i=e4(null==(n=e.publication)?void 0:n.name),o=e4(null==(r=t.publication)?void 0:r.name);return io)})}function e5(e){if(e.expiry&&new Date(e.expiry)>new Date)switch(e.type){case"gift":return"Gifted Subscription";case"comp":return"Comped Subscription";default:return"Paid Subscriber"}return!e.email_disabled||e.email_settings&&Object.values(e.email_settings||{}).some(e=>"individual"===e)?"Free Subscriber":e.email_settings&&Object.values(e.email_settings||{}).some(e=>"digest"===e)?"Follows in Digests":"Emails Disabled"}function e9(e){let{post:t,user:n}=e;return!!(t&&n&&n.has_publication&&!n.is_admin&&!n.is_contributor&&t.slug!==g._B)}let e7="no-reply@substack.com";function te(e){if(!e||"string"!=typeof e)return e;e=e.replace(/[\u0000-\u0008\u000B-\u001F\u007F]/g,e=>e.length>1?e:" ");try{return encodeURIComponent(e),e}catch(e){}return e.replace(/[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g,e=>e.length>1?e:" ")}function tt(e,t){let n=new TextEncoder().encode(e);return n.length>t?new TextDecoder().decode(n.slice(0,t)):e}function tn(e){for(;;)try{return encodeURIComponent(e),e}catch(t){e=e.substring(0,e.length-1)}}function tr(e,t){let{words:n=null,ellipsis:r="…",extension:i=null}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return e;let o=!1;if(n){let t=new RegExp("^(\\w+\\W+){".concat(n-1,"}\\w+")).exec(e);t&&(o=!0,e=t[0])}return t&&e.length>t&&(o=!0,e=e.substring(0,t-r.length)),o&&(e=tn(e)+r,i&&(e+=i)),e}function ti(e,t){let{ellipsis:n="…",quotationMarks:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return e;r&&(t-=2);let i=e;if(e&&e.length>t){let r=e.split(/\s+/),o=[],a=0;for(;a<=t;){let e=r.shift();if(!e||a+e.length>t)break;o.push(e),a+=e.length+1}i=ts(o.join(" "),n)}return r&&(i.endsWith(" ")||i.startsWith(" "))&&(i=i.trim()),r?'"'.concat(i,'"'):i}let to=e=>{var t;if(!e)return"";let n=e.trim(),r=n.split(/\s/);return(null!=(t=r[r.length-1])?t:"").length>5?n:n.replace(/(\s)(\S+)$/,"\xa0$2")},ta=/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,\-./:;<=>?@[\]^_`{|}~]+$/g;function ts(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"…";return"".concat(e.replace(ta,"")).concat(t)}function tl(e){return/[!.?](?:\s+)?$/.test(e)}let tu=new Set([" ","-"]);function tc(e){let{maxCharsPerLine:t=55,maxLines:n=2,preferWide:r=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.length<=t)return[e];let i=t*n;if(e.length>i){let t=i;for(;t>=0&&" "!==e.charAt(t);)t--;e=ts(e.slice(0,t))}let o=r?t:Math.floor(e.length/n),a=-1,s=0,l=[];for(;s+o/[A-Z]/.test(e),tp=e=>/[\s-]/.test(e);function tf(e,t){let n=0;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:{},i=e;if(tf(e,r)<=t)return[e];let o=[];for(let i=0;ie+t.length,0){var t,n;return(null==(n=e.draft_plans)||null==(t=n[0])?void 0:t.currency)||"usd"};function tT(e){return["BIF","CLP","DJF","GNF","JPY","KMF","KRW","MGA","PYG","RWF","UGX","VND","VUV","XAF","XOF","XPF"].includes(e.toUpperCase())}function tk(e){return tT(tE(e))}function tP(e){let{locale:t="en-US"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Intl.NumberFormat(t,{style:"currency",currency:e,minimumFractionDigits:0,maximumFractionDigits:0}).format(0).replace(/\d/,"").trim()}let tI=e=>e/1e8;function tA(e,t){let{forceDecimals:n=!1,locale:r="en-US"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=new Intl.NumberFormat(r,{style:"currency",currency:t,minimumFractionDigits:n||e%100&&!tT(t)?2:0,maximumFractionDigits:"btc"===t?8:2}).format("btc"===t?tI(e):tT(t)?e:e/100);return"usd"===t&&"undefined"!=typeof window&&window._preloads&&window._preloads.country&&F.includes(window._preloads.country)&&(i="US".concat(i)),i}function tR(e){return new Intl.NumberFormat("en-US",{style:"decimal",minimumFractionDigits:2,maximumFractionDigits:2}).format(e/100)}let tC=new Intl.NumberFormat("en-US",{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:0});function tN(e){if(!e)return null;if("string"!=typeof e)throw Error("Bad type for dollar string");let t=e.replace(/[^0-9.]/g,"");return t?Math.round(100*Number(t)):null}function tU(e){let t=e/100;return 100*(t=t<50?Math.ceil(t):5*Math.ceil(t/5))}function tx(e){let{quantity:t=1,coupon:n=null,noTrial:r=!1,trial_end_override:i=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!r&&(e.trial_period_days||n&&n.trial_period_days||i&&i>Date.now()/1e3+120))return 0;let o=e.amount*t;return n&&n.percent_off?o=Math.round(o*(1-(n.percent_off_precise||n.percent_off)/100)):n&&n.amount_off&&(o=Math.max(0,o-n.amount_off)),o}function tL(e){let t,n,r,i,{interval:o="month",interval_count:a=eN,multiplier:s=1,min:l=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(let i of e){if(r){if(r!=i.currency)continue}else r=i.currency;"month"==i.interval?(!t||i.amount1&&void 0!==arguments[1]?arguments[1]:{},{iCombo:m}=I18N.i(d);if((e=Math.round(e))<(n||60))return(t=Math.round(e),u)?t:l&&s?m("secondsToLargestUnit","second","seconds",t):l&&!s?m("secondsToLargestUnit","sec","secs",t):!s&&p?m("secondsToLargestUnit","%1 sec ago","%1 secs ago",t):!s&&f?m("secondsToLargestUnit","%1 sec left","%1 secs left",t):s?p?m("secondsToLargestUnit","%1 second ago","%1 seconds ago",t):f?m("secondsToLargestUnit","%1 second left","%1 seconds left",t):m("secondsToLargestUnit","%1 second","%1 seconds",t):m("secondsToLargestUnit","%1 sec","%1 secs",t);if(e<(r||3600)&&c&&!u&&!l)return(t=Math.round(e/60),!s&&p)?m("secondsToLargestUnit","%1 min ago","%1 mins ago",t):!s&&f?m("secondsToLargestUnit","%1 min left","%1 mins left",t):s?p?m("secondsToLargestUnit","less than %1 second ago","less than %1 seconds ago",t):f?m("secondsToLargestUnit","less than %1 second left","less than %1 seconds left",t):m("secondsToLargestUnit","less than %1 minute","less than %1 minutes",t):m("secondsToLargestUnit","less than %1 min","less than %1 mins",t);if(e<(r||3600))return(t=Math.round(e/60),u)?t:l&&s?m("secondsToLargestUnit","minute","minutes",t):l&&!s?m("secondsToLargestUnit","min","mins",t):!s&&p?m("secondsToLargestUnit","%1 min ago","%1 mins ago",t):!s&&f?m("secondsToLargestUnit","%1 min left","%1 mins left",t):s?p?m("secondsToLargestUnit","%1 minute ago","%1 minutes ago",t):f?m("secondsToLargestUnit","%1 minute left","%1 minutes left",t):m("secondsToLargestUnit","%1 minute","%1 minutes",t):m("secondsToLargestUnit","%1 min","%1 mins",t);if(e<(i||86400))return(t=Math.round(e/60/60),u)?t:l&&s?m("secondsToLargestUnit","hour","hours",t):l&&!s?m("secondsToLargestUnit","hr","hrs",t):!s&&p?m("secondsToLargestUnit","%1 hr ago","%1 hrs ago",t):!s&&f?m("secondsToLargestUnit","%1 hr left","%1 hrs left",t):s?p?m("secondsToLargestUnit","%1 hour ago","%1 hours ago",t):p?m("secondsToLargestUnit","%1 hour left","%1 hours left",t):m("secondsToLargestUnit","%1 hour","%1 hours",t):m("secondsToLargestUnit","%1 hr","%1 hrs",t);if(e<(o||604800))return(t=Math.round(e/60/60/24),u)?t:l?m("secondsToLargestUnit","day","days",t):p?m("secondsToLargestUnit","%1 day ago","%1 days ago",t):f?m("secondsToLargestUnit","%1 day left","%1 days left",t):m("secondsToLargestUnit","%1 day","%1 days",t);else if(e<(a||0x1e187e0))return(t=Math.round(e/60/60/24/7),u)?t:l&&s?m("secondsToLargestUnit","week","weeks",t):l&&!s?m("secondsToLargestUnit","wk","wks",t):!s&&p?m("secondsToLargestUnit","%1 wk ago","%1 wks ago",t):!s&&f?m("secondsToLargestUnit","%1 wk left","%1 wks left",t):s?p?m("secondsToLargestUnit","%1 week ago","%1 weeks ago",t):f?m("secondsToLargestUnit","%1 week left","%1 weeks left",t):m("secondsToLargestUnit","%1 week","%1 weeks",t):m("secondsToLargestUnit","%1 wk","%1 wks",t);return(t=Math.round(e/60/60/24/365.25),u)?t:l&&s?m("secondsToLargestUnit","year","years",t):l&&!s?m("secondsToLargestUnit","yr","yrs",t):!s&&p?m("secondsToLargestUnit","%1 yr ago","%1 yrs ago",t):!s&&f?m("secondsToLargestUnit","%1 yr left","%1 yrs left",t):s?p?m("secondsToLargestUnit","%1 year ago","%1 years ago",t):f?m("secondsToLargestUnit","%1 year left","%1 years left",t):m("secondsToLargestUnit","%1 year","%1 years",t):m("secondsToLargestUnit","%1 yr","%1 yrs",t)}function tD(e){let{strict:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{strict:!1},n=Math.floor(e/60/60),r=Math.floor(e/60)%60,i=Math.floor(e%60);if(!t)return"".concat((n?"".concat(n,":"):"")+(n?"0".concat(r).slice(-2):r),":").concat("0".concat(i).slice(-2));let o=e=>e.toString().padStart(2,"0"),a=o(n),s=o(r),l=o(i);return"".concat(a,":").concat(s,":").concat(l)}function tF(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)}function tB(e){return"#"!==e[0]&&(e="#".concat(e)),e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,n,r)=>t+t+n+n+r+r)}function tO(e){let t;function n(e,t){"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)&&(e="100%");let n="string"==typeof e&&-1!=e.indexOf("%");return(e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),1e-6>Math.abs(e-t))?1:e%t/parseFloat(t)}e=tB(e);let r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e),i=parseInt(null==r?void 0:r[1],16),o=parseInt(null==r?void 0:r[2],16),a=parseInt(null==r?void 0:r[3],16);i=n(i,255);let s=Math.max(i,o=n(o,255),a=n(a,255)),l=Math.min(i,o,a),u=s-l;if(s==l)t=0;else{switch(s){case i:t=(o-a)/u+6*(o.11&&t.h<.56){if(t.s>.25&&t.v>.5){if(t.s<.6&&t.v>.8)return!0;else if(t.s>.6)return!0}}else if(t.s>.25&&t.v>.5)return!0;return!1}function t$(e,t){let n=tY(e);return n?(n.r=Math.max(0,Math.min(255,Math.round(n.r*t))),n.g=Math.max(0,Math.min(255,Math.round(n.g*t))),n.b=Math.max(0,Math.min(255,Math.round(n.b*t))),tW(n)):e}function tV(e){let{r:t,g:n,b:r}=tY(e);return t/=255,n/=255,r/=255,.2126*(t=t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n=n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))}function tj(e,t){let{name:n=e=>e,restWord:r="other",noNames:i="people",pluralizeRest:o=!0,showRestCount:a=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=e.map(n).filter(Boolean).slice(0,t);if(0===s.length)s.push(ns(e.length,i));else if(s.length1&&o?"s":""))}return tJ(s)}function tJ(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iString:n}=I18N.i(t),r="";return 1===e.length?r=e[0]:2===e.length?r=e.join(" ".concat(n("and")," ")):e.length>2&&(r="".concat(e.slice(0,-1).join(", "),", ").concat(n("and")," ").concat(e.slice(-1))),r}function tK(e){let{minSignificantDigits:t=1,language:n="en"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e<1e3)return e.toString();let{iTemplate:r}=I18N.i(n),i=e=>{let n=Math.max(t-1-Math.floor(Math.log10(e)),0);return Math.round(e*Math.pow(10,n))/Math.pow(10,n)};return 1e3>Math.round(e/1e3)?(e/=1e3,r(P(),i(e))):1e3>Math.round(e/1e6)?(e/=1e6,r(I(),i(e))):1e3>Math.round(e/1e9)?(e/=1e9,r(A(),i(e))):(e/=1e12,r(R(),i(e)))}let tz=e=>Math.max(0,Math.min(5,Math.floor(Math.log(Math.max(e,1))/Math.LN10+1e-9))-1),tX=e=>"\uD83D\uDD25".repeat(tz(e));function tZ(e,t,n){let r=(e||"").trim().split(/[\s\r]*\n[\s\r]*/g).map(e=>e.trim()).filter(e=>e),i=[];for(;r.length>0;){let e=r.shift(),o=i[i.length-1];o&&o.length{var t;return(null==(t=e[0])?void 0:t.toUpperCase())+e.substr(1).toLowerCase()}).join(" ")}function t1(e,t){var n;let r=t?e.substr(1).toLowerCase():e.substr(1);return(null==(n=e[0])?void 0:n.toUpperCase())+r}function t2(e){let t=["th","st","nd","rd"],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])}function t6(e){let{precision:t=0,language:n="en"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=Number(e.replace(/,/g,""))),new Intl.NumberFormat(n,{style:"decimal",minimumFractionDigits:0,maximumFractionDigits:t}).format(e)}function t8(e){return c()(e)?0:Math.pow(10,Math.floor(Math.log10(e)))||0}function t4(e,t){let{iString:n}=I18N.i(t);if(e<100)return n("tens");if(e<1e3)return n("hundreds");if(e<1e4)return n("thousands");if(e<1e5)return n("tens of thousands");if(e<1e6)return n("hundreds of thousands");else if(e<1e7)return n("millions");else if(e<1e8)return n("tens of millions");else if(e<1e9)return n("hundreds of millions");else if(e<1e10)return n("billions");else if(e<1e11)return n("tens of billions");else if(e<1e12)return n("hundreds of billions");else if(e<1e13)return n("trillions");else if(e<1e14)return n("tens of trillions");else if(e<1e15)return n("hundreds of trillions");return n("gagillions")}function t3(e){let{maximumFractionDigits:t=1,plusSignifier:n="+"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.toLocaleString(void 0,{notation:"compact",maximumFractionDigits:t,roundingMode:"floor"});return e>=1e3?"".concat(r).concat(n):e>0?r:"0"}function t5(e){return e<=10?"#".concat(e):e<=25?"Top 25":e<=50?"Top 50":e<=100?"Top 100":""}function t9(e){if(e<1e3)return null;let t=1e3*Math.floor(e/1e3);return t>=1e6&&(t=1e5*Math.floor(e/1e5)),t6(t)}function t7(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iTemplate:n}=I18N.i(t),r=t9(e);return r?n(C(),r):null}function ne(e){let t;return e?(t=e<1e3?1:e<1e4?100:e<1e6?1e3:1e5,Math.floor(e/t)*t):0}function nt(e){let t=ne(e);return t&&0!==t?t3(t):null}function nn(e,t){let{iString:n}=I18N.i(t);return e&&0!==e?"".concat(nt(e)," ").concat(n(1===e?"subscriber":"subscribers")):n("See subscribers")}let nr=e=>1>Number(e)?"< 1%":"".concat(e,"%");function ni(e){let{rounded:t=!1,display:n=!1,decimalPlaces:r=-1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=100*parseFloat(e);return(r>=0&&(i=i.toFixed(r)),t&&(i=Math.floor(i)),n)?nr(Number(i)):i}function no(e){var t;return(null==e||null==(t=e.postSchedules)?void 0:t.length)&&e.postSchedules[0]&&e.postSchedules[0].trigger_at?new Date(e.postSchedules[0].trigger_at):"scheduled_at"in e&&e&&e.scheduled_at?e.email_sent_at&&e.should_send_email?void 0:new Date(Math.max(new Date(e.scheduled_at).getTime(),Date.now())):void 0}function na(e){if(0===e)return"zero";if(1===e)return"one";if(2===e)return"two";if(3===e)return"three";if(4===e)return"four";else if(5===e)return"five";else if(6===e)return"six";else if(7===e)return"seven";else if(8===e)return"eight";else if(9===e)return"nine";else if(10===e)return"ten";else if(11===e)return"eleven";else if(12===e)return"twelve";return t6(e)}function ns(e,t){let n,r,{zero_fallback:i="",just_word:o}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=t.lastIndexOf(" ")+1,s=t.substr(a),l=t.substr(0,a);return(["person","people"].includes(s)?(n="".concat(l,"person"),r="".concat(l,"people")):["Person","People"].includes(s)?(n="".concat(l,"Person"),r="".concat(l,"People")):["reply","replies"].includes(s)?(n="".concat(l,"reply"),r="".concat(l,"replies")):["Reply","Replies"].includes(s)?(n="".concat(l,"Reply"),r="".concat(l,"Replies")):["entry","entries"].includes(s)?(n="".concat(l,"entry"),r="".concat(l,"entries")):["Entry","Entries"].includes(s)?(n="".concat(l,"Entry"),r="".concat(l,"Entries")):["match","matches"].includes(s)?(n="".concat(l,"match"),r="".concat(l,"matches")):["Match","Matches"].includes(s)?(n="".concat(l,"Match"),r="".concat(l,"Matches")):(n=t,r="".concat(t,"s")),o||(n="".concat(t6(e)," ").concat(n),r="".concat(t6(e)," ").concat(r)),!e&&i)?i:1==e?n:r}function nl(e){return"".concat(e,"’").concat("s"===e[e.length-1]?"":"s")}function nu(e){return e.replace(/\n/g,"\\n")}function nc(e){let{publication:t,post:n}=e;return!(!n||["adhoc_email","page"].includes(null==n?void 0:n.type))&&t.community_enabled&&n&&"none"!==n.write_comment_permissions}function nd(e){let{publication:t,post:n}=e;return!!(t.community_enabled&&n)}function np(e){let{publication:t,post:n}=e;return(null==n?void 0:n.type)!=="page"&&(null==n?void 0:n.type)!=="adhoc_email"&&(null==n?void 0:n.slug)!==g._B&&(n&&n.comment_count>0||nc({publication:t,post:n}))}let nf=e=>!!(e&&e.is_contributor);function nm(e,t){let{bypassContentAccessCheck:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{userHasFullAccessToPost:i}=n(56262);return!t.is_geoblocked&&(!!(e&&t.publishedBylines&&t.publishedBylines.find(t=>t.id===e.id))||r||i(e,t))}function nh(e,t){let{bypassContentAccessCheck:r=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{userHasFullAccessToPost:i}=n(56262);return!!(e&&t.publishedBylines&&t.publishedBylines.find(t=>t.id===e.id))||r||i(e,t)}let ng=e=>"thread"===e.type&&"none"===e.write_comment_permissions;function n_(e,t,r){let{userHasFullAccessToPost:i,isFoundingAudience:o}=n(56262),a=e&&"id"in e?e.id:null;if(a&&t.publishedBylines&&t.publishedBylines.find(e=>e.id===a)||e&&e.is_contributor)return{canReply:!0};switch(t.write_comment_permissions||r.default_write_comment_permissions){case"everyone":return{canReply:!0};case"none":return{canReply:!1,repliesDisabledReason:"comments_disabled"};case"only_paid":{if(o(t.audience)){let n=!!e&&i(e,t);return{canReply:n,repliesDisabledReason:n?void 0:"founding_subscription_required"}}let n=!!(e&&e.is_subscribed);return{canReply:n,repliesDisabledReason:n?void 0:"paid_subscription_required"}}}return{canReply:!1}}function nb(e,t,n){return n_((0,o._)((0,i._)({},e),{is_subscribed:!0}),t,n).canReply}function nv(e,t){var n;return e&&t&&(null==(n=e.dashboard_pubs)?void 0:n.find(e=>e.can_post_notes_as_primary_user&&e.primary_user_id===t.user_id&&(!(null==t?void 0:t.publication_id)||(null==t?void 0:t.publication_id)===(null==e?void 0:e.id))))||null}function ny(e,t){return!!nv(e,t)}let nw=(e,t)=>!!(t&&e&&e.id===t.user_id||ny(e,t));function nS(e,t,n){let{pub:r,parentComments:i}=n;if(!e||!t)return!1;if(e.id===t.user_id)return!0;if(t.publication_id&&t.post_id){if(nT(e,r))return!0}else if(nE({user:e,comment:t,parentComments:i}))return!0;else if(ny(e,t))return!0;else if(r&&r.contributors.find(t=>t.user_id===e.id&&"community_moderator"===t.role))return!0;return!1}function nE(e){var t;let{user:n,comment:r,parentComments:i}=e;if(!n||!r||r.publication_id&&r.post_id||n.id===r.user_id||n.is_contributor)return!1;let o=Number(null==(t=r.ancestor_path)?void 0:t.split(".").filter(Boolean)[0]);if(!o)return!1;let a=null==i?void 0:i.find(e=>(null==e?void 0:e.id)===o);return n.id===(null==a?void 0:a.user_id)}function nT(e,t){return!!e&&!!(e.id===(null==t?void 0:t.author_id)||(null==t?void 0:t.contributors.find(t=>t.user_id===e.id&&e2(t.role))))}function nk(e,t){return!!e&&!!t&&e.id!==t.user_id}function nP(e){return!!e.plans}function nI(e){return!!(e.plans||e.has_subscribers)}function nA(e){let{type:t,coupon:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.plans&&"page"!==t?n?"only_free":"only_paid":"everyone"}function nR(e){let{pub:t}=e;return!!(t.plans&&t.plans.find(e=>{var t;return(null==(t=e.metadata)?void 0:t.founding)==="yes"}))}function nC(e){let{pub:t}=e;if(!t.plans)return["everyone"];let n=["everyone","only_paid"];return nR({pub:t})&&n.push("founding"),n}function nN(e,t,n){if("thread"===t)switch(e){case"only_paid":case"founding":return["only_paid"];default:return["everyone"]}switch(e){case"only_paid":case"founding":return["only_paid","none"];case"everyone":if(n)return["only_paid","everyone","none"];return["everyone","none"];default:return["none"]}}function nU(e,t,n,r){return null!=e&&nN(t,n,r).includes(e)}function nx(e,t,n,r){return nU(n.default_write_comment_permissions,e,t,r)?n.default_write_comment_permissions:nN(e,t,r)[0]}function nL(e,t,n){return"page"!==t&&("only_free"===n||!!e.default_post_publish_send_email)}function nM(e,t,n){return t&&"forever"===t.interval?0:Math.max(0,...[e.trial_end_override>Date.now()/1e3?e.trial_end_override:0,t&&"trial_period_days"in t&&t.trial_period_days&&Math.round((Date.now()+24*t.trial_period_days*36e5)/1e3),n&&n.trial_period_days&&Math.round((Date.now()+24*n.trial_period_days*36e5)/1e3)].filter(e=>e))}let nD=e=>eO[new Date(e).getMonth()];function nF(e){let{noBreakSpace:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t?"\xa0":" ",r=[];if(1==e.length&&e[0])r=[e[0]];else if(2==e.length&&e[0]&&e[1])r=[e[0],"".concat(n,"and").concat(n),e[1]];else if(e.length>=3)for(let t=0;tr.join(""),r}function nB(e){var t;let n=new Map;for(let t of e){let e=n.get(t);e=(e||0)+1,n.set(t,e)}return null==(t=Array.from(n).sort((e,t)=>t[1]-e[1])[0])?void 0:t[0]}function nO(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iString:n}=I18N.i(t);return n("thread"===e.type?"View thread":"podcast"===e.type?"Listen":"Read")}function nY(e){let{isFinalWord:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"podcast"===e?"listening".concat(t?"":" to"):"video"===e?"watching":"reading"}function nW(e){return"newsletter"===e?"post":"podcast"===e?"episode":"adhoc_email"===e?"email":"video"===e?"video":e}function nq(e){return"".concat(tr(e.title||"Untitled post",115))}function nH(e){return 10475===e.publication_id&&18994===e.section_id}function nG(e){let{isDraft:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e?((t?e.draftBylines:e.publishedBylines)||[]).filter(e=>e.name):[]}function n$(e,t){let{isDraft:n=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=nG(t,{isDraft:n});return r.length>0?tJ(r.map(e=>e.name).filter(e=>null!==e)):null}function nV(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(String(e))}function nj(e){return"string"==typeof e?p()(e)||0:"number"==typeof e?e:0}function nJ(e){let t=e=>new RegExp("^.*".concat(e));if(e){if(e.includes(m.T.CHECKOUT_URL))return e.replace(t(m.T.CHECKOUT_URL),"/subscribe?");else if(e.includes(m.T.FOUNDING_CHECKOUT_URL))return e.replace(t(m.T.FOUNDING_CHECKOUT_URL),"/subscribe?plan=founding&");else if(e.includes(m.T.REFERRAL_URL))return e.replace(t(m.T.REFERRAL_URL),"/?showWelcome=true");else if(e.includes(m.T.UNSUBSCRIBE_URL))return e.replace(t(m.T.UNSUBSCRIBE_URL),"/account?");else if(e.includes(m.T.ONE_CLICK_UNSUBSCRIBE_URL))return e.replace(t(m.T.ONE_CLICK_UNSUBSCRIBE_URL),"/account?");else if(/^.*%%.*%%/.test(e))return null}return e}function nK(e){let t=nJ(e);if(t){let e=window.open(t,"_blank");(null==e?void 0:e.focus)&&e.focus()}}function nz(e){var t;return!e||["publish","account"].includes(null!=(t=(document.location&&document.location.pathname||"").split("/")[1])?t:"")}function nX(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;if(0===e)return"0 Bytes";let n=Math.floor(Math.log(e)/Math.log(1024));return"".concat(parseFloat((e/Math.pow(1024,n)).toFixed(t<0?0:t))," ").concat(D[n])}function nZ(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!e)return 0;let[t,n]=e.split(" "),r=D.indexOf(n);return r<0?0:Number(t)*Math.pow(1024,r)}function nQ(e){return/Googlebot/i.test(e||"")?"Google":/bingbot/i.test(e||"")||/BingPreview/i.test(e||"")?"Bing":/Slurp/i.test(e||"")?"Yahoo":/DuckDuckBot/i.test(e||"")?"DDG":!!/Baiduspider/i.test(e||"")&&"Baidu"}function n0(e,t,n,r){return e.name?e.name:(n&&n.author_id===r.id||t&&t.publishedBylines&&t.publishedBylines.find(e=>e.id===r.id))&&e.email||"Someone"}function n1(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en",{iTemplate:r}=I18N.i(n);return e&&e.description||t.hero_text||r(N(),t.name)}let n2=[{pubs:["thebulwark"],subscription:"membership",donateItem:"membership",subscriber:"member",subscribe:"join",subscribeTo:"join",upgrade:"join",upgradeTo:"join",upgradeToPaid:"join",upgradeSubscriptionTo:"upgrade your membership to"},{pubs:["georgesaunders"],donateItem:"scholarship"},{pubs:["thecoddlingmovie"],subscribe:new Date>new Date("2024-02-22T08:00:00Z")?"watch the film":"pre-order the film"}],n6={subscription:"subscription",donateItem:"subscription",subscriber:"subscriber",subscribe:"subscribe",subscribeTo:"subscribe to",upgrade:"upgrade",upgradeTo:"upgrade to",upgradeToPaid:"upgrade to paid",upgradeSubscriptionTo:"upgrade your subscription to"},n8=n2.flatMap(e=>e.pubs);function n4(e,t,n){let r=n2.find(t=>t.pubs.includes(null==e?void 0:e.subdomain))||null,o=r?(0,i._)({},n6,r):null;return o?n(o):t()}function n3(e,t){let n=e?n2.find(t=>t.pubs.includes(e.subdomain)):void 0,r=n&&n[t];if(!r&&!(r=n6[t]))throw Error("".concat(t," is not a valid subscription word"));return r}function n5(e){let t={0:8304,1:185,2:178,3:179,4:8308,5:8309,6:8310,7:8311,8:8312,9:8313};return String.fromCodePoint(...Array.from("".concat(e)).map(e=>t[e]))}let n9=e=>{var t,n,r;return null==e||null==(r=e.plans)||null==(n=r.find(e=>{var t;return null==(t=e.metadata)?void 0:t.founding}))||null==(t=n.metadata)?void 0:t.short_description},n7=e=>"https://".concat("","checkout.opennode.com/").concat(e);function re(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=0===e?0:Math.floor(Math.log(e)/Math.log(1024));return"".concat(+(e/Math.pow(1024,t)).toPrecision(3)).concat(["B","KB","MB","GB","TB"][t])}function rt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en";if(!e)return null;let{iString:n}=I18N.i(t),r=n("Substack Network"),i=n("Substack App"),o=n("Substack Live Video");if(ra(e))return i;let a={"blog.substack.com":r,"library.substack.com":r,"substack-network":r,"on.substack.com":r,"open.substack.com":i,"post-end-cta":"Post Footer CTA","stories.substack.com":r,"substack-activity-items":i,"substack-app":i,"substack-boost":r,"substack-categories-discovery":i,"substack-categories-discovery-search":i,"substack-chat":i,"substack-comment-links":r,"substack-country-leaderboards":i,"substack-cross-posts":r,"substack-facepiles":r,"substack-feed-item":i,"substack-follow-recommendations":i,"substack-guest-post-bio":r,"substack-homepage-recommendations":r,"substack-ios-in-app-purchase":"Substack iOS In-App Purchase","substack-leaderboards":i,"substack-live-stream":o,"substack-media-player":i,"substack-mentions":r,"substack-notes":i,"substack-onboarding-discovery":i,"substack-paid-gift":i,"substack-post-embeds":r,"substack-post-reply-comment":r,"substack-presubscribe":i,"substack-publication-embeds":r,"substack-reader-discovery":i,"substack-reader-profile-discovery":i,"substack-reader-shared":"Reader sharing","substack-your-weekly-stack":n("Substack Network — Your Weekly Stack"),"substack-recommendation-email":r,"substack-recommendations-page":r,"substack-referral":r,"substack-signup-flow":r,"substack-subscriber-referral":r,"substack-twitter-link":i,"substack-twitter-suggest":i,"substack-xp-post-template":r,"substack-xp-read-next":r,"substack.com":i,"t.co":"Twitter","www.substack.com":i,external:n("external form / api"),"googleads.g.doubleclick.net":"Google","score-upsell":n("Boost upsell to engaged subscribers"),"substack-boost-subscribe-page-upsell":n("Boost upsell on another publication")}[e];return a||(/(\b|\.)facebook\./.test(e)?"Facebook":/(\b|\.)instagram\./.test(e)?"Instagram":/(\b|\.)linkedin\./.test(e)?"LinkedIn":/(\b|\.)youtube\./.test(e)?"YouTube":/(\b|\.)duckduckgo\./.test(e)?"DuckDuckGo":/(\b|\.)medium\./.test(e)?"Medium":/(\b|\.)reddit\./.test(e)?"Reddit":/(\b|\.)bing\./.test(e)?"Bing":/(\b|\.)google\./.test(e)?"Google":(null==e?void 0:e.includes("."))?e:t0(e.replace(/-/g," ")))}function rn(){return{"Substack Network":["blog.substack.com","library.substack.com","substack-network","on.substack.com","stories.substack.com","substack-boost","substack-comment-links","substack-cross-posts","substack-facepiles","substack-guest-post-bio","substack-homepage-recommendations","substack-mentions","substack-post-embeds","substack-post-reply-comment","substack-publication-embeds","substack-recommendation-email","substack-recommendations-page","substack-referral","substack-signup-flow","substack-subscriber-referral","substack-xp-post-template","substack-xp-read-next","substack-your-weekly-stack"],"Substack App":["open.substack.com","substack-activity-items","substack-app","substack-categories-discovery","substack-categories-discovery-search","substack-chat","substack-country-leaderboards","substack-feed-item","substack-follow-recommendations","substack-leaderboards","substack-media-player","substack-notes","substack-onboarding-discovery","substack-paid-gift","substack-presubscribe","substack-reader-discovery","substack-reader-profile-discovery","substack-twitter-link","substack-twitter-suggest","substack.com","www.substack.com"],Import:["import"],Direct:["direct"],"Substack Live Video":["substack-live-stream"],"Post Footer CTA":["post-end-cta"],"Substack iOS In-App Purchase":["substack-ios-in-app-purchase"],"Reader sharing":["substack-reader-shared"],Twitter:["t.co"],Google:["googleads.g.doubleclick.net"],"external form / api":["external"],"Boost upsell to engaged subscribers":["score-upsell"],"Boost upsell on another publication":["substack-boost-subscribe-page-upsell"]}}function rr(){return["Facebook","Instagram","LinkedIn","YouTube","DuckDuckGo","Medium","Reddit","Bing"]}function ri(){return[...Object.keys(rn()),...rr()]}function ro(e){return!!ra(e)||["substack-activity-items","substack-app","substack-categories-discovery","substack-categories-discovery-search","substack-chat","substack-country-leaderboards","substack-feed-item","substack-follow-recommendations","substack-ios-in-app-purchase","substack-leaderboards","substack-live-stream","substack-media-player","substack-notes","substack-onboarding-discovery","substack-paid-gift","substack-presubscribe","substack-reader-discovery","substack-reader-profile-discovery","substack-twitter-link","substack-twitter-suggest","substack.com"].includes(e)}function ra(e){return["substack-feed-item","notes_inline_suggestions","notes_sidebar_suggestions","feed-nux","feed-twitter-suggestions","notes_all_suggestions","note_permalink_upsell","notes_likes","note_inline_upsell","notes_restacks","notes_quote_attachment","notes_context","substack-notes","profile-page-notes","notes-inline-suggestions","subscribe_header_notes","notes-all-suggestions","notes-like-list","new-follower-email","media-player"].includes(e)}function rs(e){return!ro(e)&&/substack/i.test(e)}let rl=e=>/^\S+@\S+\.\S+$/.test(e),ru=e=>(e||"").replace(/\s+/g," "),rc={"-2":{short:"Deleted - Flagged as spam",long:"This publication is deleted and every page will show a flagged error"},"-1":{short:"Noindexed - In moderation queue",long:"This publication is temporarily not available to search engines because it is pending moderation, where it will be approved or deleted"},0:{short:"Noindexed - New Pub",long:'This publication is temporarily not available to search engines because the author needs to create a new post other than "coming-soon"'},1:{short:"Available",long:"This publication is available to search engines"},2:{short:"Available w/priority",long:"This publication is available to search engines and is given priority SEO treatment"}};function rd(e){return e?e<3456e3?"monthly":e<8121600?"quarterly":e<0xf53700?"semiannual":e<3456e4?"annual":e>3888e3?"lifetime":"other":"free"}function rp(e){return e&&("newspaper"===e.homepage_type||"magaziney"===e.homepage_type)}let rf=35;function rm(e){let t,n,{isStatic:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.width>=e.height*(960/540)?n=Math.round((t=r?550:960)*(e.height/e.width)):e.width>=e.height?n=Math.round((t=r?550:728)*(e.height/e.width)):t=n=r?550:728,{height:n,width:t}}function rh(e){let t=n(16291).A,r=t(e);return t.utc([r.year(),r.month(),r.date(),8,0,0]).toDate()}function rg(){let{now:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=n(16291).A,r=e?t(e):t(),i=r.utc().startOf("day").add(5,"hour");return i.isBefore(r)&&(i=i.utc().add(1,"day")),i}function r_(e){let t=Math.round(e/60),n=Math.floor(t/60);return"".concat(n?"".concat(n,"HR "):"").concat(t%60,"M")}function rb(e){let t=Math.round(e/60),n=Math.floor(t/60),r=t%60;return n?"".concat(n,"h ").concat(r,"m"):r?"".concat(r,"m"):"".concat(Math.round(e),"s")}function rv(e){let t=e.toLowerCase()[0];return["a","e","i","o","u"].includes(null!=t?t:"")}function ry(e){return"".concat(e.toLowerCase().startsWith("uni watch")?"a":rv(e)?"an":"a"," ").concat(e)}function rw(e){return e.split("").reduce((e,t)=>(e<<5)-e+t.charCodeAt(0)|0,0)}function rS(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iContext:n}=I18N.i(t),r=n("thousandsAbbreviation","K");return Math.abs(e)>9999?"".concat(Math.sign(e)*(Math.abs(e)/1e3).toFixed(1)).concat(r):(Math.sign(e)*Math.abs(e)).toString()}function rE(e){var t,n,r,i,o;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",{iString:s}=I18N.i(a);return s((null==(t=e.metadata)?void 0:t.short_description_english)==="Stammleser"||(null==(n=e.metadata)?void 0:n.short_description_english)==="Gr\xfcndungsmitglied"?"Founding Member":(null==(r=e.metadata)?void 0:r.short_description_english)?null==(i=e.metadata)?void 0:i.short_description_english:(null==(o=e.metadata)?void 0:o.short_description)?e.metadata.short_description:"year"===e.interval?"Annual":"forever"===e.interval?"Founding Membership":"month"===e.interval&&3===e.interval_count?"Quarterly":"month"===e.interval&&6===e.interval_count?"Semiannually":"day"===e.interval?"Daily":"week"===e.interval?"Weekly":"Monthly")}let rT=function(){let{minLength:e,maxLength:t,minAlphaNumeric:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return r=>{if(!r)return"Missing input";if(e&&r.lengtht)return"Must be at most ".concat(t," characters long");let i=RegExp("\\P{P}|`","gu"),o=r.match(i);if(!o||(null==o?void 0:o.length)<(null!=n?n:e))return"Must contain at least ".concat(null!=n?n:e," non-punctuation characters");let a=["`"],s=0;return(o.forEach(e=>{a.includes(e)&&(s+=1)}),o.length-s<(null!=n?n:e))?"Must contain at least ".concat(null!=n?n:e," non-punctuation characters"):null}};function rk(e,t){let n=S.env[e];if(void 0!==n)return n;if(void 0!==t)return t;throw Error("Missing required env var ".concat(e))}function rP(e){return new Promise((t,n)=>{let r=[];e.on("data",e=>r.push(e)),e.once("end",()=>t(E.concat(r))),e.once("error",n)})}function rI(e){let{maxWidth:t=55,maxLines:n=2,charWidth:r=1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=[],o="",a=0;for(let s of e.split(" ")){let e=s.length*r;if(a+e<=t)o?(o+=" ".concat(s),a+=e+r):(o=s,a=e);else if(i.push(o),o=s,a=e,i.length===n)break}if(i.length===n&&o){let e=t-a;e>=3?o+="...":o="".concat(o.substring(0,o.length-(3-e)),"..."),i[n-1]=o}else o&&i.push(o);return i}function rA(){return"undefined"!=typeof window&&("ontouchstart"in window||navigator.maxTouchPoints>0)}function rR(e){return(null==e?void 0:e.id)&&e.id.toString(36)||null}function rC(e){if(!e)return null;let t=parseInt(e,36);return ef(t)?t:null}function rN(e,t){return"string"!=typeof e?t[0]:t.includes(e)?e:t[0]}function rU(e){var t,n,r;let i=Array(null==(t=e[0])?void 0:t.length).fill(0);for(let t=0;tString.fromCodePoint(e.toUpperCase().codePointAt()+127397)).join("")}let rL=[{label:"Generic",value:"generic",url:"https://substack.com/content",message:void 0},{label:"Copyright Infringement",value:"copyright_infringement",url:"https://substack.com/dispute",message:"Warning: We have detected potential copyrighted content in your stream. Please remove any unauthorized content immediately to avoid additional enforcement actions from being taken against this stream or your account."},{label:"Explicit Content",value:"explicit_content",url:"https://substack.com/content",message:"Warning: We have detected a potential violation of Substack's Nudity/Porn/Erotica policy. As a reminder, Substack does not allow visual depictions of sexual acts. Please remove any violating content to avoid additional enforcement actions from being taken against this stream or your account."},{label:"Harmful and Illegal Activities",value:"harmful_and_illegal_activities",url:"https://substack.com/content",message:"We have detected a potential violation of Substack's Harmful & Illegal Activities policy. As a reminder, Substack does not allow content that promotes harmful or illegal activities, including material that advocates, threatens, or shows your causing harm to yourself, other people, or animals. Please remove any violating content to avoid additional enforcement actions from being taken against this stream or your account."}],rM=["US","GB","CA","FR","DE","ES","IT","NL","PL","GR","BE","IE","PT"];function rD(e,t,n){var r,i;if(!(0,h.C3)({pub:e}))return;let o=null;if("section"in t&&t.section?o=t.section:t.section_id&&(o=null==(r=e.sections)?void 0:r.find(e=>e.id===t.section_id)),!o&&t.draft_section_id&&n&&(o=null==(i=e.sections)?void 0:i.find(e=>e.id===t.draft_section_id)),!(!o||(0,h.Tu)({post:t,pub:e})||o.name.includes("Pirate Wires")))return"".concat(o.name," // ").concat(t.title||t.draft_title)}function rF(e){var t,n,r;return{sessionStarted:null!=(t=e.sessionStarted)?t:e.sessionStart,landingReferrer:null!=(n=e.landingReferrer)?n:e.originalReferrer,landingUrl:null!=(r=e.landingUrl)?r:e.landingPage,landingSurface:e.landingSurface,landingSurfaceId:e.landingSurfaceId,landingPublicationId:e.landingPublicationId}}function rB(e){var t;let n,r=+new Date,i=null!=(t=e.session_started_at)?t:e.sessionStarted;null!=i&&"number"==typeof i&&(n=new Date(i<2e4?r-1e3*i:i));let o=e.landingPublicationId;null==o&&null!=e.deepLink&&(o=(0,b.qc)(e.deepLink).publicationID);let a=e.landingSurfaceId,s=e.landingSurface;if(null==a&&null==s&&null!=e.deepLink){let t=(0,b.qc)(e.deepLink);s=t.surface,a=t.surfaceID}return{session_started_at:n,deep_link:e.deepLink,referrer:e.referrer,landing_referrer:e.landingReferrer,landing_url:e.landingUrl,landing_surface:s,landing_surface_id:String(a),landing_publication_id:o}}},69706:function(e,t,n){"use strict";n.d(t,{B7:()=>o,UH:()=>u,VE:()=>s,Zi:()=>r,d8:()=>a,fo:()=>i,qr:()=>l});let r=1,i=1.5,o=16/9,a=1.91,s=3,l=1.91,u={square:1,editorial:1.5,thumb:1.91,landscape:16/9,portrait:9/16,instagram:.8,social:1.91,cover:3}}}]);