(globalThis.wpRiseJsonp=globalThis.wpRiseJsonp||[]).push([["learn_main_tsx-node_modules_pnpm_moment_2_30_1_node_modules_moment_locale_sync_recursive_en"],{30349(Nc){Nc.exports=function(Ya){Ya||(Ya={});var __t,__p="";with(Ya)__p+=`<style>
  :root {
    --color-theme-contrast-complementary-rgb: `+((__t=colorThemeContrastComplementaryRGB)==null?"":__t)+`;
    --color-theme-contrast-complementary: `+((__t=colorThemeContrastComplementary)==null?"":__t)+`;
    --color-theme-contrast-rgb: `+((__t=colorThemeContrastRGB)==null?"":__t)+`;
    --color-theme-contrast: `+((__t=colorThemeContrast)==null?"":__t)+`;
    --color-theme-rgb: `+((__t=colorThemeRGB)==null?"":__t)+`;
    --color-theme-tint: `+((__t=colorThemeTint)==null?"":__t)+`;
    --color-theme-transparent: `+((__t=colorThemeTransparent)==null?"":__t)+`;
    --color-theme: `+((__t=colorTheme)==null?"":__t)+`;
    --font-family-body: `+((__t=bodyTypeface)==null?"":__t)+`, 'Noto Sans Myanmar', sans-serif;
    --font-family-head: `+((__t=headingTypeface)==null?"":__t)+`, 'Noto Sans Myanmar', sans-serif;
    --font-family-ui: `+((__t=uiTypeface)==null?"":__t)+`, 'Noto Sans Myanmar', sans-serif;

    --mon-theme-font-body: var(--font-family-body);
    --mon-theme-font-heading: var(--font-family-head);
  }

  .brand--ui, .brand--ui * {
    font-family: var(--font-family-ui) !important;
  }

  .brand--beforeHead:before {
    font-family: var(--font-family-ui) !important;
  }

  .brand--afterHead:after {
    font-family: var(--font-family-ui) !important;
  }

  .brand--background {
    background-color: var(--color-theme) !important;
  }

  .brand--background-all * {
    background-color: var(--color-theme) !important;
  }

  .brand--border {
    border-color: var(--color-theme) !important;

    @media (forced-colors: active) {
      border-color: transparent !important;
    }
  }

  .brand--color {
    color: var(--color-theme) !important;
  }

  .brand--color-all * {
    color: var(--color-theme) !important;
  }

  .brand--shadow {
    box-shadow: 0 0 0 0.2rem var(--color-theme) !important;
  }

  .brand--shadow-all * {
    box-shadow: 0 0 0 0.2rem var(--color-theme) !important;
  }

  .brand--fill {
    fill: var(--color-theme) !important;
  }

  .brand--stroke {
    stroke: var(--color-theme) !important;
  }

  .brand--beforeBackground:before {
    background-color: var(--color-theme) !important;
  }

  .brand--beforeBorder:before {
    border-color: var(--color-theme) !important;
  }

  .brand--beforeColor:before {
    color: var(--color-theme) !important;
  }

  .brand--afterBackground:after {
    background-color: var(--color-theme) !important;
  }

  .brand--afterBorder:after {
    border-color: var(--color-theme) !important;
  }

  .brand--afterColor:after {
    color: var(--color-theme) !important;
  }

  /* should be applied to containers where links
     need to appear in brand color */
  .brand--linkColor a {
    color: var(--color-theme) !important;
    fill: var(--color-theme) !important;
  }

  /* should be applied to containers where links
     need to change to brand color on hover */
  .brand--linkColorHover a:hover {
    color: var(--color-theme) !important;
    fill: var(--color-theme) !important;
  }

  /* should be applied to any single element that
     needs to change color on hover */
  .brand--hoverColor:hover {
    color: var(--color-theme) !important;
  }

  .button.brand--background:hover { opacity: .65 !important; }

  .brandHover:hover {
    fill: var(--color-theme) !important;
  }


  @media (min-width: 47.9375em) { /* 768px */
    .brand--min768--background {
      background-color: var(--color-theme) !important;
    }

    .brand--min768--border {
      border-color: var(--color-theme) !important;
    }

    .brand--min768--color {
      color: var(--color-theme) !important;
    }
  }

  @media (max-width: 47.9375em) { /* 768px */
    .brand--max768--background {
      background-color: var(--color-theme) !important;
    }

    .brand--max768--border {
      border-color: var(--color-theme) !important;
    }

    .brand--max768--color {
      color: var(--color-theme) !important;
    }
  }
</style>
`;return __p}},37511(Nc,Ya,p){"use strict";var Wo={};p.r(Wo),p.d(Wo,{callbackComponent:()=>fT,callbackPath:()=>g0,errorPath:()=>oT,getToken:()=>rT,initAuth:()=>Y1,login:()=>K1,logout:()=>or,onFetchTokensThunk:()=>pT,onSessionExpired:()=>cT,refreshSession:()=>iT,request:()=>D9});var s=p(34158),Uu=p(28900),Ko=p(19800),Za=p(46530),Eie=p(53920),Nie=p(94756),jie=p(53373),wie=p(73853),Aie=p(34555),Rie=p(81258),Pie=p(84381),Mie=p(90460),Oie=p(30803),Bie=p(42247),Die=p(21855),Fie=p(79302),Hie=p(76032),$ie=p(96795),u=p(82920),v4=p(94265),je=p(2422),C4=p(55676),jc=p(18398),ho=p(18442),x4=p(40412),b4=p(36202),y4=p(18484);const Gu=u.createContext(null),Wu=u.createContext(!1),Qo=e=>(0,s.jsx)(Wu.Provider,{value:!0,children:(0,s.jsx)(x4.A,{...e})});function Bp(e){return class extends u.Component{static displayName=`withStaleTransitionState(${e.displayName||e.name})`;static defaultProps={onEnter:()=>{},onEntered:()=>{},onEntering:()=>{},onExit:()=>{},onExited:()=>{},onExiting:()=>{}};nodeRef=u.createRef();onEnterDelegate;onEnteringDelegate;onEnteredDelegate;onExitDelegate;onExitingDelegate;onExitedDelegate;constructor(n){super(n),this.state={transitionState:null},this.onEnterDelegate=this.onTransition.bind(this,"enter"),this.onEnteringDelegate=this.onTransition.bind(this,"entering"),this.onEnteredDelegate=this.onTransition.bind(this,"entered"),this.onExitDelegate=this.onTransition.bind(this,"exit"),this.onExitingDelegate=this.onTransition.bind(this,"exiting"),this.onExitedDelegate=this.onTransition.bind(this,"exited")}onTransition=(n,...o)=>{this.setState({transitionState:n});const r="on"+n[0].toUpperCase()+n.slice(1),a=this.props[r];typeof a=="function"&&a(...o)};render(){return(0,s.jsx)(Gu.Provider,{value:this.state.transitionState,children:(0,s.jsx)(e,{nodeRef:this.nodeRef,...this.props,onEnter:this.onEnterDelegate,onEntered:this.onEnteredDelegate,onEntering:this.onEnteringDelegate,onExit:this.onExitDelegate,onExited:this.onExitedDelegate,onExiting:this.onExitingDelegate})})}}}const wc=Bp(b4.Ay),Os=Bp(y4.A);function S4(e){const t=u.useContext(Wu),n=u.useContext(Gu),o=u.useRef(e);return t&&n?.startsWith?.("exit")||(o.current=e),o.current}function L4(e){const t=n=>{const o=S4(n);return(0,s.jsx)(e,{...o,nodeRef:n.ref,ref:n.ref})};return t.displayName=`withTransitionableState(${e.displayName||e.name||"Component"})`,t}const Dp=e=>e!=null&&typeof e=="object"&&"map"in e&&typeof e.map=="function",T4=e=>e!=null&&typeof e=="object"&&"run"in e&&typeof e.run=="function",Fp=e=>e!=null&&typeof e=="object"&&"then"in e&&typeof e.then=="function",k4=e=>e!=null&&typeof e=="object"&&"fork"in e&&typeof e.fork=="function",Hp=e=>e!=null&&typeof e=="function",$p=(e,t)=>{const n=o=>$p(o,t);if(typeof e=="object"&&"type"in e&&typeof e.type=="string"){const o="meta"in e&&typeof e.meta=="object"?e.meta:void 0;return{...e,meta:{...o,origin:t}}}if("bimap"in e&&typeof e.bimap=="function")return e.bimap(n,n);if(Dp(e))return e.map(n);if(Fp(e))return e.then(n);if(Hp(e))return function(r,a){return e(i=>r(n(i)),a)}};function I4(){return({dispatch:e,getState:t})=>n=>o=>{if(Hp(o))return o(e,t);if(Fp(o))return o.then(e);if(k4(o)){o.fork(e,e);return}return T4(o)?e(o.run()):Dp(o)?o.map(e):n(o)}}function E4(){return[I4()]}var Ac=p(82920);const N4=jc.Zz;function j4(e,t){const n=(0,jc.y$)(e,t,N4((0,jc.Tw)(...E4()))),o=A4(),r=R4(),a=P4(),i=M4(),c=O4(),l=w4();return{Provider:ho.Kq,connect:o,connectBase:r,dispatch:n.dispatch,store:n,useDispatch:a,useDispatchWithOrigin:i,useSelector:c,useStore:l}}function w4(){return function(){return(0,ho.Pj)()}}function A4(){return function(t,n,o,r){return function(a){return(0,ho.Ng)(t,n,o,r)(L4(a))}}}function R4(){return function(t,n,o,r){return function(a){return(0,ho.Ng)(t,n,o,r)(a)}}}function P4(){return ho.wA}function M4(){return function(t){const n=(0,ho.wA)();return Ac.useCallback(r=>n($p(r,t)),[n,t])}}function O4(){return function(t,n=ho.bN){const o=Ac.useContext(Wu),r=Ac.useContext(Gu),a=Ac.useRef(void 0),i=(0,C4.S)(),c=(0,ho.d4)(t,n),l=!i&&o&&r?.startsWith?.("exit");return l||(a.current=c),l&&a.current!==void 0?a.current:c}}var Fr=p(71988),B4=p(81395),Yo=p.n(B4),fe=p(15368),D4;function F4(){return fe.action}function Vie(){return D4}var Zo=p(47371),H4=p(58166),Pe=p.n(H4),$4=p(46776),Ku=p.n($4),V4=p(68325),Ee=p.n(V4),z4=p(94057),Xn=p.n(z4),_4=p(42117),Qu=p.n(_4);const Rc=Ku()(Qu()),Vp=["a","b","blockquote","br","div","em","h1","h2","h3","h4","h5","h6","i","img","li","mark","ol","p","table","td","th","tbody","thead","tr","s","strong","span","sub","sup","u","ul","details","summary","rise-image","rise-math"],U4=["align","allow","allowfullscreen","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","title","width"],G4=Rc({allowedAttributes:{"*":["aria-*","class","colspan","id","rowspan","slot","style"],a:["data-external","data-link-type","data-link-destination","href","target","rel"],img:["alt","src"],ol:["start"],span:["data-*"],"rise-image":["key","src","width","height","originalwidth","originalheight"],"rise-math":["data-translate-attrs","long-description","short-description","tex"]},allowedClasses:["fr-*"],allowedSchemes:["data","http","https","mailto"],allowedTags:Vp}),W4=Rc({allowedAttributes:{iframe:U4},allowedTags:["iframe"],allowedSchemes:["http","https"]}),Yu=Xn()(Ee(),G4,Pe()("")),zp=Xn()(Ee(),W4,Pe()("")),Tn=Rc({allowedTags:[],allowedAttributes:[]}),zie=Rc({allowedAttributes:{"*":["aria-*","class","colspan","rowspan","style"],a:["data-external","data-link-type","data-link-destination","href","target","rel"],ol:["start"],span:["data-*"],"rise-image":["key","src","width","height","originalwidth","originalheight"],"rise-math":["tex"]},allowedClasses:["fr-*"],allowedSchemes:["data","http","https","mailto"],allowedTags:Vp.filter(e=>e!=="img")}),_ie=e=>{const t=e.replace(/((<br>)|(<\/[a-z]*>))+/g," ");return Tn(t).replace(/\s{2,}/g," ")},{Runtime:Yt}=window,Ne=e=>window.env?.[e],Uie=!1,Gie=null,_p="Rise 360",K4=e=>`${Ne("CDN_USER_CONTENT_URI")}/${e}`,mt=e=>{const t=e||"",n=Yt?.resolvePath!=null?Yt.resolvePath.bind(Yt):K4;return t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:n(t)||t},Q4=e=>Yt?.resolveFontPath!=null?Yt.resolveFontPath(e):`${e.default?Ne("CDN_URI"):Ne("CDN_USER_CONTENT_URI")}/${e.key}`,Up=()=>{Yt?.exit!=null&&Yt.exit()},Y4=()=>Yt?.isComplete!=null?Yt.isComplete():null,Xa=()=>Yt?.isExport!=null?Yt.isExport():!1;function Z4(){if(Yt?.isExport!=null){const e=window.partnerContent?.content;return Yt.isExport()&&!!e}return!1}const Gp=()=>{if(Yt?.sendTouch!=null)return Yt.sendTouch()};var X4=p(19086),Bs=p.n(X4),q4=p(39405),Ds=p.n(q4),J4=p(49329),Pc=p.n(J4),e9=p(57065),ft=p.n(e9),t9=p(37223),Cs=p.n(t9),n9=p(21217),Wp=p.n(n9),s9=p(11786),Zu=p.n(s9),o9=p(89658),Ye=p.n(o9),r9=p(2572),Ze=p.n(r9),a9=p(70057),qn=p.n(a9);const i9=Bs(),Mc=Ye(),c9=Ds(),Kp=e=>Pc()(e),Oc=Xn(),Bc=e=>t=>{const n=e(t);return Tn(n==null?void 0:String(n))},Qp=e=>t=>i9({[e]:n=>Tn(n==null?void 0:String(n))},t),l9=({startTime:e,stopTime:t})=>t-e,d9=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return Jp(e);case"MATCHING":return o1(e);default:return Hr(e)}},u9=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return Jp(e);case"MATCHING":return o1(e);case"MULTIPLE_CHOICE":return e1(e);case"MULTIPLE_RESPONSE":return f9(e);default:return e1(e)}},h9=({isUnfinished:e,item:t,itemProgress:n})=>{switch(t.type){case"FILL_IN_THE_BLANK":return m9(e)(n);case"MATCHING":return C9(t,e)(n);case"MULTIPLE_CHOICE":return t1(t,e)(n);case"MULTIPLE_RESPONSE":return p9(t,e)(n);default:return t1(t,e)(n)}},Yp=e=>[e],Hr=e=>{const t=e.answers||[];if(e.shuffledAnswerIndices&&Array.isArray(e.shuffledAnswerIndices)){const n=e.shuffledAnswerIndices,o=[];return t.forEach((r,a)=>{const i=n[a];typeof i=="number"&&(o[i]=r)}),o.map(Qp("title"))}return t.map(Qp("title"))},Xu=Bc(Ye()("id")),Zp=Bc(Ye()("title")),Xp=e=>t=>c9(n=>Ze()("id",t,n),Hr(e)),qp=e=>t=>Wp()(t,Hr(e)),Jp=e=>Zu()("title",Hr(e)),m9=e=>t=>Oc(Pe()(e),Pe()(""),Bc(n=>Mc("text",n)))(t),e1=e=>e.correct==null?[]:Xp(e)(e.correct),t1=(e,t)=>n=>Oc(Pe()(t),Pe()([]),()=>{const o=Mc("selectedIndex",n);return o===void 0?[]:Yp(qp(e)(o))})(n),f9=e=>Kp(ft()(Xp(e),e.corrects??[])),p9=(e,t)=>n=>Oc(Pe()(t),Pe()([]),()=>{const o=Mc("selectedIndices",n)||[];return Kp(o.map(r=>Yp(qp(e)(r))))})(n),n1=({sourceId:e,sourceTitle:t,targetId:n,targetTitle:o})=>({source:{id:`source_${String(e)}`,title:t},target:{id:`target_${String(n)}`,title:o}}),s1=Bc(Ye()("matchTitle")),g9=e=>{const t=Xu(e);return n1({sourceId:t,sourceTitle:Zp(e),targetId:t,targetTitle:s1(e)})},v9=e=>(t,n)=>{const o=Hr(e),r=o.find(i=>i?.id===n),a=o.find(i=>i?.id===t);return n1({sourceId:Xu(r),sourceTitle:Zp(r),targetId:Xu(a),targetTitle:s1(a)})},o1=e=>ft()(g9,Hr(e)),C9=(e,t)=>n=>Oc(Pe()(t),Pe()([]),()=>{const o=Mc("matches",n);return qn()(Cs()(v9(e),o??{}))})(n);var x9=p(99552),r1=p.n(x9),b9=p(30208),a1=p.n(b9),y9=p(22775),Xo=p.n(y9),i1,Wie;const qu="_articulate_user_id",S9="_rise_authoring_api_session",c1=()=>"_articulate_rise_",Ju=(e,t)=>`${e}=${t}; domain=${Ne("SESSION_COOKIE_DOMAIN")}; path=/; secure=true`,L9=e=>document.cookie=Ju(qu,e),T9=()=>document.cookie=`${Ju(qu,"")}; Max-Age=-99999999`,k9=()=>document.cookie=`${Ju(S9,"")}; Max-Age=-99999999`,qo=()=>a1().load(qu),pt=()=>a1().load(c1()),I9=()=>pt()?Xo()(pt()).staff:!1,E9=()=>pt()?i1(pt())?.staffRoles||[]:[],N9=()=>pt()?i1(pt())?.content_team_admin:!1,Kie=()=>E9().includes("content-team")||N9(),e0=()=>pt()?Xo()(pt()).riseId||Xo()(pt()).sub||Xo()(pt()).aid:"",j9=()=>pt()?Xo()(pt()).roles:[],w9=()=>pt()?Xo()(pt()).tenantId:"",l1=()=>pt()?Xo()(pt()).subscription||{}:{},A9=()=>l1().plan_id||"",R9=()=>l1().status||"";var P9=p(87266),M9=p(87155),Jo=p.n(M9);const O9=Jo()(window.env,{ACCESS_COOKIE_NAME:c1(),REDIRECT_URI:window.location.origin+"/auth-callback"}),mo=(0,P9.A)(O9),d1=mo.closeSession,$r=mo.on,B9=mo.off,D9=mo.request,u1=mo.refreshSession,qa=mo.resetSession,F9=mo.getAuthorizationUrl,Qie=mo.fetch;var Fs=p(69476);const Dc=(e,t)=>((...n)=>{try{return e(...n)}catch(o){window.env?.SERVICE_ENV&&window.env?.SERVICE_ENV!=="prod"&&console.error(o),Fs.L2.addError(o),t(o)}}),H9=e=>{const t=e.getResponseHeader("content-type")||"",n=t.includes("application/json");if(!(n||t.includes("text/")))return e.response;try{const r=new TextDecoder("utf-8").decode(e.response);try{return n?JSON.parse(r):r}catch{return r}}catch{return e.response}};function $9(e,t){const n=t.indexOf(":"),o=t.substr(0,n).trim().toLowerCase(),r=t.substr(n+1).trim();return o&&(e[o]=e[o]?e[o]+", "+r:r),e}function V9(e){return e?e.split(`
`).reduce($9,{}):{}}function h1(e){const t=[];for(const n in e){const o=e[n];if(!Array.isArray(o)){t.push(encodeURIComponent(n)+"="+encodeURIComponent(o));continue}for(const r of o)t.push(h1(r))}return t.join("&")}function t0(e){let t,n=!1;const o=new Promise(function r(a,i){const c=e.signal;if(c?.aborted){i(new DOMException("Aborted","AbortError"));return}const l=w=>{throw i(w),w},d=()=>{t.abort(),i(new DOMException("Aborted","AbortError"))},h=e.data;let m=Dc(e.deserialize??r1(),l);const f=e.headers??{},v=e.json??!1,C=e.jwt??!1,g=e.token??null,x=e.method??"GET",b=e.reviewEnv??!1,L=e.onUploadProgress;let S=Dc(e.serialize??r1(),l),y=e.url;const T=e.withCredentials??!1,k=e.file,I=e.timeout??3e3;t=new XMLHttpRequest;const E=setTimeout(()=>{t.abort(),i({error:"request timed out"})},I);if(v&&(m=Dc(JSON.parse,i),S=Dc(JSON.stringify,i),f["Content-Type"]="application/json"),x==="GET"&&h&&(y+="?"+h1(h)),C){const w=g||pt();f.Authorization="Bearer "+w}c?.addEventListener("abort",d),t.withCredentials=T,t.addEventListener("abort",i),t.addEventListener("error",i),t.addEventListener("load",function(){t.status>=400?[401,403].includes(t.status)?n?i({error:"Unable to resume session",status:t.status}):qa().then(()=>{r(a,i),n=!0}).catch(w=>{Fs.L2.addError(w),i({error:"Unable to resume session",status:t.status})}):e.arrayBuffer?i(H9(t)):i(m(t.response)):(a({body:t.status===204?void 0:m(t.response),headers:V9(t.getAllResponseHeaders()),status:t.status}),c?.removeEventListener("abort",d)),clearTimeout(E)}),t.upload&&typeof L=="function"&&t.upload.addEventListener("progress",L),t.open(x,y),e.arrayBuffer&&(t.responseType="arraybuffer");for(const w in f)t.setRequestHeader(w,f[w]);x!=="GET"&&h?t.send(S(h)):k?t.send(k):t.send()});return o.abort=(...r)=>t.abort(...r),o}function z9(e){return e.status===200||e.status===201?e.body:Promise.reject(e.body)}const m1=(e,t=!0)=>t?`${e}s`:e;var n0=null;const Yie=null,f1=null,Zie=(e,t="short")=>{const o=Object.keys(n0).reverse().find(c=>e>=n0[c]);if(!o)return`${e} ${m1("byte",e>1)}`;const r=e/n0[o],a=r%1===0?r.toFixed(0):r.toFixed(2),i=t==="long"?m1(f1[o].long,r>1):f1[o].short;return`${a} ${i}`};var _9=p(12413),U9=p.n(_9);const dn=e=>!!e&&e.type==="quiz",xs=e=>!!e&&e.type==="blocks",gt=({courseProgress:e,lessonId:t,updatedLessonProgress:n})=>({...e,lessons:{...e.lessons,[t]:n}});function vt({lessonId:e,nextCourseProgress:t,prevCourseProgress:n}){const o=t.lessons[e],r=n.lessons[e];if(o&&!U9()(o,r)&&(g8(o),G9({lessonId:e,courseProgress:t,prevCourseProgress:n})),W9({lessonId:e,prevCourseProgress:n,nextCourseProgress:t})){const a=g1(n),i=g1(t),c=i!==a,l={...t,percentComplete:i};return c&&(K9({courseProgress:l,lessonProgress:o}),l.percentComplete!=null&&C8(l.percentComplete)),l}return t}function G9({courseProgress:e,prevCourseProgress:t,lessonId:n}){const o=e.lessons?.[n],r=t.lessons?.[n];if(o?.percentComplete===100&&r?.percentComplete!==100){const a=p1(o);a&&p8(a)}}function W9({lessonId:e,nextCourseProgress:t,prevCourseProgress:n}){const o=t.lessons?.[e];if(!o)return!1;const r=n.lessons?.[e]?.percentComplete===100,a=o.percentComplete===100,i=r!==a,c=t.currentLesson!=null&&dn(t.lessons[t.currentLesson])&&t.lessons[t.currentLesson]?.percentComplete===100;return i||c}function p1(e){const{id:t}=e;if(!t)throw new Error("Cannot create lesson payload: lesson.id is missing");if(dn(e)){const{passed:n,score:o,passingScore:r=0}=e;return{id:t,...n!==void 0&&{passed:n},...o!==void 0&&{score:o},passingScore:r}}return{id:t}}function g1(e){const{lessons:t={}}=e,n=Object.keys(t).length;if(n===0)return 0;const o=Object.values(t).filter(r=>r.isComplete).length;return Math.round(o/n*100)}function K9({courseProgress:e,lessonProgress:t}){if(!e||!t)return;const n=p1(t);n&&v8(e,n)}const Q9=e=>e.reduce((t,n,o)=>("id"in n&&(t[n.id]={id:n.id,index:o}),t),{}),s0=e=>({...e,percentComplete:o0({items:e.items,key:"isComplete"})}),v1=e=>({...e,percentComplete:o0({items:e.items,key:"isComplete"})}),C1=e=>({...e,percentViewed:o0({items:e.items,key:"isViewed"})});function Xie({itemId:e,isCorrect:t,progress:n}){const o={...n,items:{...n.items,[e]:{...n.items?.[e],id:e,index:n.items?.[e]?.index??0,isComplete:t,isViewed:t,...n.items?.[e].isCorrect===void 0?{isCorrect:t}:{}}}};o.items[e]?.isCorrect===!1&&(o.lastIncorrectCardId=e);const r=Y9(o),a=r.percentComplete!==100?v1(r):r,i=C1(a);return i.percentComplete===100?{...i,isComplete:!0}:i}function o0({items:e,key:t}){const n=e??{},o=Object.keys(n).length,r=Object.values(n).filter(a=>a?.[t]).length;return o===0?0:Math.round(r/o*100)}function Y9(e){const n=Object.values(e.items||{}).filter(o=>o.isCorrect===!0).length;return{...e,correctlyAnswered:n}}var r0=p(44944),Z9,X9;const Zt=e=>!!e&&Object.prototype.toString.call(e)==="[object Object]",x1=Array.isArray,qie=(e,t)=>Object.fromEntries(Object.entries(t).map(e)),b1=(e,t,n)=>{const o={};for(const r in n)o[e(r)]=t(n[r]);return o},q9=e=>e.map(y1),J9=e=>e.map(S1),eS=e=>b1(Z9,y1,e),tS=e=>b1(X9,S1,e),y1=e=>Zt(e)?eS(e):x1(e)?q9(e):e,S1=e=>Zt(e)?tS(e):x1(e)?J9(e):e,fo=(e,t)=>{const n=new Set(t),o={};for(const r in e)n.has(r)||(o[r]=e[r]);return o},po=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,o])=>t(n,o)));function L1(e,t){const n=e.lessons[t];if(!xs(n))return e;const o={...a0(n),id:t},r=gt({courseProgress:e,lessonId:t,updatedLessonProgress:o});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function nS(e,t){const{lessonId:n,blockId:o,itemId:r}=t,a=e.lessons[n];if(!xs(a))return e;const i=a.items[o],c=hS({blockProgress:i,itemId:r}),l=er({lessonProgress:a,blockId:o,updatedProgressBlock:c}),d=s0(l),h=gt({courseProgress:e,lessonId:n,updatedLessonProgress:d});return vt({lessonId:n,prevCourseProgress:e,nextCourseProgress:h})}function sS(e,t){const n=e.lessons[t];if(!xs(n))return e;const o=fS(n),r=gt({courseProgress:e,lessonId:t,updatedLessonProgress:o});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function oS(e,{blockId:t,lessonId:n}){const o=e.lessons[n];if(!xs(o))return e;const r=pS(o.items[t]),a=er({lessonProgress:o,blockId:t,updatedProgressBlock:r}),i=gt({courseProgress:e,lessonId:n,updatedLessonProgress:a});return vt({lessonId:n,prevCourseProgress:e,nextCourseProgress:i})}function rS(e,t){const{lessonId:n,blockId:o,items:r}=t,a=e.lessons[n];if(!xs(a))return e;const i=uS({blockId:o,lessonProgress:a,items:r}),c=gt({courseProgress:e,lessonId:n,updatedLessonProgress:i});return vt({lessonId:n,prevCourseProgress:e,nextCourseProgress:c})}function aS(e,t){const{lessonId:n,blockId:o,itemId:r,audioVideoPlayhead:a}=t,i=e.lessons[n],c=i?.items?.[o];if(!xs(i)||!c||!("items"in c)||!c.items||!c.items[r])return e;const d={...c.items[r],audioVideoPlayhead:a},h={...c,items:{...c.items,[r]:d}},m=er({lessonProgress:i,blockId:o,updatedProgressBlock:h}),f=gt({courseProgress:e,lessonId:n,updatedLessonProgress:m});return vt({lessonId:n,prevCourseProgress:e,nextCourseProgress:f})}function iS(e,t){const{lessonId:n,blockId:o,itemId:r,isCorrect:a}=t,i=e.lessons[n];if(!xs(i))return e;const c=gS({itemId:r,isCorrect:a,blockProgress:i.items[o]}),l=s0(er({lessonProgress:i,blockId:o,updatedProgressBlock:c})),d=gt({courseProgress:e,lessonId:n,updatedLessonProgress:l});return vt({lessonId:n,prevCourseProgress:e,nextCourseProgress:d})}function cS(e,t){const{lessonId:n,blockId:o,itemId:r,response:a}=t,i=e.lessons[n],c=i?.items?.[o];if(!xs(i)||!c||!("items"in c)||!c.items||!c.items[r])return e;const d={...c.items[r],response:a},h={...c,items:{...c.items,[r]:d}},m=er({lessonProgress:i,blockId:o,updatedProgressBlock:h}),f=gt({courseProgress:e,lessonId:n,updatedLessonProgress:m});return vt({lessonId:n,prevCourseProgress:e,nextCourseProgress:f})}function lS(e,t){const{lessonId:n,blockId:o,isSubmitted:r}=t,a=e.lessons[n];if(!xs(a))return e;const i=a?.items?.[o]??{},c=po(i?.items??{},(m,f)=>[m,fo(f,["response"])]),l={...i,items:c,isSubmitted:r},d=er({lessonProgress:a,blockId:o,updatedProgressBlock:l}),h=gt({courseProgress:e,lessonId:n,updatedLessonProgress:d});return vt({lessonId:n,prevCourseProgress:e,nextCourseProgress:h})}const dS=e=>Object.values(e).length>0&&Object.values(e).every(t=>t.isComplete),a0=e=>{const t=po(e.items,(n,o)=>{const r=po(o.items??{},(a,i)=>[a,{...i,isComplete:!0,id:i.id,index:i.index}]);return[n,{...o,items:r,isComplete:!0}]});return{...e,isComplete:!0,items:t,percentComplete:100}},uS=({blockId:e,items:t,lessonProgress:n})=>{const o=n.items?.[e]??{items:{}},r=new Set(t.map(d=>String(d.id))),a=po(o.items??{},(d,h)=>{const m=r.has(d);return[d,{...h,isComplete:h.isComplete||m,id:h.id,index:h.index}]}),c=Object.keys(a).length===0||dS(a),l={...o,id:e,items:a,...c&&{isComplete:!0}};return mS(er({lessonProgress:n,blockId:e,updatedProgressBlock:l}))},hS=({blockProgress:e,itemId:t})=>{if(!e.items)return e;const n=e.items[t];return{...e,items:{...e.items,[t]:{...n,retryAttemptCount:(n?.retryAttemptCount??0)+1}}}},mS=e=>{const t=s0(e);return t.percentComplete===100?{...t,isComplete:!0}:t},er=({blockId:e,lessonProgress:t,updatedProgressBlock:n})=>({...t,items:{...t.items,[e]:n}}),fS=e=>{const t=po(e.items,(n,o)=>{const r=po(o.items??{},(a,i)=>[a,fo(i,["isComplete","isCorrect","isViewed"])]);return[n,{id:o.id,index:o.index,items:r}]});return{...fo(e,["isComplete","percentComplete"]),items:t}},pS=e=>({...fo(e,["percentViewed","correctlyAnswered"]),id:e.id,index:e.index,items:po(e.items??{},(t,n)=>[t,fo(n,["isViewed","isCorrect"])]),retryAttempts:(e.retryAttempts??0)+1}),gS=({isCorrect:e,itemId:t,blockProgress:n})=>{if(!n.items)return n;const o=n.items[t],r={...o,isComplete:e,isViewed:e,...o?.isCorrect===void 0&&{isCorrect:e}},a={...n.items,[t]:r},i=Object.values(a).filter(m=>m.isCorrect).length,c={...n,items:a,correctlyAnswered:i,...!e&&{lastIncorrectCardId:t}},l=C1(c),d=v1(l),h=d.percentComplete===100;return{...d,...h&&{isComplete:!0}}};function T1(e){return e.trim()===""}function vS(e,{lessonId:t,fromIndex:n,progressId:o}){const r=e.lessons[t];if(!dn(r))return e;const a=r.activeIndex??0;if(n!=null&&a!==n)return e;const i=o?(r.items[o]?.index??a)+1:a+1,c=Object.keys(r.items).length+1,l=Math.min(i,c),d={...r,activeIndex:l},h=gt({courseProgress:e,lessonId:t,updatedLessonProgress:d});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:h})}function CS(e,t){const n=e.lessons[t];if(!dn(n))return e;const o=Object.keys(n?.items)?.length,r={...n,activeIndex:o+1},a=gt({courseProgress:e,lessonId:t,updatedLessonProgress:r});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:a})}function xS(e,{lessonId:t,itemId:n}){const o=e.lessons[t];if(!dn(o))return e;const r=o.items[n];if(!r)return e;const a={...r,selectedIndices:[]},i=Ja({lessonProgress:o,itemId:n,updatedProgressQuizItem:a}),c=gt({courseProgress:e,lessonId:t,updatedLessonProgress:i});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:c})}function bS(e,{lessonId:t,lessonProgress:n}){return{...e,lessons:{...e.lessons,[t]:n}}}function yS(e,{lessonId:t,itemId:n,text:o}){const r=e.lessons[t];if(!dn(r))return e;const a=r.items[n];if(!a)return e;const i=typeof o=="string"&&T1(o)?fo(a,["text"]):{...a,text:o},c=Ja({lessonProgress:r,itemId:n,updatedProgressQuizItem:i}),l=gt({courseProgress:e,lessonId:t,updatedLessonProgress:c});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function SS(e,t){const n=e.lessons[t];if(!dn(n))return e;const o=po(n.items,(c,l)=>{const d={id:l.id,index:l.index};return[c,d]}),a={...fo(n,["activeIndex","originalItemProgress","passed","percentComplete","questionList","questionsDrawn","reportResults","score"]),...n.passed!==!1&&{passed:n.passed},...n.isComplete!==!1&&{isComplete:n.isComplete},retryAttempts:(n.retryAttempts??0)+1,items:o},i=gt({courseProgress:e,lessonId:t,updatedLessonProgress:a});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:i})}function LS(e,{lessonId:t,itemId:n,selectedIndex:o,shuffledAnswerIndices:r}){const a=e.lessons[t];if(!dn(a))return e;const i=a.items[n];if(!i)return e;const c=r??i.shuffledAnswerIndices;if(o==null)return e;const l=Array.isArray(c)&&c[o]!=null?c[o]:o,d={...i,selectedIndex:l,...Array.isArray(c)&&{shuffledAnswerIndices:c}},h=Ja({lessonProgress:a,itemId:n,updatedProgressQuizItem:d}),m=gt({courseProgress:e,lessonId:t,updatedLessonProgress:h});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:m})}function TS(e,{lessonId:t,itemId:n,matches:o}){const r=e.lessons[t];if(!dn(r))return e;const a=r.items[n];if(!a)return e;const i={...a,matches:o},c=Ja({lessonProgress:r,itemId:n,updatedProgressQuizItem:i}),l=gt({courseProgress:e,lessonId:t,updatedLessonProgress:c});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function kS(e,{lessonId:t,timeRemaining:n}){const o=e.lessons[t];if(!dn(o))return e;const r={...o,timeRemaining:n},a=gt({courseProgress:e,lessonId:t,updatedLessonProgress:r});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:a})}function IS(e,{lessonId:t,itemId:n,isCorrect:o,finalRetryAttempt:r,passToContinue:a}){const i=e.lessons[t];if(!dn(i))return e;const c=i.passingScore??80,l=i.items[n];if(!l)return e;const d={...l,isCorrect:o,isComplete:!0},h={...i.items,[n]:d},m=Object.keys(h).length,f=Object.values(h).filter(L=>L.isCorrect).length,v=Object.values(h).filter(L=>L.isComplete).length,C=Math.round(f/m*100),g=Math.round(v/m*100);let x={...i,items:h,score:C,percentComplete:g};if(g===100){const L=C>=c,S=a?L:!0;Cg(L,C,t,r),x={...x,passed:L,isComplete:S,reportResults:!0}}const b=gt({courseProgress:e,lessonId:t,updatedLessonProgress:x});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:b})}function ES(e,{lessonId:t,itemId:n,selectedIndex:o,shuffledAnswerIndices:r}){const a=e.lessons[t];if(!dn(a))return e;const i=a.items[n];if(!i)return e;const c=r??i.shuffledAnswerIndices;if(o==null)return e;const l=Array.isArray(c)&&c[o]!=null?c[o]:o,d=i.selectedIndices??[],m=d.includes(l)?d.filter(b=>b!==l):[...d,l],{selectedIndices:f,...v}=i,C=m.length>0?{...v,selectedIndices:m,...Array.isArray(c)&&{shuffledAnswerIndices:c}}:{...v,...Array.isArray(c)&&{shuffledAnswerIndices:c}},g=Ja({lessonProgress:a,itemId:n,updatedProgressQuizItem:C}),x=gt({courseProgress:e,lessonId:t,updatedLessonProgress:g});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:x})}function Ja({itemId:e,lessonProgress:t,updatedProgressQuizItem:n}){return{...t,items:{...t.items,[e]:n}}}function NS(e,t){const{id:n,passed:o,passingScore:r,score:a,retryAttempts:i}=t,c=[o,i,a];if(!(c.length===3&&c.every(C=>C!=null)))return e;const d=e.lessons?.[n]?.items??{},h=Object.keys(d).length+1,m=e.lessons?.[n];if(!m)return e;const f={...m,isComplete:!0,activeIndex:h,reportResults:!0,passed:o,passingScore:r,percentComplete:100,retryAttempts:i,score:a};return{...e,lessons:{...e.lessons,[n]:f}}}function jS(e,{quizId:t,destinationId:n}){const o=Object.keys(e.lessons),r=o.findIndex(c=>c===t),a=o.findIndex(c=>c===n);return r===-1||a===-1||a<=r?e:o.slice(r+1,a).reduce((c,l)=>{const d=c.lessons[l];if(!d||d.isComplete)return c;const h=dn(d)?wS(d):a0(d),m=gt({courseProgress:c,lessonId:l,updatedLessonProgress:h});return vt({lessonId:l,prevCourseProgress:c,nextCourseProgress:m})},e)}function wS(e){const t=Object.fromEntries(Object.entries(e.items||{}).map(([n,o])=>[n,{...o,isComplete:!0,isCorrect:!0}]));return Cg(!0,100,e.id,!1),{...e,items:t,isComplete:!0,passed:!0,percentComplete:100,reportResults:!0,score:100}}var AS=p(74278),RS=p(43923),Me=p.n(RS),PS=p(3911),go=p.n(PS);const MS=e=>e!==void 0,k1=go()(MS,Me()(JSON.parse,AS.Base64.decode)),OS=(e,t)=>window.courseData?e(window.courseData):window.course?{course:e(window.course),media:[]}:t;var BS=p(72231),Jn=p.n(BS),DS=p(43396),Hs=p.n(DS),FS=p(56724),Ct=p.n(FS),HS=p(51390),Fc=p.n(HS),$S=p(869),VS=p.n($S),zS=p(62910),I1=p.n(zS);const _S=["fromDashboard","locale","embed"];function US(e,t){const n=typeof e=="function"?e(t):e;return typeof n=="string"?(0,je.Rr)(n):n}function i0(e,t){const n=US(e,t),o=new URLSearchParams(t?.search||""),r=new URLSearchParams(n?.search||"");for(const a of _S){const i=o.get(a);i&&!r.has(a)?r.set(a,i):r.has(a)&&!r.get(a)&&r.delete(a)}return{...n,search:r.toString()}}function Xt(){const e=(0,je.Zp)(),t=(0,je.zy)();return(0,u.useCallback)((n,o)=>{if(typeof n=="number")return e(n);const r=i0(n,t);return e(r,o)},[e,t])}function GS(e){function t(n){const o=(0,je.zy)(),r=Xt(),a=(0,je.g)(),[i]=(0,je.ok)();return(0,s.jsx)(e,{...n,location:o,match:{params:a},navigate:r,queryParams:i})}return t.displayName=`withRouter(${e.displayName||e.name})`,t}var WS=p(85547),KS=p.n(WS),E1=p(17734),QS=p(12387),N1=p.n(QS),YS=p(84218),c0=p.n(YS),ZS=p(6778),vo=p.n(ZS),XS=p(90767),Vr=p.n(XS),qS=p(63203),Lt=p.n(qS),JS=p(50306),eL=p.n(JS),tL=p(82247),Hc=p.n(tL),tce=p(12227),nL;function sL(...e){return Me()(...eL()(1,e))(Hc()(e))}function l0(e,...t){return Lt()(...t)(e)}function nce(e,...t){return nL(...t)(e)}const qt=()=>{};var oL=p(68294);const sce="datadoghq.com",oce=Ne("SERVICE_ENV"),rce=Ne("RISE_FRONTEND_SHA"),ace=Ne("RISE_FRONTEND_LOCAL_DEV")==="true"||window.location.hostname==="rise.dev.articulate.zone",ice=window.Cypress!=null,cce=[/https:\/\/(rise(\.dev)?|360)\.articulate\.(com|zone)(?!\/api\/rise-business-content\/).*/],j1={"Content-Type":"application/json"},rL=[(e,t)=>(t.Authorization=`Bearer ${oi()}`,JSON.stringify(e))],aL=Xn()(Ct(),Ee(),vo()(["data","status","statusText"])),iL=Lt()(vo()(["name","message","response"]),Bs()({response:aL})),cL=({baseURL:e,...t})=>Me()(Jo()({headers:j1,transformRequest:rL}),Jo()(t),Bs()({url:Jn()(e)})),lL=({data:e,method:t,url:n})=>fetch(n,{body:JSON.stringify(e),headers:{...j1,Authorization:`Bearer ${oi()}`},keepalive:!0,method:t}).then(o=>o.json()).then(Vr()("data")),dL=Yo().fromPromise(lL),uL=e=>({method:t,url:n})=>`${t}:${e}${n}`,hL=e=>{const t=new Error("Nil token detected");return Fs.L2.addError(t,e),Yo().Rejected(t)},mL=e=>t=>e.preRequest?e.preRequest(t):t,fL=e=>t=>e.postRequest?e.postRequest(t):t,pL=()=>Ct()(oi()),gL=e=>(t,n)=>N1()(t,uL(n),d0(ri,e)),d0=(e,t)=>n=>l0(n,mL(t),cL(t),Xn()(pL,hL,e),c0()(iL,Ye()("data")),fL(t)),vL=e=>({debounce:gL(e),send:d0(ri,e),sendWithKeepAlive:d0(dL,e)}),CL=()=>document.visibilityState==="visible",xL=e=>go()(CL,()=>e()),w1=(e=>{document.addEventListener("visibilitychange",xL(e)),window.addEventListener("focus",()=>e())});p.dn(w1);var bL=p(42431),un=p.n(bL),yL=p(37159),zr=p.n(yL),SL=p(13758),LL=p.n(SL),TL=p(21435),tr=p.n(TL);const kL=e=>({user_role:e?.is_business_creator?"Business Creator":"Creator",is_admin:!!e?.is_team_admin});var IL;const A1=e=>{const t=e.user,n=t?.profile?.user_id,o=t?.subscription?.subscription_id||t?.subscription?.id,{user_role:r,is_admin:a}=kL(t?.subscription);return{application_source:"360_rise",application_service:"authoring",user_role:r,is_admin:a,reach_user_id:void 0,a360_user_id:n,user_permissions:t?.permissions||[],session_id:e?.user?.session,subscription_id:t?.subscription?.subscription_id||o,tenant_id:o,risecom_billing_id:void 0,...t?.subscription?.plan&&{subscription:{plan:t.subscription.plan,trial_type:t.subscription.trial_type??null}},...e.ai?.subscription&&{ai:{plan:e.ai.subscription.plan,start_date:e.ai.subscription.start_date,end_date:e.ai.subscription.end_date,status:e.ai.subscription.status}},...e.l10nAuthoring?.subscription&&{localization:{end_date:e.l10nAuthoring.subscription.end_date,plan:e.l10nAuthoring.subscription.plan,start_date:e.l10nAuthoring.subscription.start_date,status:e.l10nAuthoring.subscription.status,billing_model:e.l10nAuthoring.subscription.billing_model}}}},dce=e=>{const t=e.course;return{course_id:t?.id,course_locale:t?.locale||e.l10n&&IL(e.l10n)||null,course_created_via:t?.metadata?.createdVia??null,course_snapshot_id:t?.metadata?.restoredFromSnapshotId??null,copied_course_id:t?.copyOf??null}},uce=(e,t)=>{if(!t)return{};const n=e?.lessons?.[t];if(!n)return{};const o=e?.course?.lessons?.indexOf(t)+1||null;return{lesson_id:t,lesson_type:n.type,lesson_position:o}},hce=(e,t,n)=>{if(!t||!n)return{};const r=(e.lessons||{})[t];if(!r?.items)return{};const a=r.items.find(l=>l.id===n);if(!a)return{};const c=r.items.map(l=>l.id).indexOf(n)+1;return{block_id:n,block_type:a.type,block_variant:a.variant,block_family:a.family,block_position:c,block_created_via:a?.metadata?.createdVia??"manual"}},mce=({interactionSetId:e,interactionSetWorkflowKey:t,taskType:n,resourceType:o,hasSourceContent:r}={})=>e?{interaction_set_id:e,...t&&{interaction_set_workflow_key:t},interaction_set_task_type:n,interaction_set_task_resource_type:o,interaction_set_has_source_content:r}:{},EL=()=>{if(!navigator.userAgent)return"unknown";const t=new Zo.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:t.os?.name?t.os.name:t.browser?.name?t.browser.name:"unknown"},NL=()=>{if(!navigator.userAgent)return"unknown";const t=new Zo.UAParser(navigator.userAgent).getResult();return t.device?.model&&t.os?.version?t.os.version:t.browser?.version?t.browser.version:"unknown"},jL=()=>{if(!navigator.userAgent)return"desktop";const t=new Zo.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"desktop"},wL=()=>{if(!navigator.userAgent)return"unknown";const t=new Zo.UAParser(navigator.userAgent).getResult();if(t.device?.vendor)return t.device.vendor;if(t.os?.name)switch(t.os.name){case"Mac OS":case"iOS":return"Apple";case"Windows":return"Microsoft";case"Android":return"Google"}return"unknown"},AL=()=>{if(!navigator.userAgent)return"unknown";const t=new Zo.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:"unknown"},R1=()=>{if(!navigator.userAgent)return"browser";const t=new Zo.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"browser"};function RL(e){return"userAgentData"in e}const P1=()=>{if(RL(navigator))return{platform:navigator.userAgentData.platform,mobile:navigator.userAgentData.mobile,brands:navigator.userAgentData.brands}},M1=()=>({name:EL(),version:NL(),type:jL(),manufacturer:wL(),model:AL()}),O1=()=>{const t=new URLSearchParams(window.location.search).get("query");return{referrer:document.referrer||null,search:t||null,url:window.location.href,path:window.location.pathname+window.location.search+window.location.hash}},B1=()=>navigator.userAgent||null,nr=(e,t=null)=>{const n={...e,context:{locale:navigator.language,device:M1(),channel:R1(),userAgentData:P1(),page:O1(),userAgent:B1(),...e.context},properties:{...t?A1(t):{},...e.properties}};return t0({method:"POST",url:`${Ne("RISE_RUNTIME_URI")}/analytics`,json:!0,data:n})},PL=Ne("SUBSCRIPTIONS_ENDPOINT"),ML=Ne("THREESIXTY_FRONTEND_URI"),OL=LL()(["error","status"],404),BL=Me()(Vr()("error"),Ye()("response")),DL=()=>window.location.href=ML,FL=[(e,t)=>(t.Authorization=`Bearer ${oi()}`,e)],HL=async e=>{const t=`${PL}/users/authorized_status`,n=await ri({transformRequest:FL,url:t}).toPromise().catch(BL),o=Me()(e,I1()(a=>nr({event:"Unexpected Logout",payload:{category:"auth",data:a,detail:"Subscription Error"}})));return un()([[OL,DL],[zr()("error"),o],[tr(),Ye()("data")]])(n)};var $L=p(61915),Mn=p.n($L);const D1=e=>e===V1,bs=e=>D1(e?.type),pce=(e,t)=>n=>bs(n)?e:t,gce=e=>bs(e)?"microlearning":"course",VL=null,u0={guide:"Guide",presentation:"Presentation",video:"Video Training",scenario:"Scenario",microlearning:"Microlearning"},F1=e=>Object.prototype.hasOwnProperty.call(u0,e),$c=e=>{const t=e?.outputType;return typeof t=="string"&&F1(t)?t:void 0},Vc=(e,t)=>e===V1&&t!==void 0,H1=e=>{const t=$c(e?.experiments);return Vc(e?.type,t)&&t==="guide"},ei=e=>{const t=$c(e?.experiments);return Vc(e?.type,t)&&t==="presentation"},h0=e=>{const t=$c(e?.experiments);return Vc(e?.type,t)&&t==="video"},m0=e=>{const t=$c(e?.experiments);return Vc(e?.type,t)&&t==="scenario"},zL=e=>typeof e=="string"&&F1(e)?u0[e]:u0.microlearning,vce=e=>e?VL.includes(e):!1;var _L,UL;const Cce=null,On={ARTICLE:"Article",INTERACTION:"Interaction",QUIZ:"Quiz",VIDEO:"Video"},zc={EDITOR:1,MANAGER:2,OWNER:3},GL={[zc.EDITOR]:"Author",[zc.MANAGER]:"Admin",[zc.OWNER]:"Owner"},xce=Object.values(zc).map(e=>({id:e,title:GL[e]})),bce=({name:e,isOnePage:t,outputType:n})=>{const o=t?UL(n):null,r={Admin:o?`${o} manager`:"Manager",Author:o?`${o} editor`:"Editor",Owner:o?`${o} owner`:"Owner"},a={Admin:o?`${o} manager`:"Course manager",Author:o?`${o} collaborator`:"Course collaborator",Owner:o?`${o} owner`:"Course owner"};return _L?r[e]:a[e]},yce="questionBanks",$1="2% 0px 2% 0px",Sce=9,Lce=13,Tce=27,kce=32,Ice=38,Ece=40,jce=864e5*3,wce=100,V1="onePage",es={UP:"up",DOWN:"down"},Co=Mn()({COMPACT:null,COVER:null,OVERLAY:null,SIDEBAR:null}),sr={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},Ace=Object.values(sr),Rce=null,xt={DARK:"#000",LIGHT:"#fff"},f0={SMALL:{label:"Small",value:1},MEDIUM:{label:"Medium",value:1.5},LARGE:{label:"Large",value:2}},z1=["embed","map","process","sorting","timeline","video","screencast","slidecast"];var WL;const Pce=e=>e.status==="active",KL=e=>e.status==="inactive",Mce=e=>e.plan==="individual",Oce=e=>e.features?.enable_review===!0,QL=e=>e.features?.enable_rise===!0,Bce=e=>e.plan==="trial",YL=e=>e.plan==="trial"&&e.status==="inactive"&&e.is_retrial_eligible===!1,Dce=e=>e.plan==="team"||e.plan==="individual",Fce=e=>e.plan==="team"&&e.is_team_admin===!0,Hce=e=>e.plan==="trial"&&e.is_team_admin===!0,$ce=e=>{if(!e.end_date)return 0;const t=new Date(e.end_date);t.setUTCHours(0,0,0,0);const n=t.setDate(t.getDate()+1);return n&&(n.valueOf()-new Date().setUTCHours(0,0,0,0))/WL||0};var ZL=p(75928),p0=p.n(ZL),XL=p(34370),_1=p.n(XL),qL=p(59783),ti=p.n(qL),JL=p(47951),kn=p.n(JL);const ni=(e,t)=>`${Ne("ID_MAPPER_URI")}/v1/avatars/${encodeURIComponent(e)}?size=${t}`,eT=e=>({large:ni(e,"large"),medium:ni(e,"medium"),micro:ni(e,"micro"),mini:ni(e,"mini"),small:ni(e,"small")}),tT=_1()({features:kn()({},"features"),subscription:Fc()(["features"])}),nT=p0()([YL,KL,ti()(QL)]),sT="/auth-callback",U1="/auth-error",_c=()=>new Promise(e=>{if(!window.Osano)return e();if(window.Osano.cm.dialogOpen){const t=setTimeout(()=>{e()},1e4);window.Osano.cm.addEventListener("osano-cm-ui-changed",(n,o)=>{n==="dialog"&&o==="hide"&&(e(),clearTimeout(t))})}else e()}),g0=sT,oT=U1,rT=pt,G1=()=>window.location.pathname===g0;let W1=!1,v0=!1;const aT=e=>{if(W1)return;const t=(0,E1.A)();W1=!0,window.localStorage.setItem(t,e);const n=F9({client_id:Ne("OKTA_CLIENT_ID"),issuer:Ne("OIDC_ISSUER_URI"),redirect_uri:`${window.location.origin}${g0}`,response_mode:"fragment",scope:Ne("OIDC_SCOPE"),state:t,prompt:null});_c().then(()=>{window.location.href=n})},K1=()=>{const e=new URLSearchParams(window.location.search),t=e.has("redirect_url")?e.get("redirect_url"):window.location.href;return aT(t)},iT=()=>u1().catch(e=>{e.response?.status===404&&or({onLogout:()=>window.location.reload(!0),reason:"Session expired"})}),cT=e=>($r("unauthorized",e),()=>{B9("unauthorized",e)}),lT=()=>{if(v0)return;const e=qo(),t=e0();Ct()(e)?(nr({event:"Unexpected Logout",payload:{category:"auth",userId:t,detail:"id from cookie was null"}}),Fs.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"id from cookie was null"}),v0=!0,or({onLogout:()=>window.location.reload(!0),reason:"Unexpected logout: user id/session cookie missing"})):e!==t&&(nr({event:"Unexpected Logout",payload:{category:"auth",userId:e,idFromToken:t,detail:"Session/Token ID Mismatch"}}),Fs.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"Session/Token ID Mismatch"}),v0=!0,qa().then(()=>window.location.reload(!0)))},Q1=async e=>{try{const[,t,n,o]=await qa(),{aid:r,content_team_admin:a}=o;if(nr({event:"Setting Session Cookie",payload:{category:"auth",userId:r,detail:"Resuming existing session"}}),L9(r),G1()){e();return}const{first_name:i,last_name:c,launchdarkly:l,staff:d}=t,m={avatars:eT(r),first_name:i,user_id:r,last_name:c,staff:d,content_team_admin:a},f={author:r,profile:m},v=()=>or({onLogout:Pe()(null)}),C=x=>e({...f,...tT(x),launchdarkly:l,token:n}),g=await HL(v).then(I1()(C)).catch(()=>e({...f,token:n}));if(nT(g)){nr({event:"Unexpected Logout",payload:{category:"auth",userId:qo(),subscription:g,detail:"Invalid Subscription"}}),Fs.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",userId:qo(),detail:"Invalid Subscription"}),or({onLogout:()=>window.location=`${Ne("THREESIXTY_FRONTEND_URI")}/rise`});return}w1(lT)}catch(t){nr({event:"Unexpected Logout",payload:{category:"auth",userId:qo(),error:t,detail:"Error Resuming Session"}}),Fs.L2.addError(t,{type:"User Meta",userId:qo(),detail:"Error Resuming Session"}),or({onLogout:()=>window.location.reload(!0)})}},Y1=({onFetchTokens:e})=>{if(G1()){Q1(e);return}const t=qo(),n=e0();if(Ct()(t)||t!==n){_c().then(K1);return}Q1(e)},or=({onLogout:e,reason:t})=>{t&&nr({event:"Logout",payload:{category:"auth",userId:qo(),detail:t}});const n=Ne("RISE_AUTHORING_URI"),o=()=>vL({baseURL:n}).send({method:"DELETE",url:"/logout"}),r=()=>{T9(),k9(),d1().then(e)};o().fork(a=>{console.error("Failed to log out of rise-authoring-api",a),r()},r)},dT=Me()(KS().parse,VS()(1,1/0)),uT=(e,t)=>{_c().then(()=>{const o=window.localStorage.getItem(t)||"/",r=o===e?"/":o;window.localStorage.removeItem(t),window.location.href=r})},hT=e=>()=>window.location.href=`${U1}?description=${e}`,mT=({location:e})=>()=>{const{hash:t,pathname:n}=e,{state:o,error:r,error_description:a}=dT(t);r?(Fs.L2.addError(r,{type:"Logout Error",reason:"Error encountered when parsing auth callback.",error_description:a}),or({onLogout:hT(a),reason:`Error encountered when parsing auth callback. Error: ${r}; description: ${a}`})):Y1({onFetchTokens:()=>uT(n,o)})},fT=GS(e=>((0,u.useEffect)(mT(e),[]),null)),pT=({dispatch:e,loadProfileOKTA:t})=>n=>{const o=Fc()(["token"],n);Me()(e,t)(o)};var gT=p(49497),vT=p.n(gT),CT=p(77786),xo=p.n(CT),xT=p(93361),bt=p.n(xT),bT=p(29545),Z1=p.n(bT),yT=p(77177),si=p.n(yT);const Uc=async()=>{await _c();const[e,t]=ft()(encodeURIComponent,Z1()(["hash","pathname"],window.location));window.location.href=`/login#c=${t}${e}`},X1=()=>{window.location.href="/"},zce=null,_ce=null,Uce=pt,Gce=Uc,ST=d1,Wce=()=>u1().catch(()=>ST()),Kce=()=>qt,LT=Lt()(kn()([],"roles"),si()(xo()("author"),X1)),q1=Lt()(bt()("",["subscription","status"]),si()(xo()(vT(),["active","in_trial","non_renewing"]),X1)),TT=()=>window.location.reload(),Qce=async({onFetchTokens:e})=>{try{const[t,n]=await qa(),{launchdarkly:o,riseId:r,sub:a,staff:i,subscription:c}=n,l={staff:i,user_id:r||a};return q1(n),e({author:l.user_id,launchdarkly:o,profile:l,subscription:c,token:t}),$r("change:roles",LT),$r("change:status",q1),$r("change:subdomain",TT),$r("unauthorized",Uc),$r("session:closed",Uc),t}catch{Uc()}};var Yce;const{callbackComponent:Zce,callbackPath:Xce,getToken:oi,initAuth:qce,login:Jce,logout:ele,onSessionExpired:tle,refreshSession:nle,request:ri}=Wo;var J1,eg;const tg=`${Ne("RBC_URI")}/api/partner_content`,kT=null,IT=Jn()(`${tg}/`),C0={transformRequest:[(e,t)=>(t.Authorization=`Bearer ${oi()}`,e)],headers:{"Content-Type":"application/json"}},rle=()=>eg({...C0,url:kT}).toPromise().then(J1(["data","types"])),ale=e=>eg({...C0,url:IT(e)}).toPromise().then(J1(["data","content"])),ET=e=>ri({method:"POST",url:tg,data:JSON.stringify({ids:e}),...C0}).map(Hs()(["data","content"]));var NT=p(97759),_r=p.n(NT);const ng=Ne("SERVICE_ENV")==="prod",Gc=ng?"com":"zone",jT=Lt()(JSON.stringify,_r()(new RegExp(`https://images.riseusercontent.${Gc}/`,"g"),`${Ne("IMAGES_URI")}/`),_r()(new RegExp(`https://riseusercontent.${Gc}/`,"g"),`${Ne("CDN_USER_CONTENT_URI")}/`),_r()(new RegExp(`https://video.rise.${Gc}/`,"g"),`https://video.riseusercontent.${Gc}/`),go()(Pe()(!ng),_r()(new RegExp("https://video.rise.com/","g"),"https://video.riseusercontent.zone/")),JSON.parse);var wT=p(59969),AT=p.n(wT),RT=p(27728),Jt=p.n(RT),PT=p(49946),Nt=p.n(PT),MT=p(56187),Wc=p.n(MT),OT=p(77980),sg=p.n(OT);const BT=vo(),x0=Cs(),b0=qn(),y0=sg(),og=Jo(),ai=Ye(),DT=Bs(),S0=ft(),Kc=e=>e!=null&&typeof e=="object",FT=e=>t=>Ct()(t)?t:e(t),ii=e=>!!e,rg={a:["activeIndex",Ee()],vp:["audioVideoPlayhead",Number],c:["isComplete",ii],n:["correctlyAnswered",Ee()],p:["percentComplete",Ee()],r:["retryAttempts",Ee()],s:["score",Ee()],t:["currentTime",Ee()],v:["percentViewed",Ee()],rr:["reportResults",Ee()],pq:["passed",Ee()],ps:["passingScore",Ee()],qd:["questionsDrawn",Ee()],ql:["questionList",FT(ft()(ft()(Ee())))],qt:["timeRemaining",Number]},HT=e=>(t,n)=>{const[o,r]=rg[n];return Jt()(o,r(t),e)},ag=e=>(t,n)=>{const[o,r]=UT[n],a=n==="i"?L0(t)(ai("items",e)):r(t);return{[o]:a}},$T=e=>t=>{const n=e?.[String(t.index)];if(Ct()(n))return t;const o=x0(ag(t),Kc(n)?n:{}),r=y0(b0(o).filter(a=>a!=null&&typeof a=="object"));return og(t,r)},L0=e=>t=>S0($T(Kc(e)?e:{}),Kc(t)?t:{}),VT=e=>{const t=x0(ag(null),Kc(e)?e:{});return y0(b0(t).filter(n=>n!=null&&typeof n=="object"))},zT=e=>t=>{const n=ai("i",e),o=ai("items",t),r=BT(Wc()(rg),e),a=x0(HT(t),r);let i=y0(b0(a).filter(l=>l!=null&&typeof l=="object"));if(Nt()(n)||(i=Jt()("items",L0(n??{})(o),i)),i=og(t,i),!!AT()([zr()("ql"),Ze()("qd",!0),()=>!Ct()(n)])(e)){const l=S0(VT,n??{});return Jt()("originalItemProgress",l,i)}return i},_T=(e,t)=>{const n=ai("lessons",t),o=a=>{const i=ai(String(a.index),n);return Ct()(i)?a:zT(i??{})(a)};if(Nt()(n))return e;const r=DT({lessons:a=>S0(o,a)},e);return Jt()("percentComplete",kn()(0,"p",t),r)},UT={vp:["audioVideoPlayhead",Number],n:["correctlyAnswered",Ee()],c:["isComplete",ii],k:["isCorrect",ii],is:["isSubmitted",ii],v:["isViewed",ii],i:["items",L0],pv:["percentViewed",Ee()],m:["matches",Ee()],sr:["response",Ee()],r:["retryAttemptCount",Number],s:["selectedIndex",Ee()],x:["selectedIndices",Ee()],sa:["shuffledAnswerIndices",Ee()],t:["text",Ee()]};var GT=p(39906),bo=p.n(GT),WT=p(88120),ig=p.n(WT);const cg=vo(),KT=ig(),lg=Cs(),T0=qn(),k0=sg(),I0=Ye(),QT=ft(),YT=e=>e!=null&&typeof e=="object",dg=e=>!!bo()(Ct(),Nt())(e),ZT=e=>t=>Ct()(t)?t:e(t),ug={activeIndex:["a",Ee()],audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",Ee()],currentTime:["t",Ee()],isComplete:["c",Number],passingScore:["ps",Ee()],percentComplete:["p",Ee()],percentViewed:["v",Ee()],retryAttempts:["r",Ee()],score:["s",Ee()],questionsDrawn:["qd",Ee()],questionList:["ql",ZT(ft()(ft()(Ee())))],reportResults:["rr",Ee()],passed:["pq",Ee()],timeRemaining:["qt",Number]},XT=(e,t)=>{const[n,o]=mg[t];return{[n]:o(e)}},qT=e=>{const t=cg(Wc()(mg),e),n=KT(Nt(),t),o=k0(T0(lg(XT,n)).filter(r=>r!=null&&typeof r=="object"));return Nt()(o)?o:Vr()(String(I0("index",e)),o)},hg=e=>{const t=QT(qT,YT(e)?e:{});return k0(T0(t).filter(n=>n!=null&&typeof n=="object"))},JT=(e,t)=>{const[n,o]=ug[t];return{[n]:o(e)}};function e8(e){const t=I0("items",e),n=I0("index",e),o=dg(t)?t:hg(t??{}),r=k0(T0(lg(JT,cg(Wc()(ug),e))).filter(i=>i!=null&&typeof i=="object")),a=dg(o)?r:Jt()("i",o,r);return Vr()(String(n),a)}const t8=e=>Vr()("p",kn()(0,"percentComplete",e)),mg={audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",Ee()],isComplete:["c",Number],isCorrect:["k",Number],isSubmitted:["is",Ee()],isViewed:["v",Number],items:["i",hg],matches:["m",Ee()],percentViewed:["pv",Ee()],retryAttemptCount:["r",Number],selectedIndex:["s",Ee()],selectedIndices:["x",ft()(Number)],shuffledAnswerIndices:["sa",ft()(Number)],text:["t",Ee()],response:["sr",Ee()]},n8=e=>`${Ne("CDN_USER_CONTENT_URI")}/${e}`,s8=()=>!!window.shareId,fg=()=>!!window.contentId,pg=()=>!!window.snapshotId,o8=()=>!!window.shareId&&!!window.hasPassword,r8=fg()?jT:e=>e,a8={fetch:()=>E0.isExport?.()||window.courseData||window.course?OS(k1,{}):t0({method:"GET",url:window.shareId?`${Ne("RISE_RUNTIME_URI")}/boot/share/${window.shareId}`:fg()?`${Ne("RISE_RUNTIME_URI")}/boot/businessContent/${window.contentId}`:pg()?`${Ne("RISE_RUNTIME_URI")}/boot/snapshot/${window.snapshotId}`:`${Ne("RISE_RUNTIME_URI")}/boot/${window.courseId}`,json:!0,withCredentials:!0,timeout:3e4}).then(z9).then(t=>typeof t=="object"?t:k1(t)).then(r8),fetchPartnerContent:e=>E0.isExport?.()||window.partnerContent?window.partnerContent.content:ET(e).toPromise(),getEnv:Ne,isPasswordProtected:o8,isShare:s8,isSnapshotPreview:pg,resolvePath:n8,verifySharePassword:e=>t0({method:"POST",url:`${Ne("RISE_RUNTIME_URI")}/password`,data:{shareId:window.shareId,password:e},json:!0}).then(t=>t.body)},i8=(e,{id:t,type:n,...o})=>n==="quiz"?NS(e,{id:t,...o}):L1(e,t),c8=(e,t)=>e+((t||{}).c||0),l8=(e,t)=>(n,{id:o,type:r,...a})=>t.lessons[o]?{...n,...e(i8(t,{id:o,type:r,...a}).lessons[o])}:n,d8=(e,t,n)=>{const o=t.reduce(l8(e,n),{}),r=Object.keys(n.lessons||{}).length,a=Object.values(o).reduce(c8,0),i=Math.round(a/r*100);return{lessons:o,p:i}};window.Rise=Object.assign(window.Rise||{},{completeLessons:d8,decodeCourseProgress:_T,encodeCourseProgress:t8,encodeLessonProgress:e8});const E0={...a8,...window.Runtime??{}},Le=E0,u8=e=>Le.getMasteryScore!=null?Le.getMasteryScore(e):e.passingScore,h8=e=>{if(Le.onCreateHistory!=null)return Le.onCreateHistory(e)},gg=(e={},t)=>Le.fetch!=null?Promise.resolve(t==null?Le.fetch():Le.fetch(t)):Promise.resolve(e),m8=(e=[])=>{if(Le.fetchPartnerContent!=null)return Le.fetchPartnerContent(e)},f8=e=>{if(Le.bookmark!=null)return Le.bookmark(e)},vg=e=>Le.getProgress!=null?Le.getProgress(e):e,p8=e=>Le.setLessonComplete!=null?Le.setLessonComplete(e):e,g8=e=>Le.setLessonProgress!=null?Le.setLessonProgress(e):e,v8=(e,t)=>Le.setCourseProgress!=null?Le.setCourseProgress(e,t):e,C8=e=>{if(Le.finish!=null)return Le.finish(e)},Cg=(e,t,n,o)=>{Le.finishQuiz!=null&&Le.finishQuiz(e,t,n,o)},x8=(e,t,n,o)=>{Le.finishStoryline!=null&&Le.finishStoryline(e,t,n,o)},xg=()=>Le.isComplete!=null?Le.isComplete():null,b8=()=>Le.isExport!=null?Le.isExport():!1;function bg(){if(Le.isExport!=null){const e=window.partnerContent?.content;return Le.isExport()&&!!e}return!1}const N0=()=>Le.isShare!=null?Le.isShare():!1,y8=()=>Le.isSnapshotPreview!=null?Le.isSnapshotPreview():!1,yg=()=>Le.isPasswordProtected!=null?Le.isPasswordProtected():!1,Sg=e=>{const t=e||"";return Le.resolvePath!=null?t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:Le.resolvePath(t):t.startsWith("data:")||t.startsWith("http")||t.startsWith("//")?t:`/${t}`},S8=e=>Le.verifySharePassword!=null?Le.verifySharePassword(e):Promise.resolve({isValid:!0}),Lg=e=>{if(Le.reportAnswer!=null){const{id:t,isCorrect:n,isUnfinished:o=!1,item:r,itemProgress:a,duration:i,retryAttempts:c,title:l}=e,{id:d,title:h,type:m}=r;return Le.reportAnswer({id:t,type:m,isCorrect:n,itemId:d,questionTitle:Tn(h),quizTitle:Tn(l),retryAttempts:c,answers:d9(r),correctResponse:u9(r),response:h9({isUnfinished:o,item:r,itemProgress:a}),isUnfinished:o,latency:l9(i)})}return!1},Tg=e=>{if(Le.startLesson!=null)return Le.startLesson(e)},L8=()=>{if(Le.getLocale!=null)return Le.getLocale()},T8=e=>{if(Le.setLocale!=null)return Le.setLocale(e)},{browser:kg,os:Ig}=new Zo.UAParser(window.navigator.userAgent).getResult(),k8=e=>{if(Le.sendTelemetry!=null)return Le.sendTelemetry({...e,browser:{name:kg.name??"",version:kg.version??""},os:{name:Ig.name??"",version:Ig.version??""}})};var Eg=p(70080),I8=p(99931),E8=p(99914),N8=p(35450),j8=p(93063),w8=p(56747),j0=p(29411),w0=p(211),A8=p(47688);Eg.A.register(I8.A),Eg.A.register(E8.A);function Ur(...e){try{return(0,N8.Ay)(...e)}catch{return null}}const ts=(e,t)=>{const n=Ur(t);return n==null?null:(0,w0.A)((0,j0.jh)(n,Ur("#ffffff"),e),{format:"hex",collapse:!1})},A0=e=>ts(.9,e);var R8=p(51962),en=p.n(R8),P8=p(23492),M8=p.n(P8),O8=p(78399),R0=p.n(O8),Gt=p(4898);const B8=Me()(xo()(".svg"),e=>e??"",kn()("","originalUrl")),D8=Xn()(B8,Pe()({width:"500rem"}),Pe()({})),yo=e=>{if(e){const t=e.trim();if(t!==""&&t!=='""')return e}return""},Ng=e=>yo(e)||void 0,jg=e=>e?"img":void 0,wg=e=>Lt()(kn()("","originalUrl"),t=>t??"",R0()("."),Hc(),en()(e)),F8=wg("svg"),ule=wg("gif"),H8=/\.svg$/i,Ag=e=>H8.test(e),$8=null,hle=e=>$8[e]||"left",V8=(e,t)=>{const n=M8()(e,t);return n.media.image.key===t.media.image.key&&Object.assign(n.media.image,{crushedKey:t.media.image.key,useCrushedKey:!0}),n},z8=({src:e,alpha:t})=>({alpha:t,media:{image:{key:_8(e),src:e}}}),_8=e=>typeof e!="string"?"":e.startsWith("http")?new URL(e).pathname.slice(1):e,U8=(({coverImageAlpha:e,coverImage:t})=>({alpha:e,src:t})),G8=(({lessonHeaderImageAlpha:e,lessonHeaderImage:t})=>({alpha:e,src:t})),Rg=(e,t)=>(n,o)=>{const r=n[t];if(n?.theme){const a=o?o(r?.media):r?.media;if((0,Gt.uW)(a))return r;const i={...r,media:{...a}},c=z8(e(n.theme));return V8(i,c)}else return r},Pg=Rg(U8,"coverImage"),Mg=Rg(G8,"lessonHeaderImage"),mle=async e=>{const t=new Image;return t.src=e,await t.decode(),t};function ns(e){return Mn()(e)}class W8 extends Error{constructor(t="Assert Error",n){super(t,n)}}function fle(e,t="Assertion Error"){if(!e)throw new W8(t)}const te={RISE_CLASSIC:"classic",APEX:"organic",HORIZON:"imaginative"},K8="#ff631e",ple=3,gle=17,vle=32,Cle=24,xle=50,ble=.6,yle="right",Q8="rounded",Y8=[{color:"#4baaf4",name:"Sky"},{color:"#285f9f",name:"Blueberry"},{color:"#7837a8",name:"Jelly"},{color:"#d84738",name:"Cherry"},{color:"#ff631e",name:"Tangerine"},{color:"#25bb64",name:"Basil"}],Sle="#ffffff",Lle=Zu()("color",Y8),Tle="#000",kle="#fff",Ile="Rise",se=ns({ACCENT:null,BLACK:null,COLOR:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),ci=ns({LARGE:null,MEDIUM:null,SMALL:null}),Qc=ns({STEPPED:null,CONTINOUS:null}),P0=Mn()({NUMBERS:null,DOTS:null,NONE:null}),rr=ns({COMPACT:null,OVERLAY:null,SIDEBAR:null}),$s=Mn()({DARK:null,DARK_IMAGE:null,LIGHT:null,LIGHT_IMAGE:null}),ar=Mn()({DARK:null,DARK_ACCENT:null,DARK_IMAGE:null,LIGHT:null,LIGHT_ACCENT:null,LIGHT_IMAGE:null}),So={FREE:"free",RESTRICTED:"restricted"},ir=Mn()({ACCENT:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),qe=Mn()({THEME_DEFAULT:null,CIRCULAR_FILL:null,INCOMPLETE_COMPLETE:null}),li=ns({ACCENT:null,DARK:null,LIGHT:null,TINT:null}),Vs=ns({FULL:null,FLOATING:null,FLOATING_FULL:null}),de=ns({ACCENT:null,CENTERED:null,CENTERED_ACCENT_TINT:null,CENTERED_OVERLAY:null,CENTERED_IMAGE:null,IMAGE:null,LEFT:null,LEFT_OVERLAY:null,SPLIT_LEFT:null,SPLIT_LEFT_IMAGE:null,SPLIT_RIGHT:null,SPLIT_RIGHT_IMAGE:null,TWO_THIRDS_LEFT_IMAGE:null,TWO_THIRDS_RIGHT_IMAGE:null,VIDEO:null,WHITE:null}),di=ns({TOP_LEFT:null,TOP_RIGHT:null,BOTTOM_LEFT:null,BOTTOM_RIGHT:null}),Z8={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right"},Ele=!0,X8=di.BOTTOM_RIGHT,Nle=[{text:"Top left",type:di.TOP_LEFT},{text:"Top right",type:di.TOP_RIGHT},{text:"Bottom left",type:di.BOTTOM_LEFT},{text:"Bottom right",type:di.BOTTOM_RIGHT}],jle={default:[{text:"Centered",type:de.CENTERED},{text:"Centered overlay",type:de.CENTERED_OVERLAY},{text:"Left",type:de.LEFT},{text:"Left overlay",type:de.LEFT_OVERLAY},{text:"Split left image",type:de.SPLIT_LEFT_IMAGE},{text:"Split right image",type:de.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:de.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:de.TWO_THIRDS_RIGHT_IMAGE}],classic:[{text:"Centered",type:de.CENTERED},{text:"Centered overlay",type:de.CENTERED_OVERLAY},{text:"Left",type:de.LEFT},{text:"Left overlay",type:de.LEFT_OVERLAY},{text:"Split left image",type:de.SPLIT_LEFT_IMAGE},{text:"Split right image",type:de.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:de.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:de.TWO_THIRDS_RIGHT_IMAGE}],organic:[{text:"Centered",type:de.CENTERED},{text:"Centered overlay",type:de.CENTERED_OVERLAY},{text:"Left",type:de.LEFT},{text:"Left overlay",type:de.LEFT_OVERLAY},{text:"Split left",type:de.SPLIT_LEFT},{text:"Split right",type:de.SPLIT_RIGHT},{text:"Split left image",type:de.SPLIT_LEFT_IMAGE},{text:"Split right image",type:de.SPLIT_RIGHT_IMAGE}],imaginative:[{text:"Centered",type:de.CENTERED},{text:"Centered overlay",type:de.CENTERED_OVERLAY},{text:"Centered image",type:de.CENTERED_IMAGE},{text:"Centered accent tint",type:de.CENTERED_ACCENT_TINT},{text:"Split left image",type:de.SPLIT_LEFT_IMAGE},{text:"Split right image",type:de.SPLIT_RIGHT_IMAGE},{text:"Two-thirds left image",type:de.TWO_THIRDS_LEFT_IMAGE},{text:"Two-thirds right image",type:de.TWO_THIRDS_RIGHT_IMAGE}]},wle=null,Ale=null,Rle=[{text:"Image",type:de.IMAGE},{text:"Accent",type:de.ACCENT},{text:"White",type:de.WHITE}],Gr={CLOSED:"closed",HIDDEN:"hidden",OPEN:"open"},Te=ns({AUTO:null,BLACK:null,LIGHT:null,DARK:null}),q8=ns({ROUNDED:null,SQUARED:null}),J8=Mn()({ROUNDED:null,SQUARED:null}),ek=Mn()({FLOATING:null,FULL:null}),rt=Mn()({ACCENT:null,DARK:null,LIGHT:null}),Ple=[{value:Te.AUTO,label:"Auto"},{value:Te.DARK,label:"Dark"},{value:Te.LIGHT,label:"Light"}],We={accentContrast:Te.AUTO,allowSearch:!0,animateBlockEntrance:!0,blockBackgroundColor:null,blockBackgroundColorContrast:Te.AUTO,blockBackgroundType:se.LIGHT,blockContinueCompletionType:"",blockContinueCompleteHint:"Complete the content above before moving on.",blockContinueLabel:"Continue",blockCorners:q8.ROUNDED,blockPaddingEnd:3,blockPaddingStart:3,blockTextBackgroundColor:null,blockTextBackgroundColorContrast:Te.AUTO,blockTextBackgroundType:se.LIGHT,blockTextBodyFontSize:17,blockTextHeadingFontSize:32,blockTextPaddingEnd:3,blockTextPaddingStart:3,blockTextSubheadingFontSize:24,buttonInlineStyle:J8.ROUNDED,buttonNavigationStyle:ek.FULL,buttonScheme:li.LIGHT,colorAccent:K8,compactShowLessonCount:!0,coverImageAlpha:50,coverPageType:de.SPLIT_LEFT_IMAGE,customColorLessonHeaderContrast:Te.AUTO,enableVideoPlaybackSpeed:!0,lessonHeaderImageAlpha:.6,lessonHeaderImageColor:rt.DARK,lessonHeaderSize:ci.MEDIUM,lessonHeaderStyle:se.LIGHT,markLessonsComplete:!1,navigation:!0,navigationRestricted:!1,navigationSectionsExpanded:!0,navigationStyle:$s.LIGHT,navigationType:rr.SIDEBAR,progressIndicatorStyle:qe.THEME_DEFAULT,showAuthor:!0,showLessonCount:!0,showNavigationButtons:!0,showStartButton:!0,sidebarStartsOpen:!0,themeId:te.RISE_CLASSIC},Mle=null,tk=["bodyTypeface","coverImage","experiments","headingTypeface","lessonHeaderImage","media","theme","uiTypeface"],nk=e=>e.theme?.colorAccent||e.color||We.colorAccent,Og=e=>e.theme?.navigationRestricted??We.navigationRestricted?So.RESTRICTED:So.FREE,Bg=e=>e.theme?.sidebarStartsOpen??We.sidebarStartsOpen?Gr.OPEN:Gr.CLOSED,sk=e=>e.theme?.showLessonCount??e.showLessonCount??We.showLessonCount,ok=({sidebarMode:e})=>e!==Gr.HIDDEN,rk=({navigationMode:e})=>e===So.RESTRICTED,ak=({sidebarMode:e})=>e===Gr.OPEN,ik=e=>e.coverImage?.media?.image?$s.LIGHT_IMAGE:$s.LIGHT,ck=e=>e.coverImage?.media?.image?de.LEFT_OVERLAY:de.LEFT,zs=(e,t)=>t[e]??t.theme?.[e]??We[e],Dg=e=>{const t=Bg(e),n=Og(e),o={allowSearch:zs("allowSearch",e),animateBlockEntrance:zs("animateBlockEntrance",e),bodyTypefaceId:e.bodyTypefaceId,colorAccent:(e.color||"").toLowerCase(),compactShowLessonCount:zs("compactShowLessonCount",e),coverImageDefault:null,coverPageType:ck(e),enableVideoPlaybackSpeed:zs("enableVideoPlaybackSpeed",e),headingTypefaceId:e.headingTypefaceId,markLessonsComplete:zs("markComplete",e),navigation:ok({sidebarMode:t}),navigationSectionsExpanded:zs("navigationSectionsExpanded",e),navigationRestricted:rk({navigationMode:n}),navigationStyle:ik(e),showAuthor:zs("showAuthor",e),showLessonCount:zs("showLessonCount",e),showNavigationButtons:zs("showNavigationButtons",e),sidebarStartsOpen:ak({sidebarMode:t}),uiTypefaceId:e.uiTypefaceId},r={...We,...o};return{...e,theme:{...r,isLegacyCourse:!0}}},M0=e=>{const t=nk(e),n={allowSearch:e.theme?.allowSearch??We.allowSearch,animateBlockEntrance:e.theme?.animateBlockEntrance??We.animateBlockEntrance,buttonNavigationStyle:e.theme?.buttonNavigationStyle??We.buttonNavigationStyle,buttonScheme:e.theme?.buttonScheme??We.buttonScheme,color:t,colorAccentTint:t?A0(t):void 0,coverImage:Pg(e),coverPageType:e.theme?.coverPageType??We.coverPageType,enableVideoPlaybackSpeed:e.theme?.enableVideoPlaybackSpeed??We.enableVideoPlaybackSpeed,lessonHeaderImage:Mg(e),lessonHeaderSize:e.theme?.lessonHeaderSize??We.lessonHeaderSize,lessonHeaderStyle:e.theme?.lessonHeaderStyle??We.lessonHeaderStyle,markComplete:e.theme?.markLessonsComplete??We.markLessonsComplete,navigation:e.theme?.navigation??We.navigation,navigationSectionsExpanded:e.theme?.navigationSectionsExpanded??We.navigationSectionsExpanded,navigationMode:Og(e),navigationRestricted:e.theme?.navigationRestricted??We.navigationRestricted,navigationStyle:e.theme?.navigationStyle??We.navigationStyle,navigationType:e.theme?.navigationType??We.navigationType,progressIndicatorStyle:e.theme?.progressIndicatorStyle??qe.THEME_DEFAULT,themeId:e.theme?.themeId??We.themeId,showAuthor:e.theme?.showAuthor??We.showAuthor,showLessonCount:sk(e),showStartButton:e.theme?.showStartButton??We.showStartButton,sidebarMode:Bg(e),sidebarStartsOpen:e.theme?.sidebarStartsOpen??We.sidebarStartsOpen,showNavigationButtons:e.theme?.showNavigationButtons??We.showNavigationButtons};return{...e,...n}},lk=({course:e,updates:t})=>{const n=Object.fromEntries(Object.entries(t||{}).filter(([r])=>tk.includes(r))),o={...e,...n};return M0(o)},dk={padding:"medium",alignment:"left"},uk={embed:{aspectRatio:"16:9"},video:{},labeledgraphic:{hotspotStyle:"numbers"},process:{navigation:"stepped"},sorting:{feedback:"immediate"},timeline:{orientation:"vertical"},paragraph:{fontSize:"medium"}},ss=(e,t=0)=>`item_${e}_${t}`,Yc=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),hk=e=>z1.some(t=>t===e),Fg=e=>Yc(e)&&(typeof e.id=="string"||typeof e.id=="number")&&hk(e.type),ui=e=>Array.isArray(e)?e.filter(Yc):[],Hg=(e,t)=>[{id:ss(`${t}_placeholder`,0),placeholder:!0,type:e,title:`Add ${e} content`}],cr=e=>({...dk,...uk[e]??{}}),mk=e=>typeof e=="string"?e.replace(/<p><br><\/p>/g,""):e,$g=e=>e.map(t=>{if(t&&typeof t=="object"&&!Array.isArray(t)){const n={};for(const[o,r]of Object.entries(t))n[o]=mk(r);return n}return t}),fk=e=>["Introduction","Summary"].map((t,n)=>({id:ss(`${e}_process`,n),title:t,type:t.toLowerCase(),description:null,isHidden:!0})),pk=(e,t)=>[{id:ss(`${t}_text`,0),paragraph:e}],gk=(e,t)=>[...fk(t),...e],vk=(e,t)=>[{id:ss(`${t}_video`,0),caption:"",media:e}],Ck=(e=[],t)=>({family:"multimedia",id:ss(`${t}_embed`,0),items:e.length?e:Hg("embed",t),media:{},settings:cr("embed"),type:"multimedia",variant:"embed"}),xk=(e,t,n)=>({family:"interactive-fullscreen",id:ss(`${n}_labeledgraphic`,0),items:e,media:t,settings:cr("labeledgraphic"),type:"interactive",variant:"labeledgraphic"}),bk=(e,t)=>({family:"interactive-fullscreen",id:ss(`${t}_process`,0),items:$g(e),media:{},settings:cr("process"),type:"interactive",variant:"process"}),yk=({items:e,piles:t},n)=>({family:"interactive-fullscreen",id:ss(`${n}_sorting`,0),items:e,media:{},piles:t,settings:cr("sorting"),type:"interactive",variant:"sorting"}),Sk=(e,t)=>({family:"text",id:ss(`${t}_text`,0),items:$g(e),settings:cr("paragraph"),type:"text",variant:"paragraph"}),Lk=(e,t)=>({family:"interactive-fullscreen",id:ss(`${t}_timeline`,0),items:e,media:{},settings:cr("timeline"),type:"interactive",variant:"timeline"}),Tk=(e,t={},n)=>({family:"multimedia",id:ss(`${n}_video`,0),items:Yc(e)&&e.video?vk(e,n):Hg("video",n),media:{},settings:{...Yc(t)?t:{},...cr("video")},type:"multimedia",variant:"video"}),kk=(e,t)=>{const n=ui(e.items);return Ck(n.map(({icon:o,...r})=>r),t)},Ik=(e,t)=>xk(ui(e.items).map(({hasMedia:n,...o})=>o),e.media,t),Ek=(e,t)=>{const n=ui(e.items).map(o=>({...o,isHidden:!1,type:"step"}));return bk(gk(n,t),t)},Nk=(e,t)=>Lk(ui(e.items).map(({linePosition:n,...o})=>o),t),jk=(e,t)=>Sk(pk(e,t),t),wk=(e,t)=>{const n=e.type;switch(n){case"embed":return kk(e,t);case"map":return Ik(e,t);case"process":return Ek(e,t);case"sorting":return yk({items:ui(e.items),piles:e.piles},t);case"timeline":return Nk(e,t);case"screencast":case"slidecast":case"video":return Tk(e.media,e.settings,t);default:throw new Error(`Unknown legacy lesson type: ${n}`)}},Ak=e=>Fg(e),Rk=e=>{if(!Fg(e))return e;const t=String(e.id),n={description:"",icon:"Article",type:"blocks"},o=[wk(e,t)],r=typeof e.description=="string"?e.description.trim():"";return r&&o.unshift(jk(r,`${t}_desc`)),{...e,...n,items:o,media:{}}},Vg=e=>`rise/rise-com/${e}`,zg=Vg("FAVORITE_ADDED"),_g=Vg("FAVORITE_REMOVED"),Pk=()=>(0,fe.action)(zg,void 0),Mk=()=>(0,fe.action)(_g,void 0),Ug=(e=>`rise/partnerContent/${e}`)("SET_ALL_PARTNER_CONTENT"),lr=(e=>`rise/status/${e}`)("SET_LOADED"),Ok=(e,t)=>({...e,...t}),Bk={connection:"connected",courseLoaded:!1,fatalError:!1,fontsLoaded:!1,notFound:!1,partnerContentLoaded:!1},Dk=(0,fe.handle)(Bk,{[lr]:Ok}),Fk=(e=!1)=>(0,fe.action)(lr,{fontsLoaded:e}),Hk=(e=!1)=>(0,fe.action)(lr,{courseLoaded:e}),$k=(e=!1)=>(0,fe.action)(lr,{coverLoaded:e}),Vk=(e=!1)=>(0,fe.action)(lr,{notFound:e}),zk=(e=!1)=>(0,fe.action)(lr,{fatalError:e}),Gg=(e=!1)=>(0,fe.action)(lr,{partnerContentLoaded:e}),_k=(e=[],t)=>t?.partnerContentId?e.concat(t.partnerContentId):e,Uk=(e,t)=>t?.items?.reduce(_k,e)??e,Gk=(e,t)=>t?.items?.reduce(Uk,e)??e,Wk=({course:e,lessons:t})=>{const n=t?.reduce(Gk,[])||[],o=e?.partnerContentId||null,r=o?[o]:[],a=new Set([...n,...r]);return Array.from(a)},Kk=e=>typeof e=="string"&&e.length>0,Dle=`${Ne("CDN_URI")}/assets/rise/assets/themes/thumbnails/sample-avatar.jpeg`,Fle=Mn()({ACTIVE:null,PREVIEW:null}),Hle=({themeCoverImage:e,coverImageDefault:t})=>Kk(t)?t:e,Qk=e=>({...e,theme:{...e?.theme,hideLessonHeaders:e?.theme?.hideLessonHeaders??!1,showStartButton:e?.theme?.showStartButton??!0}}),hn={DRAW_FROM_QUESTION_BANK:"DRAW_FROM_QUESTION_BANK",FILL_IN_THE_BLANK:"FILL_IN_THE_BLANK",MATCHING:"MATCHING",MULTIPLE_CHOICE:"MULTIPLE_CHOICE",MULTIPLE_RESPONSE:"MULTIPLE_RESPONSE"},dr={SUMMARY:"SUMMARY",REMAINING:"REMAINING",ELAPSED:"ELAPSED",ELAPSED_TOTAL:"ELAPSED_TOTAL",HIDE_TIMER:"HIDE_TIMER"},Yk={CONTINUE:"continue",NONE:""},Ae={ALL:"all",NONE:"none",INCORRECT:"incorrect"},$le=10,Vle=80,zle=500;var _le;const Zk=un()([[p0()([en()(!0),en()(Ae.ALL)]),Pe()(Ae.ALL)],[p0()([en()(!1),en()(Ae.NONE)]),Pe()(Ae.NONE)],[en()(Ae.INCORRECT),Pe()(Ae.INCORRECT)],[tr(),Pe()(Ae.ALL)]]),Ule="draw from question bank",Gle="fillin",Wle="matching",Kle="multiple choice",Qle="multiple response",Yle=null;var Xk=p(47874),O0=p.n(Xk);const B0={LESSON:"lesson",QUIZ:"quiz",SECTION:"section"},ur={KNOWLEDGE_CHECK:"KNOWLEDGE_CHECK",ORDER:"ORDER",QUIZ:"QUIZ"},In=(e,t)=>`/lessons/${encodeURIComponent(e)}${t?`/${encodeURIComponent(t)}`:""}`,Wg="/lessons/progress-summary",D0="lesson:",Zc="#/lessons/",F0="/lessons/",Zle=e=>`${Zc}${e}`,Xle=e=>e.startsWith(D0)||e.startsWith(Zc)||e.startsWith(F0),qle=e=>e.startsWith(D0)?e.slice(D0.length):e.startsWith(Zc)?e.slice(Zc.length).split("/")[0]:e.startsWith(F0)?e.slice(F0.length).split("/")[0]:e,qk=e=>e.type===B0.SECTION,Jk=e=>e.type===B0.QUIZ,eI=e=>e.settings?.passToContinue===!0,Kg=e=>e?.items?.find(t=>t.family==="knowledgeCheck"&&t.settings?.requireCorrectAnswer),Wr=e=>e!=null&&(e.type!=="quiz"||e.settings?.asLesson!==!1),tI=e=>e!=null&&e.type==="blocks",nI=e=>{const t=O0()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.reduce((n,o)=>(o!=null&&n.push(sI(o)),n),[])),t},sI=e=>{const t=O0()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.filter(Boolean)),t};var oI=p(69098),rI=p.n(oI);const Qg="^1.7.0";class H0 extends Error{}function aI(e){try{if(e==null)return;if(typeof e!="object"||!("version"in e)||typeof e.version!="string")throw new H0("Missing Runtime.version");if(!rI()(e.version,Qg))throw new H0(`Runtime.version ${e.version} does not satisfy ${Qg}`)}catch(t){console.warn(t)}}const Kr="rise/course/LOAD_COURSE",iI="rise/course/UPDATE_COMPLETED_AT",Xc="rise/course/UPDATE_COURSE_PREVIEW",Yg="rise/course/UPDATE_LESSON_PREVIEW",$0="rise/course/APPLY_CHANGESET";let V0;(async()=>{try{({applyReviewDataToManifest:V0}=await p.e("webpack_container_remote_mondrian_learn-react").then(p.t.bind(p,4246,23)))}catch{}})();const hi=F4(),cI=e=>{if("settings"in e&&e.settings&&Zt(e.settings)&&"revealAnswers"in e.settings){const n=e.settings;return{...e,settings:{...e.settings,revealAnswers:Zk(n.revealAnswers)}}}return e},lI=e=>tI(e)?nI(e):e,Zg=e=>lI(cI(e)),dI=e=>({...e,lessons:e.lessons?.map(Zg)||[]}),uI=e=>{const t=e.lessons?.filter(n=>n.type!=="section")||[];return{...e,lessonsOnly:t}},hI=e=>e.theme==null,mI=e=>M0(Dg(e)),fI=e=>hI(e)?mI(e):M0(e),pI=e=>Qk(fI(e)),gI=(e,t)=>{let n=(0,Fr.TJ)(["course"],t,e).result;const o=(0,Fr.TJ)(["lessons"],t,n.lessons).result;return t.some(r=>r.path[0]==="mondrian")&&n.mondrian&&V0&&(n={...n,mondrian:V0(n.mondrian,t)}),{...n,lessons:o}},vI=e=>({...e,lessons:e.lessons?.map(Rk)||[]}),CI=(e,{completedAt:t,course:n,favoritedAt:o,riseComCurrentUser:r,riseComCourseId:a,riseComEnrollmentType:i,riseComLearningPathId:c})=>{const l=dI(n),d=uI(l),h={...d,theme:d.theme??Dg(d).theme};return{...pI(h),completedAt:t,favoritedAt:o,riseComCourseId:a,riseComEnrollmentType:i,riseComCurrentUser:r,riseComLearningPathId:c}},xI=e=>({...e,favoritedAt:new Date}),bI=e=>({...e,favoritedAt:null}),yI=e=>({...e,completedAt:new Date().toISOString()}),SI={[zg]:xI,[_g]:bI,[Kr]:CI,[iI]:yI,[Xc]:(e,{course:t})=>t,[Yg]:(e,{lessons:t})=>({...e,lessons:t.map(Zg)}),[$0]:gI},LI=(0,fe.handle)({},SI),Xg=e=>t=>{NI(t)?e(Vk(!0)):t instanceof H0&&(e(zk(!0)),console.error(t))},TI=e=>t=>t([{type:Ug,payload:e},Gg(!0)]),kI=Yo().fromPromise(async(...e)=>await m8(...e)),II=e=>e.length===0?Gg(!0):kI(e).map(TI),EI=e=>qc(e)===401||z0(e)&&qc(e.response)===401,NI=e=>qc(e)===404||z0(e)&&qc(e.response)===404,qc=e=>z0(e)?e.status??e.statusCode:void 0,z0=e=>e!=null&&typeof e=="object",jI=e=>t=>{const{course:n}=t,o=vI(n),r=Wk({course:o,lessons:o.lessons});e([hi(Kr,{...t,course:o,_originalLessons:n.lessons}),Hk(!0),II(r)])},wI=e=>async t=>{let n;try{aI(window.Runtime),n=e?.password!=null?await gg(void 0,{password:e.password}):await gg()}catch(o){if(e?.onUnauthorized!=null&&EI(o)){e.onUnauthorized();return}e?.onError?.(),await Xg(t)(o);return}e?.onAuthorized?.();try{jI(t)(n),k8(n)}catch(o){await Xg(t)(o)}},AI=hi(Kr),RI=hi(Xc),PI=hi(Yg),MI=hi($0),OI=(e,{labelSet:t})=>({...e,...t}),BI=(0,fe.handle)({},{[Kr]:OI}),_s=e=>`rise/course/${e}`,qg=_s("BLOCKS_LESSON_COMPLETE"),Jg=_s("BLOCKS_LESSON_INCREMENT_RETRY_ATTEMPT"),ev=_s("BLOCKS_LESSON_RESET"),tv=_s("BLOCKS_LESSON_RETRY_SORTING_ACTIVITY"),nv=_s("BLOCKS_LESSON_SET_ITEMS_PROGRESS"),sv=_s("BLOCKS_LESSON_SET_MEDIA_PLAY_PROGRESS"),ov=_s("BLOCKS_LESSON_SET_SORTING_ITEM_RESULT"),rv=_s("BLOCKS_LESSON_SET_SURVEY_PARTIAL"),av=_s("BLOCKS_LESSON_SET_SURVEY_SUBMITTED"),Jc=(0,fe.action)(qg),DI=(0,fe.action)(Jg),FI=(0,fe.action)(ev),HI=(0,fe.action)(tv),iv=(0,fe.action)(nv),$I=(0,fe.action)(sv),VI=(0,fe.action)(ov),zI=(0,fe.action)(rv),_I=(0,fe.action)(av),Bn=e=>`rise/course/${e}`,cv=Bn("QUIZ_LESSON_ADVANCE_STEP"),lv=Bn("QUIZ_LESSON_APPLY_SKIP"),dv=Bn("QUIZ_LESSON_CLEAR_ANSWER_SELECTION"),uv=Bn("QUIZ_LESSON_INITIALIZE_DRAWN_QUESTIONS"),hv=Bn("QUIZ_LESSON_RESTART"),mv=Bn("QUIZ_LESSON_SELECT_QUIZ_ANSWER"),fv=Bn("QUIZ_LESSON_SET_ANSWER_MATCHES"),pv=Bn("QUIZ_LESSON_SET_ANSWER_TEXT"),gv=Bn("QUIZ_LESSON_ADVANCE_TO_END"),vv=Bn("QUIZ_LESSON_SET_TIME_REMAINING"),Cv=Bn("QUIZ_LESSON_SUBMIT_ANSWER"),xv=Bn("QUIZ_LESSON_TOGGLE_ANSWER_SELECTION"),_0=(0,fe.action)(cv),UI=(0,fe.action)(gv),bv=(0,fe.action)(hv),GI=(0,fe.action)(lv),yv=(0,fe.action)(mv),Sv=(0,fe.action)(pv),Lv=(0,fe.action)(xv),WI=(0,fe.action)(vv),Tv=(0,fe.action)(fv),U0=(0,fe.action)(Cv),KI=(0,fe.action)(dv),QI=(0,fe.action)(uv),G0=e=>e&&typeof e=="object"&&e.type&&z1.includes(e.type),YI=(e,t)=>{const n=new Map;return e.forEach(o=>{if(Ak(o)){const r=t.find(a=>String(a.id)===String(o.id));r&&r.type==="blocks"&&n.set(String(o.id),String(r.id))}}),n},ZI=(e,t)=>{const n={id:String(e.id),index:e.index,type:"blocks",items:{}};return typeof e.isComplete=="boolean"&&(n.isComplete=e.isComplete),typeof e.percentComplete=="number"&&(n.percentComplete=e.percentComplete),t.type==="blocks"&&t.items&&t.items.forEach((o,r)=>{if(o?.id!=null&&(n.items[o.id]={id:o.id,index:r,isComplete:e.isComplete===!0&&r===0,items:o.items?{}:void 0},o.items&&Array.isArray(o.items))){const a={};o.items.forEach((i,c)=>{i?.id!=null&&(a[i.id]={id:i.id,index:c,isComplete:e.isComplete===!0})}),Object.keys(a).length>0&&(n.items[o.id].items=a)}}),n},XI=(e,t)=>{const n=new Set(t.map(r=>String(r.id))),o=[];return Object.values(e.lessons).forEach(r=>{G0(r)&&(n.has(String(r.id))||o.push(r))}),o},qI=(e,t,n)=>{const o={totalLegacyLessons:0,successfulMigrations:0,failedMigrations:0},r={...e,lessons:{...e.lessons}},a=XI(e,n);o.totalLegacyLessons=a.length;const i=YI(t,n),c=[];return a.forEach(l=>{try{const d=i.get(String(l.id))||String(l.id),h=n.find(m=>String(m.id)===d);if(h&&h.type==="blocks"){const m=ZI(l,h);r.lessons[String(h.id)]=m,String(l.id)!==String(h.id)&&delete r.lessons[String(l.id)],o.successfulMigrations++}else c.push(String(l.id)),o.failedMigrations++}catch(d){console.warn(`Failed to migrate legacy lesson progress for lesson ${l.id}:`,d),c.push(String(l.id)),o.failedMigrations++}}),{migratedProgress:r,orphanedLessonIds:c,migrationSummary:o}},kv=e=>Object.values(e.lessons).some(G0),Jle=e=>{let t=0,n=0;const o=[];return Object.values(e.lessons).forEach(r=>{n++,G0(r)&&(t++,o.includes(r.type)||o.push(r.type))}),{legacyCount:t,totalCount:n,legacyTypes:o,hasLegacyProgress:t>0}},JI=(e,t,n)=>{if(!kv(e))return e;const o=qI(e,t,n);return o.orphanedLessonIds.length>0&&console.warn("Some legacy lessons could not be migrated:",o.orphanedLessonIds),o.migratedProgress},W0=e=>`rise/course/${e}`,Iv=W0("BOOKMARK_LESSON"),eE=W0("LOAD_COURSE"),Ev=W0("PREVIEW_COMPLETE_PRECEDING_LESSONS"),tE=(0,fe.action)(Iv),nE=(0,fe.action)(Ev),sE={lessons:{},percentComplete:0},oE=(0,fe.handle)(sE,{[qg]:L1,[Jg]:nS,[ev]:sS,[tv]:oS,[nv]:rS,[sv]:aS,[ov]:iS,[rv]:cS,[av]:lS,[cv]:vS,[gv]:CS,[lv]:jS,[dv]:xS,[uv]:bS,[hv]:SS,[mv]:LS,[fv]:TS,[pv]:yS,[vv]:kS,[Cv]:IS,[xv]:ES,[Iv]:aE,[eE]:rE,[Ev]:iE});function rE(e,t){const n=t.course?.lessons??[],o=t._originalLessons??n,r=vg(hE(n));if(typeof r!="object"||r===null)return e;const a={...e,...r};return kv(e)&&o!==n?JI(a,o,n):a}function aE(e,t){return f8(t),{...e,currentLesson:t}}function iE(e,{targetLessonId:t,lessons:n}){const o=e.lessons[t];if(!o)return e;let r=o.index;for(const i of n){if(i.type!=="quiz")continue;const c=e.lessons[i.id];if(!c||c.index>=r)continue;const l=i.settings;if(!l?.skipLessonsIfPassed||!l.skipToLessonId)continue;const d=e.lessons[l.skipToLessonId];d&&d.index>r&&(r=d.index)}const a=Object.fromEntries(Object.entries(e.lessons).map(([i,c])=>c.index>=r||c.isComplete?[i,c]:[i,cE(c)]));return{...e,lessons:a}}function cE(e){return xs(e)?a0(e):dn(e)?lE(e):e}function lE(e){const t=Object.fromEntries(Object.entries(e.items??{}).map(([o,r])=>[o,{...r,isComplete:!0,isCorrect:!0}])),n=Object.keys(t).length;return{...e,items:t,activeIndex:n+1,isComplete:!0,passed:!0,passingScore:e.passingScore??80,percentComplete:100,reportResults:!0,score:100}}const dE=({index:e,lessonId:t,settings:n,type:o})=>o==="quiz"?{id:t,index:e,type:o,items:{},passingScore:Number(n?.passingScore??80)}:{id:t,index:e,type:"blocks",items:{}};function uE(e){return e.type==="quiz"&&"settings"in e}function hE(e){return{lessons:e.reduce((n,o,r)=>uE(o)?Nv({index:r,items:o.items,lessonId:o.id,lessonProgress:n,settings:o.settings,type:o.type}):o.type==="blocks"||o.type==="slide"?Nv({index:r,items:o.items,lessonId:o.id,lessonProgress:n,type:"blocks"}):n,{})}}function Nv(e){const{lessonId:t,index:n,items:o,lessonProgress:r={},settings:a,type:i}=e,c=dE({lessonId:t,index:n,settings:a,type:i});if(o.length===0)return{...r,[t]:c};const l=i==="quiz"?fE(o):mE(o);return{...r,[t]:{...c,items:l}}}function mE(e){return e.reduce((t,n,o)=>{const r=n.id,a=n.items??[],i=Q9(a);return t[r]={id:r,index:o,items:i},t},{})}function fE(e){return e.reduce((t,n,o)=>(t[n.id]={id:n.id,index:o},t),{})}var pE=p(65191),Qr=p.n(pE),gE=p(62981),vE=p.n(gE),ede=p(55066),jv,wv;const K0=5e3,CE=ft()(Ku()(Jn())(":n3,n4,i4,n7,n9")),xE=Me()(Qr()(","),Wc()),bE=(e,t)=>{const n=new FontFace(t.name,e,{family:t.name,style:t.style,weight:t.weight});return n.load().then(()=>document.fonts.add(n))},yE=(e,t)=>{const n=document.createElement("style");return n.innerText=`@font-face { font-family: '${t.name}'; src: ${e}; font-weight: ${t.weight}; font-style: ${t.style}; }`,document.head.appendChild(n),new(vE())(t.name,{style:t.style,weight:t.weight}).load()},SE=e=>{const t=`url(${Q4(e)}) format('woff')`;return("fonts"in document?bE:yE)(t,e)},Av=(e,t)=>{const n=Promise.all(e.map(SE));let o;const r=new Promise(a=>{o=setTimeout(a,K0)});return Promise.race([n,r]).catch(a=>{console.error("Failed to load learn course fonts:",{fonts:e,error:a.message||a})}).finally(()=>{clearTimeout(o),t()})},nde=({baseUri:e,typefaces:t,onLoad:n,onError:o})=>{const r=jv(t).join(", ");return wv.load({active:n,fontinactive:(a,i)=>{console.error("Individual font failed to load:",{familyName:a,fvd:i,typefaces:t})},inactive:()=>{console.error("Failed to load course fonts:",{typefaces:t,typefaceList:r}),o?.(),n?.()},timeout:K0,custom:{families:CE(jv(t)),urls:[`${e}/course_fonts.css?typefaceIds=${xE(t)}`]}})},sde=()=>wv.load({google:{families:["Noto Sans Myanmar:300,400,500,600,700"]},timeout:K0}),LE=(e,{fonts:t})=>[...e,...t],TE=(e,{fonts:t})=>t,kE=(0,fe.handle)([],{[Kr]:LE,[Xc]:TE}),IE=e=>t=>{Av(e,()=>{t(Fk(!0))})},EE={isPreview:window.viewType==="preview"},Rv=((e=EE)=>e);p.dn(Rv);const Pv="rise/l10n/TOGGLE_LOCALE_SELECTOR",Mv=(e,{l10n:t})=>t?{...e,...t}:e,NE=(e,t)=>(0,Fr.TJ)(["l10n"],t,e).result,Q0=(0,fe.action)(Pv),jE=(e,t)=>e&&{...e,...!t&&{localeSelectorOptions:void 0},showLocaleSelector:t},wE=(0,fe.handle)(null,{[Kr]:Mv,[Xc]:Mv,[$0]:NE,[Pv]:jE});var AE=p(4051),Y0=p.n(AE);const RE=Y0()(2,e=>c0()((0,fe.error)(e),(0,fe.action)(e))),{RiseDotCom:Us}=window,mi=e=>Us&&Us[e],Ov=e=>Promise.reject(new Error(`RiseDotCom.${e} is unavailable`)),PE=()=>{mi("exit")&&Us?.exit?.()},Bv=(...e)=>{mi("on")&&Us?.on?.(...e)},Dv=(...e)=>{mi("off")&&Us?.off?.(...e)},ME=(...e)=>{mi("goToLearn")&&Us?.goToLearn?.(...e)},OE=(...e)=>Us?.downloadCertificate?.(...e)??Ov("downloadCertificate"),BE=(...e)=>{if(mi("downloadCertificateCancel"))return Us?.downloadCertificateCancel?.(...e)},DE=(...e)=>Us?.fetchLpUpNext?.(...e)??Ov("fetchLpUpNext"),Fv="rise/learningPathUpNext/FETCH_LP_UP_NEXT",Hv="rise/learningPathUpNext/FETCH_LP_UP_NEXT_PENDING",FE={isPending:!1,isSuccess:!1,learningPathComplete:!1,nextCourse:{}},HE=e=>!("id"in e),$E=(e,t)=>{const n=HE(t);return{...e,isPending:!1,isSuccess:!0,learningPathComplete:n,lpHasFailedQuiz:t.lpHasFailedQuiz,nextCourse:n?{}:t}},VE=e=>({...e,isPending:!0}),rde=(0,fe.handle)(FE,{[Fv]:(0,fe.onSuccess)($E),[Hv]:VE}),zE=e=>[(0,fe.action)(Hv),RE(Fv)(Yo().fromPromise(DE)(e))],_E=(e,t)=>{const n=e.content.findIndex(r=>r.id===t.id),o=[...e.content];return n===-1?o.push(t):o[n]=t,{...e,content:o}},UE=(e,t)=>t.reduce(_E,e),GE={[Ug]:UE},WE=(0,fe.handle)({content:[]},GE),$v="rise/search/RESET_SEARCH",Vv="rise/search/SET_SEARCH_ACTIVE",zv="rise/search/SET_SEARCH_ACTIVE_LESSONS",_v="rise/search/SET_SEARCH_TRANSLATIONS",Uv="rise/search/SET_SEARCH_LESSONS",Gv="rise/search/SET_SEARCH_TERM",Wv={active:!1,activeLessons:[],translations:{},lessons:[],term:null},KE=(e,t)=>t?{...Wv,active:e.active}:e,QE=(e,t)=>({...e,active:t}),YE=(e,t)=>({...e,activeLessons:t}),ZE=(e,t)=>({...e,translations:t}),XE=(e,t)=>({...e,lessons:t}),qE=(e,t)=>({...e,term:t}),JE=(0,fe.handle)(Wv,{[$v]:KE,[Vv]:QE,[zv]:YE,[_v]:ZE,[Uv]:XE,[Gv]:qE}),Yr=e=>(0,fe.action)(e),Kv=Yr($v),fi=Yr(Vv),Qv=Yr(zv),Yv=Yr(_v),Zv=Yr(Uv),hr=Yr(Gv),Z0=e=>`rise/sessionPreferences/${e}`,Xv=Z0("LOAD_SESSION_PREFERENCES"),qv=Z0("SET_PREFERS_KEYBOARD_NAVIGATION"),e7=Z0("SET_STARTING_COURSE_LESSON_SELECTED"),t7={prefersKeyboardNavigation:!1,startedCourseWithLessonSelected:!1},n7=(e,t)=>({...e,prefersKeyboardNavigation:t}),s7=(e,t)=>({...e,startedCourseWithLessonSelected:t}),o7=(0,fe.handle)(t7,{[Xv]:(e,t)=>({...e,...t}),[qv]:n7,[e7]:s7}),r7=()=>(0,fe.action)(Xv,null),a7=(0,fe.action)(qv),Jv="rise/slidesUI/SET_SLIDE_DIRECTION",eC="rise/slidesUI/SET_EXITING_SLIDE_OFFSET",i7={slideDirection:es.UP,exitingSlideOffset:0},c7=(0,fe.handle)(i7,{[Jv]:(e,t)=>({...e,slideDirection:t}),[eC]:(e,t)=>({...e,exitingSlideOffset:t})}),mr=(0,fe.action)(Jv),l7=(0,fe.action)(eC),X0=Jn()("rise/transcriptPanel/"),tC=X0("OPEN_TRANSCRIPT_PANEL"),nC=X0("CLOSE_TRANSCRIPT_PANEL"),sC=X0("UPDATE_TRANSCRIPT_PANEL"),d7={audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null},u7=(e,t)=>t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??!1,refocusTarget:t.refocusTarget??null,transcriptMedia:t.transcriptMedia??null}:e,oC=()=>({audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null}),h7=(e,t)=>e.audioPlayerIdOpen?t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??e.focusing,transcriptMedia:t.transcriptMedia??e.transcriptMedia}:oC():e,m7={[tC]:u7,[nC]:oC,[sC]:h7},f7=(0,fe.handle)(d7,m7),rC=(e=>`rise/ui/${e}`)("SET_SKIP_TO_NAV_BUTTON_UI"),p7={skipToNavButton:null},g7=(0,fe.handle)(p7,{[rC]:(e,t)=>({...e,skipToNavButton:t})}),q0=(0,fe.action)(rC);var ide;const v7={},C7=(0,jc.HY)({course:LI,courseLabels:BI,courseProgress:oE,fonts:kE,global:Rv,l10n:wE,partnerContent:WE,search:JE,sessionPreferences:o7,slidesUI:c7,status:Dk,transcriptPanel:f7,ui:g7,...v7}),{Provider:x7,dispatch:Dn,store:aC,useDispatch:tt,useSelector:ue}=j4(C7),iC="_course_token",J0=new URLSearchParams(window.location.hash.substr(1)),cC=J0.get(iC);cC&&(J0.delete(iC),window.history.replaceState(null,null,`#${J0.toString()}`));const b7=e=>{const{data:{method:t,id:n,jsonrpc:o}}=e;if(o==="2.0"&&t==="getBearerToken"){const r=cC||pt();navigator.serviceWorker.ready.then(a=>{a.active.postMessage({id:n,jsonrpc:"2.0",method:t,result:{token:r}})})}};navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",b7);const lC=(0,u.createContext)({});function y7(e,{type:t,message:n}){switch(t){case"polite":return{...e,politeMessage1:e.alternatePolite?n:"",politeMessage2:e.alternatePolite?"":n,alternatePolite:!e.alternatePolite};case"assertive":return{...e,assertiveMessage1:e.alternateAssertive?n:"",assertiveMessage2:e.alternateAssertive?"":n,alternateAssertive:!e.alternateAssertive};default:return{politeMessage1:"",politeMessage2:"",alternatePolite:!1,assertiveMessage1:"",assertiveMessage2:"",alternateAssertive:!1}}}function el({ariaLive:e,message:t}){return(0,s.jsx)("div",{"aria-atomic":"true","aria-live":e,"aria-relevant":"additions text",className:"visually-hidden-always",role:"log",children:t})}function S7({children:e}){const[{politeMessage1:t,politeMessage2:n,assertiveMessage1:o,assertiveMessage2:r},a]=(0,u.useReducer)(y7,{politeMessage1:"",politeMessage2:"",alternatePolite:!1,assertiveMessage1:"",assertiveMessage2:"",alternateAssertive:!1}),i=(0,u.useMemo)(()=>({announcePolite:c=>{a({type:"polite",message:c})},announceAssertive:c=>{a({type:"assertive",message:c})},clearAnnouncements:()=>{a({type:"clear"})}}),[a]);return(0,s.jsxs)(lC.Provider,{value:i,children:[(0,s.jsx)(el,{ariaLive:"polite",id:"polite-announcer1",message:t}),(0,s.jsx)(el,{ariaLive:"polite",id:"polite-announcer2",message:n}),(0,s.jsx)(el,{ariaLive:"assertive",id:"assertive-announcer1",message:o}),(0,s.jsx)(el,{ariaLive:"assertive",id:"assertive-announcer2",message:r}),e]})}function ys(){return(0,u.useContext)(lC)}var $e=p(12140);const dC={BLOCKS:"blocks",QUIZ:"quiz",SECTION:"section"},uC=e=>e?.type===dC.QUIZ,tl=e=>e?.type===dC.QUIZ,eh=({locales:e,course:t,locale:n})=>!!(e?.find(a=>a.locale===n)?.rightToLeft||t?.experiments?.rtl),hC=(0,u.createContext)({currentLocale:void 0,setCurrentLocale:()=>{}});function L7({children:e,currentLocale:t,setCurrentLocale:n}){const o=(0,u.useMemo)(()=>({currentLocale:t,setCurrentLocale:n}),[t,n]);return(0,s.jsx)(hC.Provider,{value:o,children:e})}function nt(){return(0,u.useContext)(hC)}function T7(e){const t=n=>{const o=nt();return(0,s.jsx)(e,{...n,...o})};return t.displayName=`withCurrentLocale(${e.displayName||e.name})`,t}const pi=(e,t,n)=>(0,Gt.uW)(e)&&t?n?.[t]?.[e.l10nId]:void 0,nl=(e,t,n,o)=>{if(!(0,Gt.uW)(e))return e;if(!t||!n||!o)return;const r=pi(e,t,o);if(r!==void 0)return r;const a=pi(e,n,o);if(a!==void 0)return a;const i=mC(e,o);return i.length>0?i[0].value:void 0},th=new WeakMap,nh=(e,t)=>{if(e&&t in e)return e[t]},sh=(e,t,n,o)=>{if(!t||!n||!o||!e)return e;if(typeof e=="object"){const d=th.get(e)?.get(o);if(d&&d.locale===t&&d.defaultLocale===n)return d.result}const r=o[t],a=o[n],i=Object.values(o).filter(d=>d!==r&&d!==a);function c(d){let h;if(h=nh(r,d),h!==void 0||(h=nh(a,d),h!==void 0))return h;for(const m of i)if(h=nh(m,d),h!==void 0)return h}let l;if(!Array.isArray(e)&&typeof e=="object"&&typeof e.l10nId=="string")l=c(e.l10nId);else{l=structuredClone(e);for(const{mutate:d,l10nId:h}of(0,Fr.pr)(l))d(c(h))}if(typeof e=="object"){let d=th.get(e);d||(d=new WeakMap,th.set(e,d)),d.set(o,{locale:t,defaultLocale:n,result:l})}return l},cde=(e,t,n)=>sh(e,t,Zr(n),Lo(n)),lde=(e,t,n)=>nl(e,t,Zr(n),Lo(n)),dde=(e,t,n)=>pi(e,t,Lo(n));function ude(e,t){return t?.find(n=>n.locale===e)}function k7(e){return e?.l10n?.locales??[]}function Zr(e){return e?.l10n?.defaultLocale}function I7(e,t){const n=Zr(t);return!!(e&&n&&e!==n)}function Lo(e){return e?.l10n?.translations??{}}function mC(e,t){return(0,Gt.uW)(e)?Object.keys(t).flatMap(n=>{const o=pi(e,n,t);return o?{locale:n,value:o}:[]}):[]}const hde=(e,t)=>mC(e,Lo(t)),jt=e=>(0,Gt.uW)(e)?e.l10nId:void 0;function E7(e){return e?.l10n?.localeSelectorOptions}function oh(e){return e?.l10n?.languageCodeMetadata}function N7(e){return e?.l10n?.showLocaleSelector}function rh(e,t="#ffffff"){if(e==null||e.trim()==="")return null;const n=Ur(e);if(n==null)return null;const o=n.alpha??1,r=Ur(t),a=o<1&&r!=null?(0,j0.jh)(r,{...n,alpha:1},o,{space:"srgb"}):n;return(0,A8.A)(a,"srgb")}function j7(e,t){const n=rh(t);if(n==null)return 1;const o=rh(e,(0,w0.A)(n));return o==null?1:(0,j8.A)(o,n,"WCAG21")}const Fn=e=>e==null?Te.DARK:j7("#fff",e)>=4.5?Te.LIGHT:Te.DARK,ah=(0,u.createContext)(null);ah.displayName="CourseContext";const ih=(0,u.createContext)(!1);ih.displayName="PresentationContext";function w7({children:e,course:t,courseProgress:n,labels:o,labelsLocale:r,lessons:a,partnerContent:i,search:c}){const l=(0,u.useMemo)(()=>({course:t,courseProgress:n,labels:o,labelsLocale:r,lessons:a,partnerContent:i,search:c}),[t,n,o,r,a,i,c]);return(0,s.jsx)(ah.Provider,{value:l,children:(0,s.jsx)(ih.Provider,{value:ei(t),children:e})})}function Xr(){return(0,u.useContext)(ah)}function Gs(){return(0,u.useContext)(ih)}function Fe(){return Xr()?.course}function fC(){return Re(Fe()?.title)}function wt(){const{labels:e}=Xr()??{};return e}function ch(){return Xr().search}function pC(e){const o=Fe()?.theme?.accentContrast;return typeof o!="string"?Te.LIGHT:o===Te.AUTO?Fn(e):o}function gi(){const e=Fe();return e?.theme?.colorAccent??e?.color}function lh(){const{currentLocale:e}=nt(),t=sl(),n=Fe();return n?eh({course:n,locales:t,locale:e}):!1}function mde(){const{lessons:e}=Xr();return e}const vi=(0,u.createContext)({l10n:null});vi.displayName="TranslationContext";const dh=(0,u.createContext)({l10n:null});dh.displayName="LocalesContext";function at(){const{currentLocale:e}=nt(),t=os(),n=ol();return(0,u.useCallback)(o=>nl(o,e,t,n),[e,t,n])}function gC(){const{currentLocale:e}=nt(),t=os(),n=ol();return(0,u.useCallback)(o=>sh(o,e,t,n),[e,t,n])}function Re(e,t){const{currentLocale:n}=nt(),o=os();let r=ol();const a=R7();return a&&Object.keys(a).length&&n&&r&&(r={...r,[n]:a}),nl(e,t??n,o,r)}function A7(e){const{currentLocale:t}=nt(),n=os(),o=ol();return(0,u.useMemo)(()=>sh(e,t,n,o),[t,n,e,o])}function qr(){return(0,u.use)(dh)}function sl(){const e=qr();return k7(e)}function os(){const e=qr();return Zr(e)}function ol(){const e=(0,u.use)(vi);return Lo(e)}function R7(){return Xr()?.search?.translations}function P7(){const e=(0,u.use)(vi);return N7(e)}function M7(){const e=(0,u.use)(vi);return E7(e)}const O7=()=>(0,$e.Mz)(t=>t,(t,n)=>n,(t,n,o)=>Zr(o),(t,n,o)=>Lo(o),nl);function ct(e){const{currentLocale:t}=nt(),n=(0,u.useMemo)(()=>O7(),[]);return ue(o=>n(e,t,o))}const B7=(0,$e.Mz)(e=>e,(e,t)=>Lo(t),(e,t)=>t?.[e]);function vC(){const{currentLocale:e}=nt();return ue(t=>B7(e,t))}const D7=(0,$e.Mz)(e=>e.course?.title,Zr,Lo,(e,t,n)=>{if(e)return pi(e,t,n)});function F7(){return ue(D7)}function rl(){return ue(e=>e.l10n)}var H7=p(82920);function CC(e){return e?.search}function To(){return ue(CC)}function $7(e){return CC(e)?.activeLessons}const V7=(0,$e.Mz)($7,e=>e?e.reduce((t,n)=>(n?.id&&(t[n.id]=n),t),{}):{});function z7(){return(0,$e.Mz)(e=>e,(e,t)=>V7(t),(e,t)=>t?.[e])}function _7(e){const t=H7.useMemo(()=>z7(),[]);return ue(n=>t(e,n))}function Wt(e){return e.course}function ce(){return ue(Wt)}function U7(e){return Wt(e)?.navigationMode}function uh(e){return Wt(e)?.trackingQuizId}function Jr(){const e=ce();return ct(e?.title)}function G7(e){return Wt(e)?.type}function W7(){return ue(e=>G7(e))}function xC(e){const t=Wt(e);return bs(t)}function K7(){return ue(xC)}function Q7(e){const t=Wt(e);return h0(t)}function Y7(){return ue(Q7)}const Z7=e=>e.filter(t=>t.type!=="section");function fr(){const e=ce(),t=To();return(0,u.useMemo)(()=>t?.active&&t?.lessons?.length>0?{...e,lessons:t.lessons,lessonsOnly:Z7(t.lessons)}:e,[e,t?.active,t?.lessons])}const X7=(0,$e.Mz)(Wt,e=>(e?.lessons??[]).filter(uC).some(t=>t.settings?.skipLessonsIfPassed&&t.settings?.skipToLessonId));function hh(e){const t=U7(e);return X7(e)?So.RESTRICTED:t??So.FREE}function al(){return ue(hh)}function q7(e){return Wt(e)?.theme?.buttonNavigationStyle??We.buttonNavigationStyle}function J7(){return ue(q7)}function mh(){const e=ce();return e?.selectedAuthorId==="none"||!("authors"in(e??{}))?null:e?.selectedAuthorId?e?.authors?.find(t=>t.id===e.selectedAuthorId):e?.authors?.find(t=>t.id===e?.author)}function bC(){return ce()?.theme?.coverImageColor??rt.DARK}function yC(){return ce()?.lessonsOnly?.[0]}function eN(){const e=ce(),{selectedAuthorId:t}=e?.lessons?.[0]??{};return t==="none"||!t?null:e?.authors?.find(n=>n.id===t)??null}function rs(){const{currentLocale:e}=nt(),t=sl(),n=ce();return n?eh({course:n,locales:t,locale:e}):!1}function SC(){const t=ce()?.lessons;return(0,u.useMemo)(()=>Array.isArray(t)?t.filter(({type:n})=>n!=="section").length:0,[t])}class tN extends u.Component{static defaultProps={scope:"error-boundary"};constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return console.error(t),{hasError:!0,error:t}}render(){const{hasError:t,error:n}=this.state,{FallbackComponent:o}=this.props;return t||n?(0,s.jsx)(o,{}):this.props.children}}const nN=tN;var sN=p(3199),oN=p.n(sN),rN=p(13840),pr=p.n(rN),aN=p(37754),iN=p.n(aN),cN=p(27315),il=p.n(cN),lN=p(97491),Hn=p.n(lN),dN=p(80690),cl=p.n(dN),uN=p(85434),hN=p.n(uN),mN=p(40889),fN=p.n(mN);const LC=({course:e,courseProgress:t})=>!e||!t?{}:e.lessons.filter(r=>!!r.settings?.passToContinue).filter(r=>!t.lessons[String(r.id)]?.passed)[0]??{},pN=({courseProgress:e,lesson:t,restrictingQuiz:n})=>{if(!e)return{};const o=c=>e.lessons[String(c)]?.index,r=o(t.id),a="id"in n?n.id:void 0,i=a!=null?o(a):void 0;return r!==void 0&&i!==void 0&&r>i?n:{}};var gN=p(37373),ko=p.n(gN),vN=p(94209),CN=p.n(vN),xN=p(26507),fh=p.n(xN);const Io=Ne("CDN_USER_CONTENT_URI"),TC=Ne("CDN_URI"),Ci=zr()("useCrushedKey"),as=Ne("IMAGES_URI"),bN=fh()(/-stock[-_]image.jpg/),ph=Ne("RBC_IMAGES_URI"),yN=Ne("ASSETS_URI"),SN=fh()(new RegExp(`^${Io}/review`)),kC=Ne("CDN_US_URI"),xi=e=>{const{crushedKey:t,key:n,useCrushedKey:o,src:r}=e;return Ci(e)?mt(o&&t?t:n):mt(r)},IC=(e,t)=>{if(!e||!e.key)return"";const{crushedKey:n,key:o,useCrushedKey:r}=e;return as?Ci(e)&&r&&n?`${as}/${t}/${n}`:`${as}/${t}/${o}`:xi(e)},fde=e=>`${Io}/${e}`,pde=e=>!e||!e.key?"":`${ph}/b:fff,f:jpg,s:cover,w:550,h:296/${e.key}`,gde=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:o}=e;return Ci(e)&&o?t?`${as}/f:jpg,b:fff,s:cover,w:340/${t}`:"":`${as}/f:jpg,b:fff,s:cover,w:340/${n}`},gh=e=>IC(e,"f:png,a:retain,s:cover,t:true,w:340"),vde=e=>IC(e?{...e,src:e.src??e.key}:void 0,"a:retain,f:png,s:contain,w:64,h:64"),lt=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:o,sourcedFrom:r}=e;if(!as)return xi(e);const a=r==="AI",i=r==="LIBRARY",c=r==="EXTRACTED";return bN(n)||a||i?`${as}/f:jpg,a:retain,b:fff,w:1680,q:90/${n}`:Ci(e)?o&&t?`${Io}/${t}`:`${Io}/${n}`:c&&e.src||SN(e.src)?e.src:`${as}/f:jpg|png,a:retain,b:fff/${n}`},Cde=(e,t="src")=>{const{key:n,src:o,thumbnail:r,thumbnailKey:a}=e,i=Io?`${Io}/${n}`:xi({key:n,src:o}),c=Io?`${Io}/${a}`:xi({key:a,src:r});return t==="src"?i:c},xde=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:o}=e;return Ci(e)&&o&&t?`${as}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${t}`:`${as}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${n}`},bi=({height:e,imageKey:t,width:n})=>{if(ph){const o=encodeURIComponent(t);return`${ph}/b:fff,f:jpg,s:cover,w:${n},h:${e}/${o}`}return mt(`partnerContent/${t}`)},LN=()=>{const e=yN||as,t="NBIC_logo_light_bulb.png";return e?`${e}/f:png,a:retain,s:cover,w:276,h:160/assets/rise/assets/partner-content/${t}`:mt(`partnerContent/${t}`)},TN=()=>{const e="NBIC_logo_blue.svg";return TC?`${TC}/assets/rise/assets/partner-content/${e}`:mt(`partnerContent/${e}`)},kN=e=>{const{key:t,src:n}=e;return kC?`${kC}/${t}`:xi({key:t,src:n})};var IN=p(17945);const ll=({alpha:e,color:t,url:n})=>{const o=(0,IN.A)(t,e);return{backgroundImage:`linear-gradient(0deg,${o},${o}), url("${n}")`}};var vh,Ch;const yde=ti()(Ze()("sidebarMode","hidden")),ea=({alpha:e,color:t=void 0,hasOverlay:n=!0,media:o={}})=>{const{image:r={}}=o,{key:a,src:i}=r,c=a?lt(r):i,l=t===rt.LIGHT?"#fff":"#000";return c?n?ll({alpha:e/100,color:l,url:c}):{backgroundImage:`url("${c}")`}:null},Eo=e=>[ar.DARK,ar.DARK_ACCENT,ar.DARK_IMAGE,ir.DARK,$s.DARK,$s.DARK_IMAGE].includes(e),EN=Lt()(Ye()("lessons"),ko()),NN=Ze()("navigationMode",So.RESTRICTED),jN=ti()(Ze()("sidebarMode",Gr.HIDDEN)),wN=Ze()("navigationType",rr.SIDEBAR),EC=Ze()("navigationType",rr.COMPACT),xh=Xn()(CN()(Ct(),"navigation"),jN,Ze()("navigation",!0)),AN=({course:e,search:t,isMobile:n})=>bs(e)?!1:(wN(e)||EC(e)&&!!n)&&xh(e)||t.active,RN=({course:e,isMobile:t})=>EC(e)&&xh(e)&&!t,yi=e=>[ar.DARK_IMAGE,ar.LIGHT_IMAGE,ir.DARK_IMAGE,ir.IMAGE,$s.DARK_IMAGE,$s.LIGHT_IMAGE].includes(e),PN=e=>[$s.DARK,$s.LIGHT].includes(e),MN=(e,t)=>{if(e===te.RISE_CLASSIC||e===te.HORIZON)switch(t){case de.SPLIT_LEFT_IMAGE:case de.SPLIT_RIGHT_IMAGE:case de.TWO_THIRDS_LEFT_IMAGE:case de.TWO_THIRDS_RIGHT_IMAGE:return!0;default:return!1}else if(e===te.APEX)switch(t){case de.SPLIT_LEFT_IMAGE:case de.SPLIT_RIGHT_IMAGE:return!0;default:return!1}return!1},Sde=(e,t)=>{switch(e){case vh.RISE_CLASSIC:case vh.APEX:case vh.HORIZON:return t===Ch.CENTERED_OVERLAY||t===Ch.LEFT_OVERLAY||t===Ch.IMAGE;default:return!1}},NC=e=>e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1,is=e=>!NC(e),dl=Ye(),ul=Hs(),bh=bt(),jC=e=>Ds()(t=>Wr({settings:{asLesson:dl("asLesson",t.settings)??void 0},type:t.type??null}),dl("lessonsOnly",e)??[]),ON=({course:e,courseProgress:t})=>pr()(BN(t),e?.lessonsOnly??[]),BN=e=>t=>cl()(t.id==null?void 0:ul(["lessons",t.id,"isComplete"],e)),DN=({lesson:e,currentLesson:t})=>e&&Ze()("id",e.id,t),FN=({course:e,lesson:t})=>Ze()("id",t.id,Hc()(dl("lessonsOnly",e)??[])),wC=e=>e!=null&&e.type!=="section",HN=({lesson:e,courseProgress:t})=>e?.id==null?!1:bh(!1,["lessons",e.id,"isComplete"],t),AC=({course:e,courseProgress:t,lesson:n,restrictingQuiz:o={}})=>{const r=n?.id==null?{}:pN({courseProgress:t,lesson:{id:n.id},restrictingQuiz:o}),a=NN(e),i=a||is(r),c=ON({course:e,courseProgress:t}),l=wC(n)&&cl()(HN({lesson:n,courseProgress:t}));return{isRestricted:i&&l&&cl()(DN({lesson:n,currentLesson:c})),restrictingQuiz:r,isRestrictedCourse:a,currentLesson:c}},$N=({labels:e,restrictions:t})=>{const{lessonRestricted:n,quizRequirePassingScore:o}=e,{isRestrictedCourse:r,restrictingQuiz:a,currentLesson:i}=t,c=i&&oN()("id",a,i),l=a!=null&&typeof a=="object"?dl("title",a):void 0;return!r||r&&c?typeof l=="string"&&l?o.replace("quiz",`"${l}"`):o:n},RC=fN()((e,t)=>iN()(hN()(vo()(["id"],e||{})),t)),VN=({course:e,lesson:t})=>Me()(il(),RC(t),jC)(e),PC=({course:e,lesson:t})=>{if(FN({course:e,lesson:t}))return;const n=e?.lessonsOnly??[];return n[il()(RC(t,n))]},zN=Me()(Hn(),jC),_N=e=>typeof e=="object"&&Object.keys(e).length>0,UN=e=>e==null||e===!1,GN=e=>UN(e?.isComplete),WN=e=>e.find(([,t])=>GN(t)),KN=e=>{const t=Object.entries(e),[n]=WN(t)||[];return n},QN=(e={},t)=>_N(e)?KN(e):t==null?void 0:String(t),MC=(e,t,n)=>{if(!n)return{outOfAttempts:!1,quizPassed:!0};const o=ul(["lessons",n],e),r=bh(-1,["settings","retryCount"],t),a=bh(0,["retryAttempts"],o),i=ul(["passed"],o);return{outOfAttempts:ul(["isComplete"],o)&&Number(r)>-1&&Number(a)===Number(r),quizPassed:i}};function yh(e){return e.courseProgress}function YN(e){return e.courseProgress?.currentLesson??""}function ZN(e){return e.courseProgress?.percentComplete??0}const OC=(0,$e.Mz)(uh,Wt,(e,t)=>{const{lessons:n}=t;return Array.isArray(n)?n.find(({id:o,type:r})=>r==="quiz"&&o===e)??null:null}),XN=(0,$e.Mz)(yh,OC,(e,t)=>t?MC(e,t,t.id):null);function BC(e){const t=yh(e);return bg()?t?.percentComplete===100:!!xg()}function ta(e){return e.courseProgress?.lessons}function Si(e,t){if(e!=null)return ta(t)?.[e]}function gr(){return ue(yh)}function hl(){return ue(YN)}function na(){return ue(ZN)}function qN(){return ue(OC)}function Sh(){const e=ue(XN);return{outOfAttempts:e?.outOfAttempts??!1,quizPassed:e?.quizPassed??!1}}function JN(){return ue(BC)}function No(e){return ue(t=>Si(e,t))}function ml(e){const t=No(e);if(t?.type==="quiz")return t}const ej=(0,$e.Mz)(ta,e=>e?Object.values(e).some(t=>t.type==="quiz"&&t.activeIndex!==void 0&&!t.isComplete):!1);function tj(){return ue(ej)}const DC=e=>e>9999?1:e,nj=({current:e,restart:t,restartValue:n})=>{const o=Number(n),r=DC(Number.isInteger(o)&&o>0?o:1),a=t?r:e+1;return DC(a)},sj=(e,t)=>{if(t.family==="divider"&&t.variant==="numbered divider"){const n=t.settings??{},o=nj({current:e.currentNumber,restart:n.restartNumbering,restartValue:n.restartNumberingValue});return{map:{...e.map,[t.id]:o},currentNumber:o}}return e},FC=e=>qk(e),fl=e=>Jk(e),oj=e=>eI(e),rj=e=>!!Kg(e);function sa(){return(0,$e.Mz)(e=>e,(e,t)=>zC(t),(e,t)=>t[String(e)])}function At(e){const t=(0,u.useMemo)(()=>sa(),[]);return ue(n=>t(e,n))}function oa(e){const t=At(e);return ct(t?.title)}function aj(){const e=sa();return(0,$e.Mz)(e,t=>FC(t))}function HC(){const e=pl();return(0,$e.Mz)(t=>t,(t,n)=>e(n),(t,n)=>hh(n),(t,n)=>mj(n),(t,n)=>fj(n),(t,n)=>ta(n),(t,n,o,r,a,i)=>{const c=i?.[t],l=i?.[n];if(t!==n&&!c?.isComplete&&c?.index>l?.index){const d=i?.[r?.id]?.index??1/0,h=o==="restricted"?l?.index??1/0:i?.[a?.id]?.index??1/0;if(c?.index>Math.min(d,h))return h<d?o==="restricted"?{type:ur.ORDER}:{type:ur.KNOWLEDGE_CHECK}:{type:ur.QUIZ,data:r.title}}return null})}function Li(e){const t=(0,u.useMemo)(()=>HC(),[]);return ue(n=>t(e,n))}function pl(){return(0,$e.Mz)(ta,uh,(e,t)=>QN(e,t))}function ij(){const e=(0,u.useMemo)(()=>pl(),[]);return ue(t=>e(t))}function cj(){const e=pl();return(0,$e.Mz)(e,zC,(t,n)=>{if(!(!t||!n[t]))return n[String(t)]})}function lj(){const e=sa();return(0,$e.Mz)(e,Si,(t,n)=>{const o=n?.percentComplete??0,r=n?.isComplete??!1,a=n?.passed??!1;return o===100&&(!r||fl(t)&&!a)})}function $C(e){const t=(0,u.useMemo)(()=>lj(),[]);return ue(n=>t(e,n))}function dj(){const e=sa();return(0,$e.Mz)(e,Si,(t,n)=>{const o=n?.percentComplete??0,r=n?.isComplete??!1,a=n?.passed??!1;return o===100&&r&&(!fl(t)||a)})}function VC(e){const t=(0,u.useMemo)(()=>dj(),[]);return ue(n=>t(e,n))}const Lh=(0,$e.Mz)(Wt,e=>e?.lessons??[]),zC=(0,$e.Mz)(Lh,e=>e.reduce((t,n)=>(n?.id&&(t[n.id]=n),t),{})),ra=(0,$e.Mz)(Wt,e=>e?.lessonsOnly??[]),uj=(0,$e.Mz)(ra,e=>e.reduce((t,n,o)=>(t[n.id]=o+1,t),{}));function _C(){return ue(e=>uj(e))}const Th=(0,$e.Mz)(ra,e=>e.filter(t=>Wr(t))),UC=(0,$e.Mz)(Th,e=>e.length),hj=(0,$e.Mz)(Lh,e=>e.reduce((t,n)=>{const o=t[t.length-1];return FC(n)||o==null?t.push([n.id]):o.push(n.id),t},[])),mj=(0,$e.Mz)(ra,ta,(e,t)=>e.find(n=>fl(n)&&oj(n)&&!t?.[n.id]?.isComplete)),fj=(0,$e.Mz)(ra,ta,(e,t)=>e.find(n=>!fl(n)&&rj(n)&&!t?.[n.id]?.isComplete));function gl(e){const t=(0,u.useMemo)(aj,[]);return ue(n=>t(e[0],n))}function kh(e){const t=(0,u.useMemo)(()=>sa(),[]),n=(0,u.useMemo)(()=>HC(),[]),o=al();return ue(r=>{const a=Wt(r),i=t(e,r),c=Si(e,r),d=n(e,r)?.type!=null;return o!==So.RESTRICTED&&a?.markComplete&&!d&&i?.type!==B0.QUIZ&&!0})}const vl=(e,t)=>t.findIndex(n=>n.id===e);function GC(){return(0,$e.Mz)(e=>e,(e,t)=>ra(t),(e,t)=>{if(e==="progress-summary")return t[t.length-1];const o=vl(e,t)-1;return t[o]})}function WC(){return(0,$e.Mz)(e=>e,(e,t)=>ra(t),(e,t)=>{const o=vl(e,t)+1;return t[o]})}function KC(e){return(0,$e.Mz)((n,o)=>e(n,o),(n,o)=>Th(o),(n,o)=>vl(n?.id||"",o)+1)}function pj(){return KC(WC())}function gj(){return KC(GC())}function vj(e){const t=(0,u.useMemo)(()=>WC(),[]);return ue(n=>t(String(e),n))}function Cj(e){const t=(0,u.useMemo)(()=>pj(),[]);return ue(n=>t(String(e),n))}function xj(e){return ue(t=>{if(!e)return 0;const n=Th(t);return vl(String(e),n)+1})}function Ih(){return ue(UC)}function Cl(){return ue(e=>hj(e))}function bj(){const e=pl();return(0,$e.Mz)(BC,e,uh,(t,n,o)=>{const r=!!n,a=o!=null;return t||!r&&!a})}function yj(){const e=(0,u.useMemo)(()=>bj(),[]);return ue(t=>e(t))}function Sj(){const e=ce(),t=gr();return(0,u.useMemo)(()=>{if(!e||!t||!e.lessonsOnly)return[];const n=LC({course:e,courseProgress:t});return e.lessonsOnly.filter(o=>{const{isRestricted:r}=AC({course:e,courseProgress:t,lesson:o,restrictingQuiz:n});return r}).map(o=>o.id)},[e,t])}const Lj=e=>e?.items?.reduce?.(sj,{map:{},currentNumber:0})?.map||{},Tj=e=>{const t=(0,u.useMemo)(()=>sa(),[]),n=ue(o=>t(e,o));return(0,u.useMemo)(()=>Lj(n),[n])},kj=({blockId:e,lessonId:t})=>Tj(t)?.[e];function Ij(e){const n=ce()?.lessonsOnly??[],o=n.findIndex(a=>a.id===e);return(o>=0?n[o+1]:void 0)?.id??null}function Eh(e){const t=At(e),n=ce(),o=t?.settings,r=n?.lessonsOnly;return(0,u.useMemo)(()=>{const a=o?.skipToLessonId,i=a&&r?.some(c=>c.id===a)?a:void 0;return{continueType:o?.continueType??"",retryCount:Number(o?.retryCount??-1),skipLessonsIfPassed:o?.skipLessonsIfPassed??!1,skipLessonsOptional:o?.skipLessonsOptional??!0,skipToLessonId:i}},[o,r])}function Ej(){return ue(Lh)}function Nj(e){const t=(0,u.useMemo)(()=>GC(),[]);return ue(n=>t(e,n))}function jj(e){const t=(0,u.useMemo)(()=>gj(),[]);return ue(n=>t(e,n))}function wj(){const e=(0,u.useMemo)(()=>cj(),[]);return ue(e)}function QC(){const e=wj();return ct(e?.title)}const Lde="/:mode",xl="/lessons/:lessonId",bl="/lessons/:lessonId/:mode",Aj=e=>e==="iframe"||e==="preview";function Ws(){const e=(0,je.RQ)(xl),t=(0,je.RQ)(bl);return(e??t)?.params.lessonId}function Rj(e){return e.courseLabels}function Pj(){return ue(Rj)}function Mj(e,t){return t?.l10n?.localeLabelSets?.[e]?.labels||t?.courseLabels?.labels}function Ce(){const{currentLocale:e}=nt();return ue(t=>Mj(e,t))}function Oj({isCourseComplete:e,percentCourseComplete:t}){const n=Ce()??{},{courseResume:o,courseStart:r,processStartAgain:a}=n;return{courseCTALabel:e?a:t>0?o:r}}function Nh(){const{pathname:e}=new URL(window.location.href);return e.split("/")[1]==="review"}function YC(){const e=window.location.hash.slice(1),t=new URLSearchParams(e.split("?")[1]??"");return Nh()&&!!t.get("locale")}const Bj=(0,u.lazy)(()=>p.e("webpack_container_remote_learn_distribution_frontend_learn_ai-learner-popout").then(p.t.bind(p,68789,23))),Dj=()=>{const{currentLocale:e}=nt(),t=A7(ce()),n=rs(),o=tj(),r=hl(),a=At(Ws()),i=Ce(),c=window,l=c?.growth?.getSubscription?.()?.id||t?.tenantId||void 0,d=c?.growth?.getUser?.()?.id||(t?`learner_${t.author}`:void 0),h=Sj(),m=async()=>{try{await qa()}catch{}},f=t?.aiTutorConfig?.image?.media?.image,v=lt(f)||null,C=ct(t?.aiTutorConfig?.name)??null,[g,x]=(0,u.useState)(!1),b=`rise_ai_tutor_nudge_${d}`,L=(0,u.useCallback)(()=>{localStorage.setItem(b,"1")},[b]);(0,u.useEffect)(()=>{if(localStorage.getItem(b))return;let T=null;const k=setTimeout(()=>{const I=document.getElementById("page-wrap");if(!I)return;const E=()=>{if(localStorage.getItem(b)){I.removeEventListener("scroll",E);return}const{scrollTop:w,scrollHeight:A,clientHeight:N}=I,R=A-N,M=R>0?w/R:0;R<=0||M>=.75&&(localStorage.setItem(b,"1"),x(!0),I.removeEventListener("scroll",E))};I.addEventListener("scroll",E,{passive:!0}),T=()=>I.removeEventListener("scroll",E),E()},0);return()=>{clearTimeout(k),T?.()}},[d,b,r]);const S=o||a?.type==="quiz",y=S?i?.aiTutorDisabledWhileQuiz??"AI Tutor is disabled while a quiz is in progress.":void 0;return(0,s.jsx)(Bj,{aiTutorImageUrl:v,aiTutorName:C,apiKey:t.aiLearnerCourseApiKey??null,course:t,currentLessonId:r||null,currentLocale:e,disabled:S,disabledReason:y,labels:i,onOpen:L,resetSession:m,resolveAssetUrl:Sg,restrictedLessonIds:h,rtl:n,scrollTriggered:g,subscriptionId:l,userId:d})},Fj=()=>{const e=ce();return!Nh()&&!!e?.settings?.aiTutorEnabled?(0,s.jsx)(nN,{FallbackComponent:()=>null,children:(0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(Dj,{})})}):null},ZC=(0,u.createContext)(null);function Hj({appType:e,children:t}){return(0,s.jsx)(ZC.Provider,{value:e,children:t})}function $j(){const e=(0,u.useContext)(ZC);if(e==null)throw new Error("useAppType must be used within an AppTypeProvider");return e}function jh(){return $j()==="author"}const wh=Object.assign((0,u.createContext)(void 0),{displayName:"BlockContext"});function XC({block:e,children:t}){const[n,o]=(0,u.useState)(e);return e!=null&&e!==n&&o(e),(0,s.jsx)(wh.Provider,{value:n,children:(0,s.jsx)(Oh,{...n?.settings,children:t})})}const Tde=wh.Consumer;function Rt(){return(0,u.useContext)(wh)}function yl(e){return function(n){const o=Rt();return(0,s.jsx)(e,{...n,block:o})}}const Vj={text:{backgroundType:"blockTextBackgroundType",backgroundColor:"blockTextBackgroundColor",backgroundColorContrast:"blockTextBackgroundColorContrast",paddingStart:"blockTextPaddingStart",paddingEnd:"blockTextPaddingEnd",bodyFontSize:"blockTextBodyFontSize",headingFontSize:"blockTextHeadingFontSize",subheadingFontSize:"blockTextSubheadingFontSize"},continue:{completionType:"blockContinueCompletionType",label:"blockContinueLabel",completeHint:"blockContinueCompleteHint"}},kde=null;function zj(e,t){if(!e||!t)return null;const n=Vj[e];if(!n)return null;const o=r=>r?t[r]:void 0;return{backgroundType:o(n.backgroundType),backgroundColor:o(n.backgroundColor),backgroundColorContrast:o(n.backgroundColorContrast),paddingStart:o(n.paddingStart),paddingEnd:o(n.paddingEnd),bodyFontSize:o(n.bodyFontSize),headingFontSize:o(n.headingFontSize),subheadingFontSize:o(n.subheadingFontSize),completionType:o(n.completionType),label:o(n.label),completeHint:o(n.completeHint)}}function jo(){const e=Rt(),t=Fe(),n=e?.family,o=t?.theme;return(0,u.useMemo)(()=>zj(n,o),[n,o])}var _j=p(20348),Uj=p.n(_j);const Ss=(e,t)=>{const n=Ur(t);return n==null?null:(0,w0.A)((0,j0.jh)(n,Ur("#000000"),e),{format:"hex",collapse:!1})};function Gj(e){if(e==null)return 0;const t=rh(e);return t==null?0:(0,w8.J1)(t)}const dt=ns({NEAR_BLACK:null,DARK:null,MED:null,LIGHT:null}),aa=e=>{const t=Gj(e);return t<=.01?dt.NEAR_BLACK:t<=.05?dt.DARK:t<=.35?dt.MED:dt.LIGHT},Wj=e=>{switch(aa(e)){case dt.NEAR_BLACK:return ts(.1,e);case dt.DARK:return Ss(.4,e);case dt.MED:return Ss(.2,e);case dt.LIGHT:return ts(.3,e)}};var Kj,Qj,Yj,Ah,qC,wo;const JC=2,Ide=(e,t,n)=>e??t??n,e2=(e,t,n,o)=>e??t??n??o,$n=Mn()({WHITE:null,TRANSPARENT:null}),Zj={markerColorContrast:Te.AUTO,paddingBottom:3,paddingLinked:!0,paddingTop:3,snippetColorContrast:Te.AUTO},Xj={knowledge:["knowledge"],knowledgeCheck:["draw from question bank","fillin","matching","multiple choice","multiple response"],flashcard:["flashcard","stack"],interactive:["accordion","tabs"],"interactive-fullscreen":["sorting","timeline","process"],multimedia:["attachment","embed","step"],quote:["carousel"],survey:["survey"]};function qj(e,t){return Xj[e]?.includes(t)??!1}const Jj={360:{storyline:"#fafafa"},impact:{c:"#ececec",d:"#f5f5f5"},"interactive-fullscreen":{process:"#f5f5f5",sorting:"#f5f5f5",timeline:"#f5f5f5"},quote:{d:"#f5f5f5"}};function Rh(e,t){const n=Jj[e]?.[t];return n==null?{}:{backgroundColor:n,backgroundType:se.COLOR}}const ew=null;function Ede(e,t){return ew[e]?.includes(t)??!1?.1:.5}function tw(e){switch(e.backgroundType){case se.COLOR:return e.backgroundColor;case se.ACCENT:return e.courseColor;case se.TINT:return A0(e.courseColor);case se.LIGHT:return"#ffffff";case se.GRAY:return"#fafafa";case se.DARK:return"#303030";case se.BLACK:return"#000000"}}const nw={multimedia:{embed(e){return{cardMode:e.showBorder===!1?$n.TRANSPARENT:$n.WHITE}}}};function sw(e,t,n){return ow(e,t,n)}function ow(e,t,n){const o=Rh(e,t);if(n.v==null||n.v<JC){n=rw(n);const l=o.backgroundColor,d=n.backgroundColor?.toLowerCase(),h=l!=null&&d===l.toLowerCase(),m=l==null&&d==="#ffffff";d&&(h||m)&&(n=Uj()("backgroundColor",n))}const r=nw[e]?.[t]?.(n),a=n.backgroundColor&&n.backgroundType==null?{backgroundType:se.COLOR}:{};return[{accentColor:null},Zj,r,n,a,{v:JC}].reduce((l,d)=>d==null?l:{...l,...ig()(NC,d)},{})}function rw(e){return{...e,backgroundType:null,cardMode:null,v:1}}const aw=null;function Nde(e,t){return!aw[e]?.includes(t)}const iw=null;function jde(e,t){return!iw[e]?.includes(t)}function cw(e){return e===Yj.LIGHT?wo.LIGHT:wo.DARK}function lw(e,t){if(t===Ah.AUTO){if(!e)return wo.DARK;const n=Kj(e);return Qj(n)===Ah.DARK?wo.DARK:wo.LIGHT}else return t===Ah.LIGHT?wo.LIGHT:wo.DARK}function wde(e,t,n,o,r){const a=e?.backgroundType;return e?.cardMode===$n.TRANSPARENT?a===qC.IMAGE?cw(t?.overlayColor):o&&a!==qC.ACCENT?r:lw(n,e?.customBackgroundColorContrast):o?r:wo.DARK}const dw=null;function Ade(e,t){return dw[e]?.includes(t)??!1}const uw=new RegExp(/^#([a-f0-9]{8}|[a-f0-9]{6}|[a-f0-9]{3})$/,"i"),Ph=(e,t)=>t!=null&&uw.test(t)?t:e;function $t(e){const{contrast:t=Te.AUTO,backgroundColor:n="#fff"}=e,o=Ph("#fff",n),r=Fn(o);return t===Te.DARK||t===Te.AUTO&&r===Te.DARK?xt.DARK:xt.LIGHT}const hw=e=>e.blockBackgroundType??e.familyBackgroundType??e.courseBackgroundType??e.blockTypeFallbackType??se.LIGHT,mw=e=>e.effectiveBackgroundType===se.COLOR?e.blockBackgroundColor||e.familyBackgroundColor||e.courseBackgroundColor||e.blockTypeFallbackColor||null:e.settingsBackgroundColor??null,fw=e=>e.blockCustomContrast??e.familyBackgroundColorContrast??e.courseBackgroundColorContrast??Te.AUTO,t2=e=>{const{family:t,variant:n,customBackgroundColorContrast:o}=e;return!o&&(t==="image"&&n!=="text aside"||t==="chart"||n==="sorting")},pw=e=>{const{backgroundType:t,backgroundColor:n,accentColor:o,customBackgroundColorContrast:r,accentContrast:a,family:i,variant:c}=e;if(!(t===se.ACCENT||t===se.COLOR))return null;const d=t===se.ACCENT?o:n;let h;return t===se.ACCENT?h=a:t2({family:i,variant:c,customBackgroundColorContrast:r})?h=Fn(n):h=r??Te.DARK,$t({backgroundColor:d??void 0,contrast:h})},gw=e=>pw(e)===xt.LIGHT,vw=e=>{const t=e.blockBackgroundType!=null||e.familyBackgroundType!=null||e.courseBackgroundType!=null,n=e.blockCustomContrast!=null||e.familyBackgroundColorContrast!=null||e.courseBackgroundColorContrast!=null;return!t&&!n},Cw=e=>{const{backgroundColor:t,family:n,variant:o,blockCustomContrast:r,familyBackgroundColorContrast:a,courseBackgroundColorContrast:i}=e,c=r??a??i??Te.AUTO,d=t2({family:n,variant:o,customBackgroundColorContrast:c})?Fn(t):c;return $t({backgroundColor:t??void 0,contrast:d})};var xw=p(81884),Sl=p.n(xw);const bw=e=>{const{effectiveBackgroundType:t,blockImage:n}=e;return t!==se.IMAGE?null:n??null},yw=e=>Ng(e?.alt),Sw=e=>{if(!e)return null;const{alpha:t,overlayColor:n=rt.DARK}=e,o=lt(e),r=n===rt.LIGHT?"#fff":"#000";return ll({alpha:t,color:r,url:o})};function cs(){const e=Fe(),t=jo(),n=tn(),o=Rt(),r=o?Rh(o.family,o.variant):{};return hw({blockBackgroundType:n?.backgroundType,familyBackgroundType:t?.backgroundType,courseBackgroundType:e?.theme?.blockBackgroundType,blockTypeFallbackType:r.backgroundType})}function Lw(){return cs().toLowerCase()}function Ll(){const e=Rt(),t=cs(),n=e?.background,o=Re(n?.media)?.image;return bw({effectiveBackgroundType:t,blockImage:o})}function Tw(){const e=Ll();return yw(e)}function kw(){const e=Ll();return Sw(e)}function Iw(){const e=Ll();return!!e&&e?.overlayColor===rt.LIGHT}function Ew(){const e=Rt(),t=e?.family,n=e?.variant,o=qj(t,n),r=e?.settings?.cardMode??$n.WHITE;return o?r.toLowerCase():null}function Nw(){const e=En(),t=e?aa(e):dt.LIGHT;return Sl()(t.toLowerCase())}function jw(){const e=Rt(),t=Fe(),n=jo();return fw({blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:n?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function ww(){const e=Fe(),t=tn(),n=En(),o=Rt(),r=cs(),a=jw(),i=t.accentColor||e?.theme?.colorAccent;return gw({accentColor:i,accentContrast:e?.theme?.accentContrast,backgroundColor:n,backgroundType:r,customBackgroundColorContrast:a,family:o?.family,variant:o?.variant})}function Aw(){const e=Rt(),t=Fe(),n=En(),o=jo();return Cw({backgroundColor:n,blockCustomContrast:e?.settings?.customBackgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast,family:e?.family,familyBackgroundColorContrast:o?.backgroundColorContrast,variant:e?.variant})}function Rw(){const e=Rt(),t=Fe(),n=jo();return vw({blockBackgroundType:e?.settings?.backgroundType,familyBackgroundType:n?.backgroundType,courseBackgroundType:t?.theme?.blockBackgroundType,blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:n?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function n2(){const e=Lw(),t=Nw(),n=Ew(),o=ww(),r=Iw(),a=Rw(),i=En(),c=kw(),l=Tw();return{backgroundColor:i,backgroundImageAlt:l,backgroundImageCss:c,backgroundTypeLowercase:e,cardMode:n,colorRange:t,isContrastLight:o,isLegacyBackground:a,isOverlayLight:r}}var s2=p(82920);const o2=Object.assign((0,u.createContext)({}),{displayName:"BlockSettingsContext"});function tn(){return(0,u.useContext)(o2)}const Pw="settings";function Mh(e){return t=>{const n=s2.forwardRef((o,r)=>{const a=tn(),i={...o,[e??Pw]:a};return(0,s.jsx)(t,{...i,ref:r})});return n.displayName=`withBlockSettings(${t.displayName||t.name})`,n}}function En(){const e=Fe(),t=tn(),n=jo(),o=cs(),r=Rt();if(t==null)return null;const a=r?Rh(r.family,r.variant):{},i=mw({effectiveBackgroundType:o,blockBackgroundColor:t.backgroundColor,familyBackgroundColor:n?.backgroundColor,courseBackgroundColor:e?.theme?.blockBackgroundColor,blockTypeFallbackColor:a.backgroundColor,settingsBackgroundColor:t.backgroundColor}),c={...t,backgroundType:o,backgroundColor:i};return tw(c)}const Mw="backgroundColor";function Ow(e){return t=>{const n=s2.forwardRef((o,r)=>{const a=En(),i={...o,[e??Mw]:a};return(0,s.jsx)(t,{ref:r,...i})});return n.displayName=`withBackgroundColor(${t.displayName||t.name})`,n}}function Oh({children:e,...t}){const n=Rt(),o=tn(),r=gi(),a=(0,u.useMemo)(()=>{const i=n==null?t:sw(n.family,n.variant,t);return{courseColor:r,...o,...i}},[n,t,r,o]);return(0,s.jsx)(o2.Provider,{value:a,children:e})}const Ls={get isInstantLink(){return!!window.InstantLinks?.publicId}};var Bw=p(46505);const V=(0,Bw.setup)({el:"__",mod:"--",modValue:"-"});var Tl=p(82920);const Tt=V("curtain"),Dw={curtainLoading:"Your content is loading.",curtainOffline:"Your computer is offline.",curtainOfflineReconnecting:"Attempting to reconnect\u2026",curtainSessionTimedOut:"Your session has timed out.",curtainSessionTimedOutRefresh:"Refresh",curtainSessionTimedOutRestart:"Click refresh to restart your session.",curtainSomethingWrong:"Something went wrong.",curtainSomethingWrongRefresh:"Refresh",curtainSomethingWrongTryAgain:"Click to refresh and try again."},Fw=({labels:e,loadingText:t,showHeader:n,status:o})=>{const r={...Dw,...e},[a,i]=Tl.useState(!1),c=()=>i(!0),l=Tl.useRef(null);return Tl.useEffect(()=>(l.current=setTimeout(c,1e4),()=>{l.current&&clearTimeout(l.current)}),[]),Tl.useEffect(()=>{if(o==="error"){const d=new Error("There was a socket connection error. The renderReconnect curtain was displayed");oL.yf.logger.info(d.message,d)}},[o]),o==="fatalError"?(0,s.jsx)($w,{labelCurtainSomethingWrong:r.curtainSomethingWrong,labelCurtainSomethingWrongRefresh:r.curtainSomethingWrongRefresh,labelCurtainSomethingWrongTryAgain:r.curtainSomethingWrongTryAgain,showHeader:n}):o==="error"&&a?(0,s.jsx)(zw,{labelCurtainSessionTimedOut:r.curtainSessionTimedOut,labelCurtainSessionTimedOutRefresh:r.curtainSessionTimedOutRefresh,labelCurtainSessionTimedOutRestart:r.curtainSessionTimedOutRestart,showHeader:n}):o==="error"?(0,s.jsx)(Vw,{labelCurtainOffline:r.curtainOffline,labelCurtainOfflineReconnecting:r.curtainOfflineReconnecting,showHeader:n}):(0,s.jsx)(Hw,{labelCurtainLoading:r.curtainLoading,showHeader:n,text:t})},r2=()=>window.location.reload(),Hw=({labelCurtainLoading:e,showHeader:t,text:n})=>(0,s.jsx)("div",{className:Tt("container",{"show-header":t}),children:(0,s.jsxs)("div",{className:Tt(),children:[(0,s.jsx)("div",{className:Tt("spinner")}),(0,s.jsx)("div",{className:Tt("text"),children:n||e})]})}),$w=({labelCurtainSomethingWrong:e,labelCurtainSomethingWrongRefresh:t,labelCurtainSomethingWrongTryAgain:n,showHeader:o})=>(0,s.jsx)("div",{className:Tt("container",{"show-header":o}),children:(0,s.jsxs)("div",{className:Tt(),children:[(0,s.jsx)("div",{className:Tt("title"),children:e}),(0,s.jsx)("div",{className:Tt("description"),children:n}),(0,s.jsx)("button",{className:Tt("button"),onClick:r2,type:"button",children:t})]})}),Vw=({labelCurtainOffline:e,labelCurtainOfflineReconnecting:t,showHeader:n})=>(0,s.jsx)("div",{className:Tt("container",{"show-header":n}),children:(0,s.jsxs)("div",{className:Tt(),children:[(0,s.jsx)("div",{className:Tt("spinner",{reconnect:!0})}),(0,s.jsx)("div",{className:Tt("title"),children:e}),(0,s.jsx)("div",{className:Tt("description"),children:t})]})}),zw=({labelCurtainSessionTimedOut:e,labelCurtainSessionTimedOutRefresh:t,labelCurtainSessionTimedOutRestart:n,showHeader:o})=>(0,s.jsx)("div",{className:Tt("container",{"show-header":o}),children:(0,s.jsxs)("div",{className:Tt(),children:[(0,s.jsx)("div",{className:Tt("title"),children:e}),(0,s.jsx)("div",{className:Tt("description"),children:n}),(0,s.jsx)("button",{className:Tt("button"),onClick:r2,type:"button",children:t})]})}),a2=Fw;var i2=p(74512),_w=p(10489),Uw=p(91902),Gw=p(96545),Ww=p(92529),Kw=p(92937),Qw=p(66039),Yw=p(64246),Zw=p(40136),Xw=p(64171),qw=p(63365),Jw=p(79965),eA=p(56401),tA=p(90147),nA=p(39636),sA=p(17534),oA=p(67234),rA=p(23026),aA=p(60218),iA=p(54666),cA=p(21270),lA=p(94835),dA=p(45635),uA=p(71812),hA=p(28916),mA=p(28054),fA=p(59590),pA=p(14133),gA=p(99841),vA=p(42716),CA=p(29400),xA=p(94043),bA=p(82765),yA=p(7769),SA=p(84404),LA=p(130),TA=p(11413),kA=p(72539),IA=p(96464),EA=p(68687),NA=p(35941),jA=p(15238),wA=p(98446),AA=p(14198),RA=p(23095),PA=p(49951),MA=p(78942),OA=p(33789),BA=p(34133),DA=p(45160),FA=p(73181),HA=p(23561),$A=p(36402),VA=p(9065),zA=p(31444),_A=p(68303),UA=p(78718),GA=p(99881),WA=p(53683),KA=p(69131),c2=p(50987),QA=p(70473),YA=p(3718),ZA=p(9544),XA=p(66307),qA=p(83692),JA=p(62585),eR=p(55424),tR=p(12808),nR=p(23007),sR=p(81591),oR=p(20783),rR=p(12461),aR=p(37956),iR=p(69386),cR=p(30304),lR=p(79366),dR=p(76361),uR=p(53419),hR=p(53745),mR=p(51992),fR=p(98414),pR=p(64142),gR=p(79205),vR=p(2545),CR=p(43779),xR=p(72108),bR=p(18558),yR=p(40615),SR=p(56444),LR=p(8240),TR=p(81499),kR=p(69369),IR=p(10934),ER=p(48206),NR=p(66407),jR=p(198),wR=p(67151),AR=p(8917),RR=p(11653),PR=p(56562),l2=p(83176),MR=p(91732),OR=p(2197),BR=p(60689),DR=p(17482),FR=p(88667),HR=p(36108),$R=p(78891),VR=p(29813),zR=p(65663),_R=p(8820),UR=p(37185),GR=p(71656),WR=p(7772),KR=p(77868),QR=p(78387),YR=p(67296),ZR=p(60345),XR=p(17438),qR=p(98312),JR=p(99717),eP=p(12478),tP=p(81163),nP=p(2585),sP=p(82669),oP=p(71386),rP=p(47932),aP=p(97493),iP=p(40908),cP=p(26854),lP=p(42300),dP=p(12241),uP=p(12615),hP=p(47519),mP=p(35739),fP=p(90300),pP=p(76595),gP=p(35359),vP=p(79963),CP=p(53765),xP=p(43237),bP=p(39143),yP=p(72314),SP=p(42692),LP=p(39729),TP=p(58513),kP=p(69554),IP=p(95970),EP=p(8848),NP=p(90113),jP=p(33750),wP=p(35926),AP=p(24443),RP=p(37116),PP=p(88552),MP=p(15081),d2=p(3331),OP=p(1177),BP=p(81538),DP=p(22400),FP=p(2120),HP=p(70626),$P=p(47556),VP=p(89509),zP=p(69545),_P=p(18445),UP=p(47230),GP=p(80883),WP=p(92434),KP=p(27397),QP=p(87423),YP=p(69112),ZP=p(976),XP=p(82386),qP=p(30466),JP=p(21258),eM=p(34265),tM=p(93085),nM=p(9554),sM=p(65039),oM=p(30325),rM=p(73541),aM=p(54674),iM=p(26371),cM=p(8791),lM=p(77145),dM=p(16918),uM=p(25543),hM=p(24108),mM=p(24618);const fM={prefix:"fab",iconName:"rise-com",icon:[512,512,[],"e001","M248 3.34C111 3.34 0 114 0 252c0 137 111 248 248 248 137 0 248-111 248-248-.457-137-112-248-248-248zm0 421c-75.4 0-139-48-163-116l326 0c-23.8 67.7-88.2 116-163 116z"]},pM={prefix:"fab",iconName:"reach",icon:[182,182,[],"e001",["M181.97 99.3826C136.326 99.3826 99.3497 136.325 99.3497 181.926H35.1699C35.1699 100.912 100.881 35.2632 181.97 35.2632V99.3826Z","M41.5029 82.9278C64.4243 82.9278 83.0058 64.3638 83.0058 41.4639C83.0058 18.564 64.4243 0 41.5029 0C18.5815 0 0 18.564 0 41.4639C0 64.3638 18.5815 82.9278 41.5029 82.9278Z"]]},gM={prefix:"fab",iconName:"audio-plus",icon:[20,20,[],"e001","M1.5 8.75C1.5 8.34375 1.8125 8 2.25 8C2.65625 8 3 8.34375 3 8.75V10C3 12.2188 4.78125 14 7 14C7.71875 14 8.40625 13.8125 9 13.4688C9 13.5 9 13.5 9 13.5C9 14.0625 9.0625 14.5625 9.21875 15.0625C8.75 15.25 8.25 15.4062 7.75 15.4688V16.5H9.25C9.65625 16.5 10 16.8438 10 17.25C10 17.6875 9.65625 18 9.25 18H7H4.75C4.3125 18 4 17.6875 4 17.25C4 16.8438 4.3125 16.5 4.75 16.5H6.25V15.4688C3.5625 15.0938 1.5 12.8125 1.5 10V8.75ZM4 5C4 3.34375 5.34375 2 7 2C8.65625 2 10 3.34375 10 5V10C10 10.125 9.96875 10.25 9.96875 10.375C9.625 10.875 9.34375 11.4375 9.1875 12.0625C8.625 12.6562 7.84375 13 7 13C5.34375 13 4 11.6562 4 10V5ZM5.5 5V10C5.5 10.8438 6.15625 11.5 7 11.5C7.8125 11.5 8.5 10.8438 8.5 10V5C8.5 4.1875 7.8125 3.5 7 3.5C6.15625 3.5 5.5 4.1875 5.5 5ZM10 13.5C10 11.0312 12 9 14.5 9C16.9688 9 19 11.0312 19 13.5C19 16 16.9688 18 14.5 18C12 18 10 16 10 13.5ZM11 8.75C11 8.34375 11.3125 8 11.75 8C12.0312 8 12.2812 8.1875 12.4062 8.40625C11.875 8.625 11.4062 8.90625 11 9.28125V8.75ZM12 13.5C12 13.7812 12.2188 14 12.5 14H14V15.5C14 15.7812 14.2188 16 14.5 16C14.75 16 15 15.7812 15 15.5V14H16.5C16.75 14 17 13.7812 17 13.5C17 13.25 16.75 13 16.5 13H15V11.5C15 11.25 14.75 11 14.5 11C14.2188 11 14 11.25 14 11.5V13H12.5C12.2188 13 12 13.25 12 13.5Z"]},vM={prefix:"fab",iconName:"clone-plus",icon:[20,20,[],"e001","M4 16H11V14.5H13V16C13 17.1031 12.1031 18 11 18H4C2.89688 18 2 17.1031 2 16V9C2 7.89687 2.89688 7 4 7H5.5V9H4V16ZM7 11V4C7 2.89688 7.89687 2 9 2H16C17.1031 2 18 2.89688 18 4V11C18 12.1031 17.1031 13 16 13H9C7.89687 13 7 12.1031 7 11ZM12.5 4.5C12.0844 4.5 11.75 4.83437 11.75 5.25V6.75H10.25C9.83437 6.75 9.5 7.08437 9.5 7.5C9.5 7.91563 9.83437 8.25 10.25 8.25H11.75V9.75C11.75 10.1656 12.0844 10.5 12.5 10.5C12.9156 10.5 13.25 10.1656 13.25 9.75V8.25H14.75C15.1656 8.25 15.5 7.91563 15.5 7.5C15.5 7.08437 15.1656 6.75 14.75 6.75H13.25V5.25C13.25 4.83437 12.9156 4.5 12.5 4.5Z"]},CM={prefix:"fab",iconName:"flask-outline",icon:[20,20,[],"e001","M6 2.75C6 2.34375 6.34375 2 6.75 2H13.25C13.6562 2 14 2.34375 14 2.75C14 3.15625 13.6562 3.5 13.25 3.5H13V8.8125L16.7812 15.4062C16.9375 15.6562 17 15.9688 17 16.25C17 17.2188 16.2188 18 15.25 18H4.75C3.78125 18 3 17.2188 3 16.25C3 15.9688 3.09375 15.6562 3.21875 15.4062L7 8.8125V3.5H6.75C6.34375 3.5 6 3.15625 6 2.75ZM8.5 3.5V9C8.5 9.125 8.46875 9.25 8.40625 9.375L7.1875 11.5H12.8125L11.5938 9.375C11.5312 9.25 11.5 9.125 11.5 9V3.5H8.5ZM6.34375 13L4.53125 16.1562C4.5 16.1875 4.5 16.2188 4.5 16.25C4.5 16.4062 4.59375 16.5 4.75 16.5H15.25C15.4062 16.5 15.5 16.4062 15.5 16.25C15.5 16.2188 15.5 16.1875 15.4688 16.1562L13.6875 13H6.34375Z"]},xM={prefix:"fas",iconName:"language",icon:[640,640,[],"f1ab","M192 64C209.7 64 224 78.3 224 96L224 128L352 128C369.7 128 384 142.3 384 160C384 177.7 369.7 192 352 192L342.4 192L334 215.1C317.6 260.3 292.9 301.6 261.8 337.1C276 345.9 290.8 353.7 306.2 360.6L356.6 383L418.8 243C423.9 231.4 435.4 224 448 224C460.6 224 472.1 231.4 477.2 243L605.2 531C612.4 547.2 605.1 566.1 589 573.2C572.9 580.3 553.9 573.1 546.8 557L526.8 512L369.3 512L349.3 557C342.1 573.2 323.2 580.4 307.1 573.2C291 566 283.7 547.1 290.9 531L330.7 441.5L280.3 419.1C257.3 408.9 235.3 396.7 214.5 382.7C193.2 399.9 169.9 414.9 145 427.4L110.3 444.6C94.5 452.5 75.3 446.1 67.4 430.3C59.5 414.5 65.9 395.3 81.7 387.4L116.2 370.1C132.5 361.9 148 352.4 162.6 341.8C148.8 329.1 135.8 315.4 123.7 300.9L113.6 288.7C102.3 275.1 104.1 254.9 117.7 243.6C131.3 232.3 151.5 234.1 162.8 247.7L173 259.9C184.5 273.8 197.1 286.7 210.4 298.6C237.9 268.2 259.6 232.5 273.9 193.2L274.4 192L64.1 192C46.3 192 32 177.7 32 160C32 142.3 46.3 128 64 128L160 128L160 96C160 78.3 174.3 64 192 64zM448 334.8L397.7 448L498.3 448L448 334.8z"]},bM={"alert-circle-solid":eR.lE,"alert-circle":l2.lE,"alert-diamond":YR.xG,"angle-right":iR.vm,"arrow-down-from-line":lR.xZ,"arrow-down-to-bracket":dR.a_,"arrow-down-to-line":uR.yH,"arrow-down":cR.B0,"arrow-left":hR.Ce,"arrow-right-from-line":fR.Pe,"arrow-right":mR.dm,"arrow-rotate-left-light":sA.V3,"arrow-rotate-left":pR.V3,"arrow-up-from-bracket":vR.MN,"arrow-up-from-line":CR.s8,"arrow-up-right-from-square":xR.faArrowUpRightFromSquare,"arrow-up":gR.IN,"arrows-two-from-center":_w.A1,"arrows-two-to-center":Uw.hL,"badge-check":IA.Zs,"bar-chart":bR.X8,bars:EA.ck,"bars-regular":yR.ck,"block-selector":sR.iH,"book-open":LR.Re,"book-sparkles":TR.E4,book:SR.LB,"browser-light":Kw.c9,browser:kR.c9,building:Gw.UR,"building-regular":Ww.UR,"cards-blank":IR.Xm,"caret-down":jA.xB,"caret-right":wA.fU,"chart-column":kA.q9,"check-regular":rR.e6,check:NA.e6,"chevron-down-solid":AA.Jt,"chevron-down":ER.Jt,"chevron-left-light":Qw.Wz,"chevron-left-solid":PA.Wz,"chevron-left":NR.Wz,"chevron-right-light":Yw.Xk,"chevron-right-solid":MA.Xk,"chevron-right":jR.Xk,"chevron-up-solid":RA.w2,"chevron-up":wR.w2,"circle-arrow-right":DA.Ni,"circle-arrow-up":BA.yi,"circle-check-regular":RR.QR,"circle-check-solid":FA.QR,"circle-check":pA.QR,"circle-dot":PR.pp,"circle-half-stroke":MR.B2,"circle-exclamation":l2.lE,"circle-info":OR.faCircleInfo,"circle-notch":FR.s4,"circle-plus-duotone":gA.q_,"circle-plus-regular":BR.q_,"circle-plus":HA.q_,"circle-small-solid":$A.ZP,"circle-small":DR.ZP,"circle-solid":OA.GE,"circle-x":VA.Ub,"circle-xmark":HR.bn,"circle-xmark-solid":zA.bn,"circle-xmark-duotone":vA.bn,circle:AR.GE,"clipboard-list-check":$R.S3,"clock-rotate-left":VR.Yj,clone:_R.$3,close:UR.yY,"closed-captioning":zR.UM,"code-fork-duotone":CA.zt,"code-fork-regular":GR.zt,code:hM.jT,comment:WR.DN,copy:KR.jP,crop:QR.K1,"edit-regular":ZR.MT,"ellipsis-regular":XR.Dw,"ellipsis-vertical-regular":qR.nx,envelope:JR.y_,"external-link":eP.vM,"eye-slash":Xw.k6,eye:Zw.pS,"face-anguished":oA.xX,"face-anguished-regular":rA.xX,"face-frown":aA.Ho,"face-frown-regular":iA.Ho,"face-grin-regular":cA.pj,"face-laugh":lA.ou,"face-laugh-regular":dA.ou,"face-meh":uA.Lz,"face-meh-regular":hA.Lz,"face-smile":mA.H8,"face-smile-regular":fA.H8,"file-audio":nP.qe,"file-duotone":xA.A4,"file-export-light":Jw.o1,"file-export":sP.o1,"file-import":oP.$M,"file-lines":rP.bL,"file-pdf-light":qw.O_,"file-pdf":aP.O_,file:tP.A4,"folder-image":iP.JK,"folder-open":bA.Uj,gear:cP.BH,globe:lP.Bw,"graduation-cap":dP.eS,"grid-2":uP.Qy,"grid-solid":_A.Qy,"grip-dots-vertical":hP.IM,"hand-pointer":mP.A8,"image-landscape":pP.oC,"image-portrait":gP.E4,image:fP.jb,"photo-film":vP._Z,"info-circle":CP.iW,"layers-solid":JA.qI,"link-simple-slash":yP.r2,"link-simple":bP.wi,"link-slash":SP.TH,link:xP.CQ,list:LP.IT,"list-check":TP.UN,"location-dot":tA.gK,"lock-keyhole-light":eA.Yp,lock:UA.DW,"magnifying-glass-plus":IP.bM,"magnifying-glass":kP.$U,megaphone:nR.OR,"message-quote":EP.ps,"minus-solid":GA.EZ,minus:NP.EZ,paintbrush:yA.ue,palette:jP.fy,paste:wP.R9,pause:AP.G1,"pause-solid":WA.G1,"pen-line":RP.pg,"pen-nib":MP.us,"pen-to-square":PP.faPenToSquare,"pencil-duotone":SA.zL,"pencil-regular":aR.zL,"pencil-thin":mM.zL,pencil:nA.zL,"play-regular":d2.ij,"play-solid":KA.ij,play:d2.ij,"flag-solid":c2.s6,flag:c2.s6,"plus-regular":OP.QL,plus:BP.TS,"quote-left":DP.$7,"rectangle-history-circle-plus":HP.Hu,"rectangle-regular":FP.vt,"rectangle-vertical-history":$P.Lt,rocket:VP.KM,"ruler-horizontal":zP.Si,"ruler-triangle":_P.cb,"sliders-simple":QA.AD,"sparkles-solid":YA.p7,sparkles:UP.p7,"spinner-third":GP.sq,"square-arrow-down":KP.Y1,"square-arrow-right":QP.mT,"square-arrow-up-right":YP.fL,"square-check-solid":ZA.Dn,"square-check":ZP.Dn,"square-duo":LA.Nf,"square-info":XP.Lg,"square-plus":qP.Vd,square:WP.Nf,"stopwatch-regular":JP.nw,table:eM.w9,tag:tM._2,text:nM.jw,"trash-can":oM.sj,trash:sM.yL,"triangle-exclamation":tR.JA,"user-group":XA.US,"users-regular":rM.gd,users:TA.gd,video:aM.n2,volume:iM.eF,volumeHigh:cM.AI,volumeLow:lM.gN,volumeXmark:dM.H_,"wand-magic-sparkles":uM.Ys,"waveform-lines":oR.Wx,xmark:qA.Jy},yM={"audio-plus":gM,"clone-plus":vM,"flask-outline":CM,language:xM,reach:pM,"rise-com":fM},ie=(0,u.memo)(function({"aria-label":t,className:n,classNameIcon:o,color:r,"data-testid":a,name:i,rotation:c,spin:l,style:d,styleIcon:h}){return(0,s.jsx)("span",{className:n,"data-testid":a,style:{color:r,...d},children:(0,s.jsx)(i2.g,{"aria-label":t,className:o,icon:bM[i],rotation:c,spin:l,style:h})})}),Rde=(0,u.memo)(function({className:t,classNameIcon:n,color:o,name:r,style:a,styleIcon:i}){return(0,s.jsx)("span",{className:t,style:{color:o,...a},children:(0,s.jsx)(i2.g,{className:n,icon:yM[r],style:i})})}),SM=({value:e,fallback:t})=>{const n=Re(e),o=jt(e);return t?(0,s.jsx)("span",{"data-l10n-id":o,children:n||t}):(0,s.jsx)("span",{"data-l10n-id":o,children:n})};function LM({value:e,children:t}){const n=Re(e);return t(n)}const mn=SM,u2=new Intl.DisplayNames(["en"],{type:"language",fallback:"code"}),TM=(e,t)=>{const n=e?.toLowerCase();try{return t?.[n]?.authorDisplayName??u2.of(e)}catch(o){return console.warn(`Language ${e} invalid`,o),e}},kM=(e,t)=>{try{return t?.[e]?.learnerDisplayName??u2.of(e)}catch(n){return console.warn(`Language ${e} invalid`,n),e}},Bh=()=>{const e=qr(),t=oh(e);return(0,u.useCallback)(o=>TM(o,t),[t])},IM=()=>{const e=qr(),t=oh(e);return(0,u.useCallback)(o=>kM(o,t),[t])};var EM=p(27526);function nn(e){const{to:t,children:n}=e,o=(0,je.zy)(),r=(0,u.useMemo)(()=>i0(t,o),[o,t]);return(0,s.jsx)(je.N_,{...e,to:r,children:n})}function NM({children:e,locale:t,...n}){const o=(0,je.zy)(),r=os(),a=(0,u.useMemo)(()=>{const i=t===r?"":t,c=new URLSearchParams(o.search);return c.set("locale",i),o.pathname+"?"+c.toString()+o.hash},[r,t,o]);return(0,s.jsx)(nn,{...n,to:a,children:e})}var Ts=p(63572),jM=p(21208),kl=p.n(jM);const wM={keys:["End"],keyCode:Ts.KEY_END},AM={keys:["Enter"],keyCode:Ts.KEY_RETURN},RM={keys:["Home"],keyCode:Ts.KEY_HOME},PM={keys:["Tab"],keyCode:Ts.KEY_TAB},MM={keys:[" "],keyCode:Ts.KEY_SPACE},OM={keys:["Escape","Esc"],keyCode:Ts.KEY_ESCAPE},BM={keys:["ArrowUp"],keyCode:Ts.KEY_UP},DM={keys:["ArrowDown"],keyCode:Ts.KEY_DOWN},FM={keys:["ArrowLeft"],keyCode:Ts.KEY_LEFT},HM={keys:["ArrowRight"],keyCode:Ts.KEY_RIGHT},ks=({keyCode:e,keys:t})=>n=>n.keyCode?n.keyCode===e:xo()(n.key,t),$M=e=>e.altKey||e.ctrlKey||e.metaKey,h2=ks(wM),ia=ks(AM),m2=ks(RM),Il=ks(PM),Dh=ks(MM),fn=ks(OM),vr=ks(BM),Cr=ks(DM),Ks=ks(FM),Qs=ks(HM),Ti=bo()(Dh,ia),Pde=bo()(Il,ia),VM=bo()(Qs,vr),zM=bo()(Ks,Cr),_M=bo()(vr,Cr),f2=go()(Ti),p2=25,UM=kl()((e,t)=>{e.scrollTop!==0&&(t.preventDefault(),e.scrollTop-=p2)}),GM=kl()((e,t,n)=>{t&&(n.preventDefault(),e.scrollTop+=p2)}),WM=(e,t)=>n=>{const o=GM(e,t),r=UM(e);un()([[Cr,o],[vr,r]])(n)},ls=V("locales-dropdown"),KM=({backToStackCourseId:e,currentLocale:t,defaultLocale:n,isBcd:o,locales:r,message:a,onChange:i,optionType:c,showMessageIndicator:l})=>{const d=(0,u.useRef)(null),h=(0,u.useRef)(null),[m,f]=(0,u.useState)(!1),[v,C]=(0,u.useState)(!1),g=(0,u.useMemo)(()=>r.filter(T=>T.localeCode!==n),[n,r]),x=(0,u.useMemo)(()=>r.find(T=>T.localeCode===n),[n,r]),b=(0,u.useMemo)(()=>r.find(T=>T.localeCode===t),[t,r]);(0,u.useLayoutEffect)(()=>{m&&v&&(d.current?.querySelector(`[data-locale="${t}"]`)?.focus(),C(!1))},[m,v,t]),(0,u.useEffect)(()=>{const T=k=>{fn(k)&&(h.current?.focus(),f(!1)),Il(k)&&setTimeout(()=>{d.current.contains(document.activeElement)||f(!1)},0)};return m&&document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[m]);const L=(0,u.useCallback)(T=>{!m&&document.activeElement===T.currentTarget&&C(!0),f(!m)},[m]),S=(0,u.useCallback)(T=>{m&&!h.current?.contains(T?.target)&&f(!1)},[m]);(0,EM.A)(d,S),(0,u.useEffect)(()=>{const T=()=>setTimeout(()=>{document.activeElement.tagName==="IFRAME"&&S()},0);return window.addEventListener("blur",T),()=>window.removeEventListener("blur",T)},[S]);const y=(0,u.useCallback)(T=>{document.activeElement===T.currentTarget&&h.current?.focus(),f(!1),i?.(T.currentTarget.getAttribute("data-locale"))},[i]);return(0,s.jsxs)("div",{className:ls({isOpen:m}),children:[(0,s.jsx)("div",{className:ls("trigger-wrap"),children:(0,s.jsxs)("button",{className:ls("trigger"),onClick:L,ref:h,type:"button",children:[o&&l?(0,s.jsx)(ie,{className:ls("warning-icon"),name:"triangle-exclamation"}):(0,s.jsxs)(s.Fragment,{children:[l&&(0,s.jsx)("div",{className:ls("message-indicator")}),(0,s.jsx)(ie,{name:"globe"})]}),b.displayName,(0,s.jsx)(ie,{name:"chevron-down"})]})}),(0,s.jsxs)("div",{className:ls("contents"),ref:d,children:[a,(0,s.jsx)("div",{className:ls("grouping-header"),children:"Source"}),(0,s.jsx)(g2,{checked:n===t,locale:x,onClick:y,type:c}),(0,s.jsx)("div",{className:ls("grouping-header"),children:"Translations"}),g.map(T=>(0,s.jsx)(g2,{checked:T.localeCode===t,locale:T,onClick:y,type:c},T.localeCode)),e&&(0,s.jsx)("a",{className:ls("stack-button"),href:`/manage/locales/${e}`,children:"Back to Stack"})]})]})},g2=({checked:e,locale:t,onClick:n,type:o})=>o==="link"?(0,s.jsx)(NM,{className:ls("option",{checked:e}),"data-locale":t.localeCode,locale:t.localeCode,onClick:n,children:t.displayName},t.localeCode):(0,s.jsx)("button",{className:ls("option",{checked:e}),"data-locale":t.localeCode,onClick:n,type:"button",children:t.displayName},t.localeCode),QM=({hideBackToStack:e,isBcd:t,...n})=>{const o=Fe(),{currentLocale:r}=nt(),a=sl(),i=os(),c=Bh(),l=!e&&!t?o?.id:void 0,d=(0,u.useMemo)(()=>a.map(h=>({localeCode:h.locale,displayName:c(h.locale)})),[c,a]);return(0,s.jsx)(KM,{backToStackCourseId:l,currentLocale:r,defaultLocale:i,isBcd:t,locales:d,optionType:"link",...n})},v2=window.location.origin,YM=1e3,ZM="course:ready",C2="localizedSharePreview:ready",XM="preview:selectLocale",Fh="localizedSharePreview:toggleCurtain",x2="localizedSharePreview:togglePreview",ds=V("localized-share-preview"),ca=!!window.frameElement,b2=e=>(0,Gt.HX)(e)&&N0(),y2=e=>b2(e)&&!ca,qM=(e,t)=>window.parent?.postMessage({type:e,data:t});let S2=null;const JM=({children:e,localesDropdown:t,title:n})=>(0,s.jsxs)("div",{className:ds("header"),dir:"ltr",children:[(0,s.jsxs)("div",{className:ds("header-title-dropdowns"),children:[(0,s.jsx)("div",{className:ds("header-title"),children:(0,s.jsx)("span",{className:ds("header-title-text"),children:(0,s.jsx)(mn,{value:n})})}),t&&(0,s.jsx)("div",{className:ds("header-dropdowns"),children:t})]}),(0,s.jsx)("div",{className:ds("header-btn-group"),children:e})]}),eO=({children:e,className:t,disabled:n=!1,onClick:o})=>(0,s.jsx)("button",{className:["button button--default button--header-done",t,n?"button--disabled":void 0].filter(Boolean).join(" "),disabled:n,onClick:o,style:{fontSize:"1.4rem",fontWeight:600,letterSpacing:0,textTransform:"none"},type:"button",children:e}),tO=({children:e})=>{const t=tt(),n=Xt(),o=(0,je.zy)(),{currentLocale:r,setCurrentLocale:a}=nt(),i=os(),c=F7(),l=ce(),h=!!(l&&"hasPassword"in l?l.hasPassword:void 0)||yg(),m=(0,u.useRef)(null),[f,v]=(0,u.useState)(!1),[C,g]=(0,u.useState)(!1),[x,b]=(0,u.useState)(!h),L=(0,u.useMemo)(()=>{const M=new URLSearchParams(window.location.search),P=new URLSearchParams;for(const O of["from"])M.has(O)&&P.set(O,M.get(O));const j=P.toString();return`${v2}/share/${window.shareId}${j?`?${j}`:""}#/?locale=${r}`},[]),[S,y]=(0,u.useState)(null),[T,k]=(0,u.useState)(r),[I,E]=(0,u.useState)(!1),[w,A]=(0,u.useState)(!ca),N=(M,P)=>m.current?.contentWindow.postMessage({type:M,data:P});(0,u.useEffect)(()=>{ca||N(XM,r)},[r]),(0,u.useEffect)(()=>{ca&&(qM(C2),setTimeout(()=>E(!0),0))},[]),(0,u.useEffect)(()=>{const M=P=>{if(P.origin!==v2)return;const O=P.data?.type,B=P.data?.data;if(ca)switch(O){case Fh:{A(B);break}case x2:{B?(k(r),y(o),t(Q0(!0)),a(i),n("/",{replace:!0})):(t(Q0(!1)),a(T),n(S.pathname+S.search+S.hash||"/",{replace:!0})),document.querySelector(".cover")?.scrollTo(0,0),document.querySelector(".page-wrap")?.scrollTo(0,0);break}}else switch(O){case ZM:{A(!1);break}case C2:{b(!0);break}}};return window.addEventListener("message",M),()=>{window.removeEventListener("message",M)}},[i,t,n,r,o,T,S,a]);const R=(0,u.useCallback)(()=>{const M=!f;clearTimeout(S2),g(!0),N(Fh,!0),S2=setTimeout(()=>{g(!1),N(Fh,!1),v(M)},YM),setTimeout(()=>{N(x2,M)},0)},[f]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:ds("curtain",{hide:!w}),children:(0,s.jsx)(a2,{status:"loading"})}),ca?I&&e:(0,s.jsxs)("div",{className:ds(),children:[x&&(0,s.jsx)(JM,{localesDropdown:!f&&!C&&(0,s.jsx)(QM,{hideBackToStack:!0}),title:c,children:(0,s.jsx)(eO,{className:ds("preview-button"),disabled:C,onClick:R,children:f?"Close Learner Preview":(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ie,{className:ds("preview-button-icon"),name:"play-regular"}),"Preview as Learner"]})})}),(0,s.jsx)("iframe",{allowFullScreen:!0,"aria-label":"Course preview",className:ds("iframe"),ref:m,src:L})]})]})},nO=(0,u.lazy)(()=>p.e("_b106").then(p.t.bind(p,63744,23))),sO=({children:e})=>{const t=ce(),{setCurrentLocale:n,currentLocale:o}=nt(),r=Re(t?.title),a=qr()?.l10n?.languageCodeMetadata??{},i=Object.entries(a).map(([c,l])=>({code:c,learnerDisplayName:l.learnerDisplayName})).sort((c,l)=>c.learnerDisplayName.localeCompare(l.learnerDisplayName));return(0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(nO,{courseTitle:r,currentLocale:o,locales:i,setCurrentLocale:n,children:e})})};function oO({children:e}){const t=ce();return t&&b2(t)?(0,s.jsx)(tO,{children:e}):Ls.isInstantLink?(0,s.jsx)(sO,{children:e}):(0,s.jsx)(s.Fragment,{children:e})}const Hh=(0,u.createContext)(void 0);Hh.displayName="RiseComPartnerTrackingContext";function rO({children:e,onTrack:t}){return(0,s.jsx)(Hh.Provider,{value:t,children:e})}function L2(){return(0,u.useContext)(Hh)}var aO=p(24332),iO=p.n(aO),cO=p(53802),lO=p.n(cO);class Ys{static get isChrome(){return!window||!window.navigator?!1:/Chrome/.test(window.navigator.userAgent)&&/Google Inc/.test(window.navigator.vendor)}static get isSafari(){return!window||!window.navigator?!1:/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor)&&!/CriOS/.test(window.navigator.userAgent)}static get isIphoneSafari(){if(!window||!window.navigator)return!1;const t=/iPhone|iPod/.test(window.navigator.userAgent)&&!window.MSStream,n=/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor),o=/CriOS/.test(window.navigator.userAgent);return t&&n&&!o}static get isSafari9(){if(!window||!window.navigator)return!1;const t=/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor),n=/version\/9./i.test(window.navigator.userAgent);return t&&n}static get isIe11(){return!!(window&&Object.hasOwnProperty.call(window,"ActiveXObject")&&!window.ActiveXObject)}static get isEdge(){return!window||!window.navigator?!1:/Edge/.test(window.navigator.userAgent)}static get isMobile(){return!window||!window.navigator?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}static get isLocalFilesystem(){return!window||!window.navigator?!1:/file:/.test(window.location.protocol)}static get isFirefox(){return window?.navigator?.userAgent.includes("Firefox")??!1}static get isBrave(){return globalThis?.navigator?typeof globalThis.navigator.brave?.isBrave=="function":!1}static get isChromium(){if(!globalThis?.navigator)return!1;const t=globalThis.navigator.userAgentData?.brands;return t?.length?t.some(({brand:n})=>/Chromium/i.test(n)):/Chrome|CriOS/.test(globalThis.navigator.userAgent)}static get isGoogleChrome(){if(!globalThis?.navigator||this.isBrave)return!1;const t=globalThis.navigator.userAgentData?.brands;if(t?.length)return t.some(({brand:a})=>/Google Chrome/i.test(a));const{userAgent:n,vendor:o}=globalThis.navigator,r=/Edg\/|OPR\/|SamsungBrowser|Vivaldi|Brave/.test(n);return/Chrome/.test(n)&&/Google Inc/.test(o)&&!r}}const dO=Ku()(Jn()),T2=e=>t=>`${e}/${t.id}`,uO=(e,t)=>_1()({data:(0,fe.action)(t),method:"POST",url:sL(dO(`/${t}`),Ye()("url"),e),...vo()(["headers","withCredentials"],e)}),hO=e=>(t,n)=>N1()(t,T2(n),$h(e,n)),mO=e=>Lt()(bt()({},["response","data"]),si()(Ye()("type"),(0,fe.error)(e))),fO=(e,t)=>n=>e.postRequest?e.postRequest(t,n):n,k2=e=>t=>n=>o=>l0(o,uO(t,n),e,c0()(mO(n),go()(zr()("data"),Ye()("data"))),lO()(Xn()(Ye()("error"),Yo().Rejected,Yo().of)),fO(t,{type:n,payload:o})),pO=({url:e,method:t,data:n,headers:o})=>{if(Ys.isFirefox){const r=new Blob([JSON.stringify(n)],{type:"application/json"}),a=window.navigator.sendBeacon(e,r);return Promise.resolve({type:n.type,payload:{...n.payload,queued:a}})}return fetch(e,{method:t,credentials:"include",headers:{"Content-Type":"application/json",...o},body:JSON.stringify(n),keepalive:!0}).then(r=>r.json()).then(Vr()("data"))},gO=Yo().fromPromise(pO),$h=Y0()(3,k2(ri)),vO=Y0()(3,k2(gO)),CO=e=>(t,n)=>iO()(t,T2(n),$h(e,n)),xO=e=>({debounce:hO(e),send:$h(e),fetchWithKeepAlive:vO(e),throttle:CO(e)}),bO=`${Ne("RISE_RUNTIME_URI")}/ducks`,yO=xO({headers:()=>({"x-rise-authoring-client":"e2e1c721d8538f65aefd91d441ccf875002c412d"}),postRequest:(e,t)=>t,url:bO,withCredentials:!0});var SO=p(5951),LO=p.n(SO);const Fde=LO()({context:{app:{name:"rise-frontend"}},payload:{articulate_user:I9(),userRole:j9(),subId:w9(),subPlan:A9(),subStatus:R9()}}),TO=Jn()("rise/track/")("TRACK");var $de;const kO=e=>({...e,context:{locale:navigator.language,device:M1(),channel:R1(),userAgentData:P1(),page:O1(),userAgent:B1(),...e.context}}),IO=(e,t)=>({...e,properties:{...A1(t),...e.properties}}),I2=e=>(t,n)=>{const o=n(),r=e0();let a=kO(e);return a=IO(a,o),a.userId=a.userId??r,a.author=a.author??r,t(yO.send(TO)(a))};function EO({children:e}){const t=tt(),n=(0,u.useCallback)(o=>t(I2(o)),[t]);return(0,s.jsx)(rO,{onTrack:n,children:e})}var El=p(82920);const E2=El.createContext({typefaces:[]});function NO({addTypefaces:e,children:t,typefaces:n=[]}){jO(n);const o=El.useMemo(()=>({addTypefaces:e,typefaces:n}),[e,n]);return(0,s.jsx)(E2.Provider,{value:o,children:t})}function Vde(){return El.useContext(E2)}function jO(e){El.useEffect(()=>{const t=new CSSStyleSheet;for(const n of e){const o=`[data-rise-typeface-id="${CSS.escape(n.id)}"] { font-family: "${CSS.escape(n.name)}"; }`;t.insertRule(o)}return t.insertRule('[data-rise-typeface-id="@@heading@@"] { font-family: var(--font-family-head); }'),t.insertRule('[data-rise-typeface-id="@@body@@"] { font-family: var(--font-family-body); }'),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t],()=>{document.adoptedStyleSheets=document.adoptedStyleSheets.filter(n=>n!==t)}},[e])}function wO(e){return e.fonts}function N2(){return ue(wO)}var AO=p(82920);function RO({children:e}){const t=N2(),n=AO.useMemo(()=>{const o=new Map;for(const r of t)o.set(r.id,{id:String(r.id),name:r.name,default:r.default});return Array.from(o.values())},[t]);return(0,s.jsx)(NO,{typefaces:n,children:e})}const Zs=({id:e="portal",childType:t="other",attributes:n}={})=>{const o=document.querySelector('dialog[open][aria-modal="true"]');let r,a;if(o!=null&&t!=="dialog"?(e=`${e}-dialog`,r=o.querySelector(`#${e}`),a=o):(r=document.querySelector(`#${e}`),a=document.body),r==null&&(r=document.createElement("div"),r.setAttribute("id",e),a.appendChild(r)),n)for(const[i,c]of Object.entries(n))r.setAttribute(i,c);return r},j2=Zs();function PO(e){e?e.appendChild(j2):document.body.appendChild(j2)}const w2=te.RISE_CLASSIC;function A2(e){switch(e){case te.RISE_CLASSIC:case te.APEX:case te.HORIZON:return e;default:return w2}}const Vh=(0,u.createContext)(w2);Vh.displayName="ThemeIdContext";function MO({children:e,themeId:t}){return(0,s.jsx)(Vh,{value:t,children:e})}function ut(){return(0,u.useContext)(Vh)}function OO(){const e=ce();return{accentContrast:e.theme?.accentContrast,bodyTypeface:e.bodyTypeface,color:e.color,headingTypeface:e.headingTypeface,isLegacyCourse:e.isLegacyCourse,uiTypeface:e.uiTypeface}}function BO(){const e=Xt(),t=(0,je.zy)(),n=(0,u.useRef)(e),o=(0,u.useRef)(new Set),r=(0,u.useRef)(window.location.href),a=(0,u.useRef)(null);n.current=e,a.current==null&&(a.current={push:(...i)=>n.current(...i),replace:i=>n.current(i,{replace:!0}),go:i=>n.current(i),goBack:()=>n.current(-1),goForward:()=>n.current(1),listen:i=>(o.current.add(i),()=>{o.current.delete(i)}),location:t}),(0,u.useEffect)(()=>{a.current&&h8(a.current)},[]),(0,u.useEffect)(()=>{if(!a.current)return;a.current.location=t,o.current.forEach(l=>l(t));const i=r.current,c=window.location.href;r.current=c,window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:i,newURL:c}))},[t])}var la=p(58893),DO=p(51246),yt=p.n(DO),FO=p(30349),HO=p.n(FO);const $O=si()(fh()(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i),Pe()("#FFF")),VO=Bs()({color:$O}),zO=({accentContrast:e,bodyTypeface:t,color:n,headingTypeface:o,isLegacyCourse:r,uiTypeface:a})=>{const i=(0,u.useMemo)(()=>{const d=Fn(n),h=e??d;return!r&&(h===Te.DARK||h===Te.AUTO&&d===Te.DARK)?[xt.DARK,xt.LIGHT]:[xt.LIGHT,xt.DARK]},[e,n,r]),[c,l]=i;return(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:HO()({bodyTypeface:t,colorThemeRGB:(0,la.A)(n)?.slice(0,3),colorTheme:n,colorThemeContrast:c,colorThemeContrastComplementary:l,colorThemeContrastComplementaryRGB:(0,la.A)(l)?.slice(0,3),colorThemeContrastRGB:(0,la.A)(c)?.slice(0,3),colorThemeTint:A0(n),colorThemeTransparent:n+"1A",headingTypeface:o,uiTypeface:a})}})},zh=Me()(zO,VO);zh.displayName="Branding",zh.propTypes={bodyTypeface:yt().string,color:yt().string.isRequired,headingTypeface:yt().string,uiTypeface:yt().string};const _O=(0,u.memo)(zh),UO=e=>e?`${e} | ${_p}`:_p,ki=e=>Xa()?e:UO(e);function xr({children:e,title:t,isExplicit:n=!1}){const o=ki(fC());return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("title",{children:t??o},n?"explicit":"default"),e]})}const _h=V("not-found"),Nl=()=>(0,s.jsx)(xr,{title:ki(),children:(0,s.jsx)("div",{className:_h(),children:(0,s.jsxs)("div",{className:_h("copy"),children:[(0,s.jsx)("h1",{className:_h("copy",{heading:!0}),tabIndex:-1,children:"Hmm..."}),(0,s.jsx)("div",{children:"We can't seem to find the page you're looking for."})]})})});var R2,P2,jl;const M2=(0,u.createContext)({enabled:!0,isActive:!1,onAuthorized:()=>{},onError:()=>{},onSubmitPassword:()=>{},onUnauthorized:()=>{},status:"authorized"});let Ude;function Gde(){}function GO(){return(0,u.useContext)(M2)}function WO({children:e}){if(!Ls.isInstantLink)return(0,s.jsx)(s.Fragment,{children:e});const t=void 0;return t==null?(0,s.jsx)(s.Fragment,{children:e}):(0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(t,{children:e})})}function Wde({children:e,PasswordGate:t}){const n=window.InstantLinks?.isPasswordProtected?.()===!0,[o,r]=P2(),[a,i]=P2(n?"required":"authorized"),c=jl(()=>{i("authorized")},[]),l=jl(()=>{i("error")},[]),d=jl(f=>{r(f),i("validating")},[]),h=jl(()=>{i("unauthorized")},[]),m=a==="authorized"||a==="validating";return R2(t,{onSubmitPassword:d,status:a,children:R2(M2.Provider,{value:{enabled:m,isActive:!0,onAuthorized:c,onError:l,onSubmitPassword:d,onUnauthorized:h,password:o,status:a},children:e})})}function KO(e){return e.partnerContent}function QO(){return ue(KO)}function O2(e){return e?.partnerContent?.content??[]}function Ii(){return ue(O2)}const B2=(0,$e.Mz)(e=>Wt(e)?.selectedAuthorId,O2,(e,t)=>t.find(n=>n.id===e)),YO=(0,$e.Mz)(e=>Wt(e)?.partnerContentId,B2,(e,t)=>e?t:void 0);function ZO(){return ue(B2)}function Ei(){return ue(YO)}function XO(){const e=ZO();return(0,u.useMemo)(()=>e?.data?.authors??null,[e])}function qO(){return Ii()?.[0]?.data?.authors}function JO(e,t){const n=rl(),{currentLocale:o}=nt(),r=o&&n?.localeLabelSets?.[o]?.labels||e,a=o&&n?.localeLabelSets?.[o]!=null?o:t;return{labels:r,labelsLocale:a}}function eB({children:e}){const t=ce(),n=gr(),{labels:o,iso639Code:r}=Pj(),a=QO(),i=To(),c=t?.locale??r,{labels:l,labelsLocale:d}=JO(o,c);return(0,s.jsx)(w7,{course:t,courseProgress:n,labels:l,labelsLocale:d,partnerContent:a,search:i,children:e})}var tB=p(56050);function nB({children:e,l10n:t}){const n=(0,u.useMemo)(()=>({l10n:t==null?null:(0,tB.omit)(["locales","defaultLocale"],t)}),[t]),o=t?.locales,r=t?.defaultLocale,a=t?.localeSelectorOptions,i=t?.languageCodeMetadata,c=(0,u.useMemo)(()=>o==null||r==null?{l10n:null}:{l10n:{locales:o,defaultLocale:r,localeSelectorOptions:a,languageCodeMetadata:i}},[o,r,a,i]);return(0,s.jsx)(vi.Provider,{value:n,children:(0,s.jsx)(dh.Provider,{value:c,children:e})})}function D2(e,t=window.location){const{defaultLocale:n,locales:o}=e??{};let r=new URLSearchParams(t.search).get("locale");if(r==null&&t.hash){const c=(0,je.Rr)(t.hash.slice(1));r=new URLSearchParams(c.search).get("locale")}const a=new URL(window.location.href);return a.pathname.startsWith("/view-pdf/")&&(r=a.searchParams.get("locale")),o?.find(c=>c.locale===r)?.locale||n}function sB({defaultLocale:e,locales:t}){const n=Xt(),o=(0,je.zy)(),r=(0,u.useRef)(o);r.current=o;const a=(0,u.useMemo)(()=>D2({defaultLocale:e,locales:t},o),[e,t,o]),i=(0,u.useCallback)((c,l="replace")=>{const d=r.current,h=c===e?"":c,m=new URLSearchParams(d.search);m.set("locale",h);const f=d.pathname+"?"+m.toString()+d.hash;l==="push"?n(f):n(f,{replace:!0})},[e,n]);return{currentLocale:a,setCurrentLocale:i}}const F2=e=>e===window.location.origin||e==="articulate.com"||e.endsWith(".articulate.com");function oB(e,t){const n=ce(),o=rl(),r=ue(l=>l.courseLabels.iso639Code),a=n?.locale??r,i=o?.locales;(0,u.useEffect)(()=>{document.documentElement.lang=e??a??""},[e,a]),(0,u.useEffect)(()=>{n&&eh({course:n,locales:i,locale:e})?document.documentElement.dir="rtl":document.documentElement.dir=""},[n,i,e]);const c=(0,u.useCallback)(l=>{if(!F2(l.origin))return;const h=[l.data].flat().find(m=>m?.type==="preview:selectLocale");h&&t(h.data,"replace")},[t]);(0,u.useEffect)(()=>(window.addEventListener("message",c),()=>window.removeEventListener("message",c)),[c])}function rB({children:e}){const t=rl(),{currentLocale:n,setCurrentLocale:o}=sB({defaultLocale:t?.defaultLocale,locales:t?.locales});return oB(n,o),(0,s.jsx)(nB,{l10n:t,children:(0,s.jsx)(L7,{currentLocale:n,setCurrentLocale:o,children:e})})}function aB(e){const t=e?.exportSettings?.webExportSettings,n=e?.exportSettings?.exportType==="raw",o=e?.exportSettings?.exportType==="lms";return!!(n&&t?.disableCoverPage||o&&e?.lmsOptions?.disableCoverPage)}function H2(e){return!Ls.isInstantLink&&aB(e)}function iB(e){return H1(e)||h0(e)||ei(e)||m0(e)?!0:H2(e)}const $2=(0,u.createContext)({translationHoveredPath:null});function cB(){return(0,u.use)($2)}const lB=$2.Provider,V2="focus-lesson-content",Kde="preview-nav-to-first-lesson",Qde="preview-nav-to-cover-page",Ue="preview-nav-to-lesson-item",Uh="preview-nav-to-slide",Yde="preview-scroll-to-nav-prev",Zde="preview-scroll-to-header",Gh="preview-clear-state",wl="preview-show-nav-prev",Al="preview-show-nav-next",z2="preview-nav-open",_2="preview-nav-close",U2="event-lesson-transition-start",G2="event-lesson-transition-end",W2="event-lesson-nav-prev-visible",Wh="event-lesson-nav-prev-hidden",K2="event-lesson-nav-next-visible",Kh="event-lesson-nav-next-hidden",Qh="data-change-path",Yh="data-l10n-id",Q2=(e,t)=>{if(e)return t?["l10n","translations",t,e.getAttribute(Yh)]:JSON.parse(e.getAttribute(Qh))};let Xs;const dB=()=>{const e=da();e&&e.classList.add("selected")},Rl=()=>{da()&&Xs&&Ni(Xs)},uB=(e,t)=>n=>{const o=document.elementsFromPoint(n.clientX,n.clientY),r=t?o.find(a=>a.getAttribute(Yh)):o.find(a=>a.getAttribute(Qh));r!=null&&(e&&Xs!==r&&(Xs=r,e(Q2(r,t))),Ni(r))},hB=(e,t)=>n=>{n.stopPropagation(),n.preventDefault();const o=document.elementsFromPoint(n.clientX,n.clientY),r=t?o.find(a=>a.getAttribute(Yh)):o.find(a=>a.getAttribute(Qh));if(r){Ni(r),Z2();const a=Q2(r,t);a&&(e(a),dB())}},Zh=()=>document.getElementById("target-container"),da=()=>document.getElementById("target-highlight"),Y2=()=>{if(Zh())return;const t=document.createElement("div");t.classList.add("target-container"),t.id="target-container",document.body.appendChild(t);const n=document.createElement("div");n.classList.add("target-highlight"),n.id="target-highlight",t.appendChild(n)},Z2=()=>{const e=da();e&&e.classList.add("selected")},mB=({top:e,left:t,width:n,height:o})=>{const r=document.querySelector("[data-page=true]")?.getBoundingClientRect().width??window.innerWidth-20;return n<r&&(e=e-10,o=o+20,t=t-20,n=n+40),{top:e,left:t,width:n,height:o}},Ni=e=>{const{top:t,left:n,width:o,height:r}=mB(e.getBoundingClientRect()),a=da();a&&(e!==Xs&&a.classList.contains("selected")&&a.classList.remove("selected"),a.classList.add("active"),Object.assign(a.style,{top:`${t}px`,left:`${n}px`,width:`${o}px`,height:`${r}px`}),Xs=e)},fB=()=>{window.removeEventListener("scroll",Rl,{capture:!0}),Pl()},Pl=()=>{da()?.classList?.remove("active"),da()?.classList?.remove("selected")};let ua,Ml;const pB=({locale:e})=>({isActive:t},n)=>{const o=!!Zh();if(t){if(ua)return ua;Y2();const r=uB(n,e);let a;return ua=new Promise((i,c)=>{a=hB(i,e),Ml=c,document.body.classList.add("target-mode"),window.addEventListener("mousemove",r,!0),window.addEventListener("click",a,!0),window.addEventListener("resize",Pl,!0),window.addEventListener("scroll",Rl,!0)}).finally(()=>{ua=null,Ml=null,document.body.classList.remove("target-mode"),window.removeEventListener("mousemove",r,!0),window.removeEventListener("click",a,!0),window.removeEventListener("resize",Pl,!0),window.removeEventListener("scroll",Rl,!0)}),ua}else Pl(),Zh()?.remove(),Xs=null;return o&&Ml!=null&&Ml(new Error("cancelled")),Promise.resolve()},gB=e=>{let t=e.findIndex(n=>n==="items");return t===-1?e:e.slice(0,t+2)},X2=e=>{const t=(0,Fr.Ce)(e);return t?t.type==="translation"||t.type==="caption"&&t.l10nId?document.querySelector(`[data-l10n-id='${t.l10nId}']`)??document.querySelector(`[data-l10n-id*='${t.l10nId}']`):document.querySelector(`[data-change-path='${JSON.stringify(gB(e))}']`):null},vB=e=>{Y2(),window.addEventListener("scroll",Rl,{capture:!0}),document.body.classList.add("target-mode");const t=X2(e);t&&Ni(t)},CB=e=>{if(!ua)return;const t=X2(e);t&&(Xs!==t&&(Xs=t),Ni(t),Z2(),t.scrollIntoView({behavior:"smooth",block:"center"}))},xB=e=>["course",e],q2=(e,t)=>["lessons",{id:e},t],bB=(e,t)=>[...q2(e,"items"),{id:t}],ha=e=>JSON.stringify(xB(e)),J2=(e,t)=>JSON.stringify(q2(e,t)),yB=(e,t)=>JSON.stringify(bB(e,t)),pn={STATUS:"targetMode:status",TOGGLE:"targetMode:toggle",FOCUS:"targetMode:focus",CLEAR:"targetMode:clear",SELECTED:"targetMode:selected",HOVERED:"targetMode:hovered",TRANSLATION_HOVERED:"targetMode:translationHovered",TRANSLATION_HOVER_CLEAR:"targetMode:translationHoverClear"},ma=(e,t)=>{const n={};for(let o=0;o<e.length;o++){const r=e[o];if(typeof r=="object"&&r.id){const a=e[o-1],i=a==="items"?t.shift():a.replace(/s$/,"");n[`${i??"item"}Id`]=r.id}}return n},SB=new Set(["preview:lessonUpdate","preview:navigate","preview:scrollto","preview:showLessonNavNext","preview:showLessonNavPrev","preview:themeUpdate","preview:update","preview:navOpen","preview:navClose","preview:replace","preview:changeset","preview:selectLocale",pn.FOCUS,pn.TOGGLE,pn.CLEAR,pn.TRANSLATION_HOVERED,pn.TRANSLATION_HOVER_CLEAR]),LB=(e,t)=>!(e==="firstLesson"&&t.includes("/lessons/"))&&!(e==="cover"&&(t==="/"||t==="/preview"));function TB({course:e,fonts:t,l10n:n}){let o=!1;return Av(t,()=>{o||(Dn(RI({course:e,fonts:t,l10n:n})),window.parent.postMessage({type:"preview:themeUpdateComplete"},window.location.origin))}),{cancel(){o=!0}}}function kB(){let e=[],t=0;return n=>{clearTimeout(t);for(const o of n)e.push(o);t=window.setTimeout(()=>{const o=e;e=[],Dn(MI(o))},15)}}function IB(){const e=Xt(),t=(0,je.zy)(),n=ue(b=>b.course),[o,r]=(0,u.useState)(""),[a,i]=(0,u.useState)({translationHoveredPath:null}),[c,l]=(0,u.useState)(!1),[d,h]=(0,u.useState)(!1),m=(0,u.useRef)(e);m.current=e;const f=(0,u.useRef)(t);f.current=t;const v=(0,u.useRef)(n);v.current=n;const C=(0,u.useRef)(null),g=(0,u.useRef)(kB()),x=(0,u.useRef)(t);return(0,u.useEffect)(()=>{x.current!==t&&(h(!0),x.current=t)},[t]),(0,u.useEffect)(()=>{if(d){const b=setTimeout(()=>{h(!1),l(!1)},0);return()=>clearTimeout(b)}},[d]),(0,u.useEffect)(()=>{const b=L=>{const{data:S,origin:y}=L;if(!F2(y))return;const T=m.current,I=f.current.pathname,E=v.current,w=E?.lessonsOnly,A=Array.isArray(S)?S:[S];for(const{type:N,data:R,options:M}of A)if(SB.has(N)){if(N===pn.TOGGLE&&window.targetMode?.(R,j=>{window.parent.postMessage({type:pn.HOVERED,data:j},"*")})?.then(j=>{window.parent.postMessage({type:pn.SELECTED,data:j},"*")}).catch(()=>{window.parent.postMessage({type:pn.SELECTED,data:[]},"*")}),N==="preview:update"&&r(R),N==="preview:themeUpdate"){C.current?.();const{course:P,l10n:j,fonts:O,theme:B}=R,D={...P,theme:B},H=lk({course:E,updates:D}),{cancel:$}=TB({course:H,fonts:O,l10n:j});C.current=$}if(N==="preview:navigate"){let{type:P,lessonId:j,itemId:O}=R;const{path:B,replace:D}=R,H=D?$=>T($,{replace:!0}):T;if(LB(P,I)){if(Array.isArray(B)){const $=(0,Fr.Ce)(B);if($)({type:P,lessonId:j,itemId:O}=$);else if(B[0]==="mondrian")for(const W of E?.lessons??[]){const U=W.items?.find(Z=>"blockumentId"in Z&&Z.blockumentId===B[1]);if(U){P="lesson",j=W.id,O=U.id;break}}else continue}if(P==="firstLesson"&&w?.[0])H(In(w[0].id));else if(P==="cover"||P==="course")H("/");else if(P==="lesson"&&w?.find(({id:W})=>W===j)!=null){const W=In(j),U=ei(E),Z=(0,je.B6)(xl,I)!=null||(0,je.B6)(bl,I)!=null,Q=W!==I&&!(U&&Z),z=()=>{U&&O==null&&B==null?window.dispatchEvent(new CustomEvent(Uh,{detail:{lessonId:j}})):(O!=null||B!=null)&&window.dispatchEvent(new CustomEvent(Ue,{detail:{lessonId:j,itemId:O,path:B}}))},F=U&&O==null&&B==null||O!=null||B!=null;hh(aC.getState())===So.RESTRICTED&&Dn(nE({targetLessonId:j,lessons:E?.lessons??[]})),Q&&H(W),F&&(Q?setTimeout(z,1500):z())}}}if(N===pn.CLEAR&&window.dispatchEvent(new CustomEvent(Gh)),N==="preview:navOpen"&&window.dispatchEvent(new CustomEvent(z2)),N==="preview:navClose"&&window.dispatchEvent(new CustomEvent(_2)),N==="preview:showLessonNavPrev"&&window.dispatchEvent(new CustomEvent(wl)),N==="preview:showLessonNavNext"&&window.dispatchEvent(new CustomEvent(Al)),N==="preview:scrollto"&&typeof R.target=="string"){const P=document.querySelector(R.target);P&&P.scrollIntoView({behavior:"smooth",block:"start"})}N==="preview:replace"&&Dn(AI(R)),N==="preview:changeset"&&g.current(R),N===pn.FOCUS&&CB(R.path),N===pn.TRANSLATION_HOVERED&&(i({translationHoveredPath:R.path}),vB(R.path)),N===pn.TRANSLATION_HOVER_CLEAR&&(i({translationHoveredPath:null}),fB()),N==="preview:lessonUpdate"&&(Dn(PI(R)),window.parent.postMessage({type:"preview:lessonUpdateComplete"},window.location.origin)),N==="preview:selectLocale"&&M?.shouldRetainParentFocus&&l(!0)}};return window.addEventListener("message",b),()=>window.removeEventListener("message",b)},[]),{previewType:o,targetModeContext:a,didNavigate:d,shouldSkipAutoFocusOnNavigate:c}}const ex=(0,u.createContext)(null);function Ol(){const e=(0,u.useContext)(ex);if(e==null)throw new Error("usePreviewState must be used within PreviewRuntimeProvider");return e}function EB({children:e}){const{previewType:t,targetModeContext:n,didNavigate:o,shouldSkipAutoFocusOnNavigate:r}=IB(),a=(0,u.useMemo)(()=>({previewType:t||void 0,didNavigate:o,shouldSkipAutoFocusOnNavigate:r}),[t,o,r]);return(0,s.jsx)(lB,{value:n,children:(0,s.jsx)(ex,{value:a,children:e})})}function Xh({className:e,ref:t}){return(0,s.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",height:"15",ref:t,role:"img",viewBox:"0 0 16 15",width:"16",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M2.34315 7.34315L8 13L13.6569 7.34315",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,s.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",width:"2",x:"7",y:"1"})]})}function NB({className:e}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",height:"8",role:"img",viewBox:"0 0 16 8",width:"16",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M1 5h11.6l-1.3 1.3c-.4.4-.4 1 0 1.4.2.2.4.3.7.3.3 0 .5-.1.7-.3l3-3c.4-.4.4-1 0-1.4l-3-3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4L12.6 3H1c-.6 0-1 .4-1 1s.4 1 1 1",fill:"currentColor",fillRule:"evenodd"})})}function tx({className:e,ref:t}){return(0,s.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",height:"15",ref:t,role:"img",viewBox:"0 0 16 15",width:"16",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M13.6569 7.65685L8 2L2.34315 7.65686",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,s.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",transform:"rotate(180 9 14)",width:"2",x:"9",y:"14"})]})}function Pt({children:e,className:t,height:n,width:o,viewBox:r}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focusable:"false",height:n,viewBox:r,width:o,xmlns:"http://www.w3.org/2000/svg",children:e})}function jB(e){return(0,s.jsx)(Pt,{height:"12",viewBox:"0 0 18 12",width:"18",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M0.666992 1.00002C0.666992 0.539783 1.04009 0.166687 1.50033 0.166687H14.0003C14.4606 0.166687 14.8337 0.539783 14.8337 1.00002C14.8337 1.46026 14.4606 1.83335 14.0003 1.83335H1.50033C1.04009 1.83335 0.666992 1.46026 0.666992 1.00002ZM0.666992 6.00002C0.666992 5.53978 1.04009 5.16669 1.50033 5.16669H16.5003C16.9606 5.16669 17.3337 5.53978 17.3337 6.00002C17.3337 6.46026 16.9606 6.83335 16.5003 6.83335H1.50033C1.04009 6.83335 0.666992 6.46026 0.666992 6.00002ZM0.666992 11C0.666992 10.5398 1.04009 10.1667 1.50033 10.1667H10.667C11.1272 10.1667 11.5003 10.5398 11.5003 11C11.5003 11.4603 11.1272 11.8334 10.667 11.8334H1.50033C1.04009 11.8334 0.666992 11.4603 0.666992 11Z",fill:"currentColor",fillRule:"evenodd"})})}function wB(e){return(0,s.jsx)(Pt,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,s.jsx)("path",{d:"M9 1L5 5L1 1",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function AB(e){return(0,s.jsx)(Pt,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,s.jsx)("path",{d:"M1 5L5 1L9 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function RB(e){return(0,s.jsxs)(Pt,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,s.jsx)("path",{d:"M9.94535 6.125C9.1938 6.125 8.52385 6.6729 8.30039 7.48015C8.17194 7.9442 7.70954 8.21104 7.26759 8.07617C6.82564 7.94129 6.5715 7.45577 6.69996 6.99172C7.11282 5.50025 8.3916 4.375 9.94535 4.375C11.8499 4.375 13.3335 6.05606 13.3335 8.05C13.3335 9.7417 12.2656 11.2082 10.7787 11.6139V12.25C10.7787 12.7332 10.4056 13.125 9.94535 13.125C9.48511 13.125 9.11201 12.7332 9.11201 12.25V10.85C9.11201 10.3668 9.48511 9.975 9.94535 9.975C10.8628 9.975 11.6668 9.14886 11.6668 8.05C11.6668 6.95114 10.8628 6.125 9.94535 6.125Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M10.0002 14C9.53992 14 9.16683 14.3918 9.16683 14.875C9.16683 15.3582 9.53992 15.75 10.0002 15.75H10.0085C10.4687 15.75 10.8418 15.3582 10.8418 14.875C10.8418 14.3918 10.4687 14 10.0085 14H10.0002Z",fill:"currentColor"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M0.833496 3.55556C0.833496 2.01519 2.09493 0.875 3.51868 0.875H16.4816C17.9054 0.875 19.1668 2.01519 19.1668 3.55556V17.4444C19.1668 18.9848 17.9054 20.125 16.4816 20.125H3.51868C2.09493 20.125 0.833496 18.9848 0.833496 17.4444V3.55556ZM3.51868 2.625C2.89693 2.625 2.50016 3.10156 2.50016 3.55556V17.4444C2.50016 17.8984 2.89693 18.375 3.51868 18.375H16.4816C17.1034 18.375 17.5002 17.8984 17.5002 17.4444V3.55556C17.5002 3.10156 17.1034 2.625 16.4816 2.625H3.51868Z",fill:"currentColor",fillRule:"evenodd"})]})}function gn(e){return(0,s.jsx)("svg",{"aria-hidden":"true",fill:"currentColor",focusable:"false",xmlns:"http://www.w3.org/2000/svg",...e})}function nx(e){return(0,s.jsx)(gn,{...e,fill:"none",viewBox:"1 1 18 18",children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M9.99998 0.833336C4.93737 0.833336 0.833313 4.93739 0.833313 10C0.833313 15.0626 4.93737 19.1667 9.99998 19.1667C15.0626 19.1667 19.1666 15.0626 19.1666 10C19.1666 4.93739 15.0626 0.833336 9.99998 0.833336ZM13.0892 6.91075C13.4147 7.23618 13.4147 7.76382 13.0892 8.08926L11.1785 10L13.0892 11.9107C13.4147 12.2362 13.4147 12.7638 13.0892 13.0893C12.7638 13.4147 12.2362 13.4147 11.9107 13.0893L9.99998 11.1785L8.08923 13.0893C7.7638 13.4147 7.23616 13.4147 6.91072 13.0893C6.58529 12.7638 6.58529 12.2362 6.91072 11.9107L8.82147 10L6.91072 8.08926C6.58529 7.76382 6.58529 7.23618 6.91072 6.91075C7.23616 6.58531 7.7638 6.58531 8.08923 6.91075L9.99998 8.82149L11.9107 6.91075C12.2362 6.58531 12.7638 6.58531 13.0892 6.91075Z",fill:"black",fillRule:"evenodd"})})}function Bl(e){return(0,s.jsxs)(gn,{...e,fill:"none",viewBox:"0 0 18 18",children:[(0,s.jsx)("circle",{cx:"9",cy:"9",fill:"#74BF44",r:"9"}),(0,s.jsx)("path",{d:"M6.43994 9.12061L8.43994 11.1206L11.9399 7.62061",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})}function PB(e){return(0,s.jsx)(Pt,{height:"12",viewBox:"0 0 12 12",width:"12",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M5.325 9.01843C3.225 9.01843 1.5 7.37868 1.5 5.29172C1.5 3.20476 3.225 1.49048 5.325 1.49048C7.425 1.49048 9.15 3.20476 9.15 5.29172C9.15 7.37868 7.425 9.01843 5.325 9.01843ZM9.525 8.42236C10.2 7.52795 10.575 6.48447 10.575 5.29193C10.575 2.38509 8.25 0 5.325 0C2.4 0 0 2.38509 0 5.29193C0 8.19876 2.4 10.5839 5.325 10.5839C6.525 10.5839 7.65 10.2112 8.475 9.54037L10.725 11.7764C10.875 11.9255 11.1 12 11.25 12C11.4 12 11.625 11.9255 11.775 11.7764C12.075 11.4783 12.075 11.0311 11.775 10.7329L9.525 8.42236Z",fill:"currentColor",fillRule:"evenodd"})})}function MB(e){return(0,s.jsx)(Pt,{height:"5",viewBox:"0 0 10 5",width:"10",...e,children:(0,s.jsx)("path",{d:"M5.56569 4.75592L8.76601 1.42259C9.27003 0.897618 8.91306 0 8.20027 0L1.79963 0C1.08683 0 0.729863 0.897618 1.23389 1.42259L4.43421 4.75592C4.74666 5.08136 5.25324 5.08136 5.56569 4.75592Z",fill:"currentColor"})})}function OB(e){return(0,s.jsxs)(Pt,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,s.jsx)("path",{d:"M3.1665 6.08335C3.1665 4.01229 4.84544 2.33335 6.9165 2.33335C8.98757 2.33335 10.6665 4.01229 10.6665 6.08335C10.6665 6.37941 10.6324 6.66643 10.5681 6.9411C10.4634 7.38925 10.7417 7.83748 11.1899 7.94225C11.6381 8.04702 12.0863 7.76865 12.1911 7.3205C12.2841 6.92235 12.3332 6.50805 12.3332 6.08335C12.3332 3.09181 9.90805 0.666687 6.9165 0.666687C3.92496 0.666687 1.49984 3.09181 1.49984 6.08335C1.49984 6.46923 1.54032 6.84657 1.61756 7.21105C1.679 7.50095 1.76362 7.78236 1.86938 8.05316C1.97511 8.32389 2.10191 8.5839 2.24772 8.83119C2.48148 9.22764 2.99237 9.35953 3.38882 9.12577C3.78527 8.89201 3.91716 8.38112 3.6834 7.98467C3.58248 7.81352 3.49485 7.63379 3.42186 7.44688C3.34886 7.25994 3.29045 7.0657 3.24802 6.86551C3.1947 6.61395 3.1665 6.3524 3.1665 6.08335Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M9.18922 9.34412L14.8186 10.2697C16.2762 10.5117 17.3332 11.6819 17.3332 13.0521V16.6037C17.3332 17.0029 16.9837 17.3264 16.553 17.3264C16.122 17.3264 15.7728 17.0029 15.7728 16.6037V13.0521C15.7728 12.3826 15.2561 11.8108 14.5446 11.6926L8.30452 10.6667H8.30233C7.90851 10.6331 7.57585 10.2773 7.57585 9.8899V6.0524C7.57585 5.88733 7.48441 5.73325 7.33119 5.64046C7.17921 5.54853 6.99291 5.53668 6.82002 5.60606C6.63747 5.68035 6.51483 5.87085 6.51483 6.08044V15.3607C6.51483 15.6856 6.30169 15.9391 5.91441 16.0741C5.40325 16.2528 4.90988 16.0261 4.70516 15.7226L3.01346 13.2999C2.93513 13.1565 2.84963 13.09 2.68954 13.0406C2.59935 13.0249 2.47889 13.0408 2.37154 13.0906C2.2798 13.1394 2.22768 13.4826 2.38902 13.9902C2.41984 14.0542 3.0442 15.4844 3.27756 16.0189C3.32536 16.1284 3.35676 16.2003 3.36328 16.2152C3.47656 16.4494 3.49404 16.6994 3.40853 16.8957C3.33551 17.0631 3.1904 17.1911 2.98912 17.2663C2.893 17.3018 2.77099 17.3334 2.63742 17.3334C2.36124 17.3334 2.03826 17.1986 1.80702 16.6867L1.75272 16.5849C1.3289 15.6773 1.03464 14.952 0.90735 14.6382L0.905151 14.6328L0.896561 14.6115C0.87092 14.548 0.854463 14.5072 0.847419 14.4926C0.45609 13.3756 0.711983 12.3355 1.49527 11.8308C1.97428 11.5452 2.55316 11.4538 3.08867 11.5781C3.63572 11.7047 4.10288 12.0476 4.40371 12.5436L4.82936 13.2293V5.99429C4.82936 5.3563 5.1692 4.74981 5.7381 4.37228C6.30855 3.99359 7.0238 3.89848 7.69942 4.11153C8.55823 4.3824 9.13554 5.15654 9.13617 6.03881L9.18922 9.34412Z",fill:"currentColor"})]})}function BB(e){return(0,s.jsxs)(Pt,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,s.jsx)("path",{clipRule:"evenodd",d:"M19.548 2.09234C19.8255 2.23518 20 2.52116 20 2.83331V11.1666C20 11.4788 19.8255 11.7648 19.548 11.9076C19.2704 12.0505 18.9363 12.0262 18.6823 11.8448L12.849 7.67809C12.63 7.52166 12.5 7.2691 12.5 6.99998C12.5 6.73085 12.63 6.47829 12.849 6.32187L18.6823 2.1552C18.9363 1.97376 19.2704 1.9495 19.548 2.09234ZM14.7671 6.99998L18.3333 9.54732V4.45264L14.7671 6.99998Z",fill:"currentColor",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2.5 1.99998C2.03976 1.99998 1.66667 2.37308 1.66667 2.83331V11.1666C1.66667 11.6269 2.03976 12 2.5 12H11.6667C12.1269 12 12.5 11.6269 12.5 11.1666V2.83331C12.5 2.37308 12.1269 1.99998 11.6667 1.99998H2.5ZM0 2.83331C0 1.4526 1.11929 0.333313 2.5 0.333313H11.6667C13.0474 0.333313 14.1667 1.4526 14.1667 2.83331V11.1666C14.1667 12.5474 13.0474 13.6666 11.6667 13.6666H2.5C1.11929 13.6666 0 12.5474 0 11.1666V2.83331Z",fill:"currentColor",fillRule:"evenodd"})]})}function DB(e){return(0,s.jsx)(Pt,{height:"10",viewBox:"0 0 10 10",width:"10",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M9.78572 9.78572C9.5 10.0714 9.07143 10.0714 8.78571 9.78572L5 6.00001L1.21429 9.78572C0.928571 10.0714 0.500001 10.0714 0.214285 9.78572C-0.0714284 9.49999 -0.0714284 9.07144 0.214285 8.78571L4 5L0.214285 1.21429C-0.0714284 0.928564 -0.0714284 0.500007 0.214285 0.214279C0.357143 0.0714143 0.500001 0 0.714286 0C0.928571 0 1.07143 0.0714143 1.21429 0.214279L5 3.99999L8.78571 0.214279C8.92857 0.0714143 9.14286 0 9.28572 0C9.42857 0 9.64286 0.0714143 9.78572 0.214279C10.0714 0.500007 10.0714 0.928564 9.78572 1.21429L6 5L9.78572 8.78571C10.0714 9.07144 10.0714 9.49999 9.78572 9.78572Z",fill:"currentColor",fillRule:"evenodd"})})}const FB=({width:e="17",height:t="15",title:n="Book",desc:o="Book",focusable:r="false",className:a})=>(0,s.jsxs)("svg",{className:a,focusable:r,height:t,viewBox:"0 0 17 15",width:e,xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:n}),(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{d:"M8.407 14.529a.68.68 0 0 1-.374 0L.506 12.553A.679.679 0 0 1 0 11.897V.679C0 .234.42-.09.851.023L8.22 1.957 15.589.023a.679.679 0 0 1 .851.656v11.218a.679.679 0 0 1-.506.656L8.407 14.53zM7.541 3.182L1.357 1.56v9.814l6.184 1.623V3.182zm1.358 0v9.814l6.184-1.623V1.56L8.899 3.182z",fill:"#FFF",fillRule:"nonzero"})]});var HB=p(25048),X=p.n(HB);const sx=({title:e="Pick One",desc:t="Pick One",width:n="16",height:o="14",className:r,focusable:a="false","aria-hidden":i})=>(0,s.jsxs)("svg",{"aria-hidden":i,className:X()("i i-pickOne",r),focusable:a,height:o,viewBox:"0 0 16 14",width:n,xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.jsxs)("g",{fillRule:"evenodd",children:[(0,s.jsx)("path",{d:"M5.039 10.865A1.284 1.284 0 1 1 3.754 9.58v-1.6a2.884 2.884 0 1 0-.001 5.768 2.884 2.884 0 0 0 0-5.768v1.6c.71 0 1.286.575 1.286 1.285zM5.039 3.851a1.284 1.284 0 1 1-1.285-1.285v-1.6a2.884 2.884 0 1 0-.001 5.769 2.884 2.884 0 0 0 0-5.769v1.6c.71 0 1.286.575 1.286 1.285z",fillRule:"nonzero"}),(0,s.jsx)("path",{d:"M8.862 1.324h7v2h-7zM8.862 4.324h7v2h-7zM8.862 8.324h7v2h-7zM8.862 11.324h7v2h-7z"})]})]}),ox=({title:e="Fill in the Blank",desc:t="Pencil writing on a surface",width:n="15",height:o="15",className:r,focusable:a="false"})=>(0,s.jsxs)("svg",{className:X()("i i-fillInTheBlank",r),focusable:a,height:o,viewBox:"0 0 15 15",width:n,children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.jsx)("path",{d:"M2.488 8.246l5.25-5.25 1.4 1.4-5.25 5.25h-1.4v-1.4zm-.875 3.15h2.625a.794.794 0 0 0 .613-.262l6.125-6.125a.846.846 0 0 0 0-1.225L8.35 1.159a.846.846 0 0 0-1.225 0L1 7.284a.794.794 0 0 0-.263.612v2.625c0 .525.35.875.875.875zM.739 13.146h14v1.75h-14z"})]});function rx({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"currentColor",focusable:"false",ref:t,viewBox:"0 0 13 13",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M3.33177 4.1487L6.48034 1.00013M9.6289 4.14869L6.48034 1.00013M6.48034 1.00013L6.47966 11.9601"})})}function $B(e){return(0,s.jsxs)(gn,{...e,fill:"none",viewBox:"0 3 16 10",children:[(0,s.jsx)("path",{d:"M1.51472 7.99993H14.4853",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,s.jsx)("path",{d:"M9.50008 12.4994L14.5004 7.99932L9.50008 3.99973",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}function ax(e){return(0,s.jsx)(Pt,{height:"8",viewBox:"0 0 14 8",width:"14",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M13 1L7 7L1 1",stroke:"currentColor"})})}function ix(e){return(0,s.jsxs)(gn,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,s.jsx)("path",{d:"M5 7.71429L7.54545 10L11.5 5.5",stroke:"white"})]})}function cx(e){return(0,s.jsxs)(gn,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,s.jsx)("path",{d:"M8.00085 5.20305L5.14081 8.06339C5.14079 8.06341 5.14077 8.06343 5.14075 8.06345C5.00146 8.20273 4.92319 8.39163 4.92314 8.58861V8.5887V9.93926C4.92314 10.1851 5.12244 10.3844 5.36829 10.3844H6.71884H6.71894C6.91593 10.3844 7.10484 10.3061 7.24413 10.1668C7.24414 10.1668 7.24415 10.1667 7.24416 10.1667L10.104 7.30664C10.104 7.30657 10.1041 7.3065 10.1042 7.30643L10.1042 7.30638C10.1043 7.30631 10.1044 7.30622 10.1044 7.30615L10.9465 6.46442C11.03 6.38095 11.0769 6.26773 11.0769 6.14966C11.0769 6.0316 11.03 5.91836 10.9466 5.83487L9.47304 4.36105C9.29924 4.18722 9.01746 4.18716 8.84359 4.36091L8.00111 5.20279C8.0011 5.2028 8.0011 5.2028 8.0011 5.2028L8.00085 5.20305Z",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.890284"}),(0,s.jsx)("circle",{cx:"8",cy:"7.5293",r:"7",stroke:"white"})]})}function VB({className:e}){return(0,s.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{cx:"6",cy:"6",r:"5"}),(0,s.jsx)("path",{d:"M9.5 9.5L14 14"})]})}function zB(e){return(0,s.jsxs)(gn,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,s.jsx)("path",{d:"M10 6L6 10",stroke:"white"}),(0,s.jsx)("path",{d:"M6 6L10 10",stroke:"white"})]})}function _B({className:e}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",viewBox:"0 0 10 7",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M1 1.40002L5 5.40002L9 1.40002",strokeWidth:"1.6"})})}function UB(e){return(0,s.jsxs)(gn,{viewBox:"0 0 12 12",...e,children:[(0,s.jsx)("path",{d:"M10.7425 0.742189L11.4496 1.4493L1.55012 11.3488L0.843012 10.6417L10.7425 0.742189Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M11.1571 10.6417L10.45 11.3488L0.550537 1.44929L1.25764 0.742188L11.1571 10.6417Z",fill:"currentColor"})]})}function GB({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"currentColor",focusable:"false",height:"17",ref:t,role:"img",viewBox:"0 0 17 17",width:"17",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M8.029 16.2343L8.7361 16.9414L9.44321 16.2343L16.707 8.97048L15.2928 7.55627L9.73903 13.11L9.73903 1.99985L7.73903 1.99985L7.73904 13.1159L2.17939 7.55627L0.765176 8.97048L8.029 16.2343Z",fillRule:"evenodd"})})}function WB(e){return(0,s.jsx)(gn,{...e,viewBox:"0 0 16 8",children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M1 5H12.6L11.3 6.3C10.9 6.7 10.9 7.3 11.3 7.7C11.5 7.9 11.7 8 12 8C12.3 8 12.5 7.9 12.7 7.7L15.7 4.7C16.1 4.3 16.1 3.7 15.7 3.3L12.7 0.3C12.3 -0.1 11.7 -0.1 11.3 0.3C10.9 0.7 10.9 1.3 11.3 1.7L12.6 3H1C0.4 3 0 3.4 0 4C0 4.6 0.4 5 1 5",fill:"currentColor",fillRule:"evenodd"})})}function KB({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"currentColor",focusable:"false",ref:t,version:"1.1",viewBox:"0 0 17 17",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M8.971 0.7657L8.2639 0.0585938L7.55679 0.765701L0.292969 8.02952L1.70718 9.44374L7.26096 3.88995L7.26097 15.0002H9.26097L9.26096 3.88409L14.8206 9.44373L16.2348 8.02952L8.971 0.7657Z",fillRule:"evenodd"})})}function QB(e){return(0,s.jsx)(Pt,{height:"12",viewBox:"0 0 16 12",width:"16",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M9.6665 2H0.666504V0H9.6665V2ZM12.6665 6H0.666504V4H12.6665V6ZM0.666504 10H7.6665V8H0.666504V10Z",fill:"currentColor",fillRule:"evenodd"})})}function lx(e){return(0,s.jsx)(Pt,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M6.00008 7.91406L11.7072 2.20696L10.293 0.792742L6.00007 5.08564L1.70718 0.792742L0.292969 2.20696L6.00008 7.91406Z",fill:"currentColor",fillRule:"evenodd"})})}function YB(e){return(0,s.jsx)(Pt,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M5.99992 0.0859375L0.292818 5.79304L1.70703 7.20726L5.99993 2.91436L10.2928 7.20726L11.707 5.79304L5.99992 0.0859375Z",fill:"currentColor",fillRule:"evenodd"})})}function ZB(e){return(0,s.jsxs)(Pt,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,s.jsx)("path",{d:"M9.94535 6.125C9.1938 6.125 8.52385 6.6729 8.30039 7.48015C8.17194 7.9442 7.70954 8.21104 7.26759 8.07617C6.82564 7.94129 6.5715 7.45577 6.69996 6.99172C7.11282 5.50025 8.3916 4.375 9.94535 4.375C11.8499 4.375 13.3335 6.05606 13.3335 8.05C13.3335 9.7417 12.2656 11.2082 10.7787 11.6139V12.25C10.7787 12.7332 10.4056 13.125 9.94535 13.125C9.48511 13.125 9.11201 12.7332 9.11201 12.25V10.85C9.11201 10.3668 9.48511 9.975 9.94535 9.975C10.8628 9.975 11.6668 9.14886 11.6668 8.05C11.6668 6.95114 10.8628 6.125 9.94535 6.125Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M10.0002 14C9.53992 14 9.16683 14.3918 9.16683 14.875C9.16683 15.3582 9.53992 15.75 10.0002 15.75H10.0085C10.4687 15.75 10.8418 15.3582 10.8418 14.875C10.8418 14.3918 10.4687 14 10.0085 14H10.0002Z",fill:"currentColor"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M0.833496 3.55556C0.833496 2.01519 2.09493 0.875 3.51868 0.875H16.4816C17.9054 0.875 19.1668 2.01519 19.1668 3.55556V17.4444C19.1668 18.9848 17.9054 20.125 16.4816 20.125H3.51868C2.09493 20.125 0.833496 18.9848 0.833496 17.4444V3.55556ZM3.51868 2.625C2.89693 2.625 2.50016 3.10156 2.50016 3.55556V17.4444C2.50016 17.8984 2.89693 18.375 3.51868 18.375H16.4816C17.1034 18.375 17.5002 17.8984 17.5002 17.4444V3.55556C17.5002 3.10156 17.1034 2.625 16.4816 2.625H3.51868Z",fill:"currentColor",fillRule:"evenodd"})]})}function XB(e){return(0,s.jsx)(Pt,{height:"15",viewBox:"0 0 16 15",width:"16",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 6.51982C2 4.02359 4.02359 2 6.51982 2C9.01605 2 11.0396 4.02359 11.0396 6.51982C11.0396 9.01605 9.01605 11.0396 6.51982 11.0396C4.02359 11.0396 2 9.01605 2 6.51982ZM6.51982 0C2.91902 0 0 2.91902 0 6.51982C0 10.1206 2.91902 13.0396 6.51982 13.0396C8.06462 13.0396 9.48394 12.5024 10.6011 11.6045L13.9964 14.9998L15.4106 13.5856L11.9518 10.1268C12.6391 9.09384 13.0396 7.8536 13.0396 6.51982C13.0396 2.91902 10.1206 0 6.51982 0Z",fill:"currentColor",fillRule:"evenodd"})})}function qB(e){return(0,s.jsxs)(Pt,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,s.jsx)("path",{d:"M3.1665 6.08335C3.1665 4.01229 4.84544 2.33335 6.9165 2.33335C8.98757 2.33335 10.6665 4.01229 10.6665 6.08335C10.6665 6.37941 10.6324 6.66643 10.5681 6.9411C10.4634 7.38925 10.7417 7.83748 11.1899 7.94225C11.6381 8.04702 12.0863 7.76865 12.1911 7.3205C12.2841 6.92235 12.3332 6.50805 12.3332 6.08335C12.3332 3.09181 9.90805 0.666687 6.9165 0.666687C3.92496 0.666687 1.49984 3.09181 1.49984 6.08335C1.49984 6.46923 1.54032 6.84657 1.61756 7.21105C1.679 7.50095 1.76362 7.78236 1.86938 8.05316C1.97511 8.32389 2.10191 8.5839 2.24772 8.83119C2.48148 9.22764 2.99237 9.35953 3.38882 9.12577C3.78527 8.89201 3.91716 8.38112 3.6834 7.98467C3.58248 7.81352 3.49485 7.63379 3.42186 7.44688C3.34886 7.25994 3.29045 7.0657 3.24802 6.86551C3.1947 6.61395 3.1665 6.3524 3.1665 6.08335Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M9.18922 9.34412L14.8186 10.2697C16.2762 10.5117 17.3332 11.6819 17.3332 13.0521V16.6037C17.3332 17.0029 16.9837 17.3264 16.553 17.3264C16.122 17.3264 15.7728 17.0029 15.7728 16.6037V13.0521C15.7728 12.3826 15.2561 11.8108 14.5446 11.6926L8.30452 10.6667H8.30233C7.90851 10.6331 7.57585 10.2773 7.57585 9.8899V6.0524C7.57585 5.88733 7.48441 5.73325 7.33119 5.64046C7.17921 5.54853 6.99291 5.53668 6.82002 5.60606C6.63747 5.68035 6.51483 5.87085 6.51483 6.08044V15.3607C6.51483 15.6856 6.30169 15.9391 5.91441 16.0741C5.40325 16.2528 4.90988 16.0261 4.70516 15.7226L3.01346 13.2999C2.93513 13.1565 2.84963 13.09 2.68954 13.0406C2.59935 13.0249 2.47889 13.0408 2.37154 13.0906C2.2798 13.1394 2.22768 13.4826 2.38902 13.9902C2.41984 14.0542 3.0442 15.4844 3.27756 16.0189C3.32536 16.1284 3.35676 16.2003 3.36328 16.2152C3.47656 16.4494 3.49404 16.6994 3.40853 16.8957C3.33551 17.0631 3.1904 17.1911 2.98912 17.2663C2.893 17.3018 2.77099 17.3334 2.63742 17.3334C2.36124 17.3334 2.03826 17.1986 1.80702 16.6867L1.75272 16.5849C1.3289 15.6773 1.03464 14.952 0.90735 14.6382L0.905151 14.6328L0.896561 14.6115C0.87092 14.548 0.854463 14.5072 0.847419 14.4926C0.45609 13.3756 0.711983 12.3355 1.49527 11.8308C1.97428 11.5452 2.55316 11.4538 3.08867 11.5781C3.63572 11.7047 4.10288 12.0476 4.40371 12.5436L4.82936 13.2293V5.99429C4.82936 5.3563 5.1692 4.74981 5.7381 4.37228C6.30855 3.99359 7.0238 3.89848 7.69942 4.11153C8.55823 4.3824 9.13554 5.15654 9.13617 6.03881L9.18922 9.34412Z",fill:"currentColor"})]})}function JB(e){return(0,s.jsxs)(Pt,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,s.jsx)("path",{clipRule:"evenodd",d:"M19.548 2.09234C19.8255 2.23518 20 2.52116 20 2.83331V11.1666C20 11.4788 19.8255 11.7648 19.548 11.9076C19.2704 12.0505 18.9363 12.0262 18.6823 11.8448L12.849 7.67809C12.63 7.52166 12.5 7.2691 12.5 6.99998C12.5 6.73085 12.63 6.47829 12.849 6.32187L18.6823 2.1552C18.9363 1.97376 19.2704 1.9495 19.548 2.09234ZM14.7671 6.99998L18.3333 9.54732V4.45264L14.7671 6.99998Z",fill:"currentColor",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2.5 1.99998C2.03976 1.99998 1.66667 2.37308 1.66667 2.83331V11.1666C1.66667 11.6269 2.03976 12 2.5 12H11.6667C12.1269 12 12.5 11.6269 12.5 11.1666V2.83331C12.5 2.37308 12.1269 1.99998 11.6667 1.99998H2.5ZM0 2.83331C0 1.4526 1.11929 0.333313 2.5 0.333313H11.6667C13.0474 0.333313 14.1667 1.4526 14.1667 2.83331V11.1666C14.1667 12.5474 13.0474 13.6666 11.6667 13.6666H2.5C1.11929 13.6666 0 12.5474 0 11.1666V2.83331Z",fill:"currentColor",fillRule:"evenodd"})]})}function eD(e){return(0,s.jsx)(Pt,{height:"14",viewBox:"0 0 14 14",width:"14",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M13.4646 2.46462L11.8484 0.848376L7.00023 5.69652L2.15186 0.848143L0.535612 2.46439L5.38399 7.31276L0.534668 12.1621L2.15091 13.7783L7.00023 8.92901L11.8493 13.7781L13.4656 12.1619L8.61648 7.31276L13.4646 2.46462Z",fill:"currentColor",fillRule:"evenodd"})})}function Mt(e){return function(n){const o=ut(),r=e[o];return r?(0,s.jsx)(r,{...n}):null}}const dx=Mt({[te.RISE_CLASSIC]:jB,[te.HORIZON]:null,[te.APEX]:QB}),Dl=Mt({[te.RISE_CLASSIC]:Xh,[te.HORIZON]:rx,[te.APEX]:GB}),qh=Mt({[te.RISE_CLASSIC]:NB,[te.HORIZON]:$B,[te.APEX]:WB}),ux=Mt({[te.RISE_CLASSIC]:tx,[te.HORIZON]:rx,[te.APEX]:KB}),tD=Mt({[te.RISE_CLASSIC]:FB,[te.HORIZON]:null,[te.APEX]:null}),nD=Mt({[te.RISE_CLASSIC]:wB,[te.HORIZON]:ax,[te.APEX]:lx}),sD=Mt({[te.RISE_CLASSIC]:AB,[te.HORIZON]:ax,[te.APEX]:YB}),oD=Mt({[te.RISE_CLASSIC]:Bl,[te.HORIZON]:ix,[te.APEX]:Bl}),rD=Mt({[te.RISE_CLASSIC]:sx,[te.HORIZON]:cx,[te.APEX]:sx}),aD=Mt({[te.RISE_CLASSIC]:RB,[te.HORIZON]:null,[te.APEX]:ZB}),iD=Mt({[te.RISE_CLASSIC]:nx,[te.HORIZON]:zB,[te.APEX]:nx}),cD=Mt({[te.RISE_CLASSIC]:Bl,[te.HORIZON]:ix,[te.APEX]:Bl}),lD=Mt({[te.RISE_CLASSIC]:ox,[te.HORIZON]:cx,[te.APEX]:ox}),ji=Mt({[te.RISE_CLASSIC]:PB,[te.HORIZON]:VB,[te.APEX]:XB}),hx=Mt({[te.RISE_CLASSIC]:MB,[te.HORIZON]:_B,[te.APEX]:lx}),dD=Mt({[te.RISE_CLASSIC]:OB,[te.HORIZON]:null,[te.APEX]:qB}),uD=Mt({[te.RISE_CLASSIC]:BB,[te.HORIZON]:null,[te.APEX]:JB}),Fl=Mt({[te.RISE_CLASSIC]:DB,[te.HORIZON]:UB,[te.APEX]:eD}),fa=V("cover");function eue(){const{categories:e}=ce();return!Array.isArray(e)||e.length===0?null:(0,s.jsxs)("section",{className:fa("categories-section"),children:[(0,s.jsx)("h2",{className:fa("categories-title"),children:"Topics"}),(0,s.jsx)("ul",{className:fa("categories-list"),role:"list",children:e.map(t=>(0,s.jsxs)("li",{className:fa("categories-item"),role:"listitem",children:[(0,s.jsx)(tD,{className:fa("categories-icon")}),(0,s.jsx)("span",{className:fa("categories-item-wrap"),children:t})]},t))})]})}var hD=p(24756),mD=p(61919),br=p.n(mD),Oe=p(70547);const fD=`${Ne("CDN_URI")}/assets/rise/assets/certificate-icon.svg`,pD=`${Ne("CDN_URI")}/assets/rise/assets/error_x.svg`,gD=`${Ne("CDN_URI")}/assets/rise/assets/loading_spinner.svg`,wi="downloading",pa="error",yr="ok",Jh="contained",mx=({type:e})=>{const[t]=(0,u.useState)(()=>br()("certdownload-")),[n,o]=(0,u.useState)(yr),r=(0,Oe.A)(n),a=(0,u.useRef)(null),i=Ce(),c=`${t}-live`,l=e===Jh?"certificateDownload certificateDownloadContained":"certificateDownload",d=(0,u.useCallback)(()=>{o(wi)},[]);return(0,u.useEffect)(()=>(n===wi&&r!==wi&&OE().then(()=>{o(yr)}).catch(h=>{(0,hD.FZ)(h)?o(yr):o(pa)}),()=>{BE()}),[r,n]),(0,u.useEffect)(()=>{a.current&&(n===pa&&r!==pa||n===yr&&(r===pa||r===wi))&&a.current.focus()},[r,n]),(0,s.jsxs)("div",{className:l,children:[(0,s.jsxs)("div",{"aria-live":"polite",id:c,role:"status",children:[n===wi&&(0,s.jsxs)("span",{className:"certificateDownload__downloading",children:[(0,s.jsx)("img",{alt:"",className:"animation-loading certificateDownload__downloadingImg",height:"15",src:gD,width:"15"}),i?.certificateDownloadInProgress||"Downloading..."]}),n===pa&&(0,s.jsxs)("span",{className:"certificateDownload__error",children:[(0,s.jsx)("img",{alt:"Error",className:"certificateDownload__errorImg",height:"15",src:pD,width:"15"}),(0,s.jsx)("span",{className:"visually-hidden",children:i?.a11yCertificateDownloadFailed||"Failed to download certificate"})]})]}),(n===yr||n===pa)&&(0,s.jsxs)("button",{"aria-controls":c,className:"certificateDownload__btn",onClick:d,ref:a,type:"button",children:[n===yr&&e===Jh&&(0,s.jsx)("img",{alt:"",className:"certificateDownload__okImg",height:"15",src:fD,width:"15"}),n===yr?i?.certificateDownload||"Download certificate":i?.certificateRetryDownload||"Retry download"]})]})},vD=()=>(0,s.jsx)(mx,{type:Jh}),CD=(0,u.memo)(mx);var em,xD;const tue=({width:e="18",height:t="18",className:n})=>em("svg",{"aria-hidden":"true",className:xD("i i-alert",n),focusable:"false",height:t,viewBox:"0 0 18 18",width:e,children:em("g",{fill:"none",fillRule:"evenodd",stroke:"#DE1D1D",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:em("path",{d:"M9 1a8 8 0 1 1 0 16A8 8 0 0 1 9 1zM9 5.364V9.53M9 11.91v.726"})})}),nue=null;function bD(e){return(0,s.jsxs)(gn,{viewBox:"0 0 16 12",...e,children:[(0,s.jsx)("path",{d:"M8.4148147,12 L1.05185184,12 C0.471229623,12 0,11.552 0,11 C0,10.448 0.471229623,10 1.05185184,10 L8.4148147,10 C8.99543692,10 9.46666654,10.448 9.46666654,11 C9.46666654,11.552 8.99543692,12 8.4148147,12"}),(0,s.jsx)("path",{d:"M12.2500002,2 L0.816666683,2 C0.365866674,2 0,1.552 0,1 C0,0.448 0.365866674,0 0.816666683,0 L12.2500002,0 C12.7008002,0 13.0666669,0.448 13.0666669,1 C13.0666669,1.552 12.7008002,2 12.2500002,2"}),(0,s.jsx)("path",{d:"M15,7 L1,7 C0.448,7 0,6.552 0,6 C0,5.448 0.448,5 1,5 L15,5 C15.552,5 16,5.448 16,6 C16,6.552 15.552,7 15,7"})]})}var yD,fx,SD;const sue=({width:e="24",height:t="16",leftMovement:n="0",className:o})=>yD("svg",{"aria-hidden":"true",className:SD("i i-alt",o),focusable:"false",height:t,style:{marginLeft:n},viewBox:"0 0 24 16",width:e,children:[fx("path",{d:"M10.066 11.5H8.887a.545.545 0 0 1-.326-.092.476.476 0 0 1-.178-.236l-.387-1.144H5.503l-.387 1.143a.507.507 0 0 1-.175.228.505.505 0 0 1-.32.101H3.433l2.538-6.556h1.557l2.538 6.556zM5.854 8.993h1.791l-.603-1.795-.137-.403a10.24 10.24 0 0 1-.155-.502 8.943 8.943 0 0 1-.293.914l-.603 1.786zm6.962 1.292h2.43V11.5h-3.951V4.944h1.52v5.341zM20.7 4.944v1.205h-1.845V11.5h-1.52V6.15H15.49V4.942h5.211z"}),fx("path",{d:"M1.5 1.994v12.012a.5.5 0 0 0 .505.494h19.99a.5.5 0 0 0 .505-.494V1.994a.5.5 0 0 0-.505-.494H2.005a.5.5 0 0 0-.505.494zm-1.5 0A2 2 0 0 1 2.005 0h19.99A2 2 0 0 1 24 1.994v12.012A2 2 0 0 1 21.995 16H2.005A2 2 0 0 1 0 14.006V1.994z",fillRule:"nonzero"})]}),oue=null;var LD,Hl,TD;const rue=({title:e="All Authors",desc:t="A circle with the outline of the head and shoulders of two people inside",width:n="30",height:o="30",className:r,focusable:a="false"})=>LD("svg",{className:TD("i i-blockTemplateAllAuthors",r),focusable:a,height:o,viewBox:"0 0 30 30",width:n,children:[Hl("title",{children:e}),Hl("desc",{children:t}),Hl("circle",{cx:"14.963",cy:"14.963",fill:"#E9E9E9",r:"14.963"}),Hl("path",{d:"M17.482 17.661a3.75 3.75 0 1 1 4.037 0 4.25 4.25 0 0 1 2.231 3.741.75.75 0 1 1-1.5 0 2.75 2.75 0 1 0-5.5 0 .75.75 0 1 1-1.5 0 4.25 4.25 0 0 1 2.232-3.741zm-8.915-3.947a3.75 3.75 0 1 1 3.866 0A4.25 4.25 0 0 1 14.75 17.5a.75.75 0 1 1-1.5 0 2.75 2.75 0 0 0-5.5 0 .75.75 0 1 1-1.5 0 4.25 4.25 0 0 1 2.317-3.786zm1.933-.964a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5zm9 4a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5z",fill:"#8894A3"})]}),aue=null;var $l,us,kD;const iue=({title:e="Check Mark",desc:t="A circle with a check mark inside",width:n="112",height:o="112",className:r,focusable:a="false"})=>$l("svg",{className:kD("i i-blockTemplateCheckMark",r),focusable:a,height:o,viewBox:"0 0 112 112",width:n,children:[us("title",{children:e}),us("desc",{children:t}),us("defs",{children:$l("filter",{filterUnits:"objectBoundingBox",height:"186.1%",id:"a",width:"186.1%",x:"-43.1%",y:"-40.3%",children:[us("feOffset",{dy:"2",in:"SourceAlpha",result:"shadowOffsetOuter1"}),us("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"10"}),us("feColorMatrix",{in:"shadowBlurOuter1",result:"shadowMatrixOuter1",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),$l("feMerge",{children:[us("feMergeNode",{in:"shadowMatrixOuter1"}),us("feMergeNode",{in:"SourceGraphic"})]})]})}),$l("g",{fill:"none",fillRule:"evenodd",filter:"url(#a)",transform:"translate(20 18)",children:[us("path",{className:"outer",d:"M36 65.096c16.07 0 29.096-13.027 29.096-29.096C65.096 19.93 52.069 6.904 36 6.904 19.93 6.904 6.904 19.931 6.904 36c0 16.07 13.027 29.096 29.096 29.096zM36 72C16.118 72 0 55.882 0 36S16.118 0 36 0s36 16.118 36 36-16.118 36-36 36z",fillRule:"nonzero"}),us("circle",{className:"inner",cx:"36",cy:"36",r:"30"}),us("path",{className:"check",d:"M30.054 35.993a1.791 1.791 0 0 0-2.53 0 1.783 1.783 0 0 0 0 2.524l5.972 5.96a1.791 1.791 0 0 0 2.53 0l10.45-10.43a1.783 1.783 0 0 0 0-2.524 1.791 1.791 0 0 0-2.53 0l-9.185 9.167-4.707-4.697z",fillRule:"nonzero"})]})]}),cue=null;var px,Vl,ID;const lue=({title:e="Folder Outline",desc:t="Outline of a folder",width:n="42",height:o="42",className:r,focusable:a="false"})=>px("svg",{className:ID("i i-blockTemplateFolder",r),focusable:a,height:o,viewBox:"0 0 42 42",width:n,children:[Vl("title",{children:e}),Vl("desc",{children:t}),px("g",{fill:"#ADAEAF",fillRule:"nonzero",stroke:"#ADAEAF",strokeWidth:".3",children:[Vl("path",{d:"M34.043 6.971a.87.87 0 0 0-.87-.87h-17.53l.7.354-3.756-5.101a.87.87 0 0 0-.7-.354H1.87a.87.87 0 0 0-.87.87v34.434C1 38.894 3.067 41 5.626 41a.87.87 0 1 0 0-1.74c-1.59 0-2.887-1.32-2.887-2.956V1.87l-.87.87h10.018l-.7-.355 3.756 5.102a.87.87 0 0 0 .7.354h17.53l-.869-.87v7.652a.87.87 0 1 0 1.74 0V6.971z"}),Vl("path",{d:"M9.116 36.348a2.906 2.906 0 0 1-2.899 2.913V41h30.145A4.645 4.645 0 0 0 41 36.348V14.913a.87.87 0 0 0-.87-.87H9.986a.87.87 0 0 0-.87.87v21.435zm.87-20.565H40.13l-.87-.87v21.435a2.906 2.906 0 0 1-2.898 2.913H6.217c-1.159 0-1.159 1.739 0 1.739a4.645 4.645 0 0 0 4.638-4.652V14.913l-.87.87z"})]})]}),due=null;var tm,Ai,ED;const uue=({title:e="Captions",desc:t="Two capital letter C inside a square",width:n="24",height:o="16",className:r,focusable:a="false"})=>tm("svg",{className:ED("i i-captions",r),focusable:a,height:o,viewBox:"0 0 24 16",width:n,children:[Ai("title",{children:e}),Ai("desc",{children:t}),tm("g",{fill:"none",fillRule:"evenodd",transform:"translate(-.355)",children:[Ai("rect",{height:"13.25",rx:"1",stroke:"#000",strokeWidth:"1.75",width:"18.25",x:"1.447",y:"1.402"}),tm("text",{fill:"#000",fontFamily:"Lato-Black, Lato",fontSize:"9",fontWeight:"700",letterSpacing:".75",children:[Ai("tspan",{x:"4.222",y:"11.5",children:"C"})," ",Ai("tspan",{x:"10.885",y:"11.5",children:"C"})]})]})]}),hue=null;var ND,nm;const mue=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>ND("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&nm("title",{children:i}),o&&nm("desc",{children:o}),nm("path",{d:"M0 0h16v2H0V0zm0 13h16v2H0v-2zm4-9h8a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",fill:"currentColor",fillRule:"evenodd"})]}),fue=null;function gx(e){return(0,s.jsx)(gn,{viewBox:"0 0 11 8",...e,children:(0,s.jsx)("path",{d:"M9.6,0L11,1.3L3.9,8L0,4.3L1.4,3l2.6,2.4L9.6,0z"})})}var jD,sm,wD;const pue=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="21",role:a="img",title:i,width:c="21"})=>jD("svg",{"aria-hidden":e,"aria-label":t,className:wD("i i-checkMarkFilled",n),focusable:"false",height:r,role:a,viewBox:"0 0 21 21",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&sm("title",{children:i}),o&&sm("desc",{children:o}),sm("path",{d:"M10.074 20.959c-5.523 0-10-4.477-10-10s4.477-10 10-10 10 4.477 10 10-4.477 10-10 10zM7.077 10.523a.65.65 0 1 0-.919.919l2.546 2.545a.65.65 0 0 0 .919 0l4.454-4.454a.65.65 0 1 0-.919-.92L9.163 12.61l-2.086-2.086z"})]}),gue=null;var vx,AD;function vue(e){return vx(AD,{viewBox:"0 0 7 5",...e,children:vx("path",{d:"M3.104 3.896a.5.5 0 0 0 .707 0l2.543-2.542a.5.5 0 0 0-.708-.708L3.473 2.851 1.353.73a.5.5 0 1 0-.707.707l2.458 2.458Z"})})}var Cx,RD;const Cue=({width:e="16",height:t="16",className:n,focusable:o="false"})=>Cx("svg",{"aria-hidden":"true",className:RD("i i-chevronLeft",n),focusable:o,height:t,viewBox:"0 0 16 16",width:e,children:Cx("polygon",{points:"11.1,15.7 3.4,8 11.1,0.3 12.6,1.7 6.3,8 12.6,14.3 "})}),xue=null,PD=({className:e,dataTestId:t})=>(0,s.jsx)("svg",{"aria-hidden":"true",className:e,"data-testid":t,fill:"currentColor",focusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("circle",{cx:"5",cy:"5",r:"5"})}),MD=({className:e})=>(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"currentColor",foocusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M9.78572 9.78572C9.5 10.0714 9.07143 10.0714 8.78571 9.78572L5 6.00001L1.21429 9.78572C0.928571 10.0714 0.500001 10.0714 0.214285 9.78572C-0.0714284 9.49999 -0.0714284 9.07144 0.214285 8.78571L4 5L0.214285 1.21429C-0.0714284 0.928564 -0.0714284 0.500007 0.214285 0.214279C0.357143 0.0714143 0.500001 0 0.714286 0C0.928571 0 1.07143 0.0714143 1.21429 0.214279L5 3.99999L8.78571 0.214279C8.92857 0.0714143 9.14286 0 9.28572 0C9.42857 0 9.64286 0.0714143 9.78572 0.214279C10.0714 0.500007 10.0714 0.928564 9.78572 1.21429L6 5L9.78572 8.78571C10.0714 9.07144 10.0714 9.49999 9.78572 9.78572Z"})});var OD,Vn;const Sue=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="18",role:a="img",title:i,width:c="18"})=>OD("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 18 18",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Vn("title",{children:i}),o&&Vn("desc",{children:o}),Vn("path",{d:"M9 9V1a8 8 0 015.657 2.343L9 9z",fill:"red",stroke:"#fff",strokeLinejoin:"round"}),Vn("path",{d:"M9 9l5.657-5.656A8 8 0 0117 9H9z",fill:"#F90",stroke:"#fff",strokeLinejoin:"round"}),Vn("path",{d:"M9 9h8a8 8 0 01-2.343 5.657L9 9z",fill:"#FFF500",stroke:"#fff",strokeLinejoin:"round"}),Vn("path",{d:"M9 9l5.657 5.657A8 8 0 019 17V9z",fill:"#ADFF00",stroke:"#fff",strokeLinejoin:"round"}),Vn("path",{d:"M9 9v8a8 8 0 01-5.657-2.343L9 9z",fill:"#00FF94",stroke:"#fff",strokeLinejoin:"round"}),Vn("path",{d:"M9 9l-5.657 5.657A8 8 0 011 9h8z",fill:"#06F",stroke:"#fff",strokeLinejoin:"round"}),Vn("path",{d:"M9 9H1a8 8 0 012.343-5.656L9 9z",fill:"#8000FF",stroke:"#fff",strokeLinejoin:"round"}),Vn("path",{d:"M9 9L3.343 3.343A8 8 0 019 1v8z",fill:"#EB00FF",stroke:"#fff",strokeLinejoin:"round"}),Vn("path",{d:"M9 6a3 3 0 110 6 3 3 0 010-6z",fill:"#fff"}),Vn("path",{d:"M9 17A8 8 0 109 1a8 8 0 000 16z",stroke:"#EAEAEB"})]}),Lue=null;var BD,om,DD;const Tue=({title:e="Copy",desc:t="A document stacked on top of another one",width:n="15",height:o="18",className:r=null,focusable:a="false"})=>BD("svg",{className:DD("i i-stack",r),focusable:a,height:o,viewBox:"0 0 15 18",width:n,children:[om("title",{children:e}),om("desc",{children:t}),om("path",{d:"M14.7,4.1C14.7,4.1,14.7,4.1,14.7,4.1c0-0.1-0.1-0.2-0.1-0.2c0,0,0,0,0,0L11,0.4c0,0-0.1,0-0.1-0.1 c0,0-0.1,0-0.1-0.1c-0.1,0-0.2,0-0.2,0H3.5c-0.3,0-0.6,0.3-0.6,0.6v3h-2c-0.3,0-0.6,0.3-0.6,0.6v12.6c0,0.3,0.3,0.6,0.6,0.6h10.6 c0.3,0,0.6-0.3,0.6-0.6v-3h2c0.3,0,0.6-0.3,0.6-0.6V4.3C14.7,4.2,14.7,4.2,14.7,4.1z M11.2,2.4l1.4,1.3h-1.4V2.4z M9.9,7.3H8.6V6 L9.9,7.3z M7.9,8.6h2.9v7.9H1.5V5.1h5.8v2.8C7.3,8.3,7.6,8.6,7.9,8.6z M12.1,7.9c0-0.1,0-0.2,0-0.2c0,0,0,0,0,0 c0-0.1-0.1-0.1-0.1-0.2c0,0,0,0,0,0L8.4,4c0,0-0.1,0-0.1-0.1c0,0-0.1,0-0.1-0.1c-0.1,0-0.2,0-0.2,0H4.1V1.5H10v2.8 C10,4.7,10.2,5,10.6,5h2.9v7.9h-1.4V7.9z"})]}),kue=null;var FD,rm,HD;const Iue=e=>{const{className:t,desc:n="Crop",focusable:o="false",height:r="19",title:a="Crop",width:i="19"}=e,c={className:HD("i i-crop",t),focusable:o,height:r,viewBox:`0 0 ${i} ${r}`,width:i};return FD("svg",{...c,children:[rm("title",{children:a}),rm("desc",{children:n}),rm("path",{d:"M15 13h3.003c.55 0 .997.444.997 1 0 .552-.453 1-.997 1H15v3.003c0 .55-.444.997-1 .997-.552 0-1-.453-1-.997V15H4.996A.995.995 0 0 1 4 14.004V6H.997A.996.996 0 0 1 0 5c0-.552.453-1 .997-1H4V.997C4 .447 4.444 0 5 0c.552 0 1 .453 1 .997V4h8.004c.55 0 .996.445.996.996V13zm-9 0h7V6H6v7z",fillRule:"evenodd"})]})},Eue=null;var $D,am,VD;const Nue=({"aria-hidden":e,"aria-label":t="Dash mark",className:n,desc:o,height:r="3",role:a="img",title:i,width:c="7"})=>$D("svg",{"aria-hidden":e,"aria-label":t,className:VD("i i-dashMark",n),focusable:"false",height:r,role:a,viewBox:"0 0 7 3",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&am("title",{children:i}),o&&am("desc",{children:o}),am("rect",{height:"3",width:"7"})]}),jue=null,zD=({title:e="DestinationArrow",desc:t="DestinationArrow",width:n="13",height:o="10",className:r,focusable:a="false"})=>(0,s.jsxs)("svg",{className:X()("i i-destinationArrow",r),focusable:a,height:o,viewBox:"0 0 13 10",width:n,children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.jsx)("path",{d:"M0 5c0 .345.264.625.59.625h10.393L7.855 8.933a.65.65 0 0 0 0 .884.573.573 0 0 0 .418.183.573.573 0 0 0 .418-.183l4.136-4.374a.66.66 0 0 0 0-.885L8.691.183a.568.568 0 0 0-.836 0 .65.65 0 0 0 0 .884l3.128 3.308H.591C.264 4.375 0 4.655 0 5"})]});var _D,Aue;class Rue extends null{render(){return _D("svg",{"aria-hidden":this.props.decorative,"aria-label":this.props.title,className:this.props.className,focusable:"false",height:this.props.height,role:this.props.role,version:"1.1",viewBox:this.props.viewBox,width:this.props.width,xmlns:"http://www.w3.org/2000/svg",children:this.props.children})}}const Pue=null;var xx,UD;const Mue=({width:e=20,height:t=20,...n})=>xx(UD,{height:t,width:e,...n,viewBox:"0 0 20 20",children:xx("path",{d:"M10 0c5.523 0 10 4.477 10 10s-4.477 10-10 10S0 15.523 0 10 4.477 0 10 0zm2.634 7.679l-3.506 3.505-2.054-2.055a.7.7 0 00-.99.99l2.55 2.55a.7.7 0 00.99 0l4-4a.7.7 0 00-.99-.99z",fillRule:"evenodd"})}),Oue=null;var GD,im,WD;const Bue=({title:e="Vertical Dots",desc:t="Vertical Dots",width:n="4",height:o="24",className:r=null,focusable:a="false"})=>GD("svg",{className:WD("i i-dotsVertical",r),focusable:a,height:o,viewBox:"0 0 4 24",width:n,children:[im("title",{children:e}),im("desc",{children:t}),im("path",{d:"M2 24a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0-10a2 2 0 1 1 0-4 2 2 0 0 1 0 4zM2 4a2 2 0 1 1 0-4 2 2 0 0 1 0 4z",fillRule:"evenodd"})]}),Due=null,KD=({title:e="Download",desc:t="Arrow down with horizontal line beneath it",width:n="16",height:o="19",className:r,focusable:a="false"},i)=>(0,s.jsxs)("svg",{className:X()("i i-download",r),focusable:a,height:o,ref:i,viewBox:"0 0 16 19",width:n,children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.jsx)("rect",{height:"2",rx:"1",width:"16",y:"17"}),(0,s.jsx)("path",{d:"M4.464 8.293A1 1 0 1 0 3.05 9.707l4.24 4.24c.4.4 1.028.392 1.42 0l4.24-4.24a1 1 0 1 0-1.414-1.414L8 4.757 4.464 8.293zm0 0L8 4.757l3.536 3.536L8 11.828 4.464 8.293z"}),(0,s.jsx)("path",{d:"M7 0h2v12H7z"})]}),QD=(0,u.forwardRef)(KD);var YD,Ri,ZD;const Fue=({title:e="Download Circle",desc:t="Arrow down with horizontal line beneath it wrapped up in a circle",width:n="51",height:o="51",className:r,focusable:a="false"})=>YD("svg",{className:ZD("i i-downloadCircle",r),focusable:a,height:o,viewBox:"0 0 51 51",width:n,children:[Ri("title",{children:e}),Ri("desc",{children:t}),Ri("g",{fill:"none",stroke:"none",children:Ri("g",{fill:"#000",transform:"translate(-695, -227)",children:Ri("path",{d:"M721,255.395113 L726.834932,249.560181 C727.225456,249.169656 727.858621,249.169656 728.249146,249.560181 C728.63967,249.950705 728.63967,250.58387 728.249146,250.974394 L720.824726,258.398814 C720.796316,258.436777 720.764856,258.473181 720.730347,258.507691 C720.339822,258.898215 719.706657,258.898215 719.316133,258.507691 L711.799485,250.991042 C711.408961,250.600518 711.408961,249.967353 711.799485,249.576829 C712.190009,249.186304 712.823174,249.186304 713.213699,249.576829 L719,255.36313 L719,240.783936 C719,240.231651 719.447715,239.783936 720,239.783936 C720.552285,239.783936 721,240.231651 721,240.783936 L721,255.395113 Z M720.059082,277.569336 C706.251963,277.569336 695.059082,266.376455 695.059082,252.569336 C695.059082,238.762217 706.251963,227.569336 720.059082,227.569336 C733.866201,227.569336 745.059082,238.762217 745.059082,252.569336 C745.059082,266.376455 733.866201,277.569336 720.059082,277.569336 Z M720.059082,275.569336 C732.761631,275.569336 743.059082,265.271885 743.059082,252.569336 C743.059082,239.866787 732.761631,229.569336 720.059082,229.569336 C707.356533,229.569336 697.059082,239.866787 697.059082,252.569336 C697.059082,265.271885 707.356533,275.569336 720.059082,275.569336 Z M712,264 C711.447715,264 711,263.552285 711,263 C711,262.447715 711.447715,262 712,262 L728,262 C728.552285,262 729,262.447715 729,263 C729,263.552285 728.552285,264 728,264 L712,264 Z"})})})]}),Hue=null;var XD,Pi,qD;const $ue=({title:e="More",desc:t="Three dots next to one another",width:n="16",height:o="4",className:r=null,focusable:a="false"})=>XD("svg",{className:qD("i",r),focusable:a,height:o,viewBox:"0 0 16 4",width:n,children:[Pi("title",{children:e}),Pi("desc",{children:t}),Pi("path",{d:"M8,0 C9.105,0 10,0.895 10,2 C10,3.105 9.105,4 8,4 C6.895,4 6,3.105 6,2 C6,0.895 6.895,0 8,0"}),Pi("path",{d:"M2,0 C3.105,0 4,0.895 4,2 C4,3.105 3.105,4 2,4 C0.895,4 0,3.105 0,2 C0,0.895 0.895,0 2,0"}),Pi("path",{d:"M14,0 C15.105,0 16,0.895 16,2 C16,3.105 15.105,4 14,4 C12.895,4 12,3.105 12,2 C12,0.895 12.895,0 14,0"})]}),Vue=null;var JD,cm,eF;const zue=({title:e="Embed",desc:t="Embed icon",width:n="16",height:o="15",className:r,focusable:a="false"})=>JD("svg",{className:eF("i i-embed",r),focusable:a,height:o,viewBox:"0 0 16 15",width:n,children:[cm("title",{children:e}),cm("desc",{children:t}),cm("path",{d:"M13.2 11.263l-1.4-1.4 2.3-2.3-2.3-2.3 1.4-1.4 3 3c.4.4.4 1 0 1.4l-3 3M3.8 11.263l-3-3c-.4-.4-.4-1 0-1.4l3-3 1.4 1.4-2.3 2.3 2.3 2.3-1.4 1.4M6.5 14.563c-.1 0-.2 0-.3-.1-.5-.2-.8-.7-.6-1.3l4-12c.2-.5.7-.8 1.3-.6.5.2.8.7.6 1.3l-4 12c-.2.4-.6.7-1 .7"})]}),_ue=null;var tF,zl,nF;const Uue=({title:e="Empty folder",desc:t="Empty folder",width:n="46",height:o="46",className:r,focusable:a="false"})=>tF("svg",{className:nF("i i-emptyFolder",r),focusable:a,height:o,viewBox:"0 0 46 46",width:n,children:[zl("title",{children:e}),zl("desc",{children:t}),zl("path",{d:"M38 6.867a1 1 0 0 0-1-1H16.84l.805.407-4.32-5.867A1 1 0 0 0 12.52 0H1a1 1 0 0 0-1 1v39.6C0 43.578 2.377 46 5.32 46a1 1 0 0 0 0-2C3.49 44 2 42.482 2 40.6V1L1 2h11.52l-.805-.407 4.32 5.867a1 1 0 0 0 .805.407H37l-1-1v8.8a1 1 0 0 0 2 0v-8.8z"}),zl("path",{d:"M9.333 40.65A3.341 3.341 0 0 1 6 44v2h34.667C43.613 46 46 43.604 46 40.65V16a1 1 0 0 0-1-1H10.333a1 1 0 0 0-1 1v24.65zm1-23.65H45l-1-1v24.65A3.341 3.341 0 0 1 40.667 44H6c-1.333 0-1.333 2 0 2 2.947 0 5.333-2.396 5.333-5.35V16l-1 1z"})]}),Gue=null;var sF,_l,oF;const Wue=({title:e="End Slide",desc:t="End Slide",width:n="16",height:o="14",className:r,focusable:a="false"})=>sF("svg",{className:oF("i i-end-slide",r),focusable:a,height:o,viewBox:"0 0 16 14",width:n,children:[_l("title",{children:e}),_l("desc",{children:t}),_l("path",{d:"M6,0.6L4.6,2l4,4H0v2h8.6l-4,4L6,13.4l5.7-5.7c0.4-0.4,0.4-1,0-1.4L6,0.6",fillRule:"evenodd"}),_l("rect",{fillRule:"evenodd",height:"14",width:"2",x:"14"})]}),Kue=null;var bx,Ul,rF;const Que=({title:e="Envelope",desc:t="Envelope",width:n="17",height:o="14",className:r,focusable:a="false"})=>bx("svg",{className:rF("i i-envelope",r),focusable:a,height:o,viewBox:"0 0 17 14",width:n,xmlns:"http://www.w3.org/2000/svg",children:[Ul("title",{children:e}),Ul("desc",{children:t}),bx("g",{fillRule:"nonzero",children:[Ul("path",{d:"M8.5 7.316L1.341.634a.5.5 0 0 0-.682.732l7.5 7a.5.5 0 0 0 .682 0l7.5-7a.5.5 0 1 0-.682-.732L8.5 7.316z"}),Ul("path",{d:"M1.5 1.5v11h14v-11h-14zM1 .5h15a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H1a.5.5 0 0 1-.5-.5V1A.5.5 0 0 1 1 .5z"})]})]}),Yue=null;var aF,Gl,iF;const Zue=({title:e="Error",desc:t="An x with a circle",width:n="50",height:o="50",className:r,focusable:a="false"})=>aF("svg",{className:iF("i i-error",r),focusable:a,height:o,viewBox:"0 0 50 50",width:n,children:[Gl("title",{children:e}),Gl("desc",{children:t}),Gl("path",{d:"M25 50C11.193 50 0 38.807 0 25S11.193 0 25 0s25 11.193 25 25-11.193 25-25 25zm0-2c12.703 0 23-10.297 23-23S37.703 2 25 2 2 12.297 2 25s10.297 23 23 23z"}),Gl("path",{d:"M31.679 18.321a1.036 1.036 0 0 0-1.5 0L24.5 24l-5.679-5.679a1.036 1.036 0 0 0-1.5 0 1.036 1.036 0 0 0 0 1.5L23 25.5l-5.679 5.679a1.036 1.036 0 0 0 0 1.5c.215.214.429.321.75.321.322 0 .536-.107.75-.321L24.5 27l5.679 5.679c.214.214.535.321.75.321.214 0 .535-.107.75-.321a1.036 1.036 0 0 0 0-1.5L26 25.5l5.679-5.679a1.036 1.036 0 0 0 0-1.5"})]}),Xue=null;var cF,Wl,lF;const que=({title:e="Error Alert",desc:t="A red circle with a white exclamation point in the middle",width:n="18",height:o="18",className:r,focusable:a="false"})=>cF("svg",{className:lF("i i-errorAlert",r),focusable:a,height:o,viewBox:"0 0 18 18",width:n,children:[Wl("title",{children:e}),Wl("desc",{children:t}),Wl("circle",{cx:"9",cy:"9",r:"9"}),Wl("path",{d:"M9.897 4v4.004c0 .425-.021.841-.063 1.25-.042.408-.098.84-.168 1.298H8.497c-.07-.457-.126-.89-.168-1.298a12.206 12.206 0 0 1-.063-1.25V4h1.631zM8 13.17c0-.145.027-.282.08-.413a.987.987 0 0 1 .225-.336 1.103 1.103 0 0 1 .759-.308 1.06 1.06 0 0 1 .749.308 1.06 1.06 0 0 1 .308.749 1.07 1.07 0 0 1-.308.749 1.077 1.077 0 0 1-.749.301 1.095 1.095 0 0 1-.76-.301.995.995 0 0 1-.223-.333A1.069 1.069 0 0 1 8 13.17z"})]}),Jue=null,yx=({"aria-hidden":e,"aria-label":t="X mark",className:n,dataTestId:o="x-mark",desc:r,height:a="10",overrideStyle:i=!1,role:c="img",title:l,width:d="10"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:X()(n,{"i i-exMark":!i}),"data-testid":o,focusable:"false",height:a,role:c,viewBox:"0 0 10 10",width:d,xmlns:"http://www.w3.org/2000/svg",children:[l&&(0,s.jsx)("title",{children:l}),r&&(0,s.jsx)("desc",{children:r}),(0,s.jsx)("path",{d:"M5,4.17,9.17,0,10,.83,5.83,5,10,9.17,9.17,10,5,5.83.83,10,0,9.17,4.17,5,0,.83.83,0Z"})]});var dF,Kl,uF;const t0e=({title:e="Export",desc:t="Export",width:n="12",height:o="15",className:r,focusable:a="false"})=>dF("svg",{className:uF("i i-export",r),focusable:a,height:o,viewBox:"0 0 12 15",width:n,children:[Kl("title",{children:e}),Kl("desc",{children:t}),Kl("polygon",{points:"7,6.4 7,1 5,1 5,6.4 2.3,6.4 6,10.8 9.7,6.4"}),Kl("rect",{height:"2",width:"10",x:"1",y:"12"})]}),n0e=null,Sx=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#DFE1E2",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#C7CACC",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M13.534 22.9863V24.4163H10.245V26.4458H12.984V27.8813H10.245V30.9998H8.375V22.9863H13.534Z",fill:"#414448"}),(0,s.jsx)("path",{d:"M17.533 30.9998H15.663V22.9863H17.533V30.9998Z",fill:"#414448"}),(0,s.jsx)("path",{d:"M21.8805 29.5148H24.8505V30.9998H20.0215V22.9863H21.8805V29.5148Z",fill:"#414448"}),(0,s.jsx)("path",{d:"M31.8846 22.9863V24.4163H28.5956V26.2863H31.1146V27.6613H28.5956V29.5698H31.8846V30.9998H26.7256V22.9863H31.8846Z",fill:"#414448"})]}),hF=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#C3CEED",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#96A9E0",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M14.8355 26.9904C14.8355 27.5698 14.7346 28.1051 14.533 28.5964C14.335 29.0841 14.0545 29.5076 13.6915 29.8669C13.3285 30.2226 12.8903 30.5013 12.377 30.7029C11.8673 30.9009 11.3008 30.9999 10.6775 30.9999H7.56445V22.9864H10.6775C11.3008 22.9864 11.8673 23.0873 12.377 23.2889C12.8903 23.4906 13.3285 23.7693 13.6915 24.1249C14.0545 24.4806 14.335 24.9041 14.533 25.3954C14.7346 25.8831 14.8355 26.4148 14.8355 26.9904ZM12.9325 26.9904C12.9325 26.5944 12.8811 26.2369 12.7785 25.9179C12.6758 25.5989 12.5273 25.3294 12.333 25.1094C12.1423 24.8858 11.9076 24.7153 11.629 24.5979C11.3503 24.4769 11.0331 24.4164 10.6775 24.4164H9.43445V29.5699H10.6775C11.0331 29.5699 11.3503 29.5113 11.629 29.3939C11.9076 29.2729 12.1423 29.1024 12.333 28.8824C12.5273 28.6588 12.6758 28.3874 12.7785 28.0684C12.8811 27.7494 12.9325 27.3901 12.9325 26.9904Z",fill:"#0C3092"}),(0,s.jsx)("path",{d:"M24.6375 26.9904C24.6375 27.5698 24.5367 28.1088 24.335 28.6074C24.137 29.1061 23.8565 29.5406 23.4935 29.9109C23.1305 30.2776 22.6923 30.5654 22.179 30.7744C21.6693 30.9834 21.1028 31.0879 20.4795 31.0879C19.8562 31.0879 19.2878 30.9834 18.7745 30.7744C18.2612 30.5654 17.8212 30.2776 17.4545 29.9109C17.0915 29.5406 16.8092 29.1061 16.6075 28.6074C16.4095 28.1088 16.3105 27.5698 16.3105 26.9904C16.3105 26.4111 16.4095 25.8721 16.6075 25.3734C16.8092 24.8748 17.0915 24.4421 17.4545 24.0754C17.8212 23.7088 18.2612 23.4209 18.7745 23.2119C19.2878 23.0029 19.8562 22.8984 20.4795 22.8984C21.1028 22.8984 21.6693 23.0048 22.179 23.2174C22.6923 23.4264 23.1305 23.7143 23.4935 24.0809C23.8565 24.4476 24.137 24.8803 24.335 25.3789C24.5367 25.8776 24.6375 26.4148 24.6375 26.9904ZM22.7345 26.9904C22.7345 26.5944 22.6832 26.2388 22.5805 25.9234C22.4779 25.6044 22.3293 25.3349 22.135 25.1149C21.9443 24.8949 21.7097 24.7263 21.431 24.6089C21.1523 24.4916 20.8352 24.4329 20.4795 24.4329C20.1202 24.4329 19.7993 24.4916 19.517 24.6089C19.2383 24.7263 19.0018 24.8949 18.8075 25.1149C18.6168 25.3349 18.4702 25.6044 18.3675 25.9234C18.2648 26.2388 18.2135 26.5944 18.2135 26.9904C18.2135 27.3901 18.2648 27.7494 18.3675 28.0684C18.4702 28.3838 18.6168 28.6514 18.8075 28.8714C19.0018 29.0914 19.2383 29.2601 19.517 29.3774C19.7993 29.4911 20.1202 29.5479 20.4795 29.5479C20.8352 29.5479 21.1523 29.4911 21.431 29.3774C21.7097 29.2601 21.9443 29.0914 22.135 28.8714C22.3293 28.6514 22.4779 28.3838 22.5805 28.0684C22.6832 27.7494 22.7345 27.3901 22.7345 26.9904Z",fill:"#0C3092"}),(0,s.jsx)("path",{d:"M31.9109 28.9264C31.9549 28.9264 31.9989 28.9356 32.0429 28.9539C32.0869 28.9686 32.129 28.9961 32.1694 29.0364L32.9064 29.8119C32.5837 30.2336 32.1785 30.5526 31.6909 30.7689C31.2069 30.9816 30.633 31.0879 29.9694 31.0879C29.3607 31.0879 28.8144 30.9853 28.3304 30.7799C27.85 30.5709 27.4412 30.2849 27.1039 29.9219C26.7702 29.5553 26.5135 29.1226 26.3339 28.6239C26.1542 28.1216 26.0644 27.5771 26.0644 26.9904C26.0644 26.3928 26.167 25.8446 26.3724 25.3459C26.5777 24.8436 26.8637 24.4109 27.2304 24.0479C27.6007 23.6849 28.0425 23.4026 28.5559 23.2009C29.0692 22.9993 29.6357 22.8984 30.2554 22.8984C30.556 22.8984 30.8384 22.9259 31.1024 22.9809C31.37 23.0323 31.6194 23.1056 31.8504 23.2009C32.0814 23.2926 32.294 23.4044 32.4884 23.5364C32.6827 23.6648 32.855 23.8078 33.0054 23.9654L32.3784 24.8069C32.338 24.8583 32.2904 24.9059 32.2354 24.9499C32.1804 24.9903 32.1034 25.0104 32.0044 25.0104C31.9384 25.0104 31.876 24.9958 31.8174 24.9664C31.7587 24.9371 31.6964 24.9023 31.6304 24.8619C31.5644 24.8179 31.491 24.7721 31.4104 24.7244C31.3334 24.6731 31.2399 24.6273 31.1299 24.5869C31.0235 24.5429 30.897 24.5063 30.7504 24.4769C30.6074 24.4476 30.4387 24.4329 30.2444 24.4329C29.907 24.4329 29.599 24.4934 29.3204 24.6144C29.0417 24.7318 28.8015 24.9023 28.5999 25.1259C28.4019 25.3459 28.246 25.6136 28.1324 25.9289C28.0224 26.2443 27.9674 26.5981 27.9674 26.9904C27.9674 27.4011 28.0224 27.7659 28.1324 28.0849C28.246 28.4039 28.3982 28.6734 28.5889 28.8934C28.7832 29.1098 29.0087 29.2748 29.2654 29.3884C29.522 29.5021 29.797 29.5589 30.0904 29.5589C30.259 29.5589 30.413 29.5516 30.5524 29.5369C30.6917 29.5186 30.82 29.4893 30.9374 29.4489C31.0584 29.4086 31.172 29.3573 31.2784 29.2949C31.3884 29.2289 31.4984 29.1483 31.6084 29.0529C31.6524 29.0163 31.7 28.9869 31.7514 28.9649C31.8027 28.9393 31.8559 28.9264 31.9109 28.9264Z",fill:"#0C3092"})]}),mF=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#F5D0CE",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#EDADA9",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M10.8678 28.3213V30.9998H9.00879V22.9863H11.8358C12.4005 22.9863 12.8845 23.0542 13.2878 23.1898C13.6948 23.3218 14.0285 23.5052 14.2888 23.7398C14.5528 23.9745 14.7471 24.2513 14.8718 24.5703C14.9965 24.8893 15.0588 25.234 15.0588 25.6043C15.0588 26.004 14.9946 26.3707 14.8663 26.7043C14.738 27.038 14.5418 27.324 14.2778 27.5623C14.0138 27.8007 13.6783 27.9877 13.2713 28.1233C12.868 28.2553 12.3895 28.3213 11.8358 28.3213H10.8678ZM10.8678 26.9188H11.8358C12.3198 26.9188 12.6681 26.8033 12.8808 26.5723C13.0935 26.3413 13.1998 26.0187 13.1998 25.6043C13.1998 25.421 13.1723 25.2542 13.1173 25.1038C13.0623 24.9535 12.978 24.8252 12.8643 24.7188C12.7543 24.6088 12.6131 24.5245 12.4408 24.4658C12.2721 24.4072 12.0705 24.3778 11.8358 24.3778H10.8678V26.9188Z",fill:"#771D18"}),(0,s.jsx)("path",{d:"M24.2944 26.9903C24.2944 27.5697 24.1936 28.105 23.9919 28.5963C23.7939 29.084 23.5134 29.5075 23.1504 29.8668C22.7874 30.2225 22.3493 30.5012 21.8359 30.7028C21.3263 30.9008 20.7598 30.9998 20.1364 30.9998H17.0234V22.9863H20.1364C20.7598 22.9863 21.3263 23.0872 21.8359 23.2888C22.3493 23.4905 22.7874 23.7692 23.1504 24.1248C23.5134 24.4805 23.7939 24.904 23.9919 25.3953C24.1936 25.883 24.2944 26.4147 24.2944 26.9903ZM22.3914 26.9903C22.3914 26.5943 22.3401 26.2368 22.2374 25.9178C22.1348 25.5988 21.9863 25.3293 21.7919 25.1093C21.6013 24.8857 21.3666 24.7152 21.0879 24.5978C20.8093 24.4768 20.4921 24.4163 20.1364 24.4163H18.8934V29.5698H20.1364C20.4921 29.5698 20.8093 29.5112 21.0879 29.3938C21.3666 29.2728 21.6013 29.1023 21.7919 28.8823C21.9863 28.6587 22.1348 28.3873 22.2374 28.0683C22.3401 27.7493 22.3914 27.39 22.3914 26.9903Z",fill:"#771D18"}),(0,s.jsx)("path",{d:"M31.3465 22.9863V24.4163H28.0575V26.4458H30.7965V27.8813H28.0575V30.9998H26.1875V22.9863H31.3465Z",fill:"#771D18"})]}),fF=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#FBDACC",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#F8BFA6",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M11.2115 28.3213V30.9998H9.35254V22.9863H12.1795C12.7442 22.9863 13.2282 23.0542 13.6315 23.1898C14.0385 23.3218 14.3722 23.5052 14.6325 23.7398C14.8965 23.9745 15.0909 24.2513 15.2155 24.5703C15.3402 24.8893 15.4025 25.234 15.4025 25.6043C15.4025 26.004 15.3384 26.3707 15.21 26.7043C15.0817 27.038 14.8855 27.324 14.6215 27.5623C14.3575 27.8007 14.022 27.9877 13.615 28.1233C13.2117 28.2553 12.7332 28.3213 12.1795 28.3213H11.2115ZM11.2115 26.9188H12.1795C12.6635 26.9188 13.0119 26.8033 13.2245 26.5723C13.4372 26.3413 13.5435 26.0187 13.5435 25.6043C13.5435 25.421 13.516 25.2542 13.461 25.1038C13.406 24.9535 13.3217 24.8252 13.208 24.7188C13.098 24.6088 12.9569 24.5245 12.7845 24.4658C12.6159 24.4072 12.4142 24.3778 12.1795 24.3778H11.2115V26.9188Z",fill:"#7C2B0E"}),(0,s.jsx)("path",{d:"M19.2262 28.3213V30.9998H17.3672V22.9863H20.1942C20.7589 22.9863 21.2429 23.0542 21.6462 23.1898C22.0532 23.3218 22.3869 23.5052 22.6472 23.7398C22.9112 23.9745 23.1055 24.2513 23.2302 24.5703C23.3549 24.8893 23.4172 25.234 23.4172 25.6043C23.4172 26.004 23.353 26.3707 23.2247 26.7043C23.0964 27.038 22.9002 27.324 22.6362 27.5623C22.3722 27.8007 22.0367 27.9877 21.6297 28.1233C21.2264 28.2553 20.7479 28.3213 20.1942 28.3213H19.2262ZM19.2262 26.9188H20.1942C20.6782 26.9188 21.0265 26.8033 21.2392 26.5723C21.4519 26.3413 21.5582 26.0187 21.5582 25.6043C21.5582 25.421 21.5307 25.2542 21.4757 25.1038C21.4207 24.9535 21.3364 24.8252 21.2227 24.7188C21.1127 24.6088 20.9715 24.5245 20.7992 24.4658C20.6305 24.4072 20.4289 24.3778 20.1942 24.3778H19.2262V26.9188Z",fill:"#7C2B0E"}),(0,s.jsx)("path",{d:"M31.2008 22.9863V24.4603H28.9458V30.9998H27.0868V24.4603H24.8318V22.9863H31.2008Z",fill:"#7C2B0E"})]}),pF=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#CFEAF8",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M11.6738 28.0355V31H9.81476V22.9865H12.4218C13.0011 22.9865 13.4943 23.047 13.9013 23.168C14.3119 23.2853 14.6456 23.4503 14.9023 23.663C15.1626 23.8757 15.3514 24.1268 15.4688 24.4165C15.5861 24.7062 15.6448 25.0215 15.6448 25.3625C15.6448 25.6228 15.6099 25.8685 15.5403 26.0995C15.4706 26.3305 15.3661 26.545 15.2268 26.743C15.0911 26.9373 14.9224 27.1115 14.7208 27.2655C14.5228 27.4195 14.2936 27.546 14.0333 27.645C14.1579 27.7073 14.2734 27.7843 14.3798 27.876C14.4898 27.9677 14.5851 28.0795 14.6658 28.2115L16.3708 31H14.6878C14.3761 31 14.1524 30.8827 14.0168 30.648L12.6858 28.3215C12.6271 28.2188 12.5574 28.1455 12.4768 28.1015C12.3998 28.0575 12.2898 28.0355 12.1468 28.0355H11.6738ZM11.6738 26.754H12.4218C12.6748 26.754 12.8893 26.7228 13.0653 26.6605C13.2449 26.5945 13.3916 26.5047 13.5053 26.391C13.6189 26.2773 13.7014 26.1453 13.7528 25.995C13.8041 25.841 13.8298 25.676 13.8298 25.5C13.8298 25.148 13.7143 24.873 13.4833 24.675C13.2559 24.477 12.9021 24.378 12.4218 24.378H11.6738V26.754Z",fill:"#144E6C"}),(0,s.jsx)("path",{d:"M23.6162 22.9865V24.4605H21.3612V31H19.5022V24.4605H17.2472V22.9865H23.6162Z",fill:"#144E6C"}),(0,s.jsx)("path",{d:"M30.5411 22.9865V24.4165H27.2521V26.446H29.9911V27.8815H27.2521V31H25.3821V22.9865H30.5411Z",fill:"#144E6C"})]}),gF=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#D1E5D1",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#AFD1AE",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M11.8861 26.8804L9.40564 22.9864H11.2646C11.3856 22.9864 11.4736 23.0029 11.5286 23.0359C11.5873 23.0653 11.6386 23.1166 11.6826 23.1899L13.2776 25.8904C13.296 25.8428 13.3161 25.7969 13.3381 25.7529C13.3638 25.7089 13.3913 25.6631 13.4206 25.6154L14.8176 23.2174C14.9093 23.0634 15.034 22.9864 15.1916 22.9864H16.9736L14.4601 26.7979L17.0286 30.9999H15.1696C15.0486 30.9999 14.9496 30.9706 14.8726 30.9119C14.7993 30.8533 14.7406 30.7836 14.6966 30.7029L13.0906 27.8979C13.0613 27.9786 13.0283 28.0483 12.9916 28.1069L11.4956 30.7029C11.4516 30.7799 11.393 30.8496 11.3196 30.9119C11.2463 30.9706 11.1546 30.9999 11.0446 30.9999H9.30664L11.8861 26.8804Z",fill:"#265026"}),(0,s.jsx)("path",{d:"M20.6017 29.5149H23.5717V30.9999H18.7427V22.9864H20.6017V29.5149Z",fill:"#265026"}),(0,s.jsx)("path",{d:"M29.9128 24.6144C29.8578 24.7024 29.7991 24.7684 29.7368 24.8124C29.6781 24.8564 29.6011 24.8784 29.5058 24.8784C29.4215 24.8784 29.3298 24.8528 29.2308 24.8014C29.1355 24.7464 29.0255 24.6859 28.9008 24.6199C28.7798 24.5539 28.6405 24.4953 28.4828 24.4439C28.3251 24.3889 28.1455 24.3614 27.9438 24.3614C27.5955 24.3614 27.3351 24.4366 27.1628 24.5869C26.9941 24.7336 26.9098 24.9334 26.9098 25.1864C26.9098 25.3478 26.9611 25.4816 27.0638 25.5879C27.1665 25.6943 27.3003 25.7859 27.4653 25.8629C27.634 25.9399 27.8246 26.0114 28.0373 26.0774C28.2536 26.1398 28.4736 26.2113 28.6973 26.2919C28.921 26.3689 29.1391 26.4606 29.3518 26.5669C29.5681 26.6733 29.7588 26.8089 29.9238 26.9739C30.0925 27.1389 30.2281 27.3406 30.3308 27.5789C30.4335 27.8136 30.4848 28.0978 30.4848 28.4314C30.4848 28.8018 30.4206 29.1483 30.2923 29.4709C30.164 29.7936 29.977 30.0759 29.7313 30.3179C29.4893 30.5563 29.1886 30.7451 28.8293 30.8844C28.4736 31.0201 28.0685 31.0879 27.6138 31.0879C27.3645 31.0879 27.1096 31.0623 26.8493 31.0109C26.5926 30.9596 26.3433 30.8881 26.1013 30.7964C25.8593 30.7011 25.632 30.5893 25.4193 30.4609C25.2066 30.3326 25.0215 30.1896 24.8638 30.0319L25.4138 29.1629C25.4541 29.0969 25.511 29.0438 25.5843 29.0034C25.6576 28.9631 25.7365 28.9429 25.8208 28.9429C25.9308 28.9429 26.0408 28.9778 26.1508 29.0474C26.2645 29.1171 26.391 29.1941 26.5303 29.2784C26.6733 29.3628 26.8365 29.4398 27.0198 29.5094C27.2031 29.5791 27.4195 29.6139 27.6688 29.6139C28.0061 29.6139 28.2683 29.5406 28.4553 29.3939C28.6423 29.2436 28.7358 29.0071 28.7358 28.6844C28.7358 28.4974 28.6845 28.3453 28.5818 28.2279C28.4791 28.1106 28.3435 28.0134 28.1748 27.9364C28.0098 27.8594 27.821 27.7916 27.6083 27.7329C27.3956 27.6743 27.1775 27.6101 26.9538 27.5404C26.7301 27.4671 26.512 27.3791 26.2993 27.2764C26.0866 27.1701 25.896 27.0326 25.7273 26.8639C25.5623 26.6916 25.4285 26.4789 25.3258 26.2259C25.2231 25.9693 25.1718 25.6539 25.1718 25.2799C25.1718 24.9793 25.2323 24.6859 25.3533 24.3999C25.4743 24.1139 25.6521 23.8591 25.8868 23.6354C26.1215 23.4118 26.4093 23.2339 26.7503 23.1019C27.0913 22.9663 27.4818 22.8984 27.9218 22.8984C28.1675 22.8984 28.4058 22.9186 28.6368 22.9589C28.8715 22.9956 29.0933 23.0524 29.3023 23.1294C29.5113 23.2028 29.7056 23.2926 29.8853 23.3989C30.0686 23.5016 30.2318 23.6189 30.3748 23.7509L29.9128 24.6144Z",fill:"#265026"})]}),vF=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#CFEAF8",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M16.8968 22.9863V23.6573C16.8968 23.7527 16.8802 23.8462 16.8472 23.9378C16.8179 24.0295 16.7757 24.1157 16.7207 24.1963L12.9587 29.5698H16.7758V30.9998H10.5938V30.2848C10.5938 30.2005 10.6084 30.118 10.6377 30.0373C10.6671 29.953 10.7074 29.876 10.7587 29.8063L14.5317 24.4163H10.9017V22.9863H16.8968Z",fill:"#124F6E"}),(0,s.jsx)("path",{d:"M20.7826 30.9998H18.9126V22.9863H20.7826V30.9998Z",fill:"#124F6E"}),(0,s.jsx)("path",{d:"M25.1301 28.3213V30.9998H23.2711V22.9863H26.0981C26.6627 22.9863 27.1467 23.0542 27.5501 23.1898C27.9571 23.3218 28.2907 23.5052 28.5511 23.7398C28.8151 23.9745 29.0094 24.2513 29.1341 24.5703C29.2587 24.8893 29.3211 25.234 29.3211 25.6043C29.3211 26.004 29.2569 26.3707 29.1286 26.7043C29.0002 27.038 28.8041 27.324 28.5401 27.5623C28.2761 27.8007 27.9406 27.9877 27.5336 28.1233C27.1302 28.2553 26.6517 28.3213 26.0981 28.3213H25.1301ZM25.1301 26.9188H26.0981C26.5821 26.9188 26.9304 26.8033 27.1431 26.5723C27.3557 26.3413 27.4621 26.0187 27.4621 25.6043C27.4621 25.421 27.4346 25.2542 27.3796 25.1038C27.3246 24.9535 27.2402 24.8252 27.1266 24.7188C27.0166 24.6088 26.8754 24.5245 26.7031 24.4658C26.5344 24.4072 26.3327 24.3778 26.0981 24.3778H25.1301V26.9188Z",fill:"#124F6E"})]});var CF,lm;const d0e=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="16",role:a="img",title:i,width:c="16"})=>CF("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:a,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&lm("title",{children:i}),o&&lm("desc",{children:o}),lm("path",{d:"M11.793 2.793L9 0h7v7l-2.793-2.793-2.5 2.5a.997.997 0 0 1-1.414 0 1 1 0 0 1 0-1.414l2.5-2.5zm-5.086 6.5a1 1 0 0 1 0 1.414l-2.5 2.5L7 16H0V9l2.793 2.793 2.5-2.5a1 1 0 0 1 1.414 0zm-2.5-6.5l2.5 2.5a1 1 0 1 1-1.414 1.414l-2.5-2.5L0 7V0h7L4.207 2.793zm5.086 6.5a1 1 0 0 1 1.414 0l2.5 2.5L16 9v7H9l2.793-2.793-2.5-2.5a1 1 0 0 1 0-1.414z",fill:"currentColor",fillRule:"evenodd"})]}),u0e=null;var xF,dm,bF;const h0e=({title:e="Hidden",desc:t="Eye crossed out",width:n="16",height:o="14",className:r=null,focusable:a="false"})=>xF("svg",{className:bF("i i-hidden",r),focusable:a,height:o,viewBox:"0 0 16 14",width:n,children:[dm("title",{children:e}),dm("desc",{children:t}),dm("path",{d:"M15.9,6.3c-0.1-0.1-1-1.8-2.7-3.3l1.3-1.3c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0l-1.6,1.6c-1-0.6-2.2-1-3.6-1 c-4.8,0-7.7,5.3-7.9,5.5C0,6.6,0,7,0.1,7.3c0.1,0.1,1,1.8,2.7,3.3l-1,1c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3S3,13.2,3.2,13 l1.2-1.2c1,0.6,2.2,1,3.6,1h0c4.7,0,7.7-5.3,7.9-5.5C16,7,16,6.6,15.9,6.3z M2.2,6.8c0.8-1.2,3-4,5.8-4c0.7,0,1.4,0.2,2.1,0.5 L8.5,4.9C8.4,4.8,8.2,4.8,8,4.8c-1.1,0-1.9,0.9-2,2c0,0.2,0,0.4,0.1,0.5L4.2,9.2C3.3,8.3,2.6,7.4,2.2,6.8z M8,10.8 c-0.7,0-1.4-0.2-2.1-0.5l1.6-1.6c0.2,0,0.3,0.1,0.5,0.1c0,0,0.1,0,0.1,0c1.1,0,2-0.9,2-2c0-0.2,0-0.3-0.1-0.5l1.8-1.8 c1,0.8,1.7,1.8,2,2.4C13,8,10.8,10.8,8,10.8z"})]}),m0e=null;var yF,Ql,SF;const f0e=({title:e="Label Set",desc:t="Label Set",width:n="17",height:o="17",className:r,focusable:a="false"})=>yF("svg",{className:SF("i i-labelSet",r),focusable:a,height:o,viewBox:"0 0 18 18",width:n,children:[Ql("title",{children:e}),Ql("desc",{children:t}),Ql("path",{d:"M17.63,9.76,8.24.37A.59.59,0,0,0,7.83.2h-7A.59.59,0,0,0,.2.78v7a.59.59,0,0,0,.17.42l9.39,9.39a.59.59,0,0,0,.83,0l7-7A.59.59,0,0,0,17.63,9.76ZM1.37,7.58V1.37H7.58l8.8,8.8-6.21,6.21Z"}),Ql("path",{d:"M5.48,3.33A2.15,2.15,0,1,0,7.63,5.48,2.15,2.15,0,0,0,5.48,3.33Zm0,3.13a1,1,0,1,1,1-1A1,1,0,0,1,5.48,6.46Z"})]}),p0e=null;var LF,um;const g0e=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>LF("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&um("title",{children:i}),o&&um("desc",{children:o}),um("path",{d:"M0 0h16v2H0V0zm0 13h16v2H0v-2zm1-9h8a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",fill:"currentColor",fillRule:"evenodd"})]}),v0e=null;var TF,hm,kF;const C0e=({title:e="Matching",desc:t="Two rows of stacked squares",width:n="15",height:o="15",className:r,focusable:a="false"})=>TF("svg",{className:kF("i i-matching",r),focusable:a,height:o,viewBox:"0 0 15 15",width:n,children:[hm("title",{children:e}),hm("desc",{children:t}),hm("path",{d:"M4.814 4.975H2.19V2.35h2.625v2.625zM5.69.6H1.314C.79.6.44.95.44 1.475V5.85c0 .525.35.875.875.875H5.69c.525 0 .875-.35.875-.875V1.475C6.564.95 6.214.6 5.69.6zM12.69 4.975h-2.626V2.35h2.625v2.625zM13.563.6H9.19c-.525 0-.875.35-.875.875V5.85c0 .525.35.875.875.875h4.375c.525 0 .875-.35.875-.875V1.475c0-.525-.35-.875-.875-.875zM4.814 12.85H2.19v-2.625h2.625v2.625zm.875-4.375H1.314c-.525 0-.875.35-.875.875v4.375c0 .525.35.875.875.875H5.69c.525 0 .875-.35.875-.875V9.35c0-.525-.35-.875-.875-.875zM12.69 12.85h-2.626v-2.625h2.625v2.625zm.874-4.375H9.19c-.525 0-.875.35-.875.875v4.375c0 .525.35.875.875.875h4.375c.525 0 .875-.35.875-.875V9.35c0-.525-.35-.875-.875-.875z"})]}),x0e=null;var IF,Yl,EF;const b0e=({title:e="Multiple Choice",desc:t="Stacked circles to the left of stacked lines",width:n="16",height:o="16",className:r,focusable:a="false"})=>IF("svg",{className:EF("i i-multipleChoice",r),focusable:a,height:o,viewBox:"0 0 16 16",width:n,children:[Yl("title",{children:e}),Yl("desc",{children:t}),Yl("path",{d:"M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm0-2A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"}),Yl("circle",{cx:"7.904",cy:"7.904",r:"1.904"})]}),y0e=null;var NF,mm,jF;const S0e=({title:e="Multiple Response",desc:t="A box with a checkmark in it",width:n="16",height:o="16",className:r,focusable:a="false"})=>NF("svg",{className:jF("i i-multipleResponse",r),focusable:a,height:o,viewBox:"0 0 16 16",width:n,children:[mm("title",{children:e}),mm("desc",{children:t}),mm("path",{d:"M15.142.332c.6 0 1 .4 1 1v14c0 .6-.4 1-1 1h-14c-.6 0-1-.4-1-1v-14c0-.6.4-1 1-1h14zm-1 14v-12h-12v12h12zm-7.978-3.308l-2-2-.707-.708L4.87 6.902l.707.707 1.3 1.3 3.317-3.33.707-.708 1.414 1.414-.707.707-4.03 4.032-.708.707-.707-.707z"})]}),L0e=null;var wF,Zl,AF;const T0e=({title:e="New Slide",desc:t="New Slide",width:n="16",height:o="16",className:r,focusable:a="false"})=>wF("svg",{className:AF("i i-new-slide",r),focusable:a,height:o,viewBox:"0 0 16 16",width:n,children:[Zl("title",{children:e}),Zl("desc",{children:t}),Zl("path",{d:"M7,12h2V9h3V7H9V4H7v3H4v2h3V12z",fillRule:"evenodd"}),Zl("path",{d:"M14,14H2V2h12V14z M15,0H1C0.4,0,0,0.4,0,1v14c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V1C15.9,0.4,15.5,0,15,0z",fillRule:"evenodd"})]}),k0e=null;var RF,fm,PF;const I0e=({title:e="Next Slide",desc:t="Next Slide",width:n="16",height:o="13.4",className:r,focusable:a="false"})=>RF("svg",{className:PF("i i-next-slide",r),focusable:a,height:o,viewBox:"0 0 16 13.4",width:n,children:[fm("title",{children:e}),fm("desc",{children:t}),fm("path",{d:"M9.3,0L7.9,1.4l4.3,4.3H0v2h12.2L7.9,12l1.4,1.4L16,6.7L9.3,0",fillRule:"evenodd"})]}),E0e=null;var MF,Mi,OF;const N0e=({title:e="Hide",desc:t="Shape of an eye with a stroke through it",width:n="20",height:o="16",className:r,focusable:a="false"})=>MF("svg",{className:OF("i",r),focusable:a,height:o,viewBox:"0 0 20 16",width:n,children:[Mi("title",{children:e}),Mi("desc",{children:t}),Mi("path",{d:"M3.23,12.35 L3.94,11.64 C2.73771334,10.6447807 1.76251115,9.40361431 1.08,8 C2.47,5 5.96,2 9.99,2 C11.0161024,2.00843654 12.0323067,2.20151536 12.99,2.57 L13.76,1.8 C12.5726697,1.28490674 11.2941824,1.01288817 10,1 C5.61,1 1.52,4.28 0,8 C0.716531693,9.68559192 1.82365735,11.1766125 3.23,12.35 L3.23,12.35 Z"}),Mi("path",{d:"M16.77,3.65 L16.06,4.36 C17.2622867,5.35521926 18.2374889,6.59638569 18.92,8 C17.53,11 14.04,14 10.01,14 C8.9838976,13.9915635 7.96769327,13.7984846 7.01,13.43 L6.24,14.2 C7.43352094,14.717712 8.71907199,14.9897863 10.02,15 C14.41,15 18.5,11.72 20.02,8 C19.297748,6.3123309 18.1836278,4.82112397 16.77,3.65 L16.77,3.65 Z"}),Mi("rect",{height:"1.41",transform:"translate(9.992148, 7.999769) rotate(-45.000000) translate(-9.992148, -7.999769) ",width:"21.21",x:"-0.61285173",y:"7.29476926"})]}),j0e=null;var BF,pm,DF;const w0e=({title:e="Edit",desc:t="Pencil",width:n="11",height:o="11",className:r,focusable:a="false"})=>BF("svg",{className:DF("i i-pencil",r),focusable:a,height:o,viewBox:"0 0 10 10",width:n,children:[pm("title",{children:e}),pm("desc",{children:t}),pm("path",{d:"M8.19.19a.6.6,0,0,0-.87,0L0,7.5V10H2.5L9.81,2.69a.6.6,0,0,0,0-.87Z"})]}),A0e=null;var FF,gm;const R0e=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="16",role:a="img",title:i,width:c="16"})=>FF("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&gm("title",{children:i}),o&&gm("desc",{children:o}),gm("path",{clipRule:"evenodd",d:"M12.668 2.11458C12.5079 2.11458 12.3494 2.14611 12.2015 2.20737C12.0536 2.26863 11.9192 2.35842 11.8061 2.47161L2.93124 11.3464L2.2848 13.7167L4.6551 13.0703L13.5299 4.19546C13.6431 4.08227 13.7329 3.9479 13.7941 3.80001C13.8554 3.65212 13.8869 3.49361 13.8869 3.33353C13.8869 3.17346 13.8554 3.01495 13.7941 2.86706C13.7329 2.71917 13.6431 2.5848 13.5299 2.47161C13.4167 2.35842 13.2823 2.26863 13.1345 2.20737C12.9866 2.14611 12.8281 2.11458 12.668 2.11458ZM11.6913 0.975531C12.0009 0.847267 12.3328 0.78125 12.668 0.78125C13.0032 0.78125 13.335 0.847267 13.6447 0.975531C13.9544 1.1038 14.2357 1.2918 14.4727 1.5288C14.7097 1.7658 14.8977 2.04716 15.026 2.35682C15.1543 2.66648 15.2203 2.99837 15.2203 3.33353C15.2203 3.6687 15.1543 4.00059 15.026 4.31025C14.8977 4.61991 14.7097 4.90127 14.4727 5.13827L5.47272 14.1383C5.39069 14.2203 5.28866 14.2795 5.17673 14.31L1.51006 15.31C1.27925 15.373 1.03241 15.3074 0.863246 15.1383C0.69408 14.9691 0.628527 14.7223 0.691475 14.4915L1.69148 10.8248C1.722 10.7129 1.78121 10.6108 1.86325 10.5288L10.8632 1.5288C11.1002 1.2918 11.3816 1.1038 11.6913 0.975531Z",fill:"currentColor",fillRule:"evenodd"})]}),P0e=null;class vm extends u.Component{constructor(...t){super(...t),this.maskId=`person-unknown-mask-${br()()}`,this.pathId=`person-unknown-path-${br()()}`}render(){const{title:t="Person Unknown",desc:n,width:o="38",height:r="38",className:a,decorative:i,focusable:c="false"}=this.props;return(0,s.jsxs)("svg",{"aria-hidden":i,className:X()("i i-person-unknown",a),focusable:c,height:r,viewBox:"0 0 38 38",width:o,children:[t&&(0,s.jsx)("title",{children:t}),n&&(0,s.jsx)("desc",{children:n}),(0,s.jsx)("defs",{children:(0,s.jsx)("circle",{cx:"19",cy:"19",id:this.pathId,r:"19"})}),(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:[(0,s.jsx)("mask",{fill:"#fff",id:this.maskId,children:(0,s.jsx)("use",{href:`#${this.pathId}`})}),(0,s.jsx)("use",{fill:"#D8D8D8",href:`#${this.pathId}`}),(0,s.jsx)("path",{d:"M15.1239928,24 C12.6645753,22.6352711 11,20.0120267 11,17 C11,12.581722 14.581722,9 19,9 C23.418278,9 27,12.581722 27,17 C27,20.0120267 25.3354247,22.6352711 22.8760072,24 L23,24 C27.4182847,24 31,27.5817153 31,32 L31,43 C31,43.5522847 30.5522847,44 30,44 L8,44 C7.44771525,44 7,43.5522847 7,43 L7,32 C7,27.5817153 10.5817153,24 15,24 L15.1239928,24 Z",fill:"#ADAEAF",fillRule:"nonzero",mask:`url(#${this.maskId})`})]})]})}}function HF(e){return(0,s.jsxs)(gn,{viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("path",{d:"M14,14 L2,14 L2,2 L14,2 L14,14 Z M15,0 L1,0 C0.4,0 0,0.4 0,1 L0,15 C0,15.6 0.4,16 1,16 L15,16 C15.6,16 16,15.6 16,15 L16,1 C16,0.4 15.6,0 15,0 L15,0 Z"}),(0,s.jsx)("path",{d:"M7.9997,11 C8.5517,11 8.9997,11.448 8.9997,12 C8.9997,12.552 8.5517,13 7.9997,13 C7.4477,13 6.9997,12.552 6.9997,12 C6.9997,11.448 7.4477,11 7.9997,11"}),(0,s.jsx)("path",{d:"M7.0997,5.5 C7.2997,5.2 7.5997,5 7.9997,5 C8.5997,5 8.9997,5.4 8.9997,6 C8.9997,6.3 8.8997,6.4 8.3997,6.7 C7.7997,7.1 6.9997,7.7 6.9997,9 L6.9997,10 L8.9997,10 L8.9997,9 C8.9997,8.8 8.9997,8.7 9.4997,8.4 C10.0997,8 10.9997,7.4 10.9997,6 C10.9997,4.3 9.6997,3 7.9997,3 C6.8997,3 5.8997,3.6 5.3997,4.5 L4.8997,5.4 L6.5997,6.4 L7.0997,5.5 Z"})]})}var $F,Cm;const M0e=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>$F("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Cm("title",{children:i}),o&&Cm("desc",{children:o}),Cm("path",{d:"M0 0h16v2H0V0zm0 13h16v2H0v-2zm7-9h8a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",fill:"currentColor",fillRule:"evenodd"})]}),O0e=null;function VF(e){return(0,s.jsx)(gn,{viewBox:"0 0 23 17",...e,children:(0,s.jsx)("path",{d:"M19.347 8.275l1.88 1.714a.727.727 0 0 0 .98-1.074l-3.225-2.941a.727.727 0 0 0-1.027.047l-2.94 3.224a.727.727 0 0 0 1.075.98l1.802-1.976a6.545 6.545 0 0 1-11.56 4.288.727.727 0 1 0-1.114.935 8 8 0 0 0 14.129-5.197zm-16.039.162l-1.79-1.633a.727.727 0 1 0-.98 1.074l3.223 2.94c.297.272.757.25 1.028-.046l2.94-3.224a.727.727 0 0 0-1.075-.98L4.768 8.636a6.545 6.545 0 0 1 11.555-4.482.727.727 0 1 0 1.114-.936A8 8 0 0 0 3.308 8.437z",fillRule:"nonzero"})})}var Lx,zF;const B0e=({width:e="16",height:t="16",className:n})=>Lx("svg",{"aria-hidden":"true",className:zF("i i-search",n),fill:"currentColor",focusable:"false",height:t,viewBox:"0 0 15.6 14.7",width:e,children:Lx("path",{d:"M15.2,12.8l-2.9-2.9c0.5-1,0.9-2,0.9-3.2c0-3.6-2.9-6.5-6.5-6.5c-3.6,0-6.5,2.9-6.5,6.5s2.9,6.5,6.5,6.5c1.7,0,3.2-0.6,4.4-1.7l2.8,2.8c0.4,0.4,1,0.4,1.4,0C15.6,13.8,15.6,13.2,15.2,12.8z M6.7,11.2c-2.5,0-4.5-2-4.5-4.5s2-4.5,4.5-4.5s4.5,2,4.5,4.5S9.1,11.2,6.7,11.2z"})}),D0e=null,Tx=({title:e="Spinner",desc:t="Hollow circle fading from transparent to gray",width:n="21",height:o="20",className:r,focusable:a="false"})=>(0,s.jsxs)("svg",{className:X()("i i-spinner",r),focusable:a,height:o,viewBox:"0 0 21 20",width:n,children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.jsx)("defs",{children:(0,s.jsxs)("radialGradient",{cx:"89.364%",cy:"24.157%",fx:"89.364%",fy:"24.157%",gradientTransform:"rotate(69.991 .842 .205) scale(1 .69785)",id:"spinner-radial-gradient",r:"45.607%",children:[(0,s.jsx)("stop",{offset:"0%",stopColor:"#C8C8C8",stopOpacity:"0"}),(0,s.jsx)("stop",{offset:"100%",stopColor:"#979797"})]})}),(0,s.jsx)("path",{d:"M74.5 3c-5.523 0-10 4.477-10 10s4.477 10 10 10 10-4.477 10-10a9.957 9.957 0 0 0-1.477-5.233 1 1 0 0 0-1.703 1.048A8 8 0 1 1 74.5 5a1 1 0 0 0 0-2z",fill:"url(#spinner-radial-gradient)",fillRule:"nonzero",transform:"rotate(-159 42.222 17.43)"})]});function _F(e){return(0,s.jsxs)(gn,{viewBox:"0 0 15 16",...e,children:[(0,s.jsx)("path",{d:"M8.69169169,1.65459164 C7.42998802,0.732912554 5.79691384,0.425404591 4.21164279,0.810071145 C2.01180284,1.34426767 0.429519485,3.32166778 0.449238273,5.51223961 C0.454317355,6.09008425 0.560978072,6.64511922 0.766531499,7.16185651 C0.884545458,7.45866364 1.19914976,7.66620336 1.53138146,7.66620336 C1.60756769,7.66620336 1.72289272,7.66620336 1.80027403,7.62903206 C2.21496611,7.48682371 2.41812939,7.05879065 2.26276924,6.65638325 C2.09725092,6.18836289 2.02345485,5.8315748 2.02345485,5.49928598 C2.02345485,4.55873965 2.44860388,3.66071502 3.19044858,3.03527987 C3.94334777,2.40027029 4.91763516,2.10993997 5.93524413,2.21694824 C6.90415367,2.31888769 7.79388929,2.81901053 8.37648985,3.58890684 C8.96058425,4.36077436 9.17300938,5.31962473 8.9590904,6.21962057 C8.94235931,6.29002074 8.92204298,6.35957612 8.89754388,6.42913149 C8.84436291,6.5969655 8.8709534,6.79042518 8.97074242,6.9599488 C9.07979329,7.14524206 9.26204269,7.2823816 9.47088259,7.33616734 C9.67285078,7.38770027 9.89573284,7.36517221 10.0812687,7.27308878 C10.2742738,7.17762614 10.4108115,7.01936655 10.4654863,6.83041248 C10.6062067,6.40012662 10.6773139,5.94111748 10.6773139,5.4666203 C10.6773139,3.96597018 9.95369412,2.57655233 8.69169169,1.65459164"}),(0,s.jsx)("path",{d:"M12.4033641,9.43002363 L7.46962051,8.60458861 L7.42312479,5.65704834 C7.42257778,4.87028142 6.91659487,4.17992696 6.16391111,3.93838024 C5.57177436,3.74839098 4.94490256,3.83320301 4.44493675,4.1709044 C3.94633846,4.50757465 3.64849231,5.04841246 3.64849231,5.61734909 L3.64849231,12.0692503 L3.27543248,11.4577787 C3.01177436,11.0154157 2.60233846,10.7096799 2.12288547,10.5967691 C1.65355214,10.4859205 1.14620171,10.5673813 0.72637265,10.8220752 C0.0398769231,11.2721719 -0.184396581,12.1996907 0.158577778,13.1957809 C0.165415385,13.210217 0.18237265,13.2532675 0.209176068,13.3208077 C0.319671795,13.5979291 0.578406838,14.2475532 0.952013675,15.0616455 L0.999603419,15.1523867 C1.20227009,15.608928 1.48534701,15.7290569 1.72739829,15.7290569 C1.84445812,15.7290569 1.95139829,15.7009581 2.03563761,15.6692503 C2.21204786,15.6022256 2.33922735,15.4880258 2.40322735,15.3387669 C2.47816752,15.1637293 2.46285128,14.9407433 2.36356923,14.7319356 C2.32992821,14.653826 1.5422359,12.8165757 1.50968889,12.7477465 C1.36828718,12.295072 1.41396239,11.9890784 1.49437265,11.9455124 C1.58845812,11.9011729 1.69403077,11.8869946 1.7730735,11.9009151 C1.9133812,11.9449968 1.98832137,12.0042879 2.05697094,12.1321504 L3.53963761,14.292666 C3.71905641,14.5633426 4.15146667,14.7654479 4.59946667,14.6061353 C4.93888547,14.4857487 5.12568889,14.2596692 5.12568889,13.9699162 L5.12568889,5.69416971 C5.12568889,5.5072739 5.23317607,5.33739205 5.39317607,5.27114071 C5.54469744,5.20927175 5.70797949,5.21984103 5.84117607,5.3018174 C5.97546667,5.38456713 6.05560342,5.52196778 6.05560342,5.66916434 L6.05560342,9.09129108 C6.05560342,9.4367261 6.34715897,9.7540623 6.69232137,9.78396563 L6.6942359,9.78396563 L12.1632274,10.6988528 C12.7868171,10.8042879 13.2397402,11.3141912 13.2397402,11.9112266 L13.2397402,15.0784017 C13.2397402,15.434406 13.5457915,15.72287 13.9235009,15.72287 C14.3009368,15.72287 14.6072615,15.434406 14.6072615,15.0784017 L14.6072615,11.9112266 C14.6072615,10.6893147 13.6809026,9.64579162 12.4033641,9.43002363"})]})}var UF,xm,GF;const H0e=({title:e="Remove",desc:t="Trash can",width:n="10",height:o="13",className:r=null,focusable:a="false"})=>UF("svg",{className:GF("i i-trash",r),focusable:a,height:o,viewBox:"0 0 10 13",width:n,children:[xm("title",{children:e}),xm("desc",{children:t}),xm("path",{d:"M9.28713712,12.0991694 C9.28713712,12.4960933 8.96564674,12.814808 8.57149855,12.814808 L1.42899128,12.814808 C1.03500637,12.814808 0.714169089,12.4960933 0.714169089,12.0991694 L0.714169089,4.9568254 L9.28713712,4.9568254 L9.28713712,12.0991694 L9.28713712,12.0991694 Z M10,3.33274903 L0,3.33274903 L0,2.62053925 C0,2.22508485 0.319367795,1.90571706 0.714169089,1.90571706 L2.85830911,1.90571706 L2.85830911,1.19220107 C2.85830911,0.798052883 3.17702381,0.4765625 3.5724782,0.4765625 L6.42948111,0.4765625 C6.82346602,0.4765625 7.1436502,0.798052883 7.1436502,1.19220107 L7.1436502,1.90571706 L9.28713712,1.90571706 C9.68046893,1.90571706 10,2.22524813 10,2.62053925 L10,3.33274903 L10,3.33274903 Z"})]}),$0e=null;var WF,ga;const V0e=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="16",role:a="img",title:i,width:c="14"})=>WF("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 14 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&ga("title",{children:i}),o&&ga("desc",{children:o}),ga("path",{clipRule:"evenodd",d:"M0.332031 4.00033C0.332031 3.63214 0.630508 3.33366 0.998698 3.33366H12.9987C13.3669 3.33366 13.6654 3.63214 13.6654 4.00033C13.6654 4.36852 13.3669 4.66699 12.9987 4.66699H0.998698C0.630508 4.66699 0.332031 4.36852 0.332031 4.00033Z",fill:"currentColor",fillRule:"evenodd"}),ga("path",{clipRule:"evenodd",d:"M5.66536 2.00033C5.48855 2.00033 5.31898 2.07056 5.19396 2.19559C5.06894 2.32061 4.9987 2.49018 4.9987 2.66699V3.33366H8.9987V2.66699C8.9987 2.49018 8.92846 2.32061 8.80344 2.19559C8.67841 2.07056 8.50884 2.00033 8.33203 2.00033H5.66536ZM10.332 3.33366V2.66699C10.332 2.13656 10.1213 1.62785 9.74624 1.25278C9.37117 0.877706 8.86246 0.666992 8.33203 0.666992H5.66536C5.13493 0.666992 4.62622 0.877706 4.25115 1.25278C3.87608 1.62785 3.66536 2.13656 3.66536 2.66699V3.33366H2.33203C1.96384 3.33366 1.66536 3.63214 1.66536 4.00033V13.3337C1.66536 13.8641 1.87608 14.3728 2.25115 14.7479C2.62622 15.1229 3.13493 15.3337 3.66536 15.3337H10.332C10.8625 15.3337 11.3712 15.1229 11.7462 14.7479C12.1213 14.3728 12.332 13.8641 12.332 13.3337V4.00033C12.332 3.63214 12.0336 3.33366 11.6654 3.33366H10.332ZM2.9987 4.66699V13.3337C2.9987 13.5105 3.06894 13.68 3.19396 13.8051C3.31898 13.9301 3.48855 14.0003 3.66536 14.0003H10.332C10.5088 14.0003 10.6784 13.9301 10.8034 13.8051C10.9285 13.68 10.9987 13.5105 10.9987 13.3337V4.66699H2.9987Z",fill:"currentColor",fillRule:"evenodd"}),ga("path",{clipRule:"evenodd",d:"M5.66536 6.66699C6.03355 6.66699 6.33203 6.96547 6.33203 7.33366V11.3337C6.33203 11.7018 6.03355 12.0003 5.66536 12.0003C5.29717 12.0003 4.9987 11.7018 4.9987 11.3337V7.33366C4.9987 6.96547 5.29717 6.66699 5.66536 6.66699Z",fill:"currentColor",fillRule:"evenodd"}),ga("path",{clipRule:"evenodd",d:"M8.33203 6.66699C8.70022 6.66699 8.9987 6.96547 8.9987 7.33366V11.3337C8.9987 11.7018 8.70022 12.0003 8.33203 12.0003C7.96384 12.0003 7.66536 11.7018 7.66536 11.3337V7.33366C7.66536 6.96547 7.96384 6.66699 8.33203 6.66699Z",fill:"currentColor",fillRule:"evenodd"})]}),z0e=null;var KF,Xl,QF;const _0e=({title:e="Upload",desc:t="Upload icon",width:n="15",height:o="15",className:r="",focusable:a="false"})=>KF("svg",{className:QF("i",r),focusable:a,height:o,viewBox:"0 0 15 15",width:n,children:[Xl("title",{children:e}),Xl("desc",{children:t}),Xl("polygon",{points:"6.52941176 3.52941176 6.52941176 9.70588235 8.29411765 9.70588235 8.29411765 3.52941176 10.4117647 3.52941176 7.41176471 0 4.41176471 3.52941176"}),Xl("path",{d:"M14.0625,14.1176471 L0.9375,14.1176471 C0.375,14.1176471 0,13.7647059 0,13.2352941 L0,5.29411765 C0,4.76470588 0.375,4.41176471 0.9375,4.41176471 L3.75,4.41176471 L3.75,6.17647059 L1.875,6.17647059 L1.875,12.3529412 L13.125,12.3529412 L13.125,6.17647059 L11.25,6.17647059 L11.25,4.41176471 L14.0625,4.41176471 C14.625,4.41176471 15,4.76470588 15,5.29411765 L15,13.2352941 C15,13.7647059 14.625,14.1176471 14.0625,14.1176471"})]}),U0e=null;var YF,Oi;const G0e=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="14",role:a="img",title:i,width:c="14"})=>YF("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 14 14",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Oi("title",{children:i}),o&&Oi("desc",{children:o}),Oi("path",{clipRule:"evenodd",d:"M1.00065 8.33301C1.36884 8.33301 1.66732 8.63148 1.66732 8.99967V11.6663C1.66732 11.8432 1.73756 12.0127 1.86258 12.1377C1.9876 12.2628 2.15717 12.333 2.33398 12.333H11.6673C11.8441 12.333 12.0137 12.2628 12.1387 12.1377C12.2637 12.0127 12.334 11.8432 12.334 11.6663V8.99967C12.334 8.63148 12.6325 8.33301 13.0007 8.33301C13.3688 8.33301 13.6673 8.63148 13.6673 8.99967V11.6663C13.6673 12.1968 13.4566 12.7055 13.0815 13.0806C12.7065 13.4556 12.1978 13.6663 11.6673 13.6663H2.33398C1.80355 13.6663 1.29484 13.4556 0.919771 13.0806C0.544698 12.7055 0.333984 12.1968 0.333984 11.6663V8.99967C0.333984 8.63148 0.632461 8.33301 1.00065 8.33301Z",fill:"currentColor",fillRule:"evenodd"}),Oi("path",{clipRule:"evenodd",d:"M6.52925 0.52827C6.7896 0.26792 7.21171 0.26792 7.47206 0.52827L10.8054 3.8616C11.0657 4.12195 11.0657 4.54406 10.8054 4.80441C10.545 5.06476 10.1229 5.06476 9.86258 4.80441L7.00065 1.94248L4.13872 4.80441C3.87837 5.06476 3.45626 5.06476 3.19591 4.80441C2.93556 4.54406 2.93556 4.12195 3.19591 3.8616L6.52925 0.52827Z",fill:"currentColor",fillRule:"evenodd"}),Oi("path",{clipRule:"evenodd",d:"M7.00065 0.333008C7.36884 0.333008 7.66732 0.631485 7.66732 0.999674V8.99967C7.66732 9.36786 7.36884 9.66634 7.00065 9.66634C6.63246 9.66634 6.33398 9.36786 6.33398 8.99967V0.999674C6.33398 0.631485 6.63246 0.333008 7.00065 0.333008Z",fill:"currentColor",fillRule:"evenodd"})]}),W0e=null;var ZF,ql,XF;const K0e=({title:e="UploadXml",desc:t="UploadXml",width:n="18",height:o="21",className:r,focusable:a="false"})=>ZF("svg",{className:XF("i i-uploadXml",r),focusable:a,height:o,viewBox:"0 0 18 21",width:n,children:[ql("title",{children:e}),ql("desc",{children:t}),ql("path",{d:"M15.88,1.2H1.6A.59.59,0,0,0,1,1.79V19.21a.59.59,0,0,0,.59.59H15.88a.59.59,0,0,0,.59-.59V1.79A.59.59,0,0,0,15.88,1.2Zm-.59,1.19V18.61H2.19V2.39Z"}),ql("path",{d:"M5.14,10.13a.59.59,0,0,0,.84,0L8.13,8v6.48a.59.59,0,0,0,1.19,0V8l2.15,2.15a.59.59,0,0,0,.84-.84L9.14,6.12a.6.6,0,0,0-.84,0L5.14,9.29A.59.59,0,0,0,5.14,10.13Z"})]}),Q0e=null;function qF(e){return(0,s.jsx)(gn,{viewBox:"0 0 16 12",...e,children:(0,s.jsx)("g",{transform:"translate(-1 -2)",children:(0,s.jsx)("path",{d:"M11,14 L2,14 C1.4,14 1,13.6 1,13 L1,3 C1,2.4 1.4,2 2,2 L11,2 C11.6,2 12,2.4 12,3 L12,4.5 L15.6,3 C16.3,2.8 17,3.3 17,4 L17,12 C17,12.7 16.3,13.2 15.6,12.9 L12,11.5 L12,13 C12,13.6 11.6,14 11,14 L11,14 L11,14 Z M3,12 L10,12 L10,10 C10,9.3 10.7,8.8 11.4,9.1 L15,10.6 L15,5.6 L11.4,7.1 C10.7,7.2 10,6.7 10,6 L10,4 L3,4 L3,12 L3,12 L3,12 Z"})})})}var kx,Jl,JF;const Y0e=({title:e="Visible",desc:t="Eye",width:n="16",height:o="12",className:r=null,focusable:a="false"})=>kx("svg",{className:JF("i i-visible",r),focusable:a,height:o,viewBox:"0 0 16 12",width:n,children:[Jl("title",{children:e}),Jl("desc",{children:t}),kx("g",{children:[Jl("path",{d:"M8 2c2.84 0 5.036 2.835 5.818 4-.784 1.166-2.98 4-5.818 4-2.84 0-5.038-2.838-5.819-4.001C2.958 4.835 5.146 2 8.001 2m0 10c4.706 0 7.743-5.284 7.87-5.508a1 1 0 0 0 .001-.98C15.746 5.287 12.732 0 8 0 3.245 0 .251 5.289.126 5.514a.998.998 0 0 0 .002.975C.254 6.713 3.27 12 8 12"}),Jl("path",{d:"M8 4a2 2 0 1 1 .001 3.999A2 2 0 0 1 8 4"})]})]}),Z0e=null,eH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="20",role:a="img",title:i="",style:c,width:l="20"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:X()("i i-xMarkFilled",n),focusable:"false",height:r,role:a,style:c,viewBox:"0 0 20 20",width:l,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{d:"M10 9.08L6.904 5.986a.65.65 0 1 0-.92.92L9.082 10l-3.096 3.096a.65.65 0 0 0 .92.92L10 10.918l3.096 3.096a.65.65 0 0 0 .92-.92L10.918 10l3.096-3.096a.65.65 0 1 0-.92-.92L10 9.082zM10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10z"})]});var tH=p(39475),nH=p.n(tH),sH=p(28731),oH=p.n(sH);const rH=Lt()(nH()({}),Z1()(["first_name","last_name"]),Qr()(" "),oH()),aH=({className:e,decorative:t,size:n,...o})=>{const r=Hs()(["avatars","medium"],o),a=t?"":rH(o)||"Unknown User";return r?(0,s.jsx)("img",{alt:a,className:e||"user-avatar",src:r,style:{height:n,width:n}}):(0,s.jsx)(vm,{decorative:t,height:n,title:a,width:n})},iH=`${Ne("CDN_URI")}/assets/rise/assets/trophy.svg`,ed=V("cover"),cH=CD,lH=aH;function J0e(){const{certificateDownload:e,riseComCurrentUser:t}=ce(),n=Ce(),o=yj(),a=Sh()?.quizPassed??!0;return!(o&&a&&!bg())||window.viewType==="preview"?null:(0,s.jsxs)("div",{className:ed("completed-info"),children:[(0,s.jsxs)("div",{className:ed("completed-info-avatar"),children:[(0,s.jsx)(lH,{...t??{},decorative:!0}),(0,s.jsx)("img",{alt:"",className:ed("completed-info-trophy"),src:iH})]}),(0,s.jsxs)("div",{className:ed("completed-info-label"),children:[(0,s.jsx)("span",{"aria-hidden":"true",children:n?.coverCompleted||"Completed"}),(0,s.jsx)("span",{className:"visually-hidden",children:n?.a11yCoverCourseCompleted||"Course Completed"})]}),e&&(0,s.jsx)(cH,{})]})}const bm=V("cover");function dH(e,t,n){return e===1?t:n}function uH(){const e=SC(),t=Ce(),n=dH(e,t?.coverLesson||"Lesson",t?.coverLessons||"Lessons");return(0,s.jsxs)("li",{className:bm("num-lessons"),role:"listitem",children:[(0,s.jsx)("span",{className:bm("num-lessons-value"),children:e}),"\xA0",(0,s.jsx)("span",{className:bm("num-lessons-units"),children:n})]})}var hH=p(39031),hs=p.n(hH);const mH=36e5,ym=V("cover");function fH(e){return Math.round(10*e)/10}function Ix(e,t,n){return e===1?t:n}function pH(){const{showTimeToComplete:e,timeToComplete:t}=ce(),n=Ce();if(!e)return null;const o=Number(t)>=mH,r=o?fH(hs().duration(t).asHours()):hs().duration(t).asMinutes(),a=o?Ix(r,n?.coverHour||"Hour",n?.coverHours||"Hours"):Ix(r,n?.coverMinute||"Minute",n?.coverMinutes||"Minutes");return(0,s.jsxs)("li",{className:ym("time-to-complete"),role:"listitem",children:[(0,s.jsx)("span",{className:ym("time-to-complete-value"),children:r}),"\xA0",(0,s.jsx)("span",{className:ym("time-to-complete-units"),children:a})]})}const Sm=V("cover");function Ex(){const e=Ce();return null}const Lm=e=>{if(!e)return"";const t=hs()(e),n=hs()(),o=hs()(n).add(24,"hours");return t.isBefore(n)?"Overdue":t.isBefore(o)?`Due in ${n.to(t,!0)}`:`Due ${t.format("MMM D")}`},gH=e=>hs()(e).isSameOrBefore(hs()().add(3,"d"),"days"),vH=V("cover");function CH(e){return typeof e=="object"&&e!=null}function xH(e){return e==null||typeof e=="string"||typeof e=="number"||e instanceof Date}function bH(e){if(!CH(e))return;const t=e.dueAt;return xH(t)?t:void 0}function ehe(){const e=fr(),t=bH(e),n=A2(e?.themeId??e?.theme?.themeId),o=JN(),r=Sh(),a=r==null||r.quizPassed||r.outOfAttempts,i=gH(t),c=n===te.RISE_CLASSIC?i?"brand--background":"brand--color":"",l=vH("due-date",{urgent:i}).mix(c);return!t||o&&a?null:(0,s.jsx)("div",{className:l,children:Lm(t)})}const yH=e=>{const t=e.indexOf("-");return t===-1?e:e.slice(0,t)},the=(e,t)=>{const n=yH(e);return t.find(({iso639Code:o})=>o===e)||t.find(({iso639Code:o})=>o===n)||t.find(({defaultId:o,defaultSet:r})=>r&&o===1)},va=({percent:e,label:t,isRTL:n})=>{if(t.includes("%")){const o=n?`%${e}`:`${e}%`;return t.replace("%",o)}return`${e} ${t}`},Nx=({failed:e,complete:t})=>{const n=Ce();return(0,s.jsxs)("span",{className:"visually-hidden-always",children:[e?n?.a11yCoverRequirementFailed||"Requirement failed":t?n?.a11yCoverRequirementComplete||"Requirement complete":n?.a11yCoverRequirementIncomplete||"Requirement incomplete",": "]})},ms=V("cover");function she(){const e=ce(),t=Ce(),{trackingCompletionPercentage:n,trackingQuizId:o}=e;return n==null&&!o?null:(0,s.jsxs)("section",{className:ms("requirements-section"),children:[(0,s.jsx)("h2",{className:ms("requirements-title"),children:t?.coverCourseRequirements||"Course Requirements"}),(0,s.jsxs)("ul",{className:ms("requirements-list"),children:[(0,s.jsx)(SH,{}),(0,s.jsx)(TH,{})]})]})}function SH(){const{trackingCompletionPercentage:e}=ce(),t=SC(),n=na(),o=Ce();if(e==null)return null;const r=Math.ceil(e/100*t),a=r===t,i=n!=null&&n>=e,c=i?oD:rD;return(0,s.jsxs)("li",{className:ms("lesson-requirement"),role:"listitem",children:[(0,s.jsx)(c,{"aria-hidden":"true",className:ms("lesson-requirement-icon",{complete:i}).toString()}),(0,s.jsxs)("span",{className:ms("lesson-requirement-text"),children:[(0,s.jsx)(Nx,{complete:i}),a?o?.coverCompleteAllLessons||"Complete all lessons in this course":[o?.coverCompleteLessonsName||"Complete",r,o?.coverCompleteLessonsPreposition||"of",t,o?.coverCompleteLessonsInCourse||"lessons in this course"].join(" ")]})]})}const LH={passed:cD,failed:iD,requirement:lD};function TH(){const e=Ce(),t=qN(),n=Sh(),o=rs(),r=ct(t?.title),a=t?.settings?.passingScore;if(!r||!n)return null;const{outOfAttempts:i,quizPassed:c}=n,l=!c&&i;let d="requirement";c?d="passed":l&&(d="failed");const h=LH[d],m=a!=null?va({percent:Number(a),label:e?.coverQuizPercentOrHigher||"% or higher",isRTL:o}):null;return(0,s.jsxs)("li",{className:ms("quiz-requirement"),role:"listitem",children:[(0,s.jsx)(h,{"aria-hidden":"true",className:ms("quiz-requirement-icon",{type:d}).toString()}),(0,s.jsxs)("span",{className:ms("quiz-requirement-text"),children:[(0,s.jsx)(Nx,{complete:c,failed:l}),r,a!=null&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":"true",className:ms("quiz-requirement-seperator"),children:"\xA0|\xA0"}),e?.coverQuizScoreOf||"Score of"," ",m]}),l&&(0,s.jsx)("div",{className:ms("quiz-requirement-no-attempts"),children:e?.coverNoAttemptsRemaining||"No attempts remaining"})]})]})}function Tm(e,t){const n=(0,u.useMemo)(()=>matchMedia(`(${e}: ${t*.0625}em)`),[e,t]),[o,r]=(0,u.useState)(n.matches);return(0,u.useEffect)(()=>{const a=n.addEventListener??n.addListener,i=n.removeEventListener??n.removeListener;return a.call(n,"change",c),()=>i.call(n,"change",c);function c(){r(n.matches)}},[n]),o}const kH="matches";function IH(e,t,n,o="withPxToEmMedia"){return r=>{function a(i){const c=Tm(e,t);return(0,s.jsx)(r,{...i,[n??kH]:c})}return a.displayName=`${o}(${r.displayName||r.name})`,a}}function kt(e){return Tm("max-width",e-1)}function ohe(e){return Tm("min-width",e)}function EH(e,t,n){return IH("min-width",e,t,n)}const Bi=Jn()("partner-content-course-author__"),NH=({partnerContentAuthors:e,darkText:t,isImage:n,learn:o,lesson:r,isOnePage:a,selectedContentId:i})=>{const c=pr()(Ze()("id",i),e),l=Hs()(["data","authors"],c),h=(r?l:e).filter(g=>g.name),m=X()(Bi("author-container"),{[Bi("author-container-padding-top")]:t}),f=X()({[Bi("gray-text")]:!o&&!a}),v=X()(Bi("author-image")),C=g=>`url(${bi({width:"76",height:"76",imageKey:g.image})})`;return(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"Authors"}),(0,s.jsx)("ol",{className:m,"data-testid":"partner-content-course-author-container",role:"list",children:h.map(g=>(0,s.jsxs)("li",{className:Bi("author"),"data-testid":"partner-content-course-author",role:"listitem",children:[(0,s.jsx)("div",{"aria-hidden":"true",className:v,"data-testid":"partner-content-course-author-image",disabled:n,style:{backgroundImage:C(g)}}),(0,s.jsx)("span",{className:f,children:g.name})]},g.name))})]})},Ca=V("cover"),ahe=()=>{const e=mh();if(e==null)return null;const{avatar:t,authorName:n,title:o}=e;return(0,s.jsxs)("div",{className:Ca("author-with-title"),children:[(0,s.jsx)(jx,{avatar:t}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:Ca("author-name"),children:n}),(0,s.jsx)("div",{className:Ca("author-title"),children:o})]})]})},jx=({avatar:e})=>{const t=Ca("header-content-authors-avatar");return e?(0,s.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",style:{backgroundImage:`url(${mt(e)})`}}):(0,s.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",children:(0,s.jsx)(vm,{decorative:!0})})},jH=({className:e})=>{const{partnerContentId:t,selectedAuthorId:n,theme:o,themeId:r}=ce(),{coverPageType:a}=o??{},{authorName:i,avatar:c}=mh()??{},l=Ce(),d=XO(),h=!!t&&d!=null,f=kt(768)&&MN(r,a),v=a===de.LEFT_OVERLAY||a===de.CENTERED_OVERLAY||f;if(n==="none")return null;const C=i||"Unknown User",g=Ca("header-content-authors").mix(e),x=Ca("header-content-authors-name");return h?(0,s.jsx)("div",{className:g,"data-testid":"cover-authors",children:(0,s.jsx)(wH,{isImage:v,learn:!0,partnerContentAuthors:d})}):(0,s.jsxs)("div",{className:g,"data-testid":"cover-authors",children:[(0,s.jsx)(jx,{avatar:c}),(0,s.jsxs)("div",{className:x,"data-testid":"cover-header-content-authors-name",children:[(0,s.jsx)("span",{className:"visually-hidden-always",children:l?.a11yAuthorPrefix}),(0,s.jsx)("span",{children:C})]})]})},wH=NH,Is=jH,AH=V("cover");function RH({className:e="",type:t,...n}){const o=ut(),r=X()(AH("details-content-heading",{type:t}).toString(),e,{"brand--ui":o===te.RISE_CLASSIC});return(0,s.jsx)("header",{...n,className:r})}const PH=V("cover");function MH({children:e,title:t,type:n}){const o=ce(),{description:r,media:a,partnerContentId:i}=o??{},c=!!i,d=(a&&"image"in a?a.image?.key:null)!=null,m=n==="outline"?r?!d&&!c?"outline-no-logo":c&&!d?"outline-has-partner-content":c&&d?"outline-has-pc-and-logo":"outline":"outline-no-description":n;return(0,s.jsxs)("section",{className:PH("details-content-section",{type:m}),children:[t&&(0,s.jsx)(RH,{type:n,children:(0,s.jsx)("h2",{children:t})}),e]})}const OH=V("cover"),BH=({children:e,type:t})=>(0,s.jsx)("section",{className:OH("details-content-section",{type:t}),children:e});function td(e){return ut()===te.HORIZON?(0,s.jsx)(MH,{...e}):(0,s.jsx)(BH,{...e})}const km=e=>Fn(e)===Te.LIGHT;var ihe;const sn=Jn()("partner-content-book-info__"),wx=e=>{const{authors:t,backgroundColor:n,bookImage:o,bookTitle:r,buyLink:a,block:i,trackingInfo:c}=e,d=Fe()?.publishedAt,h=L2(),m=t.filter(E=>!Nt()(E.name)),f=ft()(E=>E.name,m),v=f.length>1?Qr()(" & ",f):f[0],C=v.slice(-1)==="s"?"":"s",g=km(n),x=X()({[sn("book-image-block")]:i&&!g},{[sn("book-image-block")&&sn("dark-theme-book-image")]:i&&g},{[sn("book-image-course")]:!i}),b=sn(i?"flex-block":"flex-course"),L=sn(i?"image-container-block":"image-container-course"),S=X()(sn("small-text"),{[sn("dark-theme")]:g}),y=X()(sn("black-text"),{[sn("dark-theme")]:g}),T=X()(sn("button"),{[sn("dark-theme-button")]:g}),k=bi({height:"210",width:"140",imageKey:o}),I=(0,u.useCallback)(()=>{},[d,h,c]);return(0,s.jsxs)("section",{className:b,children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"Book Info"}),(0,s.jsx)("div",{"aria-hidden":"true",className:L,children:o?(0,s.jsx)("img",{alt:"",className:x,src:k}):(0,s.jsx)("div",{className:x})}),(0,s.jsxs)("div",{className:sn("text-container"),children:[(0,s.jsxs)("p",{className:S,children:["From ",v,"'",C]}),(0,s.jsx)("p",{className:y,children:r}),(0,s.jsx)("a",{className:T,href:a,onClick:I,rel:"noopener noreferrer",target:"_blank",children:"Buy the book"})]})]})};var lhe;const zn=Jn()("partner-content-partner-info__"),Ax=({backgroundColor:e,block:t,link:n,trackingInfo:o})=>{const a=Fe()?.publishedAt,i=L2(),c=t?LN():TN(),l=zn(t?"nbic-logo-light-bulb":"nbic-logo"),d=zn(t?"block-logo-container":"logo-container"),h=km(e),m=X()(zn("small-text"),{[zn("dark-theme")]:h}),f=X()(zn("black-text"),{[zn("dark-theme")]:h}),v=X()(zn("button"),{[zn("dark-theme-button")]:h}),C=(0,u.useCallback)(()=>{},[a,i,o]);return(0,s.jsxs)("section",{className:zn("flex"),children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"Partner Info"}),(0,s.jsx)("div",{"aria-hidden":"true",className:d,children:(0,s.jsx)("img",{alt:"",className:l,src:c})}),(0,s.jsxs)("div",{className:zn("text-container"),children:[(0,s.jsx)("p",{className:m,children:"In partnership with"}),(0,s.jsx)("p",{className:f,children:"Next Big Idea Club"}),(0,s.jsx)("a",{className:v,href:n,onClick:C,rel:"noopener noreferrer",target:"_blank",children:"Learn more"})]})]})},xa=Jn()("partner-content-author-card__"),Rx=e=>{const{partnerContent:t}=e,n=Fe(),{id:o,tenantId:r}=n??{},{data:a,type:i}=t,{authors:c,bookImage:l,bookTitle:d,buyLink:h,internalId:m,nbicLink:f}=a,v=c.filter(L=>L.name),C={courseId:o,partnerContentId:t.id,partnerContentInternalId:m,tenantId:r,contentSubtype:i},g=X()(xa("flex"),xa("author-container")),x=L=>bi({width:"122",height:"122",imageKey:L}),b=(L,S)=>(0,s.jsx)("div",{"aria-hidden":"true",className:xa("image-container"),children:L?(0,s.jsx)("img",{alt:S,className:xa("author-image"),src:x(L)}):(0,s.jsx)("div",{className:xa("author-image")})});return(0,s.jsxs)("ol",{className:"partner-content-author-card","data-testid":"partner-content-author-card",role:"list",children:[(0,s.jsx)("li",{role:"listitem",children:(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"Authors"}),v.map(L=>(0,s.jsxs)("li",{className:g,children:[b(L.image,L.name),(0,s.jsx)("p",{className:xa("author-name-text"),children:L.name})]},L.name))]})}),(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(wx,{authors:c,bookImage:l,bookTitle:d,buyLink:h,trackingInfo:C})}),(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(Ax,{link:f,trackingInfo:C})})]})},DH=V("cover");function FH({hasLogo:e}){const t=Ei();if(!t)return null;const n=DH("details-content-aside",{logo:e});return(0,s.jsx)("div",{className:n,children:(0,s.jsx)(td,{type:"partner-content",children:(0,s.jsx)(Rx,{partnerContent:t})})})}const HH=V("cover"),$H=({coursePartnerContent:e})=>(0,s.jsx)(td,{type:"partner-content",children:(0,s.jsx)(Rx,{partnerContent:e})}),VH=({hasLogo:e})=>{const t=Ei(),n=t!=null,o=HH("details-content-aside",{logo:e});return(0,s.jsxs)("div",{className:o,children:[!1,t&&(0,s.jsx)($H,{coursePartnerContent:t}),!1,!1]})},zH=e=>ut()===te.HORIZON?(0,s.jsx)(FH,{...e}):(0,s.jsx)(VH,{...e});var _H=p(21135),Di=p.n(_H);const Px=Di()(async()=>(await p.e("math").then(p.bind(p,79078))).browserAdaptor(),{promise:!0}),Mx=Di()(async()=>{const[{TeX:e},{AllPackages:t}]=await Promise.all([p.e("math").then(p.t.bind(p,33710,23)),p.e("math").then(p.bind(p,18415))]);return new e({packages:t})}),Ox=Di()(async()=>{const e=await p.e("math").then(p.t.bind(p,83390,23));return new e.SVG({fontCache:"local"})},{promise:!0}),Bx=Di()(async()=>{const[e,t,n,{RegisterHTMLHandler:o},{mathjax:r}]=await Promise.all([Px(),Mx(),Ox(),p.e("math").then(p.bind(p,81991)),p.e("math").then(p.bind(p,55633))]);return o(e),r.document(document,{InputJax:t,OutputJax:n})},{promise:!0}),UH=Di()(async e=>{const t=new CSSStyleSheet;e.adoptedStyleSheets.push(t);const[n,o]=await Promise.all([Ox(),Bx()]),r=n.styleSheet(o);r instanceof HTMLStyleElement&&await t.replace(r.innerText)},{promise:!0});class GH extends HTMLElement{static observedAttributes=["long-description","short-description","tex"];_ready;_anchor=this;_renderController;constructor(){super(),this._ready=UH(this.ownerDocument)}get longDescription(){return this.getAttribute("long-description")??null}set longDescription(t){t==null?this.removeAttribute("long-description"):this.setAttribute("long-description",t)}get shortDescription(){return this.getAttribute("short-description")??null}set shortDescription(t){t==null?this.removeAttribute("short-description"):this.setAttribute("short-description",t)}get tex(){return this.getAttribute("tex")??""}set tex(t){this.setAttribute("tex",t)}disconnectedCallback(){this._renderController?.abort()}attributeChangedCallback(t){t==="tex"?this._renderTex():this._renderAria()}async _renderTex(){this._renderController?.abort();const t=this._renderController=new AbortController,[n,o,r]=await Promise.all([Bx(),Px(),Mx(),this._ready]);if(t.signal.aborted)return;r.reset();const{tex:a}=this,i=a.includes("begin{")?a:String.raw`\begin{align*}${a}\end{align*}`,c=n.convert(i),l=o.firstChild(c),d=document.evaluate("//@data-mjx-error",l,null,XPathResult.STRING_TYPE).stringValue;if(d.length>0){let h=d;if(d===String.raw`Missing \begin{align*} or extra \end{align*}`){const m=n.convert(a),f=o.firstChild(m);h=document.evaluate("//@data-mjx-error",f,null,XPathResult.STRING_TYPE).stringValue??"An error occured"}this.dispatchEvent(new WH("matherror",{bubbles:!1,composed:!1,detail:{errorMessage:h}})),this._anchor.replaceChildren()}else this._anchor.replaceChildren(l);await this._renderAria()}async _renderAria(){if(await this._ready,this._renderController?.signal.aborted||this.firstElementChild==null)return;const t=[this.shortDescription,this.longDescription].filter(n=>(n?.length??0)>0).join(`

`);this.firstElementChild.ariaLabel=t.trim().length===0?null:t}}customElements.define("rise-math",GH);class WH extends CustomEvent{}var Es=p(55116);function Im(e){if(e==null)return{value:e};let t;if(typeof e=="string"?t=e:t=e.innerHTML,!t.includes("data-editor-id"))return{value:e};const n=t.match(/^<[^>]+data-editor-id=["']([^"']+)["'][^>]*>/);if(n){const o=n[1],r=t.match(/^<[^>]*>(.*)<\/[^>]*>$/s),a=r?r[1]:t;return{editorId:o,value:typeof e=="string"?a:e}}return{value:e}}const Dx=(e="")=>e.split(".").slice(-2).join("."),Fx=Me()(Dx,Ne),KH=e=>e.includes("#/lessons/"),_n=e=>{if(!e||QH(e)||KH(e))return!1;e.slice(0,2)==="//"&&(e=`https:${e}`);try{const{hostname:t}=new URL(e),n=Dx(t);return n!==Fx("ARTICULATE_DOMAIN")&&n!==Fx("RISE_DOMAIN")}catch{return!1}},QH=e=>e?e.slice(0,7)==="mailto:":!1;var qs=p(51506);const Em=V("external-link-disabled-popover");function nd(e={}){const{delay:t=200}=e,n=u.useRef(new Map),o=u.useCallback(c=>{const l=n.current.get(c);l&&clearTimeout(l);const d=setTimeout(()=>{const h=`trial-external-link-popover-${c}`;qs.ArcPopover.handlePopover(h,"show"),n.current.delete(c)},t);n.current.set(c,d)},[t]),r=u.useCallback(c=>{const l=n.current.get(c);l&&clearTimeout(l);const d=setTimeout(()=>{const h=`trial-external-link-popover-${c}`;qs.ArcPopover.handlePopover(h,"hide"),n.current.delete(c)},t);n.current.set(c,d)},[t]),a=u.useCallback(c=>{const l=`trial-external-link-popover-${c}`;qs.ArcPopover.handlePopover(l,"show")},[]),i=u.useCallback(c=>{const l=`trial-external-link-popover-${c}`;qs.ArcPopover.handlePopover(l,"hide")},[]);return u.useEffect(()=>{const c=n.current;return()=>{c.forEach(l=>clearTimeout(l)),c.clear()}},[]),{handleMouseEnter:o,handleMouseLeave:r,handleFocus:a,handleBlur:i}}function YH(e){return t=>{const{handleMouseEnter:n,handleMouseLeave:o,handleFocus:r,handleBlur:a}=nd(),i=u.useId();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e,{...t,attachmentId:i,onLinkBlur:a,onLinkFocus:r,onLinkMouseEnter:n,onLinkMouseLeave:o}),t.externalLinksDisabled&&(0,s.jsx)(sd,{anchorId:i})]})}}const sd=({anchorId:e})=>{const t=`trial-external-link-popover-${e}`;return u.useEffect(()=>{const n=o=>{o.key==="Escape"&&qs.ArcPopover.handlePopover(t,"hide")};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[t]),(0,s.jsx)(qs.ArcPopover,{alternateAnchorId:e,anchorAt:"top-center",boundary:"flip",className:Em(),hasTail:!0,headerSlot:(0,s.jsx)("div",{className:Em("header"),children:"Subscribe to unlock full access"}),hidePopoverButton:!0,id:t,offset:8,popover:"manual",variant:"common",children:(0,s.jsx)("div",{className:Em("content"),children:"To protect learners from phishing, scams, or malicious redirects, external links are disabled when sharing with Quick Share during your trial."})})},ZH=({allowTabNavigation:e=!0,className:t="","data-testid":n,id:o,ref:r,tagName:a="div",value:i})=>{const c=Fe(),l=c&&"externalLinksDisabled"in c?c.externalLinksDisabled:!1,d=wt(),h=(0,u.useRef)(null),m=Re(i),[f,v]=(0,u.useState)([]),{handleMouseEnter:C,handleMouseLeave:g,handleFocus:x,handleBlur:b}=nd(),{currentLocale:L}=nt(),S=os(),y=(0,u.useMemo)(()=>{const T=Yu(m),k=Array.prototype.concat(r$,a$,e$,qH,JH(L,S),l?t$:[],e?s$:n$,o$(d?.a11yNoticeLinkNewTab));return XH(k,T)},[e,L,S,l,d,m]);return(0,u.useLayoutEffect)(()=>{if(!l||!h.current){v([]);return}const T=[];h.current.querySelectorAll("[data-tooltip-target]").forEach((I,E)=>{const w=I.nextElementSibling;if(w?.hasAttribute("data-external")){const A=w.getAttribute("data-external-text")||"",N=w.getAttribute("data-external-id")||`link-${E}`;T.push({placeholder:I,text:A,id:N})}}),v(T)},[y,l]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{"aria-hidden":e?void 0:!0,className:`${t} brand--linkColor`,"data-l10n-id":jt(i),"data-testid":n,id:o,ref:T=>{h.current=T,typeof r=="function"?r(T):r&&(r.current=T)},children:(0,u.createElement)(a,{className:"fr-view rise-tiptap",dangerouslySetInnerHTML:(0,u.useMemo)(()=>({__html:y}),[y])})}),f.map(({placeholder:T,text:k,id:I})=>(0,s.jsxs)(u.Fragment,{children:[(0,Es.createPortal)((0,s.jsx)("span",{id:I,onBlur:()=>b(I),onFocus:()=>x(I),onMouseEnter:()=>C(I),onMouseLeave:()=>g(I),role:"button",style:{cursor:"pointer",color:"var(--arc-color-text-disabled)",textDecoration:"underline"},tabIndex:0,children:k}),T),(0,s.jsx)(sd,{anchorId:I})]},I))]})};function XH(e,t){const n=document.createElement("div");n.innerHTML=t;for(const o of e)o(n);return n.innerHTML}const Hx=e=>e.getAttribute("data-link-type")==="lesson"?!0:(e.getAttribute("href")??"").startsWith("#/lessons/");function qH(e){for(const t of e.querySelectorAll("a")){Hx(t)?t.removeAttribute("target"):t.setAttribute("target","_blank");const o=new Set((t.getAttribute("rel")??"").split(/\s+/));o.delete("opener"),o.add("noopener"),o.add("noreferrer"),o.add("nofollow"),t.setAttribute("rel",Array.from(o).join(" "))}}function JH(e,t){return n=>{if(!(!e||e===t)){for(const o of n.querySelectorAll("a"))if(Hx(o)){const r=o.getAttribute("href");if(r){const a=r.includes("?")?"&":"?";o.setAttribute("href",`${r}${a}locale=${encodeURIComponent(e)}`)}}}}}function e$(e){for(const t of e.querySelectorAll("table"))if(!t.parentElement.classList.contains("rise-table-wrap")){const n=document.createElement("div");n.className="rise-table-wrap",t.parentNode.replaceChild(n,t),n.appendChild(t)}}function t$(e){let t=0;const n=[];for(const o of e.querySelectorAll("a"))if(_n(o.href)){const r=o.textContent||"",a=`external-link-anchor-${Date.now()}-${t++}`;o.removeAttribute("href"),o.removeAttribute("rel"),o.removeAttribute("target"),o.setAttribute("data-external",""),o.setAttribute("data-external-text",r),o.setAttribute("data-external-id",a),o.setAttribute("role","button"),o.style.display="none";const i=document.createElement("span");i.setAttribute("data-tooltip-target",""),o.parentNode?.insertBefore(i,o),n.push({placeholder:i,text:r,id:a})}return n}function n$(e){for(const t of e.querySelectorAll("a"))t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1")}function s$(e){for(const t of e.querySelectorAll("a"))t.removeAttribute("aria-hidden"),t.hasAttribute("data-external")?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}function o$(e="(opens in a new tab)"){return t=>{for(const n of t.querySelectorAll('a[target="_blank"]')){const o=document.createElement("span");o.className="visually-hidden-always",o.textContent=e,n.appendChild(o)}}}function r$(e){return Im(e).value}function a$(e){for(const t of e.querySelectorAll("rise-math")){const{shortDescription:n,longDescription:o}=t,r=t.querySelector('[slot="short-description"]'),a=t.querySelector('[slot="long-description"]');n==null&&r!=null&&(t.shortDescription=r.textContent),o==null&&a!=null&&(t.longDescription=a.textContent)}return e}const Ie=ZH,Nm=e=>e==="<p><br></p>"?"":e,i$=()=>kt(1200),$x=()=>kt(480),c$=V("cover"),l$="MMMM D, YYYY";function Vx({format:e=l$}){const{publishedAt:t}=ce(),n=Ce(),o=c$("details-content-published-at");if(!t)return null;const r=hs()(t);return r.isValid()?(0,s.jsxs)("div",{className:o,children:[n?.coverPublished||"Published"," ",r.format(e)]}):null}const zx=V("cover");function d$(){const e=ce(),t=i$(),n=Re(e?.description);if(!n)return null;const o=ha("description"),r=(0,Gt.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":o};return(0,s.jsx)("div",{...r,children:(0,s.jsxs)("section",{className:zx("details-content-section"),children:[t?(0,s.jsx)(Ex,{}):(0,s.jsx)(Vx,{}),(0,s.jsx)(Ie,{className:zx("details-content-description"),value:Nm(n)},"text")]})})}const u$=()=>kt(1200),od=()=>kt(480),_x=V("cover");function h$(){const e=ce(),t=u$(),n=Re(e?.description);if(!n)return null;const o=ha("description"),r=(0,Gt.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":o};return(0,s.jsx)("div",{...r,children:(0,s.jsxs)("section",{className:_x("details-content-section"),children:[t&&(0,s.jsx)(Ex,{}),(0,s.jsx)(Ie,{className:_x("details-content-description"),value:Nm(n)},"text")]})})}const m$=V("cover"),f$=()=>{const e=ce(),{navigation:t}=e,n=Re(e.description),o=t?"description":"description-no-outline";if(!n)return null;const r=ha("description"),a=(0,Gt.uW)(e.description)?{"data-l10n-id":e.description.l10nId}:{"data-change-path":r};return(0,s.jsx)("div",{...a,children:(0,s.jsx)(td,{type:o,children:(0,s.jsx)(Ie,{className:m$("details-content-description"),value:String(Nm(n))},"text")})})},p$={[te.RISE_CLASSIC]:d$,[te.HORIZON]:f$,[te.APEX]:h$};function g$(){const e=ut(),t=p$[e];return(0,s.jsx)(t,{})}const Ux=V("cover"),jm=({className:e=Ux("details-logo"),imageClassName:t=Ux("details-logo-image")})=>{const n=ce()??{},o=Re(n.media)?.image??{},{height:r,key:a,width:i,scalar:c=f0.SMALL.value}=o,l={width:Number(i)*c,height:Number(r)*c};if(!a)return null;const d=lt(o);return(0,s.jsx)("div",{className:e.toString(),"data-testid":"cover-details-logo",children:(0,s.jsx)("img",{alt:"",className:t.toString(),"data-testid":"cover-details-logo-image",height:l.height,src:d,width:l.width})})};function v$({icon:e,...t}){switch(e){case On.ARTICLE:return(0,s.jsx)(bD,{...t});case On.INTERACTION:return(0,s.jsx)(_F,{...t});case On.QUIZ:return(0,s.jsx)(HF,{...t});case On.VIDEO:return(0,s.jsx)(qF,{...t});default:return(0,s.jsx)("i",{className:"icon icon-Master-02"})}}var Fi=p(31188);function C$(e){const{to:t,children:n}=e,o=(0,je.zy)(),r=(0,u.useMemo)(()=>i0(t,o),[o,t]);return(0,s.jsx)(je.k2,{...e,to:r,children:n})}var Xe=p(59928);function x$(e){return e instanceof CustomEvent}function Gx(e){document.dispatchEvent(new CustomEvent(V2,{detail:{lessonId:e}}))}function b$(e){(0,Xe.A)(V2,t=>{x$(t)&&e(t)},document)}const Wx=(0,u.createContext)(!1);function rd({children:e,inert:t}){const n=wm();return(0,s.jsx)(Wx.Provider,{value:n||t,children:e})}function wm(){return(0,u.useContext)(Wx)}function ad(e,t){const n=[];if(e){let o=e.parentElement;for(;o&&(t?.limit==null||n.length<t.limit);){if(o===document.body){n.push(window);break}const r=window.getComputedStyle(o);(r.overflowX==="auto"||r.overflowX==="scroll"||r.overflowY==="auto"||r.overflowY==="scroll")&&n.push(o),o=o.parentElement}}return n}function Kx(e){return ad(e,{limit:1})[0]??null}function Qx(e,t){(0,u.useLayoutEffect)(()=>{let n=e.current;const o=ad(n);for(const r of o)r?.addEventListener("scroll",t);return()=>{for(const r of o)r?.removeEventListener("scroll",t)}},[t,e])}function y$(e){return e?.sessionPreferences}function Hi(){return ue(y$)}const S$=({children:e,className:t="lesson-link-item-tooltip",dark:n,ref:o,visible:r})=>{const a=(0,u.useMemo)(()=>V(t),[t]),i=(0,s.jsx)("div",{"aria-hidden":"true",ref:o,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,s.jsx)("div",{style:{pointerEvents:"all"},children:(0,s.jsx)("div",{className:a({visible:r}),children:(0,s.jsx)("div",{className:a("inner",{dark:n,light:!n}),children:e})})})});return(0,Es.createPortal)(i,Zs())};function L$({labels:e,restriction:t,restrictionData:n}){if(t?.type===ur.QUIZ)return`${e?.quizRequirePassingScore}: "${n}"`;if(t?.type===ur.ORDER)return e?.lessonRestricted;if(t?.type===ur.KNOWLEDGE_CHECK)return e?.knowledgeCheckCorrectAnswerRequiredNav}function Yx(e){const{children:t,className:n,dark:o,restriction:r,tooltipClassName:a,style:i}=e,{prefersKeyboardNavigation:c}=Hi()??{},l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=(0,u.useRef)(null),f=Ce(),v=wm(),[C,g]=(0,u.useState)(!1),x=(0,u.useCallback)(()=>g(!0),[]),b=(0,u.useCallback)(()=>g(!1),[]),L=(0,u.useCallback)(()=>{h.current!=null&&(clearTimeout(h.current),h.current=null),m.current!=null&&(clearTimeout(m.current),m.current=null)},[]),S=(0,u.useCallback)(()=>{h.current=setTimeout(x,0)},[x]),y=(0,u.useCallback)(()=>{L(),c===!0&&b()},[L,b,c]),T=(0,u.useCallback)(N=>{N instanceof KeyboardEvent&&fn(N)&&C&&(N.stopPropagation(),b())},[b,C]),k=(0,u.useCallback)(()=>{document.activeElement===l.current&&(m.current!=null&&(clearTimeout(m.current),m.current=null),x())},[x]),I=(0,u.useCallback)(()=>{m.current=setTimeout(b,150)},[b]),E=(0,u.useCallback)(()=>{if(C&&l.current&&d.current){const N=l.current.getBoundingClientRect(),R=d.current.offsetParent?.getBoundingClientRect()??N,{height:M,width:P}=N,j=N.left-R.left,O=N.top-R.top;Object.assign(d.current.style,{transform:`translate(${j}px, ${O}px)`,width:`${P}px`,height:`${M}px`})}},[C]);(0,u.useEffect)(()=>{v&&g(!1)},[v]),(0,u.useEffect)(()=>L,[L]),(0,u.useLayoutEffect)(()=>E(),[E]),(0,Xe.A)("resize",E,window),(0,Xe.A)("keydown",T,document),Qx(l,b);const w=ct(r!=null&&r.type===ur.QUIZ?r.data:void 0),A=L$({labels:f,restriction:r,restrictionData:w});return(0,s.jsxs)("div",{"aria-disabled":!0,className:n,onBlur:y,onFocus:S,onMouseEnter:k,onMouseLeave:I,ref:l,role:"link",style:i,tabIndex:v?-1:0,children:[t,(0,s.jsx)("div",{className:"visually-hidden-always",children:f?.a11yRestrictedNav}),(0,s.jsx)("div",{className:"visually-hidden-always",children:A}),(0,s.jsx)(S$,{className:a,dark:o,ref:d,visible:C,children:A})]})}function T$(e){const{b:t,children:n,"data-direction":o,dark:r,isCurrentLesson:a,isTooltipEnabled:i,lessonId:c,onClick:l=()=>{},onBlur:d,onFocus:h,onHideProgressTooltip:m,onNavigate:f=()=>{},onShowProgressTooltip:v,restriction:C,showProgressDelay:g,style:x,tooltipClassName:b}=e,L=wm(),T=(ce()?.theme?.progressIndicatorStyle??qe.THEME_DEFAULT)===qe.THEME_DEFAULT,k=(0,u.useRef)(null),I=(0,u.useCallback)(D=>{l(D),a?(D.preventDefault(),Gx(c)):f(c)},[c,a,l,f]),[E,w]=(0,u.useState)(!1),A=(0,u.useCallback)(()=>{k.current!=null&&(clearTimeout(k.current),k.current=null)},[]),N=(0,u.useCallback)(D=>{!E&&i&&(g!=null?k.current=setTimeout(()=>{v?.()},g):v?.()),h?.(D)},[E,h,g,v,i]),R=(0,u.useCallback)(D=>{A(),i&&m?.(),d?.(D)},[A,i,d,m]),M=(0,u.useCallback)(D=>{i&&fn(D)&&m?.()},[m,i]),P=(0,u.useCallback)(()=>{i===!0&&w(!0)},[i]),j=(0,u.useCallback)(()=>{i===!0&&w(!1)},[i]);(0,u.useEffect)(()=>{if(!E)return;const D=()=>{w(!1)};return document.addEventListener("mouseup",D),()=>{document.removeEventListener("mouseup",D)}},[E]),(0,u.useEffect)(()=>A,[A]);const O=C?.type!=null,B=t("link",{active:a,restricted:O,"theme-default":T}).toString();return O?(0,s.jsx)(Yx,{className:B,dark:r,restriction:C,style:x,tooltipClassName:b,children:n}):(0,s.jsx)(C$,{"aria-current":a?"page":void 0,className:B.toString(),"data-direction":o,"data-nav-item":"",onBlur:R,onClick:I,onFocus:N,onKeyDown:M,onMouseDown:P,onMouseUp:j,style:x,tabIndex:L?-1:void 0,to:In(c),children:n})}function $i(e){const{className:t="lesson-link-item",isCurrentLesson:n,last:o,lessonId:r,style:a}=e,i=(0,u.useMemo)(()=>V(t),[t]),c=Li(String(r)),l=c?.type!=null,{isComplete:d=!1}=No(r)??{},h=i({active:n,complete:d,last:o,restricted:l});return(0,s.jsx)("div",{className:h,children:(0,s.jsx)(T$,{...e,b:i,isCurrentLesson:n,restriction:c,style:a})})}function k$({className:e,cx:t,cy:n,diameter:o,onTransitionEnd:r,r:a,strokeLinecap:i,strokeWidth:c,value:l=0}){const d=(0,u.useRef)(null),h=`mask-${(0,E1.A)()}`,m=(100-l)/100*(2*a);return(0,Xe.A)("transitionend",r,d.current),(0,s.jsxs)("svg",{height:o,viewBox:`0 0 ${o} ${o}`,width:o,children:[(0,s.jsx)("defs",{children:(0,s.jsx)("mask",{id:h,children:(0,s.jsx)("rect",{fill:"white",height:2.3*a,width:2.3*a,x:"0",y:l===0?100:m})})}),(0,s.jsx)("circle",{className:e,cx:t,cy:n,fill:"none",mask:`url(#${h})`,r:a,ref:d,strokeLinecap:i,strokeWidth:c})]})}const Am=k$;function I$({className:e,cx:t,cy:n,diameter:o,onTransitionEnd:r,r:a,strokeLinecap:i,strokeWidth:c,transform:l,value:d=0}){const h=(0,u.useRef)(null),m=Math.PI*(Number(o)-Number(c)),f=m*(100-d)/100;return(0,Xe.A)("transitionend",r,h.current),(0,s.jsx)("circle",{className:e,cx:t,cy:n,fill:"transparent",r:a,ref:h,strokeDasharray:m,strokeDashoffset:f,strokeLinecap:i,strokeWidth:c,transform:l})}const Zx=I$;var Rm=p(82920);const{COMPACT:E$,COVER:N$,OVERLAY:j$,SIDEBAR:w$}=Co,Vi=V("progress-circle");function A$({"aria-hidden":e,"aria-label":t,isCurrent:n,isFailed:o,isPassed:r,scope:a,value:i}){const[c,l]=Rm.useState(i===100),d=(0,Oe.A)(i),{theme:h}=ce()??{},m=h?.progressIndicatorStyle??qe.THEME_DEFAULT,f=a===N$,v=a===j$,C=m===qe.THEME_DEFAULT,g=m===qe.CIRCULAR_FILL,x=m===qe.INCOMPLETE_COMPLETE,b=Vi({compact:a===E$,cover:f,current:n,sidebar:a===w$,overlay:v}),L=Vi("track",{"circular-fill":!v&&g,"incomplete-complete":f&&x}),S=Vi("runner",{"circular-fill":g,done:c,failed:o,passed:r,unstarted:i===0}),y=Vi("pass",{done:c,visible:r}),T=Vi("fail",{done:c,visible:o}),k=Rm.useMemo(()=>g||i===100?i:0,[g,i]);return Rm.useEffect(()=>{if(i!==100&&d===100)l(!1);else if(i===100&&!c&&!x){const I=setTimeout(()=>l(!0),300);return clearTimeout.bind(null,I)}else i===100&&!c&&x&&l(!0)},[c,x,d,i]),(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:b,fill:"none",focusable:"false",role:"img",viewBox:"0 0 16 16",xmlns:"https://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{className:L,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),C?(0,s.jsx)(Zx,{className:S,cx:8,cy:8,diameter:16,r:7,strokeWidth:2,transform:"rotate(-89.9 8 8)",value:i}):(0,s.jsx)(Am,{className:S,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:k}),(0,s.jsx)("path",{className:y,d:"M11.3227 6.65905C11.6133 6.37599 11.6347 5.89413 11.3705 5.58277C11.1063 5.27141 10.6566 5.24847 10.366 5.53152L6.93323 8.87512L5.6338 7.60944C5.3432 7.32639 4.89345 7.34933 4.62927 7.66069C4.36509 7.97205 4.38651 8.45391 4.67711 8.73697L6.45488 10.4686C6.72611 10.7328 7.14034 10.7328 7.41157 10.4686L11.3227 6.65905Z"}),(0,s.jsx)("path",{className:T,clipRule:"evenodd",d:"M9.46967 10.5303C9.76256 10.8232 10.2374 10.8232 10.5303 10.5303C10.8232 10.2374 10.8232 9.76256 10.5303 9.46967L9.06066 8L10.5303 6.53033C10.8232 6.23744 10.8232 5.76256 10.5303 5.46967C10.2374 5.17678 9.76256 5.17678 9.46967 5.46967L8 6.93934L6.53033 5.46967C6.23744 5.17678 5.76256 5.17678 5.46967 5.46967C5.17678 5.76256 5.17678 6.23744 5.46967 6.53033L6.93934 8L5.46967 9.46967C5.17678 9.76256 5.17678 10.2374 5.46967 10.5303C5.76256 10.8232 6.23744 10.8232 6.53033 10.5303L8 9.06066L9.46967 10.5303Z",fillRule:"evenodd"})]})}var Pm=p(82920);const{COMPACT:R$,COVER:P$,OVERLAY:M$,SIDEBAR:O$}=Co,ba=V("progress-circle");function B$({"aria-hidden":e,"aria-label":t,isFailed:n,isPassed:o,scope:r,value:a}){const[i,c]=Pm.useState(a===100),l=(0,Oe.A)(a),{theme:d}=ce()??{},h=d?.progressIndicatorStyle??qe.THEME_DEFAULT,m=r===P$,f=r===M$,v=h===qe.THEME_DEFAULT,C=h===qe.CIRCULAR_FILL,g=h===qe.INCOMPLETE_COMPLETE,x=ba("default",{failed:n,passed:o}),b=ba({compact:r===R$,cover:m,overlay:f,sidebar:r===O$}),L=ba("track",{"circular-fill":!f&&C,"incomplete-complete":m&&g}),S=ba("fill",{"circular-fill":C,done:i,failed:n,passed:o,unstarted:a===0}),y=ba("pass",{done:i,visible:o}),T=ba("fail",{done:i,visible:n}),k=Pm.useMemo(()=>C||a===100?a:0,[C,a]);return Pm.useEffect(()=>{if(a!==100&&l===100)c(!1);else if(a===100&&!i&&!g){const I=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,I)}else a===100&&!i&&g&&c(!0)},[i,g,l,a]),(0,s.jsx)(s.Fragment,{children:v?(0,s.jsx)("svg",{"aria-hidden":e,"aria-label":t,className:x,focusable:"false",viewBox:"0 0 7 7",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("circle",{cx:"3.5",cy:"3.5",r:"2.5"})}):(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:b,fill:"none",focusable:"false",role:"img",viewBox:"0 0 7 7",xmlns:"https://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{className:L,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),(0,s.jsx)(Am,{className:S,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:k}),(0,s.jsx)("path",{className:y,d:"M11.3227 6.65905C11.6133 6.37599 11.6347 5.89413 11.3705 5.58277C11.1063 5.27141 10.6566 5.24847 10.366 5.53152L6.93323 8.87512L5.6338 7.60944C5.3432 7.32639 4.89345 7.34933 4.62927 7.66069C4.36509 7.97205 4.38651 8.45391 4.67711 8.73697L6.45488 10.4686C6.72611 10.7328 7.14034 10.7328 7.41157 10.4686L11.3227 6.65905Z"}),(0,s.jsx)("path",{className:T,clipRule:"evenodd",d:"M9.46967 10.5303C9.76256 10.8232 10.2374 10.8232 10.5303 10.5303C10.8232 10.2374 10.8232 9.76256 10.5303 9.46967L9.06066 8L10.5303 6.53033C10.8232 6.23744 10.8232 5.76256 10.5303 5.46967C10.2374 5.17678 9.76256 5.17678 9.46967 5.46967L8 6.93934L6.53033 5.46967C6.23744 5.17678 5.76256 5.17678 5.46967 5.46967C5.17678 5.76256 5.17678 6.23744 5.46967 6.53033L6.93934 8L5.46967 9.46967C5.17678 9.76256 5.17678 10.2374 5.46967 10.5303C5.76256 10.8232 6.23744 10.8232 6.53033 10.5303L8 9.06066L9.46967 10.5303Z",fillRule:"evenodd"})]})})}var id=p(82920);const{COMPACT:D$,COVER:F$,OVERLAY:H$,SIDEBAR:$$}=Co,zi=V("progress-circle");function V$({"aria-hidden":e,"aria-label":t,isFailed:n,isPassed:o,scope:r,value:a}){const[i,c]=id.useState(a===100),l=(0,Oe.A)(a),{theme:d}=ce()??{},h=d?.progressIndicatorStyle??qe.THEME_DEFAULT,m=r===F$,f=r===H$,v=h===qe.THEME_DEFAULT,C=h===qe.CIRCULAR_FILL,g=h===qe.INCOMPLETE_COMPLETE,x=zi({compact:r===D$,cover:m,sidebar:r===$$,overlay:f}),b=zi("track",{"circular-fill":!f&&C,"incomplete-complete":m&&g}),L=zi("runner",{"circular-fill":C,done:i,failed:n,passed:o,unstarted:a===0}),S=zi("pass",{done:i,visible:o}),y=zi("fail",{done:i,visible:n}),T=id.useMemo(()=>C||a===100?a:0,[C,a]);id.useEffect(()=>{if(a!==100&&l===100)c(!1);else if(a===100&&!i&&!g){const I=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,I)}else a===100&&!i&&g&&c(!0)},[i,g,l,a]);const k=id.useCallback(()=>{a===100&&c(!0)},[a]);return(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:x,fill:"none",focusable:"false",role:"img",viewBox:"0 0 15 15",xmlns:"https://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{className:b,cx:"7.5",cy:"7.5",fill:"transparent",r:"6.5",strokeWidth:"2",transform:"rotate(-89.9 7.5 7.5)"}),v?(0,s.jsx)(Zx,{className:L,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:k,r:6.5,strokeWidth:2,transform:"rotate(-89.9 7.5 7.5)",value:a}):(0,s.jsx)(Am,{className:L,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:k,r:6.5,strokeLinecap:"round",strokeWidth:2,value:T}),(0,s.jsx)("path",{className:S,d:"M11.3227 6.65905C11.6133 6.37599 11.6347 5.89413 11.3705 5.58277C11.1063 5.27141 10.6566 5.24847 10.366 5.53152L6.93323 8.87512L5.6338 7.60944C5.3432 7.32639 4.89345 7.34933 4.62927 7.66069C4.36509 7.97205 4.38651 8.45391 4.67711 8.73697L6.45488 10.4686C6.72611 10.7328 7.14034 10.7328 7.41157 10.4686L11.3227 6.65905Z"}),(0,s.jsx)("path",{className:y,clipRule:"evenodd",d:"M7.5 8.56157L8.84426 9.90564L9.90503 8.84473L8.56078 7.50066L9.90543 6.15582L8.84452 5.09504L7.49986 6.43988L6.15452 5.09473L5.09375 6.15564L6.43909 7.5008L5.09452 8.84555L6.15543 9.90632L7.5 8.56157Z",fillRule:"evenodd"})]})}const z$={[te.RISE_CLASSIC]:A$,[te.HORIZON]:B$,[te.APEX]:V$};function Xx(e){const t=ut(),n=z$[t];return(0,s.jsx)(n,{...e})}var _$=p(97127),cd=p.n(_$);const qx=e=>t=>(e(t),t.preventDefault()),Ao=e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},fs=e=>t=>{e(t),t.preventDefault(),Ao(t)},ld=V("lesson-progress"),{COMPACT:Mm,COVER:_i,OVERLAY:Om,SIDEBAR:Ui}=Co;function U$({canComplete:e,color:t,hasRestriction:n,isComplete:o,isCurrentLesson:r,isDark:a,isEnabled:i,isFailed:c,isLegacy:l=void 0,isPassed:d,isTooltipVisible:h,navigationStyle:m,onHideTooltip:f,onMarkComplete:v=qt,onMarkReset:C=qt,onShowTooltip:g,percentComplete:x,progressGraphic:b,scope:L,labels:S}){const y=(0,u.useRef)(),T=(0,u.useRef)(),k=(0,u.useRef)(),I=(0,u.useRef)(),{theme:{progressIndicatorStyle:E=qe.THEME_DEFAULT}}=Fe(),w=E===qe.THEME_DEFAULT,A=ld({compact:L===Mm,cover:L===_i&&!l,"legacy-cover":L===_i&&l,inactive:n,overlay:L===Om,sidebar:L===Ui&&!l,"legacy-sidebar":L===Ui&&l,"theme-default":w}),N=ld("graphic",{compact:L===Mm,cover:L===_i&&!l,"legacy-cover":L===_i&&l,overlay:L===Om,sidebar:L===Ui&&!l,"legacy-sidebar":L===Ui&&l}),R=ld("tooltip",{legacy:l}).toString(),M=(0,u.useCallback)(()=>{o?C?.():v?.()},[o,v,C]),P=(0,u.useCallback)(H=>{cd()(f)&&fn(H)&&h&&f()},[f,h]),j=(0,u.useCallback)(()=>{clearTimeout(k.current),!n&&cd()(g)&&(T.current=setTimeout(g,600))},[n,g]),O=(0,u.useCallback)(()=>{clearTimeout(T.current),cd()(f)&&(k.current=setTimeout(f,150))},[f]),B=(0,u.useCallback)(()=>{setTimeout(()=>{if(h){const H=y.current.getBoundingClientRect(),$=I.current.offsetParent.getBoundingClientRect(),{height:W,width:U}=H,Z=H.left-$.left,ne=H.top-$.top;Object.assign(I.current.style,{transform:`translate(${Z}px, ${ne}px)`,width:`${U}px`,height:`${W}px`})}},0)},[h]);if((0,u.useLayoutEffect)(()=>B(),[B]),(0,Xe.A)("resize",B,window),(0,Xe.A)("keydown",P,document),Qx(y,O),e){const $=G$({labels:S,percentComplete:x,canReset:!0}),W=!i||!1,U=ld("action",{disabled:W});return(0,s.jsx)("span",{className:A,"data-testid":"lesson-progress",children:(0,s.jsx)("button",{"aria-label":$,className:U,disabled:W,onBlur:f,onClick:M,onFocus:g,type:"button",children:(0,s.jsxs)("span",{className:N,onMouseEnter:j,onMouseLeave:O,ref:y,children:[(0,s.jsx)(b,{"aria-hidden":"true",color:t,isCurrent:r,isDark:a,isFailed:c,isPassed:d,navigationStyle:m,scope:L,value:x}),i&&!n&&(0,s.jsx)(Jx,{className:R,dark:a,ref:I,scope:L,visible:h,children:$})]})})})}const D=W$({labels:S,isFailed:c,percentComplete:x});return(0,s.jsx)("span",{className:A,"data-testid":"lesson-progress",children:(0,s.jsxs)("span",{className:N,onMouseEnter:j,onMouseLeave:O,ref:y,children:[(0,s.jsx)(b,{"aria-label":D,color:t,isCurrent:r,isDark:a,isFailed:c,isPassed:d,navigationStyle:m,scope:L,value:x}),i&&!n&&(0,s.jsx)(Jx,{className:R,dark:a,ref:I,scope:L,visible:h,children:D})]})})}const Jx=(0,u.forwardRef)((e,t)=>{const{children:n,className:o,dark:r,scope:a,visible:i}=e,c=(0,u.useMemo)(()=>V(o),[o]),l=c({compact:a===Mm,cover:a===_i,overlay:a===Om,sidebar:a===Ui,visible:i}),d=c("inner",{dark:r,light:!r}),h=(0,s.jsx)("div",{"aria-hidden":"true",onClick:Ao,ref:t,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,s.jsx)("div",{style:{pointerEvents:"all"},children:(0,s.jsx)("div",{className:l,children:(0,s.jsx)("div",{className:d,children:n})})})});return(0,Es.createPortal)(h,Zs())});function G$({labels:e,canReset:t,percentComplete:n}){const o=n===100,{progressPieCompleted:r,progressPieUnstarted:a,progressPieClickToComplete:i,progressPieClickToReset:c}=e;return o&&t?`${r}. ${c}`:n===100&&!t?r:n===0?`${a}. ${i}`:`${n}% ${r}. ${i}`}function W$({labels:e,isFailed:t,percentComplete:n}){const o=n===100,{progressPieCompleted:r,progressPieUnstarted:a,progressPieQuizFailed:i}=e;return t?i:o?r:n===0?a:`${n}% ${r}`}const eb=u.memo(U$);function dd({canComplete:e,id:t,isDark:n,isEnabled:o,isTooltipVisible:r,onHideTooltip:a,onShowTooltip:i,scope:c}){const l=tt(),{color:d,navigationStyle:h}=ce(),m=No(t),f=Ws(),v=$C(String(t)),C=VC(String(t)),g=Li(String(t)),x=Ce(),b=g?.type!=null,L=m?.isComplete,S=String(t)===f,y=m?.percentComplete??0,T=(0,u.useCallback)(()=>{l(Jc(t))},[l,t]),k=(0,u.useCallback)(()=>{l(FI(t))},[l,t]);return(0,s.jsx)(eb,{canComplete:e,color:d,hasRestriction:b,isComplete:L,isCurrentLesson:S,isDark:n,isEnabled:o,isFailed:v,isPassed:C,isTooltipVisible:r,labels:x,navigationStyle:h,onHideTooltip:a,onMarkComplete:T,onMarkReset:k,onShowTooltip:i,percentComplete:y,progressGraphic:Xx,scope:c})}function K$({color:e,hasRestriction:t,isComplete:n,isCurrentLesson:o,isFailed:r,isPassed:a,isTooltipVisible:i,lessonTitle:c,navigationStyle:l,onHideTooltip:d,onShowTooltip:h,percentComplete:m,progressGraphic:f,scope:v,labels:C}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"overview-list-item__progress",children:C&&(0,s.jsx)(eb,{canComplete:!1,color:e,hasRestriction:t,isComplete:n,isCurrentLesson:o,isDark:!1,isEnabled:!0,isFailed:r,isPassed:a,isTooltipVisible:i,labels:C,navigationStyle:l,onHideTooltip:d,onShowTooltip:h,percentComplete:m,progressGraphic:f,scope:v})}),(0,s.jsx)("span",{className:"overview-list-item__title",children:c})]})}function Q$(){return!(typeof document>"u"||!("startViewTransition"in document)||Ys.isFirefox)}function Y$(e){if(!Q$()){const t=e();return Promise.resolve(t)}return new Promise(t=>{try{document.startViewTransition(async()=>{await e()}).finished.then(()=>t()).catch(()=>t())}catch{const n=e();Promise.resolve(n).then(()=>t()).catch(()=>t())}})}let Bm=!1;function Js(e,t="default"){return Bm?Promise.resolve():(Bm=!0,Y$(()=>{document.documentElement.classList.add(`transition-${t}`),e()}).then(()=>{document.documentElement.classList.remove(`transition-${t}`)}).finally(()=>{Bm=!1}))}const Z$=V("overview-list-item");function X$({className:e,id:t,last:n}){const o=Xt(),r=ut(),a=Ws(),{color:i,navigationStyle:c}=ce(),{icon:l,title:d}=At(t)??{},h=ct(d),m=No(t),f=$C(t),v=VC(t),C=Li(t),g=Ce(),x=(0,Gt.uW)(d)?{"data-l10n-id":d.l10nId}:{"data-change-path":J2(t,"title")},b=m?.isComplete,L=m?.percentComplete??0,S=C?.type!=null,[y,T]=(0,u.useState)(!1),k=r===te.HORIZON?K$:q$,I=(0,u.useCallback)(()=>T(!0),[]),E=(0,u.useCallback)(()=>T(!1),[]),w=n?"overview-list__li overview-list__li--last":"overview-list__li",A=X()(e,"overview-list-item"),N=(0,u.useCallback)(R=>{const{currentTarget:{hash:M}}=R;R.preventDefault(),Fi.Ay.Events.scrollEvent.register("end",()=>{Js(()=>{o(M.slice(1))},"cover-to-lesson"),Fi.Ay.Events.scrollEvent.remove("end")}),Fi.Ay.animateScroll.scrollTo(0,{containerId:"overview"})},[o]);return(0,s.jsx)("li",{...x,className:w,"data-testid":`overview-list-item-${t}`,role:"listitem",children:(0,s.jsx)($i,{className:A,isTooltipEnabled:!0,lessonId:t,onBlur:E,onClick:N,onHideProgressTooltip:E,onShowProgressTooltip:I,showProgressDelay:25,tooltipClassName:"overview-list-item-tooltip",children:(0,s.jsx)(k,{color:i,hasRestriction:S,isComplete:b,isCurrentLesson:t===a,isFailed:f,isPassed:v,isTooltipVisible:y,labels:g,lessonIcon:l,lessonId:t,lessonTitle:h,navigationStyle:c,onHideTooltip:E,onShowTooltip:I,percentComplete:L,progressGraphic:Xx,scope:Co.COVER})})})}function q$({isTooltipVisible:e,lessonIcon:t,lessonId:n,lessonTitle:o,onHideTooltip:r,onShowTooltip:a,scope:i}){const c=Z$("progress-circle");return(0,s.jsxs)("div",{className:c,children:[(0,s.jsx)("span",{"aria-hidden":"true",className:"overview-list-item__icon",children:(0,s.jsx)(v$,{icon:t??void 0})}),(0,s.jsx)("span",{className:"overview-list-item__title","data-testid":`overview-list-item-title-${n}`,children:o}),(0,s.jsx)(dd,{canComplete:!1,id:n,isDark:!1,isEnabled:!0,isTooltipVisible:e,onHideTooltip:r,onShowTooltip:a,scope:i})]})}const J$=V("overview-list"),eV=e=>e.reduce((t,n)=>(n.type==="section"?t.push([n]):t[t.length-1]?t[t.length-1].push(n):t.push([n]),t),[]),tV=({className:e="",...t})=>{const n=ut(),o=X()(e,"overview-list__section-title",{"brand--ui":n===te.RISE_CLASSIC});return(0,s.jsx)("h2",{...t,className:o})},nV=()=>{const e=Ej(),t=Ce(),n=eV(e);return(0,s.jsx)("nav",{"aria-label":t?.a11yRegionNavOverview,className:"overview-list",children:n.map((o,r)=>{const[a,...i]=o;if(!a)return null;const{title:c,type:l}=a,d=l==="section",h=d?i:o,m=J$("list",{sectionless:!d});return(0,s.jsxs)("section",{children:[d&&c&&(0,s.jsx)(tV,{children:(0,s.jsx)(mn,{value:c})}),(0,s.jsx)("ol",{className:m,role:"list",children:h.map((f,v)=>(0,s.jsx)(X$,{id:f.id,last:h.length>1&&v===h.length-1},f.id))})]},r)})})},sV=(0,u.memo)(nV),oV={[te.RISE_CLASSIC]:{SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"LEFT_OVERLAY"},[te.HORIZON]:{SPLIT_LEFT_IMAGE:"CENTERED_OVERLAY",SPLIT_RIGHT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"CENTERED_OVERLAY"},[te.APEX]:{SPLIT_LEFT:"LEFT",SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT:"LEFT",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY"}};function rV({coverPageType:e="CENTERED",isTablet:t,themeId:n}){return t?oV[n][e]??e:e}function Gi(){const e=ce(),t=ut(),n=kt(768);return rV({coverPageType:e.theme?.coverPageType??void 0,isTablet:n,themeId:t})}const aV=e=>Object.values(f0).find(t=>t.value==e);function iV(e){return(0,u.useMemo)(()=>aV(e)??f0.SMALL,[e])?.label.toLowerCase()}const ya=V("cover");function tb(e){return typeof e=="object"&&e!=null}function cV(e){return tb(e)}function lV(e){if(tb(e))return cV(e.image)?e.image:void 0}function dV(){const e=kt(1200),t=ut(),n=Gi(),o=t===te.APEX&&(n==="SPLIT_RIGHT"||n==="SPLIT_RIGHT_IMAGE"),{description:r,media:a,navigation:i,partnerContentId:c,publishedAt:l}=ce(),h=!!Ei(),m=lV(ct(a)),f=m!=null&&Object.keys(m).length>0,v=!!i,C=!r||!v,g=!r&&!v,x=!!h,b=ya("details",{"rise-com":!1,"rise-com-authoring":!1}),L=ya("details-content-wrap",{columns:x,logo:f}),S=ya("details-content",{"no-description-or-outline":C}),y=ya("details-logo",{centered:g,"no-description-or-outline":C,"has-partner-content":!!c}),T=x&&(0,s.jsx)(zH,{hasLogo:f}),k=iV(m?.scalar),I=ya("details-logo-image",{[k]:!0}),E=ya("details-description-outline");return(0,s.jsx)("section",{className:b,"data-testid":"cover-details",children:(0,s.jsxs)("div",{className:L,children:[!e&&o&&T,(0,s.jsxs)("div",{className:S,children:[(0,s.jsx)(jm,{className:y,imageClassName:I}),(0,s.jsxs)("div",{className:E,children:[r&&(0,s.jsx)(g$,{}),e&&T,v&&(0,s.jsx)(td,{type:"outline",children:(0,s.jsx)(sV,{})})]})]}),!e&&!o&&T]})})}const uV=(0,u.forwardRef)(function({children:t,disabled:n,onClick:o,to:r,...a},i){return n?(0,s.jsx)("a",{"aria-disabled":"true",ref:i,role:"link",...a,children:t}):(0,s.jsx)(nn,{onClick:o,ref:i,to:r,...a,children:t})}),nb=V("cover"),on=()=>{const e=ce(),{trackingQuizId:t,theme:n}=e,o=Xt(),r=window.viewType==="preview",a=yC(),i=ij(),c=na(),l=a?.id,d=n?.showStartButton??!0,h=Z4()?c===100:Y4(),f=i!=null?i:l,v=!r&&!1,{courseCTALabel:C}=Oj({isCourseComplete:h===!0,percentCourseComplete:c??0});if(!d||!C||f==null)return null;const g=["cover__header-content-action-link","overview__button-enrolled",v?"overview__start-again":void 0].filter(Boolean).join(" "),x=In(f),b=L=>{L.preventDefault(),Js(()=>{o(x)},"cover-to-lesson")};return(0,s.jsx)("div",{className:nb("header-content-action-wrapper"),children:(0,s.jsx)(uV,{className:g,onClick:b,to:x,children:(0,s.jsx)("span",{className:nb("header-content-action-link-text"),children:C})})})},hV=V("cover"),Un=({children:e})=>{const t=hV("header-content");return(0,s.jsx)("div",{className:t,"data-testid":"cover-header-content",children:e})},Sr=e=>{const t=Fe(),n=at();return mV(t,e,n)},mV=(e,t,n)=>{const{media:o,alpha:r}=t==="coverImage"?Pg(e,n):Mg(e,n),a="image"in o?Ng(o?.image?.alt):void 0;return{alpha:r,ariaLabel:a,media:o,role:jg(a)}},fV=V("cover"),Dm=()=>{const e=bC(),{alpha:t,ariaLabel:n,media:o,role:r}=Sr("coverImage"),a=fV("header-image"),i=ea({alpha:t,color:e,media:o});return(0,s.jsx)("div",{"aria-label":n,className:a,role:r,style:i??void 0})},pV=V("cover"),Fm=({children:e})=>{const t=bC(),n=`overlay-${t.toLowerCase()}`,o=pV("header-content",{[n]:!!t});return(0,s.jsxs)("div",{className:o,"data-testid":"cover-header-content",children:[e,(0,s.jsx)(Dm,{})]})},gV=V("cover"),Wi=({hasOverlay:e=!1})=>{const{alpha:t,ariaLabel:n,media:o,role:r}=Sr("coverImage"),a=ea({alpha:t,hasOverlay:e,media:o}),i=gV("header-graphic",{"dot-com":!1});return(0,s.jsx)("div",{"aria-label":n,className:i,"data-testid":"cover-header-graphic",role:r,style:a??void 0})},vV=V("cover");function rn({children:e}){const t=!!Ei(),n=vV("header-content-info",{rbc:t,"rise-com":!1});return(0,s.jsx)("div",{className:n,"data-testid":"cover-header-content-info",children:e})}const eo=V("cover");function CV({percentComplete:e}){const t=od(),n=rs(),o=Ce(),r=QC();return null}const Lr=V("cover"),xV=({percentComplete:e})=>{const t=rs(),n=Ce(),o=QC();return e===0||window.isPublicShare,null;const r=va({percent:e,label:n.progressSummaryPercentComplete,isRTL:t});return(0,s.jsxs)("div",{className:Lr("progress"),children:[(0,s.jsx)("div",{className:Lr("progress-text"),children:r}),(0,s.jsx)("div",{className:Lr("progress-outer"),children:(0,s.jsx)("div",{className:Lr("progress-inner"),style:{width:`${e}%`}})}),o&&(0,s.jsxs)("div",{className:Lr("progress-next-lesson"),children:[(0,s.jsx)(qh,{className:Lr("progress-next-lesson-icon").toString(),decorative:!0}),(0,s.jsx)("span",{"aria-hidden":"true",className:Lr("progress-next-lesson-text"),children:o}),(0,s.jsxs)("span",{className:"visually-hidden",children:["Next lesson: ",o]})]})]})};function Vt(){const e=na()??0;return ut()===te.APEX?(0,s.jsx)(CV,{percentComplete:e}):(0,s.jsx)(xV,{percentComplete:e})}const bV=V("cover"),an=()=>{const e=ce(),t=Re(e.title),n=bV("header-content-title"),o=ha("title"),r=(0,Gt.uW)(e.title)?{"data-l10n-id":e.title.l10nId}:{"data-change-path":o};return(0,s.jsx)("h1",{...r,className:n,"data-testid":"cover-header-content-title",tabIndex:-1,children:t})},yV=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Fm,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Is,{}),(0,s.jsx)(an,{}),(0,s.jsx)(Vt,{}),(0,s.jsx)(on,{})]})})}),SV=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Un,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Is,{}),(0,s.jsx)(an,{}),(0,s.jsx)(Vt,{}),(0,s.jsx)(on,{})]})})}),LV=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Wi,{}),(0,s.jsx)(Un,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Is,{}),(0,s.jsx)(an,{}),(0,s.jsx)(Vt,{}),(0,s.jsx)(on,{})]})})]}),TV=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Un,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Is,{}),(0,s.jsx)(an,{}),(0,s.jsx)(Vt,{}),(0,s.jsx)(on,{})]})}),(0,s.jsx)(Wi,{})]});function kV(){switch(Gi()){default:case de.LEFT_OVERLAY:case de.CENTERED_OVERLAY:return(0,s.jsx)(yV,{});case de.LEFT:case de.CENTERED:return(0,s.jsx)(SV,{});case de.SPLIT_LEFT_IMAGE:case de.TWO_THIRDS_LEFT_IMAGE:return(0,s.jsx)(TV,{});case de.SPLIT_RIGHT_IMAGE:case de.TWO_THIRDS_RIGHT_IMAGE:return(0,s.jsx)(LV,{})}}function IV(){return(0,s.jsx)("header",{className:"cover__header","data-testid":"cover-header",children:(0,s.jsx)(kV,{})})}const EV=V("cover");function Ki(){return(0,s.jsxs)("svg",{"aria-hidden":"true",className:EV("header-star"),fill:"none",height:"18",viewBox:"0 0 18 18",width:"18",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M9 0V18",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,s.jsx)("path",{d:"M18 9H0",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,s.jsx)("path",{d:"M15.3 15.3002L2.69995 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,s.jsx)("path",{d:"M2.69995 15.3002L15.3 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}const NV=V("cover"),jV=()=>null,wV=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Fm,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Vt,{}),(0,s.jsx)(Ki,{}),(0,s.jsx)(Is,{}),(0,s.jsx)(an,{}),(0,s.jsx)(on,{})]})})}),AV=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Un,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Vt,{}),(0,s.jsx)(Ki,{}),(0,s.jsx)(Is,{}),(0,s.jsx)(an,{}),(0,s.jsx)(on,{})]})})}),RV=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Wi,{}),(0,s.jsx)(Un,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Vt,{}),(0,s.jsx)(Ki,{}),(0,s.jsx)(Is,{}),(0,s.jsx)(an,{}),(0,s.jsx)(on,{})]})})]}),PV=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Un,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Vt,{}),(0,s.jsx)(Ki,{}),(0,s.jsx)(Is,{}),(0,s.jsx)(an,{}),(0,s.jsx)(on,{})]})}),(0,s.jsx)(Wi,{})]}),MV=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Un,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Vt,{}),(0,s.jsx)(Ki,{}),(0,s.jsx)(Is,{}),(0,s.jsx)(an,{}),(0,s.jsx)(on,{})]})}),(0,s.jsx)("div",{className:"cover__header-graphic-wrap",children:(0,s.jsx)(Wi,{})})]});function OV(){switch(Gi()){default:case"CENTERED_IMAGE":return(0,s.jsx)(MV,{});case"CENTERED":case"CENTERED_ACCENT_TINT":return(0,s.jsx)(AV,{});case"SPLIT_LEFT_IMAGE":case"TWO_THIRDS_LEFT_IMAGE":return(0,s.jsx)(PV,{});case"SPLIT_RIGHT_IMAGE":case"TWO_THIRDS_RIGHT_IMAGE":return(0,s.jsx)(RV,{});case"CENTERED_OVERLAY":return(0,s.jsx)(wV,{})}}function BV(){return(0,s.jsxs)("header",{className:NV("header",{meta:!1}),"data-testid":"cover-header",children:[(0,s.jsx)(OV,{}),(0,s.jsx)(u.Suspense,{children:(0,s.jsx)(jV,{})})]})}const sb=V("cover");function ud({accentColor:e,hasOverlay:t=!1,isShape:n=!1}){const{alpha:o,ariaLabel:r,media:a,role:i}=Sr("coverImage"),c=n?{backgroundColor:e}:ea({alpha:o,hasOverlay:t,media:a});return(0,s.jsx)("div",{className:sb("header-graphic-container"),children:(0,s.jsx)("div",{"aria-label":r,className:sb("header-graphic"),"data-testid":"cover-header-graphic",role:i,style:c??void 0})})}const ob=e=>(0,s.jsx)(hd,{...e,children:(0,s.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,s.jsx)("path",{d:"M0.319,0.998 L1,0.899 V0 H0 V0.899 L0.192,0.98 C0.234,0.998,0.277,1,0.319,0.998"})})}),rb=e=>(0,s.jsx)(hd,{...e,children:(0,s.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,s.jsx)("path",{d:"M0.661,0.963 L1,0.804 V0 H0 V0.804 L0.339,0.963 C0.445,1,0.555,1,0.661,0.963"})})}),ab=e=>(0,s.jsx)(hd,{...e,children:(0,s.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,s.jsx)("path",{d:"M0.481,0.991 L0.908,0.825 C0.99,0.793,1,0.694,0.982,0.616 L0.68,0.075 C0.636,-0.003,0.534,-0.023,0.465,0.033 L0.055,0.364 C-0.007,0.414,-0.017,0.505,0.031,0.568 L0.316,0.944 C0.355,0.995,0.422,1,0.481,0.991"})})}),ib=e=>(0,s.jsx)(hd,{...e,children:(0,s.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,s.jsx)("path",{d:"M0.519,0.991 L0.093,0.825 C0.01,0.793,-0.025,0.694,0.019,0.616 L0.321,0.075 C0.364,-0.003,0.466,-0.023,0.536,0.033 L0.946,0.364 C1,0.414,1,0.505,0.97,0.568 L0.685,0.944 C0.646,0.995,0.579,1,0.519,0.991"})})}),DV={LEFT_OVERLAY:ob,LEFT:ob,CENTERED:rb,CENTERED_OVERLAY:rb,SPLIT_LEFT:ab,SPLIT_LEFT_IMAGE:ab,SPLIT_RIGHT:ib,SPLIT_RIGHT_IMAGE:ib},hd=({children:e,className:t="svgPath",height:n,width:o,viewBox:r})=>(0,s.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focusable:"false",height:n,viewBox:r,width:o,xmlns:"http://www.w3.org/2000/svg",children:e});function Tr({className:e,coverPageType:t}){const n=t?DV[t]:null;return n?(0,s.jsx)(n,{className:e}):null}const cb=V("cover"),Sa=()=>(0,s.jsxs)("div",{className:cb("author-published-wrap"),children:[(0,s.jsx)(Is,{}),(0,s.jsx)(Vx,{})]}),FV=({coverPageType:e})=>{const t=od();return(0,s.jsxs)(Fm,{children:[(0,s.jsx)(Tr,{coverPageType:e}),(0,s.jsxs)(rn,{children:[!t&&(0,s.jsx)(Vt,{}),(0,s.jsx)(Sa,{}),(0,s.jsx)(an,{}),t&&(0,s.jsx)(Vt,{}),(0,s.jsx)(on,{})]})]})},HV=({coverPageType:e})=>{const t=od();return(0,s.jsxs)(Un,{children:[(0,s.jsx)(Tr,{coverPageType:e}),(0,s.jsxs)(rn,{children:[!t&&(0,s.jsx)(Vt,{}),(0,s.jsx)(Sa,{}),(0,s.jsx)(an,{}),t&&(0,s.jsx)(Vt,{}),(0,s.jsx)(on,{})]})]})},$V=({coverPageType:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Tr,{coverPageType:e}),(0,s.jsx)(ud,{}),(0,s.jsx)(Un,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Vt,{}),(0,s.jsx)(Sa,{}),(0,s.jsx)(an,{}),(0,s.jsx)(on,{})]})})]}),VV=({accentColor:e,coverPageType:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Un,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Vt,{}),(0,s.jsx)(Sa,{}),(0,s.jsx)(an,{}),(0,s.jsx)(on,{})]})}),(0,s.jsx)(Tr,{coverPageType:t}),(0,s.jsx)(ud,{accentColor:e,isShape:!0})]}),zV=({coverPageType:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Un,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Vt,{}),(0,s.jsx)(Sa,{}),(0,s.jsx)(an,{}),(0,s.jsx)(on,{})]})}),(0,s.jsx)(Tr,{coverPageType:e}),(0,s.jsx)(ud,{})]}),_V=({accentColor:e,coverPageType:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Tr,{coverPageType:t}),(0,s.jsx)(ud,{accentColor:e,isShape:!0}),(0,s.jsx)(Un,{children:(0,s.jsxs)(rn,{children:[(0,s.jsx)(Vt,{}),(0,s.jsx)(Sa,{}),(0,s.jsx)(an,{}),(0,s.jsx)(on,{})]})})]});function UV(e){const t=Gi(),n={...e,coverPageType:t};switch(t){default:case de.LEFT_OVERLAY:case de.CENTERED_OVERLAY:return(0,s.jsx)(FV,{...n});case de.LEFT:case de.CENTERED:return(0,s.jsx)(HV,{...n});case de.SPLIT_LEFT:return(0,s.jsx)(VV,{...n});case de.SPLIT_LEFT_IMAGE:return(0,s.jsx)(zV,{...n});case de.SPLIT_RIGHT:return(0,s.jsx)(_V,{...n});case de.SPLIT_RIGHT_IMAGE:return(0,s.jsx)($V,{...n})}}function GV(e){const n=!!!!Ei();return(0,s.jsx)("header",{className:cb("header",{"with-info":n}),"data-testid":"cover-header",children:(0,s.jsx)(UV,{...e})})}const WV={[te.RISE_CLASSIC]:IV,[te.HORIZON]:BV,[te.APEX]:GV};function KV(){const e=ut(),t=WV[e];return(0,s.jsx)(t,{})}const QV=V("cover");function YV({children:e}){const t=ut(),n=Gi(),o=Sl()(n);return(0,s.jsx)("div",{className:QV({layout:o}),"data-testid":`cover-layout-${o}`,"data-theme-id":t,id:"cover",children:e})}const ZV=["[href]",'[tabindex]:not([tabindex=""])',"audio[controls]","button:not([disabled])","details:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","summary:not([disabled])","textarea:not([disabled])","video[controls]"].map(e=>`${e}:not([tabindex="-1"]):not([hidden]):not([aria-hidden="true"])`).join(", "),lb=(e,t=!1)=>n=>{const o=db(n);if(o.length===0)return;const r=e>=o.length&&t?0:e;return Wp()(r,o)},db=e=>e?Array.from(e.querySelectorAll(ZV)).filter(t=>window.getComputedStyle(t).display!=="none"):[],ub=lb(0),XV=lb(-1),Hm=e=>ub(e)?.focus?.();function qV(){const e=(0,u.useRef)(null);function t(n){const o=ub(e.current),r=XV(e.current);Il(n)&&(n.shiftKey?document.activeElement===o&&(r.focus(),n.preventDefault()):document.activeElement===r&&(o.focus(),n.preventDefault()))}return(0,u.useEffect)(()=>{const n=e?.current;return n?.addEventListener("keydown",t),()=>{n?.removeEventListener("keydown",t)}},[]),e}var $m;const Vm=u.createContext(null);Vm.displayName="UndoManagerContext";function She(e){return $m(Vm.Provider,{value:e.undoManager,children:e.children})}function hb(){return u.useContext(Vm)}function Lhe(e){function t(n){const o=hb();return $m(e,{...n,undoManager:o})}return t.displayName=`withUndoManager(${e.displayName||e.name})`,t}function mb(){const e=hb();u.useEffect(()=>{if(e!=null)return e.disable(),()=>e.enable()},[e])}function The(e){function t(n){return mb(),$m(e,{...n})}return t.displayName=`withDisableUndoManager(${e.displayName||e.name})`,t}const Kt=V("modal"),md=u.forwardRef((e,t)=>{const{children:n,className:o,"data-testid":r,darkOverlay:a,disableBackgroundScroll:i,disableCloseOnOverlayClick:c,disableCloseOnEscape:l=!1,focusFirstInput:d=!0,focusOnOpen:h=!0,footer:m,forceToTop:f=!1,fullscreen:v=!1,heading:C,hideCloseButton:g=!1,hideHeader:x=!1,skipDialogClose:b=!1,useTopLayer:L=!0,onCancel:S,onClose:y=qt,onClickBack:T,onCloseBubbles:k=!1,onOverlayClick:I,scroll:E=!1,subHeading:w,subText:A,width:N}=e;mb();const R=qV(),M=(0,u.useRef)(null),P=(0,u.useCallback)(()=>{const D=R.current;!b&&D?.open&&D.close(),y()},[y,R,b]);(0,u.useEffect)(()=>{const D=H=>{fn(H)&&!l&&(H.preventDefault(),H.stopPropagation(),S?.(H),P())};return document.addEventListener("keydown",D,!k),()=>{document.removeEventListener("keydown",D,!k)}},[l,S,P,k]),(0,u.useEffect)(()=>{const D=R.current;if(D)return L?D.showModal():D.show(),h||setTimeout(()=>{D.contains(document.activeElement)&&document.activeElement?.blur()},0),()=>{D.close()}},[R,L,h]),(0,u.useEffect)(()=>{if(d&&R.current){const H=db(R.current).find(W=>W.tagName==="INPUT"||W.tagName==="TEXTAREA"||W.tagName==="SELECT"),$=H||M?.current;$?.focus(),$ instanceof HTMLTextAreaElement&&$.setSelectionRange($.value.length,$.value.length)}},[d,R]),(0,u.useEffect)(()=>(i&&(document.scrollingElement||document.documentElement).classList.add("no-scroll"),()=>{i&&(document.scrollingElement||document.documentElement).classList.remove("no-scroll")}),[i,R]);const j=Kt({"force-to-top":f}).mix(o),O=Kt("content",{"with-footer":!!m,"force-scroll":!!E}),B=Kt("overlay",{dark:!!a});return(0,s.jsxs)("dialog",{"aria-labelledby":"modal-heading","aria-modal":"true",className:j.toString(),"data-testid":r,onClose:P,ref:D=>{R.current=D,t&&(t.current=D)},role:"dialog",children:[(0,s.jsx)("div",{id:"modal-portal"}),(0,s.jsx)("div",{className:B,onClick:c?void 0:I||P}),(0,s.jsxs)("div",{className:Kt("dialog",{fullscreen:v}),style:N&&!v?{width:N}:{},children:[(!x||!g)&&(0,s.jsxs)("div",{className:Kt("heading-wrapper"),children:[(0,s.jsxs)("div",{className:Kt("heading-flexbox"),children:[!x&&(0,s.jsxs)("div",{className:Kt("header"),children:[T&&(0,s.jsx)("button",{"aria-label":"back to previous page",className:Kt("back"),onClick:T,type:"button",children:(0,s.jsx)(ie,{className:Kt("back-icon"),name:"arrow-left"})}),(0,s.jsxs)("h1",{className:Kt("heading"),id:"modal-heading",children:[C,(0,s.jsx)("span",{className:Kt("subheading"),children:w})]})]}),!g&&(0,s.jsx)("button",{"aria-label":"close dialog",className:Kt("close"),onClick:P,ref:M,type:"button",children:(0,s.jsx)(ie,{className:Kt("close-icon"),name:"close"})})]}),A?(0,s.jsx)("h2",{className:Kt("subtitle"),children:A}):[]]}),(0,s.jsx)("div",{className:O,children:n}),m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:Kt("footer-shadow")}),(0,s.jsx)("div",{className:Kt("footer"),children:m})]})]})]})}),La=V("locale-selector"),zm=({onClose:e})=>{const t=(0,je.zy)(),n=ce(),o=P7(),r=sl(),a=M7(),i=a?.length?a:o&&r?r?.map(T=>T.locale):void 0,[c,l]=(0,u.useState)(!1),d=c&&(i?.length||0)>1,h=(0,Oe.A)(d),m=ct(n?.title),{currentLocale:f,setCurrentLocale:v}=nt(),C=IM(),g=Ce(),[x,b]=(0,u.useState)(!1),L=(0,u.useCallback)(T=>{T8(T),v(T)},[v]),S=()=>{Dn(Q0(!1))};(0,u.useEffect)(()=>{h&&!d&&e?.()},[e,h,d]),(0,u.useEffect)(()=>{if(!i||x||o===void 0||!r)return;if(i.length===1){L(i[0]),b(!0);return}const T=vg(void 0),k=L8()??"";if(k!==""){L(k),b(!0),l(!1);return}T?.p==null&&k===""?l(!0):(l(!1),S());const E=(navigator.language??"en-US").toLowerCase(),w=i.find(A=>A.toLowerCase()===E);L(w?E:i[0]),b(!0)},[i,t,L,x,o,r,l]);const y=T=>{T.preventDefault();const k=T.target.value;L(k)};return!d||o===void 0||!r?null:(0,s.jsx)(Os,{classNames:"modal",timeout:400,children:(0,s.jsx)(md,{className:La("modal"),disableCloseOnOverlayClick:!0,hideCloseButton:!0,hideHeader:!0,onClose:S,children:(0,s.jsxs)("div",{className:La("container"),children:[(0,s.jsx)("div",{className:La("heading"),children:g.l10nChooseLanguage}),(0,s.jsx)("div",{className:La("course-title"),children:m}),(0,s.jsx)("div",{className:La("selector"),children:(0,s.jsx)("select",{onChange:y,value:f,children:i.map(T=>(0,s.jsx)("option",{value:T,children:C(T)},T))})}),(0,s.jsx)("div",{className:La("footer"),children:(0,s.jsx)(qs.ArcButton,{onClick:S,size:"lg",children:g.l10nChooseLanguageContinue})})]})})})},JV=V("cover-container"),fb=()=>document.querySelector("h1")?.focus({preventScroll:!0});function ez(){const{didNavigate:e,shouldSkipAutoFocusOnNavigate:t}=Ol(),o=Ce()?.overviewPageTitleSuffix,r=Jr();return(0,u.useEffect)(()=>{t||e&&fb()},[e,t]),(0,s.jsxs)(xr,{title:ki(`${r} - ${o}`),children:[(0,s.jsx)("main",{children:(0,s.jsx)("div",{className:JV({}),children:(0,s.jsxs)(YV,{children:[(0,s.jsx)(KV,{}),(0,s.jsx)(dV,{})]})})}),(0,s.jsx)(zm,{onClose:fb})]})}const tz=ez,nz=/^([^/\s]+)\/([^/\s]+)$/;function sz(e){const t=nz.exec(e.trim());return t?{lessonId:t[1],blockId:t[2]}:null}function Ehe(e,t){return`${e}/${t}`}const pb="blockId";function Nhe(e,t){return`#/lessons/${e}?${pb}=${t}`}const gb=(0,u.createContext)(void 0);function fd(){const e=(0,u.useContext)(gb);return e||(console.warn("useMediaContext must be used within a MediaProvider"),{mode:"readonly",openTranscript:null,closeTranscript:null,onTranscriptUpdate:null,lessonId:"",uploadAudio:null,aiEnabled:!1,aiWriterContext:void 0,removeMediaRecordType:void 0,removeItemMedia:void 0,handleOpenMediaModal:void 0,showAssetLibraryDialog:void 0,hideAssetLibraryDialog:void 0,handleDelete:void 0})}function vb(e){function t(n){const o=fd();return(0,s.jsx)(e,{...n,...o})}return t.displayName=`WithMediaContextWrapper(${e.name})`,t}function oz({children:e,lessonId:t,mode:n="readonly",openTranscript:o,closeTranscript:r,onTranscriptUpdate:a,disableTranscriptButton:i=!1}){const c={mode:n,lessonId:t||"",openTranscript:o||null,closeTranscript:r||null,onTranscriptUpdate:a||null,disableTranscriptButton:i,uploadAudio:null,aiEnabled:!1,aiWriterContext:void 0,removeMediaRecordType:void 0,removeItemMedia:void 0,handleOpenMediaModal:void 0,showAssetLibraryDialog:void 0,hideAssetLibraryDialog:void 0,handleDelete:void 0};return(0,s.jsx)(gb.Provider,{value:c,children:e})}const Cb=(0,u.createContext)(void 0),rz=Cb.Provider;function Qi(){return(0,u.useContext)(Cb)}function az({children:e}){const t=ue(n=>n.transcriptPanel);return(0,s.jsx)(rz,{value:t,children:e})}const xb=(0,fe.action)(tC),Yi=(0,fe.action)(nC),_m=(0,fe.action)(sC);function ps(e){return e.refs?Sl()("audio-id__refs_"+e.refs.toLowerCase()):""}function Um(e){if(e)return`audio-transcript--${e}`}function bb(e){if(e)return`audio-player-transcript-toggle--${e}`}const yb=V("course-exit");function Sb(e){const t=Ce(),{className:n,lmsOptions:o,style:r}=e;return o?.enableExitCourse?(0,s.jsx)("div",{className:yb("wrapper"),children:(0,s.jsx)("button",{className:yb("button").mix(n),onClick:Up,style:r,type:"button",children:t?.courseExit})}):null}const iz=960;function Zi(){return kt(iz)}function cz(){const e=Fe(),t=Zi(),n=ch();return AN({course:e,isMobile:t,search:n})}function lz(){const e=Fe(),t=Zi();return RN({course:e,isMobile:t})}const Gm=V("nav-control"),dz=()=>{const[e,t]=(0,u.useState)(!1);return(0,Xe.A)(W2,()=>t(!0)),(0,Xe.A)(Wh,()=>t(!1)),e},uz=({"aria-controls":e,isNavOpen:t,toggleNav:n,hideNav:o})=>{const{buttonNavigationStyle:r,lmsOptions:a,showNavigationButtons:i,...c}=ce(),l=(0,u.useRef)(null),[d,h]=(0,u.useState)(0),m=Ce(),f=Zi(),v=hl(),C=dz(),g=(0,u.useMemo)(()=>c.lessons?.find(k=>k.id===v),[c.lessons,v]),x=g?.type==="quiz"&&!!g.settings?.timer,b=a?.enableExitCourse,L=x||b,S=c.navigationType===rr.COMPACT,y=S?"fixed-course-exit":void 0;(0,u.useEffect)(()=>{l.current=document.querySelector(".page-wrap");const I=document.querySelector(".lesson-nav--previous")?.clientHeight??60,E=!i||r===Vs.FLOATING&&!f;function w({target:A}){const N=A instanceof HTMLElement?A.scrollTop:0,R=I-N;h(R)}return C&&!E?l.current.scrollTop===0?h(I):l.current.addEventListener("scroll",w):h(0),()=>l.current.removeEventListener("scroll",w)},[r,f,C,i]);const T=(0,u.useCallback)(()=>{const k=document.getElementsByClassName("nav-control__menu--top-nav-bar").item(0),I=k instanceof HTMLElement?k:null;if(l.current&&I){const E=l.current.offsetWidth-l.current.clientWidth||0;I.style.maxWidth=`calc(100% - ${E}px)`}},[]);return(0,u.useLayoutEffect)(()=>{L&&T()},[L,T]),(0,s.jsx)("div",{className:Gm("wrapper"),children:(0,s.jsxs)("div",{className:Gm("menu",{"is-timed-quiz":x,"nav-off":o,"top-nav-bar":L}),style:{marginTop:d},children:[!o&&(!S||f)&&(0,s.jsx)("button",{"aria-controls":e,"aria-expanded":t,"aria-label":t?m?.a11yNavigationMenuClose:m?.a11yNavigationMenuOpen,className:Gm("button"),onClick:n,type:"button",children:(0,s.jsx)(ie,{classNameIcon:"page-menu-toggle__icon",name:"bars-regular"})}),(0,s.jsx)(Sb,{className:y,lmsOptions:a})]})})},Wm=({"aria-hidden":e=void 0,"aria-label":t=void 0,progress:n=0,runnerClass:o,trackClass:r})=>(0,s.jsx)("div",{"aria-hidden":e,"aria-label":t,className:r,role:"img",children:(0,s.jsx)("div",{className:o,style:{width:`${n}%`}})}),Ro=V("nav-compact"),hz=e=>{const{lessonPosition:t,labelLessonName:n,labelLessonPreposition:o,totalLessons:r}=e;return t<=0?null:(0,s.jsx)("div",{className:Ro("header-counter"),"data-testid":"nav-compact-counter",children:`${n} ${t} ${o} ${r}`})},mz=e=>{const{classProgressRunner:t,classProgressText:n,classProgressTrack:o,percentComplete:r,percentCompleteText:a,navExpanded:i}=e;return(0,s.jsxs)("div",{className:Ro("header-progress"),"data-testid":"nav-compact-progress",children:[(0,s.jsx)("div",{className:n,children:a}),(0,s.jsx)(Wm,{"aria-hidden":i,"aria-label":a,progress:r,runnerClass:t,trackClass:o})]})},fz=({closeNav:e,isExpanded:t,openNav:n})=>{const o=Xt(),r=tt(),a=fr(),i=ce(),c=Jr(),l=na(),d=Ce(),h=To(),m=al(),f=hl(),v=_C(),C=(0,u.useMemo)(()=>i?.lessonsOnly?.length??0,[i?.lessonsOnly]),g=(0,u.useMemo)(()=>v[f]??-1,[v,f]),x=a?.navigationStyle,b=(0,u.useMemo)(()=>yi(x),[x]),L=(0,u.useCallback)(()=>{t?e():n()},[t,n,e]),S=a?.exportSettings?.webExportSettings,y=!Ls.isInstantLink&&(a?.lmsOptions?.disableCoverPage||S?.disableCoverPage),T=(0,u.useCallback)(ne=>{ne.preventDefault(),Js(()=>{o("/")},"lesson-to-cover")},[o]),E=`${rs()?`%${l}`:`${l}%`} ${d?.lessonComplete??""}`,{alpha:w,ariaLabel:A,media:N,role:R}=Sr("coverImage"),M=(0,u.useMemo)(()=>ea({alpha:w,color:a?.theme?.coverImageColor??void 0,media:N}),[w,a?.theme?.coverImageColor,N]),P=Ro("header",{collapsed:!t}),j=Ro("header-image",{collapsed:!t}),O="nav-compact__header-inner",B="nav-compact__header-control",D=Ro("header-title-link",{collapsed:!t}),H=Ro("header-progress-text",{collapsed:!t}),$=Ro("header-progress-track",{collapsed:!t}),W=Ro("header-progress-runner",{collapsed:!t}),U="nav-compact__header-strip",Z=(0,u.useCallback)(()=>{r(fi(!h?.active))},[r,h?.active]);return(0,s.jsxs)("section",{"aria-label":"Course Information",className:P,"data-testid":"nav-compact-header",children:[b&&M&&(0,s.jsx)("div",{"aria-label":A,className:j,role:R,style:M}),(0,s.jsxs)("div",{className:O,children:[(0,s.jsxs)("div",{className:U,children:[(0,s.jsxs)("div",{className:"nav-compact__header-controls",children:[a?.allowSearch&&m!=="restricted"&&t&&(0,s.jsx)("button",{"aria-label":d?.a11ySearchOpen,className:`${B} nav-compact__header-search`,"data-testid":"nav-compact-search",onClick:Z,type:"button",children:(0,s.jsx)(ji,{className:"nav-compact__header-control-icon nav-compact__header-search-icon"})}),(0,s.jsxs)("button",{"aria-controls":"nav-compact-outline","aria-expanded":t,"aria-label":t?d?.a11yNavigationMenuClose:d?.a11yNavigationMenuOpen,className:`${B} nav-compact__header-toggle`,"data-testid":"nav-compact-toggle",onClick:L,type:"button",children:[t&&(0,s.jsx)(nD,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"}),!t&&(0,s.jsx)(sD,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"})]})]}),(0,s.jsx)(hz,{labelLessonName:d?.lessonName??"",labelLessonPreposition:d?.lessonPreposition??"",lessonPosition:g,totalLessons:C})]}),(0,s.jsx)("div",{className:"nav-compact__header-title","data-testid":"nav-compact-title",children:y?(0,s.jsx)("span",{className:D,children:c}):(0,s.jsx)(nn,{className:D,onClick:T,to:"/",children:c})}),(0,s.jsx)(mz,{classProgressRunner:W,classProgressText:H,classProgressTrack:$,navExpanded:t,percentComplete:l,percentCompleteText:E})]})]})};var pz=p(65196),gz=p.n(pz),vz=p(34872),Cz=p.n(vz),xz=p(98641),bz=p.n(xz),yz,Sz,Lz,Tz,kz;function Lb(e,t,n="..."){const o=e?e.toString():"";return o.length>t?o.substr(0,t-1)+n:o}const Rhe=e=>kz(t=>Sz(t)>e,Lz(0,e)),Iz=new RegExp(/^[0-9]+$/),Ez=e=>Iz.test(e),Nz=e=>e>=0,jz=e=>e<=100,Phe=e=>e==="",Mhe=e=>Ez(e)&&jz(e)&&Nz(e),Ohe=e=>String(Number(e)),Tb=Me()(Qr()(""),gz()(Cz(),0)),Bhe=Me()(Qr()(" "),ft()(Tb),R0()(" ")),kb=Me()(Qr()(" "),R0()(/(?=[A-Z]|^)/)),Dhe=e=>e?yz(Tb,Tz,kb)(e):"",Fhe=Me()(bz(),kb);function Ib({id:e,isEnabled:t,isSectionLesson:n,last:o}){const{navigationStyle:r}=ce(),{settings:a}=At(e)??{},i=oa(e),c=Ws(),l=kh(String(e)),d=(0,u.useMemo)(()=>Eo(r),[r]),h=String(e)===c,m=a?.isGeneratingAIContent===!0,f=Lb(i||"",45),[v,C]=(0,u.useState)(!1),g=(0,u.useCallback)(()=>C(!0),[]),x=(0,u.useCallback)(()=>C(!1),[]),b=n?"nav-compact__outline-section-item":"nav-compact__outline-item",L=`${b}__link`,S=(0,s.jsx)(dd,{canComplete:l,id:e,isDark:d,isEnabled:t,isTooltipVisible:v,onHideTooltip:x,onShowTooltip:g,scope:Co.COMPACT});return(0,s.jsx)("li",{className:"nav-compact__outline-list-item","data-testid":`nav-compact-lesson-${e}`,role:"listitem",children:m?(0,s.jsx)("div",{className:b,children:(0,s.jsx)("span",{"aria-disabled":"true",className:`${L} ${L}--generating`,"data-testid":`nav-compact-lesson-${e}-generating`,children:f})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)($i,{className:b,dark:d,isCurrentLesson:h,isTooltipEnabled:!l,last:o,lessonId:e,onHideProgressTooltip:x,onShowProgressTooltip:g,showProgressDelay:0,tooltipClassName:`${b}-tooltip`,children:[f,!l&&S]}),l&&S]})})}const wz=V("nav-compact"),Az=({id:e})=>{const t=At(e),n=ct(t?.title),o=wz("outline-section-empty");return(0,s.jsx)("div",{className:o,children:(0,s.jsx)("span",{children:n})})};var Ta=p(82920);const Rz=({index:e,isEnabled:t,lessonIds:n,id:o})=>{const r=ce(),a=r?.theme,i=r?.themeId,c=a?.navigationSectionsExpanded??!0,l=At(String(o)),d=ct(l?.title),[h,m]=Ta.useState(c);Ta.useEffect(()=>{m(c)},[c]);const[f,v]=Ta.useState(),C=Ta.useRef(null),g=`sublistCompact-${e}`,x=String(i),b=h?"nav-compact__outline-section-toggle-icon":"nav-compact__outline-section-toggle-icon nav-compact__outline-section-toggle-icon--collapsed",L=h?"nav-compact__outline-section-list":"nav-compact__outline-section-list nav-compact__outline-section-list--collapsed",S=h?"nav-compact__outline-section-toggle":"nav-compact__outline-section-toggle nav-compact__outline-section-toggle--collapsed",y=Ta.useCallback(()=>{m(T=>!T)},[]);return Ta.useLayoutEffect(()=>{const T=setTimeout(()=>{C.current&&v(C.current.scrollHeight)},0);return()=>{clearTimeout(T)}},[n.length,x]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{"aria-controls":g,"aria-expanded":h,className:S,onClick:y,tabIndex:t?void 0:-1,type:"button",children:[(0,s.jsx)("span",{className:"nav-compact__outline-section-toggle-text",children:d}),(0,s.jsx)(hx,{className:b})]}),(0,s.jsx)(rd,{inert:!h,children:(0,s.jsx)("ol",{"aria-hidden":h?void 0:!0,className:L,id:g,ref:C,role:"list",style:{maxHeight:f},children:n.map((T,k)=>(0,s.jsx)(Ib,{id:T,isEnabled:t&&h,isSectionLesson:!0,last:k===n.length-1},T))})})]})},Pz=({index:e,isEnabled:t,lessonIds:n})=>{const[o,...r]=n,a="nav-compact__outline-item nav-compact__outline-section";return Nt()(r)?(0,s.jsx)("li",{className:a,role:"listitem",children:(0,s.jsx)(Az,{id:o})}):(0,s.jsx)("li",{className:a,role:"listitem",children:(0,s.jsx)(Rz,{id:o,index:e,isEnabled:t,lessonIds:r})})},Mz=({index:e,isEnabled:t,lessonIds:n})=>gl(n)?(0,s.jsx)(Pz,{index:e,isEnabled:t,lessonIds:n}):n.map((r,a)=>(0,s.jsx)(Ib,{id:r,isEnabled:t,isSectionLesson:!1,last:a===n.length-1},r)),Oz=({className:e="",isEnabled:t})=>{const n=Cl(),o=Ce(),r=ut(),a=[e,r===te.RISE_CLASSIC?"brand--ui":void 0,"nav-compact__outline",t?void 0:"nav-compact__outline--collapsed"].filter(Boolean).join(" ");return(0,s.jsx)("section",{"aria-label":o?.a11yRegionNavOverview,className:a,"data-testid":"nav-compact-outline",id:"nav-compact-outline",children:is(n)&&(0,s.jsx)("ol",{className:"nav-compact__outline-list","data-testid":"nav-compact-outline-list",role:"list",children:n.map((i,c)=>Nt()(i)?null:(0,s.jsx)(Mz,{index:c,isEnabled:t,lessonIds:i},c))})})};var Bz=p(82920);const Dz=()=>{const[e,t]=Bz.useState(!1);return(0,Xe.A)(K2,()=>t(!0)),(0,Xe.A)(Kh,()=>t(!1)),e},Eb=V("nav-compact"),Nb="nav-content-compact",Fz=(0,u.forwardRef)(({closeNav:e,isExpanded:t,openNav:n},o)=>{const r=fr(),{navigationStyle:a,theme:i}=r??{},c=i?.coverImageColor,l=i?.progressIndicatorStyle,d=ue(y=>y.course?.theme?.buttonNavigationStyle==="FULL"?Math.round(-(y.ui.lessonNavNextButton?.intersectionRect?.height??0)):0),h=(0,u.useMemo)(()=>Eo(a),[a]),m=(0,u.useMemo)(()=>a===ar.LIGHT_ACCENT||a===ar.DARK_ACCENT,[a]),f=Dz(),v=(0,u.useMemo)(()=>yi(a),[a]),C=l===qe.CIRCULAR_FILL,g=l===qe.INCOMPLETE_COMPLETE,x=(0,u.useMemo)(()=>v&&c===rt.LIGHT,[v,c]),b=Eb({accent:m,dark:h,light:!h,"image-dark-overlay":v&&!x,"image-light-overlay":v&&x,"progress-circular-fill":C,"progress-incomplete-complete":g,collapsed:!t,navNextIsVisible:f}),L=Eb("wrap",{collapsed:!t}),S={transform:`translateY(${d}px)`};return(0,s.jsx)("div",{className:b,"data-testid":"nav-compact",id:Nb,ref:o,style:S,children:(0,s.jsxs)("div",{className:L,children:[(0,s.jsx)(fz,{closeNav:e,isExpanded:t,openNav:n}),(0,s.jsx)(rd,{inert:!t,children:(0,s.jsx)(Oz,{isEnabled:t})})]})})});function jb(e,t){const[n,o]=(0,u.useState)(null),{root:r,rootMargin:a,threshold:i}=t;return(0,u.useEffect)(()=>{if(e&&typeof IntersectionObserver=="function"){const c=new IntersectionObserver(l=>{o(l[0])},{root:r,rootMargin:a,threshold:i});return c.observe(e),()=>{o(null),c.disconnect()}}return()=>{}},[e,r,a,i]),n}const Hz={closeNav:()=>{},openNav:()=>{},openSearch:()=>{},closeSearch:()=>{},searchActive:!1},wb=Object.assign((0,u.createContext)(Hz),{displayName:"OverlayNavControlContext"});function $z(e){const{children:t,closeNav:n,openNav:o}=e,[r,a]=(0,u.useState)(!1),i=(0,u.useCallback)(()=>{a(!0)},[]),c=(0,u.useCallback)(()=>{a(!1)},[]);return(0,s.jsx)(wb.Provider,{value:{closeNav:n,openNav:o,openSearch:i,closeSearch:c,searchActive:r},children:t})}const pd=()=>(0,u.useContext)(wb),gd=V("nav-overlay"),Vz=({className:e})=>{const t=Ce(),n=rs(),o=na(),a=`${n?`%${o}`:`${o}%`} ${t?.lessonComplete??""}`,i=gd("header-progress-runner"),c=gd("header-progress-text"),l=gd("header-progress-track");return(0,s.jsxs)("div",{className:gd("header-progress").mix(e),"data-testid":"nav-overlay-progress",children:[(0,s.jsx)(Wm,{"aria-hidden":!0,progress:o,runnerClass:i,trackClass:l}),(0,s.jsx)("div",{className:c,children:a})]})},to=V("nav-overlay"),zz=()=>{const e=ce(),t=Xt(),n=Jr(),{allowSearch:o,lmsOptions:r}=e,a=al(),i=Ce(),c=pd(),l=(0,u.useRef)(null),d=to("header-control-btn"),h=e?.exportSettings?.webExportSettings,m=!Ls.isInstantLink&&(r?.disableCoverPage||h?.disableCoverPage),f=v=>{v.preventDefault(),Js(()=>{t("/")},"lesson-to-cover")};return(0,s.jsx)("section",{"aria-label":"Course Information","data-testid":"nav-overlay-header",children:(0,s.jsxs)("div",{className:to("header-container"),children:[(0,s.jsxs)("div",{className:to("header-controls"),children:[(0,s.jsx)("button",{"aria-label":i?.a11yNavigationMenuClose,className:d,"data-testid":"nav-overlay-close",onClick:c.closeNav,ref:l,type:"button",children:(0,s.jsx)(Fl,{className:to("header-close-icon")})}),o&&a!=="restricted"&&(0,s.jsx)("button",{"aria-label":i?.a11ySearchOpen,className:d,"data-testid":"nav-overlay-search",onClick:c.openSearch,type:"button",children:(0,s.jsx)(ji,{className:to("header-search-icon")})})]}),(0,s.jsxs)("div",{className:to("header-title-progress-container"),children:[(0,s.jsx)("h1",{className:to("header-title"),"data-testid":"nav-overlay-title",id:"nav-overlay-title",children:m?(0,s.jsx)("span",{className:to("header-title"),children:n}):(0,s.jsx)(nn,{className:to("header-title-link"),onClick:f,to:"/",children:n})}),(0,s.jsx)(Vz,{})]})]})})},_z={[On.ARTICLE]:dx,[On.INTERACTION]:dD,[On.QUIZ]:aD,[On.VIDEO]:uD},vd=({className:e,icon:t})=>{const n=_z[t]??dx;return(0,s.jsx)(n,{className:e,icon:t})},no=V("nav-overlay"),Ab=({first:e,id:t,isEnabled:n,isSectionLesson:o,last:r})=>{const{navigationStyle:a}=ce(),{icon:i,settings:c}=At(t)??{},l=oa(t),d=pd(),h=kh(String(t)),m=Eo(a),f=c?.isGeneratingAIContent===!0,v=no("outline-item",{section:o}),C=`${no("outline-item")}__link`,g=no("outline-item-link-icon",{quiz:i==="Quiz"}),x=(0,u.useCallback)(()=>{d.closeNav()},[d]),[b,L]=(0,u.useState)(!1),S=(0,u.useCallback)(()=>L(!0),[]),y=(0,u.useCallback)(()=>L(!1),[]),T=(0,s.jsx)(dd,{canComplete:h,id:t,isDark:m,isEnabled:n,isTooltipVisible:b,onHideTooltip:y,onShowTooltip:S,scope:Co.OVERLAY});return(0,s.jsx)("li",{className:no("outline-list-item",{first:e,last:r}),"data-testid":`nav-overlay-lesson-${t}`,role:"listitem",children:f?(0,s.jsx)("div",{className:v.toString(),children:(0,s.jsxs)("span",{"aria-disabled":"true",className:`${C} ${C}--generating`,"data-testid":`nav-overlay-lesson-${t}-generating`,children:[(0,s.jsx)("span",{className:no("outline-icon-wrap"),children:(0,s.jsx)(vd,{className:g,icon:i??On.ARTICLE})}),(0,s.jsx)("span",{className:no("outline-lesson-title"),children:l})]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)($i,{className:v.toString(),dark:m,isTooltipEnabled:!h,lessonId:t,onHideProgressTooltip:y,onNavigate:x,onShowProgressTooltip:S,showProgressDelay:null,tooltipClassName:no("outline-item-tooltip").toString(),children:[(0,s.jsx)("span",{className:no("outline-icon-wrap"),children:(0,s.jsx)(vd,{className:g,icon:i??On.ARTICLE})}),(0,s.jsx)("span",{className:no("outline-lesson-title"),children:l}),!h&&T]}),h&&T]})})},Uz=V("nav-overlay"),Gz=({id:e})=>{const t=At(e),n=ct(t?.title);return(0,s.jsx)("span",{className:Uz("outline-section-text"),children:n})},Rb=V("nav-overlay"),Wz=({isEnabled:e,lessonIds:t})=>{const n=(0,u.useRef)(null);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:Rb("outline-section-divider")}),(0,s.jsx)("ol",{className:Rb("outline-section-list"),ref:n,role:"list",children:t.map((o,r)=>(0,s.jsx)(Ab,{id:o,isEnabled:e,isSectionLesson:!0,last:r===t.length-1},o))})]})},Kz=V("nav-overlay"),Qz=({index:e,isEnabled:t,lessonIds:n})=>{const[o,...r]=n,a=Kz("outline-item").mix("nav-overlay__outline-section");return Nt()(r)?(0,s.jsx)("li",{className:a,role:"listitem",children:(0,s.jsx)(Gz,{id:o})}):(0,s.jsx)("li",{className:a,role:"listitem",children:(0,s.jsx)(Wz,{index:e,isEnabled:t,lessonIds:r})})},Yz=({index:e,isEnabled:t,lessonIds:n})=>{const o=gl(n),r=oa(n[0]),a=V("nav-overlay");return o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h2",{className:a("outline-section-text"),children:r}),(0,s.jsx)("ol",{className:a("outline-list"),"data-testid":"nav-overlay-outline-list",role:"list",children:(0,s.jsx)(Qz,{index:e,isEnabled:t,lessonIds:n})})]}):n.map((i,c)=>(0,s.jsx)(Ab,{first:c===0,id:i,isEnabled:t,isSectionLesson:!1,last:c===n.length-1},i))},Zz=V("nav-overlay"),Xz=({isEnabled:e})=>{const t=Cl(),n=Ce();return(0,s.jsx)("section",{"aria-label":n?.a11yRegionNavOverview,className:Zz("outline"),"data-testid":"nav-overlay-outline",id:"nav-overlay-outline",children:is(t)&&(0,s.jsx)(s.Fragment,{children:t.map((o,r)=>Nt()(o)?null:(0,s.jsx)(Yz,{index:r,isEnabled:e,lessonIds:o},`lessonIdGroup-${r}`))})})};var qz=p(59776),Cd=p.n(qz),kr=p(47100),Jz=p(99962),xd=p.n(Jz);const Km=Array.isArray,Pb=e=>typeof e=="number",bd=e=>!Ct()(e)&&typeof e=="object",Qm=e=>typeof e=="string",e_=(e,t,n)=>(o,r)=>{const a=xo()(r,e);if((0,Gt.uW)(o)){const i=n[o.l10nId];return typeof i!="string"?!1:!Nt()(xd()(t,(0,kr.htmlDecode)(i)))}else return bd(o)?Mb(e,t,n)(o):a&&Qm(o)?!Nt()(xd()(t,(0,kr.htmlDecode)(o))):!1},Mb=(e,t,n)=>o=>{const r=Cs()(e_(e,t,n),o);return xo()(!0,qn()(r))},t_=Mb;var n_=p(89560),Ym=p.n(n_),s_=p(79537),Zm=p.n(s_);const o_=Ym(),r_=Jt(),a_=(e,t,n)=>(o,r)=>{const a=xo()(r,e);if(Km(o))return qn()(Xm(e,t,n)(o));if((0,Gt.uW)(o)){const i=n[o.l10nId];return typeof i!="string"?0:Hn()(xd()(t,(0,kr.htmlDecode)(i)))}else return bd(o)?Xm(e,t,n)(o):a&&Qm(o)?Hn()(xd()(t,(0,kr.htmlDecode)(o))):0},Xm=(e,t,n)=>o=>Cs()(a_(e,t,n),o),qm=e=>{if(Km(e))return ft()(qm,e);if(bd(e))return qm(qn()(e));if(Pb(e))return e},i_=(e,t,n)=>o=>{const r=Xm(e,t,n)(o),a=ft()(qm,qn()(r)),i=Pc()(a).filter(Pb),c=Zm()(o_,0,i);return r_("results",c,o)},c_=(e,t,n)=>(o,r)=>{const a=xo()(r,e);return Km(o)?qn()(Jm(e,t,n)(o)):bd(o)?Jm(e,t,n)(o):a&&Qm(o)?_r()(t,n,o):o},Jm=(e,t,n)=>o=>Cs()(c_(e,t,n),o),Ob=Jm,Bb=(e,t,n,o,r)=>{const a=["caption","code","description","heading","message","name","paragraph","title"];if(Nt()(e))return!1;const i=e.replace(/[-[\]{}()"'*+?.,\\^$|#\s]/g,"\\$&"),c=new RegExp(`(${i})(?![^<]*>)`,"ig"),l="<mark>$&</mark>",d=Ob(a,c,l),h=Ob(Object.keys(n),c,l),m=ft()(b=>{const L=d(b);return Array.isArray(L)?b:{...b,...L}},t),f=o?o(e):{},v=h(n),C=b=>f[b.id]>0||t_(a,c,n)(b),g=b=>i_(a,c,n)(b),x=ft()(g,Ds()(C,t));x.forEach(b=>{b.results+=f[b.id]??0}),r(e,x,Array.isArray(v)?n:v,m)};function l_(e){if(!e)return!0;for(const t in e)return!1;return!0}function Db(){const{lessons:e,mondrian:t}=ce(),{currentLocale:n}=nt(),[o,r]=(0,u.useState)(null);return(0,u.useEffect)(()=>{l_(t)||p.e("webpack_container_remote_mondrian_learn-react").then(p.t.bind(p,4246,23)).then(a=>r(()=>a.searchItemsByLesson))},[t]),(0,u.useCallback)(a=>o?.(a,e,t,n)??{},[o,e,t,n])}const d_=Fi.Ay.animateScroll,Gn=V("nav-overlay"),u_=()=>{const e=tt(),t=vC(),n=pd(),{lessons:o}=ce(),[r,a]=(0,u.useState)(""),i=Db(),c=(0,u.useRef)(null),l=Ce(),d=Gn("search-close-btn"),h=Gn("search-clear-btn"),m=(0,u.useCallback)(()=>{n.closeSearch(),n.closeNav(),e([Kv(!0),fi(!1),hr(null)])},[e,n]),f=(0,u.useCallback)(()=>{a(""),c.current?.focus?.()},[]);(0,u.useEffect)(()=>{c.current?.focus?.()},[]);const v=(0,u.useCallback)(x=>{fn(x)&&!Cd()(r)?(x.preventDefault(),a(""),e(hr(null))):fn(x)&&Cd()(r)&&m()},[e,m,r]);(0,Xe.A)("keydown",v);const C=(0,u.useCallback)(x=>{a(x.target.value)},[]),g=(0,u.useCallback)(x=>{if(x.preventDefault(),r){const b=(L,S,y,T)=>{e([hr(L),Qv(S),Yv(y),Zv(T),fi(!0)]),d_.scrollToTop({duration:500,smooth:!0})};n.closeNav(),n.closeSearch(),Bb(r,o,t??{},i,b)}},[r,i,n,o,t,e]);return(0,s.jsxs)("div",{className:Gn("search"),"data-testid":"nav-overlay-search-container",children:[(0,s.jsx)("div",{className:Gn("search-header"),children:(0,s.jsx)("button",{"aria-label":l?.a11ySearchClose,className:d,"data-testid":"nav-overlay-search-close",onClick:m,type:"button",children:(0,s.jsx)(Fl,{className:Gn("search-close-icon")})})}),(0,s.jsx)("div",{className:Gn("search-body"),children:(0,s.jsxs)("form",{autoComplete:"off",onSubmit:g,children:[(0,s.jsxs)("div",{className:Gn("search-container"),children:[(0,s.jsx)(ji,{className:Gn("search-icon")}),(0,s.jsx)("input",{"aria-label":l?.a11ySearchInput,className:Gn("search-input").mix("brand--ui"),"data-testid":"nav-overlay-search-input",name:"search",onChange:C,placeholder:l?.search,ref:c,type:"input",value:r}),r&&(0,s.jsx)("button",{"aria-label":l?.a11ySearchInputClear,className:h,"data-testid":"nav-overlay-search-clear",onClick:f,type:"button",children:(0,s.jsx)(Fl,{className:Gn("search-clear-icon").toString()})})]}),(0,s.jsx)("div",{className:Gn("search-actions"),children:(0,s.jsx)("button",{className:Gn("search-submit-btn").mix("brand--ui"),"data-testid":"nav-overlay-search-submit",type:"submit",children:l?.search})})]})})]})},ef=V("nav-overlay"),Fb="nav-content-overlay",h_=({isExpanded:e,outlineRef:t})=>{const o=Cl()[0],r=gl(o),a=ef("body",{section:r});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(zz,{}),(0,s.jsx)("div",{className:a,ref:t,children:(0,s.jsx)(Xz,{isEnabled:e})})]})},m_=({children:e,isImage:t,hasStickyHeader:n})=>{const o=ef("content",{graphic:t,"has-sticky-header":n});return(0,s.jsxs)("div",{className:o,"data-nav-scrollable":!0,"data-testid":"nav-overlay-content",children:[e,t&&(0,s.jsx)(Dm,{})]})},f_=({isExpanded:e})=>{const t=(0,u.useRef)(null),[n,o]=(0,u.useState)(null),r=ce(),a=pd(),i=(0,Oe.A)(e),c=r?.navigationStyle,l=r?.theme?.progressIndicatorStyle,d=r?.theme?.coverImageColor,h=c===ir.ACCENT,m=c===ir.TINT,f=Eo(c),v=c===ir.GRAY,C=c===ir.LIGHT,g=yi(c),x=l===qe.CIRCULAR_FILL,b=l===qe.INCOMPLETE_COMPLETE,[L,S]=(0,u.useState)(!0),{isIntersecting:y=!1}=jb(n,{root:t?.current,threshold:1})||{},T=(0,Oe.A)(y),k=(0,u.useMemo)(()=>g&&d===rt.LIGHT,[g,d]),I=ef({"accent-tint":m,accent:h,dark:f,gray:v,"image-dark-overlay":g&&!k,"image-light-overlay":g&&k,light:C,"progress-circular-fill":x,"progress-incomplete-complete":b,closing:i&&!e});return(0,u.useEffect)(()=>{e?t.current?.showModal():setTimeout(()=>{t.current?.close()},500)},[e]),(0,u.useEffect)(()=>{const E=w=>{fn(w)&&!a.searchActive&&(w.preventDefault(),a.closeNav())};return e?document.addEventListener("keydown",E):document.removeEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}},[e,a]),(0,u.useEffect)(()=>{!L&&y?S(!0):T&&!y&&S(!1)},[y,L,T,S]),(0,s.jsx)("dialog",{"aria-labelledby":"nav-overlay-title","aria-modal":"true",className:I,"data-testid":"nav-overlay",id:Fb,ref:t,children:(0,s.jsx)(m_,{hasStickyHeader:L,isImage:g,children:a.searchActive?(0,s.jsx)(u_,{}):(0,s.jsx)(h_,{isExpanded:e,outlineRef:o})})})},Xi=V("nav-sidebar-search"),p_=({className:e="",isEnabled:t})=>{const n=tt(),o=vC(),r=(0,Oe.A)(t),{lessons:a}=ce(),i=To(),c=Ce(),l=(0,u.useRef)(null),d=Xi({disabled:!t}).mix(e),h=Xi("icon"),m=Xi("input"),f=Xi("close"),v=Xi("close-icon"),C=i?.term,g=!t,[x,b]=(0,u.useState)(""),L=Db(),S=(0,u.useCallback)(()=>{n([Kv(!0),fi(!1),hr(null)]),b("")},[n]),y=(0,u.useCallback)(I=>{fn(I)&&!Cd()(x)?(I.preventDefault(),b(""),n(hr(null))):fn(I)&&Cd()(x)&&S()},[n,S,x]),T=(0,u.useCallback)(I=>{C!=null&&n(hr(null)),b(I.target.value)},[n,C]),k=(0,u.useCallback)(I=>{I.preventDefault(),Bb(x,a,o??{},L,(w,A,N,R)=>n([hr(w),Qv(A),Yv(N),Zv(R)]))},[n,a,o,x,L]);return(0,u.useEffect)(()=>{!r&&t&&setTimeout(()=>{l.current?.focus()},50)},[t,r]),(0,u.useEffect)(()=>{C&&C!==x&&b(C)},[x,C]),(0,s.jsxs)("form",{autoComplete:"off",className:d,"data-testid":"nav-sidebar-search",onSubmit:k,children:[(0,s.jsx)(ji,{className:h}),(0,s.jsx)("input",{"aria-label":c?.a11ySearchInput,className:m,disabled:g,name:"search",onChange:T,onKeyDown:y,placeholder:c?.search,ref:l,type:"search",value:x}),(0,s.jsx)("button",{"aria-label":c?.a11ySearchClose,className:f,onClick:S,type:"reset",children:(0,s.jsx)(Fl,{className:v})})]})},tf=new WeakMap,Hb=new ResizeObserver(e=>{requestAnimationFrame(()=>{for(const t of e)tf.get(t.target)?.(t)})});function yd(e,t){(0,u.useEffect)(()=>{if(e)return tf.set(e,t),()=>tf.delete(e)},[e,t]),(0,u.useEffect)(()=>{if(e)return Hb.observe(e),()=>Hb.unobserve(e)},[e])}const Wn=V("nav-sidebar-header"),g_=V("nav-sidebar-header-ghost"),v_=()=>ue(e=>e.ui.skipToNavButton?.offsetHeight??0),C_=e=>{const{classProgressRunner:t,classProgressText:n,classProgressTrack:o,percentComplete:r,percentCompleteText:a}=e,i=ut(),c=(0,s.jsx)("div",{className:n,children:a});return(0,s.jsxs)("div",{className:Wn("progress"),"data-testid":"nav-sidebar-progress",children:[i===te.APEX&&c,(0,s.jsx)(Wm,{"aria-hidden":"true",progress:r,runnerClass:t,trackClass:o}),i!==te.APEX&&c]})},x_=({className:e,isCompact:t,isEnabled:n,navRefWidth:o,setIsCompact:r})=>{const a=tt(),i=Xt(),[c,l]=(0,u.useState)(""),[d,h]=(0,u.useState)({height:0,width:0}),[m,f]=(0,u.useState)(d),[v,C]=(0,u.useState)(d),g=v_(),[x,b]=(0,u.useState)(null),L=(0,u.useRef)(null),S=(0,u.useRef)(null),[y,T]=(0,u.useState)(null),k=ce(),I=Jr(),E=Ce(),w=na(),A=To(),N=$x(),R=rs(),M=al(),P=k?.exportSettings?.webExportSettings,j=!Ls.isInstantLink&&(k?.lmsOptions?.disableCoverPage||P?.disableCoverPage),O=k?.allowSearch&&M!=="restricted",B=k?.theme?.coverImageColor,D=k?.navigationStyle,H=(0,u.useMemo)(()=>yi(D),[D]),$=!!lz(),W=(0,Oe.A)(A),U=(A?.active||$)??!1,[Z,ne]=(0,u.useState)(!0),[Q,z]=(0,u.useState)(null),F=Wn({compact:t,searching:U,transition:Z}).mix(e),_=Wn("inner",{compact:t}),K=Wn("content",{compact:t,hidden:U}),Y=Wn("graphic",{image:H}),q=Wn("progress-runner"),J=Wn("progress-text",{compact:t}),ee=Wn("progress-track"),re=Wn("search-area",{hidden:!U}),oe=Wn("search-btn",{hidden:U}),Se=Wn("search-icon"),G=Wn("title",{compact:t}),le=g_({compact:t,searching:U}),pe=`${R?`%${w}`:`${w}%`} ${E?.lessonComplete}`,be=n&&!U?void 0:-1,ye=n&&!U?void 0:-1,{alpha:ge,media:it}=Sr("coverImage"),Ft=(0,u.useMemo)(()=>{const ke={};return H&&Object.assign(ke,ea({alpha:ge,color:B??void 0,media:it})),U&&(ke.height=m.height),ke},[ge,B,it,H,U,m.height]),Pn=(0,u.useMemo)(()=>{const ke={};return t&&(ke.bottom=`calc(100% - ${g}px)`,ke.width=o||0,ke.transition="width 0.3s",n||(ke.transition="width 0.3s",ke.width="0rem")),d.height&&(ke.height=d.height,ke.overflow="hidden",t&&(ke.transition="height 0.3s ease .1s, transform 0.3s ease .1s")),ke},[t,n,o,d.height,g]);(0,u.useEffect)(()=>{l(t&&N?Lb(I??"",45):I)},[I,t,N]);const Ht=U?void 0:{height:v.height},It=(0,u.useCallback)(()=>{f(d),a(fi(!0))},[a,d]),Go=(0,u.useCallback)(ke=>{ke.preventDefault(),Js(()=>{i("/")},"lesson-to-cover")},[i]);(0,u.useLayoutEffect)(()=>{z(document.querySelector("[data-nav-scrollable]"))},[]);const{isIntersecting:Qe=!1}=jb(x,{root:Q,threshold:0})||{},Et=(0,Oe.A)(Qe);(0,u.useEffect)(()=>{const ke=y!=null&&window.innerHeight*.4>=y.offsetHeight;Et&&!Qe&&ke?r(!0):!Et&&Qe&&r(!1)},[Qe,Et,y,r]);const Ut=(0,u.useCallback)(({target:ke})=>{const Ke={height:ke?.scrollHeight??0,width:o??0};h(Ke),f(Ke),t||C(Ke)},[t,o]);yd(y,Ut),(0,u.useLayoutEffect)(()=>{const ke=Q?.scrollTop??0;(Q||ke>0)&&Q&&(Q.scrollTop=0);const Ke={height:y?.scrollHeight??0,width:o??0};h(Ke),f(Ke),C(Ke)},[Q,o,y]),(0,u.useEffect)(()=>{O&&W?.active&&!A?.active&&L?.current?.focus()},[O,A,W]),(0,u.useEffect)(()=>{U?ne(!0):t&&ne(!1)},[U,t]);const ln=(0,u.useCallback)(ke=>{const Ke=ke.target;if(!(Ke instanceof HTMLElement)||!Ke.hasAttribute("data-nav-item")||!t||!y||!Q)return;const Sn=y.getBoundingClientRect(),Ln=Ke.getBoundingClientRect();Sn.bottom>Ln.top&&(Q.scrollTop-=Sn.height-Ln.top+5)},[Q,t,y]);return(0,Xe.A)("focusin",ln,Q),(0,u.useEffect)(()=>l(I),[I]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:le,ref:b,style:Ht}),(0,s.jsx)("div",{className:F,"data-testid":"nav-sidebar-header",ref:S,style:Pn,children:(0,s.jsxs)("div",{className:_,ref:T,children:[(0,s.jsx)("div",{className:Y,style:Ft}),O&&(0,s.jsx)("button",{"aria-label":E?.a11ySearchOpen,className:oe,onClick:It,tabIndex:be,type:"button",children:(0,s.jsx)(ji,{className:Se})}),(0,s.jsx)("div",{className:re,children:(0,s.jsx)(p_,{isEnabled:n&&U})}),(0,s.jsxs)("div",{className:K,children:[j?(0,s.jsx)("span",{className:G,"data-testid":"nav-sidebar-title",tabIndex:ye,children:c}):(0,s.jsx)(nn,{className:G,"data-testid":"nav-sidebar-title",onClick:Go,tabIndex:ye,to:"/",children:c}),(0,s.jsx)(C_,{classProgressRunner:q,classProgressText:J,classProgressTrack:ee,percentComplete:w,percentCompleteText:pe})]})]})})]})},b_=V("nav-sidebar");function $b({closeNav:e,id:t,isEnabled:n,isSectionLesson:o,last:r}){const{navigationStyle:a}=ce(),{icon:i,settings:c}=At(t)??{},l=oa(t),d=Ws(),h=Zi(),m=kh(String(t)),f=String(t)===d,v=c?.isGeneratingAIContent===!0,C=(0,u.useMemo)(()=>Eo(a),[a]),g=o?"nav-sidebar__outline-section-item":"nav-sidebar__outline-item",x=`${g}__link`,b=`${g}-link-icon`,L=(0,s.jsx)(vd,{className:b,icon:i??On.ARTICLE}),[S,y]=(0,u.useState)(!1),T=(0,u.useCallback)(()=>y(!0),[]),k=(0,u.useCallback)(()=>y(!1),[]),I=(0,s.jsx)(dd,{canComplete:m,id:t,isDark:C,isEnabled:n,isTooltipVisible:S,onHideTooltip:k,onShowTooltip:T,scope:Co.SIDEBAR}),E=()=>{e&&h&&e()};return(0,s.jsx)("li",{className:b_("outline-list-item",{last:r}),"data-testid":`nav-outline-lesson-${t}`,role:"listitem",children:v?(0,s.jsx)("div",{className:g,children:(0,s.jsxs)("span",{"aria-disabled":"true",className:`${x} ${x}--generating`,"data-testid":`nav-outline-lesson-${t}-generating`,children:[L,l]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)($i,{className:g,dark:C,isCurrentLesson:f,isTooltipEnabled:!m,lessonId:t,onHideProgressTooltip:k,onNavigate:E,onShowProgressTooltip:T,showProgressDelay:0,tooltipClassName:`${g}-tooltip`,children:[L,l,!m&&I]}),m&&I]})})}const y_=({id:e})=>{const t=At(e),n=ct(t?.title);return(0,s.jsx)("span",{className:"nav-sidebar__outline-section-text",children:n})};var ka=p(82920);const S_=({closeNav:e,id:t,index:n,isEnabled:o,lessonIds:r})=>{const a=ce(),i=a?.theme,c=a?.themeId,l=i?.navigationSectionsExpanded??!0,d=oa(String(t)),[h,m]=ka.useState(l);ka.useEffect(()=>{m(l)},[l]);const[f,v]=ka.useState(),C=ka.useRef(null),g=`sidebar-sublist-${n}`,x=C.current?.clientWidth,b=String(c),L=h?"nav-sidebar__outline-section-toggle-icon":"nav-sidebar__outline-section-toggle-icon nav-sidebar__outline-section-toggle-icon--collapsed",S=h?"nav-sidebar__outline-section-list":"nav-sidebar__outline-section-list nav-sidebar__outline-section-list--collapsed",y=ka.useCallback(()=>{m(T=>!T)},[]);return ka.useLayoutEffect(()=>{const T=setTimeout(()=>{C.current&&v(C.current.scrollHeight)},0);return()=>{clearTimeout(T)}},[r.length,x,b]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{"aria-controls":g,"aria-expanded":h,className:"nav-sidebar__outline-section-toggle","data-nav-item":"",onClick:y,tabIndex:o?void 0:-1,type:"button",children:[(0,s.jsx)("span",{className:"nav-sidebar__outline-section-toggle-text",children:d}),(0,s.jsx)(hx,{className:L})]}),(0,s.jsx)(rd,{inert:!h,children:(0,s.jsx)("ol",{"aria-hidden":h?void 0:!0,className:S,id:g,ref:C,role:"list",style:{maxHeight:f},children:r.map((T,k)=>(0,s.jsx)($b,{closeNav:e,id:T,isEnabled:o&&h,isSectionLesson:!0,last:k===r.length-1},T))})})]})},L_=({closeNav:e,index:t,isEnabled:n,lessonIds:o})=>{const[r,...a]=o,i="nav-sidebar__outline-item nav-sidebar__outline-section";return Nt()(a)?(0,s.jsx)("li",{className:i,role:"listitem",children:(0,s.jsx)(y_,{id:r})}):(0,s.jsx)("li",{className:i,role:"listitem",children:(0,s.jsx)(S_,{closeNav:e,id:r,index:t,isEnabled:n,lessonIds:a})})},T_=({closeNav:e,index:t,isEnabled:n,lessonIds:o})=>gl(o.map(String))?(0,s.jsx)(L_,{closeNav:e,index:t,isEnabled:n,lessonIds:o}):o.map((a,i)=>(0,s.jsx)($b,{closeNav:e,id:a,isEnabled:n,isSectionLesson:!1,last:i===o.length-1},a)),k_=({className:e="",closeNav:t,isEnabled:n})=>{const o=Cl(),[r,a]=(0,u.useState)(!n),i=Ce(),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=[e,"nav-sidebar__outline",r?"nav-sidebar__outline--hidden":void 0,Ys.isSafari?"nav-sidebar__outline--safari":void 0].filter(Boolean).join(" "),h=["nav-sidebar__outline-list",n?void 0:"nav-sidebar__outline-list--disabled",r?"nav-sidebar__outline-list--hidden":void 0].filter(Boolean).join(" ");return(0,u.useEffect)(()=>(n?(clearTimeout(l.current??void 0),a(!1)):l.current=setTimeout(()=>{a(!0)},350),()=>{clearTimeout(l.current??void 0)}),[n]),(0,s.jsx)("section",{"aria-label":i?.a11yRegionNavOverview,className:d,"data-testid":"nav-sidebar-outline",id:"nav-sidebar-outline",children:is(o)&&(0,s.jsx)("ol",{className:h,"data-testid":"nav-sidebar-outline-list",ref:c,role:"list",children:o.map((m,f)=>Nt()(m)?null:(0,s.jsx)(T_,{closeNav:t,index:f,isEnabled:n,lessonIds:m},f))})})};var I_=p(10036);const Ia=V("nav-sidebar-result"),Vb=({result:e})=>{const t=Ce(),n=e?.icon??On.ARTICLE,o=ct(e?.title),r=e?.results??0,a=r===1?t?.result:t?.results,i=Ia("icon"),c=Ia("title"),l=Ia("count");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(vd,{className:i,icon:n}),(0,s.jsx)("span",{className:c,children:o}),(0,s.jsx)("span",{className:l,children:`${r} ${a}`})]})},E_=({id:e,index:t,isEnabled:n,onSelectResult:o})=>{const r=ce(),a=(0,je.RQ)(xl),i=(0,je.RQ)(bl),c=a??i,l=_7(String(e)),d=c?.params.lessonId===String(e),h=d?"page":void 0,m=r?.color,f=r?.navigationStyle,v=n?void 0:-1,C={animationDelay:`${t/10}s`},g=l?.id,x=Li(g==null?void 0:String(g)),b=(0,u.useMemo)(()=>Eo(f),[f]),L=Ia(),S=Ia("inner",{active:d}),y=Ia("link",{dark:b,light:!b});return(0,s.jsx)("li",{className:L,role:"listitem",style:C,children:(0,s.jsx)("div",{className:S,style:{color:m},children:n&&x==null?(0,s.jsx)(nn,{"aria-current":h,className:y,onClick:o,tabIndex:v,to:In(e),children:(0,s.jsx)(Vb,{result:l})}):(0,s.jsx)(Yx,{className:y,restriction:x,tooltipClassName:"lesson-nav-link-tooltip",children:(0,s.jsx)(Vb,{result:l})})})})},Sd=V("nav-sidebar-results"),N_=[],j_=({closeNav:e,isEnabled:t})=>{const{announcePolite:n}=ys(),o=ce(),r=To(),a=Ce(),c=(r?.activeLessons??N_).filter(wC),l=r?.term,d=is(c),h=(0,I_.A)(l),m=a?.noResults??"",f=o?.navigationStyle,v=(0,u.useMemo)(()=>Eo(f),[f]),C=Sd(),g=Sd("message",{dark:v,light:!v}),x=Sd("term"),b=Sd("list"),L=kt(960),S=u.useCallback(()=>{L&&e()},[e,L]);return(0,u.useEffect)(()=>{if(h){const y=c.length===1?a?.result:a?.results,T=d?`${c.length} ${y}`:`${a?.noResults} ${l}`;n?.(T)}},[n,d,h,c,a,l]),(0,s.jsxs)("div",{className:C,"data-testid":"nav-sidebar-results",children:[!d&&h&&(0,s.jsxs)("div",{className:g,children:[m," ",(0,s.jsxs)("span",{className:x,children:['"',l,'"']})]}),d&&h&&(0,s.jsx)("ol",{className:b,"data-testid":"nav-sidebar-results-list",role:"list",children:c.map((y,T)=>(0,s.jsx)(E_,{id:y.id,index:T,isEnabled:t,onSelectResult:S},y.id))})]})},Ld=V("nav-sidebar"),zb="nav-content-sidebar",w_=({isExpanded:e,closeNav:t})=>{const n=ce(),o=To(),[r,a]=(0,u.useState)(!1),[i,c]=(0,u.useState)(0),l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=n?.color,m=n?.theme?.coverImageColor,f=n?.isLegacyCourse,v=n?.navigationStyle,C=n?.theme?.accentContrast,g=n?.theme?.progressIndicatorStyle,x=o?.active??!1,b=x||e?void 0:"true";(0,u.useLayoutEffect)(()=>{l&&l?.current&&c(l.current?.scrollWidth)},[r,e,l,x,c]);const L=(0,u.useMemo)(()=>PN(v),[v]),S=(0,u.useMemo)(()=>Eo(v),[v]),y=(0,u.useMemo)(()=>yi(v),[v]),T=y&&m===rt.LIGHT,k=Fn(h),I=g===qe.CIRCULAR_FILL,E=g===qe.INCOMPLETE_COMPLETE,w=C?C===Te.DARK||C===Te.AUTO&&k===Te.DARK:k===Te.DARK,A=Ld("header"),N=Ld("body"),R=Ld("content"),M=Ld({accent:L,"dark-contrast":!y&&w,"light-contrast":!y&&!w,"legacy-pre-themes":f,"image-dark-overlay":y&&!T,"image-light-overlay":y&&T,"progress-circular-fill":I,"progress-incomplete-complete":E,collapsed:!e,dark:S,light:!S,searching:x});return(0,s.jsx)(rd,{inert:!e,children:(0,s.jsx)(Qo,{children:(0,s.jsx)(wc,{in:e,mountOnEnter:!0,nodeRef:d,timeout:300,unmountOnExit:!0,children:(0,s.jsx)("div",{"aria-hidden":b,className:M,"data-testid":"nav-sidebar",ref:d,children:(0,s.jsxs)("div",{className:R,"data-nav-scrollable":!0,id:zb,children:[(0,s.jsx)(x_,{className:A,isCompact:r,isEnabled:e,navRefWidth:i,setIsCompact:a}),(0,s.jsxs)("div",{className:N,"data-testid":"nav-sidebar-body",ref:l,children:[(0,s.jsx)(k_,{closeNav:t,isEnabled:e&&!x}),(0,s.jsx)(j_,{closeNav:t,isEnabled:e&&x})]})]})})})})})},Ir={x:null,y:null},Td={passive:!0};function _b({children:e,onSwipeDown:t,onSwipeLeft:n,onSwipeRight:o,onSwipeUp:r,onShouldRecognizeGesture:a=()=>!0,thresholdX:i=100,thresholdY:c=100}){const l=(0,u.useRef)(),[d,h]=(0,u.useState)(Ir),[m,f]=(0,u.useState)(Ir),v=(0,u.useCallback)(b=>{const L=b.touches?.length??0,S=b.targetTouches[0],y=a?a():!0;L==1&&S&&y?h({x:S.clientX,y:S.clientY}):h(Ir)},[a]),C=(0,u.useCallback)(b=>{const L=b.targetTouches[0];L&&f({x:L.clientX,y:L.clientY})},[]),g=(0,u.useCallback)(()=>{h(Ir),f(Ir)},[]),x=(0,u.useCallback)(b=>{const L=b.touches?.length??0;if(d.x==null||d.y==null||m.x==null||m.y==null||L>0)return;const S=m.x-d.x,y=m.y-d.y;Math.abs(S)>Math.abs(y)?Math.abs(S)>i&&(S<0?n?.():o?.()):Math.abs(y)>c&&(y<0?r?.():t?.()),h(Ir),f(Ir)},[t,n,o,r,i,c,m,d]);return(0,Xe.A)("touchstart",v,l.current,Td),(0,Xe.A)("touchcancel",g,l.current,Td),(0,Xe.A)("touchmove",C,l.current,Td),(0,Xe.A)("touchend",x,l.current,Td),(0,s.jsx)("div",{ref:l,children:e})}_b.propTypes={children:yt().oneOfType([yt().arrayOf(yt().element),yt().element]).isRequired,onShouldRecognizeGesture:yt().func,onSwipeDown:yt().func,onSwipeLeft:yt().func,onSwipeRight:yt().func,onSwipeUp:yt().func,thresholdX:yt().number.isRequired,thresholdY:yt().number.isRequired};function kd({isEnabled:e=!0,...t}){return e?(0,s.jsx)(_b,{...t}):(0,s.jsx)("div",{children:t.children})}kd.propTypes={children:yt().oneOfType([yt().arrayOf(yt().element),yt().element]).isRequired,isEnabled:yt().bool.isRequired};const Id={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},A_=[Id.TABLET_PORTRAIT,Id.TABLET_LANDSCAPE,Id.MOBILE_PORTRAIT,Id.MOBILE_LANDSCAPE],qi=e=>A_.includes(e),R_=e=>(0,u.useMemo)(()=>{const t=window.matchMedia("(pointer: coarse)").matches,n=qi(e);return t||n},[e]),nf=(0,u.createContext)({isCourseNavOpen:!1});nf.displayName="CourseNavigationContext";function P_(e){const{children:t,isCourseNavOpen:n}=e;return(0,s.jsx)(nf.Provider,{value:{isCourseNavOpen:n},children:t})}function M_(){return(0,u.useContext)(nf)}const Ub=V("course-navigation"),{COMPACT:Ed,OVERLAY:sf,SIDEBAR:Er}=rr,O_={[Ed]:Nb,[Er]:zb,[sf]:Fb},B_=({hasSearchResults:e,courseNavType:t,openNav:n,closeNav:o})=>{const[r,a]=(0,u.useState)(e);return(0,u.useEffect)(()=>{r&&!e&&!(t===Er)?(o(),a(!1)):r&&t===sf?n():a(e)},[e,t,n,o,r]),r},D_=({activeNavType:e,beginWithSidebarOpen:t,isNavOpen:n,isTablet:o,openNav:r,closeNav:a})=>{const[i,c]=(0,u.useState)();(0,u.useEffect)(()=>{e===Er&&t&&(!i&&o&&n?a():i===!0&&!o&&!n&&r(),c(o))},[e,t,n,o,r,a,i])},F_=({beginWithSidebarOpen:e,children:t,closeNav:n,courseNavType:o,isNavOpen:r,isTablet:a,lessonNavType:i,openNav:c,previewType:l,toggleNav:d,hideNav:h})=>{const m=(0,u.useRef)(null),f=(0,u.useRef)(null),{active:v=!1}=To()??{},C=Ce(),g=B_({hasSearchResults:v,courseNavType:o,openNav:c,closeNav:n}),x=(0,u.useMemo)(()=>g||o===Ed&&a?Er:o,[o,g,a]);D_({activeNavType:x,beginWithSidebarOpen:e,closeNav:n,openNav:c,isNavOpen:r,isTablet:a}),(0,u.useEffect)(()=>{const k=E=>{E.relatedTarget instanceof Node&&f.current?.contains(E.relatedTarget)===!0&&n()},I=()=>{f.current?.removeEventListener("click",n),f.current?.removeEventListener("keypress",n),f.current?.removeEventListener("blur",k,!0)};return x===Ed&&r?(f.current?.addEventListener("click",n),f.current?.addEventListener("keypress",n),f.current?.addEventListener("blur",k,!0)):I(),I},[x,r,n]);const b=R_(l),L=(0,u.useCallback)(()=>{const k=x===rr.SIDEBAR;b&&k&&r&&n()},[n,r,b,x]),S=(0,u.useMemo)(()=>x!=null?O_[x]:void 0,[x]),y=Ub(x?.toLowerCase()??null,{"nav-open":r,"search-open":v&&r,"course-nav-type":o?.toLowerCase()}),T=Ub("lessonNav",{type:i?.toLowerCase()});return(0,s.jsx)(P_,{isCourseNavOpen:r,children:(0,s.jsx)("div",{className:y,children:(0,s.jsx)(kd,{isEnabled:x===rr.SIDEBAR,onSwipeLeft:L,children:(0,s.jsxs)("div",{className:T,children:[(0,s.jsxs)("nav",{"aria-label":C?.a11yRegionNavLesson,children:[(0,s.jsx)(uz,{"aria-controls":S,hideNav:h,isNavOpen:r,toggleNav:d}),x===Er&&(0,s.jsx)(w_,{closeNav:n,isExpanded:r}),x===Ed&&(0,s.jsx)(Fz,{closeNav:n,isExpanded:r,openNav:c,ref:m}),x===sf&&(0,s.jsx)($z,{closeNav:n,openNav:c,children:(0,s.jsx)(f_,{isExpanded:r})})]}),(0,s.jsx)("div",{ref:f,children:t})]})})})})},H_=({children:e,isLessonOnlyEmbed:t,...n})=>{const{buttonNavigationStyle:o,navigationType:r,lmsOptions:a,...i}=ce(),c=Zi(),l=xh(i)===!0,d=!c,h=i.sidebarMode===Gr.OPEN,m=l&&r===Er&&h&&d,f=bs(i),v=f&&i?.theme?.blockNavigationType===Qc.CONTINOUS,[C,g]=(0,u.useState)(m),x=(0,u.useCallback)(()=>{g(!0)},[]),b=(0,u.useCallback)(()=>{g(!1)},[]),L=(0,u.useCallback)(()=>C?b():x(),[C,b,x]);(0,Xe.A)(z2,x),(0,Xe.A)(_2,b);const S=f||t===!0,y=S?"fixed-course-exit":void 0,T=v?{marginInlineEnd:"2rem"}:void 0,k=l?r:void 0;return S?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Sb,{className:y,lmsOptions:a,style:T}),e]}):(0,s.jsx)(F_,{...n,beginWithSidebarOpen:h,closeNav:b,courseNavType:k,hideNav:!l,isNavOpen:C,isTablet:c,lessonNavType:o,openNav:x,toggleNav:L,children:e})};var Gb=p(56668);const Ea=e=>e===Vs.FLOATING||e===Vs.FLOATING_FULL;function Nr(){const e=J7();return kt(480)&&e===Vs.FLOATING?Vs.FLOATING_FULL:e}function Wb({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",ref:t,viewBox:"0 0 15 16",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M2 8L7.65685 13.6569L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}const $_=V("lesson-nav");function V_(e){const{children:t,finish:n,lessonId:o,onFocus:r}=e,a=Xt();if(o!=null)return(0,s.jsx)($i,{className:"lesson-nav-link","data-direction":e["data-direction"],lessonId:o,onFocus:r,tooltipClassName:"lesson-nav-link-tooltip",children:t});const i=n?Wg:"/",c=l=>{l.preventDefault(),Js(()=>{a(i)},i==="/"?"lesson-to-cover":"default")};return(0,s.jsx)("span",{className:"lesson-nav-link",children:(0,s.jsx)(nn,{className:"lesson-nav-link__link","data-direction":e["data-direction"],onClick:c,onFocus:r,to:i,children:t})})}function Na({children:e,className:t,direction:n,finish:o,navLessonId:r,onFocus:a,ref:i,restrictionType:c}){const d=fr()?.theme?.buttonScheme,h=c!=null,m=Nr(),v={className:$_(null,{[n]:!0,accent:d===li.ACCENT,dark:d===li.DARK,floating:m===Vs.FLOATING,"floating-full":m===Vs.FLOATING_FULL,finish:o,full:m===Vs.FULL,light:d===li.LIGHT,restricted:h,tint:d===li.TINT}).mix(t),[`data-${n}-lesson`]:!0};return(0,s.jsx)("div",{ref:i,...v,children:(0,s.jsx)(V_,{"data-direction":n,finish:o,lessonId:r,onFocus:a,children:e})})}const Kb=V("lesson-nav");function z_({allowTooltip:e,lessonNameLabel:t,nextLesson:n,nextLessonNumber:o,onFocus:r,ref:a,restrictionData:i,restrictionType:c}){const l=n?.id,d=Nr(),h=Ea(d),f=Wr(n)&&l,v=Re(n?.title)||"",C=h?Xh:Wb,g=f?`${t} ${o} - `:"",x=h&&f?`${t} ${o}`:`${g}${v}`;return(0,s.jsxs)(Na,{allowTooltip:e,direction:"next",isFloating:h,navLessonId:l,onFocus:r,ref:a,restrictionData:i,restrictionType:c,children:[(0,s.jsx)("span",{className:Kb("link-text").mix("brand--ui"),children:x}),(0,s.jsx)(C,{className:Kb("link-icon")})]})}function __(e){const t=Ce(),n=vj(e),o=Cj(e),r=Ih(),a=n?.id,i=Li(a),c=ct(i?.data);return{lessonNameLabel:t?.lessonName,lessonPrepositionLabel:t?.lessonPreposition,nextLesson:n,nextLessonNumber:o,restrictionData:a?c:void 0,restrictionType:a?i?.type:void 0,totalLessons:r}}const Nd=V("lesson-nav");function U_({allowTooltip:e,lessonNameLabel:t,lessonPrepositionLabel:n,nextLesson:o,nextLessonNumber:r,onFocus:a,ref:i,restrictionData:c,restrictionType:l,totalLessons:d}){const h=o?.id,m=Nr(),f=Ea(m),C=o&&Wr(o)&&h,g=Re(o?.title)||"",x=C?`${r} ${n} ${d} \u2014 ${g}`:g,b=f&&C?`${t} ${r}`:x;return(0,s.jsx)(Na,{allowTooltip:e,direction:"next",navLessonId:h,onFocus:a,ref:i,restrictionData:c,restrictionType:l,children:f?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:Nd("link-text"),children:b}),(0,s.jsx)(Dl,{className:Nd("link-icon")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Dl,{className:Nd("link-icon")}),(0,s.jsx)("span",{className:Nd("link-text"),children:b})]})})}function Qb({lessonId:e,...t}){const n=__(e);return ut()===te.RISE_CLASSIC?(0,s.jsx)(z_,{...t,lessonNameLabel:n.lessonNameLabel,nextLesson:n.nextLesson,nextLessonNumber:n.nextLessonNumber,restrictionData:n.restrictionData,restrictionType:n.restrictionType}):(0,s.jsx)(U_,{...t,...n})}const Yb=V("lesson-nav");function G_({allowTooltip:e,courseFinishLabel:t,onFocus:n,restrictionData:o,restrictionType:r,ref:a}){const i=Nr(),c=Ea(i),l=c?Xh:Wb;return(0,s.jsxs)(Na,{allowTooltip:e,direction:"next",finish:!0,isFloating:c,onFocus:n,ref:a,restrictionData:o,restrictionType:r,children:[(0,s.jsx)("span",{className:Yb("link-text").mix("brand--ui"),children:t}),(0,s.jsx)(l,{className:Yb("link-icon")})]})}const jd=V("lesson-nav");function W_({allowTooltip:e,courseFinishLabel:t,onFocus:n,ref:o,restrictionData:r,restrictionType:a}){const i=Nr(),c=Ea(i);return(0,s.jsx)(Na,{allowTooltip:e,direction:"next",finish:!0,onFocus:n,ref:o,restrictionData:r,restrictionType:a,children:c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:jd("link-text"),children:t}),(0,s.jsx)(Dl,{className:jd("link-icon")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Dl,{className:jd("link-icon")}),(0,s.jsx)("span",{className:jd("link-text"),children:t})]})})}function of(e){const n=Ce()?.courseFinish??"Finish";return ut()===te.RISE_CLASSIC?(0,s.jsx)(G_,{...e,courseFinishLabel:n}):(0,s.jsx)(W_,{...e,courseFinishLabel:n})}function K_({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",ref:t,viewBox:"0 0 15 16",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M2 8L7.65685 2.34315L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}const wd=V("lesson-nav");function Q_({allowTooltip:e,className:t,courseHomeLabel:n,lessonNameLabel:o,onFocus:r,previousLesson:a,previousLessonNumber:i,ref:c}){const l=a?.id,d=Nr(),h=Ea(d),f=Wr(a)&&l,v=Re(a?.title)||n,C=h?tx:K_,g=f?`${o} ${i} - ${v}`:v,x=f&&h?`${o} ${i}`:g;return(0,s.jsx)(Na,{allowTooltip:e,className:t,direction:"previous",isFloating:h,navLessonId:l,onFocus:r,ref:c,children:h?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:wd("link-text").mix("brand--ui"),children:x}),(0,s.jsx)(C,{className:wd("link-icon")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C,{className:wd("link-icon")}),(0,s.jsx)("span",{className:wd("link-text").mix("brand--ui"),children:x})]})})}const Ad=V("lesson-nav");function Y_({allowTooltip:e,className:t,courseHomeLabel:n,lessonNameLabel:o,lessonPrepositionLabel:r,onFocus:a,previousLesson:i,previousLessonNumber:c,ref:l,totalLessons:d}){const h=i?.id,m=Nr(),f=Ea(m),C=Wr(i)&&h!=null,g=ct(i?.title)??n,x=C?`${c} ${r} ${d} \u2014 ${g}`:g,b=f&&C?`${o} ${c}`:x;return(0,s.jsx)(Na,{allowTooltip:e,className:t,direction:"previous",navLessonId:h,onFocus:a,ref:l,children:f?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:Ad("link-text"),children:b}),(0,s.jsx)(ux,{className:Ad("link-icon")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ux,{className:Ad("link-icon")}),(0,s.jsx)("span",{className:Ad("link-text"),children:b})]})})}function rf({lessonId:e,...t}){const n=Nj(e),o=jj(e),r=Ih(),a=Ce();return ut()===te.RISE_CLASSIC?(0,s.jsx)(Q_,{...t,courseHomeLabel:a?.courseHome,lessonNameLabel:a?.lessonName,previousLesson:n,previousLessonNumber:o}):(0,s.jsx)(Y_,{...t,courseHomeLabel:a?.courseHome,lessonNameLabel:a?.lessonName,lessonPrepositionLabel:a?.lessonPreposition,previousLesson:n,previousLessonNumber:o,totalLessons:r})}const Z_={threshold:0},Rd=(e,t)=>{const[n,o]=(0,u.useState)(!1),r=(0,u.useRef)(null);return(0,u.useEffect)(()=>{r.current&&r.current.disconnect(),r.current=new IntersectionObserver(([i])=>{o(i.isIntersecting)},t||Z_);const{current:a}=r;return e.current?a.observe(e.current):o(!1),()=>{a.disconnect()}},[e,t]),n},Zb=V("navButtonsFull"),X_=()=>{const[e,t]=(0,u.useState)(!1);return(0,Xe.A)(U2,()=>t(!0)),(0,Xe.A)(G2,()=>t(!1)),e},q_=({isVisible:e})=>{(0,Gb.A)(()=>window.dispatchEvent(new CustomEvent(Wh))),(0,u.useEffect)(()=>{const t=e?W2:Wh;window.dispatchEvent(new CustomEvent(t))},[e])},J_=({isVisible:e})=>{(0,Gb.A)(()=>window.dispatchEvent(new CustomEvent(Kh))),(0,u.useEffect)(()=>{const t=e?K2:Kh;window.dispatchEvent(new CustomEvent(t))},[e])},eU=({children:e,hideNavToHome:t,navNextEnabled:n,navFinishEnabled:o})=>{const r=(0,u.useRef)(null),a=(0,u.useRef)(null),i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=Ws(),d=Rd(a),h=Rd(i),m=X_(),f=(0,u.useCallback)(()=>{r.current?.scrollTo({top:0,behavior:"smooth"})},[]),v=(0,u.useCallback)(()=>{const g=r.current?.scrollHeight;r.current?.scrollTo({top:g,behavior:"smooth"})},[]);(0,Xe.A)(wl,f),(0,Xe.A)(Al,v),q_({isVisible:d}),J_({isVisible:h}),(0,u.useEffect)(()=>{if(!m&&a.current){const x=(a.current?.clientHeight??0)+1;r.current?.scrollTo({top:x})}},[m]);const C=Zb("navPrev",{visible:d,hide:m});return(0,s.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:r,children:(0,s.jsxs)("div",{className:Zb(),children:[!t&&l&&(0,s.jsx)("div",{className:C,children:(0,s.jsx)(rf,{lessonId:l,ref:a})}),e,n&&l&&(0,s.jsx)(Qb,{lessonId:l,ref:i}),o&&(0,s.jsx)(of,{lessonId:l,ref:c})]})})};var Pd=p(32633);const Ji=V("navButtonsFloating"),Xb=({transitionIn:e,buttonType:t,children:n})=>{const o=(0,u.useRef)(null),r={entered:Ji(t,{entered:!0}),exiting:Ji(t,{exiting:!0}),exited:Ji(t,{exited:!0})};return(0,s.jsx)(wc,{in:e,nodeRef:o,timeout:250,children:a=>(0,s.jsx)("div",{className:r[a],ref:o,children:n})})},tU=250,qb={threshold:.2},nU=({topRef:e,bottomRef:t,pageWrapRef:n,currentLessonId:o})=>{const r=Rd(e,qb),a=Rd(t,qb),[i,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)(!1),[h,m]=(0,u.useState)(!1),f=(0,u.useCallback)(()=>{n.current?.scrollTo({top:2,behavior:"smooth"})},[n]);return(0,Pd.A)(f),(0,u.useEffect)(()=>{c(!0);const v=setTimeout(()=>{f(),c(!1)},tU);return()=>{clearTimeout(v)}},[o,f]),(0,u.useEffect)(()=>{d(a&&!i),m(r&&!i)},[a,r,i]),{showPrev:h,showNext:l}},sU=({children:e,isCurrentLessonQuiz:t,navNextEnabled:n,hideNavToHome:o,navFinishEnabled:r})=>{const a=(0,u.useRef)(null),i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=Ws(),{showNext:f,showPrev:v}=nU({topRef:d,bottomRef:h,pageWrapRef:a,currentLessonId:m}),C=(0,u.useCallback)(()=>{a.current?.scrollTo({top:0,behavior:"smooth"})},[]),g=(0,u.useCallback)(()=>{const x=a.current?.scrollHeight;a.current?.scrollTo({top:x,behavior:"smooth"})},[]);return(0,Xe.A)(wl,C),(0,Xe.A)(Al,g),(0,u.useEffect)(()=>{t&&(n||r)&&g()},[t,n,r,g]),(0,s.jsxs)("div",{className:"page-wrap",id:"page-wrap",ref:a,children:[(0,s.jsx)("div",{className:Ji("top"),ref:d}),!o&&m&&(0,s.jsx)(Xb,{buttonType:"prev",transitionIn:v,children:(0,s.jsx)(rf,{lessonId:m,onFocus:C,ref:i})}),e,(0,s.jsx)(Xb,{buttonType:"next",transitionIn:f&&!!(n||r),children:n&&m?(0,s.jsx)(Qb,{lessonId:m,onFocus:g,ref:c}):r?(0,s.jsx)(of,{lessonId:m,onFocus:g,ref:l}):null}),(0,s.jsx)("div",{className:Ji("bottom"),ref:h})]})};var oU=p(789),Jb=p.n(oU),rU=p(28676),af=p.n(rU);const aU=af()(Ze()("family","continue"),Ze()("variant","continue")),iU=Me()(Jb()(aU),kn()([],"items"));var Md=p(82920);class cU extends Md.Component{nodeRef=Md.createRef();constructor(t){super(t),this.handleTransition=this.handleTransition.bind(this),this.onEnter=this.onEnter.bind(this),this.onEntered=this.onEntered.bind(this),this.onExit=this.onExit.bind(this),this.onExited=this.onExited.bind(this)}handleTransition(t){const n=this.transitionState;n==="entering"?this.onEnter(t):n==="exiting"&&this.onExit(t)}onEnter(t){const n=this.nodeRef.current;n&&n.componentWillEnter?n.componentWillEnter(t):t()}onEntered(){const t=this.nodeRef.current;t&&t.componentDidEnter&&t.componentDidEnter()}onExit(t){const n=this.nodeRef.current;n&&n.componentWillExit?n.componentWillExit(t):t()}onExited(){const t=this.nodeRef.current;t&&t.componentDidExit&&t.componentDidExit()}render(){const{children:t}=this.props;return(0,s.jsx)(wc,{addEndListener:this.handleTransition,nodeRef:this.nodeRef,onEntered:this.onEntered,onExited:this.onExited,unmountOnExit:!0,...this.props,children:n=>(this.transitionState=n,t&&Md.cloneElement(Md.Children.only(t),{ref:this.nodeRef}))})}}const cf=(0,u.createContext)(void 0);cf.displayName="LessonTransitionContext";function lU({children:e}){const[t,n]=(0,u.useState)(()=>[]),o=(0,u.useCallback)(i=>{n(c=>c.includes(i)?c:c.concat(i))},[]),r=(0,u.useCallback)(i=>{n(c=>{const l=c.indexOf(i);if(l===-1)return c;const d=c.slice();return d.splice(l,1),d})},[]),a=(0,u.useMemo)(()=>({mountedLessonIds:t,registerLesson:o,unregisterLesson:r}),[t,o,r]);return(0,s.jsx)(cf.Provider,{value:a,children:e})}function dU(){const e=(0,u.useContext)(cf);if(e==null)throw new Error("useLessonTransitionState must be used within LessonTransitionProvider");return e}const{FULL:uU,FLOATING:e3}=Vs,hU=V("lessonNavigation"),mU=({children:e})=>{const t=(0,u.useRef)(null);return(0,s.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:t,children:e})},fU=(e,t)=>typeof t=="object"&&t!==null&&"drawCount"in t&&typeof t.drawCount=="number"?e+t.drawCount:e+1,pU=(e=[])=>e.reduce(fU,0),gU=({children:e,isLessonOnlyEmbed:t})=>{const{pathname:n}=(0,je.zy)(),o=ce(),r=o.buttonNavigationStyle,{showNavigationButtons:a,lessonsOnly:i,lmsOptions:c}=o,l=(0,u.useRef)(null),d=kt(480),h=Ws(),m=At(h),f=No(h),[v,C]=(0,u.useState)(r),g=i?.[0]?.id,x=o.exportSettings?.webExportSettings?.disableCoverPage===!0,b=!Ls.isInstantLink&&(c?.disableCoverPage===!0||x)&&g===h,L=!Ls.isInstantLink&&c?.disableCoverPage===!0,S=c?.disableCoverPage===!0?b:L;(0,u.useEffect)(()=>{r!==v&&(C(r),window.dispatchEvent(new CustomEvent(wl)))},[r,v]);const y=m!=null&&m.type!=null?m:void 0,T=y!=null&&(iU(y)||Kg(y))?f?.isComplete===!0:!0,k=y?.type==="quiz",I=f?.type==="quiz"?f.activeIndex:void 0,E=k&&I!=null&&I===pU(y.items)+1,{skipLessonsIfPassed:w,skipLessonsOptional:A,skipToLessonId:N}=Eh(h),R=f?.type==="quiz"&&f.passed===!0,M=k&&R&&w&&!A&&!!N,P=k&&!E||y?.settings?.continueType==="continue"||M,j=m!=null?PC({course:o,lesson:m}):void 0,O=j!=null&&j!==!1,B=h==="progress-summary",D=window.isPublicShare===!0,H=O&&t!==!0&&T&&!P&&!B,$=!O&&T&&!1,W=hU("wrapper",{full:r===uU||d,floating:r===e3&&!d}),Z=a!==!0||t===!0?mU:r===e3&&!d?sU:eU;return(0,u.useEffect)(()=>{const ne=document.querySelector(".page__content");ne&&ne.classList.add("page__content--preview-nav")},[Z]),(0,s.jsx)("div",{className:W,ref:l,children:(0,s.jsx)(Z,{hideNavToHome:S,navFinishEnabled:$,navNextEnabled:H,children:(0,s.jsx)(lU,{children:(0,s.jsx)(Qo,{component:"div",children:(0,s.jsx)(cU,{children:e},n)})})})})};function vU({didNavigate:e,hasTransitioned:t,onPageReady:n}){const o=(0,u.useRef)(!1);(0,u.useEffect)(()=>{e&&!o.current&&t&&n(),o.current=t},[e,t,n])}var CU=p(27462),xU=p(27824),bU=p.n(xU);function yU(e){return e==="a"?46.5:7.6}function SU(e){return e==="d"?2:3.2}function LU(e){switch(e){case"a":return 30;case"c":case"d":return 92;default:return 76}}function t3(e){switch(e){case"b":return 95;case"background":return 52;default:return 76}}function lf(e){switch(e){case"a":case"b":case"carousel":default:return 6.4;case"c":return 18.6;case"d":return 8;case"background":return 6}}function TU(e){return .3}function bme(e){switch(e){case 3:return"three";case 4:return"four";default:return"two"}}function kU(e){return e==="light"?"#fff":"#000"}function yme(e){switch(e){case"a":case"b":default:return[6.4,9.6,16];case"c":return[10,14.8,18.6];case"d":return[8,12,16];case"background":return[6,9.6,16];case"carousel":return[6.4,10,16]}}function Sme(e){return e==="b"?[52,76,95]:[52,76,92]}function Lme(e){return e==="a"?[30,76,92]:[52,76,92]}function Tme(e){return e==="d"?[2,4.8,5.6]:[3.2,4.8,5.6]}function kme(e){return e==="a"?[46.5,78,120]:[7.6,20,32]}function IU(e){switch(e){case 3:return"sm";case 10:return"lg";default:return"med"}}function df(e,t){switch(t){case 6:case 6.4:case 8:default:return"sm";case 9.6:case 12:case 14.8:return"med";case 16:case 18.6:return"lg";case 10:return e==="c"?"sm":"med"}}function EU(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function n3(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function s3(e){switch(e){case 4:return"med";case 6:return"lg";default:return"sm"}}function Od(e){switch(e){case 52:return"sm";case 92:return"lg";default:return"med"}}function NU(e){switch(e){case 30:case 52:return"sm";case 92:return"lg";default:return"med"}}function jU(e){switch(e){case 4.8:return"med";case 5.6:return"lg";default:return"sm"}}function wU(e){switch(e){case 20:case 78:return"med";case 32:case 120:return"lg";default:return"sm"}}function AU(e){switch(e){case 1:return"sm";case 3:return"lg";default:return"med"}}function RU(e){switch(e){case 3.2:return"med";case 5.6:return"lg";default:return"sm"}}const Ge=({value:e,className:t,allowTabNavigation:n=!0,tagName:o,id:r,emptyFallback:a=null})=>{const{value:i}=Im(Re(e));return i?(0,s.jsx)(Ie,{allowTabNavigation:n,className:t,id:r,tagName:o,value:e}):a};function PU(e,t){const{className:n="",tag:o="div",style:r={},...a}=e,{backgroundColor:i}=tn(),c=Aw(),l=c===xt.DARK?xt.LIGHT:xt.DARK;return i!==""&&Object.assign(r,{"--color-background-contrast":c,"--color-background-contrast-complementary":l,"--color-background-contrast-rgb":(0,la.A)(c)?.slice(0,3)}),(0,s.jsx)(o,{...a,className:n,ref:t,style:r})}const o3=(0,u.forwardRef)(PU),MU=10,r3=e=>`${e}rem`,uf=e=>e!=null?`${e/MU}rem`:void 0,OU=["image full","image text overlay","quote background"];function BU(e){const{family:t,variant:n,backgroundType:o,isOnlyBlockInStep:r,isOnePage:a}=e;if(!a||!r)return!1;if(o===se.IMAGE)return!0;if(!t||!n)return!1;const i=`${t} ${n}`;return OU.some(c=>c===i)}const DU={paddingBottom:"0rem",paddingTop:"0rem"},FU=e=>{const{blockSettings:t,familyTheme:n,courseTheme:o,isFullWidthImage:r}=e;if(r)return DU;const a=r3(Number(e2(t?.paddingTop,n?.paddingStart,o?.blockPaddingStart,3)));return{paddingBottom:r3(Number(e2(t?.paddingBottom,n?.paddingEnd,o?.blockPaddingEnd,3))),paddingTop:a}},HU={},$U=e=>e?{bodyFontSize:uf(e.bodyFontSize),headingFontSize:uf(e.headingFontSize),subheadingFontSize:uf(e.subheadingFontSize)}:HU;function VU(){const e=Rt(),t=Fe(),n=jo(),o=bs(t),r=BU({backgroundType:e?.settings?.backgroundType,family:e?.family,isOnePage:o,isOnlyBlockInStep:e?.isOnlyBlockInStep,variant:e?.variant});return FU({blockSettings:e?.settings,courseTheme:t?.theme,familyTheme:n,isFullWidthImage:r})}function zU(){const e=jo();return $U(e)}function _U(){const e=VU();return{fontSize:zU(),padding:e}}const UU=Fc()(["settings"]),a3=V("block-wrapper"),GU=V("bg"),WU=(e,t)=>{const{children:n,className:o,defaultBackgroundColor:r="",style:a,tag:i,type:c,...l}=e,d=Rt(),h=n2(),m=_U(),f=Ph(r,h.backgroundColor),v=f||"transparent",C=d?.className,g={...a,...h.backgroundImageCss,"--color-background":f,...m.fontSize.bodyFontSize&&{"--block-text-body-font-size":m.fontSize.bodyFontSize},...m.fontSize.headingFontSize&&{"--block-text-heading-font-size":m.fontSize.headingFontSize},...m.fontSize.subheadingFontSize&&{"--block-text-subheading-font-size":m.fontSize.subheadingFontSize},boxShadow:`0px 1px 0px ${v} `,paddingBottom:m.padding.paddingBottom,paddingTop:m.padding.paddingTop},x=X()(o,{"bg--legacy-background":h.isLegacyBackground,[`block-${c}`]:!!c}),b=GU({card:h.cardMode,range:h.colorRange,type:h.backgroundTypeLowercase,"overlay-light":h.isOverlayLight,"contrast-light":h.isContrastLight}),L=C?a3({}).mix(b).mix(C):a3({}).mix(b),S=[x,L.toString()].join(" ");return(0,s.jsxs)(o3,{...UU(l),className:S,ref:t,style:g,tag:i,children:[(0,s.jsx)("span",{"aria-label":h.backgroundImageAlt,role:jg(h.backgroundImageAlt)}),n]})},we=(0,u.forwardRef)(WU);var KU=p(82920);function QU(e,t){const n=Ag(e.src),o=e.width&&e.height&&!n,r=o?"async":void 0,a=o?"lazy":void 0,i=o?e.width:void 0,c=o?e.height:void 0;return(0,s.jsx)("img",{...e,decoding:r,height:c,loading:a,ref:t,width:i})}const hf=KU.forwardRef(QU),i3=(0,u.createContext)(hf);function YU({children:e,ImageEagerOrLazy:t}){return(0,s.jsx)(i3,{value:t,children:e})}function ZU(){return(0,u.use)(i3)}function vn(e){const t=ZU();return(0,s.jsx)(t,{...e})}var XU=p(89342),Eme=p(62586);function c3(e){return(0,s.jsx)(XU.i,{IconUnzoom:JU,IconZoom:qU,...e})}const qU=()=>(0,s.jsx)(ie,{name:"arrows-two-from-center"}),JU=()=>(0,s.jsx)(ie,{name:"arrows-two-to-center"}),l3=V("block-text");function eG({children:e,item:t,labels:n}){const o="media"in t?t.media:void 0,r=Re(o)?.image,a=lt(r),i=yo(r?.alt??""),l=Rt()?.settings,d=l?.images,h=l?.zoomOnClick,m=(0,u.useRef)(void 0);let f=(0,s.jsx)(vn,{alt:i,"data-l10n-id":jt(o),ref:m,src:a});return h&&(f=(0,s.jsx)(c3,{a11yNameButtonUnzoom:n?.a11yUnzoomImage,a11yNameButtonZoom:n?.a11yZoomImage,children:f})),(0,s.jsxs)("div",{className:l3("col"),children:[d&&r&&(0,s.jsx)("div",{className:l3("image"),children:f}),e]})}var tG=p(29639),nG=p.n(tG),sG=p(12842);const oG=V("portal-tooltip"),zt={LEFT:"LEFT",RIGHT:"RIGHT",ABOVE:"ABOVE",BELOW:"BELOW"},rG=(e,t,n)=>{const o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),a=window.visualViewport;let i=n;(i===zt.ABOVE||i===zt.BELOW)&&(o.bottom-r.height<0&&(i=zt.BELOW),r.height+o.top>a.height&&(i=zt.ABOVE)),(i===zt.LEFT||i===zt.RIGHT)&&(r.left<0&&(i=zt.RIGHT),r.width+o.left>a.width&&(i=zt.LEFT));const c={left:0,right:0,top:0,bottom:0};i===zt.ABOVE&&(c.top=o.top-r.height-25),i===zt.BELOW&&(c.top=o.top+o.height),i===zt.RIGHT&&(c.left=o.left+o.width+70),i===zt.LEFT&&(c.left=o.left-r.width-25),(i===zt.LEFT||i===zt.RIGHT)&&(c.top=o.top-o.height/2),(i===zt.ABOVE||i===zt.BELOW)&&(c.left=o.left+o.width/2);const l=o.left+o.width/2,d=r.width/2+l>a.width,h=r.width/2>l;d?t.classList.add("portal-tooltip__tooltip--offset-right"):h&&t.classList.add("portal-tooltip__tooltip--offset-left"),Object.keys(c).map(m=>c[m]===0?t.style.removeProperty(m):t.style.setProperty(m,`${c[m]}px`)),t.classList.add(`portal-tooltip__tooltip--${i.toLowerCase()}`)};function aG({children:e,className:t,direction:n=zt.ABOVE,elementFocused:o,exitAnimation:r=!0,message:a,style:i,renderInModalWhenPresent:c=!1}){const[l,d]=(0,u.useState)(!1),[h]=(0,u.useState)(!1),m=(0,u.useRef)(null),f=(0,u.useRef)(null),[v,C]=(0,sG.A)((()=>e)),g=(0,u.useCallback)(()=>d(!0),[d]),x=(0,u.useCallback)(()=>d(!1),[d]);return(0,u.useEffect)(()=>(document.addEventListener("scroll",g),document.addEventListener("scrollend",x),()=>{document.removeEventListener("scroll",g),document.removeEventListener("scrollend",x)})),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:m,children:v}),a&&(C||h||o)&&!l&&(0,s.jsx)(Os,{classNames:"portal-tooltip__tooltip",exit:r,timeout:200,children:(0,s.jsx)(iG,{buttonRef:m,className:t,direction:n,elementFocused:o,hovering:C,message:a,portalRef:f,renderInModalWhenPresent:c,style:i})})]})}function iG({buttonRef:e,className:t,direction:n,elementFocused:o,hovering:r,message:a,portalRef:i,style:c,renderInModalWhenPresent:l=!1}){const d=(0,u.useCallback)(()=>rG(e.current,i.current,n),[e,n,i]),h=(0,u.useCallback)(()=>{i.current&&d()},[i,d]),m=()=>{!r&&!o&&i.current&&(i.current.style=null)};return(0,Pd.A)(h),(0,Es.createPortal)((0,s.jsx)("div",{"aria-hidden":!r||!o,className:oG("tooltip").mix(t).toString(),onTransitionEnd:m,ref:i,style:c,children:a}),l?Zs({id:"portal",childType:"other"}):document.getElementById("portal"))}const Po=aG,d3=V("audio-player-actions"),cG=({audioPlayerId:e,condensed:t=!1,transcriptMedia:n,onDelete:o,onTranscriptClick:r,onTranscriptClose:a})=>{const{mode:i,disableTranscriptButton:c}=fd(),l=Qi(),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),v=Re(n)?.audio?.transcript,C=(0,u.useCallback)(()=>h(!0),[]),g=(0,u.useCallback)(()=>h(!1),[]),x=(0,u.useCallback)(()=>f(!0),[]),b=(0,u.useCallback)(()=>f(!1),[]),L=wt(),S=l?.audioPlayerIdOpen&&l.audioPlayerIdOpen===e,y=c?"Transcripts are only available in lesson previews":S?L?.audioHideTranscript:i==="edit"?"Edit transcript":L?.audioShowTranscript,T=(0,u.useCallback)(()=>{const w=document.getElementById(Um(e));w&&w.focus()},[e]),[k,I]=(0,u.useState)(!1);function E(){c||(S?a?.():(r?.(),I(!0)))}return(0,u.useEffect)(()=>{k&&(I(!1),T())},[k,T]),(0,s.jsxs)(s.Fragment,{children:[o&&(0,s.jsx)(Po,{elementFocused:d,message:"Remove audio",children:(0,s.jsx)("button",{"aria-label":"Remove audio",className:d3("button",{condensed:t}),onBlur:g,onClick:o,onFocus:C,onMouseOut:g,onMouseOver:C,type:"button",children:(0,s.jsx)(ie,{name:"trash"})})}),(i==="edit"||v)&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Po,{elementFocused:m,message:y,renderInModalWhenPresent:i==="readonly",style:{whiteSpace:"nowrap"},children:(0,s.jsx)("button",{"aria-disabled":c,"aria-label":y,className:d3("button",{condensed:t}),id:i==="readonly"?bb(e):void 0,onBlur:b,onClick:E,onFocus:x,onMouseOut:b,onMouseOver:x,style:c?{opacity:.5}:void 0,type:"button",children:(0,s.jsx)(ie,{name:"file-audio"})})})})]})};var lG=p(10382);const u3="change";class dG extends lG.EventEmitter{_isMuted;_isPlaying;_playerId;constructor(t){super(),this.setMaxListeners(t)}get isPlaying(){return this._isPlaying}set isPlaying(t){this._isPlaying=t,this.emit("change")}set playerId(t){this._playerId=t}get playerId(){return this._playerId}pause(){this.isPlaying=!1}addChangeListener(t){this.on(u3,t)}removeChangeListener(t){this.removeListener(u3,t)}}const xe=new dG(1/0),uG=[.5,.75,1,1.25,1.5,1.75,2].toReversed().map(e=>({value:e,label:`${e}x`})),wme=.05,h3=V("audio-player-icon"),jr=({x:e,width:t,height:n,y:o,pulseBaseHeight:r,pulseBaseY:a,pulseHeight:i,pulseY:c,delay:l="0s"})=>(0,s.jsx)("rect",{className:h3("bar"),height:n,rx:1,style:{"--base-height":`${n/10}rem`,"--base-y":`${o/10}rem`,"--pulse-base-height":r&&`${r/10}rem`,"--pulse-base-y":a&&`${a/10}rem`,"--pulse-height":`${i/10}rem`,"--pulse-y":`${c/10}rem`,"--delay":l},width:t,x:e,y:o}),m3=({animating:e})=>(0,s.jsx)("span",{className:h3({animating:e}),children:(0,s.jsxs)("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 20 16",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)(jr,{delay:"0s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:0,y:7}),(0,s.jsx)(jr,{delay:"0.1s",height:4,pulseBaseHeight:3,pulseBaseY:6.5,pulseHeight:8,pulseY:4,width:2,x:3,y:6}),(0,s.jsx)(jr,{delay:"0.2s",height:10,pulseBaseHeight:8,pulseBaseY:4,pulseHeight:12,pulseY:2,width:2,x:6,y:3}),(0,s.jsx)(jr,{delay:"0.3s",height:16,pulseBaseHeight:12,pulseBaseY:2,pulseHeight:16,pulseY:0,width:2,x:9,y:0}),(0,s.jsx)(jr,{delay:"0.4s",height:8,pulseBaseHeight:6,pulseBaseY:5,pulseHeight:12,pulseY:2,width:2,x:12,y:4}),(0,s.jsx)(jr,{delay:"0.5s",height:11,pulseBaseHeight:9,pulseBaseY:3.5,pulseHeight:15,pulseY:.5,width:2,x:15,y:2.5}),(0,s.jsx)(jr,{delay:"0.6s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:18,y:7})]})});var hG;function mf(){return document.getElementById("page-wrap")}const Rme=e=>{const t=e.value.length;e.focus(),e.setSelectionRange(t,t)},Pme=e=>{const t=hG(["current","editor"],e);if(!t)return null;const n=t.value.length;return t.focus(),t.setSelectionRange(n,n),e};function ff(e,t){const n=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;if(t==="start")return n.top>=0;if(t==="center"){if(n.height>o)return n.top<=0&&n.bottom>=o;const a=o/2,i=n.top+n.height/2,c=o*.25;return Math.abs(a-i)<c}return t==="end"?n.bottom<=o:n.top>=0&&n.left>=0&&n.bottom<=o&&n.right<=r}function mG(e,{behavior:t="smooth",offsetTop:n=0}={}){const o=Kx(e);if(!o||!("getBoundingClientRect"in o)){const r=e.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:Math.max(0,r-n),behavior:t})}else{const r=o.getBoundingClientRect().top,a=e.getBoundingClientRect().top-r,i=Math.max(0,o.scrollTop+a-n);o.scrollTo({top:i,behavior:t})}}function Mme(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(t)}}function f3({anchor:e,popover:t,positionX:n}){if(!e||!t)return null;const o=e.getBoundingClientRect(),a=window.getComputedStyle(e).direction==="rtl",i=window.getComputedStyle(t),c=parseFloat(i.marginTop),l=t.offsetWidth,d=window.visualViewport??{width:window.innerWidth,height:window.innerHeight},h=o.top+o.height+t.offsetHeight+c>d.height?o.top-(c*2+t.offsetHeight):o.top+o.height;let m;if(n==="center"){const f=o.left+o.width/2;m=a?d.width-f-l/2:f-l/2}else n==="right"?m=a?d.width-o.left-l:o.right-l:m=Math.min(a?d.width-o.right:o.left,d.width-l);return{left:m,top:h}}var fG,Ve=p(82920);const Bd=Ve.createContext(null);function pG({children:e,isDisabled:t,onClose:n,onOpen:o,onSelect:r,positionX:a="left"}){const[i,c]=Ve.useState(!1),l=(0,Oe.A)(i),[d,h]=Ve.useState(null),m=Ve.useRef(null),f=Ve.useRef(null),v=Ve.useRef(null),x=`${`menu-${Ve.useId()}`}-content`,b=Ve.useCallback(({direction:P,predFn:j=()=>!0})=>{if(!v.current)return;const O=Array.from(v.current.querySelectorAll('[role="menuitem"]')),B=O.length,D=O.findIndex(U=>U===document.activeElement);let H,$,W;switch(P){case"start":H=0,$=1;break;case"end":H=B-1,$=-1;break;case"backwards":H=D-1,$=-1;break;case"forwards":H=D+1,$=1;break;default:H=D+1,$=1}for(let U=0;U<=B;U++){H>=B?H=0:H<0&&(H=B-1);const Z=O[H];if(Z!=null&&CG(Z)&&j(Z)){W=Z;break}else H=H+$}W&&W.focus()},[]),L=Ve.useCallback(()=>{b({direction:"start"})},[b]),S=Ve.useCallback(()=>{b({direction:"end"})},[b]),y=Ve.useCallback(()=>{b({direction:"backwards"})},[b]),T=Ve.useCallback(()=>{b({direction:"forwards"})},[b]),k=Ve.useCallback(P=>{b({direction:"forwards",predFn:j=>xG(j,P)})},[b]),I=Ve.useCallback(()=>{i?c(!1):(c(!0),setTimeout(T,25))},[T,i]),E=Ve.useCallback(()=>{f.current?.focus(),c(!1)},[]),w=Ve.useCallback(()=>{c(!0),setTimeout(T,25)},[T]),A=Ve.useCallback(()=>{c(!0),setTimeout(y,25)},[y]),N=Ve.useCallback(()=>{const{left:P,top:j}=f3({anchor:f.current,popover:v.current,positionX:a});h({transform:`translate3d(${P}px, ${j}px, 0)`,visibility:"visible"})},[a]),R=Ve.useCallback(P=>{const j=P.currentTarget;p3(j)||(r?.(j.getAttribute("data-name")),E())},[E,r]),M=Ve.useCallback(P=>{const j=P.key;if(P.altKey||P.ctrlKey||P.metaKey)return;let O=!1;if(P.shiftKey)j==="Tab"?y():j.trim()!==""&&k(j),O=!0;else switch(j){case" ":case"Enter":R(P),O=!0;break;case"Esc":case"Escape":E(),O=!0;break;case"ArrowUp":y(),O=!0;break;case"Tab":case"ArrowDown":T(),O=!0;break;case"Home":case"PageUp":L(),O=!0;break;case"End":case"PageDown":S(),O=!0;break;default:k(j);break}O&&(P.stopPropagation(),P.preventDefault())},[E,R,k,L,S,T,y]);return Ve.useEffect(()=>{const P=j=>{i&&m.current!=null&&v.current!=null&&!m.current.contains(j.target)&&!v.current.contains(j.target)&&c(!1)};return i?document.addEventListener("click",P):document.removeEventListener("click",P),()=>{document.removeEventListener("click",P)}},[i]),Ve.useEffect(()=>(i?window.addEventListener("resize",N):window.removeEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[N,i]),Ve.useEffect(()=>{const P=ad(m.current);for(const j of P)i?j?.addEventListener("scroll",N,{passive:!0}):j?.removeEventListener("scroll",N);return()=>{for(const j of P)j?.removeEventListener("scroll",N)}},[N,i]),Ve.useEffect(()=>{i?N():h(null)},[N,i]),Ve.useEffect(()=>{if(l&&!i)n?.();else if(!l&&i&&(o?.(),m.current)){const P=new CustomEvent("menuopen",{bubbles:!0,detail:{target:m.current}});m.current.dispatchEvent(P)}},[l,i,n,o]),Ve.useEffect(()=>{const P=j=>{j.detail.target!==m.current&&c(!1)};return document.addEventListener("menuopen",P),()=>{document.removeEventListener("menuopen",P)}},[]),(0,s.jsx)(Bd.Provider,{value:{htmlIdContent:x,isExpanded:i,onCloseFocusTrigger:E,onExpandFocusMenuItemNext:w,onExpandFocusMenuItemPrevious:A,onFocusMenuItemByPrefix:k,onFocusMenuItemFirst:L,onFocusMenuItemLast:S,onFocusMenuItemNext:T,onFocusMenuItemPrevious:y,onItemClick:R,onItemKeyDown:M,onTriggerClick:I,refContent:v,refTrigger:f,styleContent:d},children:(0,s.jsx)("div",{"aria-owns":x,inert:t?!0:void 0,ref:m,children:e})})}function gG({as:e,children:t,label:n,labelledBy:o,...r}){const{htmlIdContent:a,isExpanded:i,onTriggerClick:c,onCloseFocusTrigger:l,onExpandFocusMenuItemNext:d,onExpandFocusMenuItemPrevious:h,refTrigger:m}=Ve.useContext(Bd),f=Ve.useCallback(C=>{let g=!1;switch(C.key){case" ":case"Enter":case"ArrowDown":case"Down":d(),g=!0;break;case"Esc":case"Escape":l(),g=!0;break;case"Up":case"ArrowUp":h(),g=!0;break;default:break}g&&(C.stopPropagation(),C.preventDefault())},[l,d,h]),v=e??"button";return(0,s.jsx)(v,{...r,"aria-controls":a,"aria-expanded":i,"aria-haspopup":"menu","aria-label":n,"aria-labelledby":o,"data-menu-trigger":"",onClick:c,onKeyDown:f,ref:m,type:"button",children:t})}function vG({children:e,className:t}){const{htmlIdContent:n,isExpanded:o,refContent:r,styleContent:a}=Ve.useContext(Bd);return o?Es.createPortal((0,s.jsx)("div",{className:t,"data-menu-content":"",hidden:o?void 0:!0,id:n,ref:r,role:"menu",style:a,children:e}),Zs()):null}function Dd({children:e,className:t,isDisabled:n,name:o,tooltipId:r}){const{onItemClick:a,onItemKeyDown:i}=Ve.useContext(Bd),c=Ve.useCallback(l=>{l.currentTarget?.focus()},[]);return(0,s.jsx)("button",{"aria-describedby":r,"aria-disabled":n,className:t,"data-menu-item":"","data-name":o,onClick:n?void 0:a,onKeyDown:i,onMouseOver:c,role:"menuitem",tabIndex:n?-1:void 0,type:"button",children:e})}function Ome({children:e}){return fG("span",{"data-menu-item-icon":"",children:e})}function p3(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function CG(e){return e!=null&&e.tagName==="BUTTON"&&!p3(e)}function xG(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const ja=V("audio-player-actions-condensed"),Mo=Object.freeze({DeleteAudio:"delete-audio",EditAudio:"edit-audio",EditTranscript:"edit-transcript",RevertToSource:"revert-audio-to-source"}),bG=({audioPlayerId:e,condensed:t=!1,transcriptMedia:n,onTranscriptClick:o,onTranscriptClose:r,item:a,side:i,refs:c})=>{const{mode:l,isVariantLocale:d,handleOpenMediaModal:h,handleDelete:m,handleRevertToSource:f}=fd(),v=Qi(),C=Rt(),g=at(),x=a&&"media"in a&&a.media?g(a.media):void 0,b=x&&"audio"in x?x.audio.aiAudioSettings:void 0,L=os(),S=Bh(),y=L?S(L):"",[T,k]=(0,u.useState)(!1),I=(0,u.useCallback)(()=>k(!0),[]),E=(0,u.useCallback)(()=>k(!1),[]),w=b?.l10nAutoGenStatus==="reverted-to-source",A=d&&"audio"in x&&x.audio?.sourceType==="ai-audio"&&b?.l10nAutoGenStatus!=="unsupported-locale",N=wt(),R=v?.audioPlayerIdOpen===e,M=R?N?.audioHideTranscript:l==="edit"?"Edit transcript":N?.audioShowTranscript;function P(O){switch(O){case Mo.DeleteAudio:m(C.id,a,c);break;case Mo.EditTranscript:R?r?.():o?.();break;case Mo.EditAudio:h(C,a,c,i,{triggeredFrom:"block_audio_button"});break;case Mo.RevertToSource:f(C.id,a);break}}const j=!!g(n)?.audio?.transcript;return h||m||j?(0,s.jsx)(Po,{elementFocused:T,message:"Options",children:(0,s.jsxs)(pG,{onSelect:P,positionX:"left",children:[(0,s.jsx)(gG,{className:ja("trigger",{condensed:t}),label:"Options",onBlur:E,onFocus:I,onMouseEnter:I,onMouseLeave:E,children:(0,s.jsx)(ie,{name:"ellipsis-regular"})}),(0,s.jsxs)(vG,{className:ja("content"),children:[h?(0,s.jsx)(Dd,{className:ja("menu-item"),name:Mo.EditAudio,children:"Edit audio"}):null,l==="edit"||j?(0,s.jsx)(Dd,{className:ja("menu-item"),name:Mo.EditTranscript,children:M}):null,m&&C?.variant!=="audio"?(0,s.jsx)(Dd,{className:ja("menu-item"),name:Mo.DeleteAudio,children:"Remove audio"}):null,f&&A?(0,s.jsx)(Po,{message:w?"Audio currently synced to source":void 0,children:(0,s.jsxs)(Dd,{className:ja("menu-item"),isDisabled:w,name:Mo.RevertToSource,children:["Revert to source audio (",y,")"]})}):null]})]})}):null};var yG,SG,ze=p(82920);const ec=ze.createContext(null);function LG({children:e,className:t,isDisabled:n,onClose:o,onItemActiveChange:r,onOpen:a,onSelect:i,portalArgs:c,positionX:l="left",value:d}){const[h,m]=ze.useState(null),f=(0,Oe.A)(h),[v,C]=ze.useState(!1),g=(0,Oe.A)(v),[x,b]=ze.useState(null),L=ze.useRef(null),S=ze.useRef(null),y=ze.useRef(null),k=`select-${ze.useId()}`,I=`${k}-content`,E=h?.id,w=ze.useCallback(j=>{const O=j.currentTarget;g3(O)||(C(!1),m(O),i(O.getAttribute("data-value")),j.stopPropagation())},[i]),A=ze.useCallback(j=>{m(j)},[]),N=ze.useCallback(()=>{C(j=>!j)},[]),R=ze.useCallback(()=>{const{left:j,top:O}=f3({anchor:S.current,popover:y.current,positionX:l}),H=window.getComputedStyle(S.current).direction==="rtl"?-j:j;b({transform:`translate3d(${H}px, ${O}px, 0)`,visibility:"visible",width:`${S.current?.offsetWidth}px`})},[l]),M=ze.useCallback(j=>{const O=Array.from(y.current?.querySelectorAll("[data-select-item]")??[]),B=O.length,D=O.findIndex(W=>W.getAttribute("data-select-item")==="current");let H,$=D+1;for(let W=0;W<B;W++){$>=B&&($=0);const U=O[W];if(U!=null&&!g3(U)&&EG(U,j)){H=W;break}else $=B-1}H&&(m(O[H]),O[H]?.scrollIntoView({block:"center"}))},[]),P=ze.useCallback(j=>{const O=j.key;if(j.ctrlKey||j.metaKey)return;let B=!1;const D=Array.from(y.current?.querySelectorAll("[data-select-item]")??[]),H=D.findIndex($=>$.getAttribute("data-select-item")==="current");if(v)if(O.length===1&&O!==" "&&!j.altKey&&!j.ctrlKey&&!j.metaKey)M(O);else switch(O){case" ":case"Enter":C(!1),D[H]!=null&&i(D[H].getAttribute("data-value")),B=!0;break;case"Esc":case"Escape":C(!1),m(D.find($=>$.getAttribute("aria-selected")==="true")),B=!0;break;case"ArrowUp":j.altKey?(C(!1),D[H]!=null&&i(D[H].getAttribute("data-value")??"")):H>0&&(m(D[H-1]),D[H-1].scrollIntoView({block:"center"})),B=!0;break;case"ArrowDown":H<D.length-1&&(m(D[H+1]),D[H+1].scrollIntoView({block:"center"})),B=!0;break;case"Home":m(D[0]),D[0]?.scrollIntoView({block:"center"}),B=!0;break;case"End":m(D[D.length-1]),D[D.length-1]?.scrollIntoView({block:"center"}),B=!0;break;case"PageUp":m(D[0]),D[0]?.scrollIntoView({block:"center"}),B=!0;break;case"PageDown":m(D[D.length-1]),D[D.length-1]?.scrollIntoView({block:"center"}),B=!0;break;case"Tab":C(!1),D[H]!=null&&i(D[H].getAttribute("data-value"));break}else if(O.length===1&&O!==" "&&!j.altKey&&!j.ctrlKey&&!j.metaKey)C(!0),M(O);else switch(O){case" ":case"Enter":C(!0),B=!0;break;case"ArrowUp":C(!0),m(D[0]),B=!0;break;case"ArrowDown":C(!0),B=!0;break;case"Home":C(!0),m(D[0]),B=!0;break;case"End":C(!0),m(D[D.length-1]),B=!0;break}B&&(j.stopPropagation(),j.preventDefault())},[M,v,i]);return ze.useEffect(()=>{const j=y.current?.querySelector('[data-select-item][aria-selected="true"]');m(j)},[]),ze.useEffect(()=>{const j=y.current?.querySelector(`[data-select-item][data-value="${d}"]`);m(j)},[d]),ze.useEffect(()=>{const j=O=>{v&&L.current!=null&&y.current!=null&&!L.current.contains(O.target)&&!y.current.contains(O.target)&&C(!1)};return v?document.addEventListener("click",j):document.removeEventListener("click",j),()=>{document.removeEventListener("click",j)}},[v]),ze.useEffect(()=>(v?window.addEventListener("resize",R):window.removeEventListener("resize",R),()=>{window.removeEventListener("resize",R)}),[R,v]),ze.useEffect(()=>{const j=ad(L.current);for(const O of j)v?O?.addEventListener("scroll",R,{passive:!0}):O?.removeEventListener("scroll",R);return()=>{for(const O of j)O?.removeEventListener("scroll",R)}},[R,v]),ze.useEffect(()=>{v?R():b(null)},[R,v]),ze.useEffect(()=>{v&&f!=null&&f!==h&&r?.({value:h.getAttribute("data-value")})},[v,f,h,r]),ze.useEffect(()=>{if(g&&!v)o?.();else if(!g&&v&&(a?.(),L.current)){const j=new CustomEvent("comboboxopen",{bubbles:!0,detail:{target:L.current}});L.current.dispatchEvent(j)}},[g,v,o,a]),ze.useEffect(()=>{const j=O=>{O.detail.target!==L.current&&C(!1)};return document.addEventListener("comboboxopen",j),()=>{document.removeEventListener("comboboxopen",j)}},[]),(0,s.jsx)(ec.Provider,{value:{activeEl:h,htmlIdActiveDescendant:E,htmlIdBase:k,htmlIdContent:I,isExpanded:v,onItemClick:w,onItemHover:A,onTriggerClick:N,onTriggerKeyDown:P,portalArgs:c,refContent:y,refTrigger:S,selectedValue:d,styleContent:x},children:(0,s.jsx)("div",{"aria-owns":I,className:t,inert:n?!0:void 0,ref:L,children:e})})}function TG({children:e,className:t,labelledBy:n,as:o,...r}){const{htmlIdActiveDescendant:a,htmlIdContent:i,isExpanded:c,onTriggerClick:l,onTriggerKeyDown:d,refTrigger:h}=ze.useContext(ec),m=!!o,f=o??"button";return(0,s.jsxs)(f,{"aria-activedescendant":a,"aria-controls":i,"aria-expanded":c,"aria-haspopup":"listbox","aria-labelledby":n,className:t,"data-select-trigger":m?void 0:"",onClick:l,onKeyDown:d,ref:h,role:"combobox",type:"button",...r,children:[(0,s.jsx)("span",{"data-select-trigger-text":"",children:e}),(0,s.jsx)("span",{"data-select-trigger-icon":"",children:c?(0,s.jsx)(ie,{name:"chevron-up"}):(0,s.jsx)(ie,{name:"chevron-down"})})]})}function kG({children:e,className:t,label:n,labelledBy:o,style:r={}}){const{htmlIdContent:a,isExpanded:i,portalArgs:c,refContent:l,styleContent:d}=ze.useContext(ec);return Es.createPortal((0,s.jsx)("div",{"aria-label":n,"aria-labelledby":o,className:t,"data-select-content":"",hidden:i?void 0:!0,id:a,ref:l,role:"listbox",style:{...d,...r},children:e}),Zs(c))}function Dme({children:e,className:t,labelText:n}){const{htmlIdBase:o}=ze.useContext(ec),r=ze.useId(),a=`${o}-group-label-${r}`;return yG("div",{"aria-labelledby":a,className:t,"data-select-group":"",role:"group",children:[SG("div",{"data-select-group-label":"",id:a,role:"presentation",children:n}),e]})}function IG({children:e,className:t,labelledBy:n,isDisabled:o,value:r}){const{activeEl:a,htmlIdBase:i,onItemClick:c,onItemHover:l,selectedValue:d}=ze.useContext(ec),h=ze.useRef(null),m=ze.useId(),f=h.current===a,v=r===d,C=`${i}-option-${m}`,g=ze.useCallback(()=>{l(h.current)},[l]);return(0,s.jsxs)("div",{"aria-disabled":o,"aria-labelledby":n,"aria-selected":v,className:t,"data-select-item":f?"current":"","data-value":r,id:C,onClick:o?void 0:c,onMouseEnter:g,ref:h,role:"option",children:[e,v&&(0,s.jsx)("span",{"data-select-item-selected":"",children:(0,s.jsx)(ie,{name:"check"})})]})}function g3(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function EG(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const pf=V("playback-speed-menu"),NG=({onChange:e,condensed:t=!1,speed:n})=>{const o=wt(),[r,a]=(0,u.useState)(!1),i=(0,u.useCallback)(()=>a(!0),[]),c=(0,u.useCallback)(()=>a(!1),[]);return(0,s.jsx)(Po,{elementFocused:r,message:o?.audioPlaySpeed,children:(0,s.jsxs)(LG,{className:pf(),onOpen:c,onSelect:l=>e(parseFloat(l)),portalArgs:{id:"portal",childType:"other"},value:String(n),children:[(0,s.jsxs)(TG,{"aria-label":o?.audioPlaySpeed,as:qs.ArcButton,className:pf("trigger"),hierarchy:"tertiary",labelledBy:void 0,layout:"hug",onBlur:c,onFocus:i,onMouseEnter:i,onMouseLeave:c,shape:"square",size:t?"sm":"md",children:[n,"x"]}),(0,s.jsx)(kG,{className:pf("content"),label:o?.audioPlaySpeed,children:uG.map((l,d)=>(0,s.jsx)(IG,{value:String(l.value??""),children:l.label},d))})]})})};function jG(e=!1,t=200){const n=(0,u.useRef)(void 0),[o,r]=(0,u.useState)(e),a=(0,u.useCallback)(()=>{n.current&&clearTimeout(n.current),r(!0)},[]),i=(0,u.useCallback)(c=>{n.current&&clearTimeout(n.current),c?r(!1):n.current=setTimeout(()=>{r(!1)},t)},[t]);return(0,u.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{isActive:o,setActive:a,setInactive:i}}const gf=V("audio-player-volume"),wG=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function AG(e,t){return t||e<=0?"volumeXmark":e<=1/3?"volumeLow":e<=2/3?"volume":"volumeHigh"}function RG({condensed:e=!1,muted:t,onChange:n,onMute:o,volume:r}){const a=wt(),i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),{isActive:d,setActive:h,setInactive:m}=jG(!1,200),f=t?0:r;function v(g){if(wG.includes(g.code)){const L=window.getComputedStyle(g.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",S=g.code==="ArrowUp"||g.code===L?Math.min(f+.05,1):Math.max(f-.05,0);n(S),g.stopPropagation(),g.preventDefault()}else g.code==="KeyM"&&(o(),g.stopPropagation(),g.preventDefault())}(0,u.useEffect)(()=>{l.current.style.setProperty("--slider-volume",`${f*100}%`)},[f]);const C=`${Math.round(f*100)}%`;return(0,s.jsxs)("div",{className:gf(),onKeyDown:v,onMouseEnter:h,onMouseLeave:()=>m(!1),ref:i,children:[(0,s.jsx)("button",{"aria-label":f<=0?a?.a11yMediaUnmute:a?.a11yMediaMute,className:gf("button",{condensed:e}),onClick:o,ref:c,type:"button",children:(0,s.jsx)(ie,{name:AG(f,t)})}),(0,s.jsx)("input",{"aria-label":a?.a11yMediaVolume,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":f*100,"aria-valuetext":C,className:gf("slider").mix(d?"":"visually-hidden"),max:100,min:0,onChange:g=>n(g.currentTarget.valueAsNumber/100),ref:l,type:"range",value:f*100})]})}const Nn=V("audio-player"),Fd=({currentTime:e,duration:t})=>Math.round(e/t*100)||0,v3=e=>{if(!e)return{hours:0,minutes:0,seconds:0};const t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=e%60;return{hours:t,minutes:n,seconds:o}},C3=e=>{const{minutes:t,seconds:n}=v3(e);let o="";return t>0&&(o+=`${new Intl.NumberFormat(void 0,{style:"unit",unit:"minute",unitDisplay:"long"}).format(t)} `),o+=new Intl.NumberFormat(void 0,{style:"unit",unit:"second",unitDisplay:"long"}).format(Math.round(n)),o},PG=e=>{const{hours:t,minutes:n,seconds:o}=v3(e);function r(c,l,d){return(new Array(d+1).join(l)+c).slice(-d)}const a=r(n,"0",2),i=r(o,"0",2);return t>0?`${t}:${a}:${i}`:`${n}:${i}`};class wa extends u.Component{audio;play;playerControls;seekSlider;onDelete;constructor(t){super(t),this.state={condensed:!1,currentTime:0,playheadPositionSaveThrottle:0,playbackSpeed:1,playerExpanded:!0,shouldLoadPlayheadPosition:!0,volume:1,muted:!1,maxTime:t.audioVideoPlayhead||0,sliderPercent:0},this.handleChange=this.handleChange.bind(this),this.handleClickInsideAudioPlayer=this.handleClickInsideAudioPlayer.bind(this),this.onPlayClick=this.onPlayClick.bind(this),this.onTogglePlayer=this.onTogglePlayer.bind(this)}static defaultProps={allowTabNavigation:!0,mediaSrc:null,onEnd:()=>{},onLoad:()=>{},onPause:()=>{},onPlay:()=>{},onSeek:()=>{},shouldPause:!1,transcriptMedia:null};static timeMs(t){return Math.round(t*1e3)}keySeek(t){const{canRestrictSeek:n}=this.props,{currentTime:o,duration:r}=this.audio,{maxTime:a}=this.state;let i=o+t;n&&i>a&&(i=a);const c=Math.max(0,r-.01);this.audio.currentTime=t<0?Math.max(i,0):Math.min(i,c)}changeVolume=t=>{this.audio.volume=Math.round(t*100)/100,this.audio.muted=!1};muteToggle=()=>{this.audio.volume<=0?(this.audio.volume=1,this.audio.muted=!1):this.audio.muted=!this.audio.muted};changeVolumeDelta=t=>{const n=t<0?Math.max(this.audio.volume+t,0):Math.min(this.audio.volume+t,1);this.changeVolume(n)};componentDidMount(){xe.addChangeListener(this.handleChange)}componentDidUpdate(t,n){const r=this.props.activeIndex!=null&&this.props.itemIndex!=null&&t.activeIndex!==this.props.activeIndex&&this.props.activeIndex!==this.props.itemIndex;(!t.shouldPause&&this.props.shouldPause||r)&&(this.audio.pause(),xe.isPlaying&&xe.playerId===this.props.id&&xe.pause()),n.playbackSpeed!==this.state.playbackSpeed&&(this.audio.playbackRate=this.state.playbackSpeed)}componentWillUnmount(){const{recordMediaPlayheadPosition:t,id:n}=this.props;xe.playerId===n&&xe.pause(),xe.removeChangeListener(this.handleChange),t&&t(Fd(this.audio))}handleClickInsideAudioPlayer=t=>{t.stopPropagation(),t.preventDefault()};handleChange(){xe.playerId===this.props.id?this.audio&&(xe.isPlaying&&this.audio.paused?this.audio.play():!xe.isPlaying&&!this.audio.paused&&this.audio.pause(),this.forceUpdate()):xe.isPlaying&&(this.audio.pause(),this.forceUpdate())}containerResizeRef=t=>{const n=new ResizeObserver(([o])=>{if(!o)return;const r=getComputedStyle(document.documentElement),a=parseFloat(r.fontSize)/10;this.setState({condensed:o.contentRect.width<300*a})});return this.setState({condensed:t.getBoundingClientRect().width<256}),n.observe(t),()=>{n.disconnect()}};render(){const{allowTabNavigation:t,id:n,isEditor:o,isOverlayAudio:r,labels:a,mediaSrc:i,mode:c,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m,item:f,side:v,refs:C,transcriptAudioPlayerIdOpen:g}=this.props,x=xe.isPlaying&&xe.playerId===n,{currentTime:b,playerExpanded:L}=this.state,S=this.audio?.duration??0,y=Number.isNaN(S)?0:S,T=Math.round(y-b),k=PG(T),I=C3(T),E=C3(b),w=t?0:-1,A=!o,{a11yGroupAudioPlayer:N,a11yMediaPlay:R,a11yMediaPause:M,a11yMediaSeek:P}=a??{},j=Nn({overlay:r,collapsed:r&&!L,expanded:!r||L,"volume-slider-below":this.props.volumeSliderPosition==="below"}),O=o||c==="edit"?"Collapse audio player":a?.audioCollapsePlayer,B=o||c==="edit"?"Expand audio player":a?.audioExpandPlayer,D=L?O:B,H=ps({refs:C}),W=g===H?Um(g):void 0;return(0,s.jsx)("div",{className:Nn("container"),"data-search-content-ignore":"",onClick:this.handleClickInsideAudioPlayer,ref:this.containerResizeRef,children:(0,s.jsxs)("div",{className:j,id:n,children:[A&&(0,s.jsx)("div",{className:Nn("waveform"),children:r?(0,s.jsx)(Po,{message:D,children:(0,s.jsx)("button",{"aria-label":D,className:Nn("waveform-icon"),onClick:this.onTogglePlayer,type:"button",children:(0,s.jsx)(m3,{animating:x})})}):(0,s.jsx)("div",{className:Nn("waveform-icon",{disabled:!0}),children:(0,s.jsx)(m3,{animating:x})})}),(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":N,"aria-owns":W,className:Nn("housing",{"with-border":A}),inert:!this.state.playerExpanded,onKeyDown:this.onKeyDown.bind(this),role:"group",tabIndex:w,children:[(0,s.jsxs)("div",{className:Nn("play-timer-housing"),children:[(0,s.jsx)(qs.ArcButton,{"aria-label":x?M:R,className:Nn("play"),hierarchy:"tertiary",icon:(0,s.jsx)(ie,{className:Nn("icon"),name:x?"pause-solid":"play-solid"}),layout:"icon",onClick:this.onPlayClick,ref:U=>{this.play=U},shape:"square",size:this.state.condensed?"sm":"md",tabIndex:w,type:"button"}),(0,s.jsx)("input",{"aria-label":P,"aria-valuemax":y,"aria-valuemin":0,"aria-valuenow":b,"aria-valuetext":E,className:Nn("seek-slider"),max:y,min:0,onChange:this.onSeekSliderChange.bind(this),ref:U=>{this.seekSlider=U},step:.01,style:{"--seek-slider-percent":`${this.state.sliderPercent}%`},type:"range",value:b}),(0,s.jsx)("div",{"aria-label":I,className:Nn("timer").mix(this.state.condensed?"visually-hidden-always":""),role:"timer",children:k})]}),(0,s.jsxs)("div",{className:Nn("player-controls"),ref:U=>{this.playerControls=U},children:[(0,s.jsx)(NG,{condensed:this.state.condensed,onChange:U=>{this.setState({playbackSpeed:U})},speed:this.state.playbackSpeed}),(0,s.jsx)(RG,{condensed:this.state.condensed,muted:this.state.muted,onChange:this.changeVolume,onMute:this.muteToggle,volume:this.state.volume}),c==="readonly"||o?(0,s.jsx)(cG,{audioPlayerId:H,condensed:this.state.condensed,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m}):(0,s.jsx)(bG,{audioPlayerId:H,condensed:this.state.condensed,item:f,onTranscriptClick:d,onTranscriptClose:h,refs:C,side:v,transcriptMedia:m})]})]}),(0,s.jsx)("audio",{className:Nn("audio-element"),"data-testid":"audio-player-element",onEnded:this.onEnded.bind(this),onLoadedMetadata:this.onLoadedMetadata.bind(this),onPause:this.onAudioPlayPause,onPlay:this.onAudioPlayPause,onSeeked:this.onSeeked.bind(this),onTimeUpdate:this.onTimeUpdate.bind(this),onVolumeChange:this.onVolumeChangeHandler,ref:U=>{this.audio=U},src:mt(`${i}`)},"audio-"+n)]},`player-${n}`)})}onKeyDown(t){const o=fs(this.onPlayClick),r=fs(()=>this.keySeek(5)),a=fs(()=>this.keySeek(-5)),i=fs(()=>this.changeVolumeDelta(.05)),c=fs(()=>this.changeVolumeDelta(-.05)),l=fs(()=>this.muteToggle()),d=g=>g.target===this.play,h=g=>g.target===this.seekSlider,m=g=>this.playerControls===g.target||this.playerControls.contains(g.target),f=un()([[Ti,o],[Qs,Ao],[Ks,Ao],[Cr,Ao],[vr,Ao]]),v=un()([[Ti,o],[VM,r],[zM,a]]),C=un()([[Ti,o],[Qs,r],[Ks,a],[vr,i],[Cr,c],[g=>g.code==="KeyM",l]]);un()([[d,f],[h,v],[m,Ao],[tr(),C]])(t)}onPlayClick(t){t.stopPropagation(),t.preventDefault();const{audioVideoPlayhead:n}=this.props,{duration:o,paused:r}=this.audio;r&&n&&this.state.shouldLoadPlayheadPosition&&(this.audio.currentTime=o*n/100||0),r?this.audio.play():this.audio.pause()}onAudioPlayPause=t=>{const{id:n,onPause:o,onPlay:r,onTranscriptUpdate:a,recordMediaPlayheadPosition:i,refs:c,transcriptMedia:l}=this.props,{paused:d,currentTime:h,duration:m}=t.currentTarget;if(d)d&&xe.playerId===n&&(xe.isPlaying=!1,o(wa.timeMs(h)),i&&i(Fd({currentTime:h,duration:m})));else{xe.playerId=n,xe.isPlaying=!0,r(wa.timeMs(h));const f=ps({refs:c});a?.({audioPlayerId:f,transcriptMedia:l})}this.setState({shouldLoadPlayheadPosition:!1})};onVolumeChangeHandler=t=>{const{volume:n,muted:o}=t.currentTarget;this.setState({volume:n,muted:o})};onSeekSliderChange(t){const{canRestrictSeek:n}=this.props,{maxTime:o}=this.state;let r=t.currentTarget.valueAsNumber;n&&r>o&&(r=o),this.audio.currentTime=r}onLoadedMetadata(t){const{currentTime:n,duration:o,muted:r,volume:a}=t.currentTarget,i=n/o*100;this.setState({currentTime:n,muted:r,volume:a,sliderPercent:i});const{onLoad:c}=this.props;c()}onEnded(t){const n=t.currentTarget;this.audio.currentTime=0,this.setState({currentTime:n.currentTime}),xe.isPlaying=!1,this.props.onEnd(wa.timeMs(n.currentTime)),this.forceUpdate()}onSeeked(t){const{id:n,onSeek:o,recordMediaPlayheadPosition:r}=this.props,{currentTime:a,duration:i}=t.currentTarget;xe.isPlaying&&xe.playerId!==n&&(xe.isPlaying=!1),xe.playerId=n,o(wa.timeMs(a)),r&&r(Fd({currentTime:a,duration:i}))}onTimeUpdate(t){const n=t.currentTarget,{recordMediaPlayheadPosition:o}=this.props,{currentTime:r,duration:a}=n,i=Math.floor(r);r>this.state.maxTime&&this.setState({maxTime:r});const c=r/a*100;Gp(),this.setState({currentTime:r,sliderPercent:c}),i%5===0&&this.state.playheadPositionSaveThrottle!==i&&o&&(o(Fd(n)),this.setState({playheadPositionSaveThrottle:i}))}onTogglePlayer(t){this.setState(({playerExpanded:n})=>({playerExpanded:!n})),t.preventDefault(),t.stopPropagation()}}const MG=wa,so=e=>t=>t!=null&&typeof t=="object"&&"status"in t&&typeof t.status=="string"&&e.includes(t.status),OG=so(["uploading","processing","cropping","crushing"]),Hme=so(["canceled"]),x3=so(["complete"]),BG=so(["cropping"]),DG=so(["crushing"]),FG=so(["uploading"]),HG=so(["processing"]),$G=so(["errored"]),b3=so(["cropping","crushing","errored","processing","uploading"]);function VG(e){return e==null||typeof e!="object"?0:Object.values(e).filter(OG).length}function $me(e){return Math.round(e.loaded*100/e.total)}const Vme=e=>e?.file?.name||e?.opts?.filename||"";function zme(e){return e==null||typeof e!="object"?!1:Object.keys(e).length>0&&VG(e)>0}const Hd=e=>X()("upload-progress__wrapper",e),y3=(0,u.createContext)(null);function S3(){return(0,u.useContext)(y3)}const _me=y3.Provider;function zG(e){function t(n){const o=S3();return o?(0,s.jsx)(e,{...n,getUpload:o.getUpload,handleUploadDismiss:o.handleUploadDismiss}):(0,s.jsx)(e,{...n})}return t.displayName=`withUploadStatusContext(${e.displayName||e.name})`,t}const $d=({onClick:e,text:t})=>(0,s.jsxs)("button",{className:"upload-action-button",onClick:e,type:"button",children:[t,(0,s.jsx)("span",{className:"visually-hidden-always",children:" upload"})]}),vf=20,tc=vf/2,Cf=tc-2,L3=+(2*Math.PI*Cf).toFixed(3),_G=e=>L3*(100-e)/100;function T3({classes:e,percent:t}){return(0,s.jsxs)("svg",{className:X()("upload-progress__pie",e),focusable:"false",height:`${vf}px`,width:`${vf}px`,children:[(0,s.jsx)("circle",{className:"upload-progress__border",cx:tc,cy:tc,r:Cf}),(0,s.jsx)("circle",{className:"upload-progress__progress",cx:tc,cy:tc,r:Cf,strokeDasharray:L3,strokeDashoffset:_G(t)})]})}const UG=({text:e})=>(0,s.jsxs)("div",{className:"upload-progress",children:[(0,s.jsx)(T3,{classes:"upload-progress__pie--processing",percent:70}),(0,s.jsx)("div",{className:"upload-progress__text",children:e})]}),GG=({percentage:e,text:t="Uploading\u2026"})=>(0,s.jsxs)("div",{className:"upload-progress",children:[(0,s.jsx)(T3,{percent:e}),(0,s.jsx)("div",{className:"upload-progress__text",children:t})]}),xf=({classes:e,jobId:t,onCancel:n,text:o})=>(0,s.jsxs)("div",{className:Hd(e),children:[(0,s.jsx)(UG,{text:o}),t&&(0,s.jsx)($d,{onClick:n,text:"Cancel"})]}),WG=({classes:e,onCancel:t,percentage:n,text:o})=>(0,s.jsxs)("div",{className:Hd(e),children:[(0,s.jsx)(GG,{percentage:n,text:o}),(0,s.jsx)($d,{onClick:t,text:"Cancel"})]}),KG=({message:e="Error"})=>(0,s.jsxs)("div",{className:"upload-error",children:[(0,s.jsx)(ie,{name:"circle-exclamation"}),(0,s.jsx)("div",{className:"upload-error__text",children:e})]}),QG=({classes:e,message:t,onClick:n})=>(0,s.jsxs)("div",{className:Hd(e),children:[(0,s.jsx)(KG,{message:t}),(0,s.jsx)($d,{onClick:n,text:"Dismiss"})]}),YG=({message:e="Success"})=>(0,s.jsxs)("div",{className:"upload-success",children:[(0,s.jsx)(ie,{name:"check-regular"}),(0,s.jsx)("div",{className:"upload-success__text",children:e})]}),ZG=({classes:e,message:t,onClick:n})=>(0,s.jsxs)("div",{className:Hd(e),children:[(0,s.jsx)(YG,{message:t}),n?(0,s.jsx)($d,{onClick:n,text:"Dismiss"}):null]}),XG=e=>{const{classes:t,data:n={},errorMessage:o,jobId:r,progress:a,onCancelUpload:i,onCancelProcess:c,onErrorDismiss:l,onSuccessDismiss:d,successMessage:h,uploadType:m}=e;return $G(e)?(0,s.jsx)(QG,{classes:t,message:o||n?.message,onClick:l}):FG(e)?(0,s.jsx)(WG,{classes:t,onCancel:i,percentage:a,text:`Uploading ${m}\u2026`}):HG(e)?(0,s.jsx)(xf,{classes:t,jobId:r,onCancel:c,text:`Processing ${m}\u2026`}):DG(e)?(0,s.jsx)(xf,{classes:t,onCancel:c,text:`Uploading ${m}\u2026`}):BG(e)?(0,s.jsx)(xf,{classes:t,onCancel:c,text:"Cropping image\u2026"}):x3(e)&&h?(0,s.jsx)(ZG,{classes:t,message:h,onClick:d}):(0,s.jsx)("div",{})},bf=V("audio-player"),qG=bf("upload-state");function k3({uploadId:e,onAIUploadFinish:t,volumeSliderPosition:n,...o}){const r=S3(),{mode:a}=fd(),i=Qi(),c=r&&e?r.getUpload(e):null,l=(0,u.useMemo)(()=>c&&c.mediaType==="audio"&&b3(c),[c]),d=(0,Oe.A)(l);if((0,u.useEffect)(()=>{!l&&d&&t?.()},[l,d,t]),l){const{jobId:h,status:m,progress:f,data:v}=c,C=x=>()=>r?.handleUploadDismiss(x,c),g=bf({overlay:o.isOverlayAudio,static:o.isOverlayAudio});return(0,s.jsx)("div",{className:bf("container"),children:(0,s.jsx)("div",{className:g,children:(0,s.jsx)(XG,{classes:qG,errorMessage:v?.message,jobId:h,onCancelProcess:C("process"),onCancelUpload:C("upload"),onErrorDismiss:C("error"),progress:f,status:m,successMessage:"Processing\u2026",uploadType:"audio"})})})}return(0,s.jsx)(MG,{...o,mode:a,transcriptAudioPlayerIdOpen:i?.audioPlayerIdOpen??null,volumeSliderPosition:n})}var JG=p(88868),eW=p.n(JG),tW=p(56248),nW=p.n(tW);const sW={course:({courseId:e})=>`/authoring/${e}`,courseLocales:({courseId:e})=>`/manage/locales/${e}`,dashboard:"/manage/all-content",lesson:({courseId:e,lessonId:t})=>`/authoring/${e}/lesson/${t}`};function oW(){const t=Fe()?.id,n=jh();return(0,u.useCallback)(o=>n&&t!=null?sW.lesson({courseId:t,lessonId:o}):In(o),[t,n])}var rW=p(86309),aW=p(73426),iW=p.n(aW);const cW=/(\.\.\/)|(\.\.\.\.\/)+|%2e%2e\/|%252e%252e\/|%2f\/|\/%2e%2e/gi,lW=e=>typeof e=="string"&&e.replace(cW,""),Cn=iW()(lW,rW.J),dW="about:blank",uW=e=>{const t=e?.trim();if(!t)return null;const n=Cn(t);return n===dW?null:/^(https?:\/\/|mailto:)/i.test(n)||/^(\.?\/|[#?])/.test(n)?n:`http://${n.replace(/^\/\//,"")}`},Aa=u.memo(({align:e,alt:t,allowTabNavigation:n=!0,cornerRadius:o,disableZoom:r,getLessonPath:a,height:i,l10nId:c,labels:l,link:d,maxHeight:h=380,onLoad:m,shouldFillWidth:f,src:v,width:C})=>{const g=oW(),x=a??g,b=yo(t),L=d?.type==="url"&&d.destination?uW(d.destination):null,S=d?.type==="block"?sz(d.destination):null,y=d?.type==="lesson"&&!!d.destination||S!=null||!!L,T=n&&!r&&!y,k=X()("img-img",{"img-img--left":e==="left","img-img--right":e==="right","img-img--center":!e||e==="center","img-img--fill":f});let I={};o!=null&&(I["--corner-radius"]=`${Number(o)}px`),C>0&&i>0&&i>h?(C=Math.round(C*h/i),i=h):h&&(!C||!i)&&(I={maxHeight:h});let E=(0,s.jsx)(vn,{alt:b,className:k,"data-l10n-id":c,height:i,onLoad:m,src:v,style:I,width:C});return y&&d?d.type==="lesson"?E=(0,s.jsx)(nn,{className:"img__link",to:x(d.destination),children:E}):d.type==="block"&&S?E=(0,s.jsx)(nn,{className:"img__link",to:`${x(S.lessonId)}?blockId=${S.blockId}`,children:E}):L&&(E=(0,s.jsx)("a",{className:"img__link",href:L,rel:"noopener noreferrer nofollow",target:"_blank",children:E})):T&&(E=(0,s.jsx)(c3,{a11yNameButtonUnzoom:l?.a11yUnzoomImage,a11yNameButtonZoom:l?.a11yZoomImage,children:E})),(0,s.jsx)("div",{className:"img",children:E})});var Xme=p(81651),hW=p(7776),mW=p.n(hW);const fW=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,pW=/\.[a-z]{2,}\.?$/i,gW=(e,t)=>e===0||e===10||e===127||e===100&&t>=64&&t<=127||e===169&&t===254||e===172&&t>=16&&t<=31||e===192&&t===168||e>=224,vW=e=>yf(e);function qme(e){try{if(vW(e))return new URL(e);throw new Error("invalid URL")}catch{return}}const yf=e=>{if(typeof e!="string")return!1;let t;try{t=e.startsWith("//")?new URL(e,"https://placeholder.invalid"):new URL(e)}catch{return!1}if(t.protocol!=="http:"&&t.protocol!=="https:")return!1;const{hostname:n}=t;if(!n)return!1;const o=fW.exec(n);return o?!gW(Number(o[1]),Number(o[2])):pW.test(n)},CW=/^<iframe\b[^>]*\ssrc="([^"]+)"[^>]*><\/iframe>$/,xW=e=>{if(typeof e!="string")return!1;const t=CW.exec(e);return t?yf(t[1]):!1};var bW,yW,SW,LW,TW;const I3=Jt()("type","embed"),kW=mW()("type","embedType"),IW=_r()(/http:/i,"https:"),EW=e=>({embedType:"iframe",originalUrl:e,src:e}),NW=e=>wr(e.embed),wr=e=>e?.embedType||e?.type,Jme=e=>SW([[LW,bW(I3,EW,IW)],[TW,yW(I3,kW,e)]]),efe=bo()(Me()(xW,zp),yf),tfe="We are unable to generate an embed for this URL. Please check that the URL is valid and the content is publicly accessible.";var Ar=p(82920);const E3=e=>{const t=Ne("CDN_USER_CONTENT_URI"),n=new RegExp(Ne("CDN_URI"),"g");return Xa()?e:n.test(e)?`${t}${new URL(e).pathname}${new URL(e).search}`:e},jW=e=>{const t=new window.URL("https:"+e);return t.searchParams.set("src",t.searchParams.get("src")+"&disable-auto-focus=true"),t.toString().replace("https:","")},wW=/^\/\/cdn.embedly.+src=.*\.typeform\.com%2F/,AW=e=>wW.test(e),RW=/^\/\//,N3=e=>e?.replace(RW,"https://"),Vd=e=>{try{if(e===!1)return e;const t=new URL(N3(e));if(t.host==="cdn.embedly.com"&&t.pathname==="/widgets/media.html"){const n=new URL("https://embed.articulateusercontent.com/media/");return n.search=t.search,n.searchParams.set("v","1"),n.href}return t.href}catch(t){const n=new Error("Could not parse embed url",{cause:t});return console.warn(n),e}},PW=Me()(Vd,N3,go()(AW,jW),go()(Boolean,mt),Cn),MW=e=>{const{paddingBottom:t,ref:n,value:o}=e;return(0,s.jsx)("div",{className:"embed--iframe",dangerouslySetInnerHTML:Ar.useMemo(()=>({__html:o}),[o]),ref:n,style:{paddingBottom:t}})};class OW extends Ar.Component{player;refIframeContainer=Ar.createRef();refIframePlayer=Ar.createRef();state={duration:0,isReady:!1};static get defaultProps(){return{allowTabNavigation:!0,shouldPause:!1,showMetaData:!0}}componentDidUpdate(t){!t.shouldPause&&this.props.shouldPause&&xe.isPlaying&&(this.player?.pause(),xe.isPlaying=!1)}componentWillUnmount(){wr(this.props.data)==="video"&&this.teardownPlayer()}handlePlayerReady=()=>{this.player&&(this.player.on("play",this.handlePlayerPlay),this.player.on("timeupdate",this.handlePlayerUpdate),this.setState({isReady:!0}),xe.addChangeListener(this.handlePlayerChange))};handlePlayerPlay=()=>{const{id:t}=this.props;xe.isPlaying&&xe.playerId!==t&&(xe.isPlaying=!1),xe.playerId=t,xe.isPlaying=!0};handlePlayerUpdate=t=>{this.props.progressChanged?.({done:t.seconds/t.duration*100})};handlePlayerChange=()=>{const{id:t}=this.props;xe.playerId===t&&(xe.isPlaying?this.player.play():this.player.pause())};setupPlayer=()=>{this.refIframePlayer.current?.contentWindow!=null&&(this.player!=null&&this.teardownPlayer(),this.player=new(eW()).Player(this.refIframePlayer.current),this.player.on("ready",this.handlePlayerReady))};teardownPlayer=()=>{xe.isPlaying=!1,xe.removeChangeListener(this.handlePlayerChange),this.player&&(this.player.off("play"),this.player.off("ready"),this.player.off("timeupdate"),delete this.player)};playerSupportsMethods=t=>{const n=o=>this.player.supports("method",o);return nW()(n)(t)};togglePlay=()=>{this.playerSupportsMethods(["play","pause"])&&this.player.on("ready",()=>{this.player.getPaused(t=>{t?this.player.play():this.player.pause()})})};keySeek=t=>{this.playerSupportsMethods(["getCurrentTime","setCurrentTime"])&&this.player.on("ready",()=>{this.player.getCurrentTime(n=>{this.player.setCurrentTime(n+t)})})};changeVolume=t=>{this.playerSupportsMethods(["getVolume","setVolume"])&&this.player.getVolume(n=>{this.player.setVolume(n+t)})};onKeyDown=t=>{const r=fs(this.togglePlay),a=fs(()=>this.keySeek(5)),i=fs(()=>this.keySeek(-5)),c=fs(()=>this.changeVolume(10)),l=fs(()=>this.changeVolume(-10));un()([[Dh,r],[Qs,a],[Ks,i],[vr,c],[Cr,l]])(t)};renderProvider=()=>{const{allowTabNavigation:t,embedId:n,externalLinksDisabled:o,onLinkBlur:r,onLinkFocus:a,onLinkMouseEnter:i,onLinkMouseLeave:c,showMetaData:l,data:d}=this.props,{providerUrl:h,provider:m,favicon:f}=d;if(!(l&&h))return null;const v=Vd(Cn(h)),C=o&&_n(v),g=`${n}-provider`,x=C?"":void 0,b=C?void 0:v,L=C?void 0:"noopener noreferrer",S=C?"button":void 0,y=C?void 0:"_blank";return(0,s.jsx)("h2",{className:"embed__provider",children:(0,s.jsxs)("a",{className:"brand--hoverColor","data-external":x,href:b,id:C?g:void 0,onBlur:C?()=>r?.(g):void 0,onFocus:C?()=>a?.(g):void 0,onMouseEnter:C?()=>i?.(g):void 0,onMouseLeave:C?()=>c?.(g):void 0,rel:L,role:S,style:C?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:y,children:[(0,s.jsx)(vn,{alt:f?m:"",className:"embed__providerIcon",src:f}),(0,s.jsx)("span",{className:"embed__providerName",children:m})]})})};renderMetaData=()=>{const{allowTabNavigation:t,data:n,embedId:o,externalLinksDisabled:r,labels:a,onLinkBlur:i,onLinkFocus:c,onLinkMouseEnter:l,onLinkMouseLeave:d,showMetaData:h}=this.props,{src:m,title:f,description:v,provider:C}=n,g=wr(n);if(!h&&g!=="link")return null;const x=Vd(Cn(m)),b=r&&_n(x),L=`${o}-metadata-title`,S=`${o}-metadata-readmore`,y=T=>({"data-external":b?"":void 0,href:b?void 0:x,id:b?T:void 0,onBlur:b?()=>i?.(T):void 0,onFocus:b?()=>c?.(T):void 0,onMouseEnter:b?()=>l?.(T):void 0,onMouseLeave:b?()=>d?.(T):void 0,rel:b?void 0:"noopener noreferrer nofollow",role:b?"button":void 0,style:b?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:b?void 0:"_blank"});return(0,s.jsxs)("div",{className:"embed__meta__content",children:[(0,s.jsx)("h2",{className:"embed__title",children:(0,s.jsx)("a",{className:"brand--hoverColor",...y(L),children:(0,s.jsx)(Ie,{value:f})})}),(0,s.jsx)(Ie,{className:"embed__description",value:v}),(0,s.jsxs)("a",{className:"embed__readMore brand--hoverColor",...y(S),children:[g==="link"?`${a?.embedReadMore} ${C}`:`${a?.embedViewOn} ${C}`,(0,s.jsx)("i",{className:"icon icon-chevron-right"})]})]})};render(){const{allowTabNavigation:t,data:n,embedId:o,externalLinksDisabled:r,isLesson:a,labels:i,onLinkBlur:c,onLinkFocus:l,onLinkMouseEnter:d,onLinkMouseLeave:h,showMetaData:m}=this.props,{useRelativePath:f}=n??{},{description:v,originalUrl:C,src:g,thumbnail:x,title:b}=n,L=wr(n);if(L==="iframe"){const S=document.createElement("div");S.innerHTML=zp(g);const y=S.firstChild,T=y&&y.tagName&&y.tagName.toLowerCase()==="iframe";let k=100,I=32;if(this.props.isAuthoring&&f)return(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"embed__relativeUrl--iframe",children:"Embedded iframe with a relative url"}),(0,s.jsx)("p",{className:"embed__relativeUrl--title",children:b}),(0,s.jsx)("p",{className:"embed__relativeUrl--url",children:C})]});if(T){const R=y.width.match(/%/),M=parseInt(y.width);y.src=Cn(y.src),k=R?700*(M/100):M||16,I=parseInt(y.height)}const E=I/k,w=T?`${E*100}%`:"3rem";let A=null;try{A=new URL(y.src)}catch{}if(A){const{hostname:R}=A,M=R==="typeform.com"||R.endsWith(".typeform.com"),P=R==="forms.office.com";M&&(A.searchParams.append("disable-auto-focus","true"),y.src=A.toString()),P&&(A.searchParams.append("embed","true"),y.src=A.toString())}const N=T?y.outerHTML:"<div>Error: Invalid iframe tag. Please check the iframe source.</div>";return(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.embedPlayerGroup,className:"embed",role:"group",children:[f&&(0,s.jsx)("div",{className:"embed__title embed--iframe__title",children:b}),(0,s.jsx)(MW,{paddingBottom:w,ref:this.refIframeContainer,value:N})]})}else if(a){const S=f?g:Vd(Cn(g)),y=r&&_n(S),T=`${o}-lesson-title`,k=`${o}-lesson-url`,I=y?"":void 0,E=y?void 0:S,w=y?void 0:"noopener noreferrer nofollow",A=y?"button":void 0,N=y?void 0:"_blank";if(f){const R={"data-external":y?"":void 0,href:S,id:y?T:void 0,onBlur:y?()=>c?.(T):void 0,onFocus:y?()=>l?.(T):void 0,onMouseEnter:y?()=>d?.(T):void 0,onMouseLeave:y?()=>h?.(T):void 0,rel:y?void 0:"noopener noreferrer nofollow",role:y?"button":void 0,tabIndex:t?0:-1,target:y?void 0:"_blank"};return(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[(0,s.jsx)("h2",{className:"embed__title",children:(0,s.jsx)("a",{className:"brand--hoverColor",...R,children:(0,s.jsx)(Ie,{value:b})})}),["link","photo"].includes(L)?(0,s.jsxs)("a",{className:"embed__relativeUrl--url","data-external":I,href:E,id:y?k:void 0,onBlur:y?()=>c?.(k):void 0,onFocus:y?()=>l?.(k):void 0,onMouseEnter:y?()=>d?.(k):void 0,onMouseLeave:y?()=>h?.(k):void 0,rel:w,role:A,tabIndex:t?0:-1,target:N,children:[S,L==="photo"?(0,s.jsx)("div",{className:"embed__relativeUrl--image",children:(0,s.jsx)(vn,{alt:x?b:"",className:"embed__img",src:S})}):null]}):this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:x,title:b,type:L})]})}return(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[this.renderProvider(),["link","photo"].includes(L)?(0,s.jsx)("a",{"data-external":I,href:E,id:y?k:void 0,onBlur:y?()=>c?.(k):void 0,onFocus:y?()=>l?.(k):void 0,onMouseEnter:y?()=>d?.(k):void 0,onMouseLeave:y?()=>h?.(k):void 0,rel:w,role:A,tabIndex:t?0:-1,target:N,children:(0,s.jsx)(vn,{alt:x?b:"",className:"embed__img",src:E3(x)})}):this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:x,title:b,type:L}),this.renderMetaData()]})}else if(L==="link"){const S=f?g:Cn(g),y=f||r&&_n(S),T=`${o}-link-readmore`,k=y?"":void 0,I=y?void 0:S,E=y?void 0:"noopener noreferrer nofollow",w=y?"button":void 0,A=y?void 0:"_blank";return(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.embedLinkGroup,className:"embed embed--link brand--linkColor",role:"group",children:[(0,s.jsx)(Ie,{className:"embed__title",value:b}),(0,s.jsx)(Ie,{className:"embed__description",value:v}),(0,s.jsx)("a",{className:"embed__readMore brand--hoverColor","data-external":k,href:I,id:y?T:void 0,onBlur:y?()=>c?.(T):void 0,onFocus:y?()=>l?.(T):void 0,onMouseEnter:y?()=>d?.(T):void 0,onMouseLeave:y?()=>h?.(T):void 0,rel:E,role:w,target:A,children:i?.embedReadMore})]})}else return(0,s.jsxs)("div",{className:"embed embed--media",children:[m?(0,s.jsx)(Ie,{"aria-hidden":!t,className:"embed__title",value:b}):null,this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:x,title:b,type:L})]})}renderEmbedIframe=t=>{const{allowTabNavigation:n,labels:o,src:r,thumbnail:a,title:i,type:c}=t,{useRelativePath:l}=this.props.data??{};if(c==="photo")return(0,s.jsx)("figure",{className:"embed__media-wrap embed__media-wrap--photo",children:(0,s.jsx)(Aa,{allowTabNavigation:n,labels:o,src:E3(a)})});{const d=Ys.isIe11||Ys.isEdge,h=X()("embed__media-wrap",{"embed__media-wrap--ms_browser":d});return(0,s.jsxs)("figure",{"aria-hidden":!n,"aria-label":o?.embedPlayerGroup,className:h,onKeyDown:this.onKeyDown,ref:this.refIframeContainer,tabIndex:n?0:-1,children:[(0,s.jsx)("meta",{content:"origin",name:"referrer"}),(0,s.jsx)("iframe",{allowFullScreen:!0,className:"embed__media",frameBorder:"0",inert:n?void 0:!0,loading:"lazy",onLoad:this.setupPlayer,ref:this.refIframePlayer,scrolling:l?"yes":"no",src:l?r:PW(r),title:i})]})}}}const j3=e=>{const t=jh(),n=Fe(),o=e.externalLinksDisabled??(n&&"externalLinksDisabled"in n?n.externalLinksDisabled:!1),{handleMouseEnter:r,handleMouseLeave:a,handleFocus:i,handleBlur:c}=nd(),[l,d]=Ar.useState([]),h=Ar.useId();return Ar.useEffect(()=>{if(!o||!e.data){d([]);return}const m=[],{providerUrl:f,src:v,useRelativePath:C}=e.data,g=wr(e.data);e.isLesson&&v&&_n(Cn(v))&&(m.push(`${h}-lesson-title`),["link","photo"].includes(g)&&m.push(`${h}-lesson-url`),g!=="iframe"&&(m.push(`${h}-metadata-title`),m.push(`${h}-metadata-readmore`)),f&&_n(Cn(f))&&m.push(`${h}-provider`)),!e.isLesson&&e.showMetaData&&f&&_n(Cn(f))&&m.push(`${h}-provider`),!e.isLesson&&e.showMetaData&&v&&_n(Cn(v))&&g!=="iframe"&&(m.push(`${h}-metadata-title`),m.push(`${h}-metadata-readmore`)),g==="link"&&(C||v&&_n(Cn(v)))&&m.push(`${h}-link-readmore`),d(m)},[o,e.data,e.showMetaData,e.isLesson,h]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(OW,{...e,embedId:h,externalLinksDisabled:o,isAuthoring:t,onLinkBlur:c,onLinkFocus:i,onLinkMouseEnter:r,onLinkMouseLeave:a}),l.map(m=>(0,s.jsx)(sd,{anchorId:m},m))]})};var BW=p(52974);const Sf=e=>e.toString().padStart(2,"0");function nc(e){const t=Math.floor(e),n=Math.floor(t/3600),o=Math.floor(t%3600/60),r=t%60;return n>0?`${n}:${Sf(o)}:${Sf(r)}`:`${o}:${Sf(r)}`}function sfe(e=[]){return e.map(({time:t,title:n})=>`${nc(t)} ${n}`).join(`
`)}const DW=e=>{const[t,n,o]=e.split(":").reverse();return parseInt(t,10)+parseInt(n,10)*60+parseInt(o||"0",10)*3600},FW=/^(\d*:)?\d{1,2}:\d{2}$/,ofe=(e,t)=>{const n=e.split(`
`).filter(r=>r.trim()!==""),o=[];for(const r of n){const[a,...i]=r.split(" ");if(!FW.test(a))throw new Error("Chapters must use the format M:SS or H:MM:SS. Chapters will not display.");o.push({time:DW(a),title:i.join(" ")})}if(o.length>0&&o[0].time!==0)throw new Error("Chapters must start at 0:00. Chapters will not display.");for(let r=1;r<o.length;r++)if(o[r].time<=o[r-1].time)throw new Error("Chapters are out of order. Chapters will not display.");if(t!=null){for(const r of o)if(r.time>=t)throw new Error("Timestamps must be within the video duration. Chapters will not display.");for(let r=0;r<o.length;r++)if((r<o.length-1?o[r+1].time:t)-o[r].time<10)throw new Error("Chapters must be at least 10 seconds long. Chapters will not display.")}return o},HW={hovered:null,setHovered:qt},Lf=(0,u.createContext)(null);function $W({children:e}){const t=(0,u.useContext)(Lf),[n,o]=(0,u.useState)(null),r=(0,u.useMemo)(()=>({hovered:n,setHovered:o}),[n]);return t!=null?(0,s.jsx)(s.Fragment,{children:e}):(0,s.jsx)(Lf.Provider,{value:r,children:e})}const w3=()=>(0,u.useContext)(Lf)??HW,VW=.001,Tf=(e,t,n)=>e!=null&&e.kind===t&&Math.abs(e.time-n)<VW,A3=V("video-seek-bar-overlay"),kf=e=>Math.max(0,Math.min(100,e)),R3=e=>{const t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?Math.max(0,t):null},zW=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const n=e.map(o=>{const r=R3(o.time);return r==null||r>=t?null:{chapter:o,startTime:r}}).filter(o=>o!=null).sort((o,r)=>o.startTime-r.startTime);return n.map((o,r)=>{const a=n[r+1],i=a!=null?a.startTime:t;return i<=o.startTime?null:{chapter:o.chapter,endTime:i,leftPercent:kf(o.startTime/t*100),startTime:o.startTime,widthPercent:kf((i-o.startTime)/t*100)}}).filter(o=>o!=null)},_W=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const n=new Set;return e.forEach(o=>{const r=R3(o);r==null||r>=t||n.add(r)}),[...n].sort((o,r)=>o-r).map(o=>({leftPercent:kf(o/t*100),time:o}))};function UW({chapters:e,checkpointTimesSeconds:t,durationSeconds:n,onSeekToTime:o}){const r=wt(),a=u.useMemo(()=>zW(e,n),[e,n]),i=u.useMemo(()=>_W(t,n),[t,n]),{hovered:c,setHovered:l}=w3(),d=r?.videoCheckpointDefaultTitle||"Checkpoint",h=u.useMemo(()=>{const m=a.filter(v=>v.leftPercent>0).map(v=>({kind:"chapter",element:"chapter",time:v.startTime,leftPercent:v.leftPercent,label:v.chapter.title,key:`chapter-${v.startTime}-${v.chapter.title}`})),f=i.map(v=>({kind:"checkpoint",element:"marker",time:v.time,leftPercent:v.leftPercent,label:`${d} ${nc(v.time)}`,key:`checkpoint-${v.time}`}));return[...m,...f].sort((v,C)=>v.time-C.time||(v.kind===C.kind?0:v.kind==="chapter"?-1:1))},[a,i,d]);return h.length===0?null:(0,s.jsx)("div",{className:A3("markers"),role:"presentation",children:h.map(m=>(0,s.jsx)("button",{"aria-label":m.label,className:A3(m.element,{hovered:Tf(c,m.kind,m.time)}),onBlur:()=>l(null),onClick:()=>o?.(m.time),onFocus:()=>l({kind:m.kind,time:m.time}),onPointerEnter:()=>l({kind:m.kind,time:m.time}),onPointerLeave:()=>l(null),style:{left:`${m.leftPercent}%`},type:"button"},m.key))})}const GW=()=>{const e=qr();return oh(e)},P3=(e,t)=>e in t?"Articulate":e.length===2?"ISO-639-1":e.length===3?"ISO-639-3":null,WW=e=>Object.entries(e).reduce((t,[,n])=>(n.ISO639_1&&(t.iso1Map[n.ISO639_1]=t.iso1Map[n.ISO639_1]||[],t.iso1Map[n.ISO639_1].push(n)),n.ISO639_3&&(t.iso3Map[n.ISO639_3]=t.iso3Map[n.ISO639_3]||[],t.iso3Map[n.ISO639_3].push(n)),t),{iso1Map:{},iso3Map:{}}),KW=(e,t,n)=>{let o=e,r="",a=n??P3(e,t);return!a&&e.includes("-")&&([o,r]=e.split("-"),a=P3(o,t),a&&(e=o)),{languageCode:o,code:e,regionCode:r,standard:a??"Articulate"}},sc=(e,t,n={})=>{const{code:o,standard:r}=KW(e.toLowerCase(),t,n.standard),{location:a,script:i,variant:c}=n;if(r!=="Articulate"){const{iso1Map:l,iso3Map:d}=WW(t),h=r==="ISO-639-1"?l[o]??null:d[o]??null;return h?h.length===1?h[0]:h.find(m=>{const f=c&&"variant"in m&&m.variant?m.variant.toLocaleLowerCase()===c.toLocaleLowerCase():!1,v=a&&"location"in m&&m.location?m.location.toLocaleLowerCase()===a.toLocaleLowerCase():!1,C=i&&"script"in m&&m.script?m.script.toLocaleLowerCase()===i.toLocaleLowerCase():!1;return f||v||C})||h[0]||null:null}return t[o]??null},rfe=(e,t,n={})=>sc(e,t,{standard:"Articulate",...n})?.ISO639_1||null,afe=(e,t,n={})=>sc(e,t,{standard:"Articulate",...n})?.ISO639_3||null,ife=(e,t,n={})=>sc(e,t,{standard:"ISO-639-1",...n})?.code||null,cfe=(e,t,n={})=>sc(e,t,{standard:"ISO-639-3",...n})?.code||null,M3=e=>!!(e&&"video"in e&&e.video&&"key"in e.video&&e.video.key),O3=e=>!!(e&&"customVideo"in e&&e.customVideo&&"src"in e.customVideo&&e.customVideo.src),B3=e=>!!(e&&"customVideo"in e&&e.customVideo&&"key"in e.customVideo&&e.customVideo.key),QW=(e,t)=>{const n=M3(e)&&M3(t)&&e.video.key===t.video.key,o=O3(e)&&O3(t)&&e.customVideo.src===t.customVideo.src,r=B3(e)&&B3(t)&&e.customVideo.key===t.customVideo.key;return n||o||r},YW=e=>!!(e&&"video"in e&&e.video&&"captions"in e.video&&e.video.captions?.length),ZW=e=>{const t=os(),{currentLocale:n}=nt(),o=Re(e,t),r=Re(e,n),a=GW();return(0,u.useMemo)(()=>{if(!!(n&&n!==t)&&a&&QW(o,r)&&YW(r))return r.video.captions.find(l=>sc(l.code,a)?.code===n)?.id},[t,n,o,r,a])},XW=2,qW=1,JW=()=>({previousTime:0,triggeredTimes:new Set}),eK=(e,t,n)=>{const{previousTime:o}=n;t>o+XW&&e.filter(a=>a<=t).forEach(a=>n.triggeredTimes.add(a)),t<o-qW&&(n.triggeredTimes=new Set(e.filter(a=>a<=t))),n.previousTime=t;const r=e.find(a=>t>=a&&!n.triggeredTimes.has(a));return r==null?null:(n.triggeredTimes.add(r),r)};function tK({checkpointTimesSeconds:e,isLoaded:t,getMediaElement:n,onCheckpointReached:o}){const r=(0,u.useRef)(o);r.current=o;const a=(0,u.useMemo)(()=>Array.from(new Set(e)).sort((i,c)=>i-c),[e]);(0,u.useEffect)(()=>{if(!t||a.length===0)return;const i=n();if(i==null)return;const c=JW();c.previousTime=i.currentTime,a.filter(f=>f<=i.currentTime).forEach(f=>c.triggeredTimes.add(f));let l=0;const d=()=>{const f=eK(a,i.currentTime,c);f!=null&&r.current?.(f),l=requestAnimationFrame(d)},h=()=>{l===0&&(l=requestAnimationFrame(d))},m=()=>{l!==0&&(cancelAnimationFrame(l),l=0)};return i.addEventListener("play",h),i.addEventListener("playing",h),i.addEventListener("pause",m),i.addEventListener("ended",m),i.paused||h(),()=>{m(),i.removeEventListener("play",h),i.removeEventListener("playing",h),i.removeEventListener("pause",m),i.removeEventListener("ended",m)}},[n,t,a])}function D3(e){return Number.isFinite(e)&&e>0?e:0}function If({allowTabNavigation:e=!0,audioVideoPlayhead:t,canAdjustPlaybackSpeed:n,canRestrictSeek:o,captions:r,chapters:a=[],checkpointTimesSeconds:i=[],cornerRadius:c,id:l,media:d,onCheckpointReached:h,onLoad:m,poster:f,progressChanged:v,recordMediaPlayheadPosition:C,ref:g,shouldPause:x,src:b,style:L,subtitle:S,type:y}){const T=u.useRef(null),[k,I]=u.useState(0),E=u.useCallback(ee=>{T.current=ee,typeof g=="function"?g(ee):g&&(g.current=ee)},[g]),w=(0,Oe.A)(x),A=jh(),N=wt(),R=Bh(),M=ZW(d),P=y==="customVideo",j=u.useCallback(()=>T.current?.containerElement?.querySelector("video")??null,[]),O=u.useCallback(ee=>{T.current?.seekToTime(ee)},[]),B=u.useCallback(ee=>{Gp(),I(D3(ee.duration)),v?.(ee)},[v]),D=u.useCallback(ee=>{C?.(ee)},[C]),H=u.useCallback(()=>{xe.playerId=l,xe.isPlaying=!0},[l]),$=u.useCallback(()=>{xe.playerId===l&&(xe.isPlaying=!1)},[l]),[W,U]=u.useState(!1),Z=u.useRef(!1),ne=u.useCallback(()=>{U(!0);const ee=T.current;if(ee){const{duration:re}=ee.getProgress();I(D3(re)),m?.({player:ee})}},[m]);tK({checkpointTimesSeconds:i,isLoaded:W,getMediaElement:j,onCheckpointReached:h}),u.useEffect(()=>{Z.current||W&&(t!=null&&t>0&&T.current?.seekToPercent(t),Z.current=!0)},[W,t]),u.useEffect(()=>{!w&&x&&T.current?.pause()},[w,x]),u.useEffect(()=>{const ee=()=>{(!xe.isPlaying||xe.playerId!==l)&&T.current?.pause()};return xe.addChangeListener(ee),()=>{xe.removeChangeListener(ee)}},[l]);const Q=u.useMemo(()=>{const ee=typeof c=="number"||typeof c=="string"?{"--ov-corner-radius":`${Number(c)}px`}:void 0;if(!(ee==null&&L==null))return{...ee,...L}},[c,L]),z=f==null?void 0:P?f:mt(f),F=W&&k>0&&(a.length>0||i.length>0),_=`${P?b:mt(b)}?v=1`,K=P?"application/x-mpegURL":void 0,Y=u.useMemo(()=>[{src:_,type:K??"video/mp4"}],[_,K]),q=u.useMemo(()=>{const ee=[];if(r==null&&S&&ee.push({kind:"captions",label:"English",src:P?S:mt(S),srcLang:"en"}),r!=null)for(const re of r){const oe=re.url||(re.key!=null?mt(re.key):void 0);oe&&ee.push({default:re.id===M?!0:void 0,kind:"captions",label:re.name||R?.(re.code)||re.code,src:oe,srcLang:re.code})}return ee},[r,S,P,R,M]);return(0,s.jsx)(BW.L,{crossOrigin:Ys.isLocalFilesystem?void 0:"anonymous",enableDownload:A,enablePlaybackSpeed:n??void 0,enableSeek:o==null?void 0:!o,inert:!e,labelBackToMoreOptions:N?.a11yMediaMoreOptionsBack,labelCaptions:N?.a11yMediaCaptions,labelCaptionsOff:N?.a11yMediaCaptionsOff,labelContainer:N?.a11yGroupVideoPlayer??"Video player",labelCurrentTime:N?.a11yMediaCurrentTime,labelDownload:N?.a11yMediaDownload,labelDuration:N?.a11yMediaDuration,labelError:N?.a11yMediaErrorVideo,labelExitFullscreen:N?.a11yMediaExitFullscreen,labelExitPictureInPicture:N?.a11yMediaExitPictureInPicture,labelFullscreen:N?.a11yMediaFullscreen,labelMoreOptions:N?.a11yMediaMoreOptions,labelMute:N?.a11yMediaMute,labelPause:N?.a11yMediaPause,labelPictureInPicture:N?.a11yMediaPictureInPicture,labelPlay:N?.a11yMediaPlay,labelPlaybackRate:N?.a11yMediaPlaybackRate,labelPlaybackRateNormal:N?.a11yMediaPlaybackRateNormal,labelPlayVideo:N?.a11yMediaPlayVideo,labelReplay:N?.a11yMediaReplay,labelSeek:N?.a11yMediaSeek,labelSeekDisabled:N?.a11yMediaSeekDisabled,labelUnmute:N?.a11yMediaUnmute,labelVolume:N?.a11yMediaVolume,onPause:$,onPlay:H,onPlayheadSave:D,onReady:ne,onTimeUpdate:B,poster:z,ref:E,seekOverlay:F?(0,s.jsx)(UW,{chapters:a,checkpointTimesSeconds:i,durationSeconds:k,onSeekToTime:O}):null,sources:Y,style:Q,timeUpdateInterval:1e3,tracks:q})}var nK=p(82920);function st(e){const t=nK.forwardRef((n,o)=>{const r=at();return(0,s.jsx)(e,{...n,getL10nValue:r,ref:o})});return t.displayName=`withLocalizedLookup(${e.displayName||e.name})`,t}var sK=p(65307),F3=p.n(sK),oK=p(54318),rK=p.n(oK);const aK=e=>({...e,courseId:e.courseId||Hs()(["course","id"],e)}),iK=e=>({...e,lessonId:e.lessonId||Hs()(["lesson","id"],e)}),cK=({id:e,courseId:t,lessonId:n,refs:o})=>e||(o&&n?`${n}-${o}`:n||t),Ef=Me()(cK,iK,aK),lfe=Lt()(si()(Ye()("id"),F3()("id",Ef)),bo()(rK()(Ye(),[Ye()("id"),Ye()("uploads")]),vo()(["id"])),F3()("isUploading",Ze()("status","uploading")));function dfe(e){const t=e.match(/^(.*\/)?([^/]+)$/);if(!t)return encodeURIComponent(e);const n=t[1]??"",o=t[2],r=encodeURIComponent(o);return`${n}${r}`}function lK(e){return e.replace(/%2F/g,"/")}var dK=p(82920);const Nf=e=>!!(e&&("key"in e&&e.key||"src"in e&&e.src)),zd=e=>Nf(e)&&!e.isProcessing&&!e.error,uK=(e,t)=>t?.mediaType==="audio"?!!e&&(Nf(e)||b3(t)||x3(t)&&!Nf(e)):zd(e),hK=e=>go()(Pe()(!!e),nG()(`-${e}`));class mK extends dK.Component{constructor(t){super(t),this.onTranscriptClick=this.onTranscriptClick.bind(this)}static get defaultProps(){return{defaultAlign:"left",media:{},index:"1",hasPadding:!0,opts:{},allowTabNavigation:!0,lessonNumber:1,getL10nValue:()=>{}}}onTranscriptClick(){const{block:t,blockId:n,openTranscript:o,refs:r}=this.props,a=t?.items?.length===1?t.items[0]:void 0,i=this.props.item??a;let c=n;try{t!=null&&typeof t=="object"&&!Array.isArray(t)?"blockId"in t?c=t.blockId:"id"in t&&(c=t.id):t?.id&&(c=t.id)}catch{c=n}let l="";try{i!=null&&typeof i=="object"&&!Array.isArray(i)&&"id"in i&&(l=String(i.id))}catch{l=""}const d=r??`items:${c||""}/items:${l}`;if((t||n)&&i&&o)return o({blockId:t?.id??n,item:i,refs:d})}renderAudio(t,n){const{activeIndex:o,allowTabNavigation:r,block:a,blockId:i,getL10nValue:c,index:l,isOverlayAudio:d,item:h,itemIndex:m,labels:f,lessonNumber:v,shouldPause:C,side:g}=this.props,{audio:x}=c(t),b=a&&typeof a=="object"&&"blockId"in a?a.blockId:a?.id||i||"",L=h&&typeof h=="object"&&"id"in h?h.id:"",S=this.props.refs??`items:${b}/items:${L}`,y=`audio-${v}-${l}`;return(0,s.jsx)(k3,{activeIndex:o,allowTabNavigation:r,id:y,isOverlayAudio:d,item:h,itemIndex:m,labels:f,mediaSrc:x.key,onTranscriptClick:this.onTranscriptClick,onTranscriptClose:this.props.closeTranscript??void 0,onTranscriptUpdate:this.props.onTranscriptUpdate,refs:S,shouldPause:x.pause||C,side:g,transcriptMedia:t,uploadId:n,volumeSliderPosition:this.props.volumeSliderPosition},y)}renderImage(t){const{allowTabNavigation:n,cornerRadius:o,defaultAlign:r,imageMaxHeight:a,index:i,labels:c,onLoad:l,opts:d}=this.props,h=t?.align??r,m=t?.dimensions,f=`image-${i}`,{disableZoom:v}=d??{};return(0,s.jsx)(Aa,{align:h,allowTabNavigation:n,alt:t?.alt,cornerRadius:o,disableZoom:v,height:m?.height||m?.originalHeight,labels:c,link:t?.link,maxHeight:a,onLoad:l,shouldFillWidth:t?.fillWidth,src:lt(t),width:m?.width||m?.originalWidth},f)}renderVideo(t,n){const{allowTabNavigation:o,blockId:r,lessonNumber:a,index:i,enableVideoPlaybackSpeed:c,shouldPause:l}=this.props,d=t.skipProcess?lK(t.poster):t.poster,h=hK(r)(`video-${a}-${i}-${d||""}`);return(0,s.jsx)(If,{allowTabNavigation:o,canAdjustPlaybackSpeed:c,captions:t.captions,id:h,media:n,poster:d,shouldPause:t.pause||l,src:t.key},h)}renderEmbed(t){const{allowTabNavigation:n,embedClass:o,labels:r,opts:a,shouldPause:i}=this.props,{fullEmbed:c,showMetaData:l=!0}=a,d=`embed-${this.props.index}`;return(0,s.jsx)("div",{className:o,children:(0,s.jsx)(j3,{allowTabNavigation:n,data:t,id:d,isLesson:c,labels:r,shouldPause:t.pause||i,showMetaData:l},d)})}render(){const{blockId:t,hasPadding:n,item:o,lessonId:r,mediaType:a}=this.props,i=o&&typeof o=="object"&&"id"in o?o.id:"",c=this.props.refs??`items:${t??""}/items:${i}`,l=this.props.media,d=X()({"media-group":n}),{audio:h,embed:m,image:f,video:v}=this.props.getL10nValue(l)??{},C=Ef({lessonId:r,refs:c}),g=this.props.getUpload?this.props.getUpload(C):null;return(0,s.jsxs)("div",{className:d,"data-l10n-id":jt(l),children:[(!a||a==="image")&&zd(f)&&this.renderImage(f),(!a||a==="audio")&&uK(h,g)&&this.renderAudio(l,C),(!a||a==="video")&&zd(v)&&this.renderVideo(v,l),(!a||a==="embed")&&zd(m)&&this.renderEmbed(m)]})}}const Qt=zG(yl(vb(st(mK))));function gs(e,t,n,o){const a=t==="bottom"||!n&&t!=="top"?"bottom":"top",i={renderOrder:["text"],isOverlayAudio:!1};if(!e)return i;const c=!!e.audio,l=!!e.image,d=!!e.video,h=!!e.embed,m=l||d,f=()=>{const g=l?"image":"video",x={top:c?["audio","text",g]:["text",g],bottom:c?["text","audio",g]:["text",g],legacyTop:c?["audio",g,"text"]:[g,"text"],legacyBottom:c?[g,"text","audio"]:[g,"text"]};return n&&o==="timeline"&&!t?x.top:n&&o!=="timeline"?a==="bottom"?x.legacyBottom:x.legacyTop:a==="bottom"?x.bottom:x.top},v=()=>{const g={top:c?["audio","text","embed"]:["text","embed"],bottom:c?["text","embed","audio"]:["text","embed"],legacyTop:c?["audio","embed","text"]:["embed","text"],legacyBottom:c?["embed","text","audio"]:["embed","text"]};return n&&o==="timeline"&&!t?g.legacyTop:n&&o!=="timeline"?a==="bottom"?g.legacyBottom:g.legacyTop:a==="bottom"?g.bottom:g.top},C=()=>a==="bottom"?["text","audio"]:["audio","text"];return c&&!m&&!h?{...i,renderOrder:C()}:m&&!c&&!h?{...i,renderOrder:f()}:h&&!c&&!m?{...i,renderOrder:v()}:c&&m&&!h?o==="statement"?{...i,renderOrder:C()}:o==="labeled-graphic"||a==="top"||o==="process"?{...i,renderOrder:f(),audioOnlyMedia:{audio:e.audio},imageOnlyMedia:{image:e.image},videoOnlyMedia:{video:e.video}}:{...i,renderOrder:e.video?["text","video","audio"]:["text","overlay"],audioOnlyMedia:{audio:e.audio},imageOnlyMedia:{image:e.image},videoOnlyMedia:{video:e.video},isOverlayAudio:!e.video}:c&&h&&!m?{...i,renderOrder:v(),audioOnlyMedia:{audio:e.audio},embedOnlyMedia:{embed:e.embed}}:i}var fK=p(82920);const Ns=V("block-text"),pK=class extends fK.Component{renderHeadingDelegate;renderTextDelegate;constructor(e){super(e),this.renderTextDelegate=this.renderText.bind(this),this.renderHeadingDelegate=this.renderHeading.bind(this)}static get defaultProps(){return{columns:1,heading:"",items:[],type:"onecol",getL10nValue:()=>{}}}getHeadingComponent=()=>{const{heading:e}=this.props;return e?e==="heading"?"h2":"h3":"div"};renderHeading(e){const t="heading"in e?e.heading:null;return(0,s.jsx)(Ie,{value:t})}renderText(e){const{labels:t,takingSnapshot:n,variant:o}=this.props,r=o?.includes("column"),a="paragraph"in e?e.paragraph:void 0;return r||n?(0,s.jsx)(eG,{item:e,labels:t,children:(0,s.jsx)(Ge,{value:a||""})}):(0,s.jsx)(Ge,{className:Ns("col"),value:a||""})}render(){const{blockId:e,columns:t,defaultBackgroundColor:n,heading:o,isLearner:r,items:a,labels:i,lessonId:c,media:l,settings:d,type:h,variant:m,renderText:f=this.renderTextDelegate,renderHeading:v=this.renderHeadingDelegate,getL10nValue:C}=this.props,g=C(l),x=Object.keys(g?.audio??{}).length>0,{audioPosition:b,entranceAnimation:L,cellPadding:S=1.5,tableWidth:y=76,textPadding:T=.8,textWidth:k=76}=d,I=m==="table",E=t===1,w=t>1,A=I?y:k,N=!I&&E,R=I,M=AU(S),P=RU(T),j=Od(A),O=Ns({[h]:!N&&!R||w,[`${h}-custom-width`]:!w,[`${h}-custom-width-table-${j}`]:R,[`${h}-custom-width-text-${j}`]:N,[`heading-custom-text-padding-${P}`]:N,[`${h}-custom-cell-padding-${M}`]:R,"no-animation":!L,presentation:this.props.isPresentation}),B=t>2?Ns("container-wide"):Ns("container",{authoring:!r}),D=this.getHeadingComponent(),H=C(Array.isArray(l)?{}:l),$=gs(H,b);return(0,s.jsx)(we,{className:O.toString(),defaultBackgroundColor:n,children:(0,s.jsxs)("div",{className:B,"data-block-id":e,"data-block-text":"",children:[(0,s.jsx)("div",{className:Ns("row"),children:o!==""?a.slice(0,1).map((W,U)=>(0,s.jsx)("div",{className:Ns("col"),children:(0,s.jsx)("div",{className:Ns("heading"),children:(0,s.jsx)(D,{children:v(W)})})},"id"in W?W.id:U)):null}),$.renderOrder.map((W,U)=>{if(W==="text")return(0,s.jsx)("div",{className:Ns("row"),children:h!=="heading"?a.slice(0,t).map((Z,ne)=>(0,s.jsx)(u.Fragment,{children:f(Z)},"id"in Z?Z.id:ne)):null},`text-${U}`);if(W==="audio"&&x){const Z=$.renderOrder.indexOf("audio")<$.renderOrder.indexOf("text");return(0,s.jsx)("div",{className:Ns("row",{media:!0,top:Z,bottom:!Z,hasHeading:m==="heading paragraph"||m==="subheading paragraph"}),children:(0,s.jsx)("div",{className:Ns("col",{media:!0}),children:(0,s.jsx)(Qt,{blockId:e,hasPadding:!1,index:e,item:{id:e,media:l},labels:i,lessonId:c,media:l,refs:`items:${e}`})})},`audio-${U}`)}})]})})}},Oo=e=>{const t=at(),n=Gs();return(0,s.jsx)(pK,{...e,getL10nValue:t,isPresentation:n})},gK=Oo,vK=e=>(0,s.jsx)(Oo,{columns:2,type:"twocol",...e}),CK=e=>(0,s.jsx)(Oo,{columns:3,type:"threecol",...e}),xK=e=>(0,s.jsx)(Oo,{columns:4,type:"fourcol",...e}),bK=e=>(0,s.jsx)(Oo,{heading:"heading",type:"heading",...e}),yK=e=>(0,s.jsx)(Oo,{heading:"subheading",type:"heading",...e}),SK=e=>(0,s.jsx)(Oo,{heading:"heading",...e}),LK=e=>(0,s.jsx)(Oo,{heading:"subheading",...e});var oc=p(82920);const TK=1e3,kK={fadeInGrow:"scale(0.95)",fadeInLeft:"translateX(-50px)",fadeInLeftSmall:"translateX(-25px)",fadeInRight:"translateX(50px)",fadeInUp:"translateY(25px)"},IK=e=>{const{afterAnimatedIn:t,animateIn:n="fadeIn",children:o,className:r,duration:a=1,initiallyVisible:i,siblingDelay:c=0}=e,l=oc.useRef(null),[d,h]=oc.useState(!1);oc.useEffect(()=>{const f=l.current;if(i&&f){h(!0);return}if(d||!f||typeof window>"u")return;const v=mf(),C=new IntersectionObserver(([x])=>{x!=null&&(x.isIntersecting||x.intersectionRatio>0)&&(h(!0),C.unobserve(x.target))},{root:v,rootMargin:$1,threshold:0});C.observe(f);const g=setTimeout(()=>{h(x=>{if(x)return x;const b=l.current;if(!b)return x;const L=b.getBoundingClientRect(),S=v?.getBoundingClientRect(),y=S?.top??0,T=S?.bottom??window.innerHeight,k=(T-y)*.1;return L.bottom>y-k&&L.top<T+k?!0:x})},TK);return()=>{C.disconnect(),clearTimeout(g)}},[i,d]),oc.useEffect(()=>{const f=l.current;if(!f||!t)return;const v=C=>{C.target instanceof Element&&C.target.parentElement===f&&C.propertyName==="opacity"&&t()};return f.addEventListener("transitionend",v),()=>{f.removeEventListener("transitionend",v)}},[t]),oc.useEffect(()=>{const f=l.current;if(!f||!Array.isArray(o))return;Array.from(f.children).forEach((C,g)=>{C instanceof HTMLElement&&C.style.setProperty("--idx",String(g))})},[o]);const m={"--scroll-animation-step":`${c}s`,"--scroll-animation-duration":n==="none"?"0s":`${a}s`,"--scroll-animation-from":kK[n]??"translateY(0)"};return(0,s.jsx)("div",{className:X()("scroll-animation",r,{"scroll-animation--in":d}),ref:l,style:m,children:o})},EK=matchMedia("(prefers-reduced-motion: reduce)");function jn(){return EK.matches}const Be=e=>{const{afterAnimatedIn:t,animateBlockEntrance:n,animateIn:o,children:r,className:a,duration:i,initiallyVisible:c,isLearner:l,siblingDelay:d}=e;return l&&n&&!jn()?(0,s.jsx)(IK,{afterAnimatedIn:t,animateIn:o,className:a,duration:i,initiallyVisible:c,siblingDelay:d,children:r}):Array.isArray(r)?(0,s.jsx)("div",{children:r}):r},hfe="group",NK="tablist",jK="tabpanel",mfe="tab",ffe="radio",rc=({caption:e,editable:t,id:n,isOverlayType:o,getL10nValue:r})=>{const a=!!(!o&&!t&&r(e));return{figcaptionId:a?`figcaption-${n}`:void 0,isFigure:a,role:a?"figure":void 0,tagName:a?"figure":"div"}};var H3=p(82920);const wK=H3.lazy(async()=>{const[e,t]=await Promise.all([p.e("ace").then(p.t.bind(p,46036,23)),p.e("ace").then(p.bind(p,52104)),p.e("ace").then(p.t.bind(p,82091,23)),p.e("ace").then(p.t.bind(p,29614,23)),p.e("ace").then(p.t.bind(p,83546,23)),p.e("ace").then(p.t.bind(p,21994,23)),p.e("ace").then(p.t.bind(p,83546,23)),p.e("ace").then(p.t.bind(p,70989,23)),p.e("ace").then(p.t.bind(p,58242,23)),p.e("ace").then(p.t.bind(p,53567,23)),p.e("ace").then(p.t.bind(p,2433,23)),p.e("ace").then(p.t.bind(p,9603,23)),p.e("ace").then(p.t.bind(p,11507,23)),p.e("ace").then(p.t.bind(p,17146,23)),p.e("ace").then(p.t.bind(p,80170,23)),p.e("ace").then(p.t.bind(p,60681,23)),p.e("ace").then(p.t.bind(p,50661,23)),p.e("ace").then(p.t.bind(p,31628,23)),p.e("ace").then(p.t.bind(p,43159,23)),p.e("ace").then(p.t.bind(p,8916,23)),p.e("ace").then(p.t.bind(p,74243,23)),p.e("ace").then(p.t.bind(p,59014,23))]);return{default:t.default}}),AK=({classNames:e,code:t})=>{const[n,o]=(0,u.useState)(!1),{announcePolite:r}=ys(),a=async()=>{const i=(0,kr.htmlDecode)(t);await navigator.clipboard.writeText(i),o(!0),setTimeout(()=>o(!1),1e3),r("Copied!")};return(0,s.jsx)("div",{className:e,children:(0,s.jsx)(Po,{message:n?"Copied!":"Copy",children:(0,s.jsx)("button",{"aria-label":n?"Copied!":"Copy",className:"block-code-snippet-copy",onClick:a,type:"button",children:(0,s.jsx)(ie,{name:n?"check":"copy"})})})})};class RK extends H3.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this)}renderCaption({caption:t}){return(0,s.jsx)(Ge,{className:"block-text__code-caption",value:t||""})}render(){const{animateBlockEntrance:t,defaultBackgroundColor:n="",getL10nValue:o,initiallyVisible:r,isLearner:a,items:i,labels:c,settings:l,renderCaption:d=this.renderCaptionDelegate}=this.props,{entranceAnimation:h,language:m,paddingBottom:f,paddingTop:v,snippetBackgroundColor:C,snippetColorContrast:g,theme:x,useAdvancedEditor:b,wrapWords:L}=l,S=X()("block-text block-text--code",{"block-text--padding-top":Number(v)===2,"block-text--padding-bottom":Number(f)===2,"block-text--no-animation":!h}),y={backgroundColor:C},T=C==="#fafafa"||Ct()(C),k=g??Te.DARK;if(!T){const I=$t({backgroundColor:C,contrast:k});Object.assign(y,{"--color-snippet-contrast":I})}return(0,s.jsx)(we,{className:S,defaultBackgroundColor:n,children:(0,s.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,s.jsx)("div",{className:"block-text__container",children:i.slice(0,1).map(I=>{const E=rc({...I,getL10nValue:o});return(0,s.jsx)("div",{className:"block-text__row",children:(0,s.jsx)("div",{"aria-label":c?.a11yBlockCodeSnippet,className:"block-text__col",role:"group",children:(0,s.jsxs)("figure",{"aria-labelledby":E.figcaptionId,className:"block-text__figure block-text__figure--with-copy",role:"figure",children:[(0,s.jsx)(LM,{value:I.code,children:w=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(AK,{classNames:"block-text__copy-button",code:w}),b?(0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(wK,{editorProps:{$blockScrolling:!0},maxLines:25,mode:m,name:String(I.id),readOnly:!0,setOptions:{enableSnippets:!1,showLineNumbers:!0,tabSize:2,fontSize:"1.6rem",useWorker:!1},theme:x,value:(0,kr.htmlDecode)(Yu(w)),width:"100%",wrapEnabled:L})}):(0,s.jsx)("pre",{className:"block-text__code",dangerouslySetInnerHTML:{__html:Yu(w)},dir:"ltr",style:y})]})}),I.caption&&(0,s.jsx)("figcaption",{id:E.figcaptionId,children:d(I)})]})})},I.id)})})})})}}const $3=st(RK);function PK({accentColor:e,backgroundType:t,blockBackgroundColor:n,noteColor:o,imageBackgroundDefault:r="#ffffff"}){return o!=null&&o!==""?o:MK({accentColor:e,backgroundType:t,blockBackgroundColor:n,imageBackgroundDefault:r})}function MK({accentColor:e,backgroundType:t,blockBackgroundColor:n,imageBackgroundDefault:o="#ffffff"}){if(t!==se.IMAGE&&n==null)return"#000000b3";switch(t){case se.IMAGE:return o;case se.LIGHT:case se.GRAY:return ts(.9,e);case se.DARK:return"#494949";case se.BLACK:return"#333333";default:{if(!n)return e;switch(aa(n)){case dt.LIGHT:return ts(.3,n);case dt.MED:return Ss(.2,n);case dt.DARK:case dt.NEAR_BLACK:return Ss(.4,n);default:return e}}}}function OK(e,t){const n=tn(),{cardMode:o,className:r="",children:a,disabled:i=!1,tag:c="div",overrideBackground:l=!1,style:d={},...h}=e,{cardMode:m,customBackgroundColorContrast:f}=n,C=Fe()?.theme,g=cs(),x=o??m??$n.WHITE,b=En()??"#ffffff",L=x===$n.WHITE,S=g===se.COLOR,y=g===se.ACCENT,T=C?.accentContrast,k=g===se.ACCENT||g===se.COLOR,I=T===Te.AUTO&&y||f===Te.AUTO&&S,E=g===se.COLOR?f:T,w=[r,"block-card"];if(L)w.push("bg--range-light","block-card--white");else if(i){w.push("block-card--disabled");const A=$t({backgroundColor:b,contrast:E});I&&(d["--color-text"]=A,d["--color-text-opposite"]=A===xt.DARK?xt.LIGHT:xt.DARK)}else{w.push("block-card--transparent");const N=Wj(b)??b??"#ffffff";switch(g){case se.LIGHT:case se.GRAY:w.push("bg--range-light");break;case se.IMAGE:w.push("bg--range-dark");break;case se.DARK:case se.BLACK:w.push("bg--range-dark"),d["--color-background-rgb"]=(0,la.A)(N)?.slice(0,3);break;default:{const M=d["--color-background"]??(l?b:N),P=$t({backgroundColor:M,contrast:E});k&&P==xt.LIGHT&&w.push("block-card--contrast-light");const j=aa(M);w.push(`bg--range-${Sl()(j.toLowerCase())}`),d["--color-background"]=M,d["--color-background-rgb"]=(0,la.A)(M)?.slice(0,3);break}}}return(0,s.jsx)(c,{...h,className:w.join(" "),ref:t,style:d,children:a})}const _t=(0,u.forwardRef)(OK);var BK=p(82920);const wn=V("block-statement");class DK extends BK.Component{renderTextDelegate;constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this)}static get defaultProps(){return{items:[],type:"a",getL10nValue:()=>{}}}getEntranceAnimationType(){const{type:t}=this.props;switch(t){case"a":return"fadeIn";case"b":case"d":return"fadeInUp";case"c":return"fadeInRight";case"note":return"fadeInGrow"}}getEntranceAnimationDuration(){const{type:t}=this.props;switch(t){case"a":return 1;case"b":case"c":case"d":return .75;case"note":return .5}}renderText({blockId:t,getL10nValue:n,type:o,labels:r,lessonId:a,media:i,settings:c},{paragraph:l}){const d=o==="note",h=n(Array.isArray(i)?{}:i),m=!!h?.audio,f=gs(h,c.audioPosition,!1,"statement"),v=(0,s.jsx)("div",{className:wn("quote"),children:f.renderOrder.map((C,g)=>{if(C==="text")return(0,s.jsx)("div",{children:(0,s.jsx)(Ge,{value:l})},`text-${g}`);if(C==="audio"&&m){const x=f.renderOrder.indexOf("audio")<f.renderOrder.indexOf("text");return(0,s.jsx)("div",{className:wn("audio-container",{top:x,bottom:!x}),children:(0,s.jsx)(Qt,{blockId:t,hasPadding:!1,index:t,item:{media:i,id:t},labels:r,lessonId:a,media:i,mediaType:"audio",refs:`items:${t}`})},`audio-${g}`)}return null})});return d?(0,s.jsx)(_K,{getL10nValue:n,media:i,children:v}):v}render(){const{animateBlockEntrance:t,isLearner:n,items:o,renderText:r=this.renderTextDelegate,settings:a,type:i,initiallyVisible:c}=this.props,{entranceAnimation:l,divider:d=!0,dividerPadding:h=SU(i),dividerSize:m=yU(i),noteIcon:f=!0,noteSize:v="sm",statementWidth:C=LU(i)}=a,g=NU(C),x=jU(h),b=wU(m),L=v,S=i==="a"||i==="b"||i==="d",y=i==="note",T=wn({[i]:!0,[`${i}-custom-width-${g}`]:!0,[`${i}-divider-off`]:S&&!d,[`${i}-divider-padding-${x}`]:S&&d,[`${i}-divider-size-${b}`]:S&&d,[`note-size-${L}`]:y,[`note-size-${L}-no-icon`]:y&&!f,"no-animation":!l});return(0,s.jsx)(we,{className:T.toString(),children:(0,s.jsx)("div",{className:wn("wrap"),children:(0,s.jsx)("div",{className:wn("container"),children:(0,s.jsx)("div",{className:wn("row"),children:o.slice(0,1).map(k=>(0,s.jsx)(Be,{animateBlockEntrance:t,animateIn:this.getEntranceAnimationType(),duration:this.getEntranceAnimationDuration(),initiallyVisible:c,isLearner:n,children:(0,s.jsxs)("div",{className:wn("col"),children:[(0,s.jsx)("div",{className:wn("divider-top-container"),children:(0,s.jsx)("div",{className:wn("divider-top")})}),r(this.props,k),(0,s.jsx)("div",{className:wn("divider-bottom")})]})},k.id))})})})})}}const ac=st(DK),FK=ac,HK=e=>(0,s.jsx)(ac,{type:"b",...e}),$K=e=>(0,s.jsx)(ac,{type:"c",...e}),VK=e=>(0,s.jsx)(ac,{type:"d",...e}),zK=e=>(0,s.jsx)(ac,{type:"note",...e}),_K=({children:e,getL10nValue:t,media:n})=>{const o=tn(),{accentColor:r,cardMode:a,cornerRadius:i,courseColor:c,customBackgroundColorContrast:l,noteIcon:d=!0,noteIconColor:h}=o,m=o.noteColor,f=o.noteColorContrast,{theme:v}=Fe(),C=En(),g=cs(),x=g===se.COLOR,b=g===se.ACCENT,L=v?.accentContrast,S=g===se.DARK||g===se.BLACK,y=m!=null&&m!=="",k=x||b||S||y?$n.TRANSPARENT:a,I=y&&(f??Te.AUTO)===Te.AUTO||L===Te.AUTO&&b||l===Te.AUTO&&x,E=(0,u.useMemo)(()=>PK({accentColor:r??c,backgroundType:g,blockBackgroundColor:C,noteColor:m,imageBackgroundDefault:""}),[r,g,C,c,m]),w=y?f??Te.AUTO:g===se.COLOR?l:L,A=$t({backgroundColor:E,contrast:w}),N={"--color-background":E,...(I||y)&&{"--color-text":A},...i&&{"--corner-radius":`${Number(i)}px`},...h&&{"--color-theme-decorative":h},...y&&{"--color-theme":m}},R=wn("note-icon",{off:!d}),P=(t?t(Array.isArray(n)?{}:n):void 0)?.image,j=P?.key&&Object.keys(P).length>0,O=j?F8(P)?mt(P.key):lt(P):null,B=()=>d?j&&O?(0,s.jsx)("div",{"aria-hidden":!0,className:wn("note-icon__custom"),style:{WebkitMaskImage:`url('${O}')`,maskImage:`url('${O}')`}}):(0,s.jsx)(ie,{name:"circle-info"}):null;return(0,s.jsxs)(_t,{cardMode:k,className:wn("note-card"),style:N,children:[(0,s.jsx)("div",{className:R,children:B()}),e]})};var ht=p(82920);function V3({ariaLabel:e,children:t,className:n="carousel-controls-item-btn",isActive:o,onClick:r,onKeyDown:a}){return(0,s.jsx)("li",{className:"carousel-controls-item",role:"listitem",children:(0,s.jsx)("button",{"aria-current":o,"aria-label":e,className:n,onClick:r,onKeyDown:a,tabIndex:o?0:-1,type:"button",children:t})})}function _d({children:e,iconNameLeft:t="chevron-left-light",iconNameRight:n="chevron-right-light",isInfinite:o=!0,isRTL:r=!1,labelCarousel:a="Carousel",labelCarouselRoleDesc:i="Carousel",labelSlideControls:c="Slide controls",labelSlideControlsGoToNext:l="Go to next slide",labelSlideControlsGoToPrevious:d="Go to previous slide",labelSlideControlsGoToSlide:h="Go to slide",labelSlideCounterPreposition:m="of",labelSlidePreposition:f="of",labelSlideRoleDesc:v="Slide",onChange:C,ref:g,renderSlideIndicator:x,shouldMouseEmulateTouch:b=!1,shouldUseCounter:L=!1,shouldUseGoToSlide:S=!0}){const y=ht.useId(),[T,k]=ht.useState(0),I=(0,Oe.A)(T)??0,E=ht.useRef(null),w=ht.useRef(null),A=ht.useRef(!1),N=ht.useRef(!1),R=ht.useRef(void 0),M=ht.useRef(void 0),P=`carousel-${y}`,j=ht.Children.count(e),O=(0,Oe.A)(j),B=ht.useMemo(()=>Array.from({length:j}),[j]),D=j>1;ht.useImperativeHandle(g,()=>({navigateToSlide:(Q,z=!0)=>{k(Q);const F=E.current?.children?.[Q]?.firstElementChild;z&&F?.focus()}}),[]);const H=ht.useCallback(({activeIndex:Q,dir:z})=>{const F=o?Q-1>=0?Q-1:j-1:Math.max(0,Q-1),_=o?Q+1<=j-1?Q+1:0:Math.min(j-1,Q+1);return z==="left"?r?_:F:r?F:_},[o,r,j]),$=ht.useCallback(()=>{k(Q=>H(r?{activeIndex:Q,dir:"right"}:{activeIndex:Q,dir:"left"}))},[H,r]),W=ht.useCallback(()=>{k(Q=>H(r?{activeIndex:Q,dir:"left"}:{activeIndex:Q,dir:"right"}))},[H,r]),U=ht.useCallback(Q=>{const z=E.current?.children?.[Q],F=E.current;if(z&&F){const _=z.getBoundingClientRect(),K=F.getBoundingClientRect(),Y=_.left+_.width/2,q=K.left+K.width/2,J=Y-q;F.scrollBy({left:J,behavior:"smooth"})}},[]),Z=ht.useCallback(Q=>{let z=!1,F=T;switch(Q.key){case"ArrowLeft":z=!0,F=H({activeIndex:T,dir:"left"});break;case"ArrowRight":z=!0,F=H({activeIndex:T,dir:"right"});break;case"Home":z=!0,F=0;break;case"End":z=!0,F=j-1;break}z&&(Q.stopPropagation(),Q.preventDefault()),T!==F&&(E.current?.children?.[F]?.firstChild?.focus(),U(F),k(F))},[T,H,U,j]);ht.useEffect(()=>{I!==T&&C?.(T)},[T,C,I]),ht.useEffect(()=>{j<O&&T>j-1&&k(j-1)},[T,O,j]),ht.useEffect(()=>{const Q=J=>{J.target.tagName==="IMG"&&J.preventDefault(),R.current=J.screenX},z=J=>{const ee=window.visualViewport?.scale??1,re=window.getSelection().toString()!=="";if(!N.current&&ee<=1.01&&!re&&R.current!=null){M.current=J.screenX;const oe=M.current-R.current;Math.abs(oe)>50&&(window.getSelection().empty(),A.current=!0,R.current=void 0,M.current=void 0,oe<0?k(G=>H({activeIndex:G,dir:"right"})):k(G=>H({activeIndex:G,dir:"left"})))}},F=J=>{A.current&&J.stopPropagation(),A.current=!1,N.current=!1,R.current=void 0,M.current=void 0},_=J=>{if(J.touches.length>1){N.current=!0;return}J.changedTouches.length===1&&J.changedTouches[0]&&(R.current=J.changedTouches[0].screenX)},K=J=>{const ee=window.visualViewport?.scale??1,re=window.getSelection().toString()!=="";if(!N.current&&ee<=1.01&&!re&&R.current!=null&&J.changedTouches[0]){M.current=J.changedTouches[0].screenX;const oe=M.current-R.current;Math.abs(oe)>50&&(A.current=!0,R.current=void 0,M.current=void 0,oe<0?k(G=>H({activeIndex:G,dir:"right"})):k(G=>H({activeIndex:G,dir:"left"})))}},Y=()=>{A.current=!1,N.current=!1,R.current=void 0,M.current=void 0},q=w.current;return b&&(q?.addEventListener("mousedown",Q,{capture:!0}),q?.addEventListener("mousemove",z,{capture:!0}),q?.addEventListener("click",F,{capture:!0})),q?.addEventListener("touchstart",_,{passive:!0}),q?.addEventListener("touchmove",K,{passive:!0}),q?.addEventListener("touchend",Y,{passive:!0}),q?.addEventListener("touchcancel",Y,{passive:!0}),()=>{b&&(q?.removeEventListener("mousedown",Q),q?.removeEventListener("mousemove",z),q?.removeEventListener("mouseup",Y)),q?.removeEventListener("touchstart",_),q?.removeEventListener("touchmove",K),q?.removeEventListener("touchend",Y),q?.removeEventListener("touchcancel",Y)}},[H,b,j]);const ne=ht.useCallback(Q=>()=>{U(Q),k(Q)},[U]);return(0,s.jsxs)("div",{"aria-label":a,"aria-roledescription":i,className:"carousel",dir:r?"rtl":void 0,role:"region",style:{"--carousel-active-index":T},children:[D&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{"aria-label":c,className:"carousel-controls",role:"group",children:[S&&(0,s.jsx)("ul",{className:"carousel-controls-items",ref:E,role:"list",children:B.map((Q,z)=>{const F=T===z,_=ne(z);return x?x({index:z,isActive:F,onClick:_,onKeyDown:Z}):(0,s.jsx)(V3,{ariaLabel:h+" "+(z+1),isActive:F,onClick:_,onKeyDown:Z,children:(0,s.jsx)(ie,{className:"carousel-controls-item-btn-icon",name:F?"circle":"circle-solid"})},z)})}),(0,s.jsx)("button",{"aria-disabled":o?void 0:T===0,"aria-label":d,className:"carousel-controls-prev",onClick:!o&&T===0?void 0:$,type:"button",children:(0,s.jsx)(ie,{className:"carousel-controls-prev-icon",name:r?n:t})}),(0,s.jsx)("button",{"aria-disabled":o?void 0:T===j-1,"aria-label":l,className:"carousel-controls-next",onClick:!o&&T===j-1?void 0:W,type:"button",children:(0,s.jsx)(ie,{className:"carousel-controls-next-icon",name:r?t:n})}),L&&(0,s.jsxs)("div",{className:"carousel-controls-counter",children:[(0,s.jsx)("div",{className:"carousel-controls-counter-text",children:`${T+1} ${m} ${j}`}),(0,s.jsx)("div",{className:"carousel-controls-counter-line",children:(0,s.jsx)("div",{className:"carousel-controls-counter-line-runner",style:{width:`${Number(((T+1)/j).toFixed(2))*100}%`}})})]})]})}),(0,s.jsx)("div",{"aria-live":"polite",className:"carousel-slides",ref:w,children:ht.Children.map(e,(Q,z)=>{const F=`${P}-${z}-counter`;return(0,s.jsxs)("div",{"aria-labelledby":F,"aria-roledescription":v,className:"carousel-slide",hidden:T!==z,inert:T!==z,role:"group",children:[(0,s.jsx)("div",{className:"visually-hidden-always",id:F,children:`${z+1} ${f} ${j}`}),Q]})})})]})}var ic=p(82920);const UK="div",z3=ic.createContext(void 0);function GK({children:e,element:t,...n},o){const[r,a]=ic.useState(null);return(0,s.jsx)(z3.Provider,{value:r,children:ic.createElement(t??UK,{...n,ref:o},e,(0,s.jsx)("div",{ref:a}))})}const cc=ic.forwardRef(GK);function pfe(){return ic.useContext(z3)}function jf(e){const t=n=>{const o=lh();return(0,s.jsx)(e,{...n,isRTL:o})};return t.displayName=`withRTL(${e.displayName||e.name})`,t}const Ud=({blockId:e,carouselRef:t,children:n,items:o})=>{const r=(0,u.useRef)(null),a=t??r;return(0,u.useEffect)(()=>{const i=c=>{const{path:l}=c.detail,{blockId:d,cardId:h}=ma(l,["block","card"]);if(d===e){const m=o.findIndex(f=>f.id===h);m>=0&&a.current?.navigateToSlide?.(m,!1)}};return window.addEventListener(Ue,i),()=>{window.removeEventListener(Ue,i)}},[o,e,a]),(0,s.jsx)(s.Fragment,{children:n({carouselRef:t})})},He=V("block-quote"),lc=({avatar:e,alt:t,l10nId:n,showAvatar:o})=>o?(0,s.jsx)(vn,{alt:yo(t),className:He("avatar"),"data-l10n-id":n,src:e}):null,_3=(e,{paragraph:t})=>{const n=t||"",o=He("text",{blank:t===""}).toString();return(0,s.jsx)(Ge,{className:o,value:n})},U3=(e,{name:t})=>{const n=He("caption",{blank:t===""}).toString();return(0,s.jsx)(Ge,{className:n,value:t})},G3=({avatar:e,blockProps:t,getL10nValue:n,item:o,renderCaption:r,renderText:a})=>{const i=o?.avatar?.media,c=n(i)?.image,l=c?.alt,d=gh(c),h=jt(i);return(0,s.jsx)("div",{className:He("slide"),children:(0,s.jsxs)("figure",{className:He("figure"),children:[d&&e?(0,s.jsx)(lc,{alt:l??"",avatar:d,l10nId:h,showAvatar:!!e}):null,(0,s.jsx)("blockquote",{className:He("quote-body"),children:a(t,o)}),(0,s.jsx)("figcaption",{children:r(t,o)})]})})},WK=({alt:e,animateBlockEntrance:t,avatar:n,children:o,l10nId:r,initiallyVisible:a,isAuthorBlank:i=!1,isLearner:c,showAvatar:l,type:d})=>{const h=He("col",{"no-avatar":!n}),m=n?(0,s.jsx)("div",{className:He("image"),children:(0,s.jsx)("div",{className:He("avatar-wrap"),children:d==="c"?(0,s.jsx)(Be,{animateBlockEntrance:t,animateIn:"fadeInLeftSmall",initiallyVisible:a,isLearner:c,children:(0,s.jsx)(lc,{alt:e,avatar:n,l10nId:r,showAvatar:l})}):(0,s.jsx)(lc,{alt:e,avatar:n,l10nId:r,showAvatar:l})})}):null;return(0,s.jsx)("div",{className:He("container"),children:(0,s.jsx)("div",{className:He("row"),children:(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("div",{className:He("divider-top")}),(0,s.jsxs)("div",{className:He("figure",{"no-author":i,"no-avatar":!i&&!l}),children:[m,o]}),(0,s.jsx)("div",{className:He("divider-bottom")})]})})})},KK=({avatar:e,children:t,alt:n,l10nId:o,showAvatar:r})=>(0,s.jsx)("div",{className:He("figure"),children:(0,s.jsx)("div",{className:He("container"),children:(0,s.jsxs)("div",{className:He("row"),children:[(0,s.jsx)("div",{className:He("col"),children:e&&r?(0,s.jsx)(lc,{alt:n,avatar:e,l10nId:o,showAvatar:r}):null}),(0,s.jsx)("div",{className:He("col"),children:t})]})})}),QK=({background:e,avatar:t,children:n,alt:o,l10nId:r,showAvatar:a})=>(0,s.jsx)("div",{className:He("background"),style:{backgroundImage:e??""},children:(0,s.jsx)("div",{className:He("container"),children:(0,s.jsx)("div",{className:He("row"),children:(0,s.jsx)("div",{className:He("col"),children:(0,s.jsxs)("div",{className:He("figure"),children:[t&&a?(0,s.jsx)(lc,{alt:o,avatar:t,l10nId:r,showAvatar:a}):null,n]})})})})});class YK extends u.Component{renderTextDelegate;renderCaptionDelegate;constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this),this.renderCaptionDelegate=this.renderCaption.bind(this)}static get defaultProps(){return{editable:!1,items:[],type:"a",getL10nValue:()=>{}}}getQuoteEntranceAnimationType(){const{type:t}=this.props;switch(t){case"a":case"b":case"background":return"fadeInUp";case"d":case"c":return"fadeInRight"}}getBackgroundImageUrl(t,n){const o=t?.alpha??TU(n),r=lt(t),a=kU(n);return ll({alpha:o,color:a,url:r})?.backgroundImage}renderText(t,{paragraph:n}){const o=n||"",r=He("text",{blank:o===""}).toString();return(0,s.jsx)(Ge,{className:r,value:o})}renderCaption(t,{name:n}){const o=He("caption",{blank:n===""}).toString();return(0,s.jsx)(Ge,{className:o,value:n})}render(){const{animateBlockEntrance:t,getL10nValue:n,initiallyVisible:o,isLearner:r,items:a,settings:i,type:c,renderText:l=this.renderTextDelegate,renderCaption:d=this.renderCaptionDelegate}=this.props,h=92,{avatarSize:m=lf(c),divider:f=!0,dividerSize:v=h,entranceAnimation:C,quoteAlignment:g="left",quoteIcon:x=!0,quotesInline:b,quotePadding:L=2,quoteWidth:S=t3(c)}=i,[y]=a,{avatar:T,background:k}=y,I=n(T?.media)?.image,E=gh(I),w=I?.alt,A=jt(T.media),N=n(k?.media)?.image,R=N?.overlayColor,M=this.getBackgroundImageUrl(N,R),P=i?.avatar??E!=="",j=E&&E!=="",O=c==="background",B=O&&R==="light",D=n3(S),H=s3(L),$=df(c,m),W=EU(v),U=c==="a",Z=c==="c"||O,ne=c!=="b"&&!O,Q=y?.name==="",z=y?.paragraph==="",F=He(null,{[c]:!0,[`${c}-custom-width-${D}`]:!0,[`${c}-divider-off`]:U&&!f,[`${c}-divider-size-${W}`]:U&&f,[`${c}-quote-padding-${H}`]:!0,[`${c}-align-${g}`]:O,[`${c}-${D}-no-avatar`]:!E||!P,[`${c}-avatar-size-${$}`]:P&&j,[`${c}-quote-icon-off`]:Z&&!x,[`${c}-legacy-quote-mark`]:ne&&!b,[`${c}-overlay-legacy`]:!R,[`${c}-overlay-light`]:B,"no-animation":!C}).toString(),_=(0,s.jsx)("div",{className:He("wrap",{blank:Q||z}),children:(0,s.jsx)(Be,{animateBlockEntrance:t,animateIn:this.getQuoteEntranceAnimationType(),initiallyVisible:o,isLearner:r,siblingDelay:.15,children:(0,s.jsxs)("figure",{children:[(0,s.jsx)("blockquote",{children:l(this.props,y)}),(0,s.jsx)("figcaption",{children:d(this.props,y)})]})})});let K;switch(c){case"d":K=(0,s.jsx)(KK,{alt:w,avatar:E,initiallyVisible:o,l10nId:A,showAvatar:P,type:c,children:_});break;case"background":K=(0,s.jsx)(QK,{alt:w,avatar:E,background:M,initiallyVisible:o,l10nId:A,showAvatar:P,type:c,children:_});break;default:K=(0,s.jsx)(WK,{alt:w,animateBlockEntrance:t,avatar:E,initiallyVisible:o,isAuthorBlank:Q,isLearner:r,l10nId:A,showAvatar:P,type:c,children:_})}return(0,s.jsx)(we,{className:F,children:K})}}const dc=st(YK),W3=(e=>(0,s.jsx)(dc,{...e}));p.dn(W3);const ZK=e=>(0,s.jsx)(dc,{type:"b",...e}),XK=e=>(0,s.jsx)(dc,{type:"c",...e}),qK=e=>(0,s.jsx)(dc,{type:"d",...e}),JK=e=>(0,s.jsx)(dc,{type:"background",...e});class eQ extends u.Component{static get defaultProps(){return{type:"carousel",items:[],onStep:Function.prototype,getL10nValue:()=>{}}}handleChangeCarousel=t=>{this.props.onStep?.(this.props.items[t])};render(){const{blockId:t,animateBlockEntrance:n,editable:o,getL10nValue:r,initiallyVisible:a=!1,isRTL:i,isLearner:c,isLessonBlocksList:l=!1,items:d,labels:h,previewType:m,settings:f,renderText:v=_3,renderCaption:C=U3,type:g}=this.props,{avatar:x=!0,avatarSize:b=lf(g),entranceAnimation:L,quotesInline:S,quotePadding:y=2,quoteWidth:T=t3(g),showBorder:k=!0}=f,E=g!=="b"&&!(g==="background"),w=n3(T),A=s3(y),N=df(g,b),R=m==="mobile-portrait"||m==="mobile-landscape",M=He({[g]:!0,[`${g}-custom-width-${w}`]:!0,[`${g}-quote-padding-${A}`]:!0,[`${g}-${w}-no-avatar`]:!x,[`${g}-avatar-size-${N}`]:x,[`${g}-legacy-quote-mark`]:!l&&E&&!S,"no-animation":!L,"hide-border":!k,editable:o}).toString(),P=d.map(j=>(0,s.jsx)(G3,{avatar:x,blockProps:this.props,getL10nValue:r,item:j,renderCaption:C,renderText:v},j.id));return(0,s.jsx)("div",{className:He("slider-container"),children:(0,s.jsx)(we,{className:M,children:(0,s.jsx)(cc,{className:He("wrap"),children:(0,s.jsx)("div",{className:He("container"),children:(0,s.jsx)("div",{className:He("col"),children:(0,s.jsx)(_t,{className:He("box"),children:(0,s.jsx)(Be,{animateBlockEntrance:n,animateIn:"fadeInUp",initiallyVisible:a,isLearner:c,children:(0,s.jsx)(Ud,{blockId:t,items:d,children:({carouselRef:j})=>(0,s.jsx)(_d,{isRTL:i,labelCarousel:h?.a11yBlockQuoteCarousel,labelCarouselRoleDesc:h?.a11yBlockQuoteCarouselRoleDescription,labelSlideControls:h?.a11yBlockQuoteCarouselSlideControls,labelSlideControlsGoToNext:h?.a11yBlockQuoteCarouselSlideControlsGoToNext,labelSlideControlsGoToPrevious:h?.a11yBlockQuoteCarouselSlideControlsGoToPrevious,labelSlideControlsGoToSlide:h?.a11yBlockQuoteCarouselSlideControlsGoToSlide,labelSlideCounterPreposition:h?.blocksPreposition,labelSlidePreposition:h?.a11yBlockQuoteCarouselSlidePreposition,labelSlideRoleDesc:h?.a11yBlockQuoteCarouselSlideRoleDescription,onChange:this.handleChangeCarousel,ref:j,shouldMouseEmulateTouch:R,children:P})})})})})})})})})}}const tQ=jf(st(eQ)),Gd=V("block-quote"),nQ=e=>{const{animateBlockEntrance:t,initiallyVisible:n=!1,isLearner:o,items:r=[],settings:a,renderText:i=_3,renderCaption:c=U3,type:l="stacked"}=e,d=at(),{avatar:h=!0,entranceAnimation:m}=a,f=a.avatarSize??lf(l),v=df(l,f),C=Gd({[l]:!0,[`${l}-avatar-size-${v}`]:!0,"no-animation":!m}).toString(),g=r.map(x=>(0,s.jsx)(G3,{avatar:h,blockProps:e,getL10nValue:d,item:x,renderCaption:c,renderText:i},x.id));return(0,s.jsx)(we,{className:C,children:(0,s.jsx)(cc,{className:Gd("wrap"),children:(0,s.jsx)("div",{className:Gd("container"),children:(0,s.jsx)(Be,{animateBlockEntrance:t,animateIn:"fadeInUp",initiallyVisible:n,isLearner:o,siblingDelay:.15,children:(0,s.jsx)("div",{className:Gd("row"),children:g})})})})})};var K3=p(82920);const xn=V("block-list"),sQ=class extends K3.Component{static get defaultProps(){return{editable:!1,items:[],onStep:Function.prototype,type:"numbered",getL10nValue:()=>{}}}nextNumber(e){const{items:t}=this.props,o=t.length>0?t[e].number:null;let r;return!isNaN(o)&&o!==""&&(r=parseInt(o,10)+1),(r<1||r>99)&&(r=null),r}render(){const{animateBlockEntrance:e,blockId:t,defaultBackgroundColor:n,editable:o,getL10nValue:r,initiallyVisible:a,isLearner:i,items:c,labels:l,lessonId:d,media:h,onStep:m,settings:f,type:v}=this.props,{audioPosition:C,bulletPadding:g,entranceAnimation:x,listItemColor:b,listItemColorContrast:L,listWidth:S}=f,y=r(Array.isArray(h)?{}:h),T=gs(y,C),k=IU(g),I=Od(S),E=xn({[v]:!0,[`${v}-custom-width-${I}`]:!0,[`${v}-bullet-padding-${k}`]:!0,"no-animation":!x,presentation:this.props.isPresentation}),w=v==="numbered"?"ol":"ul";return(0,s.jsx)(we,{className:E.toString(),defaultBackgroundColor:n,children:(0,s.jsx)("div",{className:xn("container"),children:(0,s.jsx)("div",{className:xn("row"),children:(0,s.jsx)(cc,{className:xn("col"),children:(0,s.jsx)("div",{className:"blocks-list__container",children:T.renderOrder.map((A,N)=>{if(A==="text")return(0,s.jsx)("div",{children:(0,s.jsx)(w,{className:xn("list"),role:"list",children:(0,s.jsx)(Be,{animateBlockEntrance:e,animateIn:"fadeInRight",className:xn("animated-item").toString(),initiallyVisible:a,isLearner:i,siblingDelay:.25,children:c.map((R,M)=>{const P={key:R.id,index:M,lessonId:d,blockId:t,type:v,editable:o,nextNumber:this.nextNumber.bind(this),onStep:m,listItemColor:b,listItemColorContrast:L,...R};return this.props.renderItem?this.props.renderItem(P):(0,u.createElement)(oQ,{...P,key:P.key})})})})},`text-${N}`);if(A==="audio")return(0,s.jsx)("div",{className:X()("block-list__media",{"audio-on-top":T.renderOrder[0]==="audio","audio-on-bottom":T.renderOrder[0]!=="audio"}),children:(0,s.jsx)(Qt,{blockId:t,hasPadding:!1,index:t,item:{media:h,id:t},labels:l,lessonId:d,media:h,refs:`items:${t}`})},`${A}-${N}`)})})})})})})}};class oQ extends K3.Component{renderTextDelegate;animateRef=null;static get defaultProps(){return{className:""}}constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this)}renderText(t){return(0,s.jsx)(Ge,{...t})}handleChangeCheckbox=()=>{this.props.onStep(this.props)};render(){const{type:t,id:n,index:o,number:r,paragraph:a,editable:i,className:c,renderText:l=this.renderTextDelegate,style:d,listItemColor:h,listItemColorContrast:m}=this.props,f={allowTabNavigation:!0,className:"block-list__content brand--linkColor cursorAuto",editable:i,id:n,value:a};return(0,s.jsxs)("li",{className:X()("block-list__item",`block-list__item--${t}`,c),ref:v=>{this.animateRef=v},role:"listitem",style:d,children:[t==="numbered"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:xn("number"),style:h?{backgroundColor:h,color:$t({contrast:m||Te.AUTO,backgroundColor:h})}:void 0,children:r||o+1}),l(f)]}),t==="bulleted"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"visually-hidden-always",children:"\u2022"}),(0,s.jsx)(ie,{className:xn("bullet"),name:"circle-solid",style:h?{color:h}:void 0}),l(f)]}),t==="icon"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:xn("icon"),style:h?{"--color-background":h}:void 0,children:(0,s.jsx)("span",{"aria-hidden":"true",className:xn("icon-glyph",{placeholder:!0}),children:"\u2B50\uFE0F"})}),l(f)]}),t==="checkboxes"&&(0,s.jsxs)("label",{className:xn("option"),children:[(0,s.jsx)("input",{className:xn("checkbox-input"),onChange:this.handleChangeCheckbox,type:"checkbox"}),(0,s.jsx)("div",{className:xn("checkbox"),style:h?{borderColor:h,"--color-background":h}:void 0,children:(0,s.jsx)(ie,{className:xn("checkbox__icon"),name:"check",style:h?{color:$t({contrast:m||Te.AUTO,backgroundColor:h})}:void 0})}),l(f)]})]})}}const Wd=e=>{const t=at(),n=Gs();return(0,s.jsx)(sQ,{...e,getL10nValue:t,isPresentation:n})},rQ=Wd,aQ=e=>(0,s.jsx)(Wd,{type:"checkboxes",...e}),iQ=e=>(0,s.jsx)(Wd,{type:"bulleted",...e}),cQ=e=>(0,s.jsx)(Wd,{type:"icon",...e});var wf=p(82920);const Af=e=>["hero","full","aside"].includes(e);class lQ extends wf.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this)}static get defaultProps(){return{type:"hero",editable:!1,getL10nValue:()=>{},lessonId:"",blockId:"",items:[]}}renderCaption(t,n){return(0,s.jsx)(Ge,{className:"block-image__caption",value:n})}render(){const{aiMagicIcon:t,aiOverlay:n,animateBlockEntrance:o,blockId:r,defaultBackgroundColor:a,editable:i,getL10nValue:c,initiallyVisible:l,isLearner:d,items:h,type:m,labels:f,lessonId:v,settings:C,renderCaption:g=this.renderCaptionDelegate}=this.props,{entranceAnimation:x,cornerRadius:b,zoomOnClick:L}=C,S=X()(`block-image block-image--${m}`,"block-image--flag-dimensions",{"block-image--no-animation":!x}),y=h[0],{id:T,caption:k}=y,{image:I,audio:E}=c(y.media)??{},w=I?.alt,A=lt(I),N=I?.dimensions,R=N?.width||N?.originalWidth,M=N?.height||N?.originalHeight,P=rc({caption:k,editable:i,id:T,getL10nValue:c}),j=!d&&!A,O=R&&M?R/M:void 0,B=I?.link?c(I.link.destination):void 0,D=I?.link&&typeof B=="string"?{type:I.link.type,destination:B}:void 0,H=X()("block-image__image",{"block-image__image--audio-overlay":!!E});return(0,s.jsx)(we,{className:S,defaultBackgroundColor:a,children:(0,s.jsx)("div",{className:"block-image__container",children:(0,s.jsx)("div",{className:"block-image__row",children:(0,s.jsx)("div",{className:"block-image__col",children:(0,s.jsx)(Be,{animateBlockEntrance:o,initiallyVisible:l,isLearner:d,children:(0,s.jsxs)(P.tagName,{"aria-labelledby":P.figcaptionId,className:"block-image__figure",role:P.role,children:[(0,s.jsxs)("div",{className:H,children:[j?(0,s.jsxs)("div",{className:"block-image__waiting",style:{aspectRatio:O},children:[(0,s.jsx)("div",{children:t}),(0,s.jsx)("div",{className:"block-image__waiting-text",children:"Waiting for image\u2026"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Aa,{alt:w,cornerRadius:b,disableZoom:!L,height:M,l10nId:jt(y.media),labels:f,link:D,maxHeight:m==="full"?380:900,src:A,width:R}),E&&Af(m)&&(0,s.jsx)(Qt,{blockId:r,cornerRadius:b,index:`${r}-${T}-0`,isOverlayAudio:!0,item:y,labels:f,lessonId:v,media:y.media,mediaType:"audio"})]}),n&&(0,s.jsx)("div",{className:"block-image__ai-overlay",children:n})]}),(i||k)&&(0,s.jsx)("figcaption",{id:P.figcaptionId,children:g(T,k)})]})})})})})})}}const dQ=st(lQ),uQ=(e,t,n,o,r)=>t?r:(0,s.jsx)(Be,{animateBlockEntrance:e,initiallyVisible:n,isLearner:o,children:r});class hQ extends wf.Component{renderCaptionDelegate;renderParagraphDelegate;constructor(t){super(t),this.renderParagraphDelegate=this.renderParagraph.bind(this),this.renderCaptionDelegate=this.renderCaption.bind(this)}static get defaultProps(){return{blockId:"",getL10nValue:()=>{},editable:!1,items:[],lessonId:"",type:"text-aside"}}renderParagraph(t,n){return(0,s.jsx)(Ge,{className:"block-image__text",value:n})}renderCaption(t,n){return(0,s.jsx)(Ge,{className:"block-image__caption",value:n})}renderImage(t,n,o,r){const{blockId:a,editable:i,lessonId:c,renderCaption:l=this.renderCaptionDelegate,getL10nValue:d}=this.props,h=d(o.media),m=h?.image,f=h?.audio,v=m?.alt,C=lt(m),g=m?.dimensions,x=g?.width||g?.originalWidth,b=g?.height||g?.originalHeight,L=rc({caption:n,editable:i,id:t,getL10nValue:d}),{animateBlockEntrance:S,initiallyVisible:y,isLearner:T,labels:k,settings:{cornerRadius:I,zoomOnClick:E}}=this.props,w=X()("block-image__image",{"block-image__image--audio-overlay":!!f}),A=m?.link?d(m.link.destination):void 0,N=m?.link&&typeof A=="string"?{type:m.link.type,destination:A}:void 0;return(0,s.jsx)(Be,{animateBlockEntrance:S,animateIn:r==="right"?"fadeInRight":"fadeInLeft",initiallyVisible:y,isLearner:T,children:(0,s.jsxs)(L.tagName,{"aria-labelledby":L.figcaptionId,className:"block-image__figure",role:L.role,children:[(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)(Aa,{alt:v,cornerRadius:I,disableZoom:!E,height:b,l10nId:jt(o?.media),labels:k,link:N,maxHeight:900,src:C,width:x}),f&&Af("aside")&&(0,s.jsx)(Qt,{blockId:a,cornerRadius:I,index:`${a}-${t}-0`,isOverlayAudio:!0,item:o,labels:k,lessonId:c,media:o.media,mediaType:"audio"})]}),(i||n)&&(0,s.jsx)("figcaption",{id:L.figcaptionId,children:l(t,n)})]})})}render(){const{defaultBackgroundColor:t,items:n,renderParagraph:o=this.renderParagraphDelegate,settings:r,type:a}=this.props,{entranceAnimation:i,imagePosition:c,imageSize:l}=r,d=c==="right",h=X()(`block-image block-image--${a}`,{"block-image--small":l==="small","block-image--large":l==="large","block-image--reverse":d,"block-image--no-animation":!i}),m=n[0],{id:f,caption:v}=m,C="paragraph"in m?m.paragraph:void 0;return(0,s.jsx)(we,{className:h,defaultBackgroundColor:t,children:(0,s.jsx)("div",{className:"block-image__container",children:(0,s.jsxs)("div",{className:"block-image__row",children:[(0,s.jsx)("div",{className:"block-image__col",children:d?o(f,C):this.renderImage(f,v,m,"left")}),(0,s.jsx)("div",{className:"block-image__col",children:d?this.renderImage(f,v,m,"right"):o(f,C)})]})})})}}const mQ=st(hQ);class fQ extends wf.Component{renderCaptionDelegate;renderOverlayDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this),this.renderOverlayDelegate=this.renderOverlay.bind(this)}static get defaultProps(){return{blockId:"",editable:!1,getL10nValue:()=>{},items:[],lessonId:"",type:"full"}}renderCaption(t,n){return(0,s.jsx)(Ge,{className:"block-image__caption",value:n})}renderOverlay(t,n){return(0,s.jsx)(Ge,{className:"block-image__paragraph",value:n})}renderOverlayCaption(t,n){const{animateBlockEntrance:o,initiallyVisible:r,isLearner:a,renderOverlay:i=this.renderOverlayDelegate}=this.props;return(0,s.jsx)("div",{className:"block-image__container",children:(0,s.jsx)("div",{className:"block-image__row",children:(0,s.jsx)("div",{className:"block-image__col",children:(0,s.jsx)(Be,{animateBlockEntrance:o,animateIn:"fadeInUp",duration:1,initiallyVisible:r,isLearner:a,children:i(t,n)})})})})}render(){const{animateBlockEntrance:t,blockId:n,defaultBackgroundColor:o,editable:r,getL10nValue:a,initiallyVisible:i,isLearner:c,items:l,labels:d,lessonId:h,settings:m,type:f,renderCaption:v=this.renderCaptionDelegate}=this.props,{entranceAnimation:C,opacity:g,opacityColor:x}=m,b=Ph(m?.backgroundColor,o),L=X()(`block-image block-image--${f}`,"block-image--flag-dimensions",{"block-image--no-animation":!C,"block-image--dark":km(b)}),S={opacity:g||.6,backgroundColor:x||"transparent"},y=l[0],{id:T,caption:k}=y,I=a(y.media),E=I?.image,w=I?.audio,A=E?.key,N=lt(E),R=E?.dimensions,M=R?.width||R?.originalWidth,P=R?.height||R?.originalHeight,j=yo(E?.alt),O=f==="overlay",B=rc({caption:k,editable:r,id:T,isOverlayType:O,getL10nValue:a});return(0,s.jsxs)(we,{"aria-labelledby":B.figcaptionId,className:L,defaultBackgroundColor:o,role:B.role,tag:B.tagName,children:[uQ(t,O,i,c,(0,s.jsxs)("div",{className:"block-image__figure",children:[A&&(0,s.jsxs)("div",{className:"block-image__image","data-l10n-id":jt(y?.media),style:{backgroundImage:`url('${N}')`},children:[(0,s.jsx)(vn,{alt:j,height:P,src:N,width:M}),(0,s.jsx)("div",{className:"block-image__overlay",style:S}),w&&Af(f)&&(0,s.jsx)(Qt,{blockId:n,index:`${n}-${T}-0`,isOverlayAudio:!0,item:y,labels:d,lessonId:h,media:y.media,mediaType:"audio"})]}),O?this.renderOverlayCaption(T,k):null]})),!O&&(r||k)&&(0,s.jsx)("figcaption",{className:"block-image__container",id:B.figcaptionId,children:v(T,k)})]})}}const Rf=st(fQ),pQ=e=>(0,s.jsx)(Rf,{type:"overlay",...e}),gQ=e=>(0,s.jsx)(Rf,{type:"banner",...e});var vQ=p(82920);function Q3(e){class t extends vQ.Component{static displayName=`withGalleryCaption(${e.displayName||e.name})`;renderCaptionDelegate;constructor(o){super(o),this.renderCaptionDelegate=this.renderCaption.bind(this)}renderCaption(o,r,a=!0){return(0,s.jsx)(Ge,{allowTabNavigation:a,className:"block-gallery__caption",value:r})}render(){const{renderCaption:o=this.renderCaptionDelegate}=this.props;return(0,s.jsx)(e,{...this.props,renderCaption:o})}}return t}var Kd=p(82920);const Y3=V("block-gallery-carousel");function CQ({blockId:e,animateBlockEntrance:t,defaultBackgroundColor:n,editable:o,initiallyVisible:r,isLearner:a,labels:i,lessonId:c,items:l,onStep:d,previewType:h,renderCaption:m,settings:f}){l||=[];const[v,C]=Kd.useState(0),g=Kd.useCallback(S=>{C(S),d?.(l[S])},[l,d]),x=h===sr.MOBILE_PORTRAIT||h===sr.MOBILE_LANDSCAPE,b=Y3({noAnimation:!f?.entranceAnimation||jn()}).toString(),L=lh();return(0,s.jsx)(we,{className:b,defaultBackgroundColor:n,children:(0,s.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,s.jsx)(cc,{className:Y3("container").toString(),children:(0,s.jsx)(Ud,{blockId:e,items:l,children:({carouselRef:S})=>(0,s.jsx)(_d,{isRTL:L,labelCarousel:i?.a11yBlockImageCarousel,labelCarouselRoleDesc:i?.a11yBlockImageCarouselRoleDescription,labelSlideControls:i?.a11yBlockImageCarouselSlideControls,labelSlideControlsGoToNext:i?.a11yBlockImageCarouselSlideControlsGoToNext,labelSlideControlsGoToPrevious:i?.a11yBlockImageCarouselSlideControlsGoToPrevious,labelSlideControlsGoToSlide:i?.a11yBlockImageCarouselSlideControlsGoToSlide,labelSlideCounterPreposition:i?.blocksPreposition,labelSlidePreposition:i?.a11yBlockImageCarouselSlidePreposition,labelSlideRoleDesc:i?.a11yBlockImageCarouselSlideRoleDescription,onChange:g,ref:S,shouldMouseEmulateTouch:x,children:l.map((y,T)=>(0,s.jsx)(bQ,{activeIndex:v,blockId:e,editable:o,index:T,item:y,labels:i,lessonId:c,renderCaption:m,settings:f},y.id))})})})})})}const xQ=Q3(CQ),Pf=V("block-gallery-carousel-item");function bQ({activeIndex:e,blockId:t,editable:n,index:o,item:r,labels:a,lessonId:i,renderCaption:c,settings:l}){const[d,h]=Kd.useState(!1),{image:m,audio:f}=Re(r.media),v=Re(m?.link?.destination),C=m?.dimensions,g=Kd.useCallback(()=>{h(!0)},[]);return(0,s.jsxs)("figure",{className:Pf(),children:[n&&!d&&(0,s.jsx)("div",{className:Pf("loading"),children:"Loading image..."}),(0,s.jsxs)("div",{className:Pf("image-container",{"audio-overlay":!!f}),children:[(0,s.jsx)(Aa,{alt:m?.alt,cornerRadius:l?.cornerRadius,disableZoom:!l?.zoomOnClick,height:C?.height||C?.originalHeight,l10nId:jt(r?.media),labels:a,link:m?.link&&typeof v=="string"?{type:m.link.type,destination:v}:void 0,maxHeight:900,onLoad:g,src:lt(m),width:C?.width||C?.originalWidth}),f&&(0,s.jsx)(Qt,{blockId:t,cornerRadius:l?.cornerRadius,index:`${t}-${r.id}-${o}`,isOverlayAudio:!0,item:r,labels:a,lessonId:i,media:r.media,mediaType:"audio",shouldPause:e!==o})]}),(n||r.caption)&&d&&(0,s.jsx)("figcaption",{children:c(r.id,r.caption)})]})}const yQ=({alt:e,cornerRadius:t,disableZoom:n,height:o,l10nId:r,labels:a,link:i,src:c,width:l})=>(0,s.jsx)("div",{className:"block-gallery__image",children:(0,s.jsx)(Aa,{alt:e,cornerRadius:t,disableZoom:n,height:o,l10nId:r,labels:a,link:i,maxHeight:900,src:c,width:l})}),SQ=e=>{switch(e){case 3:return"threecol";case 4:return"fourcol";default:return"twocol"}};function LQ(e){return(0,s.jsx)(xQ,{...e})}class TQ extends u.Component{static get defaultProps(){return{blockId:"",getL10nValue:()=>{},items:[],lessonId:"",width:2}}render(){const{animateBlockEntrance:t,defaultBackgroundColor:n,editable:o,getL10nValue:r,initiallyVisible:a,isLearner:i,items:c,labels:l,renderCaption:d,settings:h,width:m}=this.props,{entranceAnimation:f,cornerRadius:v,zoomOnClick:C}=h,g=X()(`block-gallery block-gallery--${SQ(m)}`,{"block-gallery--no-animation":!f||jn()});return(0,s.jsx)(we,{className:g,defaultBackgroundColor:n,children:(0,s.jsx)("div",{className:"block-gallery__container",children:(0,s.jsx)("div",{className:"block-gallery__row",children:(0,s.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:a,isLearner:i,siblingDelay:.25,children:c.map(x=>{const{id:b}=x,L=x.caption,S=r(x.media)?.image,y=S?.alt,T=S?.key,k=S?.dimensions,I=k?.width||k?.originalWidth,E=k?.height||k?.originalHeight,w=lt(S),A=r(S?.link?.destination),N=rc({caption:L,editable:o,id:b,getL10nValue:this.props.getL10nValue});return(0,s.jsx)("div",{className:"block-gallery__col",children:(0,s.jsxs)(N.tagName,{"aria-labelledby":N.figcaptionId,className:"block-gallery__figure",role:N.role,children:[T&&(0,s.jsx)(yQ,{alt:y,cornerRadius:v,disableZoom:!C,height:E,l10nId:jt(x?.media),labels:l,link:S?.link&&typeof A=="string"?{type:S.link.type,destination:A}:void 0,src:w,width:I}),(o||L)&&(0,s.jsx)("figcaption",{id:N.figcaptionId,children:d(b,L)})]})},b)})})})})})}}const Mf=Q3(st(TQ)),Of=V("block-divider"),Bf=({isLearner:e,labels:{numberedDividerGroup:t},number:n,settings:o,type:r="divider"})=>{const{entranceAnimation:a}=o,i=r==="numbered",l=Of({authoring:!e,spacing:r==="spacing",numbered:i,"no-animation":!a}).toString(),d=i?(0,s.jsxs)("div",{className:Of("wrap__number"),children:[(0,s.jsx)("span",{className:"visually-hidden-always",children:t}),n]}):null;return(0,s.jsx)(we,{className:l,children:(0,s.jsx)("div",{className:Of("wrap",{authoring:!e&&!i}),children:d})})},kQ=Bf,IQ=e=>(0,s.jsx)(Bf,{type:"numbered",...e}),EQ=e=>(0,s.jsx)(Bf,{type:"spacing",...e});var NQ=p(8608),jQ=p.n(NQ),wQ=p(48451),Z3=p.n(wQ),AQ=p(98334),Qd=p.n(AQ),RQ=p(99969),Yd=p.n(RQ),Zd=p(82920);const PQ=30,X3=Mh("blockSettings");class MQ extends Zd.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],lessonId:"",onStep:()=>{}};render(){const{animateBlockEntrance:t,blockId:n,editable:o,initiallyVisible:r,isLearner:a,items:i,labels:c,lessonId:l,onStep:d,settings:h,enableVideoPlaybackSpeed:m}=this.props,{entranceAnimation:f,accordionBehavior:v="keepOpen"}=h,C=X()("blocks-accordion",{"blocks-accordion--no-animation":!f});return(0,s.jsx)(we,{className:C,"data-block-id":n,children:(0,s.jsx)(Be,{animateBlockEntrance:t,duration:.75,initiallyVisible:r,isLearner:a,children:(0,s.jsx)("div",{className:"blocks-accordion__container",children:(0,s.jsx)("div",{className:"blocks-accordion__row",children:(0,s.jsx)("div",{className:"blocks-accordion__col",children:(0,s.jsx)(VQ,{blockId:n,editable:o,enableVideoPlaybackSpeed:m,items:i,keepOpen:v==="keepOpen",labels:c,lessonId:l,onStep:d,settings:h})})})})})})}}const OQ={isOpen:!1,isActive:!1},BQ=e=>(t,{id:n})=>Object.assign({},t,{[n]:e[n]||OQ}),q3=(e,t)=>t.reduce(BQ(e),{}),DQ=(e,t)=>(n,o)=>{const r=e==o,a=r?!n.isOpen:n.isOpen,i=r&&!n.isOpen;return{isOpen:t?a:i,isActive:r}},FQ=e=>(t,n)=>{const o=n==e;return{isOpen:o,isActive:o}},HQ=e=>(t,n)=>({isOpen:n==e,isActive:t.isActive});class $Q extends Zd.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],keepOpen:!1,lessonId:"",onStep:()=>{}};constructor(t){super(t);const{items:n}=this.props;this.state={itemStatusMap:q3({},n)},this.handleNavtoTab=this.handleNavtoTab.bind(this)}componentDidMount(){window.addEventListener(Ue,this.handleNavtoTab)}componentWillUnmount(){window.removeEventListener(Ue,this.handleNavtoTab)}handleNavtoTab(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;if(n===this.props.blockId){const r=this.props.items.findIndex(({id:h})=>h===o),{items:a,onStep:i}=this.props,{itemStatusMap:c}=this.state,l=a[r].id,d=FQ(l);this.setState({itemStatusMap:Cs()(d,c)}),open&&i(a[r])}}UNSAFE_componentWillReceiveProps(t){const n=t.items,o=Hn()(n)!==Hn()(this.props.items);!t.keepOpen&&this.props.keepOpen?this.updateMapForOneAtATimePreference():o&&this.rebuildItemStatusMap(n)}updateMapForOneAtATimePreference(){const{itemStatusMap:t}=this.state,{items:n}=this.props,o=jQ()(a=>t[a.id].isOpen,n);if(!o)return;const r=HQ(o.id);this.setState({itemStatusMap:Cs()(r,t)})}rebuildItemStatusMap(t){const n=this.state.itemStatusMap;this.setState({itemStatusMap:q3(n,t)})}handleItemClick(t){const{items:n,keepOpen:o,onStep:r}=this.props,{itemStatusMap:a}=this.state,i=n[t].id,c=DQ(i,o);this.setState({itemStatusMap:Cs()(c,a)}),open&&r(n[t])}render(){const{items:t,settings:n,editable:o,labels:r,lessonId:a,blockId:i,enableVideoPlaybackSpeed:c}=this.props,{itemStatusMap:l}=this.state,{zoomOnClick:d}=n,h=Object.values(l)?.find(m=>m.isOpen)?"open":"closed";return(0,s.jsx)("div",{className:"blocks-accordion__wrapper","data-accordion-status":h,children:t.map((m,f)=>(0,s.jsx)(_Q,{blockId:i,disableZoom:!d,editable:o,focused:l[m.id].isActive,index:f,item:{...m,enableVideoPlaybackSpeed:c},labels:r,lessonId:a,onClick:this.handleItemClick.bind(this,f),open:l[m.id].isOpen},m.id))})}}const VQ=X3($Q);class zQ extends Zd.Component{static get defaultProps(){return{editable:!1,getL10nValue:()=>{},onClick:()=>{},lessonId:"",blockId:"",open:null}}id;content;constructor(t){super(t),this.id=Qd()(),this.toggle=this.toggle.bind(this),this.renderDescription=this.renderDescription.bind(this),this.renderTitle=this.renderTitle.bind(this)}componentDidUpdate(t){if(!this.props.open)return;const n=this.content;if(n&&(n.classList.add("blocks-accordion__content--visible"),!t.open&&this.props.open)){const o=n.parentElement,r=o?.getBoundingClientRect()?.top,a=r!=null&&r>0&&r<window.innerHeight,i=jn()?"instant":"smooth";a||o.scrollIntoView({behavior:i,block:"start"})}}toggle(t){const{blockId:n,index:o}=this.props,r=xe.playerId,a=new RegExp(`-${o}(?:-.+)?$`);open&&r&&r.includes(n.toString())&&a.test(r)&&xe.pause(),this.props.onClick(),t.preventDefault()}renderTitle(t){const{title:n}=this.props.item;return(0,s.jsx)(Ie,{className:"blocks-accordion__title",id:t,value:n})}renderDescription(t){const{description:n=""}=this.props.item;return(0,s.jsx)(Ge,{className:"blocks-accordion__description",value:n||""},t)}render(){const{blockId:t,blockSettings:n,editable:o,disableZoom:r,getL10nValue:a,index:i,item:c,focused:l,labels:d,lessonId:h,open:m,renderDescription:f=this.renderDescription,renderTitle:v=this.renderTitle}=this.props,{settings:C={},enableVideoPlaybackSpeed:g}=c,x=a(c.media)??{},b=gs(x,n.audioPosition),L=Object.assign({},C,{disableZoom:r,fullEmbed:!0}),S=n?.backgroundType===se.ACCENT||n?.backgroundType===se.IMAGE,y=X()("blocks-accordion__item",{"blocks-accordion__item--closed":!m}),T=X()("blocks-accordion__header",{"blocks-accordion__header--editing":o,"brand--border":m&&l&&!S}),k=X()("blocks-accordion__content",{"blocks-accordion__content--will-enter":m,"brand--border":m&&l&&!S}),I=`title-${this.id}`,E=`panel-${this.id}`,w=n?.headingLevel,A=w?`h${w}`:"h2";let N=(0,s.jsxs)("button",{"aria-controls":E,"aria-expanded":m,className:T,onClick:this.toggle,onKeyDown:!o&&f2(this.toggle)||void 0,type:"button",children:[v(I),(0,s.jsx)("span",{className:"blocks-accordion__toggler-wrap",children:(0,s.jsx)(ie,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]});return o&&(N=(0,s.jsxs)("div",{className:T,children:[v(I),(0,s.jsx)("button",{"aria-controls":E,"aria-expanded":m,"aria-label":m?"Close":"Open",className:"blocks-accordion__toggler-wrap",onClick:this.toggle,type:"button",children:(0,s.jsx)(ie,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]})),(0,s.jsxs)(_t,{className:y,tag:"section",children:[(0,s.jsx)("div",{className:"blocks-accordion__header-wrap",children:(0,s.jsx)(A,{children:N})}),(0,s.jsx)("section",{"aria-labelledby":I,className:k,id:E,ref:R=>{this.content=R},children:b.renderOrder.map((R,M)=>{if(R==="text")return f(`text-${M}`);const P={blockId:t,hasPadding:!1,imageMaxHeight:1e3,item:c,labels:d,lessonId:h,enableVideoPlaybackSpeed:g,opts:L,shouldPause:!m},j=J3(x),O=j==="image-with-audio",B=O?"left":"center",H={audio:{media:b.audioOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-audio`,className:"blocks-accordion__audio"},image:{media:b.imageOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-image`,className:X()(`blocks-accordion__${j}`,{[`blocks-accordion__${j}--${B}`]:O})},video:{media:b.videoOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-video`,className:X()(`blocks-accordion__${j}`,{[`blocks-accordion__${j}--${B}`]:O})},embed:{media:b.embedOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-embed`,className:X()(`blocks-accordion__${j}`,{[`blocks-accordion__${j}--${B}`]:O})},overlay:{media:x,isOverlayAudio:!0,index:`${t}-${i}-overlay`,className:X()(`blocks-accordion__${j}`,{[`blocks-accordion__${j}--${B}`]:O})}}[R];if(!H)return null;const{className:$,...W}=H;return(0,s.jsx)("div",{className:X()($,{"audio-on-top":this.props.blockSettings.audioPosition==="top"}),children:(0,s.jsx)("div",{className:"blocks-accordion__figure",children:(0,s.jsx)(Qt,{...P,...W})})},`${R}-${M}`)})})]})}}const _Q=X3(st(e=>(0,s.jsx)(zQ,{...e}))),J3=e=>{const{image:t,embed:n,video:o,audio:r}=e;return t&&!r?"image":n&&!r?"embed":o?"video":r&&!t&&!n?"audio":t&&r?"image-with-audio":r&&n?"audio-and-embed":"image"};class UQ extends Zd.Component{static get defaultProps(){return{items:[],activeIndex:0,getL10nValue:()=>{},lessonId:"",blockId:"",blockSettings:{},onStep:Function.prototype}}tabs;id;tabResize;tabScroll;arrowNextEl;arrowPrevEl;container;tabControls;tabsHeaderEl;constructor(t){super(t),this.renderDescription=this.renderDescription.bind(this);const n=this.props.activeIndex;this.state={activeIndex:n,activeTouch:!1,activeMouse:!1},this.tabs=[],this.id=Qd()(),this.handleNavtoTab=this.handleNavtoTab.bind(this)}componentDidMount(){this.handleControls(),window.addEventListener("resize",this.tabResize=Yd()(this.handleControls.bind(this),100)),window.addEventListener(Ue,this.handleNavtoTab),this.tabsHeaderEl?.addEventListener("scroll",this.tabScroll=Yd()(this.handleControls.bind(this),50))}handleNavtoTab(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;n===this.props.blockId&&(this.tabsHeaderEl.scrollIntoView({behavior:"smooth",block:"start"}),this.setState({activeIndex:this.props.items.findIndex(({id:r})=>r===o)},()=>{ff(this.tabsHeaderEl,"start")||this.tabsHeaderEl.scrollIntoView({behavior:"instant",block:"start"})}))}componentDidUpdate(){this.handleControls()}componentWillUnmount(){this.tabsHeaderEl?.removeEventListener("scroll",this.tabScroll),window.removeEventListener("resize",this.tabResize),window.removeEventListener(Ue,this.handleNavtoTab)}setActive(t){this.setState({activeIndex:t});const{blockId:n}=this.props,o=xe.playerId;this.state.activeIndex!=t&&o&&o.includes(n.toString())&&xe.pause(),this.props.onStep?.(this.props.items[t])}handleControls(){const{isRTL:t}=this.props;this.tabsHeaderEl.offsetWidth===this.tabsHeaderEl.scrollWidth?(this.arrowPrevEl.classList.add("hidden"),this.arrowNextEl.classList.add("hidden"),this.tabControls.classList.add("start"),this.tabControls.classList.add("end")):(this.tabsHeaderEl.scrollLeft===0?(this.arrowPrevEl.classList.add("hidden"),this.tabControls.classList.add("start")):(this.arrowPrevEl.classList.remove("hidden"),this.tabControls.classList.remove("start")),this.tabsHeaderEl.scrollLeft===(this.tabsHeaderEl.scrollWidth-this.tabsHeaderEl.offsetWidth)*(t?-1:1)?(this.arrowNextEl.classList.add("hidden"),this.tabControls.classList.add("end")):(this.arrowNextEl.classList.remove("hidden"),this.tabControls.classList.remove("end")))}handleMouseEnter(){this.state.activeTouch||this.setState({activeMouse:!0})}handleMouseLeave(){this.setState({activeMouse:!1})}handleTouchStart(){this.setState({activeTouch:!0})}scrollTabs(t){const{isRTL:n}=this.props,o=this.tabsHeaderEl.offsetWidth,r=this.tabsHeaderEl.scrollLeft,i=(t==="next"?n?Z3():Ym():n?Ym():Z3())(r,o*.8);this.tabsHeaderEl.scrollTo({left:i,behavior:"smooth"})}arrowPrevInset(t){const n=this.arrowPrevEl.getBoundingClientRect(),o=n.right-t,r=n.left-t;return o+r}focusTab(t){t.currentTarget?.scrollIntoView({behavior:"smooth",block:"nearest"})}handleTabKeyDown(t,n){const{isRTL:o}=this.props;let r=!1,a;Ks(n)?(r=!0,a=o?t+1>this.tabs.length-1?0:t+1:t-1>=0?t-1:this.tabs.length-1):Qs(n)&&(r=!0,a=o?t-1>=0?t-1:this.tabs.length-1:t+1>this.tabs.length-1?0:t+1),r&&n.preventDefault(),a!=null&&(this.tabs[a]?.focus(),this.setActive(a))}renderHeader(t,n){const{activeIndex:o,activeTouch:r,activeMouse:a}=this.state,i=this.tabsHeaderEl&&this.tabsHeaderEl.scrollWidth>this.tabsHeaderEl.clientWidth,c=X()("blocks-tabs__header-wrap",{touch:r,mouse:a&&i});return(0,s.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),onTouchStart:this.handleTouchStart.bind(this),children:[(0,s.jsx)("div",{className:"blocks-tabs__header",ref:l=>{this.tabsHeaderEl=l},role:NK,children:t.map(({title:l},d)=>{const h=t.length===1||d===o,m=t.length>1&&d+1===o,f=t.length>1&&d-1===o,v=X()("blocks-tabs__header-item",{"brand--color":h&&!n,"blocks-tabs__header-item--active":h,"blocks-tabs__header-item--before-active":m,"blocks-tabs__header-item--after-active":f}),C=`tab-${this.id}-${d}`,g=`tabpanel-${this.id}-${d}`;return(0,s.jsx)("button",{"aria-controls":g,"aria-selected":h,className:v,id:C,onClick:this.setActive.bind(this,d),onFocus:this.focusTab.bind(this),onKeyDown:this.handleTabKeyDown.bind(this,d),ref:x=>{this.tabs[d]=x},role:"tab",tabIndex:h?void 0:-1,type:"button",children:(0,s.jsx)(Ie,{value:l})},C)})}),(0,s.jsxs)("div",{className:"blocks-tabs__controls",ref:l=>{this.tabControls=l},children:[(0,s.jsx)("div",{"aria-hidden":"true",className:"blocks-tabs__arrow blocks-tabs__arrow--prev brand--background",onClick:this.scrollTabs.bind(this,"previous"),ref:l=>{this.arrowPrevEl=l},children:(0,s.jsx)(ie,{className:"blocks-tabs__arrow-icon",name:"chevron-right-solid"})}),(0,s.jsx)("div",{"aria-hidden":"true",className:"blocks-tabs__arrow blocks-tabs__arrow--next brand--background",onClick:this.scrollTabs.bind(this,"next"),ref:l=>{this.arrowNextEl=l},children:(0,s.jsx)(ie,{className:"blocks-tabs__arrow-icon blocks-tabs__arrow-icon--next",name:"chevron-right-solid"})})]})]})}renderDescription({description:t}){return(0,s.jsx)(Ge,{className:"blocks-tabs__description",value:t})}renderItem(t,n,o){const{blockId:r,getL10nValue:a,labels:i,lessonId:c,renderDescription:l=this.renderDescription}=this.props,{activeIndex:d}=this.state,h=d===n,{settings:m={},enableVideoPlaybackSpeed:f}=t,v=a(t.media)??{},C=gs(v,this.props.settings.audioPosition,!1),g=X()("blocks-tabs__content-item",{"blocks-tabs__content-item--active":h}),x=Object.assign({},m,{disableZoom:o,fullEmbed:!0}),b=`tabpanel-${this.id}-${n}`,L=`tab-${this.id}-${n}`,S=J3(v),y=S==="image-with-audio",T=S==="audio-and-embed",k=y?v?.image?.align:"left",I=T?"embed-border":void 0;return(0,s.jsx)("div",{"aria-labelledby":L,className:g,id:b,role:jK,tabIndex:h?0:void 0,children:C.renderOrder.map((E,w)=>{if(E==="text")return(0,s.jsx)("div",{className:"blocks-tabs__description",children:l(t)},`text-${w}`);const A={blockId:r,embedClass:I,hasPadding:!1,imageMaxHeight:1e3,item:t,labels:i,lessonId:c,enableVideoPlaybackSpeed:f,opts:x,shouldPause:!h},R={audio:{media:C.audioOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${n}-audio`,className:"blocks-tabs__audio"},image:{media:C.imageOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${n}-image`,className:X()(`blocks-tabs__${S}`,{[`blocks-tabs__${S}--${k}`]:y})},video:{media:C.videoOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${n}-video`,className:X()(`blocks-tabs__${S}`,{[`blocks-tabs__${S}--${k}`]:y})},embed:{media:C.embedOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${n}-embed`,className:X()(`blocks-tabs__${S}`,{[`blocks-tabs__${S}--${k}`]:y})},overlay:{media:v,isOverlayAudio:!0,index:`${r}-${n}-overlay`,className:X()(`blocks-tabs__${S}`,{[`blocks-tabs__${S}--${k}`]:y})}}[E];if(!R)return null;const{className:M,...P}=R;return(0,s.jsx)("div",{className:X()(M,{"audio-on-top":this.props.settings.audioPosition==="top"}),children:(0,s.jsx)("div",{className:"blocks-tabs__figure",children:(0,s.jsx)(Qt,{...A,...P})})},`${E}-${w}`)})},b)}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,items:r,settings:a,enableVideoPlaybackSpeed:i}=this.props,{backgroundType:c,cardMode:l,entranceAnimation:d,zoomOnClick:h}=a,m=X()("blocks-tabs",{"blocks-tabs--no-animation":!d}),f=r.length>0?r.slice(0,PQ):[],v=l===$n.TRANSPARENT&&(c===se.ACCENT||c===se.IMAGE),C=X()("blocks-tabs__container",{"blocks-tabs--single":f.length===1});return(0,s.jsx)(we,{className:m,children:(0,s.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{className:C,children:(0,s.jsx)("div",{className:"blocks-tabs__row",children:(0,s.jsx)("div",{className:"blocks-tabs__col",children:(0,s.jsx)("div",{className:"blocks-tabs__wrapper",ref:g=>{this.container=g},children:(0,s.jsxs)(_t,{children:[this.renderHeader(f,v),(0,s.jsx)("div",{className:"blocks-tabs__content",children:f.map((g,x)=>this.renderItem({...g,enableVideoPlaybackSpeed:i},x,!h))})]})})})})})})})}}const GQ=jf(st(e=>(0,s.jsx)(UQ,{...e}))),WQ=bt()(null,["payload","result"]),KQ=e=>{if(e.meta?.thumbnail)return`${e.contentPrefix}/${e.meta.thumbnail}`},QQ=e=>e.meta?.version,ey=e=>e.src??null,YQ=e=>e.processing,ZQ=Hs()(["payload","result","completion"]),XQ=bt()(!1,["payload","result","score"]),qQ=kl()((e,t)=>{if(!t)return!1;const{majorLimit:n,minorLimit:o}=e,[r,a]=t.split("."),i=parseInt(r)===n&&Number(a)>=o;return Number(r)>n||i}),JQ={mobile:"?forcemobile=1&devicepreview=1&phone=1&rise=true",tablet:"?forcemobile=1&devicepreview=1&rise=true"},eY=e=>{const t=ko()(e.split("-"));return JQ[t]},tY=qQ({majorLimit:3,minorLimit:13}),nY=(e,t,n,o)=>{const r=t&&eY(n),a=r?`${e}${r}`:`${e}?rise=true`;if(o){const i=a.includes("?")?"&":"?";return`${a}${i}locale=${o}`}return a},ty="about:blank",sY="https://example.invalid",ny=new Set(["http:","https:"]),sy=e=>{if(e)try{const t=new URL(e);return ny.has(t.protocol)?t.href:void 0}catch{return}},oY=()=>sy(Ne("CDN_USER_CONTENT_URI"))??sy(window.location.origin)??sY,oy=e=>{try{return ny.has(new URL(e,oY()).protocol)}catch{return!1}},ry=e=>{const t=Cn(e);return typeof t=="string"?t:""},rY=e=>{const t=ry(e);if(!t||t===ty||!oy(t))return;const n=ry(mt(t));return n&&n!==ty&&oy(n)?n:void 0};var aY=p(82920);class iY extends aY.Component{constructor(t){super(t),this.state={fullscreen:!1,reopenMenu:!1},this.iframe=null,this.canFullscreen=this.canFullscreen.bind(this),this.handleCourseUpdate=this.handleCourseUpdate.bind(this),this.handleFullscreenEnter=this.handleFullscreenEnter.bind(this),this.handleFullscreenExit=this.handleFullscreenExit.bind(this),this.handleMessages=this.handleMessages.bind(this),this.renderItem=this.renderItem.bind(this)}iframe;static get defaultProps(){return{getL10nValue:()=>{},isLesson:!1,onStep:Function.prototype,hasManySlBlocks:Function.prototype,previewType:""}}UNSAFE_componentWillMount(){window.addEventListener("message",this.handleMessages)}componentWillUnmount(){window.removeEventListener("message",this.handleMessages)}componentDidMount(){const{getL10nValue:t,items:n,onStep:o}=this.props,r=ko()(n),a=t(r?.media)?.storyline??{},i=QQ(a);tY(i)||o(r)}canFullscreen(t){const{blockId:n,hasManySlBlocks:o}=this.props,{windowName:r}=t;return n===r||!o()}handleMessages(t){const{data:n}=t,{type:o}=n,r={"fullscreen:enter":this.handleFullscreenEnter,"fullscreen:exit":this.handleFullscreenExit,"course:update":this.handleCourseUpdate}[o];r&&r(n)}handleCourseUpdate(t){const{items:n,onFinishStoryline:o,onStep:r,blockId:a}=this.props,i=ko()(n),{windowName:c}=t;if(a===c&&ZQ(t)){const{score:l,success:d}=WQ(t);if(XQ(t)){const h=l.scaled*100;o?.(a,d,!0,h)}else o?.(a,!0,!1);r(i)}}handleFullscreenEnter(t){const{menuOpen:n,handleStorylineFullscreen:o}=this.props;this.canFullscreen(t)&&(n&&o(!0),this.setState({fullscreen:!0,reopenMenu:n}))}handleFullscreenExit(t){const{handleStorylineFullscreen:n}=this.props,{reopenMenu:o}=this.state;this.canFullscreen(t)&&(o&&n(!1),this.setState({fullscreen:!1,reopenMenu:!1}))}render(){const{animateBlockEntrance:t,getL10nValue:n,initiallyVisible:o,isLesson:r,isLearner:a,isOnlyBlockInStep:i,items:c,labels:{a11yBlockStoryline:l},settings:d,takingSnapshot:h}=this.props,m=ko()(c),f=n(m?.media)?.storyline??{},{mediaWidth:v="0"}=d,C=i?{}:{display:r&&!ey(f)?"none":"block"},g=X()("blocks-storyline__wrapper",{"blocks-storyline__wrapper--small":v==="0","blocks-storyline__wrapper--medium":v==="1","blocks-storyline__wrapper--full":v==="2","blocks-storyline__wrapper--snapshot":h});return(0,s.jsx)(we,{className:"blocks-storyline",style:C,children:(0,s.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:o,isLearner:a,children:(0,s.jsx)("div",{"aria-label":l,className:g,role:"group",children:h?this.renderThumbnail(f):this.renderStorylineBlock(f)})})})}renderStorylineBlock(t){return YQ(t)?this.renderProcessing():ey(t)?this.renderItem(t):this.renderEmpty()}renderThumbnail(t){const n=KQ(t),o=`${Ne("CDN_USER_CONTENT_URI")}/${n}`;return(0,s.jsx)("img",{alt:"Thumbnail",src:o})}renderEmpty(){const{renderEmpty:t}=this.props;return typeof t=="function"?t():null}renderItem(t){const{fullscreen:n}=this.state,{blockId:o,currentLocale:r,isLesson:a,previewType:i,settings:c}=this.props,{cornerRadius:l}=c,{src:d,meta:h,title:m}=t,{player:f}=h,v=nY(d,a,i,r),C=rY(v),x={paddingBottom:`${f.height/f.width*100}%`,...l!=null&&{"--corner-radius":`${Number(l)}px`}},b=X()("blocks-storyline__item__iframe",{"blocks-storyline__item__iframe--fullscreen":n});return(0,s.jsx)("div",{className:"blocks-storyline__item",style:x,children:(0,s.jsx)("iframe",{allowFullScreen:!0,allowtransparency:"true",className:b,loading:"lazy",name:o.toString(),ref:L=>{this.iframe=L},src:C,title:m})})}renderProcessing(){const{renderProcessing:t}=this.props;return typeof t=="function"?t():null}}const cY=T7(st(iY));var lY=p(27447),Df=p.n(lY);const ay=":focus{outline: none}",dY=":focus:not(:focus-visible){outline: none}",iy="focus-ring-style",Ff=()=>document.getElementById(iy)||uY(),uY=()=>{const e=document.createElement("style");return e.id=iy,document.head.appendChild(e),e},hY=0,mY=-1,fY=e=>{const t=Ff();document.addEventListener("mousedown",()=>{setTimeout(()=>{t.innerHTML=ay},0),e?.(!1)}),window.addEventListener("keydown",n=>{pY(n,e)})},pY=(e,t)=>{const n=e.target,o=Ff();(Il(e)||Ti(e)&&!n.classList.contains("ignore-prefers"))&&(o.innerHTML="",t?.(!0))},cy=({focusVisible:e}={})=>Ff().innerHTML=e?dY:ay,gY=e=>e?hY:mY,ly=({list:e,index:t})=>{t>=0&&t<Hn()(e)&&e[t].focus()},vY=({list:e,currentIndex:t})=>{const n=il()(t||0),o=n<Hn()(e)?n:0;return ly({list:e,index:o}),o},CY=({list:e,currentIndex:t})=>{const n=Df()(t||Hn()(e));return ly({list:e,index:n}),n};var dy=p(82920);const Xd=V("blocks-button"),uy=Q8,xY=({description:e})=>(0,s.jsx)(Ie,{className:Xd("description"),value:e}),bY=({color:e,destination:t,editBlock:n,handleNavigate:o,isEditable:r,label:a,type:i})=>{const c=fC(),l=Fe()?.externalLinksDisabled,d=Fe()?.theme,h=gi(),{mode:m}=(0,je.g)(),f=tn(),v=wt(),C=Re(t),g=(0,kr.htmlDecode)(Tn(Re(a))),x=i==="email",b=i==="exit-course",L=i==="lesson",S=i==="relative-url",y=Xd("button"),T=!e||e===""||e===h,k=e??h,I={},E=pC(h),w=T&&d?.accentContrast===Te.AUTO?Te.AUTO:E,A=f?.buttonColorContrast??w,N=f?.buttonRadius??null,R=f?.buttonWidth??null,M=$t({backgroundColor:k,contrast:A});Object.assign(I,{...!T&&{"--color-button-bg":k},...!T&&{"--color-button-text":M},...!T&&{"--color-button-border":"transparent"},...N!=null&&{"--radius-button":`${Number(N)}px`},...R!=null&&{"--width-button":`${Number(R)}rem`}});const P=l&&_n(C),{handleMouseEnter:j,handleMouseLeave:O,handleFocus:B,handleBlur:D}=nd(),H=dy.useId(),$=(0,u.useCallback)(()=>{if(r)n();else{if(P)return;if(b)return Up()}},[n,P,r,b]),W=(0,u.useCallback)(()=>{o(C)},[C,o]);if(r||P||b){const U=(0,s.jsx)("button",{"aria-label":g,className:y,id:P?H:void 0,onBlur:P?()=>D(H):void 0,onClick:$,onFocus:P?()=>B(H):void 0,onKeyDown:f2($),onMouseEnter:P?()=>j(H):void 0,onMouseLeave:P?()=>O(H):void 0,style:I,tabIndex:0,type:"button",children:g});return P?(0,s.jsxs)(s.Fragment,{children:[U,(0,s.jsx)(sd,{anchorId:H})]}):U}else if(L){const U=C?In(C,m):"#";return(0,s.jsx)(nn,{"aria-label":g,className:y,onClick:W,style:I,to:U,children:g})}else{const U=S?C:Cn(C),Z=x?`mailto:${C}?subject=${c}`:U,ne=Ys.isIphoneSafari?"_top":"_self",Q=x?ne:"_blank",z=Q==="_blank",F=z?"noopener noreferrer nofollow":void 0,_=v?.a11yNoticeLinkNewTab||"(opens in a new tab)",K=z?`${g} ${_}`:g;return(0,s.jsx)("a",{"aria-label":K,className:y,href:Z,rel:F,style:I,tabIndex:0,target:Q,children:g})}},hy=e=>{const{animateBlockEntrance:t,editable:n,editBlock:o=()=>{},handleNavigate:r,initiallyVisible:a,isLearner:i,items:c=[],renderDescription:l=xY,settings:d}=e,{buttonAlignment:h="right",buttonColor:m,buttonShowDescription:f=!0,buttonStack:v,entranceAnimation:C}=d,g=Xd(null,{"no-animation":!C,description:f==!0,center:h==="center",left:h==="left",right:h==="right",rounded:uy==="rounded"}),x=c?.map(({id:b,description:L,...S})=>{const y=(0,s.jsx)(bY,{...S,color:m,editBlock:o,handleNavigate:r,isEditable:n}),T=f&&l({id:b,description:L});return(0,s.jsx)("section",{className:Xd("container"),children:h==="left"&&f?(0,s.jsxs)(s.Fragment,{children:[y,T]}):(0,s.jsxs)(s.Fragment,{children:[T,y]})},b)})??null;if(v){const{paddingBottom:b,paddingTop:L}=d,S={...L!=null&&{paddingTop:`${Number(L)}rem`},...b!=null&&{paddingBottom:`${Number(b)}rem`}};return(0,s.jsx)("div",{className:g.toString(),style:S,children:x})}return(0,s.jsx)(we,{className:g.toString(),children:(0,s.jsx)(Be,{animateBlockEntrance:t,animateIn:"fadeIn",initiallyVisible:a,isLearner:i,children:(0,s.jsx)("div",{className:"blocks-button",children:x})})})},yY=hy;class SY extends dy.Component{renderButtonDelegate;constructor(t){super(t),this.renderButtonDelegate=this.renderButton.bind(this)}static get defaultProps(){return{items:[],lessonId:"",blockId:"",editBlock:()=>{}}}renderButton(t,n){const{blockId:o,editable:r,editBlock:a,handleNavigate:i,isLearner:c,lessonId:l,initiallyVisible:d}=this.props;return(0,s.jsx)(hy,{animateBlockEntrance:!1,blockId:o,editable:r,editBlock:a,handleNavigate:i,initiallyVisible:d,isLearner:c,items:[t],lessonId:l,settings:n,type:"right"})}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,items:r,settings:a,renderButton:i=this.renderButtonDelegate}=this.props,{entranceAnimation:c,buttonShowDescription:l=!0,buttonAlignment:d="right",buttonSpacing:h=3}=a,m=X()("blocks-buttonstack",{"blocks-buttonstack--no-animation":!c,"blocks-button--description":l==!0,"blocks-button--center":d==="center","blocks-button--left":d==="left","blocks-button--right":d==="right","blocks-button--rounded":uy==="rounded"});return(0,s.jsx)(we,{className:m,children:(0,s.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:r.map((f,v)=>{const C=v===0,g={buttonColor:a.buttonColor||this.props.color,buttonStyle:a.buttonStyle,buttonStack:!0,buttonShowDescription:l,buttonAlignment:d,...C?{}:{paddingTop:h}};return(0,s.jsx)(u.Fragment,{children:i(f,g)},f.id)})})})}}var LY=p(92496),TY=p.n(LY);const qd=V("block-video");function kY({item:e}){const t=at(),{media:n}=e,o=t(n)??{},{customVideo:r={},tmp:a={},video:i={}}=o,c="poster"in i?i:{...i,...r},l=a.video&&"poster"in a.video?a.video:void 0,{poster:d}=Xa()?c:l||c,h=d?mt(d):void 0;return(0,s.jsxs)("div",{className:qd("poster-container"),children:[(0,s.jsx)(vn,{alt:"Video Poster",className:qd("poster"),src:h}),(0,s.jsx)("div",{className:qd("play-overlay"),children:(0,s.jsxs)("svg",{className:qd("play-icon"),fill:"currentColor",height:"80",viewBox:"0 0 24 24",width:"80",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",fill:"rgba(0,0,0,0.6)",r:"12"}),(0,s.jsx)("polygon",{fill:"white",points:"10,8 10,16 16,12"})]})})]})}const my=V("block-video");function IY({mediaWidth:e}){const t=my("item",{small:e==="0",medium:e==="1",full:e==="2"});return(0,s.jsx)("div",{className:t,children:(0,s.jsx)("div",{className:my("placeholder")})})}const EY=Jn()("partner-content-block-card__"),fy=e=>{const{backgroundColor:t,blockId:n,partnerContent:o}=e,r=Fe(),{id:a,tenantId:i}=r??{},{data:c,type:l}=o,{authors:d,bookImage:h,bookTitle:m,buyLink:f,internalId:v,nbicLink:C}=c,g={blockId:n,courseId:a,partnerContentId:v,tenantId:i,contentSubtype:l};return(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"More Info"}),(0,s.jsxs)("ol",{className:"partner-content-block-card",role:"list",children:[(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(wx,{authors:d,backgroundColor:t,block:!0,bookImage:h,bookTitle:m,buyLink:f,trackingInfo:g})}),(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)("div",{className:EY("divider")})}),(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(Ax,{backgroundColor:t,block:!0,link:C,trackingInfo:g})})]})]})};var Hf=p(82920);const Jd=V("block-video"),NY={"--ov-width":"100%","--ov-max-height":"none"},jY={"--ov-height":"100%","--ov-max-height":"none"};function wY({audioVideoPlayhead:e,backgroundColor:t,blockId:n,blockPartnerContent:o,blockPartnerContentExists:r,captions:a,cornerRadius:i,currentLocale:c,dataL10nId:l,enableVideoPlaybackSpeed:d,forwardSeekRestricted:h,id:m,isLoaded:f,item:v,lessonId:C,loadMedia:g,media:x,mediaWidth:b,onLoad:L,onProgressChanged:S,poster:y,recordMediaPlayheadPosition:T,renderCaption:k,renderPostVideoSlot:I,subtitle:E,type:w,videoKey:A,videoSrc:N}){const R=b==="2",[M,P]=Hf.useState(null),j=Jd("item",{small:b==="0",medium:b==="1",full:R}),O=Hf.useCallback(({player:H})=>{const $=H.containerElement?.querySelector("video");if($){const W=$.videoWidth/$.videoHeight>=1.7777777777777777;P(W?"landscape":"portrait")}L?.({player:H})},[L]),B=M==="landscape"?NY:M==="portrait"?jY:void 0,D=Hf.useCallback(H=>{const $=Jd("caption",{visible:f}).toString();return(0,s.jsx)(Ge,{className:$,value:H.caption})},[f]);return(0,s.jsxs)("div",{className:j,children:[(0,s.jsxs)("figure",{"data-l10n-id":l,children:[(0,s.jsx)("div",{className:Jd("aspect-container"),"data-search-content-ignore":"",children:g&&(0,s.jsx)(If,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:d,canRestrictSeek:h,captions:a,cornerRadius:i,id:`${C}-${n}-${m}-${c}`,media:x,onLoad:O,poster:y,progressChanged:S,recordMediaPlayheadPosition:T,src:N,style:B,subtitle:E,type:A?"video":w},`${C}-${n}-${m}-${c}-${y||""}`)}),f&&(0,s.jsxs)(s.Fragment,{children:[I?.(),(0,s.jsx)("figcaption",{className:Jd("wrapper"),children:(k??D)(v)})]})]}),r&&(0,s.jsx)(fy,{backgroundColor:t,blockId:n,partnerContent:o})]})}const De=V("video-chapters-panel"),py=e=>e.placement==="start"||e.placement==="end",AY=(e,t)=>e.placement==="start"||e.placement==="end"?e.placement:`chapter-${e.time}-${t}`;function gy({activeIndex:e,chapters:t,isGeneratingChapters:n,onCheckpointClick:o,onSeek:r,onAddStartCheckpoint:a,onAddEndCheckpoint:i,overview:c}){const l=(0,u.useRef)(null),d=wt(),{hovered:h,setHovered:m}=w3(),[f,v]=(0,u.useState)(null),C=(0,u.useRef)(new Set);(0,u.useEffect)(()=>{if(c==null)return;const E=c.flatMap(A=>A.checkpoints??[]).map(A=>String(A.markerId)),w=E.filter(A=>!C.current.has(A));C.current=new Set(E),w.length>0&&v(w[w.length-1])},[c]);const[g,x]=(0,u.useState)(()=>new Set),b=(0,u.useCallback)(I=>{x(E=>{const w=new Set(E);return w.has(I)?w.delete(I):w.add(I),w})},[]),L=(0,u.useCallback)(I=>{const E=Number(I.currentTarget.dataset.time);Number.isNaN(E)||r?.(E)},[r]),S=(0,u.useCallback)(I=>{const{markerId:E}=I.currentTarget.dataset;E!=null&&(v(E),o?.(E))},[o]);(0,u.useEffect)(()=>{l.current&&l.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[e]);const y=c!=null,T=c??t,k={};if(y){let I=0;T.forEach((E,w)=>{!py(E)&&!E.isWholeVideoDefault&&(k[w]=++I)})}return T.length===0?n?(0,s.jsxs)("div",{className:De("empty-state"),children:[(0,s.jsx)(Tx,{className:De("empty-state-spinner"),height:24,width:24}),(0,s.jsx)("p",{className:De("empty-state-title"),children:"Generating chapters\u2026"})]}):(0,s.jsxs)("div",{className:De("empty-state"),children:[(0,s.jsx)("i",{className:`fa-regular fa-clapperboard ${De("empty-state-icon")}`}),(0,s.jsx)("p",{className:De("empty-state-title"),children:d?.videoNoChapters||"No chapters yet"}),(0,s.jsx)("p",{className:De("empty-state-body"),children:d?.videoNoChaptersMessage||"Add timestamps in the block settings to organize your video."})]}):(0,s.jsx)("div",{className:De(),children:(0,s.jsx)("ul",{className:De("list"),role:"list",children:T.map((I,E)=>{const w=AY(I,E),A=y&&py(I),N=g.has(w),R=I.checkpoints??[];let M;I.placement==="start"?M=a:I.placement==="end"&&(M=i);const P=`video-outline-row-${w}`;return(0,s.jsxs)("li",{className:De("row",{bookend:A}),ref:E===e?l:void 0,children:[(0,s.jsxs)("div",{className:De("header"),children:[y&&(0,s.jsx)("button",{"aria-controls":P,"aria-expanded":!N,"aria-label":N?"Expand":"Collapse",className:De("disclosure"),onClick:()=>b(w),type:"button",children:(0,s.jsx)(ie,{name:N?"chevron-right":"chevron-down"})}),A?(0,s.jsxs)("div",{className:De("item",{bookend:!0}),children:[(0,s.jsx)("span",{"aria-hidden":"true",className:De("thumbnail",{bookend:!0}),children:(0,s.jsx)(ie,{name:I.placement==="end"?"flag":"play-solid"})}),(0,s.jsx)("span",{className:De("info"),children:(0,s.jsx)("span",{className:De("title"),children:I.title})}),I.subtitle!=null&&(0,s.jsx)("span",{className:De("bookend-subtitle"),children:I.subtitle})]}):(0,s.jsxs)("button",{"aria-current":E===e?"true":void 0,className:De("item",{active:E===e,highlighted:Tf(h,"chapter",I.time)}),"data-chapter-button":!0,"data-time":I.time,onBlur:()=>m(null),onClick:y?()=>b(w):L,onFocus:()=>m({kind:"chapter",time:I.time}),onMouseEnter:()=>m({kind:"chapter",time:I.time}),onMouseLeave:()=>m(null),type:"button",children:[(0,s.jsxs)("span",{className:De("thumbnail"),children:[(I.thumbnailStatus==null||I.thumbnailStatus==="done")&&I.thumbnail&&(0,s.jsx)("img",{alt:"",className:De("thumbnail-img"),src:I.thumbnail}),I.thumbnailStatus==="processing"&&(0,s.jsx)("span",{"aria-hidden":"true",children:(0,s.jsx)(Tx,{className:De("thumbnail-spinner"),height:30,width:30})}),!y&&(0,s.jsx)("span",{className:De("timestamp"),children:nc(I.time)})]}),(0,s.jsxs)("span",{className:De("info"),children:[k[E]!=null&&(0,s.jsxs)("span",{className:De("eyebrow"),children:["Chapter ",k[E]]}),(0,s.jsx)("span",{className:De("title"),children:I.title})]}),y&&(0,s.jsx)("span",{className:De("chapter-timestamp"),children:nc(I.time)})]})]}),(0,s.jsxs)("div",{className:De("body"),hidden:N,id:P,children:[R.length>0&&(0,s.jsx)("ul",{className:De("checkpoints"),role:"list",children:R.map(j=>(0,s.jsx)("li",{children:(0,s.jsxs)("button",{className:De("checkpoint",{active:j.markerId===f,highlighted:!A&&Tf(h,"checkpoint",j.timeSeconds)}),"data-marker-id":j.markerId,onBlur:A?void 0:()=>m(null),onClick:S,onFocus:A?void 0:()=>m({kind:"checkpoint",time:j.timeSeconds}),onMouseEnter:A?void 0:()=>m({kind:"checkpoint",time:j.timeSeconds}),onMouseLeave:A?void 0:()=>m(null),type:"button",children:[(0,s.jsx)("span",{"aria-hidden":"true",className:De("checkpoint-icon"),children:(0,s.jsx)(ie,{name:"location-dot"})}),(0,s.jsxs)("span",{className:De("checkpoint-info"),children:[(0,s.jsx)("span",{className:De("checkpoint-title"),children:j.title}),(0,s.jsx)("span",{className:De("checkpoint-sub"),children:j.blockSummary})]}),!A&&(0,s.jsx)("span",{className:De("checkpoint-timestamp"),children:j.timestamp})]})},j.markerId))}),M&&(0,s.jsxs)("button",{className:De("add-checkpoint"),onClick:M,type:"button",children:[(0,s.jsx)(ie,{name:"plus"}),"Add checkpoint"]})]})]},w)})})})}const RY={allowedTags:["b","i","u","c","ruby","rt","v","lang"],allowedAttributes:{c:["class"],v:["title"],lang:["lang"],ruby:[],rt:[]},disallowedTagsMode:"escape",allowedSchemes:[]};function PY(e){return e.replace(/<c\.([^>]+)>/g,'<c class="$1">').replace(/<\/c\.[^>]*>/g,"</c>").replace(/<v\s+([^>]+)>/g,'<v title="$1">').replace(/<script[^>]*>(.*?)<\/script>/gi,"<!--SCRIPT_START-->$1<!--SCRIPT_END-->").replace(/<iframe[^>]*>(.*?)<\/iframe>/gi,"<!--IFRAME_START-->$1<!--IFRAME_END-->")}function MY(e){return e.replace(/<!--SCRIPT_START-->(.*?)<!--SCRIPT_END-->/g,"$1").replace(/<!--IFRAME_START-->(.*?)<!--IFRAME_END-->/g,"$1").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&amp;/g,"&")}function bn(e,t={}){if(!e)return"";let n;if(t.allowVTTTags!==!1){const o=PY(e),r=Qu()(o,RY);n=MY(r)}else n=Qu()(e,{allowedTags:[],allowedAttributes:{}});return t.preserveWhitespace||(n=n.replace(/\s+/g," ").trim()),n}function uc(){return typeof window<"u"?window.crypto.randomUUID():`cue_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}function OY(e){return e.map(t=>({...t,stableId:t.stableId||uc()}))}function Bo(e){return e?/^(\d{2}:)?\d{2}:\d{2}\.\d{3}\s*-->\s*(\d{2}:)?\d{2}:\d{2}\.\d{3}/.test(e):!1}function vy(e){let t=e.match(/^(\d{2}):(\d{2}):(\d{2})\.(\d{3})$/);if(t){const[,n,o,r,a]=t;return parseInt(n)*36e5+parseInt(o)*6e4+parseInt(r)*1e3+parseInt(a)}if(t=e.match(/^(\d{2}):(\d{2})\.(\d{3})$/),t){const[,n,o,r]=t;return parseInt(n)*6e4+parseInt(o)*1e3+parseInt(r)}throw new Error(`Invalid timestamp format: ${e}`)}function BY(e,t=!1){const n=Math.round(e),o=Math.floor(n/36e5),r=Math.floor(n%36e5/6e4),a=Math.floor(n%6e4/1e3),i=n%1e3;if(t){const c=a.toString().padStart(2,"0");if(o>0){const l=r.toString().padStart(2,"0");return`${o}:${l}:${c}`}else return`${r}:${c}`}return`${o.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}.${i.toString().padStart(3,"0")}`}function Cy(e){const t={};if(!e)return t;const n=e.match(/\S+/g)||[];for(const o of n){const r=o.indexOf(":");if(r>0){const a=bn(o.substring(0,r),{allowVTTTags:!1}),i=bn(o.substring(r+1),{allowVTTTags:!1});t[a]=i}}return t}function DY(e){const t=e.match(/^<v\s+/);if(t){let a=0,i=-1;for(let c=t[0].length;c<e.length;c++)if(e[c]==="<")a++;else if(e[c]===">")if(a===0){i=c;break}else a--;if(i!==-1){const c=e.substring(t[0].length,i).trim(),l=e.substring(i+1).trim();return{speaker:bn(c,{allowVTTTags:!1}),text:l}}}const n=e.match(/^<v>\s*(.*)$/s);if(n)return{text:n[1]};const o=e.match(/^\[([^\]]+)\]:\s*(.*)$/s);if(o)return{speaker:bn(o[1].trim(),{allowVTTTags:!1}),text:o[2]};const r=e.match(/^([^:\n]+):\s*(.*)$/s);if(r&&r[1].length<50){const a=r[1].trim();if(!(/^\d+(\s+\w+)*\s+at\s+\d+$/.test(a)||/^\d{1,2}$/.test(a)||/\d+:\d+/.test(a)||/\bat\s+\d/.test(a)||/\bfrom\s+\d/.test(a)||/\bto\s+\d/.test(a)||/\d+\s*(AM|PM|am|pm)/.test(a)))return{speaker:bn(a,{allowVTTTags:!1}),text:r[2]}}return{text:e}}function $f(e){return bn(e,{preserveWhitespace:!1,allowVTTTags:!0})}function FY(e){const t=bn(e.substring(6).trim(),{allowVTTTags:!1}),n=Cy(t);return{id:n.id,width:n.width,lines:n.lines,regionanchor:n.regionanchor,viewportanchor:n.viewportanchor,scroll:n.scroll,...n}}function HY(e){const t=[...new Set(e.map(n=>n.speaker).filter(Boolean))];return{cueCount:e.length,speakerCount:t.length,speakers:t,lastModified:new Date}}function*$Y(e){const t=e.cues,n=e.totalDuration;for(let o=0;o<t.length;o++){const r=t[o],a=o>0?t[o-1]:void 0,i=o<t.length-1?t[o+1]:void 0,c=a?Math.max(0,r.startTimeMs-a.endTimeMs):r.startTimeMs,l=i?Math.max(0,i.startTimeMs-r.endTimeMs):Math.max(0,n-r.endTimeMs),d=n>0?r.startTimeMs/n*100:0,h=n>0?r.endTimeMs/n*100:0,m=h-d;yield{cue:r,index:o,isFirst:o===0,isLast:o===t.length-1,previousCue:a,nextCue:i,gapBefore:c,gapAfter:l,relativeStartPercent:d,relativeEndPercent:h,relativeWidthPercent:m}}}function bfe(e){return Array.from($Y(e))}function VY(e,t,n,o,r,a,i,c){const l=[],d=/<v\s+([^>]+)>([^<]*)<\/v>/g;let h,m=0;for(;(h=d.exec(e))!==null;){const[g,x,b]=h,L={stableId:uc(),startTime:t,endTime:n,startTimeMs:o,endTimeMs:r,duration:a,text:$f(b.trim()),settings:i,index:0,speaker:bn(x.trim(),{allowVTTTags:!1})};c&&(L.id=c),i.position&&(L.position=i.position),i.align&&(L.align=i.align),i.line&&(L.line=i.line),i.size&&(L.size=i.size),i.vertical&&(L.vertical=i.vertical),i.region&&(L.region=i.region),l.push(L),m=h.index+g.length}const f=/<v\s+([^>]+)>([^<]*)$/,C=e.substring(m).match(f);if(C){const[,g,x]=C,b={stableId:uc(),startTime:t,endTime:n,startTimeMs:o,endTimeMs:r,duration:a,text:$f(x.trim()),settings:i,index:0,speaker:bn(g.trim(),{allowVTTTags:!1})};c&&(b.id=c),i.position&&(b.position=i.position),i.align&&(b.align=i.align),i.line&&(b.line=i.line),i.size&&(b.size=i.size),i.vertical&&(b.vertical=i.vertical),i.region&&(b.region=i.region),l.push(b)}return l}function zY(e,t){let n=t,o;!Bo(e[n])&&Bo(e[n+1])&&(o=bn(e[n],{allowVTTTags:!1}),n++);const r=e[n];if(!Bo(r))return{cues:[],nextIndex:n+1};const a=r.match(/^((?:\d{2}:)?\d{2}:\d{2}\.\d{3})\s*-->\s*((?:\d{2}:)?\d{2}:\d{2}\.\d{3})(.*)$/);if(!a)return{cues:[],nextIndex:n+1};const[,i,c,l]=a,d=Cy(l.trim());n++;const h=[];for(;n<e.length&&e[n]!==""&&!Bo(e[n]);)h.push(e[n]),n++;const m=vy(i),f=vy(c),v=f-m,C=[];if(h.length===0){const g={stableId:uc(),startTime:i,endTime:c,startTimeMs:m,endTimeMs:f,duration:v,text:"",settings:d,index:0};o&&(g.id=o),d.position&&(g.position=d.position),d.align&&(g.align=d.align),d.line&&(g.line=d.line),d.size&&(g.size=d.size),d.vertical&&(g.vertical=d.vertical),d.region&&(g.region=d.region),C.push(g)}else for(const g of h)if(g.includes("<v ")&&(g.includes("</v>")||g.match(/<v\s+[^>]+>[^<]*$/))){const x=VY(g,i,c,m,f,v,d,o);C.push(...x)}else{const x=h.join(`
`),{text:b,speaker:L}=DY(x),S={stableId:uc(),startTime:i,endTime:c,startTimeMs:m,endTimeMs:f,duration:v,text:$f(b),settings:d,index:0};o&&(S.id=o),L&&(S.speaker=L),d.position&&(S.position=d.position),d.align&&(S.align=d.align),d.line&&(S.line=d.line),d.size&&(S.size=d.size),d.vertical&&(S.vertical=d.vertical),d.region&&(S.region=d.region),C.push(S);break}return{cues:C,nextIndex:n}}function _Y(e){const t=e.split(`
`).map(a=>a.trim()),n=t.find(a=>a.length>0);if(!n||!n.startsWith("WEBVTT"))throw new Error('Invalid WebVTT file: Must start with "WEBVTT"');const o={notes:[],styles:[],regions:[],cues:[],totalDuration:0,metadata:{cueCount:0,speakerCount:0,speakers:[],lastModified:new Date}};let r=0;for(;r<t.length&&t[r]==="";)r++;if(r<t.length&&t[r].startsWith("WEBVTT"))for(o.header=bn(t[r],{allowVTTTags:!1}),r++;r<t.length&&t[r]==="";)r++;else throw new Error("Invalid WebVTT file: Missing or malformed WEBVTT header");for(;r<t.length;){const a=t[r];if(a===""){r++;continue}if(a.startsWith("NOTE")){const i=[bn(a.substring(4).trim(),{preserveWhitespace:!0,allowVTTTags:!1})];for(r++;r<t.length&&t[r]!==""&&!Bo(t[r]);)i.push(bn(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;o.notes?.push(i.join(`
`));continue}if(a.startsWith("STYLE")){const i=[];for(r++;r<t.length&&t[r]!==""&&!Bo(t[r]);)i.push(bn(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;o.styles?.push(i.join(`
`));continue}if(a.startsWith("REGION")){const i=FY(a);o.regions?.push(i),r++;continue}if(Bo(a)||Bo(t[r+1])){const i=zY(t,r);i.cues&&i.cues.length>0&&o.cues.push(...i.cues),r=i.nextIndex;continue}r++}return o.cues=OY(o.cues),o.cues.sort((a,i)=>a.startTimeMs-i.startTimeMs),o.cues.forEach((a,i)=>{a.index=i}),o.totalDuration=o.cues.length>0?Math.max(...o.cues.map(a=>a.endTimeMs)):0,o.metadata=HY(o.cues),o}function yfe(e){let t="";if(e.header?t+=e.header.trim()+`
`:t+=`WEBVTT
`,t+=`
`,e.notes&&e.notes.length>0)for(const n of e.notes)t+="NOTE",n&&n.length>0&&(t+=" "+n),t+=`

`;if(e.styles&&e.styles.length>0)for(const n of e.styles)t+=`STYLE
`,t+=n.trim()+`

`;if(e.regions&&e.regions.length>0)for(const n of e.regions){t+="REGION";const o=[];for(const r in n)n[r]!==void 0&&n[r]!==null&&r!=="settings"&&o.push(`${r}:${n[r]}`);o.length>0&&(t+=" "+o.join(" ")),t+=`

`}for(const n of e.cues){n.id&&(t+=n.id+`
`),t+=`${n.startTime} --> ${n.endTime}`;const o=[];if(n.position&&o.push(`position:${n.position}`),n.align&&o.push(`align:${n.align}`),n.line&&o.push(`line:${n.line}`),n.size&&o.push(`size:${n.size}`),n.vertical&&o.push(`vertical:${n.vertical}`),n.region&&o.push(`region:${n.region}`),n.settings)for(const a in n.settings)n.settings[a]!==void 0&&n.settings[a]!==null&&!o.some(i=>i.startsWith(a+":"))&&o.push(`${a}:${n.settings[a]}`);o.length>0&&(t+=" "+o.join(" ")),t+=`
`;let r=n.text||"";n.speaker&&(r=`[${n.speaker}]: ${r}`),t+=r+`

`}return t.replace(/\s+$/,"")+`
`}const hc=V("video-transcript-panel"),UY=({cue:e,isCurrent:t,onSeek:n,forwardSeekRestricted:o,maxTimeReached:r})=>{const a=(0,u.useCallback)(()=>{const c=e.startTimeMs/1e3;o&&c>r||n?.(c)},[e,n,o,r]),i=(0,u.useMemo)(()=>o&&e.startTimeMs/1e3>r,[o,e.startTimeMs,r]);return(0,s.jsxs)("button",{"aria-current":t?"true":void 0,"aria-disabled":i,className:hc("line",{current:t,disabled:i}),onClick:i?void 0:a,tabIndex:i?-1:0,type:"button",children:[(0,s.jsx)("span",{className:hc("timestamp"),children:BY(e.startTimeMs,!0)}),(0,s.jsx)("span",{className:hc("text"),children:e.text})]})},xy=({captions:e,currentTime:t=0,forwardSeekRestricted:n=!1,maxTimeReached:o=0,onSeek:r})=>{const[a,i]=(0,u.useState)([]);(0,u.useEffect)(()=>{if(!e||e.length===0)return;const l=new AbortController;return(async()=>{try{const h=e[0];if(!h)return;const m=h.url||(h.key?mt(h.key):null);if(!m)return;const f=await fetch(m,{signal:l.signal});if(!f.ok)return;const v=await f.text(),C=_Y(v);i(C.cues)}catch(h){console.error("Error loading transcript:",h)}})(),()=>{l.abort()}},[e]);const c=(0,u.useMemo)(()=>{const l=t*1e3;return a.findIndex(d=>l>=d.startTimeMs&&l<d.endTimeMs)},[a,t]);return a.length===0?null:(0,s.jsx)("div",{className:hc(),children:(0,s.jsx)("div",{className:hc("lines"),children:a.map((l,d)=>(0,s.jsx)(UY,{cue:l,forwardSeekRestricted:n,isCurrent:d===c,maxTimeReached:o,onSeek:r},l.stableId))})})},An=V("video-side-panel");function GY(e,t){for(let n=e.length-1;n>=0;n--)if(t>=e[n].time)return n;return-1}const Vf=4;function WY({captions:e,chapters:t=[],cornerRadius:n,currentTime:o=0,forwardSeekRestricted:r=!1,headingLevel:a,isGeneratingChapters:i,isLearner:c=!1,maxTimeReached:l=0,onSeek:d,showChapters:h=!0,showTranscript:m=!0}){const f=wt(),v=(0,u.useMemo)(()=>h&&(!c||t.length>0)||i,[t.length,i,c,h]),C=f?.videoChapters||"Chapters",g=(0,u.useMemo)(()=>{const F=[];return v&&F.push({id:"chapters",label:C}),m&&F.push({id:"transcript",label:f?.videoTranscript||"Transcript"}),F},[v,C,m,f]),[x,b]=(0,u.useState)(g[0]??null),[L,S]=(0,u.useState)(!1),[y,T]=(0,u.useState)(!1),k=(0,u.useRef)(null),I=(0,u.useRef)(null),E=(0,u.useRef)(null),w=(0,u.useRef)(!1),A=(0,u.useId)(),N=(0,u.useMemo)(()=>g.find(F=>F.id===x?.id)??g[0]??null,[g,x]),R=(0,u.useMemo)(()=>g.findIndex(F=>F.id===N?.id),[g,N]),M=(0,u.useCallback)(F=>{const _=F.currentTarget.dataset.tabId,K=g.find(Y=>Y.id===_);K&&b(K)},[g]),P=(0,u.useCallback)(F=>{const _=g.length-1;let K=null;Ks(F)?K=R===0?_:R-1:Qs(F)?K=R===_?0:R+1:m2(F)?K=0:h2(F)&&(K=_),K!==null&&(F.preventDefault(),b(g[K]),k.current?.querySelectorAll('[role="tab"]')[K]?.focus())},[R,g]);(0,u.useEffect)(()=>{g.length>0&&!g.some(F=>F.id===x?.id)&&b(g[0])},[g,x]);const j=kt(768),O=(0,u.useCallback)(()=>S(!0),[]),B=(0,u.useCallback)(()=>S(!1),[]),D=(0,u.useCallback)(()=>T(F=>!F),[]);(0,u.useEffect)(()=>{let F=0;return y&&I.current?(w.current=!0,F=requestAnimationFrame(()=>{I.current?.querySelectorAll("[data-chapter-button]")?.[Vf]?.focus()})):!y&&w.current&&(F=requestAnimationFrame(()=>{E.current?.focus()})),()=>cancelAnimationFrame(F)},[y]);const H=(0,u.useMemo)(()=>GY(t,o),[t,o]),$=y?t:t.slice(0,Vf),W=t.length>Vf,U=a??2,Z=`h${U}`,ne=n!=null?{"--side-panel-corner-radius":`${Number(n)}px`}:{};if(j)return(0,s.jsxs)("div",{className:An("mobile"),style:ne,children:[v&&(0,s.jsxs)("div",{className:An("mobile-section"),ref:I,children:[(0,s.jsx)(Z,{className:An("mobile-heading",{[`h${U}`]:!0}),children:C}),(0,s.jsx)(gy,{activeIndex:H,chapters:$,isGeneratingChapters:i,onSeek:d}),W&&(0,s.jsxs)("button",{"aria-expanded":y,className:An("mobile-expand"),onClick:D,ref:E,type:"button",children:[y?f?.videoShowLessChapters||"Show less chapters":f?.videoShowMoreChapters||"Show more chapters",(0,s.jsx)("i",{"aria-hidden":"true",className:`fa-solid fa-chevron-${y?"up":"down"}`})]})]}),m&&(0,s.jsxs)("div",{className:An("mobile-section"),children:[(0,s.jsx)(Z,{className:An("mobile-heading",{[`h${U}`]:!0}),children:f?.videoTranscript||"Transcript"}),(0,s.jsxs)("button",{className:An("view-transcript-button"),onClick:O,type:"button",children:[(0,s.jsx)(ie,{name:"list"}),f?.videoViewTranscript||"View transcript"]}),L&&(0,s.jsx)(md,{className:An("video-transcript-modal"),heading:f?.videoTranscript||"Transcript",onClose:B,children:(0,s.jsx)(xy,{captions:e,currentTime:o,forwardSeekRestricted:r,maxTimeReached:l,onSeek:d})})]})]});const Q=F=>{const _={className:An("content"),hidden:N?.id!==F};return g.length<=1?_:{..._,"aria-labelledby":`tab-${F}-${A}`,id:`tabpanel-${F}-${A}`,role:"tabpanel",tabIndex:0}},z=g.length===1?(0,s.jsx)(Z,{className:An("title",{[`h${U}`]:!0}),children:g[0].label}):(0,s.jsx)("div",{"aria-label":f?.a11yBlockVideoSidePanelTablist,className:An("tabs"),ref:k,role:"tablist",children:g.map(F=>(0,s.jsx)("button",{"aria-controls":`tabpanel-${F.id}-${A}`,"aria-selected":N?.id===F.id,className:An("tab",{active:N?.id===F.id}),"data-tab-id":F.id,id:`tab-${F.id}-${A}`,onClick:M,onKeyDown:P,role:"tab",tabIndex:N?.id===F.id?0:-1,type:"button",children:F.label},F.id))});return(0,s.jsxs)("div",{className:An(),style:ne,children:[z,v&&(0,s.jsx)("div",{...Q("chapters"),children:(0,s.jsx)(gy,{activeIndex:H,chapters:t,isGeneratingChapters:i,onSeek:d})}),m&&(0,s.jsx)("div",{...Q("transcript"),children:(0,s.jsx)(xy,{captions:e,currentTime:o,forwardSeekRestricted:r,maxTimeReached:l,onSeek:d})})]})}const by=(0,u.createContext)(null),KY=by.Provider;function QY(){return(0,u.useContext)(by)}var YY,yy,Sy,ZY;function Sfe(){let e=null;const t=new Set;return{registerPlayer(n){e=n},onTimeUpdate(){t.forEach(n=>{n()})},getPosition(){return e?.getProgress().currentTime??0},subscribe(n){return t.add(n),()=>{t.delete(n)}},seekToTime(n){e?.seekToTime(n)}}}const XY=Object.freeze({registerPlayer(){},onTimeUpdate(){},getPosition:()=>0,subscribe:()=>()=>{},seekToTime(){}}),Ly=(0,u.createContext)(XY),qY=Ly.Provider;function eu(){return(0,u.useContext)(Ly)}function Lfe(){const e=eu(),t=yy(e);return t.current=e,Sy(()=>()=>t.current.getPosition(),[])}function Tfe(e){const t=eu();return ZY(t.subscribe,()=>e(t.getPosition()),()=>e(0))}function kfe(){const e=eu(),t=yy(e);return t.current=e,Sy(()=>n=>t.current.seekToTime(n),[])}function Ife({store:e,children:t}){return YY(qY,{value:e,children:t})}var JY,eZ;const tu=[];function Efe(){let e=tu;const t=new Set;return{setChapters(n){n!==e&&(e=n,t.forEach(o=>{o()}))},getChapters(){return e},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}const tZ=Object.freeze({setChapters(){},getChapters:()=>tu,subscribe:()=>()=>{}}),Ty=(0,u.createContext)(tZ),nZ=Ty.Provider;function ky(){return(0,u.useContext)(Ty)}function Nfe(){const e=ky();return eZ(e.subscribe,e.getChapters,()=>tu)}function jfe({store:e,children:t}){return JY(nZ,{value:e,children:t})}const mc=V("block-video");function sZ({audioVideoPlayhead:e,backgroundColor:t,blockId:n,blockPartnerContent:o,blockPartnerContentExists:r,captions:a,chapters:i,cornerRadius:c,currentLocale:l,dataL10nId:d,enableVideoPlaybackSpeed:h,forwardSeekRestricted:m,headingLevel:f,id:v,isGeneratingChapters:C,isLearner:g,isLoaded:x,item:b,lessonId:L,loadMedia:S,media:y,mediaWidth:T,onLoad:k,onProgressChanged:I,poster:E,recordMediaPlayheadPosition:w,renderCaption:A,renderPostVideoSlot:N,showChapters:R,subtitle:M,transcriptEnabled:P,type:j,videoKey:O,videoSrc:B,shouldPause:D}){const H=QY(),$=eu(),W=ky(),[U,Z]=(0,u.useState)(0),[ne,Q]=(0,u.useState)(0),z=(0,u.useRef)(null),F=(0,u.useCallback)(G=>{Z(G.currentTime),Q(le=>Math.max(le,G.currentTime)),$.onTimeUpdate(G.currentTime),I?.(G)},[I,$]),_=(0,u.useCallback)(G=>{const le=mc("caption",{visible:x}).toString();return(0,s.jsx)(Ge,{className:le,value:G.caption})},[x]),K=(0,u.useCallback)(G=>{z.current?.seekToTime(G)},[z]),Y=H?.setVideoPlayerRef,q=(0,u.useCallback)(G=>{z.current=G,Y?.(G),$.registerPlayer(G)},[Y,$]),J=P&&a&&a.length>0||R&&(!g||i&&i.length>0)||C;(0,u.useEffect)(()=>{W.setChapters(i??tu)},[W,i]);const ee=mc("item",{small:T==="0",medium:T==="1",full:T==="2","video-training":!0,"no-side-panel":!J}),re=H?.wrapVideo,oe=S?(0,s.jsx)(If,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:h,canRestrictSeek:m,captions:a,chapters:i,checkpointTimesSeconds:H?.checkpointMarkerTimes,cornerRadius:c,id:`${L}-${n}-${v}-${l}`,media:y,onCheckpointReached:H?.onCheckpointReached,onLoad:k,poster:E,progressChanged:F,recordMediaPlayheadPosition:w,ref:q,shouldPause:D,src:B,subtitle:M,type:O?"video":j},`${L}-${n}-${v}-${l}-${E||""}`):null;return(0,s.jsxs)("div",{className:ee,children:[(0,s.jsxs)("figure",{"data-l10n-id":d,children:[(0,s.jsx)("div",{className:mc("figure-container"),children:re?re(oe):oe}),J&&(0,s.jsx)("div",{className:mc("side-panel-wrapper"),children:(0,s.jsx)(WY,{captions:a,chapters:i,cornerRadius:c,currentTime:U,forwardSeekRestricted:m||!1,headingLevel:f,isGeneratingChapters:C,isLearner:g,maxTimeReached:ne,onSeek:K,showChapters:R,showTranscript:P})}),x&&(0,s.jsxs)(s.Fragment,{children:[N?.(),(0,s.jsx)("figcaption",{className:mc("wrapper"),children:(A??_)(b)})]})]}),r&&(0,s.jsx)(fy,{backgroundColor:t,blockId:n,partnerContent:o})]})}var zf=p(82920);function oZ({backgroundColor:e,blockId:t,cornerRadius:n,enableVideoPlaybackSpeed:o,forwardSeekRestricted:r,headingLevel:a,isGeneratingChapters:i,isLearner:c,item:l,lessonId:d,loadMedia:h,mediaWidth:m,onStep:f,partnerContent:v,audioVideoPlayhead:C,recordMediaPlayheadPosition:g,renderCaption:x,renderPostVideoSlot:b,showChapters:L,transcriptEnabled:S,type:y,isVideoTraining:T,shouldPause:k}){const[I,E]=zf.useState(!1),{currentLocale:w}=nt(),A=at(),{id:N,media:R,partnerContentId:M}=l,P=A(R)??{},{customVideo:j={},tmp:O={},video:B={}}=P,D="poster"in B?B:{...B,...j},H=O.video&&"poster"in O.video?O.video:void 0,{captions:$,chapters:W,key:U,poster:Z,src:ne,subtitle:Q}=Xa()?D:H||D,z=L?W??[]:[],F=U||ne,K=(Array.isArray(v)?v:v?.content)?.find(oe=>M!=null&&Zt(oe)&&"id"in oe&&oe.id===M),Y=K!=null&&Zt(K),q=Zt(R)&&"l10nId"in R?R.l10nId:void 0,J=zf.useCallback(()=>{E(!0)},[]),ee=zf.useCallback(({percentComplete:oe})=>{oe>=100&&f?.({id:N})},[N,f]);if(!F)return(0,s.jsx)(IY,{mediaWidth:m});const re={audioVideoPlayhead:C,backgroundColor:e,blockId:t,blockPartnerContent:K,blockPartnerContentExists:Y,captions:$,chapters:z,cornerRadius:n,currentLocale:w,dataL10nId:q,enableVideoPlaybackSpeed:o,forwardSeekRestricted:r,id:N,isLoaded:I,item:l,lessonId:d,loadMedia:h,media:R,mediaWidth:m,onLoad:J,onProgressChanged:ee,poster:Z,recordMediaPlayheadPosition:g,renderCaption:x,renderPostVideoSlot:b,subtitle:Q,type:y,videoKey:U,videoSrc:F,shouldPause:k};return T?(0,s.jsx)(sZ,{...re,chapters:z,headingLevel:a,isGeneratingChapters:i,isLearner:c,showChapters:L,transcriptEnabled:S},U):(0,s.jsx)(wY,{...re},U)}const rZ=V("block-video");function _f({animateBlockEntrance:e,blockId:t,enableVideoPlaybackSpeed:n,initiallyVisible:o,isDragPreview:r,isLearner:a,isSidebarPreview:i,items:c,lessonId:l,loadMedia:d,onStep:h,partnerContent:m,progress:f,recordMediaPlayheadPosition:v,renderCaption:C,renderPostVideoSlot:g,settings:x,takingSnapshot:b,type:L,isGeneratingChapters:S,isVideoTraining:y,shouldPause:T}){const k=Gs(),I=c?.[0];if(I==null)return null;const E=rZ({"no-animation":!x?.entranceAnimation,presentation:k}).toString(),w=y?"2":"1",A=b||r||i;return(0,s.jsx)(we,{className:E,children:(0,s.jsx)(Be,{animateBlockEntrance:e,initiallyVisible:o,isLearner:a,children:A?(0,s.jsx)(kY,{item:I}):(0,s.jsx)($W,{children:(0,s.jsx)(oZ,{audioVideoPlayhead:f?.items?.[t]?.items?.[I.id]?.audioVideoPlayhead??0,backgroundColor:x?.backgroundColor,blockId:t,cornerRadius:x?.cornerRadius,enableVideoPlaybackSpeed:n,forwardSeekRestricted:x?.forwardSeekRestricted&&!f?.isComplete,headingLevel:x?.headingLevel,isGeneratingChapters:S,isLearner:a,isVideoTraining:y,item:I,lessonId:l,loadMedia:d,mediaWidth:x?.mediaWidth??w,onStep:h,partnerContent:m,recordMediaPlayheadPosition:v,renderCaption:C,renderPostVideoSlot:g,shouldPause:T,showChapters:!!x?.showChapters,transcriptEnabled:!!x?.showTranscript,type:L})})})})}var Uf=p(82920);const nu=V("block-audio"),Gf=V("block-embed"),Rn=V("block-attachment");class aZ extends Uf.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this),this.onLoad=this.onLoad.bind(this),this.state={loaded:!1}}static get defaultProps(){return{audioVideoPlayhead:0,blockId:"",getL10nValue:()=>{},editable:!1,items:[],lessonId:"",onStep:()=>{},recordMediaPlayheadPosition:()=>{}}}renderCaption({caption:t}){const{loaded:n}=this.state,o=nu("caption",{hidden:!n}).toString();return(0,s.jsx)(Ge,{className:o,value:t})}onLoad(){this.setState({loaded:!0})}renderItem(t){const{blockId:n,getL10nValue:o,labels:r,lessonId:a,loadMedia:i,progress:c,recordMediaPlayheadPosition:l,renderCaption:d=this.renderCaptionDelegate,settings:h}=this.props,m="forwardSeekRestricted"in h?h.forwardSeekRestricted:!1,f=t.media,v=o(f)??{},{id:C}=t,g=v?.tmp?.audio?.key||v?.audio?.key,x=`${a}-${n}-${C}`,b=bt()(0,["items",n,"items",C,"audioVideoPlayhead"],c),L=Ef({lessonId:a,refs:`items:${n}/items:${C}`});return(0,s.jsxs)("div",{className:nu("item"),children:[i&&(0,s.jsx)(k3,{audioVideoPlayhead:b,canRestrictSeek:!!m&&!c?.isComplete,id:x,item:t,labels:r,mediaSrc:g,onAIUploadFinish:this.props.onAIUploadFinish,onEnd:this.handleOnEnd.bind(this,C),onLoad:this.onLoad,onTranscriptClick:this.onTranscriptClick.bind(this,t),onTranscriptClose:this.props.closeTranscript,onTranscriptUpdate:this.props.onTranscriptUpdate??void 0,recordMediaPlayheadPosition:l,refs:`items:${n}/items:${C}`,transcriptMedia:f,uploadId:L},x),d(t)]},C)}handleOnEnd(t){this.props.onStep({id:t})}onTranscriptClick(t){const{blockId:n}=this.props;return this.props.openTranscript?.({blockId:n,item:t,refs:`items:${n}/items:${t.id}`})}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,items:r,settings:a}=this.props,{entranceAnimation:i}=a,c=nu({"no-animation":!i,presentation:this.props.isPresentation}).toString(),l=r.length>0?r.slice(0,1):[];return(0,s.jsx)(we,{className:c,children:(0,s.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{className:nu("wrapper"),children:l.map(d=>this.renderItem(d))})})})}}const iZ=vb(st(aZ));function cZ(e){const t=Gs();return(0,s.jsx)(iZ,{...e,isPresentation:t})}class lZ extends Uf.Component{static get defaultProps(){return{items:[],editable:!1,lessonId:"",blockId:"",settings:{}}}renderItem(t,n){const{id:o,settings:r={}}=t,a=this.props.getL10nValue(t.media)??{},i="embed"in a?a.embed:void 0,{loadMedia:c,labels:l,settings:d}=this.props,{showMetaData:h}=r,{cardMode:m,showBorder:f=!0}=d,v=Gf("item",{border:f}).toString();return(0,s.jsx)(_t,{className:v,disabled:!f&&m==$n.TRANSPARENT,tag:"section",children:c&&(0,s.jsx)(j3,{data:i,id:`${n}-${o}`,isLesson:!0,labels:l,showMetaData:h})},o)}render(){const{animateBlockEntrance:t,blockId:n,getL10nValue:o,initiallyVisible:r,isLearner:a,items:i,settings:c}=this.props,{entranceAnimation:l,mediaWidth:d="0"}=c,h=o(i?.[0]?.media);if(!h)return null;const m=NW(h)!=="link",f=Gf({"no-animation":!l,presentation:this.props.isPresentation}).toString(),v=Gf("wrapper",{medium:m&&d==="1",full:m&&d==="2"}),C=i.length>0?i.slice(0,1):[];return(0,s.jsx)(we,{className:f,children:(0,s.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,s.jsx)("div",{className:v,children:C.map(g=>this.renderItem(g,n))})})})}}const dZ=st(Mh()(lZ));function uZ(e){const t=Gs();return(0,s.jsx)(dZ,{...e,isPresentation:t})}class hZ extends Uf.Component{get attachment(){const t=this.props.items[0].media;return this.props.getL10nValue(t)?.attachment??{}}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o}=this.props;return(0,s.jsx)(we,{children:(0,s.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{className:"block-text--onecol",children:(0,s.jsx)("div",{className:"block-text__container",children:(0,s.jsx)("div",{className:"block-text__row",children:(0,s.jsx)("div",{className:"block-text__col",children:this.renderAttachment(this.attachment)})})})})})})}renderAttachment(t){return t.key?this.renderDownload(t):this.renderNoFile()}renderDownload({key:t,mimeType:n,originalUrl:o,size:r}){const{attachmentId:a,blockId:i,externalLinksDisabled:c,onLinkBlur:l,onLinkFocus:d,onLinkMouseEnter:h,onLinkMouseLeave:m}=this.props,f=mt(t),v=c?"":void 0,C=c?void 0:f,g=c?void 0:"noopener noreferrer nofollow",x=c?"button":void 0,b=c?0:void 0,L=c?void 0:"_blank",S=Rn({}).mix("brandHover").toString(),y=Rn("info");return(0,s.jsxs)(_t,{"aria-labelledby":`attachment-name-${i} attachment-icon-${i}`,className:S,"data-external":v,download:o,href:C,id:c?a:void 0,onBlur:c?()=>l?.(a):void 0,onFocus:c?()=>d?.(a):void 0,onMouseEnter:c?()=>h?.(a):void 0,onMouseLeave:c?()=>m?.(a):void 0,rel:g,role:x,tabIndex:b,tag:"a",target:L,children:[(0,s.jsxs)("div",{className:Rn("main"),children:[(0,s.jsx)("div",{className:Rn("icon"),id:`attachment-icon-${i}`,children:this.fileIcon(n)}),(0,s.jsxs)("div",{className:y,children:[(0,s.jsx)(Ie,{className:Rn("title").toString(),id:`attachment-name-${i}`,value:o}),(0,s.jsx)("div",{className:Rn("size").toString(),children:TY()(r,{round:1})})]})]}),(0,s.jsx)("div",{className:Rn("rest"),children:(0,s.jsx)(QD,{className:"brandHover__target--fill"})})]})}renderNoFile(){const t=Rn({none:!0}).toString(),n=Rn("info");return(0,s.jsx)(_t,{className:t,children:(0,s.jsxs)("div",{className:Rn("main"),children:[(0,s.jsx)("div",{className:Rn("icon"),children:(0,s.jsx)(Sx,{"aria-label":"File"})}),(0,s.jsxs)("div",{className:n,children:[(0,s.jsx)("div",{className:Rn("title").toString(),children:"File Attachment Block"}),(0,s.jsx)("div",{className:Rn("size").toString(),children:"No file added"})]})]})})}fileIcon(t){const{labels:n}=this.props,o=/excel|spreadsheet/,r=/pdf/,a=/word/,i=/powerpoint|presentation/,c=/rtf|richtext/,l=/zip/;return o.test(t)?(0,s.jsx)(gF,{"aria-label":n?.a11yExcelIcon}):r.test(t)?(0,s.jsx)(mF,{"aria-label":n?.a11yPDFIcon}):a.test(t)?(0,s.jsx)(hF,{"aria-label":n?.a11yWordIcon}):i.test(t)?(0,s.jsx)(fF,{"aria-label":n?.a11yPPTIcon}):c.test(t)?(0,s.jsx)(pF,{"aria-label":n?.a11yRTFIcon}):l.test(t)?(0,s.jsx)(vF,{"aria-label":n?.a11yZipIcon}):(0,s.jsx)(Sx,{"aria-label":n?.a11yFileIcon})}}function mZ(e){const t=Mh()(e),n=st(t),o=YH(n);function r(a){const i=Fe(),c=a.externalLinksDisabled??(i&&"externalLinksDisabled"in i?i.externalLinksDisabled:!1);return(0,s.jsx)(o,{...a,externalLinksDisabled:c})}return r}const fZ=mZ(hZ),vs=V("block-step"),pZ=e=>{const{blockId:t,disableZoom:n,enableVideoPlaybackSpeed:o,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=a,f=Re(a.media)??{},v=d==="audio"&&f.audio,C=d==="embed"&&f.embed,g=d==="image"&&f.image,x=d==="video"&&f.video;if(!v&&!C&&!g&&!x&&!(d==="image-with-audio"&&r))return;const L=f.embed?wr(f.embed):void 0,S=!!f.image,y=!!f.audio,T=S?f.image.align:"center",k=vs("media",{audio:y&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${T}`]:r&&!!T,"audio-on-bottom":y&&!r&&h==="bottom",linkEmbed:L==="link",videoEmbed:L==="video",visual:!r&&S||!Ct()(f.video)}),I=m||{};return(0,s.jsx)("div",{className:k,children:(0,s.jsx)(Qt,{blockId:t,enableVideoPlaybackSpeed:o,index:`${a.id}`,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,media:f,mediaType:r?void 0:d,opts:{disableZoom:n,...I},shouldPause:!0})})},gZ=e=>{const{headingLevel:t,innerRef:n,item:o,isActive:r,loadMedia:a,audioPosition:i,onFocus:c,renderTitle:l,renderDescription:d,style:h}=e,{id:m}=o,f=vs({active:r}),v=!!o.step,C=!!o.title,g=t||2,x=`h${g}`,b=`h${g+1}`,L=Re(o.media),S=gs(L,i,!0,"timeline"),y=Re(o.description),T=(0,u.useMemo)(()=>!!Object.keys(L??{}).length||!!Im(y).value?.length,[L,y]),k=()=>{const I={audio:{item:{...o,media:S.audioOnlyMedia||L},mediaType:"audio"},image:{item:{...o,media:S.imageOnlyMedia||L},mediaType:"image"},video:{item:{...o,media:S.videoOnlyMedia||L},mediaType:"video"},embed:{item:{...o,media:S.embedOnlyMedia||L},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,s.jsx)(s.Fragment,{children:S.renderOrder.map((E,w)=>{if(E==="text")return d?(0,s.jsx)("div",{className:vs("description"),children:d(o)},`text-${w}`):(0,s.jsx)(Ie,{className:vs("description"),value:o.description},`text-${w}`);if(!L||!a)return null;const A=I[E];return A?(0,u.createElement)(pZ,{...e,...A,key:`${E}-${w}`}):null})})};return(0,s.jsx)(we,{children:(0,s.jsx)("div",{className:f,"data-id":m,ref:n,style:h,children:(0,s.jsx)(_t,{className:vs("body"),onFocus:c,children:(0,s.jsxs)("div",{className:vs("main-wrap"),children:[(0,s.jsxs)("div",{className:vs("heading",{solo:!T}),children:[v&&(0,s.jsx)("div",{className:vs("step"),children:(0,s.jsx)(x,{children:(0,s.jsx)(mn,{value:o.step})})}),(C||l)&&(0,s.jsx)("div",{className:vs("title"),children:l?l(o):(0,s.jsx)(b,{children:(0,s.jsx)(Ie,{value:o.title})})})]}),(0,s.jsx)("div",{className:vs("main"),children:k()})]})})})})},vZ=e=>{const{id:t,settings:n,items:o,onEnter:r,enableVideoPlaybackSpeed:a,initiallyVisible:i,isLearner:c,labels:l,lessonId:d,renderTitle:h,renderDescription:m}=e,f=o[0],v=n.audioPosition,C=!(n.zoomOnClick??!0),g=n.headingLevel,x=(0,u.useCallback)((L,S)=>{r?.({id:t,payload:{activeIndex:L,itemId:S}})},[t,r]),b=(0,s.jsx)(gZ,{audioPosition:v,blockId:t,disableZoom:C,enableVideoPlaybackSpeed:a,headingLevel:g,isActive:!0,item:f,labels:l,lessonId:d,lessonNumber:t,loadMedia:!0,onFocus:x,renderDescription:m,renderTitle:h,style:{"--block-step-padding-top":"1rem","--block-step-padding-bottom":"1rem","--block-step-corner-radius":n.cornerRadius!=null?`${n.cornerRadius}px`:"var(--arc-border-radius-lg)"}});return c?(0,s.jsx)(Be,{animateBlockEntrance:!0,className:vs("animate").toString(),initiallyVisible:i,isLearner:!0,children:b}):b},Iy=V("continue-btn"),su=({children:e,className:t,href:n,onClick:o,text:r,testId:a="continue-btn"})=>{const i=t?`${Iy()} ${t}`:Iy();return n?(0,s.jsx)(nn,{className:i,"data-continue-btn":"","data-testid":a,onClick:o,to:n,children:e??(0,s.jsx)(mn,{value:r})}):(0,s.jsx)("button",{className:i,"data-continue-btn":"","data-testid":a,onClick:o,type:"button",children:e??(0,s.jsx)(Ie,{value:r})})},Ey=({bgType:e,text:t,iconType:n="locked"})=>{const o=X()("continue-hint",{"continue-hint--bg-transparent":e==="transparent"});return(0,s.jsxs)("div",{className:o,"data-continue-btn":"",children:[n==="locked"&&(0,s.jsx)(ie,{className:"continue-hint__icon",name:"lock-keyhole-light"}),(0,s.jsx)("div",{className:"continue-hint__content",children:(0,s.jsx)(mn,{value:t})})]})},Wf=V("block-text");function CZ({blockId:e,animateBlockEntrance:t,canContinue:n=!1,isComplete:o,isLearner:r,isLastBlock:a=!1,isOnlyBlockInStep:i,items:c=[],labels:l,onStep:d=()=>{},skipContinue:h=!1,initiallyVisible:m}){const v=(0,u.useRef)(null),C=(0,Oe.A)(o),[g,x]=u.useState(!1),{announcePolite:b}=ys(),[L,S]=u.useState(!1),y=tn(),T=Fe(),k=gi(),I=pC(k),E=jo(),w=c[0],{id:A}=w,N=w.title??E?.label??We.blockContinueLabel,R=w.type??E?.completionType??We.blockContinueCompletionType,M=w.completeHint??E?.completeHint??We.blockContinueCompleteHint,P=!R||(h?L:n||i&&o),j=h||!o||i,O=y?.continueColor||k,B=!O||O===k,D=B&&T?.theme?.accentContrast===Te.AUTO?Te.AUTO:I,H=y?.continueColorContrast??D,$=y?.continueRadius??null,W=y?.continueWidth??76,U=$t({backgroundColor:O,contrast:H}),Z={...!B&&{"--color-button-bg":O},...!B&&{"--color-button-text":U},...!B&&{"--color-button-border":"transparent"},...$!=null&&{"--radius-button":`${Number($)}px`},...W!=null&&{maxWidth:`${Number(W)}rem`}},ne=(0,u.useCallback)(()=>{d({id:A}),x(!0),a?setTimeout(()=>{const Q=document.querySelector("[data-lesson-id]"),z=document.querySelector("main"),F=document.querySelector("h1.lesson-header__title, .lesson-header__title h1"),_=Q?.querySelector('.block-wrapper, [role="region"], .lesson-content > *:first-child');let K=null;F?K=F:_&&_!==v.current?.parentElement?K=_:Q?K=Q:z&&(K=z),K&&(K.setAttribute("tabindex","-1"),K.focus({preventScroll:!0}))},200):setTimeout(()=>{const Q=v.current;Q&&Q.focus()},100)},[A,d,a]);return(0,u.useEffect)(()=>{!C&&o&&(a||setTimeout(()=>{b?.(l?.a11yStatusAdditionalContent)},300))},[b,o,l,C,a]),(0,u.useEffect)(()=>{const Q=z=>{const{path:F}=z.detail,{blockId:_,buttonId:K}=ma(z.detail.path,["block","button"]);if(e==_&&K===w.id){const Y=F.at(-1);Y==="title"?S(!0):Y==="completeHint"&&S(!1)}};return window.addEventListener(Ue,Q),()=>{window.removeEventListener(Ue,Q)}},[e,w.id]),(0,s.jsxs)(s.Fragment,{children:[j&&(0,s.jsx)(we,{children:(0,s.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:m,isLearner:r,children:(0,s.jsx)("div",{className:Wf("container"),children:(0,s.jsx)("div",{className:Wf("row"),children:(0,s.jsxs)("div",{className:Wf("continue"),style:Z,children:[P&&(0,s.jsx)(su,{onClick:ne,text:N}),!P&&(0,s.jsx)(Ey,{text:M})]})})})})}),g&&(0,s.jsx)("div",{"aria-live":"off",className:"visually-hidden-always",ref:v,role:"status",tabIndex:-1,children:l?.a11yStatusContinued||"Continued"})]})}var xZ=p(70318),ou=p.n(xZ);const bZ=V("flashcard");class yZ extends u.PureComponent{static defaultProps={allowTabNavigation:!0,backType:"description",forceFlipped:!1,frontType:"description",getL10nValue:()=>{},onFlip:Function.prototype,onStep:Function.prototype,settingShowHint:!0};state={areSidesReady:!0,flipped:!1,hasFlippedOnce:!1,isMounted:!1};cardRef=(0,u.createRef)();render(){const{cardRef:t,handleFlip:n,handleSideReady:o,handleTouchEnd:r,props:{activeIndex:a,allowTabNavigation:i,backDescription:c,backMedia:l,backType:d,block:h,forceFlipped:m,frontDescription:f,frontMedia:v,frontType:C,id:g,index:x,isHidden:b,labels:L,lessonId:S,prefersKeyboardNavigation:y,settingShowHint:T,size:k,type:I,wrapElement:E,wrapRole:w},state:{areSidesReady:A,flipped:N,isMounted:R}}=this,M=m||N,P=bZ({large:k==="large",small:k==="small",flipped:M,stack:I==="stack"});return(0,s.jsxs)(E,{"aria-hidden":!i,className:P,onClick:n,onTouchEnd:r,ref:t,role:w,children:[(0,s.jsx)(_t,{activeIndex:a,allowTabNavigation:i,blockId:h?.id,blockType:I,description:f,index:x,isActiveSide:!M,isAriaHidden:M&&R&&A,isFlipped:M,isHidden:b,itemId:g,labels:L,lessonId:S,media:v,onFlip:n,onReady:o,prefersKeyboardNavigation:y,settingShowHint:T,side:"front",size:k,tag:jy,type:C}),(0,s.jsx)(_t,{activeIndex:a,allowTabNavigation:i,blockId:h?.id,blockType:I,description:c,index:x,isActiveSide:M,isAriaHidden:!M&&R&&A,isFlipped:M,isHidden:b,itemId:g,labels:L,lessonId:S,media:l,onFlip:n,onReady:o,prefersKeyboardNavigation:y,settingShowHint:T,side:"back",size:k,tag:SZ,type:d})]})}componentDidMount(){this.setState({isMounted:!0}),window.addEventListener(Ue,this.handleNavEvent)}componentDidUpdate(t,n){const{props:{allowTabNavigation:o,id:r,onStep:a},state:{hasFlippedOnce:i}}=this;!n.hasFlippedOnce&&i&&a({id:r}),t.allowTabNavigation&&!o&&this.setState({flipped:!1})}componentWillUnmount(){window.removeEventListener(Ue,this.handleNavEvent)}handleNavEvent=t=>{const{path:n}=t.detail,{cardId:o}=ma(n,["block","card"]);if(o===this.props.id){let r=!1;n.includes("back")&&(r=!0),this.setState({flipped:r},()=>{this.props.type!=="stack"&&!ff(this.cardRef.current,"center")&&this.cardRef.current.scrollIntoView({behavior:"instant",block:"center"})})}};handleFlip=t=>{const{block:n,index:o}=this.props,r=window.getSelection(),a=r.toString()&&this.cardRef.current?.contains(r.anchorNode);if(t.detail>1&&r.empty(),t&&t.target.closest("a")||a)return;const i=!this.state.flipped;this.setState({areSidesReady:!1,flipped:i,hasFlippedOnce:!0});const c=i?"back":"front",l=n?.items?.[o],d=l?.[c]?.media,h=`items:${n?.id}/items:${l?.id}/${c}`;this.props.onTranscriptUpdate?.({audioPlayerId:ps({refs:h}),transcriptMedia:d}),this.props.onFlip?.(this.props.index,i)};handleTouchEnd=t=>{t.stopPropagation()};handleSideReady=()=>{this.setState({areSidesReady:!0})}}const Ny=yl(st(yZ)),Ra=V("flashcard-side"),ru=V("flashcard-side-flip");class Rr extends u.PureComponent{static descriptionActionTypes={INITIAL:"INITIAL",INSERTING:"INSERTING",DELETING:"DELETING"};static initialState={descriptionAction:Rr.descriptionActionTypes.INITIAL,isAtLongOverflowBottom:!1,isLong:!1,isLongOverflow:!1,isTooltipVisible:!1,scrollbarWidthOffset:void 0};id;constructor(t){super(t),this.handleMouseEnterAudio=this.handleMouseEnterAudio.bind(this),this.handleMouseLeaveAudio=this.handleMouseLeaveAudio.bind(this),this.id=(0,r0.uniqueId)("flashcard-side")}state=Rr.initialState;longBottomObserver=void 0;readyTimeout=void 0;refDescription=(0,u.createRef)();refDescriptionBottom=(0,u.createRef)();refSide=(0,u.createRef)();refBtnTimeoutMouseLeave=(0,u.createRef)();checkDescriptionSizeDebounced;handleMouseEnterAudio=()=>{const{itemId:t,index:n,settingShowHint:o,side:r}=this.props,a=document.getElementById(`${t}-${n}-${r}-flip-btn`);a&&o&&(a.style.opacity="0.6")};handleMouseLeaveAudio=()=>{const{itemId:t,index:n,settingShowHint:o,side:r}=this.props,a=document.getElementById(`${t}-${n}-${r}-flip-btn`);a&&o&&(a.style.opacity="1")};render(){const{props:{activeIndex:t,allowTabNavigation:n,block:o,className:r,description:a,getL10nValue:i,index:c,itemId:l,media:d,isActiveSide:h,isAriaHidden:m,isFlipped:f,labels:v,lessonId:C,onFlip:g,prefersKeyboardNavigation:x,settingShowHint:b,side:L,size:S,style:y,type:T},refDescription:k,refDescriptionBottom:I,refSide:E,state:{isAtLongOverflowBottom:w,isLong:A,isLongOverflow:N,isTooltipVisible:R,scrollbarWidthOffset:M}}=this,P=L==="front",j=L==="back",O=S==="small",B=S==="large",D=T==="description",H=T==="fullimage",$=T==="image",W=P?v?.a11yBlockFlashcardFront:v?.a11yBlockFlashcardBack,U=`items:${o?.id}/items:${l}/${P?"front":"back"}`,Z=Ra({back:j,flipped:f,front:P,fullimage:H}).mix(r),{image:ne,audio:Q}=i(d)??{},z=Ra("content",{small:O,large:B,front:P,fullimage:H,image:$,"long-overflow":N,"long-overflow-bottom":w,"has-audio":!!Q}),F=ru({"audio-expansion":!0}),_=ru("btn",{"visually-hidden":!b,"prefers-keyboard":x,round:!0}),K=ru("icon"),Y=ru("tooltip",{visible:R}),q=Ra("img",{small:O,large:B,centered:$,full:H}),J=Ra("description",{"has-audio":!!Q,long:A&&!N,"long-overflow":N,short:!A,large:B}),ee=Ra("description-bottom"),re=M==null?void 0:{right:M},oe=ne?.alt??`Image ${c+1}`,Se=lt(ne),G=`${this.id}-click-to-flip-text`,le=`${this.id}-image`,ve=`${this.id}-description`;return(0,s.jsxs)("div",{"aria-label":W,className:Z,inert:m,ref:E,role:"group",style:y,tabIndex:-1,children:[(0,s.jsxs)("div",{className:z,children:[(0,s.jsxs)("div",{className:F,onMouseEnter:this.handleBtnMouseEnter,onMouseLeave:this.handleBtnMouseLeave,style:re,children:[(0,s.jsx)("button",{"aria-labelledby":`${G} ${ve} ${le}`,className:_,id:`${l}-${c}-${L}-flip-btn`,onBlur:this.handleBtnBlur,onClick:g,onFocus:this.handleBtnFocus,tabIndex:n&&h?0:-1,type:"button",children:(0,s.jsx)(VF,{className:K})}),(0,s.jsx)("div",{"aria-hidden":"true",className:Y,id:G,onClick:Ao,children:v?.blocksClickToFlip})]}),(H||$)&&(0,s.jsx)(LZ,{alt:oe,className:q,imageId:le,l10nId:jt(d),url:Se}),D&&(0,s.jsxs)("div",{className:J,ref:k,tabIndex:h&&N?0:void 0,children:[(0,s.jsx)(Ie,{allowTabNavigation:n&&!m,id:ve,value:a}),N&&(0,s.jsx)("div",{className:ee,ref:I})]})]}),Q&&(0,s.jsx)("div",{className:Ra("audio-player",{text:D,image:$}),onMouseEnter:this.handleMouseEnterAudio,onMouseLeave:this.handleMouseLeaveAudio,children:(0,s.jsx)(Qt,{activeIndex:t,blockId:o.id,index:`${l}-${c}-${L}`,isOverlayAudio:H,item:{id:l,media:d},itemIndex:c,labels:v,lessonId:C,media:d,mediaType:"audio",refs:U,shouldPause:!h,side:L})})]})}componentDidMount(){this.checkDescriptionSize(this.props),this.checkDescriptionSizeDebounced=ou()(this.checkDescriptionSize,250),window.addEventListener("resize",this.checkDescriptionSizeDebounced),document.addEventListener("keydown",this.handleDocumentKeyDown)}componentWillUnmount(){clearTimeout(this.readyTimeout),this.cleanupLongBottomObserver(),window.removeEventListener("resize",this.checkDescriptionSizeDebounced),document.removeEventListener("keydown",this.handleDocumentKeyDown)}componentDidUpdate(t,n){const{props:{allowTabNavigation:o,blockType:r,isFlipped:a,isActiveSide:i,isHidden:c,onReady:l,type:d}}=this;t.isHidden&&!c&&this.checkDescriptionSize(this.props),t.isFlipped!==a&&(i&&o?(this.refSide.current?.focus?.(),this.readyTimeout=setTimeout(()=>{l()},700)):clearTimeout(this.readyTimeout)),d==="description"&&this.handleUpdatesDescription(t,n),r==="stack"&&i&&!t.allowTabNavigation&&o&&this.refSide.current?.focus?.()}handleBtnBlur=()=>{this.setState({isTooltipVisible:!1})};handleBtnFocus=()=>{this.setState({isTooltipVisible:!0})};handleBtnMouseEnter=()=>{clearTimeout(this.refBtnTimeoutMouseLeave.current),this.setState({isTooltipVisible:!0})};handleBtnMouseLeave=()=>{this.refBtnTimeoutMouseLeave.current=setTimeout(()=>{this.setState({isTooltipVisible:!1})},150)};handleDocumentKeyDown=t=>{fn(t)&&this.state.isTooltipVisible&&this.setState({isTooltipVisible:!1})};handleUpdatesDescription=(t,n)=>{const{props:{isFlipped:o,isActiveSide:r},state:{isLongOverflow:a}}=this;t.isFlipped!==o&&r&&this.scrollDescriptionToTop(),this.handleUpdatesDescriptionSize(t,n),!n.isLongOverflow&&a?(this.setLongBottomObserver(),this.setScrollbarWidth()):n.isLongOverflow&&!a&&this.cleanupLongBottomObserver()};handleUpdatesDescriptionSize=(t,n)=>{const{INSERTING:o,DELETING:r}=Rr.descriptionActionTypes,{props:{description:a,size:i,type:c,getL10nValue:l},state:{descriptionAction:d,isLong:h,isLongOverflow:m}}=this,f=l(a)?.length||0,v=l(t.description)?.length||0;d!==o&&f>v?this.setState({descriptionAction:o}):d!==r&&f<v?this.setState({descriptionAction:r}):(d!==n.descriptionAction||h!==n.isLong||m!==n.isLongOverflow||i!==t.size||c!==t.type||f!==v)&&this.checkDescriptionSize(t)};checkDescriptionSize=t=>{const{DELETING:n}=Rr.descriptionActionTypes,{props:{size:o},refDescription:{current:r},state:{descriptionAction:a,isLong:i,isLongOverflow:c}}=this;if(!r)return;r&&r.scrollHeight>r.clientHeight?i&&!c?this.setState({isLongOverflow:!0}):!i&&!c&&this.setState({isLong:!0}):(a===n||o!==t.size)&&this.setState(Rr.initialState)};scrollDescriptionToTop=()=>{const t=this.refDescription.current;this.state.isLong&&t&&(t.scrollTop=0)};setLongBottomObserver=()=>{const t=this.refDescriptionBottom.current;if(t&&this.longBottomObserver==null){const n=o=>{const r=o?.[0]?.isIntersecting??!1;this.setState({isAtLongOverflowBottom:!r})};this.longBottomObserver=new IntersectionObserver(n,{threshold:[0,1]}),this.longBottomObserver.observe(t)}};cleanupLongBottomObserver=()=>{this.longBottomObserver?.disconnect?.(),this.longBottomObserver=void 0};setScrollbarWidth=()=>{const t=this.refDescription.current;if(t){const n=t.offsetWidth-t.clientWidth;n>0&&this.setState({scrollbarWidthOffset:n})}}}const jy=yl(st(e=>(0,s.jsx)(Rr,{...e}))),SZ=e=>{const{cardMode:t,customBackgroundColorContrast:n}=tn(),o=Fe()?.theme,r=Ll(),a=cs(),c=a===se.IMAGE&&r?.overlayColor===rt.LIGHT,l=En(),d=o?.accentContrast,h=d===Te.AUTO,m=(0,u.useMemo)(()=>{let v="#fafafa";if(t===$n.TRANSPARENT)switch(a){case se.DARK:v="#525252";break;case se.BLACK:v="#1a1a1a";break;case se.IMAGE:c?v="rgba(0, 0, 0, 0.7)":v="rgba(255, 255, 255, 0.7)";break;case se.ACCENT:case se.COLOR:case se.TINT:if(l!=null)switch(aa(l)){case dt.LIGHT:v=ts(.5,l);break;case dt.MED:v=Ss(.35,l);break;case dt.DARK:v=Ss(.65,l);break;case dt.NEAR_BLACK:v=ts(.1,l);break}}const C={"--color-background":v},g=a===se.COLOR?n:d;if((a===se.ACCENT||a===se.COLOR)&&t===$n.TRANSPARENT&&h){const x=$t({backgroundColor:v,contrast:g});C["--color-text"]=x}return C},[l,a,t,n,h,c,d]),f={...e,style:m};return(0,s.jsx)(jy,{...f})},LZ=({alt:e,className:t,imageId:n,l10nId:o,url:r})=>{const a=yo(e);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(vn,{alt:a,className:t,"data-l10n-id":o,id:n,src:r}),!a&&(0,s.jsx)("span",{className:"visually-hidden-always",children:"No image alternative text"})]})};class TZ extends u.Component{static defaultProps={editable:!1,isRTL:!1,items:[],onStep:()=>{},stack:!1};state={activeIndex:0,flipStateMap:{},prefersKeyboardNavigation:!0};render(){const{blockId:t,animateBlockEntrance:n,initiallyVisible:o,isHidden:r,isLearner:a,items:i,labels:c,lessonId:l,onStep:d,previewType:h,isRTL:m,settings:f,stack:v}=this.props,{activeIndex:C}=this.state,{prefersKeyboardNavigation:g}=this.state,{entranceAnimation:x,showHint:b}=f,L=X()("block-flashcards",{"block-flashcard--column":!v,"block-flashcard--stack":v,"block-flashcards--no-animation":!x}),y=f.flashcardSize==="1"?"small":f.flashcardSize==="2"?"large":i.length>2?"small":"large",T=h===sr.MOBILE_PORTRAIT||h===sr.MOBILE_LANDSCAPE;return(0,s.jsx)(we,{className:L,children:v?(0,s.jsx)(Be,{animateBlockEntrance:n,initiallyVisible:o,isLearner:a,children:(0,s.jsx)("div",{className:"block-flashcard-carousel",children:(0,s.jsx)(Ud,{blockId:t,items:i,children:({carouselRef:k})=>(0,s.jsx)(_d,{iconNameLeft:"chevron-left",iconNameRight:"chevron-right",isInfinite:!1,isRTL:m,labelCarousel:c?.a11yBlockFlashcardStack,labelCarouselRoleDesc:c?.a11yBlockFlashcardStackRoleDescription,labelSlideControls:c?.a11yBlockFlashcardStackSlideControls,labelSlideControlsGoToNext:c?.a11yBlockFlashcardStackSlideControlsGoToNext,labelSlideControlsGoToPrevious:c?.a11yBlockFlashcardStackSlideControlsGoToPrevious,labelSlideControlsGoToSlide:c?.a11yBlockFlashcardStackSlideControlsGoToSlide,labelSlideCounterPreposition:c?.blocksPreposition,labelSlidePreposition:c?.a11yBlockFlashcardStackSlidePreposition,labelSlideRoleDesc:c?.a11yBlockFlashcardStackSlideRoleDescription,onChange:this.handleCarouselChange.bind(this),ref:k,shouldMouseEmulateTouch:T,shouldUseCounter:!0,shouldUseGoToSlide:!1,children:i.map((I,E)=>(0,s.jsx)(Ny,{activeIndex:C,backDescription:I?.back?.description,backMedia:I?.back?.media,backType:I?.back?.type,frontDescription:I?.front?.description,frontMedia:I?.front?.media,frontType:I?.front?.type,id:I?.id,index:E,isHidden:r,labels:c,lessonId:l,onFlip:this.handleFlip.bind(this),onStep:d,prefersKeyboardNavigation:g,settingShowHint:b,size:"large",type:"stack",wrapElement:"div"},I?.id))})})})}):(0,s.jsx)(Be,{animateBlockEntrance:n,className:"block-flashcards__animation",initiallyVisible:o,isLearner:a,siblingDelay:.25,children:(0,s.jsx)("ol",{className:"block-flashcards__wrapper",role:"list",children:i.map((k,I)=>(0,s.jsx)(Ny,{activeIndex:C,backDescription:k?.back?.description,backMedia:k?.back?.media,backType:k?.back?.type,blockId:t,frontDescription:k?.front?.description,frontMedia:k?.front?.media,frontType:k?.front?.type,id:k?.id,index:I,isHidden:r,labels:c,lessonId:l,onStep:d,prefersKeyboardNavigation:g,settingShowHint:b,size:y,type:"grid",wrapElement:"li",wrapRole:"listitem"},k?.id))})})})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("mousedown",this.handleMouseDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("mousedown",this.handleMouseDown)}handleKeyDown=t=>{!this.state.prefersKeyboardNavigation&&!$M(t)&&this.setState({prefersKeyboardNavigation:!0})};handleMouseDown=()=>{this.state.prefersKeyboardNavigation&&this.setState({prefersKeyboardNavigation:!0})};handleFlip(t,n){this.setState(o=>({flipStateMap:{...o.flipStateMap,[t]:n}}))}handleCarouselChange(t){const{block:n,onTranscriptUpdate:o}=this.props,{flipStateMap:r}=this.state,a=r[t]?"back":"front",i=n.items?.[t],c=i?.[a]?.media,l=`items:${n?.id}/items:${i?.id}/${a}`;o?.({audioPlayerId:ps({refs:l}),transcriptMedia:c}),this.setState({activeIndex:t})}}const wy=jf(st(yl(TZ))),Kf=V("pill-button");function Ay({allowTabNavigation:e=!0,ariaLabel:t,children:n,className:o,href:r,onClick:a=()=>{},onFocus:i,ref:c,size:l="sm",testId:d,variant:h="plain"}){const m=Kf({[h]:!0,[l]:!0}).mix(o),f=!e;return r?(0,s.jsx)(nn,{"aria-hidden":f,"aria-label":t,className:m,"data-testid":d,onClick:a,onFocus:i,tabIndex:e?void 0:-1,to:r,children:(0,s.jsx)("span",{className:Kf("content"),children:n})}):(0,s.jsx)("button",{"aria-hidden":f,"aria-label":t,className:m,"data-testid":d,onClick:a,onFocus:i,ref:c,tabIndex:e?void 0:-1,type:"button",children:(0,s.jsx)("span",{className:Kf("content"),children:n})})}const Ry=({allowNext:e=!1,canProceed:t=!1,isReduceMotion:n=!1,onNext:o,onSubmit:r,quizNext:a,quizSubmit:i})=>{const c=t?!0:void 0,l=t?void 0:r,d=t?-1:void 0,h=t?void 0:!0,m=t?o:void 0,f=t?void 0:-1,v=(0,u.useRef)(null),C=(0,Oe.A)(t);(0,u.useEffect)(()=>{e&&!C&&t&&setTimeout(()=>{v.current?.focus?.({preventScroll:n})},0)},[e,t,n,C]);const g=X()("quiz-card__actions",{"quiz-card__actions--proceed":t}),x=X()("quiz-card__button","quiz-card__button--next","brand_ui",{"brand--background":t,"visually-hidden-always":!t});return(0,s.jsxs)("div",{className:g,children:[(0,s.jsx)("div",{className:"quiz-card__submit brand--ui",children:!c&&(0,s.jsx)("button",{className:"quiz-card__button","data-testid":"quiz-submit-button",onClick:l,tabIndex:d,type:"button",children:i})}),(0,s.jsx)("br",{className:"visually-hidden-always",role:"presentation"}),e&&(0,s.jsx)("div",{className:"quiz-card__next brand--ui",children:(0,s.jsx)("button",{"aria-disabled":h,"aria-hidden":h,className:x,"data-testid":"quiz-next-button",onClick:m,ref:v,tabIndex:f,type:"button",children:a})})]})},kZ=({children:e,isActive:t,isComplete:n,isTimedQuiz:o,style:r})=>(0,s.jsx)("div",{"aria-hidden":t?void 0:!0,className:IZ({isActive:t,isComplete:n,isTimedQuiz:o}),"data-testid":"quiz-card",inert:t?void 0:!0,style:r,children:(0,s.jsx)("div",{className:"quiz-card__container",children:(0,s.jsx)("div",{className:"quiz-card__row",children:(0,s.jsx)("div",{className:"quiz-card__main",children:e})})})}),IZ=({isActive:e,isComplete:t,isTimedQuiz:n})=>X()("quiz-card",{"quiz-card--active":e,"quiz-card--done":t,"quiz-card--timed":n}),Py=kZ,{FILL_IN_THE_BLANK:My,MATCHING:EZ,MULTIPLE_CHOICE:NZ,MULTIPLE_RESPONSE:jZ}=hn;function wZ(e,t){return e.map(n=>String(t(n?.title)??"")).filter(Boolean).join(", ")}function AZ(e,t,n){const o=t!=null?e.find(r=>r.id===t):e.find(r=>r.correct===!0);return String(n(o?.title)??"")}function RZ(e,t,n){return String(n(e?.[t]?.title)??"")}function Oy(e,t,n){return t.filter(e).reduce((o,r,a)=>{const i=String(n(r?.title)??"");return a===0?i:o+", "+i},"")}function PZ(e,t,n){return Oy(r=>Array.isArray(e)?e.includes(r.id):!!r.correct,t,n)}function MZ(e,t,n){return Oy((r,a)=>t.includes(a),e,n)}function OZ({answers:e,getL10nValue:t,selection:n,correctLabel:o,userLabel:r,matchLabel:a="Match Item: ",revealAnswers:i}){const c=Object.fromEntries(Object.entries(n).map(([l,d])=>[d,l]));return e.map((l,d)=>{const h=String(t(l?.title)??""),m=String(t(l?.matchTitle)??""),f=c?.[d],v=String(t(e?.[Number(f)]?.title)??"");return i===Ae.INCORRECT?`${a}${m}. ${r}: ${v}.`:`${a}${m}. ${o}: ${h}. ${r}: ${v}.`}).join(" ")}function Qf({correctAnswer:e,selectedAnswer:t,correctLabel:n,userLabel:o,revealAnswers:r}){return!e||!t||r===Ae.NONE?"":r===Ae.INCORRECT?`${o}: ${Tn(t)}.`:`${n}: ${Tn(e)}. ${o}: ${Tn(t)}.`}function BZ(e,t){return e.type===My?t?.quizAcceptableResponses:t?.a11yCorrectLive}function DZ({getL10nValue:e,isComplete:t,item:n,selection:o,labels:r,revealAnswers:a}){if(!n||!t)return null;const i=n?.answers??[],c=n?.correct,l=n?.corrects,d=BZ(n,r),h=r?.a11yAnswerLive;switch(n.type){case EZ:return OZ({getL10nValue:e,answers:i,selection:o,correctLabel:d,userLabel:h,revealAnswers:a});case My:return Qf({correctAnswer:wZ(i,e),selectedAnswer:o,correctLabel:d,userLabel:h,revealAnswers:a});case NZ:return Qf({correctAnswer:AZ(i,c,e),selectedAnswer:RZ(i,o,e),correctLabel:d,userLabel:h,revealAnswers:a});case jZ:return Qf({correctAnswer:PZ(l,i,e),selectedAnswer:MZ(i,o,e),correctLabel:d,userLabel:h,revealAnswers:a})}return null}const By=({canProceed:e,feedbackRef:t,feedbackValue:n,isActive:o,isComplete:r,isCorrect:a,item:i,labels:c,quizCorrect:l,quizIncorrect:d,revealAnswers:h,selection:m})=>{const{announcePolite:f,clearAnnouncements:v}=ys(),C=(0,Oe.A)(e),g=at(),b=!!Re(n),L=a?l:d,S=(0,u.useCallback)(()=>{const k=DZ({getL10nValue:g,isComplete:r,item:i,labels:c,revealAnswers:h,selection:m}),I=n?Tn(g(n)):"",E=L+". "+k+" "+I;let w;return E&&(w=setTimeout(()=>{f(E)},250)),()=>{clearTimeout(w)}},[f,n,g,r,i,c,L,h,m]);(0,u.useLayoutEffect)(()=>{!C&&e&&h!==Ae.NONE&&S()},[e,C,S,h]),(0,u.useEffect)(()=>v,[v]);const y=X()("quiz-card__feedback",{"quiz-card__feedback--active":e,"quiz-card__feedback--frame":b}),T=X()("quiz-card__feedback-icon",{"quiz-card__feedback-icon--correct":a});return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{"aria-hidden":o?void 0:!0,className:y,ref:t,tabIndex:o?-1:void 0,children:(0,s.jsx)("div",{className:"quiz-card__main--feedback",children:(0,s.jsxs)("div",{"aria-label":c?.a11yQuizFeedback,className:"quiz-card__feedback-wrap",role:"group",children:[(0,s.jsx)("div",{className:T,children:(0,s.jsx)("i",{"aria-hidden":"true",className:a?"icon icon-Master-05":"icon icon-Master-06"})}),(0,s.jsx)("div",{className:"quiz-card__feedback-label",children:L}),n&&(0,s.jsx)("div",{children:(0,s.jsx)(Ie,{allowTabNavigation:r&&o,className:"quiz-card__feedback-text",value:n})})]})})})})},{FILL_IN_THE_BLANK:FZ}=hn,HZ=({children:e,type:t})=>(0,s.jsx)("div",{className:$Z({type:t}),children:e}),$Z=({type:e})=>X()("quiz-card__interactive",{"quiz-card__interactive--no-border":[FZ].includes(e)}),Dy=HZ,Do=({allowTabNavigation:e,blockId:t="",enableVideoPlaybackSpeed:n,index:o,isOverlayAudio:r,item:a,labels:i={},media:c,settings:l,shouldPause:d})=>c==null||!Object.keys(c).some(h=>h!=="tmp")?null:(0,s.jsx)("div",{className:"quiz-card__media",children:(0,s.jsx)(Qt,{allowTabNavigation:e,blockId:t,enableVideoPlaybackSpeed:n,index:o,isOverlayAudio:r,item:a,labels:i,media:c,opts:l,shouldPause:d})}),Bfe=(e,t)=>n=>n>=e&&n<t,Fy=e=>e<10?`0${e}`:String(e),VZ=e=>Intl.NumberFormat(void 0,{style:"percent",maximumFractionDigits:2}).format(e),Hy=e=>e.reduce((t,n)=>n==null||isNaN(n)?t:t+n,0),zZ=(e,t)=>{const n=jn(),o=(0,Oe.A)(t);(0,u.useEffect)(()=>{!o&&t&&e&&cd()(e.focus)&&e.focus({preventScroll:n})},[t,n,o,e])},au=V("question-counter"),_Z=({isActive:e=!1,labels:t,questionLabel:n,questionNumber:o,totalQuestions:r})=>{const a=(0,u.useRef)(null);zZ(a.current,e);const i=`${t?.quizQuestion} ${o} ${t?.lessonPreposition} ${r}`,c=`${Fy(o)}/${Fy(r)}`;return(0,s.jsx)("div",{className:au(),children:(0,s.jsxs)("h1",{"aria-label":i,className:au("heading"),ref:a,tabIndex:-1,children:[(0,s.jsx)("span",{"aria-hidden":"true",className:au("label"),children:n}),(0,s.jsx)("span",{"aria-hidden":"true",className:au("count"),children:c})]})})},UZ=V("question-title"),GZ=({allowTabNavigation:e,htmlId:t,value:n})=>(0,s.jsx)(Ie,{allowTabNavigation:e,className:UZ(),"data-testid":"quiz-question-title",id:t,value:n}),WZ=({allowTabNavigation:e=!1,correctAnswerColor:t,correctAnswerColorContrast:n,errorMessageId:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isComplete:i,isCorrect:c=!1,labels:l,onEnterToSubmit:d=()=>{},onChange:h=()=>{},options:m,questionHtmlId:f="",quizAcceptableResponses:v="",quizAnswerPlaceholder:C,revealAnswers:g=Ae.NONE,value:x=""})=>{const b=(0,u.useRef)(null),[L]=(0,u.useState)(()=>br()("fitb-")),S=at(),y=KZ({options:m,getL10nValue:S}),T=`${L}-feedback`,k=`${L}-acceptable`,I=`${L}-input`,E=i?`${T} ${k}`:o||void 0,w=i?void 0:C,A=e?0:-1,N=g===Ae.ALL||g===Ae.INCORRECT,R=g===Ae.ALL||c&&g===Ae.INCORRECT,M=c?t:r,j=t&&r&&{"--fa-primary-color":$t({backgroundColor:M,contrast:c?n:a}),"--fa-secondary-color":M},O=r&&{backgroundColor:$t({backgroundColor:r,contrast:a}),fill:r,borderRadius:"50%"},B=X()("quiz-fill__icon",{"quiz-fill__icon--visible":i}),D=X()("quiz-fill__options",{"quiz-fill__options--visible":i}),H=(0,u.useCallback)(Z=>{h(Z.currentTarget.value)},[h]),$=(0,u.useCallback)(Z=>{ia(Z)&&d(Z)},[d]),W=i?void 0:H,U=i?void 0:$;return(0,s.jsxs)("div",{className:"quiz-fill",children:[(0,s.jsxs)("div",{className:"quiz-fill__container",children:[(0,s.jsx)("input",{"aria-describedby":E,"aria-hidden":!e,"aria-invalid":o?!0:void 0,"aria-labelledby":f,"aria-readonly":i,"aria-required":"true",autoComplete:"off",className:"quiz-fill__input ignore-prefers",id:I,onChange:W,onKeyDown:U,placeholder:w,readOnly:i,ref:b,tabIndex:A,type:"text",value:x}),N&&(0,s.jsxs)("div",{className:B,id:T,children:[c&&(0,s.jsx)(ie,{"aria-label":l?.quizCorrect,name:"circle-check",styleIcon:{height:"2rem",...j}}),!c&&(0,s.jsx)(eH,{"aria-label":l?.quizIncorrect,style:O})]})]}),R&&i&&(0,s.jsx)("div",{className:D,id:k,children:(0,s.jsx)(Ie,{value:`${v}: ${y}`})})]})},KZ=({options:e,getL10nValue:t})=>e.map(o=>(t(o.title)??"").trim()).join(", "),$y=WZ;function QZ({correctAnswerColor:e,correctAnswerColorContrast:t}){const n=wt(),o=$t({backgroundColor:e,contrast:t}),r=e?{"--fa-primary-color":o,"--fa-secondary-color":e}:void 0;return(0,s.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,s.jsx)(ie,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--correct",name:"circle-check",style:r}),(0,s.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,s.jsx)("span",{className:"matching-results-item-feedback-text-result",children:n?.quizCorrect})})]})}var Pa=p(82920);function YZ({correctAnswerValue:e,incorrectAnswerColor:t,incorrectAnswerColorContrast:n,shouldRevealCorrectAnswer:o}){const[r,a]=Pa.useState(!0),[i,c]=Pa.useState(!1),l=Pa.useRef(null),h=`matching-text-${Pa.useId()}`,m=wt(),f=(0,Oe.A)(e),v=Pa.useCallback(()=>{a(y=>!y)},[]);Pa.useLayoutEffect(()=>{if(f!==e){const y=l.current;y!=null&&y.scrollWidth>y.clientWidth&&c(!0)}},[f,e]);const C=$t({backgroundColor:t,contrast:n}),g=t?{"--fa-primary-color":C,"--fa-secondary-color":t}:void 0,x=X()("matching-results-item-feedback-text",{"matching-results-item-feedback-text--collapsed":r}),b=X()("matching-results-item-feedback-text-btn-icon",{"matching-results-item-feedback-text-btn-icon--collapsed":r}),L=X()("matching-results-item-feedback-text-extra",{"matching-results-item-feedback-text-extra--collapsed":r}),S=X()("matching-results-item-feedback-text-extra-text",{"matching-results-item-feedback-text-extra-text--collapsed":r});return(0,s.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,s.jsx)(ie,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--incorrect",name:"circle-xmark-duotone",style:g}),!o&&(0,s.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,s.jsx)("span",{className:"matching-results-item-feedback-text-result",children:m?.quizIncorrect})}),o&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("span",{className:x,children:[(0,s.jsxs)("span",{className:"matching-results-item-feedback-text-result",children:[m?.quizIncorrect,"."]}),i&&(0,s.jsx)("button",{"aria-controls":h,"aria-expanded":!r,"aria-label":r?m?.a11yMatchingItemShowMore:m?.a11yMatchingItemShowLess,className:"matching-results-item-feedback-text-btn",onClick:v,type:"button",children:(0,s.jsx)(ie,{className:b,name:"caret-down",style:g})}),(0,s.jsx)("span",{className:L,children:(0,s.jsxs)("span",{className:S,id:h,ref:l,children:[m?.quizCorrect,": ",(0,s.jsx)(mn,{value:e})]})})]})})]})}function ZZ({col1Id:e,col1Value:t,col2Id:n,col2Value:o,correctAnswerColor:r,correctAnswerColorContrast:a,correctAnswerValue:i,height:c,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,revealAnswers:h}){const m=e===n,f=h!=="incorrect",v=h!=="none";return(0,s.jsxs)("li",{className:"matching-results-item",role:"listitem",children:[(0,s.jsxs)("div",{className:"matching-results-item-pieces",children:[(0,s.jsxs)("div",{className:"matching-results-item-piece",style:c?{height:c}:void 0,children:[(0,s.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,s.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,s.jsx)("span",{className:"matching-results-item-piece-content",children:(0,s.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,s.jsx)(mn,{value:t})})})]}),(0,s.jsxs)("div",{className:"matching-results-item-piece",children:[(0,s.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,s.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,s.jsx)("span",{className:"matching-results-item-piece-content",children:(0,s.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,s.jsx)(mn,{value:o})})})]})]}),v&&m&&(0,s.jsx)(QZ,{correctAnswerColor:r,correctAnswerColorContrast:a}),v&&!m&&(0,s.jsx)(YZ,{correctAnswerValue:i,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,shouldRevealCorrectAnswer:f})]})}function XZ({answers:e,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,itemHeight:i,revealAnswers:c,rows:l}){return(0,s.jsx)("div",{className:"matching-results",children:(0,s.jsx)("ul",{className:"matching-results-list",role:"list",children:l.map((d,h)=>{const[m,f]=d,v=t==="freezeFirst"?e.find(C=>C.id===m.id)?.matchTitle:e.find(C=>C.id===f.id)?.title;return(0,s.jsx)(ZZ,{col1Id:m.id,col1Value:m.value,col2Id:f.id,col2Value:f.value,correctAnswerColor:n,correctAnswerColorContrast:o,correctAnswerValue:v,height:i,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,revealAnswers:c},h)})})})}function qZ(e){return Object.keys(e).length===0}function JZ(e,t){return t in e}function eX(e,t){return Object.values(e).includes(t)}function Yf(e,t){for(const n in e)if(e[n]===t)return n}function tX(e,t,n){return{...e,[t]:n}}function iu(e,t){return t in e?fo(e,[t]):e}function nX(e,t){const n=Yf(e,t);return n===void 0?e:iu(e,n)}function Vy(e,t,n){let o=iu(e,t);return o=nX(o,n),tX(o,t,n)}function sX(e){return Object.keys(e).length}var oX=p(93481),Zf=p.n(oX);Zf().dynamicDrop(!0),Zf().pointerMoveTolerance(8);const js=Zf();var Ma=p(82920);function rX(e,{onStart:t,onMove:n,onEnd:o,isEnabled:r=!0}){const a=Ma.useRef({x:0,y:0}),i=Ma.useRef({x:0,y:0}),c=Ma.useRef(!1),l=Ma.useRef(null),d=Ma.useRef(void 0);Ma.useEffect(()=>{const h=e.current;if(!h||!r||c.current)return;l.current=Kx(h);function m(){const f=l.current;return f instanceof Window?{x:window.scrollX,y:window.scrollY}:{x:f.scrollLeft,y:f.scrollTop}}return d.current=()=>{const f=m(),v=f.x-i.current.x,C=f.y-i.current.y;(v!==0||C!==0)&&(a.current.x+=v,a.current.y+=C,e.current&&(e.current.style.transform=`translate3d(${a.current.x}px, ${a.current.y}px, 0)`,n?.({...a.current})),i.current=f)},js(h).draggable({inertia:!1,autoScroll:{container:l.current,distance:5,interval:10,margin:50},listeners:{start:()=>{a.current={x:0,y:0},i.current=m(),l.current?.addEventListener("scroll",d.current,{passive:!0}),t?.()},move:f=>{a.current.x+=f.dx,a.current.y+=f.dy,h.style.transform=`translate3d(${a.current.x}px, ${a.current.y}px, 0)`,n?.({...a.current})},end:()=>{a.current={x:0,y:0},h.style.transform="",l.current?.removeEventListener("scroll",d.current),setTimeout(()=>{o?.()},0)}}}),c.current=!0,()=>{js(h).unset(),l.current?.removeEventListener("scroll",d.current),c.current=!1}},[e,t,n,o,r])}var zy=p(82920);function aX(e,{isEnabled:t=!0,onDrop:n,onEnter:o,onLeave:r,overlap:a=.015}){const i=zy.useRef(!1);zy.useEffect(()=>{const c=e.current;if(!(!c||!t||i.current))return js(c).dropzone({overlap:a,listeners:{drop:()=>{n?.()},dragenter:()=>{o?.()},dragleave:()=>{r?.()}}}),i.current=!0,()=>{js(c).unset(),i.current=!1}},[e,n,o,r,t,a])}var Kn=p(82920);const _y=Kn.memo(function({col:t,height:n,id:o,index:r,isActive:a,isFrozen:i,isMatched:c,isMoved:l,onClick:d,onDragEnd:h,onDragStart:m,onDrop:f,onDropZoneEnter:v,onDropZoneLeave:C,onKeyDown:g,value:x,valueOtherColumnActive:b,valueOtherColumnMatch:L}){const[S,y]=Kn.useState(!1),T=Kn.useRef(null),k=Kn.useRef(null),I=wt(),E=Kn.useCallback(()=>{d({col:t,id:o,value:x})},[t,o,d,x]),w=Kn.useCallback(()=>{y(!0),m({col:t,id:o,value:x})},[t,o,m,x]),A=Kn.useCallback(()=>{h(),y(!1)},[h]),N=Kn.useCallback(()=>{f({col:t,id:o,value:x})},[t,o,f,x]),R=Kn.useCallback(()=>{v({col:t,id:o,value:x})},[t,o,v,x]),M=Kn.useCallback(()=>{C()},[C]),P=Kn.useCallback(H=>{g(H,{col:t,index:r})},[t,r,g]);Kn.useEffect(()=>{t===1&&r===0||k.current?.setAttribute("tabindex","-1")},[]),rX(T,{isEnabled:!i,onStart:w,onEnd:A}),aX(T,{isEnabled:i,onDrop:N,onEnter:R,onLeave:M});const j=X()("matching-interaction-piece",{"matching-interaction-piece--matched":c,"matching-interaction-piece--moved":l}),O=L==null?null:(0,s.jsxs)(s.Fragment,{children:[I?.a11yMatchingItemMatchedWith," ",(0,s.jsx)(mn,{value:L})]}),B=b==null?(0,s.jsx)(s.Fragment,{children:I?.a11yMatchingItemSelectableItem}):(0,s.jsxs)(s.Fragment,{children:[I?.a11yMatchingItemMatchWith," ",(0,s.jsx)(mn,{value:b})]}),D=X()("matching-interaction-item",{draggable:!i,"draggable--dragging":!i&&S,droppable:i});return(0,s.jsx)("li",{className:D,ref:T,role:"listitem",children:(0,s.jsxs)("button",{"aria-pressed":a||c?!0:void 0,className:j,"data-state":a?"active":void 0,onClick:S?void 0:E,onKeyDown:P,ref:k,style:n?{height:n}:void 0,type:"button",children:[i?(0,s.jsx)("span",{className:"matching-interaction-piece-decoration"}):(0,s.jsx)(ie,{className:"matching-interaction-piece-decoration",name:"grip-dots-vertical"}),t===2?(0,s.jsx)("span",{className:"matching-interaction-piece-jigsaw"}):null,(0,s.jsx)("span",{className:"matching-interaction-piece-content",children:(0,s.jsx)("span",{"data-matching-interaction-piece-content-inline":"",children:(0,s.jsx)(mn,{value:x})})}),(0,s.jsx)("span",{className:"visually-hidden-always",children:O}),(0,s.jsx)("span",{className:"visually-hidden-always",children:B})]},o)})});var _e=p(82920);function iX({answers:e,columnBehavior:t,isActive:n,itemHeight:o,matches:r,onChange:a,onChangeItemHeight:i,onChangeRows:c,prefersKeyboardNavigation:l}){const d=(0,Oe.A)(n),h=(0,Oe.A)(t),m=(0,Oe.A)(e),f=(0,Oe.A)(r),v=wt(),[C,g]=_e.useState(void 0),[x,b]=_e.useState(void 0),[L,S]=_e.useState(void 0),[y,T]=_e.useState(!1),k=_e.useRef(null),I=_e.useRef(null),E=_e.useRef(null),w=_e.useRef(void 0),A=_e.useRef(void 0),[N,R]=_e.useState(()=>cu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),[M,P]=_e.useState(()=>cu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})),j=_e.useMemo(()=>e.map(_=>({col:1,id:_.id,value:_.title})).toSorted((_,K)=>{const Y=N.get(_.id)??1/0,q=N.get(K.id)??1/0;return Y-q}),[e,N]),O=_e.useMemo(()=>e.map(_=>({col:2,id:_.id,value:_.matchTitle})).toSorted((_,K)=>{const Y=M.get(_.id)??1/0,q=M.get(K.id)??1/0;return Y-q}),[e,M]),B=_e.useCallback(()=>{for(const F of k.current?.querySelectorAll('button:not([tabindex="-1"])')??[])F.setAttribute("tabindex","-1")},[]),D=_e.useCallback(F=>{const _=Array.from(N),K=Array.from(M);if(t==="freezeSecond"){const Y=new Array(K.length),q=_.map(re=>re[0]).filter(re=>!(re in F));for(const[re,oe]of Object.entries(F)){const Se=M.get(oe);Y[Se]=[re,Se]}for(let re=0;re<Y.length;re++)if(Y[re]==null){const oe=q.shift();Y[re]=[oe,re]}const J=new Map(Y),ee=Uy(N,J);ee.length>0&&b(ee),R(J)}else{const Y=new Array(_.length),q=new Set(Object.values(F)),J=K.map(oe=>oe[0]).filter(oe=>!q.has(oe));for(const[oe,Se]of Object.entries(F)){const G=N.get(oe);Y[G]=[Se,G]}for(let oe=0;oe<Y.length;oe++)if(Y[oe]==null){const Se=J.shift();Y[oe]=[Se,oe]}const ee=new Map(Y),re=Uy(M,ee);re.length>0&&S(re),P(ee)}},[t,N,M]),H=_e.useCallback(F=>{w.current=F},[]),$=_e.useCallback(()=>{A.current==null&&(w.current=void 0)},[]),W=_e.useCallback(F=>{A.current=F},[]),U=_e.useCallback(()=>{A.current=void 0},[]),Z=_e.useCallback(F=>{const _=w.current;if(_!=null){const K=F.col===1?F.id:_.id,Y=F.col===1?_.id:F.id,q=Vy(r,K,Y);w.current=void 0,A.current=void 0,a(q)}},[r,a]),ne=_e.useCallback(F=>{let _=null,K=!1,Y=C;if(F.col===1&&F.id in r)_=iu(r,F.id),Y=null;else if(F.col===2&&Yf(r,F.id)){const q=Yf(r,F.id);_=iu(r,q),Y=null}else C==null&&(Y={col:F.col,id:F.id,value:F.value},K=!0);if(C!=null)if(C.col===F.col)C.id===F.id?Y=null:Y={col:F.col,id:F.id,value:F.value};else{const q=F.col===1?F.id:C.id,J=F.col===1?C.id:F.id;_=Vy(r,q,J),K=!0,Y=null}if(_!=null&&a(_),C!==Y&&g(Y),K){const J=(F.col===1?E:I).current?.querySelector('button:not([aria-pressed="true"])');J&&(B(),J.removeAttribute("tabindex"),J.focus({preventScroll:!l}))}},[l,C,r,a,B]),Q=_e.useCallback((F,{col:_,index:K})=>{const Y=F.currentTarget;let q=!1,J=null;switch(F.key){case"ArrowUp":q=!0,J=Y.parentElement.previousElementSibling?.firstElementChild;break;case"ArrowDown":q=!0,J=Y.parentElement.nextElementSibling?.firstElementChild;break;case"ArrowRight":q=!0,J=_===1?E.current?.children[K]?.firstElementChild:void 0;break;case"ArrowLeft":q=!0,J=_===2?I.current?.children[K]?.firstElementChild:void 0;break;case"Home":q=!0,J=Y.closest("ul").firstElementChild.firstElementChild;break;case"End":q=!0,J=Y.closest("ul").lastElementChild.firstElementChild;break}q&&(F.preventDefault(),F.stopPropagation()),J&&(B(),J.removeAttribute("tabindex"),J.focus())},[B]);_e.useEffect(()=>{r!==f&&!qZ(r)&&D(r)},[D,r,f]),_e.useEffect(()=>{const F=({shouldFocus:Y})=>{const q=C.col===1?I:E;B();const J=q.current.querySelector('button[data-state="active"]');J?.removeAttribute("tabindex"),Y&&J?.focus(),g(null)},_=Y=>{k.current?.contains(Y.target)||F({shouldFocus:!1})},K=Y=>{fn(Y)&&C!=null&&F({shouldFocus:!0})};return C==null?(document.removeEventListener("mousedown",_),document.removeEventListener("keydown",K)):(document.addEventListener("mousedown",_),document.addEventListener("keydown",K)),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",K)}},[C,B]);const z=_e.useCallback(()=>{const F=Array.from(k.current?.querySelectorAll("[data-matching-interaction-piece-content-inline]")??[]);if(F.length===0)return;const _=F[0].closest("button");let K=0,Y;if(_){const J=window.getComputedStyle(_),ee=parseFloat(J.paddingBlockStart)+parseFloat(J.paddingBlockEnd),re=parseFloat(J.borderTopWidth)+parseFloat(J.borderBottomWidth);K=ee+re,Y=parseFloat(J.minHeight)}const q=F.reduce((J,ee)=>Math.max(J,ee.scrollHeight+K),0);Y&&Y>=q?i(void 0):i(q)},[i]);return _e.useEffect(()=>{(!d&&n||m!==e)&&z()},[d,n,e,m,z]),_e.useEffect(()=>{const F=k.current?.closest(".quiz-card");let _;return F!=null&&(_=new ResizeObserver(()=>{z()}),_.observe(F)),()=>{F!=null&&_!=null&&_.unobserve(F)}},[z]),_e.useEffect(()=>{let F,_;return x&&(F=setTimeout(()=>{b(void 0)},1e3)),L&&(_=setTimeout(()=>{S(void 0)},1e3)),()=>{clearTimeout(F),clearTimeout(_)}},[x,L]),_e.useEffect(()=>{y&&h!==t&&(a({}),D({}),g(void 0),R(cu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),P(cu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})))},[y,t,h,e,a,D]),_e.useEffect(()=>{if(j.length<=0)return;const F=j.map((_,K)=>[_,O[K]]);c(F)},[j,O,c]),_e.useEffect(()=>{T(!0)},[]),(0,s.jsxs)("div",{className:"matching-interaction","data-testid":"matching-interaction",ref:k,children:[(0,s.jsx)("ul",{"aria-label":v?.a11yMatchingColumn1,className:"matching-interaction-col matching-interaction-col-1","data-col":"1",ref:I,role:"list",children:j.map((F,_)=>{const K=JZ(r,F.id);return(0,s.jsx)(_y,{col:1,height:o,id:F.id,index:_,isActive:C?.col===1&&C?.id===F.id,isFrozen:t==="freezeFirst",isMatched:K,isMoved:x?.map(Y=>Y.id).includes(F.id)??!1,onClick:ne,onDragEnd:$,onDragStart:H,onDrop:Z,onDropZoneEnter:W,onDropZoneLeave:U,onKeyDown:Q,value:F.value,valueOtherColumnActive:C?.col===2?C?.value:void 0,valueOtherColumnMatch:K?O[_]?.value:void 0},F.id)})}),(0,s.jsx)("ul",{"aria-label":v?.a11yMatchingColumn2,className:"matching-interaction-col matching-interaction-col-2","data-col":"2",ref:E,role:"list",children:O.map((F,_)=>{const K=eX(r,F.id);return(0,s.jsx)(_y,{col:2,height:o,id:F.id,index:_,isActive:C?.col===2&&C?.id===F.id,isFrozen:t==="freezeSecond",isMatched:K,isMoved:L?.map(Y=>Y.id).includes(F.id)??!1,onClick:ne,onDragEnd:$,onDragStart:H,onDrop:Z,onDropZoneEnter:W,onDropZoneLeave:U,onKeyDown:Q,value:F.value,valueOtherColumnActive:C?.col===1?C?.value:void 0,valueOtherColumnMatch:K?j[_]?.value:void 0},F.id)})})]})}const cu=({answers:e,columnBehavior:t,columnBehaviorToShuffle:n})=>{let o=e.map(r=>r.id);return t===n&&(o=(0,r0.shuffle)(o)),new Map(o.map((r,a)=>[r,a]))};function Uy(e,t){const n=[];for(const[o,r]of e){const a=t.get(o);a!==r&&n.push({id:o,from:r,to:a})}return n}var lu=p(82920);function Gy({columnBehavior:e="freezeSecond",matches:t={},onChange:n=()=>{},revealAnswers:o="none",...r}){const[a,i]=lu.useState([]),[c,l]=lu.useState(void 0),d=lu.useCallback(m=>{i(m)},[]),h=lu.useCallback(m=>{l(m)},[]);return r.isComplete?(0,s.jsx)(XZ,{...r,columnBehavior:e,itemHeight:c,revealAnswers:o,rows:a}):(0,s.jsx)(iX,{...r,columnBehavior:e,itemHeight:c,matches:t,onChange:n,onChangeItemHeight:h,onChangeRows:d})}function Wy(e){return e==null||e===-1}function cX(e,t){return e===t}const lX=({allowTabNavigation:e=!1,color:t,correctId:n="",errorMessageId:o,isComplete:r,isCorrect:a=!1,isReduceMotion:i=!1,labels:c,onChange:l=()=>{},onEnterToSubmit:d=()=>{},options:h=[],questionHtmlId:m="",renderOptionText:f,isRetaking:v,revealAnswers:C=Ae.NONE,selectedIndex:g=-1,shouldFocusFirst:x,onFocusFirstComplete:b})=>{const L=Wy(g);return(0,s.jsx)(cc,{"aria-invalid":o?!0:void 0,"aria-labelledby":[m,o].filter(Boolean).join(" "),"aria-required":"true",role:"radiogroup",children:h.map((S,y,T)=>(0,s.jsx)(dX,{allowTabNavigation:e,color:t,id:S.id,index:y,isComplete:r,isCorrect:a,isCorrectOption:n===S.id,isFirst:y===0,isFresh:L,isLast:y===T.length-1,isReduceMotion:i,isRetaking:v,isSelected:!v&&cX(g,y),labels:c,onChange:l,onEnterToSubmit:d,onFocusFirstComplete:b,questionHtmlId:m,renderOptionText:f,revealAnswers:C,shouldFocusFirst:x,title:S.title},S.id))})},dX=({allowTabNavigation:e,color:t,id:n,index:o,isComplete:r,isCorrect:a,isCorrectOption:i,isFresh:c,isSelected:l,isReduceMotion:d,labels:h,onChange:m,onEnterToSubmit:f,questionHtmlId:v,renderOptionText:C,isRetaking:g,revealAnswers:x,shouldFocusFirst:b,onFocusFirstComplete:L,title:S})=>{const[y]=(0,u.useState)(()=>br()("qmc-")),T=(0,u.useRef)(null),k=(0,Oe.A)(l),I=!!r,E=e&&(l||c&&o===0)?0:-1,w=x===Ae.ALL,A=x==Ae.INCORRECT,N=w||A&&a,R=w||A&&a||A&&!a&&l,M=r&&i&&N,P=r&&!i&&R,j=(M||P)&&!g,O=j?`${y}-result`:void 0,B=X()("quiz-multiple-choice-option",{"is-complete":r,"is-correct":M,"is-incorrect":P,"is-selected":l}),D=X()("quiz-multiple-choice-option__dot",{"quiz-multiple-choice-option__dot--active":l&&!r}),H=X()("quiz-multiple-choice-option__check",{"quiz-multiple-choice-option__check--active":M}),$=X()("quiz-multiple-choice-option__x",{"quiz-multiple-choice-option__x--active":P}),W=X()("quiz-multiple-choice-option__border"),U=(0,u.useCallback)(z=>{ia(z)&&f(z)},[f]),Z=(0,u.useCallback)(()=>{m({selectedIndex:o})},[o,m]),ne=(0,u.useCallback)(()=>{l&&m({selectedIndex:o})},[o,l,m]),Q=r?void 0:U;return(0,u.useEffect)(()=>{e&&T.current&&(!k&&l?T.current.focus({preventScroll:d}):b&&c&&o===0&&(T.current.focus({preventScroll:d}),L?.()))},[e,l,d,k,b,c,o,L]),(0,s.jsxs)("div",{"data-testid":"quiz-card-option",children:[(0,s.jsxs)("label",{"aria-describedby":O,className:B,ref:T,children:[(0,s.jsx)("input",{checked:l,className:"quiz-multiple-choice-option__input",disabled:I,name:v,onChange:Z,onClick:r?void 0:ne,onKeyDown:Q,tabIndex:E,type:"radio"}),(0,s.jsxs)("div",{className:"quiz-multiple-choice-option__indicator",style:{color:t},children:[(0,s.jsx)(PD,{className:D,dataTestId:l&&!r?"selected-dot-active":"selected-dot"}),(0,s.jsx)(gx,{className:H,"data-testid":M?"correct-check-active":"correct-check"}),(0,s.jsx)(yx,{"aria-hidden":"true",className:$,dataTestId:P?"incorrect-x-active":"incorrect-x",overrideStyle:!0})]}),(0,s.jsx)("div",{className:W}),(0,s.jsx)("div",{className:"quiz-multiple-choice-option__text","data-testid":"quiz-mc-option-text",children:C({optionId:n,title:S})})]}),j&&(0,s.jsxs)("div",{className:"visually-hidden-always",id:O,children:[l&&i&&h?.a11yQuizReviewCorrectlySelected,l&&!i&&h?.a11yQuizReviewIncorrectlySelected,!l&&i&&h?.a11yQuizReviewIncorrectlyUnselected,!l&&!i&&h?.a11yQuizReviewCorrectlyUnselected]})]})},Ky=lX;function uX(e){return e.length===0}function hX(e,t){return e.includes(t)}function mX(e,t){return e.includes(t)?e.filter(n=>n!==t):[...e,t]}const fX=({allowTabNavigation:e=!1,correctIds:t=[],errorMessageId:n,isComplete:o,isCorrect:r=!1,labels:a,onChange:i=()=>{},onEnterToSubmit:c=()=>{},options:l=[],questionHtmlId:d="",renderOptionText:h,isRetaking:m,revealAnswers:f=Ae.NONE,selectedIndices:v=[]})=>(0,s.jsx)("div",{"aria-labelledby":[d,n].filter(Boolean).join(" "),role:"group",children:(0,s.jsx)("ul",{children:l.map((C,g)=>(0,s.jsx)(pX,{allowTabNavigation:e,errorMessageId:n,id:C.id,index:g,isComplete:o,isCorrect:r,isCorrectOption:t.includes(C.id),isRetaking:m,isSelected:!m&&hX(v,g),labels:a,onChange:i,onEnterToSubmit:c,renderOptionText:h,revealAnswers:f,title:C.title},C.id))})}),pX=({allowTabNavigation:e,errorMessageId:t,id:n,index:o,isComplete:r,isCorrect:a,isCorrectOption:i,isSelected:c,labels:l,onChange:d,onEnterToSubmit:h,renderOptionText:m,isRetaking:f,revealAnswers:v,title:C})=>{const[g]=(0,u.useState)(()=>br()("qmr-")),x=r&&v===Ae.ALL&&!f,b=x?`${g}-result`:void 0,L=!!r,S=e?0:-1,y=v===Ae.ALL,T=v==Ae.INCORRECT,k=y||T&&a||T&&!a&&c,I=X()("quiz-multiple-response-option",{"quiz-multiple-response-option--complete":r,"quiz-multiple-response-option--selected":c,"quiz-multiple-response-option--correct":r&&i&&k,"quiz-multiple-response-option--incorrect":r&&!i&&k}),E=X()("quiz-multiple-response-option__border"),w=(0,u.useCallback)(R=>{ia(R)&&h(R)},[h]),A=(0,u.useCallback)(()=>{d({optionIndex:o})},[o,d]),N=r?void 0:w;return(0,s.jsxs)("li",{children:[(0,s.jsxs)("label",{"aria-describedby":b,className:I,children:[(0,s.jsx)("input",{"aria-describedby":t||void 0,"aria-invalid":t?!0:void 0,checked:c,className:"quiz-multiple-response-option__input",disabled:L,onChange:r?void 0:A,onKeyDown:N,tabIndex:S,type:"checkbox"}),(0,s.jsxs)("div",{className:"quiz-multiple-response-option__indicator",children:[(0,s.jsx)(gx,{className:"quiz-multiple-response-option__check"}),(0,s.jsx)(yx,{"aria-hidden":"true",className:"quiz-multiple-response-option__x",height:"8",overrideStyle:!0,width:"8"})]}),(0,s.jsx)("div",{className:E}),(0,s.jsx)("div",{className:"quiz-multiple-response-option__text",children:m({optionId:n,title:C})})]}),x&&(0,s.jsxs)("div",{className:"visually-hidden-always",id:b,children:[c&&i&&l?.a11yQuizReviewCorrectlyChecked,c&&!i&&l?.a11yQuizReviewIncorrectlyChecked,!c&&i&&l?.a11yQuizReviewIncorrectlyUnchecked,!c&&!i&&l?.a11yQuizReviewCorrectlyUnchecked]})]})},Qy=fX;var $fe,gX,vX,Vfe,zfe,_fe,Ufe;const CX=Ds()(Ze()("correct",!0)),Gfe=e=>gX(vX(e),Xf),xX=e=>({MATCHING:Ee(),FILL_IN_THE_BLANK:qf,MULTIPLE_CHOICE:Ee(),MULTIPLE_RESPONSE:Ee()})[e],Xf=Me()(Zu()("id"),CX),bX=Me()(ko(),Xf),qf=Ds()(Ze()("correct",!0)),yX=Me()(Ye()("id"),ko()),Wfe=null,{FILL_IN_THE_BLANK:SX,MATCHING:Yy,MULTIPLE_CHOICE:LX,MULTIPLE_RESPONSE:TX}=hn;function Zy({type:e,text:t="",matches:n={},answersLength:o=0,selectedIndices:r=[],selectedIndex:a}){switch(e){case SX:return!T1(t);case Yy:return sX(n)===o;case TX:return!uX(r);case LX:default:return!Wy(a)}}function kX({answered:e=!1,...t}){return e&&t.type!==Yy?!1:Zy(t)}function Xy(e,t){const n=e.trim();return t?n:n.toLowerCase()}function qy({answers:e,text:t,caseSensitive:n=!1,getL10nValue:o}){if(!t)return!1;const r=Xy(t,n);return e.some(a=>{const i=o(a.title);return typeof i!="string"?!1:Xy(i,n)===r})}function Jy(e){return Object.entries(e).every(([t,n])=>t===String(n))}function IX(e){const t=e.answers??[],n=e.correct;if(n!=null)return t.findIndex(r=>r.id===n);const o=t.findIndex(r=>r.correct===!0);return o===-1?0:o}function e6({isCorrectAnswerUnshuffled:e=!1,isShuffled:t=!1,item:n,selectedIndex:o,shuffledAnswerIndices:r}){if(o==null||t&&!Array.isArray(r))return!1;const a=t&&!e?r.indexOf(o):o,i=IX(n);return a===i}function EX(e,t){return t.map(n=>e.indexOf(n))}function NX(e){return typeof e=="object"&&e!==null&&"id"in e?e.id:e}function jX(e){const t=e.answers??[],n=e.corrects??[];return n.length>0?n.map(a=>{const i=NX(a);return t.findIndex(c=>c.id===i)}).filter(a=>a>=0).sort((a,i)=>a-i):t.map((r,a)=>r.correct===!0?a:-1).filter(r=>r>=0).sort((r,a)=>r-a)}function t6(e){return[...e].sort((t,n)=>t-n)}function n6({isShuffled:e=!1,item:t,selectedIndices:n,shuffledAnswerIndices:o}){if(!Array.isArray(n)||e&&!Array.isArray(o))return!1;const r=e?EX(o,n):n,a=jX(t),i=t6(r),c=t6(a);return i.length!==c.length?!1:i.every((l,d)=>l===c[d])}function s6({answers:e,feedback:t,feedbackCorrect:n,feedbackIncorrect:o,feedbackType:r,isCorrect:a,isShuffled:i=!1,selectedIndex:c,shuffledAnswerIndices:l}){switch(r){case"CHOICE":{if(c==null||!e)return;const d=i&&Array.isArray(l)?l.indexOf(c):c;return e[d]?.feedback}case"CORRECT_INCORRECT":return a?n:o;default:return t}}var wX=p(19199),AX=p.n(wX),Kfe=p(75318),RX,o6,PX,MX,OX;const r6="owner",BX="manager",DX="editor",Qfe="viewer",a6=null,Jf=({effectiveRole:e,requiredRole:t})=>{const n=o6(e,a6),o=o6(t,a6);return n>=o},FX=e=>({editor:Jf({effectiveRole:e,requiredRole:DX}),manager:Jf({effectiveRole:e,requiredRole:BX}),owner:Jf({effectiveRole:e,requiredRole:r6})}),Yfe=(e,t,n)=>{const{authorId:o}=e,r=o===n,a=c=>r||c,i=HX(t);return MX(PX(["canChangePermissions","canMoveTo"]),RX({canDelete:a,canEdit:a,canMove:a,canRename:a,canUnshare:a}))(i)},HX=e=>{const{effectiveRole:t,type:n}=e||[],o=n!==OX?r6:t,{editor:r,manager:a,owner:i}=FX(o);return{canChangePermissions:a,canCreate:r,canDelete:i,canEdit:r,canMove:a,canMoveTo:r,canRename:r,canUnshare:i}};var $X,VX,fc,zX,_X,UX,GX,i6,Oa,WX,c6,l6,KX,QX,pc,YX,ZX,d6,XX,du,qX,JX,u6,eq,h6,tq,nq,Ba;const sq={[hn.FILL_IN_THE_BLANK]:"fillin",[hn.MATCHING]:"matching",[hn.MULTIPLE_CHOICE]:"multiple choice",[hn.MULTIPLE_RESPONSE]:"multiple response"},uu="personal",m6="team",Zfe=500,Xfe=null,qfe=null,f6=({questions:e=[],drawnQuestionIds:t=[]})=>{const n=a=>!t.some(i=>i.includes(a.id)),o=e.filter(n),r=Math.floor(Math.random()*o.length);return o[r]??null},oq=e=>t=>t.type===uu||h6({effectiveRole:t.effectiveRole,requiredRole:e}),rq=({folders:e,requiredRole:t,teamAccount:n})=>Ba(e,u6,c6,Oa(o=>oq(t)&&(n||o.type===uu))),Jfe=({questionBanks:{folders:e,questionBanks:t},requiredRole:n=tq,teamAccount:o,term:r})=>{if(r&&QX(JX(r)))return{folders:[],questionBanks:[]};const a=new RegExp("("+eq(r)+")","i"),i=rq({folders:e,requiredRole:n,teamAccount:o}),c=d6("id",i),l=Oa(h=>h.title.match(a)&&!h.deleted,i),d=Oa(h=>(pc(h.folderId)||i6(h.folderId,c))&&h.title.match(a)&&!h.deleted,t);return{folders:l,questionBanks:d}},p6=(e,t,n=!1)=>Ba(t,KX(fc(!pc(e)),XX(e),ZX(u6,c6)),qX(du("deleted",!n))),aq=(e,t,n,o=!1)=>{const r=e===m6,a=e===uu,i=Ba(p6(m6,n),d6("id")),c=l=>!pc(l.folderId)&&i6(l.folderId,i);return Ba(t,Oa(GX([[fc(o),l=>l.deleted],[fc(r),l=>!l.deleted&&c(l)],[fc(a),l=>!l.deleted&&!c(l)],[fc(pc(e)),l=>!l.deleted],[$X,l6]])))},iq=({type:e})=>e===uu,g6=({effectiveRole:e})=>h6({effectiveRole:e,requiredRole:nq}),cq=(e,t)=>({id:n})=>n?UX(zX(l6),YX(VX([du("folderId",n),du("authorId",e)])))(t):!1,lq=(e,t,n,o)=>Ba(p6(t,e),Oa(_X([iq,g6,cq(o,n)]))),dq=(e,t)=>n=>{if(pc(n.folderId))return!0;const o=WX(du("id",n.folderId),e);if(!o)return!1;const r=g6(o),a=n.authorId===t;return r||a},uq=(e,t,n,o,r)=>Ba(aq(e,t,n),Oa(dq(o,r))),epe=(e,t,n,o)=>{const r=lq(e,n,t,o),a=uq(n,t,e,r,o);return{folders:r,questionBanks:a}},hq=(e,t,n=[])=>{const o=t[e],{parentId:r}=o||{},{type:a}=t?.[r]||{},i=o?[o,...n]:n;return!r||o.type!==a?i:hq(r,t,i)},{FILL_IN_THE_BLANK:Da,MATCHING:hu,MULTIPLE_CHOICE:mu,MULTIPLE_RESPONSE:fu}=hn,mq={FILL_IN_THE_BLANK:"a11yBlockKnowledgeCheckFIB",MATCHING:"a11yBlockKnowledgeCheckM",MULTIPLE_CHOICE:"a11yBlockKnowledgeCheckMC",MULTIPLE_RESPONSE:"a11yBlockKnowledgeCheckMR"},fq=bt()(null,[0,"type"]),ep=jn();class v6 extends u.Component{static get defaultProps(){return{items:[],lessonId:"",blockId:"",onStep:Function.prototype}}retakeAnimationStageOne;retakeAnimationStageTwo;feedbackRef;takeAgainRef;block;wrapper;id;constructor(t){super(t),this.state={errorIncomplete:!1,selectedAnswer:null,selectedIndices:[],chosen:!1,answered:!1,fillInText:"",matches:{},questionHtmlId:`q-${Qd()()}`},this.retakeAnimationStageOne=null,this.retakeAnimationStageTwo=null,this.feedbackRef=(0,u.createRef)(),this.takeAgainRef=(0,u.createRef)(),this.getSelection=this.getSelection.bind(this),this.handleFillIn=this.handleFillIn.bind(this),this.handleChoiceSelect=this.handleChoiceSelect.bind(this),this.handleMultipleResponseChange=this.handleMultipleResponseChange.bind(this),this.handleRetake=this.handleRetake.bind(this),this.renderQuestionTitle=this.renderQuestionTitle.bind(this),this.renderMultipleResponseOptionText=this.renderMultipleResponseOptionText.bind(this),this.renderMultipleChoiceOptionText=this.renderMultipleChoiceOptionText.bind(this),this.previewOnly__forceShowFeedback=this.previewOnly__forceShowFeedback.bind(this),this.previewOnly__clearOverrides=this.previewOnly__clearOverrides.bind(this),window.addEventListener(Ue,this.previewOnly__forceShowFeedback),window.addEventListener(Gh,this.previewOnly__clearOverrides),this.id=br()("kc-")}componentDidUpdate(t,n){n.answered&&!this.state.answered?this.getType()!==Da&&Hm(this.wrapper):!n.answered&&this.state.answered&&setTimeout(()=>{this.takeAgainRef.current?this.takeAgainRef.current.focus():this.feedbackRef.current?.focus()},0)}componentWillUnmount(){this.retakeAnimationStageOne&&(clearTimeout(this.retakeAnimationStageOne),this.retakeAnimationStageOne=null),this.retakeAnimationStageTwo&&(clearTimeout(this.retakeAnimationStageTwo),this.retakeAnimationStageTwo=null),window.removeEventListener(Ue,this.previewOnly__forceShowFeedback),window.removeEventListener(Gh,this.previewOnly__clearOverrides)}previewOnly__forceShowFeedback(t){const{itemId:n,path:o}=t.detail,{getL10nValue:r}=this.props;if(n!==this.props.blockId)return;const a=o.at(-1);if(typeof a=="string"&&a.startsWith?.("feedback")){const i=a==="feedbackCorrect",c=o.indexOf("answers"),l=o[c+1],d=c>-1&&typeof l!="string"?l.id:null,h={forceShowFeedback:!0,forceShowFeedbackCorrect:i,forceShowFeedbackMessage:""};if(d&&"answers"in this.props.items[0]){const m=this.props.items[0].answers.find(({id:v})=>v===d),f=m&&"feedback"in m?m?.feedback:void 0;h.forceShowFeedbackCorrect=m?.correct??!1,h.forceShowFeedbackMessage=r(f)}this.setState(h)}}previewOnly__clearOverrides(){this.setState({forceShowFeedback:!1,forceShowFeedbackCorrect:!1})}getSelection({item:t}){switch(t.type){case Da:return this.state.fillInText;case hu:return this.state.matches;case fu:return this.state.selectedIndices;case mu:default:return this.state.selectedAnswer}}handleMatchesChange=t=>{this.setState({errorIncomplete:!1,matches:t})};handleMultipleResponseChange({optionIndex:t}){const{selectedIndices:n}=this.state;this.setState({errorIncomplete:!1,selectedIndices:mX(n,t)})}handleChoiceSelect({selectedIndex:t}){const{answered:n}=this.state;n||this.setState({errorIncomplete:!1,selectedAnswer:t,chosen:!0})}onSubmit(t,n,o,r,a){if(!n){switch(this.setState({errorIncomplete:!0}),r.type){case Da:this.wrapper?.querySelector("input")?.focus();break;case fu:case mu:this.wrapper?.querySelector("input")?.focus();break;case hu:default:break}return}a?.preventDefault(),this.setState({answered:!0,isRetaking:!1}),o&&this.props.onStep({id:t})}handleFillIn(t){this.setState({errorIncomplete:!1,fillInText:t})}handleRetake(t){const{blockId:n,lessonId:o,settings:r}=this.props,{id:a}=t;this.setState({isRetaking:!0}),this.retakeAnimationStageOne=setTimeout(()=>{this.setState({answered:!1,chosen:!1,matches:{}},()=>{this.retakeAnimationStageOne=null})},400),this.retakeAnimationStageTwo=setTimeout(()=>{this.setState({fillInText:"",selectedAnswer:null,selectedIndices:[],isRetaking:!1,shouldFocusFirst:!0},()=>{!ep&&this.getType()===Da&&Hm(this.wrapper),this.retakeAnimationStageTwo=null}),r?.retryCount!=null&&this.props.onRetryAttempt?.({blockId:n,itemId:a,lessonId:o})},950)}resetErrorIncomplete(){this.state.errorIncomplete&&this.setState({errorIncomplete:!1})}resetShouldFocusFirst=()=>{this.state.shouldFocusFirst&&this.setState({shouldFocusFirst:!1})};renderQuestionTitle({title:t}){return(0,s.jsx)(Ge,{className:"quiz-card__title",id:this.state.questionHtmlId,value:t})}renderQuestion(t){const{answered:n,errorIncomplete:o,isRetaking:r,selectedAnswer:a}=this.state,{blockId:i,enableVideoPlaybackSpeed:c,getL10nValue:l,labels:d,progress:h,renderQuestionTitle:m=this.renderQuestionTitle,settings:f}=this.props,{quizCorrect:v,quizIncorrect:C,quizRequireAnswer:g,quizSubmit:x,quizTakeAgain:b}=d,{id:L,type:S}=t,y=t.type!=="DRAW_FROM_QUESTION_BANK"?t.settings:{},T=l("media"in t?t.media:{}),k=this.state.forceShowFeedbackCorrect||this.getIsCorrect({item:t}),I=this.getCanSubmit({item:t}),E=f?.requireCorrectAnswer?k:!0,w=this.onSubmit.bind(this,L,I,E,t),A=this.getFeedback({item:t,isCorrect:k,selectedAnswer:a}),N=this.getSelection({item:t}),{columnBehavior:R,correctAnswerColor:M,correctAnswerColorContrast:P,incorrectAnswerColor:j,incorrectAnswerColorContrast:O}=f,B=k?M:j,D=d.knowledgeCheckCorrectAnswerRequiredBlock,H=d.knowledgeCheckRetriesAttemptsRemaining,$=d.knowledgeCheckMaxRetriesReached,W=h?.items?.[i]?.items?.[L]?.retryAttemptCount??0,U=f?.retryCount!==0&&(f?.retryCount==null||f?.retryCount===-1||W<f?.retryCount),Z=f?.retryCount!=null||f?.retryCount===-1?f?.retryCount-W:-1,ne=!k,Q={"--color-feedback-icon":B,"--color-matching-feedback-bubble-bg":j,"--color-multiple-choice-complete-border":j,"--color-multiple-choice-correct-border":M,"--color-multiple-response-correct-border":M,"--color-multiple-response-incorrect-border":j,"--color-multiple-response-option-check":n?M:void 0,"--color-quiz-option-check":M,"--color-x-fill":j},F=f?.revealCorrectAnswers!==!1&&(f.retryCount==null||f.retryCount===-1||!U)?Ae.ALL:Ae.INCORRECT,_=X()("block-knowledge__retake-container",{"block-knowledge__retake-container--active":n,"block-knowledge__retake-container--active-attempts-left":n&&!r&&Z>0}),K=X()("block-knowledge__retake",{"block-knowledge__retake--active":n&&!r&&U}),Y=X()("block-knowledge__retake","block-knowledge__attempts-left",{"block-knowledge__retake--active":n&&!r&&U&&Z>0}),q=X()("block-knowledge__retake","block-knowledge__no-more-attempts",{"block-knowledge__retake--active":n&&!r&&!U}),J=!!T?.image,ee=!!T?.audio,re=!!T?.video,oe=!!T?.embed;let Se=null;ee&&J?Se=(0,s.jsx)(Do,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${L}-audio`,isOverlayAudio:!0,item:t,labels:d,media:T,settings:y}):ee&&(re||oe)?Se=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Do,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${L}-audio`,item:t,labels:d,media:{audio:T.audio},settings:y}),(0,s.jsx)(Do,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${L}-video`,item:t,labels:d,media:re?{video:T.video}:{embed:T.embed},settings:y})]}):Se=(0,s.jsx)(Do,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${L}-audio`,item:t,labels:d,media:T,settings:y});const G=X()("block-knowledge__media",{"block-knowledge__image-with-audio":ee&&J});return(0,s.jsxs)(Py,{isActive:!0,style:Q,children:[f?.requireCorrectAnswer&&(n&&!k||!n)&&(0,s.jsxs)("div",{className:"quiz-card__require-correct-answer-disclaimer",children:[(0,s.jsx)(ie,{className:"quiz-card__require-correct-answer-disclaimer-icon",name:"info-circle"}),D]}),m(t),(0,s.jsx)("div",{className:G,children:Se}),(0,s.jsx)(Dy,{type:S,children:this.renderType({columnBehavior:R,correctAnswerColor:M,correctAnswerColorContrast:P,incorrectAnswerColor:j,incorrectAnswerColorContrast:O,isCorrect:k,item:t,onSubmit:w})}),(0,s.jsx)("div",{"aria-live":"assertive",children:o&&(0,s.jsxs)("div",{className:"quiz-card__validations","data-testid":"quiz-validation-error",children:[(0,s.jsx)("span",{"data-testid":"quiz-validation-icon",children:(0,s.jsx)(ie,{className:"quiz-card__validation-icon",name:"alert-circle"})}),(0,s.jsx)("span",{id:`${this.id}-error-incomplete-message`,children:g})]})}),(0,s.jsx)(Ry,{canProceed:n,canSubmit:I,isReduceMotion:ep,onSubmit:w,quizSubmit:x}),(0,s.jsx)(By,{canProceed:this.state.forceShowFeedback||n,feedbackRef:this.feedbackRef,feedbackValue:A,isActive:n,isComplete:n,isCorrect:k,item:t,labels:d,quizCorrect:v,quizIncorrect:C,revealAnswers:F,selection:N}),(0,s.jsxs)("div",{"aria-hidden":!n,className:_,children:[ne&&(0,s.jsxs)(s.Fragment,{children:[U?(0,s.jsxs)(Ay,{allowTabNavigation:n,className:K,onClick:this.handleRetake.bind(this,t),ref:this.takeAgainRef,size:"md",variant:"outlined",children:[(0,s.jsx)(ie,{"aria-hidden":"true",name:"arrow-rotate-left"}),b]}):null,Z>0&&(0,s.jsxs)("div",{className:Y,children:[H," ",Z]})]}),!U&&!k&&(0,s.jsx)("div",{className:q,children:$})]})]},L)}getIsCorrect({item:t}){const{fillInText:n,matches:o,selectedAnswer:r,selectedIndices:a}=this.state,{type:i}=t,c="answers"in t?t.answers:void 0,l="isCaseSensitive"in t?t.isCaseSensitive:!1;switch(i){case Da:return qy({answers:qf(c),text:n,caseSensitive:l,getL10nValue:this.props.getL10nValue});case hu:return Jy(o);case fu:return n6({item:{answers:c},selectedIndices:a});case mu:default:return e6({item:{answers:c},selectedIndex:r})}}getType(){const{items:t}=this.props;return fq(t)}getCanSubmit({item:t}){const n="answers"in t?t.answers:void 0,{answered:o,fillInText:r,matches:a,selectedAnswer:i,selectedIndices:c}=this.state;return kX({type:t.type,text:r,matches:a,answersLength:n?.length??0,selectedIndices:c,selectedIndex:i,answered:o})}getFeedback({item:t,isCorrect:n,selectedAnswer:o}){if(this.state.forceShowFeedbackMessage)return this.state.forceShowFeedbackMessage;const r="feedback"in t?t.feedback:void 0,a="feedbackCorrect"in t?t.feedbackCorrect:void 0,i="feedbackIncorrect"in t?t.feedbackIncorrect:void 0,c="feedbackType"in t?t.feedbackType:void 0,l="answers"in t?t.answers:void 0,d=this.state.forceShowFeedbackCorrect??n;return s6({answers:l,feedback:r,feedbackCorrect:a,feedbackIncorrect:i,feedbackType:c,isCorrect:d,selectedIndex:typeof o=="number"?o:null})}getTypeLabel(){const{labels:t}=this.props,n=this.getType(),o=mq[n];return o?t?.[o]:t?.a11yBlockKnowledgeCheck}renderMultipleResponseOptionText(t,{title:n}){return(0,s.jsx)(Ge,{className:"cursorAuto",value:n})}renderMultipleChoiceOptionText(t,{title:n}){return(0,s.jsx)(Ge,{className:"quiz-multiple-choice-option__label cursorAuto",value:n})}renderType({columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isCorrect:i,item:c,onSubmit:l}){const{isHidden:d,labels:h,prefersKeyboardNavigation:m,renderMultipleResponseOptionText:f=this.renderMultipleResponseOptionText,renderMultipleChoiceOptionText:v=this.renderMultipleChoiceOptionText,settings:C,progress:g,blockId:x}=this.props,{answered:b,fillInText:L,isRetaking:S,matches:y,selectedAnswer:T,selectedIndices:k,shouldFocusFirst:I,questionHtmlId:E}=this.state,{id:w,type:A}=c,N="answers"in c?c.answers:[],{quizAcceptableResponses:R,quizAnswerPlaceholder:M}=h,P=g?.items?.[x]?.items?.[w]?.retryAttemptCount??0,j=C?.retryCount!==0&&(C?.retryCount==null||C?.retryCount===-1||P<C?.retryCount),B=C?.revealCorrectAnswers!==!1&&(C.retryCount==null||C.retryCount===-1||!j)?Ae.ALL:Ae.INCORRECT,D=this.state.errorIncomplete?`${this.id}-error-incomplete-message`:void 0;switch(A){case Da:return(0,s.jsx)($y,{allowTabNavigation:!0,correctAnswerColor:n,correctAnswerColorContrast:o,errorMessageId:D,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isComplete:b,isCorrect:i,labels:h,onChange:this.handleFillIn,onEnterToSubmit:l,options:qf(N),questionHtmlId:E,quizAcceptableResponses:R,quizAnswerPlaceholder:M,revealAnswers:B,value:L});case hu:return(0,s.jsx)(Gy,{answers:xX(A)(N),columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isActive:!d,isComplete:b,matches:y,onChange:this.handleMatchesChange,prefersKeyboardNavigation:m,revealAnswers:B});case fu:return(0,s.jsx)(Qy,{allowTabNavigation:!0,correctIds:Xf(N),errorMessageId:D,isComplete:b,isCorrect:i,isRetaking:S,labels:h,onChange:this.handleMultipleResponseChange,onEnterToSubmit:l,options:N,questionHtmlId:E,renderOptionText:f.bind(this,c),revealAnswers:B,selectedIndices:k});case mu:default:return(0,s.jsx)(Ky,{allowTabNavigation:!0,correctId:bX(N)||yX(N),errorMessageId:D,isComplete:b,isCorrect:i,isReduceMotion:ep,isRetaking:S,labels:h,onChange:this.handleChoiceSelect,onEnterToSubmit:l,onFocusFirstComplete:this.resetShouldFocusFirst,options:N,questionHtmlId:E,renderOptionText:v.bind(this,c),revealAnswers:B,selectedIndex:T,shouldFocusFirst:I})}}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,items:r,settings:a,variant:i}=this.props,{answered:c,isRetaking:l}=this.state,{entranceAnimation:d,knowledgeCheckWidth:h=76}=a,m=Od(h),f=X()("block-knowledge",{"block-knowledge--answered":c,"block-knowledge--no-animation":!d,"block-knowledge--retake":l}),v=X()("block-knowledge__wrapper",`block-knowledge__wrapper--${i}`,{[`block-knowledge__container--custom-width-${m}`]:!0}),C=Array.isArray(r)&&r.length>0?r.slice(0,1):[];return(0,s.jsx)(we,{className:f,"data-testid":"block-kc-card",ref:g=>{this.block=g},style:this.getStyle(),children:(0,s.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{className:"block-knowledge__container",children:(0,s.jsx)("div",{className:"block-knowledge__row",children:(0,s.jsx)("div",{className:`block-knowledge__col--custom-width-${m}`,children:(0,s.jsx)(_t,{"aria-label":this.getTypeLabel(),className:v,"data-testid":"block-knowledge-wrapper",ref:g=>{this.wrapper=g},children:C.map(g=>this.renderQuestion(g))})})})})})})}getStyle(){const{backgroundColor:t,settings:n}=this.props;if(n?.cardMode===$n.TRANSPARENT)switch(n?.backgroundType){case se.ACCENT:case se.COLOR:case se.TINT:if(t)switch(aa(t)){case dt.LIGHT:return{"--color-background-choice-hover":ts(.5,t),"--color-background-feedback-frame":ts(.5,t)};case dt.MED:return{"--color-background-choice-hover":Ss(.3,t),"--color-background-feedback-frame":Ss(.3,t)};case dt.DARK:return{"--color-background-choice-hover":Ss(.6,t),"--color-background-feedback-frame":Ss(.6,t)};case dt.NEAR_BLACK:return{"--color-background-choice-hover":ts(.15,t),"--color-background-feedback-frame":ts(.15,t)}}}}}const pq=e=>{const{blockId:t,items:[n]}=e,{questions:o}=n,[r,a]=(0,u.useState)(()=>f6({questions:o}));(0,u.useEffect)(()=>{if(!o)return;const c=l=>{const{path:d}=l.detail;if(d[d.indexOf("items")+1]?.id!==t)return;const m=d[d.lastIndexOf("questions")+1]?.id;if(m===r?.id)return;const f=o.find(({id:v})=>v===m);f&&a(f)};return window.addEventListener(Ue,c),()=>window.removeEventListener(Ue,c)},[t,r,o]);const i=(0,u.useMemo)(()=>r?{variant:sq[r.type],items:[r]}:{},[r]);return r?(0,s.jsx)(v6,{...e,...i}):(0,s.jsx)("div",{})},gq=e=>e.variant==="draw from question bank",Fa=e=>{const t=En()??"",n=tn(),o=at(),r={...e,backgroundColor:t,getL10nValue:o,blockSettings:n};return gq(r)?(0,s.jsx)(pq,{...r}):(0,s.jsx)(v6,{...r})};var vq=p(49976),Cq=p.n(vq);class xq extends u.Component{refWrap;refBubbleTitle;portal;contentRef;scrollRef;videoContainer;constructor(t){super(t),this.state={hasOverflow:!1},this.refWrap=(0,u.createRef)(),this.refBubbleTitle=(0,u.createRef)(),this.renderOverflowMask=this.renderOverflowMask.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleNextClick=this.handleNextClick.bind(this),this.handlePreviousClick=this.handlePreviousClick.bind(this),this.portal=Zs()}static defaultProps={allowNav:!0,onClose:()=>{},onNextClick:()=>{},onPreviousClick:()=>{}};componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.contentRef.removeEventListener("scroll",this.scrollRef)}UNSAFE_componentWillReceiveProps(t){t.isActive&&setTimeout(this.renderOverflowMask,100)}componentDidUpdate(t){if(!t.isActive&&this.props.isActive){setTimeout(()=>{document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown)},0),this.contentRef.scrollTop=0,this.refBubbleTitle.current?.focus?.();const n=this.props.media;this.props.onTranscriptUpdate?.({audioPlayerId:ps({refs:`items:${this.props.blockId}/items:${this.props.item?.id}`}),transcriptMedia:n})}else t.isActive&&!this.props.isActive&&(document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.state.hasOverflow&&this.contentRef.removeEventListener("scroll",this.scrollRef))}render(){const{accentColor:t,allowNav:n,description:o,headingLevel:r,htmlId:a,isActive:i,isMobile:c,media:l,title:d,x:h,y:m}=this.props,f=r?`h${r}`:"h2",v=X()("bubble",{"bubble--active":i}),C=yq({x:h,y:m}),g=Sq({hasOverflow:this.state.hasOverflow,x:h,y:m}),x={borderBottomColor:t},b=`${a}-title`,L=()=>{if(!l)return(0,s.jsx)(Ie,{allowTabNavigation:i,className:"bubble__description",value:o});const y=this.props.getL10nValue(l)??{},T=gs(y,this.props.audioPosition,!0,"labeled-graphic"),k={blockId:this.props.blockId,hasPadding:!1,imageMaxHeight:1e3,item:this.props.item,labels:this.props.labels,lessonId:this.props.lessonId,enableVideoPlaybackSpeed:this.props.enableVideoPlaybackSpeed,opts:this.props.mediaOpts,refs:`items:${this.props.blockId}/items:${this.props.item?.id}`,shouldPause:!i},I={audio:{media:T.audioOnlyMedia||y,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-audio`},image:{media:T.imageOnlyMedia||y,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-image`},video:{media:T.videoOnlyMedia||y,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-video`},embed:{media:T.embedOnlyMedia||y,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-embed`},overlay:{media:y,isOverlayAudio:!0,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-overlay`}};return(0,s.jsx)(s.Fragment,{children:T.renderOrder.map((E,w)=>{if(E==="text")return(0,s.jsx)(Ie,{allowTabNavigation:i,className:"bubble__description",value:o},`text-${w}`);const A=I[E];return!A||E==="embed"&&!i?null:(0,s.jsx)("div",{className:"bubble__media",children:(0,s.jsx)("div",{className:"bubble__figure",children:(0,s.jsx)("div",{className:X()({"labeled-graphic-bubble-media-container--audio-bottom":E==="audio"&&this.props.audioPosition==="bottom"}),children:(0,s.jsx)(Qt,{...k,...A})})})},`${E}-${w}`)})})},S=(0,s.jsx)("div",{className:v,ref:this.refWrap,style:C,children:(0,s.jsxs)("dialog",{"aria-hidden":!i,"aria-labelledby":b,"aria-modal":c,className:g,id:a,onKeyDown:this.handleKeyDown,style:x,children:[(0,s.jsx)(f,{className:"bubble__title",id:b,ref:this.refBubbleTitle,tabIndex:-1,children:(0,s.jsx)(mn,{value:d})}),(0,s.jsx)("button",{"aria-label":"Close modal",className:"bubble__close",onClick:this.handleCloseClick,type:"button",children:(0,s.jsx)(MD,{className:"bubble__close-icon"})}),(0,s.jsx)("div",{className:"bubble__content",ref:y=>{this.contentRef=y},children:L()}),n&&this.renderControls()]})});return c?(0,Es.createPortal)((0,s.jsx)(o3,{children:S}),this.portal):S}renderControls(){const{accentColor:t,labels:n}=this.props,o={"--color-lg-accent":t};return(0,s.jsxs)("div",{className:"bubble__controls",style:o,children:[(0,s.jsx)("button",{"aria-label":n?.a11yCarouselPrevious,className:"bubble__prev",onClick:this.handlePreviousClick,type:"button",children:(0,s.jsx)("i",{className:"icon icon-chevron-left"})}),(0,s.jsx)("button",{"aria-label":n?.a11yCarouselNext,className:"bubble__next",onClick:this.handleNextClick,type:"button",children:(0,s.jsx)("i",{className:"icon icon-chevron-right"})})]})}renderOverflowMask(){if(!this.contentRef)return;const t=this.contentRef,n=t.offsetHeight;t.scrollHeight>n?(t.addEventListener("scroll",this.scrollRef=Yd()(this.handleScroll,50)),this.setState({hasOverflow:!0}),this.scrollRef()):(t.removeEventListener("scroll",this.scrollRef),this.setState({hasOverflow:!1}))}handleDocumentClick=t=>{if(!this.props.isActive)return;const n=t.composedPath();this.refWrap.current!=null&&n.includes(this.refWrap.current)||Array.from(document.querySelectorAll("dialog[open]")).some(r=>n.includes(r))||this.props.onClose({shouldFocusMarker:!1})};handleDocumentKeyDown=t=>{fn(t)&&this.props.isActive&&this.props.onClose({shouldFocusMarker:!1})};handleKeyDown(t){const{allowNav:n,onNextClick:o,onPreviousClick:r}=this.props,a=WM(this.contentRef,this.state.hasOverflow),i=Cq()(Pe()(n));un()([[i(Ks),r],[i(Qs),o],[_M,a]])(t)}handleCloseClick=()=>{this.props.onClose()};handleNextClick(t){this.props.onNextClick(t)}handlePreviousClick(t){this.props.onPreviousClick(t)}handleScroll(){const t=this.contentRef,n=t.scrollTop,o=t.scrollHeight,r=t.offsetHeight;n>=o-r-10?this.setState({hasOverflow:!1}):this.state.hasOverflow||this.setState({hasOverflow:!0})}}function bq(e){const t=at(),n=kt(768);return(0,s.jsx)(xq,{...e,getL10nValue:t,isMobile:n})}const yq=({x:e,y:t})=>{const n={top:"initial",bottom:"initial",left:"0",right:"0"};return e>50?n.right=100-e+"%":n.left=e+"%",t>50?n.bottom=100-t+"%":n.top=t+"%",n},Sq=({hasOverflow:e,x:t,y:n})=>{const o=t<50;let r="top";return n>33&&(r=n>66?"bottom":"middle"),X()("bubble__body","bg--range-light",{"bubble__body--has-overflow":e,"bubble__body--left":o,"bubble__body--right":!o,"bubble__body--top":r==="top","bubble__body--middle":r==="middle","bubble__body--bottom":r==="bottom"})};var Lq=p(82920);const Tq=e=>new URL(e).pathname.slice(1)+new URL(e).search;class kq extends Lq.Component{imageEl;constructor(t){super(t),this.state={style:{}}}render(){const{canvasClassNames:t,children:n,cornerRadius:o,editable:r,editingDisabled:a,getL10nValue:i,imageLoaded:c,media:l,onCreateMarker:d,onShowAltDialog:h}=this.props,{style:m}=this.state,f=i(l)?.image??{},{alt:v,dimensions:C,key:g,src:x}=f,b=!!f.alt,L=yo(v),S=D8(f),y=X()("labeled-graphic-canvas__figure",{"labeled-graphic-canvas__figure--editable":r&&!a,"labeled-graphic-canvas__figure--editing-disabled":r&&a});let T;g?T=lt(f):x&&(T=lt({key:Tq(x),...f}));const k=X()("labeled-graphic-canvas__image","labeled-graphic-canvas__image--flag-dimensions",{"labeled-graphic-canvas__image--svg":Ag(T)}),I={...m,...o!=null&&{"--corner-radius":`${Number(o)}px`}},E=(0,s.jsx)(vn,{alt:L,className:k,"data-l10n-id":jt(l),height:C?.height||C?.originalHeight,onClick:d,onLoad:()=>this.setState({style:S}),ref:w=>{this.imageEl=w},src:T,style:I,width:C?.width||C?.originalWidth});return(0,s.jsx)("div",{className:t||"labeled-graphic-canvas",children:(0,s.jsx)("div",{className:"labeled-graphic-canvas__item",children:(0,s.jsx)("div",{className:"labeled-graphic-canvas__bounds",children:(0,s.jsxs)("figure",{className:y,children:[b&&r&&(0,s.jsx)(Po,{message:"Edit alt text",children:(0,s.jsx)("div",{className:"item-media__tooltip",children:(0,s.jsx)("button",{className:"labeled-graphic-canvas__alt-tag",onClick:h,type:"button",children:"ALT"})})}),c&&E,(0,s.jsx)("ol",{role:"list",children:n})]})})})})}}const Iq=st(kq),Eq={"01":"a11yLabeledGraphicIconPlus","02":"a11yLabeledGraphicIconDot","03":"a11yLabeledGraphicIconInformation","04":"a11yLabeledGraphicIconQuestion","05":"a11yLabeledGraphicIconCheck","06":"a11yLabeledGraphicIconX","07":"a11yLabeledGraphicIconHeart","08":"a11yLabeledGraphicIconPin","09":"a11yLabeledGraphicIconArrowLeft",10:"a11yLabeledGraphicIconArrowRight",11:"a11yLabeledGraphicIconArrowUp",12:"a11yLabeledGraphicIconArrowDown",13:"a11yLabeledGraphicIconArrowUpLeft",14:"a11yLabeledGraphicIconArrowUpRight",15:"a11yLabeledGraphicIconArrowDownLeft",16:"a11yLabeledGraphicIconArrowDownRight",17:"1",18:"2",19:"3",20:"4",21:"5",22:"6",23:"7",24:"8",25:"9",26:"0"},Nq=(e,t)=>{const n=Eq[t];return n?.startsWith("a11y")?e?.[n]||"":n||""};var jq=p(82920);const C6=V("labeled-graphic-marker");class wq extends jq.Component{marker;onMouseMove;onMouseLeave;constructor(t){super(t),this.state={dragging:!1,hovering:!1,isComplete:!1,isDragged:!1,offsetX:0,offsetY:0,wasDragged:!1},this.onClick=this.onClick.bind(this)}parentCanvasElement(){return this.marker.parentElement.parentElement.parentElement}componentDidMount(){const t=this.parentCanvasElement();t.addEventListener("mousemove",this.onMouseMove=n=>{this.onItemDrag(n)}),t.addEventListener("mouseleave",this.onMouseLeave=n=>{this.onItemRelease(n)})}componentWillUnmount(){const t=this.parentCanvasElement();t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mouseleave",this.onMouseLeave)}UNSAFE_componentWillReceiveProps(t){const{isSelected:n,useLocalStateForCompletion:o}=t;n&&o&&!this.state.isComplete&&this.setState({isComplete:!0})}buildMarkerLabel=({icon:t,label:n,title:o,viewed:r})=>{const{labels:a}=this.props;return[].concat(n||[]).concat(o||[]).concat(t||[]).concat(r?a?.a11yLabeledGraphicViewed:a?.a11yLabeledGraphicUnviewed).join(", ")};render(){const{accentColor:t,ariaControls:n,icon:o,isActive:r,isComplete:a,isLessonBlocksList:i,isSelected:c,isVisible:l,labels:d,markerColor:h,markerColorContrast:m,onFocus:f,styles:v,useLocalStateForCompletion:C}=this.props,g=this.props.getL10nValue(this.props.title),x=Nq(d,o),b=C?this.state.isComplete:a,L=!!h,S=Fn(h),T=$t({backgroundColor:h,contrast:m??S}),k=L?h:"#ffffff",I=L?T:t,E=this.buildMarkerLabel({icon:x,label:d&&d.a11yLabeledGraphicButtonMarker||"",title:g,viewed:b}),w=C6({active:c,dragged:this.state.isDragged,visible:l,complete:b}),A={...v,"--color-lg-accent":k,"--color-lg-font":I},N=C6("pin",{selected:c,disabled:i});return(0,s.jsx)("button",{"aria-controls":n,"aria-expanded":r,"aria-label":E,className:w,onClick:this.onClick,onContextMenu:this.onItemRelease.bind(this),onFocus:f,onMouseDown:this.onItemGrab.bind(this),onMouseEnter:this.onHover.bind(this),onMouseLeave:this.onLeave.bind(this),onMouseUp:this.onItemRelease.bind(this),ref:R=>{this.marker=R},style:A,type:"button",children:(0,s.jsx)("span",{className:N,children:(0,s.jsx)("i",{className:`icon icon-Master-${o}`})})})}focus(){this.marker&&this.marker.focus&&this.marker.focus()}onHover(){this.state.wasDragged&&this.props.onHover(),this.setState({hovering:!0})}onLeave(){this.props.onLeave(),this.setState({hovering:!1})}onClick(){const{editable:t,itemId:n,onClick:o,parentId:r}=this.props,a="labeledGraphicMarkerClick",i={detail:{itemId:n,parentId:r}},c=new CustomEvent(a,i);document.dispatchEvent(c),t||o()}onItemGrab(t){const{editable:n}=this.props;if(!n)return;const o=this.marker.getBoundingClientRect(),r=o.left-t.clientX+this.marker.offsetWidth/2,a=o.top-t.clientY+this.marker.offsetHeight/2;this.setState({posX:t.clientX,posY:t.clientY,offsetX:r,offsetY:a,isDragged:!0})}onItemDrag(t){if(this.state.isDragged){const n=t.clientX-this.state.posX,o=t.clientY-this.state.posY;this.marker.style.transform=`translate3d(${n}px, ${o}px, 0)`}}onItemRelease(t){const{editable:n}=this.props,o={isDragged:!1};this.marker.style.transform="translate3d(0, 0, 0)",this.state.isDragged&&this.state.posX===t.clientX&&this.state.posY===t.clientY?this.props.onClick():n&&t.currentTarget instanceof HTMLElement&&t.currentTarget.classList.contains("labeled-graphic-marker")?this.props.onSetPosition(t,this.state.offsetX,this.state.offsetY):this.state.isDragged&&(o.offsetX=0,o.offsetY=0),this.setState(o)}}const Aq=st(wq);class Rq extends u.Component{static get defaultProps(){return{animateBlockEntrance:!1,editable:!0,getL10nValue:(t=>t),markerDelay:0,onClose:Function.prototype,onCreateMarker:Function.prototype,onItemClear:Function.prototype,onItemHint:Function.prototype,onItemSelected:Function.prototype,onNextClick:Function.prototype,onPreviousClick:Function.prototype,onSetMarkerPosition:Function.prototype,showBubbles:!0}}markerRefs;timeout;entranceDoneTimeout;canvas;constructor(t){super(t);const{isLearner:n}=t;this.afterAnimatedIn=this.afterAnimatedIn.bind(this),this.createMarker=this.createMarker.bind(this),this.onBubbleClose=this.onBubbleClose.bind(this),this.onMarkerFocus=this.onMarkerFocus.bind(this),this.markerRefs={},this.state={showMarkers:!n||jn()}}componentDidMount(){const{isBlock:t,isLearner:n,isPreview:o,markerDelay:r}=this.props;n&&!t&&(this.timeout=setTimeout(()=>this.setState({showMarkers:!0}),o?0:r))}componentWillUnmount(){clearTimeout(this.timeout),clearTimeout(this.entranceDoneTimeout)}render(){const{accentColor:t,animateBlockEntrance:n,blockId:o,color:r,canvasClassNames:a,disableCreateMarker:i,editable:c,getL10nValue:l,imageLoaded:d=!0,isBlock:h,isLearner:m,isLessonBlocksList:f,isPreview:v,initiallyVisible:C,items:g,labels:x,lessonId:b,media:L,onItemClear:S,onItemHint:y,onItemSelected:T,onNextClick:k,onPreviousClick:I,onShowAltDialog:E,parentId:w,progress:A,selected:N,settings:R={},showBubbles:M,enableVideoPlaybackSpeed:P}=this.props,{cornerRadius:j,headingLevel:O,markerColor:B,markerColorContrast:D}=R,{showMarkers:H}=this.state,W=B||(t||r),U=X()("map-item",{"map-item--animated":!c}),Z=n?"fadeIn":"none",ne=n?1:0,Q=g.length>1;return(0,s.jsx)(u.Fragment,{children:(0,s.jsx)(Be,{afterAnimatedIn:this.afterAnimatedIn,animateBlockEntrance:!v,animateIn:Z,duration:v?0:ne,initiallyVisible:C,isLearner:m,children:(0,s.jsx)(Iq,{canvasClassNames:a,cornerRadius:j,editable:c,editingDisabled:i,imageLoaded:d,media:L,onCreateMarker:this.createMarker,onShowAltDialog:E,ref:z=>{this.canvas=z},children:g.map((z,F)=>{const{description:_,id:K,icon:Y,media:q,title:J}=z,ee=l(z.x),re=l(z.y),oe={top:re+"%",left:ee+"%"},Se=Hs()(["items",K,"isComplete"],A),G=N===K,le=`bubble-${o}-${K}`;return(0,s.jsxs)("li",{className:U,role:"listitem",children:[(0,s.jsx)(Aq,{accentColor:W,ariaControls:le,editable:c,icon:Y,isActive:N===K,isComplete:Se,isLessonBlocksList:f,isSelected:G,isVisible:H,itemId:K,labels:x,markerColor:B,markerColorContrast:D,onClick:()=>{T(K)},onFocus:this.onMarkerFocus(K),onHover:()=>{y()},onLeave:()=>{S()},onSetPosition:this.onSetPosition.bind(this,z),parentId:w,ref:ve=>{this.markerRefs[K]=ve},styles:oe,title:J,useLocalStateForCompletion:h},K),!c&&M&&(0,s.jsx)(bq,{accentColor:W,allowNav:Q,audioPosition:R.audioPosition,blockId:o,description:_,enableVideoPlaybackSpeed:P,headingLevel:O,htmlId:le,index:F,isActive:G,item:z,labels:x,lessonId:b,media:q,mediaOpts:{disableZoom:!R.zoomOnClick},onClose:this.onBubbleClose(K),onNextClick:()=>{k(F)},onPreviousClick:()=>{I(F)},title:J,x:Number(ee),y:Number(re)},le)]},K)})})})})}createMarker(t){const{disableCreateMarker:n,editable:o,onCreateMarker:r}=this.props;if(!o||n)return;const{x:a,y:i}=this.findItemCoordinates({e:t}),c=this.props.items.length,d={description:"",hasMedia:!1,icon:"01",id:Qd()(),isActive:!1,title:"",x:String(a),y:String(i)};r({index:c,payload:d})}onBubbleClose(t){const{onClose:n}=this.props;return(o={shouldFocusMarker:!0})=>{const r=this.markerRefs[t];o.shouldFocusMarker&&r?.focus?.(),n()}}onMarkerFocus(t){return()=>{const{onClose:n,selected:o}=this.props;o&&o!==t&&n()}}onSetPosition(t,n,o,r){if(!this.props.editable)return;const{lesson:a,onSetMarkerPosition:i}=this.props,{id:c,items:l}=a,{x:d,y:h}=this.findItemCoordinates({e:n,offsetX:o,offsetY:r}),m={x:String(d),y:String(h)};(0,Gt.uW)(t.x)&&(0,Gt.uW)(t.y)?(this.props.updateL10n({l10n:t.x,value:m.x}),this.props.updateL10n({l10n:t.y,value:m.y})):i({itemId:t.id,lessonId:c,items:l,payload:m})}findItemCoordinates({e:t,offsetX:n=0,offsetY:o=0}){const r=this.canvas.imageEl.getBoundingClientRect(),a=20,i=this.findItemCoordinate({clientPos:t.clientX,clientOffset:n,rectSubtractor:r.left,rectDivisor:r.width,validOffsetAmount:a}),c=this.findItemCoordinate({clientPos:t.clientY,clientOffset:o,rectSubtractor:r.top,rectDivisor:r.height,validOffsetAmount:a});return{x:i,y:c}}findItemCoordinate({clientPos:t,clientOffset:n,rectSubtractor:o,rectDivisor:r,validOffsetAmount:a}){const i=a/r*100,c=100-i;let l=(t+n-o)/r*100;return l>c?l=c:l<i&&(l=i),l}afterAnimatedIn(){const{isBlock:t}=this.props;t&&this.setState({showMarkers:!0})}}const Pq=st(Rq);var Mq=p(82920);class Oq extends Mq.Component{static get defaultProps(){return{onItemSelected:Function.prototype,onStep:Function.prototype,getL10nValue:()=>{}}}constructor(t){super(t),this.state={imageLoaded:!1},this.closeOpenedBubble=this.closeOpenedBubble.bind(this),this.handleMarkerClick=this.handleMarkerClick.bind(this),this.handleNavEvent=this.handleNavEvent.bind(this),this.onItemSelected=this.onItemSelected.bind(this),this.onNextClick=this.onNextClick.bind(this),this.onPreviousClick=this.onPreviousClick.bind(this),this.setImageLoaded=this.setImageLoaded.bind(this)}componentDidMount(){this.loadImage(),this.props.readOnly||document.addEventListener("labeledGraphicMarkerClick",this.handleMarkerClick),window.addEventListener(Ue,this.handleNavEvent)}handleNavEvent(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;n===this.props.blockId&&this.state.selectedItemId!==o&&this.onItemSelected(o)}componentDidUpdate(t){const{blockId:n,isMobile:o}=this.props,{selectedItemId:r}=this.state;t.isMobile!==o&&r!=null&&(document.getElementById(`bubble-${n}-${r}`)?.close(),this.openBubble(r))}componentWillUnmount(){this.props.readOnly||document.removeEventListener("labeledGraphicMarkerClick",this.handleMarkerClick),window.removeEventListener(Ue,this.handleNavEvent)}render(){const{imageLoaded:t}=this.state,{initiallyVisible:n,isLessonBlocksList:o,isPreview:r,items:a,labels:i,parentId:c,settings:l={}}=this.props,{mediaWidth:d="2"}=l,h=r?a[0].id:this.state.selectedItemId,m=X()("view-labeled-graphic",{"view-labeled-graphic--small":d==="0","view-labeled-graphic--medium":d==="1","view-labeled-graphic--full":d==="2"});return(0,s.jsx)("div",{"aria-label":i?.a11yLabeledGraphicBlock,className:m,role:"group",children:(0,s.jsx)(Pq,{...this.props,canvasClassNames:this.getCanvasClassNames(),editable:!1,imageLoaded:t,initiallyVisible:n,isLessonBlocksList:o,labels:i,markerDelay:1e3,onClose:this.closeOpenedBubble,onItemSelected:this.onItemSelected,onNextClick:this.onNextClick,onPreviousClick:this.onPreviousClick,parentId:c,selected:h})})}setImageLoaded(){this.setState({imageLoaded:!0})}loadImage(){const t=this.props.getL10nValue(this.props.media)?.image,{key:n,src:o}=t??{};if(!n&&!o)return;const r=setTimeout(this.setImageLoaded,1e3),a=new Image,i=n?lt(t):o;a.src=i,a.onload=()=>{clearTimeout(r),this.setImageLoaded()}}getCanvasClassNames(){return X()("labeled-graphic-canvas",{"labeled-graphic-canvas--visible":this.state.imageLoaded})}onNextClick(t){const{blockId:n,items:o}=this.props,r=Ye()("id",o[il()(t)]||o[0]);document.querySelector(`dialog#bubble-${n}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}onPreviousClick(t){const{blockId:n,items:o}=this.props,r=Ye()("id",o[Df()(t)]||o[Df()(Hn()(o))]);document.querySelector(`dialog#bubble-${n}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}onItemSelected(t){const{editBlock:n,items:o,onItemSelected:r,onStep:a}=this.props,{selectedItemId:i}=this.state;n&&window.matchMedia("(max-width: 768px)").matches||(i===t?this.closeOpenedBubble():(this.openBubble(t),Me()(a,pr()(c=>c.id===t))(o)),r(t))}handleMarkerClick(t){const{itemId:n,parentId:o}=t.detail,{selectedItemId:r}=this.state;(o!==this.props.parentId||r!==n)&&this.closeOpenedBubble()}openBubble(t){const{blockId:n}=this.props;this.setState({selectedItemId:t});const o=document.getElementById(`bubble-${n}-${t}`);!o||o.open||(this.props.isMobile&&typeof o.showModal=="function"?o.showModal():o.show())}closeOpenedBubble(){const{blockId:t}=this.props;document.getElementById(`bubble-${t}-${this.state.selectedItemId}`)?.close(),this.setState({selectedItemId:void 0})}}function Bq(e){const t=at(),n=kt(768);return(0,s.jsx)(Oq,{...e,getL10nValue:t,isMobile:n})}const Dq=e=>{const{blockId:t,progress:n,isLessonBlocksList:o=!1}=e,r=Hs()(["items",t],n);return(0,s.jsx)(we,{className:"block-labeled-graphic",children:(0,s.jsx)(Bq,{...e,editable:!1,isBlock:!0,isLessonBlocksList:o,parentId:t,progress:r})})},he=V("block-survey"),tp={2:[{value:"bad",icon:"face-anguished",defaultLabel:"Bad"},{value:"great",icon:"face-laugh",defaultLabel:"Great"}],3:[{value:"bad",icon:"face-anguished",defaultLabel:"Bad"},{value:"fair",icon:"face-meh",defaultLabel:"Fair"},{value:"great",icon:"face-laugh",defaultLabel:"Great"}],4:[{value:"bad",icon:"face-anguished",defaultLabel:"Bad"},{value:"fair",icon:"face-meh",defaultLabel:"Fair"},{value:"good",icon:"face-smile",defaultLabel:"Good"},{value:"great",icon:"face-laugh",defaultLabel:"Great"}],5:[{value:"bad",icon:"face-anguished",defaultLabel:"Bad"},{value:"poor",icon:"face-frown",defaultLabel:"Poor"},{value:"fair",icon:"face-meh",defaultLabel:"Fair"},{value:"good",icon:"face-smile",defaultLabel:"Good"},{value:"great",icon:"face-laugh",defaultLabel:"Great"}]},x6=tp[5].map(e=>e.defaultLabel),pu=e=>{const t=S6(e.labels?.length);return tp[t]??tp[gu]},b6=(e,t)=>{const n=pu(e).findIndex(o=>o.value===t);return n===-1?void 0:n+1},Fq=(e,t)=>pu(e)[t-1]?.value,Hq=2,$q=10,y6=5,Vq=7,gu=3,zq=5,S6=e=>e===2||e===3||e===4||e===5?e:gu,gc=null,spe=e=>(gc[e]??gc[gu]).map(t=>x6[t]),ope=(e,t)=>{const n=S6(e?.length),o=gc[n]??gc[gu],r=gc[t],a=[...x6];return e?.forEach((i,c)=>{const l=o[c];l!==void 0&&(a[l]=i)}),r.map(i=>a[i])},Ha=e=>Array.isArray(e)?e.length===0:!e||e.trim()==="",_q=(e,t,n)=>{const o=n?.items?.[e]?.items??{};return t.reduce((r,a)=>{const i=o?.[a.id]?.response;if(i==null)return r;if(a.questionType==="RATING"){const c=Fq(a,Number(i));c!=null&&(r[a.id]=c)}else r[a.id]=String(i);return r},{})},Uq=(e,t)=>t?.items?.[e]?.isSubmitted??!1,L6=(e,t)=>(0,s.jsx)(Ge,{className:"block-survey__question-title",id:t,value:e.question}),Gq=e=>(0,s.jsx)(Ge,{value:e.startLabel}),Wq=e=>(0,s.jsx)(Ge,{value:e.endLabel}),Kq=(e,t)=>(0,s.jsx)(Ge,{className:"block-survey__rating-label",value:e.labels?.[t]});function Qq({animateBlockEntrance:e,blockId:t,initiallyVisible:n,isLearner:o,items:r=[],labels:a,onSurveySubmitted:i=qt,onSurveyPartialResponse:c=qt,lessonId:l,onStep:d,onSubmit:h,progress:m,renderLinearScaleEndLabel:f=Wq,renderLinearScaleStartLabel:v=Gq,renderQuestionTitle:C=L6,renderRatingLabel:g=Kq,settings:x={},title:b}){const L=at(),[S,y]=(0,u.useState)(()=>_q(t,r,m)),[T,k]=(0,u.useState)(()=>Uq(t,m)),[I,E]=(0,u.useState)(!1),[w,A]=(0,u.useState)(!1),[N,R]=(0,u.useState)(new Set),[M,P]=(0,u.useState)(0),j=(0,u.useRef)(null),O=(0,u.useRef)(null),B=(0,u.useRef)(!1),D=(0,u.useCallback)(G=>{O.current=G},[]),{announcePolite:H}=ys(),$=(0,Oe.A)(T),W=x.cardMode==="TRANSPARENT",U=`validation-error-${t}`,Z=x.surveyWidth??76,ne=Od(Z),Q=(0,u.useCallback)((G,le)=>{y(be=>({...be,[G]:le}));const ve=r.find(be=>be.id===G),pe=ve?.questionType==="RATING"?b6(ve,le):void 0;c({itemId:G,response:pe}),N.has(G)&&(R(ye=>{const ge=new Set(ye);return ge.delete(G),ge}),r.find(ye=>ye.id===G)&&r.filter(ge=>ge.isRequired&&ge.id!==G&&Ha(S[ge.id])).length===0&&A(!1))},[N,r,c,S]),z=(0,u.useCallback)((G,le)=>{y(ve=>({...ve,[G]:le})),c({itemId:G,response:le}),N.has(G)&&(R(pe=>{const be=new Set(pe);return be.delete(G),be}),r.filter(pe=>pe.isRequired&&pe.id!==G&&Ha(S[pe.id])).length===0&&A(!1))},[N,r,c,S]),F=(0,u.useCallback)((G,le)=>{y(ve=>{const pe=ve[G],be=Array.isArray(pe)?pe:[],ye=be.includes(le)?be.filter(ge=>ge!==le):[...be,le];return{...ve,[G]:ye}}),N.has(G)&&(R(pe=>{const be=new Set(pe);return be.delete(G),be}),r.filter(pe=>pe.isRequired&&pe.id!==G&&Ha(S[pe.id])).length===0&&A(!1))},[N,r,S]),_=(0,u.useCallback)((G,le)=>{y(ve=>({...ve,[G]:le})),c({itemId:G,response:Number(le)}),N.has(G)&&(R(pe=>{const be=new Set(pe);return be.delete(G),be}),r.find(pe=>pe.id===G)&&r.filter(be=>be.isRequired&&be.id!==G&&Ha(S[be.id])).length===0&&A(!1))},[N,r,c,S]),K=(0,u.useCallback)((G,le,ve)=>{if(ve&&le.length>ve)return;const pe=S[G]||"",be=ve&&le.length===ve&&pe.length<ve;y(ye=>({...ye,[G]:le})),c({itemId:G,response:le}),be&&H(`Character limit reached. ${ve} characters maximum.`),N.has(G)&&le.trim()!==""&&(R(ge=>{const it=new Set(ge);return it.delete(G),it}),r.filter(ge=>ge.isRequired&&ge.id!==G&&Ha(S[ge.id])).length===0&&A(!1))},[H,r,c,S,N]),Y=(0,u.useCallback)(async()=>{if(!t||!l){console.error("Missing blockId or lessonId");return}E(!0);try{const G=r.flatMap(le=>{const ve=S[le.id],pe=Array.isArray(ve)?"":ve||"",be=L(le.question)??"",ye={id:String(t),lessonId:String(l),itemId:le.id,questionTitle:Tn(String(be)),surveyTitle:Tn(String(L(b)??"")),isUnfinished:!1};if(le.questionType==="RATING"){const ge=b6(le,pe);if(ge===void 0)return[];const it=pu(le),Ft=Object.fromEntries(it.map((Pn,Ht)=>[Ht+1,L(le.labels?.[Ht])??Pn.defaultLabel]));return[{...ye,ratingOptions:Ft,type:le.questionType,response:ge}]}if(le.questionType==="LINEAR_SCALE")return[{...ye,type:"LINEAR_SCALE",response:pe===""?void 0:Number(pe)}];if(le.questionType==="MULTIPLE_CHOICE"||le.questionType==="MULTIPLE_RESPONSE"){const ge=le.choices??[],Ft=(Array.isArray(ve)?ve:ve?[ve]:[]).flatMap(Pn=>{const Ht=ge.find(It=>It.id===Pn);return Ht?[{id:Ht.id,title:Tn(String(L(Ht.title)??""))}]:[]});return[{...ye,type:le.questionType,response:Ft}]}return[{...ye,type:le.questionType==="SHORT_RESPONSE"?"SHORT_RESPONSE":"LONG_RESPONSE",response:pe}]});window.Runtime?.reportUngradedAnswers&&await window.Runtime.reportUngradedAnswers(G),r.forEach(le=>d?.({id:le.id})),h?.(S),k(!0),i()}catch(G){console.error("Failed to submit survey:",G)}finally{E(!1)}},[t,l,r,S,d,h,b,L,i]),q=(0,u.useCallback)(G=>{if(G.preventDefault(),I)return;const ve=r.filter(pe=>pe.isRequired).filter(pe=>Ha(S[pe.id]));if(ve.length>0){A(!0),R(new Set(ve.map(pe=>pe.id))),B.current=!0,P(pe=>pe+1);return}Y()},[I,Y,r,S]);(0,u.useEffect)(()=>{B.current&&O.current&&(O.current.focus(),B.current=!1)},[M]),(0,u.useEffect)(()=>{!$&&T&&j.current&&j.current.focus()},[T,$]);const J=(0,u.useRef)(null),ee=(0,u.useRef)(new Map),re=(0,u.useCallback)((G,le)=>{const ve=ee.current;le?ve.set(String(G),le):ve.delete(String(G))},[]),oe=C!==L6;(0,u.useEffect)(()=>{if(!oe)return;const G=J.current;if(!G)return;const le=`.${String(he("question-text"))}`,ve=pe=>{if(pe.button!==0)return;const be=pe.target;if(!(be instanceof HTMLElement))return;const ye=be.closest(le);if(!(ye instanceof HTMLElement)||be.closest('[contenteditable="true"]'))return;const ge=ye.dataset.surveyItemId,it=ge==null?void 0:ee.current.get(ge);it&&(pe.preventDefault(),it.setFocus())};return G.addEventListener("mousedown",ve),()=>G.removeEventListener("mousedown",ve)},[oe]);const Se=(G,le)=>{const ve=S[G.id]||"",pe=`survey-q-${G.id}`,be=`${pe}-char-count`,ye=`${pe}-error`,ge=N.has(G.id),it=ge&&le===r.findIndex(Qe=>N.has(Qe.id));if(G.questionType==="LINEAR_SCALE"){const Qe=Math.min($q,Math.max(Hq,G.scaleMax??zq)),Et=Array.from({length:Qe},(ke,Ke)=>Ke+1),Ut=he("linear-scale-options",{wide:Qe<=y6,medium:Qe>y6&&Qe<=Vq}),ln=he("linear-scale",{error:ge});return(0,s.jsxs)("fieldset",{"aria-describedby":ge?ye:void 0,className:he("question",{error:ge}),ref:it?D:void 0,tabIndex:-1,children:[(0,s.jsxs)("legend",{className:he("question-text"),"data-survey-item-id":String(G.id),children:[C(G,pe,re),G.isRequired&&(0,s.jsxs)("span",{className:he("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:he("interactive"),children:(0,s.jsxs)("div",{className:ln,children:[(0,s.jsx)("div",{className:he("linear-scale-label"),children:v(G)}),(0,s.jsx)("div",{className:Ut,children:Et.map(ke=>{const Ke=ve===String(ke);return(0,s.jsxs)("label",{className:he("linear-scale-option"),children:[(0,s.jsx)("span",{className:he("linear-scale-number"),children:ke}),(0,s.jsx)("div",{className:he("linear-scale-indicator"),children:(0,s.jsx)(ie,{className:he("linear-scale-dot",{active:Ke}),"data-testid":Ke?"linear-scale-dot-active":"linear-scale-dot",name:"circle-solid"})}),(0,s.jsx)("input",{checked:Ke,className:he("linear-scale-input"),name:`survey-${G.id}`,onChange:()=>_(G.id,String(ke)),type:"radio",value:String(ke)})]},ke)})}),(0,s.jsx)("div",{className:he("linear-scale-label"),children:f(G)})]})}),ge&&(0,s.jsxs)("div",{className:he("error-message"),id:ye,children:[(0,s.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyRatingRequired]})]},G.id)}if(G.questionType==="RATING"){const Qe=pu(G).map((ke,Ke)=>({value:ke.value,label:G.labels?.[Ke],icon:ke.icon})),Et=he("question",{error:ge}),Ut=he("rating-options",{error:ge}),ln=ge?ye:void 0;return(0,s.jsxs)("fieldset",{"aria-describedby":ln,className:Et,ref:it?D:void 0,tabIndex:-1,children:[(0,s.jsxs)("legend",{className:he("question-text"),"data-survey-item-id":String(G.id),children:[C(G,pe,re),G.isRequired&&(0,s.jsxs)("span",{className:he("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:he("interactive"),children:(0,s.jsx)("div",{className:Ut,children:Qe.map((ke,Ke)=>{const Sn=ve===ke.value,Ln=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("input",{checked:Sn,className:he("rating-input"),name:`survey-${G.id}`,onChange:()=>Q(G.id,ke.value),type:"radio",value:ke.value}),(0,s.jsx)(ie,{"aria-hidden":"true",className:he("rating-icon"),name:ke.icon}),g(G,Ke)]}),Dr=he("rating-option",{selected:Sn,error:ge,"two-options":Qe.length===2,"three-options":Qe.length===3,"four-options":Qe.length===4,"five-options":Qe.length===5});return W?(0,s.jsx)(_t,{cardMode:"WHITE",className:Dr,tag:"label",children:Ln},ke.value):(0,s.jsx)("label",{className:Dr,children:Ln},ke.value)})})}),ge&&(0,s.jsxs)("div",{className:he("error-message"),id:ye,children:[(0,s.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyRatingRequired]})]},G.id)}if(G.questionType==="MULTIPLE_CHOICE"){const Qe=G.choices??[],Et=he("choices",{error:ge});return(0,s.jsxs)("fieldset",{"aria-describedby":ge?ye:void 0,className:he("question",{error:ge}),ref:it?D:void 0,tabIndex:-1,children:[(0,s.jsxs)("legend",{className:he("question-text"),"data-survey-item-id":String(G.id),children:[C(G,pe,re),G.isRequired&&(0,s.jsxs)("span",{className:he("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:he("interactive"),children:(0,s.jsx)("ul",{className:Et,children:Qe.map(Ut=>{const ln=ve===Ut.id;return(0,s.jsx)("li",{className:he("choice"),children:(0,s.jsxs)("label",{className:he("choice-option",{selected:ln}),children:[(0,s.jsx)("input",{checked:ln,className:he("choice-input"),name:`survey-${G.id}`,onChange:()=>z(G.id,Ut.id),type:"radio",value:Ut.id}),(0,s.jsx)("span",{"aria-hidden":"true",className:he("choice-indicator"),children:(0,s.jsx)(ie,{className:he("choice-dot",{active:ln}),name:"circle-solid"})}),(0,s.jsx)("span",{className:he("choice-text"),children:(0,s.jsx)(Ge,{allowTabNavigation:!1,value:Ut.title})})]})},Ut.id)})})}),ge&&(0,s.jsxs)("div",{className:he("error-message"),id:ye,children:[(0,s.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyMultipleChoiceRequired]})]},G.id)}if(G.questionType==="MULTIPLE_RESPONSE"){const Qe=G.choices??[],Et=S[G.id],Ut=Array.isArray(Et)?Et:[],ln=he("choices",{error:ge});return(0,s.jsxs)("fieldset",{"aria-describedby":ge?ye:void 0,className:he("question",{error:ge}),ref:it?D:void 0,tabIndex:-1,children:[(0,s.jsxs)("legend",{className:he("question-text"),"data-survey-item-id":String(G.id),children:[C(G,pe,re),G.isRequired&&(0,s.jsxs)("span",{className:he("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:he("interactive"),children:(0,s.jsx)("ul",{className:ln,children:Qe.map(ke=>{const Ke=Ut.includes(ke.id);return(0,s.jsx)("li",{className:he("choice"),children:(0,s.jsxs)("label",{className:he("choice-option",{selected:Ke}),children:[(0,s.jsx)("input",{checked:Ke,className:he("choice-input"),name:`survey-${G.id}`,onChange:()=>F(G.id,ke.id),type:"checkbox",value:ke.id}),(0,s.jsx)("span",{"aria-hidden":"true",className:he("choice-indicator",{checkbox:!0}),children:(0,s.jsx)(ie,{className:he("choice-check",{active:Ke}),name:"check"})}),(0,s.jsx)("span",{className:he("choice-text"),children:(0,s.jsx)(Ge,{allowTabNavigation:!1,value:ke.title})})]})},ke.id)})})}),ge&&(0,s.jsxs)("div",{className:he("error-message"),id:ye,children:[(0,s.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyMultipleResponseRequired]})]},G.id)}const Ft=Array.isArray(ve)?"":ve,Pn=he("question",{error:ge}),Ht=he("text-input",{error:ge}),It=G.questionType==="SHORT_RESPONSE"||G.questionType==="LONG_RESPONSE"?G.maxLength:void 0,Go=[ge?ye:null,It?be:null].filter(Boolean).join(" ")||void 0;return(0,s.jsxs)("div",{className:Pn,children:[(0,s.jsxs)("div",{className:he("question-text"),"data-survey-item-id":String(G.id),children:[C(G,pe,re),G.isRequired&&(0,s.jsxs)("span",{className:he("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:he("interactive"),children:(0,s.jsxs)("div",{className:he("text-response"),children:[(0,s.jsx)("textarea",{"aria-describedby":Go,"aria-invalid":ge?!0:void 0,"aria-labelledby":pe,"aria-required":G.isRequired?!0:void 0,className:Ht,maxLength:It,onChange:Qe=>K(G.id,Qe.target.value,It),ref:it?D:void 0,rows:G.questionType==="LONG_RESPONSE"?4:2,value:Ft}),It&&(0,s.jsxs)("div",{className:he("character-count"),children:[(0,s.jsxs)("span",{"aria-hidden":"true",children:[Ft.length," / ",It]}),(0,s.jsx)("span",{className:"visually-hidden-always",id:be,children:`${a.a11yBlockSurveyCharCount} ${Ft.length} ${a.a11yPreposition} ${It}`})]})]})}),ge&&(0,s.jsxs)("div",{className:he("error-message"),id:ye,children:[(0,s.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyFreeResponseRequired]})]},G.id)};return(0,s.jsx)(Oh,{...x,children:(0,s.jsx)(we,{className:he(),children:(0,s.jsx)(Be,{animateBlockEntrance:e,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{children:(0,s.jsx)(_t,{className:he("container",{[`custom-width-${ne}`]:!0}),children:T?(0,s.jsx)("div",{className:he("confirmation"),ref:j,tabIndex:-1,children:(0,s.jsxs)("p",{className:he("confirmation-text"),children:[(0,s.jsx)(ie,{name:"circle-check-regular"})," ",a.surveyConfirmation]})}):(0,s.jsxs)("form",{noValidate:!0,onSubmit:q,children:[b&&(0,s.jsx)(Ge,{className:he("title"),tagName:"h2",value:b}),(0,s.jsx)("div",{className:he("questions"),ref:J,children:r.map((G,le)=>Se(G,le))}),(0,s.jsxs)("div",{className:he("actions"),children:[(0,s.jsx)("div",{className:he("validation-error",{visible:w}),id:`validation-error-${t}`,role:"alert",children:w&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyValidationError]})}),(0,s.jsx)("div",{className:`${he("submit")} brand--ui`,children:(0,s.jsx)("button",{"aria-describedby":w?U:void 0,className:he("submit-button"),"data-testid":"survey-submit-button",disabled:I,type:"submit",children:I?a.surveySubmitting:a.surveySubmit})})]})]})})})})})})}const np=V("block-process-card"),T6=({icon:e,isOverlayAudio:t=!1,onClick:n,text:o,variant:r})=>{const a=`${r}-btn`;return(0,s.jsxs)("button",{className:np(a,{"audio-overlay":t}),onClick:n,type:"button",children:[(0,s.jsx)("span",{className:np(`${a}-text`),children:o}),(0,s.jsx)(ie,{classNameIcon:np(`${a}-icon`),name:e})]})},Yq=V("block-process-card"),Zq=({activeIndex:e,enableVideoPlaybackSpeed:t,id:n,index:o,isIntroStep:r=!1,isOverlayAudio:a=!1,item:i,labels:c,lessonId:l,media:d,onMediaLoad:h,settingZoomOnClick:m})=>{const{image:f}=d??{},v=a?f?.align??"center":"center",C=Yq("media",{legacy:!1,"audio-overlay":a,[`audio-overlay-${v}`]:a,"intro-step":r}),g=e===o;return(0,s.jsx)("div",{className:C,children:(0,s.jsx)(Qt,{activeIndex:e,blockId:n,defaultAlign:"center",enableVideoPlaybackSpeed:t,hasPadding:!1,index:`${n}-${o}`,isOverlayAudio:a,item:i,itemIndex:o,labels:c,lessonId:l,media:d,onLoad:h,opts:{disableZoom:!m},shouldPause:!g})})};var sp=p(82920);const Fo=V("block-process-card"),Xq=({text:e})=>{const t=sp.useRef(null),{isInView:n}=qq({ref:t,threshold:.75});return(0,s.jsxs)("div",{className:Fo("swipe-badge",{animate:n}),ref:t,children:[(0,s.jsx)("span",{className:Fo("swipe-badge-text"),children:e}),(0,s.jsx)(ie,{className:Fo("swipe-badge-icon"),name:"chevron-right-solid"})]})};function qq({ref:e,rootMargin:t="0px",threshold:n=.1}){const[o,r]=sp.useState(!1);return sp.useEffect(()=>{if(!e.current||o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&(r(!0),a.disconnect())},{rootMargin:t,threshold:n});return a.observe(e.current),()=>a.disconnect()},[o,e,t,n]),{isInView:o}}const Jq=({activeIndex:e,className:t,description:n,enableVideoPlaybackSpeed:o,hasIntro:r,id:a,index:i,item:c,labels:l,lessonId:d,media:h,onClickRestart:m,onClickStart:f,settingAudioPosition:v,settingHeadingLevel:C=2,settingShowStepLabel:g=!0,settingStepLabel:x,settingZoomOnClick:b,showSwipeBadge:L,style:S,title:y,totalSteps:T,type:k})=>{const I=`h${C}`,E=k==="intro",w=k==="summary",A=k==="step",N=r?i:i+1,R=Re(x)||l.processStepName,M=Re(Array.isArray(h)?{}:h),P=gs(M,v,!0,"process"),j=()=>{if(!h)return null;const O={activeIndex:e,blockId:a,enableVideoPlaybackSpeed:o,id:a,index:i,isIntroStep:E,labels:l,lessonId:d,media:h,onMediaLoad:()=>{},settingZoomOnClick:b,item:c},B={audio:{media:P.audioOnlyMedia||M,isOverlayAudio:!1},image:{media:P.imageOnlyMedia||M,isOverlayAudio:!1},video:{media:P.videoOnlyMedia||M},embed:{media:P.embedOnlyMedia||M,isOverlayAudio:!1},overlay:{media:M,isOverlayAudio:!1}};return P.renderOrder.map((D,H)=>{if(D==="text")return(0,s.jsx)(Ie,{className:Fo("description"),value:n},`text-${H}`);const $=B[D];return $?(0,s.jsx)(Zq,{...O,...$},`${D}-${H}`):null})};return(0,s.jsxs)("div",{className:Fo(null,{[k]:!0}).mix(t),style:S,children:[A&&g&&(0,s.jsx)("div",{className:Fo("number"),children:`${R} ${N}`}),(0,s.jsx)("div",{className:Fo("title"),children:(0,s.jsx)(I,{children:(0,s.jsx)(Ie,{value:y})})}),j(),!h&&(0,s.jsx)(Ie,{className:Fo("description"),value:n}),E&&T>1&&(0,s.jsx)(T6,{icon:"chevron-right-solid",isOverlayAudio:P.isOverlayAudio,onClick:f,text:l.processStart,variant:"start"}),w&&T>1&&(0,s.jsx)(T6,{icon:"arrow-rotate-left",isOverlayAudio:P.isOverlayAudio,onClick:m,text:l.processStartAgain,variant:"restart"}),L&&A&&(0,s.jsx)(Xq,{text:l.processSwipe})]})};var ws=p(82920);const eJ=V("block-process-carousel"),k6=e=>e?.type==="intro",op=e=>e?.type==="summary",rp=e=>e?.type==="step",I6=e=>e?.isHidden,tJ=({animateBlockEntrance:e,enableVideoPlaybackSpeed:t,id:n,initiallyVisible:o,isLearner:r,items:a,labels:i,lessonId:c,onStep:l,onTranscriptUpdate:d,previewType:h,processRef:m,settings:{audioPosition:f,headingLevel:v,stepLabel:C,showStepLabel:g,zoomOnClick:x}})=>{const b=kt(480),L=lh(),S=at(),y=ws.useRef(null),[T,k]=ws.useState(0),[I,E]=ws.useState(!1),w=ws.useMemo(()=>h===sr.MOBILE_PORTRAIT||h===sr.MOBILE_LANDSCAPE,[h]),A=ws.useMemo(()=>{const $=a.filter(ne=>!I6(ne)),W=$.find(k6),U=$.find(op),Z=$.filter(rp);return[W,...Z,U].filter(Boolean)},[a]),N=ws.useMemo(()=>A.findIndex(($,W)=>rp($)&&(rp(A[W+1])||op(A[W+1]))),[A]),R=k6(A[0]),M=op(A[A.length-1]),P=!!h;ws.useEffect(()=>{l&&(a.forEach($=>I6($)&&l($)),A.length>0&&l(A[0]))},[]);const j=ws.useCallback(()=>{y.current?.navigateToSlide?.(0)},[]),O=ws.useCallback(()=>{y.current?.navigateToSlide?.(1)},[]),B=ws.useCallback($=>{if(k($),m.current){const Z=m.current.closest("[data-block-id]")??m.current;mG(Z,{offsetTop:document.getElementById("app-header")?.offsetHeight??0})}$!==N&&!I&&E(!0),l?.(A[$]);const W=A[$]?.media;S(W)?.audio&&d?.({audioPlayerId:ps({refs:`items:${n}/items:${A[$]?.id}`}),transcriptMedia:W})},[A,N,S,I,n,l,d,m]),D=({index:$,isActive:W,onClick:U,onKeyDown:Z})=>{const ne=R&&$===0,Q=M&&$===A.length-1,z=R?$:$+1;let F,_;ne?(F=i?.a11yBlockProcessSlideControlsIntroduction,_=(0,s.jsx)(ie,{className:"carousel-controls-item-intro-icon",name:"chevron-right"})):Q?(F=i?.a11yBlockProcessSlideControlsSummary,_=(0,s.jsx)(ie,{name:"check-regular"})):(F=z.toString(),_=z.toString());const K=`${i?.a11yBlockProcessSlideControlsGoToSlide} ${F}`;return(0,s.jsx)(V3,{"aria-label":K,ariaLabel:K,className:"carousel-controls-item-btn",isActive:W,onClick:U,onKeyDown:Z,children:_},$)},H=e?"fadeIn":"none";return(0,s.jsx)(Be,{animateBlockEntrance:P,animateIn:H,duration:P&&e?1:0,initiallyVisible:o,isLearner:r,children:(0,s.jsx)("div",{className:eJ(),children:(0,s.jsx)(Ud,{blockId:n,carouselRef:y,items:A,children:()=>(0,s.jsx)(_d,{iconNameLeft:"chevron-left-solid",iconNameRight:"chevron-right-solid",isInfinite:!1,isRTL:L,labelCarousel:i?.a11yBlockProcessCarousel,labelCarouselRoleDesc:i?.a11yBlockProcessRoleDescription,labelSlideControls:i?.a11yBlockProcessSlideControls,labelSlideControlsGoToNext:i?.a11yBlockProcessSlideControlsGoToNext,labelSlideControlsGoToPrevious:i?.a11yBlockProcessSlideControlsGoToPrevious,labelSlideControlsGoToSlide:i?.a11yBlockProcessSlideControlsGoToSlide,labelSlideCounterPreposition:i?.blocksPreposition,labelSlidePreposition:i?.a11yBlockProcessSlidePreposition,labelSlideRoleDesc:i?.a11yBlockProcessSlideRoleDescription,onChange:B,ref:y,renderSlideIndicator:D,shouldMouseEmulateTouch:w,shouldUseCounter:!1,shouldUseGoToSlide:!0,children:A.map(($,W)=>(0,s.jsx)(_t,{activeIndex:T,description:$.description,enableVideoPlaybackSpeed:t,hasIntro:R,id:n,index:W,isHidden:$.isHidden,item:$,labels:i,lessonId:c,media:$.media,onClickRestart:j,onClickStart:O,settingAudioPosition:f,settingHeadingLevel:v,settingShowStepLabel:g,settingStepLabel:C,settingZoomOnClick:x,showSwipeBadge:b&&!I&&W===N,tag:Jq,title:$.title,totalSteps:A.length,type:$.type},$.id))})})})})};var nJ=p(82920);const sJ=e=>{const{blockId:t}=e,n=nJ.useRef(null);return(0,s.jsx)(we,{className:"block-process",ref:n,children:(0,s.jsx)(tJ,{id:t,processRef:n,...e})})};var oJ=p(11842),rJ=p.n(oJ),aJ=p(41569),E6=p.n(aJ),iJ=p(61417),N6=p.n(iJ),cJ=p(10285),lJ=p.n(cJ),dJ=p(39602),Ho=p.n(dJ);const j6=e=>({...e.responses[e.response],hasCharacter:e.hasCharacter,type:"response"}),uJ=(e,t)=>{const n=e.responses[e.response],o={emotion:t.emotion,goTo:t.goTo,nextSlide:t.nextSlide},r="action"in t?{action:t.action}:{};return{...o,...r,description:n?.feedback||"",type:"dialogue",hasCharacter:e.hasCharacter}},hJ=e=>[j6(e)],mJ=e=>{const t=!!e.responses[e.response],n=j6(e),o=uJ(e,n);return t?[n,o]:[o]},fJ=e=>e.hasFeedback?[e,...mJ(e)]:e.response!=null?[e,...hJ(e)]:[e],pJ=(e,t)=>{if(!t)return;const{scene:n,slide:o}=t,r=e.findIndex(c=>c.id===n),i=(e[r]?.slides||[]).findIndex(c=>c.id===o);return{scene:r,slide:i}},w6=kl()(pJ);var gJ=p(41182),vJ=p.n(gJ);const CJ=Lt()(Ye()("filters"),Ds()(Ze()("name","rise_emotion")),ti()(Nt())),xJ=Lt()(Ye()("filters"),pr()(Ze()("name","rise_emotion")),Ye()("value")),A6=e=>new URL(e).pathname.slice(1),bJ=e=>Lt()(Jt()("key",A6(e.src)),Jt()("thumbnailKey",A6(e.thumbnail)))(e),yJ=Lt()(Ye()("poses"),Ds()(CJ),ft()(e=>[xJ(e),e]),vJ(),Cs()(bJ));var ape,As=p(82920);const ap=e=>e===-1?null:e,SJ=e=>Xn()(Ct(),Ee(),e),R6=ti()(Ct()),$a=af()(R6,is),P6=rJ()(Zm()),M6=SJ(kN),ip=e=>ko()(e);class LJ extends As.Component{static get defaultProps(){return{getCharacter:Function.prototype,onItemUpdate:Function.prototype}}continueRef;feedbackRef;resetRef;buttonRef=As.createRef();responseItemRef=As.createRef();scenarioRef=As.createRef();blockContentRef=As.createRef();endRef=As.createRef();textRef=As.createRef();refs=As.createRef();dynamicRefs=As.createRef();fadeObservers=new Map;shouldFocus=!1;constructor(t){super(t);const n={activeScene:0,activeSlide:0,initiated:!1,prevScene:0,prevSlide:0,resizes:0,slides:{}};this.refs.current={},this.state=t.initialState||n,this.fetchCharacters=this.fetchCharacters.bind(this),this.fetchCharacterPose=this.fetchCharacterPose.bind(this),this.getCharacterPose=this.getCharacterPose.bind(this),this.handleNavEvent=this.handleNavEvent.bind(this),this.onClick=this.onClick.bind(this),this.onFocus=this.onFocus.bind(this),this.onInit=this.onInit.bind(this),this.onResize=this.onResize.bind(this),this.onResponseClick=this.onResponseClick.bind(this),this.onTryAgainClick=this.onTryAgainClick.bind(this),this.renderBackground=this.renderBackground.bind(this),this.renderButton=this.renderButton.bind(this),this.renderDetails=this.renderDetails.bind(this),this.renderDialogues=this.renderDialogues.bind(this),this.renderEnd=this.renderEnd.bind(this),this.renderPose=this.renderPose.bind(this),this.renderResponse=this.renderResponse.bind(this),this.renderText=this.renderText.bind(this),this.renderAudioMedia=this.renderAudioMedia.bind(this),this.renderDialogueWithAudioPositioning=this.renderDialogueWithAudioPositioning.bind(this),this.renderTextWithAudioPositioning=this.renderTextWithAudioPositioning.bind(this),this.resetSlide=this.resetSlide.bind(this),this.resetSlides=this.resetSlides.bind(this),this.setNextSlide=this.setNextSlide.bind(this),this.dynamicRefs.current={},this.setupFadeObserver=this.setupFadeObserver.bind(this)}setupFadeObserver(t){if(!t)return;const n=this.fadeObservers.get(t);n&&(n.observer.disconnect(),t.removeEventListener("scroll",n.scrollHandler),this.fadeObservers.delete(t));const o=Array.from(t.children).find(d=>d.className.includes("-bottom"));if(!o)return;const r=t.parentElement?.classList.contains("scenario-block__dialogue__bubble")||t.parentElement?.classList.contains("scenario-block__dialogue__pane")?t.parentElement:t,a=()=>{const{scrollHeight:d,clientHeight:h}=t;return d>h+2},i=d=>{const h=d?.[0]?.isIntersecting??!1,m=a();m?r.classList.add("has-overflow"):r.classList.remove("has-overflow"),!h&&m?r.classList.add("show-fade"):r.classList.remove("show-fade")},c=new IntersectionObserver(i,{root:t,threshold:[0,1]}),l=()=>{};this.fadeObservers.set(t,{observer:c,scrollHandler:l}),c.observe(o)}componentDidMount(){const{initialState:t,items:n}=this.props,o=Me()(zr()("poses"),kn()({},"character"),ip);$a(n)&&!o(n)&&this.fetchCharacters(),t||this.resetSlides(),window.addEventListener("resize",this.onResize),window.addEventListener(Ue,this.handleNavEvent)}handleNavEvent(t){const{path:n}=t.detail,{blockId:o,sceneId:r,slideId:a,responseId:i}=ma(n,["block","scene"]),c=n.at(-1)==="feedback";if(o!==this.props.blockId)return;const l=ap(this.props.items.findIndex(m=>m.id===r)),d=l!==null?ap(this.props.items[l].slides.findIndex(m=>m.id===a)):null,h=d!==null?ap(this.props.items[l].slides[d].responses.findIndex(m=>m.id===i)):null;this.setState({activeScene:l??0,activeSlide:d??0},()=>{l!==null&&d!==null&&this.setState({slides:{...this.state.slides,[`${l}.${d}`]:{...this.state.slides[`${l}.${d}`],hasFeedback:c,response:h}}})})}componentDidUpdate(){const{items:t,onStep:n}=this.props,{activeScene:o,activeSlide:r}=this.state,a=bt()([],[o,"slides"],t),i=bt()(null,[r,"goTo"],a),c=bt()(null,[r,"type"],a);if(n&&(i==="end"&&c==="text"||!i&&!c)&&N6()(n,t),this.shouldFocus){this.shouldFocus=!1;const m=this.scenarioRef.current?.querySelector('[data-scenario-focus][tabindex="-1"]');m?m.focus():Hm(this.scenarioRef.current)}this.fadeObservers.forEach(({observer:m,scrollHandler:f},v)=>{document.contains(v)||(m.disconnect(),v.removeEventListener("scroll",f),this.fadeObservers.delete(v))})}componentWillUnmount(){clearTimeout(this.continueRef),clearTimeout(this.feedbackRef),clearTimeout(this.resetRef),window.removeEventListener("resize",this.onResize),window.removeEventListener(Ue,this.handleNavEvent),this.fadeObservers.forEach(({observer:t,scrollHandler:n},o)=>{t.disconnect(),o.removeEventListener("scroll",n)}),this.fadeObservers.clear()}getActiveScene(){return this.getScene(this.state.activeScene)}getScene(t){const{items:n}=this.props;return n&&t>=0&&t<n.length?n[t]:null}fetchCharacterPose(t,n){const o=this.getScene(t),r=o?.slides,a=r&&n>=0&&n<r.length;if(!o||!r||!a)return{name:"",pose:null};const{character:i}=o,c=r[n],l=`${t}.${n}`,d=[l,"response"],h=[l,"hasFeedback"],m=bt()(null,d,this.state.slides),f=bt()(!1,h,this.state.slides),v=kn()("neutral","emotion",c),C=Xn()(Pe()(f),bt()(v,["responses",m,"emotion"]),Pe()(v)),g=Lt()(bt()(i?.poses?.neutral,["poses",C(c)]),M6);return{name:i?.name||"",pose:g(i)}}fetchCharacters(){const{getCharacter:t,items:n,onItemUpdate:o}=this.props,r=vo()(["id","name","poses","src"]),a=c=>l=>o({itemId:c,payload:{character:l}}),i=({character:c,id:l})=>$a(c)&&t(c.id).then(d=>Jt()("poses",yJ(d),d)).then(r).then(a(l));n.map(i)}isCharacterHidden(){const{items:t}=this.props,{activeScene:n,activeSlide:o}=this.state,a=this.getActiveScene()?.slides?.[o],i=o===null,c=t[n];return i?!(c?.slidesHaveCharacterByDefault??!1):a&&!a.hasCharacter}getCharacterPose(){const{items:t}=this.props,{activeScene:n,activeSlide:o,prevScene:r,prevSlide:a}=this.state,i=bt()([],[n,"slides"],t),c=bt()(!0,[o,"hasCharacter"],i);return R6(r)&&cl()(c)?this.fetchCharacterPose(r,a):this.fetchCharacterPose(n,o)}onClick(t,n){const{items:o,onStep:r}=this.props,{activeScene:a,activeSlide:i}=this.state,c=this.getActiveScene()?.slides,l=kn()(null,"type",c?.[i])==="dialogue",d=a===o.length-1,h=i===(c?.length??0)-1,m={activeSlide:i+1},f={activeScene:a+1,activeSlide:0},v={activeSlide:null},C={activeScene:0,activeSlide:0},g=Lt()(w6(o),y=>({activeScene:y.scene,activeSlide:y.slide})),x=un()([[Pe()(h&&d),Pe()(v)],[Pe()(h&&!d),Pe()(f)],[tr(),Pe()(m)]]),b=Xn()(Pe()(l),Pe()(v),Pe()(C)),L=un()([[en()("slide"),Ho()(g,[n])],[en()("next"),x],[en()("end"),b]]),S=()=>this.continueRef=setTimeout(this.setNextSlide,300);this.resetRef=setTimeout(this.resetSlide.bind(this,a,i),0),this.setState({prevScene:a,prevSlide:i}),this.setState(L(t),S),t==="end"&&this.resetSlides(),t==="end"&&r&&N6()(r,o)}onFocus(){this.shouldFocus=!0}onInit(){this.setState({initiated:!0})}onResize(){this.setState({resizes:this.state.resizes+1})}onResponseClick(t,n){const{activeScene:o,activeSlide:r,slides:a}=this.state,{getL10nValue:i,lessonId:c,blockId:l}=this.props,d=`${o}.${r}`,h=Jt()("response",t),m=Jt()("hasFeedback",!0),f=Bs()({[`${d}`]:h}),v=Bs()({[`${d}`]:m});n.media&&i(n.media)?.audio&&xe.playerId===`audio-${c}-${l}`&&xe.pause();const g=Me()(v,f);this.setState({slides:f(a)},()=>{this.shouldFocus=!0,this.setState({slides:g(a)})})}onTryAgainClick(){const{activeScene:t,activeSlide:n,slides:o}=this.state,r=`${t}.${n}`,a=E6()({hasFeedback:null,response:null}),i=Bs()({[`${r}`]:a});this.setState({slides:i(o)})}render(){const{blockId:t,getL10nValue:n,isPDF:o,items:r,labels:a}=this.props,{activeScene:i,activeSlide:c,initiated:l}=this.state,h=this.getActiveScene()?.slides?.[c],m=Me()(is,kn()({},"character"),ip),f=Me()(zr()("poses"),kn()({},"character"),ip),v=Me()(qn(),bt()({},["character","poses"])),C=Me()(Pc(),qn(),ft()(v)),g=this.isCharacterHidden(),x=X()("scenario-block",{"scenario-block--initiated":l,"scenario-block--mobile":Ys.isMobile,"scenario-block--loading":m(r)&&!f(r),"scenario-block--character-hidden":g}),b=`scenario-live-${t}`,L={"aria-label":a?.a11yGroupScenario,"aria-describedby":b,className:x,ref:this.scenarioRef,role:"group",style:window.innerWidth<480?{height:window.innerHeight}:void 0},S=lt(n(r?.[0].background?.media)?.image),y=un()([[Ct(),this.renderEnd],[Ze()("type","dialogue"),this.renderDialogues],[Ze()("type","text"),this.renderText],[tr(),Pe()(null)]]),T=X()("scenario-block__character",{"scenario-block__character--hidden":g}),k=`${i}.${c}`,I=this.state.slides[k],E=I?.hasFeedback?h?.responses?.[I?.response]?.alt:h?.alt,w=n(E);return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{...L,"data-l10n-id":jt(E),children:[(0,s.jsx)("div",{"aria-live":"polite",className:"visually-hidden-always",id:b,children:w}),(0,s.jsx)("div",{className:"scenario-block__spinner"}),(0,s.jsx)("div",{className:"scenario-block__background-wrapper",children:$a(r)&&r.map(this.renderBackground)}),S&&(0,s.jsx)(vn,{alt:"",onLoad:this.onInit,src:S}),(0,s.jsxs)("div",{className:"scenario-block__inner",children:[(0,s.jsx)("div",{className:T,children:f(r)&&C(r).map(this.renderPose)}),(0,s.jsx)(Qo,{children:$a(r)&&y(h)})]})]}),o&&h&&this.renderDetails(h)]})}renderBackground(t,n){const{activeScene:o}=this.state,{id:r,blurBackground:a}=t,i=this.props.getL10nValue(t?.background?.media)?.image,c=X()("scenario-block__background",{"scenario-block__background--active":o===n,"scenario-block__background--blur":a??!0}),l=lt(i);return l?(0,s.jsx)(vn,{alt:"",className:c,src:l},r):(0,s.jsx)(s.Fragment,{})}renderButton(t){const{labels:n}=this.props,{scenarioContinue:o,scenarioTryAgain:r}=n,{goTo:a,nextSlide:i}=t,c="action"in t?t.action:void 0,l={appear:!0,classNames:"scenario-block__dialogue__button-",nodeRef:this.buttonRef,timeout:{enter:0,exit:1e3}},d=c==="tryAgain"?(0,s.jsxs)("span",{children:[r," ",(0,s.jsx)("i",{className:"icon icon-reload"})]}):(0,s.jsx)("span",{children:o}),m={className:"scenario-block__dialogue__button",key:"button",onClick:c==="tryAgain"?Me()(this.onFocus,this.onTryAgainClick):Me()(this.onFocus,Ho()(this.onClick,[a,i]))};return(0,s.jsx)(Qo,{children:(0,s.jsx)(Os,{...l,children:(0,s.jsx)("button",{...m,type:"button",children:d})})})}renderDetails(t){const{items:n}=this.props,{activeScene:o,activeSlide:r}=this.state,{responses:a,type:i}=t,c=(m,f)=>(0,s.jsxs)("span",{children:[m," ",(0,s.jsx)(zD,{})," ",f]},m),l=Lt()(w6(n),m=>`Scene ${m.scene+1} Slide ${m.slide+1}`),d=(m,{goTo:f,nextSlide:v})=>un()([[en()("next"),Ho()(c,[m,"Next Slide"])],[en()("end"),Ho()(c,[m,"End of Scenario"])],[tr(),Ho()(c,[m,l(v||{})])]])(f),h=i==="text"?d("Continue",t):a.map((m,f)=>d(f,m));return(0,s.jsxs)("div",{className:"scenario-block__pdf-details",children:[(0,s.jsxs)("h3",{children:["Scene ",o+1," Slide ",r+1]}),h]})}renderDialogue(t,n,o){const{description:r,id:a,hasCharacter:i}=n,c="type"in n?n.type:void 0,{count:l,firstKey:d,hasFeedback:h,slide:m,totalDialogues:f}=t,v=o===0?a:o,C=o===1?d:o-1,g=o===0&&l===1,x=o===l,b=c==="dialogue"&&(g||x),L=this.dynamicRefs.current[`dialogue-${v}`],S=x&&this.dynamicRefs.current[`dialogue-${C}`],y=L&&L.offsetHeight,T=x&&S&&S.offsetHeight,k=h?30:0,I=window.innerWidth<480?20:30,E=I*2+60+T-k,w=I+60-k,A=lJ()(y+k-60),N=As.createRef(),{settings:R,getL10nValue:M}=this.props,P=R?.audioPosition,j=M(m.media),O=gs(j,P),B=O.renderOrder.indexOf("audio")<O.renderOrder.indexOf("text"),D=!!j?.audio,H=h&&o===f-1,$=X()("scenario-block__dialogue",{"scenario-block__dialogue--response":c==="response","scenario-block__dialogue--feedback":H,"scenario-block__dialogue--done":o<l-1,"scenario-block__dialogue--audio-top":B&&D}),W=un()([[Pe()(g),Pe()(null)],[en()(l),Pe()({top:`${E}px`})],[en()(l-1),Pe()({top:`${w}px`})],[en()(l-2),Pe()({top:`${A}px`})],[tr(),Pe()({top:`-${y+30}px`})]]),U={className:$,ref:_=>{this.dynamicRefs.current[`dialogue-${v}`]=_},style:W(o)},Z={appear:!0,classNames:"scenario-block__dialogue-",nodeRef:N,key:o,timeout:{enter:400,exit:400}},ne=X()({"scenario-block__dialogue__bubble":i||c==="response","scenario-block__dialogue__pane":!i}),Q=this.props.getL10nValue(r)||"",z=c!=="response"&&!H&&D&&B&&(0,s.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(m)}),F=(0,s.jsxs)("div",{className:ne,"data-scenario-focus":b?"":void 0,tabIndex:b?-1:void 0,children:[z,(0,s.jsxs)("div",{className:"scenario-block__dialogue__bubble__content",ref:this.setupFadeObserver,children:[c!=="response"&&!H?this.renderDialogueWithAudioPositioning(m,Q,O):(0,s.jsx)(Ie,{value:Q}),(0,s.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})]});return(0,s.jsx)(Os,{...Z,children:(0,s.jsx)("div",{children:(0,s.jsx)("div",{...U,children:$a(r)&&F})})})}renderDialogues(t){const{activeScene:n,activeSlide:o,slides:r}=this.state,{id:a,responses:i}=t,c=`${n}.${o}`,l=r[c]||{},h=Me()(Pc(),fJ,Jo()(l))(t),{hasFeedback:m,response:f}=l,{feedback:v}=i[f]||{},C=Ct()(f)&&is(i),g=m?h.length-1:h.length,x=(g===1&&Nt()(i)||g===2&&is(i))&&m,b={count:g,firstKey:bt()(null,[0,"id"],h),hasFeedback:m&&$a(v),slide:t,totalDialogues:h.length},L={classNames:"scenario-block__content-",nodeRef:this.blockContentRef,timeout:{enter:0,exit:1e3}},S=(0,s.jsx)("div",{className:"scenario-block__dialogues__bottom",children:(0,s.jsx)("div",{className:"scenario-block__dialogues__bottom__inner",children:(0,s.jsx)("div",{className:"scenario-block__dialogues__responses",children:(0,s.jsx)(Qo,{component:"ol",role:"list",children:i.map((y,T)=>this.renderResponse(y,t,T))})})})});return(0,s.jsx)(Os,{...L,children:(0,s.jsx)("div",{className:"scenario-block__dialogues scenario-block__content",children:(0,s.jsxs)("div",{className:"scenario-block__dialogues__inner",children:[(0,s.jsx)("div",{className:"scenario-block__dialogues__top",children:(0,s.jsx)("div",{className:"scenario-block__dialogues__top__inner",children:(0,s.jsx)(Qo,{children:h.map(this.renderDialogue.bind(this,b))})})}),C&&S,x&&this.renderButton(h[g-1])]})})},a)}renderEnd(){const{labels:t}=this.props,{scenarioComplete:n,scenarioStartOver:o}=t,r=Me()(this.onFocus,Ho()(this.onClick,["end",null])),a=X()(["scenario-block__text","scenario-block__text--end","scenario-block__content"]),i={classNames:"scenario-block__content-",nodeRef:this.endRef,timeout:{enter:0,exit:400}};return(0,s.jsx)(Os,{...i,children:(0,s.jsx)("div",{className:a,children:(0,s.jsxs)("div",{className:"scenario-block__text__inner","data-scenario-focus":"",tabIndex:-1,children:[(0,s.jsx)("div",{className:"scenario-block__text__title",children:(0,s.jsx)("h2",{children:n})}),(0,s.jsxs)("button",{className:"scenario-block__text__end",onClick:r,type:"button",children:[(0,s.jsx)("span",{children:o}),(0,s.jsx)("i",{className:"icon icon-reload"})]})]})},"end")},"end")}renderPose(t,n){const{pose:o}=this.getCharacterPose(),{filters:r,id:a}=t,i=M6(t),c=af()(Ze()("name","style")),l=c(Ze()("value","left_aligned")),d=c(Ze()("value","right_aligned")),h=X()("scenario-block__character__inner",{"scenario-block__character__inner--active":o===i,"scenario-block__character__inner--right":pr()(d,r),"scenario-block__character__inner--left":pr()(l,r)});return(0,s.jsx)("div",{className:h,"data-pose-id":a,children:(0,s.jsx)(vn,{alt:"",src:i})},`pose-${n}-${a}`)}renderResponse({description:t},n,o){const{isPDF:r}=this.props,a=r?kJ:Me()(this.onFocus,Ho()(this.onResponseClick,[o,n])),i=v=>{const g=v.currentTarget.querySelector(".scenario-block__response__inner");if(g){const x=g.getBoundingClientRect();if(v.clientX>x.right-16){v.preventDefault();return}}a(v)},c=v=>{const g=v.currentTarget.querySelector(".scenario-block__response__inner");if(g){const x=g.getBoundingClientRect();v.clientX>x.right-16?g.classList.add("hovering-scrollbar"):g.classList.remove("hovering-scrollbar")}},l=v=>{const g=v.currentTarget.querySelector(".scenario-block__response__inner");g&&g.classList.remove("hovering-scrollbar")},d=X()(["scenario-block__response",`scenario-block__response--${o}`]),h=X()("scenario-block__response-item",`scenario-block__response-item--${o}`),m={appear:!0,classNames:"scenario-block__response-item-",nodeRef:this.responseItemRef,timeout:{enter:0,exit:1e3}},f=(0,s.jsx)("button",{className:d,onClick:i,onMouseLeave:l,onMouseMove:c,type:"button",children:(0,s.jsxs)("div",{className:"scenario-block__response__inner",ref:this.setupFadeObserver,children:[(0,s.jsx)("div",{className:"scenario-block__response__number",children:o+1}),(0,s.jsx)(Ie,{value:t}),(0,s.jsx)("div",{className:"scenario-block__response__inner-bottom"})]})});return(0,s.jsx)(Os,{...m,children:(0,s.jsx)("li",{className:h,role:"listitem",children:f})},o)}renderText(t){const{description:n,goTo:o,hasCharacter:r,id:a,nextSlide:i}=t,c=this.props.getL10nValue(t.title),l=this.props.getL10nValue(n)||"",{labels:d,settings:h,getL10nValue:m}=this.props,{scenarioContinue:f,scenarioStartOver:v}=d,C=!n&&(c||"").length<22,g=h?.audioPosition,x=m(t.media),b=gs(x,g),L=b.renderOrder.indexOf("audio")<b.renderOrder.indexOf("text"),S=!!x?.audio,y=X()("scenario-block__text","scenario-block__content",{"scenario-block__text--no-character":!r,"scenario-block__text--short":C,"scenario-block__text--audio-top":L&&S}),T={classNames:"scenario-block__content-",nodeRef:this.textRef,timeout:{enter:0,exit:400}},k=h?.headingLevel,I=k?`h${k}`:"h2",E=`scenario-title-${a}`,w=`scenario-description-${a}`,A=`${E} ${w}`,N=X()("scenario-block__text__inner",{"scenario-block__text__inner--end":o==="end"}),R=X()("scenario-block__text__title",{"scenario-block__text__title--end":o==="end"}),M=(0,s.jsx)("div",{className:R,"data-l10n-id":jt(t.title),id:E,children:(0,s.jsx)(I,{children:c})}),P=S&&L&&(0,s.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(t)}),j=(0,s.jsx)("div",{className:"scenario-block__text__description",id:w,ref:this.setupFadeObserver,children:this.renderTextWithAudioPositioning(t,l,b)}),O=Me()(this.onFocus,Ho()(this.onClick,[o,i])),B=(0,s.jsx)("button",{"aria-describedby":A,className:"scenario-block__text__continue",onClick:O,type:"button",children:(0,s.jsx)("span",{children:f})}),D=(0,s.jsxs)("button",{"aria-describedby":A,className:"scenario-block__text__end",onClick:O,type:"button",children:[(0,s.jsx)("span",{children:v}),(0,s.jsx)("i",{className:"icon icon-reload"})]});return(0,s.jsx)(Os,{...T,children:(0,s.jsx)("div",{className:y,children:(0,s.jsxs)("div",{className:N,"data-scenario-focus":"",tabIndex:-1,children:[c&&M,P,n&&j,o==="end"?D:B]})},a)},a)}renderAudioMedia(t){const{blockId:n,getL10nValue:o,labels:r,lessonId:a,items:i,settings:c}=this.props,l=o(t.media),d=i?.[this.state.activeScene];return l?(0,s.jsx)(Qt,{blockId:n,index:n,item:t,labels:r,lessonId:a,lessonNumber:a,media:l,refs:`items:${n}/items:${d.id}/slides:${t.id}`,shouldPause:t.type!=="dialogue",volumeSliderPosition:c?.audioPosition==="top"?"below":"above"}):null}renderDialogueWithAudioPositioning(t,n,o){const r=o.renderOrder.indexOf("audio")<o.renderOrder.indexOf("text");return(0,s.jsxs)(s.Fragment,{children:[o.renderOrder.map((a,i)=>{if(a==="text")return(0,s.jsx)("div",{children:(0,s.jsx)(Ie,{value:n})},`text-${i}`);if(a==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,s.jsx)("div",{children:c},`audio-${i}`):null}return null}),(0,s.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})}renderTextWithAudioPositioning(t,n,o){const r=o.renderOrder.indexOf("audio")<o.renderOrder.indexOf("text");return(0,s.jsxs)(s.Fragment,{children:[o.renderOrder.map((a,i)=>{if(a==="text")return(0,s.jsx)("div",{children:(0,s.jsx)(Ie,{value:n})},`text-${i}`);if(a==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,s.jsx)("div",{children:c},`audio-${i}`):null}return null}),(0,s.jsx)("div",{className:"scenario-block__text__description-bottom"})]})}resetSlide(t,n){const{slides:o}=this.state,r=`${t}.${n}`,a={hasFeedback:!1,response:null};this.setState({slides:Jt()(r,a,o)})}resetSlides(){const{items:t}=this.props,n=r=>(a,i,c)=>{const{type:l,responses:d=[]}=i,h=l==="dialogue"&&d.length===0;return Jt()(`${r}.${c}`,{hasFeedback:h,response:null},a)},o=(r,a,i)=>Lt()(kn()([],"slides"),P6(n(i),{}),E6()(r))(a);this.setState({slides:P6(o,{},t)})}setNextSlide(){const{activeScene:t,activeSlide:n,slides:o}=this.state,r=this.getActiveScene()?.slides;if(!r)return;const{responses:a=[],type:i}=r[n]||{},c=`${t}.${n}`,l=Jt()("hasFeedback",!0),d=Bs()({[c]:l});i==="dialogue"&&Nt()(a)&&(this.shouldFocus=!0,this.setState({slides:d(o)}))}shouldComponentUpdate(t,n){return t.items!==this.props.items||t.settings!==this.props.settings||n.activeScene!==this.state.activeScene||n.activeSlide!==this.state.activeSlide||n.initiated!==this.state.initiated||n.resizes!==this.state.resizes||n.slides!==this.state.slides||t.labels!==this.props.labels}}const TJ=e=>{const t=at();return(0,s.jsx)(LJ,{...e,getL10nValue:t})};function kJ(){}var IJ=p(82920);class EJ extends IJ.Component{render(){const{animateBlockEntrance:t,isLearner:n,previewType:o,initiallyVisible:r}=this.props,a=!Ct()(o),l={animateBlockEntrance:a,animateIn:t?"fadeIn":"none",duration:a&&t?1:0,initiallyVisible:r,isLearner:n};return(0,s.jsx)(we,{className:"block-scenario",children:(0,s.jsx)(Be,{...l,children:(0,s.jsx)(TJ,{...this.props})})})}}var NJ=p(10608),vu=p.n(NJ);function jJ(e){e&&(e.addEventListener("touchstart",$o,!0),e.addEventListener("touchmove",$o,!0),e.addEventListener("touchcancel",$o,!0),e.addEventListener("touchend",$o,!0))}function wJ(e){e&&(e.removeEventListener("touchstart",$o,!0),e.removeEventListener("touchmove",$o,!0),e.removeEventListener("touchcancel",$o,!0),e.removeEventListener("touchend",$o,!0))}function $o(e){e?.stopPropagation?.()}const Va=V("playing-card"),O6=({id:e,isDeckTopCard:t,title:n,ref:o})=>{const[r,a]=(0,u.useState)(!1),[i,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)({x:0,y:0}),[h,m]=(0,u.useState)(!0),[f,v]=(0,u.useState)(!1),[C,g]=(0,u.useState)(0),x=wt(),b=at(),L=tn(),S=(0,u.useRef)(null),y=(0,u.useRef)(null),T=(0,u.useRef)(void 0),k=(0,u.useRef)(void 0),I=(0,u.useRef)(!1),E=(0,u.useCallback)(()=>{const{innerWidth:D}=window,H=S.current&&S.current.scrollHeight>S.current.clientHeight,$=D<C;H&&D>C&&g(D),v(H||$)},[C]),w=(0,u.useRef)(()=>{a(!0),c(!1)}),A=(0,u.useRef)(()=>{a(!1)});(0,u.useImperativeHandle)(o,()=>({onStartSortAttempt:w.current,onEndSortAttempt:A.current})),(0,u.useEffect)(()=>{const D=setTimeout(()=>{m(!1)},300);return()=>clearTimeout(D)},[]),(0,u.useEffect)(()=>{const D=y.current;if(!D)return;const H=()=>{a(!0),c(!1)},$=({dx:U,dy:Z})=>{d(ne=>({x:ne.x+U,y:ne.y+Z}))},W=()=>{a(!1)};return w.current=H,A.current=W,jJ(D),js(D).draggable({inertia:!0,autoScroll:!1,modifiers:[js.modifiers.snap({targets:[(U,Z)=>({x:U,y:Z})],range:1/0,endOnly:!0,relativePoints:[{x:.5,y:.5}]})]}).on("dragstart",H).on("dragmove",$).on("dragend",W),E(),T.current=ou()(E,250),window.addEventListener("resize",T.current),()=>{wJ(D),js(D).off("dragstart",H).off("dragmove",$).off("dragend",W),T.current&&(T.current.cancel(),window.removeEventListener("resize",T.current)),clearTimeout(k.current)}},[E]),(0,u.useEffect)(()=>{E()},[e,E]),(0,u.useEffect)(()=>{const D=I.current;I.current=r,D&&!r&&(c(!0),clearTimeout(k.current),k.current=setTimeout(()=>{d({x:0,y:0}),c(!1)},300))},[r]);const N=L?.backgroundType===se.ACCENT||L?.backgroundType===se.IMAGE,R=`translate3d(${l.x}px, ${l.y}px, 0)`,M={WebkitTransform:R,transform:R},P=Va("title",{"is-max-length":f}),j=Va({draggable:!0,moving:r,fail:i,reset:h}),O=N?Va("content"):Va("content").mix("brand--border"),B=b(n)??"";return(0,s.jsxs)("div",{"aria-hidden":!t,className:j,id:e.toString(),onMouseDown:D=>{D.preventDefault()},ref:y,style:M,children:[t&&(0,s.jsx)("div",{className:"visually-hidden-always",children:`${x?.a11ySortingCurrentItem}: ${B}`}),(0,s.jsxs)(_t,{"aria-hidden":"true",className:O,children:[(0,s.jsx)(Ie,{className:P,id:`card-title-${e}`,ref:S,value:n}),(0,s.jsx)("div",{className:Va("handle")}),(0,s.jsx)("div",{className:Va("status"),children:(0,s.jsx)("i",{className:"icon icon-check"})})]})]},`card-${e}`)},Cu=V("restart-button");function AJ({allowTabNavigation:e=!0,onClick:t,onFocus:n=qt,ref:o,text:r}){const a=Cu({}).mix("button");return(0,s.jsx)("button",{"aria-hidden":!e,className:a,"data-testid":"quiz-take-again-button",onClick:t,onFocus:n,ref:o,tabIndex:gY(e),type:"button",children:(0,s.jsxs)("div",{className:Cu("content"),children:[(0,s.jsx)("span",{className:Cu("text").mix("brand--ui"),children:r}),(0,s.jsx)("i",{"aria-hidden":"true",className:Cu("icon").mix("icon").mix("icon-reload")})]})})}const RJ=AJ,vc=V("deck"),PJ=e=>e?.percentViewed===100,MJ=(e,t)=>`${e?.correctlyAnswered??0}/${t}`,OJ=(e,t)=>String(t?.lastIncorrectCardId)===String(e.id),BJ=({count:e,items:t,id:n,onReplay:o,progress:r,ref:a})=>{const i=wt(),c=(0,u.useRef)([]),l=(0,u.useRef)(null);(0,u.useImperativeHandle)(a,()=>({startKeyDrop(){c.current[0]?.onStartSortAttempt()},endKeyDrop(){c.current[0]?.onEndSortAttempt()},focusReplayButton(){l.current?.focus()}}));const d=PJ(r),h=MJ(r,e),m=()=>{o?.({id:n})};return(0,s.jsxs)("div",{className:vc({complete:r?.percentViewed===100}),children:[(0,s.jsx)("div",{className:vc("spacer")}),d&&(0,s.jsxs)("div",{className:vc("cardholder"),children:[(0,s.jsxs)("div",{className:vc("title").mix("brand--ui"),children:[h," ",i?.sortingCardsCorrect]}),(0,s.jsx)(RJ,{allowTabNavigation:d,onClick:m,ref:l,text:i?.sortingReplay??""})]}),(0,s.jsx)("div",{className:vc("content"),children:t.map((f,v)=>(0,s.jsx)(O6,{id:f.id,isDeckTopCard:c.current[v]===c.current[0],isIncorrect:OJ(f,r),ref:C=>{c.current[v]=C},title:f.title},f.id))})]})},Pr=V("pile"),DJ=({id:e,lessonId:t,deckTopCard:n,nextCard:o,isComplete:r=!1,onCardDrop:a,onNavigateToNext:i,onNavigateToPrevious:c,onKeyDropStart:l,onKeyDropEnd:d,title:h,ref:m})=>{const[f,v]=(0,u.useState)(void 0),[C,g]=(0,u.useState)(!1),[x,b]=(0,u.useState)(!0),[L,S]=(0,u.useState)(!1),[y,T]=(0,u.useState)(!1),[k,I]=(0,u.useState)(0),E=(0,u.useRef)(null),w=(0,u.useRef)(null),A=(0,u.useRef)(null),N=(0,u.useRef)(void 0),R=(0,u.useRef)(void 0),M=(0,u.useRef)(void 0),P=(0,u.useRef)(void 0),j=(0,u.useRef)(void 0),O=wt(),B=at(),{announcePolite:D}=ys(),H=(0,u.useEffectEvent)(()=>{if(r||!n)return;const Y=n.id.toString(),q=n.pileId===e;a?.({id:t,itemId:Y,isCorrect:q});const J=B(n.title)??"",ee=B(h)??"";if(q){clearTimeout(R.current),clearTimeout(M.current),clearTimeout(P.current),v(n),g(!0),b(!1),D(`${O?.a11ySortingCorrect}. ${J}, ${O?.a11ySortingCategory}: ${ee}`);const re=B(o?.title)??"";re&&(P.current=setTimeout(()=>{D(`${O?.a11ySortingNextItem}. ${re}`)},500)),R.current=setTimeout(()=>{v(void 0),g(!1)},1500),M.current=setTimeout(()=>{b(!0)},1300)}else clearTimeout(R.current),clearTimeout(M.current),clearTimeout(P.current),v(void 0),g(!1),b(!0),D(O?.a11ySortingIncorrect??"")});(0,u.useImperativeHandle)(m,()=>({focus(){w.current?.focus()}}));const $=(0,u.useCallback)(()=>{const{innerWidth:Y}=window,q=E.current&&E.current.scrollHeight>(E.current.offsetParent?.clientHeight??0),J=Y<k;q&&Y>k&&I(Y),T(q||J)},[k]),W=(0,u.useCallback)(()=>{if(r||!n)return;l?.();const Y=n.id.toString(),q=n.pileId===e;a?.({id:t,itemId:Y,isCorrect:q});const J=B(n.title)??"",ee=B(h)??"";if(q){clearTimeout(R.current),clearTimeout(M.current),clearTimeout(P.current),v(n),g(!0),b(!1),D(`${O?.a11ySortingCorrect}. ${J}, ${O?.a11ySortingCategory}: ${ee}`);const re=B(o?.title)??"";re&&(P.current=setTimeout(()=>{D(`${O?.a11ySortingNextItem}. ${re}`)},500)),R.current=setTimeout(()=>{v(void 0),g(!1)},1500),M.current=setTimeout(()=>{b(!0)},1300)}else clearTimeout(R.current),clearTimeout(M.current),clearTimeout(P.current),v(void 0),g(!1),b(!0),D(O?.a11ySortingIncorrect??"")},[r,n,o,e,t,O,h,B,l,a,D]),U=(0,u.useCallback)(Y=>{Ks(Y)?qx(()=>c?.())(Y):Qs(Y)&&qx(()=>i?.())(Y)},[c,i]),Z=(0,u.useCallback)(()=>{r||(W(),clearTimeout(j.current),j.current=setTimeout(()=>d?.(),100))},[W,d,r]),ne=(0,u.useCallback)(()=>{S(!0)},[]),Q=(0,u.useCallback)(()=>{S(!1)},[]);(0,u.useEffect)(()=>{const Y=A.current;if(!Y)return;const q=re=>{const oe=js.getElementRect(re.target),Se={x:oe.left+oe.width/2,y:oe.top+oe.height/2};re.draggable.draggable({snap:{targets:[Se]}})},J=re=>{re.draggable.draggable({snap:{targets:[(oe,Se)=>({x:oe,y:Se})]}})},ee=re=>{re.draggable.draggable({snap:{targets:[(oe,Se)=>({x:oe,y:Se})]}}),re.stopPropagation?.(),re.preventDefault?.(),H()};return js(Y).dropzone({overlap:"pointer"}).on("dragenter",q).on("dragleave",J).on("drop",ee),$(),N.current=ou()($,250),window.addEventListener("resize",N.current),()=>{js(Y).off("dragenter",q).off("dragleave",J).off("drop",ee),clearTimeout(R.current),clearTimeout(M.current),clearTimeout(P.current),clearTimeout(j.current),N.current&&(N.current.cancel(),window.removeEventListener("resize",N.current))}},[]);const z=X()(Pr(),{"drop-success":C,complete:r}),F=X()(Pr("content"),{"drop-animating":!x&&!L}),_=Pr("title",{"is-max-length":y}),K=B(h)??O?.a11ySortingCategories??"Categories";return(0,s.jsx)("div",{className:z,ref:A,children:(0,s.jsx)("div",{className:Pr("wrapwrap"),children:(0,s.jsxs)(_t,{className:Pr("wrap"),overrideBackground:!0,children:[(0,s.jsx)("div",{"aria-hidden":"true",className:Pr("message"),children:(0,s.jsx)(Ie,{className:_,ref:E,value:h})}),(0,s.jsx)("button",{"aria-disabled":r,"aria-label":K,className:F,disabled:r,onBlur:Q,onClick:Z,onFocus:ne,onKeyDown:U,ref:w,type:"button",children:f&&(0,s.jsx)(O6,{id:f.id,title:f.title})}),(0,s.jsx)("div",{className:Pr("background")})]})})})},cp=V("sorting"),FJ=(e,t)=>!t||!t.items?e:e.filter(n=>!t.items?.[n.id]?.isViewed),HJ=({id:e,items:t,piles:n,onCardDrop:o,onReplay:r,progress:a})=>{const[i,c]=(0,u.useState)(()=>vu()(t)),[l,d]=(0,u.useState)(!1),h=(0,u.useRef)([]),m=(0,u.useRef)(null),f=(0,u.useRef)(a?.retryAttempts),v=(0,u.useRef)(a?.percentViewed),C=(0,u.useRef)(void 0),g=(0,u.useRef)(void 0),x=(0,u.useRef)(void 0),b=wt(),L=at(),{announcePolite:S}=ys(),y=(0,u.useEffectEvent)(()=>{h.current[0]?.focus()}),T=(0,u.useEffectEvent)(()=>{const R=a?.correctlyAnswered??0,M=t.length;S(`${R} ${b?.a11ySortingCompleteOf} ${M} ${b?.a11ySortingComplete}`)}),k=(0,u.useEffectEvent)(()=>{m.current?.focusReplayButton()});(0,u.useEffect)(()=>{const R=M=>{const{blockId:P,cardId:j}=ma(M.detail.path,["block","card"]);e!==P||!j||c(O=>{const B=O.find(H=>H.id===j),D=O.filter(H=>H.id!==j);return B?[B,...D]:O})};return window.addEventListener(Ue,R),()=>{window.removeEventListener(Ue,R)}},[e]),(0,u.useEffect)(()=>{const R=a?.retryAttempts,M=f.current;return R!==M?(f.current=R,c(vu()(t)),clearTimeout(C.current),C.current=setTimeout(()=>{y()},100)):c(P=>{const j=t.filter(D=>!P.find(H=>H.id===D.id));return[...P.filter(D=>t.find(H=>H.id===D.id)).map(D=>{const H=t.find($=>$.id===D.id);return H?{...D,...H}:D}),...j]}),()=>{clearTimeout(C.current)}},[t,a?.retryAttempts]),(0,u.useEffect)(()=>{const R=a?.percentViewed,M=v.current;return R===100&&M!==100&&(d(!0),clearTimeout(g.current),g.current=setTimeout(()=>{T()},500),clearTimeout(x.current),x.current=setTimeout(()=>{k()},100)),R!==100&&M===100&&d(!1),v.current=R,()=>{clearTimeout(g.current),clearTimeout(x.current)}},[S,a?.correctlyAnswered,a?.percentViewed,t.length]);const I=FJ(i,a),E=b?.sortingLandmark??"",w=I?.[0],A=w?L(w.title)??"":"",N=l?b?.a11ySortingCategoriesComplete:A?`${b?.a11ySortingCategories}. ${A}`:b?.a11ySortingCategories;return(0,s.jsxs)("div",{"aria-label":E,className:cp(),role:"group",children:[(0,s.jsx)("div",{className:cp("row"),children:(0,s.jsx)(BJ,{count:i.length,id:e,items:I,onReplay:r,progress:a,ref:m})}),(0,s.jsx)("ul",{"aria-label":N,className:cp("row"),role:"list",children:n.map((R,M)=>(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(DJ,{deckTopCard:I?.[0],id:R.id,isComplete:l,lessonId:e,nextCard:I?.[1],onCardDrop:o,onKeyDropEnd:()=>{m.current?.endKeyDrop()},onKeyDropStart:()=>{m.current?.startKeyDrop()},onNavigateToNext:()=>vY({list:h.current,currentIndex:M}),onNavigateToPrevious:()=>CY({list:h.current,currentIndex:M}),ref:P=>{h.current[M]=P},title:R.title})},R.id))})]})},B6=()=>()=>{},$J=e=>{const{animateBlockEntrance:t,blockId:n,initiallyVisible:o,items:r,onCardDrop:a=B6,onReplay:i=B6,piles:c,progress:l}=e;return(0,s.jsx)(we,{type:"sorting-activity",children:(0,s.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:o,isLearner:!0,children:(0,s.jsx)(HJ,{id:n,items:r,onCardDrop:a(e),onReplay:i(e),piles:c,progress:bt()({},["items",n],l)})})})};class VJ extends u.Component{static defaultProps={scope:"error-boundary"};constructor(t){super(t),this.state={hasError:!1,prevScope:t.scope}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}static getDerivedStateFromProps(t,n){return n.prevScope!==t.scope?{hasError:!1,error:void 0,prevScope:t.scope}:n}componentDidCatch(t){Fs.L2.addError(t,{scope:this.props.scope},"source")}render(){const{hasError:t,error:n}=this.state,{FallbackComponent:o}=this.props;return t||n?(0,s.jsx)(o,{}):this.props.children}}const D6=VJ,zJ=[{name:"Abkhazian",code:"ab"},{name:"Afar",code:"aa"},{name:"Afrikaans",code:"af"},{name:"Akan",code:"ak"},{name:"Albanian",code:"sq"},{name:"American Sign Language",code:"sgn-us"},{name:"Amharic",code:"am"},{name:"Arabic",code:"ar"},{name:"Aramaic",code:"sam"},{name:"Armenian",code:"hy"},{name:"Assamese",code:"as"},{name:"Aymara",code:"ay"},{name:"Azerbaijani",code:"az"},{name:"Bangla",code:"bn"},{name:"Bashkir",code:"ba"},{name:"Basque",code:"eu"},{name:"Belarusian",code:"be"},{name:"Bhojpuri",code:"bho"},{name:"Bislama",code:"bi"},{name:"Bosnian",code:"bs"},{name:"Breton",code:"br"},{name:"Bulgarian",code:"bg"},{name:"Burmese",code:"my"},{name:"Cantonese (Hong Kong)",code:"yue"},{name:"Catalan",code:"ca"},{name:"Cherokee",code:"chr"},{name:"Chinese",code:"zh"},{name:"Chinese (China)",code:"zh-cn"},{name:"Chinese (Hong Kong)",code:"zh-hk"},{name:"Chinese (Simplified)",code:"zh-hans"},{name:"Chinese (Singapore)",code:"zh-sg"},{name:"Chinese (Taiwan)",code:"zh-tw"},{name:"Chinese (Traditional)",code:"zh-hant"},{name:"Choctaw",code:"cho"},{name:"Corsican",code:"co"},{name:"Croatian",code:"hr"},{name:"Czech",code:"cs"},{name:"Danish",code:"da"},{name:"Dutch",code:"nl"},{name:"Dutch (Belgium)",code:"nl-be"},{name:"Dutch (Netherlands)",code:"nl-nl"},{name:"Dzongkha",code:"dz"},{name:"English",code:"en"},{name:"English (Canada)",code:"en-ca"},{name:"English (Ireland)",code:"en-ie"},{name:"English (United Kingdom)",code:"en-gb"},{name:"English (United States)",code:"en-us"},{name:"Esperanto",code:"eo"},{name:"Estonian",code:"et"},{name:"Faroese",code:"fo"},{name:"Fijian",code:"fj"},{name:"Filipino",code:"fil"},{name:"Finnish",code:"fi"},{name:"French",code:"fr"},{name:"French (Belgium)",code:"fr-be"},{name:"French (Canada)",code:"fr-ca"},{name:"French (France)",code:"fr-fr"},{name:"French (Switzerland)",code:"fr-ch"},{name:"Fulah",code:"ff"},{name:"Galician",code:"gl"},{name:"Georgian",code:"ka"},{name:"German",code:"de"},{name:"German (Austria)",code:"de-at"},{name:"German (Germany)",code:"de-de"},{name:"German (Switzerland)",code:"de-ch"},{name:"Greek",code:"el"},{name:"Guarani",code:"gn"},{name:"Gujarati",code:"gu"},{name:"Haitian Creole",code:"ht"},{name:"Hakka Chinese",code:"hak"},{name:"Hakka Chinese (Taiwan)",code:"htia"},{name:"Hausa",code:"ha"},{name:"Hebrew",code:"he"},{name:"Hindi",code:"hi"},{name:"Hungarian",code:"hu"},{name:"Icelandic",code:"is"},{name:"Igbo",code:"ig"},{name:"Indonesian",code:"id"},{name:"Interlingua",code:"ia"},{name:"Interlingue",code:"ie"},{name:"Inuktitut",code:"iu"},{name:"Inupiaq",code:"ipk"},{name:"Irish",code:"ga"},{name:"Italian",code:"it"},{name:"Japanese",code:"ja"},{name:"Javanese",code:"jv"},{name:"Kalaallisut",code:"kl"},{name:"Kannada",code:"kn"},{name:"Kashmiri",code:"ks"},{name:"Kazakh",code:"kk"},{name:"Khmer",code:"km"},{name:"Kinyarwanda",code:"rw"},{name:"Klingon",code:"tlh"},{name:"Korean",code:"ko"},{name:"Kurdish",code:"ku"},{name:"Kyrgyz",code:"ky"},{name:"Lao",code:"lo"},{name:"Latin",code:"la"},{name:"Latvian",code:"lv"},{name:"Lingala",code:"ln"},{name:"Lithuanian",code:"lt"},{name:"Luxembourgish",code:"lb"},{name:"Macedonian",code:"mk"},{name:"Malagasy",code:"mg"},{name:"Malay",code:"ms"},{name:"Malayalam",code:"ml"},{name:"Maltese",code:"mt"},{name:"Manipuri",code:"mni"},{name:"Maori",code:"mi"},{name:"Marathi",code:"mr"},{name:"Masai",code:"mas"},{name:"Min Nan Chinese",code:"nan"},{name:"Min Nan Chinese (Taiwan)",code:"nan-tw"},{name:"Mizo",code:"lus"},{name:"Mongolian",code:"mn"},{name:"Nauru",code:"na"},{name:"Navajo",code:"nv"},{name:"Nepali",code:"ne"},{name:"Norwegian",code:"no"},{name:"Norwegian Bokm\xE5l",code:"nb"},{name:"Nyanja",code:"ny"},{name:"Occitan",code:"oc"},{name:"Odia",code:"or"},{name:"Oromo",code:"om"},{name:"Pashto",code:"ps"},{name:"Persian",code:"fa"},{name:"Persian (Afghanistan)",code:"fa-af"},{name:"Persian (Farsi)",code:"fa-ir"},{name:"Persian (Iran)",code:"pes"},{name:"Polish",code:"pl"},{name:"Portuguese",code:"pt"},{name:"Portuguese (Brazil)",code:"pt-br"},{name:"Portuguese (Portugal)",code:"pt-pt"},{name:"Punjabi",code:"pa"},{name:"Quechua",code:"qu"},{name:"Romanian",code:"ro"},{name:"Romansh",code:"rm"},{name:"Rundi",code:"rn"},{name:"Russian",code:"ru"},{name:"Samoan",code:"sm"},{name:"Sango",code:"sg"},{name:"Sanskrit",code:"sa"},{name:"Sardinian",code:"sc"},{name:"Scottish Gaelic",code:"gd"},{name:"Serbian",code:"sr"},{name:"Serbian (Cyrillic)",code:"sr-ba"},{name:"Serbian (Latin)",code:"sr-sp"},{name:"Sherdukpen",code:"sdp"},{name:"Shona",code:"sn"},{name:"Sicilian",code:"scn"},{name:"Sindhi",code:"sd"},{name:"Sinhala",code:"si"},{name:"Slovak",code:"sk"},{name:"Slovenian",code:"sl"},{name:"Somali",code:"so"},{name:"Southern Sotho",code:"st"},{name:"Spanish",code:"es"},{name:"Spanish (Latin America)",code:"es-419"},{name:"Spanish (Mexico)",code:"es-mx"},{name:"Spanish (Spain)",code:"es-es"},{name:"Spanish (United States)",code:"es-us"},{name:"Sundanese",code:"su"},{name:"Swahili",code:"sw"},{name:"Swati",code:"ss"},{name:"Swedish",code:"sv"},{name:"Tagalog",code:"tl"},{name:"Tajik",code:"tg"},{name:"Tamil",code:"ta"},{name:"Tatar",code:"tt"},{name:"Telugu",code:"te"},{name:"Tetum",code:"tet"},{name:"Thai",code:"th"},{name:"Tibetan",code:"bo"},{name:"Tigrinya",code:"ti"},{name:"Tongan",code:"to"},{name:"Tsonga",code:"ts"},{name:"Tswana",code:"tn"},{name:"Turkish",code:"tr"},{name:"Ukrainian",code:"uk"},{name:"Urdu",code:"ur"},{name:"Uzbek",code:"uz"},{name:"Vietnamese",code:"vi"},{name:"Volap\xFCk",code:"vo"},{name:"Voro",code:"vor"},{name:"Welsh",code:"cy"},{name:"Western Frisian",code:"fy"},{name:"Wolof",code:"wo"},{name:"Xhosa",code:"xh"},{name:"Yiddish",code:"yi"},{name:"Yoruba",code:"yo"},{name:"Zulu",code:"zu"}],_J=(0,u.lazy)(()=>p.e("webpack_container_remote_mondrian_learn-react").then(p.t.bind(p,4246,23))),UJ={subscribe(e,t){const n=`mondrian:${e}`,o=()=>{xe.isPlaying&&xe.playerId!==n&&t()};return xe.addChangeListener(o),()=>{xe.removeChangeListener(o)}},play(e){const t=`mondrian:${e}`;xe.playerId=t,xe.isPlaying=!0}};function GJ(e){const t={};return e.backgroundType==="IMAGE"&&(t["--color-background"]="transparent"),t.maxWidth=(e.contentWidth??9999)+"rem",t.minWidth="0",t.margin="0 auto",t.width="100%",t}function WJ({blockumentId:e,manifest:t}){let n=920,o=600;try{const r=t.blockuments?.[e];if(r){const a=t.items?.[r.children[0]?.id];if(a){const i=a.states[a.initialState];if(i){const c=i.width.value,l=i.height.value;typeof c=="number"&&typeof l=="number"&&(n=c,o=l)}}}}catch{}return(0,s.jsx)("svg",{"aria-hidden":"true",className:"block-mondrian__fallback",height:o,width:n})}function KJ({animateBlockEntrance:e=!0,initiallyVisible:t,blockumentId:n,isLearner:o=!1,settings:r,onStep:a,onTranscriptClose:i,onTranscriptOpen:c,onTranscriptUpdate:l,labels:d,transcriptPanelState:h}){const m=Fe(),f=m.mondrian,v=ch(),C={externalLinksDisabled:"externalLinksDisabled"in m?m.externalLinksDisabled:!1,isExternalLink:_n},{currentLocale:g}=nt(),x=os(),b=cB(),L=(0,u.useMemo)(()=>({active:g,source:x}),[g,x]),S=(0,u.useCallback)(w=>h?.audioPlayerIdOpen===ps({refs:`items:${n}/items:${w}`}),[n,h?.audioPlayerIdOpen]),y=(0,u.useCallback)(({refocusTarget:w,itemId:A,transcript:N})=>{S(A)?i?.():c?.({audioPlayerId:ps({refs:`items:${n}/items:${A}`}),focusing:!0,refocusTarget:w,transcriptMedia:{mondrianTranscript:N}})},[n,S,i,c]),T=(0,u.useCallback)(({itemId:w,transcript:A})=>{h?.audioPlayerIdOpen&&l?.({audioPlayerId:ps({refs:`items:${n}/items:${w}`}),transcriptMedia:{mondrianTranscript:A}})},[n,l,h]),k=(0,u.useCallback)(w=>{l?.({audioPlayerId:ps({refs:`items:${n}/items:${w}`}),focusing:!0})},[n,l]),I=(0,u.useMemo)(()=>({isPanelOpenForItem:S,focusPanel:k,togglePanel:y,updateTranscript:T}),[k,S,y,T]),E=(0,u.useCallback)(w=>{if(a)for(const A of Object.values(w))A.progress>=100&&a({id:A.itemId})},[a]);return(0,s.jsx)(we,{children:(0,s.jsx)(D6,{FallbackComponent:ZJ,children:(0,s.jsx)(Be,{animateBlockEntrance:e,initiallyVisible:t,isLearner:o,children:(0,s.jsx)("div",{style:GJ(r),children:(0,s.jsx)(u.Suspense,{fallback:(0,s.jsx)(WJ,{blockumentId:n,manifest:f}),children:(0,s.jsx)(_J,{blockumentId:n,hoveredItemPath:b.translationHoveredPath,labels:d,languages:zJ,linkRenderConfig:C,locale:L,manifest:f,mediaStoreAdapter:UJ,onMediaProgress:E,runtimeInterface:window.Runtime,searchTerm:v?.term,transcriptPanelAdapter:I})})})})})})}const QJ=(0,u.memo)(KJ,YJ);function YJ(e,t){return e.blockumentId===t.blockumentId&&e.settings.backgroundType===t.settings.backgroundType&&e.settings.contentWidth===t.settings.contentWidth&&e.labels===t.labels&&e.transcriptPanelState?.audioPlayerIdOpen===t.transcriptPanelState?.audioPlayerIdOpen}function ZJ(){return null}const XJ=V("block-ai-scenario"),qJ=(0,u.lazy)(()=>p.e("webpack_container_remote_ai_scenario_learner-player-react").then(p.t.bind(p,58812,23)));function JJ({scenarioId:e,onExit:t}){return(0,s.jsx)(we,{className:XJ("wrapper"),children:(0,s.jsx)(D6,{FallbackComponent:tee,children:(0,s.jsx)(u.Suspense,{children:(0,s.jsx)(qJ,{onExit:t,scenarioId:e})})})})}const eee=(0,u.memo)(JJ);function tee(){return null}var F6=p(67750),Je=p(82920);const Ot=V("block-code"),nee=`${Ne("CDN_URI")}/assets/rise/assets/blocks/code_block_unavailable.svg`;function H6(e,t){const n=$6(F6.parse(e.data));for(const o of n)if(o.type==="notification")t[o.method]?.(o.params);else throw new Error(`Unsupported RPC type "${o.type}"`)}function*$6(e){if(Array.isArray(e))for(const t of e)yield*$6(t);else yield e}function V6(e,t,n){return Je.useEffect(()=>{const r=new AbortController;return window.addEventListener("message",a=>{a.origin===window.origin&&t!=null&&e.current&&a.source===e.current.contentWindow&&H6(a,t)},{signal:r.signal}),()=>r.abort()},[t,e]),Je.useCallback(r=>{e.current?.contentWindow?.postMessage(r,n)},[e,n])}const see=(e,t,n)=>V6(e,n,window.origin),oee=(e,t,n)=>V6(e,n,"*"),ree=(e,t,n)=>{const[o,r]=Je.useState(()=>new BroadcastChannel(t));return Je.useEffect(()=>()=>o.close(),[o]),Je.useEffect(()=>{o.name!==t&&r(new BroadcastChannel(t))},[o,t]),Je.useEffect(()=>{const i=new AbortController;return o.addEventListener("message",c=>H6(c,n),{signal:i.signal}),()=>i.abort()},[o,n]),Je.useCallback(i=>{o.postMessage(i)},[o])},aee=Xa()?Ys.isLocalFilesystem?oee:ree:see,iee=window.location.origin==="";function cee(e){let t=iee?"":"lib/sandbox/sandbox.html";return t+=`#channel=${encodeURIComponent(e)}`,t}function lee(e){return typeof e=="number"?`${e/10}rem`:"-1px"}const dee={0:"small",1:"medium",2:"full"};function uee({editBlock:e,errors:t,isDragPreview:n,isLearn:o,isSidebarPreview:r,items:a,labels:i,onClearErrors:c,onError:l,onStep:d,previewType:h,settings:m}){const f=Je.useRef(null),C=Fe()?.htmlBlocksDisabled,g=n||r||!!h,[x]=a,b=Re(x.srcdoc),L=Re(x.media),S=L?.sandbox?.src==null?void 0:`${L.sandbox.src}/index.html`,y=m?.autoResize===!0,T=m?.width??"0",[k,I]=Je.useState("-1px");Je.useEffect(()=>{y||I(lee(m?.height))},[y,m?.height]);const[E,w]=Je.useState(0),[A,N]=Je.useState(!1),[R,M]=Je.useState(!1),[P]=Je.useState(()=>`rise-frontend-sandbox-${window.crypto.randomUUID()}`),j=cee(P),O=Je.useCallback(()=>{d?.({id:x.id})},[x.id,d]),B=Je.useCallback(({message:z})=>{l?.({message:z}),M(!0),console.error("Sandbox Error",z)},[l,M]),D=Je.useCallback(()=>{c?.(),M(!1),w(z=>z+1)},[c]),H=Je.useCallback(()=>{N(E>0)},[E]),$=Je.useCallback(({height:z})=>{y&&I(`${z}px`)},[y]),W=Je.useMemo(()=>({oncomplete:O,onerror:B,onload:H,onready:D,onresize:$}),[O,B,D,H,$]),U=aee(f,P,W),Z=Je.useCallback((z,F)=>{if(f==null&&E===0)throw new Error("Attempted to send message to sandbox before it is ready");const _=F6.format.notification(z,F);U(_)},[E,f,U]),ne=Je.useCallback(()=>{window.location.reload()},[]),Q=Je.useCallback(()=>{e?.()},[e]);return Je.useEffect(()=>{E&&Z("onupdate",{autoResize:y,src:S,srcDoc:b})},[y,E,Z,S,b]),o&&t!=null||R?(0,s.jsx)(we,{children:(0,s.jsxs)("div",{className:Ot("error-general",{learn:o}),children:[(0,s.jsx)("div",{className:Ot("error-message"),children:"Something went wrong"}),(0,s.jsx)("div",{className:Ot("error-message-subtitle"),children:"There was an error loading this code block. Please contact your admin if the issue continues."}),(0,s.jsx)("button",{className:Ot("error-button"),onClick:ne,type:"button",children:"Refresh page"})]})}):t!=null&&Object.keys(t).length>0?(0,s.jsx)(we,{children:t[404]?(0,s.jsxs)("div",{className:Ot("error-404"),children:[(0,s.jsx)("div",{className:Ot("error-message"),children:"We couldn\u2019t find your file"}),(0,s.jsx)("div",{className:Ot("error-message-subtitle"),children:"Make sure your zip file contains an index.html file."}),(0,s.jsx)("button",{className:Ot("error-button"),onClick:Q,type:"button",children:"Retry upload"})]}):(0,s.jsxs)("div",{className:Ot("error-general"),children:[(0,s.jsx)("div",{className:Ot("error-message"),children:"Something went wrong"}),(0,s.jsxs)("div",{className:Ot("error-message-subtitle"),children:["Try refreshing the page or entering your code again. If the issue isn't fixed,"," ",(0,s.jsx)("a",{href:"https://community.articulate.com/group/code-block",rel:"noopener noreferrer",target:"_blank",children:"visit our community"}),"."]}),(0,s.jsx)("button",{className:Ot("error-button"),onClick:ne,type:"button",children:"Refresh page"})]})}):C&&!g?(0,s.jsx)(we,{children:(0,s.jsx)("div",{className:Ot("restricted"),children:(0,s.jsxs)("div",{className:Ot("restricted-card"),children:[(0,s.jsx)(hf,{alt:"",className:Ot("restricted-icon"),src:nee}),(0,s.jsx)("div",{className:Ot("restricted-title"),children:"Subscribe to unlock full access"}),(0,s.jsx)("div",{className:Ot("restricted-message"),children:"To protect learners from phishing, scams, or malicious redirects, code blocks are disabled when sharing with Quick Share during your trial."})]})})}):(0,s.jsx)(we,{children:(0,s.jsx)("iframe",{allow:"fullscreen",className:Ot({"auto-resize":y,loaded:g||A,width:dee[T]}),"data-rise-frontend-sandbox":"",loading:"lazy",ref:f,sandbox:"allow-forms allow-popups allow-same-origin allow-scripts",scrolling:y?"no":void 0,src:j,style:{"--block-html-height":k},title:i?.a11yBlockCode},P)})}const Vo=V("timeline-card"),hee=e=>{const{blockId:t,disableZoom:n,enableVideoPlaybackSpeed:o,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=a,f=Re(a.media)??{},v=d==="audio"&&f.audio,C=d==="embed"&&f.embed,g=d==="image"&&f.image,x=d==="video"&&f.video;if(!v&&!C&&!g&&!x&&!(d==="image-with-audio"&&r))return;const L=f.embed?wr(f.embed):void 0,S=!!f.image,y=!!f.audio,T=S?f.image.align:"center",k=Vo("media",{audio:y&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${T}`]:r&&!!T,"audio-on-bottom":y&&!r&&h==="bottom",linkEmbed:L==="link",videoEmbed:L==="video",visual:!r&&S||!Ct()(f.video)}),I=m||{};return(0,s.jsx)("div",{className:k,children:(0,s.jsx)(Qt,{blockId:t,enableVideoPlaybackSpeed:o,index:`${a.id}`,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,media:f,mediaType:r?void 0:d,opts:{disableZoom:n,...I}})})},mee=e=>{const{headingLevel:t,innerRef:n,item:o,isActive:r,loadMedia:a,audioPosition:i,onFocus:c}=e,{id:l}=o,d=Vo({active:r}),h=!!o.date,m=!!o.title,f=t||2,v=`h${f}`,C=`h${f+1}`,g=Re(o.media)??{},x=gs(g,i,!0,"timeline"),b=()=>{if(!g||!a)return null;const L={audio:{item:{...o,media:x.audioOnlyMedia||g},mediaType:"audio"},image:{item:{...o,media:x.imageOnlyMedia||g},mediaType:"image"},video:{item:{...o,media:x.videoOnlyMedia||g},mediaType:"video"},embed:{item:{...o,media:x.embedOnlyMedia||g},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,s.jsx)(s.Fragment,{children:x.renderOrder.map((S,y)=>{if(S==="text")return(0,s.jsx)(Ie,{className:Vo("description"),value:o.description},`text-${y}`);const T=L[S];return T?(0,u.createElement)(hee,{...e,...T,key:`${S}-${y}`}):null})})};return(0,s.jsx)("div",{className:d,"data-id":l,ref:n,children:(0,s.jsx)(_t,{className:Vo("body"),onFocus:c,children:(0,s.jsx)("div",{className:Vo("main-wrap"),children:(0,s.jsxs)("div",{className:Vo("main"),children:[h&&(0,s.jsx)("div",{className:Vo("date"),children:(0,s.jsx)(v,{children:(0,s.jsx)(mn,{value:o.date})})}),m&&(0,s.jsx)("div",{className:Vo("title"),children:(0,s.jsx)(C,{children:(0,s.jsx)(mn,{value:o.title})})}),b()]})})})})},Cc=V("timeline"),fee=e=>{const{audioPosition:t,disableZoom:n,enableVideoPlaybackSpeed:o,headingLevel:r,id:a,initiallyVisible:i,isBlock:c,isLearner:l,item:d,labels:h,lessonId:m,onFocus:f}=e,v=(0,s.jsx)(mee,{audioPosition:t,blockId:a,disableZoom:n,enableVideoPlaybackSpeed:o,headingLevel:r,isActive:!0,item:d,labels:h,lessonId:m,lessonNumber:a,loadMedia:!0,onFocus:f});return c?l?(0,s.jsx)(Be,{animateBlockEntrance:!0,className:Cc("animate").toString(),initiallyVisible:i,isLearner:!0,children:v}):v:null},pee=e=>{const{id:t,items:n,labels:o,onEnter:r=Function.prototype,settings:a={}}=e,i=(0,u.useRef)(null),c=(0,u.useCallback)((l,d)=>{r({id:t,payload:{activeIndex:l,itemId:d}})},[t,r]);return(0,u.useEffect)(()=>{function l(d){const{blockId:h,cardId:m}=ma(d.detail.path,["block","card"]);if(h!==t)return;const f=i.current.querySelector(`[data-id="${m}"]`);f&&!ff(f,"center")&&f.scrollIntoView({behavior:"instant",block:"center"})}return window.addEventListener(Ue,l),()=>{window.removeEventListener(Ue,l)}}),(0,s.jsx)("div",{"aria-label":o?.a11yBlockTimeline,className:"page__content-container",ref:i,role:"group",children:(0,s.jsx)("div",{className:Cc("wrapper"),children:(0,s.jsx)("div",{className:Cc(),children:(0,s.jsx)("ul",{className:Cc("container"),role:"list",children:n.map((l,d)=>(0,s.jsx)("li",{className:Cc("card-wrapper"),role:"listitem",children:fee({index:d,item:l,onFocus:c,...e,disableZoom:!a.zoomOnClick,headingLevel:a.headingLevel,audioPosition:a.audioPosition})},d))})})})})},gee=({animateBlockEntrance:e,blockId:t,enableVideoPlaybackSpeed:n,initiallyVisible:o,isLearner:r,items:a,labels:i,lessonId:c,settings:l})=>(0,s.jsx)(Be,{animateBlockEntrance:e,animateIn:"fadeIn",initiallyVisible:o,isLearner:r,children:(0,s.jsx)(we,{type:"timeline",children:(0,s.jsx)(pee,{enableVideoPlaybackSpeed:n,id:t,initiallyVisible:o,isBlock:!0,isLearner:r,items:a,labels:i,lessonId:c,settings:l})})}),zo=V("block-sequence"),vee=({label:e})=>(0,s.jsx)("span",{className:zo("indicator-label"),children:Re(e)??""}),Cee=e=>(0,s.jsx)(vee,{label:e.label}),xee=e=>(0,s.jsx)(Ie,{className:zo("description").toString(),value:e.description}),bee=e=>{const{color:t,defaultBackgroundColor:n,items:o,renderDescription:r=xee,renderLabel:a=Cee,variant:i}=e,c=t?{"--block-sequence-color":t,"--block-sequence-on-color":Fn(t)===Te.LIGHT?"#fff":"#000"}:void 0;return(0,s.jsx)(we,{className:zo({[i]:!0}).toString(),defaultBackgroundColor:n,style:c,children:(0,s.jsx)("div",{className:zo("container"),children:(0,s.jsx)("ol",{className:zo("list"),"data-step-count":o.length,children:o.map((l,d)=>(0,s.jsxs)("li",{className:zo("step"),"data-step-id":l.id,children:[(0,s.jsx)("div",{className:zo("indicator"),children:a(l,d)}),(0,s.jsx)("div",{className:zo("text"),children:r(l,d)})]},l.id))})})})},Rs=V("block-team"),yee=e=>(0,s.jsx)(Ie,{className:Rs("name").toString(),value:e.name}),See=e=>(0,s.jsx)(Ie,{className:Rs("role").toString(),value:e.description}),Lee=({item:e,index:t,renderName:n,renderDescription:o})=>{const r=e.avatar?.image,a=gh(r);return(0,s.jsxs)("li",{className:Rs("card"),children:[(0,s.jsx)("div",{className:Rs("avatar-wrap"),children:a?(0,s.jsx)(vn,{alt:yo(r?.alt),className:Rs("avatar").toString(),src:a}):(0,s.jsx)("div",{className:Rs("avatar",{placeholder:!0}).toString()})}),(0,s.jsxs)("div",{className:Rs("body"),children:[n(e,t),o(e,t)]})]})},Tee=e=>{const{defaultBackgroundColor:t,items:n,renderName:o=yee,renderDescription:r=See}=e;return(0,s.jsx)(we,{className:Rs().toString(),defaultBackgroundColor:t,children:(0,s.jsx)("div",{className:Rs("container"),children:(0,s.jsx)("ul",{className:Rs("list"),"data-count":n.length,children:n.map((a,i)=>(0,s.jsx)(Lee,{index:i,item:a,renderDescription:r,renderName:o},a.id))})})})},kee=e=>(0,s.jsx)("div",{className:"unsupported-block",...e,children:(0,s.jsxs)("span",{children:["We no longer support this block, so you can safely delete it. If you have any questions, please"," ",(0,s.jsx)("a",{href:"https://access.articulate.com/support/contact",children:"contact Articulate Support."})]})});var yn=p(30467),Iee=p(28565),z6=p(70721),Eee=p(90090),_6=p.n(Eee);const bpe=(e,t)=>n=>{const o=n.findIndex(a=>a.id==t);if(o===-1)return n;const r=n.slice();return r[o]=e(n[o]),r},ype=e=>t=>t.filter(n=>n.id!=e),Spe=(e,t)=>n=>{const o=n.slice(),[r]=o.splice(e,1);return o.splice(t,0,r),o};function Nee(e,t){const n=[];for(const o of t)if(n.push(o),e(o))break;return n}const jee=e=>e.some(t=>t<0),U6=e=>Array.from(Array(e)),G6=(e,t)=>U6(t).map(()=>e),wee=(e,t,n,o)=>U6(n).map((r,a)=>a===o?t:e),Lpe=(e,t,n)=>n.some(o=>o[e]==t);function Tpe(e,t,n){if(t>=n.length)return n.slice(0);const o=Math.floor(t/2),r=Math.ceil(t/2),a=e-o,i=e+r;return i>n.length?n.slice(n.length-t):a>=0?n.slice(a,i):n.slice(0,t)}const xu=(e,t)=>{const n=Math.min(e.length,t.length),o=new Array(n);for(let r=0;r<n;r++)o[r]=[e[r],t[r]];return o};var W6=p(94382);const Aee=matchMedia("(forced-colors: active)");function xc(){return Aee.matches}const Ree=({activeIndex:e,values:t,opts:n})=>{const{background:o,variant:r}=Rt(),{chartColor:a,lineCurve:i}=tn(),c=En(),l=gi(),d=n?.defaultFontColor,h=cs(),m=h===se.IMAGE,v=Re(o?.media)?.image?.overlayColor??rt.DARK,C=xc();let g=a??l,x=c||"#fff";!a&&h===se.ACCENT||a===x?g=d:m&&(g=v===rt.DARK?"#fff":"#000",x=v===rt.DARK?"#000":"#fff"),C&&(g="Highlight",x="Canvas");let b=g,L=Array(t.length).fill(g);if(e!=null&&!C){const S=m&&v===rt.LIGHT?.2:.7,y=(0,W6.A)(g,x,S);b=y,L=wee(y,g,t.length,e)}return r==="bar"?{backgroundColor:L,data:t,hoverBackgroundColor:L}:{borderColor:b,cubicInterpolationMode:i==="linear"?"default":"monotone",data:t,lineTension:i==="linear"?0:void 0,pointBackgroundColor:L,pointBorderColor:L,pointBorderWidth:0,pointHitRadius:20,pointHoverBackgroundColor:g,pointHoverBorderColor:g,pointHoverBorderWidth:0,pointRadius:4}};function Pee({activeIndex:e,children:t,opts:n,values:o}){const r=Ree({activeIndex:e,opts:n,values:o});return t(r)}class Mee extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,identifier:n,index:o,label:r,value:a}=this.props,i=t!=null&&t!==o,c=X()("block-chart__cartesianLegendItem",{"block-chart__cartesianLegendItem--unfocused":i});return(0,s.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,s.jsx)("dt",{className:"block-chart__cartesianLegendTerm",children:`${n}.`}),(0,s.jsxs)("dd",{className:"block-chart__cartesianLegendDefn","data-l10n-id":r.l10nId,children:[r.label,(0,s.jsx)("span",{className:"block-chart__cartesianLegendDefnPipe",role:"separator",children:"|"}),(0,s.jsx)("span",{className:"block-chart__cartesianLegendDefnVal",children:a})]})]})}}const Oee=Mee,Bee=({activeIndex:e,labels:t,letters:n,onEvent:o,values:r})=>{const a=xu(n,xu(t,r));return a.length===0?null:(0,s.jsx)("dl",{className:"block-chart__cartesianLegend",children:a.map(([i,[c,l]],d)=>(0,s.jsx)(Oee,{activeIndex:e,identifier:i,index:d,label:c,onEvent:o,value:l},i))})},Dee=(0,u.memo)(Bee);function Fee(e){const t=this.getLabelForValue(e),n=15,o=t.split(" "),r=[];let a="";return o.forEach(i=>{(a+i).length>n?(r.push(a),a=i):a+=(a.length>0?" ":"")+i}),r.push(a),r}const Hee={animation:{},barPercentage:.5,defaultFontFamily:'"lato", sans-serif',elements:{arc:{},bar:{},line:{borderWidth:2,fill:!1}},layout:{padding:{bottom:0,left:0,right:0,top:50}},maxBarThickness:60,plugins:{datalabels:{display:!1},legend:{display:!1,labels:{}},tooltip:{animation:!0,boxPadding:"14px 10px",callbacks:{label:()=>null,title:e=>{const{label:t,formattedValue:n}=e[0];return`${t}: ${n}`}},caretPadding:10,cornerRadius:3,displayColors:!1,titleFont:{weight:"normal"},titleMarginBottom:0,titleSpacing:0,xAlign:"center",yAlign:"bottom"}},responsive:!1,scales:{x:{border:{display:!1},grid:{display:!1,offset:!0},offset:!0,ticks:{autoSkip:!1,callback:Fee,padding:10}},y:{beginAtZero:!0,border:{display:!1},grid:{drawTicks:!1},ticks:{maxTicksLimit:8,padding:15}}}};function $ee({values:e,contrastColor:t}){const n=Rt(),o=cs(),r=o===se.IMAGE,a=(0,u.useMemo)(()=>jee(e),[e]);let i,c;const d=Re(n?.background?.media)?.image?.overlayColor??rt.DARK,h=r&&d===rt.LIGHT;switch(o){case se.LIGHT:case se.GRAY:case se.TINT:[i,c]=["#e1e1e1","#c9c9c9"];break;case se.DARK:case se.BLACK:case se.IMAGE:[i,c]=["#ffffff80","#ffffffe9"];break;case se.ACCENT:case se.COLOR:{[i,c]=t==="#000"?["#00000080","#0000001a"]:["#ffffff80","#ffffffe9"];break}}return r&&h&&([i,c]=["#00000080","#0000001a"]),a||(c=i),[i,c]}const Vee=({onEvent:e,reduceMotion:t,shouldAnimate:n,values:o})=>{const r=En(),{customBackgroundColorContrast:a}=tn(),i=Fe(),c=Gs(),l=gi(),d=i?.theme?.accentContrast,h=cs(),m=h===se.IMAGE,f=Rt(),v=xc(),C=Fn(r),g=!a&&f?.family==="chart",x=a??Te.DARK,b=g?C:x,S=Re(f?.background?.media)?.image?.overlayColor??rt.DARK,y=m&&S===rt.LIGHT,T=h===se.ACCENT||h===se.COLOR,k=h===se.ACCENT?l:r,I=h===se.ACCENT?d:b,E=$t({backgroundColor:k,contrast:I}),[w,A]=$ee({values:o,contrastColor:E}),N=(0,u.useCallback)(M=>v&&m?y?"#000000":"#FFFFFF":M.tick.value===0?A:w,[w,v,A,m,y]);return(0,u.useMemo)(()=>{let M="#000";if(v)m?M=y?"#000000":"#FFFFFF":M="FieldText";else{switch(h){case se.DARK:case se.BLACK:case se.IMAGE:M="#fff";break}T&&(M=E),m&&y&&(M="#000")}const P=n&&!t?1e3:0;let j,O;v?m?(j=M,O=y?"#FFFFFF":"#000000"):(j="Highlight",O="HighlightText"):(j=M,O=M==="#000"||M==="#000000"||M===Te.DARK?"#FFFFFF":"#000000");const B=O0()(Hee);return B.maintainAspectRatio=!c,B.animation.duration=P,B.defaultFontColor=M,B.onClick=e,B.onHover=e,B.plugins.tooltip.animation=!t,B.plugins.tooltip.backgroundColor=j,B.plugins.tooltip.titleColor=O,v&&!m?(B.scales.x.grid.color="FieldText",B.scales.y.grid.color="FieldText"):(B.scales.x.grid.color=w,B.scales.y.grid.color=N),B.scales.x.ticks.color=M,B.scales.y.ticks.color=M,v&&(m?B.plugins.legend.labels.color=y?"#000000":"#FFFFFF":B.plugins.legend.labels.color="FieldText"),B},[h,E,w,T,v,m,y,e,c,t,N,n])};function zee(e){const{children:t,onEvent:n,reduceMotion:o,shouldAnimate:r,values:a}=e,i=Vee({onEvent:n,reduceMotion:o,shouldAnimate:r,values:a});return t(i)}var _ee=p(29783),lp=p.n(_ee);const Uee=/<mark>|<\/mark>/gm,Gee=e=>t=>{const n=e(t.type).replace(Uee,"")??"";return{label:lp()(n,{length:30}),l10nId:jt(t?.type)}},Wee=e=>parseFloat(e.value??"0"),K6=(e,t)=>({labels:e.map(Gee(t)),values:e.map(Wee)});function Kee(e,t,n){const o=[];let r=0;return n.replace(e,function(...a){const i=a.length,c=a[0],l=a[i-1],d=a[i-2],h=l.slice(r,d),m=typeof t=="function"?t(...a):t;return o.push(h,m),r=d+c.length,""}),o.push(n.slice(r)),o}const Qee=(e,t)=>(0,s.jsx)("mark",{children:e},t),Yee=(e,t)=>Kee(new RegExp(AX()(t),"igm"),Qee,e),Q6=(e,t,n)=>{const o=lp()(t,{length:e});return n?Yee(o,n):o};function Zee(){const[e,t]=u.useState(null),n=u.useRef(null),{announcePolite:o}=ys(),{labels:r}=Xr()??{},{a11yBlockChartPreposition:a}=r??{},i=Gs(),c=u.useCallback(C=>{t(C)},[]),l=u.useCallback(()=>{const C=n.current;if(!C)return;const g=i?C.canvas?.parentElement:null;if(g&&C.width){if(g.clientWidth>0){const x=g.clientWidth;let b=x*(C.height/C.width);g.clientHeight>0&&b>g.clientHeight&&(b=g.clientHeight),C.resize(x,b)}}else C.resize()},[i]),d=u.useCallback(()=>{n.current?.update()},[]),h=u.useCallback(()=>{l(),d()},[l,d]),m=u.useCallback(()=>{const C=n.current;if(C==null)return;const g=C.getDatasetMeta(0),x=g.data;if(!x?.length)return;const b=0,S=[{datasetIndex:0,element:g.data[b],index:b}];C.setActiveElements(S),C.tooltip?.setActiveElements(S,{x:0,y:0}),C.update(),c(b);const y=C.data.labels[b],T=C.data.datasets[0].data[b];setTimeout(()=>{o(`${b+1} ${a??""} ${x.length} - ${y}: ${T}`)},0)},[a,o,n,c]),f=u.useCallback(()=>{const C=n.current;if(C==null)return;const g=[];C.setActiveElements(g),C.tooltip?.setActiveElements(g,{x:0,y:0}),C.update(),c(null),o(null)},[o,n,c]),v=u.useCallback(C=>{const g=n.current;if(g==null)return;const x=g.getDatasetMeta(0),b=x.data;if(!b?.length)return;let L=!1,S=e;switch(C.key){case"ArrowLeft":L=!0,S=(e-1+b.length)%b.length;break;case"ArrowRight":L=!0,S=(e+1+b.length)%b.length;break;case"Home":L=!0,S=0;break;case"End":L=!0,S=b.length-1;break}if(L&&(C.stopPropagation(),C.preventDefault()),S!==e){const T=[{datasetIndex:0,element:x.data[S],index:S}];g.setActiveElements(T),g.tooltip?.setActiveElements(T,{x:0,y:0}),g.update(),c(S);const k=g.data.labels?.[S],I=g.data.datasets[0].data[S];o(`${S+1} ${a??""} ${b.length} - ${k}: ${I}`)}},[a,e,o,n,c]);return u.useEffect(()=>{l(),d()},[l,d]),u.useEffect(()=>{n.current&&n.current.update()},[e]),{activeIndex:e,chartRef:n,onBlur:f,onFocus:m,onKeyDown:v,onEvent:c,onResize:h}}function Y6(e){const t=n=>{const{activeIndex:o,chartRef:r,onBlur:a,onEvent:i,onFocus:c,onKeyDown:l,onResize:d}=Zee();return(0,s.jsx)(e,{...n,activeIndex:o,chartRef:r,onBlur:a,onEvent:i,onFocus:c,onKeyDown:l,onResize:d})};return t.displayName=`withChartEvents(${e.displayName||e.name})`,t}const Xee="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");class qee extends u.PureComponent{wrapRef;id;resizeObserver;constructor(t){super(t),this.wrapRef=(0,u.createRef)(),this.state={labelYTop:"50%"}}componentDidMount(){this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.wrapRef.current)}componentWillUnmount(){this.resizeObserver.unobserve(this.wrapRef.current)}handleEvent=(t,n)=>{const o=n.length?n[0].index:null;this.props.onEvent(o)};handleResize=()=>{requestAnimationFrame(()=>{this.props.onResize(),this.setLabelYTop()})};setLabelYTop=()=>{const t=this.props.chartRef.current;if(t){const{bottom:n,top:o}=t?.scales?.y??{};_6()(n)&&_6()(o)&&this.setState({labelYTop:`${(n+o)/2}px`})}};render(){const{props:{activeIndex:t,chartRef:n,getL10nValue:o,htmlIdBase:r,htmlIdTitle:a,onBlur:i,onFocus:c,onKeyDown:l,isDesktop:d,isVisible:h,items:m,itemsLabel:f,labels:v,onEvent:C,search:g,shouldAnimate:x,valuesLabel:b,variant:L},state:{labelYTop:S}}=this,y=Q6(80,o(f),g),T=Q6(30,o(b),g),k=K6(m,o),I=d?[]:Xee.slice(0,m.length),E=d?k.labels:I.map(P=>({label:P})),w=h?k.values:G6(0,m.length),A=`${r}-type`,N=`${r}-instructions`,R=E.map(P=>P.label),M=E.map(P=>P.l10nId).join(",");return(0,s.jsxs)("div",{className:"block-chart__cartesian",children:[(0,s.jsx)("p",{className:"visually-hidden-always",id:N,children:v?.a11yBlockChartInstructions}),(0,s.jsxs)("div",{className:"block-chart__cartesianChart",ref:this.wrapRef,children:[T&&is(T)&&(0,s.jsxs)("div",{className:"block-chart__cartesianLabelY","data-l10n-id":jt(b),style:{insetInlineEnd:S},children:[T,(0,s.jsx)("span",{className:"visually-hidden-always",children:v?.a11yBlockChartAxisY})]}),y&&is(y)&&(0,s.jsxs)("div",{className:"block-chart__cartesianLabelX","data-l10n-id":jt(f),children:[y,(0,s.jsx)("span",{className:"visually-hidden-always",children:v?.a11yBlockChartAxisX})]}),(0,s.jsx)(zee,{onEvent:this.handleEvent,reduceMotion:jn(),shouldAnimate:x,values:w,children:P=>(0,s.jsx)(Pee,{activeIndex:t,opts:P,values:w,children:j=>(0,s.jsxs)("div",{"aria-describedby":N,"aria-labelledby":`${a} ${A}`,className:"block-chart__cartesian-canvas-wrap",onBlur:i,onFocus:c,onKeyDown:l,role:"application",tabIndex:0,children:[(0,s.jsx)("div",{className:"visually-hidden-always",id:A,children:L==="bar"?v?.a11yBlockChartBar:v?.a11yBlockChartLine}),(0,s.jsx)(z6.Chart,{"aria-hidden":"true",data:{labels:R,datasets:[j]},"data-l10n-id":M,options:P,ref:n,role:"presentation",type:L,updateMode:"default"})]})})})]}),!d&&(0,s.jsx)(Dee,{activeIndex:t,labels:k.labels,letters:I,onEvent:C,values:w})]})}}function Jee(e){const t=st(e),n=EH(960,"isDesktop","Desktop")(t),o=Y6(n);function r(a){const c=ch()?.term??"";return(0,s.jsx)(o,{...a,search:c})}return r}const ete=Jee(qee),dp=({valueType:e,value:t,values:n})=>e==="numeric"?String(t):VZ(t/Hy(n)),tte=e=>{if(xc())return"FieldText";const t=e.dataset.backgroundColor[e.dataIndex]??"#000";return Fn(t)===Te.DARK?xt.DARK:xt.LIGHT},nte=(e,t,n)=>dp({valueType:e,value:t,values:n.dataset.data}),ste=(e,t)=>{const{label:n,dataset:o,parsed:r}=t[0],a=dp({valueType:e,value:r,values:o.data});return`${n}: ${a}`},ote=(e,t)=>{const n=t.dataIndex,o=t.dataset.data??[1],r=o[n],a=e==null&&r/Hy(o)>=.06;return e===n||a},rte=({activeIndex:e,onEvent:t,reduceMotion:n,settings:{valueType:o},shouldAnimate:r})=>{const a=xc();return{animation:{animateRotate:r&&!n,duration:r&&!n?1e3:0},defaultFontFamily:'"lato", sans-serif',onClick:t,onHover:t,maintainAspectRatio:!1,plugins:{datalabels:{color:tte,display:ote.bind(null,e),font:{size:12,weight:"bold"},formatter:nte.bind(null,o)},legend:{display:!1,labels:a?{color:"FieldText"}:void 0},tooltip:{animation:!n,boxPadding:"14px 10px",callbacks:{label:()=>null,title:ste.bind(null,o)},caretPadding:10,cornerRadius:3,displayColors:!1,titleFont:{weight:"normal"},titleMarginBottom:0,titleSpacing:0,xAlign:"center",yAlign:"bottom",backgroundColor:a?"Highlight":xt.LIGHT,titleColor:a?"HighlightText":xt.DARK}},responsive:!1,rotation:130}},ate=({activeIndex:e,colors:t,hasBorder:n,values:o})=>{const r=En(),a=xc(),i=e==null?t:t.map((c,l)=>l===e?c:(0,W6.A)(c,r||"#fff",.5));return a?{backgroundColor:i,hoverBackgroundColor:i,borderWidth:.5,borderColor:"rgba(255, 255, 255, 0.3)",data:o}:{backgroundColor:i,hoverBackgroundColor:i,borderWidth:0,data:o,...n&&{borderWidth:1,borderColor:"#000"}}};function ite({activeIndex:e,children:t,colors:n,hasBorder:o,values:r}){const a=ate({activeIndex:e,colors:n,hasBorder:o,values:r});return t(a)}class cte extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,color:n,index:o,label:r,value:a}=this.props,i=t!=null&&t!==o,c=X()("block-chart__circleLegendItem",{"block-chart__circleLegendItem--unfocused":i});return(0,s.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,s.jsxs)("dt",{className:"block-chart__circleLegendTerm",children:[(0,s.jsx)("svg",{"aria-hidden":"true",className:"block-chart__circleLegendSymbol","data-ignore":"contrast",fill:n,focusable:"false",role:"presentation",viewBox:"0 0 10 10",children:(0,s.jsx)("rect",{height:"10",rx:"1.5",width:"10"})}),(0,s.jsx)("span",{className:"block-chart__circleLegendText","data-l10n-id":r.l10nId,children:r.label})]}),(0,s.jsx)("dd",{className:"visually-hidden-always",children:a})]})}}const lte=cte,dte=({activeIndex:e,colors:t,hasBorder:n,labels:o,onEvent:r,values:a,valueType:i="numeric"})=>{const c=xu(t,xu(o,a));if(c.length===0)return null;const l=X()("block-chart__circleLegend",{"block-chart__circleLegend--border":n});return(0,s.jsx)("dl",{className:l,children:c.map(([d,[h,m]],f)=>(0,s.jsx)(lte,{activeIndex:e,color:d,index:f,label:h,onEvent:r,value:dp({valueType:i,value:m,values:a})},h.label))})},ute=(0,u.memo)(dte),hte=(e,t)=>{const n=e.filter(a=>Number(a.value)>=0),o=K6(n,t),r=n.map(a=>a.color);return{...o,colors:r}};class mte extends u.PureComponent{wrapRef;id;resizeObserver;constructor(t){super(t),this.wrapRef=(0,u.createRef)()}componentDidMount(){this.resizeObserver=new ResizeObserver(this.props.onResize),this.resizeObserver.observe(this.wrapRef.current)}componentWillUnmount(){this.resizeObserver.unobserve(this.wrapRef.current)}buildOptions=()=>{const{activeIndex:t,settings:n,shouldAnimate:o}=this.props;return rte({activeIndex:t,onEvent:this.handleEvent,reduceMotion:jn(),settings:n,shouldAnimate:o})};handleEvent=(t,n)=>{const o=n.length?n[0].index:null;this.props.onEvent(o)};render(){const{activeIndex:t,backgroundColor:n,chartRef:o,getL10nValue:r,htmlIdBase:a,htmlIdTitle:i,onBlur:c,onFocus:l,onKeyDown:d,isVisible:h,items:m,labels:f,onEvent:v,settings:C}=this.props,{colors:g,labels:x,values:b}=hte(m,r),L=h?b:G6(0,m.length),S=this.buildOptions(),y=`${a}-type`,T=`${a}-instructions`,k=x.map(E=>E.label),I=g.includes(n);return(0,s.jsxs)("div",{className:"block-chart__circle",children:[(0,s.jsx)("p",{className:"visually-hidden-always",id:T,children:f?.a11yBlockChartInstructions}),(0,s.jsx)("div",{className:"block-chart__circleChart",ref:this.wrapRef,children:(0,s.jsx)(ite,{activeIndex:t,colors:g,hasBorder:I,values:L,children:E=>(0,s.jsxs)("div",{"aria-describedby":T,"aria-labelledby":`${i} ${y}`,className:"block-chart__circle-canvas-wrap",onBlur:c,onFocus:l,onKeyDown:d,role:"application",tabIndex:0,children:[(0,s.jsx)("div",{className:"visually-hidden-always",id:y,children:f?.a11yBlockChartPie}),(0,s.jsx)(z6.Chart,{"aria-hidden":"true",data:{labels:k,datasets:[E]},options:S,ref:o,role:"presentation",type:"pie",updateMode:"default"})]})})}),(0,s.jsx)(ute,{activeIndex:t,colors:g,hasBorder:I,labels:x,onEvent:v,values:L,valueType:C?.valueType})]})}}function fte(e){const t=Ow()(e),n=Y6(t);return st(n)}const pte=fte(mte);yn.Chart.register(yn.ArcElement,yn.BarController,yn.BarElement,yn.CategoryScale,Iee.default,yn.Legend,yn.Legend,yn.LineController,yn.LineElement,yn.LinearScale,yn.PieController,yn.PointElement,yn.Title,yn.Tooltip);const gte=e=>e.displayName||e.name||"Component";class vte extends u.PureComponent{id;constructor(t){super(t),this.state={isVisible:!1},this.id=(0,r0.uniqueId)("chart-")}componentDidMount(){this.setState({isVisible:!this.props.animateBlockEntrance||jn()})}handleAnimationEnd=()=>{this.setState({isVisible:!0})};renderTitle=()=>{const{title:t}=this.props;return(0,s.jsx)(Ie,{value:t})};render(){const{props:{animateBlockEntrance:t,children:n,editable:o,initiallyVisible:r,isLearner:a,items:i,itemsLabel:c,labels:l,settings:d,title:h,valuesLabel:m,variant:f,renderTitle:v=this.renderTitle},state:{isVisible:C}}=this,g=d?.headingLevel,x=g?`h${g}`:"h2",b=this.id,L=`${b}-title`;return(0,s.jsx)(we,{className:this.props.isPresentation?"block-chart--presentation":void 0,type:"chart",children:(0,s.jsx)(Be,{afterAnimatedIn:this.handleAnimationEnd,animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,s.jsx)("div",{className:"block-chart__container",children:(0,s.jsx)("div",{className:"block-chart__row",children:(0,s.jsx)("div",{className:"block-chart__rowInner",children:(0,s.jsxs)("figure",{children:[(!o&&h||o)&&(0,s.jsx)("figcaption",{children:(0,s.jsx)(x,{className:"block-chart__title",id:L,children:v()})}),(0,s.jsx)("div",{className:"block-chart__chart",children:u.cloneElement(u.Children.only(n),{htmlIdBase:b,htmlIdTitle:L,isVisible:C,items:i,itemsLabel:c,labels:l,settings:d,shouldAnimate:t,valuesLabel:m,variant:f})})]})})})})})})}}const Cte=e=>{const t=Gs();return(0,s.jsx)(vte,{...e,isPresentation:t})};function Z6(e){const t=n=>(0,s.jsx)(Cte,{...n,children:(0,s.jsx)(e,{})});return t.displayName=`ChartWrap(${gte(e)})`,t}var xte=p(82920);const bte=Z6(ete),yte=Z6(pte),Ste=Ds()(Ze()("variant","storyline")),Lte=Lt()(Ste,Hn(),bU()(1));class Tte extends xte.Component{render(){const{dividerNumber:t,family:n,handleStorylineFullscreen:o,partnerContent:r,variant:a,enableVideoPlaybackSpeed:i,initiallyVisible:c}=this.props,d={...Fc()(["type","handleStorylineFullscreen","dividerNumber"],this.props),enableVideoPlaybackSpeed:i,partnerContent:r,initiallyVisible:c};return ae("text","paragraph",d)||ae("text","table",d)?(0,s.jsx)(gK,{...d}):ae("text","heading paragraph",d)?(0,s.jsx)(SK,{...d}):ae("text","subheading paragraph",d)?(0,s.jsx)(LK,{...d}):ae("text","heading",d)?(0,s.jsx)(bK,{...d}):ae("text","subheading",d)?(0,s.jsx)(yK,{...d}):ae("text","two column",d)?(0,s.jsx)(vK,{...d}):ae("text","three column",d)?(0,s.jsx)(CK,{...d}):ae("text","four column",d)?(0,s.jsx)(xK,{...d}):ae("text","code",d)?(0,s.jsx)($3,{...d}):ae("impact","a",d)?(0,s.jsx)(FK,{...d}):ae("impact","b",d)?(0,s.jsx)(HK,{...d}):ae("impact","c",d)?(0,s.jsx)($K,{...d}):ae("impact","d",d)?(0,s.jsx)(VK,{...d}):ae("impact","note",d)?(0,s.jsx)(zK,{...d}):ae("quote","a",d)?(0,s.jsx)(W3,{...d}):ae("quote","b",d)?(0,s.jsx)(ZK,{...d}):ae("quote","c",d)?(0,s.jsx)(XK,{...d}):ae("quote","d",d)?(0,s.jsx)(qK,{...d}):ae("quote","background",d)?(0,s.jsx)(JK,{...d}):ae("quote","carousel",d)?(0,s.jsx)(tQ,{...d}):ae("quote","stacked",d)?(0,s.jsx)(nQ,{...d}):ae("list","numbered",d)?(0,s.jsx)(rQ,{...d}):ae("list","checkboxes",d)?(0,s.jsx)(aQ,{...d}):ae("list","bulleted",d)?(0,s.jsx)(iQ,{...d}):ae("list","icon",d)?(0,s.jsx)(cQ,{...d}):ae("image","hero",d)?(0,s.jsx)(dQ,{...d}):ae("image","full",d)?(0,s.jsx)(Rf,{...d}):ae("image","text aside",d)?(0,s.jsx)(mQ,{...d}):ae("image","text overlay",d)?(0,s.jsx)(pQ,{...d}):ae("image","banner",d)?(0,s.jsx)(gQ,{...d}):ae("gallery","centered",d)||ae("gallery","full",d)?(0,s.jsx)(LQ,{...d}):ae("gallery","two column",d)?(0,s.jsx)(Mf,{...d}):ae("gallery","three column",d)?(0,s.jsx)(Mf,{width:3,...d}):ae("gallery","four column",d)?(0,s.jsx)(Mf,{width:4,...d}):ae("divider","divider",d)?(0,s.jsx)(kQ,{...d}):ae("divider","numbered divider",d)?(0,s.jsx)(IQ,{number:t,...d}):ae("divider","spacing divider",d)?(0,s.jsx)(EQ,{...d}):ae("360","storyline",d)?(0,s.jsx)(cY,{...d,handleStorylineFullscreen:o,hasManySlBlocks:this.hasManySlBlocks.bind(this),isLesson:!0}):ae("interactive","accordion",d)?(0,s.jsx)(MQ,{...d}):ae("interactive","tabs",d)?(0,s.jsx)(GQ,{...d}):ae("interactive-fullscreen","labeledgraphic",d)?(0,s.jsx)(Dq,{...d}):ae("interactive-fullscreen","process",d)?(0,s.jsx)(sJ,{...d}):ae("interactive-fullscreen","scenario",d)?(0,s.jsx)(EJ,{...d}):ae("interactive-fullscreen","sorting",d)?(0,s.jsx)($J,{...d}):ae("buttons","button",d)?(0,s.jsx)(yY,{...d}):ae("buttons","button stack",d)?(0,s.jsx)(SY,{...d}):ae("flashcard","flashcard",d)?(0,s.jsx)(wy,{...d}):ae("flashcard","stack",d)?(0,s.jsx)(wy,{stack:!0,...d}):ae("knowledge","knowledge",d)?(0,s.jsx)(Fa,{...d}):ae("continue","continue",d)?(0,s.jsx)(CZ,{...d}):ae("multimedia","step",d)?(0,s.jsx)(vZ,{...d}):ae("multimedia","audio",d)?(0,s.jsx)(cZ,{...d}):ae("multimedia","video",d)?(0,s.jsx)(_f,{...d}):ae("multimedia","ai_avatar",d)?(0,s.jsx)(_f,{...d}):ae("multimedia","custom video",d)?(0,s.jsx)(_f,{...d,type:"customVideo"}):ae("multimedia","embed",d)?(0,s.jsx)(uZ,{...d}):ae("multimedia","attachment",d)?(0,s.jsx)(fZ,{...d}):ae("multimedia","code",d)?(0,s.jsx)($3,{...d}):ae("knowledgeCheck","multiple choice",d)?(0,s.jsx)(Fa,{...d}):ae("knowledgeCheck","multiple response",d)?(0,s.jsx)(Fa,{...d}):ae("knowledgeCheck","fillin",d)?(0,s.jsx)(Fa,{...d}):ae("knowledgeCheck","matching",d)?(0,s.jsx)(Fa,{...d}):ae("knowledgeCheck","draw from question bank",d)?(0,s.jsx)(Fa,{...d}):ae("chart","bar",d)||ae("chart","line",d)?(0,s.jsx)(bte,{...d}):ae("chart","pie",d)?(0,s.jsx)(yte,{...d}):ae("interactive-fullscreen","timeline",d)?(0,s.jsx)(gee,{...d}):ae("ai-scenario","ai-scenario",d)?(0,s.jsx)(eee,{...d}):ae("mondrian","mondrian",d)?(0,s.jsx)(QJ,{...d}):ae("videoCheckpoint","videoCheckpoint",d)?null:ae("textToVideo","textToVideo",d)?(0,s.jsx)(kee,{}):ae("survey","survey",d)?(0,s.jsx)(Qq,{...d}):ae("sequence","arrows",d)||ae("sequence","pyramid",d)||ae("sequence","timeline",d)?(0,s.jsx)(bee,{...d}):ae("team","people",d)?(0,s.jsx)(Tee,{...d}):ae("html","inline",d)||ae("html","cdn",d)||ae("html","vibe",d)?(0,s.jsx)(uee,{...d}):`Unknown type: ${n} ${a}`}hasManySlBlocks(){const{items:t}=this.props;return t&&Lte(t)}}function kte(e){return(0,s.jsx)(XC,{block:e,children:(0,s.jsx)(Tte,{...e})})}function ae(e,t,n){return n.family===e&&n.variant===t}const Ite=1e3,Ete=150,Nte="onscrollend"in window;function X6(e,t){const n=e.getBoundingClientRect(),o=t?.getBoundingClientRect(),r=o?.top??0,a=o?.bottom??window.innerHeight,i=(a-r)*.02,c=n.bottom>r-i&&n.top<a+i,l=n.bottom<r;return c||l}const up={entries:new Map,scrollHandler:null,scrollEndHandler:null,scrollTarget:null,debounceTimer:null,register(e,t,n){const o=this.entries.size===0,r=t??window;if(this.entries.set(e,{el:e,scrollableParent:t,callback:n}),o){this.scrollTarget=r;const a=()=>{this.debounceTimer!=null&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.checkAll(),Ete)};Nte?(this.scrollEndHandler=()=>this.checkAll(),this.scrollTarget.addEventListener("scrollend",this.scrollEndHandler),this.scrollHandler=a,this.scrollTarget.addEventListener("scroll",this.scrollHandler)):(this.scrollHandler=a,this.scrollTarget.addEventListener("scroll",this.scrollHandler))}},unregister(e){this.entries.delete(e),this.entries.size===0&&(this.scrollEndHandler&&this.scrollTarget&&(this.scrollTarget.removeEventListener("scrollend",this.scrollEndHandler),this.scrollEndHandler=null),this.scrollHandler&&this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.scrollHandler),this.scrollHandler=null),this.scrollTarget=null,this.debounceTimer!=null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null))},checkAll(){requestAnimationFrame(()=>{const e=[];for(const t of this.entries.values())X6(t.el,t.scrollableParent)&&e.push(t);e.forEach(t=>t.callback())})}},q6=({children:e,onViewed:t})=>{const n=(0,u.useRef)(null),o=(0,u.useRef)(!1),r=(0,u.useRef)(t);return(0,u.useEffect)(()=>{r.current=t},[t]),(0,u.useEffect)(()=>{const a=n.current;if(!a||o.current)return;const i=mf(),c=()=>{o.current||(o.current=!0,l.disconnect(),clearTimeout(d),up.unregister(a),r.current())},l=new IntersectionObserver(([h])=>{h!=null&&(h.isIntersecting||h.intersectionRatio>0)&&c()},{root:i,rootMargin:$1,threshold:0});l.observe(a);const d=setTimeout(()=>{!o.current&&X6(a,i)&&c()},Ite);return up.register(a,i,c),()=>{l.disconnect(),clearTimeout(d),up.unregister(a)}},[]),(0,s.jsx)("div",{ref:n,children:e})},jte=(0,u.memo)(function({block:t,children:n,onViewed:o,onStep:r}){const a=(0,u.useCallback)(c=>{c!=null&&"id"in c&&c.id!=null&&!c.isDone&&r(c.id)},[r]),i=(0,u.useCallback)(()=>{if(!t.items?.length){o();return}if(!t.requiresInteraction){o();return}(wte.test(t.variant)||Ate.test(t.family))&&t.items.length>0&&a(t.items[0])},[t,a,o]);return(0,s.jsx)(q6,{onViewed:i,children:u.cloneElement(u.Children.only(n),{onStep:a})})}),wte=/tabs|carousel/,Ate=/gallery/,Rte=["timeline"],Pte=({family:e,variant:t})=>(/interactive|flashcard|knowledge|continue|360|survey/.test(e)||/carousel|centered|checkboxes|audio|video|storyline/.test(t))&&!Rte.includes(t),Mte=({family:e,settings:t})=>e==="html"&&t?.hasCustomCompletion,Ote=({family:e,items:t})=>!!(e==="mondrian"&&t?.length),Bte="draw from question bank",hp=e=>{const{animateBlockEntrance:t,backgroundBefore:n,block:o,className:r,color:a,courseTitle:i,defaultBackgroundColor:c,enableVideoPlaybackSpeed:l,handleNavigate:d,handleStorylineFullscreen:h,hideBlock:m,index:f,isLastBlock:v,isOnlyBlockInStep:C,labels:g,lessonId:x,lessonProgress:b,loadMedia:L,match:S,onContinue:y,partnerContent:T,prefersKeyboardNavigation:k,previewType:I,shouldPause:E}=e,{blockId:w,family:A,items:N=[],variant:R,settings:M}=o,P=`block-${w}`,j=tt(),O=Y7(),B=kj({blockId:String(w),lessonId:String(x)}),D=(0,u.useCallback)(Se=>{const G=R===Bte?N[0]:pr()(Ze()("id",Se),N);j(iv({blockId:w,lessonId:x,items:[G]})),A==="continue"&&y(w,Se)},[w,j,A,N,x,y,R]),H=(0,u.useCallback)(()=>{j(iv({blockId:w,lessonId:x,items:N}))},[w,j,N,x]),$=(0,u.useCallback)(Se=>{const G=N?.[0],le=G&&"id"in G?G.id:void 0;le&&j($I({blockId:w,itemId:le,lessonId:x,audioVideoPlayhead:Se}))},[w,j,x,N]),W=(0,u.useCallback)(()=>{j(_I({blockId:w,lessonId:x,isSubmitted:!0}))},[w,j,x]),U=(0,u.useCallback)(({itemId:Se,response:G})=>{j(zI({blockId:w,itemId:Se,lessonId:x,response:G}))},[w,j,x]),Z=(0,u.useCallback)(Se=>{j(DI(Se))},[j]),ne=(0,u.useCallback)(()=>({itemId:Se,isCorrect:G})=>j(VI({itemId:Se,lessonId:x,blockId:w,isCorrect:G})),[w,j,x]),Q=(0,u.useCallback)(()=>()=>j(HI({lessonId:x,blockId:w})),[w,j,x]),z=Qi(),F=(0,u.useCallback)(Se=>{j(xb(Se))},[j]),_=(0,u.useCallback)(()=>{j(Yi())},[j]),K=(0,u.useCallback)(Se=>{j(_m(Se))},[j]),Y=(0,u.useCallback)(()=>{j(Jc(x))},[j,x]),q=Jo()(o,{animateBlockEntrance:t,className:r?.toString(),color:a,courseTitle:i,defaultBackgroundColor:c,dividerNumber:B,enableVideoPlaybackSpeed:l,family:A,handleNavigate:d,handleStorylineFullscreen:h,onExit:Y,onFinishStoryline:x8,onSurveySubmitted:W,onSurveyPartialResponse:U,initiallyVisible:f===0,isHidden:m,isLastBlock:v,isLearn:!0,isLearner:!0,isOnlyBlockInStep:C,isVideoTraining:O,labels:g,lessonId:x,loadMedia:L,match:S,onCardDrop:ne,onReplay:Q,onRetryAttempt:Z,onTranscriptClose:_,onTranscriptOpen:F,onTranscriptUpdate:K,originalVariant:void 0,partnerContent:T,prefersKeyboardNavigation:k,previewType:I,progress:b,recordMediaPlayheadPosition:$,shouldPause:E,transcriptPanelState:z}),J=Pte({family:A,variant:R})||Mte({family:A,settings:M})||Ote({family:A,items:N}),ee=yB(x,w),re=["noOutline",r,m?"blocks-lesson__block-wrapper--hidden":void 0].filter(Boolean).join(" "),oe=(0,s.jsx)(kte,{...q});return(0,s.jsxs)("div",{className:re,"data-block-family":A,"data-block-id":w,"data-change-path":ee,children:[n,J?(0,s.jsx)(jte,{block:o,onStep:D,onViewed:H,children:oe}):(0,s.jsx)(q6,{onViewed:H,children:oe})]},P)},bu=bt(),mp=Jo(),Dte=Ye(),Fte=({slides:e,currentSlide:t},n)=>(t.push(n),n.settings?.attachedToNextBlock||(e.push(t),t=[]),{slides:e,currentSlide:t}),Hte=e=>{const{slides:t}=Zm()(Fte,{slides:[],currentSlide:[]},e);return t};function fp(e,t,n,o){if(e.length){const a=e.slice(-1)[0];if(!bc(a.id,n))return e}const r=Nee($te(n),t.slice(e.length)).map(Vte(o));return r.length?fp(e.concat(r),t,n,o):e}const bc=(e,t)=>e==null?!1:bu(!1,["items",e,"isComplete"],t),$te=e=>({family:t,items:n})=>{const o=bu({},0,n);return t==="continue"&&!bc(o.id,e)},Vte=e=>(t,n,o)=>{const r=o.slice(-1)[0]||{},{family:a}=r,i=a==="continue"?bu(void 0,["items",0,"type"],r)??e?.blockContinueCompletionType??!1:!1;return t.family==="knowledgeCheck"&&t.settings?.requireCorrectAnswer?mp(t,{requiresInteraction:!0}):t.variant!=="continue"&&(!i||i==="completeBlock"&&n!==o.length-1&&n!==o.length-2)?t:mp(t,{requiresInteraction:!0})};function J6({id:e,...t},n,o,r,a){if(t.family==="continue"){const i=bu(void 0,["items",0,"type"],t)??a?.blockContinueCompletionType??"";return mp({blockId:e,...t},{skipContinue:r,canContinue:zte({continueType:i,blocks:n,progress:o}),lessonProgress:o,isComplete:bc(e,o)})}return{blockId:e,...t}}const zte=({continueType:e,blocks:t,progress:n})=>{switch(e){case"completeAll":return en()(Hn()(t),Wte(n));case"completeBlock":return t.length===0?!0:bc(Kte(t),n);default:return!0}},_te=e=>qn()(Dte("items",e)??{}),Ute=e=>Gte(_te(e??{})),Gte=e=>Ds()(t=>Ze()("isComplete",!0,t),e),Wte=e=>Hn()(Ute(e)),Kte=e=>Hc()(e)?.id,Qte=({family:e,variant:t,isComplete:n,requiresInteraction:o})=>e==="continue"&&t==="continue"&&!!o&&!n,Yte=(e,t)=>!!e.find(o=>{if(o?.family==="knowledgeCheck"&&o?.settings?.requireCorrectAnswer)return o.id==null?!0:!t?.items?.[o.id]?.isComplete}),Zte=e=>e.length===0?!1:Jb()(t=>!!Qte(t),e),Xte=(e,t)=>e.length===0?!1:Yte(e,t),qte=({blocks:e,lessonProgress:t})=>e.findIndex(n=>{const o=n.id==null?void 0:t?.items?.[n.id],r=o&&o?.isComplete==null;return n?.family==="knowledgeCheck"&&n?.settings?.requireCorrectAnswer&&r}),e5=({blocks:e,lessonProgress:t,currentBlockIndex:n})=>{const o=qte({blocks:e,lessonProgress:t});return o>-1&&n>o},Jte=(e,t)=>{const n=["embed","video","full"],o=["interactive","interactive-fullscreen","image","flashcard","gallery","chart","knowledgeCheck"];return e!=null&&o.includes(e)||t!=null&&n.includes(t)};function ene(e,t,n){if(!e||!t||!Nh())return!1;if(I7(n,{l10n:t}))return!0;const{locales:o,defaultLocale:r}=t,a=o.find(i=>i.locale===r)?.id;return a&&a!==e}const tne=e=>e==="center"||e==="end"||e==="nearest"||e==="start",nne=e=>Zt(e)&&typeof e.lessonId=="string"&&(typeof e.itemId=="string"||e.itemId==null)&&(e.align===void 0||tne(e.align)),sne=e=>Zt(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string";function one({animateBlockEntrance:e,blocks:t,className:n,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,isLessonEntering:l,isLessonExiting:d,labels:h,lessonId:m,lessonProgress:f,loadMedia:v,nextLesson:C,partnerContent:g,prefersKeyboardNavigation:x,previewType:b}){const L=(0,u.useRef)(null),S=(0,u.useRef)(null),y=(0,u.useRef)(null),[T,k]=(0,u.useState)(!1),{currentLocale:I}=nt(),E=(0,je.g)(),w=(0,u.useMemo)(()=>({params:E}),[E]),A=ue(Q=>Q.course?.theme),N=ue(xC),R=ue(Q=>Q.course?.defaultLocaleId),M=ue(Q=>Q.l10n),P=ene(R??null,M,I),j=(0,Oe.A)(l),O=(0,u.useRef)(d),B=(0,u.useRef)(l),D=(0,u.useRef)(m);O.current=d,B.current=l,D.current=m,(0,u.useEffect)(()=>{const Q=z=>{if(z.origin!==window.location.origin)return;(Array.isArray(z.data)?z.data:[z.data]).forEach(_=>{Zt(_)&&_.type==="preview:lessonUpdate"&&k(!0)})};return window.addEventListener("message",Q),()=>window.removeEventListener("message",Q)},[]),(0,u.useEffect)(()=>{const Q=z=>{if(O.current||!(z instanceof CustomEvent))return;const F=z.detail;if(!nne(F)||F.lessonId!==D.current)return;const _=F.itemId,K=F.align??"nearest";_==null?L.current?.closest(".page")?.scrollIntoView({behavior:"smooth",block:"start"}):B.current?y.current={blockId:_,align:K}:H(_,K)};return window.addEventListener(Ue,Q),()=>window.removeEventListener(Ue,Q)},[]),(0,u.useEffect)(()=>{if(j&&!l&&y.current!=null){const{blockId:Q,align:z}=y.current;H(Q,z),y.current=null}},[l,j]),(0,u.useLayoutEffect)(()=>{$()});function H(Q,z="nearest"){const _=document.querySelector(".page-wrap")?.querySelector(`[data-block-id="${Q}"]`);_?.scrollIntoView({behavior:"smooth",block:z})}function $(){if(S.current){const z=t.findIndex(_=>_.id===S.current)+1,F=t[z]?.id??null;if(F){const _=document.querySelector(".page-wrap"),K=_?.querySelector(`[data-block-id="${F}"]`),Y=K?K.getBoundingClientRect().top:0;Fi.Ay.animateScroll.scrollTo(Y+(_?.scrollTop??0),{smooth:!0,containerId:"page-wrap"})}S.current=null}}const W=(0,u.useCallback)((Q,z)=>{bc(z,f)||(S.current=Q),Q===t[t.length-1]?.id&&C&&(Dn(Jc(m)),i?.(C))},[i,t,m,f,C]),U=P||T,Z=U?t:(()=>{const Q=fp([],t,f,A);return Array.isArray(Q)?Q.filter(z=>Zt(z)&&(typeof z.id=="string"||typeof z.id=="number")):t})(),ne=["blocks-lesson",n,N?"blocks-lesson--one-page":void 0].filter(Boolean).join(" ");return(0,s.jsx)("section",{className:ne,ref:L,children:Z.map((Q,z,F)=>{const _=J6(Q,F.slice(0,-1),f,U,A);if(!sne(_))return null;const K=_,Y=F.length-1,J=K.family==="continue"?Q.id===t[t.length-1]?.id:z===Y,ee=!T&&e5({blocks:Z,lessonProgress:f,currentBlockIndex:z});return(0,s.jsx)(hp,{animateBlockEntrance:e,block:K,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,hideBlock:ee,index:z,isLastBlock:J,labels:h,lessonId:m,lessonProgress:f,loadMedia:v,match:w,onContinue:W,partnerContent:g,prefersKeyboardNavigation:x,previewType:b},K.blockId)}).filter(CU.A)})}const pp=one;function yu({children:e,lessonId:t}){const n=(0,u.useRef)(null),o=(0,u.useCallback)(r=>{const a=r.detail?.lessonId;a!=null&&String(a)!==String(t)||n.current?.focus?.()},[t]);return b$(o),(0,s.jsx)("main",{className:"lesson-main",ref:n,tabIndex:-1,children:e})}const rne=({animateBlockEntrance:e,color:t,courseTitle:n,data:o,enableVideoPlaybackSpeed:r,handleNavigate:a,labels:i,lessonHeader:c,lessonHeaderWrapClasses:l,lessonHeaderWrapStyles:d,lessonProgress:h,loadMedia:m,match:f,nextLesson:v,prefersKeyboardNavigation:C,previewType:g,hideLessonHeaders:x})=>{const b=Ii(),{id:L,items:S,type:y}=o,T={animateBlockEntrance:e,blocks:S,color:t,courseTitle:n,enableVideoPlaybackSpeed:r,handleNavigate:a,handleStorylineFullscreen:qt,isFirstLesson:!0,labels:i,lessonId:L,lessonProgress:h,loadMedia:m,match:f,nextLesson:v,partnerContent:b,previewType:g,prefersKeyboardNavigation:C,type:y};return(0,s.jsx)("div",{className:"page","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,s.jsxs)(yu,{lessonId:L,children:[(0,s.jsx)("div",{className:l,inert:x,style:d,children:c}),(0,s.jsx)("div",{className:"page__content",children:(0,s.jsx)(pp,{...T})})]})})})},ane=10;function ine(){const e=(0,u.useRef)(null),[t,n]=(0,u.useState)(!1);return(0,u.useEffect)(()=>{let o=null;const r=()=>{const i=e.current;if(!i||!o)return;const c=o.scrollTop,l=i.getBoundingClientRect().top+c,d=c>l&&c>0;n(h=>h===d?h:d)},a=setTimeout(()=>{o=mf(),o?.addEventListener("scroll",r,{passive:!0})},ane);return()=>{clearTimeout(a),o?.removeEventListener("scroll",r)}},[]),{isSticky:t,refProgressWrap:e}}const t5=V("progress"),cne=V("lesson-progress-wrapper"),lne=()=>!!document.querySelector(".lesson--preview"),dne=({items:e,lessonProgress:t})=>{const n=t?.activeIndex??-1,o=e?.length??0;return n===-1?0:n+1===o?100:e?.[n]?.linePosition?.replace("%","")??"0"},une=({items:e,lessonProgress:t})=>{const n=t?.activeIndex??0,o=e?.length??0;return n>o?100:Math.round(n/o*100)},hne=e=>{const{lessonProgress:t,type:n}=e;switch(n){case"process":return une(e);case"sorting":return t?.percentViewed??0;case"timeline":return dne(e);default:return t?.percentComplete??0}},mne=e=>{const{type:t,items:n,sidebarAvailable:o,isCourseNavOpen:r,isMobile:a}=e,{isSticky:i,refProgressWrap:c}=ine(),[l]=(0,u.useState)(Zs),d=r,h=r&&a,m=lne(),f=cne({visible:i&&!h}).mix(d&&o&&!m?"lesson--open":"").mix(o&&h&&!m?"lesson--open-mobile":"").toString(),v=t5({timeline:t==="timeline",video:t==="video"}).toString(),C=hne(e),g=t==="timeline"&&n&&n.map(b=>{const L=parseInt(String(C))>=parseInt(b.linePosition?.slice(0,-1)??"0"),S=t5("marker",{active:L}).mix(L?"brand--background":"").toString();return(0,s.jsx)("div",{className:S,style:{left:b.linePosition}},b.id)}),x=(0,s.jsx)("div",{className:"progress-wrap",children:(0,s.jsx)("div",{className:v,children:(0,s.jsxs)("div",{className:"progress__container",children:[(0,s.jsx)("div",{className:"progress__indicator brand--background",style:{transform:`translate3d(calc(${C}% * var(--dir-x)),0px,0px)`}}),g]})})});return(0,s.jsxs)("div",{ref:c,children:[x,(0,Es.createPortal)((0,s.jsx)("div",{"aria-hidden":"true",className:f,children:x}),l)]})},fne=e=>{const t=cz(),{isCourseNavOpen:n}=M_(),o=kt(480);return(0,s.jsx)(mne,{...e,isCourseNavOpen:n,isMobile:o,sidebarAvailable:t})};function n5(e){return ut()===te.RISE_CLASSIC?(0,s.jsx)(fne,{...e}):null}const pne=e=>e===Yk.CONTINUE,gne=({canShowContinue:e,isExport:t,isRiseCom:n,nextLesson:o})=>e&&n&&!o&&!t,vne=e=>Zt(e)&&"id"in e&&"type"in e,Cne=(e,t)=>t.startsWith(`${e}-`)?t.slice(e.length+1):void 0,xne=(e,t)=>{const n=Cne(String(e.id),t);return n==null?void 0:e.questions.find(o=>String(o.id)===n)},bne=(e,t)=>!e||!t||e.length!==t.length?!1:e.some((n,o)=>t[n]?.id!==t[o]?.id),yne=(e,t,n)=>{if(!Array.isArray(e)||!Array.isArray(t)||!n)return!1;const o=e.map(i=>t[i]),r=t.findIndex(i=>i.id===n),a=o.findIndex(i=>i.id===n);return r===a},Sne=({lesson:e,question:t})=>{const n=String(t.id);for(const o of e?.items??[])if(vne(o)){if(o.type===hn.DRAW_FROM_QUESTION_BANK){const r=xne(o,n);if(r)return r}else if(String(o.id)===n)return o}},Lne=V("quiz"),Tne=0,za=2,kne=e=>({start:e<za?0:e-za,end:e+za});function Ine(e){return e+1}function Ene(e){return e<Tne+za}function Nne(e,t){const{start:n,end:o}=kne(t);return{items:e.slice(n,o),startOffset:n}}function Su({activeIndex:e,index:t}){return Lne("card",{active:t===e,done:t<e,next:t===e+1,penultimate:t===e+za,future:t>e+za})}function jne({settings:e}){const t=tt();return(0,u.useMemo)(()=>({onChoiceSelect:n=>{t(yv(n))},onFillInChange:n=>{t(Sv(n))},onMatchSet:n=>{t(Tv(n))},onResponseToggle:n=>{t(Lv(n))},onSetIndex:n=>{t(_0(n))},onSubmit:n=>{const{skipLessonsIfPassed:o,skipToLessonId:r}=e||{};return t(U0({...n,passToContinue:n.passToContinue??!1,skipLessonsIfPassed:o??void 0,skipToLessonId:r??void 0}))}}),[t,e])}function s5(e){return e.type===hn.DRAW_FROM_QUESTION_BANK}function wne(e){return Array.isArray(e)&&e.every(t=>Array.isArray(t)&&t.every(n=>typeof n=="number"&&Number.isInteger(n)&&n>=0))}function Ane(e){return YC()?e.questions.length:Math.min(e.drawCount??0,e.questions.length)}function Rne(e,t){if(!wne(t)||t.length!==e.length)return;const n=[];for(const[o,r]of e.entries()){const a=t[o];if(!(a.length===Ane(r)&&new Set(a).size===a.length&&a.every(c=>r.questions[c]!=null)))return;n.push(Pne(r,a))}return n}function gp(e,t){return{...t,drawn:!0,id:`${e.id}-${t.id}`}}function Pne(e,t){const n=t.map(o=>({question:e.questions[o],idx:o})).filter(o=>o.question!=null);return{items:n.map(({question:o})=>gp(e,o)),indices:n.map(({idx:o})=>o)}}function Mne(e){const{questions:t}=e;if(YC())return{items:t.map(i=>gp(e,i)),indices:t.map((i,c)=>c)};const n=e.drawCount,o=[],r=[],a=[];for(let i=0;i<n;i++){const c=f6({questions:t,drawnQuestionIds:o});if(!c)break;r.push(gp(e,c)),a.push(t.findIndex(l=>l.id===c.id)),o.push(String(c.id))}return{items:r,indices:a}}function One({sourceItems:e,progress:t,lessonId:n}){const o=e.filter(s5),r=t?.questionsDrawn?Rne(o,t.questionList):void 0,a=r?o5(e,r):void 0,i=r!==void 0&&a!==void 0&&Bne(t,a),c=i?r:o.map(Mne),l=o5(e,c),d=o.length>0?c.map(f=>f.indices):void 0,h=t?.questionsDrawn&&o.length>0&&!i?{...t,items:{},originalItemProgress:void 0}:t,m=Dne({items:l,progress:h,questionIndexList:d});return{concreteItems:l,drawPayload:{lessonId:n,lessonProgress:m}}}function o5(e,t){let n=0;return e.flatMap(o=>s5(o)?t[n++].items:[o])}function Bne(e,t){if(!e)return!0;const n=new Map(Object.values(e.items).map(r=>[r.index,r])),o=e.originalItemProgress;return t.every((r,a)=>{const i=n.get(a),c=o?.[a];return c!==void 0?String(c.id)===String(r.id):i===void 0||String(i.id)===String(r.id)})}function Dne({items:e,progress:t,questionIndexList:n}){const o=t?.items??{},r=t?.originalItemProgress,a=new Map(Object.values(o).map(c=>[c.index,c])),i=Object.fromEntries(e.map((c,l)=>{const d=r?.[l]??{},h=a.get(l);return[c.id,{...d,...h,id:c.id,index:l}]}));return{...t,questionsDrawn:!0,questionList:n??t?.questionList,items:i}}function vp(e,t){return!!t[e.id]?.isComplete}function Fne({items:e,progress:t}){const n=t?.items??{};return[...e.filter(o=>vp(o,n)),...vu()(e.filter(o=>!vp(o,n)))]}function Hne(e){const t=e.answers??[],n=vu()(t),o=n.map(r=>t.findIndex(a=>a.id===r.id));return Object.assign({},e,{answers:n,shuffledAnswerIndices:o})}function r5({items:e,settings:t,progress:n}){const o=t?.randomizeQuestionOrder?Fne({items:e,progress:n}):e;if(!t?.shuffleAnswerChoices)return o;const r=n?.items??{};return o.map(a=>vp(a,r)?a:Hne(a))}function $ne({lessonId:e,sourceItems:t,progress:n,settings:o}){const{concreteItems:r,drawPayload:a}=One({sourceItems:t,progress:n,lessonId:e});return{resolvedItems:r5({items:r,settings:o??void 0,progress:a.lessonProgress}),drawPayload:a}}function Bpe(e){return r5({items:e.items,settings:e.settings,progress:e.progress})}const Vne=e=>e!=null&&e.type!=null&&e.type!=="section";function Dpe({lessonIds:e,lessons:t}){return!Array.isArray(e)||!t?!1:e.some((n,o)=>{const r=t[n];return r?.type!=="quiz"||r.settings?.skipLessonsIfPassed!==!0?!1:e.slice(o+1).some(a=>Vne(t[a]))})}function zne(e,t){const n=At(e),o=tl(n)?n.settings:void 0,r=e?u8({id:e,passingScore:t?.passingScore??80}):void 0;return(0,u.useMemo)(()=>o&&{...o,passingScore:r??o?.passingScore??80},[o,r])}const Lu=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):void 0;function a5(){const[e,t]=(0,u.useState)(Lu?.matches??!1);return(0,u.useEffect)(()=>{if(!Lu)return;const n=o=>t(o.matches);return Lu.addEventListener("change",n),()=>Lu.removeEventListener("change",n)},[]),e}function _ne({lessonId:e}){const t=tt(),n=At(e),o=tl(n)?n:void 0,r=ml(e),a=(0,u.useMemo)(()=>o?.items??[],[o?.items]),i=zne(e,r),[{resolvedItems:c,drawPayload:l}]=(0,u.useState)(()=>$ne({lessonId:e,progress:r,settings:i,sourceItems:a}));(0,u.useLayoutEffect)(()=>{t(QI({...l,lessonId:e}))},[]);const d=r?.activeIndex??0,h=a5();return Une({activeIndex:d,isReduceMotion:h,progress:r,resolvedItems:c,settings:i,sourceItems:a}),{activeIndex:d,progress:r,resolvedItems:c,retryAttempts:r?.retryAttempts??0,settings:i,sourceItems:a}}function Une({activeIndex:e,isReduceMotion:t,progress:n,resolvedItems:o,settings:r,sourceItems:a}){const i=(0,u.useRef)(e);(0,u.useEffect)(()=>{},[e])}const Gne=e=>e.length===3,Wne=e=>{const t=e.findIndex(n=>n==="answers");return t===-1?null:e[t+1]?.id},Kne=e=>{const t=e.findIndex(n=>n==="questions");return t===-1?null:e[t+1]?.id},Qne=e=>{const t=e.at(-1);return typeof t=="string"&&t.startsWith("feedback")},Yne=({items:e,itemId:t,questionBankQuestionId:n})=>{const o=e.find(({id:r})=>r===t);return o?"questions"in o?n?o.questions.find(({id:r})=>r===n):null:o:null},Zne=(e,t,n)=>{const o=n==="feedbackCorrect";return e?[e]:n==="feedback"?t.answers.slice(0,1):n==="feedbackIncorrect"&&t.type==="FILL_IN_THE_BLANK"?[{title:""}]:t.answers.filter(r=>"correct"in r?r.correct===o:"corrects"in t?t.corrects.includes(r.id)===o:t.answers)},Xne=({lessonId:e,items:t})=>{const n=tt(),o=(0,u.useCallback)(({lessonId:a,progressId:i,question:c,answer:l},d=!0)=>{switch(c.type){case"MULTIPLE_CHOICE":n(yv({lessonId:a,itemId:i,selectedIndex:c.answers.indexOf(l)}));break;case"MULTIPLE_RESPONSE":n(Lv({lessonId:a,itemId:i,selectedIndex:c.answers.indexOf(l)}));break;case"FILL_IN_THE_BLANK":n(Sv({lessonId:a,itemId:i,text:typeof l.title=="string"?l.title:""}));break;case"MATCHING":n(Tv({lessonId:a,itemId:i,matches:d?Object.fromEntries(c.answers.map(h=>[h.id,h.id])):{}}));break}},[n]),r=(0,u.useCallback)(({detail:a})=>{const{lessonId:i,path:c}=a,l=String(a.itemId);if(i!==e)return;if(Gne(c)){n(bv(e));return}const d=Kne(c),h=Yne({items:t,itemId:l,questionBankQuestionId:d});if(!h)return;const m=d?`${l}-${d}`:l;if(n(_0({lessonId:e,progressId:m})),Qne(c)){const f=Wne(c),v=f?h.answers.find(({id:b})=>b===f)??null:null,C=c.at(-1),g=C==="feedbackCorrect",x=Zne(v,h,C);h.type==="MULTIPLE_RESPONSE"&&n(KI({lessonId:e,itemId:m})),x.forEach(b=>{o({lessonId:e,question:h,progressId:m,answer:b},g)}),n(U0({finalRetryAttempt:!1,lessonId:e,isCorrect:g,itemId:m,passToContinue:!0}))}},[n,e,t,o]);(0,u.useEffect)(()=>(window.addEventListener(Ue,r),()=>{window.removeEventListener(Ue,r)}),[r])},qne=V("quiz-item");function Jne({activeIndex:e,children:t,index:n,isActive:o,isComplete:r,isCorrect:a,isTimedQuiz:i,settings:c}){const l=c?.correctAnswerColor??void 0,d=c?.incorrectAnswerColor??void 0,f={"--color-feedback-icon":a?l:d,"--color-matching-feedback-bubble-bg":d,"--color-multiple-choice-complete-border":d,"--color-multiple-choice-correct-border":l,"--color-multiple-response-correct-border":l,"--color-multiple-response-incorrect-border":d,"--color-multiple-response-option-check":r?l:void 0,"--color-quiz-option-check":l,"--color-x-fill":d};return(0,s.jsx)("div",{className:Su({activeIndex:e,index:n}),"data-testid":"quiz-item-card",inert:o?void 0:!0,children:(0,s.jsx)("div",{className:qne("content"),children:(0,s.jsx)(Py,{isActive:o,isComplete:r,isTimedQuiz:!!i,style:f,children:(0,s.jsx)("div",{hidden:!o&&!r,children:t})})})})}const ese=V("quiz-card");function tse({blockId:e,enableVideoPlaybackSpeed:t,index:n,isActive:o,item:r,labels:a,media:i}){const c=at();if(!i)return null;const l=c(i),{audio:d,image:h,video:m,embed:f}=l??{},v={allowTabNavigation:o,blockId:e,enableVideoPlaybackSpeed:t,item:r,labels:a};return d&&h?(0,s.jsx)("div",{className:`${ese("media",{"image-with-audio":!0})}`,children:(0,s.jsx)(Do,{...v,index:String(n),isOverlayAudio:!0,media:i})}):d&&(m||f)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Do,{...v,index:`${n}-audio`,media:{audio:d}}),(0,s.jsx)(Do,{...v,index:String(n),media:m?{video:m}:{embed:f},shouldPause:!o})]}):(0,s.jsx)(Do,{...v,index:String(n),media:i,shouldPause:!o})}function i5(e,t){if(e===void 0||!t)return;if(Array.isArray(e))return e.map(o=>t.indexOf(o)).filter(o=>o!==-1);const n=t.indexOf(e);return n===-1?void 0:n}const{FILL_IN_THE_BLANK:nse,MATCHING:sse,MULTIPLE_CHOICE:ose,MULTIPLE_RESPONSE:rse}=hn;function ase({color:e,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,errorMessageId:r,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isActive:c,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,isShuffled:f,item:v,itemProgress:C,labels:g,onChoiceSelect:x,onFillInChange:b,onMatchSet:L,onResponseToggle:S,onSubmit:y,prefersKeyboardNavigation:T,questionHtmlId:k,quizAcceptableResponses:I,quizAnswerPlaceholder:E,revealAnswers:w}){const{answers:A,type:N}=v,R=c&&!l,M=A??[],P=("correct"in v?v.correct:void 0)??"",j=("corrects"in v?v.corrects:void 0)??[],O=C?.text??"",B=C?.matches??{},D=(0,u.useCallback)(({title:$})=>(0,s.jsx)(Ie,{allowTabNavigation:c,className:"quiz-multiple-choice-option__label",value:$}),[c]),H=(0,u.useCallback)(({title:$})=>(0,s.jsx)(Ie,{allowTabNavigation:c,tagName:"span",value:$}),[c]);switch(N){case nse:return(0,s.jsx)($y,{allowTabNavigation:c,correctAnswerColor:n,correctAnswerColorContrast:o,errorMessageId:r,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isComplete:l,isCorrect:d,labels:g,onChange:b,onEnterToSubmit:y,options:M,questionHtmlId:k,quizAcceptableResponses:I,quizAnswerPlaceholder:E,revealAnswers:w,value:O});case sse:return(0,s.jsx)(Gy,{answers:M,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isActive:c,isComplete:l,matches:B,onChange:L,prefersKeyboardNavigation:T,revealAnswers:w});case rse:{const $=C?.selectedIndices,W=C?.shuffledAnswerIndices??[],U=f?i5($,W):$;return(0,s.jsx)(Qy,{allowTabNavigation:c,correctIds:j,errorMessageId:r,isComplete:l,isCorrect:d,isRetaking:m,labels:g,onChange:S,onEnterToSubmit:y,options:M,questionHtmlId:k,renderOptionText:H,revealAnswers:w,selectedIndices:U??[]})}case ose:default:{const $=C?.selectedIndex,W=C?.shuffledAnswerIndices??[],U=f?i5($,W):$;return(0,s.jsx)(Ky,{allowTabNavigation:R,color:e,correctId:P,errorMessageId:r,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,labels:g,onChange:x,onEnterToSubmit:y,options:M,questionHtmlId:k,renderOptionText:D,revealAnswers:w,selectedIndex:U??-1})}}}const Mr=V("quiz-card");function ise({color:e,enableVideoPlaybackSpeed:t,hasStart:n,index:o,interaction:r,isQuestionBankQuiz:a,isReduceMotion:i,isShuffled:c,item:l,items:d,labels:h,onTakeAgain:m,prefersKeyboardNavigation:f,progress:v,settings:C,showNextButton:g}){const{canProceed:x,canSubmit:b,errorIncomplete:L,feedbackRef:S,errorMessageId:y,feedbackValue:T,handleChoiceSelect:k,handleFillInChange:I,handleMatchSet:E,handleNextFeedbackClick:w,handleResponseToggle:A,handleSubmit:N,handleTakeAgain:R,isActive:M,isComplete:P,isCorrect:j,isRetaking:O,itemProgress:B,quizItemHtmlId:D,selection:H,wrapperRef:$}=r,W=n?o+1:o,U=C?.revealAnswers===!0?Ae.ALL:C?.revealAnswers??Ae.NONE,Z=`q-${l.id}`,ne=l.settings,Q=C?.correctAnswerColor??void 0,z=C?.correctAnswerColorContrast??void 0,F=C?.incorrectAnswerColor??void 0,_=C?.incorrectAnswerColorContrast??void 0,K=h?.quizQuestion??"",Y=h?.quizAcceptableResponses??"",q=h?.quizAnswerPlaceholder??"",J=h?.quizCorrect??"",ee=h?.quizIncorrect??"",re=h?.quizSubmit??"",oe=v?.percentComplete===100&&a?h?.quizRestart??"":h?.quizNext??"";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_Z,{isActive:M,labels:h,questionLabel:K,questionNumber:o+1,totalQuestions:d.length}),(0,s.jsx)(GZ,{allowTabNavigation:M,htmlId:Z,value:l.title}),(0,s.jsx)(tse,{blockId:l.id,enableVideoPlaybackSpeed:t,index:W,isActive:M,item:l,labels:h,media:l.media}),(0,s.jsx)(Dy,{type:l.type,children:(0,s.jsx)("div",{ref:$,children:(0,s.jsx)(ase,{canSubmit:b,color:e,columnBehavior:ne?.columnBehavior,correctAnswerColor:Q,correctAnswerColorContrast:z,errorMessageId:y,incorrectAnswerColor:F,incorrectAnswerColorContrast:_,isActive:M,isComplete:P,isCorrect:j,isReduceMotion:i,isRetaking:O,isShuffled:c,item:l,itemProgress:B,labels:h,onChoiceSelect:k,onFillInChange:I,onMatchSet:E,onResponseToggle:A,onSubmit:N,prefersKeyboardNavigation:f,questionHtmlId:Z,quizAcceptableResponses:Y,quizAnswerPlaceholder:q,revealAnswers:U})})}),(0,s.jsx)("div",{"aria-live":"assertive",children:L&&(0,s.jsxs)("div",{className:`${Mr("validations")}`,"data-testid":"quiz-validation-error",children:[(0,s.jsx)(ie,{className:`${Mr("validation-icon")}`,"data-testid":"quiz-validation-icon",name:"alert-circle"}),(0,s.jsx)("span",{id:`${D}-error-incomplete-message`,children:h?.quizRequireAnswer})]})}),(0,s.jsx)(By,{canProceed:x,feedbackRef:S,feedbackValue:T,isActive:M,isComplete:P,isCorrect:j,item:l,labels:h,quizCorrect:J,quizIncorrect:ee,revealAnswers:U,selection:H}),(0,s.jsx)(Ry,{allowNext:!m,canProceed:x,canSubmit:b,isReduceMotion:i,onNext:g?w:void 0,onSubmit:N,quizNext:oe,quizSubmit:re}),m&&(0,s.jsx)("div",{className:`${Mr("retake-container",{active:P})}`,children:(0,s.jsx)("button",{className:`${Mr("retake",{active:P})}`,onClick:R,type:"button",children:(0,s.jsxs)("div",{className:`${Mr("retake-content")}`,children:[(0,s.jsx)("div",{className:`${Mr("retake-text")}`,children:"TAKE AGAIN"}),(0,s.jsx)("i",{className:`${Mr("retake-icon")} icon icon-reload`})]})})})]})}const{FILL_IN_THE_BLANK:c5,MATCHING:l5,MULTIPLE_CHOICE:d5,MULTIPLE_RESPONSE:u5}=hn;function cse(e,t){return e?.items?.[t]??{}}function lse(e,t,n,o,r){switch(e.type){case c5:return qy({answers:e.answers??[],text:t.text,caseSensitive:e.settings?.isCaseSensitive??!1,getL10nValue:r});case l5:return Jy(t.matches??{});case u5:return n6({isShuffled:n,item:e,selectedIndices:t.selectedIndices,shuffledAnswerIndices:t.shuffledAnswerIndices});case d5:default:return e6({isCorrectAnswerUnshuffled:o,isShuffled:n,item:e,selectedIndex:t.selectedIndex,shuffledAnswerIndices:t.shuffledAnswerIndices})}}function dse(e,t){switch(e.type){case c5:return t.text;case l5:return t.matches;case u5:return t.selectedIndices;case d5:default:return t.selectedIndex}}const{FILL_IN_THE_BLANK:use,MATCHING:hse,MULTIPLE_CHOICE:mse,MULTIPLE_RESPONSE:fse}=hn;function pse({hasStart:e=!1,id:t,index:n,isCorrectAnswerUnshuffled:o=!1,isShuffled:r=!1,item:a,onChoiceSelect:i,onFillInChange:c,onMatchSet:l,onResponseToggle:d,onTakeAgain:h,progress:m,reportAnswer:f,retryAttempts:v=0,setNextIndex:C,settings:g,submitAction:x,title:b}){const L=at(),S=gC(),[y,T]=(0,u.useState)(!1),[k,I]=(0,u.useState)(Date.now),[E,w]=(0,u.useState)(!1),A=(0,u.useRef)(null),N=(0,u.useRef)(null),R=(0,u.useId)(),M=(0,u.useRef)({canSubmit:!1,isCorrect:!1,item:a,itemId:String(a.id),itemProgress:{},retryAttempts:v,revealAnswers:Ae.NONE,settings:g,startTime:k,title:b}),P=e?n+1:n,j=m?.activeIndex??0,O=P===j,B=cse(m,a.id),D=B?.isComplete??!1,H=lse(a,B,r,o,L),$=g?.revealAnswers===!0?Ae.ALL:g?.revealAnswers??Ae.NONE,W=$===Ae.ALL||$===Ae.INCORRECT,U=O&&D&&W,Z=O&&!D&&Zy({answersLength:a.answers?.length??0,matches:B?.matches,selectedIndex:B?.selectedIndex,selectedIndices:B?.selectedIndices,text:B?.text,type:a.type});M.current={canSubmit:Z,isCorrect:H,item:a,itemId:String(a.id),itemProgress:B,retryAttempts:v,revealAnswers:$,settings:g,startTime:k,title:b};const ne=B?.selectedIndex,Q=s6({answers:a.answers,feedback:"feedback"in a?a.feedback:void 0,feedbackCorrect:"feedbackCorrect"in a?a.feedbackCorrect:void 0,feedbackIncorrect:"feedbackIncorrect"in a?a.feedbackIncorrect:void 0,feedbackType:"feedbackType"in a?a.feedbackType:void 0,isCorrect:H,isShuffled:r,selectedIndex:ne,shuffledAnswerIndices:a.shuffledAnswerIndices}),z=dse(a,B),F=y?`${R}-error-incomplete-message`:void 0,_=(0,u.useCallback)(()=>{T(!1)},[]),K=String(a.id),Y=(0,u.useCallback)(({selectedIndex:be})=>{_(),i?.({lessonId:t,itemId:K,selectedIndex:be,shuffledAnswerIndices:a.shuffledAnswerIndices})},[t,K,a.shuffledAnswerIndices,i,_]),q=(0,u.useCallback)(be=>{_(),c?.({lessonId:t,itemId:K,text:be})},[t,K,c,_]),J=(0,u.useCallback)(be=>{_(),l?.({lessonId:t,itemId:K,matches:be})},[t,K,l,_]),ee=(0,u.useCallback)(({optionIndex:be})=>{_(),d?.({lessonId:t,itemId:K,selectedIndex:be,shuffledAnswerIndices:a.shuffledAnswerIndices})},[t,K,a.shuffledAnswerIndices,d,_]),re=(0,u.useCallback)((be=()=>{},ye)=>{ye&&be(ye),C?.({fromIndex:j,lessonId:t})},[j,t,C]),oe=(0,u.useCallback)((be,ye)=>{xe.pause(),re(be??(()=>{}),ye)},[re]),Se=(0,u.useCallback)(()=>{O&&oe()},[O,oe]),G=(0,u.useCallback)(be=>{be.preventDefault();const{canSubmit:ye,isCorrect:ge,item:it,itemId:Ft,itemProgress:Pn,retryAttempts:Ht,revealAnswers:It,settings:Go,startTime:Qe,title:Et}=M.current;if(!ye){switch(T(!0),it.type){case use:case fse:case mse:N.current?.querySelector("input")?.focus();break;case hse:N.current?.querySelector("button")?.focus();break;default:break}return}M.current.canSubmit=!1;const Ut={startTime:Qe,stopTime:Date.now()},{passToContinue:ln}=Go??{},ke=Go?.retryCount??-1,Ke=parseInt(String(ke),10),Sn=parseInt(String(Ht),10),Ln=Ke===Sn,Dr=S({duration:Ut,id:t,isCorrect:ge,item:it,itemProgress:Pn,retryAttempts:Ht,title:Et});f?.(Dr);const zu={finalRetryAttempt:Ln,lessonId:t,isCorrect:ge,itemId:Ft,passToContinue:ln,revealAnswers:It};if(It===Ae.ALL||It===Ae.INCORRECT){x?.(zu);return}oe(x,zu)},[S,oe,t,f,x]),le=(0,u.useCallback)(()=>{w(!0),setTimeout(()=>{h?.(),w(!1)},50)},[h]),ve=(0,Oe.A)(O)??!1,pe=(0,Oe.A)(D)??!1;return(0,u.useEffect)(()=>{!ve&&O&&I(Date.now())},[O,ve]),{activeIndex:j,canProceed:U,canSubmit:Z,feedbackRef:A,errorIncomplete:y,errorMessageId:F,feedbackValue:Q,handleChoiceSelect:Y,handleFillInChange:q,handleMatchSet:J,handleNextFeedbackClick:Se,handleResponseToggle:ee,handleSubmit:G,handleTakeAgain:le,isActive:O,isComplete:D,isCorrect:H,isRetaking:E,itemProgress:B,prevIsActive:ve,prevIsComplete:pe,quizItemHtmlId:R,selection:z,wrapperRef:N}}const gse=3;function vse({feedbackRef:e,isActive:t,isComplete:n,isReduceMotion:o,prevIsActive:r,prevIsComplete:a,quizTop:i,revealAnswers:c,scrollId:l}){const d=(0,u.useRef)(void 0);(0,u.useEffect)(()=>()=>{clearTimeout(d.current)},[]),(0,u.useEffect)(()=>{if(!r&&t){const h=i??gse,m=o?"instant":"smooth";document.getElementById(l??"page-wrap")?.scrollTo({top:h,behavior:m})}},[t,r,o,i,l]),(0,u.useEffect)(()=>{if(!(!t||c===Ae.NONE||o))return!a&&n&&(clearTimeout(d.current),d.current=setTimeout(()=>{const h=e.current;if(!h)return;const m=h.offsetHeight+h.offsetTop,f=o?"instant":"smooth";document.getElementById(l??"page-wrap")?.scrollTo({top:m,behavior:f})},750)),()=>{clearTimeout(d.current)}},[e,t,n,o,a,c,l])}const Cse=V("quiz-item");function xse({color:e,enableVideoPlaybackSpeed:t,hasStart:n=!1,id:o,index:r,isCard:a=!1,isCorrectAnswerUnshuffled:i,isQuestionBankQuiz:c=!1,isShuffled:l=!1,isTimedQuiz:d,item:h,items:m,labels:f={},onChoiceSelect:v,onFillInChange:C,onMatchSet:g,onResponseToggle:x,onTakeAgain:b,prefersKeyboardNavigation:L,progress:S,quizTop:y,reportAnswer:T,retryAttempts:k=0,scrollId:I,setNextIndex:E,settings:w={revealAnswers:Ae.ALL},showNextButton:A=!0,submitAction:N,title:R}){const M=a5(),P=pse({hasStart:n,id:o,index:r,isCorrectAnswerUnshuffled:i,isShuffled:l,item:h,onChoiceSelect:v,onFillInChange:C,onMatchSet:g,onResponseToggle:x,onTakeAgain:b,progress:S,reportAnswer:T,retryAttempts:k,setNextIndex:E,settings:w,submitAction:N,title:R}),{activeIndex:j,feedbackRef:O,isActive:B,isComplete:D,isCorrect:H,prevIsActive:$,prevIsComplete:W}=P,U=w?.revealAnswers===!0?Ae.ALL:w?.revealAnswers??Ae.NONE;vse({feedbackRef:O,isActive:B,isComplete:D,isReduceMotion:M,prevIsComplete:W,prevIsActive:$,quizTop:y,revealAnswers:U,scrollId:I});const Z=(0,s.jsx)(ise,{color:e,enableVideoPlaybackSpeed:t,hasStart:n,index:r,interaction:P,isQuestionBankQuiz:c,isReduceMotion:M,isShuffled:l,item:h,items:m,labels:f,onTakeAgain:b,prefersKeyboardNavigation:L,progress:S,settings:w,showNextButton:A});return a?(0,s.jsx)(Jne,{activeIndex:j,index:n?r+1:r,isActive:B,isComplete:D,isCorrect:H,isTimedQuiz:d,settings:w,children:Z}):(0,s.jsx)("div",{className:Cse("wrap"),children:Z})}const et=V("odometer"),h5=300,m5=700,bse=300,yse=500,Tu=200,Sse=170,f5=145,Qn=Tu/2,Yn=Sse/2,yc=70,p5=1.5,Lse=2.5,Tse=225,kse=135,g5=270,Cp=7,_a={start:{dx:-19,dy:8},mid:{dx:-5,dy:22},end:{dx:26,dy:-7}},_o={size:12,topOffset:-3,bottomOffset:21};function Ise(e){return e<.5?16*e**5:1+16*(e-1)**5}function Ese(e){return e<.5?2*e**2:1-(-2*e+2)**2/2}function ku({angle:e,centerX:t,centerY:n,radius:o}){const r=(e-90)*Math.PI/180;return{x:t+o*Math.cos(r),y:n+o*Math.sin(r)}}function xp({centerX:e,centerY:t,counterClockwise:n=!1,endAngle:o,radius:r,startAngle:a}){const i=ku({angle:a,centerX:e,centerY:t,radius:r}),c=ku({centerX:e,centerY:t,radius:r,angle:o}),d=Math.abs(o-a)>180?"1":"0",h=n?"0":"1";return`M ${i.x} ${i.y} A ${r} ${r} 0 ${d} ${h} ${c.x} ${c.y}`}function v5(e,t,n){return t+n*g5*e/100}function Nse({hasPassed:e,isResultsVisible:t,isRTL:n,onAnimationDone:o,passingLabel:r,passingScore:a,score:i=0,scoreLabel:c,shouldAnimate:l}){const[d,h]=(0,u.useState)(0),[m,f]=(0,u.useState)(0),[v,C]=(0,u.useState)(!1),x=`hatch-pattern${(0,u.useId)()}`,b=(0,u.useRef)(null),L=(0,u.useRef)(!1),S=(0,u.useRef)([]),y=(0,u.useCallback)(()=>{S.current.forEach(clearTimeout),S.current=[]},[]),T=(0,u.useCallback)(()=>{b.current!==null&&(cancelAnimationFrame(b.current),b.current=null),y()},[y]);(0,u.useEffect)(()=>{t||(T(),L.current=!1,h(0),f(0),C(!1))},[t,T]),(0,u.useEffect)(()=>{if(!t||!l||L.current)return;L.current=!0;const Z=i,ne=setTimeout(()=>{let Q=null;const z=F=>{Q===null&&(Q=F);const _=F-Q,K=Math.min(_/m5,1),Y=Ise(K),q=Ese(K);if(f(Y),h(Math.round(q*Z)),K<1)b.current=requestAnimationFrame(z);else{f(1),h(Z);const J=setTimeout(()=>{C(!0);const ee=setTimeout(()=>{o?.()},yse);S.current.push(ee)},bse-h5-m5);S.current.push(J)}};b.current=requestAnimationFrame(z)},h5);S.current.push(ne)},[t,l,i,o]),(0,u.useEffect)(()=>()=>{T()},[T]);const k=n?kse:Tse,I=n?-1:1,E=v5(a,k,I),w=v5(m*i,k,I),A=k+I*g5,N=ku({centerX:Qn,centerY:Yn,radius:yc,angle:w}),R=ku({centerX:Qn,centerY:Yn,radius:yc,angle:E}),M=m*i>=a,P=n?`%${a}`:`${a}%`,j=n?`%${d}`:`${d}%`,O=`${c} ${n?`%${i}`:`${i}%`}`,B=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:et("pass-mark-label"),children:r}),(0,s.jsx)("div",{className:et("pass-mark-percent"),children:P})]}),D=xp({centerX:Qn,centerY:Yn,counterClockwise:n,radius:yc,startAngle:k,endAngle:A}),H=xp({centerX:Qn,centerY:Yn,counterClockwise:n,radius:yc+3,startAngle:E,endAngle:A}),$=m>0?xp({centerX:Qn,centerY:Yn,counterClockwise:n,radius:yc,startAngle:k,endAngle:w}):"",W={x:R.x+(n?-13:13),y:R.y-13},U={x:W.x+(n?-13:13),y:W.y};return(0,s.jsxs)("div",{className:et(),children:[(0,s.jsxs)("svg",{"aria-hidden":"true",className:et("svg"),viewBox:`0 0 ${Tu} ${f5}`,children:[(0,s.jsx)("defs",{children:(0,s.jsx)("pattern",{height:"1.5",id:x,patternTransform:"rotate(45)",patternUnits:"userSpaceOnUse",width:"1.5",children:(0,s.jsx)("line",{className:et("hatch-line"),x1:"0",x2:"0",y1:"0",y2:"1.5"})})}),(0,s.jsx)("path",{className:et("passing-zone"),d:H,fill:"none",stroke:`url(#${x})`,strokeWidth:"6"}),(0,s.jsxs)("g",{className:et("pass-mark-lines"),children:[(0,s.jsx)("line",{className:et("pass-mark-line"),x1:R.x,x2:W.x,y1:R.y,y2:W.y}),(0,s.jsx)("line",{className:et("pass-mark-line"),x1:W.x,x2:U.x,y1:W.y,y2:U.y})]}),(0,s.jsx)("path",{className:et("track"),d:D,fill:"none",strokeWidth:p5}),$&&(0,s.jsx)("path",{className:et("progress",{passing:M}),d:$,fill:"none",strokeWidth:p5}),m>0&&(0,s.jsx)("circle",{className:et("dot",{passing:M}),cx:N.x,cy:N.y,r:Lse}),v&&(0,s.jsx)("g",{className:et("result-icon"),children:e?(0,s.jsx)("path",{className:et("checkmark"),d:`M ${Qn+_a.start.dx} ${Yn+_a.start.dy} L ${Qn+_a.mid.dx} ${Yn+_a.mid.dy} L ${Qn+_a.end.dx} ${Yn+_a.end.dy}`,fill:"none",strokeLinecap:"square",strokeLinejoin:"miter",strokeWidth:Cp}):(0,s.jsxs)("g",{className:et("x-mark"),children:[(0,s.jsx)("path",{className:et("x-line",{first:!0}),d:`M ${Qn-_o.size} ${Yn+_o.topOffset} L ${Qn+_o.size} ${Yn+_o.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:Cp}),(0,s.jsx)("path",{className:et("x-line",{second:!0}),d:`M ${Qn+_o.size} ${Yn+_o.topOffset} L ${Qn-_o.size} ${Yn+_o.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:Cp})]})})]}),(0,s.jsxs)("div",{className:et("score",{pass:v&&e,fail:v&&!e}),children:[(0,s.jsx)("div",{className:et("score-label"),children:c}),(0,s.jsx)("div",{className:et("pass-label"),children:O}),(0,s.jsx)("div",{className:et("fail-label"),children:O}),(0,s.jsx)("div",{className:et("score-percent",{hidden:v}),children:j})]}),(0,s.jsx)("div",{className:et("pass-mark"),style:{"--pass-mark-x":`${(n?Tu-U.x:U.x)/Tu*100}%`,"--pass-mark-y":`${(U.y+3)/f5*100}%`},children:B}),(0,s.jsx)("div",{className:et("pass-mark-mobile"),children:B})]})}const C5=(0,u.createContext)({handleExpiredQuiz:qt,hideTimer:qt,quizTime:0,resetQuizTimer:qt,timerDuration:0,timerHidden:!1,timerRunning:!1});function jse({children:e,handleExpiredQuiz:t=()=>{},isTimedQuiz:n,courseProgress:o,setQuizLessonTimeRemaining:r=()=>{},timerDuration:a=10}){const i=(0,u.useRef)(void 0),[c,l]=(0,u.useState)(),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),[v,C]=(0,u.useState)(),g=(0,u.useMemo)(()=>Number(a),[a]),{activeIndex:x,endIndex:b,lessonId:L,lessonProgress:S,startIndex:y}=(0,u.useMemo)(()=>{const O=o?.currentLesson,B=o?.lessons?.[O],D=B?.activeIndex||0,H=Object.keys(B?.items||{}).length+1;return{activeIndex:D,lessonId:O,endIndex:H,lessonProgress:B,startIndex:0}},[o]),T=(0,Oe.A)(L),k=(0,Oe.A)(x),I=(0,u.useCallback)(()=>{l(g*60)},[g]),E=(0,u.useCallback)(()=>{l(O=>O-1)},[l]),w=(0,u.useCallback)(()=>{h(!0),i.current||(i.current=setInterval(E,1e3))},[E,h]),A=(0,u.useCallback)(O=>{f(O!==void 0?O:!m)},[m]),N=(0,u.useCallback)(()=>{h(!1),i.current&&(i.current=clearInterval(i.current))},[h]),R=(0,u.useCallback)(()=>{c&&v!==void 0&&r({lessonId:v,timeRemaining:c})},[v,c,r]),M=(0,u.useCallback)(()=>{R(),l(void 0)},[l,R]),P=(0,u.useCallback)(()=>l(S.timeRemaining||g*60),[S,g,l]);(0,u.useEffect)(()=>{if(!n)return;const O=T!==L,B=O&&c,D=O&&n;n&&!O&&v!==L&&C(L),B&&M(),D&&P()},[n,v,L,T,c,P,M]),(0,u.useEffect)(()=>{if(n)switch(x){case y:N();break;case b:I(),N();break;default:w(),k!==x&&T===L&&R()}},[x,b,n,L,k,T,I,y,w,N,R]),(0,u.useEffect)(()=>{n&&c<1&&N()},[n,c,N]);const j=(0,u.useMemo)(()=>({handleExpiredQuiz:t,hideTimer:A,quizTime:c,resetQuizTimer:I,timerDuration:g,timerHidden:m,timerRunning:d}),[t,A,c,I,g,m,d]);return(0,s.jsx)(C5.Provider,{value:j,children:e})}const x5=()=>(0,u.useContext)(C5),wse=e=>e.isTimedQuiz?(0,s.jsx)(jse,{...e,children:e.children}):(0,s.jsx)(s.Fragment,{children:e.children}),Ase={currentLesson:void 0,isRestricted:!1,isRestrictedCourse:!1,restrictingQuiz:{}};function Rse(e){const t=ce(),n=gr(),o=At(e??""),r=(0,u.useMemo)(()=>{if(!t||!n||!o)return Ase;const l=LC({course:t,courseProgress:n});return AC({course:t,courseProgress:n,lesson:o,restrictingQuiz:l})},[t,n,o]),{restrictingQuiz:a}=r,i="title"in a?a.title:void 0,c=ct(i);return(0,u.useMemo)(()=>i?{...r,restrictingQuiz:{...a,title:c}}:r,[r,a,i,c])}const b5=V("quiz-results");function Pse({skipToLessonId:e}){const t=Ce(),n=xj(e),o=Ih(),{lessonPreposition:r,quizSkipAhead:a}=t??{},i=n>0&&a&&r?`${a} ${n} ${r} ${o}`:a;return i?(0,s.jsxs)(su,{className:"continue-btn--flex",href:In(e),testId:"quiz-skip-ahead-btn",children:[(0,s.jsx)(ie,{"aria-hidden":"true",name:"arrow-right-from-line"}),i]}):null}function Mse({isFooterVisible:e,isResultsVisible:t,lessonId:n,onTryAgainFocus:o}){const r=tt(),a=ml(n),{passed:i=!1,retryAttempts:c=0}=a??{},{continueType:l,retryCount:d,skipLessonsIfPassed:h,skipLessonsOptional:m,skipToLessonId:f}=Eh(n),{resetQuizTimer:v}=x5(),C=pne(l),g=Ce(),x=Ij(n),b=Rse(x),{isRestricted:L}=b,{courseFinish:S,quizContinue:y,quizTakeAgain:T}=g??{},k=h&&i&&!!f,I=C,E=gne({canShowContinue:I,isExport:b8(),isRiseCom:!1,nextLesson:x}),w=(0,u.useCallback)(()=>{v(),r(bv(n))},[r,v,n]),A=I&&L&&x&&g&&(0,s.jsx)(Ey,{bgType:"transparent",text:$N({labels:g,restrictions:b})}),N=I&&!L&&x&&(!k||m)&&y&&(0,s.jsx)(su,{className:k?"continue-btn--outline":void 0,href:In(x),text:y}),R=E&&S&&(0,s.jsx)(su,{href:Wg,text:S}),M=(d===-1||c<d)&&(0,s.jsxs)(Ay,{allowTabNavigation:t,onClick:w,onFocus:o,size:"lg",testId:"quiz-take-again-button",children:[(0,s.jsx)(ie,{"aria-hidden":"true",name:"arrow-rotate-left"}),T]});return(0,s.jsx)("div",{className:b5("footer",{active:t}),"data-testid":"quiz-results-footer",children:(0,s.jsxs)("div",{className:b5("footer-items",{hidden:!e}),inert:e?void 0:!0,children:[k&&(0,s.jsx)(Pse,{skipToLessonId:f}),A,N,R,M]})})}const Ua=V("quiz-results");function Ose({lessonId:e,questionCount:t}){const n=tt(),o=ml(e),{activeIndex:r=0,passed:a=!1,passingScore:i=80,reportResults:c=!1,score:l=0}=o??{},d=Ce(),h=rs(),{skipLessonsIfPassed:m,skipToLessonId:f}=Eh(e),[v,C]=(0,u.useState)(!1),g=t+1===r,x=(0,u.useRef)(g),b=(0,u.useRef)(void 0),L=(0,u.useRef)(void 0),S=(0,u.useRef)(null),y=(0,u.useId)(),{a11yQuizFailed:T="",a11yQuizPassed:k="",quizPassing:I="",quizResults:E="",quizScore:w=""}=d??{},A=`quiz-results-desc-${y}`,N=(0,u.useCallback)(()=>{L.current=setTimeout(()=>{C(!0),window.dispatchEvent(new CustomEvent(Al))},500)},[]),R=(0,u.useCallback)(()=>{clearTimeout(L.current),L.current=void 0,C(!0)},[]);return(0,u.useEffect)(()=>()=>{clearTimeout(L.current)},[]),(0,u.useEffect)(()=>{g!==x.current&&(g?S.current?.focus():C(!1),x.current=g)},[g]),(0,u.useEffect)(()=>{if(!g||!a||!m||!f){b.current=void 0;return}const M=`${e}:${f}`;b.current!==M&&(b.current=M,n(GI({quizId:e,destinationId:f})))},[n,a,g,e,m,f]),(0,s.jsx)("div",{className:Ua(),children:(0,s.jsx)("div",{className:Ua("container"),children:(0,s.jsxs)("div",{className:Ua("content",{active:g}),"data-testid":"quiz-results",children:[(0,s.jsxs)("div",{className:Ua("header"),children:[(0,s.jsx)("h1",{"aria-describedby":A,className:Ua("label").mix("noOutline"),ref:S,tabIndex:-1,children:E}),(0,s.jsxs)("div",{className:"visually-hidden-always",id:A,children:[(0,s.jsx)("div",{children:`${I}: ${i}%`}),(0,s.jsx)("div",{children:`${w}: ${l}%`}),(0,s.jsx)("div",{children:a?k:T})]})]}),(0,s.jsx)("div",{"aria-hidden":"true",className:Ua("results"),children:(0,s.jsx)(Nse,{hasPassed:a,isResultsVisible:g,isRTL:h,onAnimationDone:N,passingLabel:I,passingScore:i,score:l,scoreLabel:w,shouldAnimate:c})}),(0,s.jsx)(Mse,{isFooterVisible:v,isResultsVisible:g,lessonId:e,onTryAgainFocus:R})]})})})}const Sc=V("callout");function Bse({icon:e,title:t,children:n}){return(0,s.jsxs)("div",{className:Sc(),role:"status",children:[(0,s.jsx)(ie,{className:Sc("icon"),name:e}),(0,s.jsxs)("div",{className:Sc("content"),children:[(0,s.jsx)("p",{className:Sc("title"),children:t}),(0,s.jsx)("div",{className:Sc("body"),children:n})]})]})}const Dse=5,Fse=15,Hse=30,$se=60,Vse=180,y5=300,S5=600,L5=120,zse=e=>e<=Dse?{regularInterval:$se,lowTimeThreshold:L5}:e<=Fse?{regularInterval:Vse,lowTimeThreshold:L5}:e<=Hse?{regularInterval:y5,lowTimeThreshold:y5}:{regularInterval:S5,lowTimeThreshold:S5},_se=(e,t,n,o)=>{const r=Math.floor(o/60),a=o%60,i=r===1?e:t;if(r>0&&a>0)return`${n}: ${r} ${i} and ${a} seconds`;if(r>0&&a===0)return`${n}: ${r} ${i}`;if(r===0&&a>0)return`${n}: ${a} seconds`};var Ps=p(82920);const cn=V("quiz-timer"),bp=(e,t)=>`${e.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`,Use=e=>{const t=Math.floor(e/60),n=e%60;return bp(t,n)},T5=e=>{const t=Math.floor(e/60),n=e%60;return bp(t,n)},Gse=e=>bp(e,0),k5=({area:e,exitCourseEnabled:t=!1,isStartScreenActive:n=!1,isEndScreenActive:o=!1,labelQuizTimerElapsed:r,labelQuizTimerExpired:a,labelQuizTimerExpiredAction:i,labelQuizTimerExpiredMessage:c,labelQuizTimerHide:l,labelQuizTimerLimit:d,labelQuizTimerMinute:h,labelQuizTimerMinutePlural:m,labelQuizTimerRemaining:f,labelQuizTimerShow:v,timerDisplay:C=dr.REMAINING,timerEnabled:g=!1})=>{const[x,b]=Ps.useState(!1),[L,S]=Ps.useState(""),y=Ps.useRef(null),T=Ps.useRef(!1),{hideTimer:k,quizTime:I,timerDuration:E,timerHidden:w,timerRunning:A,handleExpiredQuiz:N}=x5(),R=E*60,{isCover:M,isHeader:P,isHidden:j}=Ps.useMemo(()=>({isCover:e==="cover",isHeader:e==="header",isHidden:C===dr.HIDE_TIMER}),[e,C]),O=n&&!M,B=Ps.useMemo(()=>zse(E),[E]),D=Ps.useMemo(()=>({expired:a||"Time expired",minute:h||"minute",minutePlural:m||"minutes",remaining:f||"Time left"}),[a,h,m,f]),H=()=>{b(!1),N()},$=Ps.useCallback(()=>{const{regularInterval:ne,lowTimeThreshold:Q}=B,z=I<=Q&&I>0&&!T.current,F=y.current!==null&&y.current-I>=ne,_=y.current===null;if(z||F){z&&(T.current=!0),y.current=I;const K=_se(D.minute,D.minutePlural,D.remaining,I);S(K)}_&&(y.current=I)},[B,I,D]);if(Ps.useEffect(()=>{g&&I!==0&&(M||$())},[$,M,g,A,I]),Ps.useEffect(()=>{if(!g||I!==0||n)return;const ne=setTimeout(()=>{b(!0)},1200);return()=>clearTimeout(ne)},[I,g,n]),!g||O||o)return null;const W={"header-area":P,"cover-area":M,"hide-timer":j,"exit-course":t},U={display:[M,P&&!n].some(Ee())?null:"none"},Z=()=>({[dr.SUMMARY]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:cn("label"),children:[d,":"]}),(0,s.jsxs)("div",{className:cn("value"),children:[E," ",E===1?h:m]})]}),[dr.REMAINING]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:cn("label"),children:[f,":"]}),(0,s.jsx)("div",{className:cn("value"),children:Use(I)})]}),[dr.ELAPSED]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:cn("label"),children:[r,":"]}),(0,s.jsx)("div",{className:cn("value"),children:T5(R-I)})]}),[dr.ELAPSED_TOTAL]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:cn("label"),children:[r,":"]}),(0,s.jsxs)("div",{className:cn("value"),children:[T5(R-I)," /"," ",Gse(E)]})]})})[M?dr.SUMMARY:C];return(0,s.jsxs)("div",{className:cn(W),"data-testid":"quiz-timer",style:U,children:[I!==0&&(0,s.jsx)("div",{"aria-atomic":"true","aria-live":"polite",className:"visually-hidden",role:"status",children:L}),I===0&&(0,s.jsx)("div",{className:"visually-hidden",role:"alert",children:a||"Time expired"}),P&&w?(0,s.jsxs)("button",{className:cn("hide"),onClick:()=>k(!1),type:"button",children:[(0,s.jsx)(ie,{className:cn("icon"),name:"stopwatch-regular"}),v]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:cn("time"),children:[(0,s.jsx)(ie,{className:cn("icon"),name:"stopwatch-regular"}),(0,s.jsx)("div",{className:cn("desc"),children:Z()})]}),P&&(0,s.jsx)("button",{className:cn("hide"),onClick:()=>k(!0),type:"button",children:l})]}),!M&&x&&Es.createPortal((0,s.jsxs)(md,{className:"quiz-timer-modal","data-testid":"quiz-timer-modal",disableBackgroundScroll:!0,heading:a,hideCloseButton:!0,onCancel:H,onClose:H,onOverlayClick:()=>{},children:[(0,s.jsx)("p",{children:c}),(0,s.jsx)("button",{"data-testid":"quiz-view-results-button",onClick:H,type:"button",children:i})]}),Zs({childType:"dialog"}))]})},Zn=V("quiz-start"),Wse=e=>(e?.retryAttempts??0)>0;function I5({lessonId:e,isActive:t,hasQuestions:n=!0}){const o=tt(),r=(0,u.useRef)(null),a=ml(e),i=Ce(),c=ce(),l=mh(),d=At(e),h=_C(),m=ue(UC),f=l?.authorName,v=l?.avatar,C=c?.theme?.showAuthor??!1,g=c?.theme?.showLessonCount??!1,x=h[e]??0,b=ct(d?.description),L=ct(d?.title),S=d?.settings?.timer,y=d?.settings?.asLesson!==!1,{a11yAuthorPrefix:T="",lessonName:k="",lessonPreposition:I="",quizStart:E="",quizTakeAgain:w="",quizTimerElapsed:A="",quizTimerExpired:N="",quizTimerExpiredAction:R="",quizTimerExpiredMessage:M="",quizTimerHide:P="",quizTimerLimit:j="",quizTimerMinute:O="",quizTimerMinutePlural:B="",quizTimerRemaining:D="",quizTimerShow:H=""}=i??{},$=Wse(a),W=t&&$,U=$?"quiz-take-again-button":"quiz-start-button";(0,u.useEffect)(()=>{W&&r.current?.focus()},[W]);const Z=()=>{o(_0({lessonId:e,fromIndex:0}))},ne=$?w:E;return(0,s.jsx)("div",{"aria-hidden":!t,className:Zn(),children:(0,s.jsx)("div",{className:Zn("container"),children:(0,s.jsxs)("div",{className:Zn("content"),children:[(0,s.jsxs)("div",{className:Zn("header"),children:[(0,s.jsx)("div",{className:Zn("counter"),children:y&&g&&(0,s.jsx)("div",{className:Zn("count"),children:`${k} ${x} ${I} ${m}`})}),(0,s.jsx)("h1",{ref:r,tabIndex:-1,children:(0,s.jsx)(Ie,{className:Zn("title"),value:L})}),C&&v&&f?(0,s.jsxs)("div",{className:Zn("author"),children:[(0,s.jsx)("img",{alt:"",src:Sg(v)}),(0,s.jsxs)("span",{className:"visually-hidden",children:[T," ",f]}),(0,s.jsx)("span",{"aria-hidden":"true",children:f})]}):null]}),n&&S&&(0,s.jsx)(k5,{area:"cover",exitCourseEnabled:c?.lmsOptions?.enableExitCourse,isStartScreenActive:t,labelQuizTimerElapsed:A,labelQuizTimerExpired:N,labelQuizTimerExpiredAction:R,labelQuizTimerExpiredMessage:M,labelQuizTimerHide:P,labelQuizTimerLimit:j,labelQuizTimerMinute:O,labelQuizTimerMinutePlural:B,labelQuizTimerRemaining:D,labelQuizTimerShow:H,timerEnabled:S}),(0,s.jsx)(Ie,{allowTabNavigation:t,className:Zn("description"),value:b}),n?(0,s.jsxs)("button",{className:Zn("start-button"),"data-testid":U,onClick:t?Z:qt,tabIndex:t?void 0:-1,type:"button",children:[(0,s.jsx)("span",{className:Zn("start-button-text"),children:ne}),(0,s.jsx)(ie,{className:Zn("start-button-icon"),name:"chevron-right-solid"})]}):(0,s.jsx)(Bse,{icon:"circle-exclamation",title:"No questions found",children:"This quiz has no questions. Contact your admin for help."})]})})})}function Kse(){const[e,t]=(0,u.useState)();return(0,u.useEffect)(()=>{const n=document.querySelector("[data-previous-lesson]");if(!n)return;t(n.clientHeight);const o=new ResizeObserver(([r])=>{t(r.target.clientHeight)});return o.observe(n),()=>{o.disconnect()}},[]),e}const Iu=V("quiz");function Qse({lessonId:e}){const t=At(e);return!e||!tl(t)?null:(0,s.jsx)(Yse,{lessonId:e})}function Yse({lessonId:e}){const t=ce(),n=t?.color,o=Ce(),a=Hi()?.prefersKeyboardNavigation??!1,i=oa(e)??"",{activeIndex:c,progress:l,resolvedItems:d,retryAttempts:h,settings:m,sourceItems:f}=_ne({lessonId:e}),v=jne({settings:m}),C=Kse();Xne({lessonId:e,items:f});const g=Ine(d.length),x=Ene(c),{items:b,startOffset:L}=Nne(d,c);return d.length===0?(0,s.jsx)("section",{className:Iu(),"data-quiz":!0,"data-testid":"quiz",children:(0,s.jsx)("div",{className:Iu("wrap"),children:(0,s.jsx)("div",{className:Su({activeIndex:0,index:0}),children:(0,s.jsx)(I5,{hasQuestions:!1,isActive:!0,lessonId:e})})})}):(0,s.jsxs)("section",{className:Iu(),"data-quiz":!0,"data-testid":"quiz",children:[m?.timer&&(0,s.jsx)(k5,{area:"header",exitCourseEnabled:t?.lmsOptions?.enableExitCourse,isEndScreenActive:c===g,isStartScreenActive:c===0,labelQuizTimerElapsed:o?.quizTimerElapsed,labelQuizTimerExpired:o?.quizTimerExpired,labelQuizTimerExpiredAction:o?.quizTimerExpiredAction,labelQuizTimerExpiredMessage:o?.quizTimerExpiredMessage,labelQuizTimerHide:o?.quizTimerHide,labelQuizTimerLimit:o?.quizTimerLimit,labelQuizTimerMinute:o?.quizTimerMinute,labelQuizTimerMinutePlural:o?.quizTimerMinutePlural,labelQuizTimerRemaining:o?.quizTimerRemaining,labelQuizTimerShow:o?.quizTimerShow,timerDisplay:m?.timerDisplay??void 0,timerEnabled:m?.timer}),(0,s.jsxs)("div",{className:Iu("wrap"),children:[x&&(0,s.jsx)("div",{className:Su({activeIndex:c,index:0}),children:(0,s.jsx)(I5,{isActive:c===0,lessonId:e})}),b.map((S,y)=>{const T=S.type===hn.MULTIPLE_CHOICE;return(0,s.jsx)(xse,{color:n,hasStart:!0,id:e,index:y+L,isCard:!0,isCorrectAnswerUnshuffled:T?yne(S.shuffledAnswerIndices,S.answers,S.correct):void 0,isShuffled:bne(S.shuffledAnswerIndices,S.answers),isTimedQuiz:m?.timer,item:S,items:d,labels:o??{},onChoiceSelect:v.onChoiceSelect,onFillInChange:v.onFillInChange,onMatchSet:v.onMatchSet,onResponseToggle:v.onResponseToggle,prefersKeyboardNavigation:a,progress:l,quizTop:C,reportAnswer:Lg,retryAttempts:h,scrollId:"page-wrap",setNextIndex:v.onSetIndex,settings:m??void 0,submitAction:v.onSubmit,title:i},`item-${S.id}`)}),(0,s.jsx)("div",{className:Su({activeIndex:c,index:g}),inert:g===c?void 0:!0,children:(0,s.jsx)(Ose,{lessonId:e,questionCount:d.length})})]})]})}function Zse({lessonProgress:e}){const t=e?.id;return(0,s.jsx)("div",{className:"page page--lessonTypeQuiz","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper",children:(0,s.jsx)(yu,{lessonId:t,children:(0,s.jsxs)("div",{className:"page__content",children:[(0,s.jsx)(n5,{lessonProgress:e,type:"quiz"}),(0,s.jsx)(Qse,{lessonId:t},`${t??""}-${e?.retryAttempts??0}`)]})})})})}const Eu=V("lesson-header"),oo=({avatar:e,authorName:t,className:n=""})=>{const o=Ce();return(0,s.jsxs)("div",{className:Eu("author").mix(n),children:[(0,s.jsx)("img",{alt:"",className:"lesson-header__author-img",src:e?mt(e):void 0}),(0,s.jsx)("span",{className:"visually-hidden-always",children:o?.a11yAuthorPrefix}),(0,s.jsx)("span",{className:"lesson-header__author-name",children:t})]})},Nu=({showPartnerContent:e=!1})=>(0,s.jsx)("div",{className:Eu("author",{"partner-content":e})}),ro=()=>(0,s.jsx)("div",{className:"lesson-header__counter"}),ao=({lessonName:e,lessonPreposition:t,totalLessons:n,lessonNumber:o,showPartnerContent:r=!1})=>{const{lmsOptions:a}=ce();return(0,s.jsx)("div",{className:Eu("counter",{"partner-content":r}),children:(0,s.jsx)("div",{className:Eu("count",{"exit-button-enabled":a?.enableExitCourse}),children:`${e} ${o} ${t} ${n}`})})},Ga=({description:e})=>(0,s.jsx)(Ie,{className:"lesson-header__description",value:e}),Xse=({children:e})=>(0,s.jsx)("div",{className:"lesson-header__grouped-row",children:e}),qse=({ariaLabel:e,imgRole:t,children:n,sectionStyles:o,topWrapClassName:r})=>(0,s.jsxs)("header",{className:"page__header",children:[(0,s.jsx)("div",{className:"page__header-limit",children:(0,s.jsx)("div",{className:"page__header-container",children:(0,s.jsx)("div",{className:"lesson-header__row",children:(0,s.jsx)("div",{className:"lesson-header__main",children:(0,s.jsx)("div",{className:"lesson-header",children:(0,s.jsx)("div",{className:r,children:n})})})})})}),(0,s.jsx)("div",{"aria-label":e,className:"page__header-bg",role:t,style:o})]}),io=({title:e,id:t})=>{const n=J2(t,"title");return(0,s.jsx)("h1",{className:"lesson-header__title","data-change-path":n,tabIndex:-1,children:(0,s.jsx)(Ie,{value:e})})},Uo=V("lesson-header"),E5=e=>`url(${bi({width:76,height:76,imageKey:e.image})})`,yp=({partnerContentAuthors:e})=>{const t=e.map(o=>o.name).join(", "),n=e.length===1;return(0,s.jsxs)("div",{className:Uo("partner-content",{mobile:!0}),children:[(0,s.jsx)("div",{className:Uo("partner-content-author",{single:n}),children:e.map(o=>(0,s.jsx)("div",{className:Uo("partner-content-author-img",{single:n}),style:{backgroundImage:E5(o)}},o.name))}),(0,s.jsx)("span",{"aria-hidden":"true",className:Uo("author-name"),children:t})]})},Wa=({partnerContentAuthors:e})=>{const t=Ce();return(0,s.jsx)("div",{className:Uo("partner-content"),children:e.map(n=>(0,s.jsxs)("div",{className:Uo("partner-content-author"),children:[(0,s.jsx)("div",{className:Uo("partner-content-author-img"),style:{backgroundImage:E5(n)}}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("span",{className:"visually-hidden",children:[t?.a11yAuthorPrefix," ",n.name]}),(0,s.jsx)("span",{"aria-hidden":"true",className:Uo("author-name"),children:n.name})]})]},n.name))})};var N5=p(82920);const Ka=V("lesson-header"),Jse=({authorName:e,avatar:t,description:n,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null&&c,v=t&&e&&c&&!f,C=v||f||l,g=l&&(v||f);return(0,s.jsxs)("div",{className:Ka("content"),children:[C&&(0,s.jsxs)("div",{className:Ka("info-row"),children:[v?(0,s.jsx)(oo,{authorName:e,avatar:t}):(0,s.jsx)(Nu,{}),f&&(0,s.jsx)(Wa,{partnerContentAuthors:i}),g&&(0,s.jsx)("span",{"aria-hidden":"true",className:Ka("info-row--divider"),children:"|"}),l?(0,s.jsx)(ao,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,s.jsx)(ro,{})]}),(0,s.jsxs)("div",{className:Ka("title-wrapper",{"no-info":!C}),children:[(0,s.jsx)(io,{id:m,title:d}),n&&(0,s.jsx)(Ga,{description:n})]})]})},eoe=({authorName:e,avatar:t,description:n,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null,v=N5.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,s.jsxs)("div",{className:Ka("content"),children:[l?(0,s.jsx)(ao,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,s.jsx)(ro,{}),v&&(0,s.jsx)(oo,{authorName:e,avatar:t}),c&&f&&(0,s.jsx)(yp,{partnerContentAuthors:i}),(0,s.jsx)(io,{id:m,title:d}),n&&(0,s.jsx)(Ga,{description:n})]})},toe=({authorName:e,avatar:t,description:n,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null,v=N5.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,s.jsxs)("div",{className:Ka("content"),children:[l?(0,s.jsx)(ao,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,s.jsx)(ro,{}),(0,s.jsx)(io,{id:m,title:d}),v?(0,s.jsx)(oo,{authorName:e,avatar:t}):(0,s.jsx)(Nu,{showPartnerContent:f}),c&&f&&(0,s.jsx)(Wa,{partnerContentAuthors:i}),n&&(0,s.jsx)(Ga,{description:n})]})};function noe(e){const t=$x();return e.lessonHeaderSize===ci.SMALL&&!t?(0,s.jsx)(Jse,{...e}):t?(0,s.jsx)(eoe,{...e}):(0,s.jsx)(toe,{...e})}const soe=()=>kt(480);var j5=p(82920);const Sp=V("lesson-header"),ooe=({authorName:e,avatar:t,lessonName:n,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null&&i,f=t&&e&&i&&!m,v=f||m||c,C=c&&(f||m);return(0,s.jsxs)("div",{className:Sp("content"),children:[v&&(0,s.jsxs)("div",{className:Sp("info-row"),children:[f?(0,s.jsx)(oo,{authorName:e,avatar:t}):(0,s.jsx)(Nu,{}),m&&(0,s.jsx)(Wa,{partnerContentAuthors:a}),C&&(0,s.jsx)("span",{"aria-hidden":"true",className:Sp("info-row--divider"),children:"|"}),c?(0,s.jsx)(ao,{lessonName:n,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,s.jsx)(ro,{})]}),(0,s.jsx)("div",{children:(0,s.jsx)(io,{id:h,title:l})})]})},roe=({authorName:e,avatar:t,lessonName:n,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null,f=j5.useMemo(()=>t&&e&&i&&!m,[t,e,i,m]);return(0,s.jsxs)(s.Fragment,{children:[c?(0,s.jsx)(ao,{lessonName:n,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,s.jsx)(ro,{}),f&&(0,s.jsx)(oo,{authorName:e,avatar:t}),i&&m&&(0,s.jsx)(yp,{partnerContentAuthors:a}),(0,s.jsx)(io,{id:h,title:l})]})},aoe=({authorName:e,avatar:t,lessonName:n,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null,f=j5.useMemo(()=>t&&e&&i&&!m,[t,e,i,m]);return(0,s.jsxs)(s.Fragment,{children:[f?(0,s.jsx)(oo,{authorName:e,avatar:t}):(0,s.jsx)(Nu,{}),i&&m&&(0,s.jsx)(Wa,{partnerContentAuthors:a}),(0,s.jsx)(io,{id:h,title:l}),c?(0,s.jsx)(ao,{lessonName:n,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,s.jsx)(ro,{})]})};function ioe(e){const t=soe();return e.lessonHeaderSize===ci.SMALL&&!t?(0,s.jsx)(ooe,{...e}):t?(0,s.jsx)(roe,{...e}):(0,s.jsx)(aoe,{...e})}var w5=p(82920);const ju=V("lesson-header"),Lp=()=>(0,s.jsx)("div",{className:ju("author--hidden")}),coe=({authorName:e,avatar:t,description:n,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null&&c,v=t&&e&&c&&!f,C=v||f||l,g=l&&(v||f);return(0,s.jsxs)("div",{className:ju("content"),children:[C&&(0,s.jsxs)("div",{className:ju("info-row"),children:[v?(0,s.jsx)(oo,{authorName:e,avatar:t}):(0,s.jsx)(Lp,{}),f&&(0,s.jsx)(Wa,{partnerContentAuthors:i}),g&&(0,s.jsx)("span",{"aria-hidden":"true",className:ju("info-row--divider"),children:"|"}),l?(0,s.jsx)(ao,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,s.jsx)(ro,{})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(io,{id:m,title:d}),n&&(0,s.jsx)(Ga,{description:n})]})]})},loe=e=>{const{authorName:t,avatar:n,description:o,lessonName:r,lessonNumber:a,lessonPreposition:i,partnerContentAuthors:c,showAuthor:l,showLessonCount:d,title:h,totalLessons:m,lessonId:f}=e,v=c!=null,C=w5.useMemo(()=>n&&t&&l&&!v,[n,t,l,v]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(io,{id:f,title:h}),(0,s.jsxs)(Xse,{children:[C?(0,s.jsx)(oo,{authorName:t,avatar:n}):(0,s.jsx)(Lp,{}),l&&v&&(0,s.jsx)(Wa,{partnerContentAuthors:c}),d?(0,s.jsx)(ao,{lessonName:r,lessonNumber:a,lessonPreposition:i,showPartnerContent:v,totalLessons:m}):(0,s.jsx)(ro,{})]}),o&&(0,s.jsx)(Ga,{description:o})]})},doe=e=>{const{authorName:t,avatar:n,description:o,lessonName:r,lessonNumber:a,lessonPreposition:i,partnerContentAuthors:c,showAuthor:l,showLessonCount:d,title:h,totalLessons:m,lessonId:f}=e,v=c!=null,C=w5.useMemo(()=>n&&t&&l&&!v,[n,t,l,v]);return(0,s.jsxs)(s.Fragment,{children:[d?(0,s.jsx)(ao,{lessonName:r,lessonNumber:a,lessonPreposition:i,totalLessons:m}):(0,s.jsx)(ro,{}),C?(0,s.jsx)(oo,{authorName:t,avatar:n}):(0,s.jsx)(Lp,{}),l&&v&&(0,s.jsx)(yp,{partnerContentAuthors:c}),(0,s.jsx)(io,{id:f,title:h}),o&&(0,s.jsx)(Ga,{description:o})]})};function uoe(e){const t=od();return e.lessonHeaderSize===ci.SMALL&&!t?(0,s.jsx)(coe,{...e}):t?(0,s.jsx)(doe,{...e}):(0,s.jsx)(loe,{...e})}const hoe={[te.RISE_CLASSIC]:noe,[te.HORIZON]:ioe,[te.APEX]:uoe};function moe(e){const t=ut(),n=hoe[t];return(0,s.jsx)(n,{...e})}const foe=V("lesson-header"),poe=({authorName:e,avatar:t,children:n,description:o,labels:{lessonName:r,lessonPreposition:a},lessonHeaderImageColor:i,lessonHeaderSize:c,lessonHeaderStyle:l,lessonId:d,partnerContentAuthors:h,totalLessons:m,lessonNumber:f,showAuthor:v,showLessonCount:C,title:g})=>{const x=W7(),b=D1(x),L=l===se.IMAGE,S=foe("top-wrap"),{alpha:y,ariaLabel:T,media:k,role:I}=Sr("lessonHeaderImage"),E=k?.image,w=(0,u.useMemo)(()=>{if(E&&L){const A=i===rt.LIGHT?"#fff":"#000";return ll({alpha:y,color:A,url:lt(E)})}},[E,L,i,y]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(qse,{ariaLabel:L?T:void 0,imgRole:L?I:void 0,sectionStyles:w,topWrapClassName:S,children:(0,s.jsx)(moe,{authorName:e,avatar:t,description:o,lessonHeaderSize:c,lessonId:d,lessonName:r,lessonNumber:f,lessonPreposition:a,partnerContentAuthors:h,showAuthor:v,showLessonCount:C&&!b,title:g,totalLessons:m})}),n]})};function goe(e){const t=e?.customColorLessonHeaderContrast,n=e?.lessonHeaderColor;return(0,u.useMemo)(()=>{const o=Fn(n),r=t??o;return(r===Te.AUTO?o:r)===Te.DARK?xt.DARK:xt.LIGHT},[t,n])}var voe=p(89950),Tp=p.n(voe);p.dn(A5);function A5({authors:e,lessonAuthor:t,courseAuthor:n,selectedAuthorId:o}){if(o==="none")return{};if(o){const r=Tp()(e,{id:o});if(r)return r}if(t){const r=Tp()(e,{id:t});if(r)return r}if(n){const r=Tp()(e,{id:n});if(r)return r}return{}}const{LARGE:Coe,SMALL:xoe}=ci,{ACCENT:boe,BLACK:yoe,COLOR:R5,DARK:Soe,GRAY:Loe,IMAGE:P5,LIGHT:Toe,TINT:koe}=se,Ioe=V("lesson-header-wrap");function Eoe({handleNavigate:e,isMobileHeader:t,lesson:n,lessonProgress:o,loadMedia:r}){const a=fr(),i=Ce(),c=Ii(),l=Hi(),{previewType:d}=Ol(),h=goe(a?.theme);if(!a||!i||n.type!=="blocks"&&n.type!=="quiz")return null;if(n.type==="quiz")return(0,s.jsx)(Zse,{lessonProgress:o?.type==="quiz"?o:void 0});const m=PC({course:a,lesson:n}),f=typeof m=="object"&&m!==null&&"id"in m&&(typeof m.id=="string"||typeof m.id=="number")?String(m.id):null,v=VN({course:a,lesson:n}),C=zN(a),{author:g,selectedAuthorId:x}=n,{prefersKeyboardNavigation:b}=l??{},{authors:L,color:S,enableVideoPlaybackSpeed:y,showLessonCount:T,theme:k}=a,{hideLessonHeaders:I,lessonHeaderColor:E,lessonHeaderImageColor:w,lessonHeaderSize:A,lessonHeaderStyle:N,navigationType:R,showAuthor:M}=k??{},j=c.find(ne=>ne.id===x)?.data?.authors,O=A5({authors:L,lessonAuthor:g,courseAuthor:a.author,selectedAuthorId:x}),{avatar:B,authorName:D}=O,H=(0,s.jsx)(poe,{authorName:D,avatar:B,description:n.description,labels:i,lessonHeaderImageColor:w,lessonHeaderSize:A,lessonHeaderStyle:N,lessonId:n.id,lessonNumber:v,partnerContentAuthors:j,showAuthor:M,showLessonCount:T,title:n.title,totalLessons:C,children:(0,s.jsx)(n5,{id:n.id,items:n.items,lessonProgress:o,navigationType:R,scrollPosition:0,type:n.type})}),W=`image-${(w??rt.DARK).toLowerCase()}`,U=Ioe({[W]:N===P5,accent:N===boe,black:N===yoe,collapsed:I,custom:N===R5,dark:N===Soe,gray:N===Loe,image:N===P5,large:A===Coe&&!t,light:N===Toe,mobile:t,small:A===xoe&&!t,tint:N===koe}),Z=N===R5?{"--lesson-header-contrast-color":h,"--color-background":E}:{};return(0,s.jsx)(rne,{animateBlockEntrance:a.animateBlockEntrance??!1,color:S??"",courseTitle:a.title,data:n,enableVideoPlaybackSpeed:y??!1,handleNavigate:e,hideLessonHeaders:I??void 0,labels:i,lessonHeader:H,lessonHeaderWrapClasses:U,lessonHeaderWrapStyles:Z,lessonProgress:o?.type==="blocks"?o:void 0,loadMedia:r,nextLesson:f,prefersKeyboardNavigation:b,previewType:d})}const Noe=({percentComplete:e,trackingCompletionPercentage:t,labelCompletionRequirement:n="Completion Requirement",labelPercentCompletion:o="% Completion",labelYouCompleted:r="You completed:",labelA11yRequirementCompleted:a="Requirement completed, check mark",labelA11yRequirementNotCompleted:i="Requirement not completed, empty square"})=>{const c=rs();if(t==null)return null;const l=va({percent:t,label:o,isRTL:c}),d=c?`%${e}`:`${e}%`;return(0,s.jsxs)("div",{className:"progress-summary__requirement",children:[(0,s.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,s.jsx)("h2",{className:"progress-summary__requirement-title",children:n}),(0,s.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,s.jsx)("div",{children:l}),(0,s.jsxs)("div",{children:[r,"\xA0",(0,s.jsx)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:d})]})]})]}),(0,s.jsx)(M5,{labelA11yRequirementCompleted:a,labelA11yRequirementNotCompleted:i,requirementMet:e!=null&&t<=e})]})},joe=({outOfAttempts:e,quizPassed:t,quizPassingScore:n=100,quizScore:o,quizTitle:r,trackingQuizId:a,labelQuizRequirement:i="Quiz Requirement",labelScoreOf:c="Score of",labelScoreOfPreposition:l="% on",labelViewQuiz:d="View quiz",labelYouScored:h="You scored",labelNoAttemptsRemaining:m="No attempts remaining.",labelA11yRequirementCompleted:f="Requirement completed, check mark",labelA11yRequirementNotCompleted:v="Requirement not completed, empty square"})=>{const C=rs();if(!a)return null;const g=va({percent:n,label:l,isRTL:C});return(0,s.jsxs)("div",{className:"progress-summary__requirement",children:[(0,s.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,s.jsx)("h2",{className:"progress-summary__requirement-title",children:i}),(0,s.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,s.jsxs)("div",{children:[c," ",g," ",r]}),o==null?(0,s.jsx)("div",{children:(0,s.jsx)(nn,{className:"progress-summary__requirement-stats-link brand--color",to:In(a),children:d})}):(0,s.jsxs)("div",{children:[h,"\xA0",(0,s.jsxs)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:[o,"%"]})]})]}),e&&(0,s.jsx)("span",{className:"progress-summary__requirement-no-attempts",children:m})]}),(0,s.jsx)(M5,{labelA11yRequirementCompleted:f,labelA11yRequirementNotCompleted:v,requirementMet:t})]})},M5=({requirementMet:e,labelA11yRequirementCompleted:t,labelA11yRequirementNotCompleted:n})=>e?(0,s.jsx)(ie,{"aria-label":t,classNameIcon:"progress-summary__requirement-checkbox-checked",name:"square-check"}):(0,s.jsx)("div",{"aria-label":n,className:"progress-summary__requirement-checkbox-empty",role:"img"}),woe=({dueAt:e})=>e?(0,s.jsx)("div",{className:"progress-summary__header-due brand--color brand--border",children:Lm(e)}):null;var Aoe=p(68508),Roe=p.n(Aoe);const Poe=900,Moe=1e4;function Ooe(){const[e,t]=(0,u.useState)(!1),[n,o]=(0,u.useState)(!0);return(0,u.useEffect)(()=>{let r;const a=setTimeout(()=>{t(!0),r=setTimeout(()=>o(!1),Moe)},Poe);return()=>{clearTimeout(a),clearTimeout(r)}},[]),{recycle:n,run:e}}const Boe=["#eb524d","#ffac02","#ffcc00","#28cea9","#4fbdf4","#6788e4"],Doe=()=>{const{recycle:e,run:t}=Ooe(),n=(0,u.useRef)(null);return(0,s.jsx)("div",{className:"progress-summary__confetti",children:(0,s.jsx)(Roe(),{canvasRef:n,colors:Boe,gravity:.4,height:window.innerHeight,numberOfPieces:500,recycle:e,run:t,width:window.innerWidth})})};var Foe=p(15029);const O5=V("progress-summary-card"),Hoe=({completeLabel:e,isComplete:t,isUrgent:n,completedDate:o,labelDue:r})=>t?(0,s.jsxs)("div",{className:"progress-summary-card__completed-label",children:[e,(0,s.jsx)("span",{className:"progress-summary-card__completed-date",children:o})]}):r?(0,s.jsx)("div",{className:["progress-summary-card__due-label",n?"brand--color":void 0].filter(Boolean).join(" "),children:r}):null,$oe=({cardImageKey:e=null,className:t,color:n="#ff6602",completedAt:o=null,coverImageKey:r=null,disable:a=!1,durationHidden:i=!1,enrolledAt:c=null,hidden:l=!1,imagesUri:d="",isLearningPath:h=!1,isUrgent:m=!1,labelAssignedToMe:f="",labelDue:v="",labelDuration:C="",labelLearningPath:g="",onClick:x=qt,progress:b=0,title:L=""})=>{const S=Ce(),y=rs(),T=o!==null,k=(0,u.useCallback)(()=>{a||x?.()},[a,x]),I=(0,u.useCallback)(j=>{Dh(j)&&j.preventDefault(),!a&&ia(j)&&x?.()},[a,x]),E=va({percent:Math.round(b),label:S?.progressSummaryPercentComplete||"% Complete",isRTL:y}),w=e||r,A=S?.progressSummaryCompleted||"Completed: ",N=o===null?"":`${hs()(new Date(o)).format("MM/DD/YY")}`,R=O5("card",{disabled:a}),M=["progress-summary-card__title-button",t].filter(Boolean).join(" "),P=O5("image-overlay",{"not-started":!(b||T),"in-progress-completed":b||T});return(0,s.jsxs)("div",{"aria-hidden":l,className:R,onClick:k,children:[(0,s.jsxs)("div",{className:"progress-summary-card__content",children:[(0,s.jsx)("button",{"aria-disabled":a,className:M,onKeyDown:I,role:"link",tabIndex:l?-1:void 0,type:"button",children:(0,s.jsx)("span",{className:"progress-summary-card__title",children:L||S?.progressSummaryNoTitle||"(No Title)"})}),(0,s.jsxs)("div",{className:"progress-summary-card__course-info",children:[h&&(0,s.jsx)("div",{className:"progress-summary-card__hide",children:g}),c&&(0,s.jsx)("div",{className:"progress-summary-card__hide",children:f}),!!b&&!a&&!o&&(0,s.jsx)("span",{className:"progress-summary-card__hide",children:E}),!i&&!T&&(0,s.jsx)("div",{className:"progress-summary-card__duration",children:C}),(0,s.jsx)(Hoe,{completedDate:N,completeLabel:A,isComplete:T,isUrgent:m,labelDue:v})]})]}),(0,s.jsxs)("div",{className:"progress-summary-card__image-wrap",children:[(0,s.jsx)(Foe.A,{alt:"","aria-hidden":"true",b:"fff",className:"progress-summary-card__image",f:"jpg",h:150,imageKey:w,imagesUri:d,s:"cover",style:{backgroundColor:n},w:300}),(0,s.jsx)("div",{className:P}),(0,s.jsx)("div",{className:"progress-summary-card__image-overlay-bottom-bar",children:!!b&&!a&&!T&&(0,s.jsx)("div",{"aria-hidden":"true",className:"progress-summary-card__progress-bar-wrap",children:(0,s.jsx)("div",{className:"progress-summary-card__wrap-light",children:(0,s.jsx)("div",{className:"progress-summary-card__progress-bar",style:{width:`${b}%`}})})})})]})]})},Voe=Ne("IMAGES_URI"),B5=(e,t)=>e===1?t:t.concat("s"),kp=e=>e?.course?.course?.lessons??[],zoe=e=>t=>kp(t).find(n=>n.type!=="section"&&n.id!=null&&!e.includes(n.id)),_oe=e=>{const t=kp(e),{trackingQuizId:n,score:o}=e??{};if(n&&t.length){const r=t.find(({id:i})=>i===n),{settings:{passingScore:a}={}}=r??{};return Number(o)<Number(a)?r:!1}},Uoe=e=>kp(e).find(t=>t.type!=="section"),Goe=(e,t)=>(zoe(e)(t)||_oe(t)||Uoe(t))?.id??"",Woe=e=>{const t=hs().duration(e),n=t.hours(),o=t.minutes(),r=`${n} ${B5(n,"hr")}`,a=`${o} min`;return n>=100?"100+ hrs":n>0&&o>0?[r,a].join(" "):n>0?r:a},Koe=({color:e,learningPathId:t})=>{const{learningPathComplete:n,isSuccess:o,nextCourse:r}=ue(x=>x.learningPathUpNext??{}),{dueAt:a,courseId:i="",lessonCount:c,lessonsCompleted:l=[],sourceType:d,timeToComplete:h}=r??{},m=Ce(),f=(0,u.useMemo)(()=>Goe(l,r),[r,l]),v=r?.color??e,C={cardImageKey:r?.cardImageKey,color:v,coverImageKey:r?.coverImageKey,progress:r?.progress,score:r?.score??void 0,title:r?.title},g=(0,u.useCallback)(()=>{d==="PACKAGE"?(window.top.sessionStorage.setItem("upNextCourseId",i),window.top.location.assign(`/learning-path/${t}`)):ME(`${i}/lessons/${f}`)},[i,t,f,d]);return o&&!n&&(0,s.jsx)("div",{className:"progress-summary__lp-next",children:(0,s.jsxs)("div",{className:"progress-summary__lp-next-inner",children:[(0,s.jsxs)("div",{className:"progress-summary__lp-next-label",children:[m?.progressSummaryNextUp||"Next up"," ",(0,s.jsx)(ie,{"aria-hidden":"true",classNameIcon:"progress-summary__lp-next-label-icon",name:"arrow-right"})]}),(0,s.jsx)("div",{className:"progress-summary__lp-next-card",children:(0,s.jsx)($oe,{imagesUri:Voe,labelCount:`${c} ${B5(c,"lesson")}`,labelDue:Lm(a),labelDuration:Woe(h),noCertDownload:!0,noFavoriteBtn:!0,onClick:g,...C})})]})})},Qoe=`${Ne("CDN_URI")}/assets/rise/assets/trophy.svg`,Yoe=e=>Object.values(e).filter(({isComplete:t})=>t).length,Zoe=e=>{const{color:t,course:n={},courseProgress:o={},lessons:r=[]}=e,a=tt(),{learningPathComplete:i,lpHasFailedQuiz:c}=ue(F=>F.learningPathUpNext??{}),{lessons:l={},percentComplete:d}=o,{dueAt:h,certificateDownload:m,completionCelebration:f,lessonsOnly:v=[],riseComCourseId:C,riseComLearningPathId:g,trackingCompletionPercentage:x,trackingQuizId:b}=n,L=Jr(),S=Ce(),y=S??{},T=x==null&&b==null,k=T?d===100:xg(),I=v.length,E=Yoe(l),w=(0,u.useCallback)(()=>{a(zE({courseId:C,learningPathId:g}))},[a,C,g]);(0,u.useEffect)(()=>{g&&w()},[]);const A=(0,u.useMemo)(()=>k?n.completedAt?n.completedAt:new Date:null,[n.completedAt,k]),N=(0,u.useMemo)(()=>r.find(F=>F.type==="quiz"&&F.id===b),[b,r]),R=ct(N?.title),M=(0,u.useMemo)(()=>Number(N?.settings?.passingScore??100),[N]),P=b?o.lessons?.[b]:void 0,j=P?.passed??null,O=(0,u.useMemo)(()=>P?.percentComplete===100?P.score??null:null,[P]),B=MC(o,N,b),D=typeof B=="object"&&B!==null&&"outOfAttempts"in B&&B.outOfAttempts===!0,H=b?j:!0,$=jn(),W=T?"progress-summary progress-summary__no-req":"progress-summary",U=bs(n),Z=`You've completed ${E} of ${I} lessons.`,Q=U?k?"Complete":"Incomplete":Z,z=String(ki(L+" - Progress Summary"));return(0,s.jsx)(xr,{title:z,children:(0,s.jsxs)("div",{className:W,children:[k&&f&&H&&!$&&(0,s.jsx)(Doe,{}),(0,s.jsxs)("header",{className:"progress-summary__header",children:[(0,s.jsx)("h1",{className:"progress-summary__header-title",tabIndex:-1,children:k&&!T&&H?S?.progressSummaryCongratulations||"Congratulations!":S?.progressSummary||"Progress Summary"}),T?(0,s.jsx)("div",{className:"progress-summary__lessons-completed",children:Q}):k?(0,s.jsxs)("div",{className:"progress-summary__header-completion-date",children:[H&&(0,s.jsx)("img",{alt:"trophy",className:"progress-summary__header-trophy",src:Qoe}),hs()(A).format("MMMM Do, YYYY")]}):(0,s.jsx)(woe,{dueAt:h})]}),(0,s.jsxs)("section",{className:"progress-summary__section",children:[!T&&k&&(0,s.jsx)("div",{className:"progress-summary__requirements-met",children:S?.progressSummaryRequirementsMet||"You've met all the requirements."}),T?!g&&(0,s.jsxs)(nn,{className:"progress-summary__start-over",to:"/",children:[S?.progressSummaryStartOver||"Start Over",(0,s.jsx)("i",{className:"progress-summary__start-over-icon icon icon-reload"})]}):(0,s.jsxs)("div",{className:"progress-summary__requirements",children:[(0,s.jsx)(Noe,{labelA11yRequirementCompleted:S?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:S?.a11yProgressSummaryRequirementNotCompleted,labelCompletionRequirement:y.progressSummaryCompletionRequirement,labelPercentCompletion:y.progressSummaryPercentCompletion,labelYouCompleted:y.progressSummaryYouCompleted,percentComplete:d,trackingCompletionPercentage:x}),(0,s.jsx)(joe,{labelA11yRequirementCompleted:S?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:S?.a11yProgressSummaryRequirementNotCompleted,labelNoAttemptsRemaining:y.progressSummaryNoAttemptsRemaining,labelQuizRequirement:y.progressSummaryQuizRequirement,labelScoreOf:y.progressSummaryScoreOf,labelScoreOfPreposition:y.progressSummaryScoreOfPreposition,labelViewQuiz:y.progressSummaryViewQuiz,labelYouScored:y.progressSummaryYouScored,outOfAttempts:D,quizPassed:j,quizPassingScore:M,quizScore:O,quizTitle:R,trackingQuizId:b})]}),(k||T)&&(0,s.jsxs)("div",{className:"progress-summary__completion-controls",children:[(0,s.jsx)("button",{className:"progress-summary__btn-back progress-summary__completion-control",onClick:PE,role:"link",type:"button",children:S?.progressSummaryBackToLearning||"Back to my learning"}),k&&(!g&&m||g&&i)&&m&&H&&!c&&(0,s.jsx)("span",{className:"progress-summary__completion-control",children:(0,s.jsx)(vD,{})})]})]}),k&&!!g&&(0,s.jsx)(Koe,{color:t,learningPathId:g})]})})},D5=({contentClassName:e,lessonId:t,...n})=>(0,s.jsx)("div",{className:"page","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,s.jsx)(yu,{lessonId:t,children:(0,s.jsx)("div",{className:e?`page__content ${e}`:"page__content",children:(0,s.jsx)(Zoe,{...n})})})})}),F5={addEventListeners(e,t){e.addEventListener("animationend",t,!1)},removeEventListeners(e,t){e.removeEventListener("animationend",t,!1)}};function Xoe({getNavigateDirection:e,ref:t}){const n=(0,u.useRef)(null),o=(0,u.useRef)(0),[r,a]=(0,u.useState)(!1),i=(0,u.useCallback)((c,l)=>{const d=e(),h=n.current;if(!h){l();return}const m=`page ${d}-${c}`,f=()=>{c==="enter"?h.className=`page ${d}-complete`:h.className="page",F5.removeEventListeners(h,f),window.dispatchEvent(new CustomEvent(G2)),l()};h.className=m,F5.addEventListeners(h,f)},[e]);return(0,u.useImperativeHandle)(t,()=>({componentWillEnter(c){i("enter",c)},componentDidEnter(){a(!0)},componentWillExit(c){const l=document.getElementById("page-wrap"),d=l?.scrollTop??0;l&&(l.scrollTop=0),o.current=d,i("leave",c),window.dispatchEvent(new CustomEvent(U2)),n.current&&(n.current.scrollTop=o.current)},componentDidExit(){}}),[i]),{hasTransitioned:r,markInitialTransitionComplete:()=>a(!0),nodeRef:n}}function qoe({content:e,getNavigateDirection:t,handleNavigate:n,isMobileHeader:o,lessonId:r,lessonProgress:a,onPageReady:i,ref:c}){const{didNavigate:l}=Ol(),d=fr(),h=gr(),m=at(),f=Ce(),{mountedLessonIds:v,registerLesson:C,unregisterLesson:g}=dU(),{hasTransitioned:x,markInitialTransitionComplete:b,nodeRef:L}=Xoe({getNavigateDirection:t,ref:c});(0,u.useEffect)(()=>(b(),e.kind==="lesson"&&(Tg(r),Dn(tE(r))),C(r),()=>{g(r)}),[]),vU({didNavigate:l,hasTransitioned:x,onPageReady:i});const S=m(d?.title),y=e.kind==="progress-summary"?f?.progressSummary??"":e.kind==="lesson"?m(e.lesson.title):"",T=v.length===0||r===v[0],k=e.kind==="progress-summary"?(0,s.jsx)(D5,{course:d,courseProgress:h,lessonId:r,lessons:d?.lessonsOnly}):e.kind==="lesson"?(0,s.jsx)(Eoe,{handleNavigate:n,isMobileHeader:o,lesson:e.lesson,lessonProgress:a,loadMedia:T}):null;return(0,s.jsx)(xr,{title:ki(`${y} - ${S}`),children:(0,s.jsx)("div",{className:"page page-transition-complete","data-lesson-id":r,ref:L,children:k})})}var Joe=p(20855),wu=p(65577);function ere(e){return e?.slidesUI?.slideDirection??es.UP}function tre(){return ue(ere)}function nre(e){return e?.slidesUI?.exitingSlideOffset??0}function sre(){return ue(nre)}var ore;const rre=1024,are=16/9,H5=rre/are,ire=e=>typeof e=="string"||typeof e=="number",cre=e=>ore(e)&&e.type==="slide"&&Array.isArray(e.items),Lc=e=>{if(!(!Zt(e)||!Zt(e.experiments)))return e.experiments},lre=(e,t)=>!Array.isArray(e)||!t?[]:e.filter(ire).map(n=>t[String(n)]).filter(cre),Ype=(e,t)=>lre(e,t).map(n=>n.id),dre=e=>Lc(e)?.showTitle!==!1,$5=e=>Lc(e)?.imageTextLayout,V5=e=>e!==void 0,ure=e=>V5($5(e)),hre=e=>ure(e)&&Lc(e)?.showDescription!==!1,mre=e=>({imagePosition:e==="insetRight"||e==="bleedRight"?"right":"left",isFullBleed:e==="bleedLeft"||e==="bleedRight"||e==="overlay",isOverlay:e==="overlay"}),fre=e=>Lc(e)?.titleVariant,Zpe=e=>e&&Lc(e)?.speakerNotes||"",z5=V("presentation-logo"),pre=()=>{const e=ce(),t=Gs(),n=e?.theme?.showLogo??!0;if(!t||n===!1)return null;const o=e?.theme?.logoPosition??X8;return(0,s.jsx)(jm,{className:z5({[Z8[o]]:!0}),imageClassName:z5("image")})};function gre(e,{designHeight:t,fit:n="width"}={}){const o=(0,u.useRef)(null),[r,a]=(0,u.useState)(1),i=(0,u.useRef)(null);(0,u.useLayoutEffect)(()=>{const l=o.current;if(!l)return;const d=(f,v)=>{const C=f>0?f/e:1,g=n==="contain"&&t?Math.min(C,v>0?v/t:1):C;a(x=>x===g?x:g)},h=l.getBoundingClientRect();d(h.width,h.height);const m=new ResizeObserver(f=>{i.current!=null&&cancelAnimationFrame(i.current),i.current=requestAnimationFrame(()=>{const v=f[0];v&&d(v.contentRect.width,v.contentRect.height)})});return m.observe(l),()=>{m.disconnect(),i.current!=null&&cancelAnimationFrame(i.current)}},[e,t,n]);const c={transform:`scale3d(${r}, ${r}, 1)`,transformOrigin:n==="contain"?"center":"top left"};return{containerRef:o,scale:r,scaleStyle:c}}const _5=V("presentation-slide-frame");function vre({children:e}){const{containerRef:t,scaleStyle:n}=gre(1024,{designHeight:H5,fit:"contain"});return(0,s.jsx)("div",{className:_5(),ref:t,children:(0,s.jsx)("div",{className:_5("canvas"),style:{width:1024,height:H5,...n},children:e})})}const Bt=V("blocks-lesson-slide"),U5="#fff",Cre=e=>Zt(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string",xre=e=>Zt(e)&&(typeof e.id=="string"||typeof e.id=="number"),bre=e=>{const t={...e,id:e.id??e.blockId};return xre(t)?t:null},yre=["image full","image text overlay","quote background"],Sre=({className:e,hasSingleBlock:t})=>{const n=cs(),{backgroundImageCss:o}=n2(),r=En()||U5,a=n===se.IMAGE;return t&&a?null:(0,s.jsx)("div",{className:e,style:a&&o?{backgroundImage:o.backgroundImage}:{background:r}})};function Lre(e,t,n){if(n)return Bt("connected-blocks");const o=t.blocks?.find(l=>l.settings?.backgroundType===se.IMAGE),r=e.settings?.backgroundType===se.IMAGE,a=Jte(e.family??"",e.variant??"");return Bt("connected-blocks",{"min-half-height":o&&(r&&!a)})}const Tre=({hasTransitioned:e,onContinue:t,prefersKeyboardNavigation:n,previewType:o,ref:r,slide:a,transitionState:i})=>{const c=ce(),l=Ws()??"",d=Ce(),h=Ii(),m=No(l),f=m?.type==="blocks"?m:void 0,{animateBlockEntrance:v,color:C,title:g,enableVideoPlaybackSpeed:x}=c,b=tre(),L=sre(),S=a?.lastBlock,y=(0,u.useCallback)(oe=>{oe===S?.id&&t()},[S,t]);if(!a)return null;const T=`${i}-${b}`,k=Bt("wrapper",{exiting:i==="exiting"}),{blocks:I,lessonTitle:E,lessonDescription:w,shouldShowAnimation:A=v,shouldShowTitle:N=!0,shouldShowDescription:R=!0,imageTextLayout:M,titleVariant:P}=a,j=ei(c),O=j&&!M?a.blocks?.[0]?.family:void 0,B=Bt("inner",{[T]:!0,presentation:j}),D=Bt("lesson-title",{heading:P==="heading",subheading:P==="subheading"}).toString(),H=Bt("lesson",{slides:!0,"touch-preview":qi(o),media:O==="multimedia",chart:O==="chart"}).toString(),$=a.blocks.length===1,{settings:W,type:U,variant:Z}=a.blocks?.[0]??{},ne=!$||j?"none":W?.backgroundType===se.IMAGE?"image-background":yre.includes(`${U} ${Z}`)?"legacy":"none",Q=ne!=="none"?Bt("full-width-image",{legacy:ne==="legacy",background:ne==="image-background"}):null,z=N&&E,F=V5(M)&&R&&w,_=(z||F)&&(0,s.jsxs)("div",{className:Bt("lesson-header"),children:[z&&(0,s.jsx)(Ie,{className:D,tagName:"h1",value:E}),F&&(0,s.jsx)(Ie,{className:Bt("lesson-description").toString(),value:w})]}),K=M?mre(M):void 0,Y=!K&&A,q=K?.imagePosition==="left",J=I.map((oe,Se)=>{const G=$?!1:e5({blocks:a.blocks,lessonProgress:f,currentBlockIndex:Se}),le=Q||Lre(oe,a,j),ve={...oe,blockId:oe.blockId??oe.id};if(!Cre(ve))return null;const pe=ve,be=bre(oe),ye=!j&&!Q&&be?(0,s.jsx)(XC,{block:be,children:(0,s.jsx)(Sre,{className:Bt("block-background"),hasSingleBlock:$})}):null;return(0,s.jsx)(hp,{animateBlockEntrance:Y,backgroundBefore:ye,block:pe,className:le,color:C,courseTitle:g,defaultBackgroundColor:U5,enableVideoPlaybackSpeed:x,hideBlock:G,index:Se,isLastBlock:!1,isOnlyBlockInStep:$,labels:d,lessonId:l,lessonProgress:f,loadMedia:e,match:void 0,onContinue:y,partnerContent:h,prefersKeyboardNavigation:n,previewType:o},pe.blockId)}),ee=K?.isOverlay?(0,s.jsxs)("div",{className:Bt("composition",{overlay:!0,bleed:!0}),children:[(0,s.jsx)("div",{className:Bt("composition-image"),children:J}),(z||F)&&(0,s.jsxs)("div",{className:Bt("composition-overlay-text"),children:[z&&(0,s.jsx)(Ie,{className:D,tagName:"h1",value:E}),F&&(0,s.jsx)(Ie,{className:Bt("lesson-description").toString(),value:w})]})]}):K?(0,s.jsx)("div",{className:Bt("composition",{bleed:K.isFullBleed,"image-left":K.imagePosition==="left","image-right":K.imagePosition==="right"}),children:(q?["image","text"]:["text","image"]).map(oe=>oe==="image"?(0,s.jsx)("div",{className:Bt("composition-image"),children:J},"image"):(0,s.jsx)("div",{className:Bt("composition-text"),children:_},"text"))}):(0,s.jsxs)(s.Fragment,{children:[_,(0,s.jsx)("div",{className:Bt("blocks-container"),children:J})]}),re=(0,s.jsxs)("div",{className:B,children:[(0,s.jsx)("div",{className:H,ref:r,children:ee}),(0,s.jsx)(pre,{})]});return j?(0,s.jsx)(vre,{children:re}):(0,s.jsx)("div",{className:k,style:{top:L},children:re})};var kre=p(27009),Ire=p.n(kre);const G5=V("blocks-slide-indicator-tooltip"),Ere=({disabled:e,left:t,ref:n,text:o,top:r,visible:a})=>{let i=(0,s.jsx)("span",{"aria-hidden":"true",children:o});return e&&(i=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ie,{classNameIcon:G5("icon"),name:"lock"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"(locked content)"})]})),(0,s.jsx)("div",{"aria-hidden":!a,className:G5("wrapper",{disabled:e,visible:a}),ref:n,role:"tooltip",style:{left:t,top:r},children:i})},Au=V("blocks-slide-indicator"),Nre=({active:e,blockNavigationStyle:t,disabled:n,numberOfSlides:o,onKeyDown:r,onClick:a,ref:i,slideIndex:c})=>{const{prefersKeyboardNavigation:l}=Hi()??{},[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(),v=(0,u.useRef)(null),C=(0,u.useRef)(null),g=(0,u.useRef)(void 0),x=t===P0.NUMBERS,b=c+1,L=`${b} / ${o}`,S=e?`Step ${b} of ${o}, current step`:`Go to step ${b} of ${o}`,y=(0,u.useRef)(null);y.current||=document.getElementById("portal");const T=(0,u.useCallback)(()=>{if(v.current&&C.current){const B=v.current.getBoundingClientRect(),D=C.current.getBoundingClientRect(),H=B.left-D.width-18,$=Math.round(B.top-D.height/2+B.height/2);f({left:H,top:$})}},[]),k=(0,u.useCallback)(()=>{g.current=setTimeout(()=>{T(),h(!0)},300)},[T]),I=(0,u.useCallback)(()=>{clearTimeout(g.current),h(!1)},[]),E=(0,u.useCallback)(()=>{a(c)},[a,c]),w=(0,u.useCallback)(B=>{fn(B)&&h(!1),r(B)},[r]),A=(0,u.useCallback)(()=>{k()},[k]),N=(0,s.jsx)(Ere,{disabled:n,left:m?.left,ref:C,text:L,top:m?.top,visible:d}),R=Au("button",{active:e,disabled:n,numbers:x}),M=Au("wrapper"),P=Au("circle",{active:e,disabled:n}),j=Au("number",{active:e,disabled:n}),O=x?(0,s.jsx)("span",{"aria-hidden":"true",className:j,children:b}):(0,s.jsx)(ie,{classNameIcon:P,name:"circle-solid"});return(0,s.jsxs)("div",{className:M,ref:i,children:[(0,s.jsx)("button",{"aria-current":e?"page":void 0,"aria-disabled":n,"aria-label":S+(n?" (unavailable until previous content is completed)":""),className:R,"data-control":"",onBlur:I,onClick:n?void 0:E,onFocus:l?A:void 0,onKeyDown:w,onMouseEnter:k,onMouseLeave:I,ref:v,type:"button",children:O}),y.current&&(0,Es.createPortal)(N,y.current)]})},Or=V("blocks-slide-controls"),W5=38,jre=8,wre=({activeSlideIndex:e,blockNavigationStyle:t,numberOfSlides:n,onGoToCover:o,onSlideClick:r,slideDisabledState:a,previewType:i})=>{const c=(0,u.useRef)(null),l=(0,u.useRef)(null),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),v=(0,u.useCallback)(b=>{let L=!1,S=-1;if(vr(b)||Ks(b)){if(e-1>=0)S=e-1;else{o();return}L=!0}else Cr(b)||Qs(b)?(e+1<=n-1&&(S=e+1),L=!0):m2(b)?(S=0,L=!0):h2(b)&&(S=n-1,a[S]&&(S=a.findLastIndex(y=>!y)),L=!0);S>=0&&!a[S]&&r(S),L&&(b.stopPropagation(),b.preventDefault())},[e,n,o,r,a]);(0,u.useEffect)(()=>{const b=c.current,L=l.current;if(b&&L){const S=b.getBoundingClientRect(),y=L.getBoundingClientRect(),T=S.bottom-W5,k=S.top+W5;y.bottom>T?b.scrollBy({top:y.bottom-T,left:0,behavior:"smooth"}):y.top<k&&b.scrollBy({top:y.top-k,left:0,behavior:"smooth"})}},[e]);const C=(0,u.useCallback)(()=>{const b=c.current;b&&(h(b.scrollTop>jre),f(b.clientHeight+b.scrollTop<b.scrollHeight))},[]);(0,Pd.A)(C);const g=(0,u.useCallback)(ou()(C,100),[C]);yd(c.current,C);const x=Or({"touch-preview":qi(i)});return(0,s.jsx)("div",{className:x,children:(0,s.jsx)("div",{className:Or("page-control-wrapper"),children:(0,s.jsxs)("div",{className:Or("page-control-inner-wrapper"),children:[(0,s.jsx)("div",{className:Or("page-control"),onScroll:g,ref:c,children:(0,s.jsx)("div",{className:Or("slide-dot-wrapper"),children:Ire()(b=>{const L=b===e;return(0,s.jsx)(Nre,{active:L,blockNavigationStyle:t,disabled:a[b],numberOfSlides:n,onClick:r,onKeyDown:v,ref:L?l:null,slideIndex:b},b)},n)})}),(0,s.jsx)("div",{className:Or("overlay-top",{visible:d})}),(0,s.jsx)("div",{className:Or("overlay-bottom",{visible:m})})]})})})};var Tc=p(82920);const Are=50,Rre=1e3,Pre=({onSwipeDownHandler:e,onSwipeUpHandler:t,target:n,timeoutDuration:o=Rre})=>{const[r,a]=Tc.useState(!1),i=Tc.useRef(void 0),c=Tc.useCallback(()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>a(!1),o)},[o]),l=Tc.useCallback(d=>{const h=Math.abs(d.deltaY);if(r)h<Are?(i.current&&clearTimeout(i.current),a(!1)):c();else if(h>100){const m=d.deltaY>0?e:t;a(!0),c(),m()}},[c,r,e,t]);Tc.useEffect(()=>{if(!(!n||!t||!e))return n.addEventListener("wheel",l,{passive:!0}),()=>{i.current&&clearTimeout(i.current),n?.removeEventListener?.("wheel",l,{passive:!0})}},[e,t,l,n])},Mre="rise-presenter-sync",s1e="presenterMode",Ore="slide",Bre="NAVIGATE_TO_SLIDE",Dre="SLIDE_CHANGE",o1e="PRESENTER_VIEW_EXIT";function Fre(e){const t=new URLSearchParams(e).get(Ore);if(t==null)return 0;const n=Number(t);return Number.isFinite(n)&&n>=0?n:0}function Hre(){const e=window.location.hash.split("?")[1]||"";return Fre(e)}var r1e;const Dt=V("lesson-one-page-slides"),$re=V("page-wrap"),Ru=e=>e,K5=100,Vre=e=>{if(e!=null&&"blockNavigationStyle"in e){const t=e.blockNavigationStyle;return typeof t=="string"?t:void 0}};function Ip(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase(),n=e.getAttribute("type"),o=e.getAttribute("role"),r=e.tabIndex,a=t==="button"||["div","span"].includes(t)&&(o==="button"||r===0),i=t==="input"&&["radio","text"].includes(n??"")||t==="textarea"||o==="radio",c=["audio","video"].includes(t),l=o==="tab",d=document.querySelector(".quiz-card__interactive")?.contains?.(e)??!1;return a||i||c||l||d}const zre=["button","checkbox","color","file","hidden","image","radio","range","reset","submit"];function Q5(e){if(Ip(e))return!0;if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase(),n=e.getAttribute("role"),o=e.getAttribute("type");return e.isContentEditable||n==="textbox"||t==="input"&&!zre.includes(o??"")||(n==="slider"||n==="spinbutton"||t==="input"&&o==="range")}const Y5=(e,t)=>(n,o,r)=>J6(n,r.slice(0,-1),e,void 0,t),_re=(e,t)=>({disabled:n,slides:o},r)=>{const a=r.filter(d=>e[d.id]!=null).map(d=>({...d,...e[d.id]})),i=r[r.length-1],c=n||Zte(a)||Xte(a,t),l={blocks:a,lastBlock:i,disabled:n};return{disabled:c,slides:[...o,l]}},Pu=e=>{let t=!1,n=!1;if(e){const{clientHeight:o,scrollHeight:r,scrollTop:a}=e,i=Math.max(0,a),c=r-i;t=c===r,n=c-5<=o}return{isAtTop:t,isAtBottom:n}},Ure=/,? +/,Gre=[],Wre=({lessonProgress:e,prefersKeyboardNavigation:t,previewType:n})=>{const{announcePolite:o,clearAnnouncements:r}=ys(),a=(0,u.useRef)(null),i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=(0,u.useRef)(null),f=(0,u.useRef)(null),v=(0,u.useRef)(null),C=(0,u.useRef)(null),g=(0,u.useRef)(0),x=(0,u.useRef)(0),b=Xt(),L=tt(),[S,y]=(0,u.useState)(()=>Hre()),[T,k]=(0,u.useState)(!0),[I,E]=(0,u.useState)(!1),w=(0,Oe.A)(T),A=(0,Oe.A)(I),N=(0,u.useRef)(void 0),R=jn(),{lessons:M,...P}=ce()||{},j=ei(P),O=R||j?.01:600,B=Vre(P?.theme)||P0.DOTS,D=M?.[0],H=D?.items||Gre,$=(0,u.useCallback)(()=>{const me=(c.current?.scrollHeight??0)>(c.current?.clientHeight??0),{isAtBottom:ot}=Pu(c.current),St=me&&!T&&!ot;St!=I&&E(St)},[I,T]);yd(a.current,$),(0,u.useLayoutEffect)($,[T]);const W=(0,u.useCallback)(()=>{c.current?.scrollTo({top:0})},[]),U=P?.theme,Z=(0,u.useMemo)(()=>{const St=fp([],H,e,U).map(Y5(e,U)).filter(Ms=>Ms!==null);return Object.fromEntries(St.map(Ms=>[Ms.blockId,Ms]))},[H,e,U]),ne=(0,u.useCallback)(me=>{const ot={disabled:!1,slides:[]},{slides:St}=me.reduce(_re(Z,e),ot);return St},[Z,e]),Q=(0,u.useMemo)(()=>j?(M??[]).filter(me=>me?.type==="slide"):[],[j,M]),z=(0,u.useMemo)(()=>j?Q.map(me=>{const ot=me.items.map(Y5(e,U));return{blocks:ot,lastBlock:ot[ot.length-1],lessonTitle:me?.title,lessonDescription:me?.description,shouldShowTitle:dre(me),shouldShowDescription:hre(me),shouldShowAnimation:me?.experiments?.showAnimation??!0,imageTextLayout:$5(me),titleVariant:fre(me),disabled:!1}}):l0(H,Hte,ne),[j,Q,H,ne,e,U]),F=(0,u.useMemo)(()=>z.map(me=>me.disabled),[z]);(0,u.useEffect)(()=>{g.current=S},[S]),(0,u.useEffect)(()=>{x.current=z.length,z.length>0&&S>=z.length&&y(z.length-1)},[z.length,S]),(0,u.useEffect)(()=>{if(!j)return;const me=Q[S];me&&(Tg(me.id),L(Jc(me.id)))},[S,j,Q,L]),(0,u.useEffect)(()=>{if(!(!j||typeof BroadcastChannel>"u"))try{v.current||(v.current=new BroadcastChannel(Mre));const me=v.current,ot=St=>{if(St.data.type===Bre){const Ms=St.data.slideIndex,Op=Math.min(Ms,x.current-1);if(Op>=0){const Iie=Op<g.current?es.DOWN:es.UP;L(mr(Iie)),C.current&&C.current(Op)}}};return me.addEventListener("message",ot),()=>{me.removeEventListener("message",ot)}}catch{}},[j,L,b]),(0,u.useEffect)(()=>{if(!(!j||!v.current))try{v.current.postMessage({type:Dre,slideIndex:S})}catch{}},[j,S]),(0,u.useEffect)(()=>()=>{v.current?.close(),v.current=null},[]);const _=z.length,K=_>0?Math.min(S,_-1):0,Y=z[K],q=qi(n),J=B!==P0.NONE,ee=S===_-1,re=e?.isComplete,oe=I||ee?!re||!0:F[S+1],Se=!I&&!ee,G=Se&&!oe,le=ee&&!0,ve=(0,Oe.A)(le),pe=I&&!ee,be=(0,u.useCallback)(Yd()($,100),[$]);(0,u.useEffect)(()=>{const me=c.current;return me?.addEventListener("scroll",be,{passive:!0}),()=>me?.removeEventListener("scroll",be)},[be]),(0,u.useEffect)(()=>{document.activeElement===h.current?!A&&I?d.current?.focus({preventScroll:!0}):!ve&&le&&m.current?.focus({preventScroll:!0}):document.activeElement===d.current&&A&&!I&&h.current?.focus({preventScroll:!0})},[I,A,ve,w,le,T]),(0,Joe.A)(()=>{cy(),N.current=setTimeout(()=>{k(!1),c.current?.focus?.()},O+K5)},()=>{clearTimeout(N.current)});const ye=(0,u.useCallback)(me=>{const ot=a.current?.getBoundingClientRect()?.top??0;L(l7(ot));const St=Math.max(0,Math.min(me,z.length-1));y(St),W()},[L,W,z.length]),ge=(0,u.useCallback)(()=>{T||(k(!0),Js(()=>{b("/")},"lesson-to-one-page-cover-stepped"))},[b,T]),it=P?.exportSettings?.webExportSettings,Ft=j||!!(!Ls.isInstantLink&&(P?.lmsOptions?.disableCoverPage||it?.disableCoverPage)),Pn=(0,u.useCallback)(Ft?()=>{L(mr(es.DOWN)),ye(0)}:ge,[Ft,ye,ge,L,mr]);(0,u.useEffect)(()=>{C.current=ye},[ye]);const Ht=(0,u.useCallback)(()=>{T||(S>0?(L(mr(es.DOWN)),ye(S-1)):ge())},[ye,L,S,T,ge]),It=(0,u.useCallback)(()=>{T||(L(mr(es.UP)),ye(S+1))},[ye,L,b,ee,S,T]),Go=(0,u.useCallback)(()=>{(S<_-1||ee&&!1)&&It()},[ee,S,_,It]),Qe=(0,u.useCallback)(()=>{const me=c.current?.scrollTop??0,ot=c.current?.clientHeight??0,St=R?"instant":"smooth";c.current?.scrollTo({top:me+ot,behavior:St})},[R]),Et=(0,u.useCallback)(()=>{It()},[It]),Ut=(0,u.useCallback)(()=>{Qe()},[Qe]),ln=(0,u.useCallback)(me=>{if(me===S||T)return;const ot=me<S?es.DOWN:es.UP;L(mr(ot)),ye(me),queueMicrotask(()=>{l.current?.querySelectorAll("[data-control]")?.[me]?.focus?.()})},[ye,L,S,T]),ke=(0,u.useCallback)(()=>k(!0),[]),Ke=(0,u.useCallback)(()=>{k(!1),setTimeout(()=>{if(i.current&&l.current?.contains?.(document.activeElement)){const me=lp()(i.current.innerText,{length:75,separator:Ure});r(),o(`Content preview: ${me}`)}else c.current?.focus?.()},0)},[o,r]),Sn=(0,u.useCallback)(()=>{if(q)return;const{isAtTop:me}=Pu(c.current);if(me){S===0?Pn():Ht();return}},[q,Ht,S,Pn]),Ln=(0,u.useCallback)(()=>{if(q||ee||oe)return;const{isAtBottom:me}=Pu(c.current);if(me){Et();return}},[ee,oe,q,Et]),Dr=(0,u.useCallback)(()=>{const{isAtBottom:me,isAtTop:ot}=Pu(c.current),St=document.documentElement.clientWidth===window.innerWidth;return(me||ot)&&St},[]),zu=(0,u.useCallback)(me=>{!l.current?.contains?.(document.activeElement)&&!Ip(me.target)&&Sn()},[Sn]),yie=(0,u.useCallback)(me=>{!l.current?.contains?.(document.activeElement)&&!Ip(me.target)&&Ln()},[Ln]),Sie=(0,u.useCallback)(me=>{j&&!l.current?.contains?.(document.activeElement)&&!Q5(me.target)&&Sn()},[j,Sn]),Lie=(0,u.useCallback)(me=>{j&&!l.current?.contains?.(document.activeElement)&&!Q5(me.target)&&Ln()},[j,Ln]),_u=(0,u.useCallback)(me=>{me===-1||me===S||(L(mr(me>S?es.UP:es.DOWN)),ye(me))},[ye,L,S]),Pp=(0,u.useCallback)(me=>{const ot=Q.findIndex(({id:St})=>String(St)===me.detail.lessonId);_u(ot)},[_u,Q]),Mp=(0,u.useCallback)(me=>{const ot=z.findIndex(St=>St.blocks.some(Ms=>("blockId"in Ms?Ms.blockId:Ms.id)===me.detail.itemId));_u(ot)},[_u,z]);(0,u.useEffect)(()=>(window.addEventListener(Uh,Pp),window.addEventListener(Ue,Mp),()=>{window.removeEventListener(Uh,Pp),window.removeEventListener(Ue,Mp)}),[Mp,Pp]),(0,wu.A)("ArrowUp",Ru,zu),(0,wu.A)("ArrowDown",Ru,yie),(0,wu.A)("ArrowLeft",Ru,Sie),(0,wu.A)("ArrowRight",Ru,Lie),Pre({target:c.current,onSwipeUpHandler:Sn,onSwipeDownHandler:Ln,timeoutDuration:O+K5});const Tie=Dt("gradient",{visible:I}),kie=(0,s.jsxs)("nav",{"aria-label":"Slide navigation",className:Dt("presentation-controls"),ref:l,children:[(0,s.jsxs)("button",{"aria-disabled":S===0&&Ft,className:Dt("presentation-btn"),onClick:S===0&&Ft?void 0:Ht,type:"button",children:[(0,s.jsx)(ie,{classNameIcon:Dt("presentation-arrow-icon"),name:"chevron-left"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),(0,s.jsx)("span",{"aria-hidden":!0,className:Dt("counter"),children:`${S+1} / ${_}`}),(0,s.jsxs)("button",{"aria-disabled":!G,className:Dt("presentation-btn"),onClick:G?Et:void 0,ref:h,type:"button",children:[(0,s.jsx)(ie,{classNameIcon:Dt("presentation-arrow-icon"),name:"chevron-right"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"Go to next step"})]})]});return(0,s.jsx)("div",{className:Dt({}),children:(0,s.jsx)("div",{className:$re({transitioning:T}),id:"page-wrap",ref:c,tabIndex:-1,children:(0,s.jsx)("div",{className:"page","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper",children:(0,s.jsx)("div",{className:"page__content",children:(0,s.jsx)(xr,{children:(0,s.jsxs)("div",{"data-lesson-id":D?.id,children:[j?kie:(0,s.jsxs)("nav",{"aria-label":"Step navigation",className:Dt("controls",{"touch-preview":q}),ref:l,children:[(0,s.jsxs)("button",{"aria-disabled":S===0&&Ft,"aria-hidden":S===0&&Ft,className:Dt("prev-btn",{"touch-preview":q}),onClick:Ht,type:"button",children:[(0,s.jsx)(ie,{classNameIcon:Dt("arrow-icon",{"touch-preview":q}),name:"arrow-up"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),J&&(0,s.jsx)(wre,{activeSlideIndex:S,blockNavigationStyle:B,numberOfSlides:_,onGoToCover:ge,onSlideClick:ln,previewType:n,slideDisabledState:F}),(0,s.jsxs)("div",{className:Dt("next-btns"),children:[(0,s.jsxs)("button",{"aria-disabled":!pe,"aria-hidden":!pe,className:Dt("page-down-btn",{"touch-preview":q}),onClick:pe?Ut:void 0,ref:d,tabIndex:pe?void 0:-1,type:"button",children:[(0,s.jsx)(ie,{classNameIcon:Dt("arrow-icon",{"touch-preview":q}),name:"arrow-down"}),(0,s.jsxs)("span",{className:"visually-hidden-always",children:["Scroll page down",!I&&(0,s.jsx)("span",{children:"(disabled because this is the bottom of the page)"}),ee&&(0,s.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,s.jsxs)("button",{"aria-disabled":oe,"aria-hidden":!Se,className:Dt("next-btn",{"touch-preview":q}),onClick:oe?void 0:Et,ref:h,tabIndex:ee?-1:void 0,type:"button",children:[(0,s.jsx)(ie,{classNameIcon:Dt("arrow-icon",{"touch-preview":q}),name:"arrow-down"}),(0,s.jsxs)("span",{className:"visually-hidden-always",children:["Go to next step",oe&&(0,s.jsx)("span",{children:"(disabled until content is completed)"}),ee&&(0,s.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,s.jsxs)("button",{"aria-disabled":!le,"aria-hidden":!le,className:Dt("restart-btn",{"touch-preview":q}),onClick:le?Pn:void 0,ref:m,tabIndex:ee?void 0:-1,type:"button",children:[(0,s.jsx)(ie,{classNameIcon:Dt("restart-icon",{"touch-preview":q}),name:"arrow-rotate-left"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"Restart"})]})]})]}),(0,s.jsxs)(kd,{onShouldRecognizeGesture:Dr,onSwipeDown:Sn,onSwipeUp:Ln,children:[(0,s.jsx)("main",{"aria-describedby":"step-counter",ref:i,tabIndex:0,children:(0,s.jsx)(Qo,{children:(0,s.jsx)(wc,{mountOnEnter:!0,nodeRef:f,onExited:Ke,onExiting:ke,timeout:O,unmountOnExit:!0,children:me=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"visually-hidden-always",id:"step-counter",ref:f,children:`Step ${S+1} of ${_}`}),(0,s.jsx)(Tre,{hasTransitioned:!T,onContinue:Go,prefersKeyboardNavigation:t,previewType:n,ref:a,slide:Y,transitionState:me})]})},S)})}),(0,s.jsx)("div",{className:Tie})]})]})})})})})})})},Kre=e=>!!e&&e.type==="videoCheckpoint"&&e.family==="videoCheckpoint"&&e.variant==="videoCheckpoint",Ep=1e3,Qre=3,Yre=/^\d+(?:\.\d+)?$/,Z5=/^\d+$/,Zre=/^\d{2}(?:\.\d{1,3})?$/,Mu=e=>{if(!Number.isFinite(e))return 0;const t=10**Qre;return Math.max(0,Math.round(e*t)/t)},Np=e=>e.toString().padStart(2,"0"),Xre=e=>e!=null&&typeof e=="object"?e.time:void 0,i1e=e=>{const t=Math.round(Mu(e)*Ep),n=Math.floor(t/36e5),o=Math.floor(t%36e5/6e4),r=Math.floor(t%6e4/1e3),a=t%Ep,i=a===0?"":`.${a.toString().padStart(3,"0")}`;return n>0?`${n}:${Np(o)}:${Np(r)}${i}`:`${Math.floor(t/6e4)}:${Np(r)}${i}`},qre=e=>{const t=e.split(":");if(t.length!==2&&t.length!==3)return null;const[n,o,r]=t.length===3?[t[0],t[1],t[2]]:[null,t[0],t[1]];if(n!=null&&!Z5.test(n)||!Z5.test(o)||!Zre.test(r))return null;const a=n==null?0:Number.parseInt(n,10),i=Number.parseInt(o,10),[c,l=""]=r.split("."),d=Number.parseInt(c,10);if(t.length===3&&i>=60||d>=60)return null;const h=l.length===0?0:Number.parseInt(l.padEnd(3,"0"),10)/Ep;return Mu(a*3600+i*60+d+h)},c1e=e=>{const t=e.trim();return t.length===0?null:Yre.test(t)?Mu(Number.parseFloat(t)):qre(t)},co=e=>{const t=e!=null&&"checkpoint"in e?e.checkpoint:e;if(t==null||typeof t!="object")return"timestamp";const n=Reflect.get(t,"settings");if(n==null||typeof n!="object")return"timestamp";const o=Reflect.get(n,"placement");return o==="start"||o==="end"?o:"timestamp"},l1e=e=>co(e)!=="timestamp",d1e=e=>e==="timestamp"?{}:{placement:e},lo=e=>{let t;e!=null&&"checkpoint"in e?t=Xre(e.checkpoint):e!=null&&"time"in e&&(t=e.time);const n=typeof t=="number"?t:Number.parseFloat(String(t));return Mu(n)},Jre=null,u1e=e=>e.family==="interactive-fullscreen"||e.family==="360"?!1:!(e.family==="multimedia"&&Jre.has(e.variant)),Ou=(e,t,n)=>{if(e==null||typeof e!="object")return n;const o=Reflect.get(e,t);return typeof o=="string"&&o.trim().length>0?o:n},eae=(e,t)=>{if(typeof e=="string"){const n=e.trim();if(n.length>0)return n}return t},tae=e=>{const t=e.filter(o=>co(o)==="timestamp").map((o,r)=>({id:o.checkpoint.id,time:lo(o),documentIndex:r})).sort((o,r)=>o.time-r.time||o.documentIndex-r.documentIndex),n=new Map;return t.forEach((o,r)=>{n.set(o.id,r+1)}),n},nae=e=>[...new Set(e.filter(t=>co(t)==="timestamp").map(t=>lo(t)))].sort((t,n)=>t-n),h1e=(e,t)=>{const n=[...e].sort((o,r)=>lo(o)-lo(r)).find(o=>lo(o)>t);return{insertBeforeItemId:n?.checkpoint.id??null,insertAtEnd:n==null}},sae=e=>{const t=e[0]??null,n=t==null?e:e.slice(1),o=[],r=[];let a=null;n.forEach(c=>{if(Kre(c)){a!=null&&r.push(a),a={checkpoint:c,blocks:[]};return}if(a!=null){a.blocks.push(c);return}o.push(c)}),a!=null&&r.push(a);const i=r.length===0?e:[...t==null?[]:[t],...o];return{videoBlock:t,leadingBlocks:o,checkpointGroups:r,inlineBlocks:i}},kc=V("video-checkpoint-player");function oae({activeGroup:e,animateBlockEntrance:t,checkpointGroups:n,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,hasQueuedCheckpoints:l=!1,labels:d,lessonId:h,lessonProgress:m,loadMedia:f,onCheckpointCompleted:v,partnerContent:C,prefersKeyboardNavigation:g,previewType:x}){const b=(0,je.g)(),L=(0,u.useMemo)(()=>({params:b}),[b]),S=(0,u.useRef)(!1),y=(0,u.useMemo)(()=>tae(n),[n]),T=(0,u.useCallback)(()=>{e==null||S.current||(S.current=!0,v?.(e))},[e,v]);if((0,u.useEffect)(()=>{e!=null&&(S.current=!1)},[e]),e==null)return null;const k=lo(e),I=nc(k),E=co(e),w=E!=="timestamp",A=y.get(e.checkpoint.id),N=w?Ou(d,E==="start"?"videoCheckpointStart":"videoCheckpointDone",E==="start"?"Start video":"Done"):`${d?.videoCheckpointDefaultTitle||"Checkpoint"} ${A??""}`,R=eae(e.checkpoint?.title,N),M=e.blocks??[];let P;l?P=Ou(d,"videoCheckpointContinue","Continue"):E==="start"?P=Ou(d,"videoCheckpointStart","Start video"):E==="end"?P=Ou(d,"videoCheckpointDone","Done"):P=d?.videoCheckpointResume||"Resume video";const j=R;return(0,s.jsx)(md,{className:kc(),darkOverlay:!0,"data-testid":"video-checkpoint-overlay",footer:(0,s.jsxs)("button",{"aria-label":`${P} \u2014 ${R}`,className:kc("resume"),onClick:T,type:"button",children:[P,(0,s.jsx)(qh,{className:kc("resume-icon"),decorative:"true"})]}),heading:j,onClose:T,subText:w?void 0:`${d?.videoCheckpointPausedAt||"Paused at"} ${I}`,children:(0,s.jsx)("div",{className:kc("blocks"),"data-testid":"video-checkpoint-content",children:M.length===0?(0,s.jsx)("p",{className:kc("empty"),children:d?.videoCheckpointNoContent||"No content added to this checkpoint."}):M.map((O,B)=>(0,s.jsx)(hp,{animateBlockEntrance:t,block:{...O,blockId:O.id},color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,hideBlock:!1,index:B,isLastBlock:B===M.length-1,labels:d,lessonId:h,lessonProgress:m,loadMedia:f,match:L,onContinue:qt,partnerContent:C,prefersKeyboardNavigation:g,previewType:x},`checkpoint-overlay-${O.id}`))})})}const X5=(e,t,n)=>{Dn(I2({event:e,properties:{checkpoint_id:t.checkpoint.id,checkpoint_time:lo(t),checkpoint_placement:co(t),lesson_id:n}}))},rae=e=>e?.containerElement?.querySelector("video")??null;function aae(e,t){const n=(0,u.useRef)(null),[o,r]=(0,u.useState)(null),a=(0,u.useRef)([]),[i,c]=(0,u.useState)(!1),{startGroups:l,endGroups:d}=(0,u.useMemo)(()=>{const y=[],T=[];return e.forEach(k=>{const I=co(k);I==="start"?y.push(k):I==="end"&&T.push(k)}),{startGroups:y,endGroups:T}},[e]),h=(0,u.useMemo)(()=>nae(e),[e]),m=(0,u.useCallback)(y=>{co(y)==="timestamp"&&n.current?.seekToTime?.(lo(y)),n.current?.pause?.(),r(y),X5("Video Checkpoint Viewed",y,t)},[t]),f=(0,u.useCallback)(y=>{if(y.length===0)return;const[T,...k]=y;a.current=k,c(k.length>0),m(T)},[m]),v=(0,u.useCallback)(y=>{X5("Video Checkpoint Completed",y,t);const T=a.current.shift();if(T!=null){c(a.current.length>0),m(T);return}c(!1),r(null),co(y)!=="end"&&n.current?.play?.()},[t,m]),C=(0,u.useRef)(!1);(0,u.useEffect)(()=>{C.current||l.length===0||(C.current=!0,f(l))},[l,f]);const g=(0,u.useRef)(d);g.current=d;const x=(0,u.useRef)(null),b=(0,u.useRef)(null),L=(0,u.useRef)(!1);return{contextValue:(0,u.useMemo)(()=>({checkpointMarkerTimes:h,setVideoPlayerRef:y=>{n.current=y,x.current!=null&&b.current!=null&&(x.current.removeEventListener("ended",b.current),x.current=null,b.current=null);const T=rae(y);if(T!=null){const k=()=>{L.current||(L.current=!0,f(g.current))};T.addEventListener("ended",k),x.current=T,b.current=k}},onCheckpointReached:y=>{const T=e.filter(k=>co(k)==="timestamp"&&lo(k)===y);f(T)}}),[h,e,f]),activeCheckpointGroup:o,hasQueuedCheckpoints:i,handleCheckpointCompleted:v}}function iae({animateBlockEntrance:e,checkpointGroups:t,children:n,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,labels:l,lessonId:d,lessonProgress:h,loadMedia:m,partnerContent:f,prefersKeyboardNavigation:v,previewType:C}){const{contextValue:g,activeCheckpointGroup:x,hasQueuedCheckpoints:b,handleCheckpointCompleted:L}=aae(t,d);return(0,s.jsxs)(KY,{value:g,children:[n,t.length>0&&(0,s.jsx)(oae,{activeGroup:x,animateBlockEntrance:e,checkpointGroups:t,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,hasQueuedCheckpoints:b,labels:l,lessonId:d,lessonProgress:h,loadMedia:m,onCheckpointCompleted:L,partnerContent:f,prefersKeyboardNavigation:v,previewType:C})]})}const cae=iae;function lae(e){const{inlineBlocks:t,checkpointGroups:n}=(0,u.useMemo)(()=>sae(e.blocks),[e.blocks]);return(0,s.jsx)(cae,{...e,checkpointGroups:n,children:(0,s.jsx)(pp,{...e,blocks:t})})}const dae=lae,q5=V("blocks-lesson-restart-button"),uae=({className:e,onClick:t})=>{const n=q5.mix(e);return(0,s.jsx)("button",{className:n,onClick:t,type:"button",children:(0,s.jsx)(ie,{classNameIcon:q5("icon"),name:"arrow-rotate-left"})})},Qa=V("one-page-authors");function hae({className:e}){const t=Ce(),n=yC(),o=eN(),r=qO();if(!o)return null;const a=n?.isPartnerContentAuthor&&r!=null,i=Qa({}).mix(e);return a?(0,s.jsx)("div",{className:i,children:(0,s.jsx)("ul",{className:Qa("list"),role:"list",children:r.map((c,l)=>(0,s.jsxs)("li",{className:Qa("item"),role:"listitem",children:[(0,s.jsx)(J5,{avatarUrl:c?.image?bi({width:76,height:76,imageKey:c.image}):void 0}),(0,s.jsx)(e4,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:c?.name})]},l))})}):(0,s.jsxs)("div",{className:i,children:[(0,s.jsx)(J5,{avatarUrl:mt(o.avatar)}),(0,s.jsx)(e4,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:o.authorName})]})}function J5({avatarUrl:e}){return e?(0,s.jsx)("div",{className:Qa("avatar"),style:{backgroundImage:`url(${e})`}}):(0,s.jsx)("div",{className:Qa("avatar-fallback"),children:(0,s.jsx)(vm,{decorative:!0})})}function e4({a11yAuthorPrefix:e,name:t}){const n=t||"Unknown User",o=Qa("name");return(0,s.jsxs)("div",{className:o.toString(),children:[(0,s.jsx)("span",{className:"visually-hidden-always",children:e}),(0,s.jsx)("span",{children:n})]})}const t4=hae,mae=V("one-page-title"),n4=({className:e,htmlId:t})=>{const n=ce(),o=Re(n?.title),r=ha("title"),a=(0,Gt.uW)(n?.title)?{"data-l10n-id":n?.title?.l10nId}:{"data-change-path":r},i=mae({}).mix(e);return(0,s.jsx)("h1",{...a,className:i,id:t,tabIndex:-1,children:o})},Ic=V("one-page-lesson-header-info");function fae(){const e=ce(),t=Ic({});return(0,s.jsxs)("div",{className:t,children:[(H1(e)||m0(e))&&(0,s.jsx)(jm,{className:Ic("logo"),imageClassName:Ic("logo-image")}),(0,s.jsx)(n4,{className:Ic("title").toString()}),(0,s.jsx)(t4,{className:Ic("authors").toString()})]})}const pae=fae,Bu=V("one-page-lesson-header"),gae=V("page"),vae=Bu("main").mix("lesson-header__main"),Cae=Bu("container").mix(gae("header-container")),xae=()=>{const e=ce(),t=ut(),n=e?.coverPageType,{alpha:o,ariaLabel:r,media:a,role:i}=Sr("coverImage"),c=e?.theme?.coverImageColor,l=n===de.WHITE,d=n===de.IMAGE,h=n===de.ACCENT,m=n===de.VIDEO,f=c===rt.LIGHT,v=Bu({accent:h,image:d,white:l||m,video:m,"overlay-light":d&&f}),C=d?ea({alpha:o,color:c??void 0,media:a})??void 0:void 0;return(0,s.jsxs)("header",{className:v,children:[d&&C&&(0,s.jsx)("div",{"aria-label":r,className:Bu("background-image"),role:i,style:C}),(0,s.jsx)("div",{className:Cae,children:(0,s.jsx)("div",{className:vae,children:(0,s.jsx)(pae,{})})}),t===te.APEX&&(0,s.jsx)(Tr,{coverPageType:"LEFT"})]})},bae=V("lesson-one-page-scroll"),yae=({previewType:e,prefersKeyboardNavigation:t,lessonProgress:n})=>{const o=(0,u.useRef)(null),[r,a]=(0,u.useState)(!1),{lessons:i,...c}=ce(),{lmsOptions:l}=c,d=Jr(),h=Ce(),m=Xt(),f=i?.[0],v=f?.type==="blocks"?f:void 0,C=f?.id??"",g=Ii(),x=v?.items??[],b=n?.type==="blocks"?n:void 0,L=h0(c),S=m0(c),y=L?dae:pp,T=n?.isComplete&&!0&&!L&&!S,k=n?.isComplete&&!1,I=c?.exportSettings?.webExportSettings,E=!Ls.isInstantLink&&(l?.disableCoverPage||I?.disableCoverPage),w=(0,u.useCallback)(()=>{r||(E?o.current?.scrollTo({top:0,behavior:jn()?"instant":"smooth"}):(a(!0),Js(()=>{m("/")},"lesson-to-one-page-cover-continuous").finally(()=>{a(!1)})))},[m,E,r]);return(0,s.jsx)("div",{className:bae(),children:(0,s.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:o,children:(0,s.jsx)("div",{className:"page","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,s.jsxs)(yu,{lessonId:C,children:[(0,s.jsx)(xae,{}),(0,s.jsx)("div",{className:"page__content",children:(0,s.jsx)(xr,{children:(0,s.jsxs)("div",{"data-lesson-id":f?.id,children:[(0,s.jsx)(y,{animateBlockEntrance:c?.animateBlockEntrance,blocks:x,className:void 0,color:c?.color,courseTitle:d,enableVideoPlaybackSpeed:c?.enableVideoPlaybackSpeed,handleNavigate:void 0,handleStorylineFullscreen:void 0,isLessonEntering:void 0,isLessonExiting:void 0,labels:h,lessonId:C,lessonProgress:b,loadMedia:!0,nextLesson:void 0,partnerContent:g,prefersKeyboardNavigation:t,previewType:e}),T&&(0,s.jsx)(uae,{className:void 0,onClick:w}),k&&(0,s.jsx)(of,{lessonId:C})]})})})]})})})})})},s4=V("microlearning-progress-summary"),Sae=V("page-wrap"),Lae=({course:e,courseProgress:t,isStepped:n,lesson:o})=>{const r=(0,u.useRef)(null),a=(0,u.useRef)(null),[i,c]=(0,u.useState)(!1),l=s4("content",{stepped:n,mounted:i}).toString();return(0,Pd.A)(()=>{const d=(a.current?.clientHeight??0)+1;r.current?.scrollTo({top:d}),c(!0)}),(0,s.jsxs)("div",{className:Sae(),id:"page-wrap",ref:r,children:[(0,s.jsx)(rf,{className:s4("previous").toString(),lessonId:o?.id??"",ref:a}),(0,s.jsx)(D5,{contentClassName:l,course:e,courseProgress:t,lessonId:o?.id??""})]})},Tae=({isProgressSummary:e,lessonProgress:t})=>{const n=ce(),o=gr(),r=Hi()?.prefersKeyboardNavigation??!1,{previewType:a}=Ol(),i=n?.theme?.blockNavigationType===Qc.STEPPED;return e?(0,s.jsx)(Lae,{course:n,courseProgress:o,isStepped:i,lesson:void 0}):i?(0,s.jsx)(Wre,{lessonProgress:t,prefersKeyboardNavigation:r,previewType:a}):(0,s.jsx)(yae,{lessonProgress:t,prefersKeyboardNavigation:r,previewType:a})};var kae=p(82920);function o4(){const e=tt();return kae.useMemo(()=>({advanceQuizLessonToEnd:t=>e(UI(t)),submitQuizAnswer:t=>e(U0(t)),setQuizLessonTimeRemaining:t=>e(WI(t))}),[e])}const r4=-1,Iae="MULTIPLE_CHOICE";function Eae({allowedRetries:e,currentRetries:t}){return e===r4?!1:t>=e}function Nae({lesson:e,lessonProgress:t,getL10nRecursive:n,quizActions:o,reportAnswer:r}){if(!e||!tl(e))return;const a=e.settings??{},i=a.passToContinue??!1,c=Number(a.retryCount??r4),l=Object.values(t?.items??{}).filter(d=>!d.isComplete);if(l.length>0){const d=t?.retryAttempts??0,h=Eae({allowedRetries:c,currentRetries:d});l.forEach(m=>{const f=Sne({lesson:e,question:m});if(f){const v=f.type||Iae,C=n({duration:{startTime:0,stopTime:0},id:e.id,isCorrect:!1,isUnfinished:!0,item:{id:String(f.id||""),title:String(f.title||""),type:v},itemProgress:m,retryAttempts:d,title:e.title});r(C)}o.submitQuizAnswer({finalRetryAttempt:h,isCorrect:!1,itemId:m.id,lessonId:e.id,passToContinue:i})})}o.advanceQuizLessonToEnd(e.id)}var jae=p(82920);function wae({lesson:e,lessonProgress:t,getL10nRecursive:n}){const o=o4();return jae.useCallback(()=>{Nae({lesson:e,lessonProgress:t,getL10nRecursive:n,quizActions:o,reportAnswer:Lg})},[e,t,n,o])}var a4=p(82920);function Aae({children:e}){const t=gr(),n=hl(),o=At(n),r=No(n),a=gC(),{setQuizLessonTimeRemaining:i}=o4(),c=a4.useMemo(()=>r??{},[r]),l=wae({lesson:o,lessonProgress:c,getL10nRecursive:a}),d=a4.useMemo(()=>uC(o)?o.settings:void 0,[o]),h=!!d?.timer,m=d?.timerDuration;return(0,s.jsx)(wse,{courseProgress:t,currentLessonId:n,handleExpiredQuiz:l,isTimedQuiz:h,setQuizLessonTimeRemaining:i,timerDuration:m,children:e})}function Rae({lessonId:e}){const t=tt(),[n,o]=(0,u.useState)(null),r=Ce(),a=(0,u.useCallback)(c=>{c.target instanceof HTMLElement&&t(q0({offsetHeight:c.target.offsetHeight}))},[t]);(0,u.useLayoutEffect)(()=>{if(n)return t(q0({offsetHeight:n.offsetHeight})),()=>{t(q0(null))}},[t,n]),yd(n,a);const i=(0,u.useCallback)(()=>{Gx(e)},[e]);return(0,s.jsx)("button",{className:"visually-hidden btn-skip-to-lesson brand--ui",onClick:i,ref:o,type:"button",children:(0,s.jsxs)("span",{className:"btn-skip-to-lesson__wrap",children:[r?.courseSkipToLesson,(0,s.jsx)(ie,{"aria-hidden":"true",classNameIcon:"btn-skip-to-lesson__icon",name:"arrow-right"})]})})}var Pae=p(82920);const Mae=960,jp=V("transcript-panel"),Oae=e=>{const{currentLocale:t}=nt();return(0,u.useMemo)(()=>e?"mondrianTranscript"in e?typeof e.mondrianTranscript=="string"?e.mondrianTranscript:(t?e.mondrianTranscript[t]:void 0)??e.mondrianTranscript.default:"tmp"in e&&e.tmp?.audio?.transcript||e.audio?.transcript:null,[e,t])};function Bae({enhancedLabels:e,lessonId:t,questionBankActiveIndex:n}){const o=tt(),{audioPlayerIdOpen:r,focusing:a,refocusTarget:i,transcriptMedia:c}=Qi(),l=!!r,d=(0,u.useId)(),h=ue(z=>t?Si(t,z):null),f=t?.startsWith("question-bank-")?n:h?.type==="quiz"?h.activeIndex:void 0,v=kt(Mae),[C,g]=(0,u.useState)(0),[x,b]=(0,u.useState)(!1),[L,S]=(0,u.useState)(!1),y=(0,u.useRef)(!1),T=(0,u.useRef)(null),k=(0,u.useRef)(null),I=(0,u.useRef)(c),E=(0,u.useRef)(t),w=(0,u.useRef)(f),A=Ce()||e,N=(0,u.useRef)(null),R=(0,u.useRef)({panelHeight:0,startY:null,startHeight:null,startTime:null,velocity:null}),M=(0,u.useCallback)(z=>{const _=R.current.panelHeight,K=performance.now();S(!0);const Y=q=>{const J=q-K,ee=Math.min(J/300,1),re=1-Math.pow(1-ee,3),oe=_+(z-_)*re;g(oe),R.current.panelHeight=oe,ee<1?requestAnimationFrame(Y):(S(!1),b(!1),R.current={startY:null,startHeight:null,startTime:null,panelHeight:null,velocity:null})};requestAnimationFrame(Y)},[b,S,g]),P=(0,u.useCallback)(z=>{const{startTime:F,startY:_,startHeight:K}=R.current;if(!v||_===null)return;const Y=_-(z?.clientY??z?.touches?.[0]?.clientY??0),q=K+Y;if(g(q),R.current.panelHeight=q,F!==null){const J=performance.now()-F,ee=Y/J;R.current.velocity=ee}},[v]),j=(0,u.useCallback)(z=>{const{velocity:F}=R.current;if(!F)return;Object.assign(R.current,{startY:null,startHeight:null,startTime:null}),b(!1);const _=window.innerHeight*.66;let K;Math.abs(F)>.5?K=F>0?window.innerHeight:150:K=C>=_?window.innerHeight:150,M(K),z instanceof MouseEvent&&(window.removeEventListener("mousemove",P),window.removeEventListener("mouseup",j))},[M,C,P]),O=(0,u.useCallback)(z=>{!v||k.current.contains(z.target)||T.current.contains(z.target)||(Object.assign(R.current,{startY:z?.clientY??z?.touches?.[0]?.clientY??null,startHeight:N.current?.clientHeight??0,startTime:performance.now()}),b(!0),z.nativeEvent instanceof MouseEvent&&(window.addEventListener("mousemove",P),window.addEventListener("mouseup",j)))},[P,j,v,b]);(0,u.useEffect)(()=>{let z;const F=()=>{N?.current?.style&&(N.current.style.transition="none",N.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(Y=>{Y.style.transition="none"}))},_=()=>{clearTimeout(z),z=setTimeout(()=>{N?.current?.style&&(N.current.style.transition="",N.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(Y=>{Y.style.transition=""}))},200)};return window.addEventListener("resize",F),window.addEventListener("resize",_),()=>{window.removeEventListener("resize",F),window.removeEventListener("resize",_),clearTimeout(z)}},[]),(0,u.useEffect)(()=>{!l&&y.current&&g(0),a&&l&&N.current&&(N.current.focus(),o(_m({audioPlayerId:r,focusing:!1}))),y.current=l},[r,o,a,l]),(0,u.useEffect)(()=>{l&&c!==I.current&&(I.current=c)},[l,c]),(0,u.useEffect)(()=>{l&&E.current!==t&&o(Yi()),E.current=t},[t,l,o]),(0,u.useEffect)(()=>{l&&w.current!==f&&w.current!==void 0&&o(Yi()),w.current=f},[f,l,o]);const B={role:"button",tabIndex:0,onMouseDown:O,onTouchStart:O,onTouchEnd:j,onTouchMove:P},[D,H]=Pae.useState(!1),$=Re(D?I.current:c),W=Oae($);let U;l&&(U=Um(r));const Z=(0,u.useCallback)(()=>{const z=i??document.getElementById(bb(r));return z?(z.focus(),!0):!1},[r,i]),ne=(0,u.useCallback)(z=>{z.stopPropagation(),z.preventDefault(),o(Yi()),Z()},[o,Z]),Q=(0,u.useCallback)(z=>{r&&z.key==="Escape"&&ne(z)},[r,ne]);return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Os,{classNames:"transcript-panel",in:l,nodeRef:N,onEnter:()=>H(!1),onEntered:()=>H(!1),onEntering:()=>H(!1),onExit:()=>H(!0),onExited:()=>H(!1),onExiting:()=>H(!0),timeout:300,unmountOnExit:!0,children:(0,s.jsxs)("section",{"aria-hidden":!l,"aria-labelledby":d,className:jp({isOpen:l,isAnimatingMobileSwipe:L,isDragging:x}),id:U,onKeyDown:Q,ref:N,style:v&&l?{height:`${C/10}rem`,minHeight:C>0?"33vh":void 0}:{},tabIndex:-1,children:[(0,s.jsxs)("header",{...v?B:{},children:[(0,s.jsx)("h3",{id:d,ref:T,children:A?.audioTranscript}),(0,s.jsx)("button",{"aria-label":A?.audioHideTranscript,className:jp("close-button"),onClick:ne,ref:k,type:"button",children:(0,s.jsx)(ie,{name:"close"})})]}),(0,s.jsx)("section",{className:jp("transcript-text",{"not-available":!W}),children:W||A?.audioNoTranscriptAvailable})]})})})}var Ec=p(82920);const i4={FORWARD:"page-transition",BACK:"page-transition-back"},Du=({id:e,lessons:t})=>e==="progress-summary"?1/0:t.findIndex(n=>n.id===e),Dae=e=>{window.parent.postMessage({type:"preview:lessonChange",data:e},"*")};function Fae({currentLessonId:e,lessons:t,isProgressSummary:n}){const o=Xt(),r=Ec.useRef(!1),a=Ec.useRef(e),i=Ec.useCallback(()=>r.current?i4.FORWARD:i4.BACK,[]),c=Ec.useCallback(l=>{const d=Du({id:l,lessons:t});if(n)r.current=!1;else if(l==="progress-summary")r.current=!0;else{const h=Du({id:e,lessons:t});r.current=h<d}o(In(l))},[o,t,n,e]);return Ec.useEffect(()=>{const l=Du({id:e,lessons:t}),d=Du({id:a.current,lessons:t});l!==d&&t.length>0&&(r.current=d<l),a.current=e,Dae(e)},[e,t]),{getNavigateDirection:i,handleNavigate:c}}const Hae=({content:e})=>{const t=ce(),n=gr(),o=t?.lessons??[],r=(0,je.g)(),a=(0,je.zy)(),[i]=(0,je.ok)(),c=i.get("embed")==="lesson-only",l=r.lessonId??"",d=e.kind==="progress-summary",h=i.get(pb);(0,u.useEffect)(()=>{!h||!l||window.dispatchEvent(new CustomEvent(Ue,{detail:{lessonId:l,itemId:h,path:["lessons",{id:l},"items",{id:h}],align:"start"}}))},[l,h]);const m=kt(480),{getNavigateDirection:f,handleNavigate:v}=Fae({currentLessonId:l,lessons:o,isProgressSummary:d}),C=bs(t),g=(0,u.useCallback)(()=>{C||(t.theme?.hideLessonHeaders?document.querySelector("main"):document.querySelector("h1"))?.focus({preventScroll:!0})},[t,C]),x=c?"lesson lesson--preview":"lesson",b=tt(),L=(0,u.useCallback)(({item:k,refs:I})=>{if(!k)return;const E="media"in k?k.media:null;b(xb({audioPlayerId:ps({refs:I}),transcriptMedia:E}))},[b]),S=(0,u.useCallback)(()=>{b(Yi())},[b]),y=(0,u.useCallback)(k=>{b(_m(k))},[b]),T=No(l);return(0,s.jsxs)(Aae,{children:[(0,s.jsxs)("div",{className:"page-lesson-wrap",children:[!C&&(0,s.jsx)(Rae,{lessonId:l}),(0,s.jsx)("div",{className:"page-lesson",children:(0,s.jsxs)(az,{children:[(0,s.jsx)(oz,{closeTranscript:S,mode:"readonly",onTranscriptUpdate:y,openTranscript:L,children:(0,s.jsx)("div",{className:x,"data-lesson":!0,children:(0,s.jsx)("div",{className:"lesson__content",children:(0,s.jsx)("div",{className:"page-view page-view--visible",children:(0,s.jsx)(H_,{isLessonOnlyEmbed:c,children:C?(0,s.jsx)(Tae,{isProgressSummary:d,lessonProgress:T}):(0,s.jsx)(gU,{isLessonOnlyEmbed:c,children:(0,s.jsx)(qoe,{content:e,getNavigateDirection:f,handleNavigate:v,isMobileHeader:m,lessonId:l,lessonProgress:T,onPageReady:g},a.pathname)})})})})})}),(0,s.jsx)(Bae,{lessonId:n?.currentLesson?.toString()})]})})]}),(0,s.jsx)(zm,{onClose:g})]})},wp=V("one-page-cover-info");function $ae({htmlIdTitle:e}){const t=ha("title");return(0,s.jsxs)("div",{className:wp(),"data-change-path":t,children:[(0,s.jsx)(n4,{className:wp("title").toString(),htmlId:e}),(0,s.jsx)(t4,{className:wp("authors").toString()})]})}const Vae=$ae,Fu=V("one-page-cover"),zae=V("cover"),_ae={passive:!0};function Uae(e){return typeof e=="object"&&e!=null}function Gae(e){return Uae(e)&&(typeof e.id=="string"||typeof e.id=="number")}function Wae({previewType:e}={}){const t=(0,u.useRef)(null),n=(0,u.useRef)(null),o=(0,u.useRef)(!1),r=Xt(),a=ue(Wt),i=EN(a),c=Gae(i)?i:void 0,l=(0,u.useCallback)(()=>{const A=c?.id;return A!=null?In(A):null},[c?.id]),d=(0,u.useCallback)(()=>{const A=l();if(A!=null){const R=a?.theme?.blockNavigationType===Qc.STEPPED?"one-page-cover-to-lesson-stepped":"one-page-cover-to-lesson-continuous";Js(()=>{r(A)},R)}},[a?.theme?.blockNavigationType,l,r]),h=(0,u.useRef)(d);h.current=d;const m=(0,u.useRef)(e);m.current=e;const f=(0,u.useCallback)(()=>{n.current?.focus?.()},[]);(0,u.useEffect)(()=>{cy(),n.current?.focus?.()},[]),(0,u.useEffect)(()=>{const A=N=>{(N.key==="ArrowDown"||N.key==="ArrowRight")&&!o.current&&(o.current=!0,document.removeEventListener("keyup",A),h.current())};return document.addEventListener("keyup",A),()=>document.removeEventListener("keyup",A)},[]),(0,u.useEffect)(()=>{const A=N=>{qi(m.current)||o.current||N.deltaY>100&&(o.current=!0,document.removeEventListener("wheel",A),h.current())};return document.addEventListener("wheel",A,_ae),()=>document.removeEventListener("wheel",A)},[]);const v=(0,u.useCallback)(A=>{const N=A.target;N instanceof Node&&!t.current?.contains?.(N)&&!o.current&&(o.current=!0,d())},[d]),C=(0,u.useCallback)(A=>{A.preventDefault(),o.current||(o.current=!0,d())},[d]),g=a?.coverPageType===de.WHITE,x=a?.coverPageType===de.VIDEO,b=a?.coverPageType===de.IMAGE,L=a?.coverPageType===de.ACCENT,S=a?.theme?.blockNavigationType===Qc.STEPPED,y=a?.theme?.coverImageColor??rt.DARK,T="title",I=`overlay-${y?.toLowerCase()}`,E=Fu("wrapper",{[I]:b,accent:L,image:b,white:g||x,video:x}).mix(zae("header-content")),w=l();return(0,s.jsx)(xr,{children:(0,s.jsxs)(kd,{onSwipeUp:d,children:[(0,s.jsxs)("main",{className:E,ref:n,tabIndex:-1,children:[(0,s.jsx)(Vae,{htmlIdTitle:T}),S&&(0,s.jsx)("div",{className:"visually-hidden-always",children:"To quickly navigate between steps, use the up and down arrow keys or the step navigation found on subsequent steps."}),w!=null&&(0,s.jsx)("div",{className:Fu("start-wrapper"),onClick:v,children:(0,s.jsx)(nn,{"aria-label":"Start",className:Fu("start-link"),onClick:C,ref:t,to:w,children:(0,s.jsx)(ie,{className:Fu("start-icon"),name:"arrow-down"})})}),b&&(0,s.jsx)(Dm,{})]}),(0,s.jsx)(zm,{onClose:f})]})})}const Kae=Wae,Qae="progress-summary";function Yae({course:e,lessonId:t,progressSummaryEnabled:n}){if(n&&t===Qae)return{kind:"progress-summary"};const o=e?.lessons?.find(r=>String(r.id)===t);return o?{kind:"lesson",lesson:o}:{kind:"not-found"}}function Zae(){const e=ce(),t=(0,je.zy)(),n=bs(e),o=e?.lessonsOnly?.[0]?.id,r=o==null?void 0:In(o),a=n?iB(e):H2(e),l=r!=null&&a?(0,s.jsx)(je.C5,{replace:!0,to:{pathname:r,search:t.search}}):n?(0,s.jsx)(Kae,{}):(0,s.jsx)(tz,{});return(0,s.jsxs)(je.BV,{children:[(0,s.jsx)(je.qh,{element:(0,s.jsx)(c4,{}),path:xl}),(0,s.jsx)(je.qh,{element:(0,s.jsx)(l4,{children:(0,s.jsx)(c4,{})}),path:bl}),(0,s.jsx)(je.qh,{element:l,index:!0}),(0,s.jsx)(je.qh,{element:(0,s.jsx)(l4,{children:l}),path:"/:mode"}),(0,s.jsx)(je.qh,{element:(0,s.jsx)(Nl,{}),path:"*"})]})}function c4(){const e=fr(),{lessonId:t=""}=(0,je.g)(),n=Yae({course:e,lessonId:t,progressSummaryEnabled:!1});return n.kind==="not-found"?(0,s.jsx)(Nl,{}):(0,s.jsx)(Hae,{content:n})}function l4({children:e}){const{mode:t}=(0,je.g)();return Aj(t)?e:(0,s.jsx)(Nl,{})}const Hu=V("legacy-share-deprecation-banner"),Xae=Date.UTC(2026,7,31),qae="https://community.articulate.com/discussions/discuss/rise-360-legacy-preview-links-will-be-disabled-on-august-31/1265175",d4="has-legacy-share-banner",Jae=()=>(0,s.jsx)("svg",{"aria-hidden":"true",className:Hu("icon"),focusable:"false",viewBox:"0 0 512 512",children:(0,s.jsx)("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM96 208l320 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16L96 304c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16z"})});function eie(){const e=ce(),t=N0()&&Date.now()<Xae&&e!=null&&!y2(e);return(0,u.useEffect)(()=>{if(!t)return;const n=document.getElementById("app");if(n)return n.classList.add(d4),()=>n.classList.remove(d4)},[t]),t?(0,s.jsxs)("div",{className:Hu(),role:"status",children:[(0,s.jsx)(Jae,{}),(0,s.jsxs)("p",{className:Hu("message"),children:["Access to this content will be"," ",(0,s.jsx)("a",{className:Hu("link"),href:qae,rel:"noopener noreferrer",target:"_blank",children:"disabled on August 31, 2026"}),". Please contact your administrator and request the content be republished via Quick Share to maintain access."]})]}):null}const tie=eie;var uo=p(82920);const Br=V("share-password-dialog");function nie({failAttempt:e,onSubmit:t}){const n=ue(Wt),o=uo.useRef(null),r=uo.useRef(null),[a,i]=uo.useState(!1),c=uo.useRef(!1),{announceAssertive:l}=ys();uo.useEffect(()=>{r.current?.showModal()},[]),uo.useEffect(()=>{e&&!c.current&&(i(!0),o.current&&(o.current.value=""),l("Incorrect password. Please try again.")),c.current=e},[l,e]),uo.useEffect(()=>{const v=r.current;if(!v)return;const C=()=>i(!1);return v.addEventListener("animationend",C),()=>{v.removeEventListener("animationend",C)}},[]);const d=uo.useCallback(v=>{v.preventDefault(),o.current&&t(o.current.value)},[t]),h=uo.useCallback(v=>{v.preventDefault()},[]),f=`You need a password to view this ${bs(n)?zL(n?.experiments?.outputType).toLocaleLowerCase():"course"}. If you don\u2019t know it, ask the person who shared this with you.`;return(0,s.jsxs)("dialog",{"aria-describedby":"share-password-instructions share-password-constraint","aria-labelledby":"share-password-title",className:`${Br({shaking:a})} brand--border`,onCancel:h,ref:r,children:[(0,s.jsx)("h1",{className:Br("heading"),id:"share-password-title",children:"Enter Password"}),(0,s.jsx)("p",{className:Br("instructions"),id:"share-password-instructions",children:f}),(0,s.jsx)("p",{className:"visually-hidden-always",id:"share-password-constraint",children:"This dialog requires a password to proceed and cannot be dismissed."}),(0,s.jsxs)("form",{onSubmit:d,children:[(0,s.jsx)("label",{className:Br("label"),htmlFor:"share-password",children:"password"}),(0,s.jsx)("input",{className:Br("input"),id:"share-password",ref:o,type:"password"}),(0,s.jsx)("div",{className:Br("toolbar"),children:(0,s.jsx)("button",{className:`${Br("button")} brand--background`,type:"submit",children:"View"})})]})]})}const sie=nie;function oie(){const e=rl();(0,u.useEffect)(()=>{window.targetMode=pB({locale:D2(e)})},[e]),(0,u.useEffect)(()=>{window.parent.postMessage({type:"ready"},"*"),window.parent.postMessage({type:pn.STATUS,data:!!window.targetMode},"*"),fY(n=>Dn(a7(n)))},[]);const t=(0,u.useRef)(!1);(0,u.useEffect)(()=>{t.current||!e||!y8()||(t.current=!0,window.parent.postMessage({type:"preview:snapshotLoaded",data:{defaultLocale:e.defaultLocale,locales:e.locales?.map(({locale:n})=>n)}}))},[e]),(0,u.useEffect)(()=>{const n=()=>Dn(Pk()),o=()=>Dn(Mk()),r=()=>window.parent.postMessage("coursePreviewIframeClicked","*");return Bv("favoriteAdded",n),Bv("favoriteRemoved",o),document.addEventListener("click",r),()=>{Dv("favoriteAdded",n),Dv("favoriteRemoved",o),document.removeEventListener("click",r)}},[])}const $u=document.createElement("style");$u.innerHTML=`
  @layer rise-reset, arc-theme, arc-utils;

  :root {
    --arc-font-size-base: 1;

    /*  Override arc body font because of Inter naming conflict in Rise
        https://github.com/articulate/rise-authoring/issues/7263
    */
    --arc-internal-font-body: 'DS Inter', system-ui, sans-serif;
  }
`;function rie(){(0,u.useEffect)(()=>($u.parentElement!==document.head&&document.head.prepend($u),()=>{$u.remove()}),[])}function aie(e){return e.status}function u4(){return ue(aie)}function iie({enabled:e=!0,onAuthorized:t,onError:n,onUnauthorized:o,password:r}){const a=tt();(0,u.useEffect)(()=>{e&&(a(wI({onAuthorized:t,onError:n,onUnauthorized:o,password:r})),a(r7()))},[a,e,t,n,o,r])}function cie(){const e=tt(),{courseLoaded:t,coverLoaded:n}=u4(),o=ue(i=>i.course?.coverImage?.media),r=ct(o),a=(0,u.useCallback)(()=>{e($k(!0))},[e]);(0,u.useEffect)(()=>{if(t&&!n){const i=r?.image,{key:c,src:l}=i||{};if(c||l){const d=c?lt(i):l,h=setTimeout(a,5e3),m=new Image;return m.src=d,m.onload=()=>{clearTimeout(h),a()},()=>{clearTimeout(h),m.onload=null}}else a()}},[t,n,r,a])}function lie(e={}){iie(e),cie();const t=tt(),n=N2(),o=ue(f=>f.courseLabels.labels),{courseLoaded:r,coverLoaded:a,fatalError:i,fontsLoaded:c,notFound:l,partnerContentLoaded:d}=u4(),h=(0,Oe.A)(r),m=r&&c&&a&&d;return(0,u.useEffect)(()=>{!h&&r&&!c&&(n??[]).length>0&&t(IE(n))},[t,h,r,c,n]),(0,u.useEffect)(()=>{if(!m||window.parent===window)return;window.parent.postMessage({type:"course:ready"},window.location.origin);const f=v=>{v.key==="Escape"&&window.parent.postMessage({type:"preview:escape"},window.location.origin)};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[m]),{isLoaded:!!m,notFound:!!l,fatalError:!!i,curtainLabels:o}}function die({course:e}){const[t,n]=(0,u.useState)(!0),[o,r]=(0,u.useState)(!1),a=e&&"hasPassword"in e?!!e.hasPassword:!1,i=!!(t&&N0()&&e&&!y2(e)&&(a||yg())),c=(0,u.useCallback)(l=>(r(!1),S8(l).then(({isValid:d})=>{d?n(!1):(r(!0),n(!0))}).catch(d=>console.error("Verify password error",d))),[]);return{showPasswordDialog:i,failAttempt:o,onSharePasswordSubmit:c}}function uie(){return BO(),rie(),oie(),(0,s.jsxs)(EB,{children:[(0,s.jsx)(tie,{}),(0,s.jsx)(WO,{children:(0,s.jsx)(hie,{})})]})}function hie(){const{enabled:e,isActive:t,onAuthorized:n,onError:o,onUnauthorized:r,password:a}=GO(),{isLoaded:i,notFound:c,fatalError:l,curtainLabels:d}=lie({enabled:e,onAuthorized:t?n:void 0,onError:t?o:void 0,onUnauthorized:t?r:void 0,password:t?a:void 0}),h=ce(),{showPasswordDialog:m,failAttempt:f,onSharePasswordSubmit:v}=die({course:h}),C=!t&&m;return c?(0,s.jsx)(Nl,{}):i?C?(0,s.jsx)(sie,{failAttempt:f,onSubmit:v}):h?(0,s.jsx)(mie,{course:h}):null:(0,s.jsx)(a2,{labels:d,status:l?"fatalError":"loading"})}function mie({course:e}){const t=K7(),n=OO(),o=A2(e.themeId),r=`theme ${o}${t?" one-page":""}`;return(0,s.jsx)(Hj,{appType:"learn",children:(0,s.jsx)(rB,{children:(0,s.jsx)(eB,{children:(0,s.jsx)(EO,{children:(0,s.jsx)(MO,{themeId:o,children:(0,s.jsx)(Oh,{children:(0,s.jsx)(RO,{children:(0,s.jsxs)("div",{className:r,id:"innerApp",ref:PO,children:[(0,s.jsx)(_O,{...n}),(0,s.jsxs)(oO,{children:[(0,s.jsx)(Zae,{}),(0,s.jsx)(Fj,{})]})]})})})})})})})})}function fie({children:e}){return(0,s.jsx)(YU,{ImageEagerOrLazy:hf,children:e})}var h4;const m4={"rise-course-navigation":!0},pie={"ai-assistant-blocks":!0,"ai-text-to-video":!1,"ai-assistant-images":!0,"ai-assistant-magic-block-import":!0,"ai-assistant-enable":!0,"ai-assistant-thumbs-feedback-ui":!1,"ai-assistant-subscription-override":!1,"ai-assistant-next-gen-chat-prototype":!1,"ai-use-conversation-harness":!1,"experiment-business-creator-role":!1,"experiment-business-creator-video-training":!1,"rise-ai-avatar-prompt-testing":!1,"rise-com-360-upsell":!0,"ai-quiz-generation-toggle-prototype":!1,"ai-concept-to-course-images-disabled-override":!1,"rise-ai-scenario-practice-mode-enabled":!1},Ap=(0,u.createContext)(m4);Ap.displayName="FeatureFlagsContext";const{Provider:gie}=Ap;function vie({children:e,value:t}){const n=(0,u.useMemo)(()=>({...pie,...t,...m4}),[t]);return(0,s.jsx)(gie,{value:n,children:e})}function Rp(){return(0,u.useContext)(Ap)}function Cie(e){return Rp()[e]}function b1e(e){function t(n){const o=Rp();return h4(e,{...n,flags:o})}return t.displayName=`withFeatureFlags(${e.displayName||e.name})`,t}function y1e(e,t){return function(n){const o=r=>{const a=Cie(e),i={...r,[t]:a};return h4(n,{...i})};return o.displayName=`withFeatureFlag(${n.displayName||n.name})`,o}}const f4=({children:e})=>(0,s.jsx)(s.Fragment,{children:e});f4.displayName="On";const p4=({children:e})=>(0,s.jsx)(s.Fragment,{children:e});p4.displayName="Off";const Vu=({children:e,featureFlags:t})=>{const n=Rp(),o=(0,u.useMemo)(()=>{const i=[].concat(t??[]);return i.length&&i.every(c=>n[c])},[t,n]),{on:r=null,off:a=null}=(0,u.useMemo)(()=>{const i={};return u.Children.forEach(e,c=>{switch(c.type.displayName){case Vu.On.displayName:i.on=c;break;case Vu.Off.displayName:i.off=c;break;default:i.on=e}}),i},[e]);return o?r:a};Vu.On=f4,Vu.Off=p4;const xie={};function bie({children:e}){const n=ce()?.features??xie;return(0,s.jsx)(vie,{value:n,children:e})}const g4=document.getElementById("app");if(!g4)throw new Error("Root element #app not found");(0,v4.createRoot)(g4).render((0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(x7,{store:aC,children:(0,s.jsx)(fie,{children:(0,s.jsx)(S7,{children:(0,s.jsx)(bie,{children:(0,s.jsx)(je.I9,{useTransitions:!1,children:(0,s.jsx)(uie,{})})})})})})}))},31926(Nc,Ya,p){const Wo={"./en-au":52378,"./en-au.js":52378,"./en-ca":44232,"./en-ca.js":44232,"./en-gb":63301,"./en-gb.js":63301,"./en-ie":17282,"./en-ie.js":17282,"./en-il":70761,"./en-il.js":70761,"./en-in":43623,"./en-in.js":43623,"./en-nz":99308,"./en-nz.js":99308,"./en-sg":56270,"./en-sg.js":56270};function s(Ko){const Za=Uu(Ko);return p(Za)}function Uu(Ko){if(!p.o(Wo,Ko)){const Za=new Error("Cannot find module '"+Ko+"'");throw Za.code="MODULE_NOT_FOUND",Za}return Wo[Ko]}s.keys=function(){return Object.keys(Wo)},s.resolve=Uu,Nc.exports=s,s.id=31926},38954(){}}]);
