"use strict";(self.webpackChunksubstack=self.webpackChunksubstack||[]).push([["7057"],{57391:function(e,t,n){n.d(t,{Vt:()=>k,f9:()=>b,gn:()=>v,jc:()=>x,kx:()=>w,ng:()=>h});var i,r=n(7409),o=n(99282),a=n(16584),l=n(6400),s=n(98661),u=n(30396),d=n(78718),c=n.n(d),m=n(35702),p=n(48980),_=n(8589);let f={variantOverrides:{},experimentFeatures:{},experimentExposures:{}};function v(){return"undefined"!=typeof window&&(0,r._)({variantOverrides:{},experimentFeatures:{},experimentExposures:{}},c()(window._preloads,["variantOverrides","experimentFeatures","experimentExposures","pubIdOverride"]))||f}let g=v(),y="undefined"!=typeof window?null===(i=window._preloads)||void 0===i?void 0:i.siteConfigs:{},h=(e,t)=>{let n=t=>{if(!t||!e)return null;let n=e[t];return void 0===n?null:n},i=e=>{if(!e)return null;let i=n(e);if((0,_.Dh)(i))return{intendedVariant:i,shouldLog:!1};if(t.variantOverrides&&e in t.variantOverrides)return{intendedVariant:t.variantOverrides[e],shouldLog:!1};let r=t.experimentExposures||{};if(r[e])return{intendedVariant:r[e],shouldLog:!1};let o=t.experimentFeatures||{};return o[e]?{intendedVariant:o[e],shouldLog:!0}:null},r=async(e,t,n)=>{if("undefined"!=typeof window){window._preloads.experimentExposures=window._preloads.experimentExposures||{};let i=window._preloads.experimentExposures;i[e]=t;try{await (0,p.rd)("/api/v1/experiment_exposure",{json:{experiment_name:e,variant_name:t,ignore_downsampling:!!n},method:"post"})}catch(t){delete i[e]}}};return{getExperimentVariant:e=>{let t=i(e);return t?t.intendedVariant:null},exposeExperiment:async function(e){let{ignoreDownsampling:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{intendedVariant:n,shouldLog:o}=i(e)||{};return!!o&&(await r(e,n,!!t),!0)},getExposedVariant:e=>{if(!e)return null;let i=n(e);if((0,_.Dh)(i))return i;if(t.variantOverrides&&e in t.variantOverrides)return t.variantOverrides[e];let r=t.experimentExposures||{};return r[e]?r[e]:null},refreshExperimentVariants:async function(){let e,{ignoreDownsampling:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t&&(e=new URLSearchParams({ignore_downsampling:"true"}));let n=await (0,p.rd)("/api/v1/experiment_features",{method:"get",query:e});(null==n?void 0:n.features)&&(0,m.a)({experimentFeatures:n.features})}}},w=(0,l.createContext)(h(y,g));function k(e){let{siteConfigs:t={},experimentInfo:n,children:i}=e,r=n||g,o=(0,u.Ye)(()=>h(t,r),[t,...Object.values(r)]);return(0,a.tZ)(w.Provider,{value:o,children:i})}function x(){return(0,u.qp)(w)}w.displayName="ExperimentsContext";let b=e=>{let t=(0,s.forwardRef)((t,n)=>{let i=x();return(0,a.tZ)(e,(0,o._)((0,r._)({},i,t),{ref:n}))});return t.displayName="withExperimentsContext(".concat(e.displayName||e.name||"Anonymous",")"),t}},37168:function(e,t,n){n.d(t,{WH:()=>v,ZN:()=>g,hO:()=>y});var i,r,o=n(7409),a=n(99282),l=n(16584),s=n(6400),u=n(98661),d=n(30396),c=n(57391),m=n(40647);let p=(0,c.gn)(),_="undefined"!=typeof window&&null!==(r=null===(i=window._preloads)||void 0===i?void 0:i.siteConfigs)&&void 0!==r?r:{},f=(e,t)=>(0,o._)({},(0,c.ng)(e,t),(0,m.Xz)(e)),v=(0,s.createContext)(f(_,p));function g(e){let{siteConfigs:t={},experimentInfo:n,children:i}=e,r=n||p,o=(0,d.Ye)(()=>f(t,r),[t,r]);return(0,l.tZ)(v.Provider,{value:o,children:i})}v.displayName="ExperimentsAndSiteConfigContext";let y=e=>{let t=(0,u.forwardRef)((t,n)=>{let i=(0,d.qp)(v);return(0,l.tZ)(e,(0,a._)((0,o._)({},i,t),{ref:n}))});return t.displayName="withExperimentsAndSiteConfigContext(".concat(e.displayName||e.name||"Anonymous",")"),t}},56629:function(e,t,n){n.d(t,{Iz:()=>v,So:()=>g,us:()=>f,vz:()=>_});var i,r,o=n(7409),a=n(99282),l=n(16584),s=n(6400),u=n(98661),d=n(30396),c=n(48980);let m="undefined"!=typeof window&&null!==(r=null===(i=window._preloads)||void 0===i?void 0:i.publicationSettings)&&void 0!==r?r:{};function p(e){return t=>{if(!t||!e)return null;let n=e[t];return void 0===n?null:n}}let _=(0,s.createContext)({getSettingFor:p(m),changeSetting:()=>Promise.resolve(void 0),preloadedPubSettings:m});_.displayName="PublicationSettingsContext";let f=e=>{let t=(0,u.forwardRef)((t,n)=>{let i=g();return(0,l.tZ)(e,(0,a._)((0,o._)({},i,t),{ref:n}))});return t.displayName="withPubSettingsContext(".concat(e.displayName||e.name||"Anonymous",")"),t};function v(e){let{settings:t={},children:n}=e,[i,r]=(0,d.eJ)(t),a=async e=>{r((0,o._)({},i,e));try{await (0,c.rd)("/api/v1/publication_settings",{method:"PUT",json:e})}catch(e){console.error(e)}},s=(0,d.Ye)(()=>({getSettingFor:p(i),changeSetting:a,preloadedPubSettings:i}),[i]);return(0,l.tZ)(_.Provider,{value:s,children:n})}function g(){return(0,d.qp)(_)}},40647:function(e,t,n){n.d(t,{QA:()=>p,Xz:()=>m,vC:()=>_,xR:()=>v,xY:()=>f});var i,r,o=n(7409),a=n(99282),l=n(16584),s=n(6400),u=n(98661),d=n(30396);let c="undefined"!=typeof window&&null!==(r=null===(i=window._preloads)||void 0===i?void 0:i.siteConfigs)&&void 0!==r?r:{},m=e=>({allConfigs:e,getConfigFor:t=>{if(!t||!e)return null;let n=e[t];return void 0===n?null:n}}),p=(0,s.createContext)(m(c));function _(e){let{siteConfigs:t={},children:n}=e,i=(0,d.Ye)(()=>m(t),[t]);return(0,l.tZ)(p.Provider,{value:i,children:n})}p.displayName="SiteConfigsContext";let f=e=>{let t=(0,u.forwardRef)((t,n)=>{let i=v();return(0,l.tZ)(e,(0,a._)((0,o._)({},i,t),{ref:n}))});return t.displayName="withSiteConfigContext(".concat(e.displayName||e.name||"Anonymous",")"),t};function v(){return(0,d.qp)(p)}},60807:function(e,t,n){n.d(t,{Fl:()=>g,SE:()=>y,St:()=>_,aF:()=>v,dr:()=>f});var i,r,o,a,l=n(7409),s=n(99282),u=n(16584),d=n(98661),c=n(48980);let m="undefined"!=typeof window&&null!==(o=null===(i=window._preloads)||void 0===i?void 0:i.user)&&void 0!==o?o:null,p="undefined"!=typeof window&&null!==(a=null===(r=window._preloads)||void 0===r?void 0:r.userSettings)&&void 0!==a?a:{},_=(0,d.createContext)({user:m,setUser:()=>void 0,userSettings:p,changeSetting:()=>void 0});function f(e){let{defaultValue:t,userSettings:n,children:i}=e,[r,o]=(0,d.useState)(t||m),[a,f]=(0,d.useState)(null!=n?n:p),v=async(e,t,n,i)=>{if(!r&&!(null==i?void 0:i.token))return;let o=a[e];f((0,s._)((0,l._)({},a),{[e]:t}));try{await (0,c.rd)("/api/v1/user-setting",{method:"PUT",json:{type:e,value_bool:"bool"!==n&&(n||"boolean"!=typeof t)?void 0:t,value_datetime:"datetime"!==n&&(n||"string"!=typeof t)?void 0:t,value_text:"text"===n?t:void 0,token:null==i?void 0:i.token}})}catch(t){if(t instanceof c.kp)alert(t.getMessage()),f(t=>(0,s._)((0,l._)({},t),{[e]:o}));else throw t}},g=(0,d.useMemo)(()=>({user:r,setUser:o,userSettings:a,changeSetting:v}),[r,a]);return(0,u.tZ)(_.Provider,{value:g,children:i})}function v(){return(0,d.useContext)(_).user}function g(){return(0,d.useContext)(_).userSettings}function y(){return(0,d.useContext)(_)}_.displayName="UserContext"},35500:function(e,t,n){n.d(t,{bq:()=>a,dD:()=>o}),n(16584),n(43924),n(63651),n(84864);var i,r,o=((i={}).ARR10K="arr10k",i.ARR1K="arr1k",i),a=((r={}).List1K="list1k",r.List100="list100",r)},48884:function(e,t,n){let i;n.d(t,{G3:()=>y,TO:()=>p,mb:()=>h,u8:()=>g});var r=n(84864);let o=n(41595),a=(i=o&&o.hasOwnProperty("default")?o.default:o)();a.setLocale("de");let l=i();l.setLocale("fr");let s=i();s.setLocale("es");let u=i();u.setLocale("pt");let d=i();d.setLocale("pt");let c=i();c.setLocale("it");let m=i();i().setLocale("en");let p=["de","es","fr","pt","pt-br","it"],_={"/":"/home-i","/going-paid":"/going-paid-i","/about":"/about-i"};[...new Set([...Object.keys(_),...Object.values(_),"/signup","/get-started"])];let f=e=>({de:a,es:s,fr:l,pt:u,"pt-br":d,it:c})[e]||m,v=e=>(Array.isArray(e)?(e[0]||"")+e.slice(1).map((e,t)=>"%".concat(t+1).concat(e)).join(""):e).toString(),g=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{};switch(null==n?void 0:n.language){case"de":e="de";break;case"es":e="es";break;case"fr":e="fr";break;case"pt":e="pt";break;case"pt-br":e="pt-br";break;case"it":e="it";break;default:e="en"}return i?e:(null==t?void 0:t.language)||e||"en"},h={i:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en",t=f("string"==typeof e?e:e?y({pub:e.pub}):"en"),n=e=>e.replace(/%%([A-Za-z_]+)%($|\w){1}/g,"%%$1%% ");return{iString:function(e){for(var i=arguments.length,r=Array(i>1?i-1:0),o=1;o3?o-3:0),l=3;l2?r-2:0),a=2;a1?i-1:0),o=1;o4?a-4:0),s=4;se}},p:e=>[e,null],l:(e,t)=>{let n=f(e),i=JSON.parse(JSON.stringify(t));n.loadJSON(i,"messages")},n:()=>{let e={},t={};return r.CORE_SUPPORTED_LANGUAGES.forEach(e=>{t[e]=h.i(e)}),e.iStringN=function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o{a[n]=t[n].iString(e,...i)}),a},e.iTemplateN=function(e){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o{a[n]=t[n].iTemplate(e,...i)}),a},e.iPluralN=function(e,n,i){for(var o=arguments.length,a=Array(o>3?o-3:0),l=3;l{s[r]=t[r].iPlural(e,n,i,...a)}),s},e}};"undefined"!=typeof window?window.I18N=h:n.g.I18N=h},12444:function(e,t,n){n.d(t,{O:()=>i});let i={community_comment_like:"community_comment_like",community_post_like:"community_post_like",community_post_reply:"community_post_reply",community_comment_quote_reply:"community_comment_quote_reply",community_comment_reply:"community_comment_reply",community_comment_mention:"community_comment_mention",comment_like:"comment_like",comment_reply:"comment_reply",free_subscription:"free_subscription",post_like:"post_like",post_reply:"post_reply",post_mention:"post_mention",restack:"restack",restack_quote:"restack_quote",follow:"follow",presubscribe:"presubscribe",user_first_note:"user_first_note",comment_mention:"comment_mention",comment_pub_mention:"comment_pub_mention",new_profile:"new_profile",new_note:"new_note",note_like:"note_like",note_reply:"note_reply",naked_restack_reaction:"naked_restack_reaction",comment_arr:"comment_arr",referred_free_subscription:"referred_free_subscription",arr_1k_milestone:"arr_1k_milestone",arr_10k_milestone:"arr_10k_milestone",list_100_milestone:"list_100_milestone",list_1k_milestone:"list_1k_milestone",viral_post:"viral_post",paid_subscription:"paid_subscription",pledged_subscription:"pledged_subscription",share_handle:"share_handle",paywall_unlock:"paywall_unlock",publication_recommendation:"publication_recommendation",live_stream:"live_stream",live_stream_invite:"live_stream_invite",live_stream_scheduled:"live_stream_scheduled",live_stream_scheduled_invite:"live_stream_scheduled_invite",live_stream_host_reminder:"live_stream_host_reminder",mentioning_comment_like:"mentioning_comment_like",mentioning_comment_reply:"mentioning_comment_reply",mentioning_comment_restack:"mentioning_comment_restack",post_shareable_assets_ready:"post_shareable_assets_ready",viral_gift_granted:"viral_gift_granted",leaderboard_update:"leaderboard_update"}},42886:function(e,t,n){n.d(t,{D2:()=>l,QP:()=>o,qX:()=>a});var i,r,o=((i={}).ForYou="for-you",i.ForYouExperimental="for-you-experimental",i.ForYouRanking="for-you-ranking",i.Subscribed="subscribed",i.Media="media",i.Writers="writers-v2",i.FeaturedContentPreview="featured-content-preview",i.TopLikeLastWeek="top-like-last-week",i.TopLikeLastDay="top-like-last-day",i.TopImpressionLastWeek="top-impression-last-week",i.TopImpressionLastDay="top-impression-last-day",i.TestQuotes="test-quotes",i.Activity="activity",i.MediaNotes="media-notes",i.SearchNotes="search-notes",i.SeachNotesLatest="search-notes-latest",i.SearchNotesTop="search-notes-top",i.SearchTop="search-top",i.DemoFeed="demo-feed",i.DemoFeedCustom="demo-feed-custom",i.Tiktokers="featured-tiktokers",i.Video="video",i.WelcomeVideo="welcome-videos",i.NewBestsellers="bestseller",i.MediaLongform="media-longform",i),a=((r={}).Base="base",r.Secondary="secondary",r.Topic="topic",r.Category="category",r);function l(e,t){var n,i;return"post"===e.type&&!!e.mediaClip||"comment"===e.type&&!!(null===(n=e.comment.attachments)||void 0===n?void 0:n.some(e=>"post"===e.type&&e.mediaClip))||(t&&"attachments"in t?!!(null===(i=t.attachments)||void 0===i?void 0:i.some(e=>"post"===e.type&&e.mediaClip)):!!(t&&"mediaClip"in t&&t.mediaClip))}},20591:function(){},60836:function(e,t,n){n.d(t,{AN:()=>p,Mo:()=>u,Tg:()=>s,_N:()=>_,aE:()=>v,jn:()=>c,mG:()=>f,rN:()=>g,tk:()=>d,uR:()=>l,ws:()=>m});var i=n(7409),r=n(14773),o=n(33884),a=n(26111);function l(e,t){let{noBase:n,edit:a,email:l,comments:s,commentId:d,commentInput:c,highlightComment:m,replyToComment:f,commentContextId:v,uuid:g,urlParams:y,signedIn:h=!1,feedViewer:w=!1,clipId:k}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},x=t?g?t.uuid:t.slug:null;if((a||!x)&&e&&!e.is_www&&(null==t?void 0:t.id)){let i=n?"":(0,r.SV)(e);return"".concat(i).concat(p(e,t.id,{params:y}))}if((null==t?void 0:t.type)==="restack"&&(null==t?void 0:t.id)){let i=n?"":(0,r.SV)(e);return"".concat(i,"/cp/").concat(t.id)}if(w||!e||!t||!x){let i=n?"":(0,r.SV)();return d?(0,o.NZ)(d,{noBase:n,urlParams:y}):t&&k?(0,r.n1)("".concat((0,r.SV)(e),"/p/").concat(t.slug),y):t?(0,o.rc)(t.id,{noBase:n,urlParams:y}):(0,r.n1)("".concat(i).concat(o.Ds),y)}let b=_(h,e);return u(e,x,{noBase:n,email:l,comments:s,commentId:d,commentInput:c,highlightComment:m,replyToComment:f,commentContextId:v,urlParams:(0,i._)({lli:b},y)})}function s(e,t,n){let{isPreview:i=!1}=n;return"".concat((0,r.SV)(e),"/embed/p/").concat(t,"?origin=").concat(window.location.origin).concat(i?"&isPreview=true":"")}function u(e,t){let{noBase:n,email:i,comments:o,commentId:a,commentInput:l,highlightComment:s,replyToComment:u,commentContextId:d,urlParams:c}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},m="";return n||(m+=(0,r.SV)(e)),m+="/p/".concat(t),o&&(!a||s)&&(m+="/comments"),!a||s||d||(m+="/comment/".concat(a)),i&&(m+="/email"),a&&(s||u)?m+="#comment-".concat(a).concat(u?"-reply":""):l&&(m+="#input"),a&&d&&(m+="/comment/".concat(d,"#comment-").concat(a)),c&&(m=(0,r.n1)(m,c)),m}function d(e,t,n,r){return e&&"profile"===e.homepage_type?(null==n?void 0:n.id)?(0,o.gt)("c-".concat(null==n?void 0:n.id)):(0,o.mx)(e,t):l(e,t,(0,i._)({comments:!0,commentId:null==n?void 0:n.id},r))}function c(e){let{mediaUploadId:t}=e;return"media-".concat(t)}function m(e){let{pub:t,post:n,mediaUploadId:i}=e,r=l(t,n);return"".concat(r,"#").concat(c({mediaUploadId:i}))}function p(e,t){let{params:n,addBase:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i?(0,r.SV)(e):"";return"".concat(o).concat((0,r.n1)("/publish/post/".concat(t),n))}function _(e,t){return t.custom_domain&&e?"1":void 0}function f(e){let{addBase:t,params:n={},signedIn:o,skipToken:l}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=_(o,e),u=t?(0,r.SV)(e):"";if(!(null==n?void 0:n.token)&&!l){var d;let e="undefined"!=typeof window&&(null===(d=window._preloads)||void 0===d?void 0:d.original_url)?(0,a.x)(window._preloads.original_url,"token"):null;n.token=e}return(0,r.n1)("".concat(u,"/account"),(0,i._)({lli:s},n))}function v(e,t,n,i){return t.post_id?d(null!=n?n:void 0,null!=e?e:void 0,t,i):(0,o.Sg)(t,i)}function g(e){let{postId:t,params:n}=e;return(0,r.n1)("".concat((0,r.ZX)(),"/post/").concat(t,"/stats"),(0,i._)({},n))}n(17043)},35934:function(e,t,n){n.d(t,{gz:()=>r});var i=n(27412);class r extends Error{constructor(e,t={},n=!1,r=null){let o,a;super(e),(0,i._)(this,"status",void 0),(0,i._)(this,"userVisible",void 0),(0,i._)(this,"messageHtml",void 0),(0,i._)(this,"response",void 0),(0,i._)(this,"type",void 0),(0,i._)(this,"metadata",void 0),this.name=this.constructor.name;let l=null,s=null,u=null;if("object"==typeof t){var d,c,m,p,_,f;o=null!==(d=t.status)&&void 0!==d?d:500,n=null!==(c=t.userVisible)&&void 0!==c&&c,r=null!==(m=t.messageHtml)&&void 0!==m?m:null,l=null!==(p=t.responseBody)&&void 0!==p?p:null,s=null!==(_=t.type)&&void 0!==_?_:null,u=null!==(f=t.metadata)&&void 0!==f?f:null}else o=t;this.status=o,this.userVisible=!!l||n,this.messageHtml=r,this.type=s,this.metadata=u,l?a=l:this.userVisible?r?a={errors:[{msg:e,msgHTML:r}],type:"list"}:(a={error:e,type:"single"},this.type&&(a.type=this.type),this.metadata&&(a.metadata=this.metadata)):a={error:""},this.response={body:a},Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}}}]);