"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[617,795],{94984:(O,y,t)=>{t.d(y,{A:()=>k});var e=t(48322),l=t(67115);const $=l.Ay.div` ${()=>(0,l.AH)``} `;var g=t(33689);const k=({title:x,items:a,className:b})=>!a||a.length<=0?null:e.createElement($,{className:`accordion ${b||""}`},x&&e.createElement("h2",{className:"accordion__title"},x),a.map((p,n)=>e.createElement(g.A,{key:n,title:p.title,canvas:p.canvas,canvasData:p.canvasData},p.children)))},33689:(O,y,t)=>{t.d(y,{A:()=>x});var e=t(48322),l=t(67115);const $=l.Ay.div` ${({theme:{colors:a,spacing:b}})=>(0,l.AH)` width: 100%; &.is-closed { .accordion-item__button { border-bottom: 1px solid ${a.light.brand.lightGold}; background-color: white; } } .accordion-item__button::before, .accordion-item__button::after { content: ''; position: absolute; right: 10px; top: 50%; width: 16px; height: 2px; background-color: currentColor; transition: transform 0.3s ease-in-out; } .accordion-item__button::before { transform: rotate(0); } .accordion-item__button::after { transform: rotate(90deg); } &.is-open .accordion-item__button::before { transform: rotate(180deg); } &.is-open .accordion-item__button::after { transform: rotate(0); } /* &.is-open .accordion-item__button { background-size: 100% 100%; } */ .accordion-item__button { position: relative; padding: ${b.xs} ${b.xxxs}; margin: 0; border: none; border-bottom: 1px transparent; width: 100%; text-align: left; background-color: white; cursor: pointer; background: linear-gradient(to right, #f6f6f6, #f6f6f6) no-repeat; background-size: 0 100%; transition: background-size 0.5s ease-in-out; &:hover { background-size: 100% 100%; } &:hover, &:focus-visible { background-size: 100% 100%; } } .accordion-item__label { display: flex; flex-direction: row; justify-content: space-between; align-items: center; .label { padding-right: ${b.s}; margin: 0; color: ${a.light.brand.darkBlue}; flex-grow: 1; } .accordion-item__icon { color: ${a.light.brand.darkBlue}; min-height: 24px; min-width: 24px; } } .accordion-item__content { max-height: 0; overflow: hidden; transition: max-height 1s ease-out, opacity 1s ease-out; opacity: 0; border-bottom: 1px solid ${a.light.brand.lightGold}; padding: ${b.xs} ${b.xxxs}; &.is-open { max-height: 1000px; opacity: 1; transition: max-height 1s ease-in, opacity 1s ease-in; } } `} `;var g=t(88892),s=t(98401);const x=({title:a,children:b,className:p,initialState:n=!1,canvas:u=!1,canvasData:_})=>{const[c,r]=(0,e.useState)(n),E=m=>{m.stopPropagation(),r(!c)};return e.createElement($,{className:`accordion-item ${p||""} ${c?"is-open":"is-closed"}`},e.createElement("button",{className:"accordion-item__button",onClick:m=>E(m),"aria-expanded":!!c,"aria-controls":a?.replace(/\s+/g,"-").toLowerCase()},e.createElement("span",{className:"accordion-item__label"},e.createElement("p",{className:"h6 label"},a))),c?e.createElement("div",{className:`accordion-item__content ${c?"is-open":"is-closed"}`,"aria-labelledby":a,id:a?.replace(/\s+/g,"-").toLowerCase()},u&&_?e.createElement(g.default,{className:"content",data:_}):null,b&&e.createElement(s.VK,{className:"content",text:b})):null)}},88892:(O,y,t)=>{t.r(y),t.d(y,{default:()=>M});var e=t(48322),l=t(76550),v=t(67820);const g=d=>{const{link:w,newTab:L}=d.block.properties||{},P={path:w?.sys?.uri,openInNewWindow:L};return e.createElement(v.A,{...P},e.createElement(l.N_.Children,{block:d.block}))};var s=t(67115),k=t(82472),x=t(85703);const b=s.Ay.div` ${()=>(0,s.AH)` display: flex; flex-direction: column; * { margin-block-start: 1em; &:first-child { margin-block-start: 0; } } .testimonial { margin-block: 2.5em; } .accordion { margin-block: 2em; & > .accordion-item { margin-block-start: 0; &:last-child { margin-block-start: 0; } } .accordion-item { .accordion-item__button { margin-block: 0; .accordion-item__label { .accordion-item__icon { margin-block-start: 0; } } } } } .accordion-item { margin-block-start: 0; } hr { width: 100%; } ul, ol { font-weight: 600; color: ${k.T.light.brand.darkBlue}; li::marker { color: ${k.T.light.brand.gold}; } } a { text-decoration: underline; } ${x.Ju}; .canvas-button { &:hover, &:focus-visible { transform: scale(1); } } img { align-self: center; max-height: 600px; } `} `;var p=t(94984),n=t(93149);const u=d=>{if(!d.block.value)return null;const w=(0,n.e)(d.block.value);return w?e.createElement(p.A,{...w}):null};var _=t(83692);const c=d=>({title:d.title,children:d.content});var r=t(33689);const E=d=>d.block.value?e.createElement(r.A,{...(0,_.mapJson)(d.block.value,c)}):null,m=d=>({label:d.label,buttonTheme:d.buttonTheme,link:d.url});var f=t(69352);const o=d=>d.block.value?e.createElement(f.A,{...(0,_.mapJson)(d.block.value,m),className:"canvas-button"}):null;var h=t(49240),i=t(60554);const A=d=>d.block.value?e.createElement(h.A,{...(0,_.mapJson)(d.block.value,i.T)}):null,B=d=>{const w={data:d?.block?.value?.snippet?.content};return!w.data||w.data.length<=0?null:e.createElement(M,{...w})},D={},N={accordion:u,accordionItem:E,button:o,snippet:B,videoComponent:A},M=({data:d,className:w})=>d?e.createElement(b,{className:w||""},e.createElement(l.Tz,{blocks:{_link:g},components:N},e.createElement(l.A4,{data:d}))):null},67838:(O,y,t)=>{t.d(y,{A:()=>_});var e=t(48322),l=t(67115),v=t(85703);const g=l.Ay.div` ${({theme:{mq:c,spacing:r},cardRowTheme:E="gold",layout:m})=>{const f=(0,v.DF)(E);return(0,l.AH)` position: relative; &.container { padding-bottom: 28px; @media ${c.min.px.tablet} { padding-bottom: 64px; } } .card-row__wrapper { display: flex; flex-flow: column nowrap; align-items: stretch; position: relative; gap: var(--space-m-l, ${r.s}); &.container { ::before { ${(0,v.uY)(f,"cards")} } } @media ${c.min.px.tablet} { flex-flow: row wrap; } } .card-row__card { margin-inline: auto; width: 100%; flex: 1; @media ${c.min.px.tablet} { margin-inline: 0; flex: ${m==="container"?"1 0 calc(33% - var(--grid-gutter))":"1 0 calc(50% - var(--grid-gutter))"}; } @media ${c.min.px.laptop} { flex: ${m==="container"?"0 0 100%":"1 0 calc(50% - var(--grid-gutter))"}; } @media screen and (min-width: 1200px) { flex: ${m==="container"?"1":"1 0 calc(25% - var(--grid-gutter))"}; } } &.full-width { background-color: ${f}; } `}} `,k=l.Ay.div` ${({theme:{colors:c,mq:r},cardTheme:E="blue",rounded:m,hideDescription:f})=>{const o=(0,v.DF)(E);return(0,l.AH)` position: relative; display: flex; flex-flow: column nowrap; transition: all 1s ease-in-out; cursor: pointer; overflow: hidden; &:hover, &:focus-within { .card__image { transform: scale(1.05); } } .card__media { order: -1; height: 180px; min-height: 180px; width: 100%; overflow: hidden; } .card__image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease-in-out; } .card__content { display: flex; flex-flow: column nowrap; padding: var(--space-m-l) 1.5rem var(--space-3xl-4xl) var(--space-s-m); background-color: ${o}; height: 100%; } .card__category { order: -1; margin-block-end: 0.5em; font-weight: 700; color: ${c.light.neutral.grey80}; @media ${r.min.px.largeMobile} { margin-block-end: 1em; } } .card__title { margin-block-end: 0.5em; font-weight: 700; @media ${r.min.px.largeMobile} { font-weight: 600; } a { color: ${c.light.brand.darkBlue}; text-decoration: none; &::after { ${v.A4}; z-index: 1; } } } ${f&&(0,l.AH)` .card__description { display: none; } .card__content { padding-block-end: ${m==="start"?"2.5rem":"1.5rem"}; } `} ${m==="start"&&(0,l.AH)` .card__image { border-top-right-radius: 50px; @media ${r.min.px.tablet} { border-radius: 0; } } .card__content { @media ${r.min.px.tablet} { border-bottom-left-radius: 50px; } } `} ${m==="end"&&(0,l.AH)` .card__content { border-bottom-left-radius: 50px; @media ${r.min.px.tablet} { border-radius: 0; } } .card__image { @media ${r.min.px.tablet} { border-top-right-radius: 50px; } } `} `}} `;var x=t(42501),a=t(67820);const p=({title:c,image:r,url:E,description:m,category:f,cardTheme:o="blue",rounded:h="none",hideDescription:i=!1,className:A})=>c?e.createElement(k,{className:`card ${A||""}`,cardTheme:o,rounded:h,hideDescription:i},e.createElement("div",{className:"card__content"},e.createElement("h2",{className:"[ h4 ] card__title"},e.createElement(a.A,{path:E},c)),f&&e.createElement("p",{className:"card__category"},f),m&&e.createElement("p",{className:"card__description"},m)),r&&r.src&&e.createElement("div",{className:"card__media"},e.createElement(x.A,{src:r.src,alt:r.alt,width:328,height:180,className:"card__image",id:"card-image"}))):null;var n=t(93216);const _=({cards:c,cardRowTheme:r,layout:E="full-width",className:m,related:f=!1})=>c?e.createElement(g,{cardRowTheme:r,layout:E,className:`card-row ${E} ${m||""}`},e.createElement("div",{className:`card-row__wrapper ${E}`},c.map((o,h,{length:i})=>{let A="none";return i-1===h?A="end":h===0&&(A="start"),f?e.createElement(n.ListingCard,{...o,key:h,className:"card-row__card",borderColor:"gold"}):e.createElement(p,{key:h,...o,rounded:A,className:"card-row__card"})}))):null},92040:(O,y,t)=>{t.d(y,{A:()=>f});var e=t(48322),l=t(67115),v=t(10394);const g=l.Ay.div` ${({theme:{colors:o,mq:h,spacing:i}})=>(0,l.AH)` padding-block: var(--space-m-xl, ${i.xl}); .u-container { display: flex; flex-direction: column-reverse; justify-content: space-between; gap: ${(0,v.A)(36)}; @media ${h.min.px.desktop} { flex-direction: row; } } .course-hero__content-container { display: flex; flex-direction: column; justify-content: space-evenly; height: inherit; gap: ${i.xs}; flex: 1; } .course-hero__text-container { order: 2; } .course-hero__title, .course-hero__award { color: ${o.light.brand.darkBlue}; } .course-hero__title { font-weight: 600; text-wrap: balance; &.course-hero__title--long { font-size: var(--step-4); font-weight: 700; } @media ${h.min.px.desktop} { font-size: 3.75rem; line-height: normal; } } .course-hero__description { padding-top: ${i.xs}; } .course-hero__tag-container { display: flex; gap: ${i.xxs}; order: 1; } .course-hero__approval-tag { &:hover { cursor: pointer; background-color: ${o.light.brand.darkBlue}; } } .course-hero__subject-to-approval-link { color: white; text-decoration: none; } .course-hero__button-container { display: flex; gap: ${i.xxs}; order: 3; /* margin-block-start: ${i.xs}; */ align-items: stretch; } .course-hero__button { display: flex; justify-content: center; align-items: center; width: 100%; min-height: 100%; @media ${h.min.px.tablet} { width: 50%; } } .course-hero__image-container { flex: 1; img { width: 100%; height: auto; object-fit: cover; } } .course-hero__options { order: 2; } .course-hero__select { --select-border: ${o.light.neutral.grey80}; --select-focus: ${o.light.brand.burgundy}; --select-arrow: var(--select-border); position: relative; display: grid; grid-template-areas: 'select'; align-items: center; width: 100%; border: 1px solid var(--select-border); border-radius: 4px; padding: 1em; cursor: pointer; background-color: #fff; background-image: linear-gradient(to top, #f9f9f9, #fff 33%); &::after { content: ''; grid-area: select; justify-self: end; width: 0.8em; height: 0.5em; background-color: var(--select-border); clip-path: polygon(100% 0%, 0 0%, 50% 100%); } select { // Reset default styles grid-area: select; appearance: none; background-color: transparent; border: none; padding: 0 1em 0 0; margin: 0; width: 100%; font-family: inherit; font-size: inherit; cursor: inherit; line-height: inherit; outline: none; } select:focus + .focus { position: absolute; top: -1px; left: -1px; right: -1px; bottom: -1px; border: 4px solid var(--select-focus); border-radius: inherit; } } `} `;var s=t(85703);const x=l.Ay.p` ${({theme:{colors:o,spacing:h},tagTheme:i="lightGrey"})=>{const A=(0,s.DF)(i),S=i==="lightGrey"?o.light.brand.darkBlue:o.light.neutral.white;return(0,l.AH)` inline-size: fit-content; padding: ${h.xxxs}; background-color: ${A}; color: ${S}; font-size: var(--step--1, 0.875rem); `}} `,b=({label:o,tagTheme:h,className:i})=>o?e.createElement(x,{className:`tag ${i||""}`,tagTheme:h},o):null;var p=t(69352),n=t(42501),u=t(43266),_=t(39289),c=t(67820),r=t(92301);const E=o=>!!(o&&o.length>40),f=({tags:o,title:h,awards:i,description:A,applicationCTA:S,secondaryCTA:B,image:D,subjectToApprovalTag:N,id:C,setId:M})=>{const d=(0,u.d4)(_.Hy),w=(0,u.d4)(r.Wp),L=P=>{M(P)};return h?e.createElement(g,null,e.createElement("div",{className:"u-container"},e.createElement("div",{className:"course-hero__content-container"},e.createElement("div",{className:"course-hero__text-container"},e.createElement("h1",{className:`course-hero__title ${E(h)?"course-hero__title--long":""}`},h),e.createElement("p",{className:"h3 course-hero__award"},i.map(P=>P)),A&&e.createElement("p",{className:"h5 course-hero__description"},A)),e.createElement("div",{className:"course-hero__tag-container"},o&&o.length>0&&e.createElement(e.Fragment,null,o.map((P,R)=>e.createElement(b,{key:R,...P,tagTheme:"lightGrey"}))),N?.subjectToApproval&&N?.subjectToApprovalLabel&&N?.subjectToApprovalUrl&&e.createElement(b,{label:e.createElement(c.A,{className:"course-hero__subject-to-approval-link",path:N.subjectToApprovalUrl},N.subjectToApprovalLabel),className:"course-hero__approval-tag",tagTheme:"blue"})),e.createElement("div",{className:"course-hero__button-container"},S&&e.createElement(p.A,{openInNewWindow:!0,className:"course-hero__button",...S}),B&&e.createElement(p.A,{className:"course-hero__button",...B})),w&&w?.content?.options?.length>1?e.createElement("div",{className:"course-hero__options"},e.createElement("label",{htmlFor:"course-options",className:"sr-only"},"Select course option"),e.createElement("div",{className:"course-hero__select"},e.createElement("select",{name:"course-options",id:"course-options",onChange:P=>L(P.target.value),value:C},w?.content?.options?.map(P=>e.createElement("option",{key:P.id,value:P.id},P.title,", ",P.intakeData.studyMode.title))),e.createElement("span",{className:"focus"}))):null),e.createElement("div",{className:"course-hero__image-container"},D||d?e.createElement(n.A,{id:"course-hero__image",src:D.src?D.src:d?.src?d.src:"",alt:D.alt?D.alt:d?.alt?d.alt:"",height:412,width:540}):null))):null}},60118:(O,y,t)=>{t.d(y,{A:()=>g});var e=t(48322),l=t(67115);const v=({error:s,entryTitle:k,entryId:x})=>e.createElement($,null,e.createElement("div",{className:"error-panel"},e.createElement("h1",null,"Entry Validation Error",k&&x?`: ${k} (${x})`:null),s&&s?.details?.length>0&&e.createElement("p",null,"Please resolve the following ",s.details.length," issues:"),s?.details?.map((a,b)=>e.createElement("div",{className:"error",key:b},e.createElement("code",null,e.createElement("span",null,e.createElement("strong",null,"Code")," ",a.code),"expected"in a&&e.createElement("span",null,e.createElement("strong",null,"Expected")," ",a?.expected),"received"in a&&e.createElement("span",null,e.createElement("strong",null,"Received")," ",a?.received),a.path&&a.path?.length>0&&a.path.map((p,n)=>e.createElement("span",{key:n},e.createElement("strong",null,"Field ID")," ",p)),e.createElement("span",null,e.createElement("strong",null,"Message")," ",a.message)))))),$=l.Ay.div` display: flex; padding: 2rem; h1 { margin-block-end: 0.25rem; font-size: 1.5rem; font-weight: 600; color: ${s=>s.theme.colors.light.brand.darkBlue}; } p { margin-block-end: 0.5em; } .error { margin-block-end: 1rem; } code { display: block; padding: 1rem; border: 1px solid ${s=>s.theme.colors.light.brand.lightBlue}; border-radius: 4px; background-color: ${s=>s.theme.colors.light.brand.lighterBlue}; span { display: block; } } `,g=v},54337:(O,y,t)=>{t.d(y,{A:()=>s});var e=t(48322),l=t(95443),v=t(98401),$=t(12774);const s=({icon:k,label:x,content:a,className:b,breakContent:p,id:n,setId:u})=>!x&&!a?null:e.createElement("li",{className:`key-fact ${b||""}`},e.createElement("span",{className:"key-fact__label"},e.createElement(l.A,{icon:k,size:24,className:"key-fact__icon"}),x||null,!p&&a?e.createElement("span",{className:"key-fact__content"},a.type==="markup"&&e.createElement(v.VK,{text:a.text}),a.type==="dropdown"&&e.createElement($.m,{id:n,setId:u,...a})):null),p&&a?e.createElement(e.Fragment,null,a.type==="markup"&&e.createElement("span",{className:"key-fact__content key-fact__content--break"},e.createElement(v.VK,{className:"flow",text:a.text})),e.createElement("span",{className:"key-fact__content"},a.type==="dropdown"&&e.createElement($.m,{id:n,setId:u,...a}))):null)},55141:(O,y,t)=>{t.d(y,{A:()=>$});var e=t(67115),l=t(10394);const $=e.Ay.div` ${({theme:{colors:g,spacing:s}})=>(0,e.AH)` .fact-list { padding: 0; margin: 0; margin-block-start: var(--space-2xs-xs, ${s.xxxs}); list-style: none; } .key-fact { padding: var(--space-xs-s, ${s.xxxs}); border-bottom: 1px solid ${g.light.brand.gold}; color: ${g.light.brand.darkBlue}; } .key-fact__label { display: flex; gap: 8px; } .key-fact__icon { color: ${g.light.brand.midBlue}; } .key-fact__content--break { display: block; margin-block-start: var(--space-3xs-2xs, ${s.xxxs}); margin-inline-start: ${s.s}; } .key-fact-option { display: flex; justify-content: space-between; inline-size: fit-content; padding: 0.5em; margin-block-start: 0.375em; border: none; border-radius: 4px; width: 100%; background: none; text-align: left; color: ${g.light.brand.gold}; touch-action: manipulation; cursor: pointer; transition: all 200ms ease; &.key-fact-option--active { border: 2px solid ${g.light.brand.midBlue}; } &.key-fact-option--singular { cursor: default; } &:hover, &:focus-within { span, .chevron-icon { color: ${g.light.brand.darkBlue}; transition: all 200ms ease; } } span { font-weight: 700; color: ${g.light.brand.midBlue}; &.active { text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; } } &:disabled { cursor: not-allowed; span { color: ${g.light.neutral.grey}; } } .chevron-icon { min-width: 24px; border-radius: 50%; border: 2px solid currentColor; color: ${g.light.brand.midBlue}; } } .options-list { padding: 0; margin: 0; margin-block-start: var(--space-2xs-xs, ${(0,l.A)(12)}); list-style: none; & li { margin-block-start: var(--space-3xs-2xs, ${s.xxxs}); } } .buttons-container { display: flex; flex-flow: column nowrap; gap: var(--space-2xs-xs, ${(0,l.A)(12)}); margin-block-start: var(--space-m-l, ${s.s}); button, a { width: 100%; } } `} `},12774:(O,y,t)=>{t.d(y,{A:()=>b,m:()=>x});var e=t(48322),l=t(43266),v=t(92301),$=t(55141),g=t(69352),s=t(54337),k=t(95443);const x=({options:p,initialState:n=!1,id:u,setId:_})=>{const[c,r]=(0,e.useState)(n),E=(0,l.d4)(v.Wp),m=p.find(o=>o.id===u),f=o=>{_(o)};return!p||p.length<=0?null:e.createElement(e.Fragment,null,E?.content?.options&&E?.content?.options.length>1?e.createElement(e.Fragment,null,e.createElement("button",{onClick:()=>r(!c),"aria-expanded":!!c,"aria-controls":m?.title?.replace(/\s+/g,"-").toLowerCase(),className:`key-fact-option ${m?.id===u&&"key-fact-option--active"}`},e.createElement("span",{className:"active"},m?.title),e.createElement(k.A,{className:"chevron-icon",icon:c?"arrowUp":"arrowDown",size:24})),c?e.createElement("ul",{className:"options-list"},E?.content?.options.map((o,h)=>e.createElement("li",{key:`${o.title}-${h}`},e.createElement("button",{onClick:()=>f(o.id),disabled:u===o.id,className:"key-fact-option"},e.createElement("span",null,o.title))))):null):e.createElement("div",{className:"key-fact-option key-fact-option--singular"},e.createElement("span",{className:"active"},m?.title)))},b=({applicationCTA:p,secondaryCTA:n,facts:u,hideApplyNow:_,id:c,setId:r,events:E})=>{const m=(0,l.d4)(v.Wp);if(!u||u.length<=0)return null;const f=(h,i,...A)=>[...h.slice(0,i),...A,...h.slice(i)];let o=u;return m&&!E&&(o=f(u,2,m)),e.createElement($.A,null,e.createElement("h2",{className:"h4 key-facts__title"},E?"Event details":"Key facts"),e.createElement("ul",{className:"fact-list"},o.map((h,i)=>e.createElement(s.A,{key:i,...h,id:c,setId:r}))),e.createElement("div",{className:"buttons-container"},p&&p.link&&e.createElement(g.A,{className:"course-hero__button",...p}),n&&n.link&&e.createElement(g.A,{className:"course-hero__button",id:"secondary-cta",...n})))}},49240:(O,y,t)=>{t.d(y,{A:()=>p});var e=t(48322),l=t(67115);const $=l.Ay.div` ${({theme:{colors:n}})=>(0,l.AH)` position: relative; .video { position: relative; height: 100%; width: 100%; aspect-ratio: 16 / 9; iframe { position: absolute; top: 0; left: 0; bottom: 0; right: 0; width: 100%; height: inherit; border: none; margin: 0; padding: 0; } } button { display: block; position: relative; padding: 0; border: 0; width: 100%; height: 100%; background: none; cursor: pointer; } .youtube-play-btn { position: absolute; z-index: 10; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px; display: block; padding: 0; margin: 0 auto; user-select: none; transition: opacity 0.3s ease; border-radius: 100%; border: 4px solid ${n.light.neutral.white}; background: ${n.light.brand.darkBlue}; &:after { position: absolute; top: calc(50% - 15px); left: calc(50% - 8px); content: ''; border-color: transparent transparent transparent ${n.light.neutral.white}; border-style: solid; border-width: 14px 0 14px 20px; } } &:hover .youtube-play-btn { opacity: 0.75; } img { display: block; height: 100%; width: 100%; aspect-ratio: 16/9; object-fit: fill; } `} `,g=n=>/vimeo\.com/.test(n)?"vimeo":/youtube\.com|youtu\.be/.test(n)?"youtube":"unknown",s=n=>{const u=n.match(/vimeo\.com\/(\d+)/);return u?u[1]:null},k=n=>{const u=n.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([a-zA-Z0-9_-]{11})/);return u?u[1]:null},x=(n,u)=>{const _=new URL(n),c=new URLSearchParams(_.search);switch(u){case"vimeo":{const r=s(n);return r?`https://player.vimeo.com/video/${r}?${c.toString()}`:n}case"youtube":{const r=k(n);return r?`https://www.youtube.com/embed/${r}?${c.toString()}`:n}default:return n}},a=(n,u,_)=>{if(_?.src)return _},p=({src:n,title:u,posterImage:_,className:c})=>{const[r,E]=(0,e.useState)(!1),m=(0,e.useRef)(null),f=g(n),o=a(n,f,_),i=(0,e.useMemo)(()=>new URL(n),[n]).searchParams.get("autoplay")==="1",A=(0,e.useMemo)(()=>{const N=x(n,f),C=new URL(N);return f==="youtube"&&(C.searchParams.set("enablejsapi","1"),C.searchParams.set("playsinline","1"),C.searchParams.set("rel","0"),typeof window<"u"&&C.searchParams.set("origin",window.location.origin)),(i||r)&&C.searchParams.set("autoplay","1"),C.toString()},[n,f,i,r]);(0,e.useEffect)(()=>{if(!(i||r))return;const N=m.current?.contentWindow;if(!N)return;const C=setTimeout(()=>{try{f==="youtube"?N.postMessage(JSON.stringify({event:"command",func:"playVideo",args:[]}),"*"):f==="vimeo"&&N.postMessage({method:"play"},"*")}catch{}},50);return()=>clearTimeout(C)},[i,r,f]);const S=()=>E(!0),B=!i&&!r&&!!o,D=i||r||!o;return e.createElement($,{className:c&&c},B&&e.createElement("button",{type:"button",className:"video-overlay-btn",onClick:S,"aria-label":"Play video"},e.createElement("span",{className:"youtube-play-btn"}),o&&e.createElement("img",{src:o.src,alt:o.alt||"Video poster"})),D&&e.createElement("div",{className:"video"},e.createElement("iframe",{ref:m,width:"560",height:"315",src:A,title:u||"Embedded Video",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowFullScreen:!0})))}},10394:(O,y,t)=>{t.d(y,{A:()=>e});const e=v=>`${l(v)}rem`,l=v=>v/16}}]);