(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[12],{J3ZC:function(t,e,a){"use strict";var i=a("KQm4"),n=a("ODXe"),o=a("rePB"),r=a("wx14"),c=a("o0o1"),s=a.n(c),l=a("HaE+"),p=a("1OyB"),u=a("vuIU"),h=a("ReuC"),d=a("Ji7U"),f=a("md7G"),b=a("foSv"),v=a("q1tI"),m=a.n(v),y=a("vDqi"),g=a.n(y),_=a("ffb8"),w=a("g4pe"),O=a.n(w),k=a("20a2"),x=a.n(k),j=a("y/aX"),P=a("qi/6"),S=a("PXD2"),C=a("nONW"),D=a("Jhzn"),N=a("fkzy"),E=m.a.createElement,I=function(t){var e=t.institute_metadata,a=t.email,i=t.phone,n=t.researcher_profile_count,o=t.cover_url,r=t.website,c=t.linkedin_url,s=t.scopus_url,l=t.scholar_url,p=t.host,u=t.unit_type,h=t._id,d=t.active_tab,f=t.tab_data,b=t.description,v=t.parent_is_root,m=t.parent_unit_id,y=[],g=f.publications;(!d||"overview"===d)&&(null===g||void 0===g?void 0:g.length)>0&&(y=g.map((function(t){return{"@id":"".concat(Object(N.c)(p,t._id),"#publication")}})));var _=Object(N.h)(p,u,h,d),w="";if(v){var O=Object(N.h)(p,u,m);w="".concat(O,"#unit")}else{var k=Object(N.b)(p);w="".concat(k,"#organization")}var x={"@context":"http://schema.org","@id":"".concat(_,"#unit"),"@type":"Organization",name:e.name,email:null!==a&&void 0!==a?a:"",telephone:null!==i&&void 0!==i?i:"",url:_,numberOfEmployees:n,mainEntityOfPage:{"@type":"WebPage","@id":_},description:b,subjectOf:y,sameAs:[r,c,s,l],image:{"@type":"ImageObject",url:o},parentOrganization:{"@id":w}};return E(D.a,{jsonKey:"jsonld-unit",jsonValue:x})},T=a("9kay"),R=a("Y3NA"),U=a("HOgx"),V=a("fINH"),L=a("vOnD"),F=m.a.createElement,z=L.b.img.withConfig({displayName:"UnitProfileImage__UnitProfileImageStyle",componentId:"sc-17v4hmq-0"})(["border-radius:4px;box-sizing:border-box;height:",";width:",";max-height:",";max-width:",";","{height:",";width:",";max-height:",";max-width:",";}"],"".concat(V.b.DESKTOP,"px"),"".concat(V.b.DESKTOP,"px"),"".concat(V.b.DESKTOP,"px"),"".concat(V.b.DESKTOP,"px"),U.i,"".concat(V.b.MOBILE,"px"),"".concat(V.b.MOBILE,"px"),"".concat(V.b.MOBILE,"px"),"".concat(V.b.MOBILE,"px")),Y=Object(L.b)(z).withConfig({displayName:"UnitProfileImage__UnitDefaultProfileImageStyle",componentId:"sc-17v4hmq-1"})(["",";padding:8px;"],Object(L.a)(U.b)),A=function(t){var e=t.unit_type,a=t.url,i=t.url_optimised,n=t.t,o=t.name,r=e.toLowerCase(),c=a||"/static/images/".concat(r,"-default.svg"),s=i||null,l=a?z:Y;return F("picture",null,!!s&&F("source",{srcSet:s,type:"image/webp"}),F("source",{srcSet:c}),F(l,{src:c,alt:n("common:alt-text-research-unit",{name:o})}))},q=a("ecLT"),M=a("zCFi"),H=m.a.createElement,B=Object(L.b)(q.a).withConfig({displayName:"UnitBrief__BriefSectionDiv",componentId:"sc-1yfqfjw-0"})(["height:max-content;"]),G=function(t){var e=t.publication_count,a=t.name,i=t.researcher_profile_count,n=t.cover_url,o=t.cover_url_optimised,r=t.unit_type,c=t._id,s=Object(T.useTranslation)("researcher-page").t,l=[{icon:"home-profiles-1",label:"".concat(i," ").concat(s("common:profile",{count:i})),href:Object(N.z)(r,c,"profiles")},{icon:"journals-1",label:"".concat(e," ").concat(s("common:publication",{count:e})),href:Object(N.z)(r,c,"publications")}];return H(B,{className:"section--col"},H(A,{url:n,url_optimised:o,t:s,unit_type:r,name:a.slice(.5)}),H(M.a,t),H("div",{className:"section-col container--stats"},l.map((function(t,e){return H(R.a,{item:t,key:e})}))))},K=a("Ff2n"),J=a("YFqc"),X=a.n(J),W=a("cfIY"),Z=a("Sigi"),$=m.a.createElement,Q=L.b.li.withConfig({displayName:"LeafDetailItem__LeafDetailItemStyle",componentId:"t2z7gq-0"})(["display:flex;flex-direction:row;align-items:center;word-break:break-all;.icon{margin-right:16px;color:#225381;display:flex;align-items:center;justify-content:center;}","{margin-bottom:12px;}"],U.i),tt=function(t){var e=t.item,a=e.icon,i=e.data,n=e.href,o=e.isExternal,r=void 0!==o&&o;if(!i||!n)return null;var c=r?"external":"_self",s=r?"nofollow":"";return $(Q,null,$(Z.a,{icon:a}),$("a",{href:n,rel:s,target:c},i))},et=a("ClUV"),at=a("PU7G"),it=a("U298"),nt=m.a.createElement,ot=Object(L.b)(et.a).withConfig({displayName:"UnitDetail__DetailSectionDiv",componentId:"sc-10supcn-0"})(["","{width:411px;}.name{margin-bottom:12px;}"],U.d),rt=L.b.div.withConfig({displayName:"UnitDetail__DetailSectionRow1",componentId:"sc-10supcn-1"})(["border-bottom:2px solid ",";padding-bottom:32px;margin-bottom:32px;.hod{&__name{margin-left:6px;}}","{flex-direction:column;padding-bottom:16px;margin-bottom:12px;.dot{display:none;}}"],W.a.BORDERS.DEFAULT,U.i),ct=L.b.ul.withConfig({displayName:"UnitDetail__DetailDetailList",componentId:"sc-10supcn-2"})(["list-style:none;margin:0;padding:0;"]),st=function(t){var e=t.scrollToSubscribeForm,a=Object(K.a)(t,["scrollToSubscribeForm"]),i=Object(T.useTranslation)("roles").t,n=a.name,o=a.institute_metadata,r=a.head_of_unit,c=a.phone,s=a.website,l=a.email,p=[{icon:"contact-phone-mobile",isExternal:!0,href:"tel:".concat(c),data:c},{icon:"email-envelope-contact-mail",isExternal:!0,href:"mailto:".concat(l),data:l},{icon:"www-website-address-contact-1",isExternal:!0,href:s,data:"Website"}],u=r?nt(X.a,Object(N.x)(r.researcher_id),nt("a",{className:"hod__name"},"".concat(r.first_name," ").concat(r.last_name))):null,h=r?nt(rt,{className:"section--col"},nt("span",{className:"section--row role"},o.name),nt("span",{className:"section--row hod"},i("Head of department"),o.allow_velocity_graph?nt(it.a,{linkEl:u,author:r}):u)):nt(rt,{className:"section--row"},nt("span",{className:"section--col role"},o.name));return nt(ot,{className:"section--col"},nt("span",{className:"section--col name h2"},n),h,nt(ct,null,p.map((function(t,e){return nt(tt,{item:t,key:e})}))),nt(at.a,{onClick:e}))},lt=a("pIRP"),pt=a("KjaH"),ut=a("JX7q"),ht=a("Vvt1"),dt=a.n(ht),ft=a("zPhz"),bt=a("Shqb"),vt=a("89ZD"),mt=a("Akfn"),yt=a("w0oZ"),gt=m.a.createElement;function _t(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function wt(t){for(var e=1;e0){t[0].year&&"no-year"!=t[0].year?a=this.getYear(t[0].year):(n=!0,t.length>1&&(a=this.getYear(t[1].year)));var o=t[t.length-1];o&&(i=this.getYear(o.year))}return 1==n&&e.push({label:"no-year"}),a&&(i&&a!=i?e=e.concat(this.getYearRange(a,i)):e.push({label:a.toString()})),e}},{key:"getChartData",value:function(t,e){var a=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=[],o=[],r=0,c=null,s=this.state.year,l=this.props.isMobile;return t.forEach((function(t){var p=t.label;if(p){var u,h=e[r],d=h.count,f=h.cumulative_count,b=h.year,v="no-year"==b?b:null===(u=a.getYear(b))||void 0===u?void 0:u.toString(),m="0";i&&v&&s&&(m=s.toString()==v?"1":"2"),v==p?(n.push(wt({value:d,color:"1"==m?"#fca311":"#033E69"},!l&&{link:"#"})),o.push({value:f}),r+=1,c=f):(n.push(wt({value:0},!l&&{link:"#"})),o.push({value:c}))}})),[n,o]}},{key:"getChartConfig",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this.state.velocity_type,i=this.props.isMobile,o=Object(N.t)(a),r=420,c=350;e&&!i&&(r=800,c=350),i&&(r=345,c=270);var s={type:"scrollcombidy2d",id:1==e?"expanded-chart":"minimised-chart",width:"".concat(r),height:"".concat(c),dataFormat:"json",dataSource:{chart:{legendPosition:"top",legendXPosition:"0",legendYPosition:"5%",legendItemFontSize:"11",legendNumRows:"1",animation:"0",yAxisValueDecimals:"0",sYAxisValueDecimals:"0",legendCaptionFontSize:6,labeldisplay:"rotate",scrollheight:"15",scrollPadding:"15",scrolltoend:"1",flatscrollbars:"0",scrollshowbuttons:"1",numvisibleplot:"10",drawcrossline:"0",seriesNameInToolTip:"1",theme:"fusion",showValues:"0",showToolTip:"1"},categories:[],dataset:[]}},l=this.getChartCategories(t),p=this.getChartData(l,t,e),u=Object(n.a)(p,2),h=u[0],d=u[1],f={seriesname:"".concat(o," per Year"),plottooltext:"$dataValue ".concat(o," in $label"),showValues:"0",data:h,color:"#033E69"},b={seriesname:"Total ".concat(o),plottooltext:"$dataValue total ".concat(o),parentYAxis:"S",renderAs:"line",showValues:"0",data:d};return s.dataSource.categories=[{category:l}],s.dataSource.dataset.push(f),s.dataSource.dataset.push(b),s}},{key:"getGraphEl",value:function(){var t=this.state,e=t.citation_velocity,i=t.publication_velocity,n=(t.velocity_type,this.props.isMobile),o=e;o=i;var r=this.getChartConfig(o),c=dt()((function(){return Promise.all([a.e(15),a.e(16),a.e(17)]).then(a.bind(null,"w04y"))}),{ssr:!1}),s=gt(c,{chartConfig:r,chartEventHandler:this.genericChartEventHandler,events:["dataPlotClick"],className:"minimised-graph"}),l=null;return n&&(l=gt(yt.a,{id:"mobile-graph-loader",className:"mobile-graph-loader"})),gt("div",{className:"mini-graph-container"},s,l)}},{key:"getExpandedGraphEl",value:function(){var t=this.state,e=t.citation_velocity,i=t.publication_velocity,n=t.fetchingData,o=(t.velocity_type,e);o=i;var r=null;if(n)r=gt(yt.b,null);else{var c=this.getChartConfig(o,!0),s=dt()((function(){return Promise.all([a.e(15),a.e(16),a.e(17)]).then(a.bind(null,"w04y"))}),{ssr:!1});r=gt(s,{chartConfig:c,chartEventHandler:this.genericChartEventHandler,events:["dataPlotClick"]})}return gt("div",{className:"expanded-graph-container"},r)}},{key:"toggleGraph",value:function(t){this.setState({velocity_type:t}),1==this.state.modalOpen&&this.getVelocityData(void 0,void 0,t)}},{key:"closePopup",value:function(){this.setState({modalOpen:!1,year:null}),this.routeToResearcherPage()}},{key:"componentDidMount",value:function(){var t=this.props,e=t.initVelocityType,a=t.initYear;e&&(this.setState({velocity_type:e}),this.expandResearcherVelocity(a))}},{key:"routeToResearcherPage",value:function(){var t=this.props,e=t.unit_id,a=t.unit_type,i=null===a||void 0===a?void 0:a.toLowerCase(),n="/unit/".concat(i,"/").concat(e,"/"),o={pathname:"/unit/[unitType]/[unitId]/",query:{unitId:e,unitType:i}};x.a.push(o,n,{shallow:!0})}},{key:"shallowUpdateUrlParams",value:function(){var t=this.props,e=t.unit_id,a=t.initYear,i=t.unit_type,n=this.state,o=n.velocity_type,r=n.year,c=null===i||void 0===i?void 0:i.toLowerCase(),s="/unit/".concat(c,"/").concat(e,"/graph/").concat(o),l={pathname:"/unit/[unitType]/[unitId]/",query:{unitId:e,unitType:c}};(r||a)&&(s+="/".concat(r||a)),x.a.push(l,s,{shallow:!0})}},{key:"fetchVelocityData",value:function(){var t=Object(l.a)(s.a.mark((function t(e,a,i){var n,o,r,c,l,p,u,h;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=this.props,o=n.unit_id,r=n.unit_type,c=this.state.velocity_type,l={velocity_type:i||c},e&&(l.page=e.toString()),a&&(l.year=a),p=Object(N.p)(),u="/api/research-unit/".concat(r,"/").concat(o,"/velocity"),t.next=9,g.a.post(u,l,p);case 9:return h=t.sent,t.abrupt("return",h.data);case 11:case"end":return t.stop()}}),t,this)})));return function(e,a,i){return t.apply(this,arguments)}}()},{key:"getVelocityData",value:function(){var t=Object(l.a)(s.a.mark((function t(e,a,i){var n;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.setState({fetchingData:!0}),t.next=3,this.fetchVelocityData(e,a,i);case 3:n=t.sent,this.setState(wt(wt({},n),{},{fetchingData:!1})),this.shallowUpdateUrlParams();case 6:case"end":return t.stop()}}),t,this)})));return function(e,a,i){return t.apply(this,arguments)}}()},{key:"expandResearcherVelocity",value:function(t){this.props.isMobile||(this.setState({modalOpen:!0}),this.getVelocityData(1,t))}},{key:"getVelocityControls",value:function(){var t=this,e=null;return 1!=this.state.fetchingData&&(e=gt(xt,{className:1==this.state.modalOpen?"contol-expanded":""},gt(jt,{className:"publications"==this.state.velocity_type?"active":"",onClick:function(e){e.stopPropagation(),t.toggleGraph("publications")}},gt("input",{id:"radio-pub",type:"radio",name:"velocityType",value:"publications",checked:"publications"==this.state.velocity_type,onChange:function(e){e.stopPropagation(),t.toggleGraph(e.target.value)}}),gt(Pt,{src:"https://d5a9y5rnan99s.cloudfront.net/tds-static/images/journals-icon.svg",alt:"Journal"}),gt("span",{className:"velocity-label"},"Publications - ",this.props.publication_count)))),e}},{key:"handlePageClick",value:function(){var t=Object(l.a)(s.a.mark((function t(e){var a;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e&&(a=this.state.year,this.getVelocityData(e,a||""));case 1:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"getPaginationEl",value:function(){var t=this.state.authors||{},e=t.hits,a=t.page,i=t.page_range,n=t.next_page,o=t.previous_page,r=5*(a-1)+1;return e>5?gt("div",{className:"container-pagination"},gt("span",{className:"container-pagination__text-showing"},this.props.t("common:pagination-showing-text",{start:r,end:r+5-1,count:e})),gt(vt.b,{pageClickHandler:this.handlePageClick,page_range:i,page:a,next_page:n,previous_page:o})):null}},{key:"removeYearFilter",value:function(t){var e=this.state.velocity_type;null===t||void 0===t||t.stopPropagation(),this.getVelocityData(void 0,void 0,e)}},{key:"getPopupStat",value:function(){var t=this.state,e=t.velocity_type,a=t.authors,i=t.year,n=t.publication_count,o=t.citation_count,r=(a||{}).hits,c=null,s="";if(r){if("citations"==e){var l=o&&o>1?"Citations":"Citation";s="".concat(o||""," Total ").concat(l," by ").concat(r," faculty"),i&&(s="".concat(o||""," ").concat(l," by ").concat(r," faculty"))}if("publications"==e){var p=n&&n>1?"Publications":"Publication";s="".concat(n||""," Total ").concat(p," by ").concat(r," faculty"),i&&(s="".concat(n||""," ").concat(p," by ").concat(r," faculty"))}c=gt("div",{className:"publication-stat"},s),i&&(c=gt("div",{className:"publication-stat"},s,gt("span",{className:"year-filter",onClick:this.removeYearFilter}," in ".concat(i),gt(Z.a,{icon:"close"}))))}return c}},{key:"getCardContents",value:function(){var t,e,a=this.state,i=a.year,n=a.fetchingData,o=a.velocity_type,r="citations"==o,c="publications"==o;return n?gt(yt.c,null):gt("div",{className:"author-list"},this.getPopupStat(),gt("div",{className:"publications-container"},gt(mt.a,{host_institute_name:null===(t=this.state.institute_metadata)||void 0===t?void 0:t.name,items:(null===(e=this.state.authors)||void 0===e?void 0:e.data)||[],showPublicationLink:c,showCitationLink:r,citationForYear:i||"",publicationForYear:i||""})))}},{key:"getPopupEl",value:function(){return gt(ft.a,{open:this.state.modalOpen,closeOnDocumentClick:!0,contentStyle:Tt,overlayStyle:It,modal:!0,arrow:!0,onClose:this.closePopup},gt(St,null,gt(Et,{className:"close-button",onClick:this.closePopup,"data-testid":"researcher-graph-expanded-modal-btn-close"},gt(Z.a,{icon:"close"})),gt("div",{className:"body"},gt(Ct,null,gt("div",{className:"title"},this.props.name)),gt(Dt,null,gt("div",{className:"body-container"},this.getExpandedGraphEl(),this.getVelocityControls(),this.getCardContents())),gt(Nt,null,this.getPaginationEl()))))}},{key:"genericChartEventHandler",value:function(t,e){if(t){t.stopPropagation(),t.preventDefault();var a=this.state,i=a.modalOpen,n=a.year,o=a.velocity_type;"dataplotclick"==t.type&&0==e.datasetIndex&&(i?n&&n.toString()==e.categoryLabel?this.getVelocityData(void 0,void 0,o):this.getVelocityData(1,e.categoryLabel):this.expandResearcherVelocity(e.categoryLabel))}}},{key:"render",value:function(){return gt(kt,null,this.getVelocityControls(),this.getGraphEl(),this.getPopupEl())}}]),i}(m.a.Component),Ut=a("F+HJ"),Vt=a("6EXI"),Lt=a("X68V"),Ft=a("SjCF"),zt=a("9Dx3"),Yt=m.a.createElement;function At(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function qt(t){for(var e=1;e0||!!r&&r.length>0;return c&&l&&(s=Yt(Rt,{citation_velocity:this.props.citation_velocity,publication_velocity:this.props.publication_velocity,citation_count:this.props.citation_count,publication_count:this.props.publication_count,isMobile:t,t:this.props.t,unit_id:this.props._id,unit_type:this.props.unit_type,name:this.props.name,initVelocityType:this.props.velocityType,initYear:this.props.velocityYear})),s}},{key:"renderHeroContent",value:function(){var t=this.isMobile(),e=Yt("div",{className:"section--row researcher-hero-content"},Yt(G,this.props),Yt(st,Object(r.a)({},this.props,{scrollToSubscribeForm:this.scrollToSubscribeForm})),Yt("div",{className:"desktop-velocity"},this.getUnitVelocity()));return t&&(e=Yt("div",{className:"section--col"},Yt("div",{className:"section--row researcher-hero-content"},Yt(G,this.props),Yt(st,Object(r.a)({},this.props,{scrollToSubscribeForm:this.scrollToSubscribeForm}))," "),Yt("div",{className:"section--row mobile-velocity"},this.getUnitVelocity()))),e}},{key:"getUrlForResearchUnit",value:function(t,e){return"/unit/".concat(t,"/").concat(e)}},{key:"getTabData",value:function(){var t=this.props,e=t.t,a=t.unit_type,i=t._id,n=t.researcher_profile_count,o=t.network_profile_count,r=t.network_unit_count,c=t.publication_count,s=t.concept_count,l=t.similar_count,p=0;return o&&(p+=o),r&&(p+=r),qt(qt(qt(qt({overview:{id:"overview",label:e("header-overview"),path:Object(N.z)(a,i)}},!!n&&{profiles:{id:"profiles",label:e("common:profile_plural"),count:n,path:Object(N.z)(a,i,"profiles")}}),{},{publications:{id:"publications",label:e("common:publication_plural"),count:c,path:Object(N.z)(a,i,"publications")}},!!s&&{concepts:{id:"concepts",label:e("common:concept_plural"),count:s,path:Object(N.z)(a,i,"concepts")}}),!!p&&{network:{id:"network",label:e("header-network"),count:p,path:Object(N.z)(a,i,"network")}}),!!l&&{similar:{id:"similar-units",label:e("header-similar-profiles"),count:l,path:Object(N.z)(a,i,"similar-units")}})}},{key:"renderOverviewNetwork",value:function(t,e,a){var i=this.props,n=i.tab_data,o=i.t,r=n.network,c=r.profiles,s=r.research_units;if(c.length<=0&&s.length<=0)return null;var l=o("header-network"),p=0;return e&&(p=e),a&&(p+=a),Yt("div",{className:"section__content"},this.renderOverviewHeader(l,t,p),Yt(Lt.a,{profile_count:e,unit_count:a,profiles:c,units:s,hideShowMore:!0}))}},{key:"renderOverview",value:function(){var t=this,e=this.props,a=e.profile,i=e.related_units,n=e.unit_type,o=e._id,r=e.researcher_profile_count,c=e.network_profile_count,s=e.network_unit_count,l=e.publication_count,p=e.concept_count,u=i.map((function(e){return{name:e.name,url:t.getUrlForResearchUnit(e.unit_type,e._id)}}));return Yt("div",null,Yt("div",{className:"section__content section__content--info"},this.renderProfile(a),this.renderExternalLinks(u)),this.renderOverviewProfiles(Object(N.z)(n,o,"profiles"),r),this.renderOverviewPublications(Object(N.z)(n,o,"publications"),l),this.renderOverviewConcepts(Object(N.z)(n,o,"concepts"),p),this.renderOverviewNetwork(Object(N.z)(n,o,"network"),c,s),this.renderOverviewSimilar())}},{key:"handlePublicationSearch",value:function(t){var e={filter_type:"unit_ids",filter_key:this.props._id};x.a.push({pathname:"/search",query:qt({tab:"manuscripts",search:t},Object(N.o)([e]))})}},{key:"handlePublicationSort",value:function(t){var e=this.props,a=e.unit_type,i=e._id,n=this.props.tab_data,o=n.page;if(n.active_sort!==t){var r="/unit/".concat(a,"/").concat(i,"/publications/").concat(o);x.a.push({pathname:r,query:{sort:t}})}}},{key:"renderNetwork",value:function(){var t=this.props,e=t.network_profile_count,a=void 0===e?0:e,i=t.network_unit_count,n=void 0===i?0:i,o=this.state.clientSide?this.state:this.props.tab_data.data,r=o.research_units,c=o.profiles;if(a<=0&&n<=0)return this.renderEmptyNetwork();var s=0;a&&(s=a),n&&(s+=n);var l=s?"(".concat(s,")"):"";return Yt("div",null,Yt(S.c,null,this.props.t("header-network")," ",l),Yt("div",{className:"section__content"},Yt(Lt.a,{profile_count:a,unit_count:n,profiles:c,units:r,useCardStyle:!0,showHoverCard:this.props.institute_metadata.allow_velocity_graph,showAll:this.handleClientSideDataFetch,isLoading:this.state.isLoading})))}},{key:"renderProfiles",value:function(){var t=this.props.researcher_profile_count,e=this.state.clientSide?this.state.researcher_profiles:this.props.tab_data.data;return t<=0?this.renderEmptyProfiles():Yt("div",null,Yt(S.c,null,this.props.t("common:profile_plural")," (",t,")"),Yt("div",{className:"section__content"},Yt(Ft.a,{items:e,showHoverCard:this.props.institute_metadata.allow_velocity_graph}),this.state.isLoading?Yt(zt.b,null):e.length0)if(u.length>1){var d=Object(n.a)(u,2),f=d[0],b=d[1];h=" Publications: ".concat(f.title,", ").concat(b.title,".")}else{var v=Object(n.a)(u,1)[0];h=" Publications: ".concat(v.title,".")}return"This lists ".concat(null!==o&&void 0!==o?o:0," publications of ").concat(r," profiles at ").concat(l,", ").concat(p,".").concat(h);case"profiles":return"This lists all profiles associated with the research output of ".concat(l," at ").concat(p,".");case"concepts":var m=this.props.tab_data.data,y=this.stringifyConceptsForMeta(3,"Concepts",m,o);return"This lists all concepts associated with the research output of ".concat(l," at ").concat(p,". ").concat(y);case"network":return"This lists all profiles and research units in the networks associated with ".concat(l,", ").concat(p,". View all similar research output in this unit's network");case"similar-units":return"This lists all similar units associated with ".concat(l," at ").concat(p,". View all related researchers working in this author's network.");default:var g="At ".concat(e.name,".");g="".concat(g," The unit contains ").concat(r," researchers"),g=o&&o>0?"".concat(g," with ").concat(o," publications."):"".concat(g,".");var _=this.props.tab_data.concepts,w=this.stringifyConceptsForMeta(3,"Area of Research:",_,o);return g="".concat(g," ").concat(w),c&&(g="".concat(g," HOD: ").concat(c,".")),s&&(g="".concat(g," Email: ").concat(s)),g}}},{key:"getPageURL",value:function(){var t=this.props,e=t.active_tab,a=t.unit_type,i=t._id,n=t.host;return Object(N.h)(n,a,i,e)}},{key:"renderIndexMeta",value:function(){var t=this.props,e=t.active_tab,a=t.publication_count,i=t.institute_metadata.allow_indexing,n=Yt(_.NextSeo,{noindex:!0,nofollow:!0});if(1!=i)return n;switch(n=Yt(_.NextSeo,{noindex:!0,nofollow:!1}),e){case"similar-units":case"network":case"concepts":return n;case"publications":return null===a||void 0===a||a?n:null;default:return null}}}],[{key:"getInitialProps",value:function(){var t=Object(l.a)(s.a.mark((function t(e){var n,o,r,c,l,p,u,d,f;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,n={},o=e.query.unitId,r=e.query.unitType,e.query.tabId&&(n.active_tab=e.query.tabId,"network"!==n.active_tab&&"profiles"!==n.active_tab||(n.limit=20)),e.query.page&&(n.page=+e.query.page),e.query.sort&&(n.sort=e.query.sort),c=e.query,l=c.velocityType,p=c.year,t.next=10,a.getUnitLeafData(r,o,n,e.req);case 10:return u=t.sent,d=qt(qt(qt(qt({},u),{velocityType:l,velocityYear:p}),n),{},{host:Object(N.k)(e.req),namespacesRequired:[].concat(Object(i.a)(Object(h.a)(Object(b.a)(a),"getCommonNamespaces",this).call(this)),["research-unit"])}),lt.a.log("Successfully fetched data for page base"),t.abrupt("return",d);case 16:throw t.prev=16,t.t0=t.catch(0),(f=new Error("Bad data or not found for Unit leaf page")).name="".concat(t.t0.response.status),f;case 21:case"end":return t.stop()}}),t,this,[[0,16]])})));return function(e){return t.apply(this,arguments)}}()},{key:"getUnitLeafData",value:function(){var t=Object(l.a)(s.a.mark((function t(e,a,i,n){var o,r,c;return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=Object(N.p)(n),r="/api/research-unit/".concat(e,"/").concat(a),t.next=4,g.a.post(r,i,o);case 4:return c=t.sent,t.abrupt("return",c.data);case 6:case"end":return t.stop()}}),t)})));return function(e,a,i,n){return t.apply(this,arguments)}}()}]),a}(S.a);e.a=Object(pt.b)("research-unit")(Bt)}}]);