(window.__LOADABLE_LOADED_CHUNKS__=window.__LOADABLE_LOADED_CHUNKS__||[]).push([[3],{314:function(e,t,a){"use strict";a.d(t,"b",(function(){return m})),a.d(t,"c",(function(){return w})),a.d(t,"a",(function(){return j}));var r=a(0),l=a.n(r),n=a(1),i=a.n(n),o=a(32),c=a(69);const s=e=>l.a.createElement(l.a.Fragment,null,l.a.Children.map(e.children,t=>l.a.cloneElement(t,{...e,...t.props})));s.propTypes={className:i.a.string,children:i.a.any};var m=Object(o.h)(c.a)(s),d=a(18),p=a(77),u=a(80),g=a(47),f=a(121),_=a(324),b=a(62),y=a(323);function h(){return(h=Object.assign||function(e){for(var t=1;t{var s,m,v,w;const E=Object(b.a)(),N=Object(d.g)(),{programmeType:j,startDate:x,location:k,subjectArea:O,programmeFormat:S}=a,[L,I]=Object(r.useState)(!1);function C(e,t=""){if("online"===t){if(e instanceof Array&&"undefined"!=typeof window){const t=new URL(window.location.href);let a="";t.searchParams.delete("programmeFormat"),e.map(e=>{a=a+=e+","}),I(!0),t.searchParams.append("programmeFormat",a),N.push(t.pathname+t.search,{shallow:!0})}}else I(!1),n("programmeFormat",e)}const F=function(e){var t,a;let r;return r=null==e||null===(t=e.items)||void 0===t?void 0:t.filter(({key:e})=>e),null===(a=r)||void 0===a?void 0:a.map(({isSelected:e,title:t,key:a})=>({isSelected:e,key:a,title:E?t:new Date(t)}))}(x);let D;D=E?F.sort((e,t)=>{const a=p.DateTime.fromFormat(e.title,"LLLL yyyy"),r=p.DateTime.fromFormat(t.title,"LLLL yyyy");return a.isValid&&r.isValid?a-r:-1}):null==F?void 0:F.sort((e,t)=>e.title-t.title);const P=[...t,...e],[T,A]=Object(r.useState)("card"),q=e=>{A(e),localStorage.setItem("lse-view-programmes",e)};Object(r.useEffect)(()=>{const e=localStorage.getItem("lse-view-programmes");e&&A(e)},[T]);const B=E||"list"!==T?"programmes-cards":"programmes-list",G=E||"list"!==T?void 0:"list",V="list"===T,z="card"===T;return l.a.createElement(l.a.Fragment,null,l.a.createElement("section",{className:"programmes-listing"},l.a.createElement("div",{className:"wrapper"},l.a.createElement("aside",{className:"programmes-filter"},l.a.createElement("h3",null,"Filter programmes"),j&&l.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Programme type",uniqueId:Object(u.a)(),icon:"chevron_down"},null==j||null===(s=j.items)||void 0===s?void 0:s.map(({isSelected:e,title:t,key:a})=>l.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:e,text:t,onClick:()=>n("programmeType",a)}))),x&&l.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Start date",uniqueId:Object(u.a)(),icon:"chevron_down"},D.map(e=>{const{key:t,isSelected:a,title:r}=e,i=new Date;return e.title<=i?null:l.a.createElement(f.a,{className:"programmes-filter__pill",key:t,selected:a,text:r.toLocaleString("en-GB",{month:"short",year:"numeric"}),onClick:()=>n("startDate",t)})})),!E&&k&&l.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Location",uniqueId:Object(u.a)(),icon:"chevron_down"},null==k||null===(m=k.items)||void 0===m?void 0:m.map(({key:e,isSelected:t,title:a})=>l.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:t,text:a,onClick:()=>n("location",e)}))),O&&l.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Subject area",uniqueId:Object(u.a)(),icon:"chevron_down"},null==O||null===(v=O.items)||void 0===v?void 0:v.map(({key:e,isSelected:t,title:a})=>l.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:t,text:a,onClick:()=>n("subjectArea",e)}))),S&&l.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Format",uniqueId:Object(u.a)(),icon:"chevron_down"},null==S||null===(w=S.items)||void 0===w?void 0:w.map(({key:e,isSelected:t,title:a})=>"Online"===a?l.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:L,text:a,onClick:()=>C(e,"online")}):l.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:t,text:a,onClick:()=>C(e)}))),!E&&l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"Change view:"),l.a.createElement("div",{className:"programmes-change-view"},l.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:V,text:"List",onClick:()=>q("list")}),l.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:z,text:"Card",onClick:()=>q("card")})))),l.a.createElement("section",{className:B},c?"Loading results":P&&P.length>0?P.map(e=>l.a.createElement(y.a,h({},e,{key:Object(u.a)(),className:G,isLseOnline:E}))):l.a.createElement(g.c,{title:"No results...",content:"Sorry, we don't have any results for those categories."})))),l.a.createElement("div",{className:"wrapper"},l.a.createElement(_.a,{paging:i,updatePageIndex:o})))};v.propTypes={className:i.a.string,standfirst:i.a.string,results:i.a.array,resultsInfo:i.a.object,paging:i.a.object,filters:i.a.object,updateSelectedFilters:i.a.func,updatePageIndex:i.a.func,updateSortOrder:i.a.func,sortOrder:i.a.array,isLoading:i.a.bool};var w=v;function E(){return(E=Object.assign||function(e){for(var t=1;t{var s,m,d;const h=Object(b.a)(),{startDate:v,location:w,subjectArea:N,programmeFormat:j}=a;const x=null==(k=v)||null===(O=k.items)||void 0===O?void 0:O.map(({isSelected:e,title:t,key:a})=>({isSelected:e,key:a,title:h?t:new Date(t)}));var k,O;let S;S=h?x.sort((e,t)=>{const a=p.DateTime.fromFormat(e.title,"LLLL yyyy"),r=p.DateTime.fromFormat(t.title,"LLLL yyyy");return a.isValid&&r.isValid?a-r:-1}):null==x?void 0:x.sort((e,t)=>e.title-t.title);const[L,I]=Object(r.useState)("card"),C=e=>{"undefined"!=typeof window&&void 0!==window.localStorage&&(I(e),localStorage.setItem("lse-view-programmes",e))};Object(r.useEffect)(()=>{if("undefined"!=typeof window&&void 0!==window.localStorage){const e=localStorage.getItem("lse-view-programmes");e&&I(e)}},[L]);const[F,D]=Object(r.useState)(()=>{if("undefined"!=typeof window&&void 0!==window.localStorage){const e=localStorage.getItem("scrollPosition");return e?parseInt(e,10):0}}),[P,T]=Object(r.useState)(Date.now()),A=()=>{if("undefined"!=typeof window&&void 0!==window.localStorage){const e="undefined"!=typeof window?window.scrollY:0;D(e),localStorage.setItem("scrollPosition",e),T(Date.now())}};Object(r.useEffect)(()=>{const e=setTimeout(()=>{window.scrollTo(0,F)},1e3);return()=>clearTimeout(e)},[P,F]);const q=h||"list"!==L?"programmes-cards":"programmes-list",B=h||"list"!==L?void 0:"list",G="list"===L,V="card"===L,z=[...t,...e];return l.a.createElement(l.a.Fragment,null,l.a.createElement("section",{className:"programmes-listing"},l.a.createElement("div",{className:"wrapper"},l.a.createElement("aside",{className:"programmes-filter"},l.a.createElement("h3",null,"Filter programmes"),v&&l.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Start date",uniqueId:Object(u.a)(),icon:"chevron_down"},S.map(e=>{const{key:t,isSelected:a,title:r}=e,i=new Date;return e.title<=i?null:l.a.createElement(f.a,{className:"programmes-filter__pill",key:t,selected:a,text:r.toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric"}),onClick:()=>{n("startDate",t),A()}})})),!h&&w&&l.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Location",uniqueId:Object(u.a)(),icon:"chevron_down"},null==w||null===(s=w.items)||void 0===s?void 0:s.map(({key:e,isSelected:t,title:a})=>l.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:t,text:a,onClick:()=>{n("location",e),A()}}))),N&&l.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Subject area",uniqueId:Object(u.a)(),icon:"chevron_down"},null==N||null===(m=N.items)||void 0===m?void 0:m.map(({key:e,isSelected:t,title:a})=>l.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:t,text:a,onClick:()=>{n("subjectArea",e),A()}}))),j&&l.a.createElement(g.a,{className:"programmes-filter__accordion",title:"Format",uniqueId:Object(u.a)(),icon:"chevron_down"},null==j||null===(d=j.items)||void 0===d?void 0:d.map(({key:e,isSelected:t,title:a})=>l.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:t,text:a,onClick:()=>{n("programmeFormat",e),A()}}))),!h&&l.a.createElement(l.a.Fragment,null,l.a.createElement("p",null,"Change view:"),l.a.createElement("div",{className:"programmes-change-view"},l.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:G,text:"List",onClick:()=>C("list")}),l.a.createElement(f.a,{className:"programmes-filter__pill",key:Object(u.a)(),selected:V,text:"Card",onClick:()=>C("card")})))),l.a.createElement("section",{className:q},c?"Loading results":z&&z.length>0?z.map(e=>l.a.createElement(y.a,E({},e,{key:Object(u.a)(),className:B,isLseOnline:h}))):l.a.createElement(g.c,{title:"No results...",content:"Sorry, we don't have any results for those categories."})))),l.a.createElement("div",{className:"wrapper"},l.a.createElement(_.a,{paging:i,updatePageIndex:o})))};N.propTypes={className:i.a.string,standfirst:i.a.string,results:i.a.array,resultsInfo:i.a.object,paging:i.a.object,filters:i.a.object,updateSelectedFilters:i.a.func,updatePageIndex:i.a.func,updateSortOrder:i.a.func,sortOrder:i.a.array,isLoading:i.a.bool,courseTypeListing:i.a.object};var j=N},321:function(e,t,a){"use strict";var r=a(0),l=a.n(r),n=a(1),i=a.n(n),o=a(8);var c=o.default.div.withConfig({displayName:"paginationstyled__PaginationStyled",componentId:"sc-12en0v7-0"})(["",""],({theme:e})=>Object(o.css)(["display:flex;align-items:center;justify-content:center;margin:0 0 4.8rem 0;@media ","{justify-content:flex-end;}"],e.mq.laptop));var s=o.default.button.withConfig({displayName:"paginationItemstyled__PaginationItemStyled",componentId:"sc-rdvzwr-0"})(["",""],({theme:e})=>Object(o.css)(["cursor:pointer;background:",";width:3.2rem;height:3.2rem;border:0.1rem solid #f5f5f5;text-align:center;display:inline-flex;align-items:center;justify-content:center;margin-left:1.6rem;font-size:1.4rem;line-height:3.2rem;display:block;color:",";&:enabled:hover{background:",";}&:disabled{opacity:0.5;cursor:default;}&.active{text-decoration:underline;text-underline-offset:2px;color:",";}.icon{display:flex;align-items:center;justify-content:center;svg{height:2.4rem;path:{fill:",";}}}"],e.colors.white,e.colors.black,e.colors.lightGrey,e.colors.red,e.colors.red)),m=a(47);const d=({isActive:e,className:t,label:a,updatePageIndex:r,index:n,disabled:i})=>l.a.createElement(s,{disabled:i,isActive:e,className:t,onClick:()=>(e=>{e>-1&&r(e)})(n)},"Back"===a||"Next"===a?l.a.createElement(m.e,{type:"Back"===a?"chevron_left":"chevron_right",className:"icon"}):a&&a.toString());d.propTypes={className:i.a.string,index:i.a.number,isActive:i.a.bool,label:i.a.oneOfType([i.a.string,i.a.number]),theme:i.a.object,updatePageIndex:i.a.func,disabled:i.a.bool};var p=d;const u=e=>{const{className:t,paging:a,updatePageIndex:r}=e;let{pageIndex:n,pageCount:i}={...a},o=Math.ceil(n-2.5);o<0&&(o=0);let s=o+5-1;s>i-1&&(s=i-1,o=i-5,o<0&&(o=0));let m=[];for(let e=o;e<=s;e++){let t=e==n;m.push(l.a.createElement(p,{index:e,isActive:t,key:e,label:e+1,updatePageIndex:r,disabled:t,className:t?"inactive":"active"}))}return l.a.createElement(c,{className:t},i>1&&l.a.createElement(l.a.Fragment,null,l.a.createElement(p,{className:"control prev "+(n>0?"":"disabled"),disabled:!(n>0),index:n-1,label:"Back",updatePageIndex:r}),m,l.a.createElement(p,{className:"control next "+(nObject(o.css)(["position:relative;display:flex;flex-direction:column;word-wrap:break-word;text-decoration:none;background-color:",";height:100%;box-shadow:",";p{line-height:2.4rem;}&:hover,&:focus-within{.card__title{text-decoration:underline;}}.card-media,#image-modal__content{overflow:hidden;width:100%;height:24rem !important;@media (max-width:48.1rem){max-height:20rem;}}img{display:block;height:inherit;width:100%;object-fit:cover;height:24rem !important;@media (max-width:48.1rem){max-height:20rem;}}.card__label{position:absolute;right:0;padding:0.8rem;background-color:",";color:#000;&.red{background-color:",";color:#fff;}}.card-content{display:flex;flex:1 1 auto;flex-direction:column;padding:1.6rem 1.6rem 3.2rem 1.6rem;}.card__deadline-date{color:",";}.card__format{font-size:1.4rem;margin-top:0;}.card__title{margin:0;text-transform:none;a{position:static;color:inherit;text-decoration:none;&::after{content:'';display:block;position:absolute;top:0;left:0;width:100%;height:100%;}}}.card__role{font-weight:bold;}.card__quote{border-left:3px solid ",";padding-left:1rem;line-height:1.5;}.video-modal{button{background-color:",";}}.video-modal p{display:none;}.card__subject-area{margin-top:auto;p{font-style:italic;margin-bottom:0;}}&.list{border-radius:30px;.card-media,img{display:none;}@supports (display:grid){width:100%;}.card__label{position:absolute;top:2px;right:6px;border-top-right-radius:20px;}.card__text{display:none;}}.card__footer{margin-top:auto;padding:1.6rem;.card__programme-title{font-style:italic;margin:0;}.card__date{display:flex;justify-content:space-between;span{color:",";margin:0 1rem;}}.card__dates-location{max-width:75%;}}"],e.colors.white,e.effects.cardShadow,e.colors.secondary.lightGrey,e.colors.red,e.colors.red,e.colors.red,e.colors.black,e.colors.red)),s=a(111),m=a(320),d=a(296),p=a(297),u=a(62);let g;t.a=({title:e,readingTime:t,date:a,image:r,link:o,role:f,format:_,location:b,startDates:y,deadlineDate:h,imageAlt:v,thumbnail:w,source:E,relatedProgramme:N,watchTime:j,featuredTestimonial:x,className:k,featured:O,tagTitle:S})=>{const L=Object(u.a)();if(g=L?p.a:d.a,!e)return null;const I="list"===k;return l.a.createElement(c,{className:"standard-card "+k},E&&(null==E?void 0:E.length)>0?l.a.createElement(m.a,{id:e,source:E,thumbnail:w,className:"video-modal",title:e}):r||r&&!I?l.a.createElement("div",{className:"card-media"},l.a.createElement("img",{src:r+"?w=800&f=webp",alt:`${v||""} ${e||""}`})):l.a.createElement("img",{src:g+"?w=800&f=webp",alt:"ÐÓ°ÉÂÛ̳ fallback"}),S&&l.a.createElement("div",{className:"card__label "+(O?"red":"")},S),!S&&O&&l.a.createElement("div",{className:"card__label "+(O?"red":"")},"Featured"),x&&!0===x||!S&&O&&!0===O?l.a.createElement("div",{className:"card__label red"},"Featured"):null,l.a.createElement("div",{className:"card-content"},_&&l.a.createElement("p",{className:"card__format"},_),l.a.createElement("h2",{className:"card__title h4"},l.a.createElement(s.a,{uri:o},e)),f&&l.a.createElement("p",{className:"card__role"},f),!L&&h&&l.a.createElement("p",{className:"card__deadline-date"},"Next application deadline:"," ",Object(n.b)(h))),l.a.createElement("div",{className:"card__footer"},N&&N.map((e,t)=>void 0!==e.programmeTitle?l.a.createElement("p",{className:"card__programme-title",key:t},e.programmeTitle):null),a||t||j?l.a.createElement("p",{className:"card__date"},a&&l.a.createElement("time",{dateTime:a},Object(n.b)(a)),a&&t||a&&j?l.a.createElement("span",null,"•"):null,t&&t,j&&j):null,(y||b)&&l.a.createElement(l.a.Fragment,null,y&&l.a.createElement("p",{className:"card__dates-location"},null==y?void 0:y.map(({startDate:e},t)=>void 0===e?null:l.a.createElement(l.a.Fragment,{key:Object(i.a)()},Object(n.b)(e),t===(null==y?void 0:y.length)-1?null:" & "))),b&&l.a.createElement("p",{className:"card__location"},b))))}},324:function(e,t,a){"use strict";var r=a(321);a.d(t,"a",(function(){return r.a}))}}]);