orgmode-to-gemini-blog/exports/html/Récapitulatif de mon contenu twitter - Dragonfeu - Medium_fichiers/UserProfilePage.MainContent.c2a2d70c.chunk.js
2024-11-03 11:06:34 +01:00

2 lines
23 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self.webpackChunklite=self.webpackChunklite||[]).push([[5008],{61356:(e,n,i)=>{i.r(n),i.d(n,{MainContent:()=>Y,useLoader:()=>W});var t=i(39181),a=i(96540),l=i(65866),r=i(90866),o=i(54625),d=i(88474),m=i(37075),s=i(34075),u=i(52290),c=i(54119),k=i(53825),p=i(28072),v=i(86527),f=i(56942),g=i(36557),N=i(51260),S=function(e){var n=e.user,i=(0,N.au)(),t=n.authoredBooks,l=t[0];return l?a.createElement(p.P,{size:"app"},a.createElement(u.a,{marginBottom:{xs:"16px",sm:"24px",md:"24px",lg:"24px",xl:"24px"},display:"flex",justifyContent:"space-between"},a.createElement(f.DZ,{scale:"XS"},"Featured Book"),t.length>1&&a.createElement(v.N,{href:i("ShowUserBooks",{username:n.username})},a.createElement(g.kZ,{scale:"M"},"See all (",t.length,")"))),a.createElement(k.G,{book:l,isFeatured:!0}),a.createElement(u.a,{margin:{xs:"32px 0 8px",sm:"48px 0 16px",md:"48px 0 16px",lg:"48px 0 16px",xl:"48px 0 16px"}},a.createElement(f.DZ,{scale:"XS"},"Stories"))):null},E=function(e){var n=e.user,i=e.fetchMoreHomepagePosts;(0,o.s)(n);var t=(0,d.E)(n);return a.createElement(a.Fragment,null,a.createElement(m.f,{user:n}),a.createElement(c.y,{tab:s.B.Overview,user:n}),a.createElement(u.a,{backgroundColor:"BACKGROUND",display:"flex",flexDirection:"column",minHeight:"100vh"},a.createElement(l.s,{publisher:n,headerMarginBottom:t?32:void 0}),a.createElement(u.a,{flexGrow:"1"},t&&a.createElement(S,{user:n}),a.createElement(r.e,{publisher:n,fetchMore:i}))))},h=i(47880),b=i(26365),x=i(51622),F=i(95765),w=i(42680),y=i(35460),T=i(5009),V=i(99270),_=i(53612),A=i(49287),D=i(45458),B=i(36042),P=i(71324),C=i(83611),O=i(55918),R=i(13377),L=i(91339),I=i(48049),U=i(16052),j=i(30167),M={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"UserProfileBooks_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"authoredBooks"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"BookWidget_authorBook"}}]}}]}}].concat((0,D.A)(j.Z.definitions))},Z={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"UserProfileScreen_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"viewerIsUser"}},{kind:"FragmentSpread",name:{kind:"Name",value:"PublisherHeader_publisher"}},{kind:"FragmentSpread",name:{kind:"Name",value:"PublisherHomepagePosts_publisher"}},{kind:"FragmentSpread",name:{kind:"Name",value:"UserProfileMetadata_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"SuspendedBannerLoader_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"useAnalytics_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"useIsVerifiedBookAuthor_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"UserProfileBooks_user"}}]}}].concat((0,D.A)(C.J.definitions),(0,D.A)(R.n.definitions),(0,D.A)(L.G.definitions),(0,D.A)(I.x.definitions),(0,D.A)(U.W.definitions),(0,D.A)(O.s.definitions),(0,D.A)(M.definitions))},H={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserProfileQuery"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"username"}},type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"homepagePostsLimit"}},type:{kind:"NamedType",name:{kind:"Name",value:"PaginationLimit"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"homepagePostsFrom"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},defaultValue:{kind:"NullValue"}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"includeDistributedResponses"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},defaultValue:{kind:"BooleanValue",value:!0}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userResult"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"username"},value:{kind:"Variable",name:{kind:"Name",value:"username"}}}],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:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"viewerIsUser"}},{kind:"Field",name:{kind:"Name",value:"viewerEdge"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"isFollowing"}}]}},{kind:"Field",alias:{kind:"Name",value:"homePostsPublished"},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:"IntValue",value:"1"}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"posts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"UserCanonicalizer_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"MastodonVerificationLink_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"UserProfileScreen_user"}}]}}]}}]}}].concat((0,D.A)(B.A.definitions),(0,D.A)(P.Z.definitions),(0,D.A)(Z.definitions))},W=function(e){var n=(0,y.m)(e),i=n.id,a=n.username,l=(0,t.I)(H,{variables:{id:i,username:a,homepagePostsLimit:10},skip:!i&&!a});return{loading:l.loading,userProfileQueryResult:l}},Y=function(e){var n,i,t=e.params,l=e.loading,r=e.userProfileQueryResult,o=(0,y.m)(t),d=o.id,m=o.username;if(!d&&!m)return a.createElement(x.u,null);var s,u=r.data,c=(u=void 0===u?{userResult:void 0}:u).userResult,k=r.error,p=r.fetchMore;if(l)return a.createElement(F.x,null);if((0,T.H)(c))return a.createElement(T.T,{userResult:c});if(k)return a.createElement(b.z,{error:k});var v=null==c||null===(n=c.homepagePostsConnection)||void 0===n||null===(i=n.pagingInfo)||void 0===i?void 0:i.next;if(v){var f=v.limit,g=v.from;s=function(){return p({variables:{homepagePostsFrom:g,homepagePostsLimit:f}})}}return a.createElement(V.Y,{user:c},a.createElement(J,{params:t,userResult:c,fetchMoreHomepagePosts:s}))};function J(e){var n,i,t=e.params,l=e.userResult,r=e.fetchMoreHomepagePosts,o=(0,_.X)({id:l.id}),d=o.data;if(o.loading)return a.createElement(F.x,null);var m=(null===(n=l.homePostsPublished)||void 0===n?void 0:n.posts)&&l.homePostsPublished.posts.length>0,s="User"===(null==d||null===(i=d.userResult)||void 0===i?void 0:i.__typename)&&d.userResult.viewerEdge.hasList;return!m&&s?a.createElement(a.Fragment,null,a.createElement(w.F,{user:l}),a.createElement(h.O,{params:t,sourceName:"user_profile_page",userId:l.id})):a.createElement(A.Ne,{source:{name:"user_profile_page",authorId:l.id}},a.createElement(w.F,{user:l}),a.createElement(E,{user:l,fetchMoreHomepagePosts:r}))}},53825:(e,n,i)=>{i.d(n,{G:()=>j,t:()=>Z});var t,a=i(80045),l=i(96540),r=i(55030),o=function(e){var n=e.children,i=e.omitAnd,t=void 0===i||i,a=e.maxBookAuthors;n=n.filter((function(e){return!!e}));var o=[];if(!a||n.length<=a)return l.createElement(r.G,{children:n,omitAnd:t});var d=n.slice(0,a);return d.forEach((function(e,n){o.push(e),n===d.length-1?o.push(", et al."):o.push(", ")})),o},d=i(88726),m=i(5562),s=i(52290),u=i(86527),c=i(85050),k=i(36557),p=i(39),v=i(44402),f=i(26298);function g(){return g=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var t in i)({}).hasOwnProperty.call(i,t)&&(e[t]=i[t])}return e},g.apply(null,arguments)}const N=function(e){return l.createElement("svg",g({xmlns:"http://www.w3.org/2000/svg",width:18,height:18,fill:"none",viewBox:"0 0 18 18"},e),t||(t=l.createElement("path",{stroke:"#242424",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"m4.5 13.5 9-9M6.188 4.5H13.5v7.313"})))};var S,E,h=i(64467),b=i(90280);!function(e){e.Sidebar="SIDEBAR",e.Featured="FEATURED",e.BooksTab="BOOKS_TAB"}(E||(E={}));var x=(S={},(0,h.A)(S,E.Sidebar,{mobile:void 0,desktop:55}),(0,h.A)(S,E.Featured,{mobile:73,desktop:130}),(0,h.A)(S,E.BooksTab,{mobile:73,desktop:143}),S),F=function(e){return{borderRadius:"2px",filter:e?"drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25))":void 0,maxWidth:"100%"}},w=function(e){var n=e.book,i=e.width,t=e.marginRight,a=e.marginBottom,r=e.marginLeft,o=e.marginTop,d=e.hasShadow,m=void 0!==d&&d,u=n.coverImageId,c=x[i].mobile;return l.createElement(s.a,{marginRight:t,marginLeft:r,marginTop:o,marginBottom:a,width:{xs:c?"".concat(c,"px"):void 0,sm:void 0,md:void 0,lg:void 0,xl:void 0},flexShrink:"0"},l.createElement(b.pg,{miroId:u||"7*S42dldl3h7fq-sYm371_pQ.png",width:x[i].desktop,rules:F(m)}))},y=i(72130),T=i(49287),V=i(50684),_=i(39160);function A(e,n){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),i.push.apply(i,t)}return i}function D(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?A(Object(i),!0).forEach((function(n){(0,h.A)(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var B=["isFirstElement","isLastElement"],P=function(e){return{display:"flex",borderRadius:"4px",backgroundColor:e.colorTokens.background.neutral.tertiary.base,border:"1px solid ".concat(e.colorTokens.border.neutral.tertiary.base),padding:{xs:"16px",sm:"24px",md:"24px",lg:"24px",xl:"24px"}}},C={display:"flex"},O=function(e){return{"& path":{stroke:e.colorTokens.foreground.neutral.primary.base}}},R={fontFamily:f.z.newFonts.detail.family,fontWeight:f.z.newFonts.detail.weight},L={fontFamily:f.z.newFonts.title.family,fontWeight:f.z.newFonts.title.weight},I=function(e){return{color:e.colorTokens.foreground.neutral.secondary.base}},U=function(e){var n=e.book,i=(0,v.l)(),t=n.publicationDate,a=n.authors,r=t?new Date(t).getUTCFullYear():void 0,d=(0,l.useMemo)((function(){return a?a.map((function(e){return l.createElement("span",{key:e.name,className:i([R,I])},e.name)})):[]}),[a]);return l.createElement(s.a,{display:"flex",alignItems:"center"},r&&l.createElement(l.Fragment,null,l.createElement(k.kZ,{scale:{xs:"XS",sm:"S",md:"S",lg:"S",xl:"S"}},l.createElement("span",{className:i([R,I])},r)),l.createElement(m.d,{margin:"0 4px",scale:{xs:"XS",sm:"S",md:"S",lg:"S",xl:"S"}})),l.createElement(k.kZ,{scale:{xs:"XS",sm:"S",md:"S",lg:"S",xl:"S"},tag:"div"},l.createElement(c.V,{xs:!0},l.createElement(o,{maxBookAuthors:1},d)),l.createElement(c.V,{sm:!0,md:!0,lg:!0,xl:!0},l.createElement(o,{maxBookAuthors:2},d))))},j=function(e){var n,i,t,a,r,o,d,m,f,g,S=e.book,h=e.isFeatured,b=void 0!==h&&h,x=(0,v.l)(),F=(i={authorId:(null===(n=S.authors[0].user)||void 0===n?void 0:n.id)||"",sourceName:b?"featured_book":"books_tab"},t=i.authorId,a=i.sourceName,r=(0,y.$L)(),o=(0,T.Fo)(),d=(0,V.MW)(),m=(0,_.d4)((function(e){return e.navigation.referrer})),f=(0,_.d4)((function(e){return e.navigation.currentLocation})),g={source:(0,T.wv)(D(D({},o),{},{name:a})),referrer:m||f,referrerSource:d},{reportBooksClickedEvent:(0,l.useCallback)((function(){r.event("books.clicked",{authorId:t},g)}),[r,g,t])}).reportBooksClickedEvent,A=(0,p.Z)({name:"title",scale:"XS",color:"DARKER",clamp:3}),B=(0,p.Z)({name:"title",scale:"M",color:"DARKER"}),I=S.description,j=S.title,M=S.links,Z=M.length>0?M[0].url:void 0,H=l.createElement("div",{className:x(b?P:C)},l.createElement(w,{book:S,width:b?E.Featured:E.BooksTab,hasShadow:!b}),l.createElement(s.a,{display:"flex",flexDirection:"column",justifyContent:"space-between",marginLeft:{xs:"16px",sm:"24px",md:"24px",lg:"24px",xl:"24px"},width:"100%"},l.createElement(s.a,{maxWidth:{xs:"100%",sm:"433px",md:"433px",lg:"433px",xl:"433px"}},l.createElement(c.V,{xs:!0},l.createElement("span",{className:x([A,L])},j)),l.createElement(c.V,{sm:!0,md:!0,lg:!0,xl:!0},l.createElement("span",{className:x([B,L])},j)),!b&&l.createElement(c.V,{xs:!0},l.createElement(s.a,{paddingTop:"8px"},l.createElement(U,{book:S}))),I&&l.createElement(c.V,{sm:!0,md:!0,lg:!0,xl:!0},l.createElement(s.a,{marginTop:"16px"},l.createElement(k.kZ,{scale:"S",color:"DARKER"},l.createElement("span",{className:x(R)},I))))),l.createElement(s.a,{display:"flex",justifyContent:{xs:b?"space-between":"flex-end",sm:"space-between",md:"space-between",lg:"space-between",xl:"space-between"},alignItems:"center",paddingTop:{xs:void 0,sm:"8px",md:"8px",lg:"8px",xl:"8px"}},l.createElement(s.a,{display:{xs:b?"block":"none",sm:"block",md:"block",lg:"block",xl:"block"}},l.createElement(U,{book:S})),Z&&l.createElement(l.Fragment,null,l.createElement(c.V,{xs:!0},l.createElement(N,{height:"18",width:"18",className:x(O)})),l.createElement(c.V,{sm:!0,md:!0,lg:!0,xl:!0},l.createElement(N,{height:"24",width:"24",className:x(O)}))))));return l.createElement(l.Fragment,null,Z?l.createElement(u.N,{disableSourceParam:!0,href:Z,onClick:F,target:"_blank"},H):H)},M={xs:"24px",sm:"32px",md:"32px",lg:"32px",xl:"32px"},Z=function(e){var n=e.isFirstElement,i=e.isLastElement,t=(0,a.A)(e,B);return l.createElement(l.Fragment,null,l.createElement(s.a,{paddingTop:n?void 0:M,paddingBottom:M},l.createElement(j,t)),!i&&l.createElement(d.i,null))}},30167:(e,n,i)=>{i.d(n,{Z:()=>a});var t=i(45458),a={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"BookWidget_authorBook"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AuthorBook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"authors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"links"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"url"}}]}},{kind:"Field",name:{kind:"Name",value:"publicationDate"}},{kind:"FragmentSpread",name:{kind:"Name",value:"BookCover_authorBook"}}]}}].concat((0,t.A)([{kind:"FragmentDefinition",name:{kind:"Name",value:"BookCover_authorBook"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AuthorBook"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"coverImageId"}}]}}]))}},71324:(e,n,i)=>{i.d(n,{Z:()=>t});var t={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"MastodonVerificationLink_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:"linkedAccounts"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"mastodon"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"domain"}},{kind:"Field",name:{kind:"Name",value:"username"}}]}}]}}]}}]}},42680:(e,n,i)=>{i.d(n,{F:()=>l});var t=i(96540),a=i(52290),l=function(e){var n,i,l,r,o=e.user,d=null===(n=o.linkedAccounts)||void 0===n||null===(i=n.mastodon)||void 0===i?void 0:i.domain,m=null===(l=o.linkedAccounts)||void 0===l||null===(r=l.mastodon)||void 0===r?void 0:r.username;return d&&m?t.createElement(a.a,{display:"none"},t.createElement("a",{rel:"me",href:"https://".concat(d,"/@").concat(m)},"Mastodon")):null}},55030:(e,n,i)=>{i.d(n,{G:()=>t});var t=function(e){var n=e.children,i=e.omitAnd,t=void 0!==i&&i,a=(n=n.filter((function(e){return!!e}))).length,l=[];return 1===a?l.push(n[0]):2===a?l.push(n[0],t?", ":" and ",n[1]):n.forEach((function(e,n){if(l.push(e),n<a-2)l.push(", ");else if(n===a-2){var i=t?", ":", and ";l.push(i)}})),l}},5244:(e,n,i)=>{i.d(n,{U:()=>h});var t=i(80296),a=i(96540),l=i(27721),r=i(86329),o=i(52290),d=i(86527),m=i(36557),s=i(56942),u=i(72130),c=i(49287),k=i(44402),p=i(66305),v=i(42976),f=i(39160),g=i(46879),N=i(4769),S=i(48312),E=function(e){var n=e.viewer,i=e.newsletterV3,t=e.newsletterV3LandingUrl,l=e.isOnCustomDomain,r=e.isVertical,d=e.handleClick,s=e.viewerIsOwnerOrEditor,u=e.publisherIsOwnerText;return i&&void 0!==s?s?a.createElement(o.a,{paddingTop:"10px"},a.createElement(m.kZ,{scale:"S",color:"DARKER"},u)):n||l?a.createElement(N.j,{newsletterV3:i,buttonStyle:"SUBTLE",redirectUrl:l?t:void 0,isVertical:r}):a.createElement(S.K,{newsletterV3:i,isVertical:r,handleClick:d}):null},h=function(e){var n,i,N=e.postId,S=e.publisher,h=e.isVertical,b=void 0!==h&&h,x=(0,a.useRef)(null),F=(0,f.d4)((function(e){return e.config.authDomain})),w=(0,u.$L)(),y=(0,k.l)(),T=(0,l.R)().value,V=(0,a.useState)(!1),_=(0,t.A)(V,2),A=_[0],D=_[1],B=(0,a.useState)("0px"),P=(0,t.A)(B,2),C=P[0],O=P[1],R=null==(0,f.d4)((function(e){return e.navigation.currentLocation})).match("http[s]?://[^/]*".concat(F)),L=S.newsletterV3,I=null==L?void 0:L.type,U=S.username,j=void 0===U?"":U,M=(0,g.Lpe)(null!==(n=null==L?void 0:L.slug)&&void 0!==n?n:"",F,I===v.$J.NEWSLETTER_TYPE_COLLECTION?S:void 0,I===v.$J.NEWSLETTER_TYPE_AUTHOR&&j?j:void 0),Z="Collection"===S.__typename?S:void 0,H=(0,r.J)(Z).viewerEdge,W="",Y="",J="";switch(I){case v.$J.NEWSLETTER_TYPE_COLLECTION:W="Sign up for ".concat(null==L?void 0:L.name),Y="0px",J="You're an editor of ".concat(null==L?void 0:L.name),i=null==H?void 0:H.isEditor;break;case v.$J.NEWSLETTER_TYPE_AUTHOR:W=(null==L?void 0:L.promoHeadline)||"Get an email whenever ".concat(S.name," publishes."),Y="6px",J="You cannot subscribe to yourself",i=S.viewerEdge.isUser}A&&(W="Check your inbox.");var K,G=!1,$=function(){!G&&z()&&(w.event("newsletterV3.promoViewed",{newsletterV3Id:null==L?void 0:L.id,postId:N}),G=!0)},z=function(){var e;if(!x.current)return!1;var n=null===(e=x.current)||void 0===e?void 0:e.getBoundingClientRect(),i=n.top+n.height/2;return i>=0&&i<=window.innerHeight};return(0,a.useEffect)((function(){return $(),window&&p.R5.on("scroll",$),function(){p.R5.off("scroll",$)}}),[]),(0,a.useEffect)((function(){var e;if(x.current){var n=(null===(e=x.current)||void 0===e?void 0:e.getBoundingClientRect()).height;O("".concat(n,"px"))}}),[x]),L&&a.createElement(c.Ne,{source:{name:"newsletter_v3_promo",susiEntry:"newsletter_v3_promo"}},a.createElement("div",{ref:x,className:b?void 0:y((K=C,function(e){return{borderTop:"1px solid ".concat(e.colorTokens.border.neutral.secondary.base),padding:"24px 0",marginBottom:"25px",minHeight:K}}))},a.createElement(o.a,{wordBreak:"break-word",paddingBottom:Y},a.createElement(s.DZ,{scale:"S"},W)),I===v.$J.NEWSLETTER_TYPE_COLLECTION&&!A&&a.createElement(a.Fragment,null,a.createElement(o.a,{paddingTop:"4px"},a.createElement(m.kZ,{tag:"h3",scale:"S",color:"DARKER"},"By ".concat(S.name))),a.createElement(o.a,{paddingTop:"8px",paddingBottom:"10px"},a.createElement(m.kZ,{scale:"S",color:"DARKER"},null==L?void 0:L.description," ",a.createElement(d.N,{inline:!0,linkStyle:"OBVIOUS",href:M},"Take a look.")))),I===v.$J.NEWSLETTER_TYPE_AUTHOR&&(null==L?void 0:L.promoBody)&&!A&&a.createElement(a.Fragment,null,a.createElement(o.a,{wordBreak:"break-word",paddingTop:"8px",paddingBottom:"8px"},a.createElement(m.kZ,{scale:"S",color:"DARKER"},null==L?void 0:L.promoBody))),a.createElement(o.a,{display:"flex",flexWrap:"wrap"},a.createElement(E,{viewer:T,isOnCustomDomain:R,newsletterV3:L,newsletterV3LandingUrl:M,isVertical:b,handleClick:function(){return D(!0)},viewerIsOwnerOrEditor:i,publisherIsOwnerText:J}))))}},25225:(e,n,i)=>{i.d(n,{JJ:()=>s});var t=i(45458),a=i(75967),l=i(85912),r={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,t.A)(a._.definitions),(0,t.A)(l.D.definitions))},o={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,t.A)(r.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,t.A)(o.definitions))},m={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,t.A)(o.definitions))},s={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,t.A)(d.definitions),(0,t.A)(m.definitions))}}}]);
//# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/UserProfilePage.MainContent.c2a2d70c.chunk.js.map