1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[80,1801],{12973:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,b:()=>d});var a=n(3576),i=n(62701),r=n(65699),s=n(14232),o=n(63887),l=n.n(o),c=e=>{var{className:t,text:n="",tag:o="div",id:c=""}=e,d=(0,r._)(e,["className","text","tag","id"]);return(0,s.createElement)(o,(0,i._)((0,a._)({id:c,className:"".concat(l()["formatted-text"]," ").concat(t),"data-component":"formatted-text"},d),{dangerouslySetInnerHTML:{__html:n}}))},d=e=>{var t=(0,s.useRef)(null);return(0,s.useLayoutEffect)(()=>{if(t.current){var n=document.createRange();n.selectNode(t.current);var a=n.createContextualFragment(e.text);t.current.innerHTML="",t.current.append(a)}},[]),c((0,i._)((0,a._)({},e),{ref:t}))};let u=e=>c(e)},15039:(e,t)=>{var n;!function(){"use strict";var a={}.hasOwnProperty;function i(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=r(e,function(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return i.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)a.call(e,n)&&e[n]&&(t=r(t,n));return t}(n)))}return e}function r(e,t){return t?e?e+" "+t:e+t:e}e.exports?(i.default=i,e.exports=i):void 0===(n=(function(){return i}).apply(t,[]))||(e.exports=n)}()},32723:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>A});var a=n(16927),i=n(3576),r=n(62701),s=n(37876),o=n(14232),l=n(95062),c=n.n(l),d=n(89099),u=n(77328),p=n.n(u),g=n(93833),m=n(5051),h=n(57328),_=n(67089),f=n.n(_);class y extends o.Component{componentDidMount(){this.onWindowResize(),window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){window.removeEventListener("resize",this.onWindowResize)}onWindowResize(){var{isMobile:e}=this.state;h.ie("md")&&e&&this.setState({isMobile:!1}),h.Pj("md")&&!e&&this.setState({isMobile:!0})}render(){var{totalPages:e,currentPage:t}=this.props,{isFetching:n}=this.state;return(0,s.jsx)("div",{className:"paginator ".concat(f().paginator),children:(0,s.jsx)("div",{className:"container",children:(0,s.jsxs)("div",{className:"d-flex justify-content-center justify-content-md-between",children:[(0,s.jsx)("div",{className:"d-none d-md-block ".concat(1===t?"invisible":""),children:(0,s.jsx)(g.A,{type:"secondary",isOutlined:!0,isDisabled:n,onClick:()=>this.onPageChangeRequest(t-1),className:"paginator--button paginator-prev--button",children:"\xab Previous"})}),(0,s.jsx)("div",{className:"text-center",children:n?(0,s.jsx)("div",{className:"spinner-container",children:(0,s.jsx)(m.A,{color:"turquoise"})}):(0,s.jsx)(this.PageIndicators,{})}),(0,s.jsx)("div",{className:"d-none d-md-block ".concat(t===e?"invisible":""),children:(0,s.jsx)(g.A,{type:"secondary",isOutlined:!0,isDisabled:n,onClick:()=>this.onPageChangeRequest(t+1),className:"paginator--button paginator-next--button",children:"Next \xbb"})})]})})})}constructor(e){super(e),this.PERIOD="...",this.onPageChangeRequest=e=>{var{onPageChange:t}=this.props;if("number"==typeof e||!e.active){var n="number"==typeof e?e:e.jumpTo||e.page;this.setState({isFetching:!0}),t(n).then(()=>{this.setState({isFetching:!1})})}},this.PageIndicators=()=>{var{totalPages:e,currentPage:t}=this.props,{isMobile:n}=this.state,a=n=>[n-1,n,n+1].map(n=>{var a=t+n;return{page:a,active:a===t,clickable:!0,isBoundary:1===a||a===e}}),i=a(0);return 1===t&&(i=a(1)),t===e&&(i=a(-1)),n||(t>3&&i.unshift({page:this.PERIOD,jumpTo:t-2}),t<e-2&&i.push({page:this.PERIOD,jumpTo:t+2}),i.unshift({page:1,active:1===t}),i.push({page:e,active:t===e}),i=(i=i.filter(e=>!e.isBoundary)).filter(t=>t.page===this.PERIOD||t.page>=1&&t.page<=e)),i.map((e,t)=>(0,s.jsx)("div",{className:"page-indicator ".concat(e.active?"active":""),onClick:()=>this.onPageChangeRequest(e),onKeyDown:()=>this.onPageChangeRequest(e),children:(0,s.jsx)("p",{children:e.page})},"".concat(e.page,"-").concat(t)))},this.state={isFetching:!1,isMobile:!1},this.onWindowResize=this.onWindowResize.bind(this)}}y.propTypes={totalPages:c().number.isRequired,currentPage:c().number.isRequired,onPageChange:c().func.isRequired};var v=n(73484),b=n(14458),x=n(74522),P=n(68406),j=n(60563),w=n(62488),C=n(997),R=n.n(C),E=n(70190),N=n(55764),q=n.n(N),S=n(98361);n(80080);var{parse:T}=n(3305),k=n(71673)("cw:pages:_dynamic-listing.js");class D extends o.Component{static getInitialProps(e){return(0,a._)(function*(e){var{query:t,res:n}=e,a={statusCode:200,title:"",data:{},pager:{}},{type:s,value:o,page:l}=t;if(!["type","country","topic","programme","author"].includes(s))return k("Page type %s is not allowed page type for dynamic listings page",s),n&&n.status(404),a.statusCode=404,a;try{var c={items_per_page:9,page:l&&l>0?l-1:0};c["type"===s?"type[]":s]=o;var d=yield R()("/rest/list/content",{query:(0,r._)((0,i._)({},c),{_format:"json"})});if(0===d.body.length)return k("Dynamic page returned 404 because backend caught invalid filters data for query: %o",c),n&&n.status(404),a.statusCode=404,a;var{results:u,pager:p}=d.body;if(0===u.length)return k("Dynamic page returned 404 because backend returned no data matching query: %o",c),n&&n.status(404),a.statusCode=404,a;var g=o.replace(/[_-]/g," ");a.title="type"===s?({news:"News",story:"Stories",publication:"Publications",press_release:"Press releases"})[o]:g,a.data={isMobileCollapsed:!1,items:u.map(e=>{var t={};return t.url={url:e.url,is_external:!1,entity_type:"node",entity_bundle:e.type},{type:e.type_label?e.type_label:"",title:e.title?q()(String(e.title)):"",description:e.description?e.description:"",image:S.getPicture
1({field_media_image:[{image_styles:{original:q()(String(e.image_original))},alt:e.image_alt||""}]},"field_media_image",{"min-xs":{"1x":"dynamic_listing"}},"dynamic_listing"),nextLink:(0,E.getEntityURL)(t),timestamp:e.created?Number.parseInt(e.created,10):0,isDesktopDescriptionHidden:!1,isMobileDescriptionHidden:!1}})},p?a.pager={currentPage:p.current_page+1,totalPages:p.pages}:a.pager={currentPage:1,totalPages:1}}catch(e){k(e),n&&n.status(502),a.statusCode=502}return a}).apply(this,arguments)}onPageChange(e){return(0,a._)(function*(){var{router:t}=this.props,n=(0,r._)((0,i._)({},t.query),{page:e}),a=T(t.asPath,!0),s=(0,r._)((0,i._)({},a.query),{page:e});t.push({pathname:t.pathname,query:n},{pathname:a.pathname,query:s}).then(()=>(0,w.P)({elementId:"dynamic-listing",offset:20}))}).call(this)}render(){var{title:e,breadcrumbs:t,data:n,pager:a}=this.props;return(0,s.jsxs)(j.A,{id:"dynamic-listing",children:[(0,s.jsx)(p(),{children:(0,s.jsx)("meta",{name:"robots",content:"noindex"})}),(0,s.jsx)(P.A,{main:[(0,s.jsx)(x.A,{breadcrumbs:{links:t}},"breadcrumbs"),(0,s.jsx)(v.A,{title:e,Tag:"h1",style:{textTransform:"capitalize"}},"heading")]}),(0,s.jsx)(b.A,(0,i._)({},n)),a&&a.totalPages>1&&(0,s.jsx)(y,(0,r._)((0,i._)({},a),{onPageChange:this.onPageChange}))]})}constructor(e){super(e),this.onPageChange=this.onPageChange.bind(this)}}D.propTypes={router:c().shape(),title:c().string,breadcrumbs:c().arrayOf(c().shape({label:c().string,nextLink:c().shape({href:c().string,as:c().string})})),data:c().shape({title:c().string,description:c().string,image:c().shape({url:c().string,alt:c().string}),url:c().string,type:c().string,tags:c().arrayOf(c().string),timestamp:c().number}),pager:c().shape({totalPages:c().number.isRequired,currentPage:c().number.isRequired,onPageChange:c().func})},D.defaultProps={router:null,title:"",breadcrumbs:null,data:null,pager:null};let A=(0,d.withRouter)(D)},33479:e=>{e.exports={landing:"landing__4Dsq0","landing__with-parallax-effect":"landing__with-parallax-effect__P2SHr",bb:"bb__Sli_0",landing__full_motion:"landing__full_motion__WosHt",landing__scrolled:"landing__scrolled__S9C_F"}},33864:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_dynamic-listing",function(){return n(32723)}])},60563:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var a=n(3576),i=n(62701),r=n(65699),s=n(37876),o=n(14232),l=n(95062),c=n.n(l),d=n(33479),u=n.n(d),p=e=>{var{children:t,isParallaxEffectEnabled:n=!1}=e,l=(0,r._)(e,["children","isParallaxEffectEnabled"]),[c,d]=(0,o.useState)(!1),[p,g]=(0,o.useState)(!1);return(0,o.useLayoutEffect)(()=>{window.scrollY>5&&d(!0),g(window.matchMedia("(prefers-reduced-motion: reduce)").matches)},[]),(0,s.jsx)("div",(0,i._)((0,a._)({className:"page landing ".concat(u().landing," ").concat(n?u()["landing__with-parallax-effect"]:""," ").concat(c?u().landing__scrolled:u()["landing__not-scrolled"]," ").concat(p?u().landing__reduce_motion:u().landing__full_motion)},l),{children:t}))};p.propTypes={isParallaxEffectEnabled:c().bool};let g=p},62488:(e,t,n)=>{"use strict";n.d(t,{P:()=>a});var a=e=>{var{elementId:t,scrollableAreaId:n=null,offset:a=90,toBottom:i=!1,callback:r=()=>{}}=e;setTimeout(()=>{var e,s=document.getElementById(t);if(s){var o=s.getBoundingClientRect();if(e=null!==n?document.getElementById(n):document.scrollingElement||document.documentElement){var l=e.scrollTop+(i?o.bottom:o.top)-a;(e=>{var{element:t,to:n=0,duration:a=500,callback:i=()=>{}}=e,r=t.scrollTop,s=n-r,o=0,l=()=>{t.scrollTop=((e,t,n,a)=>(e/=a/2)<1?n/2*e*e+t:-n/2*((e-=1)*(e-2)-1)+t)(o+=20,r,s,a),o<a&&t.scrollTop!==n?setTimeout(l,20):i()};l()})({element:e,to:l}),r(s)}}},50)}},63887:e=>{e.exports={"formatted-text":"formatted-text__v3_El"}},67089:e=>{e.exports={paginator:"paginator__v_H2x"}},80080:()=>{}},e=>{e.O(0,[2911,9357,4215,6820,6396,636,6593,8792],()=>e(e.s=33864)),_N_E=e.O()}]); 2//# sourceMappingURL=_dynamic-listing-43f5c6bafe2c4d6c.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.