"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[950],{60118:(P,u,n)=>{n.d(u,{A:()=>d});var t=n(48322),x=n(67115);const o=({error:s,entryTitle:w,entryId:k})=>t.createElement(S,null,t.createElement("div",{className:"error-panel"},t.createElement("h1",null,"Entry Validation Error",w&&k?`: ${w} (${k})`:null),s&&s?.details?.length>0&&t.createElement("p",null,"Please resolve the following ",s.details.length," issues:"),s?.details?.map((i,A)=>t.createElement("div",{className:"error",key:A},t.createElement("code",null,t.createElement("span",null,t.createElement("strong",null,"Code")," ",i.code),"expected"in i&&t.createElement("span",null,t.createElement("strong",null,"Expected")," ",i?.expected),"received"in i&&t.createElement("span",null,t.createElement("strong",null,"Received")," ",i?.received),i.path&&i.path?.length>0&&i.path.map(($,v)=>t.createElement("span",{key:v},t.createElement("strong",null,"Field ID")," ",$)),t.createElement("span",null,t.createElement("strong",null,"Message")," ",i.message)))))),S=x.Ay.div` display: flex; padding: 2rem; h1 { margin-block-end: 0.25rem; font-size: 1.5rem; font-weight: 600; color: ${s=>s.theme.colors.light.brand.darkBlue}; } p { margin-block-end: 0.5em; } .error { margin-block-end: 1rem; } code { display: block; padding: 1rem; border: 1px solid ${s=>s.theme.colors.light.brand.lightBlue}; border-radius: 4px; background-color: ${s=>s.theme.colors.light.brand.lighterBlue}; span { display: block; } } `,d=o},60445:(P,u,n)=>{n.r(u),n.d(u,{default:()=>j});var t=n(48322),x=n(91335),o=n(67115);const d=o.Ay.div` ${({theme:{mq:e,colors:r,spacing:l}})=>(0,o.AH)` &.home-template { } .search-bar-container { margin-top: ${l.xl}; } `} `;var s=n(60118),w=n(98401);const i=o.Ay.form` ${({theme:{colors:e,spacing:r,mq:l}})=>(0,o.AH)` display: flex; flex-direction: column; width: 100%; justify-content: center; gap: ${r.xxs}; @media ${l.min.px.mobile} { flex-direction: row; align-items: center; } @media ${l.min.px.tablet} { gap: ${r.l}; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } .search-input__input { width: 100%; min-height: 50px; padding: 0 10px; border: none; border-bottom: 2px solid ${e.light.brand.gold}; font-size: 1rem; outline: none; transition: all 0.3s; &::placeholder { color: ${e.light.brand.darkBlue}; font-size: 1.2rem; font-weight: 700; } &:focus { outline: none; box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); } } .search-input__default-button { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: fit-content; padding: ${r.xxs} ${r.xs}; border: none; border-radius: 5px; font-size: 1.1rem; background-color: ${e.light.brand.darkBlue}; color: ${e.light.neutral.white}; cursor: pointer; transition: all 0.3s; @media ${l.min.px.mobile} { .search-input__button-label { display: none; } } .search-input__icon { width: 30px; height: 30px; } @media ${l.min.px.tablet} { .search-input__button-label { display: flex; cursor: pointer; } .search-input__icon { width: 24px; height: 24px; } } &:hover { background-color: ${e.light.brand.midBlue}; } &:focus { outline: none; box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.5); } } `} `,A=o.Ay.div` ${({theme:{spacing:e,mq:r,colors:l}})=>(0,o.AH)` display: flex; flex-direction: column; width: 100%; justify-content: center; gap: ${e.xxs}; max-width: 1200px; margin: 0 auto; .search-input__related-links { display: grid; grid-template-columns: 1fr 1fr; list-style: none; gap: ${e.xs}; width: 100%; li { display: flex; align-items: center; gap: ${e.xxxs}; a { display: flex; align-items: center; width: fit-content; color: ${l.light.brand.darkBlue}; text-decoration: none; } } @media ${r.min.px.tablet} { grid-template-columns: none; display: flex; flex-direction: row; align-items: flex-start; li { width: fit-content; } } } `} `;var $=n(95443),v=n(67820);const C=[{label:"Undergraduate",url:"/study/find-a-course/?level=52"},{label:"Postgraduate",url:"/study/find-a-course/?level=53"},{label:"A - Z of courses",url:"/study/find-a-course/a-z-of-courses"},{label:"CPD",url:"/study/professional-development/home.aspx"}],I=({links:e})=>t.createElement("ul",{className:"search-input__related-links u-container"},e.map((r,l)=>t.createElement("li",{key:l},t.createElement(v.A,{path:r.url},r.label,t.createElement($.A,{className:"related-link__icon",size:22,icon:"arrowRight"}))))),H=({className:e,placeholder:r,value:l="",isListing:p=!1,submit:B})=>{const[h,f]=(0,t.useState)(l),g=a=>{f(a.target.value)},y=(0,t.useRef)(null),b=a=>{const R=`/study/find-a-course/home.aspx?&term=${a}`;location.href=R},c=a=>{a.preventDefault(),p?B(h):b(h)};return(0,t.useEffect)(()=>{f(l)},[l]),t.createElement(i,{onSubmit:a=>{a.preventDefault(),c(a)},autoCapitalize:"off",className:`${e||""} u-container`,onKeyDown:a=>a.key==="Enter"?c(a):null},t.createElement("label",{className:"sr-only",htmlFor:"searchInput"},"Keyword search"),t.createElement("input",{type:"search",value:h,onChange:g,placeholder:r||"Search for your course...",id:"searchInput",ref:y,className:"search-input__input"}),t.createElement("button",{type:"submit",value:"search",onClick:a=>c(a),onKeyDown:a=>a.key==="Enter"?c(a):null,className:"search-input__default-button"},t.createElement($.A,{className:"search-input__icon",size:22,icon:"search"}),t.createElement("label",{className:"search-input__button-label",htmlFor:"searchInput"},"ºÚÁÏÍø")))},Y=null,L=({className:e})=>t.createElement(A,{className:e},t.createElement(H,{className:"search-input",placeholder:"Search for your course...",submit:r=>console.log(`Searching for: ${r}`)}),t.createElement(I,{links:C}));var T=n(54554);const W=o.Ay.section` position: relative; height: 200vh; overflow: hidden; margin-top: -100px; .u-container { position: relative; height: 100%; width: 100%; } .button__link { display: flex; align-items: center; justify-content: center; gap: 1rem; min-width: fit-content; width: max-content; padding: ${e=>e.theme.spacing.xxs} ${e=>e.theme.spacing.xs}; border: none; border-radius: 5px; font-size: var(--step-3); background-color: ${e=>e.theme.colors.light.brand.darkBlue}; color: ${e=>e.theme.colors.light.neutral.white}; cursor: pointer; transition: all 0.3s; text-decoration: none; margin: ${e=>e.theme.spacing.s} 0; font-family: 'Roboto Slab', serif; font-weight: 700; opacity: 0; transform: translateY(30px); &:hover { color: ${e=>e.theme.colors.light.brand.darkBlue}; background-color: ${e=>e.theme.colors.light.system.alerts}; } } `,K=o.Ay.div` position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden; `,O=o.Ay.div` position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-image: ${e=>e.mobileSrc?`url(${e.mobileSrc})`:"none"}; background-size: cover; background-position: center; @media ${e=>e.theme.mq.min.px.tablet} { background-image: ${e=>e.src?`url(${e.src})`:"none"}; } `,M=o.Ay.div` display: flex; flex-direction: column; /* align-items: center; */ position: absolute; /* top: 50%; left: 50%; transform: translate(-50%, -50%); */ /* text-align: center; */ color: white; z-index: 2; will-change: transform; perspective: 1000px; /* @media ${e=>e.theme.mq.min.px.tablet} { */ top: 0; left: 0; transform: none; align-items: flex-start; text-align: left; padding: ${e=>e.theme.spacing.m}; margin-top: 150px; /* } */ .title-styled span, .subtitle-styled span { display: block; padding: 0 ${e=>e.theme.spacing.xxs}; margin-bottom: 0; max-width: max-content; font-family: 'Roboto Slab', serif; font-weight: 800; color: ${e=>e.theme.colors.light.brand.darkBlue}; } .title-styled { font-size: var(--step-6); display: flex; flex-direction: column; align-items: flex-start; text-align: left; span { margin-top: -3px; background-color: ${e=>e.theme.colors.light.neutral.white}; } } .subtitle-styled { font-size: var(--step-6); display: flex; flex-direction: column; align-items: center; opacity: 0; transform: translateY(30px); margin-top: 10px; span { background-color: ${e=>e.theme.colors.light.brand.lightBlue}; } ${e=>e.theme.mq.min.px.tablet} { align-items: flex-start; } } `,U=({title:e,image:r,secondImage:l,imageMobile:p,secondImageMobile:B,subTitle:h,callToAction:f})=>{const g=(0,t.useRef)(null),y=(0,t.useRef)(null),b=(0,t.useRef)(null),c=(0,t.useRef)(null),a=(0,t.useRef)(null),R=r?.src,F=p?.src??r?.src,V=l?.src,X=B?.src??l?.src;return(0,t.useEffect)(()=>{if(typeof window>"u")return;let z,D;return(async()=>{const{gsap:m}=await n.e(938).then(n.bind(n,15938)),{ScrollTrigger:Q}=await n.e(77).then(n.bind(n,79077));D=Q,m.registerPlugin(D),!(!g.current||!y.current||!b.current||!c.current||!a.current)&&(z=m.context(()=>{const N=[c.current,a.current];m.set(N,{y:0,scale:1,rotationX:0,transformOrigin:"50% 50% 0",force3D:!0}),m.fromTo(c.current,{opacity:0},{opacity:1,duration:2,ease:"power2.out"}),m.fromTo(a.current,{opacity:0},{opacity:1,duration:2,ease:"power2.out",delay:.4});const E=m.timeline({scrollTrigger:{trigger:g.current,start:"top top",end:"bottom top",scrub:1,pin:!0,anticipatePin:1}});E.fromTo(y.current,{clipPath:"inset(0% 0% 0% 0%)"},{clipPath:"inset(0% 0% 100% 0%)",duration:4,ease:"power2.inOut"},0),E.fromTo(b.current,{scale:1},{scale:1,duration:4,ease:"none"},0),E.to(N,{y:-20,scale:1.02,rotationX:5,ease:"none",duration:2},0),E.to(N,{y:0,scale:1,rotationX:0,ease:"none",duration:2},2),E.fromTo(".button__link",{opacity:0,y:30},{opacity:1,y:0,duration:2,ease:"power2.out"},">")},g))})(),()=>{z?.revert();try{D?.getAll?.().forEach(m=>m.kill())}catch{}}},[]),t.createElement(W,null,t.createElement(K,{ref:g},l&&t.createElement(O,{ref:b,src:V,mobileSrc:X,style:{zIndex:0}}),r&&t.createElement(O,{ref:y,src:R,mobileSrc:F,style:{zIndex:1,clipPath:"inset(0% 0% 0% 0%)"}}),t.createElement("div",{className:"u-container"},t.createElement(M,null,e&&t.createElement("h1",{className:"title-styled",ref:c},(0,T.O)(e)),h&&t.createElement("div",{className:"subtitle-styled",ref:a},(0,T.O)(h)),f?.url&&t.createElement(v.A,{className:"button__link",path:f.url},f.label)))))},j=({mappedEntry:e})=>{if(!e)return null;if(e&&e.status==="error")return t.createElement(s.A,{...e});const{metadata:r,heroBanner:l,composer:p}=e;return e&&e.status==="success"?t.createElement(x.A,{meta:r},t.createElement(d,{className:"home-template flow"},l&&t.createElement(U,{...l}),t.createElement("div",{className:"search-bar-container"},t.createElement(L,{className:"search-bar-wrapper"})),p&&t.createElement(w.Dk,{items:p.items,className:"home-composer flow"}))):null}},54554:(P,u,n)=>{n.d(u,{O:()=>x});var t=n(48322);const x=o=>o?(o.includes("[br]")?o.split("[br]").map(d=>d.trim()):[o.trim()]).map((d,s)=>t.createElement("span",{key:s},d)):null}}]);