"use strict";(self.webpackChunklite=self.webpackChunklite||[]).push([[21],{24809:(e,n,t)=>{t.d(n,{A:()=>r});var i,a=t(96540);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n{t.r(n),t.d(n,{RightColumnContent:()=>m,useLoader:()=>s});var i=t(39181),a=t(96540),o=t(45458),r=t(54936),l={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserProfileRightColQuery"},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"}}}],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:"FragmentSpread",name:{kind:"Name",value:"UserProfileRightColumn_user"}}]}}]}}]}}].concat((0,o.A)(r.R.definitions))},c=t(98834),d=t(35460),u=t(5009),s=function(e){var n=(0,d.m)(e),t=n.id,a=n.username,o=(0,i.I)(l,{variables:{id:t,username:a},skip:!t&&!a});return{loading:o.loading,userProfileRightColQueryResult:o}},m=function(e){var n=e.userProfileRightColQueryResult,t=n.error,i=n.data,o=(i=void 0===i?{}:i).userResult;return n.loading||t||(0,u.H)(o)?null:a.createElement(c.Z,{user:o})}},18599:(e,n,t)=>{t.d(n,{a:()=>w,r:()=>h});var i=t(96540),a=t(28899),o=t(87147),r=t(67476),l=t(5562),c=t(52290),d=t(86975),u=t(86527),s=t(36557),m=t(39),p=t(44402),k=t(56774),v=t(51260),f=t(90383),g=t(27715),y=t(60213),b=function(e){return{":hover span":{color:e.colorTokens.foreground.neutral.primary.base}}},S=function(e){return{position:"absolute",height:"42px",width:"100%",top:0,left:0,borderTopLeftRadius:"4px",borderTopRightRadius:"4px",backgroundImage:"url(".concat(e,")"),backgroundRepeat:"no-repeat",backgroundSize:"cover"}},h=5,w=function(e){var n,t,h=e.collection,w=e.trackingV2,N=h.name,E=h.description,x=h.customStyleSheet,C=h.slug,F=(0,y.z)(h),T=(0,v.au)()("ShowLiteCollectionFollowers",{collectionSlug:C||""}),R=(0,k.X)({entity:h,trackingV2:w}),D=(0,m.Z)({name:"heading",scale:"XS",clamp:2,fontWeight:"NORMAL",color:"NORMAL"}),I=(0,p.l)(),A=null!=x&&null!==(n=x.header)&&void 0!==n&&null!==(t=n.backgroundImage)&&void 0!==t&&t.id?(0,f.rP)({miroId:x.header.backgroundImage.id,strategy:f.qY.Resample}):null;return i.createElement(c.a,{width:"280px",display:"flex",flexDirection:"column",padding:"24px",position:"relative",ref:R},!!A&&i.createElement("div",{className:I(S(A))}),i.createElement(c.a,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-end"},i.createElement(a.u,{size:64,collection:h,link:!0,showBorder:!!A}),i.createElement(c.a,null,i.createElement(o.E,{collection:h,buttonSize:"SMALL",buttonStyleFn:function(e){return e?"SUBTLE":"BRAND"},susiEntry:"follow_card",trackingV2:w}))),i.createElement(c.a,{marginTop:"12px",display:"flex",flexDirection:"column"},i.createElement(d.D,{href:F},i.createElement(c.a,{display:"flex",flexDirection:"column"},i.createElement("div",{className:I([D,{display:"block"}])},N))),i.createElement(c.a,{marginTop:"4px",display:"flex",flexDirection:"row"},i.createElement(s.kZ,{scale:"S",color:"LIGHTER"},"Publication"),i.createElement(l.d,{margin:"0 8px"}),i.createElement(u.N,{href:T,linkStyle:"SUBTLE",rules:b},i.createElement(s.kZ,{scale:"S",color:"DARKER",tag:"span"},(0,g.Ct)(h.subscriberCount||0)),i.createElement(s.kZ,{scale:"S",tag:"span"}," Followers")))),E&&i.createElement(c.a,{paddingTop:"12px"},i.createElement(s.kZ,{scale:"S",color:"DARKER",clamp:4},i.createElement(r.O,{wrapLinks:!0},E))))}},25760:(e,n,t)=>{t.d(n,{E:()=>o});var i=t(96540),a=t(52290),o=function(e){var n=e.children,t=e.marginTop,o=void 0===t?"40px":t,r=e.paddingBottom,l=void 0===r?"0px":r,c=e.showBorderBottom,d=void 0!==c&&c;return i.createElement(a.a,{marginTop:o,paddingBottom:l,borderBottom:d?"neutral.primary":"NONE"},n)}},60213:(e,n,t)=>{t.d(n,{u:()=>r,z:()=>l});var i=t(96540),a=t(39160),o=t(79959),r=function(){var e=(0,a.d4)((function(e){return e.navigation.currentLocation})),n=(0,a.d4)((function(e){return e.config.authDomain})),t=(0,o.fo)();return(0,i.useCallback)((function(i){var a=i.id,o=i.domain,r=function(e){var n=e.id,t=e.slug;return t?"/".concat(t):"/c/".concat(n)}({id:a,domain:o,slug:i.slug});if(t)return"https://".concat(n).concat(r);try{var l=new URL(e).port;if(o)return"https://".concat(o).concat(l?":".concat(l):"")}catch(e){}return"https://".concat(n).concat(r)}),[t])},l=function(e){return r()(e)}},39931:(e,n,t)=>{t.d(n,{p:()=>o});var i=t(60213),a=t(64122),o=function(e){var n=(0,i.u)(),t=(0,a.W)();return"Collection"===e.__typename?n(e):"User"===e.__typename?t(e):""}},24505:(e,n,t)=>{t.d(n,{y:()=>u});var i=t(58168),a=t(96540),o=t(5811),r=t(5863),l=t(62830),c=t(52290),d=t(57005),u=function(e){var n=e.children,t=e.innerPadding,u=void 0===t?{}:t,s=e.footerPadding,m=e.display,p=void 0===m?"block":m,k=(0,a.useRef)(0),v=(0,a.useRef)(null),f=(0,a.useRef)("stickyToTop"),g=(0,a.useRef)(null),y=(0,r.s)(),b=y.fullNavbarHeight,S=y.topNavUpsellHeight,h=y.addHeightChangeHandler,w=y.removeHeightChangeHandler;return(0,d.E)((function(){var e=function(e){var n=e.currentHeight;v.current&&g.current&&("notSticky"!==f.current&&(v.current.style.top="".concat(n,"px")),g.current.style.minHeight="calc(100vh - ".concat(n,"px)"))};return h(e),function(){w(e)}}),[]),(0,d.E)((function(){var e=function(){if(v.current){var e=window.scrollY>k.current;k.current=window.scrollY;var n=window.innerHeight,t=v.current.offsetHeight-n,i=l.oe;t<=20||(e?("notSticky"===f.current&&window.scrollY>=v.current.offsetTop+t+i+S&&(f.current="stickyToBottom",v.current.style.position="sticky",v.current.style.top="".concat(-t,"px")),"stickyToTop"===f.current&&(f.current="notSticky",v.current.style.position="relative",v.current.style.top="0px",v.current.style.marginTop="0px",v.current.style.marginTop="".concat(Math.max(k.current-v.current.offsetTop,0),"px"))):("notSticky"===f.current&&window.scrollY<=v.current.offsetTop&&(f.current="stickyToTop",v.current.style.position="sticky",v.current.style.top="".concat(i+S,"px"),v.current.style.marginTop="0px"),"stickyToBottom"===f.current&&(f.current="notSticky",v.current.style.position="relative",v.current.style.top="0px",v.current.style.marginTop="0px",v.current.style.marginTop="".concat(k.current-t-v.current.offsetTop-i-S,"px"))))}};return window.addEventListener("scroll",e),function(){window.removeEventListener("scroll",e)}}),[S]),a.createElement(c.a,{position:"sticky",top:"".concat(b,"px"),ref:v,display:p},a.createElement(c.a,(0,i.A)({display:"flex",flexDirection:"column",minHeight:"calc(100vh - ".concat(b,"px)"),ref:g},u),a.createElement(c.a,{flexGrow:"1"},n),a.createElement(o.j,{detailScale:"XS",spacing:"XS",padding:s})))}},85764:(e,n,t)=>{t.d(n,{JX:()=>g,Ke:()=>f,OW:()=>v,P2:()=>u,Yg:()=>s,b5:()=>m,bD:()=>p,dX:()=>y,ix:()=>k,sP:()=>d});var i=t(55127),a=t.n(i),o=t(96540),r=t(2550),l=t(42976),c=t(90383),d=function(){var e=(0,r.A)().viewerId;return(0,o.useCallback)((function(n){return e===n}),[e])},u=function(e){return d()(e)},s=function(e){return(0,c.rP)({miroId:e.thumbnailImage})},m=function(e){var n=e.postItemsCount;return n>0?"".concat(e.postItemsCount," ").concat(a()("story",n)):""},p=function(){return"This story is no longer available"},k=function(e){var n;return"Post"===(null===(n=e.entity)||void 0===n?void 0:n.__typename)&&e.entity.visibility===l.dL.UNLISTED},v=60,f=280;function g(e){return!!e&&e.length>f}function y(e){return e.length>v}},28899:(e,n,t)=>{t.d(n,{u:()=>k});var i=t(96540),a=t(60213),o=t(7580),r=t(90280),l=t(86975),c=t(12378),d=t(44402),u=t(18642),s=t(90383),m=function(e){return function(n){return{borderRadius:(0,c.c)(n.borderRadius.regular),width:(0,c.c)(e),height:(0,c.c)(e),backgroundColor:n.colorTokens.background.neutral.secondary.base}}},p=function(e,n){return function(t){return{borderRadius:(0,c.c)(t.borderRadius.regular),display:"block",height:"".concat(e,"px"),width:"".concat(e,"px"),position:"absolute",top:0,border:"1px solid rgba(0, 0, 0, 0.05)",":hover":{backgroundColor:n?(0,u.qy)(.1):"none"}}}},k=function(e){var n=e.circular,t=e.collection,c=e.size,u=void 0===c?60:c,k=e.link,v=e.showHoverState,f=e.showBorder,g=void 0!==f&&f,y=(0,a.z)(t),b=(0,d.l)();if(!t||!t.avatar||!t.avatar.id)return null;var S=t.avatar.id,h=t.name||"Publication avatar",w=n?i.createElement(o.r,{miroId:S,alt:h,diameter:u,freezeGifs:!1,showHoverState:v}):i.createElement("div",{style:{position:"relative",border:g?"2px solid white":void 0,borderRadius:"6px",display:"inline-block"}},i.createElement(r.pg,{rules:[m(u)],miroId:S,alt:h,width:u,height:u,strategy:s.qY.Crop}),i.createElement("div",{className:b(p(u,v))}));return k?i.createElement(l.D,{href:y},w):w}},87147:(e,n,t)=>{t.d(n,{E:()=>w});var i=t(80296),a=t(95420),o=t(96540),r=t(54239),l=t(26679),c=t(34208),d=t(2550),u=t(52764),s=t(86329),m=t(43634),p=t(15473),k=t(86527),v=t(52290),f=t(99731),g=t(72130),y=t(49287),b=t(51260),S=t(39160),h=t(46879),w=function(e){var n,t=e.buttonSize,h=e.buttonStyleFn,w=e.collection,E=e.post,x=e.simpleLink,C=e.susiEntry,F=void 0===C?"follow_card":C,T=e.preventParentClick,R=e.width,D=e.trackingV2,I=(0,S.d4)((function(e){return e.config.authDomain})),A=(0,d.A)().viewerId,_=(0,g.$L)(),L=(0,y.jI)(),U=(0,r.zy)(),B=(0,b.W5)(U.pathname),P=null==B||null===(n=B.route)||void 0===n?void 0:n.name,V=(0,s.J)(w),H=V.viewerEdge,M=V.loading,z=function(e,n){var t=(0,a.n)(c.j),r=(0,i.A)(t,1)[0];return o.useCallback((function(){return r({variables:{id:e.id},optimisticResponse:{followCollection:{__typename:"Collection",id:e.id,name:e.name,viewerEdge:{__typename:"CollectionViewerEdge",id:"collectionId:".concat(e.id,"-viewerId:").concat(n),isFollowing:!0}}},update:function(t){t.modify({id:"User:".concat(n),fields:{missionControl:(0,p.A4)("followedCollections",!0),followingCollectionConnection:(0,p.CQ)(e.id)}})}})}),[e.id])}(w,A),O=function(e,n){var t=(0,a.n)(c.E),r=(0,i.A)(t,1)[0];return o.useCallback((function(){return r({variables:{id:e.id},optimisticResponse:{unfollowCollection:{__typename:"Collection",id:e.id,name:e.name,viewerEdge:{__typename:"CollectionViewerEdge",id:"collectionId:".concat(e.id,"-viewerId:").concat(n),isFollowing:!1}}},update:function(e){e.modify({id:"User:".concat(n),fields:{missionControl:(0,p.A4)("followedCollections",!1)}})}})}),[e.id])}(w,A),Y=o.useCallback((function(e){T&&e.preventDefault(),_.event("collection.followed",{collectionId:w.id,followSource:L,trackingV2:D,source:L}),z()}),[w,T,L,_,D]),Z=o.useCallback((function(e){T&&e.preventDefault(),_.event("collection.unfollowed",{collectionId:w.id,followSource:L,trackingV2:D,source:L}),O()}),[T,L,_,D]),j=!(null==H||!H.isFollowing),W=h?h(!!j):j?"OBVIOUS":"STRONG";return x?o.createElement(k.N,{onClick:j?Z:Y},o.createElement(v.a,{display:"flex",flexDirection:"row"},j?"Unfollow publication":"Follow publication")):o.createElement(u.c,null,(function(e){return e?o.createElement(f.$n,{size:t,onClick:j?Z:Y,buttonStyle:W,loading:M,width:R},j?"Following":"Follow"):o.createElement(m.r,{collection:w,buttonStyle:W,isButton:!0,buttonSize:t,operation:"register",actionUrl:N(I,w,E)||"",susiEntry:F,pageSource:(0,l.x)(P,"register"),buttonWidth:R},j?"Following":"Follow")}))},N=function(e,n,t){return n.slug&&(t&&t.id?(0,h.PdS)(e,n.slug,t.id):(0,h.xNA)(e,n.slug))}},7541:(e,n,t)=>{t.d(n,{j:()=>r});var i=t(45458),a=t(82567),o=t(77485),r={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PublisherAvatar_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:"Collection"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"CollectionAvatar_collection"}}]}},{kind:"InlineFragment",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:"UserAvatar_user"}}]}}]}}].concat((0,i.A)(a.$.definitions),(0,i.A)(o.R.definitions))}},8686:(e,n,t)=>{t.d(n,{W:()=>r});var i=t(45458),a=t(52897),o=t(27830),r={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"FollowAndSubscribeButtons_user"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"UserFollowButton_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"UserSubscribeButton_user"}}]}}].concat((0,i.A)(a.l.definitions),(0,i.A)(o.E.definitions))}},27830:(e,n,t)=>{t.d(n,{E:()=>o});var i=t(45458),a=t(53301),o={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"UserSubscribeButton_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:"isPartnerProgramEnrolled"}},{kind:"Field",name:{kind:"Name",value:"name"}},{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",name:{kind:"Name",value:"isUser"}}]}},{kind:"Field",name:{kind:"Name",value:"viewerIsUser"}},{kind:"Field",name:{kind:"Name",value:"newsletterV3"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"FragmentSpread",name:{kind:"Name",value:"useNewsletterV3Subscription_newsletterV3"}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"useNewsletterV3Subscription_user"}},{kind:"FragmentSpread",name:{kind:"Name",value:"MembershipUpsellModal_user"}}]}}].concat((0,i.A)(a.oY.definitions),(0,i.A)(a.fh.definitions),(0,i.A)([{kind:"FragmentDefinition",name:{kind:"Name",value:"MembershipUpsellModal_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:"name"}},{kind:"Field",name:{kind:"Name",value:"imageId"}},{kind:"Field",name:{kind:"Name",value:"postSubscribeMembershipUpsellShownAt"}},{kind:"Field",name:{kind:"Name",value:"newsletterV3"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}}]))}},46445:(e,n,t)=>{t.d(n,{T:()=>s});var i=t(58168),a=t(80045),o=t(96540),r=t(52290),l=t(56942),c=t(36557),d=t(64314),u=["children","titleText"],s=function(e){var n,t=e.children,s=e.titleText,m=(0,a.A)(e,u),p="confirmDialogTitle",k=null!==(n=m.testId)&&void 0!==n?n:void 0;return o.createElement(d.m,(0,i.A)({},m,{ariaLabelledBy:p}),o.createElement(l.DZ,{ariaLabelledById:p,scale:{xs:"M",sm:"M",md:"L",lg:"L",xl:"L"},testId:k},s),o.createElement(r.a,{paddingTop:"6px",paddingBottom:"36px"},o.createElement(c.kZ,{scale:{xs:"M",sm:"M",md:"L",lg:"L",xl:"L"},tag:"div"},t)))}}}]); //# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/UserProfilePage.RightColumnContent.239eca80.chunk.js.map