@uob-web-and-digital/component-library 2.16.2 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js CHANGED
@@ -20,4 +20,4 @@ object-assign
20
20
  * focus-trap 7.6.5
21
21
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
22
22
  */
23
- function Kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function Yn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(n),!0).forEach(function(t){Yn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qn(e){return function(e){if(Array.isArray(e))return Kn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Kn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kn(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ea,ta,na=function(e,t){if(e.length>0){var n=e[e.length-1];n!==t&&n._setPausedState(!0)}var a=e.indexOf(t);-1===a||e.splice(a,1),e.push(t)},aa=function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)},ra=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},ca=function(e){return ra(e)&&!e.shiftKey},la=function(e){return ra(e)&&e.shiftKey},ia=function(e){return setTimeout(e,0)},oa=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return"function"==typeof e?e.apply(void 0,n):e},sa=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},ma=[],da=Gt(Object.freeze({__proto__:null,createFocusTrap:function(e,t){var n,a=(null==t?void 0:t.document)||document,r=(null==t?void 0:t.trapStack)||ma,c=Xn({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:ca,isKeyBackward:la},t),l={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},i=function(e,t,n){return e&&void 0!==e[t]?e[t]:c[n||t]},o=function(e,t){var n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return l.containerGroups.findIndex(function(t){var a=t.container,r=t.tabbableNodes;return a.contains(e)||(null==n?void 0:n.includes(a))||r.find(function(t){return t===e})})},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.hasFallback,r=void 0!==n&&n,l=t.params,i=void 0===l?[]:l,o=c[e];if("function"==typeof o&&(o=o.apply(void 0,Qn(i))),!0===o&&(o=void 0),!o){if(void 0===o||!1===o)return o;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var s=o;if("string"==typeof o){try{s=a.querySelector(o)}catch(t){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(t.message,'"'))}if(!s&&!r)throw new Error("`".concat(e,"` as selector refers to no known node"))}return s},m=function(){var e=s("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!Wn(e,c.tabbableOptions))if(o(a.activeElement)>=0)e=a.activeElement;else{var t=l.tabbableGroups[0];e=t&&t.firstTabbableNode||s("fallbackFocus")}else null===e&&(e=s("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(l.containerGroups=l.containers.map(function(e){var t=Rn(e,c.tabbableOptions),n=jn(e,c.tabbableOptions),a=t.length>0?t[0]:void 0,r=t.length>0?t[t.length-1]:void 0,l=n.find(function(e){return zn(e)}),i=n.slice().reverse().find(function(e){return zn(e)}),o=!!t.find(function(e){return Pn(e)>0});return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:o,firstTabbableNode:a,lastTabbableNode:r,firstDomTabbableNode:l,lastDomTabbableNode:i,nextTabbableNode:function(e){var a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=t.indexOf(e);return r<0?a?n.slice(n.indexOf(e)+1).find(function(e){return zn(e)}):n.slice(0,n.indexOf(e)).reverse().find(function(e){return zn(e)}):t[r+(a?1:-1)]}}}),l.tabbableGroups=l.containerGroups.filter(function(e){return e.tabbableNodes.length>0}),l.tabbableGroups.length<=0&&!s("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(l.containerGroups.find(function(e){return e.posTabIndexesFound})&&l.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},u=function(e){var t=e.activeElement;if(t)return t.shadowRoot&&null!==t.shadowRoot.activeElement?u(t.shadowRoot):t},h=function(e){!1!==e&&e!==u(document)&&(e&&e.focus?(e.focus({preventScroll:!!c.preventScroll}),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):h(m()))},v=function(e){var t=s("setReturnFocus",{params:[e]});return t||!1!==t&&e},p=function(e){var t=e.target,n=e.event,a=e.isBackward,r=void 0!==a&&a;t=t||sa(n),d();var i=null;if(l.tabbableGroups.length>0){var m=o(t,n),u=m>=0?l.containerGroups[m]:void 0;if(m<0)i=r?l.tabbableGroups[l.tabbableGroups.length-1].lastTabbableNode:l.tabbableGroups[0].firstTabbableNode;else if(r){var h=l.tabbableGroups.findIndex(function(e){var n=e.firstTabbableNode;return t===n});if(h<0&&(u.container===t||Wn(t,c.tabbableOptions)&&!zn(t,c.tabbableOptions)&&!u.nextTabbableNode(t,!1))&&(h=m),h>=0){var v=0===h?l.tabbableGroups.length-1:h-1,p=l.tabbableGroups[v];i=Pn(t)>=0?p.lastTabbableNode:p.lastDomTabbableNode}else ra(n)||(i=u.nextTabbableNode(t,!1))}else{var f=l.tabbableGroups.findIndex(function(e){var n=e.lastTabbableNode;return t===n});if(f<0&&(u.container===t||Wn(t,c.tabbableOptions)&&!zn(t,c.tabbableOptions)&&!u.nextTabbableNode(t))&&(f=m),f>=0){var g=f===l.tabbableGroups.length-1?0:f+1,E=l.tabbableGroups[g];i=Pn(t)>=0?E.firstTabbableNode:E.firstDomTabbableNode}else ra(n)||(i=u.nextTabbableNode(t))}}else i=s("fallbackFocus");return i},f=function(e){var t=sa(e);o(t,e)>=0||(oa(c.clickOutsideDeactivates,e)?n.deactivate({returnFocus:c.returnFocusOnDeactivate}):oa(c.allowOutsideClick,e)||e.preventDefault())},g=function(e){var t=sa(e),n=o(t,e)>=0;if(n||t instanceof Document)n&&(l.mostRecentlyFocusedNode=t);else{var a;e.stopImmediatePropagation();var r=!0;if(l.mostRecentlyFocusedNode)if(Pn(l.mostRecentlyFocusedNode)>0){var i=o(l.mostRecentlyFocusedNode),s=l.containerGroups[i].tabbableNodes;if(s.length>0){var d=s.findIndex(function(e){return e===l.mostRecentlyFocusedNode});d>=0&&(c.isKeyForward(l.recentNavEvent)?d+1<s.length&&(a=s[d+1],r=!1):d-1>=0&&(a=s[d-1],r=!1))}}else l.containerGroups.some(function(e){return e.tabbableNodes.some(function(e){return Pn(e)>0})})||(r=!1);else r=!1;r&&(a=p({target:l.mostRecentlyFocusedNode,isBackward:c.isKeyBackward(l.recentNavEvent)})),h(a||(l.mostRecentlyFocusedNode||m()))}l.recentNavEvent=void 0},E=function(e){(c.isKeyForward(e)||c.isKeyBackward(e))&&function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];l.recentNavEvent=e;var n=p({event:e,isBackward:t});n&&(ra(e)&&e.preventDefault(),h(n))}(e,c.isKeyBackward(e))},_=function(e){var t;"Escape"!==(null==(t=e)?void 0:t.key)&&"Esc"!==(null==t?void 0:t.key)&&27!==(null==t?void 0:t.keyCode)||!1===oa(c.escapeDeactivates,e)||(e.preventDefault(),n.deactivate())},b=function(e){var t=sa(e);o(t,e)>=0||oa(c.clickOutsideDeactivates,e)||oa(c.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},w=function(){if(l.active)return na(r,n),l.delayInitialFocusTimer=c.delayInitialFocus?ia(function(){h(m())}):h(m()),a.addEventListener("focusin",g,!0),a.addEventListener("mousedown",f,{capture:!0,passive:!1}),a.addEventListener("touchstart",f,{capture:!0,passive:!1}),a.addEventListener("click",b,{capture:!0,passive:!1}),a.addEventListener("keydown",E,{capture:!0,passive:!1}),a.addEventListener("keydown",_),n},C=function(){if(l.active)return a.removeEventListener("focusin",g,!0),a.removeEventListener("mousedown",f,!0),a.removeEventListener("touchstart",f,!0),a.removeEventListener("click",b,!0),a.removeEventListener("keydown",E,!0),a.removeEventListener("keydown",_),n},y="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver(function(e){e.some(function(e){return Array.from(e.removedNodes).some(function(e){return e===l.mostRecentlyFocusedNode})})&&h(m())}):void 0,N=function(){y&&(y.disconnect(),l.active&&!l.paused&&l.containers.map(function(e){y.observe(e,{subtree:!0,childList:!0})}))};return n={get active(){return l.active},get paused(){return l.paused},activate:function(e){if(l.active)return this;var t=i(e,"onActivate"),n=i(e,"onPostActivate"),r=i(e,"checkCanFocusTrap");r||d(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=u(a),null==t||t();var c=function(){r&&d(),w(),N(),null==n||n()};return r?(r(l.containers.concat()).then(c,c),this):(c(),this)},deactivate:function(e){if(!l.active)return this;var t=Xn({onDeactivate:c.onDeactivate,onPostDeactivate:c.onPostDeactivate,checkCanReturnFocus:c.checkCanReturnFocus},e);clearTimeout(l.delayInitialFocusTimer),l.delayInitialFocusTimer=void 0,C(),l.active=!1,l.paused=!1,N(),aa(r,n);var a=i(t,"onDeactivate"),o=i(t,"onPostDeactivate"),s=i(t,"checkCanReturnFocus"),m=i(t,"returnFocus","returnFocusOnDeactivate");null==a||a();var d=function(){ia(function(){m&&h(v(l.nodeFocusedBeforeActivation)),null==o||o()})};return m&&s?(s(v(l.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(e){return l.active?(l.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return l.active?(l.manuallyPaused=!1,r[r.length-1]!==this?this:this._setPausedState(!1,e)):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return l.containers=t.map(function(e){return"string"==typeof e?a.querySelector(e):e}),l.active&&d(),N(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return l.manuallyPaused}},_setPausedState:{value:function(e,t){if(l.paused===e)return this;if(l.paused=e,e){var n=i(t,"onPause"),a=i(t,"onPostPause");null==n||n(),C(),N(),null==a||a()}else{var r=i(t,"onUnpause"),c=i(t,"onPostUnpause");null==r||r(),d(),w(),N(),null==c||c()}return this}}}),n.updateContainerElements(e),n}})),ua=Gt(Gn);var ha=function(){if(ta)return ea;function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,i(a.key),a)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,n,a){return n=c(n),function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,r()?Reflect.construct(n,a||[],c(e).constructor):n.apply(e,a))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function i(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var r=a.call(e,n);if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}ta=1;var o=e,s=yn(),m=da.createFocusTrap,d=ua.isFocusable,u=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(n=a(this,t,[e]),"getNodeForOption",function(e){var t,n=null!==(t=this.internalOptions[e])&&void 0!==t?t:this.originalOptions[e];if("function"==typeof n){for(var a=arguments.length,r=new Array(a>1?a-1:0),c=1;c<a;c++)r[c-1]=arguments[c];n=n.apply(void 0,r)}if(!0===n&&(n=void 0),!n){if(void 0===n||!1===n)return n;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var l,i=n;if("string"==typeof n&&!(i=null===(l=this.getDocument())||void 0===l?void 0:l.querySelector(n)))throw new Error("`".concat(e,"` as selector refers to no known node"));return i}),n.handleDeactivate=n.handleDeactivate.bind(n),n.handlePostDeactivate=n.handlePostDeactivate.bind(n),n.handleClickOutsideDeactivates=n.handleClickOutsideDeactivates.bind(n),n.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:n.handleDeactivate,onPostDeactivate:n.handlePostDeactivate,clickOutsideDeactivates:n.handleClickOutsideDeactivates},n.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var r=e.focusTrapOptions;for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&("returnFocusOnDeactivate"!==c&&"onDeactivate"!==c&&"onPostDeactivate"!==c&&"checkCanReturnFocus"!==c&&"clickOutsideDeactivates"!==c?n.internalOptions[c]=r[c]:n.originalOptions[c]=r[c]);return n.outsideClick=null,n.focusTrapElements=e.containerElements||[],n.updatePreviousElement(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),n(t,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||("undefined"!=typeof document?document:void 0)}},{key:"getReturnFocusNode",value:function(){var e=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return e||!1!==e&&this.previouslyFocusedElement}},{key:"updatePreviousElement",value:function(){var e=this.getDocument();e&&(this.previouslyFocusedElement=e.activeElement)}},{key:"deactivateTrap",value:function(){this.focusTrap&&this.focusTrap.active&&this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(e){var t="function"==typeof this.originalOptions.clickOutsideDeactivates?this.originalOptions.clickOutsideDeactivates.call(null,e):this.originalOptions.clickOutsideDeactivates;return t&&(this.outsideClick={target:e.target,allowDeactivation:t}),t}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var e=this,t=function(){var t=e.getReturnFocusNode(),n=!(!e.originalOptions.returnFocusOnDeactivate||null==t||!t.focus||e.outsideClick&&(!e.outsideClick.allowDeactivation||d(e.outsideClick.target,e.internalOptions.tabbableOptions))),a=e.internalOptions.preventScroll,r=void 0!==a&&a;n&&t.focus({preventScroll:r}),e.originalOptions.onPostDeactivate&&e.originalOptions.onPostDeactivate.call(null),e.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(t,t):t()}},{key:"setupFocusTrap",value:function(){this.focusTrap?this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()):this.focusTrapElements.some(Boolean)&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(e){if(this.focusTrap){e.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var t=!e.active&&this.props.active,n=e.active&&!this.props.active,a=!e.paused&&this.props.paused,r=e.paused&&!this.props.paused;if(t&&(this.updatePreviousElement(),this.focusTrap.activate()),n)return void this.deactivateTrap();a&&this.focusTrap.pause(),r&&this.focusTrap.unpause()}else e.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var e=this,t=this.props.children?o.Children.only(this.props.children):void 0;if(t){if(t.type&&t.type===o.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return o.cloneElement(t,{ref:function(n){var a=e.props.containerElements;t&&("function"==typeof t.ref?t.ref(n):t.ref&&(t.ref.current=n)),e.focusTrapElements=a||[n]}})}return null}}])}(o.Component),h="undefined"==typeof Element?Function:Element;return u.propTypes={active:s.bool,paused:s.bool,focusTrapOptions:s.shape({document:s.object,onActivate:s.func,onPostActivate:s.func,checkCanFocusTrap:s.func,onPause:s.func,onPostPause:s.func,onUnpause:s.func,onPostUnpause:s.func,onDeactivate:s.func,onPostDeactivate:s.func,checkCanReturnFocus:s.func,initialFocus:s.oneOfType([s.instanceOf(h),s.string,s.bool,s.func]),fallbackFocus:s.oneOfType([s.instanceOf(h),s.string,s.func]),escapeDeactivates:s.oneOfType([s.bool,s.func]),clickOutsideDeactivates:s.oneOfType([s.bool,s.func]),returnFocusOnDeactivate:s.bool,setReturnFocus:s.oneOfType([s.instanceOf(h),s.string,s.bool,s.func]),allowOutsideClick:s.oneOfType([s.bool,s.func]),preventScroll:s.bool,tabbableOptions:s.shape({displayCheck:s.oneOf(["full","legacy-full","non-zero-area","none"]),getShadowRoot:s.oneOfType([s.bool,s.func])}),trapStack:s.array,isKeyForward:s.func,isKeyBackward:s.func}),containerElements:s.arrayOf(s.instanceOf(h)),children:s.oneOfType([s.element,s.instanceOf(h)])},u.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:m},ea=u}(),va=Wt(ha);d();var pa=function(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.onClick,i=t.label,o=t.level,s=t.autoFocus,m=void 0!==s&&s;return e.createElement("button",{className:p("nav-link",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"),"nav-link--".concat(o)),onClick:l,autoFocus:m},e.createElement("span",{className:"nav-link__label"},i,e.createElement("span",{className:"nav-link__icon"},e.createElement(_,{icon:"chevron-right",theme:a,inverse:c,ariaHidden:!0}))))};d();var fa=function(t){var n=t.theme,c=void 0===n?"uobmain":n,l=t.inverse,i=void 0!==l&&l,o=t.url,s=t.label,m=t.level,d=t.autoFocus,u=void 0!==d&&d,h=t.externalLink,v=void 0!==h&&h,f=r(null);return a(function(){u&&f.current&&f.current.focus()},[u]),e.createElement("a",{className:p("page-link",c&&"theme-".concat(c),i&&"theme-".concat(c,"--inverse"),"page-link--".concat(m)),href:o,ref:f,target:v?"_blank":"_self",rel:v?"noopener noreferrer":""},s)};function ga(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0===r||r,l=t.image,i=t.tag,o=t.title,s=t.href,m=t.linkText,d=t.description,h=t.type;return e.createElement("div",{className:p("card-menu",h&&"card-menu--".concat(h),a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},e.createElement("figure",{className:"card-menu__figure"},e.createElement("div",{className:"card-menu__image-wrapper"},l&&e.createElement(H,u({},l,{altText:"",loadingAttr:"lazy"}))),e.createElement("figcaption",{className:"card-menu__text-content"},"secondary"===h&&e.createElement(e.Fragment,null,e.createElement("p",{className:"card-menu__tag card-menu__tag"},i),e.createElement("a",{className:"card-menu__link",href:s},e.createElement("h2",{className:"card-menu__title"},o))),"primary"===h?e.createElement(e.Fragment,null,e.createElement("h2",{className:"card-menu__title"},o),e.createElement("p",{className:"card-menu__description"},d),e.createElement("div",{className:"card-menu__cta"},e.createElement(y,{theme:a,url:s,title:m||o}))):e.createElement("div",{className:"card-menu__arrow"},e.createElement(_,{icon:"arrow-right",theme:a,ariaHidden:!0})))))}d();var Ea=function(t){var n=t.primaryLinks,a=t.secondaryLinks,r=t.onClickNavLink,c=t.menuCards,l=t.theme,i=t.inverse;return e.createElement("div",{className:p("header__main-menu",l&&"theme-".concat(l),i&&"theme-".concat(l,"--inverse"))},e.createElement("div",{className:"header__main-menu-menu-wrapper"},e.createElement("ul",{className:"header__main-menu-primary-list"},n.map(function(t,n){return t.children?e.createElement(pa,{label:t.label,onClick:function(){return r(n)},key:t.label,theme:l,inverse:i,level:"level-one",autoFocus:0===n}):e.createElement(fa,{label:t.label,url:t.url,key:t.label,theme:l,inverse:i,level:"level-one",autoFocus:0===n,externalLink:t.externalLink})})),e.createElement("ul",{className:"header__main-menu-secondary-list"},a.map(function(t,a){return t.children?e.createElement(pa,{label:t.label,onClick:function(){return r(a+n.length)},key:t.label,theme:l,inverse:i,level:"level-two"}):e.createElement(fa,{label:t.label,url:t.url,key:t.label,theme:l,inverse:i,level:"level-two",externalLink:t.externalLink})}))),e.createElement("ul",{className:"header__main-menu-promo-cards"},c&&c.map(function(t,n){return e.createElement("li",{key:n},e.createElement(ga,{theme:l,image:{src:{small:t.image.src.small,medium:t.image.src.medium,default:t.image.src.default}},description:t.description,tag:t.tag,title:t.title,linkText:t.linkText,href:t.href,type:t.type}))})))};d();var _a=function(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.label,i=t.onClick;return e.createElement("button",{className:p("reverse-link-with-arrow",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse")),onClick:i},e.createElement("span",{className:"reverse-link-with-arrow__title"},e.createElement("span",{className:"reverse-link-with-arrow__icon"},e.createElement(_,{icon:"arrow-left",theme:a,inverse:c,ariaHidden:!0})),l))},ba=function(t){var n=t.headingLink,a=t.onClickGoBack,r=t.onClickNavLink,c=t.theme,l=t.backLinkLabel,i=t.inverse,o=void 0===i||i;return e.createElement("div",{className:p("header__nested-menu",c&&"theme-".concat(c),o&&"theme-".concat(c,"--inverse"))},e.createElement(_a,{label:l,onClick:a,theme:c,inverse:o}),e.createElement("div",{className:"header__heading-link"},e.createElement(fa,{theme:c,inverse:o,url:n.url,label:n.label,level:"level-one",autoFocus:!0})),e.createElement("div",{className:"header__content-wrapper"},n.description&&e.createElement("p",{className:"header__description"},n.description),n.children&&e.createElement("ul",{className:p("header__link-list",n.description&&"header__link-list--with-desc")},n.children.map(function(t,n){return t.children?e.createElement(pa,{label:t.label,onClick:function(){return r(n)},key:t.label,inverse:o,theme:c,level:"level-two"}):e.createElement(fa,{label:t.label,url:t.url,key:t.label,theme:c,inverse:o,level:"level-two",externalLink:t.externalLink})}))))};d();var wa=function(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.fieldName,i=t.hiddenLabel,o=void 0!==i&&i,s=t.defaultValue,m=t.placeholder,d=t.required,u=void 0!==d&&d,h=t.onChange;return e.createElement("div",{className:p("form-input",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},e.createElement("label",{htmlFor:l,className:p("form-input__label",o&&"sr-only")},"Select ",l),e.createElement("input",{className:"form-input__input",id:l,name:l,type:"text",required:u,defaultValue:s,placeholder:m,onChange:h}))},Ca=function(t){var n=t.title,a=void 0===n?"Search":n,r=t.placeholder,c=void 0===r?"Start typing":r,l=t.introText,i=t.handleSearchChange,o=t.handleSearchSubmit,s=t.theme,m=t.inverse,d=t.onClickGoBack,u=t.backLinkLabel,h=t.recommendedLinks,v=t.recommendedLinkTitle;return e.createElement("div",{className:"header-search"},d&&u&&e.createElement("div",{className:"header-search__back-link"},e.createElement(_a,{label:u,onClick:d,theme:s})),e.createElement("div",{className:"header-search__container"},e.createElement("h2",{className:"header-search__title"},a),e.createElement("p",{className:"header-search__intro"},l),e.createElement("form",{className:"header-search__form",method:"post",onSubmit:o},e.createElement("div",{className:"header-search__search-wrapper"},e.createElement(wa,{theme:s,inverse:!1,fieldName:"search",hiddenLabel:!0,placeholder:c,onChange:i}),e.createElement(qe,{theme:s,inverse:!m,title:"Search",icon:"search",isSubmit:!0})),e.createElement(C,{theme:s,inverse:!m,label:"Search",isSubmit:!0}))),h&&e.createElement("div",{className:"header-search__recommended-links-wrapper"},v&&e.createElement("h3",{className:"header-search__recommended-link-title"},v),e.createElement("ul",{className:"header-search__recommended-links"},h.map(function(t,n){return e.createElement("li",{className:"header-search__recommended-link",key:n},e.createElement(Ot,{theme:s,url:t.url,title:t.label,externalLink:t.externalLink}))}))))};function ya(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.label,c=t.url,l=t.externalLink,i=t.active,o=void 0!==i&&i;return e.createElement("a",{className:p("campus-selector-link",a&&"theme-".concat(a),o&&"campus-selector-link--active"),href:c,target:l?"_blank":"_self",rel:"noreferrer"},r)}function Na(t){var n=t.active,a=t.theme,r=t.ukUrl,c=t.dubaiUrl,l=t.mobile;return e.createElement("div",{className:p("campus-selector",a&&"theme-".concat(a),l&&"campus-selector--mobile",!l&&"campus-selector--desktop")},e.createElement("div",{className:"campus-selector__container"},e.createElement("span",{className:"campus-selector__label"},"Select campus:"),l?e.createElement(e.Fragment,null,e.createElement(C,{label:"UK",theme:a,inverse:!0,url:r,hollow:"uk"!==n}),e.createElement(C,{label:"Dubai",theme:a,inverse:!0,url:c,hollow:"dubai"!==n})):e.createElement(e.Fragment,null,e.createElement(ya,{label:"UK",theme:a,url:r,active:"uk"===n}),e.createElement(ya,{label:"Dubai",theme:a,url:c,active:"dubai"===n}))))}d(),d();var ka=function(e){var t,c,l=e.primaryLinks,i=e.secondaryLinks,o=e.searchProps,s=r(null),m=r(null),d=r(null),u=n(!1),v=u[0],p=u[1],f=n(0),g=f[0],E=f[1],_=n(null),b=_[0],w=_[1],C=n(null),y=C[0],N=C[1],k=n(!1),x=k[0],L=k[1],T=n(!1),M=T[0],H=T[1],S=n(""),V=S[0],P=S[1],O=function(){p(!0),document.body.classList.add("lock-scroll")},Z=function(){L(!0),O()},q=function(){L(!1),H(!1)},B=function(){p(!1),q(),document.body.classList.remove("lock-scroll"),E(0),w(null),N(null),s.current&&s.current.focus()};a(function(){var e=function(e){"Escape"===e.key&&v&&B()};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}});var F=null,D=null;null!==b&&(F=null!==(t=h(h([],l,!0),i,!0)[b])&&void 0!==t?t:null,null!==y&&(null==F?void 0:F.children)&&(D=null!==(c=F.children[y])&&void 0!==c?c:null));return{openMenuButtonRef:s,headerRef:m,desktopCampusSelectorRef:d,isOpen:v,menuLevel:g,mainMenuSelectedIdx:b,levelOneSelectedIdx:y,searchIsOpen:x,searchOpenedFromHeader:M,searchTerm:V,mainMenuSelectedLink:F,firstLevelSelectedLink:D,openMenu:O,closeMenu:B,openSearch:Z,openSearchFromHeader:function(){H(!0),Z()},closeSearch:q,onClickMainMenuNavLink:function(e){E(1),w(e)},onClickLevelOneNavLink:function(e){E(2),N(e)},goBackToMainMenu:function(){E(0),w(null),q()},goBackToLevelOne:function(){E(1),N(null),q()},closeLowestLevelSearch:function(){E(2),q()},handleSearchChange:function(e){P(e.target.value)},handleSearchSubmit:function(e){if(e.preventDefault(),"undefined"!=typeof window){var t=null==o?void 0:o.resultsUrl;t&&(window.location.href=V?"".concat(t,"?term=").concat(V):t)}}}};d();var xa=function(t){var r=t.theme,c=void 0===r?"uobmain":r,l=t.inverse,o=void 0!==l&&l,s=t.primaryLinks,d=t.secondaryLinks,u=t.menuCards,h=t.dubaiUrl,v=t.ukUrl,f=t.logoTitleTagH1,g=void 0===f||f,E=t.activeCampus,_=void 0===E?"uk":E,b=t.searchProps,w=function(){var e=n(null),t=e[0],r=e[1];return a(function(){var e=window.scrollY,n=function(){var n=window.scrollY,a=n>e?"down":"up";a!==t&&(n-e>3||n-e<-3)&&r(a),e=n>0?n:0};return window.addEventListener("scroll",n),function(){window.removeEventListener("scroll",n)}},[t]),t}(),y=Te("768px"),N=ka({primaryLinks:s,secondaryLinks:d,searchProps:b}),k=N.openMenuButtonRef,x=N.headerRef,L=N.desktopCampusSelectorRef,T=N.isOpen,M=N.menuLevel,H=N.searchIsOpen,S=N.searchOpenedFromHeader,V=N.mainMenuSelectedLink,P=N.firstLevelSelectedLink,O=N.openMenu,Z=N.closeMenu,q=N.openSearch,B=N.openSearchFromHeader,F=N.onClickMainMenuNavLink,D=N.onClickLevelOneNavLink,I=N.goBackToMainMenu,A=N.goBackToLevelOne,$=N.closeLowestLevelSearch,R=N.handleSearchChange,j=N.handleSearchSubmit;e.useEffect(function(){if(x.current&&"down"===w){var e=x.current.offsetHeight;x.current.style.top="-".concat(e,"px")}else if(x.current&&"up"===w){var t=0;L.current&&x.current&&(t=L.current.offsetHeight),x.current.style.top="-".concat(t,"px")}},[L,x,w]);var z=e.createElement("div",{className:"header__campus-selector header__campus-selector--mobile"},e.createElement(Na,{theme:c,dubaiUrl:h,ukUrl:v,active:_,mobile:!0})),U=e.createElement("div",{className:"header__campus-selector header__campus-selector--desktop",ref:L},e.createElement(Na,{theme:c,dubaiUrl:h,ukUrl:v,active:_,mobile:!1})),W=e.createElement("div",{className:"header__campus-selector header__campus-selector--desktop"},e.createElement(Na,{theme:c,dubaiUrl:h,ukUrl:v,active:_,mobile:!1}));return e.createElement("header",{className:p("header",c&&"theme-".concat(c),o&&"theme-".concat(c,"--inverse"),!T&&"header--is-closed","header--".concat(_)),id:"header",ref:x},e.createElement("div",{className:"header__closed"},U,e.createElement("div",{className:"header__top-container"},e.createElement("div",{className:"header__logo-wrapper"},e.createElement("div",{className:"header__logo-wrapper"},g?e.createElement("h1",{className:"header__logo-heading"},e.createElement(qt,{activeCampus:_,imageMode:"light",classNames:"header__logo-link",imageAltText:"uk"===_?"University of Birmingham":"University of Birmingham Dubai",loadingAttr:"eager"})):e.createElement(qt,{activeCampus:_,imageMode:"light",classNames:"header__logo-link",loadingAttr:"eager"},e.createElement("span",{className:"sr-only"},"uk"===_?"University of Birmingham":"University of Birmingham Dubai")))),e.createElement("div",{className:"header__right-wrapper"},e.createElement("div",{className:"header__search-button"},e.createElement(C,{theme:c,label:"Search",onClick:B,hollow:!0})),e.createElement("div",{className:"header__menu-button"},e.createElement("span",null,"Menu"),e.createElement(qe,{theme:"uobmain",icon:"hamburger",onClick:O,title:"Open menu",ariaControls:"header",ref:k,ariaExpanded:T}))))),e.createElement(m,null,T&&e.createElement(va,null,e.createElement(i.div,{className:"header__open",initial:{x:"100%"},animate:{x:"0"},exit:{x:"100%"},transition:{type:"tween"},key:"header__open"},W,e.createElement("div",{className:"header__top-container"},e.createElement("div",{className:"header__logo-wrapper"},e.createElement(qt,{activeCampus:_,imageMode:"dark",classNames:"header__logo-link"},e.createElement("h1",{className:"sr-only"},"uk"===_?"University of Birmingham":"University of Birmingham Dubai"))),e.createElement("div",{className:"header__right-wrapper"},!y&&!H&&e.createElement("div",{className:"header__search-button-menu"},e.createElement(C,{theme:c,inverse:!0,label:"Search",onClick:q,hollow:!0})),e.createElement("div",{className:"header__menu-button"},e.createElement("span",null,"Menu"),e.createElement(qe,{theme:"uobmain",inverse:!0,icon:"cross",onClick:Z,title:"Close menu",ariaControls:"header"})))),y&&!H&&e.createElement("div",{className:"header__search-button-mobile"},e.createElement(C,{theme:c,inverse:!0,label:"Search",onClick:q,hollow:!0})),0===M&&!H&&e.createElement(Ea,{primaryLinks:s,secondaryLinks:d,menuCards:u,onClickNavLink:F,theme:c,inverse:o}),0===M&&H&&e.createElement(Ca,{theme:c,introText:b.introText,placeholder:b.placeholder,title:b.title,handleSearchChange:R,handleSearchSubmit:j,onClickGoBack:S?void 0:I,backLinkLabel:S?"":"Back to menu",recommendedLinks:b.recommendedLinks,recommendedLinkTitle:b.recommendedLinkTitle}),1===M&&V&&!H&&e.createElement(ba,{headingLink:V,onClickNavLink:D,theme:c,inverse:o,onClickGoBack:I,backLinkLabel:"Back to menu"}),1===M&&V&&H&&e.createElement(Ca,{theme:c,introText:b.introText,placeholder:b.placeholder,title:b.title,handleSearchChange:R,handleSearchSubmit:j,onClickGoBack:A,backLinkLabel:"Back to ".concat(V.label),recommendedLinks:b.recommendedLinks,recommendedLinkTitle:b.recommendedLinkTitle}),2===M&&V&&P&&!H&&e.createElement(ba,{headingLink:P,onClickNavLink:function(){},theme:c,inverse:o,onClickGoBack:A,backLinkLabel:"Back to ".concat(V.label)}),2===M&&V&&P&&H&&e.createElement(Ca,{theme:c,introText:b.introText,placeholder:b.placeholder,title:b.title,handleSearchChange:R,handleSearchSubmit:j,onClickGoBack:$,backLinkLabel:"Back to ".concat(P.label),recommendedLinks:b.recommendedLinks,recommendedLinkTitle:b.recommendedLinkTitle}),z))))},La={mobile:{image:"polygon(0 0, calc(100% - 1px) 0, calc(75% - 1px) calc(70% - 1px), 0 calc(90% - 1px))",background:"polygon(0 0, 100% 0, 75% 70%, 0 90%)"},tablet:{image:"polygon(0 0, 100% 0, 100% calc(70% - 1px), calc(30% + 1px) calc(60% - 1px))",background:"polygon(0 0, 100% 0, 100% 70%, 30% 60%)"},desktop:{image:"polygon(1px 0, 100% 0, 100% calc(95% - 1px), calc(10% + 1px) calc(65% - 1px))",background:"polygon(0 0, 100% 0, 100% 95%, 10% 65%)"}};function Ta(t){var n,c,o=t.isMobile,s=t.isTablet,m=t.image,d=o?La.mobile:s?La.tablet:La.desktop,u=r(null),h=l();return a(function(){var e;u.current&&u.current.setAttribute("fetchpriority",null!==(e=m.fetchPriority)&&void 0!==e?e:"auto")}),e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero__polygon-image-wrapper"},e.createElement(i.img,{ref:u,className:"hero__image",src:m.src.default,srcSet:"".concat(null!==(n=m.src.small)&&void 0!==n?n:m.src.default," 576w, ").concat(null!==(c=m.src.medium)&&void 0!==c?c:m.src.default," 992w, ").concat(m.src.default," 1440w"),alt:m.alt,fetchPriority:m.fetchPriority,animate:{clipPath:d.image},transition:{type:"tween"}}),e.createElement(i.div,{key:h,className:"hero__polygon-image-background",animate:{opacity:1,clipPath:d.background},transition:{type:"tween"},initial:{opacity:0}})))}d();var Ma={initial:{pathLength:0},animate:{pathLength:1},transition:{delay:.5,duration:1}};function Ha(t){var n=t.isMobile,a=t.isTablet;return n?e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero__line",animate:{left:"75%",bottom:"30%",transform:"rotate(10deg)"},initial:!1},e.createElement("svg",{width:"140",height:"2",viewBox:"0 0 140 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140"},Ma)))),e.createElement(i.div,{className:"hero__line",animate:{left:"75%",bottom:"30%",transform:"rotate(-15deg)"},initial:!1},e.createElement("svg",{width:"140",height:"2",viewBox:"0 0 140 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140"},Ma))))):a?e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero__line",animate:{left:"calc(30% + 1px)",top:"calc(60% - 3px)",transform:"rotate(161deg)"},initial:!1},e.createElement("svg",{width:"120",height:"2",viewBox:"0 0 120 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140"},Ma)))),e.createElement(i.div,{className:"hero__line",animate:{left:"30%",top:"calc(60% - 1px)",transform:"rotate(26deg)"},initial:!1},e.createElement("svg",{width:"120",height:"2",viewBox:"0 0 120 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140"},Ma))))):e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero__line",animate:{left:"10%",top:"calc(65% - 3px)",transform:"rotate(118deg)"},initial:!1},e.createElement("svg",{width:"140",height:"2",viewBox:"0 0 140 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140"},Ma)))),e.createElement(i.div,{className:"hero__line",animate:{left:"10%",top:"calc(65% - 3px)",transform:"rotate(41deg)"},initial:!1},e.createElement("svg",{width:"140",height:"2",viewBox:"0 0 140 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140"},Ma)))))}d();var Sa=function(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.fieldName,i=t.selectOptions,o=t.defaultValue,s=void 0===o?"all":o,m=t.hiddenLabel,d=void 0!==m&&m,u=t.customLabel,h=t.title,v=t.onChange,f=t.value;return e.createElement("div",{className:p("form-select",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},u?e.createElement("label",{htmlFor:l,className:p("form-select__label",d&&"sr-only")},u):e.createElement("label",{htmlFor:l,className:p("form-select__label",d&&"sr-only")},"Select ",l),e.createElement("div",{className:"form-select__select-wrapper"},e.createElement("select",{className:"form-select__select",defaultValue:s,value:f,id:l,name:l,onChange:v},e.createElement("option",{value:"all"},h),i&&i.map(function(t,n){return e.createElement("option",{value:t.value,key:n},t.label)})),e.createElement("div",{className:"form-select__icon"},e.createElement(_,{icon:"arrow-down",theme:a,inverse:c}))))};function Va(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.title,i=t.description,o=t.defaultSearchTerm,s=t.placeholder,m=t.filterTitle,d=t.filterFieldName,u=t.filterOptions,h=t.defaultFilter,v=void 0===h?"all":h,f=t.wrapped,g=void 0!==f&&f,E=t.fullWidth,_=void 0!==E&&E,b=t.onGrid,w=void 0!==b&&b,y=t.titleTag,N=void 0===y?"h2":y,k=t.formSubmitHandler,L=t.filterChangeHandler,T=t.searchTermChangeHandler,M=N;return e.createElement("div",{className:p("search-course",_&&"search-course--full-width",w&&"search-course--on-grid",g&&"search-course--wrapped",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"),!d&&"search-course--no-filter")},e.createElement("div",{className:"search-course__container"},l&&e.createElement(M,{className:"search-course__title"},l),i&&e.createElement("div",{className:"search-course__description"},e.createElement(x,{text:i,theme:a,inverse:c})),e.createElement("form",{className:"search-course__form",method:"post",onSubmit:k},e.createElement("div",{className:"search-course__search-wrapper"},e.createElement(wa,{theme:a,inverse:c,fieldName:"search",hiddenLabel:!0,defaultValue:o,placeholder:s,onChange:T}),e.createElement(qe,{theme:a,inverse:!c,title:"Search",icon:"search",isSubmit:!0}),g&&e.createElement(C,{theme:a,inverse:!c,label:"Search",isSubmit:!0})),d&&m&&u&&e.createElement(Sa,{theme:a,inverse:c,title:m,fieldName:d,selectOptions:u,defaultValue:v,hiddenLabel:!0,onChange:L}),!g&&e.createElement(C,{theme:a,inverse:!c,label:"Search",isSubmit:!0}))))}function Pa(t){var n=t.theme,a=t.inverse,r=t.title,c=t.titleTag,l=void 0===c?"h2":c,i=t.description,o=t.image,s=t.links,m=t.courseSearchProps,d=Te("768px"),h=Te("1248px");return e.createElement("div",{className:p("hero",n&&"theme-".concat(n),a&&"theme-".concat(n,"--inverse"),o&&"hero--with-image"),id:"hero"},o&&"rectangle"===o.style&&e.createElement("div",{className:"hero__image-wrapper hero__image-wrapper--mobile hero__image-wrapper--rectangle"},e.createElement(H,u({},o,{altText:o.alt,fetchPriority:o.fetchPriority}))),o&&"lines-of-intent"===o.style&&d&&e.createElement("div",{className:"hero__image-wrapper hero__image-wrapper--mobile"},e.createElement(Ta,{isMobile:!0,isTablet:!1,image:o}),e.createElement(Ha,{isMobile:!0,isTablet:!1})),e.createElement("div",{className:"hero__container"},e.createElement("div",{className:"hero__content"},e.createElement(l,{className:"hero__title"},r),i&&e.createElement("div",{className:"hero__description"},e.createElement(x,{text:i,theme:n,inverse:a})),s&&s.length>0&&e.createElement("div",{className:"hero__buttons"},s.map(function(t,r){return e.createElement(C,{theme:n,key:r,url:t.url,label:t.title,externalLink:t.externalLink,inverse:!a,hollow:1===r})})),m&&e.createElement(Va,u({theme:n,inverse:a,wrapped:!0},m))),o&&"rectangle"===o.style&&e.createElement("div",{className:"hero__image-wrapper hero__image-wrapper--desktop hero__image-wrapper--rectangle"},e.createElement(H,u({},o,{altText:o.alt,fetchPriority:o.fetchPriority}))),o&&"lines-of-intent"===o.style&&h&&e.createElement("div",{className:"hero__image-wrapper hero__image-wrapper--desktop hero__image-wrapper--polygon"},e.createElement(Ta,{isMobile:!1,isTablet:!0,image:o}),e.createElement(Ha,{isMobile:!1,isTablet:!0})),o&&"lines-of-intent"===o.style&&!d&&!h&&e.createElement("div",{className:"hero__image-wrapper hero__image-wrapper--desktop hero__image-wrapper--polygon"},e.createElement(Ta,{isMobile:!1,isTablet:!1,image:o}),e.createElement(Ha,{isMobile:!1,isTablet:!1}))))}function Oa(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=t.label,l=t.icons;return e.createElement("div",{className:p("share-buttons",a&&"theme-".concat(a),r&&"theme-".concat(a,"--inverse"))},c&&e.createElement("div",{className:"share-buttons__label"},c),l&&e.createElement("ul",{className:"share-buttons__icon-wrapper"},l.map(function(t,n){return e.createElement("li",{className:"share-buttons__icon",key:n},e.createElement(qe,{theme:a,title:t.title,icon:t.icon,url:t.url,inverse:r}))})))}function Za(t){var n="items"in t?t.items:[t],a=(null!=n?n:[]).filter(function(e){return Boolean(e)});return e.createElement(e.Fragment,null,a.map(function(t,n){var r=t.theme,c=void 0===r?"uobmain":r,l=t.inverse,i=void 0!==l&&l,o=t.label,s=t.url,m=t.externalLink;return e.createElement(e.Fragment,{key:"".concat(s,"-").concat(o,"-").concat(n)},e.createElement("a",{className:p("paragraph-link",c&&"theme-".concat(c),i&&"theme-".concat(c,"--inverse")),href:s,target:m?"_blank":"_self",rel:"noreferrer"},o),n<a.length-1?" ":null)}))}function qa(t){var n=t.theme,a=t.inverse,r=t.title,c=t.titleTag,l=void 0===c?"h2":c,i=t.description,o=t.cardImage,s=t.publishDate,m=t.readTime,d=t.shareButtons,h=t.author,v=Array.isArray(h)?h:[h];return e.createElement("section",{className:p("hero-article",n&&"theme-".concat(n),a&&"theme-".concat(n,"--inverse"))},e.createElement("div",{className:"hero-article__container"},e.createElement("div",{className:"hero-article__content"},e.createElement(l,{className:"hero-article__title"},r),e.createElement("p",{className:"hero-article__description"},i),e.createElement("div",{className:"hero-article__meta-data"},s&&e.createElement("span",{className:"hero-article__publish-date"},s),s&&m&&e.createElement("span",{className:"hero-article__separator"},"•"),m&&e.createElement("span",{className:"hero-article__read-time"},m),h&&e.createElement(e.Fragment,null,e.createElement("span",{className:"hero-article__separator"},"•"),e.createElement("span",{className:"hero-article__author"},"by ",e.createElement(Za,{items:v})))),e.createElement("div",{className:"hero-article__sharing-buttons"},e.createElement(Oa,{theme:n,label:d.label,icons:d.icons,inverse:a})))),o&&e.createElement("div",{className:"hero-article__image-wrapper"},e.createElement(Ge,u({},o,{inverse:a}))))}function Ba(t){var a=t.theme,r=t.inverse,c=t.buttonLabel,l=t.hollow,i=t.modalChildren,o=n(!1),s=o[0],m=o[1],d=function(){m(!1),document.body.classList.remove("lock-scroll")};return e.createElement("div",{className:p("modal-cta-button",a&&"theme-".concat(a),r&&"theme-".concat(a,"--inverse"))},e.createElement(C,{inverse:r,label:c,onClick:function(){s?d():(m(!0),document.body.classList.add("lock-scroll"))},theme:a,hollow:l}),s&&e.createElement(Fe,{centred:!0,theme:a,closeModal:d,isOpen:s},e.createElement(st,{className:"modal-cta-button__embed-wrapper"},i)))}function Fa(t){var n=t.title,a=t.value,r=t.link;return e.createElement("article",{className:"course-tile"},e.createElement("div",{className:"course-tile__top"},e.createElement("div",{className:"course-tile__title"},n),e.createElement("div",{className:"course-tile__value"},a)),r&&e.createElement("div",{className:"course-tile__link-wrapper"},e.createElement(Ft,u({},r,{inverse:!0,onClick:function(e){return Dt(e,r.url||"#")}}))))}function Da(t){var n=t.title,a=t.selectProps;return e.createElement("article",{className:"course-tile-select"},e.createElement("div",{className:"course-tile-select__top"},e.createElement("div",{className:"course-tile-select__title"},n),e.createElement(Sa,u({},a,{inverse:!0}))))}function Ia(t){var n=t.title,a=t.rank,r=t.rankText,c=t.link;return e.createElement("article",{className:"course-tile-ranking"},e.createElement("div",{className:"course-tile-ranking__top"},e.createElement("div",{className:"course-tile-ranking__title"},n),e.createElement("div",{className:"course-tile-ranking__rank"},a),e.createElement("div",{className:"course-tile-ranking__rank-text"},r)),c&&e.createElement("div",{className:"course-tile-ranking__link-wrapper"},e.createElement(Ft,u({},c,{inverse:!0,onClick:function(e){return Dt(e,c.url||"#")}}))))}function Aa(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0===r||r,l=t.topPadding,i=void 0!==l&&l,o=t.selectorProps;return e.createElement("div",{className:p("location-selector",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},e.createElement("div",{className:p("location-selector__container",i&&"location-selector__container--padding-top")},e.createElement(Sa,u({},o,{inverse:c}))))}function $a(t){var n,a=t.theme,r=t.title,c=t.titleTag,l=void 0===c?"h2":c,i=t.awardShort,o=t.links,s=t.ranking,m=t.award,d=t.campus,h=t.ucas,v=t.duration,f=t.entryRequirements,g=t.startDate,E=t.yearOfEntry,_=t.fees,b=t.deliveryFormat,w=t.locationDetails,y=t.modalCTA;return e.createElement("section",{className:p("hero-courses",a&&"theme-".concat(a)),id:"hero-courses"},e.createElement("div",{className:"hero-courses__container"},e.createElement("div",{className:"hero-courses__content"},e.createElement("div",{className:"hero-courses__title-wrapper"},e.createElement(k,{htmlTag:l,classNames:"hero-courses__title"},r&&r.length>0&&i&&i.length>0?r+" ":r,e.createElement("span",{className:"hero-courses__title-award"},i))),w&&e.createElement("div",{className:"hero-courses__location-wrapper"},e.createElement(Aa,u({},w,{inverse:!1}))),e.createElement("ul",{className:(n="hero-courses__grid--four",s&&(d||b||h)?n="hero-courses__grid--six":(s&&!d&&!b&&!h||!s&&(d||b||h))&&(n="hero-courses__grid--five"),"hero-courses__grid "+n)},s&&e.createElement("li",{className:"hero-courses__column hero-courses__column--ranking"},e.createElement(Ia,u({},s))),(h||d||b)&&e.createElement("li",{className:"hero-courses__column hero-courses__column--split hero-courses__column--award"},h&&e.createElement(Fa,u({},h)),d&&e.createElement(Fa,u({},d)),b&&e.createElement(Fa,u({},b))),v&&E?e.createElement("li",{className:"hero-courses__column hero-courses__column--split hero-courses__column--duration"},e.createElement(Da,u({},E)),e.createElement(Fa,u({},v))):v&&g?e.createElement("li",{className:"hero-courses__column hero-courses__column--split hero-courses__column--duration"},e.createElement(Fa,u({},g)),e.createElement(Fa,u({},v))):e.createElement("li",{className:"hero-courses__column hero-courses__column--duration"},e.createElement(Fa,u({},v))),m&&e.createElement("li",{className:"hero-courses__column hero-courses__column--delivery-format"},e.createElement(Fa,u({},m))),e.createElement("li",{className:"hero-courses__column hero-courses__column--entry-requirements"},e.createElement(Fa,u({},f))),e.createElement("li",{className:"hero-courses__column hero-courses__column--fees"},e.createElement(Fa,u({},_)))),e.createElement("div",{className:"hero-courses__button-wrapper"},e.createElement("ul",{className:"hero-courses__buttons"},o&&o.map(function(t,n){return t.externalLink?e.createElement("li",{className:"hero-courses__button",key:n},e.createElement(De,{theme:a,label:t.label,icon:"external",hollow:n%2!=0,iconPosition:"right",url:t.url,inverse:!0,onClick:t.onClick})):e.createElement("li",{className:"hero-courses__button",key:n},e.createElement(C,{theme:a,label:t.label,hollow:n%2!=0,url:t.url,inverse:!0,onClick:t.onClick}))})),y&&e.createElement(Ba,{theme:a,inverse:!y.inverse,hollow:!0,buttonLabel:y.buttonLabel,modalChildren:y.modalChildren})))))}d(),d(),d(),d(),d(),d(),d();var Ra={first:{clipPath:"polygon(0 0, 95% 0, 75% 100%, 0 80%)"},second:{clipPath:"polygon(0 0, 100% 0, 75% 70%, 0 90%)"},third:{clipPath:"polygon(0 0, 80% 0, 95% 90%, 0 80%)"},visible:{opacity:1}},ja={first:{clipPath:"polygon(0 0, calc(95% - 1px) 0, calc(75% - 1px) calc(100% - 1px), 0 calc(80% - 1px))"},second:{clipPath:"polygon(0 0, calc(100% - 1px) 0, calc(75% - 1px) calc(70% - 1px), 0 calc(90% - 1px))"},third:{clipPath:"polygon(0 0, calc(80% - 1px) 0, calc(95% - 1px) calc(90% - 1px), 0 calc(80% - 1px))"}},za={first:{clipPath:"polygon(0 25%, 100% 5%, 100% 100%, 23% 100%)"},second:{clipPath:"polygon(33% 20%, 100% 5%, 100% 100%, 0 100%)"},third:{clipPath:"polygon(0 3%, 100% 20%, 100% 100%, 23% 100%)"},visible:{opacity:1}},Ua={first:{clipPath:"polygon(1px calc(25% + 1px), 100% calc(5% + 1px), 100% 100%, calc(23% + 1px) 100%)"},second:{clipPath:"polygon(calc(33% + 1px) calc(20% + 1px), 100% calc(5% + 1px), 100% 100%, 1px 100%)"},third:{clipPath:"polygon(1px calc(3% + 1px), 100% calc(20% + 1px), 100% 100%, calc(23% + 1px) 100%"}},Wa={first:{clipPath:"polygon(0 33%, 100% 10%, 100% 100%, 23% 100%)"},second:{clipPath:"polygon(33% 30%, 100% 10%, 100% 100%, 0 100%)"},third:{clipPath:"polygon(0 10%, 100% 25%, 100% 100%, 15% 100%)"},visible:{opacity:1}},Ga={first:{clipPath:"polygon(1px calc(33% + 1px), 100% calc(10% + 1px), 100% 100%, calc(23% + 1px) 100%)"},second:{clipPath:"polygon(calc(33% + 1px) calc(30% + 1px), 100% calc(10% + 1px), 100% 100%, 1px 100%)"},third:{clipPath:"polygon(1px calc(10% + 1px), 100% calc(25% + 1px), 100% 100%, calc(15% + 1px) 100%"}},Ka={first:{left:"calc(75% + 1px)",bottom:0,transform:"rotate(-40deg)"},second:{left:"75%",bottom:"30%",transform:"rotate(-15deg)"},third:{left:"95%",bottom:"10%",transform:"rotate(-70deg)"}},Ya={first:{left:"calc(75% + 1px)",bottom:0,transform:"rotate(-15deg)"},second:{left:"75%",bottom:"30%",transform:"rotate(10deg)"},third:{left:"95%",bottom:"10%",transform:"rotate(-30deg)"}},Ja={first:{left:"2px",top:"calc(25% - 1px)",transform:"rotate(-130deg)"},second:{left:"calc(33% + 2px)",top:"calc(20% - 1px)",transform:"rotate(-155deg)"},third:{left:"0",top:"calc(3% - 3px)",transform:"rotate(-170deg)"}},Xa={first:{left:"2px",top:"calc(25% - 1px)",transform:"rotate(-50deg)"},second:{left:"calc(33% + 2px)",top:"calc(20% - 1px)",transform:"rotate(-110deg)"},third:{left:"1px",top:"calc(3% - 1px)",transform:"rotate(-10deg)"}},Qa={first:{left:"2px",top:"calc(33% - 1px)",transform:"rotate(-130deg)"},second:{left:"calc(33% + 1px)",top:"calc(30% - 2px)",transform:"rotate(-160deg)"},third:{left:"1px",top:"calc(10% - 2px)",transform:"rotate(-160deg)"}},er={first:{left:"2px",top:"calc(33% - 1px)",transform:"rotate(-45deg)"},second:{left:"calc(33% + 1px)",top:"calc(30% - 2px)",transform:"rotate(-75deg)"},third:{left:"0",top:"calc(10%)",transform:"rotate(-15deg)"}},tr={initial:{pathLength:0},animate:{pathLength:1},transition:{delay:.5,duration:1}};function nr(t){var n=t.isMobile,a=t.isTablet,r=t.activeVariant;return n?e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero-carousel__line",variants:Ka,animate:r,initial:!1},e.createElement("svg",{width:"140",height:"2",viewBox:"0 0 140 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140",stroke:"black"},tr)))),e.createElement(i.div,{className:"hero-carousel__line",variants:Ya,animate:r,initial:!1},e.createElement("svg",{width:"140",height:"2",viewBox:"0 0 140 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140",stroke:"black"},tr))))):a?e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero-carousel__line",variants:Ja,animate:r,initial:!1},e.createElement("svg",{width:"260",height:"2",viewBox:"0 0 260 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H260",stroke:"black"},tr)))),e.createElement(i.div,{className:"hero-carousel__line",variants:Xa,animate:r,initial:!1},e.createElement("svg",{width:"260",height:"2",viewBox:"0 0 260 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H260",stroke:"black"},tr))))):e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero-carousel__line",variants:Qa,animate:r,initial:!1},e.createElement("svg",{width:"360",height:"2",viewBox:"0 0 360 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H360",stroke:"black"},tr)))),e.createElement(i.div,{className:"hero-carousel__line",variants:er,animate:r,initial:!1},e.createElement("svg",{width:"360",height:"2",viewBox:"0 0 360 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H360",stroke:"black"},tr)))))}function ar(t){var n,c,o=t.isMobile,s=t.isTablet,d=t.activeVariant,u=t.imageSrc,h=t.imageAlt,v=t.imageFetchPriority,p=r(null),f=l();return a(function(){p.current&&p.current.setAttribute("fetchpriority",null!=v?v:"high")}),e.createElement(e.Fragment,null,e.createElement(m,null,e.createElement(i.div,{className:"hero-carousel__image-wrapper",transition:{delayChildren:1}},e.createElement(i.img,{ref:p,className:"hero-carousel__image",src:null==u?void 0:u.default,srcSet:"".concat(null!==(n=null==u?void 0:u.small)&&void 0!==n?n:null==u?void 0:u.default," 576w, ").concat(null!==(c=null==u?void 0:u.medium)&&void 0!==c?c:null==u?void 0:u.default," 992w, ").concat(null==u?void 0:u.default," 1440w"),alt:h,variants:o?ja:s?Ua:Ga,animate:d,initial:{clipPath:"polygon(0 0, 0 0, 0 0, 0 0)"},transition:{type:"tween"}}),e.createElement(i.div,{key:f,className:"hero-carousel__image-background",variants:o?Ra:s?za:Wa,animate:["visible",d],exit:{backgroundColor:"rgba(255, 255, 255, 0)"},transition:{type:"tween"},initial:{opacity:0,clipPath:"polygon(1% 1%, 1% 1%, 1% 1%, 1% 1%)"}}))))}var rr=t(function(t,n){var a=t.theme,r=t.category,c=t.title,l=t.description,i=t.linkUrl,o=t.linkLabel,s=t.onKeyDown;return e.createElement(e.Fragment,null,e.createElement("p",{className:"hero-carousel__category"},r),e.createElement("h2",{className:"hero-carousel__title"},c),e.createElement("p",{className:"hero-carousel__description"},l),e.createElement("div",{className:"hero-carousel__cta"},e.createElement(y,{url:i,title:o,theme:a,inverse:!0,onKeyDown:s,ref:n})))});function cr(t){var a=t.theme,c=t.cards,l=c.length>1,o=n(0),s=o[0],m=o[1],d=c[s],u=r(null),h=Te("768px"),v=Te("1248px"),f="";switch(s){case 0:f="first";break;case 1:f="second";break;case 2:f="third"}var g=l?e.createElement(tt,{theme:a,totalNumber:c.length,currentNumber:s+1,carouselId:"hero-carousel",onClickPrev:function(){m(function(e){return e-1})},onClickNext:function(){m(function(e){return e+1})},prevButtonDisabled:0===s,nextButtonDisabled:s===c.length-1,showNumbers:!0}):e.createElement(e.Fragment,null);return e.createElement("div",{className:p("hero-carousel",a&&"theme-".concat(a)),id:"hero-carousel"},e.createElement("div",{className:"hero-carousel__top"},e.createElement("div",{className:"hero-carousel__content"},h&&e.createElement("div",{className:"hero-carousel__image-container hero-carousel__image-container--mobile"},e.createElement(ar,{isMobile:!0,isTablet:!1,activeVariant:f,imageSrc:d.imageSrc,imageAlt:d.imageAlt}),e.createElement(nr,{isMobile:!0,isTablet:!1,activeVariant:f})),e.createElement("div",{className:"hero-carousel__cards"},e.createElement(i.section,{className:"hero-carousel__active-card",key:s,initial:{opacity:0},animate:{opacity:1}},e.createElement(rr,{category:d.category,title:d.title,description:d.description,linkUrl:d.linkUrl,linkLabel:d.linkLabel,theme:a,ref:u})),h&&l&&c.map(function(t,n){return e.createElement("section",{className:"hero-carousel__invisible-card hero-carousel__invisible-card--mobile",key:n,"aria-hidden":!0},e.createElement(rr,{category:t.category,title:t.title,description:t.description,linkUrl:t.linkUrl,linkLabel:t.linkLabel,theme:a}))}),e.createElement("div",{className:"hero-carousel__nav hero-carousel__nav--desktop"},g)),e.createElement("div",{className:"hero-carousel__image-container hero-carousel__image-container--desktop"},e.createElement(ar,{isMobile:!1,isTablet:v,activeVariant:f,imageSrc:null==d?void 0:d.imageSrc,imageAlt:d.imageAlt}),e.createElement(nr,{isMobile:!1,isTablet:v,activeVariant:f}))),!h&&l&&c.map(function(t,n){return e.createElement("div",{className:"hero-carousel__invisible-card hero-carousel__invisible-card--desktop",key:n,"aria-hidden":!0},e.createElement("section",null,e.createElement(rr,{category:t.category,title:t.title,description:t.description,linkUrl:t.linkUrl,linkLabel:t.linkLabel,theme:a})))})),h&&e.createElement("div",{className:"hero-carousel__nav hero-carousel__nav--mobile"},g))}function lr(t){var c=t.theme,i=t.title,o=t.titleTag,s=void 0===o?"h1":o,m=t.description,d=t.bgVideoUrl,u=t.bgVideoMobileThumbnail,h=t.bgVideoAltText,v=t.fullVideoId,f=t.fullVideoButtonLabel,g=void 0===f?"Watch full video":f,E=t.describedVideoId,_=t.describedVideoButtonLabel,b=void 0===_?"Audio described video":_,w=t.includesAudio,C=r(null),y=n(!1),N=y[0],k=y[1],x=n(!0),L=x[0],T=x[1],M=n(!1),H=M[0],S=M[1],V=r(v),P=l(),O="video-".concat(P);a(function(){var e,t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=navigator.connection,a=!(!n||!n.saveData&&!["slow-2g","2g","3g"].includes(null!==(e=n.effectiveType)&&void 0!==e?e:""));!C.current||t.matches||a||C.current.play().catch(function(){});var r=function(){C.current&&(k(!C.current.paused),T(C.current.muted))},c=C.current;return null==c||c.addEventListener("play",r),null==c||c.addEventListener("pause",r),null==c||c.addEventListener("volumechange",r),function(){null==c||c.removeEventListener("play",r),null==c||c.removeEventListener("pause",r),null==c||c.removeEventListener("volumechange",r)}},[d]);var Z=function(e){var t;V.current=e,S(!0),document.body.classList.add("lock-scroll"),null===(t=C.current)||void 0===t||t.pause()},q=s;return e.createElement(e.Fragment,null,e.createElement("section",{className:p("hero-video","theme-".concat(c))},e.createElement("div",{className:"hero-video__bg-wrapper",style:{backgroundImage:"url(".concat(u,")")}},e.createElement("video",{id:O,ref:C,role:"img",className:"hero-video__bg-element",src:"".concat(d,"#t=0.1"),poster:u,muted:!w||L,loop:!0,playsInline:!0,preload:"metadata","aria-label":h})),e.createElement("div",{className:"hero-video__container"},e.createElement("div",{className:"hero-video__card"},e.createElement(q,{className:"hero-video__title"},i),e.createElement("p",{className:"hero-video__description"},m),e.createElement("div",{className:"hero-video__controls"},e.createElement("div",{className:"hero-video__playback-btns"},e.createElement(qe,{theme:c,inverse:!0,title:N?"Pause":"Play",icon:N?"pause":"play",onClick:function(){var e=C.current;e&&(N?e.pause():e.play().catch(function(){}))},"aria-controls":O,"aria-pressed":N}),w&&e.createElement(qe,{theme:c,inverse:!0,title:L?"Unmute":"Mute",icon:L?"mute-off":"mute-on",onClick:function(){C.current&&w&&(C.current.muted=!C.current.muted,T(C.current.muted))},"aria-controls":O,"aria-pressed":!L})),e.createElement("div",{className:"hero-video__action-btns"},e.createElement(De,{theme:c,inverse:!1,hollow:!0,label:g,icon:"play",onClick:function(){return Z(v)}}),E&&e.createElement(De,{theme:c,inverse:!1,hollow:!0,label:b,icon:"play",onClick:function(){return Z(E)}})))))),H&&e.createElement(Fe,{theme:c,closeModal:function(){S(!1),document.body.classList.remove("lock-scroll")},isOpen:H},e.createElement(Ze,{theme:c,id:V.current,autoPlay:!0})))}function ir(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=t.title,l=t.description,i=t.linkProps,o=t.fullWidth,s=t.makeHeadingFullWidth,m=t.images,d=t.htmlTag;if(!m||0===m.length)return null;var h=3===m.length&&!o;return e.createElement("div",{className:p("image-block","theme-".concat(a),r&&"theme-".concat(a,"--inverse"),o?"image-block--full-width":"image-block--standard-width","image-block--count-".concat(m.length))},(c||l||i)&&e.createElement(T,{theme:a,inverse:r,title:c,description:l,linkProps:i,fullWidth:!!s,htmlTag:d}),e.createElement("div",{className:"image-block__container"},h?e.createElement("div",{className:"image-block__inner-grid"},m.map(function(t,n){return e.createElement("div",{key:n,className:"image-block__item"},e.createElement(Ge,u({},t,{theme:a,inverse:r})))})):m.map(function(t,n){return e.createElement("div",{key:n,className:p("image-block__item","image-block__item--index-".concat(n+1))},e.createElement(Ge,u({},t,{theme:a,inverse:r})))})))}function or(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.title,i=t.description,o=t.linkProps,s=t.fullWidth,m=void 0!==s&&s,d=t.widerImage,u=t.images,h=t.htmlTag;return e.createElement("section",{className:p("image-carousel",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"),m&&"image-carousel--full-width",d&&"image-carousel--wider-image")},(l||i)&&e.createElement(T,{theme:a,htmlTag:h,inverse:c,title:l,description:i,linkProps:o}),e.createElement("div",{className:"image-carousel__grid"},e.createElement(nt,{theme:a,inverse:c,type:"image",cards:u})))}function sr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.heading,c=void 0===r?"Page contents":r,l=t.links,i=t.buttonLinks,o=t.locationDetails,s=function(e){var t=document.getElementById(e);if(t){var n=t.getBoundingClientRect().top+window.pageYOffset-20;window.scrollTo({top:n,behavior:"smooth"});var a=null,r=null,c=0,l=function(){a&&(a.disconnect(),a=null),r&&(r.disconnect(),r=null),c&&(clearTimeout(c),c=0)},i=function(e){return!!e&&(a=new IntersectionObserver(function(t){t.some(function(e){return e.isIntersecting})&&function(e){try{e.focus({preventScroll:!0})}catch(e){}finally{l()}}(e)},{root:null,threshold:.1,rootMargin:"0px 0px -20% 0px"}),a.observe(e),!0)},o=t.querySelector("h1,h2,h3,h4,h5,h6");i(o)||(r=new MutationObserver(function(){o=t.querySelector("h1,h2,h3,h4,h5,h6"),i(o)&&r&&(r.disconnect(),r=null)})).observe(t,{childList:!0,subtree:!0}),c=window.setTimeout(function(){l();var e=t.querySelector('a, button, input, select, textarea, [tabindex]:not([tabindex="-1"])');if(e){var n=!e.hasAttribute("tabindex");n&&e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}),n&&e.removeAttribute("tabindex")}},1e3)}},m=function(e,t){e.preventDefault(),s(t.replace("#",""))};return e.createElement("div",{className:p("in-page-navigation-links",a&&"theme-".concat(a))},e.createElement("h2",{className:"in-page-navigation-links__heading"},c),o&&e.createElement(Aa,u({},o,{inverse:!0})),e.createElement("nav",null,e.createElement("ul",{className:"in-page-navigation-links__link-container"},l.map(function(t){return e.createElement("li",{className:p("in-page-navigation-links__link-wrapper",t.active&&"in-page-navigation-links__link-wrapper--active"),key:t.url},e.createElement("a",{className:"in-page-navigation-links__link",href:t.url,onClick:function(e){return m(e,t.url)},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||m(e,t.url)}},t.title))}))),e.createElement("ul",null,i&&i.map(function(t,n){return t.externalLink?e.createElement("li",{className:"in-page-navigation-links__link-button",key:n},e.createElement(De,{theme:a,label:t.label,icon:"external",hollow:n%2!=0,iconPosition:"right",url:t.url,onClick:t.onClick})):e.createElement("li",{className:"in-page-navigation-links__link-button",key:n},e.createElement(C,{theme:a,label:t.label,hollow:n%2!=0,url:t.url,onClick:t.onClick}))})))}function mr(t){var c,l,o=t.theme,s=void 0===o?"uobmain":o,d=t.inverse,h=void 0!==d&&d,v=t.links,f=t.expandableHeader,g=void 0===f?"Page contents":f,E=n(!1),_=E[0],b=E[1],w=n("not-docked"),C=w[0],y=w[1],N=n(null),k=N[0],x=N[1],L=r(null),T=r(null),M=r(null),H=r(null),S=r(null),V=function(){b(!1)};return a(function(){var e=function(e){!c.current||e.target instanceof HTMLElement&&c.current.contains(e.target)||l()};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[c=S,l=function(){return V()}]),a(function(){var e;M.current=new IntersectionObserver(function(t){var n;e=null===(n=t.find(function(e){return e.isIntersecting}))||void 0===n?void 0:n.target,y(e?"docked":"not-docked")},{rootMargin:"0px 0px -100%"}),T.current=new IntersectionObserver(function(t){var n,a=null===(n=t.find(function(e){return e.isIntersecting}))||void 0===n?void 0:n.target;a?y("docked-at-bottom"):!a&&e&&y("docked")}),L.current=new IntersectionObserver(function(e){var t,n=null===(t=e.find(function(e){return e.isIntersecting}))||void 0===t?void 0:t.target;n&&x(n.id)},{rootMargin:"0px 0px -".concat(.7*window.innerHeight,"px 0px")});var t=document.querySelectorAll(".anchor-target");t.forEach(function(e){L&&L.current&&L.current.observe(e)});var n=document.querySelectorAll("#footer");n.forEach(function(e){T&&T.current&&T.current.observe(e)});var a=document.querySelectorAll("#sidebar");return a.forEach(function(e){M&&M.current&&M.current.observe(e)}),function(){t.forEach(function(e){L&&L.current&&L.current.unobserve(e)}),a.forEach(function(e){M&&M.current&&M.current.unobserve(e)}),n.forEach(function(e){T&&T.current&&T.current.unobserve(e)})}},[]),v.links.map(function(e){return e.url.substring(1)===k?e.active=!0:e.active=!1}),e.createElement("div",{className:p("in-page-navigation",s&&"theme-".concat(s),h&&"theme-".concat(s,"--inverse"))},e.createElement("div",{className:p("in-page-navigation--mobile",C)},e.createElement("div",{className:"in-page-navigation__closed"},e.createElement("div",{className:"in-page-navigation__top-container"},e.createElement("div",{className:"in-page-navigation__right-wrapper"},e.createElement("div",{className:"in-page-navigation__menu-button"},e.createElement("span",{className:"in-page-navigation__expandable-header"},g),e.createElement(qe,{theme:"uobmain",icon:"menu",onClick:function(){b(!0)},title:"Open menu",ariaControls:"in-page-navigation",ref:H,ariaExpanded:_})))))),_&&e.createElement("div",{className:"in-page-navigation__overlay"}),e.createElement(m,null,_&&e.createElement(i.div,{className:"in-page-navigation__open",initial:{x:"100%"},animate:{x:"0"},exit:{x:"100%"},transition:{type:"tween"},key:"in-page-navigation__open",ref:S},e.createElement(Be,null,e.createElement("div",{className:"in-page-navigation__nav"},e.createElement("div",{className:"in-page-navigation__top-container"},e.createElement("div",{className:"in-page-navigation__right-wrapper"},e.createElement("div",{className:"in-page-navigation__close-button"},e.createElement("span",null,"Close"),e.createElement(qe,{theme:"uobmain",inverse:!0,icon:"cross",onClick:V,title:"Close menu",ariaControls:"in-page-navigation"})))),e.createElement(sr,u({},v,{theme:"uobmain"})))))),e.createElement("div",{className:p("in-page-navigation--desktop",C)},e.createElement(sr,u({},v,{theme:s}))))}function dr(t){var n=t.text,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=t.fullWidth,i=t.removeBottomPadding,o=void 0!==i&&i,s=t.removeTopPadding,m=void 0!==s&&s;return e.createElement("div",{className:p("intro-text",r&&"theme-".concat(r),c&&"theme-".concat(r,"--inverse"),l&&"intro-text--full-width",o&&"intro-text--no-bottom-padding",m&&"intro-text--no-top-padding")},e.createElement("div",{className:"intro-text__container"},e.createElement("p",{className:"intro-text__text"},n)))}function ur(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.heading,c=t.cards,l=t.link;return e.createElement("div",{className:p("most-read-news",a&&"theme-".concat(a))},e.createElement("h2",{className:"most-read-news__title"},r),e.createElement("ul",{className:"most-read-news__card-container"},c.map(function(t,n){return e.createElement("li",{className:"most-read-news__card",key:n},e.createElement(Ke,{theme:a,title:t.title,href:t.href,titleTag:"h3",publishDate:t.publishDate}))})),l&&e.createElement(y,{theme:a,inverse:!0,url:l.url,title:l.title}))}function hr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.featuredArticle,c=t.otherLeadArticles,l=t.mostReadNews;return e.createElement("section",{className:p("lead-news-articles",a&&"theme-".concat(a))},e.createElement("div",{className:"lead-news-articles__container"},e.createElement("div",{className:"lead-news-articles__main-container"},e.createElement("div",{className:"lead-news-articles__featured-card"},e.createElement(Ke,u({},r,{isPrimary:!0}))),e.createElement("ul",{className:"lead-news-articles__secondary-card-container"},c.map(function(t,n){return e.createElement("li",{className:"lead-news-articles__secondary-card",key:n},e.createElement(Ke,{theme:a,image:t.image,title:t.title,href:t.href,titleTag:t.titleTag,publishDate:t.publishDate}))}))),e.createElement("div",{className:"lead-news-articles__side-container"},e.createElement(ur,u({},l)))))}function vr(t){var c=t.theme,l=t.showFilterButtonLabel,o=t.numSelected,s=t.filterElement,m=n(!1),d=m[0],u=m[1],h=r(null),v=function(e){"Escape"===e.key&&d&&u(!1)};return a(function(){return document.addEventListener("keydown",v),function(){document.removeEventListener("keydown",v)}}),a(function(){var e,t;d?null===(e=h.current)||void 0===e||e.showModal():null===(t=h.current)||void 0===t||t.close()},[d]),e.createElement(e.Fragment,null,e.createElement("div",{className:p("listing-filter-wrapper","theme-".concat(c))},e.createElement("div",{className:"listing-filter-wrapper__mobile"},e.createElement("button",{className:"listing-filter-wrapper__show-filter-button",onClick:function(){u(!0),document.body.classList.add("lock-scroll")}},e.createElement(_,{theme:"uobmain",icon:"settings"}),l,o&&e.createElement("span",{className:"listing-filter-wrapper__num-selected"},o,e.createElement("span",{className:"sr-only"},o>1?"filters":"filter"," selected"))))),e.createElement(Be,null,e.createElement(i.dialog,{className:p("listing-filter-wrapper__dialog","theme-".concat(c)),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},ref:h},e.createElement("div",{className:"listing-filter-wrapper__popup-wrapper"},e.createElement("div",{className:"listing-filter-wrapper__popup"},e.createElement("button",{className:"listing-filter-wrapper__close-button",onClick:function(){u(!1),document.body.classList.remove("lock-scroll")}},e.createElement(_,{icon:"slim-cross",theme:c,ariaHidden:!0}),e.createElement("span",{className:"sr-only"},"Close")),s)))),e.createElement("div",{className:"listing-filter-wrapper__desktop"},s))}function pr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.type,c=t.image,l=t.title,i=t.url,o=t.description,s=t.details,m=t.showCategory,d=void 0!==m&&m;return e.createElement(e.Fragment,null,c&&e.createElement("div",{className:"listing-result-card__image"},e.createElement(H,u({},c))),e.createElement("div",{className:"listing-result-card__text"},d&&e.createElement("p",{className:"listing-result-card__category"},r),e.createElement("h2",null,e.createElement("a",{className:"listing-result-card__title",href:i},l)),o&&e.createElement("p",{className:"listing-result-card__description"},o),(null==s?void 0:s.length)>0&&e.createElement("div",{className:"listing-result-card__details"},e.createElement(Qe,{details:s,theme:a}))))}function fr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.type,c=t.image,l=t.title,i=t.titleTag,o=void 0===i?"h2":i,s=t.url,m=t.description,d=t.supervisors,h=t.department,v=t.details,p=t.showCategory,f=void 0!==p&&p;return e.createElement(e.Fragment,null,c&&e.createElement("div",{className:"listing-result-card__image"},e.createElement(H,u({},c))),e.createElement("div",{className:"listing-result-card__text"},f&&e.createElement("p",{className:"listing-result-card__category"},r),e.createElement(k,{htmlTag:"h3"===o?"h3":"h2"},e.createElement("a",{className:"listing-result-card__title",href:s},l)),(d||h)&&e.createElement("div",{className:"listing-result-card__course-info"},d&&e.createElement("p",{className:"listing-result-card__supervisors"},"Supervisors: ",d),h&&e.createElement("p",{className:"listing-result-card__department"},h)),m&&e.createElement("p",{className:"listing-result-card__description"},m),(null==v?void 0:v.length)>0&&e.createElement("div",{className:"listing-result-card__details"},e.createElement(Qe,{details:v,theme:a}))))}function gr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0===r||r,l=t.type,i=t.image,o=t.title,s=t.url,m=t.description,d=t.details,h=t.showCategory,v=void 0!==h&&h,p=t.cardDescriptionIsRichText,f=void 0!==p&&p,g=t.titleTag,E=void 0===g?"h2":g,_=t.eventStatus,b=void 0===_?void 0:_;return e.createElement(e.Fragment,null,i&&e.createElement("div",{className:"listing-result-card__image"},e.createElement(H,u({},i)),b&&e.createElement("div",{className:"listing-result-card__event-graphic"},e.createElement(Ae,{theme:"uobmain",status:b,day:void 0,month:void 0}))),e.createElement("div",{className:"listing-result-card__text"},v&&e.createElement("p",{className:"listing-result-card__category"},l),e.createElement(k,{htmlTag:E},e.createElement("a",{className:"listing-result-card__title",href:s},o)),m&&!f&&e.createElement("p",{className:"listing-result-card__description"},m),m&&f&&e.createElement(x,{theme:a,inverse:c,text:m}),(null==d?void 0:d.length)>0&&e.createElement("div",{className:"listing-result-card__details"},e.createElement(Qe,{details:d,theme:a}))))}function Er(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.type,c=t.image,l=t.title,i=t.url,o=t.description,s=t.author,m=t.details,d=t.showCategory,h=void 0!==d&&d,v=Array.isArray(s)?s:[s];return e.createElement(e.Fragment,null,c&&e.createElement("div",{className:"listing-result-card__image"},e.createElement(H,u({},c))),e.createElement("div",{className:"listing-result-card__text"},h&&e.createElement("p",{className:"listing-result-card__category"},r),e.createElement("h2",null,e.createElement("a",{className:"listing-result-card__title",href:i},l)),s&&e.createElement("p",{className:"listing-result-card__author"},"by ",e.createElement(Za,{items:v})),o&&e.createElement("p",{className:"listing-result-card__description"},o),(null==m?void 0:m.length)>0&&e.createElement("div",{className:"listing-result-card__details"},e.createElement(Qe,{details:m,theme:a}))))}function _r(t){var n=t.image,a=t.title,r=t.url,c=t.description;return e.createElement(e.Fragment,null,n&&e.createElement("div",{className:"listing-result-card__image"},n&&e.createElement(H,u({},n))),e.createElement("div",{className:"listing-result-card__text"},e.createElement("h2",null,e.createElement("a",{className:"listing-result-card__title",href:r},a)),c&&e.createElement("p",{className:"listing-result-card__description"},c)))}function br(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.type,c=t.image,l=t.title,i=t.url,o=t.description,s=t.jobTitle,m=t.department,d=t.details,h=t.showCategory,v=void 0!==h&&h;return e.createElement(e.Fragment,null,c&&e.createElement("div",{className:"listing-result-card__image"},c&&e.createElement(H,u({},c))),e.createElement("div",{className:"listing-result-card__text"},v&&e.createElement("p",{className:"listing-result-card__category"},r),e.createElement("h2",null,e.createElement("a",{className:"listing-result-card__title",href:i},l)),(s||m)&&e.createElement("div",{className:"listing-result-card__staff-info"},s&&e.createElement("p",{className:"listing-result-card__job-title"},s),m&&e.createElement("p",{className:"listing-result-card__department"},m)),o&&e.createElement("p",{className:"listing-result-card__description"},o),(null==d?void 0:d.length)>0&&e.createElement("div",{className:"listing-result-card__details"},e.createElement(Qe,{details:d,theme:a}))))}function wr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.image,c=t.title,l=t.url,i=t.description,o=t.jobTitle,s=t.department,m=t.details;return e.createElement(e.Fragment,null,r&&e.createElement("div",{className:"listing-result-card__image"},r&&e.createElement(H,u({},r))),e.createElement("div",{className:"listing-result-card__text"},e.createElement("h2",null,e.createElement("a",{className:"listing-result-card__title",href:l},c)),(o||s)&&e.createElement("div",{className:"listing-result-card__staff-info"},o&&e.createElement("p",{className:"listing-result-card__job-title"},o),s&&e.createElement("p",{className:"listing-result-card__department"},s)),i&&e.createElement("p",{className:"listing-result-card__description"},i.length>120?"".concat(i.slice(0,120),"..."):i),(null==m?void 0:m.length)>0&&e.createElement("div",{className:"listing-result-card__details"},e.createElement(Qe,{details:m,theme:a}))))}function Cr(t){return e.createElement("article",{className:p("listing-result-card",t.theme&&"theme-".concat(t.theme))},"page"===t.type&&e.createElement(_r,u({},t)),"course"===t.type&&e.createElement(fr,u({},t)),"accomodation"===t.type&&e.createElement(pr,u({},t)),"event"===t.type&&e.createElement(gr,u({},t)),"news"===t.type&&e.createElement(Er,u({},t)),"staff"===t.type&&e.createElement(br,u({},t)),"profile"===t.type&&e.createElement(wr,u({},t)))}function yr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.showCategory,c=void 0!==r&&r,l=t.cards,i=t.headingInfo;return e.createElement(e.Fragment,null,i&&e.createElement(T,u({},i,{theme:a,fullWidth:!0})),e.createElement("ul",{className:p("listing-results",a&&"theme-".concat(a))},l.map(function(t,n){return e.createElement("li",{className:"listing-results__card",key:n},e.createElement(Cr,u({},t,{showCategory:c,theme:a})))})))}function Nr(t){var n=t.count,a=t.theme,r=void 0===a?"uobmain":a;return e.createElement("p",{className:p("listing-results-count",r&&"theme-".concat(r))},e.createElement("span",{className:"listing-results-count__number"},n.toLocaleString())," results were found based on your search term")}function kr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.listItems;return e.createElement("div",{className:p("list-table",a&&"theme-".concat(a))},(null==r?void 0:r.length)?e.createElement("ul",{className:"list-table__list"},null==r?void 0:r.map(function(t,n){return e.createElement("li",{key:t+n,className:"list-table__list-item"},e.createElement(x,{inverse:!0,theme:"uobmain",text:t}))})):null)}function xr(t){var n=t.children;return e.createElement("main",{id:"main"},n)}function Lr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.heading,c=t.cards,l=t.cardType,i=void 0===l?"featured-news":l;return e.createElement("section",{className:p("news-articles-promo-block",a&&"theme-".concat(a),i&&"news-articles-promo-block--".concat(i))},e.createElement("div",{className:"news-articles-promo-block__heading-container"},r&&e.createElement("h2",{className:"news-articles-promo-block__heading"},r)),e.createElement("div",{className:"news-articles-promo-block__cards news-articles-promo-block__cards--mobile"},"featured-news"===i&&e.createElement(nt,{theme:a,type:"featured-news",cards:c,inverse:!0,cardTitleTag:"h3"}),"promo-video"===i&&e.createElement(nt,{theme:a,type:"promo-video",cards:c,inverse:!0,cardTitleTag:"h3",setCardInverse:"dark"})),e.createElement("ul",{className:"news-articles-promo-block__cards news-articles-promo-block__cards--desktop"},c.map(function(t,n){return e.createElement("li",{key:n},"featured-news"===i&&e.createElement(Ke,u({},t,{inverse:!0,titleTag:"h3"})),"promo-video"===i&&e.createElement(je,u({},t,{inverse:!1,titleTag:"h3"})))})))}function Tr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.numOfPages,c=t.onClick,l=t.currentPage,i=Te("768px"),o=e.createElement("li",null,e.createElement("span",{className:"pagination__ellipse"},"..."));return i&&r<=4?e.createElement(e.Fragment,null,Array(r).fill(0).map(function(t,n){return e.createElement("li",{className:p("pagination__number",l===n&&"pagination__number--selected"),key:n},e.createElement(C,{label:(n+1).toString(),onClick:function(){return c(n)},hollow:!(l===n),theme:a}))})):i&&r>4?e.createElement(e.Fragment,null,l>0&&e.createElement("li",{key:0,className:"pagination__number"},e.createElement(C,{label:"1",onClick:function(){return c(0)},theme:a,hollow:!0})),l+1>=3&&o,e.createElement("li",{key:l,className:"pagination__number pagination__number--selected"},e.createElement(C,{label:"".concat(l+1," "),onClick:function(){return c(l)},theme:a})),l+1<r-1&&o,l!==r-1&&e.createElement("li",{key:r-1,className:"pagination__number"},e.createElement(C,{label:r.toString(),onClick:function(){return c(r-1)},theme:a,hollow:!0}))):!i&&r<=6?e.createElement(e.Fragment,null,Array(r).fill(0).map(function(t,n){return e.createElement("li",{key:n,className:p("pagination__number",l===n&&"pagination__number--selected","test")},e.createElement(C,{label:(n+1).toString(),onClick:function(){return c(n)},hollow:!(l===n),theme:a}))})):!i&&r>6?e.createElement(e.Fragment,null,l>0&&e.createElement("li",{key:0,className:"pagination__number start"},e.createElement(C,{label:"1",onClick:function(){return c(0)},theme:a,hollow:!0})),l+1>=4&&o,l>1&&e.createElement("li",{key:l-1,className:"pagination__number before"},e.createElement(C,{label:(l>=1?l:l-1).toString(),onClick:function(){return c(l-1)},theme:a,hollow:!0})),e.createElement("li",{key:l,className:"pagination__number pagination__number--selected current"},e.createElement(C,{label:"".concat(l+1),onClick:function(){return c(l)},theme:a})),l+1<r-1&&e.createElement("li",{key:l+1,className:"pagination__number after"},e.createElement(C,{label:"".concat(l+2),onClick:function(){return c(l+1)},theme:a,hollow:!0})),l+1<r-2&&o,l+1!==r&&e.createElement("li",{key:r-1,className:"pagination__number end"},e.createElement(C,{label:"".concat(r),onClick:function(){return c(r-1)},theme:a,hollow:!0}))):e.createElement(e.Fragment,null)}function Mr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.numOfPages,c=t.onClick,l=t.currentPage,i=!Te("1248px");return r<=1?e.createElement(e.Fragment,null):e.createElement("div",{className:p("pagination",a&&"theme-".concat(a))},e.createElement("ul",{className:"pagination__container"},e.createElement("li",{className:"pagination__prev",key:"prev"},i?e.createElement(C,{theme:a,label:"Previous",onClick:function(){return c(l-1)},hollow:!0,disabled:l<1}):e.createElement(qe,{theme:a,icon:"arrow-left",title:"Previous",onClick:function(){return c(l-1)},disabled:l<1,inverse:!0})),e.createElement(Tr,{currentPage:l,onClick:c,theme:a,numOfPages:r}),e.createElement("li",{className:"pagination__next",key:"next"},i?e.createElement(C,{theme:a,label:"Next",onClick:function(){return c(l+1)},hollow:!0,disabled:l+1===r}):e.createElement(qe,{theme:a,icon:"arrow-right",title:"Next",onClick:function(){return c(l+1)},disabled:l+1===r,inverse:!0}))))}function Hr(t){var n,a=t.theme,r=t.inverse,c=t.type,l=t.title,i=t.description,o=t.link,s=t.cards,m=t.imageOrientation,d=void 0===m?"left":m,h=t.titleTag,v=void 0===h?"h2":h,f=t.cardTitleTag,g=void 0===f?"h3":f,_=t.cardCopyIsRichText,b=void 0!==_&&_,w=t.fullWidth,C=void 0!==w&&w,N=t.fullWidthTitle,x=void 0!==N&&N,L=t.showFilters,T=void 0!==L&&L,M=t.firstFilterSelect,H=t.secondFilterSelect,S=t.imageHeight,V=void 0===S?"default":S,P=!1;Te("768px")?s.length>1&&(P=!0):(C&&s.length>2||s.length>3)&&(P=!0);var O=p(((n={})["promo-block__grid"]=!0,n["promo-block__grid--single"]=1===s.length,n["promo-block__grid--two-cards"]=2===s.length,n["promo-block__grid--three-cards"]=3===s.length,n["promo-block__grid--four-plus-cards"]=s.length>3,n));return e.createElement("div",{className:p("promo-block","promo-block--".concat(c),a&&"theme-".concat(a),r&&"theme-".concat(a,"--inverse"),C&&"promo-block--full-width")},e.createElement("div",{className:"promo-block__container"},e.createElement("div",{className:p("promo-block__top",x&&"promo-block__top--full-width")},l&&e.createElement(k,{htmlTag:v,classNames:p("promo-block__title","h3"===v&&"promo-block__title--h3")},l),i&&e.createElement(E,{theme:"uobmain",inverse:r,text:i}),o&&e.createElement("div",{className:"promo-block__text-link"},e.createElement(y,{theme:a,inverse:r,url:o.url,title:o.title,externalLink:o.externalLink}))),T&&e.createElement("div",{className:"promo-block__filters"},e.createElement("div",{className:"promo-block__filter-wrapper"},M&&e.createElement(Sa,u({},M))),e.createElement("div",{className:"promo-block__filter-wrapper"},H&&e.createElement(Sa,u({},H)))),e.createElement("div",{className:"promo-block__content"},e.createElement("div",{className:"promo-block__cards"},!P&&e.createElement("ul",{className:O},s.map(function(t,n){return e.createElement("li",{className:"promo-block__card-item",key:n},function(t){var n=u(u({},t),{cardCopyIsRichText:b,imageHeight:V});switch(c){case"promo":return e.createElement($e,u({},n));case"promo-signpost":return e.createElement(Re,u({},t));case"promo-video":return e.createElement(je,u({},t));case"promo-profile":return e.createElement(et,u({},t));default:return e.createElement(e.Fragment,null)}}(u(u({},t),{inverse:r,isSingle:1===s.length,imageOrientation:d,titleTag:g})))})),P&&e.createElement(nt,{theme:a,inverse:r,type:c,cards:s,cardTitleTag:g,cardCopyIsRichText:b})))))}function Sr(t){var n=t.theme,a=t.inverse,r=t.type,c=t.title,l=t.description,i=t.link,o=t.cards,s=t.imageOrientation,m=void 0===s?"left":s,d=t.fullWidth;return e.createElement("div",{className:p("promo-block-grid","promo-block-grid--".concat(r),n&&"theme-".concat(n),a&&"theme-".concat(n,"--inverse"),d&&"promo-block-grid--full-width"),id:"promo-block-grid"},e.createElement("div",{className:"promo-block-grid__container"},e.createElement("div",{className:"promo-block-grid__top"},c&&e.createElement("h2",null,c),l&&e.createElement(E,{theme:"uobmain",inverse:a,text:l}),i&&e.createElement("div",{className:"promo-block-grid__text-link"},e.createElement(y,{theme:"uobmain",inverse:a,url:i.url,title:i.title,externalLink:i.externalLink}))),e.createElement("div",{className:"promo-block-grid__content"},e.createElement("div",{className:"promo-block-grid__cards"},o.length>0&&e.createElement("ul",{className:"promo-block-grid__grid"},o.map(function(t,n){return e.createElement("li",{className:"promo-block-grid__card-item",key:n},function(t){switch(r){case"promo":return e.createElement($e,u({},t));case"promo-signpost":return e.createElement(Re,u({},t));case"promo-video":return e.createElement(je,u({},t));default:return e.createElement(e.Fragment,null)}}(u(u({},t),{inverse:a,isSingle:1===o.length,imageOrientation:m,titleTag:c?"h3":"h2"})))}))))))}function Vr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=t.title,l=t.description,i=t.cite,o=t.role,s=t.quote,m=t.quoteeProfileImage,d=t.quoteeProfileImageAltText,u=t.cta,h=t.fullWidth,v=void 0!==h&&h,f=t.htmlTag;return e.createElement("div",{className:p("quote-block","theme-".concat(a),r&&"theme-".concat(a,"--inverse"),v&&"quote-block--full-width")},(c||l)&&e.createElement(T,{theme:a,inverse:r,htmlTag:f,title:c,description:l}),e.createElement("blockquote",{className:p("quote-block__container",!m&&"quote-block__container--no-image")},e.createElement("div",{className:"quote-block__doublequote quote-block__doublequote--open"},e.createElement(_,{icon:"quote-marks",theme:a})),e.createElement("p",{className:"quote-block__quote"},s),m&&e.createElement("div",{className:"quote-block__quotee-image"},e.createElement(H,{src:{default:m},altText:d})),(i||o)&&e.createElement("footer",{className:"quote-block__cite"},i&&e.createElement("cite",{className:"quote-block__cite-cite"},i),o&&e.createElement("div",{className:"quote-block__cite-role"},o)),e.createElement("div",{className:"quote-block__doublequote quote-block__doublequote--close"},e.createElement(_,{icon:"quote-marks",theme:a})),u&&e.createElement("div",{className:"quote-block__optional-link"},e.createElement(y,{inverse:r,onKeyDown:function(){},theme:a,title:u.title,url:u.url}))))}function Pr(t){var n,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=void 0===c||c,i=t.heading,o=t.description,s=t.linkProps,m=t.headingStyle,d=t.fullWidth,h=t.cards,v=Te("768px"),f=v&&h.length>1||!v&&d&&h.length>2||!v&&!d&&h.length>3,g=p(((n={})["related-courses__grid"]=!0,n["related-courses__grid--single"]=1===h.length,n["related-courses__grid--two-cards"]=2===h.length,n["related-courses__grid--three-cards"]=3===h.length,n["related-courses__grid--four-plus-cards"]=h.length>3,n));return e.createElement("section",{className:p("related-courses",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"),d&&"related-courses--full-width")},e.createElement("div",{className:"related-courses__container"},e.createElement("h2",{className:p("related-courses__heading",m&&"related-courses__heading--".concat(m))},i),o&&e.createElement("div",{className:"related-courses__description"},o),s&&s.url&&s.title&&e.createElement("div",{className:"related-courses__arrow-link-container"},e.createElement(y,{theme:r,inverse:l,title:s.title,url:s.url})),e.createElement("div",{className:"related-courses__cards"},!f&&e.createElement("ul",{className:g},h.map(function(t,n){return e.createElement("li",{className:"related-courses__card-item",key:n},e.createElement(We,u({},t)))})),f&&e.createElement(nt,{theme:r,inverse:l,type:"related",cards:h,cardTitleTag:"h3"}))))}function Or(t){var n,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=void 0===c||c,i=t.fullWidth,o=void 0!==i&&i,s=t.headingProps,m=t.cards,d=Te("768px"),h=d&&m.length>1||!d&&m.length>2,v=p(((n={})["scholarship-carousel__grid"]=!0,n["scholarship-carousel__grid--single"]=1===m.length,n["scholarship-carousel__grid--two-cards"]=2===m.length,n["scholarship-carousel__grid--three-plus-cards"]=m.length>3,n));return e.createElement("section",{className:p("scholarship-carousel",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"),o&&"scholarship-carousel--full-width")},e.createElement("div",{className:"scholarship-carousel__container"},s&&e.createElement(T,u({},s,{theme:r,inverse:l,fullWidth:o})),e.createElement("div",{className:"scholarship-carousel__cards"},!h&&e.createElement("ul",{className:v},m.map(function(t,n){return e.createElement("li",{className:"related-courses__card-item",key:n},e.createElement(Je,u({},t,{inverse:l})))})),h&&e.createElement(nt,{theme:r,inverse:l,type:"scholarship",cards:m,cardTitleTag:"h3"}))))}function Zr(t){var n,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=void 0===c||c,i=t.fullWidth,o=void 0!==i&&i,s=t.heading,m=t.headingStyle,d=void 0===m?null:m,h=t.cards,v=t.singleLink,f=t.titleTag,g=void 0===f?"h2":f,E=t.useCarousel,_=void 0===E||E,b=t.cardType,w=void 0===b?"staff":b,C=Te("768px"),N=_&&C&&h.length>1||_&&!C&&h.length>2,x="staff"===w,L=p(((n={})["staff-listing-carousel__grid"]=!0,n["staff-listing-carousel__grid--single"]=1===h.length,n["staff-listing-carousel__grid--two-cards"]=2===h.length,n["staff-listing-carousel__grid--three-plus-cards"]=h.length>3,n));return e.createElement("section",{className:p("staff-listing-carousel",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"),o&&"staff-listing-carousel--full-width",!_&&"staff-listing-carousel--no-carousel")},e.createElement("div",{className:"staff-listing-carousel__container"},s&&e.createElement(k,{htmlTag:g,classNames:p("staff-listing-carousel__heading","staff-listing-carousel__heading--".concat(g),d&&"staff-listing-carousel__heading--".concat(d))},s),e.createElement("div",{className:"staff-listing-carousel__cards"},!N&&e.createElement("ul",{className:L},h.map(function(t,n){return e.createElement("li",{className:"related-courses__card-item",key:n},x?e.createElement(Ue,u({},t,{theme:r,inverse:l,isSingle:1===h.length})):e.createElement(et,u({},t,{theme:r,inverse:l})))})),N&&e.createElement(nt,{theme:r,inverse:l,type:w,cards:h,cardTitleTag:"h3"})),1===h.length&&v&&e.createElement(y,{theme:r,url:v.url,title:v.title,inverse:!0})))}function qr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.sidebarElement,c=t.children;return e.createElement("div",{id:"sidebar",className:p("sidebar-wrapper",a&&"theme-".concat(a),!r&&"sidebar-wrapper--no-side-element")},e.createElement("div",{className:"sidebar-wrapper__grid-container"},r&&e.createElement("div",{className:"sidebar-wrapper__sidebar"},r),e.createElement("div",{className:"sidebar-wrapper__children"},c)))}function Br(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.items,i=t.fullWidth,o=void 0!==i&&i,s=t.htmlTag,m=void 0===s?"h2":s;return e.createElement("div",{className:p("signpost",o&&"signpost--full-width",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},e.createElement("div",{className:"signpost__container"},e.createElement("div",{className:"signpost__grid"},l.map(function(t){return e.createElement("div",{className:"signpost__item",key:t.title},t.tag&&e.createElement("p",{className:"signpost__tag"},t.tag),e.createElement(k,{htmlTag:m,classNames:"signpost__title"},t.title),e.createElement(y,{url:t.linkUrl,title:t.linkLabel,theme:a,inverse:c,externalLink:t.external}))}))))}function Fr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.includeIcon,i=t.link,o=t.fullWidth;return e.createElement("div",{className:p("single-button",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"),o&&"single-button--full-width")},e.createElement("div",{className:"single-button__container"},l?e.createElement(De,u({},i,{inverse:!c})):e.createElement(C,u({},i,{inverse:!c}))))}function Dr(t){var n=t.theme,a=void 0===n?"uobmain":n;return e.createElement("div",{className:p("skip-to-content",a&&"theme-".concat(a))},e.createElement("a",{className:"skip-to-content__link",href:"#main"},"Skip to main content"))}function Ir(e,t){return g("".concat(null!=e?e:""," ").concat(t))}function Ar(t){var n=t.children,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=void 0!==c&&c;return e.createElement("div",{className:p("tabs__list__container",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"))},e.createElement("ul",{className:"tabs__list",role:"tablist"},n))}function $r(t){var n=t.title,a=t.htmlTag,r=void 0===a?"h3":a,c=t.theme,l=void 0===c?"uobmain":c,i=t.inverse,o=void 0!==i&&i,s=t.isActive,m=t.children,d=t.tabsBlockName;if(!s)return null;var u=Ir(null!=d?d:"",n);return e.createElement("div",{id:d,className:p("tabs__panel",l&&"theme-".concat(l),o&&"theme-".concat(l,"--inverse")),role:"tabpanel","aria-labelledby":"tab_"+u},e.createElement(k,{htmlTag:r,classNames:"tabs__panel-title"},n),m)}function Rr(t){var n=t.id,c=t.theme,l=void 0===c?"uobmain":c,i=t.inverse,o=void 0!==i&&i,s=t.tabItem,m=t.isActive,d=t.hasFocus,u=t.tabsBlockName,h=t.handleClick,v=t.handleKeyboardNavigation,f=r(null);a(function(){m&&d&&f.current&&(f.current.focus(),window.matchMedia("min-width: 768px").matches&&f.current.scrollIntoView())});var g=Ir(null!=u?u:"",s.title);return e.createElement("li",{className:"tabs__list-item",role:"presentation"},e.createElement("button",{className:p("tabs__tab",l&&"theme-".concat(l),o&&"theme-".concat(l,"--inverse"),m&&"active"),onClick:function(e){return h(e,n)},onKeyDown:v,ref:f,id:"tab_"+g,role:"tab","aria-controls":g,"aria-selected":m?"true":"false",tabIndex:m?0:-1,type:"button"},s.title))}function jr(t){var l=t.theme,i=void 0===l?"uobmain":l,o=t.inverse,s=void 0!==o&&o,m=t.title,d=t.description,h=t.tabItems,v=t.fullWidth,f=t.htmlTag,g=void 0===f?"h2":f,_=t.removeBottomPadding,b=void 0!==_&&_,w=t.name,k=t.enableHashNavigation,x=void 0!==k&&k,L=r(null),H=c(function(){return h.findIndex(function(e){return Ir(null!=w?w:"",e.title)===window.location.hash.substring(1)})},[h,w]),S=n(0),V=S[0],P=S[1],O=n(-1),Z=O[0],q=O[1],B=Te("1248px");function F(e){if(x){var t=window.location.href.replace(window.location.hash,""),n=Ir(null!=w?w:"",h[e].title);history.pushState(null,"null",t.concat("#",n))}}function D(e,t){e.preventDefault(),P(t),F(t)}a(function(){if(0!==window.location.hash.length){var e=H();e<0||(P(e),q(e))}},[H,P]);var I=function(e){switch(e.key){case"ArrowLeft":case"ArrowUp":case"Left":case"Up":if(0===V)return;P(V-1),q(V-1),F(V-1);break;case"ArrowRight":case"ArrowDown":case"Right":case"Down":if(V>=h.length-1)return;P(V+1),q(V+1),F(V+1);break;case"Home":P(0),q(0),F(0);break;case"End":P(h.length-1),q(h.length-1),F(h.length-1)}};function A(){var e="h3";return m&&"h2"===g?e="h3":m&&"h3"===g&&(e="h4"),e}return a(function(){var e=function(e){if(e.preventDefault(),0!==window.location.hash.length){var t=H();t<0||(P(t),q(t))}};return window.addEventListener("hashchange",e),function(){window.removeEventListener("hashchange",e)}},[V,H]),e.createElement(e.Fragment,null,B&&e.createElement(M,{heading:{title:m,description:d,fullWidth:v,htmlTag:g},theme:i,inverse:s,fullWidth:v,accordionItems:h.map(function(e,t){return{key:e.title||t,title:e.title,text:e.content,titleTag:e.titleTag?e.titleTag:A(),primaryButton:e.primaryButton,secondaryButton:e.secondaryButton,link:e.link}})}),e.createElement("div",{className:p("tabs",i&&"theme-".concat(i),s&&"theme-".concat(i,"--inverse"),v&&"tabs--full-width",b&&"tabs--no-bottom-padding"),id:"tabs",ref:L},!B&&e.createElement(e.Fragment,null,e.createElement(T,{theme:i,inverse:s,htmlTag:g,title:m,description:d,fullWidth:v}),e.createElement("div",{className:"tabs__container"},e.createElement("span",null,e.createElement(Ar,{theme:i,inverse:s},h.map(function(t,n){return e.createElement(Rr,{key:n,id:n,theme:i,inverse:s,tabItem:t,tabListTopRef:L,isActive:n===V,hasFocus:n===Z,enableHashNavigation:x,tabsBlockName:w,handleClick:D,handleKeyboardNavigation:I})})),h.map(function(t,n){return e.createElement($r,{key:n,isActive:n===V,inverse:s,theme:i,title:t.title,tabsBlockName:w,htmlTag:t.titleTag?t.titleTag:A()},t.content&&e.createElement(E,{theme:i,inverse:s,text:t.content}),t.accordionItems&&t.accordionItems.map(function(t){return e.createElement(N,u({key:t.key},t,{inverse:s}))}),(t.primaryButton&&t.primaryButton.text||t.secondaryButton&&t.secondaryButton.text)&&e.createElement("div",{className:"tabs__optional-buttons"},t.primaryButton&&t.primaryButton.text&&e.createElement(C,{label:t.primaryButton.text,url:t.primaryButton.url,theme:i,inverse:!s}),t.secondaryButton&&t.secondaryButton.text&&e.createElement(C,{hollow:!0,label:t.secondaryButton.text,url:t.secondaryButton.url,theme:i,inverse:!s})),t.link&&t.link.text&&e.createElement("div",{className:"tabs__optional-link"},e.createElement(y,{theme:i,inverse:s,url:t.link.url,title:t.link.text})))}))))))}function zr(t){var n=t.text,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=t.headingLevel,i=t.headingText,o=t.url,s=t.linkTitle,m=t.externalLink,d=t.linkStyle,u=t.fullWidth,h=t.removeBottomPadding,v=void 0!==h&&h,f=l;return e.createElement("div",{className:p("text-with-background",r&&"theme-".concat(r),c&&"theme-".concat(r,"--inverse"),u&&"text-with-background--full-width",v&&"text-with-background--no-bottom-padding")},i&&e.createElement("div",{className:"text-with-background__heading-wrapper"},e.createElement(f,null,i)),e.createElement(E,{text:n,inverse:c,theme:r}),o&&s&&e.createElement("div",{className:"text-with-background__link-wrapper"},e.createElement("div",{className:"text-with-background__link-inner-wrapper"},("primary"===d||"secondary"===d)&&e.createElement(C,{url:o,theme:r,label:s,externalLink:m,hollow:"secondary"===d,inverse:!c}),"paragraph-link"===d&&e.createElement(Za,{url:o,label:s,externalLink:m,theme:r,inverse:c}))))}function Ur(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.label,c=t.url,l=t.externalLink;return e.createElement("a",{className:p("pill",a&&"theme-".concat(a)),href:c,target:l?"_blank":"_self",rel:l?"noopener noreferrer":""},r)}function Wr(t){var n=t.topics,a=t.theme,r=void 0===a?"uobmain":a,c=t.titleTag,l=t.heading;return e.createElement("section",{className:p("topics-selector",r&&"theme-".concat(r))},e.createElement("div",{className:"topics-selector__container"},"h2"===c?e.createElement("h2",{className:"topics-selector__heading"},l):e.createElement("h3",{className:"topics-selector__heading"},l),e.createElement("ul",{className:"topics-selector__topics-container"},n.map(function(t,n){return e.createElement("li",{className:"topics-selector__topic",key:n},e.createElement(Ur,{theme:r,label:t.label,url:t.url,externalLink:t.externalLink}))}))))}rr.displayName="HeroCardContent",d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d();var Gr,Kr={exports:{}};var Yr,Jr=(Gr||(Gr=1,Yr=Kr,function(e,t){Yr.exports=t()}(0,function(){var e=[],t=[],n={},a={},r={};function c(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function l(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function i(e,t){return e.replace(t[0],function(n,a){var r,c,i=(r=t[1],c=arguments,r.replace(/\$(\d{1,2})/g,function(e,t){return c[t]||""}));return l(""===n?e[a-1]:n,i)})}function o(e,t,a){if(!e.length||n.hasOwnProperty(e))return t;for(var r=a.length;r--;){var c=a[r];if(c[0].test(t))return i(t,c)}return t}function s(e,t,n){return function(a){var r=a.toLowerCase();return t.hasOwnProperty(r)?l(a,r):e.hasOwnProperty(r)?l(a,e[r]):o(r,a,n)}}function m(e,t,n,a){return function(a){var r=a.toLowerCase();return!!t.hasOwnProperty(r)||!e.hasOwnProperty(r)&&o(r,r,n)===r}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=s(r,a,e),d.isPlural=m(r,a,e),d.singular=s(a,r,t),d.isSingular=m(a,r,t),d.addPluralRule=function(t,n){e.push([c(t),n])},d.addSingularRule=function(e,n){t.push([c(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),r[e]=t,a[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(e){return d.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return d.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(e){return d.addSingularRule(e[0],e[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d})),Kr.exports),Xr=Wt(Jr);function Qr(t){var a=t.theme,r=t.heading,c=t.selectContent,l=t.defaultIsOpen,i=void 0!==l&&l;c&&(i=!!c.defaultValue||i);var o=n(i),s=o[0],m=o[1];return e.createElement("fieldset",{className:p("filter-accordion-select",s&&"filter-accordion-select--open",a&&"theme-".concat(a))},e.createElement("legend",{className:"filter-accordion-select__legend"},e.createElement("button",{className:"filter-accordion-select__button",onClick:function(){return m(function(e){return!e})},"aria-expanded":s,"aria-controls":r.replace(" ","")},r,e.createElement(_,{icon:"chevron-down",theme:a,inverse:!0,ariaHidden:!0}))),s&&e.createElement("div",{className:"filter-accordion-select__select-wrapper"},e.createElement(Sa,u({theme:a,inverse:!0},c))))}function ec(t){var n=t.theme,a=t.name,r=t.id,c=t.label,l=t.defaultValue,i=t.onChange;return e.createElement("div",{className:p("date-input",n&&"theme-".concat(n))},e.createElement("label",{htmlFor:r,className:"date-input__label"},c),e.createElement("input",{type:"date",className:"date-input__input",defaultValue:l,onChange:i,name:a,id:r}))}d(),d(),d();var tc,nc=function(e){var t=e.split(" "),n=t[t.length-1];return t[t.length-1]=Xr(n),t.join(" ")};function ac(t){var n=t.theme,a=t.heading,r=t.listingGroups,c=t.onClearFilters,l=t.onViewResults;return e.createElement("div",{className:p("standard-listing-filter",n&&"theme-".concat(n))},e.createElement("p",{className:"standard-listing-filter__heading"},a),e.createElement("ul",{className:"standard-listing-filter__list"},r.map(function(t){var a;return"date"===t.type?e.createElement("li",{className:"standard-listing-filter__item",key:t.name},e.createElement(ec,u({},t,{theme:n,defaultValue:null!==(a=t.defaultValue)&&void 0!==a?a:"",onChange:t.onChange}))):"radio"===t.type?e.createElement("li",{className:"standard-listing-filter__item",key:t.name},e.createElement(zt,{type:"radio",heading:t.heading,theme:n,showMoreText:nc(t.heading)||"",inputs:t.inputs.map(function(e){return{name:t.name,value:e.value,label:e.label,id:e.id,defaultChecked:!!t.defaultValue&&t.defaultValue===e.value,onChange:t.onChange}})})):"checkbox"===t.type?e.createElement("li",{className:"standard-listing-filter__item",key:t.name},e.createElement(zt,{type:"checkbox",heading:t.heading,theme:n,showMoreText:nc(t.heading)||"",inputs:t.inputs.map(function(e){return{name:t.name,value:e.value,label:e.label,id:e.id,defaultChecked:!!t.defaultValues&&t.defaultValues.includes(e.value),onChange:t.onChange}})})):"select"===t.type?e.createElement("li",{className:"standard-listing-filter__item",key:t.name},e.createElement(Qr,{heading:t.heading,selectContent:t.selectContent,theme:n})):void 0})),l&&e.createElement("div",{className:"standard-listing-filter__results-button"},e.createElement(C,{label:"View selected results",onClick:l,theme:n})),e.createElement("div",{className:"standard-listing-filter__clear-button"},e.createElement(C,{label:"Clear filters",onClick:c,theme:n,hollow:!0})))}function rc(t){var n=t.theme,a=t.tag,r=t.title,c=t.linkUrl,l=t.linkText,o=t.externalLink,s=t.cards,m={initial:{opacity:0,y:150},animate:function(e){return{opacity:1,y:0,transition:{duration:.8,type:"spring",bounce:.2,delay:.2*e}}}};return e.createElement("div",{className:p("video-card-component",n&&"theme-".concat(n)),id:"video-card-component"},e.createElement("div",{className:"video-card-component__content"},a&&e.createElement("p",{className:"video-card-component__tag"},a),e.createElement("h2",{className:"video-card-component__title"},r),c&&l&&e.createElement("div",{className:"video-card-component__link"},e.createElement(y,{theme:n,url:c,title:l,inverse:!0,externalLink:o})),e.createElement("div",{className:"video-card-component__carousel"},e.createElement(nt,{theme:n,type:"video",inverse:!0,cards:s,cardTitleTag:"h3"})),e.createElement("ul",{className:p("video-card-component__cards-desktop",(!c||!l)&&"video-card-component__cards-desktop--no-link")},s.map(function(t,a){return e.createElement(i.li,{key:a,variants:m,initial:"initial",whileInView:"animate",viewport:{once:!0,amount:.2},custom:a},a<=1?e.createElement("div",{className:"video-card-component__lines video-card-component__lines--".concat(a)},1===a&&e.createElement("svg",{width:"406",height:"128",viewBox:"0 0 406 128",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M1 1L123 29L210 127.5",stroke:"black"}),e.createElement("path",{d:"M13 112L123 29L405 51",stroke:"black"}))):"",e.createElement(Ie,{theme:n,image:{src:{default:t.image.src.default,medium:t.image.src.medium,small:t.image.src.small},altText:""},title:t.title,youtubeId:t.youtubeId,buttonLabel:t.buttonLabel,titleTag:"h3"}))}))))}function cc(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.imageSrc,c=t.onClick;return e.createElement("div",{className:p("video-placeholder",a&&"theme-".concat(a))},r&&e.createElement(H,{src:r,altText:""}),e.createElement("button",{className:"video-placeholder__button",onClick:c},e.createElement("div",{className:"video-placeholder__svg-wrapper"},e.createElement("svg",{width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e.createElement("path",{d:"M0 0V14L11 7L0 0Z",fill:"currentColor"}))),e.createElement("span",{className:"sr-only"},"Watch the video")))}function lc(t){var a=t.theme,r=void 0===a?"uobmain":a,c=t.imageSrc,l=t.videoUrl,i=t.videoId,o=n(!1),s=o[0],m=o[1];return e.createElement("div",{className:p("video-with-placeholder",r&&"theme-".concat(r))},s?e.createElement(Ze,{url:l,id:i,autoPlay:!0,theme:r}):e.createElement(cc,{imageSrc:c,onClick:function(){return m(!0)},theme:r}))}function ic(t){var a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=void 0!==c&&c,i=t.imageSrc,o=t.videoUrl,s=t.videoId,m=t.heading,d=t.audioDescribedVideoId,h=t.audioDescribedVideoUrl,v=t.transcript,f=t.fullWidth,g=void 0!==f&&f,E=t.videoCaption,_=t.videoCredit,b=n(!1),w=b[0],C=b[1];return e.createElement("div",{className:p("video-embed",g&&"video-embed--full-width",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"))},m&&e.createElement(T,u({},m,{theme:r,inverse:l})),e.createElement("div",{className:"video-embed__grid"},e.createElement("div",{className:"video-embed__content-wrapper"},e.createElement(lc,{theme:r,imageSrc:i,videoUrl:w?o:h,videoId:w?d:s}),(E||_)&&e.createElement("div",{className:"video-embed__caption-wrapper"},E&&e.createElement("p",{className:"video-embed__caption"},E),_&&e.createElement("p",{className:"video-embed__credit"},_)),(d||h)&&(w?e.createElement("button",{className:"video-embed__audio-described-button",onClick:function(){return C(!1)}},"Non-audio described version"):e.createElement("button",{className:"video-embed__audio-described-button",onClick:function(){return C(!0)}},"Audio described version")),v&&e.createElement("div",{className:"video-embed__transcript"},e.createElement(N,{titleTag:"h3",theme:r,title:"Transcript",text:v,inverse:l})))))}function oc(t){var n,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=void 0===c||c,i=t.fullWidth,o=void 0!==i&&i,s=t.heading,m=t.description,d=t.cards,h=t.singleLink,v=t.titleTag,f=void 0===v?"h2":v,g=t.cardTitleTag,E=void 0===g?"h3":g,_=Te("768px"),b=_&&d.length>1||!_&&d.length>2,w=p(((n={})["research-story-carousel__grid"]=!0,n["research-story-carousel__grid--single"]=1===d.length,n["research-story-carousel__grid--two-cards"]=2===d.length,n["research-story-carousel__grid--three-plus-cards"]=d.length>3,n));return e.createElement("section",{className:p("research-story-carousel",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"),o&&"research-story-carousel--full-width")},e.createElement("div",{className:"research-story-carousel__container"},(s||m||h)&&e.createElement(T,{theme:r,inverse:!0,htmlTag:f,title:s,description:m,linkProps:h,fullWidth:!0}),e.createElement("div",{className:"research-story-carousel__cards"},!b&&e.createElement("ul",{className:w},d.map(function(t,n){return e.createElement("li",{key:n},e.createElement(Ye,u({},t)))})),b&&e.createElement(nt,{theme:r,inverse:l,type:"research-story",cards:d,cardTitleTag:E}))))}function sc(t){var i=t.text,o=t.theme,s=void 0===o?"uobmain":o,m=t.inverse,d=t.fullWidth,u=void 0!==d&&d,h=t.removeBottomPadding,v=void 0!==h&&h,f=t.tableCategory,g=void 0===f?tc.NotSpecified:f,E=r(null),_=n(!1),b=_[0],w=_[1],C=n(!0),y=C[0],N=C[1],k=n(!1),x=k[0],L=k[1],T=l(),M=function(){var e=E.current;e&&(w(e.scrollLeft>0),N(e.scrollLeft<e.scrollWidth-e.clientWidth))},H=c(function(){var e=E.current;if(e){var t=e.scrollWidth>e.clientWidth;L(t),M()}},[]),S=function(e){var t=E.current;if(t){var n="left"===e?t.scrollLeft-200:t.scrollLeft+200;t.scrollTo({left:n,behavior:"smooth"})}};return a(function(){H();var e=E.current;e&&e.addEventListener("scroll",M);var t=function(){return H()};return window.addEventListener("resize",t),function(){e&&e.removeEventListener("scroll",M),window.removeEventListener("resize",t)}},[H]),e.createElement("div",{className:p("scrollable-table",u&&"scrollable-table--full-width",s&&"theme-".concat(s),m&&"theme-".concat(s,"--inverse"),v&&"scrollable-table--no-bottom-padding")},e.createElement("div",{className:"scrollable-table__container"},e.createElement("span",null,x&&e.createElement("div",{className:"scrollable-table__scroll-button-wrapper"},e.createElement("p",null,"Scroll buttons"),e.createElement(qe,{key:"iconButtonLeft",theme:s,icon:"arrow-left",onClick:function(){return S("left")},title:"Scroll left",ariaControls:T,disabled:!b,inverse:m}),e.createElement(qe,{key:"iconButtonRight",theme:s,icon:"arrow-right",onClick:function(){return S("right")},title:"Scroll right",ariaControls:T,disabled:!y,inverse:m})),e.createElement("div",{className:p("scrollable-table__table-wrapper","scrollable-table__".concat(g),m&&"scrollable-table__".concat(g,"--inverse")),ref:E,id:T,tabIndex:0},e.createElement("span",{dangerouslySetInnerHTML:{__html:i}})))))}function mc(t){var a=t.theme,r=t.heading,c=t.inverse,l=t.description,i=t.buttonLabel,o=t.buttonModifier,s=t.modalChildren,m=t.htmlTag,d=void 0===m?"h3":m,u=n(!1),h=u[0],v=u[1],f=function(){v(!1),document.body.classList.remove("lock-scroll")};return e.createElement("div",{className:p("modal-cta",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},e.createElement(k,{htmlTag:d,classNames:"modal-cta__heading"},r),l&&e.createElement("p",{className:"modal-cta__description"},l),e.createElement("div",{className:p("modal-cta__button",o&&"theme-".concat(a,"--buttonModifier"))},e.createElement(C,{inverse:!c,label:i,onClick:function(){h?f():(v(!0),document.body.classList.add("lock-scroll"))},theme:a,buttonModifier:o})),h&&e.createElement(Fe,{centred:!0,theme:a,closeModal:f,isOpen:h},e.createElement(st,{className:"modal-cta__embed-wrapper"},s)))}function dc(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0===r||r,l=t.cards,i=Array.isArray(l)?l:[l];return e.createElement("div",{className:p("module-card-group",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},e.createElement("div",{className:"module-card-group__container"},e.createElement("div",{className:"module-card-group__grid"},i.map(function(t,n){return e.createElement(w,u({key:n},t,{theme:a}))}))))}function uc(t){var n=t.theme,a=t.embedChildren,r=t.googleMapLink,c=t.address,l=t.services,i=t.link,o=t.titleTag,s=void 0===o?"h2":o;return e.createElement("section",{className:p("location-section",n&&"theme-".concat(n),(!l||l.length<1)&&"location-section--no-services")},e.createElement("div",{className:"location-section__container"},e.createElement(k,{htmlTag:s,classNames:p("location-section__title","h3"===s&&"location-section__title--h3")},"Location"),e.createElement("div",{className:"location-section__grid-wrapper"},e.createElement("div",{className:"location-section__embed"},e.createElement(st,null,a)),e.createElement("div",{className:"location-section__address-wrapper"},e.createElement("div",{className:"location-section__address"},e.createElement(It,{theme:n,title:"Address",iconType:"slim-location",value:c.map(function(e){return"<span>".concat(e,"</span>")}).join("")})),i&&(null==i?void 0:i.title)&&(null==i?void 0:i.url)&&e.createElement("div",{className:"location-section__link-wrapper"},e.createElement(y,u({},i,{inverse:!0}))),r?e.createElement("div",{className:"location-section__button"},e.createElement(C,{label:"View on Google Maps",theme:n,url:r})):null),(null==l?void 0:l.length)?e.createElement("div",{className:"location-section__services"},null==l?void 0:l.map(function(t,a){return e.createElement(It,u({},t,{theme:n,key:a}))})):null)))}function hc(t){var n=t.theme,a=t.studentName,r=t.studentStatus,c=t.courseName,l=t.courseDetails,i=t.studyLevel,o=t.titleTag,s=void 0===o?"h2":o,m=t.homeCountry,d=t.studentIntro,h=t.image,v=t.inverse;return e.createElement("div",{className:p("heroProfile",n&&"theme-".concat(n),v&&"theme-".concat(n,"--inverse")),id:"hero"},e.createElement("div",{className:"heroProfile__container"},e.createElement("div",{className:"heroProfile__details"},a&&e.createElement(s,{className:"heroProfile__title"},a),r&&e.createElement("p",{className:"heroProfile__status"},r),c&&e.createElement("p",{className:"heroProfile__courseName"},c),(i||m||l&&l.length>0)&&e.createElement("ul",{className:"heroProfile__studentDetails"},l&&l.length>0&&e.createElement("li",null,e.createElement("div",{className:"heroProfile__iconContainer"},e.createElement(ze,{icon:"mortar-board",theme:n,backgroundColor:"pale"}),e.createElement("div",{className:"heroProfile__courseIconText"},e.createElement("span",null,1===l.length?"Course":"Courses",":"),e.createElement("div",{className:"heroProfile__courseDetails"},l.map(function(t,a){return e.createElement(x,{theme:n,key:a,text:t,inverse:v})}))))),i&&e.createElement("li",null,e.createElement("div",{className:"heroProfile__iconContainer"},e.createElement(ze,{icon:"scroll",theme:n,backgroundColor:"pale"}),e.createElement("div",{className:"heroProfile__iconText"},e.createElement("span",null,"Study level:"),e.createElement("span",null,i)))),m&&e.createElement("li",null,e.createElement("div",{className:"heroProfile__iconContainer"},e.createElement(ze,{icon:"flag",theme:n,backgroundColor:"pale"}),e.createElement("div",{className:"heroProfile__iconText"},e.createElement("span",null,"Home country:"),e.createElement("span",null,m))))),d&&e.createElement(x,{theme:n,text:d,inverse:v})),e.createElement("div",{className:"heroProfile__image-wrapper"},h&&e.createElement(H,u({},h,{altText:null==h?void 0:h.alt,fetchPriority:h.fetchPriority})))))}function vc(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.firstColumn,c=t.secondColumn;return e.createElement("div",{className:p("two-column-wrapper",a&&"theme-".concat(a))},e.createElement("div",{className:"two-column-wrapper__grid-container"},e.createElement("div",{className:p("two-column-wrapper__first-column",!c&&"two-column-wrapper__first-column-centred")},r),c&&e.createElement("div",{className:"two-column-wrapper__second-column"},c)))}function pc(t){var n,a,r=t.theme,c=void 0===r?"uobmain":r,l=t.inverse,i=t.logos,o=null!==(a=null==i?void 0:i.length)&&void 0!==a?a:0,s=i&&i.length%2!=0;return e.createElement("div",{className:p("logo-wall",c&&"theme-".concat(c),l&&"theme-".concat(c,"--inverse"))},e.createElement("div",null,e.createElement("ul",{className:p("logo-wall__container",s&&"logo-wall__container--odd"),style:(n={},n["--logo-wall-cols"]=String(o),n)},i&&i.map(function(t,n){var a;return e.createElement("li",{key:"li-".concat(n)},e.createElement(Ge,u({key:"".concat((null===(a=t.image)||void 0===a?void 0:a.title)||"imageTitle","-").concat(n),theme:c,inverse:l},t)))}))))}function fc(t){var n=t.theme,a=t.inverse,r=t.image,c=t.imageCaption,l=t.imageCredit,i=t.contentPosition,o=void 0===i?"left":i,s=t.children,m=Te("768px"),d=c||l;return r&&r.src&&s?e.createElement("section",{className:p("text-over-media",n&&"theme-".concat(n),a&&"theme-".concat(n,"--inverse"))},e.createElement("div",{className:p("text-over-media__container","right"===o&&"text-over-media__mobile--right")},m&&e.createElement("div",{className:"text-over-media__mobile-block"},e.createElement("div",{className:"text-over-media__image-wrapper"},e.createElement(H,u({},r))),d&&e.createElement("figcaption",{className:"text-over-media__figcaption"},c&&e.createElement("p",{className:"text-over-media__caption"},c),l&&e.createElement("p",{className:"text-over-media__credit"},l))),!m&&e.createElement(e.Fragment,null,e.createElement("figure",{className:"text-over-media__image-container"},e.createElement("div",{className:"text-over-media__height-wrapper"},e.createElement("div",{className:"text-over-media__image-wrapper"},e.createElement(H,u({},r)))),e.createElement("div",{className:"text-over-media__parallax-container"},e.createElement(St,{offset:100},e.createElement("div",{className:"text-over-media__parallax-content"},e.createElement("div",{className:"text-over-media__image-wrapper"},e.createElement(H,u({},r))))))),d&&e.createElement("figcaption",{className:"text-over-media__figcaption"},c&&e.createElement("p",{className:"text-over-media__caption"},c),l&&e.createElement("p",{className:"text-over-media__credit"},l))),e.createElement("div",{className:p("text-over-media__media-container","left"===o&&"text-over-media__media-container--left","right"===o&&"text-over-media__media-container--right")},s))):null}function gc(t){var n=t.theme,r=void 0===n?"uobmain":n,c=t.inverse,l=void 0!==c&&c,i=t.curatorFeedId,o=t.curatorScriptSrc,s=t.heading;a(function(){var e=document.createElement("script");return e.src=o,e.async=!0,e.id="curator-script",document.body.appendChild(e),function(){var e=document.getElementById("curator-script");e&&e.remove();var t=window;t.Curator&&(t.Curator=void 0);var n=document.getElementById(i);n&&(n.innerHTML="")}},[o,i]);var m=p("social-feed",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"));return e.createElement("section",{className:m},s&&e.createElement(T,{title:s.title,description:s.description,inverse:l,theme:"uobmain",linkProps:s.linkProps}),e.createElement("div",{className:"social-feed__container"},e.createElement("div",{id:i,className:"social-feed__embed","data-testid":"curator-feed-container"})))}function Ec(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.url,i=t.title,o=t.externalLink,s=void 0!==o&&o,m=t.mobileTitle;return e.createElement("a",{className:p("back-link",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse")),href:l,target:s?"_blank":"_self",rel:s?"noopener noreferrer":""},m?e.createElement(e.Fragment,null,e.createElement("span",{className:"back-link__title back-link__title--mobile"},m),e.createElement("span",{className:"back-link__title back-link__title--desktop"},i)):e.createElement("span",{className:"back-link__title"},i))}d(),d(),d(),d(),d(),d(),function(e){e.NotSpecified="NotSpecified",e.ColumnAndRowHeadings="ColumnAndRowHeadings",e.ColumnHeadingsOnly="ColumnHeadingsOnly"}(tc||(tc={})),d(),d(),d(),d(),d(),d(),d(),d(),d();var _c=function(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.primaryLinks,o=t.secondaryLinks,s=t.menuCards,d=t.logoTitleTagH1,u=void 0===d||d,h=t.backLinkUrl,v=t.backLinkLabelMobile,f=t.backLinkLabel,g=t.hideSubMenu,E=void 0===g||g,_=t.hideBackLink,b=void 0===_||_,w=ka({primaryLinks:l,secondaryLinks:o}),C=w.openMenuButtonRef,y=w.headerRef,N=w.isOpen,k=w.menuLevel,x=w.searchIsOpen,L=w.mainMenuSelectedLink,T=w.firstLevelSelectedLink,M=w.openMenu,H=w.closeMenu,S=w.onClickMainMenuNavLink,V=w.onClickLevelOneNavLink,P=w.goBackToMainMenu,O=w.goBackToLevelOne;return e.createElement("header",{className:p("header",a&&"theme-".concat(a),!N&&"header--is-closed",c&&"theme-".concat(a,"--inverse")),id:"landing-header",ref:y},e.createElement("div",{className:"header__closed"},e.createElement("div",{className:"header__top-container"},e.createElement("div",{className:"header__logo-wrapper"},e.createElement("div",{className:"header__logo-wrapper"},u?e.createElement("h1",{className:"header__logo-heading"},e.createElement(qt,{activeCampus:"uk",imageMode:c?"dark":"light",classNames:"header__logo-link",imageAltText:"University of Birmingham",loadingAttr:"eager"})):e.createElement(qt,{activeCampus:"uk",imageMode:c?"dark":"light",classNames:"header__logo-link",loadingAttr:"eager"},e.createElement("span",{className:"sr-only"},"University of Birmingham")))),e.createElement("div",{className:"header__right-wrapper"},e.createElement("div",{className:"header__menu-button"},!b&&e.createElement(Ec,{theme:"uobmain",url:h,title:f,mobileTitle:v,externalLink:!1}),!E&&e.createElement(qe,{theme:"uobmain",inverse:c,icon:"plus",onClick:M,title:"Open menu",ariaControls:"landing-header",ref:C,ariaExpanded:N}))))),e.createElement(m,null,N&&e.createElement(va,null,e.createElement(i.div,{className:"header__open",initial:{x:"100%"},animate:{x:"0"},exit:{x:"100%"},transition:{type:"tween"},key:"header__open"},e.createElement("div",{className:"header__top-container"},e.createElement("div",{className:"header__logo-wrapper"},e.createElement(qt,{activeCampus:"uk",imageMode:c?"light":"dark",classNames:"header__logo-link"},e.createElement("h1",{className:"sr-only"},"University of Birmingham"))),e.createElement("div",{className:"header__right-wrapper"},e.createElement("div",{className:"header__menu-button"},e.createElement("span",null,"Menu"),e.createElement(qe,{theme:"uobmain",inverse:!c,icon:"cross",onClick:H,title:"Close menu",ariaControls:"landing-header"})))),0===k&&e.createElement(Ea,{primaryLinks:l,secondaryLinks:o,menuCards:s,onClickNavLink:S,theme:a,inverse:c}),1===k&&L&&e.createElement(ba,{headingLink:L,onClickNavLink:V,theme:a,inverse:c,onClickGoBack:P,backLinkLabel:"Back to menu"}),2===k&&L&&T&&!x&&e.createElement(ba,{headingLink:T,onClickNavLink:function(){},theme:a,inverse:c,onClickGoBack:O,backLinkLabel:"Back to ".concat(L.label)})))))};export{M as Accordion,S as AcreditationPromotion,P as AlertBanner,O as AnchorTarget,q as Breadcrumbs,ot as CTAComponent,rt as CardImageAndText,at as CardProfile,et as CardPromoProfile,Re as CardPromoSignpost,Ue as CardStaff,nt as Carousel,ct as CentreWrapper,lt as ClearingBanner,it as CourseDeliveryPills,st as EmbedWrapper,dt as FactBoxes,ut as FeaturedContent,Ht as FeaturedSignpost,Vt as FeaturedVideo,Pt as FiveArticlesGrid,Bt as Footer,Ut as GeneralSearchFilter,$t as GenericDetailSection,xa as Header,_c as HeaderLanding,T as Heading,Pa as Hero,qa as HeroArticle,cr as HeroCarousel,$a as HeroCourses,hc as HeroProfile,lr as HeroVideo,ir as ImageBlock,or as ImageCarousel,mr as InPageNavigation,dr as IntroText,hr as LeadNewsArticles,kr as ListTable,vr as ListingFilterWrapper,yr as ListingResults,Nr as ListingResultsCount,uc as LocationSection,Aa as LocationSelector,pc as LogoWall,xr as MainWrapper,mc as ModalCTA,dc as ModuleCardGroup,Lr as NewsArticlesPromoBlock,Mr as Pagination,Hr as PromoBlock,Sr as PromoBlockGrid,Vr as QuoteBlock,Pr as RelatedCourses,oc as ResearchStoryCarousel,E as RichText,Or as ScholarshipCarousel,sc as ScrollableTable,Va as SearchCourses,qr as SidebarWrapper,Br as SignPost,Fr as SingleButton,Dr as SkipToContent,gc as SocialFeed,Zr as StaffListingCarousel,ac as StandardListingFilter,jr as TabsBlock,fc as TextOverMedia,zr as TextWithBackground,Wr as TopicSelector,vc as TwoColumnWrapper,rc as VideoCardComponent,ic as VideoEmbed};
23
+ function Kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function Yn(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jn(Object(n),!0).forEach(function(t){Yn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jn(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qn(e){return function(e){if(Array.isArray(e))return Kn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Kn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kn(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ea,ta,na=function(e,t){if(e.length>0){var n=e[e.length-1];n!==t&&n._setPausedState(!0)}var a=e.indexOf(t);-1===a||e.splice(a,1),e.push(t)},aa=function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)},ra=function(e){return"Tab"===(null==e?void 0:e.key)||9===(null==e?void 0:e.keyCode)},ca=function(e){return ra(e)&&!e.shiftKey},la=function(e){return ra(e)&&e.shiftKey},ia=function(e){return setTimeout(e,0)},oa=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return"function"==typeof e?e.apply(void 0,n):e},sa=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},ma=[],da=Gt(Object.freeze({__proto__:null,createFocusTrap:function(e,t){var n,a=(null==t?void 0:t.document)||document,r=(null==t?void 0:t.trapStack)||ma,c=Xn({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:ca,isKeyBackward:la},t),l={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},i=function(e,t,n){return e&&void 0!==e[t]?e[t]:c[n||t]},o=function(e,t){var n="function"==typeof(null==t?void 0:t.composedPath)?t.composedPath():void 0;return l.containerGroups.findIndex(function(t){var a=t.container,r=t.tabbableNodes;return a.contains(e)||(null==n?void 0:n.includes(a))||r.find(function(t){return t===e})})},s=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.hasFallback,r=void 0!==n&&n,l=t.params,i=void 0===l?[]:l,o=c[e];if("function"==typeof o&&(o=o.apply(void 0,Qn(i))),!0===o&&(o=void 0),!o){if(void 0===o||!1===o)return o;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var s=o;if("string"==typeof o){try{s=a.querySelector(o)}catch(t){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(t.message,'"'))}if(!s&&!r)throw new Error("`".concat(e,"` as selector refers to no known node"))}return s},m=function(){var e=s("initialFocus",{hasFallback:!0});if(!1===e)return!1;if(void 0===e||e&&!Wn(e,c.tabbableOptions))if(o(a.activeElement)>=0)e=a.activeElement;else{var t=l.tabbableGroups[0];e=t&&t.firstTabbableNode||s("fallbackFocus")}else null===e&&(e=s("fallbackFocus"));if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},d=function(){if(l.containerGroups=l.containers.map(function(e){var t=Rn(e,c.tabbableOptions),n=jn(e,c.tabbableOptions),a=t.length>0?t[0]:void 0,r=t.length>0?t[t.length-1]:void 0,l=n.find(function(e){return zn(e)}),i=n.slice().reverse().find(function(e){return zn(e)}),o=!!t.find(function(e){return Pn(e)>0});return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:o,firstTabbableNode:a,lastTabbableNode:r,firstDomTabbableNode:l,lastDomTabbableNode:i,nextTabbableNode:function(e){var a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=t.indexOf(e);return r<0?a?n.slice(n.indexOf(e)+1).find(function(e){return zn(e)}):n.slice(0,n.indexOf(e)).reverse().find(function(e){return zn(e)}):t[r+(a?1:-1)]}}}),l.tabbableGroups=l.containerGroups.filter(function(e){return e.tabbableNodes.length>0}),l.tabbableGroups.length<=0&&!s("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(l.containerGroups.find(function(e){return e.posTabIndexesFound})&&l.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},u=function(e){var t=e.activeElement;if(t)return t.shadowRoot&&null!==t.shadowRoot.activeElement?u(t.shadowRoot):t},h=function(e){!1!==e&&e!==u(document)&&(e&&e.focus?(e.focus({preventScroll:!!c.preventScroll}),l.mostRecentlyFocusedNode=e,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(e)&&e.select()):h(m()))},v=function(e){var t=s("setReturnFocus",{params:[e]});return t||!1!==t&&e},p=function(e){var t=e.target,n=e.event,a=e.isBackward,r=void 0!==a&&a;t=t||sa(n),d();var i=null;if(l.tabbableGroups.length>0){var m=o(t,n),u=m>=0?l.containerGroups[m]:void 0;if(m<0)i=r?l.tabbableGroups[l.tabbableGroups.length-1].lastTabbableNode:l.tabbableGroups[0].firstTabbableNode;else if(r){var h=l.tabbableGroups.findIndex(function(e){var n=e.firstTabbableNode;return t===n});if(h<0&&(u.container===t||Wn(t,c.tabbableOptions)&&!zn(t,c.tabbableOptions)&&!u.nextTabbableNode(t,!1))&&(h=m),h>=0){var v=0===h?l.tabbableGroups.length-1:h-1,p=l.tabbableGroups[v];i=Pn(t)>=0?p.lastTabbableNode:p.lastDomTabbableNode}else ra(n)||(i=u.nextTabbableNode(t,!1))}else{var f=l.tabbableGroups.findIndex(function(e){var n=e.lastTabbableNode;return t===n});if(f<0&&(u.container===t||Wn(t,c.tabbableOptions)&&!zn(t,c.tabbableOptions)&&!u.nextTabbableNode(t))&&(f=m),f>=0){var g=f===l.tabbableGroups.length-1?0:f+1,E=l.tabbableGroups[g];i=Pn(t)>=0?E.firstTabbableNode:E.firstDomTabbableNode}else ra(n)||(i=u.nextTabbableNode(t))}}else i=s("fallbackFocus");return i},f=function(e){var t=sa(e);o(t,e)>=0||(oa(c.clickOutsideDeactivates,e)?n.deactivate({returnFocus:c.returnFocusOnDeactivate}):oa(c.allowOutsideClick,e)||e.preventDefault())},g=function(e){var t=sa(e),n=o(t,e)>=0;if(n||t instanceof Document)n&&(l.mostRecentlyFocusedNode=t);else{var a;e.stopImmediatePropagation();var r=!0;if(l.mostRecentlyFocusedNode)if(Pn(l.mostRecentlyFocusedNode)>0){var i=o(l.mostRecentlyFocusedNode),s=l.containerGroups[i].tabbableNodes;if(s.length>0){var d=s.findIndex(function(e){return e===l.mostRecentlyFocusedNode});d>=0&&(c.isKeyForward(l.recentNavEvent)?d+1<s.length&&(a=s[d+1],r=!1):d-1>=0&&(a=s[d-1],r=!1))}}else l.containerGroups.some(function(e){return e.tabbableNodes.some(function(e){return Pn(e)>0})})||(r=!1);else r=!1;r&&(a=p({target:l.mostRecentlyFocusedNode,isBackward:c.isKeyBackward(l.recentNavEvent)})),h(a||(l.mostRecentlyFocusedNode||m()))}l.recentNavEvent=void 0},E=function(e){(c.isKeyForward(e)||c.isKeyBackward(e))&&function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];l.recentNavEvent=e;var n=p({event:e,isBackward:t});n&&(ra(e)&&e.preventDefault(),h(n))}(e,c.isKeyBackward(e))},_=function(e){var t;"Escape"!==(null==(t=e)?void 0:t.key)&&"Esc"!==(null==t?void 0:t.key)&&27!==(null==t?void 0:t.keyCode)||!1===oa(c.escapeDeactivates,e)||(e.preventDefault(),n.deactivate())},b=function(e){var t=sa(e);o(t,e)>=0||oa(c.clickOutsideDeactivates,e)||oa(c.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},w=function(){if(l.active)return na(r,n),l.delayInitialFocusTimer=c.delayInitialFocus?ia(function(){h(m())}):h(m()),a.addEventListener("focusin",g,!0),a.addEventListener("mousedown",f,{capture:!0,passive:!1}),a.addEventListener("touchstart",f,{capture:!0,passive:!1}),a.addEventListener("click",b,{capture:!0,passive:!1}),a.addEventListener("keydown",E,{capture:!0,passive:!1}),a.addEventListener("keydown",_),n},C=function(){if(l.active)return a.removeEventListener("focusin",g,!0),a.removeEventListener("mousedown",f,!0),a.removeEventListener("touchstart",f,!0),a.removeEventListener("click",b,!0),a.removeEventListener("keydown",E,!0),a.removeEventListener("keydown",_),n},y="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver(function(e){e.some(function(e){return Array.from(e.removedNodes).some(function(e){return e===l.mostRecentlyFocusedNode})})&&h(m())}):void 0,N=function(){y&&(y.disconnect(),l.active&&!l.paused&&l.containers.map(function(e){y.observe(e,{subtree:!0,childList:!0})}))};return n={get active(){return l.active},get paused(){return l.paused},activate:function(e){if(l.active)return this;var t=i(e,"onActivate"),n=i(e,"onPostActivate"),r=i(e,"checkCanFocusTrap");r||d(),l.active=!0,l.paused=!1,l.nodeFocusedBeforeActivation=u(a),null==t||t();var c=function(){r&&d(),w(),N(),null==n||n()};return r?(r(l.containers.concat()).then(c,c),this):(c(),this)},deactivate:function(e){if(!l.active)return this;var t=Xn({onDeactivate:c.onDeactivate,onPostDeactivate:c.onPostDeactivate,checkCanReturnFocus:c.checkCanReturnFocus},e);clearTimeout(l.delayInitialFocusTimer),l.delayInitialFocusTimer=void 0,C(),l.active=!1,l.paused=!1,N(),aa(r,n);var a=i(t,"onDeactivate"),o=i(t,"onPostDeactivate"),s=i(t,"checkCanReturnFocus"),m=i(t,"returnFocus","returnFocusOnDeactivate");null==a||a();var d=function(){ia(function(){m&&h(v(l.nodeFocusedBeforeActivation)),null==o||o()})};return m&&s?(s(v(l.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(e){return l.active?(l.manuallyPaused=!0,this._setPausedState(!0,e)):this},unpause:function(e){return l.active?(l.manuallyPaused=!1,r[r.length-1]!==this?this:this._setPausedState(!1,e)):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return l.containers=t.map(function(e){return"string"==typeof e?a.querySelector(e):e}),l.active&&d(),N(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return l.manuallyPaused}},_setPausedState:{value:function(e,t){if(l.paused===e)return this;if(l.paused=e,e){var n=i(t,"onPause"),a=i(t,"onPostPause");null==n||n(),C(),N(),null==a||a()}else{var r=i(t,"onUnpause"),c=i(t,"onPostUnpause");null==r||r(),d(),w(),N(),null==c||c()}return this}}}),n.updateContainerElements(e),n}})),ua=Gt(Gn);var ha=function(){if(ta)return ea;function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,i(a.key),a)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e,n,a){return n=c(n),function(e,n){if(n&&("object"==t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,r()?Reflect.construct(n,a||[],c(e).constructor):n.apply(e,a))}function r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(r=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function i(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var r=a.call(e,n);if("object"!=t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}ta=1;var o=e,s=yn(),m=da.createFocusTrap,d=ua.isFocusable,u=function(e){function t(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(n=a(this,t,[e]),"getNodeForOption",function(e){var t,n=null!==(t=this.internalOptions[e])&&void 0!==t?t:this.originalOptions[e];if("function"==typeof n){for(var a=arguments.length,r=new Array(a>1?a-1:0),c=1;c<a;c++)r[c-1]=arguments[c];n=n.apply(void 0,r)}if(!0===n&&(n=void 0),!n){if(void 0===n||!1===n)return n;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var l,i=n;if("string"==typeof n&&!(i=null===(l=this.getDocument())||void 0===l?void 0:l.querySelector(n)))throw new Error("`".concat(e,"` as selector refers to no known node"));return i}),n.handleDeactivate=n.handleDeactivate.bind(n),n.handlePostDeactivate=n.handlePostDeactivate.bind(n),n.handleClickOutsideDeactivates=n.handleClickOutsideDeactivates.bind(n),n.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:n.handleDeactivate,onPostDeactivate:n.handlePostDeactivate,clickOutsideDeactivates:n.handleClickOutsideDeactivates},n.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var r=e.focusTrapOptions;for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&("returnFocusOnDeactivate"!==c&&"onDeactivate"!==c&&"onPostDeactivate"!==c&&"checkCanReturnFocus"!==c&&"clickOutsideDeactivates"!==c?n.internalOptions[c]=r[c]:n.originalOptions[c]=r[c]);return n.outsideClick=null,n.focusTrapElements=e.containerElements||[],n.updatePreviousElement(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(t,e),n(t,[{key:"getDocument",value:function(){return this.props.focusTrapOptions.document||("undefined"!=typeof document?document:void 0)}},{key:"getReturnFocusNode",value:function(){var e=this.getNodeForOption("setReturnFocus",this.previouslyFocusedElement);return e||!1!==e&&this.previouslyFocusedElement}},{key:"updatePreviousElement",value:function(){var e=this.getDocument();e&&(this.previouslyFocusedElement=e.activeElement)}},{key:"deactivateTrap",value:function(){this.focusTrap&&this.focusTrap.active&&this.focusTrap.deactivate({returnFocus:!1,checkCanReturnFocus:null,onDeactivate:this.originalOptions.onDeactivate})}},{key:"handleClickOutsideDeactivates",value:function(e){var t="function"==typeof this.originalOptions.clickOutsideDeactivates?this.originalOptions.clickOutsideDeactivates.call(null,e):this.originalOptions.clickOutsideDeactivates;return t&&(this.outsideClick={target:e.target,allowDeactivation:t}),t}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var e=this,t=function(){var t=e.getReturnFocusNode(),n=!(!e.originalOptions.returnFocusOnDeactivate||null==t||!t.focus||e.outsideClick&&(!e.outsideClick.allowDeactivation||d(e.outsideClick.target,e.internalOptions.tabbableOptions))),a=e.internalOptions.preventScroll,r=void 0!==a&&a;n&&t.focus({preventScroll:r}),e.originalOptions.onPostDeactivate&&e.originalOptions.onPostDeactivate.call(null),e.outsideClick=null};this.originalOptions.checkCanReturnFocus?this.originalOptions.checkCanReturnFocus.call(null,this.getReturnFocusNode()).then(t,t):t()}},{key:"setupFocusTrap",value:function(){this.focusTrap?this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()):this.focusTrapElements.some(Boolean)&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(e){if(this.focusTrap){e.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var t=!e.active&&this.props.active,n=e.active&&!this.props.active,a=!e.paused&&this.props.paused,r=e.paused&&!this.props.paused;if(t&&(this.updatePreviousElement(),this.focusTrap.activate()),n)return void this.deactivateTrap();a&&this.focusTrap.pause(),r&&this.focusTrap.unpause()}else e.containerElements!==this.props.containerElements&&(this.focusTrapElements=this.props.containerElements),this.props.active&&(this.updatePreviousElement(),this.setupFocusTrap())}},{key:"componentWillUnmount",value:function(){this.deactivateTrap()}},{key:"render",value:function(){var e=this,t=this.props.children?o.Children.only(this.props.children):void 0;if(t){if(t.type&&t.type===o.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return o.cloneElement(t,{ref:function(n){var a=e.props.containerElements;t&&("function"==typeof t.ref?t.ref(n):t.ref&&(t.ref.current=n)),e.focusTrapElements=a||[n]}})}return null}}])}(o.Component),h="undefined"==typeof Element?Function:Element;return u.propTypes={active:s.bool,paused:s.bool,focusTrapOptions:s.shape({document:s.object,onActivate:s.func,onPostActivate:s.func,checkCanFocusTrap:s.func,onPause:s.func,onPostPause:s.func,onUnpause:s.func,onPostUnpause:s.func,onDeactivate:s.func,onPostDeactivate:s.func,checkCanReturnFocus:s.func,initialFocus:s.oneOfType([s.instanceOf(h),s.string,s.bool,s.func]),fallbackFocus:s.oneOfType([s.instanceOf(h),s.string,s.func]),escapeDeactivates:s.oneOfType([s.bool,s.func]),clickOutsideDeactivates:s.oneOfType([s.bool,s.func]),returnFocusOnDeactivate:s.bool,setReturnFocus:s.oneOfType([s.instanceOf(h),s.string,s.bool,s.func]),allowOutsideClick:s.oneOfType([s.bool,s.func]),preventScroll:s.bool,tabbableOptions:s.shape({displayCheck:s.oneOf(["full","legacy-full","non-zero-area","none"]),getShadowRoot:s.oneOfType([s.bool,s.func])}),trapStack:s.array,isKeyForward:s.func,isKeyBackward:s.func}),containerElements:s.arrayOf(s.instanceOf(h)),children:s.oneOfType([s.element,s.instanceOf(h)])},u.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:m},ea=u}(),va=Wt(ha);d();var pa=function(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.onClick,i=t.label,o=t.level,s=t.autoFocus,m=void 0!==s&&s;return e.createElement("button",{className:p("nav-link",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"),"nav-link--".concat(o)),onClick:l,autoFocus:m},e.createElement("span",{className:"nav-link__label"},i,e.createElement("span",{className:"nav-link__icon"},e.createElement(_,{icon:"chevron-right",theme:a,inverse:c,ariaHidden:!0}))))};d();var fa=function(t){var n=t.theme,c=void 0===n?"uobmain":n,l=t.inverse,i=void 0!==l&&l,o=t.url,s=t.label,m=t.level,d=t.autoFocus,u=void 0!==d&&d,h=t.externalLink,v=void 0!==h&&h,f=r(null);return a(function(){u&&f.current&&f.current.focus()},[u]),e.createElement("a",{className:p("page-link",c&&"theme-".concat(c),i&&"theme-".concat(c,"--inverse"),"page-link--".concat(m)),href:o,ref:f,target:v?"_blank":"_self",rel:v?"noopener noreferrer":""},s)};function ga(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0===r||r,l=t.image,i=t.tag,o=t.title,s=t.href,m=t.linkText,d=t.description,h=t.type;return e.createElement("div",{className:p("card-menu",h&&"card-menu--".concat(h),a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},e.createElement("figure",{className:"card-menu__figure"},e.createElement("div",{className:"card-menu__image-wrapper"},l&&e.createElement(H,u({},l,{altText:"",loadingAttr:"lazy"}))),e.createElement("figcaption",{className:"card-menu__text-content"},"secondary"===h&&e.createElement(e.Fragment,null,e.createElement("p",{className:"card-menu__tag card-menu__tag"},i),e.createElement("a",{className:"card-menu__link",href:s},e.createElement("h2",{className:"card-menu__title"},o))),"primary"===h?e.createElement(e.Fragment,null,e.createElement("h2",{className:"card-menu__title"},o),e.createElement("p",{className:"card-menu__description"},d),e.createElement("div",{className:"card-menu__cta"},e.createElement(y,{theme:a,url:s,title:m||o}))):e.createElement("div",{className:"card-menu__arrow"},e.createElement(_,{icon:"arrow-right",theme:a,ariaHidden:!0})))))}d();var Ea=function(t){var n=t.primaryLinks,a=t.secondaryLinks,r=t.onClickNavLink,c=t.menuCards,l=t.theme,i=t.inverse;return e.createElement("div",{className:p("header__main-menu",l&&"theme-".concat(l),i&&"theme-".concat(l,"--inverse"))},e.createElement("div",{className:"header__main-menu-menu-wrapper"},e.createElement("ul",{className:"header__main-menu-primary-list"},n.map(function(t,n){return t.children?e.createElement(pa,{label:t.label,onClick:function(){return r(n)},key:t.label,theme:l,inverse:i,level:"level-one",autoFocus:0===n}):e.createElement(fa,{label:t.label,url:t.url,key:t.label,theme:l,inverse:i,level:"level-one",autoFocus:0===n,externalLink:t.externalLink})})),e.createElement("ul",{className:"header__main-menu-secondary-list"},a.map(function(t,a){return t.children?e.createElement(pa,{label:t.label,onClick:function(){return r(a+n.length)},key:t.label,theme:l,inverse:i,level:"level-two"}):e.createElement(fa,{label:t.label,url:t.url,key:t.label,theme:l,inverse:i,level:"level-two",externalLink:t.externalLink})}))),e.createElement("ul",{className:"header__main-menu-promo-cards"},c&&c.map(function(t,n){return e.createElement("li",{key:n},e.createElement(ga,{theme:l,image:{src:{small:t.image.src.small,medium:t.image.src.medium,default:t.image.src.default}},description:t.description,tag:t.tag,title:t.title,linkText:t.linkText,href:t.href,type:t.type}))})))};d();var _a=function(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.label,i=t.onClick;return e.createElement("button",{className:p("reverse-link-with-arrow",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse")),onClick:i},e.createElement("span",{className:"reverse-link-with-arrow__title"},e.createElement("span",{className:"reverse-link-with-arrow__icon"},e.createElement(_,{icon:"arrow-left",theme:a,inverse:c,ariaHidden:!0})),l))},ba=function(t){var n=t.headingLink,a=t.onClickGoBack,r=t.onClickNavLink,c=t.theme,l=t.backLinkLabel,i=t.inverse,o=void 0===i||i;return e.createElement("div",{className:p("header__nested-menu",c&&"theme-".concat(c),o&&"theme-".concat(c,"--inverse"))},e.createElement(_a,{label:l,onClick:a,theme:c,inverse:o}),e.createElement("div",{className:"header__heading-link"},e.createElement(fa,{theme:c,inverse:o,url:n.url,label:n.label,level:"level-one",autoFocus:!0})),e.createElement("div",{className:"header__content-wrapper"},n.description&&e.createElement("p",{className:"header__description"},n.description),n.children&&e.createElement("ul",{className:p("header__link-list",n.description&&"header__link-list--with-desc")},n.children.map(function(t,n){return t.children?e.createElement(pa,{label:t.label,onClick:function(){return r(n)},key:t.label,inverse:o,theme:c,level:"level-two"}):e.createElement(fa,{label:t.label,url:t.url,key:t.label,theme:c,inverse:o,level:"level-two",externalLink:t.externalLink})}))))};d();var wa=function(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.fieldName,i=t.hiddenLabel,o=void 0!==i&&i,s=t.defaultValue,m=t.placeholder,d=t.required,u=void 0!==d&&d,h=t.onChange;return e.createElement("div",{className:p("form-input",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},e.createElement("label",{htmlFor:l,className:p("form-input__label",o&&"sr-only")},"Select ",l),e.createElement("input",{className:"form-input__input",id:l,name:l,type:"text",required:u,defaultValue:s,placeholder:m,onChange:h}))},Ca=function(t){var n=t.title,a=void 0===n?"Search":n,r=t.placeholder,c=void 0===r?"Start typing":r,l=t.introText,i=t.handleSearchChange,o=t.handleSearchSubmit,s=t.theme,m=t.inverse,d=t.onClickGoBack,u=t.backLinkLabel,h=t.recommendedLinks,v=t.recommendedLinkTitle;return e.createElement("div",{className:"header-search"},d&&u&&e.createElement("div",{className:"header-search__back-link"},e.createElement(_a,{label:u,onClick:d,theme:s})),e.createElement("div",{className:"header-search__container"},e.createElement("h2",{className:"header-search__title"},a),e.createElement("p",{className:"header-search__intro"},l),e.createElement("form",{className:"header-search__form",method:"post",onSubmit:o},e.createElement("div",{className:"header-search__search-wrapper"},e.createElement(wa,{theme:s,inverse:!1,fieldName:"search",hiddenLabel:!0,placeholder:c,onChange:i}),e.createElement(qe,{theme:s,inverse:!m,title:"Search",icon:"search",isSubmit:!0})),e.createElement(C,{theme:s,inverse:!m,label:"Search",isSubmit:!0}))),h&&e.createElement("div",{className:"header-search__recommended-links-wrapper"},v&&e.createElement("h3",{className:"header-search__recommended-link-title"},v),e.createElement("ul",{className:"header-search__recommended-links"},h.map(function(t,n){return e.createElement("li",{className:"header-search__recommended-link",key:n},e.createElement(Ot,{theme:s,url:t.url,title:t.label,externalLink:t.externalLink}))}))))};function ya(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.label,c=t.url,l=t.externalLink,i=t.active,o=void 0!==i&&i;return e.createElement("a",{className:p("campus-selector-link",a&&"theme-".concat(a),o&&"campus-selector-link--active"),href:c,target:l?"_blank":"_self",rel:"noreferrer"},r)}function Na(t){var n=t.active,a=t.theme,r=t.ukUrl,c=t.dubaiUrl,l=t.mobile;return e.createElement("div",{className:p("campus-selector",a&&"theme-".concat(a),l&&"campus-selector--mobile",!l&&"campus-selector--desktop")},e.createElement("div",{className:"campus-selector__container"},e.createElement("span",{className:"campus-selector__label"},"Select campus:"),l?e.createElement(e.Fragment,null,e.createElement(C,{label:"UK",theme:a,inverse:!0,url:r,hollow:"uk"!==n}),e.createElement(C,{label:"Dubai",theme:a,inverse:!0,url:c,hollow:"dubai"!==n})):e.createElement(e.Fragment,null,e.createElement(ya,{label:"UK",theme:a,url:r,active:"uk"===n}),e.createElement(ya,{label:"Dubai",theme:a,url:c,active:"dubai"===n}))))}d(),d();var ka=function(e){var t,c,l=e.primaryLinks,i=e.secondaryLinks,o=e.searchProps,s=r(null),m=r(null),d=r(null),u=n(!1),v=u[0],p=u[1],f=n(0),g=f[0],E=f[1],_=n(null),b=_[0],w=_[1],C=n(null),y=C[0],N=C[1],k=n(!1),x=k[0],L=k[1],T=n(!1),M=T[0],H=T[1],S=n(""),V=S[0],P=S[1],O=function(){p(!0),document.body.classList.add("lock-scroll")},Z=function(){L(!0),O()},q=function(){L(!1),H(!1)},B=function(){p(!1),q(),document.body.classList.remove("lock-scroll"),E(0),w(null),N(null),s.current&&s.current.focus()};a(function(){var e=function(e){"Escape"===e.key&&v&&B()};return document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}});var F=null,D=null;null!==b&&(F=null!==(t=h(h([],l,!0),i,!0)[b])&&void 0!==t?t:null,null!==y&&(null==F?void 0:F.children)&&(D=null!==(c=F.children[y])&&void 0!==c?c:null));return{openMenuButtonRef:s,headerRef:m,desktopCampusSelectorRef:d,isOpen:v,menuLevel:g,mainMenuSelectedIdx:b,levelOneSelectedIdx:y,searchIsOpen:x,searchOpenedFromHeader:M,searchTerm:V,mainMenuSelectedLink:F,firstLevelSelectedLink:D,openMenu:O,closeMenu:B,openSearch:Z,openSearchFromHeader:function(){H(!0),Z()},closeSearch:q,onClickMainMenuNavLink:function(e){E(1),w(e)},onClickLevelOneNavLink:function(e){E(2),N(e)},goBackToMainMenu:function(){E(0),w(null),q()},goBackToLevelOne:function(){E(1),N(null),q()},closeLowestLevelSearch:function(){E(2),q()},handleSearchChange:function(e){P(e.target.value)},handleSearchSubmit:function(e){if(e.preventDefault(),"undefined"!=typeof window){var t=null==o?void 0:o.resultsUrl;t&&(window.location.href=V?"".concat(t,"?term=").concat(V):t)}}}};d();var xa=function(t){var r=t.theme,c=void 0===r?"uobmain":r,l=t.inverse,o=void 0!==l&&l,s=t.primaryLinks,d=t.secondaryLinks,u=t.menuCards,h=t.dubaiUrl,v=t.ukUrl,f=t.logoTitleTagH1,g=void 0===f||f,E=t.activeCampus,_=void 0===E?"uk":E,b=t.searchProps,w=function(){var e=n(null),t=e[0],r=e[1];return a(function(){var e=window.scrollY,n=function(){var n=window.scrollY,a=n>e?"down":"up";a!==t&&(n-e>3||n-e<-3)&&r(a),e=n>0?n:0};return window.addEventListener("scroll",n),function(){window.removeEventListener("scroll",n)}},[t]),t}(),y=Te("768px"),N=ka({primaryLinks:s,secondaryLinks:d,searchProps:b}),k=N.openMenuButtonRef,x=N.headerRef,L=N.desktopCampusSelectorRef,T=N.isOpen,M=N.menuLevel,H=N.searchIsOpen,S=N.searchOpenedFromHeader,V=N.mainMenuSelectedLink,P=N.firstLevelSelectedLink,O=N.openMenu,Z=N.closeMenu,q=N.openSearch,B=N.openSearchFromHeader,F=N.onClickMainMenuNavLink,D=N.onClickLevelOneNavLink,I=N.goBackToMainMenu,A=N.goBackToLevelOne,$=N.closeLowestLevelSearch,R=N.handleSearchChange,j=N.handleSearchSubmit;e.useEffect(function(){if(x.current&&"down"===w){var e=x.current.offsetHeight;x.current.style.top="-".concat(e,"px")}else if(x.current&&"up"===w){var t=0;L.current&&x.current&&(t=L.current.offsetHeight),x.current.style.top="-".concat(t,"px")}},[L,x,w]);var z=e.createElement("div",{className:"header__campus-selector header__campus-selector--mobile"},e.createElement(Na,{theme:c,dubaiUrl:h,ukUrl:v,active:_,mobile:!0})),U=e.createElement("div",{className:"header__campus-selector header__campus-selector--desktop",ref:L},e.createElement(Na,{theme:c,dubaiUrl:h,ukUrl:v,active:_,mobile:!1})),W=e.createElement("div",{className:"header__campus-selector header__campus-selector--desktop"},e.createElement(Na,{theme:c,dubaiUrl:h,ukUrl:v,active:_,mobile:!1}));return e.createElement("header",{className:p("header",c&&"theme-".concat(c),o&&"theme-".concat(c,"--inverse"),!T&&"header--is-closed","header--".concat(_)),id:"header",ref:x},e.createElement("div",{className:"header__closed"},U,e.createElement("div",{className:"header__top-container"},e.createElement("div",{className:"header__logo-wrapper"},e.createElement("div",{className:"header__logo-wrapper"},g?e.createElement("h1",{className:"header__logo-heading"},e.createElement(qt,{activeCampus:_,imageMode:"light",classNames:"header__logo-link",imageAltText:"uk"===_?"University of Birmingham":"University of Birmingham Dubai",loadingAttr:"eager"})):e.createElement(qt,{activeCampus:_,imageMode:"light",classNames:"header__logo-link",loadingAttr:"eager"},e.createElement("span",{className:"sr-only"},"uk"===_?"University of Birmingham":"University of Birmingham Dubai")))),e.createElement("div",{className:"header__right-wrapper"},e.createElement("div",{className:"header__search-button"},e.createElement(C,{theme:c,label:"Search",onClick:B,hollow:!0})),e.createElement("div",{className:"header__menu-button"},e.createElement("span",null,"Menu"),e.createElement(qe,{theme:"uobmain",icon:"hamburger",onClick:O,title:"Open menu",ariaControls:"header",ref:k,ariaExpanded:T}))))),e.createElement(m,null,T&&e.createElement(va,null,e.createElement(i.div,{className:"header__open",initial:{x:"100%"},animate:{x:"0"},exit:{x:"100%"},transition:{type:"tween"},key:"header__open"},W,e.createElement("div",{className:"header__top-container"},e.createElement("div",{className:"header__logo-wrapper"},e.createElement(qt,{activeCampus:_,imageMode:"dark",classNames:"header__logo-link"},e.createElement("h1",{className:"sr-only"},"uk"===_?"University of Birmingham":"University of Birmingham Dubai"))),e.createElement("div",{className:"header__right-wrapper"},!y&&!H&&e.createElement("div",{className:"header__search-button-menu"},e.createElement(C,{theme:c,inverse:!0,label:"Search",onClick:q,hollow:!0})),e.createElement("div",{className:"header__menu-button"},e.createElement("span",null,"Menu"),e.createElement(qe,{theme:"uobmain",inverse:!0,icon:"cross",onClick:Z,title:"Close menu",ariaControls:"header"})))),y&&!H&&e.createElement("div",{className:"header__search-button-mobile"},e.createElement(C,{theme:c,inverse:!0,label:"Search",onClick:q,hollow:!0})),0===M&&!H&&e.createElement(Ea,{primaryLinks:s,secondaryLinks:d,menuCards:u,onClickNavLink:F,theme:c,inverse:o}),0===M&&H&&e.createElement(Ca,{theme:c,introText:b.introText,placeholder:b.placeholder,title:b.title,handleSearchChange:R,handleSearchSubmit:j,onClickGoBack:S?void 0:I,backLinkLabel:S?"":"Back to menu",recommendedLinks:b.recommendedLinks,recommendedLinkTitle:b.recommendedLinkTitle}),1===M&&V&&!H&&e.createElement(ba,{headingLink:V,onClickNavLink:D,theme:c,inverse:o,onClickGoBack:I,backLinkLabel:"Back to menu"}),1===M&&V&&H&&e.createElement(Ca,{theme:c,introText:b.introText,placeholder:b.placeholder,title:b.title,handleSearchChange:R,handleSearchSubmit:j,onClickGoBack:A,backLinkLabel:"Back to ".concat(V.label),recommendedLinks:b.recommendedLinks,recommendedLinkTitle:b.recommendedLinkTitle}),2===M&&V&&P&&!H&&e.createElement(ba,{headingLink:P,onClickNavLink:function(){},theme:c,inverse:o,onClickGoBack:A,backLinkLabel:"Back to ".concat(V.label)}),2===M&&V&&P&&H&&e.createElement(Ca,{theme:c,introText:b.introText,placeholder:b.placeholder,title:b.title,handleSearchChange:R,handleSearchSubmit:j,onClickGoBack:$,backLinkLabel:"Back to ".concat(P.label),recommendedLinks:b.recommendedLinks,recommendedLinkTitle:b.recommendedLinkTitle}),z))))},La={mobile:{image:"polygon(0 0, calc(100% - 1px) 0, calc(75% - 1px) calc(70% - 1px), 0 calc(90% - 1px))",background:"polygon(0 0, 100% 0, 75% 70%, 0 90%)"},tablet:{image:"polygon(0 0, 100% 0, 100% calc(70% - 1px), calc(30% + 1px) calc(60% - 1px))",background:"polygon(0 0, 100% 0, 100% 70%, 30% 60%)"},desktop:{image:"polygon(1px 0, 100% 0, 100% calc(95% - 1px), calc(10% + 1px) calc(65% - 1px))",background:"polygon(0 0, 100% 0, 100% 95%, 10% 65%)"}};function Ta(t){var n,c,o=t.isMobile,s=t.isTablet,m=t.image,d=o?La.mobile:s?La.tablet:La.desktop,u=r(null),h=l();return a(function(){var e;u.current&&u.current.setAttribute("fetchpriority",null!==(e=m.fetchPriority)&&void 0!==e?e:"auto")}),e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero__polygon-image-wrapper"},e.createElement(i.img,{ref:u,className:"hero__image",src:m.src.default,srcSet:"".concat(null!==(n=m.src.small)&&void 0!==n?n:m.src.default," 576w, ").concat(null!==(c=m.src.medium)&&void 0!==c?c:m.src.default," 992w, ").concat(m.src.default," 1440w"),alt:m.alt,fetchPriority:m.fetchPriority,animate:{clipPath:d.image},transition:{type:"tween"}}),e.createElement(i.div,{key:h,className:"hero__polygon-image-background",animate:{opacity:1,clipPath:d.background},transition:{type:"tween"},initial:{opacity:0}})))}d();var Ma={initial:{pathLength:0},animate:{pathLength:1},transition:{delay:.5,duration:1}};function Ha(t){var n=t.isMobile,a=t.isTablet;return n?e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero__line",animate:{left:"75%",bottom:"30%",transform:"rotate(10deg)"},initial:!1},e.createElement("svg",{width:"140",height:"2",viewBox:"0 0 140 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140"},Ma)))),e.createElement(i.div,{className:"hero__line",animate:{left:"75%",bottom:"30%",transform:"rotate(-15deg)"},initial:!1},e.createElement("svg",{width:"140",height:"2",viewBox:"0 0 140 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140"},Ma))))):a?e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero__line",animate:{left:"calc(30% + 1px)",top:"calc(60% - 3px)",transform:"rotate(161deg)"},initial:!1},e.createElement("svg",{width:"120",height:"2",viewBox:"0 0 120 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140"},Ma)))),e.createElement(i.div,{className:"hero__line",animate:{left:"30%",top:"calc(60% - 1px)",transform:"rotate(26deg)"},initial:!1},e.createElement("svg",{width:"120",height:"2",viewBox:"0 0 120 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140"},Ma))))):e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero__line",animate:{left:"10%",top:"calc(65% - 3px)",transform:"rotate(118deg)"},initial:!1},e.createElement("svg",{width:"140",height:"2",viewBox:"0 0 140 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140"},Ma)))),e.createElement(i.div,{className:"hero__line",animate:{left:"10%",top:"calc(65% - 3px)",transform:"rotate(41deg)"},initial:!1},e.createElement("svg",{width:"140",height:"2",viewBox:"0 0 140 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140"},Ma)))))}d();var Sa=function(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.fieldName,i=t.selectOptions,o=t.defaultValue,s=void 0===o?"all":o,m=t.hiddenLabel,d=void 0!==m&&m,u=t.customLabel,h=t.title,v=t.onChange,f=t.value;return e.createElement("div",{className:p("form-select",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},u?e.createElement("label",{htmlFor:l,className:p("form-select__label",d&&"sr-only")},u):e.createElement("label",{htmlFor:l,className:p("form-select__label",d&&"sr-only")},"Select ",l),e.createElement("div",{className:"form-select__select-wrapper"},e.createElement("select",{className:"form-select__select",defaultValue:s,value:f,id:l,name:l,onChange:v},e.createElement("option",{value:"all"},h),i&&i.map(function(t,n){return e.createElement("option",{value:t.value,key:n},t.label)})),e.createElement("div",{className:"form-select__icon"},e.createElement(_,{icon:"arrow-down",theme:a,inverse:c}))))};function Va(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.title,i=t.description,o=t.defaultSearchTerm,s=t.placeholder,m=t.filterTitle,d=t.filterFieldName,u=t.filterOptions,h=t.defaultFilter,v=void 0===h?"all":h,f=t.wrapped,g=void 0!==f&&f,E=t.fullWidth,_=void 0!==E&&E,b=t.onGrid,w=void 0!==b&&b,y=t.titleTag,N=void 0===y?"h2":y,k=t.formSubmitHandler,L=t.filterChangeHandler,T=t.searchTermChangeHandler,M=N;return e.createElement("div",{className:p("search-course",_&&"search-course--full-width",w&&"search-course--on-grid",g&&"search-course--wrapped",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"),!d&&"search-course--no-filter")},e.createElement("div",{className:"search-course__container"},l&&e.createElement(M,{className:"search-course__title"},l),i&&e.createElement("div",{className:"search-course__description"},e.createElement(x,{text:i,theme:a,inverse:c})),e.createElement("form",{className:"search-course__form",method:"post",onSubmit:k},e.createElement("div",{className:"search-course__search-wrapper"},e.createElement(wa,{theme:a,inverse:c,fieldName:"search",hiddenLabel:!0,defaultValue:o,placeholder:s,onChange:T}),e.createElement(qe,{theme:a,inverse:!c,title:"Search",icon:"search",isSubmit:!0}),g&&e.createElement(C,{theme:a,inverse:!c,label:"Search",isSubmit:!0})),d&&m&&u&&e.createElement(Sa,{theme:a,inverse:c,title:m,fieldName:d,selectOptions:u,defaultValue:v,hiddenLabel:!0,onChange:L}),!g&&e.createElement(C,{theme:a,inverse:!c,label:"Search",isSubmit:!0}))))}function Pa(t){var n=t.theme,a=t.inverse,r=t.title,c=t.titleTag,l=void 0===c?"h2":c,i=t.description,o=t.image,s=t.publishDate,m=t.links,d=t.courseSearchProps,h=Te("768px"),v=Te("1248px");return e.createElement("div",{className:p("hero",n&&"theme-".concat(n),a&&"theme-".concat(n,"--inverse"),o&&"hero--with-image"),id:"hero"},o&&"rectangle"===o.style&&e.createElement("div",{className:"hero__image-wrapper hero__image-wrapper--mobile hero__image-wrapper--rectangle"},e.createElement(H,u({},o,{altText:o.alt,fetchPriority:o.fetchPriority}))),o&&"lines-of-intent"===o.style&&h&&e.createElement("div",{className:"hero__image-wrapper hero__image-wrapper--mobile"},e.createElement(Ta,{isMobile:!0,isTablet:!1,image:o}),e.createElement(Ha,{isMobile:!0,isTablet:!1})),e.createElement("div",{className:"hero__container"},e.createElement("div",{className:"hero__content"},e.createElement(l,{className:"hero__title"},r),i&&e.createElement("div",{className:"hero__description"},e.createElement(x,{text:i,theme:n,inverse:a})),s&&e.createElement("div",{className:"hero__meta-data"},e.createElement("div",{className:"hero__publish-date"},s)),m&&m.length>0&&e.createElement("div",{className:"hero__buttons"},m.map(function(t,r){return e.createElement(C,{theme:n,key:r,url:t.url,label:t.title,externalLink:t.externalLink,inverse:!a,hollow:1===r})})),d&&e.createElement(Va,u({theme:n,inverse:a,wrapped:!0},d))),o&&"rectangle"===o.style&&e.createElement("div",{className:"hero__image-wrapper hero__image-wrapper--desktop hero__image-wrapper--rectangle"},e.createElement(H,u({},o,{altText:o.alt,fetchPriority:o.fetchPriority}))),o&&"lines-of-intent"===o.style&&v&&e.createElement("div",{className:"hero__image-wrapper hero__image-wrapper--desktop hero__image-wrapper--polygon"},e.createElement(Ta,{isMobile:!1,isTablet:!0,image:o}),e.createElement(Ha,{isMobile:!1,isTablet:!0})),o&&"lines-of-intent"===o.style&&!h&&!v&&e.createElement("div",{className:"hero__image-wrapper hero__image-wrapper--desktop hero__image-wrapper--polygon"},e.createElement(Ta,{isMobile:!1,isTablet:!1,image:o}),e.createElement(Ha,{isMobile:!1,isTablet:!1}))))}function Oa(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=t.label,l=t.icons;return e.createElement("div",{className:p("share-buttons",a&&"theme-".concat(a),r&&"theme-".concat(a,"--inverse"))},c&&e.createElement("div",{className:"share-buttons__label"},c),l&&e.createElement("ul",{className:"share-buttons__icon-wrapper"},l.map(function(t,n){return e.createElement("li",{className:"share-buttons__icon",key:n},e.createElement(qe,{theme:a,title:t.title,icon:t.icon,url:t.url,inverse:r}))})))}function Za(t){var n="items"in t?t.items:[t],a=(null!=n?n:[]).filter(function(e){return Boolean(e)});return e.createElement(e.Fragment,null,a.map(function(t,n){var r=t.theme,c=void 0===r?"uobmain":r,l=t.inverse,i=void 0!==l&&l,o=t.label,s=t.url,m=t.externalLink;return e.createElement(e.Fragment,{key:"".concat(s,"-").concat(o,"-").concat(n)},e.createElement("a",{className:p("paragraph-link",c&&"theme-".concat(c),i&&"theme-".concat(c,"--inverse")),href:s,target:m?"_blank":"_self",rel:"noreferrer"},o),n<a.length-1?" ":null)}))}function qa(t){var n=t.theme,a=t.inverse,r=t.title,c=t.titleTag,l=void 0===c?"h2":c,i=t.description,o=t.cardImage,s=t.publishDate,m=t.readTime,d=t.shareButtons,h=t.author,v=Array.isArray(h)?h:[h];return e.createElement("section",{className:p("hero-article",n&&"theme-".concat(n),a&&"theme-".concat(n,"--inverse"))},e.createElement("div",{className:"hero-article__container"},e.createElement("div",{className:"hero-article__content"},e.createElement(l,{className:"hero-article__title"},r),e.createElement("p",{className:"hero-article__description"},i),e.createElement("div",{className:"hero-article__meta-data"},s&&e.createElement("span",{className:"hero-article__publish-date"},s),s&&m&&e.createElement("span",{className:"hero-article__separator"},"•"),m&&e.createElement("span",{className:"hero-article__read-time"},m),h&&e.createElement(e.Fragment,null,e.createElement("span",{className:"hero-article__separator"},"•"),e.createElement("span",{className:"hero-article__author"},"by ",e.createElement(Za,{items:v})))),e.createElement("div",{className:"hero-article__sharing-buttons"},e.createElement(Oa,{theme:n,label:d.label,icons:d.icons,inverse:a})))),o&&e.createElement("div",{className:"hero-article__image-wrapper"},e.createElement(Ge,u({},o,{inverse:a}))))}function Ba(t){var a=t.theme,r=t.inverse,c=t.buttonLabel,l=t.hollow,i=t.modalChildren,o=n(!1),s=o[0],m=o[1],d=function(){m(!1),document.body.classList.remove("lock-scroll")};return e.createElement("div",{className:p("modal-cta-button",a&&"theme-".concat(a),r&&"theme-".concat(a,"--inverse"))},e.createElement(C,{inverse:r,label:c,onClick:function(){s?d():(m(!0),document.body.classList.add("lock-scroll"))},theme:a,hollow:l}),s&&e.createElement(Fe,{centred:!0,theme:a,closeModal:d,isOpen:s},e.createElement(st,{className:"modal-cta-button__embed-wrapper"},i)))}function Fa(t){var n=t.title,a=t.value,r=t.link;return e.createElement("article",{className:"course-tile"},e.createElement("div",{className:"course-tile__top"},e.createElement("div",{className:"course-tile__title"},n),e.createElement("div",{className:"course-tile__value"},a)),r&&e.createElement("div",{className:"course-tile__link-wrapper"},e.createElement(Ft,u({},r,{inverse:!0,onClick:function(e){return Dt(e,r.url||"#")}}))))}function Da(t){var n=t.title,a=t.selectProps;return e.createElement("article",{className:"course-tile-select"},e.createElement("div",{className:"course-tile-select__top"},e.createElement("div",{className:"course-tile-select__title"},n),e.createElement(Sa,u({},a,{inverse:!0}))))}function Ia(t){var n=t.title,a=t.rank,r=t.rankText,c=t.link;return e.createElement("article",{className:"course-tile-ranking"},e.createElement("div",{className:"course-tile-ranking__top"},e.createElement("div",{className:"course-tile-ranking__title"},n),e.createElement("div",{className:"course-tile-ranking__rank"},a),e.createElement("div",{className:"course-tile-ranking__rank-text"},r)),c&&e.createElement("div",{className:"course-tile-ranking__link-wrapper"},e.createElement(Ft,u({},c,{inverse:!0,onClick:function(e){return Dt(e,c.url||"#")}}))))}function Aa(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0===r||r,l=t.topPadding,i=void 0!==l&&l,o=t.selectorProps;return e.createElement("div",{className:p("location-selector",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},e.createElement("div",{className:p("location-selector__container",i&&"location-selector__container--padding-top")},e.createElement(Sa,u({},o,{inverse:c}))))}function $a(t){var n,a=t.theme,r=t.title,c=t.titleTag,l=void 0===c?"h2":c,i=t.awardShort,o=t.links,s=t.ranking,m=t.award,d=t.campus,h=t.ucas,v=t.duration,f=t.entryRequirements,g=t.startDate,E=t.yearOfEntry,_=t.fees,b=t.deliveryFormat,w=t.locationDetails,y=t.modalCTA;return e.createElement("section",{className:p("hero-courses",a&&"theme-".concat(a)),id:"hero-courses"},e.createElement("div",{className:"hero-courses__container"},e.createElement("div",{className:"hero-courses__content"},e.createElement("div",{className:"hero-courses__title-wrapper"},e.createElement(k,{htmlTag:l,classNames:"hero-courses__title"},r&&r.length>0&&i&&i.length>0?r+" ":r,e.createElement("span",{className:"hero-courses__title-award"},i))),w&&e.createElement("div",{className:"hero-courses__location-wrapper"},e.createElement(Aa,u({},w,{inverse:!1}))),e.createElement("ul",{className:(n="hero-courses__grid--four",s&&(d||b||h)?n="hero-courses__grid--six":(s&&!d&&!b&&!h||!s&&(d||b||h))&&(n="hero-courses__grid--five"),"hero-courses__grid "+n)},s&&e.createElement("li",{className:"hero-courses__column hero-courses__column--ranking"},e.createElement(Ia,u({},s))),(h||d||b)&&e.createElement("li",{className:"hero-courses__column hero-courses__column--split hero-courses__column--award"},h&&e.createElement(Fa,u({},h)),d&&e.createElement(Fa,u({},d)),b&&e.createElement(Fa,u({},b))),v&&E?e.createElement("li",{className:"hero-courses__column hero-courses__column--split hero-courses__column--duration"},e.createElement(Da,u({},E)),e.createElement(Fa,u({},v))):v&&g?e.createElement("li",{className:"hero-courses__column hero-courses__column--split hero-courses__column--duration"},e.createElement(Fa,u({},g)),e.createElement(Fa,u({},v))):e.createElement("li",{className:"hero-courses__column hero-courses__column--duration"},e.createElement(Fa,u({},v))),m&&e.createElement("li",{className:"hero-courses__column hero-courses__column--delivery-format"},e.createElement(Fa,u({},m))),e.createElement("li",{className:"hero-courses__column hero-courses__column--entry-requirements"},e.createElement(Fa,u({},f))),e.createElement("li",{className:"hero-courses__column hero-courses__column--fees"},e.createElement(Fa,u({},_)))),e.createElement("div",{className:"hero-courses__button-wrapper"},e.createElement("ul",{className:"hero-courses__buttons"},o&&o.map(function(t,n){return t.externalLink?e.createElement("li",{className:"hero-courses__button",key:n},e.createElement(De,{theme:a,label:t.label,icon:"external",hollow:n%2!=0,iconPosition:"right",url:t.url,inverse:!0,onClick:t.onClick})):e.createElement("li",{className:"hero-courses__button",key:n},e.createElement(C,{theme:a,label:t.label,hollow:n%2!=0,url:t.url,inverse:!0,onClick:t.onClick}))})),y&&e.createElement(Ba,{theme:a,inverse:!y.inverse,hollow:!0,buttonLabel:y.buttonLabel,modalChildren:y.modalChildren})))))}d(),d(),d(),d(),d(),d(),d();var Ra={first:{clipPath:"polygon(0 0, 95% 0, 75% 100%, 0 80%)"},second:{clipPath:"polygon(0 0, 100% 0, 75% 70%, 0 90%)"},third:{clipPath:"polygon(0 0, 80% 0, 95% 90%, 0 80%)"},visible:{opacity:1}},ja={first:{clipPath:"polygon(0 0, calc(95% - 1px) 0, calc(75% - 1px) calc(100% - 1px), 0 calc(80% - 1px))"},second:{clipPath:"polygon(0 0, calc(100% - 1px) 0, calc(75% - 1px) calc(70% - 1px), 0 calc(90% - 1px))"},third:{clipPath:"polygon(0 0, calc(80% - 1px) 0, calc(95% - 1px) calc(90% - 1px), 0 calc(80% - 1px))"}},za={first:{clipPath:"polygon(0 25%, 100% 5%, 100% 100%, 23% 100%)"},second:{clipPath:"polygon(33% 20%, 100% 5%, 100% 100%, 0 100%)"},third:{clipPath:"polygon(0 3%, 100% 20%, 100% 100%, 23% 100%)"},visible:{opacity:1}},Ua={first:{clipPath:"polygon(1px calc(25% + 1px), 100% calc(5% + 1px), 100% 100%, calc(23% + 1px) 100%)"},second:{clipPath:"polygon(calc(33% + 1px) calc(20% + 1px), 100% calc(5% + 1px), 100% 100%, 1px 100%)"},third:{clipPath:"polygon(1px calc(3% + 1px), 100% calc(20% + 1px), 100% 100%, calc(23% + 1px) 100%"}},Wa={first:{clipPath:"polygon(0 33%, 100% 10%, 100% 100%, 23% 100%)"},second:{clipPath:"polygon(33% 30%, 100% 10%, 100% 100%, 0 100%)"},third:{clipPath:"polygon(0 10%, 100% 25%, 100% 100%, 15% 100%)"},visible:{opacity:1}},Ga={first:{clipPath:"polygon(1px calc(33% + 1px), 100% calc(10% + 1px), 100% 100%, calc(23% + 1px) 100%)"},second:{clipPath:"polygon(calc(33% + 1px) calc(30% + 1px), 100% calc(10% + 1px), 100% 100%, 1px 100%)"},third:{clipPath:"polygon(1px calc(10% + 1px), 100% calc(25% + 1px), 100% 100%, calc(15% + 1px) 100%"}},Ka={first:{left:"calc(75% + 1px)",bottom:0,transform:"rotate(-40deg)"},second:{left:"75%",bottom:"30%",transform:"rotate(-15deg)"},third:{left:"95%",bottom:"10%",transform:"rotate(-70deg)"}},Ya={first:{left:"calc(75% + 1px)",bottom:0,transform:"rotate(-15deg)"},second:{left:"75%",bottom:"30%",transform:"rotate(10deg)"},third:{left:"95%",bottom:"10%",transform:"rotate(-30deg)"}},Ja={first:{left:"2px",top:"calc(25% - 1px)",transform:"rotate(-130deg)"},second:{left:"calc(33% + 2px)",top:"calc(20% - 1px)",transform:"rotate(-155deg)"},third:{left:"0",top:"calc(3% - 3px)",transform:"rotate(-170deg)"}},Xa={first:{left:"2px",top:"calc(25% - 1px)",transform:"rotate(-50deg)"},second:{left:"calc(33% + 2px)",top:"calc(20% - 1px)",transform:"rotate(-110deg)"},third:{left:"1px",top:"calc(3% - 1px)",transform:"rotate(-10deg)"}},Qa={first:{left:"2px",top:"calc(33% - 1px)",transform:"rotate(-130deg)"},second:{left:"calc(33% + 1px)",top:"calc(30% - 2px)",transform:"rotate(-160deg)"},third:{left:"1px",top:"calc(10% - 2px)",transform:"rotate(-160deg)"}},er={first:{left:"2px",top:"calc(33% - 1px)",transform:"rotate(-45deg)"},second:{left:"calc(33% + 1px)",top:"calc(30% - 2px)",transform:"rotate(-75deg)"},third:{left:"0",top:"calc(10%)",transform:"rotate(-15deg)"}},tr={initial:{pathLength:0},animate:{pathLength:1},transition:{delay:.5,duration:1}};function nr(t){var n=t.isMobile,a=t.isTablet,r=t.activeVariant;return n?e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero-carousel__line",variants:Ka,animate:r,initial:!1},e.createElement("svg",{width:"140",height:"2",viewBox:"0 0 140 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140",stroke:"black"},tr)))),e.createElement(i.div,{className:"hero-carousel__line",variants:Ya,animate:r,initial:!1},e.createElement("svg",{width:"140",height:"2",viewBox:"0 0 140 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H140",stroke:"black"},tr))))):a?e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero-carousel__line",variants:Ja,animate:r,initial:!1},e.createElement("svg",{width:"260",height:"2",viewBox:"0 0 260 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H260",stroke:"black"},tr)))),e.createElement(i.div,{className:"hero-carousel__line",variants:Xa,animate:r,initial:!1},e.createElement("svg",{width:"260",height:"2",viewBox:"0 0 260 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H260",stroke:"black"},tr))))):e.createElement(e.Fragment,null,e.createElement(i.div,{className:"hero-carousel__line",variants:Qa,animate:r,initial:!1},e.createElement("svg",{width:"360",height:"2",viewBox:"0 0 360 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H360",stroke:"black"},tr)))),e.createElement(i.div,{className:"hero-carousel__line",variants:er,animate:r,initial:!1},e.createElement("svg",{width:"360",height:"2",viewBox:"0 0 360 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement(i.path,u({d:"M0 1H360",stroke:"black"},tr)))))}function ar(t){var n,c,o=t.isMobile,s=t.isTablet,d=t.activeVariant,u=t.imageSrc,h=t.imageAlt,v=t.imageFetchPriority,p=r(null),f=l();return a(function(){p.current&&p.current.setAttribute("fetchpriority",null!=v?v:"high")}),e.createElement(e.Fragment,null,e.createElement(m,null,e.createElement(i.div,{className:"hero-carousel__image-wrapper",transition:{delayChildren:1}},e.createElement(i.img,{ref:p,className:"hero-carousel__image",src:null==u?void 0:u.default,srcSet:"".concat(null!==(n=null==u?void 0:u.small)&&void 0!==n?n:null==u?void 0:u.default," 576w, ").concat(null!==(c=null==u?void 0:u.medium)&&void 0!==c?c:null==u?void 0:u.default," 992w, ").concat(null==u?void 0:u.default," 1440w"),alt:h,variants:o?ja:s?Ua:Ga,animate:d,initial:{clipPath:"polygon(0 0, 0 0, 0 0, 0 0)"},transition:{type:"tween"}}),e.createElement(i.div,{key:f,className:"hero-carousel__image-background",variants:o?Ra:s?za:Wa,animate:["visible",d],exit:{backgroundColor:"rgba(255, 255, 255, 0)"},transition:{type:"tween"},initial:{opacity:0,clipPath:"polygon(1% 1%, 1% 1%, 1% 1%, 1% 1%)"}}))))}var rr=t(function(t,n){var a=t.theme,r=t.category,c=t.title,l=t.description,i=t.linkUrl,o=t.linkLabel,s=t.onKeyDown;return e.createElement(e.Fragment,null,e.createElement("p",{className:"hero-carousel__category"},r),e.createElement("h2",{className:"hero-carousel__title"},c),e.createElement("p",{className:"hero-carousel__description"},l),e.createElement("div",{className:"hero-carousel__cta"},e.createElement(y,{url:i,title:o,theme:a,inverse:!0,onKeyDown:s,ref:n})))});function cr(t){var a=t.theme,c=t.cards,l=c.length>1,o=n(0),s=o[0],m=o[1],d=c[s],u=r(null),h=Te("768px"),v=Te("1248px"),f="";switch(s){case 0:f="first";break;case 1:f="second";break;case 2:f="third"}var g=l?e.createElement(tt,{theme:a,totalNumber:c.length,currentNumber:s+1,carouselId:"hero-carousel",onClickPrev:function(){m(function(e){return e-1})},onClickNext:function(){m(function(e){return e+1})},prevButtonDisabled:0===s,nextButtonDisabled:s===c.length-1,showNumbers:!0}):e.createElement(e.Fragment,null);return e.createElement("div",{className:p("hero-carousel",a&&"theme-".concat(a)),id:"hero-carousel"},e.createElement("div",{className:"hero-carousel__top"},e.createElement("div",{className:"hero-carousel__content"},h&&e.createElement("div",{className:"hero-carousel__image-container hero-carousel__image-container--mobile"},e.createElement(ar,{isMobile:!0,isTablet:!1,activeVariant:f,imageSrc:d.imageSrc,imageAlt:d.imageAlt}),e.createElement(nr,{isMobile:!0,isTablet:!1,activeVariant:f})),e.createElement("div",{className:"hero-carousel__cards"},e.createElement(i.section,{className:"hero-carousel__active-card",key:s,initial:{opacity:0},animate:{opacity:1}},e.createElement(rr,{category:d.category,title:d.title,description:d.description,linkUrl:d.linkUrl,linkLabel:d.linkLabel,theme:a,ref:u})),h&&l&&c.map(function(t,n){return e.createElement("section",{className:"hero-carousel__invisible-card hero-carousel__invisible-card--mobile",key:n,"aria-hidden":!0},e.createElement(rr,{category:t.category,title:t.title,description:t.description,linkUrl:t.linkUrl,linkLabel:t.linkLabel,theme:a}))}),e.createElement("div",{className:"hero-carousel__nav hero-carousel__nav--desktop"},g)),e.createElement("div",{className:"hero-carousel__image-container hero-carousel__image-container--desktop"},e.createElement(ar,{isMobile:!1,isTablet:v,activeVariant:f,imageSrc:null==d?void 0:d.imageSrc,imageAlt:d.imageAlt}),e.createElement(nr,{isMobile:!1,isTablet:v,activeVariant:f}))),!h&&l&&c.map(function(t,n){return e.createElement("div",{className:"hero-carousel__invisible-card hero-carousel__invisible-card--desktop",key:n,"aria-hidden":!0},e.createElement("section",null,e.createElement(rr,{category:t.category,title:t.title,description:t.description,linkUrl:t.linkUrl,linkLabel:t.linkLabel,theme:a})))})),h&&e.createElement("div",{className:"hero-carousel__nav hero-carousel__nav--mobile"},g))}function lr(t){var c=t.theme,i=t.title,o=t.titleTag,s=void 0===o?"h1":o,m=t.description,d=t.bgVideoUrl,u=t.bgVideoMobileThumbnail,h=t.bgVideoAltText,v=t.fullVideoId,f=t.fullVideoButtonLabel,g=void 0===f?"Watch full video":f,E=t.describedVideoId,_=t.describedVideoButtonLabel,b=void 0===_?"Audio described video":_,w=t.includesAudio,C=r(null),y=n(!1),N=y[0],k=y[1],x=n(!0),L=x[0],T=x[1],M=n(!1),H=M[0],S=M[1],V=r(v),P=l(),O="video-".concat(P);a(function(){var e,t=window.matchMedia("(prefers-reduced-motion: reduce)"),n=navigator.connection,a=!(!n||!n.saveData&&!["slow-2g","2g","3g"].includes(null!==(e=n.effectiveType)&&void 0!==e?e:""));!C.current||t.matches||a||C.current.play().catch(function(){});var r=function(){C.current&&(k(!C.current.paused),T(C.current.muted))},c=C.current;return null==c||c.addEventListener("play",r),null==c||c.addEventListener("pause",r),null==c||c.addEventListener("volumechange",r),function(){null==c||c.removeEventListener("play",r),null==c||c.removeEventListener("pause",r),null==c||c.removeEventListener("volumechange",r)}},[d]);var Z=function(e){var t;V.current=e,S(!0),document.body.classList.add("lock-scroll"),null===(t=C.current)||void 0===t||t.pause()},q=s;return e.createElement(e.Fragment,null,e.createElement("section",{className:p("hero-video","theme-".concat(c))},e.createElement("div",{className:"hero-video__bg-wrapper",style:{backgroundImage:"url(".concat(u,")")}},e.createElement("video",{id:O,ref:C,role:"img",className:"hero-video__bg-element",src:"".concat(d,"#t=0.1"),poster:u,muted:!w||L,loop:!0,playsInline:!0,preload:"metadata","aria-label":h})),e.createElement("div",{className:"hero-video__container"},e.createElement("div",{className:"hero-video__card"},e.createElement(q,{className:"hero-video__title"},i),e.createElement("p",{className:"hero-video__description"},m),e.createElement("div",{className:"hero-video__controls"},e.createElement("div",{className:"hero-video__playback-btns"},e.createElement(qe,{theme:c,inverse:!0,title:N?"Pause":"Play",icon:N?"pause":"play",onClick:function(){var e=C.current;e&&(N?e.pause():e.play().catch(function(){}))},"aria-controls":O,"aria-pressed":N}),w&&e.createElement(qe,{theme:c,inverse:!0,title:L?"Unmute":"Mute",icon:L?"mute-off":"mute-on",onClick:function(){C.current&&w&&(C.current.muted=!C.current.muted,T(C.current.muted))},"aria-controls":O,"aria-pressed":!L})),e.createElement("div",{className:"hero-video__action-btns"},e.createElement(De,{theme:c,inverse:!1,hollow:!0,label:g,icon:"play",onClick:function(){return Z(v)}}),E&&e.createElement(De,{theme:c,inverse:!1,hollow:!0,label:b,icon:"play",onClick:function(){return Z(E)}})))))),H&&e.createElement(Fe,{theme:c,closeModal:function(){S(!1),document.body.classList.remove("lock-scroll")},isOpen:H},e.createElement(Ze,{theme:c,id:V.current,autoPlay:!0})))}function ir(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=t.title,l=t.description,i=t.linkProps,o=t.fullWidth,s=t.makeHeadingFullWidth,m=t.images,d=t.htmlTag;if(!m||0===m.length)return null;var h=3===m.length&&!o;return e.createElement("div",{className:p("image-block","theme-".concat(a),r&&"theme-".concat(a,"--inverse"),o?"image-block--full-width":"image-block--standard-width","image-block--count-".concat(m.length))},(c||l||i)&&e.createElement(T,{theme:a,inverse:r,title:c,description:l,linkProps:i,fullWidth:!!s,htmlTag:d}),e.createElement("div",{className:"image-block__container"},h?e.createElement("div",{className:"image-block__inner-grid"},m.map(function(t,n){return e.createElement("div",{key:n,className:"image-block__item"},e.createElement(Ge,u({},t,{theme:a,inverse:r})))})):m.map(function(t,n){return e.createElement("div",{key:n,className:p("image-block__item","image-block__item--index-".concat(n+1))},e.createElement(Ge,u({},t,{theme:a,inverse:r})))})))}function or(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.title,i=t.description,o=t.linkProps,s=t.fullWidth,m=void 0!==s&&s,d=t.widerImage,u=t.images,h=t.htmlTag;return e.createElement("section",{className:p("image-carousel",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"),m&&"image-carousel--full-width",d&&"image-carousel--wider-image")},(l||i)&&e.createElement(T,{theme:a,htmlTag:h,inverse:c,title:l,description:i,linkProps:o}),e.createElement("div",{className:"image-carousel__grid"},e.createElement(nt,{theme:a,inverse:c,type:"image",cards:u})))}function sr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.heading,c=void 0===r?"Page contents":r,l=t.links,i=t.buttonLinks,o=t.locationDetails,s=function(e){var t=document.getElementById(e);if(t){var n=t.getBoundingClientRect().top+window.pageYOffset-20;window.scrollTo({top:n,behavior:"smooth"});var a=null,r=null,c=0,l=function(){a&&(a.disconnect(),a=null),r&&(r.disconnect(),r=null),c&&(clearTimeout(c),c=0)},i=function(e){return!!e&&(a=new IntersectionObserver(function(t){t.some(function(e){return e.isIntersecting})&&function(e){try{e.focus({preventScroll:!0})}catch(e){}finally{l()}}(e)},{root:null,threshold:.1,rootMargin:"0px 0px -20% 0px"}),a.observe(e),!0)},o=t.querySelector("h1,h2,h3,h4,h5,h6");i(o)||(r=new MutationObserver(function(){o=t.querySelector("h1,h2,h3,h4,h5,h6"),i(o)&&r&&(r.disconnect(),r=null)})).observe(t,{childList:!0,subtree:!0}),c=window.setTimeout(function(){l();var e=t.querySelector('a, button, input, select, textarea, [tabindex]:not([tabindex="-1"])');if(e){var n=!e.hasAttribute("tabindex");n&&e.setAttribute("tabindex","-1"),e.focus({preventScroll:!0}),n&&e.removeAttribute("tabindex")}},1e3)}},m=function(e,t){e.preventDefault(),s(t.replace("#",""))};return e.createElement("div",{className:p("in-page-navigation-links",a&&"theme-".concat(a))},e.createElement("h2",{className:"in-page-navigation-links__heading"},c),o&&e.createElement(Aa,u({},o,{inverse:!0})),e.createElement("nav",null,e.createElement("ul",{className:"in-page-navigation-links__link-container"},l.map(function(t){return e.createElement("li",{className:p("in-page-navigation-links__link-wrapper",t.active&&"in-page-navigation-links__link-wrapper--active"),key:t.url},e.createElement("a",{className:"in-page-navigation-links__link",href:t.url,onClick:function(e){return m(e,t.url)},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||m(e,t.url)}},t.title))}))),e.createElement("ul",null,i&&i.map(function(t,n){return t.externalLink?e.createElement("li",{className:"in-page-navigation-links__link-button",key:n},e.createElement(De,{theme:a,label:t.label,icon:"external",hollow:n%2!=0,iconPosition:"right",url:t.url,onClick:t.onClick})):e.createElement("li",{className:"in-page-navigation-links__link-button",key:n},e.createElement(C,{theme:a,label:t.label,hollow:n%2!=0,url:t.url,onClick:t.onClick}))})))}function mr(t){var c,l,o=t.theme,s=void 0===o?"uobmain":o,d=t.inverse,h=void 0!==d&&d,v=t.links,f=t.expandableHeader,g=void 0===f?"Page contents":f,E=n(!1),_=E[0],b=E[1],w=n("not-docked"),C=w[0],y=w[1],N=n(null),k=N[0],x=N[1],L=r(null),T=r(null),M=r(null),H=r(null),S=r(null),V=function(){b(!1)};return a(function(){var e=function(e){!c.current||e.target instanceof HTMLElement&&c.current.contains(e.target)||l()};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[c=S,l=function(){return V()}]),a(function(){var e;M.current=new IntersectionObserver(function(t){var n;e=null===(n=t.find(function(e){return e.isIntersecting}))||void 0===n?void 0:n.target,y(e?"docked":"not-docked")},{rootMargin:"0px 0px -100%"}),T.current=new IntersectionObserver(function(t){var n,a=null===(n=t.find(function(e){return e.isIntersecting}))||void 0===n?void 0:n.target;a?y("docked-at-bottom"):!a&&e&&y("docked")}),L.current=new IntersectionObserver(function(e){var t,n=null===(t=e.find(function(e){return e.isIntersecting}))||void 0===t?void 0:t.target;n&&x(n.id)},{rootMargin:"0px 0px -".concat(.7*window.innerHeight,"px 0px")});var t=document.querySelectorAll(".anchor-target");t.forEach(function(e){L&&L.current&&L.current.observe(e)});var n=document.querySelectorAll("#footer");n.forEach(function(e){T&&T.current&&T.current.observe(e)});var a=document.querySelectorAll("#sidebar");return a.forEach(function(e){M&&M.current&&M.current.observe(e)}),function(){t.forEach(function(e){L&&L.current&&L.current.unobserve(e)}),a.forEach(function(e){M&&M.current&&M.current.unobserve(e)}),n.forEach(function(e){T&&T.current&&T.current.unobserve(e)})}},[]),v.links.map(function(e){return e.url.substring(1)===k?e.active=!0:e.active=!1}),e.createElement("div",{className:p("in-page-navigation",s&&"theme-".concat(s),h&&"theme-".concat(s,"--inverse"))},e.createElement("div",{className:p("in-page-navigation--mobile",C)},e.createElement("div",{className:"in-page-navigation__closed"},e.createElement("div",{className:"in-page-navigation__top-container"},e.createElement("div",{className:"in-page-navigation__right-wrapper"},e.createElement("div",{className:"in-page-navigation__menu-button"},e.createElement("span",{className:"in-page-navigation__expandable-header"},g),e.createElement(qe,{theme:"uobmain",icon:"menu",onClick:function(){b(!0)},title:"Open menu",ariaControls:"in-page-navigation",ref:H,ariaExpanded:_})))))),_&&e.createElement("div",{className:"in-page-navigation__overlay"}),e.createElement(m,null,_&&e.createElement(i.div,{className:"in-page-navigation__open",initial:{x:"100%"},animate:{x:"0"},exit:{x:"100%"},transition:{type:"tween"},key:"in-page-navigation__open",ref:S},e.createElement(Be,null,e.createElement("div",{className:"in-page-navigation__nav"},e.createElement("div",{className:"in-page-navigation__top-container"},e.createElement("div",{className:"in-page-navigation__right-wrapper"},e.createElement("div",{className:"in-page-navigation__close-button"},e.createElement("span",null,"Close"),e.createElement(qe,{theme:"uobmain",inverse:!0,icon:"cross",onClick:V,title:"Close menu",ariaControls:"in-page-navigation"})))),e.createElement(sr,u({},v,{theme:"uobmain"})))))),e.createElement("div",{className:p("in-page-navigation--desktop",C)},e.createElement(sr,u({},v,{theme:s}))))}function dr(t){var n=t.text,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=t.fullWidth,i=t.removeBottomPadding,o=void 0!==i&&i,s=t.removeTopPadding,m=void 0!==s&&s;return e.createElement("div",{className:p("intro-text",r&&"theme-".concat(r),c&&"theme-".concat(r,"--inverse"),l&&"intro-text--full-width",o&&"intro-text--no-bottom-padding",m&&"intro-text--no-top-padding")},e.createElement("div",{className:"intro-text__container"},e.createElement("p",{className:"intro-text__text"},n)))}function ur(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.heading,c=t.cards,l=t.link;return e.createElement("div",{className:p("most-read-news",a&&"theme-".concat(a))},e.createElement("h2",{className:"most-read-news__title"},r),e.createElement("ul",{className:"most-read-news__card-container"},c.map(function(t,n){return e.createElement("li",{className:"most-read-news__card",key:n},e.createElement(Ke,{theme:a,title:t.title,href:t.href,titleTag:"h3",publishDate:t.publishDate}))})),l&&e.createElement(y,{theme:a,inverse:!0,url:l.url,title:l.title}))}function hr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.featuredArticle,c=t.otherLeadArticles,l=t.mostReadNews;return e.createElement("section",{className:p("lead-news-articles",a&&"theme-".concat(a))},e.createElement("div",{className:"lead-news-articles__container"},e.createElement("div",{className:"lead-news-articles__main-container"},e.createElement("div",{className:"lead-news-articles__featured-card"},e.createElement(Ke,u({},r,{isPrimary:!0}))),e.createElement("ul",{className:"lead-news-articles__secondary-card-container"},c.map(function(t,n){return e.createElement("li",{className:"lead-news-articles__secondary-card",key:n},e.createElement(Ke,{theme:a,image:t.image,title:t.title,href:t.href,titleTag:t.titleTag,publishDate:t.publishDate}))}))),e.createElement("div",{className:"lead-news-articles__side-container"},e.createElement(ur,u({},l)))))}function vr(t){var c=t.theme,l=t.showFilterButtonLabel,o=t.numSelected,s=t.filterElement,m=n(!1),d=m[0],u=m[1],h=r(null),v=function(e){"Escape"===e.key&&d&&u(!1)};return a(function(){return document.addEventListener("keydown",v),function(){document.removeEventListener("keydown",v)}}),a(function(){var e,t;d?null===(e=h.current)||void 0===e||e.showModal():null===(t=h.current)||void 0===t||t.close()},[d]),e.createElement(e.Fragment,null,e.createElement("div",{className:p("listing-filter-wrapper","theme-".concat(c))},e.createElement("div",{className:"listing-filter-wrapper__mobile"},e.createElement("button",{className:"listing-filter-wrapper__show-filter-button",onClick:function(){u(!0),document.body.classList.add("lock-scroll")}},e.createElement(_,{theme:"uobmain",icon:"settings"}),l,o&&e.createElement("span",{className:"listing-filter-wrapper__num-selected"},o,e.createElement("span",{className:"sr-only"},o>1?"filters":"filter"," selected"))))),e.createElement(Be,null,e.createElement(i.dialog,{className:p("listing-filter-wrapper__dialog","theme-".concat(c)),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},ref:h},e.createElement("div",{className:"listing-filter-wrapper__popup-wrapper"},e.createElement("div",{className:"listing-filter-wrapper__popup"},e.createElement("button",{className:"listing-filter-wrapper__close-button",onClick:function(){u(!1),document.body.classList.remove("lock-scroll")}},e.createElement(_,{icon:"slim-cross",theme:c,ariaHidden:!0}),e.createElement("span",{className:"sr-only"},"Close")),s)))),e.createElement("div",{className:"listing-filter-wrapper__desktop"},s))}function pr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.type,c=t.image,l=t.title,i=t.url,o=t.description,s=t.details,m=t.showCategory,d=void 0!==m&&m;return e.createElement(e.Fragment,null,c&&e.createElement("div",{className:"listing-result-card__image"},e.createElement(H,u({},c))),e.createElement("div",{className:"listing-result-card__text"},d&&e.createElement("p",{className:"listing-result-card__category"},r),e.createElement("h2",null,e.createElement("a",{className:"listing-result-card__title",href:i},l)),o&&e.createElement("p",{className:"listing-result-card__description"},o),(null==s?void 0:s.length)>0&&e.createElement("div",{className:"listing-result-card__details"},e.createElement(Qe,{details:s,theme:a}))))}function fr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.type,c=t.image,l=t.title,i=t.titleTag,o=void 0===i?"h2":i,s=t.url,m=t.description,d=t.supervisors,h=t.department,v=t.details,p=t.showCategory,f=void 0!==p&&p;return e.createElement(e.Fragment,null,c&&e.createElement("div",{className:"listing-result-card__image"},e.createElement(H,u({},c))),e.createElement("div",{className:"listing-result-card__text"},f&&e.createElement("p",{className:"listing-result-card__category"},r),e.createElement(k,{htmlTag:"h3"===o?"h3":"h2"},e.createElement("a",{className:"listing-result-card__title",href:s},l)),(d||h)&&e.createElement("div",{className:"listing-result-card__course-info"},d&&e.createElement("p",{className:"listing-result-card__supervisors"},"Supervisors: ",d),h&&e.createElement("p",{className:"listing-result-card__department"},h)),m&&e.createElement("p",{className:"listing-result-card__description"},m),(null==v?void 0:v.length)>0&&e.createElement("div",{className:"listing-result-card__details"},e.createElement(Qe,{details:v,theme:a}))))}function gr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0===r||r,l=t.type,i=t.image,o=t.title,s=t.url,m=t.description,d=t.details,h=t.showCategory,v=void 0!==h&&h,p=t.cardDescriptionIsRichText,f=void 0!==p&&p,g=t.titleTag,E=void 0===g?"h2":g,_=t.eventStatus,b=void 0===_?void 0:_;return e.createElement(e.Fragment,null,i&&e.createElement("div",{className:"listing-result-card__image"},e.createElement(H,u({},i)),b&&e.createElement("div",{className:"listing-result-card__event-graphic"},e.createElement(Ae,{theme:"uobmain",status:b,day:void 0,month:void 0}))),e.createElement("div",{className:"listing-result-card__text"},v&&e.createElement("p",{className:"listing-result-card__category"},l),e.createElement(k,{htmlTag:E},e.createElement("a",{className:"listing-result-card__title",href:s},o)),m&&!f&&e.createElement("p",{className:"listing-result-card__description"},m),m&&f&&e.createElement(x,{theme:a,inverse:c,text:m}),(null==d?void 0:d.length)>0&&e.createElement("div",{className:"listing-result-card__details"},e.createElement(Qe,{details:d,theme:a}))))}function Er(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.type,c=t.image,l=t.title,i=t.url,o=t.description,s=t.author,m=t.details,d=t.showCategory,h=void 0!==d&&d,v=Array.isArray(s)?s:[s];return e.createElement(e.Fragment,null,c&&e.createElement("div",{className:"listing-result-card__image"},e.createElement(H,u({},c))),e.createElement("div",{className:"listing-result-card__text"},h&&e.createElement("p",{className:"listing-result-card__category"},r),e.createElement("h2",null,e.createElement("a",{className:"listing-result-card__title",href:i},l)),s&&e.createElement("p",{className:"listing-result-card__author"},"by ",e.createElement(Za,{items:v})),o&&e.createElement("p",{className:"listing-result-card__description"},o),(null==m?void 0:m.length)>0&&e.createElement("div",{className:"listing-result-card__details"},e.createElement(Qe,{details:m,theme:a}))))}function _r(t){var n=t.image,a=t.title,r=t.url,c=t.description;return e.createElement(e.Fragment,null,n&&e.createElement("div",{className:"listing-result-card__image"},n&&e.createElement(H,u({},n))),e.createElement("div",{className:"listing-result-card__text"},e.createElement("h2",null,e.createElement("a",{className:"listing-result-card__title",href:r},a)),c&&e.createElement("p",{className:"listing-result-card__description"},c)))}function br(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.type,c=t.image,l=t.title,i=t.url,o=t.description,s=t.jobTitle,m=t.department,d=t.details,h=t.showCategory,v=void 0!==h&&h;return e.createElement(e.Fragment,null,c&&e.createElement("div",{className:"listing-result-card__image"},c&&e.createElement(H,u({},c))),e.createElement("div",{className:"listing-result-card__text"},v&&e.createElement("p",{className:"listing-result-card__category"},r),e.createElement("h2",null,e.createElement("a",{className:"listing-result-card__title",href:i},l)),(s||m)&&e.createElement("div",{className:"listing-result-card__staff-info"},s&&e.createElement("p",{className:"listing-result-card__job-title"},s),m&&e.createElement("p",{className:"listing-result-card__department"},m)),o&&e.createElement("p",{className:"listing-result-card__description"},o),(null==d?void 0:d.length)>0&&e.createElement("div",{className:"listing-result-card__details"},e.createElement(Qe,{details:d,theme:a}))))}function wr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.image,c=t.title,l=t.url,i=t.description,o=t.jobTitle,s=t.department,m=t.details;return e.createElement(e.Fragment,null,r&&e.createElement("div",{className:"listing-result-card__image"},r&&e.createElement(H,u({},r))),e.createElement("div",{className:"listing-result-card__text"},e.createElement("h2",null,e.createElement("a",{className:"listing-result-card__title",href:l},c)),(o||s)&&e.createElement("div",{className:"listing-result-card__staff-info"},o&&e.createElement("p",{className:"listing-result-card__job-title"},o),s&&e.createElement("p",{className:"listing-result-card__department"},s)),i&&e.createElement("p",{className:"listing-result-card__description"},i.length>120?"".concat(i.slice(0,120),"..."):i),(null==m?void 0:m.length)>0&&e.createElement("div",{className:"listing-result-card__details"},e.createElement(Qe,{details:m,theme:a}))))}function Cr(t){return e.createElement("article",{className:p("listing-result-card",t.theme&&"theme-".concat(t.theme))},"page"===t.type&&e.createElement(_r,u({},t)),"course"===t.type&&e.createElement(fr,u({},t)),"accomodation"===t.type&&e.createElement(pr,u({},t)),"event"===t.type&&e.createElement(gr,u({},t)),"news"===t.type&&e.createElement(Er,u({},t)),"staff"===t.type&&e.createElement(br,u({},t)),"profile"===t.type&&e.createElement(wr,u({},t)))}function yr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.showCategory,c=void 0!==r&&r,l=t.cards,i=t.headingInfo;return e.createElement(e.Fragment,null,i&&e.createElement(T,u({},i,{theme:a,fullWidth:!0})),e.createElement("ul",{className:p("listing-results",a&&"theme-".concat(a))},l.map(function(t,n){return e.createElement("li",{className:"listing-results__card",key:n},e.createElement(Cr,u({},t,{showCategory:c,theme:a})))})))}function Nr(t){var n=t.count,a=t.theme,r=void 0===a?"uobmain":a;return e.createElement("p",{className:p("listing-results-count",r&&"theme-".concat(r))},e.createElement("span",{className:"listing-results-count__number"},n.toLocaleString())," results were found based on your search term")}function kr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.listItems;return e.createElement("div",{className:p("list-table",a&&"theme-".concat(a))},(null==r?void 0:r.length)?e.createElement("ul",{className:"list-table__list"},null==r?void 0:r.map(function(t,n){return e.createElement("li",{key:t+n,className:"list-table__list-item"},e.createElement(x,{inverse:!0,theme:"uobmain",text:t}))})):null)}function xr(t){var n=t.children;return e.createElement("main",{id:"main"},n)}function Lr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.heading,c=t.cards,l=t.cardType,i=void 0===l?"featured-news":l;return e.createElement("section",{className:p("news-articles-promo-block",a&&"theme-".concat(a),i&&"news-articles-promo-block--".concat(i))},e.createElement("div",{className:"news-articles-promo-block__heading-container"},r&&e.createElement("h2",{className:"news-articles-promo-block__heading"},r)),e.createElement("div",{className:"news-articles-promo-block__cards news-articles-promo-block__cards--mobile"},"featured-news"===i&&e.createElement(nt,{theme:a,type:"featured-news",cards:c,inverse:!0,cardTitleTag:"h3"}),"promo-video"===i&&e.createElement(nt,{theme:a,type:"promo-video",cards:c,inverse:!0,cardTitleTag:"h3",setCardInverse:"dark"})),e.createElement("ul",{className:"news-articles-promo-block__cards news-articles-promo-block__cards--desktop"},c.map(function(t,n){return e.createElement("li",{key:n},"featured-news"===i&&e.createElement(Ke,u({},t,{inverse:!0,titleTag:"h3"})),"promo-video"===i&&e.createElement(je,u({},t,{inverse:!1,titleTag:"h3"})))})))}function Tr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.numOfPages,c=t.onClick,l=t.currentPage,i=Te("768px"),o=e.createElement("li",null,e.createElement("span",{className:"pagination__ellipse"},"..."));return i&&r<=4?e.createElement(e.Fragment,null,Array(r).fill(0).map(function(t,n){return e.createElement("li",{className:p("pagination__number",l===n&&"pagination__number--selected"),key:n},e.createElement(C,{label:(n+1).toString(),onClick:function(){return c(n)},hollow:!(l===n),theme:a}))})):i&&r>4?e.createElement(e.Fragment,null,l>0&&e.createElement("li",{key:0,className:"pagination__number"},e.createElement(C,{label:"1",onClick:function(){return c(0)},theme:a,hollow:!0})),l+1>=3&&o,e.createElement("li",{key:l,className:"pagination__number pagination__number--selected"},e.createElement(C,{label:"".concat(l+1," "),onClick:function(){return c(l)},theme:a})),l+1<r-1&&o,l!==r-1&&e.createElement("li",{key:r-1,className:"pagination__number"},e.createElement(C,{label:r.toString(),onClick:function(){return c(r-1)},theme:a,hollow:!0}))):!i&&r<=6?e.createElement(e.Fragment,null,Array(r).fill(0).map(function(t,n){return e.createElement("li",{key:n,className:p("pagination__number",l===n&&"pagination__number--selected","test")},e.createElement(C,{label:(n+1).toString(),onClick:function(){return c(n)},hollow:!(l===n),theme:a}))})):!i&&r>6?e.createElement(e.Fragment,null,l>0&&e.createElement("li",{key:0,className:"pagination__number start"},e.createElement(C,{label:"1",onClick:function(){return c(0)},theme:a,hollow:!0})),l+1>=4&&o,l>1&&e.createElement("li",{key:l-1,className:"pagination__number before"},e.createElement(C,{label:(l>=1?l:l-1).toString(),onClick:function(){return c(l-1)},theme:a,hollow:!0})),e.createElement("li",{key:l,className:"pagination__number pagination__number--selected current"},e.createElement(C,{label:"".concat(l+1),onClick:function(){return c(l)},theme:a})),l+1<r-1&&e.createElement("li",{key:l+1,className:"pagination__number after"},e.createElement(C,{label:"".concat(l+2),onClick:function(){return c(l+1)},theme:a,hollow:!0})),l+1<r-2&&o,l+1!==r&&e.createElement("li",{key:r-1,className:"pagination__number end"},e.createElement(C,{label:"".concat(r),onClick:function(){return c(r-1)},theme:a,hollow:!0}))):e.createElement(e.Fragment,null)}function Mr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.numOfPages,c=t.onClick,l=t.currentPage,i=!Te("1248px");return r<=1?e.createElement(e.Fragment,null):e.createElement("div",{className:p("pagination",a&&"theme-".concat(a))},e.createElement("ul",{className:"pagination__container"},e.createElement("li",{className:"pagination__prev",key:"prev"},i?e.createElement(C,{theme:a,label:"Previous",onClick:function(){return c(l-1)},hollow:!0,disabled:l<1}):e.createElement(qe,{theme:a,icon:"arrow-left",title:"Previous",onClick:function(){return c(l-1)},disabled:l<1,inverse:!0})),e.createElement(Tr,{currentPage:l,onClick:c,theme:a,numOfPages:r}),e.createElement("li",{className:"pagination__next",key:"next"},i?e.createElement(C,{theme:a,label:"Next",onClick:function(){return c(l+1)},hollow:!0,disabled:l+1===r}):e.createElement(qe,{theme:a,icon:"arrow-right",title:"Next",onClick:function(){return c(l+1)},disabled:l+1===r,inverse:!0}))))}function Hr(t){var n,a=t.theme,r=t.inverse,c=t.type,l=t.title,i=t.description,o=t.link,s=t.cards,m=t.imageOrientation,d=void 0===m?"left":m,h=t.titleTag,v=void 0===h?"h2":h,f=t.cardTitleTag,g=void 0===f?"h3":f,_=t.cardCopyIsRichText,b=void 0!==_&&_,w=t.fullWidth,C=void 0!==w&&w,N=t.fullWidthTitle,x=void 0!==N&&N,L=t.showFilters,T=void 0!==L&&L,M=t.firstFilterSelect,H=t.secondFilterSelect,S=t.imageHeight,V=void 0===S?"default":S,P=!1;Te("768px")?s.length>1&&(P=!0):(C&&s.length>2||s.length>3)&&(P=!0);var O=p(((n={})["promo-block__grid"]=!0,n["promo-block__grid--single"]=1===s.length,n["promo-block__grid--two-cards"]=2===s.length,n["promo-block__grid--three-cards"]=3===s.length,n["promo-block__grid--four-plus-cards"]=s.length>3,n));return e.createElement("div",{className:p("promo-block","promo-block--".concat(c),a&&"theme-".concat(a),r&&"theme-".concat(a,"--inverse"),C&&"promo-block--full-width")},e.createElement("div",{className:"promo-block__container"},e.createElement("div",{className:p("promo-block__top",x&&"promo-block__top--full-width")},l&&e.createElement(k,{htmlTag:v,classNames:p("promo-block__title","h3"===v&&"promo-block__title--h3")},l),i&&e.createElement(E,{theme:"uobmain",inverse:r,text:i}),o&&e.createElement("div",{className:"promo-block__text-link"},e.createElement(y,{theme:a,inverse:r,url:o.url,title:o.title,externalLink:o.externalLink}))),T&&e.createElement("div",{className:"promo-block__filters"},e.createElement("div",{className:"promo-block__filter-wrapper"},M&&e.createElement(Sa,u({},M))),e.createElement("div",{className:"promo-block__filter-wrapper"},H&&e.createElement(Sa,u({},H)))),e.createElement("div",{className:"promo-block__content"},e.createElement("div",{className:"promo-block__cards"},!P&&e.createElement("ul",{className:O},s.map(function(t,n){return e.createElement("li",{className:"promo-block__card-item",key:n},function(t){var n=u(u({},t),{cardCopyIsRichText:b,imageHeight:V});switch(c){case"promo":return e.createElement($e,u({},n));case"promo-signpost":return e.createElement(Re,u({},t));case"promo-video":return e.createElement(je,u({},t));case"promo-profile":return e.createElement(et,u({},t));default:return e.createElement(e.Fragment,null)}}(u(u({},t),{inverse:r,isSingle:1===s.length,imageOrientation:d,titleTag:g})))})),P&&e.createElement(nt,{theme:a,inverse:r,type:c,cards:s,cardTitleTag:g,cardCopyIsRichText:b})))))}function Sr(t){var n=t.theme,a=t.inverse,r=t.type,c=t.title,l=t.description,i=t.link,o=t.cards,s=t.imageOrientation,m=void 0===s?"left":s,d=t.fullWidth;return e.createElement("div",{className:p("promo-block-grid","promo-block-grid--".concat(r),n&&"theme-".concat(n),a&&"theme-".concat(n,"--inverse"),d&&"promo-block-grid--full-width"),id:"promo-block-grid"},e.createElement("div",{className:"promo-block-grid__container"},e.createElement("div",{className:"promo-block-grid__top"},c&&e.createElement("h2",null,c),l&&e.createElement(E,{theme:"uobmain",inverse:a,text:l}),i&&e.createElement("div",{className:"promo-block-grid__text-link"},e.createElement(y,{theme:"uobmain",inverse:a,url:i.url,title:i.title,externalLink:i.externalLink}))),e.createElement("div",{className:"promo-block-grid__content"},e.createElement("div",{className:"promo-block-grid__cards"},o.length>0&&e.createElement("ul",{className:"promo-block-grid__grid"},o.map(function(t,n){return e.createElement("li",{className:"promo-block-grid__card-item",key:n},function(t){switch(r){case"promo":return e.createElement($e,u({},t));case"promo-signpost":return e.createElement(Re,u({},t));case"promo-video":return e.createElement(je,u({},t));default:return e.createElement(e.Fragment,null)}}(u(u({},t),{inverse:a,isSingle:1===o.length,imageOrientation:m,titleTag:c?"h3":"h2"})))}))))))}function Vr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=t.title,l=t.description,i=t.cite,o=t.role,s=t.quote,m=t.quoteeProfileImage,d=t.quoteeProfileImageAltText,u=t.cta,h=t.fullWidth,v=void 0!==h&&h,f=t.htmlTag;return e.createElement("div",{className:p("quote-block","theme-".concat(a),r&&"theme-".concat(a,"--inverse"),v&&"quote-block--full-width")},(c||l)&&e.createElement(T,{theme:a,inverse:r,htmlTag:f,title:c,description:l}),e.createElement("blockquote",{className:p("quote-block__container",!m&&"quote-block__container--no-image")},e.createElement("div",{className:"quote-block__doublequote quote-block__doublequote--open"},e.createElement(_,{icon:"quote-marks",theme:a})),e.createElement("p",{className:"quote-block__quote"},s),m&&e.createElement("div",{className:"quote-block__quotee-image"},e.createElement(H,{src:{default:m},altText:d})),(i||o)&&e.createElement("footer",{className:"quote-block__cite"},i&&e.createElement("cite",{className:"quote-block__cite-cite"},i),o&&e.createElement("div",{className:"quote-block__cite-role"},o)),e.createElement("div",{className:"quote-block__doublequote quote-block__doublequote--close"},e.createElement(_,{icon:"quote-marks",theme:a})),u&&e.createElement("div",{className:"quote-block__optional-link"},e.createElement(y,{inverse:r,onKeyDown:function(){},theme:a,title:u.title,url:u.url}))))}function Pr(t){var n,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=void 0===c||c,i=t.heading,o=t.description,s=t.linkProps,m=t.headingStyle,d=t.fullWidth,h=t.cards,v=Te("768px"),f=v&&h.length>1||!v&&d&&h.length>2||!v&&!d&&h.length>3,g=p(((n={})["related-courses__grid"]=!0,n["related-courses__grid--single"]=1===h.length,n["related-courses__grid--two-cards"]=2===h.length,n["related-courses__grid--three-cards"]=3===h.length,n["related-courses__grid--four-plus-cards"]=h.length>3,n));return e.createElement("section",{className:p("related-courses",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"),d&&"related-courses--full-width")},e.createElement("div",{className:"related-courses__container"},e.createElement("h2",{className:p("related-courses__heading",m&&"related-courses__heading--".concat(m))},i),o&&e.createElement("div",{className:"related-courses__description"},o),s&&s.url&&s.title&&e.createElement("div",{className:"related-courses__arrow-link-container"},e.createElement(y,{theme:r,inverse:l,title:s.title,url:s.url})),e.createElement("div",{className:"related-courses__cards"},!f&&e.createElement("ul",{className:g},h.map(function(t,n){return e.createElement("li",{className:"related-courses__card-item",key:n},e.createElement(We,u({},t)))})),f&&e.createElement(nt,{theme:r,inverse:l,type:"related",cards:h,cardTitleTag:"h3"}))))}function Or(t){var n,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=void 0===c||c,i=t.fullWidth,o=void 0!==i&&i,s=t.headingProps,m=t.cards,d=Te("768px"),h=d&&m.length>1||!d&&m.length>2,v=p(((n={})["scholarship-carousel__grid"]=!0,n["scholarship-carousel__grid--single"]=1===m.length,n["scholarship-carousel__grid--two-cards"]=2===m.length,n["scholarship-carousel__grid--three-plus-cards"]=m.length>3,n));return e.createElement("section",{className:p("scholarship-carousel",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"),o&&"scholarship-carousel--full-width")},e.createElement("div",{className:"scholarship-carousel__container"},s&&e.createElement(T,u({},s,{theme:r,inverse:l,fullWidth:o})),e.createElement("div",{className:"scholarship-carousel__cards"},!h&&e.createElement("ul",{className:v},m.map(function(t,n){return e.createElement("li",{className:"related-courses__card-item",key:n},e.createElement(Je,u({},t,{inverse:l})))})),h&&e.createElement(nt,{theme:r,inverse:l,type:"scholarship",cards:m,cardTitleTag:"h3"}))))}function Zr(t){var n,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=void 0===c||c,i=t.fullWidth,o=void 0!==i&&i,s=t.heading,m=t.headingStyle,d=void 0===m?null:m,h=t.cards,v=t.singleLink,f=t.titleTag,g=void 0===f?"h2":f,E=t.useCarousel,_=void 0===E||E,b=t.cardType,w=void 0===b?"staff":b,C=Te("768px"),N=_&&C&&h.length>1||_&&!C&&h.length>2,x="staff"===w,L=p(((n={})["staff-listing-carousel__grid"]=!0,n["staff-listing-carousel__grid--single"]=1===h.length,n["staff-listing-carousel__grid--two-cards"]=2===h.length,n["staff-listing-carousel__grid--three-plus-cards"]=h.length>3,n));return e.createElement("section",{className:p("staff-listing-carousel",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"),o&&"staff-listing-carousel--full-width",!_&&"staff-listing-carousel--no-carousel")},e.createElement("div",{className:"staff-listing-carousel__container"},s&&e.createElement(k,{htmlTag:g,classNames:p("staff-listing-carousel__heading","staff-listing-carousel__heading--".concat(g),d&&"staff-listing-carousel__heading--".concat(d))},s),e.createElement("div",{className:"staff-listing-carousel__cards"},!N&&e.createElement("ul",{className:L},h.map(function(t,n){return e.createElement("li",{className:"related-courses__card-item",key:n},x?e.createElement(Ue,u({},t,{theme:r,inverse:l,isSingle:1===h.length})):e.createElement(et,u({},t,{theme:r,inverse:l})))})),N&&e.createElement(nt,{theme:r,inverse:l,type:w,cards:h,cardTitleTag:"h3"})),1===h.length&&v&&e.createElement(y,{theme:r,url:v.url,title:v.title,inverse:!0})))}function qr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.sidebarElement,c=t.children;return e.createElement("div",{id:"sidebar",className:p("sidebar-wrapper",a&&"theme-".concat(a),!r&&"sidebar-wrapper--no-side-element")},e.createElement("div",{className:"sidebar-wrapper__grid-container"},r&&e.createElement("div",{className:"sidebar-wrapper__sidebar"},r),e.createElement("div",{className:"sidebar-wrapper__children"},c)))}function Br(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.items,i=t.fullWidth,o=void 0!==i&&i,s=t.htmlTag,m=void 0===s?"h2":s;return e.createElement("div",{className:p("signpost",o&&"signpost--full-width",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},e.createElement("div",{className:"signpost__container"},e.createElement("div",{className:"signpost__grid"},l.map(function(t){return e.createElement("div",{className:"signpost__item",key:t.title},t.tag&&e.createElement("p",{className:"signpost__tag"},t.tag),e.createElement(k,{htmlTag:m,classNames:"signpost__title"},t.title),e.createElement(y,{url:t.linkUrl,title:t.linkLabel,theme:a,inverse:c,externalLink:t.external}))}))))}function Fr(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.includeIcon,i=t.link,o=t.fullWidth;return e.createElement("div",{className:p("single-button",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"),o&&"single-button--full-width")},e.createElement("div",{className:"single-button__container"},l?e.createElement(De,u({},i,{inverse:!c})):e.createElement(C,u({},i,{inverse:!c}))))}function Dr(t){var n=t.theme,a=void 0===n?"uobmain":n;return e.createElement("div",{className:p("skip-to-content",a&&"theme-".concat(a))},e.createElement("a",{className:"skip-to-content__link",href:"#main"},"Skip to main content"))}function Ir(e,t){return g("".concat(null!=e?e:""," ").concat(t))}function Ar(t){var n=t.children,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=void 0!==c&&c;return e.createElement("div",{className:p("tabs__list__container",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"))},e.createElement("ul",{className:"tabs__list",role:"tablist"},n))}function $r(t){var n=t.title,a=t.htmlTag,r=void 0===a?"h3":a,c=t.theme,l=void 0===c?"uobmain":c,i=t.inverse,o=void 0!==i&&i,s=t.isActive,m=t.children,d=t.tabsBlockName;if(!s)return null;var u=Ir(null!=d?d:"",n);return e.createElement("div",{id:d,className:p("tabs__panel",l&&"theme-".concat(l),o&&"theme-".concat(l,"--inverse")),role:"tabpanel","aria-labelledby":"tab_"+u},e.createElement(k,{htmlTag:r,classNames:"tabs__panel-title"},n),m)}function Rr(t){var n=t.id,c=t.theme,l=void 0===c?"uobmain":c,i=t.inverse,o=void 0!==i&&i,s=t.tabItem,m=t.isActive,d=t.hasFocus,u=t.tabsBlockName,h=t.handleClick,v=t.handleKeyboardNavigation,f=r(null);a(function(){m&&d&&f.current&&(f.current.focus(),window.matchMedia("min-width: 768px").matches&&f.current.scrollIntoView())});var g=Ir(null!=u?u:"",s.title);return e.createElement("li",{className:"tabs__list-item",role:"presentation"},e.createElement("button",{className:p("tabs__tab",l&&"theme-".concat(l),o&&"theme-".concat(l,"--inverse"),m&&"active"),onClick:function(e){return h(e,n)},onKeyDown:v,ref:f,id:"tab_"+g,role:"tab","aria-controls":g,"aria-selected":m?"true":"false",tabIndex:m?0:-1,type:"button"},s.title))}function jr(t){var l=t.theme,i=void 0===l?"uobmain":l,o=t.inverse,s=void 0!==o&&o,m=t.title,d=t.description,h=t.tabItems,v=t.fullWidth,f=t.htmlTag,g=void 0===f?"h2":f,_=t.removeBottomPadding,b=void 0!==_&&_,w=t.name,k=t.enableHashNavigation,x=void 0!==k&&k,L=r(null),H=c(function(){return h.findIndex(function(e){return Ir(null!=w?w:"",e.title)===window.location.hash.substring(1)})},[h,w]),S=n(0),V=S[0],P=S[1],O=n(-1),Z=O[0],q=O[1],B=Te("1248px");function F(e){if(x){var t=window.location.href.replace(window.location.hash,""),n=Ir(null!=w?w:"",h[e].title);history.pushState(null,"null",t.concat("#",n))}}function D(e,t){e.preventDefault(),P(t),F(t)}a(function(){if(0!==window.location.hash.length){var e=H();e<0||(P(e),q(e))}},[H,P]);var I=function(e){switch(e.key){case"ArrowLeft":case"ArrowUp":case"Left":case"Up":if(0===V)return;P(V-1),q(V-1),F(V-1);break;case"ArrowRight":case"ArrowDown":case"Right":case"Down":if(V>=h.length-1)return;P(V+1),q(V+1),F(V+1);break;case"Home":P(0),q(0),F(0);break;case"End":P(h.length-1),q(h.length-1),F(h.length-1)}};function A(){var e="h3";return m&&"h2"===g?e="h3":m&&"h3"===g&&(e="h4"),e}return a(function(){var e=function(e){if(e.preventDefault(),0!==window.location.hash.length){var t=H();t<0||(P(t),q(t))}};return window.addEventListener("hashchange",e),function(){window.removeEventListener("hashchange",e)}},[V,H]),e.createElement(e.Fragment,null,B&&e.createElement(M,{heading:{title:m,description:d,fullWidth:v,htmlTag:g},theme:i,inverse:s,fullWidth:v,accordionItems:h.map(function(e,t){return{key:e.title||t,title:e.title,text:e.content,titleTag:e.titleTag?e.titleTag:A(),primaryButton:e.primaryButton,secondaryButton:e.secondaryButton,link:e.link}})}),e.createElement("div",{className:p("tabs",i&&"theme-".concat(i),s&&"theme-".concat(i,"--inverse"),v&&"tabs--full-width",b&&"tabs--no-bottom-padding"),id:"tabs",ref:L},!B&&e.createElement(e.Fragment,null,e.createElement(T,{theme:i,inverse:s,htmlTag:g,title:m,description:d,fullWidth:v}),e.createElement("div",{className:"tabs__container"},e.createElement("span",null,e.createElement(Ar,{theme:i,inverse:s},h.map(function(t,n){return e.createElement(Rr,{key:n,id:n,theme:i,inverse:s,tabItem:t,tabListTopRef:L,isActive:n===V,hasFocus:n===Z,enableHashNavigation:x,tabsBlockName:w,handleClick:D,handleKeyboardNavigation:I})})),h.map(function(t,n){return e.createElement($r,{key:n,isActive:n===V,inverse:s,theme:i,title:t.title,tabsBlockName:w,htmlTag:t.titleTag?t.titleTag:A()},t.content&&e.createElement(E,{theme:i,inverse:s,text:t.content}),t.accordionItems&&t.accordionItems.map(function(t){return e.createElement(N,u({key:t.key},t,{inverse:s}))}),(t.primaryButton&&t.primaryButton.text||t.secondaryButton&&t.secondaryButton.text)&&e.createElement("div",{className:"tabs__optional-buttons"},t.primaryButton&&t.primaryButton.text&&e.createElement(C,{label:t.primaryButton.text,url:t.primaryButton.url,theme:i,inverse:!s}),t.secondaryButton&&t.secondaryButton.text&&e.createElement(C,{hollow:!0,label:t.secondaryButton.text,url:t.secondaryButton.url,theme:i,inverse:!s})),t.link&&t.link.text&&e.createElement("div",{className:"tabs__optional-link"},e.createElement(y,{theme:i,inverse:s,url:t.link.url,title:t.link.text})))}))))))}function zr(t){var n=t.text,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=t.headingLevel,i=t.headingText,o=t.url,s=t.linkTitle,m=t.externalLink,d=t.linkStyle,u=t.fullWidth,h=t.removeBottomPadding,v=void 0!==h&&h,f=l;return e.createElement("div",{className:p("text-with-background",r&&"theme-".concat(r),c&&"theme-".concat(r,"--inverse"),u&&"text-with-background--full-width",v&&"text-with-background--no-bottom-padding")},i&&e.createElement("div",{className:"text-with-background__heading-wrapper"},e.createElement(f,null,i)),e.createElement(E,{text:n,inverse:c,theme:r}),o&&s&&e.createElement("div",{className:"text-with-background__link-wrapper"},e.createElement("div",{className:"text-with-background__link-inner-wrapper"},("primary"===d||"secondary"===d)&&e.createElement(C,{url:o,theme:r,label:s,externalLink:m,hollow:"secondary"===d,inverse:!c}),"paragraph-link"===d&&e.createElement(Za,{url:o,label:s,externalLink:m,theme:r,inverse:c}))))}function Ur(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.label,c=t.url,l=t.externalLink;return e.createElement("a",{className:p("pill",a&&"theme-".concat(a)),href:c,target:l?"_blank":"_self",rel:l?"noopener noreferrer":""},r)}function Wr(t){var n=t.topics,a=t.theme,r=void 0===a?"uobmain":a,c=t.titleTag,l=t.heading;return e.createElement("section",{className:p("topics-selector",r&&"theme-".concat(r))},e.createElement("div",{className:"topics-selector__container"},"h2"===c?e.createElement("h2",{className:"topics-selector__heading"},l):e.createElement("h3",{className:"topics-selector__heading"},l),e.createElement("ul",{className:"topics-selector__topics-container"},n.map(function(t,n){return e.createElement("li",{className:"topics-selector__topic",key:n},e.createElement(Ur,{theme:r,label:t.label,url:t.url,externalLink:t.externalLink}))}))))}rr.displayName="HeroCardContent",d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d(),d();var Gr,Kr={exports:{}};var Yr,Jr=(Gr||(Gr=1,Yr=Kr,function(e,t){Yr.exports=t()}(0,function(){var e=[],t=[],n={},a={},r={};function c(e){return"string"==typeof e?new RegExp("^"+e+"$","i"):e}function l(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function i(e,t){return e.replace(t[0],function(n,a){var r,c,i=(r=t[1],c=arguments,r.replace(/\$(\d{1,2})/g,function(e,t){return c[t]||""}));return l(""===n?e[a-1]:n,i)})}function o(e,t,a){if(!e.length||n.hasOwnProperty(e))return t;for(var r=a.length;r--;){var c=a[r];if(c[0].test(t))return i(t,c)}return t}function s(e,t,n){return function(a){var r=a.toLowerCase();return t.hasOwnProperty(r)?l(a,r):e.hasOwnProperty(r)?l(a,e[r]):o(r,a,n)}}function m(e,t,n,a){return function(a){var r=a.toLowerCase();return!!t.hasOwnProperty(r)||!e.hasOwnProperty(r)&&o(r,r,n)===r}}function d(e,t,n){return(n?t+" ":"")+(1===t?d.singular(e):d.plural(e))}return d.plural=s(r,a,e),d.isPlural=m(r,a,e),d.singular=s(a,r,t),d.isSingular=m(a,r,t),d.addPluralRule=function(t,n){e.push([c(t),n])},d.addSingularRule=function(e,n){t.push([c(e),n])},d.addUncountableRule=function(e){"string"!=typeof e?(d.addPluralRule(e,"$0"),d.addSingularRule(e,"$0")):n[e.toLowerCase()]=!0},d.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),r[e]=t,a[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(e){return d.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return d.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(e){return d.addSingularRule(e[0],e[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(d.addUncountableRule),d})),Kr.exports),Xr=Wt(Jr);function Qr(t){var a=t.theme,r=t.heading,c=t.selectContent,l=t.defaultIsOpen,i=void 0!==l&&l;c&&(i=!!c.defaultValue||i);var o=n(i),s=o[0],m=o[1];return e.createElement("fieldset",{className:p("filter-accordion-select",s&&"filter-accordion-select--open",a&&"theme-".concat(a))},e.createElement("legend",{className:"filter-accordion-select__legend"},e.createElement("button",{className:"filter-accordion-select__button",onClick:function(){return m(function(e){return!e})},"aria-expanded":s,"aria-controls":r.replace(" ","")},r,e.createElement(_,{icon:"chevron-down",theme:a,inverse:!0,ariaHidden:!0}))),s&&e.createElement("div",{className:"filter-accordion-select__select-wrapper"},e.createElement(Sa,u({theme:a,inverse:!0},c))))}function ec(t){var n=t.theme,a=t.name,r=t.id,c=t.label,l=t.defaultValue,i=t.onChange;return e.createElement("div",{className:p("date-input",n&&"theme-".concat(n))},e.createElement("label",{htmlFor:r,className:"date-input__label"},c),e.createElement("input",{type:"date",className:"date-input__input",defaultValue:l,onChange:i,name:a,id:r}))}d(),d(),d();var tc,nc=function(e){var t=e.split(" "),n=t[t.length-1];return t[t.length-1]=Xr(n),t.join(" ")};function ac(t){var n=t.theme,a=t.heading,r=t.listingGroups,c=t.onClearFilters,l=t.onViewResults;return e.createElement("div",{className:p("standard-listing-filter",n&&"theme-".concat(n))},e.createElement("p",{className:"standard-listing-filter__heading"},a),e.createElement("ul",{className:"standard-listing-filter__list"},r.map(function(t){var a;return"date"===t.type?e.createElement("li",{className:"standard-listing-filter__item",key:t.name},e.createElement(ec,u({},t,{theme:n,defaultValue:null!==(a=t.defaultValue)&&void 0!==a?a:"",onChange:t.onChange}))):"radio"===t.type?e.createElement("li",{className:"standard-listing-filter__item",key:t.name},e.createElement(zt,{type:"radio",heading:t.heading,theme:n,showMoreText:nc(t.heading)||"",inputs:t.inputs.map(function(e){return{name:t.name,value:e.value,label:e.label,id:e.id,defaultChecked:!!t.defaultValue&&t.defaultValue===e.value,onChange:t.onChange}})})):"checkbox"===t.type?e.createElement("li",{className:"standard-listing-filter__item",key:t.name},e.createElement(zt,{type:"checkbox",heading:t.heading,theme:n,showMoreText:nc(t.heading)||"",inputs:t.inputs.map(function(e){return{name:t.name,value:e.value,label:e.label,id:e.id,defaultChecked:!!t.defaultValues&&t.defaultValues.includes(e.value),onChange:t.onChange}})})):"select"===t.type?e.createElement("li",{className:"standard-listing-filter__item",key:t.name},e.createElement(Qr,{heading:t.heading,selectContent:t.selectContent,theme:n})):void 0})),l&&e.createElement("div",{className:"standard-listing-filter__results-button"},e.createElement(C,{label:"View selected results",onClick:l,theme:n})),e.createElement("div",{className:"standard-listing-filter__clear-button"},e.createElement(C,{label:"Clear filters",onClick:c,theme:n,hollow:!0})))}function rc(t){var n=t.theme,a=t.tag,r=t.title,c=t.linkUrl,l=t.linkText,o=t.externalLink,s=t.cards,m={initial:{opacity:0,y:150},animate:function(e){return{opacity:1,y:0,transition:{duration:.8,type:"spring",bounce:.2,delay:.2*e}}}};return e.createElement("div",{className:p("video-card-component",n&&"theme-".concat(n)),id:"video-card-component"},e.createElement("div",{className:"video-card-component__content"},a&&e.createElement("p",{className:"video-card-component__tag"},a),e.createElement("h2",{className:"video-card-component__title"},r),c&&l&&e.createElement("div",{className:"video-card-component__link"},e.createElement(y,{theme:n,url:c,title:l,inverse:!0,externalLink:o})),e.createElement("div",{className:"video-card-component__carousel"},e.createElement(nt,{theme:n,type:"video",inverse:!0,cards:s,cardTitleTag:"h3"})),e.createElement("ul",{className:p("video-card-component__cards-desktop",(!c||!l)&&"video-card-component__cards-desktop--no-link")},s.map(function(t,a){return e.createElement(i.li,{key:a,variants:m,initial:"initial",whileInView:"animate",viewport:{once:!0,amount:.2},custom:a},a<=1?e.createElement("div",{className:"video-card-component__lines video-card-component__lines--".concat(a)},1===a&&e.createElement("svg",{width:"406",height:"128",viewBox:"0 0 406 128",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e.createElement("path",{d:"M1 1L123 29L210 127.5",stroke:"black"}),e.createElement("path",{d:"M13 112L123 29L405 51",stroke:"black"}))):"",e.createElement(Ie,{theme:n,image:{src:{default:t.image.src.default,medium:t.image.src.medium,small:t.image.src.small},altText:""},title:t.title,youtubeId:t.youtubeId,buttonLabel:t.buttonLabel,titleTag:"h3"}))}))))}function cc(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.imageSrc,c=t.onClick;return e.createElement("div",{className:p("video-placeholder",a&&"theme-".concat(a))},r&&e.createElement(H,{src:r,altText:""}),e.createElement("button",{className:"video-placeholder__button",onClick:c},e.createElement("div",{className:"video-placeholder__svg-wrapper"},e.createElement("svg",{width:"11",height:"14",viewBox:"0 0 11 14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e.createElement("path",{d:"M0 0V14L11 7L0 0Z",fill:"currentColor"}))),e.createElement("span",{className:"sr-only"},"Watch the video")))}function lc(t){var a=t.theme,r=void 0===a?"uobmain":a,c=t.imageSrc,l=t.videoUrl,i=t.videoId,o=n(!1),s=o[0],m=o[1];return e.createElement("div",{className:p("video-with-placeholder",r&&"theme-".concat(r))},s?e.createElement(Ze,{url:l,id:i,autoPlay:!0,theme:r}):e.createElement(cc,{imageSrc:c,onClick:function(){return m(!0)},theme:r}))}function ic(t){var a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=void 0!==c&&c,i=t.imageSrc,o=t.videoUrl,s=t.videoId,m=t.heading,d=t.audioDescribedVideoId,h=t.audioDescribedVideoUrl,v=t.transcript,f=t.fullWidth,g=void 0!==f&&f,E=t.videoCaption,_=t.videoCredit,b=n(!1),w=b[0],C=b[1];return e.createElement("div",{className:p("video-embed",g&&"video-embed--full-width",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"))},m&&e.createElement(T,u({},m,{theme:r,inverse:l})),e.createElement("div",{className:"video-embed__grid"},e.createElement("div",{className:"video-embed__content-wrapper"},e.createElement(lc,{theme:r,imageSrc:i,videoUrl:w?o:h,videoId:w?d:s}),(E||_)&&e.createElement("div",{className:"video-embed__caption-wrapper"},E&&e.createElement("p",{className:"video-embed__caption"},E),_&&e.createElement("p",{className:"video-embed__credit"},_)),(d||h)&&(w?e.createElement("button",{className:"video-embed__audio-described-button",onClick:function(){return C(!1)}},"Non-audio described version"):e.createElement("button",{className:"video-embed__audio-described-button",onClick:function(){return C(!0)}},"Audio described version")),v&&e.createElement("div",{className:"video-embed__transcript"},e.createElement(N,{titleTag:"h3",theme:r,title:"Transcript",text:v,inverse:l})))))}function oc(t){var n,a=t.theme,r=void 0===a?"uobmain":a,c=t.inverse,l=void 0===c||c,i=t.fullWidth,o=void 0!==i&&i,s=t.heading,m=t.description,d=t.cards,h=t.singleLink,v=t.titleTag,f=void 0===v?"h2":v,g=t.cardTitleTag,E=void 0===g?"h3":g,_=Te("768px"),b=_&&d.length>1||!_&&d.length>2,w=p(((n={})["research-story-carousel__grid"]=!0,n["research-story-carousel__grid--single"]=1===d.length,n["research-story-carousel__grid--two-cards"]=2===d.length,n["research-story-carousel__grid--three-plus-cards"]=d.length>3,n));return e.createElement("section",{className:p("research-story-carousel",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"),o&&"research-story-carousel--full-width")},e.createElement("div",{className:"research-story-carousel__container"},(s||m||h)&&e.createElement(T,{theme:r,inverse:!0,htmlTag:f,title:s,description:m,linkProps:h,fullWidth:!0}),e.createElement("div",{className:"research-story-carousel__cards"},!b&&e.createElement("ul",{className:w},d.map(function(t,n){return e.createElement("li",{key:n},e.createElement(Ye,u({},t)))})),b&&e.createElement(nt,{theme:r,inverse:l,type:"research-story",cards:d,cardTitleTag:E}))))}function sc(t){var i=t.text,o=t.theme,s=void 0===o?"uobmain":o,m=t.inverse,d=t.fullWidth,u=void 0!==d&&d,h=t.removeBottomPadding,v=void 0!==h&&h,f=t.tableCategory,g=void 0===f?tc.NotSpecified:f,E=r(null),_=n(!1),b=_[0],w=_[1],C=n(!0),y=C[0],N=C[1],k=n(!1),x=k[0],L=k[1],T=l(),M=function(){var e=E.current;e&&(w(e.scrollLeft>0),N(e.scrollLeft<e.scrollWidth-e.clientWidth))},H=c(function(){var e=E.current;if(e){var t=e.scrollWidth>e.clientWidth;L(t),M()}},[]),S=function(e){var t=E.current;if(t){var n="left"===e?t.scrollLeft-200:t.scrollLeft+200;t.scrollTo({left:n,behavior:"smooth"})}};return a(function(){H();var e=E.current;e&&e.addEventListener("scroll",M);var t=function(){return H()};return window.addEventListener("resize",t),function(){e&&e.removeEventListener("scroll",M),window.removeEventListener("resize",t)}},[H]),e.createElement("div",{className:p("scrollable-table",u&&"scrollable-table--full-width",s&&"theme-".concat(s),m&&"theme-".concat(s,"--inverse"),v&&"scrollable-table--no-bottom-padding")},e.createElement("div",{className:"scrollable-table__container"},e.createElement("span",null,x&&e.createElement("div",{className:"scrollable-table__scroll-button-wrapper"},e.createElement("p",null,"Scroll buttons"),e.createElement(qe,{key:"iconButtonLeft",theme:s,icon:"arrow-left",onClick:function(){return S("left")},title:"Scroll left",ariaControls:T,disabled:!b,inverse:m}),e.createElement(qe,{key:"iconButtonRight",theme:s,icon:"arrow-right",onClick:function(){return S("right")},title:"Scroll right",ariaControls:T,disabled:!y,inverse:m})),e.createElement("div",{className:p("scrollable-table__table-wrapper","scrollable-table__".concat(g),m&&"scrollable-table__".concat(g,"--inverse")),ref:E,id:T,tabIndex:0},e.createElement("span",{dangerouslySetInnerHTML:{__html:i}})))))}function mc(t){var a=t.theme,r=t.heading,c=t.inverse,l=t.description,i=t.buttonLabel,o=t.buttonModifier,s=t.modalChildren,m=t.htmlTag,d=void 0===m?"h3":m,u=n(!1),h=u[0],v=u[1],f=function(){v(!1),document.body.classList.remove("lock-scroll")};return e.createElement("div",{className:p("modal-cta",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},e.createElement(k,{htmlTag:d,classNames:"modal-cta__heading"},r),l&&e.createElement("p",{className:"modal-cta__description"},l),e.createElement("div",{className:p("modal-cta__button",o&&"theme-".concat(a,"--buttonModifier"))},e.createElement(C,{inverse:!c,label:i,onClick:function(){h?f():(v(!0),document.body.classList.add("lock-scroll"))},theme:a,buttonModifier:o})),h&&e.createElement(Fe,{centred:!0,theme:a,closeModal:f,isOpen:h},e.createElement(st,{className:"modal-cta__embed-wrapper"},s)))}function dc(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0===r||r,l=t.cards,i=Array.isArray(l)?l:[l];return e.createElement("div",{className:p("module-card-group",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse"))},e.createElement("div",{className:"module-card-group__container"},e.createElement("div",{className:"module-card-group__grid"},i.map(function(t,n){return e.createElement(w,u({key:n},t,{theme:a}))}))))}function uc(t){var n=t.theme,a=t.embedChildren,r=t.googleMapLink,c=t.address,l=t.services,i=t.link,o=t.titleTag,s=void 0===o?"h2":o;return e.createElement("section",{className:p("location-section",n&&"theme-".concat(n),(!l||l.length<1)&&"location-section--no-services")},e.createElement("div",{className:"location-section__container"},e.createElement(k,{htmlTag:s,classNames:p("location-section__title","h3"===s&&"location-section__title--h3")},"Location"),e.createElement("div",{className:"location-section__grid-wrapper"},e.createElement("div",{className:"location-section__embed"},e.createElement(st,null,a)),e.createElement("div",{className:"location-section__address-wrapper"},e.createElement("div",{className:"location-section__address"},e.createElement(It,{theme:n,title:"Address",iconType:"slim-location",value:c.map(function(e){return"<span>".concat(e,"</span>")}).join("")})),i&&(null==i?void 0:i.title)&&(null==i?void 0:i.url)&&e.createElement("div",{className:"location-section__link-wrapper"},e.createElement(y,u({},i,{inverse:!0}))),r?e.createElement("div",{className:"location-section__button"},e.createElement(C,{label:"View on Google Maps",theme:n,url:r})):null),(null==l?void 0:l.length)?e.createElement("div",{className:"location-section__services"},null==l?void 0:l.map(function(t,a){return e.createElement(It,u({},t,{theme:n,key:a}))})):null)))}function hc(t){var n=t.theme,a=t.studentName,r=t.studentStatus,c=t.courseName,l=t.courseDetails,i=t.studyLevel,o=t.titleTag,s=void 0===o?"h2":o,m=t.homeCountry,d=t.studentIntro,h=t.image,v=t.inverse;return e.createElement("div",{className:p("heroProfile",n&&"theme-".concat(n),v&&"theme-".concat(n,"--inverse")),id:"hero"},e.createElement("div",{className:"heroProfile__container"},e.createElement("div",{className:"heroProfile__details"},a&&e.createElement(s,{className:"heroProfile__title"},a),r&&e.createElement("p",{className:"heroProfile__status"},r),c&&e.createElement("p",{className:"heroProfile__courseName"},c),(i||m||l&&l.length>0)&&e.createElement("ul",{className:"heroProfile__studentDetails"},l&&l.length>0&&e.createElement("li",null,e.createElement("div",{className:"heroProfile__iconContainer"},e.createElement(ze,{icon:"mortar-board",theme:n,backgroundColor:"pale"}),e.createElement("div",{className:"heroProfile__courseIconText"},e.createElement("span",null,1===l.length?"Course":"Courses",":"),e.createElement("div",{className:"heroProfile__courseDetails"},l.map(function(t,a){return e.createElement(x,{theme:n,key:a,text:t,inverse:v})}))))),i&&e.createElement("li",null,e.createElement("div",{className:"heroProfile__iconContainer"},e.createElement(ze,{icon:"scroll",theme:n,backgroundColor:"pale"}),e.createElement("div",{className:"heroProfile__iconText"},e.createElement("span",null,"Study level:"),e.createElement("span",null,i)))),m&&e.createElement("li",null,e.createElement("div",{className:"heroProfile__iconContainer"},e.createElement(ze,{icon:"flag",theme:n,backgroundColor:"pale"}),e.createElement("div",{className:"heroProfile__iconText"},e.createElement("span",null,"Home country:"),e.createElement("span",null,m))))),d&&e.createElement(x,{theme:n,text:d,inverse:v})),e.createElement("div",{className:"heroProfile__image-wrapper"},h&&e.createElement(H,u({},h,{altText:null==h?void 0:h.alt,fetchPriority:h.fetchPriority})))))}function vc(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.firstColumn,c=t.secondColumn;return e.createElement("div",{className:p("two-column-wrapper",a&&"theme-".concat(a))},e.createElement("div",{className:"two-column-wrapper__grid-container"},e.createElement("div",{className:p("two-column-wrapper__first-column",!c&&"two-column-wrapper__first-column-centred")},r),c&&e.createElement("div",{className:"two-column-wrapper__second-column"},c)))}function pc(t){var n,a,r=t.theme,c=void 0===r?"uobmain":r,l=t.inverse,i=t.logos,o=null!==(a=null==i?void 0:i.length)&&void 0!==a?a:0,s=i&&i.length%2!=0;return e.createElement("div",{className:p("logo-wall",c&&"theme-".concat(c),l&&"theme-".concat(c,"--inverse"))},e.createElement("div",null,e.createElement("ul",{className:p("logo-wall__container",s&&"logo-wall__container--odd"),style:(n={},n["--logo-wall-cols"]=String(o),n)},i&&i.map(function(t,n){var a;return e.createElement("li",{key:"li-".concat(n)},e.createElement(Ge,u({key:"".concat((null===(a=t.image)||void 0===a?void 0:a.title)||"imageTitle","-").concat(n),theme:c,inverse:l},t)))}))))}function fc(t){var n=t.theme,a=t.inverse,r=t.image,c=t.imageCaption,l=t.imageCredit,i=t.contentPosition,o=void 0===i?"left":i,s=t.children,m=Te("768px"),d=c||l;return r&&r.src&&s?e.createElement("section",{className:p("text-over-media",n&&"theme-".concat(n),a&&"theme-".concat(n,"--inverse"))},e.createElement("div",{className:p("text-over-media__container","right"===o&&"text-over-media__mobile--right")},m&&e.createElement("div",{className:"text-over-media__mobile-block"},e.createElement("div",{className:"text-over-media__image-wrapper"},e.createElement(H,u({},r))),d&&e.createElement("figcaption",{className:"text-over-media__figcaption"},c&&e.createElement("p",{className:"text-over-media__caption"},c),l&&e.createElement("p",{className:"text-over-media__credit"},l))),!m&&e.createElement(e.Fragment,null,e.createElement("figure",{className:"text-over-media__image-container"},e.createElement("div",{className:"text-over-media__height-wrapper"},e.createElement("div",{className:"text-over-media__image-wrapper"},e.createElement(H,u({},r)))),e.createElement("div",{className:"text-over-media__parallax-container"},e.createElement(St,{offset:100},e.createElement("div",{className:"text-over-media__parallax-content"},e.createElement("div",{className:"text-over-media__image-wrapper"},e.createElement(H,u({},r))))))),d&&e.createElement("figcaption",{className:"text-over-media__figcaption"},c&&e.createElement("p",{className:"text-over-media__caption"},c),l&&e.createElement("p",{className:"text-over-media__credit"},l))),e.createElement("div",{className:p("text-over-media__media-container","left"===o&&"text-over-media__media-container--left","right"===o&&"text-over-media__media-container--right")},s))):null}function gc(t){var n=t.theme,r=void 0===n?"uobmain":n,c=t.inverse,l=void 0!==c&&c,i=t.curatorFeedId,o=t.curatorScriptSrc,s=t.heading;a(function(){var e=document.createElement("script");return e.src=o,e.async=!0,e.id="curator-script",document.body.appendChild(e),function(){var e=document.getElementById("curator-script");e&&e.remove();var t=window;t.Curator&&(t.Curator=void 0);var n=document.getElementById(i);n&&(n.innerHTML="")}},[o,i]);var m=p("social-feed",r&&"theme-".concat(r),l&&"theme-".concat(r,"--inverse"));return e.createElement("section",{className:m},s&&e.createElement(T,{title:s.title,description:s.description,inverse:l,theme:"uobmain",linkProps:s.linkProps}),e.createElement("div",{className:"social-feed__container"},e.createElement("div",{id:i,className:"social-feed__embed","data-testid":"curator-feed-container"})))}function Ec(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.url,i=t.title,o=t.externalLink,s=void 0!==o&&o,m=t.mobileTitle;return e.createElement("a",{className:p("back-link",a&&"theme-".concat(a),c&&"theme-".concat(a,"--inverse")),href:l,target:s?"_blank":"_self",rel:s?"noopener noreferrer":""},m?e.createElement(e.Fragment,null,e.createElement("span",{className:"back-link__title back-link__title--mobile"},m),e.createElement("span",{className:"back-link__title back-link__title--desktop"},i)):e.createElement("span",{className:"back-link__title"},i))}d(),d(),d(),d(),d(),d(),function(e){e.NotSpecified="NotSpecified",e.ColumnAndRowHeadings="ColumnAndRowHeadings",e.ColumnHeadingsOnly="ColumnHeadingsOnly"}(tc||(tc={})),d(),d(),d(),d(),d(),d(),d(),d(),d();var _c=function(t){var n=t.theme,a=void 0===n?"uobmain":n,r=t.inverse,c=void 0!==r&&r,l=t.primaryLinks,o=t.secondaryLinks,s=t.menuCards,d=t.logoTitleTagH1,u=void 0===d||d,h=t.backLinkUrl,v=t.backLinkLabelMobile,f=t.backLinkLabel,g=t.hideSubMenu,E=void 0===g||g,_=t.hideBackLink,b=void 0===_||_,w=ka({primaryLinks:l,secondaryLinks:o}),C=w.openMenuButtonRef,y=w.headerRef,N=w.isOpen,k=w.menuLevel,x=w.searchIsOpen,L=w.mainMenuSelectedLink,T=w.firstLevelSelectedLink,M=w.openMenu,H=w.closeMenu,S=w.onClickMainMenuNavLink,V=w.onClickLevelOneNavLink,P=w.goBackToMainMenu,O=w.goBackToLevelOne;return e.createElement("header",{className:p("header",a&&"theme-".concat(a),!N&&"header--is-closed",c&&"theme-".concat(a,"--inverse")),id:"landing-header",ref:y},e.createElement("div",{className:"header__closed"},e.createElement("div",{className:"header__top-container"},e.createElement("div",{className:"header__logo-wrapper"},e.createElement("div",{className:"header__logo-wrapper"},u?e.createElement("h1",{className:"header__logo-heading"},e.createElement(qt,{activeCampus:"uk",imageMode:c?"dark":"light",classNames:"header__logo-link",imageAltText:"University of Birmingham",loadingAttr:"eager"})):e.createElement(qt,{activeCampus:"uk",imageMode:c?"dark":"light",classNames:"header__logo-link",loadingAttr:"eager"},e.createElement("span",{className:"sr-only"},"University of Birmingham")))),e.createElement("div",{className:"header__right-wrapper"},e.createElement("div",{className:"header__menu-button"},!b&&e.createElement(Ec,{theme:"uobmain",url:h,title:f,mobileTitle:v,externalLink:!1}),!E&&e.createElement(qe,{theme:"uobmain",inverse:c,icon:"plus",onClick:M,title:"Open menu",ariaControls:"landing-header",ref:C,ariaExpanded:N}))))),e.createElement(m,null,N&&e.createElement(va,null,e.createElement(i.div,{className:"header__open",initial:{x:"100%"},animate:{x:"0"},exit:{x:"100%"},transition:{type:"tween"},key:"header__open"},e.createElement("div",{className:"header__top-container"},e.createElement("div",{className:"header__logo-wrapper"},e.createElement(qt,{activeCampus:"uk",imageMode:c?"light":"dark",classNames:"header__logo-link"},e.createElement("h1",{className:"sr-only"},"University of Birmingham"))),e.createElement("div",{className:"header__right-wrapper"},e.createElement("div",{className:"header__menu-button"},e.createElement("span",null,"Menu"),e.createElement(qe,{theme:"uobmain",inverse:!c,icon:"cross",onClick:H,title:"Close menu",ariaControls:"landing-header"})))),0===k&&e.createElement(Ea,{primaryLinks:l,secondaryLinks:o,menuCards:s,onClickNavLink:S,theme:a,inverse:c}),1===k&&L&&e.createElement(ba,{headingLink:L,onClickNavLink:V,theme:a,inverse:c,onClickGoBack:P,backLinkLabel:"Back to menu"}),2===k&&L&&T&&!x&&e.createElement(ba,{headingLink:T,onClickNavLink:function(){},theme:a,inverse:c,onClickGoBack:O,backLinkLabel:"Back to ".concat(L.label)})))))};export{M as Accordion,S as AcreditationPromotion,P as AlertBanner,O as AnchorTarget,q as Breadcrumbs,ot as CTAComponent,rt as CardImageAndText,at as CardProfile,et as CardPromoProfile,Re as CardPromoSignpost,Ue as CardStaff,nt as Carousel,ct as CentreWrapper,lt as ClearingBanner,it as CourseDeliveryPills,st as EmbedWrapper,dt as FactBoxes,ut as FeaturedContent,Ht as FeaturedSignpost,Vt as FeaturedVideo,Pt as FiveArticlesGrid,Bt as Footer,Ut as GeneralSearchFilter,$t as GenericDetailSection,xa as Header,_c as HeaderLanding,T as Heading,Pa as Hero,qa as HeroArticle,cr as HeroCarousel,$a as HeroCourses,hc as HeroProfile,lr as HeroVideo,ir as ImageBlock,or as ImageCarousel,mr as InPageNavigation,dr as IntroText,hr as LeadNewsArticles,kr as ListTable,vr as ListingFilterWrapper,yr as ListingResults,Nr as ListingResultsCount,uc as LocationSection,Aa as LocationSelector,pc as LogoWall,xr as MainWrapper,mc as ModalCTA,dc as ModuleCardGroup,Lr as NewsArticlesPromoBlock,Mr as Pagination,Hr as PromoBlock,Sr as PromoBlockGrid,Vr as QuoteBlock,Pr as RelatedCourses,oc as ResearchStoryCarousel,E as RichText,Or as ScholarshipCarousel,sc as ScrollableTable,Va as SearchCourses,qr as SidebarWrapper,Br as SignPost,Fr as SingleButton,Dr as SkipToContent,gc as SocialFeed,Zr as StaffListingCarousel,ac as StandardListingFilter,jr as TabsBlock,fc as TextOverMedia,zr as TextWithBackground,Wr as TopicSelector,vc as TwoColumnWrapper,rc as VideoCardComponent,ic as VideoEmbed};