"use strict";(self.webpackChunklite=self.webpackChunklite||[]).push([[719],{18599:(e,t,n)=>{n.d(t,{a:()=>S,r:()=>k});var o=n(96540),l=n(28899),i=n(87147),r=n(67476),c=n(5562),a=n(52290),u=n(86975),d=n(86527),s=n(36557),m=n(39),p=n(44402),f=n(56774),g=n(51260),v=n(90383),w=n(27715),E=n(60213),b=function(e){return{":hover span":{color:e.colorTokens.foreground.neutral.primary.base}}},h=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"}},k=5,S=function(e){var t,n,k=e.collection,S=e.trackingV2,y=k.name,x=k.description,C=k.customStyleSheet,R=k.slug,I=(0,E.z)(k),D=(0,g.au)()("ShowLiteCollectionFollowers",{collectionSlug:R||""}),L=(0,f.X)({entity:k,trackingV2:S}),A=(0,m.Z)({name:"heading",scale:"XS",clamp:2,fontWeight:"NORMAL",color:"NORMAL"}),z=(0,p.l)(),F=null!=C&&null!==(t=C.header)&&void 0!==t&&null!==(n=t.backgroundImage)&&void 0!==n&&n.id?(0,v.rP)({miroId:C.header.backgroundImage.id,strategy:v.qY.Resample}):null;return o.createElement(a.a,{width:"280px",display:"flex",flexDirection:"column",padding:"24px",position:"relative",ref:L},!!F&&o.createElement("div",{className:z(h(F))}),o.createElement(a.a,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-end"},o.createElement(l.u,{size:64,collection:k,link:!0,showBorder:!!F}),o.createElement(a.a,null,o.createElement(i.E,{collection:k,buttonSize:"SMALL",buttonStyleFn:function(e){return e?"SUBTLE":"BRAND"},susiEntry:"follow_card",trackingV2:S}))),o.createElement(a.a,{marginTop:"12px",display:"flex",flexDirection:"column"},o.createElement(u.D,{href:I},o.createElement(a.a,{display:"flex",flexDirection:"column"},o.createElement("div",{className:z([A,{display:"block"}])},y))),o.createElement(a.a,{marginTop:"4px",display:"flex",flexDirection:"row"},o.createElement(s.kZ,{scale:"S",color:"LIGHTER"},"Publication"),o.createElement(c.d,{margin:"0 8px"}),o.createElement(d.N,{href:D,linkStyle:"SUBTLE",rules:b},o.createElement(s.kZ,{scale:"S",color:"DARKER",tag:"span"},(0,w.Ct)(k.subscriberCount||0)),o.createElement(s.kZ,{scale:"S",tag:"span"}," Followers")))),x&&o.createElement(a.a,{paddingTop:"12px"},o.createElement(s.kZ,{scale:"S",color:"DARKER",clamp:4},o.createElement(r.O,{wrapLinks:!0},x))))}},67459:(e,t,n)=>{n.d(t,{J:()=>d,g:()=>u});var o=n(96540),l=n(64122),i=n(56742),r=n(51260),c=n(39160),a=n(60213),u=function(){var e=(0,c.d4)((function(e){return e.config.authDomain})),t=(0,r.RW)(),n=t.type===i.S9.USER,u=(0,r.om)(),d=(0,a.u)(),s=(0,l.W)();return(0,o.useCallback)((function(t){var o,l=t.uniqueSlug||t.id;if(t.isSeries)return"https://".concat(e).concat(u("ShowSeries",{postId:l}));if(null!==(o=t.sequence)&&void 0!==o&&o.slug)return"https://".concat(e).concat(u("ShowSequencePost",{sequenceSlug:t.sequence.slug,postId:l}));if(t.collection&&!n){var i=d({id:t.collection.id,domain:t.collection.domain,slug:t.collection.slug});return"".concat(i,"/").concat(l)}if(t.creator){var r=s(t.creator);return"".concat(r,"/").concat(l)}return"https://".concat(e).concat(u("ShowPost",{postId:l}))}),[t,u,d,s])},d=function(e){return u()(e)}},60213:(e,t,n)=>{n.d(t,{u:()=>r,z:()=>c});var o=n(96540),l=n(39160),i=n(79959),r=function(){var e=(0,l.d4)((function(e){return e.navigation.currentLocation})),t=(0,l.d4)((function(e){return e.config.authDomain})),n=(0,i.fo)();return(0,o.useCallback)((function(o){var l=o.id,i=o.domain,r=function(e){var t=e.id,n=e.slug;return n?"/".concat(n):"/c/".concat(t)}({id:l,domain:i,slug:o.slug});if(n)return"https://".concat(t).concat(r);try{var c=new URL(e).port;if(i)return"https://".concat(i).concat(c?":".concat(c):"")}catch(e){}return"https://".concat(t).concat(r)}),[n])},c=function(e){return r()(e)}},28899:(e,t,n)=>{n.d(t,{u:()=>g});var o=n(96540),l=n(60213),i=n(7580),r=n(90280),c=n(86975),a=n(12378),u=n(44402),d=n(18642),s=n(90383),m=function(e){return function(t){return{borderRadius:(0,a.c)(t.borderRadius.regular),width:(0,a.c)(e),height:(0,a.c)(e),backgroundColor:t.colorTokens.background.neutral.secondary.base}}},p=function(e,t){return function(n){return{borderRadius:(0,a.c)(n.borderRadius.regular),display:"block",height:"".concat(e,"px"),width:"".concat(e,"px"),position:"absolute",top:0,boxShadow:"inset 0 0 0 1px ".concat((0,d.qy)(.05)),":hover":{backgroundColor:t?(0,d.qy)(.1):"none"}}}},f=function(e){return{position:"relative",border:e?"2px solid white":void 0,borderRadius:e?"6px":void 0,display:e?"inline-block":"flex"}},g=function(e){var t=e.circular,n=e.collection,a=e.size,d=void 0===a?60:a,g=e.link,v=e.showHoverState,w=e.showBorder,E=void 0!==w&&w,b=(0,l.z)(n),h=(0,u.l)();if(!n||!n.avatar||!n.avatar.id)return null;var k=n.avatar.id,S=n.name||"Publication avatar",y=t?o.createElement(i.r,{miroId:k,alt:S,diameter:d,freezeGifs:!1,showHoverState:v}):o.createElement("div",{className:h(f(E))},o.createElement(r.pg,{rules:[m(d)],miroId:k,alt:S,width:d,height:d,strategy:s.qY.Crop}),o.createElement("div",{className:h(p(d,v))}));return g?o.createElement(c.D,{href:b},y):y}},87147:(e,t,n)=>{n.d(t,{E:()=>S});var o=n(80296),l=n(95420),i=n(96540),r=n(54239),c=n(26679),a=n(34208),u=n(2550),d=n(52764),s=n(86329),m=n(43634),p=n(15473),f=n(86527),g=n(52290),v=n(99731),w=n(72130),E=n(49287),b=n(51260),h=n(39160),k=n(46879),S=function(e){var t,n=e.buttonSize,k=e.buttonStyleFn,S=e.collection,x=e.post,C=e.simpleLink,R=e.susiEntry,I=void 0===R?"follow_card":R,D=e.preventParentClick,L=e.width,A=e.trackingV2,z=(0,h.d4)((function(e){return e.config.authDomain})),F=(0,u.A)().viewerId,N=(0,w.$L)(),T=(0,E.jI)(),V=(0,r.zy)(),U=(0,b.W5)(V.pathname),_=null==U||null===(t=U.route)||void 0===t?void 0:t.name,q=(0,s.J)(S),B=q.viewerEdge,P=q.loading,O=function(e,t){var n=(0,l.n)(a.j),r=(0,o.A)(n,1)[0];return i.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(t),isFollowing:!0}}},update:function(n){n.modify({id:"User:".concat(t),fields:{missionControl:(0,p.A4)("followedCollections",!0),followingCollectionConnection:(0,p.CQ)(e.id)}})}})}),[e.id])}(S,F),Z=function(e,t){var n=(0,l.n)(a.E),r=(0,o.A)(n,1)[0];return i.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(t),isFollowing:!1}}},update:function(e){e.modify({id:"User:".concat(t),fields:{missionControl:(0,p.A4)("followedCollections",!1)}})}})}),[e.id])}(S,F),W=i.useCallback((function(e){D&&e.preventDefault(),N.event("collection.followed",{collectionId:S.id,followSource:T,trackingV2:A,source:T}),O()}),[S,D,T,N,A]),M=i.useCallback((function(e){D&&e.preventDefault(),N.event("collection.unfollowed",{collectionId:S.id,followSource:T,trackingV2:A,source:T}),Z()}),[D,T,N,A]),j=!(null==B||!B.isFollowing),G=k?k(!!j):j?"OBVIOUS":"STRONG";return C?i.createElement(f.N,{onClick:j?M:W},i.createElement(g.a,{display:"flex",flexDirection:"row"},j?"Unfollow publication":"Follow publication")):i.createElement(d.c,null,(function(e){return e?i.createElement(v.$n,{size:n,onClick:j?M:W,buttonStyle:G,loading:P,width:L},j?"Following":"Follow"):i.createElement(m.r,{collection:S,buttonStyle:G,isButton:!0,buttonSize:n,operation:"register",actionUrl:y(z,S,x)||"",susiEntry:I,pageSource:(0,c.x)(_,"register"),buttonWidth:L},j?"Following":"Follow")}))},y=function(e,t,n){return t.slug&&(n&&n.id?(0,k.PdS)(e,t.slug,n.id):(0,k.xNA)(e,t.slug))}},43002:(e,t,n)=>{n.d(t,{w:()=>d});var o=n(96540),l=n(18599),i=n(60213),r=n(41299),c=n(86527),a=n(5600),u=n(36557),d=function(e){var t=e.collection,n=e.clamp,d=e.popoverPlacement,s=void 0===d?"bottom":d,m=e.scale,p=void 0===m?"M":m,f=e.testId,g=e.trackingV2,v=(0,i.z)(t),w=(0,o.useCallback)((function(){return o.createElement(l.a,{collection:t,trackingV2:g})}),[t,g]);return o.createElement(r.R,{placement:s,targetDistance:l.r,mouseLeaveDelay:100,mouseEnterDelay:a.A,popoverRenderFn:w,display:"block",noArrow:!0},o.createElement(c.N,{inline:!0,href:v,linkStyle:"SUBTLE",display:"flex",rules:{alignItems:"center"},"data-testid":f},o.createElement(u.kZ,{scale:p,color:"DARKER",clamp:n},t.name)))}}}]); //# sourceMappingURL=https://stats.medium.build/lite/sourcemaps/719.0e220795.chunk.js.map