(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9195],{62675:function(t,e,n){"use strict";n.r(e),n.d(e,{__N_SSP:function(){return P}});var a=n(50029),r=n(92777),s=n(82262),i=n(10748),l=n(45959),o=n(63553),c=n(37247),u=n(59499),p=n(87794),f=n.n(p),v=n(67294),d=n(8423),h=n(28201),g=n(67525),y=n(75182),T=n(90606),b=n(85893);function Z(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,a=(0,c.Z)(t);if(e){var r=(0,c.Z)(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return(0,o.Z)(this,n)}}var _=function(t){(0,l.Z)(n,t);var e=Z(n);function n(){var t;(0,r.Z)(this,n);for(var s=arguments.length,l=new Array(s),o=0;o<s;o++)l[o]=arguments[o];return t=e.call.apply(e,[this].concat(l)),(0,u.Z)((0,i.Z)(t),"state",{activeTag:null,activeType:null}),(0,u.Z)((0,i.Z)(t),"onUpdateFilters",function(){var e=(0,a.Z)(f().mark((function e(n){var a,r,s,i,l,o,c,u,p,v;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=n.type,r=n.tag,s=n.shallow,t.setState({activeType:a,activeTag:r}),s){e.next=5;break}return console.log("Refreshing page"),e.abrupt("return");case 5:return i=t.props,l=i.allTags,o=i.allTypes,c=i.author,u=i.page,p=(0,T.H5)({page:u,type:a,allTypes:o,tag:r,allTags:l}),e.next=9,(0,y.Zz)(p,c);case 9:v=e.sent,t.setState({articles:v.items,totalPages:Math.ceil(v.total/T.Wo)});case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),t}return(0,s.Z)(n,[{key:"componentDidMount",value:function(){var t=this.props,e=t.activeTag,n=t.activeType,a=t.articles,r=t.totalPages;this.setState({activeTag:e,activeType:n,articles:a,totalPages:r})}},{key:"render",value:function(){var t,e,n=this.props,a=n.site,r=n.title,s=n.description,i=n.shareImage,l=n.sections,o=n.author,c=n.page,u=n.bannerText,p=n.bannerCta,f=n.bannerLink,v=this.state,y=v.activeTag,T=v.activeType,Z=v.articles,_=v.totalPages,P=l[0],w=!!u,k=1===c&&P&&!o,m=l[1],x=null===m||void 0===m||null===(t=m.fields.subsections)||void 0===t?void 0:t[0],N=null===m||void 0===m||null===(e=m.fields.subsections)||void 0===e?void 0:e[1],R=(null===x||void 0===x?void 0:x.fields.items)||[],C=(null===N||void 0===N?void 0:N.fields.items)||[];return(0,b.jsxs)(d.Z,{site:a,title:r,description:s,shareImage:i,bannerText:u,bannerCta:p,bannerLink:f,showBanner:w,children:[k&&(0,b.jsx)(h.Z,{title:P.fields.subheader,articles:P.fields.subsections}),(0,b.jsx)(g.Z,{title:o?"Posts by ".concat(o.fields.name):"All Posts",articles:Z,author:o,page:c,totalPages:_,showTitle:!k,types:R,tags:C,activeTag:y,activeType:T,onUpdateFilters:this.onUpdateFilters})]})}}]),n}(v.PureComponent);_.defaultProps={description:null,sections:[],shareImage:null,articles:[],bannerText:null,bannerLink:null};var P=!0;e.default=_},57286:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/blog",function(){return n(62675)}])}},function(t){t.O(0,[9809,1812,9065,6139,8423,3167,9027,9774,2888,179],(function(){return e=57286,t(t.s=e);var e}));var e=t.O();_N_E=e}]);