(self.webpackChunknisje=self.webpackChunknisje||[]).push([[5261],{30233:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return F}});var n=r(22122),a=r(6610),i=r(5991),c=r(10379),s=r(46070),o=r(77608),l=r(63027),u=r(14890),m=r(37974),d=r(63804),f=r(33163),h=r(97011),p=r(45876),v=r(66168),g=function(){return(0,l.createElement)("div",{className:"grid-item"},(0,l.createElement)("div",{className:"grid-item-inner grid-item-padding grid-item-loader"},(0,l.createElement)("div",{className:"box-loader animated-background-light"}),(0,l.createElement)("div",{className:"box-loader animated-background-light"})),(0,l.createElement)("span",{className:"grid-item-shadow"}))},E=function(e){var t=e.size,r=void 0===t?6:t,n=e.className;return(0,l.createElement)("div",{className:(0,v.classnames)("grid",n)},new Array(r).fill(0).map((function(e,t){return(0,l.createElement)(g,{key:"loader-box-".concat(t)})})))},y=r(17122),N=r(37035),k=r(12470),Z=r.n(k),w=r(9974),R=r(58052),_=r.n(R),b=r(63842),A=r(849),P=r(12940),x=r.n(P),L=r(64718),j=(0,A.withViewportMatch)({isLarge:"small"})((function(e){var t=e.author,r=e.children,a=e.showAuthorLink,i=void 0===a||a,c=e.showAvatar,s=void 0===c||c,o=e.isLarge;if(!t)return null;var u=(0,v.classnames)("author",{"no-avatar":!s}),m=t.id||t.ID,d=t.name||t.display_name,f="span",h={};return i&&(f=b.Link,h.to="/members/".concat(m)),(0,l.createElement)("div",{className:u},(0,l.createElement)("div",null,(0,l.createElement)(f,(0,n.Z)({className:"author-link"},h),s&&(0,l.createElement)(x(),{id:m,size:o?40:30}),(0,l.createElement)(L.Z,{className:"author-name"},d)),r&&(0,l.createElement)("span",{className:"author-extra-info"},r)))}));var B=function(e){(0,c.Z)(u,e);var t,r,n=(t=u,r=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(e){return!1}}(),function(){var e,n=(0,o.Z)(t);if(r){var a=(0,o.Z)(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return(0,s.Z)(this,e)});function u(){return(0,a.Z)(this,u),n.apply(this,arguments)}return(0,i.Z)(u,[{key:"render",value:function(){var e=this.props,t=e.title,r=e.content,n=e.retriever,a=e.date,i=e.className,c=e.author;return(0,l.createElement)("div",{className:i},(0,l.createElement)("div",{className:"grid-item-inner"},(0,l.createElement)("div",{className:"grid-item-padding"},(0,l.createElement)(j,{author:c,showAuthorLink:!1,showAvatar:!1},Z()(a).format("LL"))),(0,l.createElement)("div",{className:"grid-item-padding"},(0,l.createElement)(L.Z,{className:"listing-title",tag:"h2"},t.rendered),(0,l.createElement)("span",null,(0,l.createElement)(_(),{convertNewline:!0},r.rendered))),(0,l.createElement)("a",{className:"grid-item-link",href:(0,v.decodeEntities)(n.link),rel:"noopener noreferrer",target:"_blank"},(0,l.createElement)(w.VisuallyHidden,{as:"span"},(0,f.__)("Read article")))))}}]),u}(d.Component);B.defaultProps={className:"grid-item retriever",showAuthor:!1,author:{id:"retriever",name:"Retriever"}};var C=B;var S=function(e){(0,c.Z)(m,e);var t,r,u=(t=m,r=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(e){return!1}}(),function(){var e,n=(0,o.Z)(t);if(r){var a=(0,o.Z)(this).constructor;e=Reflect.construct(n,arguments,a)}else e=n.apply(this,arguments);return(0,s.Z)(this,e)});function m(){var e;(0,a.Z)(this,m);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=u.call.apply(u,[this].concat(r))).state={search:""},e.renderPosts=function(e){return e.map((function(e){return(0,l.createElement)(C,(0,n.Z)({key:"retriever-archive-".concat(e.id)},e))}))},e.renderSearch=function(t){e.setState({search:t})},e}return(0,i.Z)(m,[{key:"noPostsFound",value:function(){var e=this.state.search,t=e?(0,f.sprintf)((0,f.__)('No articles found when searching for "%s"'),e.trim()):(0,f.__)("No articles found.");return(0,l.createElement)(y.Z,{title:t})}},{key:"render",value:function(){var e=this.state.search,t={per_page:18,context:"view"},r=this.props.page;return r&&(t.page=r),e&&(t.search=e),(0,l.createElement)(l.Fragment,null,(0,l.createElement)(h.Header,{title:(0,f.__)("Retriever"),onSearch:this.renderSearch}),(0,l.createElement)(N.Z,{className:"grid",dispatch:this.props.receiveArticles,loader:(0,l.createElement)(E,null),meta:this.responseMeta,noPosts:this.noPostsFound(),paginationPath:"/retriever",path:"/wp-json/wp/v2/nisje-retriever",query:t,render:this.renderPosts}))}}]),m}(d.Component),F=(0,m.$j)((function(e,t){return{page:t.match.params.page}}),(function(e){return(0,u.DE)({receiveArticles:p.lh},e)}))(S)}}]);