/*! For license information please see 5601.115530e6.chunk.js.LICENSE.txt */ (self.webpackChunklite=self.webpackChunklite||[]).push([[5601],{2316:(e,n,t)=>{"use strict";t.d(n,{Y:()=>u});var i=t(87329),r=t(6177),a=t(38004),o=t(89748),l=t(75865),d={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PublisherHomepagePosts_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"useShowAuthorNewsletterV3Promo_user"}}]}}].concat((0,i.Z)(r.F.definitions))},u={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PublisherHomepagePosts_publisher"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Publisher"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"homepagePostsConnection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"paging"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"limit"},value:{kind:"Variable",name:{kind:"Name",value:"homepagePostsLimit"}}},{kind:"ObjectField",name:{kind:"Name",value:"from"},value:{kind:"Variable",name:{kind:"Name",value:"homepagePostsFrom"}}}]}},{kind:"Argument",name:{kind:"Name",value:"includeDistributedResponses"},value:{kind:"Variable",name:{kind:"Name",value:"includeDistributedResponses"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"posts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"StreamPostPreview_post"}},{kind:"Field",name:{kind:"Name",value:"pinnedByCreatorAt"}},{kind:"Field",name:{kind:"Name",value:"pinnedAt"}}]}},{kind:"Field",name:{kind:"Name",value:"pagingInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"next"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"from"}},{kind:"Field",name:{kind:"Name",value:"limit"}}]}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"CardByline_publisher"}},{kind:"FragmentSpread",name:{kind:"Name",value:"NewsletterV3Promo_publisher"}},{kind:"FragmentSpread",name:{kind:"Name",value:"PublisherHomepagePosts_user"}}]}}].concat((0,i.Z)(a.w.definitions),(0,i.Z)(o.Gk.definitions),(0,i.Z)(l.Rf.definitions),(0,i.Z)(d.definitions))}},94931:(e,n,t)=>{"use strict";t.d(n,{I:()=>O});var i=t(90484),r=t(96156),a=t(92137),o=t(67294),l=t(29969),d=t(1951),u=t(6443),c=t(61095),s=t(14813),m=t(77355),v=t(96370),p=t(18627),f=t(66411),k=t(32947),h=t(93310),g=t(43487),y=t(50458),w=t(42498),N=function(e){var n=e.viewerIsPublisher,t=e.authorName,i=e.viewerBlockedAuthor,r=(0,g.v9)((function(e){return e.config.authDomain}));return n?o.createElement(o.Fragment,null,"Have something to share?"," ",o.createElement(k.l,{type:"link",href:(0,y.Zp)(r),inline:!0,linkStyle:"OBVIOUS"},"Write your first story.")):i?o.createElement(o.Fragment,null,(0,w.Sb)(t)," stories are not available because you have blocked them."," ",o.createElement(h.r,{href:y.kx,inline:!0,linkStyle:"OBVIOUS",target:"_blank"},"Learn more")):o.createElement(o.Fragment,null,t," hasn't written any stories yet.")},S=t(87691),E=function(e){var n=e.viewerIsPublisher,t=e.authorName,i=e.viewerBlockedAuthor;return o.createElement(m.x,{marginLeft:"auto",marginRight:"auto",paddingTop:"80px",textAlign:"center"},o.createElement(S.F,{scale:"L"},o.createElement(N,{viewerIsPublisher:n,authorName:t,viewerBlockedAuthor:i})))},b=t(52521);function F(){F=function(){return n};var e,n={},t=Object.prototype,r=t.hasOwnProperty,a=Object.defineProperty||function(e,n,t){e[n]=t.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",d=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,n,t){return Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[n]}try{c({},"")}catch(e){c=function(e,n,t){return e[n]=t}}function s(e,n,t,i){var r=n&&n.prototype instanceof g?n:g,o=Object.create(r.prototype),l=new V(i||[]);return a(o,"_invoke",{value:O(e,t,l)}),o}function m(e,n,t){try{return{type:"normal",arg:e.call(n,t)}}catch(e){return{type:"throw",arg:e}}}n.wrap=s;var v="suspendedStart",p="suspendedYield",f="executing",k="completed",h={};function g(){}function y(){}function w(){}var N={};c(N,l,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(C([])));E&&E!==t&&r.call(E,l)&&(N=E);var b=w.prototype=g.prototype=Object.create(N);function x(e){["next","throw","return"].forEach((function(n){c(e,n,(function(e){return this._invoke(n,e)}))}))}function _(e,n){function t(a,o,l,d){var u=m(e[a],e,o);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"==(0,i.Z)(s)&&r.call(s,"__await")?n.resolve(s.__await).then((function(e){t("next",e,l,d)}),(function(e){t("throw",e,l,d)})):n.resolve(s).then((function(e){c.value=e,l(c)}),(function(e){return t("throw",e,l,d)}))}d(u.arg)}var o;a(this,"_invoke",{value:function(e,i){function r(){return new n((function(n,r){t(e,i,n,r)}))}return o=o?o.then(r,r):r()}})}function O(n,t,i){var r=v;return function(a,o){if(r===f)throw new Error("Generator is already running");if(r===k){if("throw"===a)throw o;return{value:e,done:!0}}for(i.method=a,i.arg=o;;){var l=i.delegate;if(l){var d=P(l,i);if(d){if(d===h)continue;return d}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===v)throw r=k,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=f;var u=m(n,t,i);if("normal"===u.type){if(r=i.done?k:p,u.arg===h)continue;return{value:u.arg,done:i.done}}"throw"===u.type&&(r=k,i.method="throw",i.arg=u.arg)}}}function P(n,t){var i=t.method,r=n.iterator[i];if(r===e)return t.delegate=null,"throw"===i&&n.iterator.return&&(t.method="return",t.arg=e,P(n,t),"throw"===t.method)||"return"!==i&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+i+"' method")),h;var a=m(r,n.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,h;var o=a.arg;return o?o.done?(t[n.resultName]=o.value,t.next=n.nextLoc,"return"!==t.method&&(t.method="next",t.arg=e),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function T(e){var n={tryLoc:e[0]};1 in e&&(n.catchLoc=e[1]),2 in e&&(n.finallyLoc=e[2],n.afterLoc=e[3]),this.tryEntries.push(n)}function L(e){var n=e.completion||{};n.type="normal",delete n.arg,e.completion=n}function V(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function C(n){if(n||""===n){var t=n[l];if(t)return t.call(n);if("function"==typeof n.next)return n;if(!isNaN(n.length)){var a=-1,o=function t(){for(;++a=0;--a){var o=this.tryEntries[a],l=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var d=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(d&&u){if(this.prev=0;--t){var i=this.tryEntries[t];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--n){var t=this.tryEntries[n];if(t.finallyLoc===e)return this.complete(t.completion,t.afterLoc),L(t),h}},catch:function(e){for(var n=this.tryEntries.length-1;n>=0;--n){var t=this.tryEntries[n];if(t.tryLoc===e){var i=t.completion;if("throw"===i.type){var r=i.arg;L(t)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(n,t,i){return this.delegate={iterator:C(n),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=e),h}},n}function x(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function _(e){for(var n=1;n{"use strict";t.d(n,{X:()=>N});var i=t(34699),r=t(67294),a=t(6443),o=t(39727),l=t(77355),d=t(93310),u=t(87691),c=t(20113),s=t(18627),m=t(66411),v=t(14646),p=t(34135),f=t(75221),k=t(43487),h=t(50458),g=t(19616),y=t(83302),w=function(e){var n=e.viewer,t=e.newsletterV3,i=e.newsletterV3LandingUrl,a=e.isOnCustomDomain,o=e.isVertical,d=e.handleClick,c=e.viewerIsOwnerOrEditor,s=e.publisherIsOwnerText;return t&&void 0!==c?c?r.createElement(l.x,{paddingTop:"10px"},r.createElement(u.F,{scale:"S",color:"DARKER"},s)):n||a?r.createElement(g.x,{newsletterV3:t,buttonStyle:"SUBTLE",redirectUrl:a?i:void 0,isVertical:o}):r.createElement(y.Q,{newsletterV3:t,isVertical:o,handleClick:d}):null},N=function(e){var n,t,g=e.postId,y=e.publisher,N=e.isVertical,S=void 0!==N&&N,E=(0,r.useRef)(null),b=(0,k.v9)((function(e){return e.config.authDomain})),F=(0,s.A)(),x=(0,v.I)(),_=(0,a.H)().value,O=(0,r.useState)(!1),P=(0,i.Z)(O,2),T=P[0],L=P[1],V=(0,r.useState)("0px"),C=(0,i.Z)(V,2),R=C[0],D=C[1],B=null==(0,k.v9)((function(e){return e.navigation.currentLocation})).match("http[s]?://[^/]*".concat(b)),j=y.newsletterV3,I=null==j?void 0:j.type,A=y.username,U=void 0===A?"":A,Z=(0,h.iB)(null!==(n=null==j?void 0:j.slug)&&void 0!==n?n:"",b,I===f.Rr.NEWSLETTER_TYPE_COLLECTION?y:void 0,I===f.Rr.NEWSLETTER_TYPE_AUTHOR&&U?U:void 0),H="Collection"===y.__typename?y:void 0,Y=(0,o.g)(H).viewerEdge,G="",W="",M="";switch(I){case f.Rr.NEWSLETTER_TYPE_COLLECTION:G="Sign up for ".concat(null==j?void 0:j.name),W="0px",M="You're an editor of ".concat(null==j?void 0:j.name),t=null==Y?void 0:Y.isEditor;break;case f.Rr.NEWSLETTER_TYPE_AUTHOR:G=(null==j?void 0:j.promoHeadline)||"Get an email whenever ".concat(y.name," publishes."),W="6px",M="You cannot subscribe to yourself",t=y.viewerEdge.isUser}T&&(G="Check your inbox.");var K,X=!1,z=function(){!X&&Q()&&(F.event("newsletterV3.promoViewed",{newsletterV3Id:null==j?void 0:j.id,postId:g}),X=!0)},Q=function(){var e;if(!E.current)return!1;var n=null===(e=E.current)||void 0===e?void 0:e.getBoundingClientRect(),t=n.top+n.height/2;return t>=0&&t<=window.innerHeight};return(0,r.useEffect)((function(){return z(),window&&p.V6.on("scroll",z),function(){p.V6.off("scroll",z)}}),[]),(0,r.useEffect)((function(){var e;if(E.current){var n=(null===(e=E.current)||void 0===e?void 0:e.getBoundingClientRect()).height;D("".concat(n,"px"))}}),[E]),j&&r.createElement(m.cW,{source:{name:"newsletter_v3_promo",susiEntry:"newsletter_v3_promo"}},r.createElement("div",{ref:E,className:S?void 0:x((K=R,function(e){return{borderTop:"1px solid ".concat(e.colorTokens.border.neutral.secondary.base),padding:"24px 0",marginBottom:"25px",minHeight:K}}))},r.createElement(l.x,{wordBreak:"break-word",paddingBottom:W},r.createElement(c.X6,{scale:"S"},G)),I===f.Rr.NEWSLETTER_TYPE_COLLECTION&&!T&&r.createElement(r.Fragment,null,r.createElement(l.x,{paddingTop:"4px"},r.createElement(u.F,{tag:"h3",scale:"S",color:"DARKER"},"By ".concat(y.name))),r.createElement(l.x,{paddingTop:"8px",paddingBottom:"10px"},r.createElement(u.F,{scale:"S",color:"DARKER"},null==j?void 0:j.description," ",r.createElement(d.r,{inline:!0,linkStyle:"OBVIOUS",href:Z},"Take a look.")))),I===f.Rr.NEWSLETTER_TYPE_AUTHOR&&(null==j?void 0:j.promoBody)&&!T&&r.createElement(r.Fragment,null,r.createElement(l.x,{wordBreak:"break-word",paddingTop:"8px",paddingBottom:"8px"},r.createElement(u.F,{scale:"S",color:"DARKER"},null==j?void 0:j.promoBody))),r.createElement(l.x,{display:"flex",flexWrap:"wrap"},r.createElement(w,{viewer:_,isOnCustomDomain:B,newsletterV3:j,newsletterV3LandingUrl:Z,isVertical:S,handleClick:function(){return L(!0)},viewerIsOwnerOrEditor:t,publisherIsOwnerText:M}))))}},75865:(e,n,t)=>{"use strict";t.d(n,{Rf:()=>c});var i=t(87329),r=t(13156),a=t(41422),o={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"NewsletterSubscribeComponent_newsletterV3"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"NewsletterV3"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"NewsletterV3SubscribeButton_newsletterV3"}},{kind:"FragmentSpread",name:{kind:"Name",value:"NewsletterV3SubscribeByEmail_newsletterV3"}}]}}].concat((0,i.Z)(r.B.definitions),(0,i.Z)(a.L.definitions))},l={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"NewsletterV3Promo_newsletterV3"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"NewsletterV3"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"promoHeadline"}},{kind:"Field",name:{kind:"Name",value:"promoBody"}},{kind:"FragmentSpread",name:{kind:"Name",value:"NewsletterSubscribeComponent_newsletterV3"}}]}}].concat((0,i.Z)(o.definitions))},d={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"NewsletterV3Promo_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isUser"}}]}},{kind:"Field",name:{kind:"Name",value:"newsletterV3"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"NewsletterV3Promo_newsletterV3"}}]}}]}}].concat((0,i.Z)(l.definitions))},u={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"NewsletterV3Promo_collection"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"slug"}},{kind:"Field",name:{kind:"Name",value:"domain"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"newsletterV3"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"NewsletterV3Promo_newsletterV3"}}]}}]}}].concat((0,i.Z)(l.definitions))},c={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"NewsletterV3Promo_publisher"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Publisher"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"NewsletterV3Promo_user"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"NewsletterV3Promo_collection"}}]}}]}}].concat((0,i.Z)(d.definitions),(0,i.Z)(u.definitions))}},6177:(e,n,t)=>{"use strict";t.d(n,{F:()=>i});var i={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"useShowAuthorNewsletterV3Promo_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"newsletterV3"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"showPromo"}},{kind:"Field",name:{kind:"Name",value:"slug"}}]}}]}}]}},1951:(e,n,t)=>{"use strict";t.d(n,{t:()=>o});var i=t(67294),r=t(9354),a=t(61095),o=function(e){var n,t,o,l=(0,a.Pd)(e),d=l.viewerEdge,u=l.loading,c=i.useRef(null),s=(0,r.T)({newsletterSlug:null==e||null===(n=e.newsletterV3)||void 0===n?void 0:n.slug,username:null==e?void 0:e.username}),m=s.viewerEdge,v=s.loading;return(o=null!==c.current?{value:c.current}:u||v?{loading:!0}:null!=e&&null!==(t=e.newsletterV3)&&void 0!==t&&t.showPromo?{value:!(!(null!=d&&d.isUser||null==m)&&m.isSubscribed)}:{value:!1}).loading||void 0===o.value||null!==c.current||(c.current=o.value),o}}}]); //# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/5601.115530e6.chunk.js.map