(globalThis.wpRiseJsonp||=[]).push([["learn_main_tsx-node_modules_pnpm_moment_2_30_1_node_modules_moment_locale_sync_recursive_en"],{30349(ul){ul.exports=function(ba){ba||(ba={});var __t,__p="";with(ba)__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}},89549(ul,ba,C){"use strict";var lr={};C.r(lr),C.d(lr,{callbackComponent:()=>Ck,callbackPath:()=>bh,errorPath:()=>lk,getToken:()=>dk,initAuth:()=>Fv,login:()=>Bv,logout:()=>br,onFetchTokensThunk:()=>xk,onSessionExpired:()=>mk,refreshSession:()=>hk,request:()=>V4});var o=C(30739),K0=C(77352),dr=C(44148),ya=C(21502),lme=C(40932),dme=C(51219),ume=C(75985),hme=C(15937),mme=C(5095),fme=C(33078),pme=C(51321),gme=C(50651),vme=C(13663),Cme=C(99163),xme=C(61691),bme=C(76954),yme=C(4508),Sme=C(21511),u=C(49860),SL=C(33950),Ae=C(48032),IL=C(84545),hl=C(18398),bo=C(20496),TL=C(69618),LL=C(16422),EL=C(23851);const Q0=u.createContext(null),Z0=u.createContext(!1),Sa=e=>(0,o.jsx)(Z0.Provider,{value:!0,children:(0,o.jsx)(TL.A,{...e})});function k1(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,...s)=>{this.setState({transitionState:n});const r="on"+n[0].toUpperCase()+n.slice(1),i=this.props[r];typeof i=="function"&&i(...s)};render(){return(0,o.jsx)(Q0.Provider,{value:this.state.transitionState,children:(0,o.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 N1=k1(LL.Ay),Us=k1(EL.A);function kL(e){const t=u.useContext(Z0),n=u.useContext(Q0),s=u.useRef(e);return t&&n?.startsWith?.("exit")||(s.current=e),s.current}function NL(e){const t=n=>{const s=kL(n);return(0,o.jsx)(e,{...s,nodeRef:n.ref,ref:n.ref})};return t.displayName=`withTransitionableState(${e.displayName||e.name||"Component"})`,t}const j1=e=>e!=null&&typeof e=="object"&&"map"in e&&typeof e.map=="function",jL=e=>e!=null&&typeof e=="object"&&"run"in e&&typeof e.run=="function",w1=e=>e!=null&&typeof e=="object"&&"then"in e&&typeof e.then=="function",wL=e=>e!=null&&typeof e=="object"&&"fork"in e&&typeof e.fork=="function",R1=e=>e!=null&&typeof e=="function",A1=(e,t)=>{const n=s=>A1(s,t);if(typeof e=="object"&&"type"in e&&typeof e.type=="string"){const s="meta"in e&&typeof e.meta=="object"?e.meta:void 0;return{...e,meta:{...s,origin:t}}}if("bimap"in e&&typeof e.bimap=="function")return e.bimap(n,n);if(j1(e))return e.map(n);if(w1(e))return e.then(n);if(R1(e))return function(r,i){return e(a=>r(n(a)),i)}};function RL(){return({dispatch:e,getState:t})=>n=>s=>{if(R1(s))return s(e,t);if(w1(s))return s.then(e);if(wL(s)){s.fork(e,e);return}return jL(s)?e(s.run()):j1(s)?s.map(e):n(s)}}function AL(){return[RL()]}var ml=C(49860);const PL=hl.Zz;function ML(e,t,{additionalMiddleware:n=[]}={}){const s=(0,hl.y$)(e,t,PL((0,hl.Tw)(...AL(),...n))),r=BL(),i=DL(),a=FL(),c=_L(),l=HL(),d=OL();return{Provider:bo.Kq,connect:r,connectBase:i,dispatch:s.dispatch,store:s,useDispatch:a,useDispatchWithOrigin:c,useSelector:l,useStore:d}}function OL(){return function(){return(0,bo.Pj)()}}function BL(){return function(t,n,s,r){return function(i){return(0,bo.Ng)(t,n,s,r)(NL(i))}}}function DL(){return function(t,n,s,r){return function(i){return(0,bo.Ng)(t,n,s,r)(i)}}}function FL(){return bo.wA}function _L(){return function(t){const n=(0,bo.wA)();return ml.useCallback(r=>n(A1(r,t)),[n,t])}}function HL(){return function(t,n=bo.bN){const s=ml.useContext(Z0),r=ml.useContext(Q0),i=ml.useRef(void 0),a=(0,IL.S)(),c=(0,bo.d4)(t,n),l=!a&&s&&r?.startsWith?.("exit");return l||(i.current=c),l&&i.current!==void 0?i.current:c}}var yo=C(68857),VL=C(61017),ur=C.n(VL),he=C(12742),zL;function $L(){return he.action}function Ime(){return zL}var hr=C(16397),UL=C(84268),_e=C.n(UL),GL=C(14778),Y0=C.n(GL),WL=C(863),ke=C.n(WL),KL=C(18271),rs=C.n(KL),QL=C(42117),q0=C.n(QL);const fl=Y0()(q0()),P1=["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"],ZL=["align","allow","allowfullscreen","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","title","width"],YL=fl({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:P1}),qL=fl({allowedAttributes:{iframe:ZL},allowedTags:["iframe"],allowedSchemes:["http","https"]}),X0=rs()(ke(),YL,_e()("")),M1=rs()(ke(),qL,_e()("")),In=fl({allowedTags:[],allowedAttributes:[]}),Tme=fl({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:P1.filter(e=>e!=="img")}),Lme=e=>{const t=e.replace(/((<br>)|(<\/[a-z]*>))+/g," ");return In(t).replace(/\s{2,}/g," ")},{Runtime:an}=window,Ne=e=>window.env?.[e],Eme=!1,kme=null,O1="Rise 360",XL=e=>`${Ne("CDN_USER_CONTENT_URI")}/${e}`,yt=e=>{const t=e||"",n=an?.resolvePath!=null?an.resolvePath.bind(an):XL;return t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:n(t)||t},JL=e=>an?.resolveFontPath!=null?an.resolveFontPath(e):`${e.default?Ne("CDN_URI"):Ne("CDN_USER_CONTENT_URI")}/${e.key}`,B1=()=>{an?.exit!=null&&an.exit()},e4=()=>an?.isComplete!=null?an.isComplete():null,Ia=()=>an?.isExport!=null?an.isExport():!1;function t4(){if(an?.isExport!=null){const e=window.partnerContent?.content;return an.isExport()&&!!e}return!1}const D1=()=>{if(an?.sendTouch!=null)return an.sendTouch()};var n4=C(91208),Gs=C.n(n4),s4=C(94083),So=C.n(s4),o4=C(55283),pl=C.n(o4),r4=C(5763),wt=C.n(r4),i4=C(95825),ks=C.n(i4),a4=C(82863),F1=C.n(a4),c4=C(57260),J0=C.n(c4),l4=C(37832),et=C.n(l4),d4=C(11802),at=C.n(d4),u4=C(70087),is=C.n(u4);const h4=Gs(),gl=et(),m4=So(),_1=e=>pl()(e),vl=rs(),Cl=e=>t=>{const n=e(t);return In(n==null?void 0:String(n))},H1=e=>t=>h4({[e]:n=>In(n==null?void 0:String(n))},t),f4=({startTime:e,stopTime:t})=>t-e,p4=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return G1(e);case"MATCHING":return Y1(e);default:return ri(e)}},g4=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return G1(e);case"MATCHING":return Y1(e);case"MULTIPLE_CHOICE":return W1(e);case"MULTIPLE_RESPONSE":return x4(e);default:return W1(e)}},v4=({isUnfinished:e,item:t,itemProgress:n})=>{switch(t.type){case"FILL_IN_THE_BLANK":return C4(e)(n);case"MATCHING":return I4(t,e)(n);case"MULTIPLE_CHOICE":return K1(t,e)(n);case"MULTIPLE_RESPONSE":return b4(t,e)(n);default:return K1(t,e)(n)}},V1=e=>[e],ri=e=>{const t=e.answers||[];if(e.shuffledAnswerIndices&&Array.isArray(e.shuffledAnswerIndices)){const n=e.shuffledAnswerIndices,s=[];return t.forEach((r,i)=>{const a=n[i];typeof a=="number"&&(s[a]=r)}),s.map(H1("title"))}return t.map(H1("title"))},eh=Cl(et()("id")),z1=Cl(et()("title")),$1=e=>t=>m4(n=>at()("id",t,n),ri(e)),U1=e=>t=>F1()(t,ri(e)),G1=e=>J0()("title",ri(e)),C4=e=>t=>vl(_e()(e),_e()(""),Cl(n=>gl("text",n)))(t),W1=e=>e.correct==null?[]:$1(e)(e.correct),K1=(e,t)=>n=>vl(_e()(t),_e()([]),()=>{const s=gl("selectedIndex",n);return s===void 0?[]:V1(U1(e)(s))})(n),x4=e=>_1(wt()($1(e),e.corrects??[])),b4=(e,t)=>n=>vl(_e()(t),_e()([]),()=>{const s=gl("selectedIndices",n)||[];return _1(s.map(r=>V1(U1(e)(r))))})(n),Q1=({sourceId:e,sourceTitle:t,targetId:n,targetTitle:s})=>({source:{id:`source_${String(e)}`,title:t},target:{id:`target_${String(n)}`,title:s}}),Z1=Cl(et()("matchTitle")),y4=e=>{const t=eh(e);return Q1({sourceId:t,sourceTitle:z1(e),targetId:t,targetTitle:Z1(e)})},S4=e=>(t,n)=>{const s=ri(e),r=s.find(a=>a?.id===n),i=s.find(a=>a?.id===t);return Q1({sourceId:eh(r),sourceTitle:z1(r),targetId:eh(i),targetTitle:Z1(i)})},Y1=e=>wt()(y4,ri(e)),I4=(e,t)=>n=>vl(_e()(t),_e()([]),()=>{const s=gl("matches",n);return is()(ks()(S4(e),s??{}))})(n);var T4=C(61346),q1=C.n(T4);function mr(e){const t=e.split(".")[1];if(!t)throw new Error("Invalid token specified: missing payload");const n=t.replace(/-/g,"+").replace(/_/g,"/"),s=n.padEnd(n.length+(4-n.length%4)%4,"="),r=new TextDecoder().decode(Uint8Array.from(atob(s),a=>a.charCodeAt(0))),i=JSON.parse(r);if(!L4(i))throw new Error("Invalid token specified: payload is not an object");return i}const L4=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);var X1,Nme;const th="_articulate_user_id",E4="_rise_authoring_api_session",J1=()=>"_articulate_rise_",ev=e=>{if(typeof document>"u")return;const t=document.cookie?document.cookie.split(";"):[];for(const n of t){const s=n.indexOf("=");if(s===-1||n.slice(0,s).trim()!==e)continue;const i=n.slice(s+1).trim();try{return decodeURIComponent(i)}catch{return i}}},nh=(e,t)=>`${e}=${t}; domain=${Ne("SESSION_COOKIE_DOMAIN")}; path=/; secure=true`,k4=e=>document.cookie=nh(th,e),N4=()=>document.cookie=`${nh(th,"")}; Max-Age=-99999999`,j4=()=>document.cookie=`${nh(E4,"")}; Max-Age=-99999999`,fr=()=>ev(th),Rt=()=>ev(J1()),w4=()=>Rt()?mr(Rt()).staff:!1,R4=()=>Rt()?X1(Rt())?.staffRoles||[]:[],A4=()=>Rt()?X1(Rt())?.content_team_admin:!1,jme=()=>R4().includes("content-team")||A4(),sh=()=>Rt()?mr(Rt()).riseId||mr(Rt()).sub||mr(Rt()).aid:"",P4=()=>Rt()?mr(Rt()).roles:[],M4=()=>Rt()?mr(Rt()).tenantId:"",tv=()=>Rt()?mr(Rt()).subscription||{}:{},O4=()=>tv().plan_id||"",B4=()=>tv().status||"";var D4=C(10862),F4=C(82485),ii=C.n(F4);const _4=ii()(window.env,{ACCESS_COOKIE_NAME:J1(),REDIRECT_URI:window.location.origin+"/auth-callback"}),Io=(0,D4.A)(_4),nv=Io.closeSession,ai=Io.on,H4=Io.off,V4=Io.request,sv=Io.refreshSession,Ta=Io.resetSession,z4=Io.getAuthorizationUrl,wme=Io.fetch;var Ws=C(49548);const xl=(e,t)=>((...n)=>{try{return e(...n)}catch(s){window.env?.SERVICE_ENV&&window.env?.SERVICE_ENV!=="prod"&&console.error(s),Ws.L2.addError(s),t(s)}}),ov=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}},$4=(e,t)=>{if(t)return ov(e);try{return JSON.parse(e.response)}catch{return e.response}};function U4(e,t){const n=t.indexOf(":"),s=t.substr(0,n).trim().toLowerCase(),r=t.substr(n+1).trim();return s&&(e[s]=e[s]?e[s]+", "+r:r),e}function G4(e){return e?e.split(`
`).reduce(U4,{}):{}}function rv(e){const t=[];for(const n in e){const s=e[n];if(!Array.isArray(s)){t.push(encodeURIComponent(n)+"="+encodeURIComponent(s));continue}for(const r of s)t.push(rv(r))}return t.join("&")}function oh(e){let t,n=!1;const s=new Promise(function r(i,a){const c=e.signal;if(c?.aborted){a(new DOMException("Aborted","AbortError"));return}const l=N=>{throw a(N),N},d=()=>{t.abort(),a(new DOMException("Aborted","AbortError"))},h=e.data;let m=xl(e.deserialize??q1(),l);const f=e.headers??{},p=e.json??!1,v=e.jwt??!1,g=e.token??null,x=e.method??"GET",y=e.reviewEnv??!1,S=e.onUploadProgress;let I=xl(e.serialize??q1(),l),b=e.url;const T=e.withCredentials??!1,L=e.file,E=e.timeout??3e3;t=new XMLHttpRequest;const k=setTimeout(()=>{t.abort(),a({error:"request timed out"})},E);if(p&&(m=xl(JSON.parse,a),I=xl(JSON.stringify,a),f["Content-Type"]="application/json"),x==="GET"&&h&&(b+="?"+rv(h)),v){const N=g||Rt();f.Authorization="Bearer "+N}c?.addEventListener("abort",d),t.withCredentials=T,t.addEventListener("abort",a),t.addEventListener("error",a),t.addEventListener("load",function(){if(t.status>=400)if([401,403].includes(t.status)){const N=$4(t,e.arrayBuffer);n?a({error:"Unable to resume session",status:t.status,body:N}):Ta().then(()=>{r(i,a),n=!0}).catch(P=>{Ws.L2.addError(P),a({error:"Unable to resume session",status:t.status,body:N})})}else e.arrayBuffer?a(ov(t)):a(m(t.response));else i({body:t.status===204?void 0:m(t.response),headers:G4(t.getAllResponseHeaders()),status:t.status}),c?.removeEventListener("abort",d);clearTimeout(k)}),t.upload&&typeof S=="function"&&t.upload.addEventListener("progress",S),t.open(x,b),e.arrayBuffer&&(t.responseType="arraybuffer");for(const N in f)t.setRequestHeader(N,f[N]);x!=="GET"&&h?t.send(I(h)):L?t.send(L):t.send()});return s.abort=(...r)=>t.abort(...r),s}function W4(e){return e.status===200||e.status===201?e.body:Promise.reject(e.body)}const iv=(e,t=!0)=>t?`${e}s`:e;var rh=null;const Rme=null,av=null,Ame=(e,t="short")=>{const s=Object.keys(rh).reverse().find(c=>e>=rh[c]);if(!s)return`${e} ${iv("byte",e>1)}`;const r=e/rh[s],i=r%1===0?r.toFixed(0):r.toFixed(2),a=t==="long"?iv(av[s].long,r>1):av[s].short;return`${i} ${a}`};var K4=C(48319),Q4=C.n(K4);const cn=e=>!!e&&e.type==="quiz",Ns=e=>!!e&&e.type==="blocks",St=({courseProgress:e,lessonId:t,updatedLessonProgress:n})=>({...e,lessons:{...e.lessons,[t]:n}});function It({lessonId:e,nextCourseProgress:t,prevCourseProgress:n}){const s=t.lessons[e],r=n.lessons[e];if(s&&!Q4()(s,r)&&(CN(s),Z4({lessonId:e,courseProgress:t,prevCourseProgress:n})),Y4({lessonId:e,prevCourseProgress:n,nextCourseProgress:t})){const i=lv(n),a=lv(t),c=a!==i,l={...t,percentComplete:a};return c&&(q4({courseProgress:l,lessonProgress:s}),l.percentComplete!=null&&bN(l.percentComplete)),l}return t}function Z4({courseProgress:e,prevCourseProgress:t,lessonId:n}){const s=e.lessons?.[n],r=t.lessons?.[n];if(s?.percentComplete===100&&r?.percentComplete!==100){const i=cv(s);i&&vN(i)}}function Y4({lessonId:e,nextCourseProgress:t,prevCourseProgress:n}){const s=t.lessons?.[e];if(!s)return!1;const r=n.lessons?.[e]?.percentComplete===100,i=s.percentComplete===100,a=r!==i,c=t.currentLesson!=null&&cn(t.lessons[t.currentLesson])&&t.lessons[t.currentLesson]?.percentComplete===100;return a||c}function cv(e){const{id:t}=e;if(!t)throw new Error("Cannot create lesson payload: lesson.id is missing");if(cn(e)){const{passed:n,score:s,passingScore:r=0}=e;return{id:t,...n!==void 0&&{passed:n},...s!==void 0&&{score:s},passingScore:r}}return{id:t}}function lv(e){const{lessons:t={}}=e,n=Object.keys(t).length;if(n===0)return 0;const s=Object.values(t).filter(r=>r.isComplete).length;return Math.round(s/n*100)}function q4({courseProgress:e,lessonProgress:t}){if(!e||!t)return;const n=cv(t);n&&xN(e,n)}const X4=e=>e.reduce((t,n,s)=>("id"in n&&(t[n.id]={id:n.id,index:s}),t),{}),ih=e=>({...e,percentComplete:ah({items:e.items,key:"isComplete"})}),dv=e=>({...e,percentComplete:ah({items:e.items,key:"isComplete"})}),uv=e=>({...e,percentViewed:ah({items:e.items,key:"isViewed"})});function Pme({itemId:e,isCorrect:t,progress:n}){const s={...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}:{}}}};s.items[e]?.isCorrect===!1&&(s.lastIncorrectCardId=e);const r=J4(s),i=r.percentComplete!==100?dv(r):r,a=uv(i);return a.percentComplete===100?{...a,isComplete:!0}:a}function ah({items:e,key:t}){const n=e??{},s=Object.keys(n).length,r=Object.values(n).filter(i=>i?.[t]).length;return s===0?0:Math.round(r/s*100)}function J4(e){const n=Object.values(e.items||{}).filter(s=>s.isCorrect===!0).length;return{...e,correctlyAnswered:n}}var ch=C(66330),eE,tE;const tt=e=>!!e&&Object.prototype.toString.call(e)==="[object Object]",hv=Array.isArray,Mme=(e,t)=>Object.fromEntries(Object.entries(t).map(e)),mv=(e,t,n)=>{const s={};for(const r in n)s[e(r)]=t(n[r]);return s},nE=e=>e.map(fv),sE=e=>e.map(pv),oE=e=>mv(eE,fv,e),rE=e=>mv(tE,pv,e),fv=e=>tt(e)?oE(e):hv(e)?nE(e):e,pv=e=>tt(e)?rE(e):hv(e)?sE(e):e,Ks=(e,t)=>{const n=new Set(t),s={};for(const r in e)n.has(r)||(s[r]=e[r]);return s},To=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,s])=>t(n,s)));function gv(e,t){const n=e.lessons[t];if(!Ns(n))return e;const s={...lh(n),id:t},r=St({courseProgress:e,lessonId:t,updatedLessonProgress:s});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function iE(e,t){const{lessonId:n,blockId:s,itemId:r}=t,i=e.lessons[n];if(!Ns(i))return e;const a=i.items[s],c=gE({blockProgress:a,itemId:r}),l=pr({lessonProgress:i,blockId:s,updatedProgressBlock:c}),d=ih(l),h=St({courseProgress:e,lessonId:n,updatedLessonProgress:d});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:h})}function aE(e,t){const n=e.lessons[t];if(!Ns(n))return e;const s=CE(n),r=St({courseProgress:e,lessonId:t,updatedLessonProgress:s});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function cE(e,{blockId:t,lessonId:n}){const s=e.lessons[n];if(!Ns(s))return e;const r=xE(s.items[t]),i=pr({lessonProgress:s,blockId:t,updatedProgressBlock:r}),a=St({courseProgress:e,lessonId:n,updatedLessonProgress:i});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:a})}function lE(e,t){const{lessonId:n,blockId:s,items:r}=t,i=e.lessons[n];if(!Ns(i))return e;const a=pE({blockId:s,lessonProgress:i,items:r}),c=St({courseProgress:e,lessonId:n,updatedLessonProgress:a});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:c})}function dE(e,t){const{lessonId:n,blockId:s,itemId:r,audioVideoPlayhead:i}=t,a=e.lessons[n],c=a?.items?.[s];if(!Ns(a)||!c||!("items"in c)||!c.items||!c.items[r])return e;const d={...c.items[r],audioVideoPlayhead:i},h={...c,items:{...c.items,[r]:d}},m=pr({lessonProgress:a,blockId:s,updatedProgressBlock:h}),f=St({courseProgress:e,lessonId:n,updatedLessonProgress:m});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:f})}function uE(e,t){const{lessonId:n,blockId:s,itemId:r,isCorrect:i}=t,a=e.lessons[n];if(!Ns(a))return e;const c=bE({itemId:r,isCorrect:i,blockProgress:a.items[s]}),l=ih(pr({lessonProgress:a,blockId:s,updatedProgressBlock:c})),d=St({courseProgress:e,lessonId:n,updatedLessonProgress:l});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:d})}function hE(e,t){const{lessonId:n,blockId:s,itemId:r,response:i}=t,a=e.lessons[n],c=a?.items?.[s];if(!Ns(a)||!c||!("items"in c)||!c.items||!c.items[r])return e;const d={...c.items[r],response:i},h={...c,items:{...c.items,[r]:d}},m=pr({lessonProgress:a,blockId:s,updatedProgressBlock:h}),f=St({courseProgress:e,lessonId:n,updatedLessonProgress:m});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:f})}function mE(e,t){const{lessonId:n,blockId:s,isSubmitted:r}=t,i=e.lessons[n];if(!Ns(i))return e;const a=i?.items?.[s]??{},c=To(a?.items??{},(m,f)=>[m,Ks(f,["response"])]),l={...a,items:c,isSubmitted:r},d=pr({lessonProgress:i,blockId:s,updatedProgressBlock:l}),h=St({courseProgress:e,lessonId:n,updatedLessonProgress:d});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:h})}const fE=e=>Object.values(e).length>0&&Object.values(e).every(t=>t.isComplete),lh=e=>{const t=To(e.items,(n,s)=>{const r=To(s.items??{},(i,a)=>[i,{...a,isComplete:!0,id:a.id,index:a.index}]);return[n,{...s,items:r,isComplete:!0}]});return{...e,isComplete:!0,items:t,percentComplete:100}},pE=({blockId:e,items:t,lessonProgress:n})=>{const s=n.items?.[e]??{items:{}},r=new Set(t.map(d=>String(d.id))),i=To(s.items??{},(d,h)=>{const m=r.has(d);return[d,{...h,isComplete:h.isComplete||m,id:h.id,index:h.index}]}),c=Object.keys(i).length===0||fE(i),l={...s,id:e,items:i,...c&&{isComplete:!0}};return vE(pr({lessonProgress:n,blockId:e,updatedProgressBlock:l}))},gE=({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}}}},vE=e=>{const t=ih(e);return t.percentComplete===100?{...t,isComplete:!0}:t},pr=({blockId:e,lessonProgress:t,updatedProgressBlock:n})=>({...t,items:{...t.items,[e]:n}}),CE=e=>{const t=To(e.items,(n,s)=>{const r=To(s.items??{},(i,a)=>[i,Ks(a,["isComplete","isCorrect","isViewed"])]);return[n,{id:s.id,index:s.index,items:r}]});return{...Ks(e,["isComplete","percentComplete"]),items:t}},xE=e=>({...Ks(e,["percentViewed","correctlyAnswered"]),id:e.id,index:e.index,items:To(e.items??{},(t,n)=>[t,Ks(n,["isViewed","isCorrect"])]),retryAttempts:(e.retryAttempts??0)+1}),bE=({isCorrect:e,itemId:t,blockProgress:n})=>{if(!n.items)return n;const s=n.items[t],r={...s,isComplete:e,isViewed:e,...s?.isCorrect===void 0&&{isCorrect:e}},i={...n.items,[t]:r},a=Object.values(i).filter(m=>m.isCorrect).length,c={...n,items:i,correctlyAnswered:a,...!e&&{lastIncorrectCardId:t}},l=uv(c),d=dv(l),h=d.percentComplete===100;return{...d,...h&&{isComplete:!0}}};var yE=C(9750);const Ome="datadoghq.com",Bme=Ne("SERVICE_ENV"),Dme=Ne("RISE_FRONTEND_SHA"),Fme=Ne("RISE_FRONTEND_LOCAL_DEV")==="true"||window.location.hostname==="rise.dev.articulate.zone",_me=window.Cypress!=null,Hme=[/https:\/\/(rise(\.dev)?|360)\.articulate\.(com|zone)(?!\/api\/rise-business-content\/).*/],dh={RESUME_RECOVERY:"Quiz resume recovery",END_ADVANCE_REFUSED:"Quiz end advance refused"};function Vme(e,t){}function bl(e){return e.trim()===""}var SE=C(97115);const V=(0,SE.setup)({el:"__",mod:"--",modValue:"-"}),IE=V("quiz"),TE=0,ci=2,LE=e=>({start:e<ci?0:e-ci,end:e+ci});function uh(e){return e+1}function EE(e){return e<TE+ci}function kE(e,t){const{start:n,end:s}=LE(t);return{items:e.slice(n,s),startOffset:n}}function yl({activeIndex:e,index:t}){return IE("card",{active:t===e,done:t<e,next:t===e+1,penultimate:t===e+ci,future:t>e+ci})}function NE(e,t){const{lessonId:n,fromIndex:s,progressId:r}=t,i=e.lessons[n];if(!cn(i))return e;const a=i.activeIndex??0;if(s!=null&&a!==s)return e;const c=r?(i.items[r]?.index??a)+1:a+1,l=Object.keys(i.items).length+1,d=Math.min(c,l);if(d===l&&t.finalize&&!i.reportResults&&!La(i))return dh.END_ADVANCE_REFUSED,{...vv(i)},e;let h={...i,activeIndex:d};d===l&&!i.reportResults&&t.finalize&&(h=Sl(h,{passingScore:i.passingScore??80,passToContinue:t.passToContinue,finalRetryAttempt:t.finalRetryAttempt}));const m=St({courseProgress:e,lessonId:n,updatedLessonProgress:h});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:m})}function jE(e,t){const{lessonId:n}=t,s=e.lessons[n];if(!cn(s))return e;if(t.finalize&&!s.reportResults&&!La(s))return dh.END_ADVANCE_REFUSED,{...vv(s)},e;const r=Object.keys(s.items).length;let i={...s,activeIndex:r+1};!s.reportResults&&t.finalize&&(i=Sl(i,{passingScore:s.passingScore??80,passToContinue:t.passToContinue,finalRetryAttempt:t.finalRetryAttempt}));const a=St({courseProgress:e,lessonId:n,updatedLessonProgress:i});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:a})}function wE(e,{lessonId:t,itemId:n}){const s=e.lessons[t];if(!cn(s))return e;const r=s.items[n];if(!r)return e;const i={...r,selectedIndices:[]},a=Ea({lessonProgress:s,itemId:n,updatedProgressQuizItem:i}),c=St({courseProgress:e,lessonId:t,updatedLessonProgress:a});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:c})}function RE(e,t){const{lessonId:n,lessonProgress:s}=t,r=e.lessons[n],i=cn(r)&&r.reportResults?r:void 0,a=i?{...s,isComplete:i.isComplete,passed:i.passed,percentComplete:i.percentComplete,reportResults:i.reportResults,score:i.score}:s,c={...e,lessons:{...e.lessons,[n]:a}};if(i||!AE(s,t))return c;const l=Sl(s,{passingScore:s.passingScore??80,passToContinue:t.passToContinue,finalRetryAttempt:t.finalRetryAttempt});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:St({courseProgress:c,lessonId:n,updatedLessonProgress:l})})}function AE(e,t){if(!t.finalize||e.reportResults)return!1;const n=Object.keys(e.items).length;return n>0&&(e.activeIndex??0)>=n+1&&La(e)}function PE(e){const t=Object.values(e.items);if(t.length===0)return 0;const n=t.filter(s=>s.isCorrect).length;return Math.round(n/t.length*100)}function vv(e){return{itemCount:Object.keys(e.items).length,incompleteItemIds:Object.values(e.items).filter(t=>t.isComplete!==!0).map(t=>String(t.id))}}function ME(e,{lessonId:t,itemId:n,text:s}){const r=e.lessons[t];if(!cn(r))return e;const i=r.items[n];if(!i)return e;const a=typeof s=="string"&&bl(s)?Ks(i,["text"]):{...i,text:s},c=Ea({lessonProgress:r,itemId:n,updatedProgressQuizItem:a}),l=St({courseProgress:e,lessonId:t,updatedLessonProgress:c});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function OE(e,t){const n=e.lessons[t];if(!cn(n))return e;const s=To(n.items,(c,l)=>{const d={id:l.id,index:l.index};return[c,d]}),i={...Ks(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:s},a=St({courseProgress:e,lessonId:t,updatedLessonProgress:i});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:a})}function BE(e,{lessonId:t,itemId:n,selectedIndex:s,shuffledAnswerIndices:r}){const i=e.lessons[t];if(!cn(i))return e;const a=i.items[n];if(!a)return e;const c=r??a.shuffledAnswerIndices;if(s==null)return e;const l=Array.isArray(c)&&c[s]!=null?c[s]:s,d={...a,selectedIndex:l,...Array.isArray(c)&&{shuffledAnswerIndices:c}},h=Ea({lessonProgress:i,itemId:n,updatedProgressQuizItem:d}),m=St({courseProgress:e,lessonId:t,updatedLessonProgress:h});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:m})}function DE(e,{lessonId:t,itemId:n,matches:s}){const r=e.lessons[t];if(!cn(r))return e;const i=r.items[n];if(!i)return e;const a={...i,matches:s},c=Ea({lessonProgress:r,itemId:n,updatedProgressQuizItem:a}),l=St({courseProgress:e,lessonId:t,updatedLessonProgress:c});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function FE(e,{lessonId:t,timeRemaining:n}){const s=e.lessons[t];if(!cn(s))return e;const r={...s,timeRemaining:n},i=St({courseProgress:e,lessonId:t,updatedLessonProgress:r});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:i})}function _E(e,{lessonId:t,itemId:n,isCorrect:s,finalRetryAttempt:r,passToContinue:i}){const a=e.lessons[t];if(!cn(a))return e;const c=a.passingScore??80,l=a.items[n];if(!l)return e;const d={...l,isCorrect:s,isComplete:!0},h={...a.items,[n]:d},m=Object.keys(h).length,f=Object.values(h).filter(I=>I.isCorrect).length,p=Object.values(h).filter(I=>I.isComplete).length,v=Math.round(f/m*100),g=Math.round(p/m*100),x=p===m?100:Math.min(g,99);let y={...a,items:h,score:v,percentComplete:x};La(y)&&(y=Sl(y,{passingScore:c,passToContinue:i,finalRetryAttempt:r}));const S=St({courseProgress:e,lessonId:t,updatedLessonProgress:y});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:S})}function HE(e,{lessonId:t,itemId:n,selectedIndex:s,shuffledAnswerIndices:r}){const i=e.lessons[t];if(!cn(i))return e;const a=i.items[n];if(!a)return e;const c=r??a.shuffledAnswerIndices;if(s==null)return e;const l=Array.isArray(c)&&c[s]!=null?c[s]:s,d=a.selectedIndices??[],m=d.includes(l)?d.filter(y=>y!==l):[...d,l],{selectedIndices:f,...p}=a,v=m.length>0?{...p,selectedIndices:m,...Array.isArray(c)&&{shuffledAnswerIndices:c}}:{...p,...Array.isArray(c)&&{shuffledAnswerIndices:c}},g=Ea({lessonProgress:i,itemId:n,updatedProgressQuizItem:v}),x=St({courseProgress:e,lessonId:t,updatedLessonProgress:g});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:x})}function Sl(e,{passingScore:t,passToContinue:n,finalRetryAttempt:s}){if(e.reportResults||!La(e))return e;const r=PE(e),i=r>=t,a=n?i:!0;return dC(i,r,e.id,s),{...e,passed:i,isComplete:a,reportResults:!0,score:r,percentComplete:100}}function La(e){return Object.values(e.items).every(t=>t.isComplete===!0)}function Ea({itemId:e,lessonProgress:t,updatedProgressQuizItem:n}){return{...t,items:{...t.items,[e]:n}}}function VE(e,t){const{id:n,passed:s,passingScore:r,score:i,retryAttempts:a}=t,c=[s,a,i];if(!(c.length===3&&c.every(v=>v!=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:s,passingScore:r,percentComplete:100,retryAttempts:a,score:i};return{...e,lessons:{...e.lessons,[n]:f}}}function zE(e,{quizId:t,destinationId:n}){const s=Object.keys(e.lessons),r=s.findIndex(c=>c===t),i=s.findIndex(c=>c===n);return r===-1||i===-1||i<=r?e:s.slice(r+1,i).reduce((c,l)=>{const d=c.lessons[l];if(!d||d.isComplete)return c;const h=cn(d)?$E(d):lh(d),m=St({courseProgress:c,lessonId:l,updatedLessonProgress:h});return It({lessonId:l,prevCourseProgress:c,nextCourseProgress:m})},e)}function $E(e){const t=Object.fromEntries(Object.entries(e.items||{}).map(([n,s])=>[n,{...s,isComplete:!0,isCorrect:!0}]));return dC(!0,100,e.id,!1),{...e,items:t,isComplete:!0,passed:!0,percentComplete:100,reportResults:!0,score:100}}const UE=e=>{const t=e.padEnd(e.length+(4-e.length%4)%4,"="),n=atob(t),s=Uint8Array.from(n,r=>r.charCodeAt(0));return new TextDecoder().decode(s)},Cv=e=>{if(e!==void 0)return JSON.parse(UE(String(e)))},GE=(e,t)=>window.courseData?e(window.courseData):window.course?{course:e(window.course),media:[]}:t;var WE=C(2949),$e=C.n(WE),KE=C(27494),Dt=C.n(KE),QE=C(4656),hh=C.n(QE),ZE=C(85440),xv=C.n(ZE);const YE=["fromDashboard","locale","embed"];function qE(e,t){const n=typeof e=="function"?e(t):e;return typeof n=="string"?(0,Ae.Rr)(n):n}function mh(e,t){const n=qE(e,t),s=new URLSearchParams(t?.search||""),r=new URLSearchParams(n?.search||"");for(const i of YE){const a=s.get(i);a&&!r.has(i)?r.set(i,a):r.has(i)&&!r.get(i)&&r.delete(i)}return{...n,search:r.toString()}}function ln(){const e=(0,Ae.Zp)(),t=(0,Ae.zy)();return(0,u.useCallback)((n,s)=>{if(typeof n=="number")return e(n);const r=mh(n,t);return e(r,s)},[e,t])}function XE(e){function t(n){const s=(0,Ae.zy)(),r=ln(),i=(0,Ae.g)(),[a]=(0,Ae.ok)();return(0,o.jsx)(e,{...n,location:s,match:{params:i},navigate:r,queryParams:a})}return t.displayName=`withRouter(${e.displayName||e.name})`,t}function JE(e){return Object.fromEntries(new URLSearchParams(e.slice(1)))}var e9=C(62092),bv=C.n(e9),t9=C(62220),fh=C.n(t9),n9=C(16109),js=C.n(n9),s9=C(25784),Lo=C.n(s9),o9=C(62197),li=C.n(o9),r9=C(18793),zt=C.n(r9),i9=C(6964),a9=C.n(i9),c9=C(77233),Il=C.n(c9),Ume=C(67829),l9;function d9(...e){return $e()(...a9()(1,e))(Il()(e))}function ph(e,...t){return zt()(...t)(e)}function Gme(e,...t){return l9(...t)(e)}const dn=()=>{},yv={"Content-Type":"application/json"},u9=[(e,t)=>(t.Authorization=`Bearer ${Aa()}`,JSON.stringify(e))],h9=rs()(Dt(),ke(),Lo()(["data","status","statusText"])),m9=zt()(Lo()(["name","message","response"]),Gs()({response:h9})),f9=({baseURL:e,...t})=>$e()(ii()({headers:yv,transformRequest:u9}),ii()(t),Gs()({url:js()(e)})),p9=({data:e,method:t,url:n})=>fetch(n,{body:JSON.stringify(e),headers:{...yv,Authorization:`Bearer ${Aa()}`},keepalive:!0,method:t}).then(s=>s.json()).then(li()("data")),g9=ur().fromPromise(p9),v9=e=>({method:t,url:n})=>`${t}:${e}${n}`,C9=e=>{const t=new Error("Nil token detected");return Ws.L2.addError(t,e),ur().Rejected(t)},x9=e=>t=>e.preRequest?e.preRequest(t):t,b9=e=>t=>e.postRequest?e.postRequest(t):t,y9=()=>Dt()(Aa()),S9=e=>(t,n)=>bv()(t,v9(n),gh(Pa,e)),gh=(e,t)=>n=>ph(n,x9(t),f9(t),rs()(y9,C9,e),fh()(m9,et()("data")),b9(t)),I9=e=>({debounce:S9(e),send:gh(Pa,e),sendWithKeepAlive:gh(g9,e)});var T9=C(309),gr=C.n(T9);const L9=()=>document.visibilityState==="visible",E9=e=>gr()(L9,()=>e()),Sv=(e=>{document.addEventListener("visibilitychange",E9(e)),window.addEventListener("focus",()=>e())});C.dn(Sv);var k9=C(44113),Tn=C.n(k9),N9=C(34469),ka=C.n(N9),j9=C(92996),w9=C.n(j9),R9=C(14501),vr=C.n(R9);const A9=e=>({user_role:e?.is_business_creator?"Business Creator":"Creator",is_admin:!!e?.is_team_admin});var P9;const Iv=e=>{const t=e.user,n=t?.profile?.user_id,s=t?.subscription?.subscription_id||t?.subscription?.id,{user_role:r,is_admin:i}=A9(t?.subscription);return{application_source:"360_rise",application_service:"authoring",user_role:r,is_admin:i,reach_user_id:void 0,a360_user_id:n,user_permissions:t?.permissions||[],session_id:e?.user?.session,subscription_id:t?.subscription?.subscription_id||s,tenant_id:s,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}}}},Kme=e=>{const t=e.course;return{course_id:t?.id,course_locale:t?.locale||e.l10n&&P9(e.l10n)||null,course_created_via:t?.metadata?.createdVia??null,course_snapshot_id:t?.metadata?.restoredFromSnapshotId??null,copied_course_id:t?.copyOf??null}},Qme=(e,t)=>{if(!t)return{};const n=e?.lessons?.[t];if(!n)return{};const s=e?.course?.lessons?.indexOf(t)+1||null;return{lesson_id:t,lesson_type:n.type,lesson_position:s}},Zme=(e,t,n)=>{if(!t||!n)return{};const r=(e.lessons||{})[t];if(!r?.items)return{};const i=r.items.find(l=>l.id===n);if(!i)return{};const c=r.items.map(l=>l.id).indexOf(n)+1;return{block_id:n,block_type:i.type,block_variant:i.variant,block_family:i.family,block_position:c,block_created_via:i?.metadata?.createdVia??"manual"}},Yme=({interactionSetId:e,interactionSetWorkflowKey:t,taskType:n,resourceType:s,hasSourceContent:r}={})=>e?{interaction_set_id:e,...t&&{interaction_set_workflow_key:t},interaction_set_task_type:n,interaction_set_task_resource_type:s,interaction_set_has_source_content:r}:{},M9=()=>{if(!navigator.userAgent)return"unknown";const t=new hr.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:t.os?.name?t.os.name:t.browser?.name?t.browser.name:"unknown"},O9=()=>{if(!navigator.userAgent)return"unknown";const t=new hr.UAParser(navigator.userAgent).getResult();return t.device?.model&&t.os?.version?t.os.version:t.browser?.version?t.browser.version:"unknown"},B9=()=>{if(!navigator.userAgent)return"desktop";const t=new hr.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"desktop"},D9=()=>{if(!navigator.userAgent)return"unknown";const t=new hr.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"},F9=()=>{if(!navigator.userAgent)return"unknown";const t=new hr.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:"unknown"},Tv=()=>{if(!navigator.userAgent)return"browser";const t=new hr.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"browser"};function _9(e){return"userAgentData"in e}const Lv=()=>{if(_9(navigator))return{platform:navigator.userAgentData.platform,mobile:navigator.userAgentData.mobile,brands:navigator.userAgentData.brands}},Ev=()=>({name:M9(),version:O9(),type:B9(),manufacturer:D9(),model:F9()}),kv=()=>{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}},Nv=()=>navigator.userAgent||null,Cr=(e,t=null)=>{const n={...e,context:{locale:navigator.language,device:Ev(),channel:Tv(),userAgentData:Lv(),page:kv(),userAgent:Nv(),...e.context},properties:{...t?Iv(t):{},...e.properties}};return oh({method:"POST",url:`${Ne("RISE_RUNTIME_URI")}/analytics`,json:!0,data:n})},H9=Ne("SUBSCRIPTIONS_ENDPOINT"),V9=Ne("THREESIXTY_FRONTEND_URI"),z9=w9()(["error","status"],404),$9=$e()(li()("error"),et()("response")),U9=()=>window.location.href=V9,G9=[(e,t)=>(t.Authorization=`Bearer ${Aa()}`,e)],W9=async e=>{const t=`${H9}/users/authorized_status`,n=await Pa({transformRequest:G9,url:t}).toPromise().catch($9),s=$e()(e,xv()(i=>Cr({event:"Unexpected Logout",payload:{category:"auth",data:i,detail:"Subscription Error"}})));return Tn()([[z9,U9],[ka()("error"),s],[vr(),et()("data")]])(n)};function gt(e){const t={};for(const n in e)Object.hasOwn(e,n)&&(t[n]=n);return t}class K9 extends Error{constructor(t="Assert Error",n){super(t,n)}}function Xme(e,t="Assertion Error"){if(!e)throw new K9(t)}const Jme=null,$n={ARTICLE:"Article",INTERACTION:"Interaction",QUIZ:"Quiz",VIDEO:"Video"},Tl={EDITOR:1,MANAGER:2,OWNER:3},Q9={[Tl.EDITOR]:"Author",[Tl.MANAGER]:"Admin",[Tl.OWNER]:"Owner"},efe=Object.values(Tl).map(e=>({id:e,title:Q9[e]})),tfe="questionBanks",jv="2% 0px 2% 0px",nfe=9,sfe=13,ofe=27,rfe=32,ife=38,afe=40,lfe=864e5*3,dfe=100,wv="onePage",Z9="aiOutline",ufe="guide",vh="presentation",Y9="quickReference",Ch="scenario",hfe="video",Eo=gt({COMPACT:null,COVER:null,OVERLAY:null,SIDEBAR:null}),xr={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},mfe=Object.values(xr),ffe=null,At={DARK:"#000",LIGHT:"#fff"},Na={SMALL:{label:"Small",value:1},MEDIUM:{label:"Medium",value:1.5},LARGE:{label:"Large",value:2}},Rv=["embed","map","process","sorting","timeline","video","screencast","slidecast"];var q9;const pfe=e=>e.status==="active",X9=e=>e.status==="inactive",gfe=e=>e.plan==="individual",vfe=e=>e.features?.enable_review===!0,J9=e=>e.features?.enable_rise===!0,Cfe=e=>e.plan==="trial",ek=e=>e.plan==="trial"&&e.status==="inactive"&&e.is_retrial_eligible===!1,xfe=e=>e.plan==="team"||e.plan==="individual",bfe=e=>e.plan==="team"&&e.is_team_admin===!0,yfe=e=>e.plan==="trial"&&e.is_team_admin===!0,Sfe=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))/q9||0};var tk=C(7118),xh=C.n(tk),nk=C(13076),Av=C.n(nk),sk=C(81233),ja=C.n(sk),ok=C(66013),Bn=C.n(ok);const wa=(e,t)=>`${Ne("ID_MAPPER_URI")}/v1/avatars/${encodeURIComponent(e)}?size=${t}`,rk=e=>({large:wa(e,"large"),medium:wa(e,"medium"),micro:wa(e,"micro"),mini:wa(e,"mini"),small:wa(e,"small")}),ik=Av()({features:Bn()({},"features"),subscription:hh()(["features"])}),ak=xh()([ek,X9,ja()(J9)]),ck="/auth-callback",Pv="/auth-error",Ll=()=>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,s)=>{n==="dialog"&&s==="hide"&&(e(),clearTimeout(t))})}else e()}),bh=ck,lk=Pv,dk=Rt,Mv=()=>window.location.pathname===bh;let Ov=!1,yh=!1;const uk=e=>{if(Ov)return;const t=crypto.randomUUID();Ov=!0,window.localStorage.setItem(t,e);const n=z4({client_id:Ne("OKTA_CLIENT_ID"),issuer:Ne("OIDC_ISSUER_URI"),redirect_uri:`${window.location.origin}${bh}`,response_mode:"fragment",scope:Ne("OIDC_SCOPE"),state:t,prompt:null});Ll().then(()=>{window.location.href=n})},Bv=()=>{const e=new URLSearchParams(window.location.search),t=e.has("redirect_url")?e.get("redirect_url"):window.location.href;return uk(t)},hk=()=>sv().catch(e=>{e.response?.status===404&&br({onLogout:()=>window.location.reload(!0),reason:"Session expired"})}),mk=e=>(ai("unauthorized",e),()=>{H4("unauthorized",e)}),fk=()=>{if(yh)return;const e=fr(),t=sh();Dt()(e)?(Cr({event:"Unexpected Logout",payload:{category:"auth",userId:t,detail:"id from cookie was null"}}),Ws.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"id from cookie was null"}),yh=!0,br({onLogout:()=>window.location.reload(!0),reason:"Unexpected logout: user id/session cookie missing"})):e!==t&&(Cr({event:"Unexpected Logout",payload:{category:"auth",userId:e,idFromToken:t,detail:"Session/Token ID Mismatch"}}),Ws.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"Session/Token ID Mismatch"}),yh=!0,Ta().then(()=>window.location.reload(!0)))},Dv=async e=>{try{const[,t,n,s]=await Ta(),{aid:r,content_team_admin:i}=s;if(Cr({event:"Setting Session Cookie",payload:{category:"auth",userId:r,detail:"Resuming existing session"}}),k4(r),Mv()){e();return}const{first_name:a,last_name:c,launchdarkly:l,staff:d}=t,m={avatars:rk(r),first_name:a,user_id:r,last_name:c,staff:d,content_team_admin:i},f={author:r,profile:m},p=()=>br({onLogout:_e()(null)}),v=x=>e({...f,...ik(x),launchdarkly:l,token:n}),g=await W9(p).then(xv()(v)).catch(()=>e({...f,token:n}));if(ak(g)){Cr({event:"Unexpected Logout",payload:{category:"auth",userId:fr(),subscription:g,detail:"Invalid Subscription"}}),Ws.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",userId:fr(),detail:"Invalid Subscription"}),br({onLogout:()=>window.location=`${Ne("THREESIXTY_FRONTEND_URI")}/rise`});return}Sv(fk)}catch(t){Cr({event:"Unexpected Logout",payload:{category:"auth",userId:fr(),error:t,detail:"Error Resuming Session"}}),Ws.L2.addError(t,{type:"User Meta",userId:fr(),detail:"Error Resuming Session"}),br({onLogout:()=>window.location.reload(!0)})}},Fv=({onFetchTokens:e})=>{if(Mv()){Dv(e);return}const t=fr(),n=sh();if(Dt()(t)||t!==n){Ll().then(Bv);return}Dv(e)},br=({onLogout:e,reason:t})=>{t&&Cr({event:"Logout",payload:{category:"auth",userId:fr(),detail:t}});const n=Ne("RISE_AUTHORING_URI"),s=()=>I9({baseURL:n}).send({method:"DELETE",url:"/logout"}),r=()=>{N4(),j4(),nv().then(e)};s().fork(i=>{console.error("Failed to log out of rise-authoring-api",i),r()},r)},pk=(e,t)=>{Ll().then(()=>{const s=window.localStorage.getItem(t)||"/",r=s===e?"/":s;window.localStorage.removeItem(t),window.location.href=r})},gk=e=>()=>window.location.href=`${Pv}?description=${e}`,vk=({location:e})=>()=>{const{hash:t,pathname:n}=e,{state:s,error:r,error_description:i}=JE(t);r?(Ws.L2.addError(r,{type:"Logout Error",reason:"Error encountered when parsing auth callback.",error_description:i}),br({onLogout:gk(i),reason:`Error encountered when parsing auth callback. Error: ${r}; description: ${i}`})):Fv({onFetchTokens:()=>pk(n,s)})},Ck=XE(e=>((0,u.useEffect)(vk(e),[]),null)),xk=({dispatch:e,loadProfileOKTA:t})=>n=>{const s=hh()(["token"],n);$e()(e,t)(s)};var bk=C(76871),yk=C.n(bk),Sk=C(43420),yr=C.n(Sk),Ik=C(21239),Pt=C.n(Ik),Tk=C(8119),_v=C.n(Tk),Lk=C(53883),Ra=C.n(Lk);const El=async()=>{await Ll();const[e,t]=wt()(encodeURIComponent,_v()(["hash","pathname"],window.location));window.location.href=`/login#c=${t}${e}`},Hv=()=>{window.location.href="/"},Tfe=null,Lfe=null,Efe=Rt,kfe=El,Ek=nv,Nfe=()=>sv().catch(()=>Ek()),jfe=()=>dn,kk=zt()(Bn()([],"roles"),Ra()(yr()("author"),Hv)),Vv=zt()(Pt()("",["subscription","status"]),Ra()(yr()(yk(),["active","in_trial","non_renewing"]),Hv)),Nk=()=>window.location.reload(),wfe=async({onFetchTokens:e})=>{try{const[t,n]=await Ta(),{launchdarkly:s,riseId:r,sub:i,staff:a,subscription:c}=n,l={staff:a,user_id:r||i};return Vv(n),e({author:l.user_id,launchdarkly:s,profile:l,subscription:c,token:t}),ai("change:roles",kk),ai("change:status",Vv),ai("change:subdomain",Nk),ai("unauthorized",El),ai("session:closed",El),t}catch{El()}};var Rfe;const{callbackComponent:Afe,callbackPath:Pfe,getToken:Aa,initAuth:Mfe,login:Ofe,logout:Bfe,onSessionExpired:Dfe,refreshSession:Ffe,request:Pa}=lr;var zv;const $v=`${Ne("RBC_URI")}/api/partner_content`,jk=null,wk=e=>`${$v}/${e}`,Sh={transformRequest:[(e,t)=>(t.Authorization=`Bearer ${Aa()}`,e)],headers:{"Content-Type":"application/json"}},Vfe=()=>zv({...Sh,url:jk}).toPromise().then(e=>e.data?.types??[]),zfe=e=>zv({...Sh,url:wk(e)}).toPromise().then(t=>t.data?.content??[]),Rk=e=>Pa({method:"POST",url:$v,data:JSON.stringify({ids:e}),...Sh}).map(t=>t.data?.content??[]);var Ak=C(17193),di=C.n(Ak);const Uv=Ne("SERVICE_ENV")==="prod",kl=Uv?"com":"zone",Pk=zt()(JSON.stringify,di()(new RegExp(`https://images.riseusercontent.${kl}/`,"g"),`${Ne("IMAGES_URI")}/`),di()(new RegExp(`https://riseusercontent.${kl}/`,"g"),`${Ne("CDN_USER_CONTENT_URI")}/`),di()(new RegExp(`https://video.rise.${kl}/`,"g"),`https://video.riseusercontent.${kl}/`),gr()(_e()(!Uv),di()(new RegExp("https://video.rise.com/","g"),"https://video.riseusercontent.zone/")),JSON.parse);var Mk=C(47258),un=C.n(Mk),Ok=C(5136),Jt=C.n(Ok),Bk=C(15489),Nl=C.n(Bk),Dk=C(55066),Gv=C.n(Dk);const Fk=Lo(),Ih=ks(),Th=is(),Lh=Gv(),Wv=ii(),Ma=et(),_k=Gs(),Eh=wt(),jl=e=>e!=null&&typeof e=="object",Hk=e=>t=>Dt()(t)?t:e(t),Oa=e=>!!e,Kv={a:["activeIndex",ke()],vp:["audioVideoPlayhead",Number],c:["isComplete",Oa],n:["correctlyAnswered",ke()],p:["percentComplete",ke()],r:["retryAttempts",ke()],s:["score",ke()],t:["currentTime",ke()],v:["percentViewed",ke()],rr:["reportResults",ke()],pq:["passed",ke()],ps:["passingScore",ke()],qd:["questionsDrawn",ke()],ql:["questionList",Hk(wt()(wt()(ke())))],qt:["timeRemaining",Number]},Vk=e=>(t,n)=>{const[s,r]=Kv[n];return un()(s,r(t),e)},Qv=e=>(t,n)=>{const[s,r]=Wk[n],i=n==="i"?kh(t)(Ma("items",e)):r(t);return{[s]:i}},zk=e=>t=>{const n=e?.[String(t.index)];if(Dt()(n))return t;const s=Ih(Qv(t),jl(n)?n:{}),r=Lh(Th(s).filter(i=>i!=null&&typeof i=="object"));return Wv(t,r)},kh=e=>t=>Eh(zk(jl(e)?e:{}),jl(t)?t:{}),$k=e=>{const t=Ih(Qv(null),jl(e)?e:{});return Lh(Th(t).filter(n=>n!=null&&typeof n=="object"))},Uk=e=>t=>{const n=Ma("i",e),s=Ma("items",t),r=Fk(Nl()(Kv),e),i=Ih(Vk(t),r);let a=Lh(Th(i).filter(h=>h!=null&&typeof h=="object"));const c=e.ql,l=n!=null&&e.qd===!0&&Array.isArray(c)&&c.length>0&&c.every(h=>Array.isArray(h));if(!(n!=null&&Object.keys(n).length===0)&&!l&&(a=un()("items",kh(n??{})(s),a)),a=Wv(t,a),l){const h=Eh($k,n??{});return un()("originalItemProgress",h,a)}return a},Gk=(e,t)=>{const n=Ma("lessons",t),s=i=>{const a=Ma(String(i.index),n);return Dt()(a)?i:Uk(a??{})(i)};if(Jt()(n))return e;const r=_k({lessons:i=>Eh(s,i)},e);return un()("percentComplete",Bn()(0,"p",t),r)},Wk={vp:["audioVideoPlayhead",Number],n:["correctlyAnswered",ke()],c:["isComplete",Oa],k:["isCorrect",Oa],is:["isSubmitted",Oa],v:["isViewed",Oa],i:["items",kh],pv:["percentViewed",ke()],m:["matches",ke()],sr:["response",ke()],r:["retryAttemptCount",Number],s:["selectedIndex",ke()],x:["selectedIndices",ke()],sa:["shuffledAnswerIndices",ke()],t:["text",ke()]};var Kk=C(87396),ko=C.n(Kk),Qk=C(56890),Zv=C.n(Qk);const Yv=Lo(),Zk=Zv(),qv=ks(),Nh=is(),jh=Gv(),wh=et(),Yk=wt(),qk=e=>e!=null&&typeof e=="object",Xv=e=>!!ko()(Dt(),Jt())(e),Xk=e=>t=>Dt()(t)?t:e(t),Jv={activeIndex:["a",ke()],audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",ke()],currentTime:["t",ke()],isComplete:["c",Number],passingScore:["ps",ke()],percentComplete:["p",ke()],percentViewed:["v",ke()],retryAttempts:["r",ke()],score:["s",ke()],questionsDrawn:["qd",ke()],questionList:["ql",Xk(wt()(wt()(ke())))],reportResults:["rr",ke()],passed:["pq",ke()],timeRemaining:["qt",Number]},Jk=(e,t)=>{const[n,s]=nC[t];return{[n]:s(e)}},eC=e=>{const t=Yv(Nl()(nC),e),n=Zk(Jt(),t),s=jh(Nh(qv(Jk,n)).filter(r=>r!=null&&typeof r=="object"));return Jt()(s)?s:li()(String(wh("index",e)),s)},tC=e=>{const t=Yk(eC,qk(e)?e:{});return jh(Nh(t).filter(n=>n!=null&&typeof n=="object"))},eN=e=>{const t={};for(const[n,s]of Object.entries(e))s==null||typeof s!="object"||Object.assign(t,eC({...s,index:n}));return t},tN=(e,t)=>{const[n,s]=Jv[t];return{[n]:s(e)}};function nN(e){const t=wh("items",e),n=wh("index",e),s=e.originalItemProgress,r=s!=null&&Object.keys(s).length>0?eN(s):Xv(t)?t:tC(t??{}),i=jh(Nh(qv(tN,Yv(Nl()(Jv),e))).filter(c=>c!=null&&typeof c=="object")),a=Xv(r)?i:un()("i",r,i);return li()(String(n),a)}const sN=e=>li()("p",Bn()(0,"percentComplete",e)),nC={audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",ke()],isComplete:["c",Number],isCorrect:["k",Number],isSubmitted:["is",ke()],isViewed:["v",Number],items:["i",tC],matches:["m",ke()],percentViewed:["pv",ke()],retryAttemptCount:["r",Number],selectedIndex:["s",ke()],selectedIndices:["x",wt()(Number)],shuffledAnswerIndices:["sa",wt()(Number)],text:["t",ke()],response:["sr",ke()]},oN=e=>`${Ne("CDN_USER_CONTENT_URI")}/${e}`,rN=()=>!!window.shareId,sC=()=>!!window.contentId,oC=()=>!!window.snapshotId,iN=()=>!!window.shareId&&!!window.hasPassword,aN=e=>sC()?Pk(e):e,cN=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),rC=e=>{if(!cN(e))throw new Error("Invalid course payload");return e},lN={fetch:()=>Rh.isExport?.()||window.courseData||window.course?Promise.resolve(GE(Cv,{})).then(rC):oh({method:"GET",url:window.shareId?`${Ne("RISE_RUNTIME_URI")}/boot/share/${window.shareId}`:sC()?`${Ne("RISE_RUNTIME_URI")}/boot/businessContent/${window.contentId}`:oC()?`${Ne("RISE_RUNTIME_URI")}/boot/snapshot/${window.snapshotId}`:`${Ne("RISE_RUNTIME_URI")}/boot/${window.courseId}`,json:!0,withCredentials:!0,timeout:3e4}).then(W4).then(t=>typeof t=="object"?t:Cv(t)).then(rC).then(aN),fetchPartnerContent:e=>Rh.isExport?.()||window.partnerContent?window.partnerContent.content:Rk(e).toPromise(),getDeliveryMode:()=>"hosted",getEnv:Ne,isPasswordProtected:iN,isShare:rN,isSnapshotPreview:oC,resolvePath:oN,verifySharePassword:e=>oh({method:"POST",url:`${Ne("RISE_RUNTIME_URI")}/password`,data:{shareId:window.shareId,password:e},json:!0}).then(t=>t.body)},dN=(e,{id:t,type:n,...s})=>n==="quiz"?VE(e,{id:t,...s}):gv(e,t),uN=(e,t)=>e+((t||{}).c||0),hN=(e,t)=>(n,{id:s,type:r,...i})=>t.lessons[s]?{...n,...e(dN(t,{id:s,type:r,...i}).lessons[s])}:n,mN=(e,t,n)=>{const s=t.reduce(hN(e,n),{}),r=Object.keys(n.lessons||{}).length,i=Object.values(s).reduce(uN,0),a=Math.round(i/r*100);return{lessons:s,p:a}};window.Rise=Object.assign(window.Rise||{},{completeLessons:mN,decodeCourseProgress:Gk,encodeCourseProgress:sN,encodeLessonProgress:nN});const Rh={...lN,...window.Runtime??{}},be=Rh;var iC;const aC=e=>be.getMasteryScore!=null?be.getMasteryScore(e):e.passingScore,fN=e=>{if(be.onCreateHistory!=null)return be.onCreateHistory(e)},cC=(e={},t)=>be.fetch!=null?Promise.resolve(t==null?be.fetch():be.fetch(t)):Promise.resolve(e),pN=(e=[])=>{if(be.fetchPartnerContent!=null)return be.fetchPartnerContent(e)},gN=e=>{if(be.bookmark!=null)return be.bookmark(e)},lC=e=>be.getProgress!=null?be.getProgress(e):e,vN=e=>be.setLessonComplete!=null?be.setLessonComplete(e):e,CN=e=>be.setLessonProgress!=null?be.setLessonProgress(e):e,xN=(e,t)=>be.setCourseProgress!=null?be.setCourseProgress(e,t):e,bN=e=>{if(be.finish!=null)return be.finish(e)},yN=()=>window.viewType!=="preview"&&be.finishQuiz!=null,dC=(e,t,n,s)=>{be.finishQuiz!=null&&be.finishQuiz(e,t,n,s)},SN=(e,t,n,s)=>{be.finishStoryline!=null&&be.finishStoryline(e,t,n,s)},uC=()=>be.isComplete!=null?be.isComplete():null,Kfe=()=>iC.getDeliveryMode!=null?iC.getDeliveryMode():"hosted",IN=()=>be.isExport!=null?be.isExport():!1;function hC(){if(be.isExport!=null){const e=window.partnerContent?.content;return be.isExport()&&!!e}return!1}const Ah=()=>be.isShare!=null?be.isShare():!1,TN=()=>be.isSnapshotPreview!=null?be.isSnapshotPreview():!1,mC=()=>be.isPasswordProtected!=null?be.isPasswordProtected():!1,fC=e=>{const t=e||"";return be.resolvePath!=null?t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:be.resolvePath(t):t.startsWith("data:")||t.startsWith("http")||t.startsWith("//")?t:`/${t}`},LN=e=>be.verifySharePassword!=null?be.verifySharePassword(e):Promise.resolve({isValid:!0}),pC=e=>{if(be.reportAnswer!=null){const{id:t,isCorrect:n,isUnfinished:s=!1,item:r,itemProgress:i,duration:a,retryAttempts:c,title:l}=e,{id:d,title:h,type:m}=r;return be.reportAnswer({id:t,type:m,isCorrect:n,itemId:d,questionTitle:In(h),quizTitle:In(l),retryAttempts:c,answers:p4(r),correctResponse:g4(r),response:v4({isUnfinished:s,item:r,itemProgress:i}),isUnfinished:s,latency:f4(a)})}return!1},Ba=e=>{if(be.startLesson!=null)return be.startLesson(e)},EN=e=>{be.startQuiz!=null&&be.startQuiz(e)},Sr=e=>{if(be.endLesson!=null)return be.endLesson(e)},kN=()=>{if(be.getLocale!=null)return be.getLocale()},NN=e=>{if(be.setLocale!=null)return be.setLocale(e)},{browser:gC,os:vC}=new hr.UAParser(window.navigator.userAgent).getResult(),jN=e=>{if(be.sendTelemetry!=null)return be.sendTelemetry({...e,browser:{name:gC.name??"",version:gC.version??""},os:{name:vC.name??"",version:vC.version??""}})};var CC=C(99953),wN=C(94789),RN=C(96719),AN=C(51133),PN=C(79968),MN=C(56680),Ph=C(19268),Da=C(29160),ON=C(27765);CC.A.register(wN.A),CC.A.register(RN.A);function No(...e){try{return(0,AN.Ay)(...e)}catch{return null}}const as=(e,t)=>{const n=No(t);return n==null?null:(0,Da.A)((0,Ph.jh)(n,No("#ffffff"),e),{format:"hex",collapse:!1})},Mh=e=>as(.9,e);var BN=C(45524),hn=C.n(BN),DN=C(17618),FN=C.n(DN),_N=C(3165),Oh=C.n(_N),on=C(96804);const HN=$e()(yr()(".svg"),e=>e??"",Bn()("","originalUrl")),VN=rs()(HN,_e()({width:"500rem"}),_e()({})),jo=e=>{if(e){const t=e.trim();if(t!==""&&t!=='""')return e}return""},xC=e=>jo(e)||void 0,bC=e=>e?"img":void 0,yC=e=>zt()(Bn()("","originalUrl"),t=>t??"",Oh()("."),Il(),hn()(e)),zN=yC("svg"),Qfe=yC("gif"),$N=/\.svg$/i,SC=e=>$N.test(e),UN=null,Zfe=e=>UN[e]||"left",GN=(e,t)=>{const n=FN()(e,t);return n.media.image.key===t.media.image.key&&Object.assign(n.media.image,{crushedKey:t.media.image.key,useCrushedKey:!0}),n},WN=({src:e,alpha:t})=>({alpha:t,media:{image:{key:KN(e),src:e}}}),KN=e=>typeof e!="string"?"":e.startsWith("http")?new URL(e).pathname.slice(1):e,QN=(({coverImageAlpha:e,coverImage:t})=>({alpha:e,src:t})),ZN=(({lessonHeaderImageAlpha:e,lessonHeaderImage:t})=>({alpha:e,src:t})),IC=(e,t)=>(n,s)=>{const r=n[t];if(n?.theme){const i=s?s(r?.media):r?.media;if((0,on.uW)(i))return r;const a={...r,media:{...i}},c=WN(e(n.theme));return GN(a,c)}else return r},TC=IC(QN,"coverImage"),LC=IC(ZN,"lessonHeaderImage"),Yfe=async e=>{const t=new Image;return t.src=e,await t.decode(),t},ne={RISE_CLASSIC:"classic",APEX:"organic",HORIZON:"imaginative"},YN="#ff631e",qfe=3,Xfe=17,Jfe=32,epe=24,tpe=50,npe=.6,spe="right",qN="rounded",XN=[{color:"#4baaf4",name:"Sky"},{color:"#285f9f",name:"Blueberry"},{color:"#7837a8",name:"Jelly"},{color:"#d84738",name:"Cherry"},{color:"#ff631e",name:"Tangerine"},{color:"#25bb64",name:"Basil"}],ope="#ffffff",rpe=J0()("color",XN),ipe="#000",ape="#fff",cpe="Rise",oe=gt({ACCENT:null,BLACK:null,COLOR:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),Fa=gt({LARGE:null,MEDIUM:null,SMALL:null}),_a=gt({STEPPED:null,CONTINOUS:null}),Bh=gt({NUMBERS:null,DOTS:null,NONE:null}),Ir=gt({COMPACT:null,OVERLAY:null,SIDEBAR:null}),Qs=gt({DARK:null,DARK_IMAGE:null,LIGHT:null,LIGHT_IMAGE:null}),Tr=gt({DARK:null,DARK_ACCENT:null,DARK_IMAGE:null,LIGHT:null,LIGHT_ACCENT:null,LIGHT_IMAGE:null}),wo={FREE:"free",RESTRICTED:"restricted"},Lr=gt({ACCENT:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),ct=gt({THEME_DEFAULT:null,CIRCULAR_FILL:null,INCOMPLETE_COMPLETE:null}),Ha=gt({ACCENT:null,DARK:null,LIGHT:null,TINT:null}),Zs=gt({FULL:null,FLOATING:null,FLOATING_FULL:null}),ce=gt({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}),Va=gt({TOP_LEFT:null,TOP_RIGHT:null,BOTTOM_LEFT:null,BOTTOM_RIGHT:null}),JN={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right"},lpe=!0,e8=Va.BOTTOM_RIGHT,dpe=[{text:"Top left",type:Va.TOP_LEFT},{text:"Top right",type:Va.TOP_RIGHT},{text:"Bottom left",type:Va.BOTTOM_LEFT},{text:"Bottom right",type:Va.BOTTOM_RIGHT}],upe={default:[{text:"Centered",type:ce.CENTERED},{text:"Centered overlay",type:ce.CENTERED_OVERLAY},{text:"Left",type:ce.LEFT},{text:"Left overlay",type:ce.LEFT_OVERLAY},{text:"Split left image",type:ce.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ce.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:ce.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:ce.TWO_THIRDS_RIGHT_IMAGE}],classic:[{text:"Centered",type:ce.CENTERED},{text:"Centered overlay",type:ce.CENTERED_OVERLAY},{text:"Left",type:ce.LEFT},{text:"Left overlay",type:ce.LEFT_OVERLAY},{text:"Split left image",type:ce.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ce.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:ce.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:ce.TWO_THIRDS_RIGHT_IMAGE}],organic:[{text:"Centered",type:ce.CENTERED},{text:"Centered overlay",type:ce.CENTERED_OVERLAY},{text:"Left",type:ce.LEFT},{text:"Left overlay",type:ce.LEFT_OVERLAY},{text:"Split left",type:ce.SPLIT_LEFT},{text:"Split right",type:ce.SPLIT_RIGHT},{text:"Split left image",type:ce.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ce.SPLIT_RIGHT_IMAGE}],imaginative:[{text:"Centered",type:ce.CENTERED},{text:"Centered overlay",type:ce.CENTERED_OVERLAY},{text:"Centered image",type:ce.CENTERED_IMAGE},{text:"Centered accent tint",type:ce.CENTERED_ACCENT_TINT},{text:"Split left image",type:ce.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ce.SPLIT_RIGHT_IMAGE},{text:"Two-thirds left image",type:ce.TWO_THIRDS_LEFT_IMAGE},{text:"Two-thirds right image",type:ce.TWO_THIRDS_RIGHT_IMAGE}]},hpe=null,mpe=null,t8=[{text:"Image",type:ce.IMAGE},{text:"Accent",type:ce.ACCENT},{text:"White",type:ce.WHITE}],fpe=[{text:"Video",type:ce.VIDEO},...t8],ui={CLOSED:"closed",HIDDEN:"hidden",OPEN:"open"},Ee=gt({AUTO:null,BLACK:null,LIGHT:null,DARK:null}),n8=gt({ROUNDED:null,SQUARED:null}),s8=gt({ROUNDED:null,SQUARED:null}),o8=gt({FLOATING:null,FULL:null}),vt=gt({ACCENT:null,DARK:null,LIGHT:null}),ppe=[{value:Ee.AUTO,label:"Auto"},{value:Ee.DARK,label:"Dark"},{value:Ee.LIGHT,label:"Light"}],Xe={accentContrast:Ee.AUTO,allowSearch:!0,animateBlockEntrance:!0,blockBackgroundColor:null,blockBackgroundColorContrast:Ee.AUTO,blockBackgroundType:oe.LIGHT,blockContinueCompletionType:"",blockContinueCompleteHint:"Complete the content above before moving on.",blockContinueLabel:"Continue",blockCorners:n8.ROUNDED,blockPaddingEnd:3,blockPaddingStart:3,blockTextBackgroundColor:null,blockTextBackgroundColorContrast:Ee.AUTO,blockTextBackgroundType:oe.LIGHT,blockTextBodyFontSize:17,blockTextHeadingFontSize:32,blockTextPaddingEnd:3,blockTextPaddingStart:3,blockTextSubheadingFontSize:24,buttonInlineStyle:s8.ROUNDED,buttonNavigationStyle:o8.FULL,buttonScheme:Ha.LIGHT,colorAccent:YN,compactShowLessonCount:!0,coverImageAlpha:50,coverPageType:ce.SPLIT_LEFT_IMAGE,customColorLessonHeaderContrast:Ee.AUTO,enableVideoPlaybackSpeed:!0,lessonHeaderImageAlpha:.6,lessonHeaderImageColor:vt.DARK,lessonHeaderSize:Fa.MEDIUM,lessonHeaderStyle:oe.LIGHT,markLessonsComplete:!1,navigation:!0,navigationRestricted:!1,navigationSectionsExpanded:!0,navigationStyle:Qs.LIGHT,navigationType:Ir.SIDEBAR,progressIndicatorStyle:ct.THEME_DEFAULT,showAuthor:!0,showLessonCount:!0,showNavigationButtons:!0,showStartButton:!0,sidebarStartsOpen:!0,themeId:ne.RISE_CLASSIC},gpe=null,r8=["bodyTypeface","coverImage","experiments","headingTypeface","lessonHeaderImage","media","theme","uiTypeface"],i8=e=>e.theme?.colorAccent||e.color||Xe.colorAccent,EC=e=>e.theme?.navigationRestricted??Xe.navigationRestricted?wo.RESTRICTED:wo.FREE,kC=e=>e.theme?.sidebarStartsOpen??Xe.sidebarStartsOpen?ui.OPEN:ui.CLOSED,a8=e=>e.theme?.showLessonCount??e.showLessonCount??Xe.showLessonCount,c8=({sidebarMode:e})=>e!==ui.HIDDEN,l8=({navigationMode:e})=>e===wo.RESTRICTED,d8=({sidebarMode:e})=>e===ui.OPEN,u8=e=>e.coverImage?.media?.image?Qs.LIGHT_IMAGE:Qs.LIGHT,h8=e=>e.coverImage?.media?.image?ce.LEFT_OVERLAY:ce.LEFT,Ys=(e,t)=>t[e]??t.theme?.[e]??Xe[e],NC=e=>{const t=kC(e),n=EC(e),s={allowSearch:Ys("allowSearch",e),animateBlockEntrance:Ys("animateBlockEntrance",e),bodyTypefaceId:e.bodyTypefaceId,colorAccent:(e.color||"").toLowerCase(),compactShowLessonCount:Ys("compactShowLessonCount",e),coverImageDefault:null,coverPageType:h8(e),enableVideoPlaybackSpeed:Ys("enableVideoPlaybackSpeed",e),headingTypefaceId:e.headingTypefaceId,markLessonsComplete:Ys("markComplete",e),navigation:c8({sidebarMode:t}),navigationSectionsExpanded:Ys("navigationSectionsExpanded",e),navigationRestricted:l8({navigationMode:n}),navigationStyle:u8(e),showAuthor:Ys("showAuthor",e),showLessonCount:Ys("showLessonCount",e),showNavigationButtons:Ys("showNavigationButtons",e),sidebarStartsOpen:d8({sidebarMode:t}),uiTypefaceId:e.uiTypefaceId},r={...Xe,...s};return{...e,theme:{...r,isLegacyCourse:!0}}},Dh=e=>{const t=i8(e),n={allowSearch:e.theme?.allowSearch??Xe.allowSearch,animateBlockEntrance:e.theme?.animateBlockEntrance??Xe.animateBlockEntrance,buttonNavigationStyle:e.theme?.buttonNavigationStyle??Xe.buttonNavigationStyle,buttonScheme:e.theme?.buttonScheme??Xe.buttonScheme,color:t,colorAccentTint:t?Mh(t):void 0,coverImage:TC(e),coverPageType:e.theme?.coverPageType??Xe.coverPageType,enableVideoPlaybackSpeed:e.theme?.enableVideoPlaybackSpeed??Xe.enableVideoPlaybackSpeed,lessonHeaderImage:LC(e),lessonHeaderSize:e.theme?.lessonHeaderSize??Xe.lessonHeaderSize,lessonHeaderStyle:e.theme?.lessonHeaderStyle??Xe.lessonHeaderStyle,markComplete:e.theme?.markLessonsComplete??Xe.markLessonsComplete,navigation:e.theme?.navigation??Xe.navigation,navigationSectionsExpanded:e.theme?.navigationSectionsExpanded??Xe.navigationSectionsExpanded,navigationMode:EC(e),navigationRestricted:e.theme?.navigationRestricted??Xe.navigationRestricted,navigationStyle:e.theme?.navigationStyle??Xe.navigationStyle,navigationType:e.theme?.navigationType??Xe.navigationType,progressIndicatorStyle:e.theme?.progressIndicatorStyle??ct.THEME_DEFAULT,themeId:e.theme?.themeId??Xe.themeId,showAuthor:e.theme?.showAuthor??Xe.showAuthor,showLessonCount:a8(e),showStartButton:e.theme?.showStartButton??Xe.showStartButton,sidebarMode:kC(e),sidebarStartsOpen:e.theme?.sidebarStartsOpen??Xe.sidebarStartsOpen,showNavigationButtons:e.theme?.showNavigationButtons??Xe.showNavigationButtons};return{...e,...n}},m8=({course:e,updates:t})=>{const n=Object.fromEntries(Object.entries(t||{}).filter(([r])=>r8.includes(r))),s={...e,...n};return Dh(s)},f8={padding:"medium",alignment:"left"},p8={embed:{aspectRatio:"16:9"},video:{},labeledgraphic:{hotspotStyle:"numbers"},process:{navigation:"stepped"},sorting:{feedback:"immediate"},timeline:{orientation:"vertical"},paragraph:{fontSize:"medium"}},cs=(e,t=0)=>`item_${e}_${t}`,wl=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),g8=e=>Rv.some(t=>t===e),jC=e=>wl(e)&&(typeof e.id=="string"||typeof e.id=="number")&&g8(e.type),za=e=>Array.isArray(e)?e.filter(wl):[],wC=(e,t)=>[{id:cs(`${t}_placeholder`,0),placeholder:!0,type:e,title:`Add ${e} content`}],Er=e=>({...f8,...p8[e]??{}}),v8=e=>typeof e=="string"?e.replace(/<p><br><\/p>/g,""):e,RC=e=>e.map(t=>{if(t&&typeof t=="object"&&!Array.isArray(t)){const n={};for(const[s,r]of Object.entries(t))n[s]=v8(r);return n}return t}),C8=e=>["Introduction","Summary"].map((t,n)=>({id:cs(`${e}_process`,n),title:t,type:t.toLowerCase(),description:null,isHidden:!0})),x8=(e,t)=>[{id:cs(`${t}_text`,0),paragraph:e}],b8=(e,t)=>[...C8(t),...e],y8=(e,t)=>[{id:cs(`${t}_video`,0),caption:"",media:e}],S8=(e=[],t)=>({family:"multimedia",id:cs(`${t}_embed`,0),items:e.length?e:wC("embed",t),media:{},settings:Er("embed"),type:"multimedia",variant:"embed"}),I8=(e,t,n)=>({family:"interactive-fullscreen",id:cs(`${n}_labeledgraphic`,0),items:e,media:t,settings:Er("labeledgraphic"),type:"interactive",variant:"labeledgraphic"}),T8=(e,t)=>({family:"interactive-fullscreen",id:cs(`${t}_process`,0),items:RC(e),media:{},settings:Er("process"),type:"interactive",variant:"process"}),L8=({items:e,piles:t},n)=>({family:"interactive-fullscreen",id:cs(`${n}_sorting`,0),items:e,media:{},piles:t,settings:Er("sorting"),type:"interactive",variant:"sorting"}),E8=(e,t)=>({family:"text",id:cs(`${t}_text`,0),items:RC(e),settings:Er("paragraph"),type:"text",variant:"paragraph"}),k8=(e,t)=>({family:"interactive-fullscreen",id:cs(`${t}_timeline`,0),items:e,media:{},settings:Er("timeline"),type:"interactive",variant:"timeline"}),N8=(e,t={},n)=>({family:"multimedia",id:cs(`${n}_video`,0),items:wl(e)&&e.video?y8(e,n):wC("video",n),media:{},settings:{...wl(t)?t:{},...Er("video")},type:"multimedia",variant:"video"}),j8=(e,t)=>{const n=za(e.items);return S8(n.map(({icon:s,...r})=>r),t)},w8=(e,t)=>I8(za(e.items).map(({hasMedia:n,...s})=>s),e.media,t),R8=(e,t)=>{const n=za(e.items).map(s=>({...s,isHidden:!1,type:"step"}));return T8(b8(n,t),t)},A8=(e,t)=>k8(za(e.items).map(({linePosition:n,...s})=>s),t),P8=(e,t)=>E8(x8(e,t),t),M8=(e,t)=>{const n=e.type;switch(n){case"embed":return j8(e,t);case"map":return w8(e,t);case"process":return R8(e,t);case"sorting":return L8({items:za(e.items),piles:e.piles},t);case"timeline":return A8(e,t);case"screencast":case"slidecast":case"video":return N8(e.media,e.settings,t);default:throw new Error(`Unknown legacy lesson type: ${n}`)}},O8=e=>jC(e),B8=e=>{if(!jC(e))return e;const t=String(e.id),n={description:"",icon:"Article",type:"blocks"},s=[M8(e,t)],r=typeof e.description=="string"?e.description.trim():"";return r&&s.unshift(P8(r,`${t}_desc`)),{...e,...n,items:s,media:{}}},AC=e=>`rise/rise-com/${e}`,PC=AC("FAVORITE_ADDED"),MC=AC("FAVORITE_REMOVED"),D8=()=>(0,he.action)(PC,void 0),F8=()=>(0,he.action)(MC,void 0),OC=(e=>`rise/partnerContent/${e}`)("SET_ALL_PARTNER_CONTENT"),Ro=(e=>`rise/status/${e}`)("SET_LOADED"),_8=(e,t)=>({...e,...t}),H8={connection:"connected",courseLoaded:!1,fatalError:!1,runtimeFetchError:null,fontsLoaded:!1,notFound:!1,partnerContentLoaded:!1},V8=(0,he.handle)(H8,{[Ro]:_8}),z8=(e=!1)=>(0,he.action)(Ro,{fontsLoaded:e}),$8=(e=!1)=>(0,he.action)(Ro,{courseLoaded:e}),U8=(e=!1)=>(0,he.action)(Ro,{coverLoaded:e}),G8=(e=null)=>(0,he.action)(Ro,{runtimeFetchError:e}),W8=(e=!1)=>(0,he.action)(Ro,{notFound:e}),K8=(e=!1)=>(0,he.action)(Ro,{fatalError:e}),BC=(e=!1)=>(0,he.action)(Ro,{partnerContentLoaded:e}),Rl=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Fh=e=>{if(e!=null){if(!Array.isArray(e))throw new TypeError("Partner content items must be an array");return Array.from(e)}};function Q8({course:e,lessons:t}){const n=Fh(t),s=[];for(const r of n??[])if(Rl(r)){for(const i of Fh(r.items)??[])if(Rl(i))for(const a of Fh(i.items)??[])Rl(a)&&typeof a.partnerContentId=="string"&&a.partnerContentId&&s.push(a.partnerContentId)}return Rl(e)&&typeof e.partnerContentId=="string"&&e.partnerContentId&&s.push(e.partnerContentId),Array.from(new Set(s))}const Z8=e=>typeof e=="string"&&e.length>0,xpe=`${Ne("CDN_URI")}/assets/rise/assets/themes/thumbnails/sample-avatar.jpeg`,bpe=gt({ACTIVE:null,PREVIEW:null}),ype=({themeCoverImage:e,coverImageDefault:t})=>Z8(t)?t:e,Y8=e=>({...e,theme:{...e?.theme,hideLessonHeaders:e?.theme?.hideLessonHeaders??!1,showStartButton:e?.theme?.showStartButton??!0}}),me={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"},kr={SUMMARY:"SUMMARY",REMAINING:"REMAINING",ELAPSED:"ELAPSED",ELAPSED_TOTAL:"ELAPSED_TOTAL",HIDE_TIMER:"HIDE_TIMER"},q8={CONTINUE:"continue",NONE:""},Oe={ALL:"all",NONE:"none",INCORRECT:"incorrect"},Spe=10,Ipe=80,Tpe=500;var Lpe;const X8=Tn()([[xh()([hn()(!0),hn()(Oe.ALL)]),_e()(Oe.ALL)],[xh()([hn()(!1),hn()(Oe.NONE)]),_e()(Oe.NONE)],[hn()(Oe.INCORRECT),_e()(Oe.INCORRECT)],[vr(),_e()(Oe.ALL)]]),Epe="draw from question bank",kpe="fillin",Npe="matching",jpe="multiple choice",wpe="multiple response",Rpe=null;var J8=C(92324),_h=C.n(J8);const Hh=(e,t)=>e!=null&&typeof e=="object"?Reflect.get(e,t):void 0,$a=e=>Hh(e,"family")==="knowledgeCheck"&&!!Hh(Hh(e,"settings"),"requireCorrectAnswer"),Vh={LESSON:"lesson",QUIZ:"quiz",SECTION:"section"},Nr={KNOWLEDGE_CHECK:"KNOWLEDGE_CHECK",ORDER:"ORDER",QUIZ:"QUIZ"},Ln=(e,t)=>`/lessons/${encodeURIComponent(e)}${t?`/${encodeURIComponent(t)}`:""}`,Ua="progress-summary",DC=Ln(Ua),zh="lesson:",Al="#/lessons/",$h="/lessons/",Ape=e=>`${Al}${e}`,Ppe=e=>e.startsWith(zh)||e.startsWith(Al)||e.startsWith($h),Mpe=e=>e.startsWith(zh)?e.slice(zh.length):e.startsWith(Al)?e.slice(Al.length).split("/")[0]:e.startsWith($h)?e.slice($h.length).split("/")[0]:e,e7=e=>e.type===Vh.SECTION,t7=e=>e.type===Vh.QUIZ,n7=e=>e.settings?.passToContinue===!0,FC=e=>e?.items?.find(t=>$a(t)),hi=e=>e!=null&&(e.type!=="quiz"||e.settings?.asLesson!==!1),s7=e=>e!=null&&e.type==="blocks",o7=e=>{const t=_h()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.reduce((n,s)=>(s!=null&&n.push(r7(s)),n),[])),t},r7=e=>{const t=_h()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.filter(Boolean)),t};var i7=C(11620),a7=C.n(i7);const _C="^1.9.0";class Uh extends Error{}function c7(e){try{if(e==null)return;if(typeof e!="object"||!("version"in e)||typeof e.version!="string")throw new Uh("Missing Runtime.version");if(!a7()(e.version,_C))throw new Uh(`Runtime.version ${e.version} does not satisfy ${_C}`)}catch(t){console.warn(t)}}const Ao="rise/course/LOAD_COURSE",l7="rise/course/UPDATE_COMPLETED_AT",Pl="rise/course/UPDATE_COURSE_PREVIEW",HC="rise/course/UPDATE_LESSON_PREVIEW",Gh="rise/course/APPLY_CHANGESET",d7="COURSE_REQUIRES_LMS";let Wh;(async()=>{try{({applyReviewDataToManifest:Wh}=await C.e("webpack_container_remote_mondrian_learn-react").then(C.t.bind(C,4246,23)))}catch{}})();const Ga=$L(),u7=e=>{if("settings"in e&&e.settings&&tt(e.settings)&&"revealAnswers"in e.settings){const n=e.settings;return{...e,settings:{...e.settings,revealAnswers:X8(n.revealAnswers)}}}return e},h7=e=>s7(e)?o7(e):e,VC=e=>h7(u7(e)),m7=e=>({...e,lessons:e.lessons?.map(VC)||[]}),f7=e=>{const t=e.lessons?.filter(n=>n.type!=="section")||[];return{...e,lessonsOnly:t}},p7=e=>e.theme==null,g7=e=>Dh(NC(e)),v7=e=>p7(e)?g7(e):Dh(e),C7=e=>Y8(v7(e)),x7=(e,t)=>{let n=(0,yo.TJ)(["course"],t,e).result;const s=(0,yo.TJ)(["lessons"],t,n.lessons).result;return t.some(r=>r.path[0]==="mondrian")&&n.mondrian&&Wh&&(n={...n,mondrian:Wh(n.mondrian,t)}),{...n,lessons:s}},b7=e=>({...e,lessons:e.lessons?.map(B8)||[]}),y7=(e,{completedAt:t,course:n,favoritedAt:s,riseComCurrentUser:r,riseComCourseId:i,riseComEnrollmentType:a,riseComLearningPathId:c})=>{const l=m7(n),d=f7(l),h={...d,theme:d.theme??NC(d).theme};return{...C7(h),completedAt:t,favoritedAt:s,riseComCourseId:i,riseComEnrollmentType:a,riseComCurrentUser:r,riseComLearningPathId:c}},S7=e=>({...e,favoritedAt:new Date}),I7=e=>({...e,favoritedAt:null}),T7=e=>({...e,completedAt:new Date().toISOString()}),L7={[PC]:S7,[MC]:I7,[Ao]:y7,[l7]:T7,[Pl]:(e,{course:t})=>t,[HC]:(e,{lessons:t})=>({...e,lessons:t.map(VC)}),[Gh]:x7},E7=(0,he.handle)({},L7),k7=e=>e!=null&&typeof e=="object"&&"code"in e&&e.code===d7&&"message"in e&&typeof e.message=="string",zC=e=>t=>{A7(t)?e(W8(!0)):k7(t)?(e(G8(t.message)),console.error(t)):t instanceof Uh&&(e(K8(!0)),console.error(t))},N7=e=>t=>t([{type:OC,payload:e},BC(!0)]),j7=ur().fromPromise(async(...e)=>await pN(...e)),w7=e=>e.length===0?BC(!0):j7(e).map(N7),R7=e=>Ml(e)===401||Kh(e)&&Ml(e.response)===401,A7=e=>Ml(e)===404||Kh(e)&&Ml(e.response)===404,Ml=e=>Kh(e)?e.status??e.statusCode:void 0,Kh=e=>e!=null&&typeof e=="object",P7=e=>t=>{const{course:n}=t,s=b7(n),r=Q8({course:s,lessons:s.lessons});e([Ga(Ao,{...t,course:s,_loadOrigin:"runtime",_originalLessons:n.lessons}),$8(!0),w7(r)])},M7=e=>async t=>{let n;try{c7(window.Runtime),n=e?.password!=null?await cC(void 0,{password:e.password}):await cC()}catch(s){if(e?.onUnauthorized!=null&&R7(s)){e.onUnauthorized();return}e?.onError?.(),await zC(t)(s);return}e?.onAuthorized?.();try{P7(t)(n),jN(n)}catch(s){await zC(t)(s)}},O7=e=>Ga(Ao,{...e,_loadOrigin:"preview-replace"}),B7=Ga(Pl),D7=Ga(HC),F7=Ga(Gh),_7=(e,{labelSet:t})=>({...e,...t}),H7=(0,he.handle)({},{[Ao]:_7}),qs=e=>`rise/course/${e}`,$C=qs("BLOCKS_LESSON_COMPLETE"),UC=qs("BLOCKS_LESSON_INCREMENT_RETRY_ATTEMPT"),GC=qs("BLOCKS_LESSON_RESET"),WC=qs("BLOCKS_LESSON_RETRY_SORTING_ACTIVITY"),KC=qs("BLOCKS_LESSON_SET_ITEMS_PROGRESS"),QC=qs("BLOCKS_LESSON_SET_MEDIA_PLAY_PROGRESS"),ZC=qs("BLOCKS_LESSON_SET_SORTING_ITEM_RESULT"),YC=qs("BLOCKS_LESSON_SET_SURVEY_PARTIAL"),qC=qs("BLOCKS_LESSON_SET_SURVEY_SUBMITTED"),jr=(0,he.action)($C),V7=(0,he.action)(UC),z7=(0,he.action)(GC),$7=(0,he.action)(WC),mi=(0,he.action)(KC),U7=(0,he.action)(QC),G7=(0,he.action)(ZC),W7=(0,he.action)(YC),K7=(0,he.action)(qC),Un=e=>`rise/course/${e}`,XC=Un("QUIZ_LESSON_ADVANCE_STEP"),JC=Un("QUIZ_LESSON_APPLY_SKIP"),ex=Un("QUIZ_LESSON_CLEAR_ANSWER_SELECTION"),tx=Un("QUIZ_LESSON_INITIALIZE_DRAWN_QUESTIONS"),nx=Un("QUIZ_LESSON_RESTART"),sx=Un("QUIZ_LESSON_SELECT_QUIZ_ANSWER"),ox=Un("QUIZ_LESSON_SET_ANSWER_MATCHES"),rx=Un("QUIZ_LESSON_SET_ANSWER_TEXT"),ix=Un("QUIZ_LESSON_ADVANCE_TO_END"),ax=Un("QUIZ_LESSON_SET_TIME_REMAINING"),cx=Un("QUIZ_LESSON_SUBMIT_ANSWER"),lx=Un("QUIZ_LESSON_TOGGLE_ANSWER_SELECTION"),Qh=(0,he.action)(XC),Q7=(0,he.action)(ix),dx=(0,he.action)(nx),Z7=(0,he.action)(JC),ux=(0,he.action)(sx),hx=(0,he.action)(rx),mx=(0,he.action)(lx),Y7=(0,he.action)(ax),fx=(0,he.action)(ox),Zh=(0,he.action)(cx),q7=(0,he.action)(ex),X7=(0,he.action)(tx),Yh=e=>e&&typeof e=="object"&&e.type&&Rv.includes(e.type),J7=(e,t)=>{const n=new Map;return e.forEach(s=>{if(O8(s)){const r=t.find(i=>String(i.id)===String(s.id));r&&r.type==="blocks"&&n.set(String(s.id),String(r.id))}}),n},ej=(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((s,r)=>{if(s?.id!=null&&(n.items[s.id]={id:s.id,index:r,isComplete:e.isComplete===!0&&r===0,items:s.items?{}:void 0},s.items&&Array.isArray(s.items))){const i={};s.items.forEach((a,c)=>{a?.id!=null&&(i[a.id]={id:a.id,index:c,isComplete:e.isComplete===!0})}),Object.keys(i).length>0&&(n.items[s.id].items=i)}}),n},tj=(e,t)=>{const n=new Set(t.map(r=>String(r.id))),s=[];return Object.values(e.lessons).forEach(r=>{Yh(r)&&(n.has(String(r.id))||s.push(r))}),s},nj=(e,t,n)=>{const s={totalLegacyLessons:0,successfulMigrations:0,failedMigrations:0},r={...e,lessons:{...e.lessons}},i=tj(e,n);s.totalLegacyLessons=i.length;const a=J7(t,n),c=[];return i.forEach(l=>{try{const d=a.get(String(l.id))||String(l.id),h=n.find(m=>String(m.id)===d);if(h&&h.type==="blocks"){const m=ej(l,h);r.lessons[String(h.id)]=m,String(l.id)!==String(h.id)&&delete r.lessons[String(l.id)],s.successfulMigrations++}else c.push(String(l.id)),s.failedMigrations++}catch(d){console.warn(`Failed to migrate legacy lesson progress for lesson ${l.id}:`,d),c.push(String(l.id)),s.failedMigrations++}}),{migratedProgress:r,orphanedLessonIds:c,migrationSummary:s}},px=e=>Object.values(e.lessons).some(Yh),Ope=e=>{let t=0,n=0;const s=[];return Object.values(e.lessons).forEach(r=>{n++,Yh(r)&&(t++,s.includes(r.type)||s.push(r.type))}),{legacyCount:t,totalCount:n,legacyTypes:s,hasLegacyProgress:t>0}},sj=(e,t,n)=>{if(!px(e))return e;const s=nj(e,t,n);return s.orphanedLessonIds.length>0&&console.warn("Some legacy lessons could not be migrated:",s.orphanedLessonIds),s.migratedProgress},qh=e=>`rise/course/${e}`,gx=qh("BOOKMARK_LESSON"),oj=qh("LOAD_COURSE"),vx=qh("PREVIEW_COMPLETE_PRECEDING_LESSONS"),rj=(0,he.action)(gx),ij=(0,he.action)(vx),aj={lessons:{},percentComplete:0},cj=(0,he.handle)(aj,{[$C]:gv,[UC]:iE,[GC]:aE,[WC]:cE,[KC]:lE,[QC]:dE,[ZC]:uE,[YC]:hE,[qC]:mE,[XC]:NE,[ix]:jE,[JC]:zE,[ex]:wE,[tx]:RE,[nx]:OE,[sx]:BE,[ox]:DE,[rx]:ME,[ax]:FE,[cx]:_E,[lx]:HE,[gx]:dj,[oj]:lj,[vx]:uj});function lj(e,t){const n=t.course?.lessons??[],s=t._originalLessons??n,r=lC(gj(n));if(typeof r!="object"||r===null)return e;const i={...e,...r};return px(e)&&s!==n?sj(i,s,n):i}function dj(e,t){return gN(t),{...e,currentLesson:t}}function uj(e,{targetLessonId:t,lessons:n}){const s=e.lessons[t];if(!s)return e;let r=s.index;for(const a of n){if(a.type!=="quiz")continue;const c=e.lessons[a.id];if(!c||c.index>=r)continue;const l=a.settings;if(!l?.skipLessonsIfPassed||!l.skipToLessonId)continue;const d=e.lessons[l.skipToLessonId];d&&d.index>r&&(r=d.index)}const i=Object.fromEntries(Object.entries(e.lessons).map(([a,c])=>c.index>=r||c.isComplete?[a,c]:[a,hj(c)]));return{...e,lessons:i}}function hj(e){return Ns(e)?lh(e):cn(e)?mj(e):e}function mj(e){const t=Object.fromEntries(Object.entries(e.items??{}).map(([s,r])=>[s,{...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 fj=({index:e,lessonId:t,settings:n,type:s})=>s==="quiz"?{id:t,index:e,type:s,items:{},passingScore:Number(n?.passingScore??80)}:{id:t,index:e,type:"blocks",items:{}};function pj(e){return e.type==="quiz"&&"settings"in e}function gj(e){return{lessons:e.reduce((n,s,r)=>pj(s)?Cx({index:r,items:s.items,lessonId:s.id,lessonProgress:n,settings:s.settings,type:s.type}):s.type==="blocks"||s.type==="slide"?Cx({index:r,items:s.items,lessonId:s.id,lessonProgress:n,type:"blocks"}):n,{})}}function Cx(e){const{lessonId:t,index:n,items:s,lessonProgress:r={},settings:i,type:a}=e,c=fj({lessonId:t,index:n,settings:i,type:a});if(s.length===0)return{...r,[t]:c};const l=a==="quiz"?Cj(s):vj(s);return{...r,[t]:{...c,items:l}}}function vj(e){return e.reduce((t,n,s)=>{const r=n.id,i=n.items??[],a=X4(i);return t[r]={id:r,index:s,items:a},t},{})}function Cj(e){return e.reduce((t,n,s)=>(t[n.id]={id:n.id,index:s},t),{})}var ht=C(48492),xj=C(63898);const bj=ht.ZU.Object({status:ht.ZU.Literal("resolved"),schemaVersion:ht.ZU.Literal(1),evaluatedAt:ht.ZU.Optional(ht.ZU.String()),access:ht.ZU.Union([ht.ZU.Literal("allowed"),ht.ZU.Literal("blocked")]),protection:ht.ZU.Optional(ht.ZU.Union([ht.ZU.Literal("none"),ht.ZU.Literal("required")])),reason:ht.ZU.Optional(ht.ZU.Union([ht.ZU.Literal("active-trial"),ht.ZU.Literal("trial-ended")])),accessExpiresAt:ht.ZU.Optional(ht.ZU.String()),degraded:ht.ZU.Optional(ht.ZU.Literal(!0))}),yj=/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/,xx=e=>{if(typeof e!="string")return!1;const t=yj.exec(e);if(t==null||Number.isNaN(Date.parse(e)))return!1;const n=Number(t[1]),s=Number(t[2]),r=Number(t[3]),i=new Date(0);return i.setUTCFullYear(n,s-1,r),i.getUTCFullYear()===n&&i.getUTCMonth()===s-1&&i.getUTCDate()===r},Sj=e=>e===void 0||xx(e),Ij=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),wr=(e,t)=>Object.hasOwn(e,t)?e[t]:void 0,Tj=1,Lj="delivery-policy:request",Xh="delivery-policy:response",Ej="delivery-policy:timeout",Bpe=2e3,bx="deliveryPolicy",Rr=()=>({status:"resolved",schemaVersion:1,evaluatedAt:new Date().toISOString(),access:"allowed",protection:"none"}),kj=()=>({...Rr(),degraded:!0}),Nj=e=>{try{return jj(e)}catch{return Rr()}},jj=e=>{if(!Ij(e))return Rr();const t=wr(e,"access"),n=wr(e,"accessExpiresAt"),s=wr(e,"evaluatedAt"),r=wr(e,"protection"),i=wr(e,"reason"),a=wr(e,"schemaVersion");return wr(e,"status")!=="resolved"||a!==1||!Sj(s)?Rr():t==="allowed"&&r==="none"?{status:"resolved",schemaVersion:1,evaluatedAt:s,access:"allowed",protection:"none"}:t==="allowed"&&r==="required"?i==="active-trial"&&xx(n)&&(s===void 0||Date.parse(n)>=Date.parse(s))?{status:"resolved",schemaVersion:1,evaluatedAt:s,access:"allowed",protection:"required",reason:"active-trial",accessExpiresAt:n}:i==="trial-ended"?{status:"resolved",schemaVersion:1,evaluatedAt:s,access:"allowed",protection:"required",reason:"trial-ended"}:Rr():t==="blocked"&&i==="trial-ended"?{status:"resolved",schemaVersion:1,evaluatedAt:s,access:"blocked",reason:"trial-ended"}:Rr()},wj=ht.ZU.Object({type:ht.ZU.Literal(Xh),version:ht.ZU.Literal(Tj),policy:bj});function Rj(e){if(!xj.J(wj,e))return;const{policy:t}=e;if(!(t.access==="allowed"&&t.protection==null))return t}function Jh(){const e="articulate.com";return e?[`https://360.${e}`,`https://360-dashboard.dev.${e}`]:[]}function Aj(e=window.location){return new URLSearchParams(e.search).has(bx)||new URLSearchParams(e.hash.split("?")[1]??"").has(bx)}const Pj=(e,t)=>t._loadOrigin==="preview-replace"&&t.deliveryPolicy===void 0?e:Nj(t.deliveryPolicy),Mj=(0,he.handle)(Rr(),{[Ao]:Pj});var Oj=C(73481),fi=C.n(Oj),Bj=C(27563),Dj=C.n(Bj),Dpe=C(31212),yx,Sx;const em=5e3,Fj=wt()(Y0()(js())(":n3,n4,i4,n7,n9")),_j=$e()(fi()(","),Nl()),Hj=(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))},Vj=(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(Dj())(t.name,{style:t.style,weight:t.weight}).load()},zj=e=>{const t=`url(${JL(e)}) format('woff')`;return("fonts"in document?Hj:Vj)(t,e)},Ix=(e,t)=>{const n=Promise.all(e.map(zj));let s;const r=new Promise(i=>{s=setTimeout(i,em)});return Promise.race([n,r]).catch(i=>{console.error("Failed to load learn course fonts:",{fonts:e,error:i.message||i})}).finally(()=>{clearTimeout(s),t()})},_pe=({baseUri:e,typefaces:t,onLoad:n,onError:s})=>{const r=yx(t).join(", ");return Sx.load({active:n,fontinactive:(i,a)=>{console.error("Individual font failed to load:",{familyName:i,fvd:a,typefaces:t})},inactive:()=>{console.error("Failed to load course fonts:",{typefaces:t,typefaceList:r}),s?.(),n?.()},timeout:em,custom:{families:Fj(yx(t)),urls:[`${e}/course_fonts.css?typefaceIds=${_j(t)}`]}})},Hpe=()=>Sx.load({google:{families:["Noto Sans Myanmar:300,400,500,600,700"]},timeout:em}),$j=(e,{fonts:t})=>[...e,...t],Uj=(e,{fonts:t})=>t,Gj=(0,he.handle)([],{[Ao]:$j,[Pl]:Uj}),Wj=e=>t=>{Ix(e,()=>{t(z8(!0))})},Kj={isPreview:window.viewType==="preview"},Tx=((e=Kj)=>e);C.dn(Tx);const Lx="rise/l10n/TOGGLE_LOCALE_SELECTOR",Ex=(e,{l10n:t})=>t?{...e,...t}:e,Qj=(e,t)=>(0,yo.TJ)(["l10n"],t,e).result,tm=(0,he.action)(Lx),Zj=(e,t)=>e&&{...e,...!t&&{localeSelectorOptions:void 0},showLocaleSelector:t},Yj=(0,he.handle)(null,{[Ao]:Ex,[Pl]:Ex,[Gh]:Qj,[Lx]:Zj});var qj=C(50333),nm=C.n(qj);const Xj=nm()(2,e=>fh()((0,he.error)(e),(0,he.action)(e))),{RiseDotCom:Xs}=window,Wa=e=>Xs&&Xs[e],kx=e=>Promise.reject(new Error(`RiseDotCom.${e} is unavailable`)),Jj=()=>{Wa("exit")&&Xs?.exit?.()},Nx=(...e)=>{Wa("on")&&Xs?.on?.(...e)},jx=(...e)=>{Wa("off")&&Xs?.off?.(...e)},ew=(...e)=>{Wa("goToLearn")&&Xs?.goToLearn?.(...e)},tw=(...e)=>Xs?.downloadCertificate?.(...e)??kx("downloadCertificate"),nw=(...e)=>{if(Wa("downloadCertificateCancel"))return Xs?.downloadCertificateCancel?.(...e)},sw=(...e)=>Xs?.fetchLpUpNext?.(...e)??kx("fetchLpUpNext"),wx="rise/learningPathUpNext/FETCH_LP_UP_NEXT",Rx="rise/learningPathUpNext/FETCH_LP_UP_NEXT_PENDING",ow={isPending:!1,isSuccess:!1,learningPathComplete:!1,nextCourse:{}},rw=e=>!("id"in e),iw=(e,t)=>{const n=rw(t);return{...e,isPending:!1,isSuccess:!0,learningPathComplete:n,lpHasFailedQuiz:t.lpHasFailedQuiz,nextCourse:n?{}:t}},aw=e=>({...e,isPending:!0}),zpe=(0,he.handle)(ow,{[wx]:(0,he.onSuccess)(iw),[Rx]:aw}),cw=e=>[(0,he.action)(Rx),Xj(wx)(ur().fromPromise(sw)(e))],lw=(e,t)=>{const n=e.content.findIndex(r=>r.id===t.id),s=[...e.content];return n===-1?s.push(t):s[n]=t,{...e,content:s}},dw=(e,t)=>t.reduce(lw,e),uw={[OC]:dw},hw=(0,he.handle)({content:[]},uw),Ax={BLOCKS:"blocks",QUIZ:"quiz",SECTION:"section"},Ar=e=>e?.type===Ax.QUIZ,Ol=e=>e?.type===Ax.QUIZ,Bl="rise-quiz-deck-engine",mw=null;function $pe(e){const t={};for(const n of mw)e[n]===!0&&(t[n]=!0);return t}function Upe(e,t){const n={...e};for(const[s,r]of Object.entries(t))n[s]=e[s]||r;return n}function Gpe(e){return{...e,"rise-lessons":!0}}const fw={},Px="rise/quizDecks/QUIZ_DECK_PREPARED",Mx="rise/quizDecks/QUIZ_DECK_REVIEW_TARGET_LANGUAGE_CHANGED",Ox="rise/quizDecks/QUIZ_DECK_MULTIPLE_CHOICE_SELECTION_CHANGED",Bx="rise/quizDecks/QUIZ_DECK_MULTIPLE_RESPONSE_SELECTION_TOGGLED",Dx="rise/quizDecks/QUIZ_DECK_FILL_IN_RESPONSE_CHANGED",Fx="rise/quizDecks/QUIZ_DECK_MATCHING_RESPONSE_CHANGED",_x="rise/quizDecks/QUIZ_DECK_SIMULATION_STARTED",pw=(0,he.handle)(fw,{[Ao]:Tw,[Dx]:Nw,[Fx]:jw,[Ox]:Ew,[Bx]:kw,[Px]:Lw,[_x]:Rw}),gw=(0,he.action)(Ox),vw=(0,he.action)(Bx),Cw=(0,he.action)(Dx),xw=(0,he.action)(Fx),bw=(0,he.action)(Px),yw=(0,he.action)(Mx),Sw=(0,he.action)(_x);function Iw(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type===Mx}function Hx(e){const t=e.attempt.currentProgress,n=e.deal.cards[0],s=n?t.items[n.progressId]:void 0,r=n?.questionType===me.FILL_IN_THE_BLANK||n?.questionType===me.MATCHING&&n.matchingOrder!=null&&n.matchingOrder.answerIds.length>0&&n.matchingOrder.prompts.length===n.matchingOrder.answerIds.length&&n.matchingOrder.matches.length===n.matchingOrder.answerIds.length||(n?.questionType===me.MULTIPLE_CHOICE||n?.questionType===me.MULTIPLE_RESPONSE)&&n.answerOrder.length>0;return t.reportResults!==!0&&(t.activeIndex??0)===0&&r&&s!=null&&s.isComplete!==!0}function Vx({cardKey:e,deck:t}){return Dl({cardKey:e,deck:t,questionType:me.MULTIPLE_CHOICE})}function zx({cardKey:e,deck:t}){return Dl({cardKey:e,deck:t,questionType:me.MULTIPLE_RESPONSE})}function $x({cardKey:e,deck:t}){return Dl({cardKey:e,deck:t,questionType:me.FILL_IN_THE_BLANK})}function Ux({cardKey:e,deck:t}){const n=Dl({cardKey:e,deck:t,questionType:me.MATCHING});return n?.card.matchingOrder?n:void 0}function Tw(e,{course:t}){return t.features?.[Bl]!==!0?{}:t.lessons.reduce((n,s)=>(Ar(s)&&(n[s.id]={status:"unprepared"}),n),{})}function Lw(e,{deck:t,lessonId:n}){return e[n]==null?e:{...e,[n]:t}}function Ew(e,t){const{authoredAnswerIndex:n,cardKey:s,lessonId:r}=t,i=Ka({payload:t,state:e});if(!i)return e;const a=Vx({cardKey:s,deck:i});if(!a)return e;const{card:c,progress:l}=a;if(n!=null&&(!Number.isInteger(n)||n<0||n>=c.answerOrder.length)||l.isCorrect==null&&(n==null?l.selectedIndex==null:l.selectedIndex===n))return e;const{isCorrect:h,selectedIndex:m,...f}=l,p=n==null?f:{...f,selectedIndex:n},v=i.attempt.currentProgress;return{...e,[r]:{...i,attempt:{...i.attempt,canonicalProgressDiscarded:!0,currentProgress:{...v,items:{...v.items,[c.progressId]:p}}}}}}function kw(e,t){const{authoredAnswerIndex:n,cardKey:s,lessonId:r}=t,i=Ka({payload:t,state:e});if(!i)return e;const a=zx({cardKey:s,deck:i});if(!a)return e;const{card:c,progress:l}=a;if(!Number.isInteger(n)||n<0||n>=c.answerOrder.length)return e;const d=l.selectedIndices??[],h=d.includes(n)?d.filter(x=>x!==n):[...d,n],{isCorrect:m,selectedIndices:f,...p}=l,v=h.length===0?p:{...p,selectedIndices:h},g=i.attempt.currentProgress;return{...e,[r]:{...i,attempt:{...i.attempt,canonicalProgressDiscarded:!0,currentProgress:{...g,items:{...g.items,[c.progressId]:v}}}}}}function Nw(e,t){const{cardKey:n,lessonId:s,text:r}=t,i=Ka({payload:t,state:e});if(!i)return e;const a=$x({cardKey:n,deck:i});if(!a)return e;const{card:c,progress:l}=a,d=bl(r);if(l.isCorrect==null&&(d?!Object.hasOwn(l,"text"):l.text===r))return e;const{isCorrect:m,text:f,...p}=l,v=d?p:{...p,text:r},g=i.attempt.currentProgress;return{...e,[s]:{...i,attempt:{...i.attempt,canonicalProgressDiscarded:!0,currentProgress:{...g,items:{...g.items,[c.progressId]:v}}}}}}function jw(e,t){const{cardKey:n,lessonId:s,matchAnswerId:r,promptAnswerId:i}=t,a=Ka({payload:t,state:e});if(!a)return e;const c=Ux({cardKey:n,deck:a});if(!c)return e;const{card:l,progress:d}=c,h=l.matchingOrder;if(!h)return e;const m=h.answerIds.indexOf(i),f=r==null?void 0:h.answerIds.indexOf(r);if(!h.prompts.includes(m)||f!=null&&!h.matches.includes(f))return e;const p=d.matches??{},v=Object.hasOwn(p,i);if(d.isCorrect==null&&(r==null?!v:v&&String(p[i])===String(r)))return e;const x=ww({matchAnswerId:r,matches:p,promptAnswerId:i}),{isCorrect:y,matches:S,...I}=d,b=Object.keys(x).length===0?I:{...I,matches:x},T=a.attempt.currentProgress;return{...e,[s]:{...a,attempt:{...a.attempt,canonicalProgressDiscarded:!0,currentProgress:{...T,items:{...T.items,[l.progressId]:b}}}}}}function ww({matchAnswerId:e,matches:t,promptAnswerId:n}){const s=String(n),r=[];for(const[i,a]of Object.entries(t))i!==s&&(e==null||String(a)!==String(e))&&r.push([i,a]);return e!=null&&r.push([s,e]),Object.fromEntries(r)}function Rw(e,t){const n=Ka({payload:t,state:e});if(!n||!Hx(n))return e;const{lessonId:s}=t,r=n.attempt.currentProgress;return{...e,[s]:{...n,attempt:{...n.attempt,canonicalProgressDiscarded:!0,currentProgress:{...r,activeIndex:1}}}}}function Ka({payload:e,state:t}){const n=t[e.lessonId];return n?.status==="ready"&&n.attempt.currentProgress.reportResults!==!0&&n.deal.structureKey===e.structureKey&&(n.attempt.currentProgress.retryAttempts??0)===e.retryAttempts?n:void 0}function Dl({cardKey:e,deck:t,questionType:n}){const s=t.attempt.currentProgress,r=s.activeIndex??0,i=t.deal.cards[r-1],a=i?s.items[i.progressId]:void 0;return s.reportResults!==!0&&r>0&&i?.key===e&&i.questionType===n&&a!=null&&a.isComplete!==!0?{card:i,progress:a}:void 0}const Gx="rise/search/RESET_SEARCH",Wx="rise/search/SET_SEARCH_ACTIVE",Kx="rise/search/SET_SEARCH_ACTIVE_LESSONS",Qx="rise/search/SET_SEARCH_TRANSLATIONS",Zx="rise/search/SET_SEARCH_LESSONS",Yx="rise/search/SET_SEARCH_TERM",qx={active:!1,activeLessons:[],translations:{},lessons:[],term:null},Aw=(e,t)=>t?{...qx,active:e.active}:e,Pw=(e,t)=>({...e,active:t}),Mw=(e,t)=>({...e,activeLessons:t}),Ow=(e,t)=>({...e,translations:t}),Bw=(e,t)=>({...e,lessons:t}),Dw=(e,t)=>({...e,term:t}),Fw=(0,he.handle)(qx,{[Gx]:Aw,[Wx]:Pw,[Kx]:Mw,[Qx]:Ow,[Zx]:Bw,[Yx]:Dw}),pi=e=>(0,he.action)(e),Xx=pi(Gx),Qa=pi(Wx),Jx=pi(Kx),eb=pi(Qx),tb=pi(Zx),Pr=pi(Yx),sm=e=>`rise/sessionPreferences/${e}`,nb=sm("LOAD_SESSION_PREFERENCES"),sb=sm("SET_PREFERS_KEYBOARD_NAVIGATION"),_w=sm("SET_STARTING_COURSE_LESSON_SELECTED"),Hw={prefersKeyboardNavigation:!1,startedCourseWithLessonSelected:!1},Vw=(e,t)=>({...e,prefersKeyboardNavigation:t}),zw=(e,t)=>({...e,startedCourseWithLessonSelected:t}),$w=(0,he.handle)(Hw,{[nb]:(e,t)=>({...e,...t}),[sb]:Vw,[_w]:zw}),Uw=()=>(0,he.action)(nb,null),Gw=(0,he.action)(sb),om=js()("rise/transcriptPanel/"),ob=om("OPEN_TRANSCRIPT_PANEL"),rb=om("CLOSE_TRANSCRIPT_PANEL"),ib=om("UPDATE_TRANSCRIPT_PANEL"),Ww={audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null},Kw=(e,t)=>t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??!1,refocusTarget:t.refocusTarget??null,transcriptMedia:t.transcriptMedia??null}:e,ab=()=>({audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null}),Qw=(e,t)=>e.audioPlayerIdOpen?t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??e.focusing,transcriptMedia:t.transcriptMedia??e.transcriptMedia}:ab():e,Zw={[ob]:Kw,[rb]:ab,[ib]:Qw},Yw=(0,he.handle)(Ww,Zw),cb=(e=>`rise/ui/${e}`)("SET_SKIP_TO_NAV_BUTTON_UI"),qw={skipToNavButton:null},Xw=(0,he.handle)(qw,{[cb]:(e,t)=>({...e,skipToNavButton:t})}),rm=(0,he.action)(cb);var Kpe;const Jw={},eR=(0,hl.HY)({course:E7,courseLabels:H7,courseProgress:cj,deliveryPolicy:Mj,fonts:Gj,global:Tx,l10n:Yj,partnerContent:hw,quizDecks:pw,search:Fw,sessionPreferences:$w,status:V8,transcriptPanel:Yw,ui:Xw,...Jw});var Ge=C(32926);function lb(e){return(0,Ge.Mz)(e,t=>{const n=new Map;for(const s of t??[])s?.id==null||s.id===""||n.set(String(s.id),s);return n})}const Za=(e,t,n)=>(0,on.uW)(e)&&t?n?.[t]?.[e.l10nId]:void 0,Fl=(e,t,n,s)=>{if(!(0,on.uW)(e))return e;if(!t||!n||!s)return;const r=Za(e,t,s);if(r!==void 0)return r;const i=Za(e,n,s);if(i!==void 0)return i;const a=db(e,s);return a.length>0?a[0].value:void 0},im=new WeakMap,am=(e,t)=>{if(e&&t in e)return e[t]},cm=(e,t,n,s)=>{if(!t||!n||!s||!e)return e;if(typeof e=="object"){const d=im.get(e)?.get(s);if(d&&d.locale===t&&d.defaultLocale===n)return d.result}const r=s[t],i=s[n],a=Object.values(s).filter(d=>d!==r&&d!==i);function c(d){let h;if(h=am(r,d),h!==void 0||(h=am(i,d),h!==void 0))return h;for(const m of a)if(h=am(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,yo.pr)(l))d(c(h))}if(typeof e=="object"){let d=im.get(e);d||(d=new WeakMap,im.set(e,d)),d.set(s,{locale:t,defaultLocale:n,result:l})}return l},Qpe=(e,t,n)=>cm(e,t,gi(n),Js(n)),Zpe=(e,t,n)=>Fl(e,t,gi(n),Js(n)),Ype=(e,t,n)=>Za(e,t,Js(n));function qpe(e,t){return t?.find(n=>n.locale===e)}function tR(e){return e?.l10n?.locales??[]}function gi(e){return e?.l10n?.defaultLocale}function nR(e,t){const n=gi(t);return!!(e&&n&&e!==n)}const sR=Object.freeze({});function Js(e){return e?.l10n?.translations??sR}function db(e,t){return(0,on.uW)(e)?Object.keys(t).flatMap(n=>{const s=Za(e,n,t);return s?{locale:n,value:s}:[]}):[]}const Xpe=(e,t)=>db(e,Js(t)),Mt=e=>(0,on.uW)(e)?e.l10nId:void 0;function oR(e){return e?.l10n?.localeSelectorOptions}function lm(e){return e?.l10n?.languageCodeMetadata}function rR(e){return e?.l10n?.showLocaleSelector}var iR=C(4594),dm=C.n(iR),Jpe=C(78219),aR=C(87467),ub=C.n(aR),cR=C(85806),Mr=C.n(cR),lR=C(42997),dR=C.n(lR),uR=C(31529),hR=C.n(uR),ege=C(3572),mR,hb,fR,pR,gR;const mb="owner",vR="manager",CR="editor",tge="viewer",fb=null,um=({effectiveRole:e,requiredRole:t})=>{const n=hb(e,fb),s=hb(t,fb);return n>=s},xR=e=>({editor:um({effectiveRole:e,requiredRole:CR}),manager:um({effectiveRole:e,requiredRole:vR}),owner:um({effectiveRole:e,requiredRole:mb})}),nge=(e,t,n)=>{const{authorId:s}=e,r=s===n,i=c=>r||c,a=bR(t);return pR(fR(["canChangePermissions","canMoveTo"]),mR({canDelete:i,canEdit:i,canMove:i,canRename:i,canUnshare:i}))(a)},bR=e=>{const{effectiveRole:t,type:n}=e||[],s=n!==gR?mb:t,{editor:r,manager:i,owner:a}=xR(s);return{canChangePermissions:i,canCreate:r,canDelete:a,canEdit:r,canMove:i,canMoveTo:r,canRename:r,canUnshare:a}};var yR,SR,Ya,IR,TR,LR,ER,pb,vi,kR,gb,vb,NR,jR,qa,wR,RR,Cb,AR,_l,PR,MR,xb,OR,bb,BR,DR,Ci,Hl,yb;const FR={[me.FILL_IN_THE_BLANK]:"fillin",[me.MATCHING]:"matching",[me.MULTIPLE_CHOICE]:"multiple choice",[me.MULTIPLE_RESPONSE]:"multiple response"},sge=500,oge=null,rge=null,Sb=({questions:e=[],drawnQuestionIds:t=[]})=>{const n=i=>!t.some(a=>a.includes(i.id)),s=e.filter(n),r=Math.floor(Math.random()*s.length);return s[r]??null},_R=e=>t=>t.type===Hl||bb({effectiveRole:t.effectiveRole,requiredRole:e}),HR=({folders:e,requiredRole:t,teamAccount:n})=>Ci(e,xb,gb,vi(s=>_R(t)(s)&&(n||s.type===Hl))),ige=({questionBanks:{folders:e,questionBanks:t},requiredRole:n=BR,teamAccount:s,term:r})=>{if(r&&jR(MR(r)))return{folders:[],questionBanks:[]};const i=new RegExp("("+OR(r)+")","i"),a=HR({folders:e,requiredRole:n,teamAccount:s}),c=Cb("id",a),l=vi(h=>h.title.match(i)&&!h.deleted,a),d=vi(h=>(qa(h.folderId)||pb(h.folderId,c))&&h.title.match(i)&&!h.deleted,t);return{folders:l,questionBanks:d}},Ib=(e,t,n=!1)=>Ci(t,NR(Ya(!qa(e)),AR(e),RR(xb,gb)),PR(_l("deleted",!n))),VR=(e,t,n,s=!1)=>{const r=e===yb,i=e===Hl,a=Ci(Ib(yb,n),Cb("id")),c=l=>!qa(l.folderId)&&pb(l.folderId,a);return Ci(t,vi(ER([[Ya(s),l=>l.deleted],[Ya(r),l=>!l.deleted&&c(l)],[Ya(i),l=>!l.deleted&&!c(l)],[Ya(qa(e)),l=>!l.deleted],[yR,vb]])))},zR=({type:e})=>e===Hl,Tb=({effectiveRole:e})=>bb({effectiveRole:e,requiredRole:DR}),$R=(e,t)=>({id:n})=>n?LR(IR(vb),wR(SR([_l("folderId",n),_l("authorId",e)])))(t):!1,UR=(e,t,n,s)=>Ci(Ib(t,e),vi(TR([zR,Tb,$R(s,n)]))),GR=(e,t)=>n=>{if(qa(n.folderId))return!0;const s=kR(_l("id",n.folderId),e);if(!s)return!1;const r=Tb(s),i=n.authorId===t;return r||i},WR=(e,t,n,s,r)=>Ci(VR(e,t,n),vi(GR(s,r))),age=(e,t,n,s)=>{const r=UR(e,n,t,s),i=WR(n,t,e,r,s);return{folders:r,questionBanks:i}},KR=(e,t,n=[])=>{const s=t[e],{parentId:r}=s||{},{type:i}=t?.[r]||{},a=s?[s,...n]:n;return!r||s.type!==i?a:KR(r,t,a)};function Vl(){const{pathname:e}=new URL(window.location.href);return e.split("/")[1]==="review"}function QR(){const e=window.location.hash.slice(1),t=new URLSearchParams(e.split("?")[1]??"");return Vl()&&!!t.get("locale")}const hm={drawQuestion:Sb,isReviewTargetLanguage:QR,shuffle:dm()};function Lb(e){return e.type===me.DRAW_FROM_QUESTION_BANK}function mm(e){return Array.isArray(e)&&e.every(t=>Array.isArray(t)&&t.every(n=>typeof n=="number"&&Number.isInteger(n)&&n>=0))}function ZR(e,t){return Xa({bank:e,isReviewTargetLanguage:t.isReviewTargetLanguage()})}function Xa({bank:e,isReviewTargetLanguage:t}){return t?e.questions.length:Math.min(e.drawCount??0,e.questions.length)}function YR(e,t,n){if(!mm(t)||t.length!==e.length)return;const s=[];for(const[r,i]of e.entries()){const a=t[r];if(!(a.length===ZR(i,n)&&new Set(a).size===a.length&&a.every(l=>i.questions[l]!=null)))return;s.push(XR(i,a))}return s}function qR(e,t){return`${e}-${t}`}function fm(e,t){return{...t,drawn:!0,id:qR(e.id,t.id)}}function XR(e,t){const n=t.map(s=>({question:e.questions[s],idx:s})).filter(s=>s.question!=null);return{items:n.map(({question:s})=>fm(e,s)),indices:n.map(({idx:s})=>s)}}function JR(e,t){const{questions:n}=e;if(t.isReviewTargetLanguage())return{items:n.map(c=>fm(e,c)),indices:n.map((c,l)=>l)};const s=e.drawCount,r=[],i=[],a=[];for(let c=0;c<s;c++){const l=t.drawQuestion({questions:n,drawnQuestionIds:r});if(!l)break;i.push(fm(e,l)),a.push(n.findIndex(d=>d.id===l.id)),r.push(String(l.id))}return{items:i,indices:a}}function eA({dependencies:e,sourceItems:t,progress:n,lessonId:s}){const r=t.filter(Lb),i=n?.questionsDrawn?YR(r,n.questionList,e):void 0,a=i?Eb(t,i):void 0,c=i!==void 0&&a!==void 0&&nA(n,a),l=i!==void 0?i:r.map(p=>JR(p,e)),d=Eb(t,l),h=r.length>0?l.map(p=>p.indices):void 0,m=n?.questionsDrawn&&r.length>0&&!c?{...n,items:{},originalItemProgress:void 0}:n,f=sA({items:d,progress:m,questionIndexList:h});return{concreteItems:d,didResetProgress:m!==n,drawPayload:{lessonId:s,lessonProgress:f}}}function Eb(e,t){let n=0;return e.flatMap(s=>Lb(s)?t[n++].items:[s])}function pm(e,t){return typeof e=="number"&&Number.isInteger(e)&&e>=0&&e<t}function zl({answerCount:e,value:t}){if(!Array.isArray(t)||t.length!==e)return;const n=t.filter(s=>pm(s,e));if(n.length===t.length&&new Set(n).size===n.length)return n}function kb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function tA(e,t){if(!kb(e))return!1;const n=t.answers??[],s=new Set(n.map(i=>String(i.id))),r=new Set;return Object.entries(e).every(([i,a])=>{if(typeof a!="string"&&typeof a!="number")return!1;const c=String(a);return!s.has(i)||!s.has(c)||r.has(c)?!1:(r.add(c),!0)})}function Nb({item:e,persisted:t}){if(!kb(t))return!1;const n=e.answers?.length??0;if(t.selectedIndex!=null&&!pm(t.selectedIndex,n))return!1;const s=t.selectedIndices;if(s!=null&&!(Array.isArray(s)&&s.every(c=>pm(c,n))))return!1;const r=t.shuffledAnswerIndices;if(r!=null&&!zl({answerCount:n,value:r}))return!1;const i=t.text;if(i!=null&&typeof i!="string")return!1;const a=t.matches;return!(a!=null&&!tA(a,e))}function nA(e,t){if(!e)return!0;const n=new Map(Object.values(e.items).map(i=>[i.index,i])),s=e.originalItemProgress,r=s!==void 0;return t.every((i,a)=>{const c=s?.[a],l=n.get(a);return c!==void 0?Nb({item:i,persisted:c}):r?!0:l===void 0||String(l.id)===String(i.id)})}function sA({items:e,progress:t,questionIndexList:n}){const s=t?.items??{},r=t?.originalItemProgress,i=new Map(Object.values(s).map(l=>[l.index,l])),a=Object.fromEntries(e.map((l,d)=>{const h=r?.[d]??{},m=i.get(d);return[l.id,{...h,...m,id:l.id,index:d}]}));return{...t?Ks(t,["originalItemProgress"]):void 0,questionsDrawn:!0,questionList:n??t?.questionList,items:a}}function gm({itemIds:e,progress:t}){const n=t.activeIndex??0,s=e.length+1;if(t.reportResults)return{progress:e.length===0||n===s?t:{...t,activeIndex:s}};const r=n-1;if(r<=0)return{progress:t};const i=t.items??{},a=e.findIndex((c,l)=>l<r&&!i[c]?.isComplete);return a===-1?{progress:t}:{progress:{...t,activeIndex:a+1},recoveredFrom:n}}function vm(e,t){return!!t[e.id]?.isComplete}function oA({dependencies:e,items:t,progress:n}){const s=n?.items??{};return[...t.filter(r=>vm(r,s)),...e.shuffle(t.filter(r=>!vm(r,s)))]}function rA(e,t){const n=e.answers??[],s=t.shuffle(n),r=s.map(i=>n.findIndex(a=>a.id===i.id));return Object.assign({},e,{answers:s,shuffledAnswerIndices:r})}function iA(e,t){const n=e.answers??[];return Object.assign({},e,{answers:t.map(s=>n[s]),shuffledAnswerIndices:t})}function jb({dependencies:e=hm,items:t,settings:n,progress:s}){const r=n?.randomizeQuestionOrder?oA({dependencies:e,items:t,progress:s}):t;if(!n?.shuffleAnswerChoices)return r;const i=s?.items??{};return r.map(a=>{if(vm(a,i))return a;const c=i[a.id]?.shuffledAnswerIndices,l=zl({answerCount:a.answers?.length??0,value:c});return l?iA(a,l):rA(a,e)})}function wb({dependencies:e=hm,lessonId:t,sourceItems:n,progress:s,settings:r}){const{concreteItems:i,didResetProgress:a,drawPayload:c}=eA({dependencies:e,sourceItems:n,progress:s,lessonId:t}),l=jb({dependencies:e,items:i,settings:r??void 0,progress:c.lessonProgress}),d=gm({itemIds:l.map(h=>h.id),progress:c.lessonProgress});return{didResetProgress:a,resolvedItems:l,recoveredFrom:d.recoveredFrom,drawPayload:{...c,lessonProgress:d.progress}}}function cge(e){return jb({items:e.items,settings:e.settings,progress:e.progress})}const aA=e=>e!=null&&e.type!=null&&e.type!=="section";function lge({lessonIds:e,lessons:t}){return!Array.isArray(e)||!t?!1:e.some((n,s)=>{const r=t[n];return r?.type!=="quiz"||r.settings?.skipLessonsIfPassed!==!0?!1:e.slice(s+1).some(i=>aA(t[i]))})}function Rb({preserveAnswerOrder:e,progress:t,targets:n}){const s=new Map(n.map(d=>[d.progressIndex,d]));if(s.size!==n.length)return{reason:"invalidProgress",status:"failed"};const r=Object.values(t.items),i=cA(r),a=new Map;for(const d of r){if(!ec({preserveAnswerOrder:e,value:d}))continue;const h=d.index==null?void 0:s.get(d.index);if(!h||String(d.id)!==String(h.progressId)||a.has(h.progressIndex)||!Ja({preserveAnswerOrder:e,question:h.question,value:d}))return{reason:"invalidProgress",status:"failed"};a.set(h.progressIndex,d)}const c=Pb(t);for(const[d,h]of Object.entries(c)){if(!ec({preserveAnswerOrder:e,value:h}))continue;const m=lA({key:d,targetByIndex:s});if(!m||h.id!=null&&String(h.id)!==String(m.progressId)||h.index!=null&&h.index!==m.progressIndex||!Ja({preserveAnswerOrder:e,question:m.question,value:h}))return{reason:"invalidProgress",status:"failed"}}const l=new Map;for(const d of n){const h=i.get(d.progressIndex)??[],m=h.filter(x=>String(x.id)===String(d.progressId));if(h.length>1&&h.some(x=>ec({preserveAnswerOrder:e,value:x})))return{reason:"invalidProgress",status:"failed"};const p=t.items[d.progressId],v=p&&p.index===d.progressIndex&&String(p.id)===String(d.progressId)?p:a.get(d.progressIndex)??m[0],g=c[String(d.progressIndex)];if(dA({current:v,original:g,preserveAnswerOrder:e,question:d.question}))return{reason:"invalidProgress",status:"failed"};l.set(d.progressIndex,{current:v,original:g})}return{claims:l,status:"success"}}function Ab({id:e,index:t,preserveAnswerOrder:n,question:s,value:r}){const i=Ja({preserveAnswerOrder:n,question:s,value:r});if(!i)return;const a={id:e,index:t};return typeof i.isComplete=="boolean"&&(a.isComplete=i.isComplete),typeof i.isCorrect=="boolean"&&(a.isCorrect=i.isCorrect),hA(i.matches)&&(a.matches={...i.matches}),typeof i.selectedIndex=="number"&&(a.selectedIndex=i.selectedIndex),Ob(i.selectedIndices)&&(a.selectedIndices=[...i.selectedIndices]),n&&Ob(i.shuffledAnswerIndices)&&(a.shuffledAnswerIndices=[...i.shuffledAnswerIndices]),typeof i.text=="string"&&(a.text=i.text),a}function Cm(e){return Object.values(e.items).some(Mb)||Object.values(Pb(e)).some(Mb)}function cA(e){const t=new Map;for(const n of e){if(n.index==null)continue;const s=t.get(n.index)??[];s.push(n),t.set(n.index,s)}return t}function Pb(e){const t=e.originalItemProgress;return tt(t)?Object.fromEntries(Object.entries(t).filter(n=>tt(n[1]))):{}}function lA({key:e,targetByIndex:t}){const n=Number(e);return Number.isInteger(n)&&String(n)===e?t.get(n):void 0}function dA({current:e,original:t,preserveAnswerOrder:n,question:s}){return e!=null&&t!=null&&ec({preserveAnswerOrder:n,value:e})&&ec({preserveAnswerOrder:n,value:t})||e!=null&&Ja({preserveAnswerOrder:n,question:s,value:e})==null?!0:t!=null&&Ja({preserveAnswerOrder:n,question:s,value:t})==null}function Ja({preserveAnswerOrder:e,question:t,value:n}){if(!tt(n)||n.isComplete!=null&&typeof n.isComplete!="boolean"||n.isCorrect!=null&&typeof n.isCorrect!="boolean")return;const s=e?n:uA(n);if(!Nb({item:t,persisted:s}))return;const r=n.selectedIndex!=null,i=n.selectedIndices!=null,a=n.matches!=null,c=n.text!=null;switch(t.type??me.MULTIPLE_CHOICE){case me.MULTIPLE_CHOICE:return!i&&!a&&!c?n:void 0;case me.MULTIPLE_RESPONSE:return!r&&!a&&!c?n:void 0;case me.MATCHING:return!r&&!i&&!c?n:void 0;case me.FILL_IN_THE_BLANK:return!r&&!i&&!a?n:void 0;default:return}}function uA(e){const t={...e};return delete t.shuffledAnswerIndices,t}function ec({preserveAnswerOrder:e,value:t}){return t.isComplete!=null&&t.isComplete!==!1||t.isCorrect!=null||t.matches!=null||t.selectedIndex!=null||t.selectedIndices!=null||e&&t.shuffledAnswerIndices!=null||t.text!=null}function Mb(e){const t=e.selectedIndices,n=e.matches,s=e.text;return e.isComplete===!0||e.isCorrect!=null||e.selectedIndex!=null||(Array.isArray(t)?t.length>0:t!=null)||(tt(n)?Object.keys(n).length>0:n!=null)||(typeof s=="string"?s.length>0:s!=null)}function Ob(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function hA(e){return tt(e)&&Object.values(e).every(t=>typeof t=="string"||typeof t=="number")}function mA(e){return e.status==="incompatible"?e.recoverableDeck!=null||e.recoverableReviewMode!=null:e.status!=="failed"||e.phase!=="reconciliation"}function xm(e){const t=Xa({bank:e,isReviewTargetLanguage:!1}),n=Xa({bank:e,isReviewTargetLanguage:!0});return t!==n||n>1}function Bb(e){return e.some(t=>t.type===me.DRAW_FROM_QUESTION_BANK&&xm(t))}const Db=new Set([void 0,me.FILL_IN_THE_BLANK,me.MATCHING,me.MULTIPLE_CHOICE,me.MULTIPLE_RESPONSE]);function fA({dependencies:e,lesson:t,previousDeck:n,progress:s}){try{const r=n?.status==="failed"&&n.phase==="reconciliation"?n:void 0,i=n?.status==="ready"?n.attempt.baselineProgress:n?.status==="incompatible"?n.baselineProgress:r?.baselineProgress,a=i!=null&&(i.retryAttempts??0)===(s.retryAttempts??0);if(r&&a)return r.baselineProgress===s?r:{...r,baselineProgress:s};if(n?.status==="incompatible"&&a&&n.recoverableDeck==null&&n.recoverableReviewMode==null)return n.baselineProgress===s?n:{...n,baselineProgress:s};const c=e.isReviewTargetLanguage(),l={...e,isReviewTargetLanguage:()=>c},d=gA(l.getPassingScore({lesson:t})),h=ym({getL10nValues:l.getL10nValues,isReviewTargetLanguage:c,lesson:t,passingScore:d}),m=s.reportResults===!0||n?.status==="ready"&&a&&n.attempt.currentProgress.reportResults===!0,f=NA({isReviewTargetLanguage:c,lesson:t,previousDeck:n?.status==="ready"&&a?n:void 0,progress:s}),p=c?"target":"source";if(n?.status==="incompatible"&&a){const O=n.recoverableDeck;if(O?.deal.structureKey===h)return O.attempt.currentProgress.reportResults!==!0&&!O.attempt.canonicalProgressDiscarded?Hb({lesson:t,passingScore:d,previousDeck:O,progress:s}):{...O,attempt:{...O.attempt,baselineProgress:s}};if(n.recoverableReviewMode?.mode!==p||n.recoverableReviewMode.structureKey!==h)return n.baselineProgress===s?n:{...n,baselineProgress:s}}const v=n?.status==="ready"&&a&&n.deal.structureKey!==h,g=n?.status==="ready"&&a&&n.attempt.canonicalProgressDiscarded,x=v&&n?.status==="ready"&&n.deal.structureKey===ym({getL10nValues:l.getL10nValues,isReviewTargetLanguage:!c,lesson:t,passingScore:d});if(x&&n?.status==="ready"&&n.attempt.currentProgress.reportResults!==!0&&!n.attempt.canonicalProgressDiscarded&&f)return Ul({previousDeck:n,progress:s})?bm({previousDeck:n,progress:s}):ws({progress:s,reason:"invalidProgress",structureKey:h});if(v&&m&&(!f||g))return{baselineProgress:s,reason:"reportedAttemptCannotBeMapped",...x?{recoverableDeck:n}:{},status:"incompatible",structureKey:h};if(n?.status==="ready"&&n.deal.structureKey===h&&a)return n.attempt.baselineProgress===s?n:n.attempt.currentProgress.reportResults===!0||g?{...n,attempt:{...n.attempt,baselineProgress:s}}:f?Ul({previousDeck:n,progress:s})?bm({previousDeck:n,progress:s}):ws({progress:s,reason:"invalidProgress",structureKey:h}):Hb({lesson:t,passingScore:d,previousDeck:n,progress:s});const y=i!=null&&!a&&s.reportResults!==!0&&!Cm(s)&&!kA({lesson:t,progress:s});let S=s;if(v?S=Gl({lesson:t,progress:s}):y?S=wA({lesson:t,progress:s}):f&&s.questionsDrawn!==!0?S=Gl({lesson:t,progress:s}):f&&(S=jA({lesson:t,progress:s})),bA({lesson:t,progress:S}))return ws({progress:s,reason:"invalidQuestionReference",structureKey:h});const I=$l({isReviewTargetLanguage:c,lesson:t,progress:S});if(I){if(s.reportResults||Cm(S)){const O=xA({isReviewTargetLanguage:c,lesson:t,progress:S});return ws({progress:s,reason:I,recoverableReviewMode:O?{mode:O,structureKey:ym({getL10nValues:l.getL10nValues,isReviewTargetLanguage:O==="target",lesson:t,passingScore:d})}:void 0,structureKey:h})}S=Gl({lesson:t,progress:S})}const{didResetProgress:b,drawPayload:T,resolvedItems:L}=wb({dependencies:l,lessonId:t.id,progress:S,settings:{...t.settings,randomizeQuestionOrder:Fb({isReviewTargetLanguage:c,lesson:t})},sourceItems:t.items}),E={...t.settings?.shuffleAnswerChoices===!0?T.lessonProgress:RA(T.lessonProgress),passingScore:d},k=$l({isReviewTargetLanguage:c,lesson:t,progress:E});if(k)return{reason:k,status:"failed"};const N=yA({lesson:t,questionList:E.questionList});if(N.status==="failed")return N;const P=SA({occurrences:N.occurrences,resolvedItems:L});if(!P)return ws({progress:s,reason:"invalidQuestionReference",structureKey:h});const A=TA({lesson:t,occurrences:N.occurrences,preserveAnswerOrder:t.settings?.shuffleAnswerChoices===!0,progress:S,resolvedProgress:E});if(A)return ws({progress:s,reason:A,structureKey:h});const R=P.map(({occurrence:O,question:B})=>IA({dependencies:l,occurrence:O,progress:E.items[O.progressId],question:B,shuffleAnswerChoices:t.settings?.shuffleAnswerChoices===!0})),j=gm({itemIds:R.map(O=>O.progressId),progress:E}).progress,w={attempt:{baselineProgress:s,canonicalProgressDiscarded:!f&&(S!==s||b),currentProgress:Sm(j)},deal:{cards:R,structureKey:h},status:"ready"};return f?bm({previousDeck:w,progress:s}):s.reportResults&&R.some(O=>!j.items[O.progressId]?.isComplete)?{baselineProgress:s,reason:"reportedAttemptCannotBeMapped",status:"incompatible",structureKey:h}:w}catch{return{reason:"preparationError",status:"failed"}}}function bm({previousDeck:e,progress:t}){if(e.attempt.currentProgress.reportResults===!0)return{...e,attempt:{...e.attempt,baselineProgress:t}};const n={};for(const r of e.deal.cards){const i=e.attempt.currentProgress.items[r.progressId];if(!i)return{reason:"preparationError",status:"failed"};n[r.progressId]={...i,isComplete:!0,isCorrect:!0}}const s=Sm({...e.attempt.currentProgress,activeIndex:uh(e.deal.cards.length),isComplete:t.isComplete,items:n,passed:t.passed,percentComplete:t.percentComplete,reportResults:t.reportResults,score:t.score});return{...e,attempt:{...e.attempt,baselineProgress:t,currentProgress:s}}}function ym({getL10nValues:e,isReviewTargetLanguage:t,lesson:n,passingScore:s}){return JSON.stringify({items:n.items.map(r=>r.type===me.DRAW_FROM_QUESTION_BANK?{drawCount:Xa({bank:r,isReviewTargetLanguage:t}),id:tc(r.id),questions:r.questions.map(i=>_b({getL10nValues:e,question:i})),reviewMode:xm(r)?t?"target":"source":void 0,type:r.type}:_b({getL10nValues:e,question:r})),passingScore:s,randomizeQuestionOrder:Fb({isReviewTargetLanguage:t,lesson:n}),shuffleAnswerChoices:n.settings?.shuffleAnswerChoices===!0})}function Fb({isReviewTargetLanguage:e,lesson:t}){return t.settings?.randomizeQuestionOrder===!0&&!(e&&Bb(t.items))}function _b({getL10nValues:e,question:t}){return{answers:t.answers?.map(n=>tc(n.id))??[],columnBehavior:t.type===me.MATCHING?t.settings?.columnBehavior??"freezeSecond":void 0,id:tc(t.id),scoring:pA({getL10nValues:e,question:t}),type:t.type??me.MULTIPLE_CHOICE}}function pA({getL10nValues:e,question:t}){switch(t.type){case me.FILL_IN_THE_BLANK:return{answers:t.answers?.map(n=>({title:n.title,translations:[...e(n.title)].sort(CA)}))??[],isCaseSensitive:t.settings?.isCaseSensitive===!0};case me.MULTIPLE_RESPONSE:return{corrects:(t.corrects??[]).map(tc).sort(vA)};case me.MULTIPLE_CHOICE:case void 0:{const n=t.correct;return{correct:n==null?null:tc(n)}}case me.MATCHING:return}}function gA(e){const t=Number(e??80);return Number.isFinite(t)?t:80}function tc(e){return typeof e=="number"?["number",e]:["string",e]}function vA(e,t){const n=JSON.stringify(e),s=JSON.stringify(t);return n===s?0:n<s?-1:1}function CA(e,t){return e.locale===t.locale?0:e.locale<t.locale?-1:1}function $l({isReviewTargetLanguage:e,lesson:t,progress:n}){const s=t.items.filter(a=>a.type===me.DRAW_FROM_QUESTION_BANK);if(s.length===0||!n.questionsDrawn)return;const r=n.questionList;return!mm(r)||r.length!==s.length?"invalidQuestionReference":s.every((a,c)=>{const l=r[c],d=Xa({bank:a,isReviewTargetLanguage:e});return l.length===d&&new Set(l).size===l.length&&l.every(h=>a.questions[h]!=null)&&(!e||l.every((h,m)=>h===m))})?void 0:"invalidQuestionReference"}function xA({isReviewTargetLanguage:e,lesson:t,progress:n}){const s=!e;return t.items.some(r=>r.type===me.DRAW_FROM_QUESTION_BANK&&xm(r))&&$l({isReviewTargetLanguage:s,lesson:t,progress:n})==null?s?"target":"source":void 0}function bA({lesson:e,progress:t}){return!t.questionsDrawn&&e.items.some(n=>n.type===me.DRAW_FROM_QUESTION_BANK)&&Cm(t)}function yA({lesson:e,questionList:t}){const n=mm(t)?t:[],s=[];let r=0;for(const[a,c]of e.items.entries()){if(c.type!==me.DRAW_FROM_QUESTION_BANK){if(!Db.has(c.type))return{reason:"unsupportedQuestion",status:"failed"};s.push({progressId:c.id,progressIndex:s.length,question:c,source:{kind:"lesson",lessonItemIndex:a}});continue}const l=n[r++];if(!l)return{reason:"invalidQuestionReference",status:"failed"};for(const d of l){const h=c.questions[d];if(!h)return{reason:"invalidQuestionReference",status:"failed"};if(!Db.has(h.type))return{reason:"unsupportedQuestion",status:"failed"};s.push({progressId:`${c.id}-${h.id}`,progressIndex:s.length,question:h,source:{bankQuestionIndex:d,kind:"questionBank",lessonItemIndex:a}})}}const i=s.map(({progressId:a})=>String(a));return new Set(i).size!==i.length?{reason:"invalidQuestionReference",status:"failed"}:{occurrences:s,status:"success"}}function SA({occurrences:e,resolvedItems:t}){if(e.length!==t.length)return;const n=new Map(e.map(r=>[String(r.progressId),r])),s=[];for(const r of t){const i=n.get(String(r.id));if(!i)return;s.push({occurrence:i,question:r})}return s}function IA({dependencies:e,occurrence:t,progress:n,question:s,shuffleAnswerChoices:r}){const i=s.answers?.length??0,a=Array.from({length:i},(p,v)=>v),c=n?.shuffledAnswerIndices,l=zl({answerCount:i,value:s.shuffledAnswerIndices}),d=zl({answerCount:i,value:c});let h=a;r&&l?h=[...l]:r&&d&&(h=[...d]);const m=s.type===me.MATCHING?t.question.answers?.map(p=>p.id)??[]:[],f=s.type===me.MATCHING?s.settings?.columnBehavior==="freezeFirst"?{answerIds:m,matches:e.shuffle([...h]),prompts:[...h]}:{answerIds:m,matches:[...h],prompts:e.shuffle([...h])}:void 0;return{answerOrder:h,key:t.source.kind==="lesson"?`lesson:${t.source.lessonItemIndex}`:`questionBank:${t.source.lessonItemIndex}:${t.source.bankQuestionIndex}`,matchingOrder:f,progressId:t.progressId,questionId:t.question.id,questionType:s.type??me.MULTIPLE_CHOICE,source:t.source}}function TA({lesson:e,occurrences:t,preserveAnswerOrder:n,progress:s,resolvedProgress:r}){const i=Rb({preserveAnswerOrder:n,progress:s,targets:t});if(i.status==="failed")return"invalidProgress";for(const a of t){const c=i.claims.get(a.progressIndex),l=c?.current!=null||c?.original!=null||Vb({lesson:e,progress:s,source:a.source})!=null,d=r.items[a.progressId];if(!l||!d||d.index!==a.progressIndex||String(d.id)!==String(a.progressId)||!Ab({id:a.progressId,index:a.progressIndex,preserveAnswerOrder:n,question:a.question,value:d}))return"invalidProgress"}}function Hb({lesson:e,passingScore:t,previousDeck:n,progress:s}){const r=s.reportResults===!0;if(!Ul({previousDeck:n,progress:s}))return ws({installedDeck:n,progress:s,reason:"invalidProgress",structureKey:n.deal.structureKey});const i=e.settings?.shuffleAnswerChoices===!0,a=[];for(const p of n.deal.cards){const v=LA({lesson:e,source:p.source}),g=n.attempt.currentProgress.items[p.progressId];if(!v||!g||g.index==null||v.id!==p.questionId)return{reason:"preparationError",status:"failed"};a.push({card:p,target:{progressId:p.progressId,progressIndex:g.index,question:v}})}const c=Rb({preserveAnswerOrder:i,progress:s,targets:a.map(({target:p})=>p)});if(c.status==="failed")return ws({installedDeck:n,progress:s,reason:c.reason,structureKey:n.deal.structureKey});const l={};for(const{card:p,target:v}of a){const g=c.claims.get(v.progressIndex);if(!g)return{reason:"preparationError",status:"failed"};const x=g.original?{...g.current,...g.original}:g.current??Vb({lesson:e,progress:s,source:p.source});if(!x)return ws({installedDeck:n,progress:s,reason:"invalidProgress",structureKey:n.deal.structureKey});const y=Ab({id:p.progressId,index:v.progressIndex,preserveAnswerOrder:i,question:v.question,value:x});if(!y||!EA({card:p,row:y}))return ws({installedDeck:n,progress:s,reason:"invalidProgress",structureKey:n.deal.structureKey});l[p.progressId]=y}const d={...s,items:l,passingScore:t};delete d.originalItemProgress,e.items.some(p=>p.type===me.DRAW_FROM_QUESTION_BANK)?(d.questionList=n.attempt.currentProgress.questionList,d.questionsDrawn=!0):(delete d.questionList,delete d.questionsDrawn);const m=gm({itemIds:n.deal.cards.map(p=>p.progressId),progress:d}).progress,f={baselineProgress:s,canonicalProgressDiscarded:n.attempt.canonicalProgressDiscarded,currentProgress:Sm(m)};return r&&n.deal.cards.some(p=>!m.items[p.progressId]?.isComplete)?{baselineProgress:s,reason:"reportedAttemptCannotBeMapped",status:"incompatible",structureKey:n.deal.structureKey}:{...n,attempt:f}}function Vb({lesson:e,progress:t,source:n}){const s=e.items[n.lessonItemIndex];if(!s||n.kind==="questionBank"&&s.type!==me.DRAW_FROM_QUESTION_BANK||n.kind==="lesson"&&s.type===me.DRAW_FROM_QUESTION_BANK)return;const r=t.items[s.id];return r&&String(r.id)===String(s.id)&&r.index===n.lessonItemIndex?r:void 0}function LA({lesson:e,source:t}){const n=e.items[t.lessonItemIndex];return t.kind==="lesson"?n?.type===me.DRAW_FROM_QUESTION_BANK?void 0:n:n?.type===me.DRAW_FROM_QUESTION_BANK?n.questions[t.bankQuestionIndex]:void 0}function EA({card:e,row:t}){return!(t.shuffledAnswerIndices&&JSON.stringify(t.shuffledAnswerIndices)!==JSON.stringify(e.answerOrder))}function kA({lesson:e,progress:t}){return Object.values(t.items).length===e.items.length&&e.items.every((s,r)=>{const i=t.items[s.id];return i!=null&&String(i.id)===String(s.id)&&i.index===r&&Object.keys(i).every(a=>a==="id"||a==="index")})}function NA({isReviewTargetLanguage:e,lesson:t,previousDeck:n,progress:s}){if(s.isComplete!==!0||s.passed!==!0||s.percentComplete!==100||s.reportResults!==!0||s.score!==100||!t.items.some(a=>a.type===me.DRAW_FROM_QUESTION_BANK)||Object.keys(s.items).length!==t.items.length)return!1;const r=s.questionsDrawn!==!0&&s.questionList==null,i=s.questionsDrawn===!0&&(n?Ul({previousDeck:n,progress:s}):$l({isReviewTargetLanguage:e,lesson:t,progress:s})==null);return!r&&!i?!1:t.items.every((a,c)=>{const l=s.items[a.id];return l!=null&&String(l.id)===String(a.id)&&l.index===c&&l.isComplete===!0&&l.isCorrect===!0})}function Ul({previousDeck:e,progress:t}){const n=t.questionList;return!t.questionsDrawn&&n==null||JSON.stringify(n)===JSON.stringify(e.attempt.currentProgress.questionList)}function Gl({lesson:e,progress:t}){const n={...t,activeIndex:0,items:Object.fromEntries(e.items.map((s,r)=>[s.id,{id:s.id,index:r}]))};return delete n.isComplete,delete n.originalItemProgress,delete n.passed,delete n.percentComplete,delete n.questionList,delete n.questionsDrawn,delete n.reportResults,delete n.score,n}function jA({lesson:e,progress:t}){const n={...t,activeIndex:0,items:Object.fromEntries(e.items.map((s,r)=>[s.id,{id:s.id,index:r}]))};return delete n.isComplete,delete n.passed,delete n.percentComplete,delete n.reportResults,delete n.score,n}function wA({lesson:e,progress:t}){return{...Gl({lesson:e,progress:t}),...t.isComplete!==void 0&&{isComplete:t.isComplete},...t.passed!==void 0&&{passed:t.passed}}}function RA(e){return{...e,items:Object.fromEntries(Object.entries(e.items).map(([t,n])=>{const s={...n};return delete s.shuffledAnswerIndices,[t,s]}))}}function Sm(e){return{...e,items:Object.fromEntries(Object.entries(e.items).map(([t,n])=>[t,{...n,...n.matches?{matches:{...n.matches}}:{},...n.selectedIndices?{selectedIndices:[...n.selectedIndices]}:{},...n.shuffledAnswerIndices?{shuffledAnswerIndices:[...n.shuffledAnswerIndices]}:{}}]))}}function ws({installedDeck:e,progress:t,reason:n,recoverableReviewMode:s,structureKey:r}){return t.reportResults===!0?{baselineProgress:t,reason:"reportedAttemptCannotBeMapped",...s?{recoverableReviewMode:s}:{},status:"incompatible",structureKey:r}:e?{baselineProgress:t,installedDeck:e,phase:"reconciliation",reason:n,status:"failed"}:{reason:n,status:"failed"}}function AA({resolutionDependencies:e=hm,resolveMasteryScore:t=aC}={}){const n=lb(s=>s.course.lessons);return({dispatch:s,getState:r})=>i=>a=>{const c=r(),l=i(a),d=r(),h=c.course.lessons!==d.course.lessons,m=c.courseProgress.lessons!==d.courseProgress.lessons,f=c.l10n?.translations!==d.l10n?.translations,p=Iw(a);if(!m&&!f&&!h&&!p)return l;const v=Object.keys(d.quizDecks);if(v.length===0)return l;let g,x,y,S;h&&(y=n(c),x=n(d));for(const I of v){const b=r().quizDecks[I];if(!b)continue;const T=d.courseProgress.lessons[I],E=c.courseProgress.lessons[I]!==T,k=b.status==="unprepared"&&c.quizDecks[I]!==b,N=b.status==="ready"?b.attempt.baselineProgress!==T:b.status==="incompatible"||b.status==="failed"&&b.phase==="reconciliation"?b.baselineProgress!==T:!1,P=h&&y?.get(I)!==x?.get(I);let A,R=!1;b.status==="ready"&&f&&(S??=MA({currentTranslations:d.l10n?.translations,previousTranslations:c.l10n?.translations}),S.size>0&&(x??=n(d),A=x.get(I),R=Ar(A)&&OA({changedL10nIds:S,lesson:A})));const j=p&&mA(b)&&DA((x??=n(d)).get(I));if(!(b.status==="unprepared"?k||P||E||j:P||E||N||R||j))continue;x??=n(d),A??=x.get(I);let w;Ar(A)?T?.type!=="quiz"?w={reason:"invalidProgress",status:"failed"}:(g??={...e,getL10nValues:O=>PA({state:d,value:O}),getPassingScore:({lesson:O})=>BA({lesson:O,resolveMasteryScore:t})},w=fA({dependencies:g,lesson:A,previousDeck:b,progress:T})):w={reason:"invalidLesson",status:"failed"},w!==b&&s(bw({deck:w,lessonId:I}))}return l}}function PA({state:e,value:t}){const n=Mt(t);return n===void 0?[]:Object.entries(Js(e)).flatMap(([s,r])=>{const i=r[n];return i===void 0?[]:[{locale:s,value:i}]})}function MA({currentTranslations:e,previousTranslations:t}){const n=new Set,s=new Set([...Object.keys(t??{}),...Object.keys(e??{})]);for(const r of s){const i=t?.[r],a=e?.[r];if(i===a)continue;const c=new Set([...Object.keys(i??{}),...Object.keys(a??{})]);for(const l of c)i?.[l]!==a?.[l]&&n.add(l)}return n}function OA({changedL10nIds:e,lesson:t}){return t.items.some(n=>(n.type==="DRAW_FROM_QUESTION_BANK"?n.questions:[n]).some(r=>r.type===me.FILL_IN_THE_BLANK&&r.answers.some(i=>{const a=Mt(i.title);return a!=null&&e.has(a)})))}function BA({lesson:e,resolveMasteryScore:t}){const n=Number(e.settings?.passingScore??80),s=Number.isFinite(n)?n:80;return Number(t({id:e.id,passingScore:s})??s)}function DA(e){return Ar(e)&&Bb(e.items)}const{Provider:FA,dispatch:mn,store:zb,useDispatch:nt,useSelector:ue}=ML(eR,void 0,{additionalMiddleware:[AA()]}),$b="_course_token",Im=new URLSearchParams(window.location.hash.substr(1)),Ub=Im.get($b);Ub&&(Im.delete($b),window.history.replaceState(null,null,`#${Im.toString()}`));const _A=e=>{const{data:{method:t,id:n,jsonrpc:s}}=e;if(s==="2.0"&&t==="getBearerToken"){const r=Ub||Rt();navigator.serviceWorker.ready.then(i=>{i.active.postMessage({id:n,jsonrpc:"2.0",method:t,result:{token:r}})})}};navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",_A);const Gb=(0,u.createContext)({});function HA(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 Wl({ariaLive:e,message:t}){return(0,o.jsx)("div",{"aria-atomic":"true","aria-live":e,"aria-relevant":"additions text",className:"visually-hidden-always",role:"log",children:t})}function VA({children:e}){const[{politeMessage1:t,politeMessage2:n,assertiveMessage1:s,assertiveMessage2:r},i]=(0,u.useReducer)(HA,{politeMessage1:"",politeMessage2:"",alternatePolite:!1,assertiveMessage1:"",assertiveMessage2:"",alternateAssertive:!1}),a=(0,u.useMemo)(()=>({announcePolite:c=>{i({type:"polite",message:c})},announceAssertive:c=>{i({type:"assertive",message:c})},clearAnnouncements:()=>{i({type:"clear"})}}),[i]);return(0,o.jsxs)(Gb.Provider,{value:a,children:[(0,o.jsx)(Wl,{ariaLive:"polite",id:"polite-announcer1",message:t}),(0,o.jsx)(Wl,{ariaLive:"polite",id:"polite-announcer2",message:n}),(0,o.jsx)(Wl,{ariaLive:"assertive",id:"assertive-announcer1",message:s}),(0,o.jsx)(Wl,{ariaLive:"assertive",id:"assertive-announcer2",message:r}),e]})}function Rs(){return(0,u.useContext)(Gb)}var zA,$A,Wb,UA,GA,Kb;const WA=[wv,"guide",vh,"video",Ch],Qb=e=>e!=null&&WA.includes(e),ls=e=>Qb(e?.type),KA=e=>ls(e)&&e?.theme?.blockNavigationType===_a.STEPPED,QA=e=>zA(e)&&!!e.attachedToNextBlock;function ZA(e){const t=[];let n=[];for(const s of e)n.push(s),QA(s.settings)||(t.push(n),n=[]);return n.length>0&&t.push(n),t}function dge(e,t){const n=ZA(e),s=n.findIndex(r=>r.some(i=>String(i.id)===String(t)));return s===-1?null:{index:s,slide:n[s]}}const uge=(e,t)=>n=>ls(n)?e:t,Po=e=>(0,yo.Qe)({type:e?.type,experiments:e?.experiments}),hge=e=>{const t=Po(e);switch(t){case"guide":case $A:case Wb:case UA:case"video":return t;case GA:return"microlearning";case null:case Kb:return"course"}},Kl=e=>Po(e)==="guide",Mo=e=>Po(e)===vh,eo=e=>Po(e)==="video",Oo=e=>Po(e)===Ch,mge=e=>Po(e)===Wb,fge=e=>!Oo(e)&&Po(e)!==Kb,YA=e=>{switch(Po(e)){case"guide":return"Guide";case vh:return"Presentation";case"video":return"Video Training";case Ch:return"Scenario";case null:case wv:case Z9:case Y9:return"Microlearning"}},Zb=["guide","presentation","video","scenario","microlearning"],qA=[...Zb,"course"],pge=e=>typeof e=="string"&&qA.includes(e),gge=({course:e,isCourseGenerationInProgress:t,isOnePage:n,lessonId:s})=>n&&!!s&&!t&&!Mo(e)&&!Oo(e)&&!eo(e)&&!Kl(e),vge=e=>!Kl(e)&&!Mo(e)&&!eo(e)&&!Oo(e),Cge=e=>e?Zb.includes(e):!1,Tm=({locales:e,course:t,locale:n})=>!!(e?.find(i=>i.locale===n)?.rightToLeft||t?.experiments?.rtl),Yb=(0,u.createContext)({currentLocale:void 0,setCurrentLocale:()=>{}});function XA({children:e,currentLocale:t,setCurrentLocale:n}){const s=(0,u.useMemo)(()=>({currentLocale:t,setCurrentLocale:n}),[t,n]);return(0,o.jsx)(Yb.Provider,{value:s,children:e})}function ot(){return(0,u.useContext)(Yb)}function JA(e){const t=n=>{const s=ot();return(0,o.jsx)(e,{...n,...s})};return t.displayName=`withCurrentLocale(${e.displayName||e.name})`,t}const Lm=(0,u.createContext)(void 0);Lm.displayName="CourseSearchContext";function eP({children:e,search:t}){return(0,o.jsx)(Lm.Provider,{value:t,children:e})}function Ql(){return(0,u.useContext)(Lm)}const xi=(0,u.createContext)({l10n:null});xi.displayName="TranslationContext";const Em=(0,u.createContext)({l10n:null});Em.displayName="LocalesContext";function rt(){const{currentLocale:e}=ot(),t=Dn(),n=Yl();return(0,u.useCallback)(s=>Fl(s,e,t,n),[e,t,n])}function qb(){const{currentLocale:e}=ot(),t=Dn(),n=Yl();return(0,u.useCallback)(s=>cm(s,e,t,n),[e,t,n])}function Pe(e,t){const{currentLocale:n}=ot(),s=Dn();let r=Yl();const i=nP();return i&&Object.keys(i).length&&n&&r&&(r={...r,[n]:i}),Fl(e,t??n,s,r)}function tP(e){const{currentLocale:t}=ot(),n=Dn(),s=Yl();return(0,u.useMemo)(()=>cm(e,t,n,s),[t,n,e,s])}function bi(){return(0,u.use)(Em)}function Zl(){const e=bi();return tR(e)}function Dn(){const e=bi();return gi(e)}function Yl(){const e=(0,u.use)(xi);return Js(e)}function nP(){return Ql()?.translations}function sP(){const e=(0,u.use)(xi);return rR(e)}function oP(){const e=(0,u.use)(xi);return oR(e)}const rP=()=>(0,Ge.Mz)(t=>t,(t,n)=>n,(t,n,s)=>gi(s),(t,n,s)=>Js(s),Fl);function Ct(e){const{currentLocale:t}=ot(),n=(0,u.useMemo)(()=>rP(),[]);return ue(s=>n(e,t,s))}const iP=(0,Ge.Mz)(e=>e,(e,t)=>Js(t),(e,t)=>t?.[e]);function Xb(){const{currentLocale:e}=ot();return ue(t=>iP(e,t))}const aP=(0,Ge.Mz)(e=>e.course?.title,gi,Js,(e,t,n)=>{if(e)return Za(e,t,n)});function cP(){return ue(aP)}function ql(){return ue(e=>e.l10n)}var lP=C(49860);function Jb(e){return e?.search}function Bo(){return ue(Jb)}function dP(e){return Jb(e)?.activeLessons}const uP=(0,Ge.Mz)(dP,e=>e?e.reduce((t,n)=>(n?.id&&(t[n.id]=n),t),{}):{});function hP(){return(0,Ge.Mz)(e=>e,(e,t)=>uP(t),(e,t)=>t?.[e])}function mP(e){const t=lP.useMemo(()=>hP(),[]);return ue(n=>t(e,n))}function Ft(e){return e.course}function ie(){return ue(Ft)}function fP(e){return Ft(e)?.navigationMode}function km(e){return Ft(e)?.trackingQuizId}function nc(){const e=ie();return Ct(e?.title)}function pP(e){return Ft(e)?.type}function gP(){return ue(e=>pP(e))}function vP(e){return Ft(e)?.color??""}function CP(){return ue(vP)}function xP(e){return Ft(e)?.enableVideoPlaybackSpeed??!1}function bP(){return ue(xP)}function e2(e){const t=Ft(e);return ls(t)}function yP(){return ue(e2)}function SP(e){const t=Ft(e);return eo(t)}function IP(){return ue(SP)}function TP(e){const t=Ft(e);return Oo(t)}function LP(){return ue(TP)}const EP=e=>e.filter(t=>t.type!=="section");function Or(){const e=ie(),t=Bo();return(0,u.useMemo)(()=>t?.active&&t?.lessons?.length>0?{...e,lessons:t.lessons,lessonsOnly:EP(t.lessons)}:e,[e,t?.active,t?.lessons])}const kP=(0,Ge.Mz)(Ft,e=>(e?.lessons??[]).filter(Ar).some(t=>t.settings?.skipLessonsIfPassed&&t.settings?.skipToLessonId));function Nm(e){const t=fP(e);return kP(e)?wo.RESTRICTED:t??wo.FREE}function Xl(){return ue(Nm)}function NP(e){return Ft(e)?.theme?.buttonNavigationStyle??Xe.buttonNavigationStyle}function jP(){return ue(NP)}function jm(){const e=ie();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 t2(){return ie()?.theme?.coverImageColor??vt.DARK}function wm(){return ie()?.lessonsOnly?.[0]}function n2(){const e=ie(),{selectedAuthorId:t}=e?.lessons?.[0]??{};return t==="none"||!t?null:e?.authors?.find(n=>n.id===t)??null}function ds(){const{currentLocale:e}=ot(),t=Zl(),n=ie();return n?Tm({course:n,locales:t,locale:e}):!1}function s2(){const t=ie()?.lessons;return(0,u.useMemo)(()=>Array.isArray(t)?t.filter(({type:n})=>n!=="section").length:0,[t])}class wP 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:s}=this.props;return t||n?(0,o.jsx)(s,{}):this.props.children}}const RP=wP;var AP=C(39117),PP=C.n(AP),MP=C(46280),OP=C.n(MP),BP=C(76781),Jl=C.n(BP),DP=C(98105),us=C.n(DP),FP=C(18828),ed=C.n(FP),_P=C(1554),Do=C.n(_P),HP=C(71172),VP=C.n(HP),zP=C(41131),$P=C.n(zP);const o2=({course:e,courseProgress:t})=>!e||!t?{}:e.lessons.filter(r=>!!r.settings?.passToContinue).filter(r=>!t.lessons[String(r.id)]?.passed)[0]??{},UP=({courseProgress:e,lesson:t,restrictingQuiz:n})=>{if(!e)return{};const s=c=>e.lessons[String(c)]?.index,r=s(t.id),i="id"in n?n.id:void 0,a=i!=null?s(i):void 0;return r!==void 0&&a!==void 0&&r>a?n:{}};var GP=C(99651),Fo=C.n(GP),WP=C(55803),KP=C.n(WP),QP=C(1069),Rm=C.n(QP);const _o=Ne("CDN_USER_CONTENT_URI"),r2=Ne("CDN_URI"),sc=ka()("useCrushedKey"),hs=Ne("IMAGES_URI"),ZP=Rm()(/-stock[-_]image.jpg/),Am=Ne("RBC_IMAGES_URI"),YP=Ne("ASSETS_URI"),qP=Rm()(new RegExp(`^${_o}/review`)),i2=Ne("CDN_US_URI"),oc=e=>{const{crushedKey:t,key:n,useCrushedKey:s,src:r}=e;return sc(e)?yt(s&&t?t:n):yt(r)},a2=(e,t)=>{if(!e||!e.key)return"";const{crushedKey:n,key:s,useCrushedKey:r}=e;return hs?sc(e)&&r&&n?`${hs}/${t}/${n}`:`${hs}/${t}/${s}`:oc(e)},xge=e=>`${_o}/${e}`,bge=e=>!e||!e.key?"":`${Am}/b:fff,f:jpg,s:cover,w:550,h:296/${e.key}`,yge=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:s}=e;return sc(e)&&s?t?`${hs}/f:jpg,b:fff,s:cover,w:340/${t}`:"":`${hs}/f:jpg,b:fff,s:cover,w:340/${n}`},Pm=e=>a2(e,"f:png,a:retain,s:cover,t:true,w:340"),Sge=e=>a2(e?{...e,src:e.src??e.key}:void 0,"a:retain,f:png,s:contain,w:64,h:64"),Tt=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:s,sourcedFrom:r}=e;if(!hs)return oc(e);const i=r==="AI",a=r==="LIBRARY",c=r==="EXTRACTED";return ZP(n)||i||a?`${hs}/f:jpg,a:retain,b:fff,w:1680,q:90/${n}`:sc(e)?s&&t?`${_o}/${t}`:`${_o}/${n}`:c&&e.src||qP(e.src)?e.src:`${hs}/f:jpg|png,a:retain,b:fff/${n}`},Ige=(e,t="src")=>{const{key:n,src:s,thumbnail:r,thumbnailKey:i}=e,a=_o?`${_o}/${n}`:oc({key:n,src:s}),c=_o?`${_o}/${i}`:oc({key:i,src:r});return t==="src"?a:c},Tge=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:s}=e;return sc(e)&&s&&t?`${hs}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${t}`:`${hs}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${n}`},rc=({height:e,imageKey:t,width:n})=>{if(Am){const s=encodeURIComponent(t);return`${Am}/b:fff,f:jpg,s:cover,w:${n},h:${e}/${s}`}return yt(`partnerContent/${t}`)},XP=()=>{const e=YP||hs,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}`:yt(`partnerContent/${t}`)},JP=()=>{const e="NBIC_logo_blue.svg";return r2?`${r2}/assets/rise/assets/partner-content/${e}`:yt(`partnerContent/${e}`)},eM=e=>{const{key:t,src:n}=e;return i2?`${i2}/${t}`:oc({key:t,src:n})},tM=e=>e.startsWith("#")?e:`#${e}`,nM=(e,t)=>{const n=No(tM(e));return n==null?null:(0,Da.A)({...n,alpha:t??n.alpha??1},{format:"rgba_number",alpha:!0})},td=({alpha:e,color:t,url:n})=>{const s=nM(t,e);return s==null?{backgroundImage:`url("${n}")`}:{backgroundImage:`linear-gradient(0deg,${s},${s}), url("${n}")`}};var Mm,Om;const Ege=ja()(at()("sidebarMode","hidden")),yi=({alpha:e,color:t=void 0,hasOverlay:n=!0,media:s={}})=>{const{image:r={}}=s,{key:i,src:a}=r,c=i?Tt(r):a,l=t===vt.LIGHT?"#fff":"#000";return c?n?td({alpha:e/100,color:l,url:c}):{backgroundImage:`url("${c}")`}:null},Ho=e=>[Tr.DARK,Tr.DARK_ACCENT,Tr.DARK_IMAGE,Lr.DARK,Qs.DARK,Qs.DARK_IMAGE].includes(e),sM=zt()(et()("lessons"),Fo()),oM=at()("navigationMode",wo.RESTRICTED),rM=ja()(at()("sidebarMode",ui.HIDDEN)),iM=at()("navigationType",Ir.SIDEBAR),c2=at()("navigationType",Ir.COMPACT),Bm=rs()(KP()(Dt(),"navigation"),rM,at()("navigation",!0)),aM=({course:e,search:t,isMobile:n})=>ls(e)?!1:(iM(e)||c2(e)&&!!n)&&Bm(e)||t.active,cM=({course:e,isMobile:t})=>c2(e)&&Bm(e)&&!t,ic=e=>[Tr.DARK_IMAGE,Tr.LIGHT_IMAGE,Lr.DARK_IMAGE,Lr.IMAGE,Qs.DARK_IMAGE,Qs.LIGHT_IMAGE].includes(e),lM=e=>[Qs.DARK,Qs.LIGHT].includes(e),dM=(e,t)=>{if(e===ne.RISE_CLASSIC||e===ne.HORIZON)switch(t){case ce.SPLIT_LEFT_IMAGE:case ce.SPLIT_RIGHT_IMAGE:case ce.TWO_THIRDS_LEFT_IMAGE:case ce.TWO_THIRDS_RIGHT_IMAGE:return!0;default:return!1}else if(e===ne.APEX)switch(t){case ce.SPLIT_LEFT_IMAGE:case ce.SPLIT_RIGHT_IMAGE:return!0;default:return!1}return!1},kge=(e,t)=>{switch(e){case Mm.RISE_CLASSIC:case Mm.APEX:case Mm.HORIZON:return t===Om.CENTERED_OVERLAY||t===Om.LEFT_OVERLAY||t===Om.IMAGE;default:return!1}},l2=e=>e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1,ms=e=>!l2(e),nd=et(),sd=Do(),Dm=Pt(),d2=e=>So()(t=>hi({settings:{asLesson:nd("asLesson",t.settings)??void 0},type:t.type??null}),nd("lessonsOnly",e)??[]),uM=({course:e,courseProgress:t})=>Mr()(hM(t),e?.lessonsOnly??[]),hM=e=>t=>ed()(t.id==null?void 0:sd(["lessons",t.id,"isComplete"],e)),mM=({lesson:e,currentLesson:t})=>e&&at()("id",e.id,t),fM=({course:e,lesson:t})=>at()("id",t.id,Il()(nd("lessonsOnly",e)??[])),u2=e=>e!=null&&e.type!=="section",pM=({lesson:e,courseProgress:t})=>e?.id==null?!1:Dm(!1,["lessons",e.id,"isComplete"],t),h2=({course:e,courseProgress:t,lesson:n,restrictingQuiz:s={}})=>{const r=n?.id==null?{}:UP({courseProgress:t,lesson:{id:n.id},restrictingQuiz:s}),i=oM(e),a=i||ms(r),c=uM({course:e,courseProgress:t}),l=u2(n)&&ed()(pM({lesson:n,courseProgress:t}));return{isRestricted:a&&l&&ed()(mM({lesson:n,currentLesson:c})),restrictingQuiz:r,isRestrictedCourse:i,currentLesson:c}},gM=({labels:e,restrictions:t})=>{const{lessonRestricted:n,quizRequirePassingScore:s}=e,{isRestrictedCourse:r,restrictingQuiz:i,currentLesson:a}=t,c=a&&PP()("id",i,a),l=i!=null&&typeof i=="object"?nd("title",i):void 0;return!r||r&&c?typeof l=="string"&&l?s.replace("quiz",`"${l}"`):s:n},m2=$P()((e,t)=>OP()(VP()(Lo()(["id"],e||{})),t)),vM=({course:e,lesson:t})=>$e()(Jl(),m2(t),d2)(e),f2=({course:e,lesson:t})=>{if(fM({course:e,lesson:t}))return;const n=e?.lessonsOnly??[];return n[Jl()(m2(t,n))]},CM=$e()(us(),d2),xM=e=>typeof e=="object"&&Object.keys(e).length>0,bM=e=>e==null||e===!1,yM=e=>bM(e?.isComplete),SM=e=>e.find(([,t])=>yM(t)),IM=e=>{const t=Object.entries(e),[n]=SM(t)||[];return n},TM=(e={},t)=>xM(e)?IM(e):t==null?void 0:String(t),p2=(e,t,n)=>{if(!n)return{outOfAttempts:!1,quizPassed:!0};const s=sd(["lessons",n],e),r=Dm(-1,["settings","retryCount"],t),i=Dm(0,["retryAttempts"],s),a=sd(["passed"],s);return{outOfAttempts:sd(["isComplete"],s)&&Number(r)>-1&&Number(i)===Number(r),quizPassed:a}};function Fm(e){return e.courseProgress}function LM(e){return e.courseProgress?.currentLesson??""}function EM(e){return e.courseProgress?.percentComplete??0}const g2=(0,Ge.Mz)(km,Ft,(e,t)=>{const{lessons:n}=t;return Array.isArray(n)?n.find(({id:s,type:r})=>r==="quiz"&&s===e)??null:null}),kM=(0,Ge.Mz)(Fm,g2,(e,t)=>t?p2(e,t,t.id):null);function v2(e){const t=Fm(e);return hC()?t?.percentComplete===100:!!uC()}function Si(e){return e.courseProgress?.lessons}function Ii(e,t){if(e!=null)return Si(t)?.[e]}function Br(){return ue(Fm)}function od(){return ue(LM)}function Ti(){return ue(EM)}function NM(){return ue(g2)}function _m(){const e=ue(kM);return{outOfAttempts:e?.outOfAttempts??!1,quizPassed:e?.quizPassed??!1}}function jM(){return ue(v2)}function Vo(e){return ue(t=>Ii(e,t))}function rd(e){const t=Vo(e);if(t?.type==="blocks")return t}function id(e){const t=Vo(e);if(t?.type==="quiz")return t}const wM=(0,Ge.Mz)(Si,e=>e?Object.values(e).some(t=>t.type==="quiz"&&t.activeIndex!==void 0&&!t.isComplete):!1);function RM(){return ue(wM)}const C2=e=>e>9999?1:e,AM=({current:e,restart:t,restartValue:n})=>{const s=Number(n),r=C2(Number.isInteger(s)&&s>0?s:1),i=t?r:e+1;return C2(i)},PM=(e,t)=>{if(t.family==="divider"&&t.variant==="numbered divider"){const n=t.settings??{},s=AM({current:e.currentNumber,restart:n.restartNumbering,restartValue:n.restartNumberingValue});return{map:{...e.map,[t.id]:s},currentNumber:s}}return e},x2=e=>e7(e),ad=e=>t7(e),MM=e=>n7(e),OM=e=>!!FC(e);function Dr(){return(0,Ge.Mz)(e=>e,(e,t)=>I2(t),(e,t)=>t.get(String(e)))}function $t(e){const t=(0,u.useMemo)(()=>Dr(),[]);return ue(n=>t(e,n))}function Li(e){const t=$t(e);return Ct(t?.title)}function BM(){const e=Dr();return(0,Ge.Mz)(e,t=>x2(t))}function b2(){const e=cd();return(0,Ge.Mz)(t=>t,(t,n)=>e(n),(t,n)=>Nm(n),(t,n)=>$M(n),(t,n)=>UM(n),(t,n)=>Si(n),(t,n,s,r,i,a)=>{const c=a?.[t],l=a?.[n];if(t!==n&&!c?.isComplete&&c?.index>l?.index){const d=a?.[r?.id]?.index??1/0,h=s==="restricted"?l?.index??1/0:a?.[i?.id]?.index??1/0;if(c?.index>Math.min(d,h))return h<d?s==="restricted"?{type:Nr.ORDER}:{type:Nr.KNOWLEDGE_CHECK}:{type:Nr.QUIZ,data:r.title}}return null})}function Ei(e){const t=(0,u.useMemo)(()=>b2(),[]);return ue(n=>t(e,n))}function cd(){return(0,Ge.Mz)(Si,km,(e,t)=>TM(e,t))}function DM(){const e=(0,u.useMemo)(()=>cd(),[]);return ue(t=>e(t))}function FM(){const e=cd();return(0,Ge.Mz)(e,I2,(t,n)=>{if(t)return n.get(String(t))})}function _M(){const e=Dr();return(0,Ge.Mz)(e,Ii,(t,n)=>{const s=n?.percentComplete??0,r=n?.isComplete??!1,i=n?.passed??!1;return s===100&&(!r||ad(t)&&!i)})}function y2(e){const t=(0,u.useMemo)(()=>_M(),[]);return ue(n=>t(e,n))}function HM(){const e=Dr();return(0,Ge.Mz)(e,Ii,(t,n)=>{const s=n?.percentComplete??0,r=n?.isComplete??!1,i=n?.passed??!1;return s===100&&r&&(!ad(t)||i)})}function S2(e){const t=(0,u.useMemo)(()=>HM(),[]);return ue(n=>t(e,n))}const Hm=(0,Ge.Mz)(Ft,e=>e?.lessons??[]),I2=lb(Hm),ki=(0,Ge.Mz)(Ft,e=>e?.lessonsOnly??[]),VM=(0,Ge.Mz)(ki,e=>e.reduce((t,n,s)=>(t[n.id]=s+1,t),{}));function T2(){return ue(e=>VM(e))}const Vm=(0,Ge.Mz)(ki,e=>e.filter(t=>hi(t))),L2=(0,Ge.Mz)(Vm,e=>e.length),zM=(0,Ge.Mz)(Hm,e=>e.reduce((t,n)=>{const s=t[t.length-1];return x2(n)||s==null?t.push([n.id]):s.push(n.id),t},[])),$M=(0,Ge.Mz)(ki,Si,(e,t)=>e.find(n=>ad(n)&&MM(n)&&!t?.[n.id]?.isComplete)),UM=(0,Ge.Mz)(ki,Si,(e,t)=>e.find(n=>!ad(n)&&OM(n)&&!t?.[n.id]?.isComplete));function ld(e){const t=(0,u.useMemo)(BM,[]);return ue(n=>t(e[0],n))}function zm(e){const t=(0,u.useMemo)(()=>Dr(),[]),n=(0,u.useMemo)(()=>b2(),[]),s=Xl();return ue(r=>{const i=Ft(r),a=t(e,r),c=Ii(e,r),d=n(e,r)?.type!=null;return s!==wo.RESTRICTED&&i?.markComplete&&!d&&a?.type!==Vh.QUIZ&&!0})}const dd=(e,t)=>t.findIndex(n=>n.id===e);function E2(){return(0,Ge.Mz)(e=>e,(e,t)=>ki(t),(e,t)=>{if(e===Ua)return t[t.length-1];const s=dd(e,t)-1;return t[s]})}function k2(){return(0,Ge.Mz)(e=>e,(e,t)=>ki(t),(e,t)=>{const s=dd(e,t)+1;return t[s]})}function N2(e){return(0,Ge.Mz)((n,s)=>e(n,s),(n,s)=>Vm(s),(n,s)=>dd(n?.id||"",s)+1)}function GM(){return N2(k2())}function WM(){return N2(E2())}function KM(e){const t=(0,u.useMemo)(()=>k2(),[]);return ue(n=>t(String(e),n))}function QM(e){const t=(0,u.useMemo)(()=>GM(),[]);return ue(n=>t(String(e),n))}function ZM(e){return ue(t=>{if(!e)return 0;const n=Vm(t);return dd(String(e),n)+1})}function $m(){return ue(L2)}function ud(){return ue(e=>zM(e))}function YM(){const e=cd();return(0,Ge.Mz)(v2,e,km,(t,n,s)=>{const r=!!n,i=s!=null;return t||!r&&!i})}function qM(){const e=(0,u.useMemo)(()=>YM(),[]);return ue(t=>e(t))}function XM(){const e=ie(),t=Br();return(0,u.useMemo)(()=>{if(!e||!t||!e.lessonsOnly)return[];const n=o2({course:e,courseProgress:t});return e.lessonsOnly.filter(s=>{const{isRestricted:r}=h2({course:e,courseProgress:t,lesson:s,restrictingQuiz:n});return r}).map(s=>s.id)},[e,t])}const JM=e=>e?.items?.reduce?.(PM,{map:{},currentNumber:0})?.map||{},eO=e=>{const t=(0,u.useMemo)(()=>Dr(),[]),n=ue(s=>t(e,s));return(0,u.useMemo)(()=>JM(n),[n])},tO=({blockId:e,lessonId:t})=>eO(t)?.[e];function nO(e){const n=ie()?.lessonsOnly??[],s=n.findIndex(i=>i.id===e);return(s>=0?n[s+1]:void 0)?.id??null}function Um(e){const t=$t(e),n=ie(),s=t?.settings,r=n?.lessonsOnly;return(0,u.useMemo)(()=>{const i=s?.skipToLessonId,a=i&&r?.some(c=>c.id===i)?i:void 0;return{continueType:s?.continueType??"",retryCount:Number(s?.retryCount??-1),skipLessonsIfPassed:s?.skipLessonsIfPassed??!1,skipLessonsOptional:s?.skipLessonsOptional??!0,skipToLessonId:a}},[s,r])}function sO(){return ue(Hm)}function oO(e){const t=(0,u.useMemo)(()=>E2(),[]);return ue(n=>t(e,n))}function rO(e){const t=(0,u.useMemo)(()=>WM(),[]);return ue(n=>t(e,n))}function iO(){const e=(0,u.useMemo)(()=>FM(),[]);return ue(e)}function j2(){const e=iO();return Ct(e?.title)}const Nge="/:mode",hd="/lessons/:lessonId",md="/lessons/:lessonId/:mode",aO=e=>e==="iframe"||e==="preview";function to(){const e=(0,Ae.RQ)(hd),t=(0,Ae.RQ)(md);return(e??t)?.params.lessonId}function cO(e){return e.courseLabels}function lO(){return ue(cO)}function dO(e,t){return t?.l10n?.localeLabelSets?.[e]?.labels||t?.courseLabels?.labels}function xe(){const{currentLocale:e}=ot();return ue(t=>dO(e,t))}function uO({isCourseComplete:e,percentCourseComplete:t}){const n=xe()??{},{courseResume:s,courseStart:r,processStartAgain:i}=n;return{courseCTALabel:e?i:t>0?s:r}}const hO=(0,u.lazy)(()=>C.e("webpack_container_remote_learn_distribution_frontend_learn_ai-learner-popout").then(C.t.bind(C,68789,23))),mO=()=>{const{currentLocale:e}=ot(),t=tP(ie()),n=ds(),s=RM(),r=od(),i=$t(to()),a=xe(),c=window,l=c?.growth?.getSubscription?.()?.id||t?.tenantId||void 0,d=c?.growth?.getUser?.()?.id||(t?`learner_${t.author}`:void 0),h=XM(),m=async()=>{try{await Ta()}catch{}},f=t?.aiTutorConfig?.image?.media?.image,p=Tt(f)||null,v=Ct(t?.aiTutorConfig?.name)??null,[g,x]=(0,u.useState)(!1),y=`rise_ai_tutor_nudge_${d}`,S=(0,u.useCallback)(()=>{localStorage.setItem(y,"1")},[y]);(0,u.useEffect)(()=>{if(localStorage.getItem(y))return;let T=null;const L=setTimeout(()=>{const E=document.getElementById("page-wrap");if(!E)return;const k=()=>{if(localStorage.getItem(y)){E.removeEventListener("scroll",k);return}const{scrollTop:N,scrollHeight:P,clientHeight:A}=E,R=P-A,j=R>0?N/R:0;R<=0||j>=.75&&(localStorage.setItem(y,"1"),x(!0),E.removeEventListener("scroll",k))};E.addEventListener("scroll",k,{passive:!0}),T=()=>E.removeEventListener("scroll",k),k()},0);return()=>{clearTimeout(L),T?.()}},[d,y,r]);const I=s||i?.type==="quiz",b=I?a?.aiTutorDisabledWhileQuiz??"AI Tutor is disabled while a quiz is in progress.":void 0;return(0,o.jsx)(hO,{aiTutorImageUrl:p,aiTutorName:v,apiKey:t.aiLearnerCourseApiKey??null,course:t,currentLessonId:r||null,currentLocale:e,disabled:I,disabledReason:b,labels:a,onOpen:S,resetSession:m,resolveAssetUrl:fC,restrictedLessonIds:h,rtl:n,scrollTriggered:g,subscriptionId:l,userId:d})},fO=()=>{const e=ie();return!Vl()&&!!e?.settings?.aiTutorEnabled?(0,o.jsx)(RP,{FallbackComponent:()=>null,children:(0,o.jsx)(u.Suspense,{fallback:null,children:(0,o.jsx)(mO,{})})}):null},w2=(0,u.createContext)(null);function pO({appType:e,children:t}){return(0,o.jsx)(w2.Provider,{value:e,children:t})}function gO(){const e=(0,u.useContext)(w2);if(e==null)throw new Error("useAppType must be used within an AppTypeProvider");return e}function Gm(){return gO()==="author"}const Wm=Object.assign((0,u.createContext)(void 0),{displayName:"BlockContext"});function Ut(){return(0,u.useContext)(Wm)}const R2=Object.assign((0,u.createContext)({}),{displayName:"BlockSettingsContext"});function fn(){return(0,u.useContext)(R2)}function Km(e,t="#ffffff"){if(e==null||e.trim()==="")return null;const n=No(e);if(n==null)return null;const s=n.alpha??1,r=No(t),i=s<1&&r!=null?(0,Ph.jh)(r,{...n,alpha:1},s,{space:"srgb"}):n;return(0,ON.A)(i,"srgb")}function vO(e,t){const n=Km(t);if(n==null)return 1;const s=Km(e,(0,Da.A)(n));return s==null?1:(0,PN.A)(s,n,"WCAG21")}const fs=e=>e==null?Ee.DARK:vO("#fff",e)>=4.5?Ee.LIGHT:Ee.DARK,Qm=(0,u.createContext)(null);Qm.displayName="CourseContext";const Zm=(0,u.createContext)(!1);Zm.displayName="PresentationContext";function CO({children:e,course:t,courseProgress:n,labels:s,labelsLocale:r,lessons:i,partnerContent:a,search:c}){const l=(0,u.useMemo)(()=>({course:t,courseProgress:n,labels:s,labelsLocale:r,lessons:i,partnerContent:a}),[t,n,s,r,i,a]);return(0,o.jsx)(Qm.Provider,{value:l,children:(0,o.jsx)(eP,{search:c,children:(0,o.jsx)(Zm.Provider,{value:Mo(t),children:e})})})}function fd(){return(0,u.useContext)(Qm)}function Fn(){return(0,u.useContext)(Zm)}function He(){return fd()?.course}function A2(){return Pe(He()?.title)}function Gt(){const{labels:e}=fd()??{};return e}function P2(e){const s=He()?.theme?.accentContrast;return typeof s!="string"?Ee.LIGHT:s===Ee.AUTO?fs(e):s}function ac(){const e=He();return e?.theme?.colorAccent??e?.color}function pd(){const{currentLocale:e}=ot(),t=Zl(),n=He();return n?Tm({course:n,locales:t,locale:e}):!1}function jge(){const{lessons:e}=fd();return e}const xO={text:{backgroundType:"blockTextBackgroundType",backgroundColor:"blockTextBackgroundColor",backgroundColorContrast:"blockTextBackgroundColorContrast",paddingStart:"blockTextPaddingStart",paddingEnd:"blockTextPaddingEnd",bodyFontSize:"blockTextBodyFontSize",headingFontSize:"blockTextHeadingFontSize",subheadingFontSize:"blockTextSubheadingFontSize"},continue:{completionType:"blockContinueCompletionType",label:"blockContinueLabel",completeHint:"blockContinueCompleteHint"}},wge=null;function bO(e,t){if(!e||!t)return null;const n=xO[e];if(!n)return null;const s=r=>r?t[r]:void 0;return{backgroundType:s(n.backgroundType),backgroundColor:s(n.backgroundColor),backgroundColorContrast:s(n.backgroundColorContrast),paddingStart:s(n.paddingStart),paddingEnd:s(n.paddingEnd),bodyFontSize:s(n.bodyFontSize),headingFontSize:s(n.headingFontSize),subheadingFontSize:s(n.subheadingFontSize),completionType:s(n.completionType),label:s(n.label),completeHint:s(n.completeHint)}}function zo(){const e=Ut(),t=He(),n=e?.family,s=t?.theme;return(0,u.useMemo)(()=>bO(n,s),[n,s])}var yO=C(83490),SO=C.n(yO);const As=(e,t)=>{const n=No(t);return n==null?null:(0,Da.A)((0,Ph.jh)(n,No("#000000"),e),{format:"hex",collapse:!1})};function IO(e){if(e==null)return 0;const t=Km(e);return t==null?0:(0,MN.J1)(t)}const Lt=gt({NEAR_BLACK:null,DARK:null,MED:null,LIGHT:null}),Ni=e=>{const t=IO(e);return t<=.01?Lt.NEAR_BLACK:t<=.05?Lt.DARK:t<=.35?Lt.MED:Lt.LIGHT},TO=e=>{switch(Ni(e)){case Lt.NEAR_BLACK:return as(.1,e);case Lt.DARK:return As(.4,e);case Lt.MED:return As(.2,e);case Lt.LIGHT:return as(.3,e)}};var LO,EO,kO,Ym,M2,$o;const O2=2,Rge=(e,t,n)=>e??t??n,B2=(e,t,n,s)=>e??t??n??s,Gn=gt({WHITE:null,TRANSPARENT:null}),NO={markerColorContrast:Ee.AUTO,paddingBottom:3,paddingLinked:!0,paddingTop:3,snippetColorContrast:Ee.AUTO},jO={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 wO(e,t){return jO[e]?.includes(t)??!1}const RO={360:{storyline:"#fafafa"},impact:{c:"#ececec",d:"#f5f5f5"},"interactive-fullscreen":{process:"#f5f5f5",sorting:"#f5f5f5",timeline:"#f5f5f5"},quote:{d:"#f5f5f5"}};function qm(e,t){const n=RO[e]?.[t];return n==null?{}:{backgroundColor:n,backgroundType:oe.COLOR}}const AO=null;function Age(e,t){return AO[e]?.includes(t)??!1?.1:.5}function PO(e){switch(e.backgroundType){case oe.COLOR:return e.backgroundColor;case oe.ACCENT:return e.courseColor;case oe.TINT:return Mh(e.courseColor);case oe.LIGHT:return"#ffffff";case oe.GRAY:return"#fafafa";case oe.DARK:return"#303030";case oe.BLACK:return"#000000"}}const MO={multimedia:{embed(e){return{cardMode:e.showBorder===!1?Gn.TRANSPARENT:Gn.WHITE}}}};function OO(e,t,n){return BO(e,t,n)}function BO(e,t,n){const s=qm(e,t);if(n.v==null||n.v<O2){n=DO(n);const l=s.backgroundColor,d=n.backgroundColor?.toLowerCase(),h=l!=null&&d===l.toLowerCase(),m=l==null&&d==="#ffffff";d&&(h||m)&&(n=SO()("backgroundColor",n))}const r=MO[e]?.[t]?.(n),i=n.backgroundColor&&n.backgroundType==null?{backgroundType:oe.COLOR}:{};return[{accentColor:null},NO,r,n,i,{v:O2}].reduce((l,d)=>d==null?l:{...l,...Zv()(l2,d)},{})}function DO(e){return{...e,backgroundType:null,cardMode:null,v:1}}const FO=null;function Pge(e,t){return!FO[e]?.includes(t)}const _O=null;function Mge(e,t){return!_O[e]?.includes(t)}function HO(e){return e===kO.LIGHT?$o.LIGHT:$o.DARK}function VO(e,t){if(t===Ym.AUTO){if(!e)return $o.DARK;const n=LO(e);return EO(n)===Ym.DARK?$o.DARK:$o.LIGHT}else return t===Ym.LIGHT?$o.LIGHT:$o.DARK}function Oge(e,t,n,s,r){const i=e?.backgroundType;return e?.cardMode===Gn.TRANSPARENT?i===M2.IMAGE?HO(t?.overlayColor):s&&i!==M2.ACCENT?r:VO(n,e?.customBackgroundColorContrast):s?r:$o.DARK}const zO=null;function Bge(e,t){return zO[e]?.includes(t)??!1}const $O=new RegExp(/^#([a-f0-9]{8}|[a-f0-9]{6}|[a-f0-9]{3})$/,"i"),Xm=(e,t)=>t!=null&&$O.test(t)?t:e;function Wt(e){const{contrast:t=Ee.AUTO,backgroundColor:n="#fff"}=e,s=Xm("#fff",n),r=fs(s);return t===Ee.DARK||t===Ee.AUTO&&r===Ee.DARK?At.DARK:At.LIGHT}const UO=e=>e.blockBackgroundType??e.familyBackgroundType??e.courseBackgroundType??e.blockTypeFallbackType??oe.LIGHT,GO=e=>e.effectiveBackgroundType===oe.COLOR?e.blockBackgroundColor||e.familyBackgroundColor||e.courseBackgroundColor||e.blockTypeFallbackColor||null:e.settingsBackgroundColor??null,WO=e=>e.blockCustomContrast??e.familyBackgroundColorContrast??e.courseBackgroundColorContrast??Ee.AUTO,D2=e=>{const{family:t,variant:n,customBackgroundColorContrast:s}=e;return!s&&(t==="image"&&n!=="text aside"||t==="chart"||n==="sorting")},KO=e=>{const{backgroundType:t,backgroundColor:n,accentColor:s,customBackgroundColorContrast:r,accentContrast:i,family:a,variant:c}=e;if(!(t===oe.ACCENT||t===oe.COLOR))return null;const d=t===oe.ACCENT?s:n;let h;return t===oe.ACCENT?h=i:D2({family:a,variant:c,customBackgroundColorContrast:r})?h=fs(n):h=r??Ee.DARK,Wt({backgroundColor:d??void 0,contrast:h})},QO=e=>KO(e)===At.LIGHT,ZO=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},YO=e=>{const{backgroundColor:t,family:n,variant:s,blockCustomContrast:r,familyBackgroundColorContrast:i,courseBackgroundColorContrast:a}=e,c=r??i??a??Ee.AUTO,d=D2({family:n,variant:s,customBackgroundColorContrast:c})?fs(t):c;return Wt({backgroundColor:t??void 0,contrast:d})};function Wn(){const e=He(),t=zo(),n=fn(),s=Ut(),r=s?qm(s.family,s.variant):{};return UO({blockBackgroundType:n?.backgroundType,familyBackgroundType:t?.backgroundType,courseBackgroundType:e?.theme?.blockBackgroundType,blockTypeFallbackType:r.backgroundType})}var F2=C(49860);const qO="settings";function Jm(e){return t=>{const n=F2.forwardRef((s,r)=>{const i=fn(),a={...s,[e??qO]:i};return(0,o.jsx)(t,{...a,ref:r})});return n.displayName=`withBlockSettings(${t.displayName||t.name})`,n}}function En(){const e=He(),t=fn(),n=zo(),s=Wn(),r=Ut();if(t==null)return null;const i=r?qm(r.family,r.variant):{},a=GO({effectiveBackgroundType:s,blockBackgroundColor:t.backgroundColor,familyBackgroundColor:n?.backgroundColor,courseBackgroundColor:e?.theme?.blockBackgroundColor,blockTypeFallbackColor:i.backgroundColor,settingsBackgroundColor:t.backgroundColor}),c={...t,backgroundType:s,backgroundColor:a};return PO(c)}const XO="backgroundColor";function JO(e){return t=>{const n=F2.forwardRef((s,r)=>{const i=En(),a={...s,[e??XO]:i};return(0,o.jsx)(t,{ref:r,...a})});return n.displayName=`withBackgroundColor(${t.displayName||t.name})`,n}}function ef({children:e,...t}){const n=Ut(),s=fn(),r=ac(),i=(0,u.useMemo)(()=>{const a=n==null?t:OO(n.family,n.variant,t);return{courseColor:r,...s,...a}},[n,t,r,s]);return(0,o.jsx)(R2.Provider,{value:i,children:e})}var eB;const Dge=null;function tB({children:e,course:t}){const n=(0,u.use)(xi),s=(0,u.useMemo)(()=>n.l10n==null?n:{l10n:{...n.l10n,localeSelectorOptions:void 0,showLocaleSelector:!1}},[n]);return e}function Fge(e){return eB(e)?"slide":"element"}var gd=C(49860);const xt=V("curtain"),nB={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."},sB=({labels:e,loadingText:t,runtimeFetchError:n,showHeader:s,status:r})=>{const i={...nB,...e},[a,c]=gd.useState(!1),l=()=>c(!0),d=gd.useRef(null);return gd.useEffect(()=>(d.current=setTimeout(l,1e4),()=>{d.current&&clearTimeout(d.current)}),[]),gd.useEffect(()=>{if(r==="error"){const h=new Error("There was a socket connection error. The renderReconnect curtain was displayed");yE.yf.logger.info(h.message,h)}},[r]),r==="runtimeFetchError"?(0,o.jsx)("div",{className:xt("container",{"show-header":s}),children:(0,o.jsx)("div",{className:xt(),children:(0,o.jsx)("div",{className:xt("title"),children:n})})}):r==="fatalError"?(0,o.jsx)(rB,{labelCurtainSomethingWrong:i.curtainSomethingWrong,labelCurtainSomethingWrongRefresh:i.curtainSomethingWrongRefresh,labelCurtainSomethingWrongTryAgain:i.curtainSomethingWrongTryAgain,showHeader:s}):r==="error"&&a?(0,o.jsx)(aB,{labelCurtainSessionTimedOut:i.curtainSessionTimedOut,labelCurtainSessionTimedOutRefresh:i.curtainSessionTimedOutRefresh,labelCurtainSessionTimedOutRestart:i.curtainSessionTimedOutRestart,showHeader:s}):r==="error"?(0,o.jsx)(iB,{labelCurtainOffline:i.curtainOffline,labelCurtainOfflineReconnecting:i.curtainOfflineReconnecting,showHeader:s}):(0,o.jsx)(oB,{labelCurtainLoading:i.curtainLoading,showHeader:s,text:t})},_2=()=>window.location.reload(),oB=({labelCurtainLoading:e,showHeader:t,text:n})=>(0,o.jsx)("div",{className:xt("container",{"show-header":t}),children:(0,o.jsxs)("div",{className:xt(),children:[(0,o.jsx)("div",{className:xt("spinner")}),(0,o.jsx)("div",{className:xt("text"),children:n||e})]})}),rB=({labelCurtainSomethingWrong:e,labelCurtainSomethingWrongRefresh:t,labelCurtainSomethingWrongTryAgain:n,showHeader:s})=>(0,o.jsx)("div",{className:xt("container",{"show-header":s}),children:(0,o.jsxs)("div",{className:xt(),children:[(0,o.jsx)("div",{className:xt("title"),children:e}),(0,o.jsx)("div",{className:xt("description"),children:n}),(0,o.jsx)("button",{className:xt("button"),onClick:_2,type:"button",children:t})]})}),iB=({labelCurtainOffline:e,labelCurtainOfflineReconnecting:t,showHeader:n})=>(0,o.jsx)("div",{className:xt("container",{"show-header":n}),children:(0,o.jsxs)("div",{className:xt(),children:[(0,o.jsx)("div",{className:xt("spinner",{reconnect:!0})}),(0,o.jsx)("div",{className:xt("title"),children:e}),(0,o.jsx)("div",{className:xt("description"),children:t})]})}),aB=({labelCurtainSessionTimedOut:e,labelCurtainSessionTimedOutRefresh:t,labelCurtainSessionTimedOutRestart:n,showHeader:s})=>(0,o.jsx)("div",{className:xt("container",{"show-header":s}),children:(0,o.jsxs)("div",{className:xt(),children:[(0,o.jsx)("div",{className:xt("title"),children:e}),(0,o.jsx)("div",{className:xt("description"),children:n}),(0,o.jsx)("button",{className:xt("button"),onClick:_2,type:"button",children:t})]})}),H2=sB,_ge=null;function cB({children:e}){return e}const Ps={get isInstantLink(){return!!window.InstantLinks?.publicId}};var V2=C(1368),lB=C(99979),dB=C(52872),uB=C(8099),hB=C(15995),mB=C(24899),fB=C(91961),pB=C(31072),gB=C(97730),vB=C(7145),CB=C(44383),xB=C(56143),bB=C(53183),yB=C(78001),SB=C(52546),IB=C(2972),TB=C(13392),LB=C(50408),EB=C(70552),kB=C(70720),NB=C(12544),jB=C(92873),wB=C(24945),RB=C(6918),AB=C(17518),PB=C(25532),MB=C(70836),OB=C(56303),BB=C(29415),DB=C(25130),FB=C(21606),_B=C(4893),HB=C(66343),VB=C(53119),zB=C(70482),$B=C(46584),UB=C(83867),GB=C(71265),WB=C(35082),KB=C(17745),QB=C(74499),ZB=C(83644),YB=C(6556),qB=C(92584),XB=C(65421),JB=C(23721),eD=C(46832),tD=C(167),nD=C(89067),sD=C(48482),oD=C(58543),rD=C(65607),iD=C(12476),aD=C(59319),cD=C(3370),lD=C(11373),dD=C(3273),uD=C(35520),hD=C(5491),mD=C(81009),fD=C(47073),z2=C(16625),pD=C(59099),gD=C(23572),vD=C(73574),CD=C(12409),xD=C(11198),bD=C(8495),yD=C(85754),SD=C(93706),ID=C(32085),TD=C(60441),LD=C(83045),ED=C(99419),kD=C(90698),ND=C(83704),jD=C(486),wD=C(60100),RD=C(47855),AD=C(64713),PD=C(43151),MD=C(14190),OD=C(98876),BD=C(7252),DD=C(18631),FD=C(81755),_D=C(12277),HD=C(52126),VD=C(31076),zD=C(64089),$D=C(80538),UD=C(63126),GD=C(93257),WD=C(49467),KD=C(33988),QD=C(15792),ZD=C(24129),YD=C(83656),qD=C(82837),XD=C(51119),JD=C(62983),eF=C(34340),$2=C(36274),tF=C(86546),nF=C(88379),sF=C(67199),oF=C(18871),rF=C(61005),iF=C(56242),aF=C(28529),cF=C(76835),lF=C(63389),dF=C(17410),uF=C(78623),hF=C(76062),mF=C(96826),fF=C(95906),pF=C(39261),gF=C(2522),vF=C(51455),CF=C(83388),xF=C(87754),bF=C(33111),yF=C(23140),SF=C(17477),IF=C(44915),TF=C(34663),LF=C(94340),EF=C(27266),kF=C(19751),NF=C(86558),jF=C(6636),wF=C(6322),RF=C(40855),AF=C(50101),PF=C(38993),MF=C(74125),OF=C(11122),BF=C(89729),DF=C(22249),FF=C(90657),_F=C(21971),HF=C(13603),VF=C(66865),zF=C(52064),$F=C(46358),UF=C(57371),GF=C(94579),WF=C(93044),KF=C(76368),QF=C(24862),ZF=C(88987),YF=C(16992),qF=C(59828),XF=C(1673),JF=C(28294),e_=C(96930),t_=C(28251),U2=C(10473),n_=C(67203),s_=C(5888),o_=C(75562),r_=C(77466),i_=C(70340),a_=C(19818),c_=C(57395),l_=C(75815),d_=C(49539),u_=C(59964),h_=C(34589),m_=C(46976),f_=C(4251),p_=C(33445),g_=C(97062),v_=C(81438),C_=C(58708),x_=C(37420),b_=C(85036),y_=C(38159),S_=C(67331),I_=C(74792),T_=C(43537),L_=C(86883),E_=C(6899),k_=C(11020),N_=C(82761),j_=C(38033),w_=C(10523),R_=C(80224),A_=C(94905),P_=C(88234),M_=C(51680);const O_={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"]},B_={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"]]},D_={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"]},F_={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"]},__={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"]},H_={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"]},V_={"alert-circle-solid":yD.lE,"alert-circle":$2.lE,"alert-diamond":gF.xG,"angle-right":ND.vm,"arrow-down-from-line":wD.xZ,"arrow-down-to-bracket":RD.a_,"arrow-down-to-line":AD.yH,"arrow-down":jD.B0,"arrow-left":PD.Ce,"arrow-right-from-line":OD.Pe,"arrow-right":MD.dm,"arrow-rotate-left-light":IB.V3,"arrow-rotate-left":BD.V3,"arrow-up-from-bracket":FD.MN,"arrow-up-from-line":_D.s8,"arrow-up-right-from-square":HD.faArrowUpRightFromSquare,"arrow-up":DD.IN,"arrows-two-from-center":lB.A1,"arrows-two-to-center":dB.hL,"badge-check":WB.Zs,"bar-chart":VD.X8,bars:KB.ck,"bars-regular":zD.ck,"block-selector":TD.iH,"book-open":UD.Re,"book-sparkles":GD.E4,book:$D.LB,"browser-light":mB.c9,browser:WD.c9,building:uB.UR,"building-regular":hB.UR,"cards-blank":KD.Xm,"caret-down":ZB.xB,"caret-right":YB.fU,"chart-column":GB.q9,"check-regular":ED.e6,check:QB.e6,"chevron-down-solid":qB.Jt,"chevron-down":QD.Jt,"chevron-left-light":fB.Wz,"chevron-left-solid":JB.Wz,"chevron-left":ZD.Wz,"chevron-right-light":pB.Xk,"chevron-right-solid":eD.Xk,"chevron-right":YD.Xk,"chevron-up-solid":XB.w2,"chevron-up":qD.w2,"circle-arrow-right":sD.Ni,"circle-arrow-up":nD.yi,"circle-check-regular":JD.QR,"circle-check-solid":oD.QR,"circle-check":OB.QR,"circle-dot":eF.pp,"circle-half-stroke":tF.B2,"circle-exclamation":$2.lE,"circle-info":nF.faCircleInfo,"circle-notch":rF.s4,"circle-plus-duotone":BB.q_,"circle-plus-regular":sF.q_,"circle-plus":rD.q_,"circle-small-solid":iD.ZP,"circle-small":oF.ZP,"circle-solid":tD.GE,"circle-x":aD.Ub,"circle-xmark":iF.bn,"circle-xmark-solid":cD.bn,"circle-xmark-duotone":DB.bn,circle:XD.GE,"clipboard-list-check":aF.S3,"clock-rotate-left":cF.Yj,clone:dF.$3,close:uF.yY,"closed-captioning":lF.UM,"code-fork-duotone":FB.zt,"code-fork-regular":hF.zt,code:P_.jT,comment:mF.DN,copy:fF.jP,crop:pF.K1,"edit-regular":vF.MT,"ellipsis-regular":CF.Dw,"ellipsis-vertical-regular":xF.nx,envelope:bF.y_,"external-link":yF.vM,"eye-slash":vB.k6,eye:gB.pS,"face-anguished":TB.xX,"face-anguished-regular":LB.xX,"face-frown":EB.Ho,"face-frown-regular":kB.Ho,"face-grin-regular":NB.pj,"face-laugh":jB.ou,"face-laugh-regular":wB.ou,"face-meh":RB.Lz,"face-meh-regular":AB.Lz,"face-smile":PB.H8,"face-smile-regular":MB.H8,"file-audio":IF.qe,"file-duotone":_B.A4,"file-export-light":xB.o1,"file-export":TF.o1,"file-import":LF.$M,"file-lines":EF.bL,"file-pdf-light":CB.O_,"file-pdf":kF.O_,file:SF.A4,"folder-image":NF.JK,"folder-open":HB.Uj,gear:jF.BH,globe:wF.Bw,"graduation-cap":RF.eS,"grid-2":AF.Qy,"grid-solid":lD.Qy,"grip-dots-vertical":PF.IM,"hand-pointer":MF.A8,"image-landscape":BF.oC,"image-portrait":DF.E4,image:OF.jb,"photo-film":FF._Z,"info-circle":_F.iW,language:dD.mh,"layers-solid":bD.qI,"link-simple-slash":zF.r2,"link-simple":VF.wi,"link-slash":$F.TH,link:HF.CQ,list:UF.IT,"list-check":GF.UN,"location-dot":yB.gK,"lock-keyhole-light":bB.Yp,lock:uD.DW,"magnifying-glass-plus":KF.bM,"magnifying-glass":WF.$U,megaphone:ID.OR,"message-quote":QF.ps,"minus-solid":hD.EZ,minus:ZF.EZ,paintbrush:VB.ue,palette:YF.fy,paste:qF.R9,pause:XF.G1,"pause-solid":mD.G1,"pen-line":JF.pg,"pen-nib":t_.us,"pen-to-square":e_.faPenToSquare,"pencil-duotone":zB.zL,"pencil-regular":kD.zL,"pencil-thin":M_.zL,pencil:SB.zL,"play-regular":U2.ij,"play-solid":fD.ij,play:U2.ij,"flag-solid":z2.s6,flag:z2.s6,"plus-regular":n_.QL,plus:s_.TS,"quote-left":o_.$7,"rectangle-history-circle-plus":i_.Hu,"rectangle-regular":r_.vt,"rectangle-vertical-history":a_.Lt,rocket:c_.KM,"ruler-horizontal":l_.Si,"ruler-triangle":d_.cb,"sliders-simple":pD.AD,"sparkles-solid":gD.p7,sparkles:u_.p7,"spinner-third":h_.sq,"square-arrow-down":f_.Y1,"square-arrow-right":p_.mT,"square-arrow-up-right":g_.fL,"square-check-solid":vD.Dn,"square-check":v_.Dn,"square-duo":$B.Nf,"square-info":C_.Lg,"square-plus":x_.Vd,square:m_.Nf,"stopwatch-regular":b_.nw,table:y_.w9,tag:S_._2,text:I_.jw,"trash-can":L_.sj,trash:T_.yL,"triangle-exclamation":SD.JA,"user-group":CD.US,"users-regular":E_.gd,users:UB.gd,video:k_.n2,volume:N_.eF,volumeHigh:j_.AI,volumeLow:w_.gN,volumeXmark:R_.H_,"wand-magic-sparkles":A_.Ys,"waveform-lines":LD.Wx,xmark:xD.Jy},z_={"audio-plus":D_,"clone-plus":F_,"flask-outline":__,language:H_,reach:B_,"rise-com":O_},ae=(0,u.memo)(function({"aria-label":t,className:n,classNameIcon:s,color:r,"data-testid":i,name:a,rotation:c,spin:l,style:d,styleIcon:h}){return(0,o.jsx)("span",{className:n,"data-testid":i,style:{color:r,...d},children:(0,o.jsx)(V2.g,{"aria-label":t,className:s,icon:V_[a],rotation:c,spin:l,style:h})})}),Hge=(0,u.memo)(function({className:t,classNameIcon:n,color:s,name:r,style:i,styleIcon:a}){return(0,o.jsx)("span",{className:t,style:{color:s,...i},children:(0,o.jsx)(V2.g,{className:n,icon:z_[r],style:a})})}),$_=({value:e,fallback:t})=>{const n=Pe(e),s=Mt(e);return t?(0,o.jsx)("span",{"data-l10n-id":s,children:n||t}):(0,o.jsx)("span",{"data-l10n-id":s,children:n})};function U_({value:e,children:t}){const n=Pe(e);return t(n)}const kn=$_,G2=new Intl.DisplayNames(["en"],{type:"language",fallback:"code"}),G_=(e,t)=>{const n=e?.toLowerCase();try{return t?.[n]?.authorDisplayName??G2.of(e)}catch(s){return console.warn(`Language ${e} invalid`,s),e}},W_=(e,t)=>{try{return t?.[e]?.learnerDisplayName??G2.of(e)}catch(n){return console.warn(`Language ${e} invalid`,n),e}},tf=()=>{const e=bi(),t=lm(e);return(0,u.useCallback)(s=>G_(s,t),[t])},K_=()=>{const e=bi(),t=lm(e);return(0,u.useCallback)(s=>W_(s,t),[t])};var Q_=C(42663);function pn(e){const{to:t,children:n}=e,s=(0,Ae.zy)(),r=(0,u.useMemo)(()=>mh(t,s),[s,t]);return(0,o.jsx)(Ae.N_,{...e,to:r,children:n})}function Z_({children:e,locale:t,...n}){const s=(0,Ae.zy)(),r=Dn(),i=(0,u.useMemo)(()=>{const a=t===r?"":t,c=new URLSearchParams(s.search);return c.set("locale",a),s.pathname+"?"+c.toString()+s.hash},[r,t,s]);return(0,o.jsx)(pn,{...n,to:i,children:e})}var Y_=C(92238),vd=C.n(Y_);const q_=["End"],X_=["Enter"],J_=["Home"],eH=["Tab"],tH=[" ","Spacebar"],nH=["Escape","Esc"],sH=["ArrowUp"],oH=["ArrowDown"],rH=["ArrowLeft"],iH=["ArrowRight"],Ms=e=>t=>e.includes(t.key),aH=e=>e.altKey||e.ctrlKey||e.metaKey,cH=Ms(q_),ji=Ms(X_),lH=Ms(J_),Cd=Ms(eH),nf=Ms(tH),Nn=Ms(nH),Fr=Ms(sH),_r=Ms(oH),Uo=Ms(rH),Go=Ms(iH),cc=ko()(nf,ji),Vge=ko()(Cd,ji),dH=ko()(Go,Fr),uH=ko()(Uo,_r),hH=ko()(Fr,_r),W2=gr()(cc),K2=25,mH=vd()((e,t)=>{e.scrollTop!==0&&(t.preventDefault(),e.scrollTop-=K2)}),fH=vd()((e,t,n)=>{t&&(n.preventDefault(),e.scrollTop+=K2)}),pH=(e,t)=>n=>{const s=fH(e,t),r=mH(e);Tn()([[_r,s],[Fr,r]])(n)},ps=V("locales-dropdown"),gH=({backToStackCourseId:e,currentLocale:t,defaultLocale:n,disabledTooltip:s,isBcd:r,isDisabled:i,locales:a,message:c,onChange:l,optionType:d,renderLocaleBadge:h,showMessageIndicator:m})=>{const f=(0,u.useRef)(null),p=(0,u.useRef)(null),[v,g]=(0,u.useState)(!1),[x,y]=(0,u.useState)(!1),S=v&&!i,I=(0,u.useMemo)(()=>a.filter(N=>N.localeCode!==n),[n,a]),b=(0,u.useMemo)(()=>a.find(N=>N.localeCode===n),[n,a]),T=(0,u.useMemo)(()=>a.find(N=>N.localeCode===t),[t,a]);(0,u.useLayoutEffect)(()=>{S&&x&&(f.current?.querySelector(`[data-locale="${t}"]`)?.focus(),y(!1))},[S,x,t]),(0,u.useEffect)(()=>{const N=P=>{Nn(P)&&(p.current?.focus(),g(!1)),Cd(P)&&setTimeout(()=>{f.current.contains(document.activeElement)||g(!1)},0)};return S&&document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[S]);const L=(0,u.useCallback)(N=>{i||(!S&&document.activeElement===N.currentTarget&&y(!0),g(!S))},[i,S]),E=(0,u.useCallback)(N=>{S&&!p.current?.contains(N?.target)&&g(!1)},[S]);(0,Q_.A)(f,E),(0,u.useEffect)(()=>{const N=()=>setTimeout(()=>{document.activeElement.tagName==="IFRAME"&&E()},0);return window.addEventListener("blur",N),()=>window.removeEventListener("blur",N)},[E]);const k=(0,u.useCallback)(N=>{document.activeElement===N.currentTarget&&p.current?.focus(),g(!1),l?.(N.currentTarget.getAttribute("data-locale"))},[l]);return(0,o.jsxs)("div",{className:ps({isBcd:r,isDisabled:i,isOpen:S}),children:[(0,o.jsx)("div",{className:ps("trigger-wrap"),children:(0,o.jsxs)("button",{"aria-disabled":i,className:ps("trigger"),onClick:L,ref:p,title:i?s:void 0,type:"button",children:[r&&m?(0,o.jsx)(ae,{className:ps("warning-icon"),name:"triangle-exclamation"}):(0,o.jsxs)(o.Fragment,{children:[m&&(0,o.jsx)("div",{className:ps("message-indicator")}),(0,o.jsx)(ae,{name:"globe"})]}),T.displayName,(0,o.jsx)(ae,{name:"chevron-down"})]})}),(0,o.jsxs)("div",{className:ps("contents"),ref:f,children:[c,(0,o.jsx)("div",{className:ps("grouping-header"),children:"Source language"}),(0,o.jsx)(Q2,{checked:n===t,locale:b,onClick:k,renderLocaleBadge:h,type:d}),(0,o.jsx)("div",{className:ps("grouping-header"),children:"Translations"}),I.map(N=>(0,o.jsx)(Q2,{checked:N.localeCode===t,locale:N,onClick:k,renderLocaleBadge:h,type:d},N.localeCode)),e&&(0,o.jsx)("a",{className:ps("stack-button"),href:`/manage/locales/${e}`,children:"Back to Stack"})]})]})},Q2=({checked:e,locale:t,onClick:n,renderLocaleBadge:s,type:r})=>r==="link"?(0,o.jsxs)(Z_,{className:ps("option",{checked:e}),"data-locale":t.localeCode,locale:t.localeCode,onClick:n,children:[s?.(t.localeCode,e),t.displayName]},t.localeCode):(0,o.jsxs)("button",{className:ps("option",{checked:e}),"data-locale":t.localeCode,onClick:n,type:"button",children:[s?.(t.localeCode,e),t.displayName]},t.localeCode),vH=({hideBackToStack:e,isBcd:t,...n})=>{const s=He(),{currentLocale:r}=ot(),i=Zl(),a=Dn(),c=tf(),l=!e&&!t?s?.id:void 0,d=(0,u.useMemo)(()=>i.map(h=>({localeCode:h.locale,displayName:c(h.locale)})),[c,i]);return(0,o.jsx)(gH,{backToStackCourseId:l,currentLocale:r,defaultLocale:a,isBcd:t,locales:d,optionType:"link",...n})},Z2=window.location.origin,CH=1e3,xH="course:ready",Y2="localizedSharePreview:ready",bH="preview:selectLocale",sf="localizedSharePreview:toggleCurtain",q2="localizedSharePreview:togglePreview",gs=V("localized-share-preview"),wi=!!window.frameElement,X2=e=>(0,on.HX)(e)&&Ah(),J2=e=>X2(e)&&!wi,yH=(e,t)=>window.parent?.postMessage({type:e,data:t});let ey=null;const SH=({children:e,localesDropdown:t,title:n})=>(0,o.jsxs)("div",{className:gs("header"),dir:"ltr",children:[(0,o.jsxs)("div",{className:gs("header-title-dropdowns"),children:[(0,o.jsx)("div",{className:gs("header-title"),children:(0,o.jsx)("span",{className:gs("header-title-text"),children:(0,o.jsx)(kn,{value:n})})}),t&&(0,o.jsx)("div",{className:gs("header-dropdowns"),children:t})]}),(0,o.jsx)("div",{className:gs("header-btn-group"),children:e})]}),IH=({children:e,className:t,disabled:n=!1,onClick:s})=>(0,o.jsx)("button",{className:["button button--default button--header-done",t,n?"button--disabled":void 0].filter(Boolean).join(" "),disabled:n,onClick:s,style:{fontSize:"1.4rem",fontWeight:600,letterSpacing:0,textTransform:"none"},type:"button",children:e}),TH=({children:e})=>{const t=nt(),n=ln(),s=(0,Ae.zy)(),{currentLocale:r,setCurrentLocale:i}=ot(),a=Dn(),c=cP(),l=ie(),h=!!(l&&"hasPassword"in l?l.hasPassword:void 0)||mC(),m=(0,u.useRef)(null),[f,p]=(0,u.useState)(!1),[v,g]=(0,u.useState)(!1),[x,y]=(0,u.useState)(!h),S=(0,u.useMemo)(()=>{const j=new URLSearchParams(window.location.search),M=new URLSearchParams;for(const O of["from"])j.has(O)&&M.set(O,j.get(O));const w=M.toString();return`${Z2}/share/${window.shareId}${w?`?${w}`:""}#/?locale=${r}`},[]),[I,b]=(0,u.useState)(null),[T,L]=(0,u.useState)(r),[E,k]=(0,u.useState)(!1),[N,P]=(0,u.useState)(!wi),A=(j,M)=>m.current?.contentWindow.postMessage({type:j,data:M});(0,u.useEffect)(()=>{wi||A(bH,r)},[r]),(0,u.useEffect)(()=>{wi&&(yH(Y2),setTimeout(()=>k(!0),0))},[]),(0,u.useEffect)(()=>{const j=M=>{if(M.origin!==Z2)return;const O=M.data?.type,B=M.data?.data;if(wi)switch(O){case sf:{P(B);break}case q2:{B?(L(r),b(s),t(tm(!0)),i(a),n("/",{replace:!0})):(t(tm(!1)),i(T),n(I.pathname+I.search+I.hash||"/",{replace:!0})),document.querySelector(".cover")?.scrollTo(0,0),document.querySelector(".page-wrap")?.scrollTo(0,0);break}}else switch(O){case xH:{P(!1);break}case Y2:{y(!0);break}}};return window.addEventListener("message",j),()=>{window.removeEventListener("message",j)}},[a,t,n,r,s,T,I,i]);const R=(0,u.useCallback)(()=>{const j=!f;clearTimeout(ey),g(!0),A(sf,!0),ey=setTimeout(()=>{g(!1),A(sf,!1),p(j)},CH),setTimeout(()=>{A(q2,j)},0)},[f]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:gs("curtain",{hide:!N}),children:(0,o.jsx)(H2,{status:"loading"})}),wi?E&&e:(0,o.jsxs)("div",{className:gs(),children:[x&&(0,o.jsx)(SH,{localesDropdown:!f&&!v&&(0,o.jsx)(vH,{hideBackToStack:!0}),title:c,children:(0,o.jsx)(IH,{className:gs("preview-button"),disabled:v,onClick:R,children:f?"Close Learner Preview":(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ae,{className:gs("preview-button-icon"),name:"play-regular"}),"Preview as Learner"]})})}),(0,o.jsx)("iframe",{allowFullScreen:!0,"aria-label":"Course preview",className:gs("iframe"),ref:m,src:S})]})]})},LH=(0,u.lazy)(()=>C.e("_b106").then(C.t.bind(C,63744,23))),EH=({children:e})=>{const t=ie(),{setCurrentLocale:n,currentLocale:s}=ot(),r=Pe(t?.title),i=bi()?.l10n?.languageCodeMetadata??{},a=Object.entries(i).map(([c,l])=>({code:c,learnerDisplayName:l.learnerDisplayName})).sort((c,l)=>c.learnerDisplayName.localeCompare(l.learnerDisplayName));return(0,o.jsx)(u.Suspense,{fallback:null,children:(0,o.jsx)(LH,{courseTitle:r,currentLocale:s,locales:a,setCurrentLocale:n,children:e})})};function kH({children:e}){const t=ie();return t&&X2(t)?(0,o.jsx)(TH,{children:e}):Ps.isInstantLink?(0,o.jsx)(EH,{children:e}):(0,o.jsx)(o.Fragment,{children:e})}const of=(0,u.createContext)(void 0);of.displayName="RiseComPartnerTrackingContext";function NH({children:e,onTrack:t}){return(0,o.jsx)(of.Provider,{value:t,children:e})}function ty(){return(0,u.useContext)(of)}var jH=C(76351),wH=C.n(jH),RH=C(20152),AH=C.n(RH);class no{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),s=/CriOS/.test(window.navigator.userAgent);return t&&n&&!s}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:i})=>/Google Chrome/i.test(i));const{userAgent:n,vendor:s}=globalThis.navigator,r=/Edg\/|OPR\/|SamsungBrowser|Vivaldi|Brave/.test(n);return/Chrome/.test(n)&&/Google Inc/.test(s)&&!r}}const PH=Y0()(js()),ny=e=>t=>`${e}/${t.id}`,MH=(e,t)=>Av()({data:(0,he.action)(t),method:"POST",url:d9(PH(`/${t}`),et()("url"),e),...Lo()(["headers","withCredentials"],e)}),OH=e=>(t,n)=>bv()(t,ny(n),rf(e,n)),BH=e=>zt()(Pt()({},["response","data"]),Ra()(et()("type"),(0,he.error)(e))),DH=(e,t)=>n=>e.postRequest?e.postRequest(t,n):n,sy=e=>t=>n=>s=>ph(s,MH(t,n),e,fh()(BH(n),gr()(ka()("data"),et()("data"))),AH()(rs()(et()("error"),ur().Rejected,ur().of)),DH(t,{type:n,payload:s})),FH=({url:e,method:t,data:n,headers:s})=>{if(no.isFirefox){const r=new Blob([JSON.stringify(n)],{type:"application/json"}),i=window.navigator.sendBeacon(e,r);return Promise.resolve({type:n.type,payload:{...n.payload,queued:i}})}return fetch(e,{method:t,credentials:"include",headers:{"Content-Type":"application/json",...s},body:JSON.stringify(n),keepalive:!0}).then(r=>r.json()).then(li()("data"))},_H=ur().fromPromise(FH),rf=nm()(3,sy(Pa)),HH=nm()(3,sy(_H)),VH=e=>(t,n)=>wH()(t,ny(n),rf(e,n)),zH=e=>({debounce:OH(e),send:rf(e),fetchWithKeepAlive:HH(e),throttle:VH(e)}),$H=`${Ne("RISE_RUNTIME_URI")}/ducks`,UH=zH({headers:()=>({"x-rise-authoring-client":"74a467d51e9b782c6f92e975d83f0d7376ffec18"}),postRequest:(e,t)=>t,url:$H,withCredentials:!0});var GH=C(17077),WH=C.n(GH);const Wge=WH()({context:{app:{name:"rise-frontend"}},payload:{articulate_user:w4(),userRole:P4(),subId:M4(),subPlan:O4(),subStatus:B4()}}),KH=js()("rise/track/")("TRACK");var Qge;const QH=e=>({...e,context:{locale:navigator.language,device:Ev(),channel:Tv(),userAgentData:Lv(),page:kv(),userAgent:Nv(),...e.context}}),ZH=(e,t)=>({...e,properties:{...Iv(t),...e.properties}}),oy=e=>(t,n)=>{const s=n(),r=sh();let i=QH(e);return i=ZH(i,s),i.userId=i.userId??r,i.author=i.author??r,t(UH.send(KH)(i))};function YH({children:e}){const t=nt(),n=(0,u.useCallback)(s=>t(oy(s)),[t]);return(0,o.jsx)(NH,{onTrack:n,children:e})}var xd=C(49860);const ry=xd.createContext({typefaces:[]});function qH({addTypefaces:e,children:t,typefaces:n=[]}){XH(n);const s=xd.useMemo(()=>({addTypefaces:e,typefaces:n}),[e,n]);return(0,o.jsx)(ry.Provider,{value:s,children:t})}function Zge(){return xd.useContext(ry)}function XH(e){xd.useEffect(()=>{const t=new CSSStyleSheet;for(const n of e){const s=`[data-rise-typeface-id="${CSS.escape(n.id)}"] { font-family: "${CSS.escape(n.name)}"; }`;t.insertRule(s)}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 JH(e){return e.fonts}function iy(){return ue(JH)}var eV=C(49860);function tV({children:e}){const t=iy(),n=eV.useMemo(()=>{const s=new Map;for(const r of t)s.set(r.id,{id:String(r.id),name:r.name,default:r.default});return Array.from(s.values())},[t]);return(0,o.jsx)(qH,{typefaces:n,children:e})}var ay;const cy={},nV={"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,"ai-assistant-redistribution":!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,"universal-credits-ga":!1},af=(0,u.createContext)(cy);af.displayName="FeatureFlagsContext";const{Provider:sV}=af;function oV({children:e,value:t}){const n=(0,u.useMemo)(()=>({...nV,...t,...cy}),[t]);return(0,o.jsx)(sV,{value:n,children:e})}function cf(){return(0,u.useContext)(af)}function bd(e){return cf()[e]}function Yge(e){function t(n){const s=cf();return ay(e,{...n,flags:s})}return t.displayName=`withFeatureFlags(${e.displayName||e.name})`,t}function qge(e,t){return function(n){const s=r=>{const i=bd(e),a={...r,[t]:i};return ay(n,{...a})};return s.displayName=`withFeatureFlag(${n.displayName||n.name})`,s}}const ly=({children:e})=>(0,o.jsx)(o.Fragment,{children:e});ly.displayName="On";const dy=({children:e})=>(0,o.jsx)(o.Fragment,{children:e});dy.displayName="Off";const yd=({children:e,featureFlags:t})=>{const n=cf(),s=(0,u.useMemo)(()=>{const a=[].concat(t??[]);return a.length&&a.every(c=>n[c])},[t,n]),{on:r=null,off:i=null}=(0,u.useMemo)(()=>{const a={};return u.Children.forEach(e,c=>{switch(c.type.displayName){case yd.On.displayName:a.on=c;break;case yd.Off.displayName:a.off=c;break;default:a.on=e}}),a},[e]);return s?r:i};yd.On=ly,yd.Off=dy;function rV(){return bd(Bl)===!0&&Vl()?(0,o.jsx)(iV,{}):null}function iV(){const e=nt(),{search:t}=(0,Ae.zy)(),n=!!new URLSearchParams(t).get("locale"),s=(0,u.useRef)(n);return(0,u.useEffect)(()=>{s.current!==n&&(s.current=n,e(yw()))},[e,n]),null}const so=({id:e="portal",childType:t="other",attributes:n}={})=>{const s=document.querySelector('dialog[open][aria-modal="true"]');let r,i;if(s!=null&&t!=="dialog"?(e=`${e}-dialog`,r=s.querySelector(`#${e}`),i=s):(r=document.querySelector(`#${e}`),i=document.body),r==null&&(r=document.createElement("div"),r.setAttribute("id",e),i.appendChild(r)),n)for(const[a,c]of Object.entries(n))r.setAttribute(a,c);return r},uy=so();function aV(e){e?e.appendChild(uy):document.body.appendChild(uy)}const hy=ne.RISE_CLASSIC;function my(e){switch(e){case ne.RISE_CLASSIC:case ne.APEX:case ne.HORIZON:return e;default:return hy}}const lf=(0,u.createContext)(hy);lf.displayName="ThemeIdContext";function cV({children:e,themeId:t}){return(0,o.jsx)(lf,{value:t,children:e})}function Et(){return(0,u.useContext)(lf)}function lV(){const e=ie();return{accentContrast:e.theme?.accentContrast,bodyTypeface:e.bodyTypeface,color:e.color,headingTypeface:e.headingTypeface,isLegacyCourse:e.isLegacyCourse,uiTypeface:e.uiTypeface}}function dV(){const e=ln(),t=(0,Ae.zy)(),n=(0,u.useRef)(e),s=(0,u.useRef)(new Set),r=(0,u.useRef)(window.location.href),i=(0,u.useRef)(null);n.current=e,i.current==null&&(i.current={push:(...a)=>n.current(...a),replace:a=>n.current(a,{replace:!0}),go:a=>n.current(a),goBack:()=>n.current(-1),goForward:()=>n.current(1),listen:a=>(s.current.add(a),()=>{s.current.delete(a)}),location:t}),(0,u.useEffect)(()=>{i.current&&fN(i.current)},[]),(0,u.useEffect)(()=>{if(!i.current)return;i.current.location=t,s.current.forEach(l=>l(t));const a=r.current,c=window.location.href;r.current=c,window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:a,newURL:c}))},[t])}const uV=e=>e.startsWith("#")?e:`#${e}`,Wo=e=>{const t=No(uV(e));if(t==null)return null;const[n,s,r]=t.coords;return[Math.round((n??0)*255),Math.round((s??0)*255),Math.round((r??0)*255),t.alpha??1]};var hV=C(75152),Ot=C.n(hV),mV=C(30349),fV=C.n(mV);const pV=Ra()(Rm()(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i),_e()("#FFF")),gV=Gs()({color:pV}),vV=({accentContrast:e,bodyTypeface:t,color:n,headingTypeface:s,isLegacyCourse:r,uiTypeface:i})=>{const a=(0,u.useMemo)(()=>{const d=fs(n),h=e??d;return!r&&(h===Ee.DARK||h===Ee.AUTO&&d===Ee.DARK)?[At.DARK,At.LIGHT]:[At.LIGHT,At.DARK]},[e,n,r]),[c,l]=a;return(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:fV()({bodyTypeface:t,colorThemeRGB:Wo(n)?.slice(0,3),colorTheme:n,colorThemeContrast:c,colorThemeContrastComplementary:l,colorThemeContrastComplementaryRGB:Wo(l)?.slice(0,3),colorThemeContrastRGB:Wo(c)?.slice(0,3),colorThemeTint:Mh(n),colorThemeTransparent:n+"1A",headingTypeface:s,uiTypeface:i})}})},df=$e()(vV,gV);df.displayName="Branding",df.propTypes={bodyTypeface:Ot().string,color:Ot().string.isRequired,headingTypeface:Ot().string,uiTypeface:Ot().string};const CV=(0,u.memo)(df),xV=e=>e?`${e} | ${O1}`:O1,lc=e=>Ia()?e:xV(e);function Hr({active:e=!0,children:t,title:n,isExplicit:s=!1}){const r=lc(A2());return(0,o.jsxs)(o.Fragment,{children:[e&&(0,o.jsx)("title",{children:n??r},s?"explicit":"default"),t]})}const uf=V("not-found"),Sd=()=>(0,o.jsx)(Hr,{title:lc(),children:(0,o.jsx)("div",{className:uf(),children:(0,o.jsxs)("div",{className:uf("copy"),children:[(0,o.jsx)("h1",{className:uf("copy",{heading:!0}),tabIndex:-1,children:"Hmm..."}),(0,o.jsx)("div",{children:"We can't seem to find the page you're looking for."})]})})});var fy,py,Id;const gy=(0,u.createContext)({enabled:!0,isActive:!1,onAuthorized:()=>{},onError:()=>{},onSubmitPassword:()=>{},onUnauthorized:()=>{},status:"authorized"});let e1e;function t1e(){}function bV(){return(0,u.useContext)(gy)}function yV({children:e}){if(!Ps.isInstantLink)return(0,o.jsx)(o.Fragment,{children:e});const t=void 0;return t==null?(0,o.jsx)(o.Fragment,{children:e}):(0,o.jsx)(u.Suspense,{fallback:null,children:(0,o.jsx)(t,{children:e})})}function n1e({children:e,PasswordGate:t}){const n=window.InstantLinks?.isPasswordProtected?.()===!0,[s,r]=py(),[i,a]=py(n?"required":"authorized"),c=Id(()=>{a("authorized")},[]),l=Id(()=>{a("error")},[]),d=Id(f=>{r(f),a("validating")},[]),h=Id(()=>{a("unauthorized")},[]),m=i==="authorized"||i==="validating";return fy(t,{onSubmitPassword:d,status:i,children:fy(gy.Provider,{value:{enabled:m,isActive:!0,onAuthorized:c,onError:l,onSubmitPassword:d,onUnauthorized:h,password:s,status:i},children:e})})}function SV(e){return e.partnerContent}function IV(){return ue(SV)}function vy(e){return e?.partnerContent?.content??[]}function hf(){return ue(vy)}const Cy=(0,Ge.Mz)(e=>Ft(e)?.selectedAuthorId,vy,(e,t)=>t.find(n=>n.id===e)),TV=(0,Ge.Mz)(e=>Ft(e)?.partnerContentId,Cy,(e,t)=>e?t:void 0);function LV(){return ue(Cy)}function dc(){return ue(TV)}function EV(){const e=LV();return(0,u.useMemo)(()=>e?.data?.authors??null,[e])}function kV(){return hf()?.[0]?.data?.authors}function NV(e,t){const n=ql(),{currentLocale:s}=ot(),r=s&&n?.localeLabelSets?.[s]?.labels||e,i=s&&n?.localeLabelSets?.[s]!=null?s:t;return{labels:r,labelsLocale:i}}function jV({children:e}){const t=ie(),n=Br(),{labels:s,iso639Code:r}=lO(),i=IV(),a=Bo(),c=t?.locale??r,{labels:l,labelsLocale:d}=NV(s,c);return(0,o.jsx)(CO,{course:t,courseProgress:n,labels:l,labelsLocale:d,partnerContent:i,search:a,children:e})}var wV=C(19560);function RV({children:e,l10n:t}){const n=(0,u.useMemo)(()=>({l10n:t==null?null:(0,wV.omit)(["locales","defaultLocale"],t)}),[t]),s=t?.locales,r=t?.defaultLocale,i=t?.localeSelectorOptions,a=t?.languageCodeMetadata,c=(0,u.useMemo)(()=>s==null||r==null?{l10n:null}:{l10n:{locales:s,defaultLocale:r,localeSelectorOptions:i,languageCodeMetadata:a}},[s,r,i,a]);return(0,o.jsx)(xi.Provider,{value:n,children:(0,o.jsx)(Em.Provider,{value:c,children:e})})}function xy(e,t=window.location){const{defaultLocale:n,locales:s}=e??{};let r=new URLSearchParams(t.search).get("locale");if(r==null&&t.hash){const c=(0,Ae.Rr)(t.hash.slice(1));r=new URLSearchParams(c.search).get("locale")}const i=new URL(window.location.href);return i.pathname.startsWith("/view-pdf/")&&(r=i.searchParams.get("locale")),s?.find(c=>c.locale===r)?.locale||n}function AV({defaultLocale:e,locales:t}){const n=ln(),s=(0,Ae.zy)(),r=(0,u.useRef)(s);r.current=s;const i=(0,u.useMemo)(()=>xy({defaultLocale:e,locales:t},s),[e,t,s]),a=(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:i,setCurrentLocale:a}}const mf=e=>e===window.location.origin||e==="articulate.com"||e.endsWith(".articulate.com");function PV(e,t){const n=ie(),s=ql(),r=ue(l=>l.courseLabels.iso639Code),i=n?.locale??r,a=s?.locales;(0,u.useEffect)(()=>{document.documentElement.lang=e??i??""},[e,i]),(0,u.useEffect)(()=>{n&&Tm({course:n,locales:a,locale:e})?document.documentElement.dir="rtl":document.documentElement.dir=""},[n,a,e]);const c=(0,u.useCallback)(l=>{if(!mf(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 MV({children:e}){const t=ql(),{currentLocale:n,setCurrentLocale:s}=AV({defaultLocale:t?.defaultLocale,locales:t?.locales});return PV(n,s),(0,o.jsx)(RV,{l10n:t,children:(0,o.jsx)(XA,{currentLocale:n,setCurrentLocale:s,children:e})})}function OV(e){const t=e?.exportSettings?.webExportSettings,n=e?.exportSettings?.exportType==="raw",s=e?.exportSettings?.exportType==="lms";return!!(n&&t?.disableCoverPage||s&&e?.lmsOptions?.disableCoverPage)}function by(e){return!Ps.isInstantLink&&OV(e)}function BV(e){return Kl(e)||eo(e)||Mo(e)||Oo(e)?!0:by(e)}function yy(e){return e?.lessonsOnly?.[0]?.id==null?!0:!(ls(e)?BV(e):by(e))}const Sy=(0,u.createContext)({translationHoveredPath:null});function DV(){return(0,u.use)(Sy)}const FV=Sy.Provider,_V=()=>window.parent!==window&&Aj()&&Jh().length>0,Iy=e=>{for(const t of Jh())window.parent.postMessage(e,t)};function HV(e){const t=_V(),[n,s]=(0,u.useState)(()=>({settled:!t,policy:void 0,timedOut:!1})),r=(0,u.useRef)(void 0),i=(0,u.useRef)(0),a=(0,u.useCallback)((c,l=!1)=>{s(d=>d.settled?d:{settled:!0,policy:c,timedOut:l})},[]);return(0,u.useEffect)(()=>{if(t)return Iy({type:Lj,version:1}),i.current=Date.now(),r.current=window.setTimeout(()=>{a(kj(),!0)},2e3),()=>clearTimeout(r.current)},[t,a]),(0,u.useEffect)(()=>{n.settled&&clearTimeout(r.current)},[n.settled]),(0,u.useEffect)(()=>{n.timedOut&&Iy({type:Ej,version:1,waitedMs:Date.now()-i.current})},[n.timedOut]),(0,u.useEffect)(()=>{if(!t)return;const c=Rj(e);c&&a(c)},[t,e,a]),(0,u.useMemo)(()=>({settled:n.settled,policy:n.policy}),[n.settled,n.policy])}const Ty="focus-lesson-content",s1e="preview-nav-to-first-lesson",o1e="preview-nav-to-cover-page",Ye="preview-nav-to-lesson-item",ff="preview-nav-to-slide",r1e="preview-scroll-to-nav-prev",i1e="preview-scroll-to-header",pf="preview-clear-state",Td="preview-show-nav-prev",Ld="preview-show-nav-next",Ly="preview-nav-open",Ey="preview-nav-close",gf="preview-go-to-slide-index",Ed="preview-focus-video-chapter",vf="preview-seek-video",kd="preview-focus-video-checkpoint",ky="event-lesson-nav-prev-visible",Cf="event-lesson-nav-prev-hidden",Ny="event-lesson-nav-next-visible",xf="event-lesson-nav-next-hidden",Ko="block-search-reveal-item",VV=8,[jy,wy,zV]=[2,3,6],$V=[[0,"l10n"],[1,"translations"],[4,"video"],[5,"chapters"],[7,"title"]],UV=e=>{if(e?.length!==VV)return null;const t=$V.every(([r,i])=>e[r]===i),n=e[wy],s=e[zV];return!t||typeof e[jy]!="string"||typeof n!="string"||typeof s!="number"?null:{l10nId:n,chapterIndex:s}},GV=11,WV=9,KV=[[0,"l10n"],[1,"translations"],[4,"video"],[5,"captions"],[7,"vtt"],[8,"cues"],[10,"riseHtml"]],QV=e=>{if(e?.length!==GV)return null;const t=KV.every(([r,i])=>e[r]===i),n=e[wy],s=e[WV];return!t||typeof e[jy]!="string"||typeof n!="string"||typeof s!="number"?null:{l10nId:n,cueIndex:s}},ZV=9,[YV,qV,XV,JV]=[1,3,5,8],ez=[[0,"lessons"],[2,"items"],[4,"items"],[6,"media"],[7,"chapters"]],Nd=e=>{if(typeof e=="string"||typeof e=="number")return String(e);if(tt(e)){const{id:t}=e;if(typeof t=="string"||typeof t=="number")return String(t)}return null},tz=e=>{if(e?.length!==ZV||!ez.every(([c,l])=>e[c]===l))return null;const n=Nd(e[YV]),s=Nd(e[qV]),r=Nd(e[XV]),i=Nd(e[JV]);if(n==null||s==null||r==null)return null;const a=i==null?Number.NaN:Number(i);return!Number.isInteger(a)||a<0?null:{lessonId:n,blockId:s,itemId:r,chapterIndex:a}},bf=(e,t)=>{if(!Array.isArray(e))return null;const s=e.find(r=>tt(r)&&(typeof r.id=="string"||typeof r.id=="number")&&String(r.id)===t);return tt(s)?s:null},nz=(e,t)=>{const n=bf(e,t.lessonId),s=bf(n?.items,t.blockId),r=bf(s?.items,t.itemId);if(!tt(r?.media))return null;const{l10nId:i}=r.media;return typeof i=="string"?i:null},yf="data-change-path",Sf="data-l10n-id",Ry=(e,t)=>{if(e)return t?["l10n","translations",t,e.getAttribute(Sf)]:JSON.parse(e.getAttribute(yf))};let oo;const sz=()=>{const e=Ai();e&&e.classList.add("selected")};let Ri=null;const jd=()=>{Ri==null&&(Ri=requestAnimationFrame(()=>{Ri=null,Ai()&&oo&&uc(oo)}))},oz=()=>{Ri!=null&&(cancelAnimationFrame(Ri),Ri=null)},rz=(e,t)=>n=>{const s=document.elementsFromPoint(n.clientX,n.clientY),r=t?s.find(i=>i.getAttribute(Sf)):s.find(i=>i.getAttribute(yf));r!=null&&(e&&oo!==r&&(oo=r,e(Ry(r,t))),uc(r))},iz=(e,t)=>n=>{n.stopPropagation(),n.preventDefault();const s=document.elementsFromPoint(n.clientX,n.clientY),r=t?s.find(i=>i.getAttribute(Sf)):s.find(i=>i.getAttribute(yf));if(r){uc(r),Ay();const i=Ry(r,t);i&&(e(i),sz())}},wd=()=>document.getElementById("target-container"),Ai=()=>document.getElementById("target-highlight"),If=()=>{if(wd())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)},Ay=()=>{const e=Ai();e&&e.classList.add("selected")},az=({top:e,left:t,width:n,height:s})=>{const r=document.querySelector("[data-page=true]")?.getBoundingClientRect().width??window.innerWidth-20;return n<r&&(e=e-10,s=s+20,t=t-20,n=n+40),{top:e,left:t,width:n,height:s}},cz=e=>{If();const t=wd();if(!t)return;const n=e.closest?.("dialog[open]")??document.body;t.parentElement!==n&&n.appendChild(t)},uc=e=>{const{top:t,left:n,width:s,height:r}=az(e.getBoundingClientRect());cz(e);const i=Ai();i&&(e!==oo&&i.classList.contains("selected")&&i.classList.remove("selected"),i.classList.add("active"),Object.assign(i.style,{top:`${t}px`,left:`${n}px`,width:`${s}px`,height:`${r}px`}),oo=e)},lz=()=>{window.removeEventListener("scroll",jd,{capture:!0}),Lf()},Tf=()=>{Ai()?.classList?.remove("active"),Ai()?.classList?.remove("selected")},Lf=()=>{oz(),Tf(),oo=null};let Pi,Rd;const dz=({locale:e})=>({isActive:t},n)=>{const s=!!wd();if(t){if(Pi)return Pi;If();const r=rz(n,e);let i;return Pi=new Promise((a,c)=>{i=iz(a,e),Rd=c,document.body.classList.add("target-mode"),window.addEventListener("mousemove",r,!0),window.addEventListener("click",i,!0),window.addEventListener("resize",Tf,!0),window.addEventListener("scroll",jd,!0)}).finally(()=>{Pi=null,Rd=null,document.body.classList.remove("target-mode"),window.removeEventListener("mousemove",r,!0),window.removeEventListener("click",i,!0),window.removeEventListener("resize",Tf,!0),window.removeEventListener("scroll",jd,!0)}),Pi}else Lf(),wd()?.remove();return s&&Rd!=null&&Rd(new Error("cancelled")),Promise.resolve()},uz=e=>{let t=e.findIndex(n=>n==="items");return t===-1?e:e.slice(0,t+2)},hz=e=>document.querySelector(`[data-transcript-l10n-id='${e}']`),mz=(e,t,n)=>{const s=Array.from(e.querySelectorAll("[data-cue-start-ms]")),r=c=>Number(c.getAttribute("data-cue-start-ms"));if(typeof t!="number"||!Number.isFinite(t))return s.find(c=>(c.getAttribute("data-cue-indexes")??"").split(" ").includes(String(n)))??null;const i=t*1e3;return s.find(c=>i>=r(c)&&i<Number(c.getAttribute("data-cue-end-ms")))??s.findLast(c=>r(c)<=i)??s[0]??null},fz=e=>e?.hasAttribute?.("data-cue-start-ms"),Py=(e,{time:t}={})=>{const n=QV(e);if(n){const r=hz(n.l10nId);if(r)return mz(r,t,n.cueIndex)}const s=(0,yo.Ce)(e);return s?s.type==="translation"||s.type==="caption"&&s.l10nId?document.querySelector(`[data-l10n-id='${s.l10nId}']`)??document.querySelector(`[data-l10n-id*='${s.l10nId}']`):document.querySelector(`[data-change-path='${JSON.stringify(uz(e))}']`):null},pz=(e,t)=>{If(),window.addEventListener("scroll",jd,{capture:!0}),document.body.classList.add("target-mode");const n=Py(e,t);if(!n){Lf();return}fz(n)&&n.scrollIntoView({block:"nearest"}),uc(n)},My=(e,t)=>{if(!Pi)return!1;const n=Py(e,t);return n?(oo!==n&&(oo=n),uc(n),Ay(),n.scrollIntoView({behavior:"smooth",block:"center"}),!0):!1},gz=e=>["course",e],Oy=(e,t)=>["lessons",{id:e},t],vz=(e,t)=>[...Oy(e,"items"),{id:t}],Mi=e=>JSON.stringify(gz(e)),By=(e,t)=>JSON.stringify(Oy(e,t)),Cz=(e,t)=>JSON.stringify(vz(e,t)),jn={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"},Oi=(e,t)=>{const n={};for(let s=0;s<e.length;s++){const r=e[s];if(typeof r=="object"&&r.id){const i=e[s-1],a=i==="items"?t.shift():i.replace(/s$/,"");n[`${a??"item"}Id`]=r.id}}return n},xz=e=>{const t=(0,yo.Ce)(e);return t!=null&&typeof t=="object"&&"itemId"in t?t.itemId:void 0},Dy=e=>e==null?!1:(window.dispatchEvent(new CustomEvent(kd,{detail:{blockId:String(e)}})),!0),bz=()=>{window.dispatchEvent(new CustomEvent(kd,{detail:{blockId:null}}))},yz=10,Fy=(e,t=0)=>{t>=yz||requestAnimationFrame(()=>{My(e)||Fy(e,t+1)})},Sz=new Set(["preview:lessonUpdate","preview:navigate","preview:seek","preview:goToSlideIndex","preview:scrollto","preview:showLessonNavNext","preview:showLessonNavPrev","preview:themeUpdate","preview:update","preview:navOpen","preview:navClose","preview:replace","preview:changeset","preview:selectLocale",Xh,jn.FOCUS,jn.TOGGLE,jn.CLEAR,jn.TRANSLATION_HOVERED,jn.TRANSLATION_HOVER_CLEAR]),Iz=(e,t)=>!(e==="firstLesson"&&t.includes("/lessons/"))&&!(e==="cover"&&(t==="/"||t==="/preview"));function Tz({course:e,fonts:t,l10n:n}){let s=!1;return Ix(t,()=>{s||(mn(B7({course:e,fonts:t,l10n:n})),window.parent.postMessage({type:"preview:themeUpdateComplete"},window.location.origin))}),{cancel(){s=!0}}}function Lz(){let e=[],t=0;return n=>{clearTimeout(t);for(const s of n)e.push(s);t=window.setTimeout(()=>{const s=e;e=[],mn(F7(s))},15)}}function Ez(){const e=ln(),t=(0,Ae.zy)(),n=ue(I=>I.course),[s,r]=(0,u.useState)(""),[i,a]=(0,u.useState)({translationHoveredPath:null}),[c,l]=(0,u.useState)(!1),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(void 0),p=(0,u.useRef)(e);p.current=e;const v=(0,u.useRef)(t);v.current=t;const g=(0,u.useRef)(n);g.current=n;const x=(0,u.useRef)(null),y=(0,u.useRef)(Lz()),S=(0,u.useRef)(t);return(0,u.useEffect)(()=>{S.current!==t&&(h(!0),S.current=t)},[t]),(0,u.useEffect)(()=>{if(d||c){const I=setTimeout(()=>{h(!1),l(!1)},0);return()=>clearTimeout(I)}},[d,c]),(0,u.useEffect)(()=>{const I=b=>{const{data:T,origin:L}=b;if(!mf(L))return;const E=p.current,N=v.current.pathname,P=g.current,A=P?.lessonsOnly,R=Array.isArray(T)?T:[T];for(const j of R){const{type:M,data:w,options:O}=j;if(Sz.has(M)){if(M===Xh){if(b.source!==window.parent||!Jh().includes(b.origin))continue;f(j)}if(M===jn.TOGGLE&&window.targetMode?.(w,D=>{window.parent.postMessage({type:jn.HOVERED,data:D},"*")})?.then(D=>{window.parent.postMessage({type:jn.SELECTED,data:D},"*")}).catch(()=>{window.parent.postMessage({type:jn.SELECTED,data:[]},"*")}),M==="preview:update"&&r(w),M==="preview:themeUpdate"){x.current?.();const{course:B,l10n:D,fonts:_,theme:F}=w,$={...B,theme:F},z=m8({course:P,updates:$}),{cancel:K}=Tz({course:z,fonts:_,l10n:D});x.current=K}if(M==="preview:navigate"){let{type:B,lessonId:D,itemId:_}=w;const{path:F,replace:$}=w,z=K=>{if(l(!0),$){E(K,{replace:!0});return}E(K)};if(Iz(B,N)){if(Array.isArray(F)){const K=(0,yo.Ce)(F);if(K)({type:B,lessonId:D,itemId:_}=K);else if(F[0]==="mondrian")for(const J of P?.lessons??[]){const Q=J.items?.find(U=>"blockumentId"in U&&U.blockumentId===F[1]);if(Q){B="lesson",D=J.id,_=Q.id;break}}else continue}if(B==="firstLesson"&&A?.[0])z(Ln(A[0].id));else if(B==="cover"||B==="course")yy(P)?z("/"):bz();else if(B==="lesson"&&A?.find(({id:J})=>J===D)!=null){const J=Ln(D),Q=Mo(P),U=(0,Ae.B6)(hd,N)!=null||(0,Ae.B6)(md,N)!=null,G=J!==N&&!(Q&&U),Y=Q&&_==null&&KA(P),Z=Array.isArray(F)?tz(F):null,q=()=>{if(Z==null)return;const le=nz(P?.lessons,Z);le!=null&&window.dispatchEvent(new CustomEvent(Ed,{detail:{l10nId:le,chapterIndex:Z.chapterIndex}}))},ee=()=>{q(),Dy(_),Y?window.dispatchEvent(new CustomEvent(ff,{detail:{lessonId:D}})):(_!=null||F!=null)&&window.dispatchEvent(new CustomEvent(Ye,{detail:{lessonId:D,itemId:_,path:F??[]}}))},se=Y||_!=null||F!=null;Nm(zb.getState())===wo.RESTRICTED&&mn(ij({targetLessonId:D,lessons:P?.lessons??[]})),G&&z(J),se&&(l(!0),G?setTimeout(ee,1500):ee())}}}if(M===jn.CLEAR&&window.dispatchEvent(new CustomEvent(pf)),M==="preview:navOpen"&&window.dispatchEvent(new CustomEvent(Ly)),M==="preview:navClose"&&window.dispatchEvent(new CustomEvent(Ey)),M==="preview:showLessonNavPrev"&&window.dispatchEvent(new CustomEvent(Td)),M==="preview:showLessonNavNext"&&window.dispatchEvent(new CustomEvent(Ld)),M==="preview:scrollto"&&typeof w.target=="string"){const B=document.querySelector(w.target);B&&B.scrollIntoView({behavior:"smooth",block:"start"})}if(M==="preview:goToSlideIndex"&&typeof w.slideIndex=="number"&&window.dispatchEvent(new CustomEvent(gf,{detail:{slideIndex:w.slideIndex}})),M==="preview:seek"&&typeof w.time=="number"&&Number.isFinite(w.time)&&typeof w.l10nId=="string"&&window.dispatchEvent(new CustomEvent(vf,{detail:{l10nId:w.l10nId,time:w.time}})),M==="preview:replace"&&mn(O7(w)),M==="preview:changeset"&&y.current(w),M===jn.FOCUS){const B=Dy(xz(w.path));!My(w.path)&&B&&Fy(w.path);const D=UV(w.path);D&&window.dispatchEvent(new CustomEvent(Ed,{detail:D}))}M===jn.TRANSLATION_HOVERED&&(a({translationHoveredPath:w.path}),pz(w.path,{time:w.time})),M===jn.TRANSLATION_HOVER_CLEAR&&(a({translationHoveredPath:null}),lz()),M==="preview:lessonUpdate"&&(mn(D7(w)),requestAnimationFrame(()=>{window.parent.postMessage({type:"preview:lessonUpdateComplete"},window.location.origin)})),M==="preview:selectLocale"&&O?.shouldRetainParentFocus&&l(!0)}}};return window.addEventListener("message",I),()=>window.removeEventListener("message",I)},[]),{previewType:s,targetModeContext:i,didNavigate:d,shouldSkipAutoFocusOnNavigate:c,deliveryPolicyResponse:m}}const Ad=(0,u.createContext)(null),_y=(0,u.createContext)(null);function Pd(){const e=(0,u.useContext)(Ad);if(e==null)throw new Error("usePreviewState must be used within PreviewRuntimeProvider");return e}function kz(){const e=(0,u.useContext)(_y);if(e==null)throw new Error("useDeliveryPolicy must be used within PreviewRuntimeProvider");return e}function Nz(){return(0,u.useContext)(Ad)?.previewType}function jz(){return(0,u.useContext)(Ad)?.shouldSkipAutoFocusOnNavigate??!1}function wz({children:e}){const{previewType:t,targetModeContext:n,didNavigate:s,shouldSkipAutoFocusOnNavigate:r,deliveryPolicyResponse:i}=Ez(),a=HV(i),c=(0,u.useMemo)(()=>({previewType:t||void 0,didNavigate:s,shouldSkipAutoFocusOnNavigate:r}),[t,s,r]);return(0,o.jsx)(FV,{value:n,children:(0,o.jsx)(_y,{value:a,children:(0,o.jsx)(Ad,{value:c,children:e})})})}function Ef({className:e,ref:t}){return(0,o.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,o.jsx)("path",{d:"M2.34315 7.34315L8 13L13.6569 7.34315",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,o.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",width:"2",x:"7",y:"1"})]})}function Rz({className:e}){return(0,o.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,o.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 Hy({className:e,ref:t}){return(0,o.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,o.jsx)("path",{d:"M13.6569 7.65685L8 2L2.34315 7.65686",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,o.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",transform:"rotate(180 9 14)",width:"2",x:"9",y:"14"})]})}function Kt({children:e,className:t,height:n,width:s,viewBox:r}){return(0,o.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focusable:"false",height:n,viewBox:r,width:s,xmlns:"http://www.w3.org/2000/svg",children:e})}function Az(e){return(0,o.jsx)(Kt,{height:"12",viewBox:"0 0 18 12",width:"18",...e,children:(0,o.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 Pz(e){return(0,o.jsx)(Kt,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,o.jsx)("path",{d:"M9 1L5 5L1 1",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function Mz(e){return(0,o.jsx)(Kt,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,o.jsx)("path",{d:"M1 5L5 1L9 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function Oz(e){return(0,o.jsxs)(Kt,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,o.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,o.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,o.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 wn(e){return(0,o.jsx)("svg",{"aria-hidden":"true",fill:"currentColor",focusable:"false",xmlns:"http://www.w3.org/2000/svg",...e})}function Vy(e){return(0,o.jsx)(wn,{...e,fill:"none",viewBox:"1 1 18 18",children:(0,o.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 Md(e){return(0,o.jsxs)(wn,{...e,fill:"none",viewBox:"0 0 18 18",children:[(0,o.jsx)("circle",{cx:"9",cy:"9",fill:"#74BF44",r:"9"}),(0,o.jsx)("path",{d:"M6.43994 9.12061L8.43994 11.1206L11.9399 7.62061",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})}function Bz(e){return(0,o.jsx)(Kt,{height:"12",viewBox:"0 0 12 12",width:"12",...e,children:(0,o.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 Dz(e){return(0,o.jsx)(Kt,{height:"5",viewBox:"0 0 10 5",width:"10",...e,children:(0,o.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 Fz(e){return(0,o.jsxs)(Kt,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,o.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,o.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 _z(e){return(0,o.jsxs)(Kt,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,o.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,o.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 Hz(e){return(0,o.jsx)(Kt,{height:"10",viewBox:"0 0 10 10",width:"10",...e,children:(0,o.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 Vz=({width:e="17",height:t="15",title:n="Book",desc:s="Book",focusable:r="false",className:i})=>(0,o.jsxs)("svg",{className:i,focusable:r,height:t,viewBox:"0 0 17 15",width:e,xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("title",{children:n}),(0,o.jsx)("desc",{children:s}),(0,o.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 zz=C(40278),X=C.n(zz);const zy=({title:e="Pick One",desc:t="Pick One",width:n="16",height:s="14",className:r,focusable:i="false","aria-hidden":a})=>(0,o.jsxs)("svg",{"aria-hidden":a,className:X()("i i-pickOne",r),focusable:i,height:s,viewBox:"0 0 16 14",width:n,xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("title",{children:e}),(0,o.jsx)("desc",{children:t}),(0,o.jsxs)("g",{fillRule:"evenodd",children:[(0,o.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,o.jsx)("path",{d:"M8.862 1.324h7v2h-7zM8.862 4.324h7v2h-7zM8.862 8.324h7v2h-7zM8.862 11.324h7v2h-7z"})]})]}),$y=({title:e="Fill in the Blank",desc:t="Pencil writing on a surface",width:n="15",height:s="15",className:r,focusable:i="false"})=>(0,o.jsxs)("svg",{className:X()("i i-fillInTheBlank",r),focusable:i,height:s,viewBox:"0 0 15 15",width:n,children:[(0,o.jsx)("title",{children:e}),(0,o.jsx)("desc",{children:t}),(0,o.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 Uy({className:e,ref:t}){return(0,o.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,o.jsx)("path",{d:"M3.33177 4.1487L6.48034 1.00013M9.6289 4.14869L6.48034 1.00013M6.48034 1.00013L6.47966 11.9601"})})}function $z(e){return(0,o.jsxs)(wn,{...e,fill:"none",viewBox:"0 3 16 10",children:[(0,o.jsx)("path",{d:"M1.51472 7.99993H14.4853",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,o.jsx)("path",{d:"M9.50008 12.4994L14.5004 7.99932L9.50008 3.99973",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}function Gy(e){return(0,o.jsx)(Kt,{height:"8",viewBox:"0 0 14 8",width:"14",...e,children:(0,o.jsx)("path",{clipRule:"evenodd",d:"M13 1L7 7L1 1",stroke:"currentColor"})})}function Wy(e){return(0,o.jsxs)(wn,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,o.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,o.jsx)("path",{d:"M5 7.71429L7.54545 10L11.5 5.5",stroke:"white"})]})}function Ky(e){return(0,o.jsxs)(wn,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,o.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,o.jsx)("circle",{cx:"8",cy:"7.5293",r:"7",stroke:"white"})]})}function Uz({className:e}){return(0,o.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("circle",{cx:"6",cy:"6",r:"5"}),(0,o.jsx)("path",{d:"M9.5 9.5L14 14"})]})}function Gz(e){return(0,o.jsxs)(wn,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,o.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,o.jsx)("path",{d:"M10 6L6 10",stroke:"white"}),(0,o.jsx)("path",{d:"M6 6L10 10",stroke:"white"})]})}function Wz({className:e}){return(0,o.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,o.jsx)("path",{d:"M1 1.40002L5 5.40002L9 1.40002",strokeWidth:"1.6"})})}function Kz(e){return(0,o.jsxs)(wn,{viewBox:"0 0 12 12",...e,children:[(0,o.jsx)("path",{d:"M10.7425 0.742189L11.4496 1.4493L1.55012 11.3488L0.843012 10.6417L10.7425 0.742189Z",fill:"currentColor"}),(0,o.jsx)("path",{d:"M11.1571 10.6417L10.45 11.3488L0.550537 1.44929L1.25764 0.742188L11.1571 10.6417Z",fill:"currentColor"})]})}function Qz({className:e,ref:t}){return(0,o.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,o.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 Zz(e){return(0,o.jsx)(wn,{...e,viewBox:"0 0 16 8",children:(0,o.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 Yz({className:e,ref:t}){return(0,o.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,o.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 qz(e){return(0,o.jsx)(Kt,{height:"12",viewBox:"0 0 16 12",width:"16",...e,children:(0,o.jsx)("path",{clipRule:"evenodd",d:"M9.6665 2H0.666504V0H9.6665V2ZM12.6665 6H0.666504V4H12.6665V6ZM0.666504 10H7.6665V8H0.666504V10Z",fill:"currentColor",fillRule:"evenodd"})})}function Qy(e){return(0,o.jsx)(Kt,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,o.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 Xz(e){return(0,o.jsx)(Kt,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,o.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 Jz(e){return(0,o.jsxs)(Kt,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,o.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,o.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,o.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 e$(e){return(0,o.jsx)(Kt,{height:"15",viewBox:"0 0 16 15",width:"16",...e,children:(0,o.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 t$(e){return(0,o.jsxs)(Kt,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,o.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,o.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 n$(e){return(0,o.jsxs)(Kt,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,o.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,o.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 s$(e){return(0,o.jsx)(Kt,{height:"14",viewBox:"0 0 14 14",width:"14",...e,children:(0,o.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 Qt(e){return function(n){const s=Et(),r=e[s];return r?(0,o.jsx)(r,{...n}):null}}const Zy=Qt({[ne.RISE_CLASSIC]:Az,[ne.HORIZON]:null,[ne.APEX]:qz}),Od=Qt({[ne.RISE_CLASSIC]:Ef,[ne.HORIZON]:Uy,[ne.APEX]:Qz}),kf=Qt({[ne.RISE_CLASSIC]:Rz,[ne.HORIZON]:$z,[ne.APEX]:Zz}),Yy=Qt({[ne.RISE_CLASSIC]:Hy,[ne.HORIZON]:Uy,[ne.APEX]:Yz}),o$=Qt({[ne.RISE_CLASSIC]:Vz,[ne.HORIZON]:null,[ne.APEX]:null}),r$=Qt({[ne.RISE_CLASSIC]:Pz,[ne.HORIZON]:Gy,[ne.APEX]:Qy}),i$=Qt({[ne.RISE_CLASSIC]:Mz,[ne.HORIZON]:Gy,[ne.APEX]:Xz}),a$=Qt({[ne.RISE_CLASSIC]:Md,[ne.HORIZON]:Wy,[ne.APEX]:Md}),c$=Qt({[ne.RISE_CLASSIC]:zy,[ne.HORIZON]:Ky,[ne.APEX]:zy}),l$=Qt({[ne.RISE_CLASSIC]:Oz,[ne.HORIZON]:null,[ne.APEX]:Jz}),d$=Qt({[ne.RISE_CLASSIC]:Vy,[ne.HORIZON]:Gz,[ne.APEX]:Vy}),u$=Qt({[ne.RISE_CLASSIC]:Md,[ne.HORIZON]:Wy,[ne.APEX]:Md}),h$=Qt({[ne.RISE_CLASSIC]:$y,[ne.HORIZON]:Ky,[ne.APEX]:$y}),hc=Qt({[ne.RISE_CLASSIC]:Bz,[ne.HORIZON]:Uz,[ne.APEX]:e$}),qy=Qt({[ne.RISE_CLASSIC]:Dz,[ne.HORIZON]:Wz,[ne.APEX]:Qy}),m$=Qt({[ne.RISE_CLASSIC]:Fz,[ne.HORIZON]:null,[ne.APEX]:t$}),f$=Qt({[ne.RISE_CLASSIC]:_z,[ne.HORIZON]:null,[ne.APEX]:n$}),Bd=Qt({[ne.RISE_CLASSIC]:Hz,[ne.HORIZON]:Kz,[ne.APEX]:s$}),Bi=V("cover");function d1e(){const{categories:e}=ie();return!Array.isArray(e)||e.length===0?null:(0,o.jsxs)("section",{className:Bi("categories-section"),children:[(0,o.jsx)("h2",{className:Bi("categories-title"),children:"Topics"}),(0,o.jsx)("ul",{className:Bi("categories-list"),role:"list",children:e.map(t=>(0,o.jsxs)("li",{className:Bi("categories-item"),role:"listitem",children:[(0,o.jsx)(o$,{className:Bi("categories-icon")}),(0,o.jsx)("span",{className:Bi("categories-item-wrap"),children:t})]},t))})]})}var p$=C(21891),g$=C(90245),Vr=C.n(g$),Ve=C(69980);const v$=`${Ne("CDN_URI")}/assets/rise/assets/certificate-icon.svg`,C$=`${Ne("CDN_URI")}/assets/rise/assets/error_x.svg`,x$=`${Ne("CDN_URI")}/assets/rise/assets/loading_spinner.svg`,mc="downloading",Di="error",zr="ok",Nf="contained",Xy=({type:e})=>{const[t]=(0,u.useState)(()=>Vr()("certdownload-")),[n,s]=(0,u.useState)(zr),r=(0,Ve.A)(n),i=(0,u.useRef)(null),a=xe(),c=`${t}-live`,l=e===Nf?"certificateDownload certificateDownloadContained":"certificateDownload",d=(0,u.useCallback)(()=>{s(mc)},[]);return(0,u.useEffect)(()=>(n===mc&&r!==mc&&tw().then(()=>{s(zr)}).catch(h=>{(0,p$.FZ)(h)?s(zr):s(Di)}),()=>{nw()}),[r,n]),(0,u.useEffect)(()=>{i.current&&(n===Di&&r!==Di||n===zr&&(r===Di||r===mc))&&i.current.focus()},[r,n]),(0,o.jsxs)("div",{className:l,children:[(0,o.jsxs)("div",{"aria-live":"polite",id:c,role:"status",children:[n===mc&&(0,o.jsxs)("span",{className:"certificateDownload__downloading",children:[(0,o.jsx)("img",{alt:"",className:"animation-loading certificateDownload__downloadingImg",height:"15",src:x$,width:"15"}),a?.certificateDownloadInProgress||"Downloading..."]}),n===Di&&(0,o.jsxs)("span",{className:"certificateDownload__error",children:[(0,o.jsx)("img",{alt:"Error",className:"certificateDownload__errorImg",height:"15",src:C$,width:"15"}),(0,o.jsx)("span",{className:"visually-hidden",children:a?.a11yCertificateDownloadFailed||"Failed to download certificate"})]})]}),(n===zr||n===Di)&&(0,o.jsxs)("button",{"aria-controls":c,className:"certificateDownload__btn",onClick:d,ref:i,type:"button",children:[n===zr&&e===Nf&&(0,o.jsx)("img",{alt:"",className:"certificateDownload__okImg",height:"15",src:v$,width:"15"}),n===zr?a?.certificateDownload||"Download certificate":a?.certificateRetryDownload||"Retry download"]})]})},b$=()=>(0,o.jsx)(Xy,{type:Nf}),y$=(0,u.memo)(Xy);var jf,S$;const u1e=({width:e="18",height:t="18",className:n})=>jf("svg",{"aria-hidden":"true",className:S$("i i-alert",n),focusable:"false",height:t,viewBox:"0 0 18 18",width:e,children:jf("g",{fill:"none",fillRule:"evenodd",stroke:"#DE1D1D",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:jf("path",{d:"M9 1a8 8 0 1 1 0 16A8 8 0 0 1 9 1zM9 5.364V9.53M9 11.91v.726"})})}),h1e=null;function I$(e){return(0,o.jsxs)(wn,{viewBox:"0 0 16 12",...e,children:[(0,o.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,o.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,o.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 T$,Jy,L$;const m1e=({width:e="24",height:t="16",leftMovement:n="0",className:s})=>T$("svg",{"aria-hidden":"true",className:L$("i i-alt",s),focusable:"false",height:t,style:{marginLeft:n},viewBox:"0 0 24 16",width:e,children:[Jy("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"}),Jy("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"})]}),f1e=null;var E$,Dd,k$;const p1e=({title:e="All Authors",desc:t="A circle with the outline of the head and shoulders of two people inside",width:n="30",height:s="30",className:r,focusable:i="false"})=>E$("svg",{className:k$("i i-blockTemplateAllAuthors",r),focusable:i,height:s,viewBox:"0 0 30 30",width:n,children:[Dd("title",{children:e}),Dd("desc",{children:t}),Dd("circle",{cx:"14.963",cy:"14.963",fill:"#E9E9E9",r:"14.963"}),Dd("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"})]}),g1e=null;var Fd,vs,N$;const v1e=({title:e="Check Mark",desc:t="A circle with a check mark inside",width:n="112",height:s="112",className:r,focusable:i="false"})=>Fd("svg",{className:N$("i i-blockTemplateCheckMark",r),focusable:i,height:s,viewBox:"0 0 112 112",width:n,children:[vs("title",{children:e}),vs("desc",{children:t}),vs("defs",{children:Fd("filter",{filterUnits:"objectBoundingBox",height:"186.1%",id:"a",width:"186.1%",x:"-43.1%",y:"-40.3%",children:[vs("feOffset",{dy:"2",in:"SourceAlpha",result:"shadowOffsetOuter1"}),vs("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"10"}),vs("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"}),Fd("feMerge",{children:[vs("feMergeNode",{in:"shadowMatrixOuter1"}),vs("feMergeNode",{in:"SourceGraphic"})]})]})}),Fd("g",{fill:"none",fillRule:"evenodd",filter:"url(#a)",transform:"translate(20 18)",children:[vs("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"}),vs("circle",{className:"inner",cx:"36",cy:"36",r:"30"}),vs("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"})]})]}),C1e=null;var e3,_d,j$;const x1e=({title:e="Folder Outline",desc:t="Outline of a folder",width:n="42",height:s="42",className:r,focusable:i="false"})=>e3("svg",{className:j$("i i-blockTemplateFolder",r),focusable:i,height:s,viewBox:"0 0 42 42",width:n,children:[_d("title",{children:e}),_d("desc",{children:t}),e3("g",{fill:"#ADAEAF",fillRule:"nonzero",stroke:"#ADAEAF",strokeWidth:".3",children:[_d("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"}),_d("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"})]})]}),b1e=null;var wf,fc,w$;const y1e=({title:e="Captions",desc:t="Two capital letter C inside a square",width:n="24",height:s="16",className:r,focusable:i="false"})=>wf("svg",{className:w$("i i-captions",r),focusable:i,height:s,viewBox:"0 0 24 16",width:n,children:[fc("title",{children:e}),fc("desc",{children:t}),wf("g",{fill:"none",fillRule:"evenodd",transform:"translate(-.355)",children:[fc("rect",{height:"13.25",rx:"1",stroke:"#000",strokeWidth:"1.75",width:"18.25",x:"1.447",y:"1.402"}),wf("text",{fill:"#000",fontFamily:"Lato-Black, Lato",fontSize:"9",fontWeight:"700",letterSpacing:".75",children:[fc("tspan",{x:"4.222",y:"11.5",children:"C"})," ",fc("tspan",{x:"10.885",y:"11.5",children:"C"})]})]})]}),S1e=null;var R$,Rf;const I1e=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="15",role:i="img",title:a,width:c="16"})=>R$("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:i,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Rf("title",{children:a}),s&&Rf("desc",{children:s}),Rf("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"})]}),T1e=null;function t3(e){return(0,o.jsx)(wn,{viewBox:"0 0 11 8",...e,children:(0,o.jsx)("path",{d:"M9.6,0L11,1.3L3.9,8L0,4.3L1.4,3l2.6,2.4L9.6,0z"})})}var A$,Af,P$;const L1e=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="21",role:i="img",title:a,width:c="21"})=>A$("svg",{"aria-hidden":e,"aria-label":t,className:P$("i i-checkMarkFilled",n),focusable:"false",height:r,role:i,viewBox:"0 0 21 21",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Af("title",{children:a}),s&&Af("desc",{children:s}),Af("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"})]}),E1e=null;var n3,M$;function k1e(e){return n3(M$,{viewBox:"0 0 7 5",...e,children:n3("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 s3,O$;const N1e=({width:e="16",height:t="16",className:n,focusable:s="false"})=>s3("svg",{"aria-hidden":"true",className:O$("i i-chevronLeft",n),focusable:s,height:t,viewBox:"0 0 16 16",width:e,children:s3("polygon",{points:"11.1,15.7 3.4,8 11.1,0.3 12.6,1.7 6.3,8 12.6,14.3 "})}),j1e=null,B$=({className:e,dataTestId:t})=>(0,o.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,o.jsx)("circle",{cx:"5",cy:"5",r:"5"})}),D$=({className:e})=>(0,o.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,o.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 F$,Kn;const A1e=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="18",role:i="img",title:a,width:c="18"})=>F$("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 18 18",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Kn("title",{children:a}),s&&Kn("desc",{children:s}),Kn("path",{d:"M9 9V1a8 8 0 015.657 2.343L9 9z",fill:"red",stroke:"#fff",strokeLinejoin:"round"}),Kn("path",{d:"M9 9l5.657-5.656A8 8 0 0117 9H9z",fill:"#F90",stroke:"#fff",strokeLinejoin:"round"}),Kn("path",{d:"M9 9h8a8 8 0 01-2.343 5.657L9 9z",fill:"#FFF500",stroke:"#fff",strokeLinejoin:"round"}),Kn("path",{d:"M9 9l5.657 5.657A8 8 0 019 17V9z",fill:"#ADFF00",stroke:"#fff",strokeLinejoin:"round"}),Kn("path",{d:"M9 9v8a8 8 0 01-5.657-2.343L9 9z",fill:"#00FF94",stroke:"#fff",strokeLinejoin:"round"}),Kn("path",{d:"M9 9l-5.657 5.657A8 8 0 011 9h8z",fill:"#06F",stroke:"#fff",strokeLinejoin:"round"}),Kn("path",{d:"M9 9H1a8 8 0 012.343-5.656L9 9z",fill:"#8000FF",stroke:"#fff",strokeLinejoin:"round"}),Kn("path",{d:"M9 9L3.343 3.343A8 8 0 019 1v8z",fill:"#EB00FF",stroke:"#fff",strokeLinejoin:"round"}),Kn("path",{d:"M9 6a3 3 0 110 6 3 3 0 010-6z",fill:"#fff"}),Kn("path",{d:"M9 17A8 8 0 109 1a8 8 0 000 16z",stroke:"#EAEAEB"})]}),P1e=null;var _$,Pf,H$;const M1e=({title:e="Copy",desc:t="A document stacked on top of another one",width:n="15",height:s="18",className:r=null,focusable:i="false"})=>_$("svg",{className:H$("i i-stack",r),focusable:i,height:s,viewBox:"0 0 15 18",width:n,children:[Pf("title",{children:e}),Pf("desc",{children:t}),Pf("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"})]}),O1e=null;var V$,Mf,z$;const B1e=e=>{const{className:t,desc:n="Crop",focusable:s="false",height:r="19",title:i="Crop",width:a="19"}=e,c={className:z$("i i-crop",t),focusable:s,height:r,viewBox:`0 0 ${a} ${r}`,width:a};return V$("svg",{...c,children:[Mf("title",{children:i}),Mf("desc",{children:n}),Mf("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"})]})},D1e=null;var $$,Of,U$;const F1e=({"aria-hidden":e,"aria-label":t="Dash mark",className:n,desc:s,height:r="3",role:i="img",title:a,width:c="7"})=>$$("svg",{"aria-hidden":e,"aria-label":t,className:U$("i i-dashMark",n),focusable:"false",height:r,role:i,viewBox:"0 0 7 3",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Of("title",{children:a}),s&&Of("desc",{children:s}),Of("rect",{height:"3",width:"7"})]}),_1e=null,G$=({title:e="DestinationArrow",desc:t="DestinationArrow",width:n="13",height:s="10",className:r,focusable:i="false"})=>(0,o.jsxs)("svg",{className:X()("i i-destinationArrow",r),focusable:i,height:s,viewBox:"0 0 13 10",width:n,children:[(0,o.jsx)("title",{children:e}),(0,o.jsx)("desc",{children:t}),(0,o.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 W$,V1e;class z1e extends null{render(){return W$("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 $1e=null;var o3,K$;const U1e=({width:e=20,height:t=20,...n})=>o3(K$,{height:t,width:e,...n,viewBox:"0 0 20 20",children:o3("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"})}),G1e=null;var Q$,Bf,Z$;const W1e=({title:e="Vertical Dots",desc:t="Vertical Dots",width:n="4",height:s="24",className:r=null,focusable:i="false"})=>Q$("svg",{className:Z$("i i-dotsVertical",r),focusable:i,height:s,viewBox:"0 0 4 24",width:n,children:[Bf("title",{children:e}),Bf("desc",{children:t}),Bf("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"})]}),K1e=null,Y$=({title:e="Download",desc:t="Arrow down with horizontal line beneath it",width:n="16",height:s="19",className:r,focusable:i="false"},a)=>(0,o.jsxs)("svg",{className:X()("i i-download",r),focusable:i,height:s,ref:a,viewBox:"0 0 16 19",width:n,children:[(0,o.jsx)("title",{children:e}),(0,o.jsx)("desc",{children:t}),(0,o.jsx)("rect",{height:"2",rx:"1",width:"16",y:"17"}),(0,o.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,o.jsx)("path",{d:"M7 0h2v12H7z"})]}),q$=(0,u.forwardRef)(Y$);var X$,pc,J$;const Q1e=({title:e="Download Circle",desc:t="Arrow down with horizontal line beneath it wrapped up in a circle",width:n="51",height:s="51",className:r,focusable:i="false"})=>X$("svg",{className:J$("i i-downloadCircle",r),focusable:i,height:s,viewBox:"0 0 51 51",width:n,children:[pc("title",{children:e}),pc("desc",{children:t}),pc("g",{fill:"none",stroke:"none",children:pc("g",{fill:"#000",transform:"translate(-695, -227)",children:pc("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"})})})]}),Z1e=null;var eU,gc,tU;const Y1e=({title:e="More",desc:t="Three dots next to one another",width:n="16",height:s="4",className:r=null,focusable:i="false"})=>eU("svg",{className:tU("i",r),focusable:i,height:s,viewBox:"0 0 16 4",width:n,children:[gc("title",{children:e}),gc("desc",{children:t}),gc("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"}),gc("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"}),gc("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"})]}),q1e=null;var nU,Df,sU;const X1e=({title:e="Embed",desc:t="Embed icon",width:n="16",height:s="15",className:r,focusable:i="false"})=>nU("svg",{className:sU("i i-embed",r),focusable:i,height:s,viewBox:"0 0 16 15",width:n,children:[Df("title",{children:e}),Df("desc",{children:t}),Df("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"})]}),J1e=null;var oU,Hd,rU;const eve=({title:e="Empty folder",desc:t="Empty folder",width:n="46",height:s="46",className:r,focusable:i="false"})=>oU("svg",{className:rU("i i-emptyFolder",r),focusable:i,height:s,viewBox:"0 0 46 46",width:n,children:[Hd("title",{children:e}),Hd("desc",{children:t}),Hd("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"}),Hd("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"})]}),tve=null;var iU,Vd,aU;const nve=({title:e="End Slide",desc:t="End Slide",width:n="16",height:s="14",className:r,focusable:i="false"})=>iU("svg",{className:aU("i i-end-slide",r),focusable:i,height:s,viewBox:"0 0 16 14",width:n,children:[Vd("title",{children:e}),Vd("desc",{children:t}),Vd("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"}),Vd("rect",{fillRule:"evenodd",height:"14",width:"2",x:"14"})]}),sve=null;var r3,zd,cU;const ove=({title:e="Envelope",desc:t="Envelope",width:n="17",height:s="14",className:r,focusable:i="false"})=>r3("svg",{className:cU("i i-envelope",r),focusable:i,height:s,viewBox:"0 0 17 14",width:n,xmlns:"http://www.w3.org/2000/svg",children:[zd("title",{children:e}),zd("desc",{children:t}),r3("g",{fillRule:"nonzero",children:[zd("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"}),zd("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"})]})]}),rve=null;var lU,$d,dU;const ive=({title:e="Error",desc:t="An x with a circle",width:n="50",height:s="50",className:r,focusable:i="false"})=>lU("svg",{className:dU("i i-error",r),focusable:i,height:s,viewBox:"0 0 50 50",width:n,children:[$d("title",{children:e}),$d("desc",{children:t}),$d("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"}),$d("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"})]}),ave=null;var uU,Ud,hU;const cve=({title:e="Error Alert",desc:t="A red circle with a white exclamation point in the middle",width:n="18",height:s="18",className:r,focusable:i="false"})=>uU("svg",{className:hU("i i-errorAlert",r),focusable:i,height:s,viewBox:"0 0 18 18",width:n,children:[Ud("title",{children:e}),Ud("desc",{children:t}),Ud("circle",{cx:"9",cy:"9",r:"9"}),Ud("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"})]}),lve=null,i3=({"aria-hidden":e,"aria-label":t="X mark",className:n,dataTestId:s="x-mark",desc:r,height:i="10",overrideStyle:a=!1,role:c="img",title:l,width:d="10"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:X()(n,{"i i-exMark":!a}),"data-testid":s,focusable:"false",height:i,role:c,viewBox:"0 0 10 10",width:d,xmlns:"http://www.w3.org/2000/svg",children:[l&&(0,o.jsx)("title",{children:l}),r&&(0,o.jsx)("desc",{children:r}),(0,o.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 mU,Gd,fU;const uve=({title:e="Export",desc:t="Export",width:n="12",height:s="15",className:r,focusable:i="false"})=>mU("svg",{className:fU("i i-export",r),focusable:i,height:s,viewBox:"0 0 12 15",width:n,children:[Gd("title",{children:e}),Gd("desc",{children:t}),Gd("polygon",{points:"7,6.4 7,1 5,1 5,6.4 2.3,6.4 6,10.8 9.7,6.4"}),Gd("rect",{height:"2",width:"10",x:"1",y:"12"})]}),hve=null,a3=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#C7CACC",fillRule:"evenodd"}),(0,o.jsx)("path",{d:"M13.534 22.9863V24.4163H10.245V26.4458H12.984V27.8813H10.245V30.9998H8.375V22.9863H13.534Z",fill:"#414448"}),(0,o.jsx)("path",{d:"M17.533 30.9998H15.663V22.9863H17.533V30.9998Z",fill:"#414448"}),(0,o.jsx)("path",{d:"M21.8805 29.5148H24.8505V30.9998H20.0215V22.9863H21.8805V29.5148Z",fill:"#414448"}),(0,o.jsx)("path",{d:"M31.8846 22.9863V24.4163H28.5956V26.2863H31.1146V27.6613H28.5956V29.5698H31.8846V30.9998H26.7256V22.9863H31.8846Z",fill:"#414448"})]}),pU=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#96A9E0",fillRule:"evenodd"}),(0,o.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,o.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,o.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"})]}),gU=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#EDADA9",fillRule:"evenodd"}),(0,o.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,o.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,o.jsx)("path",{d:"M31.3465 22.9863V24.4163H28.0575V26.4458H30.7965V27.8813H28.0575V30.9998H26.1875V22.9863H31.3465Z",fill:"#771D18"})]}),vU=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#F8BFA6",fillRule:"evenodd"}),(0,o.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,o.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,o.jsx)("path",{d:"M31.2008 22.9863V24.4603H28.9458V30.9998H27.0868V24.4603H24.8318V22.9863H31.2008Z",fill:"#7C2B0E"})]}),CU=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,o.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,o.jsx)("path",{d:"M23.6162 22.9865V24.4605H21.3612V31H19.5022V24.4605H17.2472V22.9865H23.6162Z",fill:"#144E6C"}),(0,o.jsx)("path",{d:"M30.5411 22.9865V24.4165H27.2521V26.446H29.9911V27.8815H27.2521V31H25.3821V22.9865H30.5411Z",fill:"#144E6C"})]}),xU=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#AFD1AE",fillRule:"evenodd"}),(0,o.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,o.jsx)("path",{d:"M20.6017 29.5149H23.5717V30.9999H18.7427V22.9864H20.6017V29.5149Z",fill:"#265026"}),(0,o.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"})]}),bU=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,o.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,o.jsx)("path",{d:"M20.7826 30.9998H18.9126V22.9863H20.7826V30.9998Z",fill:"#124F6E"}),(0,o.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 yU,Ff;const bve=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="16",role:i="img",title:a,width:c="16"})=>yU("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:i,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Ff("title",{children:a}),s&&Ff("desc",{children:s}),Ff("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"})]}),yve=null;var SU,_f,IU;const Sve=({title:e="Hidden",desc:t="Eye crossed out",width:n="16",height:s="14",className:r=null,focusable:i="false"})=>SU("svg",{className:IU("i i-hidden",r),focusable:i,height:s,viewBox:"0 0 16 14",width:n,children:[_f("title",{children:e}),_f("desc",{children:t}),_f("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"})]}),Ive=null;var TU,Wd,LU;const Tve=({title:e="Label Set",desc:t="Label Set",width:n="17",height:s="17",className:r,focusable:i="false"})=>TU("svg",{className:LU("i i-labelSet",r),focusable:i,height:s,viewBox:"0 0 18 18",width:n,children:[Wd("title",{children:e}),Wd("desc",{children:t}),Wd("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"}),Wd("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"})]}),Lve=null;var EU,Hf;const Eve=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="15",role:i="img",title:a,width:c="16"})=>EU("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:i,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Hf("title",{children:a}),s&&Hf("desc",{children:s}),Hf("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"})]}),kve=null;var kU,Vf,NU;const Nve=({title:e="Matching",desc:t="Two rows of stacked squares",width:n="15",height:s="15",className:r,focusable:i="false"})=>kU("svg",{className:NU("i i-matching",r),focusable:i,height:s,viewBox:"0 0 15 15",width:n,children:[Vf("title",{children:e}),Vf("desc",{children:t}),Vf("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"})]}),jve=null;var jU,Kd,wU;const wve=({title:e="Multiple Choice",desc:t="Stacked circles to the left of stacked lines",width:n="16",height:s="16",className:r,focusable:i="false"})=>jU("svg",{className:wU("i i-multipleChoice",r),focusable:i,height:s,viewBox:"0 0 16 16",width:n,children:[Kd("title",{children:e}),Kd("desc",{children:t}),Kd("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"}),Kd("circle",{cx:"7.904",cy:"7.904",r:"1.904"})]}),Rve=null;var RU,zf,AU;const Ave=({title:e="Multiple Response",desc:t="A box with a checkmark in it",width:n="16",height:s="16",className:r,focusable:i="false"})=>RU("svg",{className:AU("i i-multipleResponse",r),focusable:i,height:s,viewBox:"0 0 16 16",width:n,children:[zf("title",{children:e}),zf("desc",{children:t}),zf("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"})]}),Pve=null;var PU,Qd,MU;const Mve=({title:e="New Slide",desc:t="New Slide",width:n="16",height:s="16",className:r,focusable:i="false"})=>PU("svg",{className:MU("i i-new-slide",r),focusable:i,height:s,viewBox:"0 0 16 16",width:n,children:[Qd("title",{children:e}),Qd("desc",{children:t}),Qd("path",{d:"M7,12h2V9h3V7H9V4H7v3H4v2h3V12z",fillRule:"evenodd"}),Qd("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"})]}),Ove=null;var OU,$f,BU;const Bve=({title:e="Next Slide",desc:t="Next Slide",width:n="16",height:s="13.4",className:r,focusable:i="false"})=>OU("svg",{className:BU("i i-next-slide",r),focusable:i,height:s,viewBox:"0 0 16 13.4",width:n,children:[$f("title",{children:e}),$f("desc",{children:t}),$f("path",{d:"M9.3,0L7.9,1.4l4.3,4.3H0v2h12.2L7.9,12l1.4,1.4L16,6.7L9.3,0",fillRule:"evenodd"})]}),Dve=null;var DU,vc,FU;const Fve=({title:e="Hide",desc:t="Shape of an eye with a stroke through it",width:n="20",height:s="16",className:r,focusable:i="false"})=>DU("svg",{className:FU("i",r),focusable:i,height:s,viewBox:"0 0 20 16",width:n,children:[vc("title",{children:e}),vc("desc",{children:t}),vc("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"}),vc("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"}),vc("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"})]}),_ve=null;var _U,Uf,HU;const Hve=({title:e="Edit",desc:t="Pencil",width:n="11",height:s="11",className:r,focusable:i="false"})=>_U("svg",{className:HU("i i-pencil",r),focusable:i,height:s,viewBox:"0 0 10 10",width:n,children:[Uf("title",{children:e}),Uf("desc",{children:t}),Uf("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"})]}),Vve=null;var VU,Gf;const zve=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="16",role:i="img",title:a,width:c="16"})=>VU("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Gf("title",{children:a}),s&&Gf("desc",{children:s}),Gf("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"})]}),$ve=null;class Wf extends u.Component{constructor(...t){super(...t),this.maskId=`person-unknown-mask-${Vr()()}`,this.pathId=`person-unknown-path-${Vr()()}`}render(){const{title:t="Person Unknown",desc:n,width:s="38",height:r="38",className:i,decorative:a,focusable:c="false"}=this.props;return(0,o.jsxs)("svg",{"aria-hidden":a,className:X()("i i-person-unknown",i),focusable:c,height:r,viewBox:"0 0 38 38",width:s,children:[t&&(0,o.jsx)("title",{children:t}),n&&(0,o.jsx)("desc",{children:n}),(0,o.jsx)("defs",{children:(0,o.jsx)("circle",{cx:"19",cy:"19",id:this.pathId,r:"19"})}),(0,o.jsxs)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:[(0,o.jsx)("mask",{fill:"#fff",id:this.maskId,children:(0,o.jsx)("use",{href:`#${this.pathId}`})}),(0,o.jsx)("use",{fill:"#D8D8D8",href:`#${this.pathId}`}),(0,o.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 zU(e){return(0,o.jsxs)(wn,{viewBox:"0 0 16 16",...e,children:[(0,o.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,o.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,o.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 $U,Kf;const Uve=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="15",role:i="img",title:a,width:c="16"})=>$U("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:i,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Kf("title",{children:a}),s&&Kf("desc",{children:s}),Kf("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"})]}),Gve=null;function UU(e){return(0,o.jsx)(wn,{viewBox:"0 0 23 17",...e,children:(0,o.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 c3,GU;const Wve=({width:e="16",height:t="16",className:n})=>c3("svg",{"aria-hidden":"true",className:GU("i i-search",n),fill:"currentColor",focusable:"false",height:t,viewBox:"0 0 15.6 14.7",width:e,children:c3("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"})}),Kve=null;var l3,Fi,WU;const Qve=({title:e="Spinner",desc:t="Hollow circle fading from transparent to gray",width:n="21",height:s="20",className:r,focusable:i="false"})=>l3("svg",{className:WU("i i-spinner",r),focusable:i,height:s,viewBox:"0 0 21 20",width:n,children:[Fi("title",{children:e}),Fi("desc",{children:t}),Fi("defs",{children:l3("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:[Fi("stop",{offset:"0%",stopColor:"#C8C8C8",stopOpacity:"0"}),Fi("stop",{offset:"100%",stopColor:"#979797"})]})}),Fi("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)"})]}),Zve=null;function KU(e){return(0,o.jsxs)(wn,{viewBox:"0 0 15 16",...e,children:[(0,o.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,o.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 QU,Qf,ZU;const Yve=({title:e="Remove",desc:t="Trash can",width:n="10",height:s="13",className:r=null,focusable:i="false"})=>QU("svg",{className:ZU("i i-trash",r),focusable:i,height:s,viewBox:"0 0 10 13",width:n,children:[Qf("title",{children:e}),Qf("desc",{children:t}),Qf("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"})]}),qve=null;var YU,_i;const Xve=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="16",role:i="img",title:a,width:c="14"})=>YU("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 14 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&_i("title",{children:a}),s&&_i("desc",{children:s}),_i("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"}),_i("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"}),_i("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"}),_i("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"})]}),Jve=null;var qU,Zd,XU;const eCe=({title:e="Upload",desc:t="Upload icon",width:n="15",height:s="15",className:r="",focusable:i="false"})=>qU("svg",{className:XU("i",r),focusable:i,height:s,viewBox:"0 0 15 15",width:n,children:[Zd("title",{children:e}),Zd("desc",{children:t}),Zd("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"}),Zd("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"})]}),tCe=null;var JU,Cc;const nCe=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="14",role:i="img",title:a,width:c="14"})=>JU("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 14 14",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Cc("title",{children:a}),s&&Cc("desc",{children:s}),Cc("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"}),Cc("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"}),Cc("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"})]}),sCe=null;var eG,Yd,tG;const oCe=({title:e="UploadXml",desc:t="UploadXml",width:n="18",height:s="21",className:r,focusable:i="false"})=>eG("svg",{className:tG("i i-uploadXml",r),focusable:i,height:s,viewBox:"0 0 18 21",width:n,children:[Yd("title",{children:e}),Yd("desc",{children:t}),Yd("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"}),Yd("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"})]}),rCe=null;function nG(e){return(0,o.jsx)(wn,{viewBox:"0 0 16 12",...e,children:(0,o.jsx)("g",{transform:"translate(-1 -2)",children:(0,o.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 d3,qd,sG;const iCe=({title:e="Visible",desc:t="Eye",width:n="16",height:s="12",className:r=null,focusable:i="false"})=>d3("svg",{className:sG("i i-visible",r),focusable:i,height:s,viewBox:"0 0 16 12",width:n,children:[qd("title",{children:e}),qd("desc",{children:t}),d3("g",{children:[qd("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"}),qd("path",{d:"M8 4a2 2 0 1 1 .001 3.999A2 2 0 0 1 8 4"})]})]}),aCe=null,oG=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="20",role:i="img",title:a="",style:c,width:l="20"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:X()("i i-xMarkFilled",n),focusable:"false",height:r,role:i,style:c,viewBox:"0 0 20 20",width:l,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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 rG=C(78453),iG=C.n(rG);const aG=zt()(iG()({}),_v()(["first_name","last_name"]),fi()(" "),dR()),cG=({className:e,decorative:t,size:n,...s})=>{const r=Do()(["avatars","medium"],s),i=t?"":aG(s)||"Unknown User";return r?(0,o.jsx)("img",{alt:i,className:e||"user-avatar",src:r,style:{height:n,width:n}}):(0,o.jsx)(Wf,{decorative:t,height:n,title:i,width:n})},lG=`${Ne("CDN_URI")}/assets/rise/assets/trophy.svg`,Xd=V("cover"),dG=y$,uG=cG;function dCe(){const{certificateDownload:e,riseComCurrentUser:t}=ie(),n=xe(),s=qM(),i=_m()?.quizPassed??!0;return!(s&&i&&!hC())||window.viewType==="preview"?null:(0,o.jsxs)("div",{className:Xd("completed-info"),children:[(0,o.jsxs)("div",{className:Xd("completed-info-avatar"),children:[(0,o.jsx)(uG,{...t??{},decorative:!0}),(0,o.jsx)("img",{alt:"",className:Xd("completed-info-trophy"),src:lG})]}),(0,o.jsxs)("div",{className:Xd("completed-info-label"),children:[(0,o.jsx)("span",{"aria-hidden":"true",children:n?.coverCompleted||"Completed"}),(0,o.jsx)("span",{className:"visually-hidden",children:n?.a11yCoverCourseCompleted||"Course Completed"})]}),e&&(0,o.jsx)(dG,{})]})}const Zf=V("cover");function hG(e,t,n){return e===1?t:n}function mG(){const e=s2(),t=xe(),n=hG(e,t?.coverLesson||"Lesson",t?.coverLessons||"Lessons");return(0,o.jsxs)("li",{className:Zf("num-lessons"),role:"listitem",children:[(0,o.jsx)("span",{className:Zf("num-lessons-value"),children:e}),"\xA0",(0,o.jsx)("span",{className:Zf("num-lessons-units"),children:n})]})}var fG=C(1841),Cs=C.n(fG);const pG=36e5,Yf=V("cover");function gG(e){return Math.round(10*e)/10}function u3(e,t,n){return e===1?t:n}function vG(){const{showTimeToComplete:e,timeToComplete:t}=ie(),n=xe();if(!e)return null;const s=Number(t)>=pG,r=s?gG(Cs().duration(t).asHours()):Cs().duration(t).asMinutes(),i=s?u3(r,n?.coverHour||"Hour",n?.coverHours||"Hours"):u3(r,n?.coverMinute||"Minute",n?.coverMinutes||"Minutes");return(0,o.jsxs)("li",{className:Yf("time-to-complete"),role:"listitem",children:[(0,o.jsx)("span",{className:Yf("time-to-complete-value"),children:r}),"\xA0",(0,o.jsx)("span",{className:Yf("time-to-complete-units"),children:i})]})}const qf=V("cover");function h3(){const e=xe();return null}const Xf=e=>{if(!e)return"";const t=Cs()(e),n=Cs()(),s=Cs()(n).add(24,"hours");return t.isBefore(n)?"Overdue":t.isBefore(s)?`Due in ${n.to(t,!0)}`:`Due ${t.format("MMM D")}`},CG=e=>Cs()(e).isSameOrBefore(Cs()().add(3,"d"),"days"),xG=V("cover");function bG(e){return typeof e=="object"&&e!=null}function yG(e){return e==null||typeof e=="string"||typeof e=="number"||e instanceof Date}function SG(e){if(!bG(e))return;const t=e.dueAt;return yG(t)?t:void 0}function uCe(){const e=Or(),t=SG(e),n=my(e?.themeId??e?.theme?.themeId),s=jM(),r=_m(),i=r==null||r.quizPassed||r.outOfAttempts,a=CG(t),c=n===ne.RISE_CLASSIC?a?"brand--background":"brand--color":"",l=xG("due-date",{urgent:a}).mix(c);return!t||s&&i?null:(0,o.jsx)("div",{className:l,children:Xf(t)})}const IG=e=>{const t=e.indexOf("-");return t===-1?e:e.slice(0,t)},hCe=(e,t)=>{const n=IG(e);return t.find(({iso639Code:s})=>s===e)||t.find(({iso639Code:s})=>s===n)||t.find(({defaultId:s,defaultSet:r})=>r&&s===1)},Hi=({percent:e,label:t,isRTL:n})=>{if(t.includes("%")){const s=n?`%${e}`:`${e}%`;return t.replace("%",s)}return`${e} ${t}`},m3=({failed:e,complete:t})=>{const n=xe();return(0,o.jsxs)("span",{className:"visually-hidden-always",children:[e?n?.a11yCoverRequirementFailed||"Requirement failed":t?n?.a11yCoverRequirementComplete||"Requirement complete":n?.a11yCoverRequirementIncomplete||"Requirement incomplete",": "]})},xs=V("cover");function fCe(){const e=ie(),t=xe(),{trackingCompletionPercentage:n,trackingQuizId:s}=e;return n==null&&!s?null:(0,o.jsxs)("section",{className:xs("requirements-section"),children:[(0,o.jsx)("h2",{className:xs("requirements-title"),children:t?.coverCourseRequirements||"Course Requirements"}),(0,o.jsxs)("ul",{className:xs("requirements-list"),children:[(0,o.jsx)(TG,{}),(0,o.jsx)(EG,{})]})]})}function TG(){const{trackingCompletionPercentage:e}=ie(),t=s2(),n=Ti(),s=xe();if(e==null)return null;const r=Math.ceil(e/100*t),i=r===t,a=n!=null&&n>=e,c=a?a$:c$;return(0,o.jsxs)("li",{className:xs("lesson-requirement"),role:"listitem",children:[(0,o.jsx)(c,{"aria-hidden":"true",className:xs("lesson-requirement-icon",{complete:a}).toString()}),(0,o.jsxs)("span",{className:xs("lesson-requirement-text"),children:[(0,o.jsx)(m3,{complete:a}),i?s?.coverCompleteAllLessons||"Complete all lessons in this course":[s?.coverCompleteLessonsName||"Complete",r,s?.coverCompleteLessonsPreposition||"of",t,s?.coverCompleteLessonsInCourse||"lessons in this course"].join(" ")]})]})}const LG={passed:u$,failed:d$,requirement:h$};function EG(){const e=xe(),t=NM(),n=_m(),s=ds(),r=Ct(t?.title),i=t?.settings?.passingScore;if(!r||!n)return null;const{outOfAttempts:a,quizPassed:c}=n,l=!c&&a;let d="requirement";c?d="passed":l&&(d="failed");const h=LG[d],m=i!=null?Hi({percent:Number(i),label:e?.coverQuizPercentOrHigher||"% or higher",isRTL:s}):null;return(0,o.jsxs)("li",{className:xs("quiz-requirement"),role:"listitem",children:[(0,o.jsx)(h,{"aria-hidden":"true",className:xs("quiz-requirement-icon",{type:d}).toString()}),(0,o.jsxs)("span",{className:xs("quiz-requirement-text"),children:[(0,o.jsx)(m3,{complete:c,failed:l}),r,i!=null&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{"aria-hidden":"true",className:xs("quiz-requirement-seperator"),children:"\xA0|\xA0"}),e?.coverQuizScoreOf||"Score of"," ",m]}),l&&(0,o.jsx)("div",{className:xs("quiz-requirement-no-attempts"),children:e?.coverNoAttemptsRemaining||"No attempts remaining"})]})]})}function f3(e,t){const n=(0,u.useMemo)(()=>matchMedia(`(${e}: ${t*.0625}em)`),[e,t]),[s,r]=(0,u.useState)(n.matches);return(0,u.useEffect)(()=>{const i=n.addEventListener??n.addListener,a=n.removeEventListener??n.removeListener;return i.call(n,"change",c),()=>a.call(n,"change",c);function c(){r(n.matches)}},[n]),s}function Zt(e){return f3("max-width",e-1)}function kG(e){return f3("min-width",e)}const xc=js()("partner-content-course-author__"),NG=({partnerContentAuthors:e,darkText:t,isImage:n,learn:s,lesson:r,isOnePage:i,selectedContentId:a})=>{const c=Mr()(at()("id",a),e),l=Do()(["data","authors"],c),h=(r?l:e).filter(g=>g.name),m=X()(xc("author-container"),{[xc("author-container-padding-top")]:t}),f=X()({[xc("gray-text")]:!s&&!i}),p=X()(xc("author-image")),v=g=>`url(${rc({width:"76",height:"76",imageKey:g.image})})`;return(0,o.jsxs)("section",{children:[(0,o.jsx)("h2",{className:"visually-hidden",children:"Authors"}),(0,o.jsx)("ol",{className:m,"data-testid":"partner-content-course-author-container",role:"list",children:h.map(g=>(0,o.jsxs)("li",{className:xc("author"),"data-testid":"partner-content-course-author",role:"listitem",children:[(0,o.jsx)("div",{"aria-hidden":"true",className:p,"data-testid":"partner-content-course-author-image",disabled:n,style:{backgroundImage:v(g)}}),(0,o.jsx)("span",{className:f,children:g.name})]},g.name))})]})},Vi=V("cover"),gCe=()=>{const e=jm();if(e==null)return null;const{avatar:t,authorName:n,title:s}=e;return(0,o.jsxs)("div",{className:Vi("author-with-title"),children:[(0,o.jsx)(p3,{avatar:t}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:Vi("author-name"),children:n}),(0,o.jsx)("div",{className:Vi("author-title"),children:s})]})]})},p3=({avatar:e})=>{const t=Vi("header-content-authors-avatar");return e?(0,o.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",style:{backgroundImage:`url(${yt(e)})`}}):(0,o.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",children:(0,o.jsx)(Wf,{decorative:!0})})},jG=({className:e})=>{const{partnerContentId:t,selectedAuthorId:n,theme:s,themeId:r}=ie(),{coverPageType:i}=s??{},{authorName:a,avatar:c}=jm()??{},l=xe(),d=EV(),h=!!t&&d!=null,f=Zt(768)&&dM(r,i),p=i===ce.LEFT_OVERLAY||i===ce.CENTERED_OVERLAY||f;if(n==="none")return null;const v=a||"Unknown User",g=Vi("header-content-authors").mix(e),x=Vi("header-content-authors-name");return h?(0,o.jsx)("div",{className:g,"data-testid":"cover-authors",children:(0,o.jsx)(wG,{isImage:p,learn:!0,partnerContentAuthors:d})}):(0,o.jsxs)("div",{className:g,"data-testid":"cover-authors",children:[(0,o.jsx)(p3,{avatar:c}),(0,o.jsxs)("div",{className:x,"data-testid":"cover-header-content-authors-name",children:[(0,o.jsx)("span",{className:"visually-hidden-always",children:l?.a11yAuthorPrefix}),(0,o.jsx)("span",{children:v})]})]})},wG=NG,Os=jG,RG=V("cover");function AG({className:e="",type:t,...n}){const s=Et(),r=X()(RG("details-content-heading",{type:t}).toString(),e,{"brand--ui":s===ne.RISE_CLASSIC});return(0,o.jsx)("header",{...n,className:r})}const PG=V("cover");function MG({children:e,title:t,type:n}){const s=ie(),{description:r,media:i,partnerContentId:a}=s??{},c=!!a,d=(i&&"image"in i?i.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,o.jsxs)("section",{className:PG("details-content-section",{type:m}),children:[t&&(0,o.jsx)(AG,{type:n,children:(0,o.jsx)("h2",{children:t})}),e]})}const OG=V("cover"),BG=({children:e,type:t})=>(0,o.jsx)("section",{className:OG("details-content-section",{type:t}),children:e});function Jd(e){return Et()===ne.HORIZON?(0,o.jsx)(MG,{...e}):(0,o.jsx)(BG,{...e})}const Jf=e=>fs(e)===Ee.LIGHT;var vCe;const gn=js()("partner-content-book-info__"),g3=e=>{const{authors:t,backgroundColor:n,bookImage:s,bookTitle:r,buyLink:i,block:a,trackingInfo:c}=e,d=He()?.publishedAt,h=ty(),m=t.filter(k=>!Jt()(k.name)),f=wt()(k=>k.name,m),p=f.length>1?fi()(" & ",f):f[0],v=p.slice(-1)==="s"?"":"s",g=Jf(n),x=X()({[gn("book-image-block")]:a&&!g},{[gn("book-image-block")&&gn("dark-theme-book-image")]:a&&g},{[gn("book-image-course")]:!a}),y=gn(a?"flex-block":"flex-course"),S=gn(a?"image-container-block":"image-container-course"),I=X()(gn("small-text"),{[gn("dark-theme")]:g}),b=X()(gn("black-text"),{[gn("dark-theme")]:g}),T=X()(gn("button"),{[gn("dark-theme-button")]:g}),L=rc({height:"210",width:"140",imageKey:s}),E=(0,u.useCallback)(()=>{},[d,h,c]);return(0,o.jsxs)("section",{className:y,children:[(0,o.jsx)("h2",{className:"visually-hidden",children:"Book Info"}),(0,o.jsx)("div",{"aria-hidden":"true",className:S,children:s?(0,o.jsx)("img",{alt:"",className:x,src:L}):(0,o.jsx)("div",{className:x})}),(0,o.jsxs)("div",{className:gn("text-container"),children:[(0,o.jsxs)("p",{className:I,children:["From ",p,"'",v]}),(0,o.jsx)("p",{className:b,children:r}),(0,o.jsx)("a",{className:T,href:i,onClick:E,rel:"noopener noreferrer",target:"_blank",children:"Buy the book"})]})]})};var xCe;const Qn=js()("partner-content-partner-info__"),v3=({backgroundColor:e,block:t,link:n,trackingInfo:s})=>{const i=He()?.publishedAt,a=ty(),c=t?XP():JP(),l=Qn(t?"nbic-logo-light-bulb":"nbic-logo"),d=Qn(t?"block-logo-container":"logo-container"),h=Jf(e),m=X()(Qn("small-text"),{[Qn("dark-theme")]:h}),f=X()(Qn("black-text"),{[Qn("dark-theme")]:h}),p=X()(Qn("button"),{[Qn("dark-theme-button")]:h}),v=(0,u.useCallback)(()=>{},[i,a,s]);return(0,o.jsxs)("section",{className:Qn("flex"),children:[(0,o.jsx)("h2",{className:"visually-hidden",children:"Partner Info"}),(0,o.jsx)("div",{"aria-hidden":"true",className:d,children:(0,o.jsx)("img",{alt:"",className:l,src:c})}),(0,o.jsxs)("div",{className:Qn("text-container"),children:[(0,o.jsx)("p",{className:m,children:"In partnership with"}),(0,o.jsx)("p",{className:f,children:"Next Big Idea Club"}),(0,o.jsx)("a",{className:p,href:n,onClick:v,rel:"noopener noreferrer",target:"_blank",children:"Learn more"})]})]})},zi=js()("partner-content-author-card__"),C3=e=>{const{partnerContent:t}=e,n=He(),{id:s,tenantId:r}=n??{},{data:i,type:a}=t,{authors:c,bookImage:l,bookTitle:d,buyLink:h,internalId:m,nbicLink:f}=i,p=c.filter(S=>S.name),v={courseId:s,partnerContentId:t.id,partnerContentInternalId:m,tenantId:r,contentSubtype:a},g=X()(zi("flex"),zi("author-container")),x=S=>rc({width:"122",height:"122",imageKey:S}),y=(S,I)=>(0,o.jsx)("div",{"aria-hidden":"true",className:zi("image-container"),children:S?(0,o.jsx)("img",{alt:I,className:zi("author-image"),src:x(S)}):(0,o.jsx)("div",{className:zi("author-image")})});return(0,o.jsxs)("ol",{className:"partner-content-author-card","data-testid":"partner-content-author-card",role:"list",children:[(0,o.jsx)("li",{role:"listitem",children:(0,o.jsxs)("section",{children:[(0,o.jsx)("h2",{className:"visually-hidden",children:"Authors"}),p.map(S=>(0,o.jsxs)("li",{className:g,children:[y(S.image,S.name),(0,o.jsx)("p",{className:zi("author-name-text"),children:S.name})]},S.name))]})}),(0,o.jsx)("li",{role:"listitem",children:(0,o.jsx)(g3,{authors:c,bookImage:l,bookTitle:d,buyLink:h,trackingInfo:v})}),(0,o.jsx)("li",{role:"listitem",children:(0,o.jsx)(v3,{link:f,trackingInfo:v})})]})},DG=V("cover");function FG({hasLogo:e}){const t=dc();if(!t)return null;const n=DG("details-content-aside",{logo:e});return(0,o.jsx)("div",{className:n,children:(0,o.jsx)(Jd,{type:"partner-content",children:(0,o.jsx)(C3,{partnerContent:t})})})}const _G=V("cover"),HG=({coursePartnerContent:e})=>(0,o.jsx)(Jd,{type:"partner-content",children:(0,o.jsx)(C3,{partnerContent:e})}),VG=({hasLogo:e})=>{const t=dc(),n=t!=null,s=_G("details-content-aside",{logo:e});return(0,o.jsxs)("div",{className:s,children:[!1,t&&(0,o.jsx)(HG,{coursePartnerContent:t}),!1,!1]})},zG=e=>Et()===ne.HORIZON?(0,o.jsx)(FG,{...e}):(0,o.jsx)(VG,{...e});function ICe(e){const t=new Map;return n=>{if(t.has(n))return t.get(n);const s=e(n);return t.set(n,s),s}}function eu(e,t={}){let n;return()=>{if(n==null){const s=e();n=s,t.clearOnReject&&s.catch(()=>{n===s&&(n=void 0)})}return n}}function $G(e,t={}){const n=new WeakMap;return s=>{const r=n.get(s);if(r!=null)return r;const i=e(s);return n.set(s,i),t.clearOnReject&&i.catch(()=>{n.get(s)===i&&n.delete(s)}),i}}const x3=eu(async()=>(await C.e("math").then(C.bind(C,8660))).browserAdaptor(),{clearOnReject:!0}),b3=eu(async()=>{const[{TeX:e},{AllPackages:t}]=await Promise.all([C.e("math").then(C.t.bind(C,91036,23)),C.e("math").then(C.bind(C,15801))]);return new e({packages:t})}),y3=eu(async()=>{const e=await C.e("math").then(C.t.bind(C,56260,23));return new e.SVG({fontCache:"local"})},{clearOnReject:!0}),S3=eu(async()=>{const[e,t,n,{RegisterHTMLHandler:s},{mathjax:r}]=await Promise.all([x3(),b3(),y3(),C.e("math").then(C.bind(C,33805)),C.e("math").then(C.bind(C,13067))]);return s(e),r.document(document,{InputJax:t,OutputJax:n})},{clearOnReject:!0}),UG=$G(async e=>{const t=new CSSStyleSheet;e.adoptedStyleSheets.push(t);const[n,s]=await Promise.all([y3(),S3()]),r=n.styleSheet(s);r instanceof HTMLStyleElement&&await t.replace(r.innerText)},{clearOnReject:!0});class GG extends HTMLElement{static observedAttributes=["long-description","short-description","tex"];_ready;_anchor=this;_renderController;constructor(){super(),this._ready=UG(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,s,r]=await Promise.all([S3(),x3(),b3(),this._ready]);if(t.signal.aborted)return;r.reset();const{tex:i}=this,a=i.includes("begin{")?i:String.raw`\begin{align*}${i}\end{align*}`,c=n.convert(a),l=s.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(i),f=s.firstChild(m);h=document.evaluate("//@data-mjx-error",f,null,XPathResult.STRING_TYPE).stringValue??"An error occured"}this.dispatchEvent(new WG("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",GG);class WG extends CustomEvent{}var bs=C(63657);function ep(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 s=n[1],r=t.match(/^<[^>]*>(.*)<\/[^>]*>$/s),i=r?r[1]:t;return{editorId:s,value:typeof e=="string"?i:e}}return{value:e}}const I3=(e="")=>e.split(".").slice(-2).join("."),T3=$e()(I3,Ne),KG=e=>e.includes("#/lessons/"),Zn=e=>{if(!e||QG(e)||KG(e))return!1;e.slice(0,2)==="//"&&(e=`https:${e}`);try{const{hostname:t}=new URL(e),n=I3(t);return n!==T3("ARTICULATE_DOMAIN")&&n!==T3("RISE_DOMAIN")}catch{return!1}},QG=e=>e?e.slice(0,7)==="mailto:":!1;function bc(e,t){const n=[];if(e){let s=e.parentElement;for(;s&&(t?.limit==null||n.length<t.limit);){if(s===document.body){n.push(window);break}const r=window.getComputedStyle(s);(r.overflowX==="auto"||r.overflowX==="scroll"||r.overflowY==="auto"||r.overflowY==="scroll")&&n.push(s),s=s.parentElement}}return n}function L3(e){return bc(e,{limit:1})[0]??null}function TCe(e,{block:t="nearest",inline:n}={}){e.scrollIntoView(n===void 0?{block:t}:{block:t,inline:n})}var ZG;function tp(){return document.getElementById("page-wrap")}const LCe=e=>{const t=e.value.length;e.focus(),e.setSelectionRange(t,t)},ECe=e=>{const t=ZG(["current","editor"],e);if(!t)return null;const n=t.value.length;return t.focus(),t.setSelectionRange(n,n),e};function tu(e,t){const n=e.getBoundingClientRect(),s=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;if(t==="start")return n.top>=0;if(t==="center"){if(n.height>s)return n.top<=0&&n.bottom>=s;const i=s/2,a=n.top+n.height/2,c=s*.25;return Math.abs(i-a)<c}return t==="end"?n.bottom<=s:n.top>=0&&n.left>=0&&n.bottom<=s&&n.right<=r}function YG(e,{behavior:t="smooth",offsetTop:n=0}={}){const s=L3(e);if(!s||!("getBoundingClientRect"in s)){const r=e.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:Math.max(0,r-n),behavior:t})}else{const r=s.getBoundingClientRect().top,i=e.getBoundingClientRect().top-r,a=Math.max(0,s.scrollTop+i-n);s.scrollTo({top:a,behavior:t})}}function kCe(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(t)}}function np({anchor:e,popover:t,positionX:n}){if(!e||!t)return null;const s=e.getBoundingClientRect(),i=window.getComputedStyle(e).direction==="rtl",a=window.getComputedStyle(t),c=parseFloat(a.marginTop),l=t.offsetWidth,d=window.visualViewport??{width:window.innerWidth,height:window.innerHeight},h=s.top+s.height+t.offsetHeight+c>d.height?s.top-(c*2+t.offsetHeight):s.top+s.height;let m;if(n==="center"){const f=s.left+s.width/2;m=i?d.width-f-l/2:f-l/2}else n==="right"?m=i?d.width-s.left-l:s.right-l:m=Math.min(i?d.width-s.right:s.left,d.width-l);return{left:m,top:h}}function E3(e){const t=document.getElementById(e);try{return t?.matches(":popover-open")??!1}catch{return!1}}function k3(e){if(e==null)return null;try{const t=e.querySelectorAll(":popover-open"),n=t.item(t.length-1);return n instanceof HTMLElement?n:null}catch{return null}}function qG(e){return k3(e)!=null}function XG(e){const t=k3(e);return t==null?!1:(t.hidePopover(),!0)}const sp=V("external-link-disabled-popover"),N3=12,op="external-link-disabled-popover--open",nu="external-link-disabled-popover-visibility-change",ys=e=>`trial-external-link-popover-${e}`;function su(e){return document.getElementById(ys(e))}function j3(e){const t=document.getElementById(e),n=su(e);if(!t||!n)return;const s=np({anchor:t,popover:n,positionX:"center"});if(!s)return;const r=window.visualViewport?.width??window.innerWidth,i=window.visualViewport?.height??window.innerHeight,a=Math.max(0,r-n.offsetWidth),c=Math.min(Math.max(0,s.left),a),l=window.getComputedStyle(t).direction==="rtl",d=l?-c:c,h=t.getBoundingClientRect(),m=Number.parseFloat(window.getComputedStyle(n).marginBlockStart)||0,f=h.top-(m*2+n.offsetHeight),p=h.bottom,v=h.top-m-n.offsetHeight>=0,g=h.bottom+m+n.offsetHeight<=i,x=v||!g&&h.top>=i-h.bottom,y=x?f:p,S=l?r-n.offsetWidth-c:c,I=h.left+h.width/2-S,b=l?n.offsetWidth-I:I,T=Math.min(Math.max(N3,b),n.offsetWidth-N3),L=x?"above":"below";n.dataset.placement=L,n.style.setProperty("--external-link-disabled-popover-tail-offset",`${T}px`),n.style.transform=`translate3d(${d}px, ${y}px, 0)`}function w3(e){const t=su(e);if(t)try{typeof t.showPopover=="function"?E3(t.id)||t.showPopover():t.classList.add(op),j3(e),t.dispatchEvent(new window.Event(nu))}catch{}}function rp(e){const t=su(e);if(t)try{typeof t.hidePopover=="function"?t.hidePopover():t.classList.remove(op),t.dispatchEvent(new window.Event(nu))}catch{}}function ou(e={}){const{delay:t=200}=e,n=u.useRef(new Map),s=u.useRef(new Map),r=u.useCallback(d=>{const h=s.current.get(d);if(h)return h;const m={focused:!1,hovered:!1};return s.current.set(d,m),m},[]),i=u.useCallback(d=>{const h=r(d);h.hovered=!0;const m=n.current.get(d);m&&clearTimeout(m);const f=setTimeout(()=>{w3(d),n.current.delete(d)},t);n.current.set(d,f)},[t,r]),a=u.useCallback(d=>{const h=r(d);h.hovered=!1;const m=n.current.get(d);m&&clearTimeout(m);const f=setTimeout(()=>{!h.focused&&!h.hovered&&rp(d),n.current.delete(d)},t);n.current.set(d,f)},[t,r]),c=u.useCallback(d=>{const h=r(d);h.focused=!0;const m=n.current.get(d);m&&(clearTimeout(m),n.current.delete(d)),w3(d)},[r]),l=u.useCallback(d=>{const h=r(d);h.focused=!1;const m=n.current.get(d);m&&(clearTimeout(m),n.current.delete(d)),h.hovered||rp(d)},[r]);return u.useEffect(()=>{const d=n.current,h=s.current;return()=>{d.forEach(m=>clearTimeout(m)),d.clear(),h.clear()}},[]),{handleMouseEnter:i,handleMouseLeave:a,handleFocus:c,handleBlur:l}}function JG(e){return t=>{const{handleMouseEnter:n,handleMouseLeave:s,handleFocus:r,handleBlur:i}=ou(),a=u.useId();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e,{...t,ariaDescribedBy:t.externalLinksDisabled?ys(a):void 0,attachmentId:a,onLinkBlur:i,onLinkFocus:r,onLinkMouseEnter:n,onLinkMouseLeave:s}),t.externalLinksDisabled&&(0,o.jsx)(ru,{anchorId:a})]})}}const ru=({anchorId:e})=>{const t=ys(e);return u.useEffect(()=>{const n=s=>{s.key==="Escape"&&rp(e)};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e]),u.useEffect(()=>{const n=document.getElementById(e),s=su(e);if(!n||!s)return;const r=bc(n);let i=null,a=null;const c=()=>{i==null&&(i=window.requestAnimationFrame(()=>{i=null,j3(e)}))},l=()=>{a?.abort(),a=null,i!=null&&(window.cancelAnimationFrame(i),i=null)},d=()=>{if(l(),s.classList.contains(op)||E3(s.id)){a=new window.AbortController;const{signal:h}=a;for(const m of r)m.addEventListener("scroll",c,{passive:!0,signal:h});window.addEventListener("resize",c,{signal:h}),window.visualViewport?.addEventListener("resize",c,{signal:h}),window.visualViewport?.addEventListener("scroll",c,{passive:!0,signal:h})}};return s.addEventListener(nu,d),()=>{s.removeEventListener(nu,d),l()}},[e]),(0,o.jsxs)("div",{className:sp(),id:t,popover:"manual",role:"tooltip",children:[(0,o.jsx)("div",{className:sp("header"),children:"Subscribe to unlock full access"}),(0,o.jsx)("div",{className:sp("content"),children:"To protect learners from phishing, scams, or malicious redirects, external links are disabled when sharing with Quick Share during your trial."})]})},eW=({allowTabNavigation:e=!0,className:t="","data-testid":n,id:s,ref:r,tagName:i="div",transformValue:a,value:c})=>{const l=He(),d=l&&"externalLinksDisabled"in l?l.externalLinksDisabled:!1,h=Gt(),m=(0,u.useRef)(null),f=u.useId().replaceAll(":",""),p=Pe(c),[v,g]=(0,u.useState)([]),{handleMouseEnter:x,handleMouseLeave:y,handleFocus:S,handleBlur:I}=ou(),{currentLocale:b}=ot(),T=Dn(),L=(0,u.useMemo)(()=>{const E=p??"",k=a?a(E):E,N=X0(k),P=typeof N=="string"?N:"",A=Array.prototype.concat(lW,dW,oW,nW,sW(b,T),d?rW(f):[],e?aW:iW,cW(h?.a11yNoticeLinkNewTab));return tW(A,P)},[e,b,T,f,d,h,a,p]);return(0,u.useLayoutEffect)(()=>{if(!d||!m.current){g([]);return}const E=[];m.current.querySelectorAll("[data-tooltip-target]").forEach((N,P)=>{const A=N.nextElementSibling;if(A?.hasAttribute("data-external")){const R=A.getAttribute("data-external-text")||"",j=A.getAttribute("data-external-id")||`link-${P}`;E.push({placeholder:N,text:R,id:j})}}),g(E)},[L,d]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{"aria-hidden":e?void 0:!0,className:`${t} brand--linkColor`,"data-l10n-id":Mt(c),"data-testid":n,id:s,ref:E=>{m.current=E,typeof r=="function"?r(E):r&&(r.current=E)},children:(0,u.createElement)(i,{className:"fr-view rise-tiptap",dangerouslySetInnerHTML:(0,u.useMemo)(()=>({__html:L}),[L])})}),v.map(({placeholder:E,text:k,id:N})=>(0,o.jsxs)(u.Fragment,{children:[(0,bs.createPortal)((0,o.jsx)("span",{"aria-describedby":ys(N),className:"external-link-disabled-popover__anchor",id:N,onBlur:()=>I(N),onFocus:()=>S(N),onMouseEnter:()=>x(N),onMouseLeave:()=>y(N),role:"button",tabIndex:0,children:k}),E),(0,o.jsx)(ru,{anchorId:N})]},N))]})};function tW(e,t){const n=document.createElement("div");n.innerHTML=t;for(const s of e)s(n);return n.innerHTML}const R3=e=>e.getAttribute("data-link-type")==="lesson"?!0:(e.getAttribute("href")??"").startsWith("#/lessons/");function nW(e){for(const t of e.querySelectorAll("a")){R3(t)?t.removeAttribute("target"):t.setAttribute("target","_blank");const s=new Set((t.getAttribute("rel")??"").split(/\s+/));s.delete("opener"),s.add("noopener"),s.add("noreferrer"),s.add("nofollow"),t.setAttribute("rel",Array.from(s).join(" "))}}function sW(e,t){return n=>{if(!(!e||e===t)){for(const s of n.querySelectorAll("a"))if(R3(s)){const r=s.getAttribute("href");if(r){const i=r.includes("?")?"&":"?";s.setAttribute("href",`${r}${i}locale=${encodeURIComponent(e)}`)}}}}}function oW(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 rW(e){return t=>{let n=0;const s=[];for(const r of t.querySelectorAll("a"))if(Zn(r.href)){const i=r.textContent||"",a=`external-link-anchor-${e}-${n++}`;r.removeAttribute("href"),r.removeAttribute("rel"),r.removeAttribute("target"),r.setAttribute("data-external",""),r.setAttribute("data-external-text",i),r.setAttribute("data-external-id",a),r.setAttribute("role","button"),r.style.display="none";const c=document.createElement("span");c.setAttribute("data-tooltip-target",""),r.parentNode?.insertBefore(c,r),s.push({placeholder:c,text:i,id:a})}return s}}function iW(e){for(const t of e.querySelectorAll("a"))t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1")}function aW(e){for(const t of e.querySelectorAll("a"))t.removeAttribute("aria-hidden"),t.hasAttribute("data-external")?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}function cW(e="(opens in a new tab)"){return t=>{for(const n of t.querySelectorAll('a[target="_blank"]')){const s=document.createElement("span");s.className="visually-hidden-always",s.textContent=e,n.appendChild(s)}}}function lW(e){return ep(e).value}function dW(e){for(const t of e.querySelectorAll("rise-math")){const{shortDescription:n,longDescription:s}=t,r=t.querySelector('[slot="short-description"]'),i=t.querySelector('[slot="long-description"]');n==null&&r!=null&&(t.shortDescription=r.textContent),s==null&&i!=null&&(t.longDescription=i.textContent)}return e}const je=eW,ip=e=>e==="<p><br></p>"?"":e,uW=()=>Zt(1200),A3=()=>Zt(480),hW=V("cover"),mW="MMMM D, YYYY";function P3({format:e=mW}){const{publishedAt:t}=ie(),n=xe(),s=hW("details-content-published-at");if(!t)return null;const r=Cs()(t);return r.isValid()?(0,o.jsxs)("div",{className:s,children:[n?.coverPublished||"Published"," ",r.format(e)]}):null}const ap={field:"title",kind:"artifactField"},cp={field:"description",kind:"artifactField"};function M3(e){return{field:"title",kind:"lessonField",lesson:String(e)}}function fW(e){return{field:"description",kind:"lessonField",lesson:String(e)}}function pW(e){return{block:String(e),kind:"block"}}function gW(e){return{kind:"slide",slide:String(e)}}function vW(e,t){return{kind:"question",lesson:String(e),question:String(t)}}function O3(e,t){const n={kind:e.kind};switch(t!=null&&(n.artifact=t.artifact),e.kind){case"artifactField":n.field=e.field;break;case"lessonField":n.lesson=e.lesson,n.field=e.field;break;case"block":n.block=e.block;break;case"slide":n.lesson=e.slide;break;case"question":n.lesson=e.lesson,n.question=e.question;break}return t?.locale!=null&&(n.locale=t.locale),n}function NCe(e){return O3(e,void 0)}function CW(e){return O3(e,e)}var xW;const bW=V("comment-preview-anchor"),yW=V("comment-preview-target");function B3(e,t){return t==="slide"?e==="slide":e!=="slide"}const lp=(0,u.createContext)(null);function jCe({children:e,...t}){return xW(lp,{value:t,children:e})}function Yn({anchor:e,children:t,label:n,rail:s="course"}){const r=(0,u.useContext)(lp);if(r==null||B3(e.kind,r.targetScope)===!1)return t??null;const i=e.kind==="artifactField"||e.kind==="lessonField",a=yW({"artifact-field":e.kind==="artifactField","lesson-field":e.kind==="lessonField",block:e.kind==="block",question:e.kind==="question",slide:e.kind==="slide",title:i&&e.field==="title",description:i&&e.field==="description","quiz-rail":s==="quiz"}),c=(0,o.jsx)("span",{className:a,children:(0,o.jsx)(r.CommentBubble,{label:n,tags:CW(SW(e,r))})});return t==null?c:(0,o.jsxs)("div",{className:bW(),children:[t,c]})}function D3(e){const t=(0,u.useContext)(lp);return t!=null&&B3(e,t.targetScope)}function SW(e,{courseId:t,locale:n}){switch(e.kind){case"artifactField":return{...e,artifact:t,locale:n};case"lessonField":return{...e,artifact:t,locale:n};case"block":return{...e,artifact:t,locale:n};case"question":return{...e,artifact:t,locale:n};case"slide":return{...e,artifact:t,locale:n}}}const F3=V("cover");function IW(){const e=ie(),t=uW(),n=Pe(e?.description);if(!n)return null;const s=Mi("description"),r=(0,on.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":s};return(0,o.jsx)("div",{...r,children:(0,o.jsxs)("section",{className:F3("details-content-section"),children:[t?(0,o.jsx)(h3,{}):(0,o.jsx)(P3,{}),(0,o.jsx)(Yn,{anchor:cp,label:"Comments on course description",children:(0,o.jsx)(je,{className:F3("details-content-description"),value:ip(n)},"text")})]})})}const TW=()=>Zt(1200),iu=()=>Zt(480),_3=V("cover");function LW(){const e=ie(),t=TW(),n=Pe(e?.description);if(!n)return null;const s=Mi("description"),r=(0,on.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":s};return(0,o.jsx)("div",{...r,children:(0,o.jsxs)("section",{className:_3("details-content-section"),children:[t&&(0,o.jsx)(h3,{}),(0,o.jsx)(Yn,{anchor:cp,label:"Comments on course description",children:(0,o.jsx)(je,{className:_3("details-content-description"),value:ip(n)},"text")})]})})}const EW=V("cover"),kW=()=>{const e=ie(),{navigation:t}=e,n=Pe(e.description),s=t?"description":"description-no-outline";if(!n)return null;const r=Mi("description"),i=(0,on.uW)(e.description)?{"data-l10n-id":e.description.l10nId}:{"data-change-path":r};return(0,o.jsx)(Yn,{anchor:cp,label:"Comments on course description",children:(0,o.jsx)("div",{...i,children:(0,o.jsx)(Jd,{type:s,children:(0,o.jsx)(je,{className:EW("details-content-description"),value:String(ip(n))},"text")})})})},NW={[ne.RISE_CLASSIC]:IW,[ne.HORIZON]:kW,[ne.APEX]:LW};function H3(){const e=Et(),t=NW[e];return(0,o.jsx)(t,{})}const V3=V("cover"),dp=({className:e=V3("details-logo"),imageClassName:t=V3("details-logo-image"),resolveImageWidth:n})=>{const s=ie()??{},r=Pe(s.media)?.image??{},{height:i,key:a,width:c,scalar:l=Na.SMALL.value}=r,d=n?.(r.scalar),h={width:d??Number(c)*l,height:d==null?Number(i)*l:void 0};if(!a)return null;const m=Tt(r);return(0,o.jsx)("div",{className:e.toString(),"data-testid":"cover-details-logo",children:(0,o.jsx)("img",{alt:"",className:t.toString(),"data-testid":"cover-details-logo-image",height:h.height,src:m,width:h.width})})};function jW({icon:e,...t}){switch(e){case $n.ARTICLE:return(0,o.jsx)(I$,{...t});case $n.INTERACTION:return(0,o.jsx)(KU,{...t});case $n.QUIZ:return(0,o.jsx)(zU,{...t});case $n.VIDEO:return(0,o.jsx)(nG,{...t});default:return(0,o.jsx)("i",{className:"icon icon-Master-02"})}}var $r=C(90313);function wW(e){const{to:t,children:n}=e,s=(0,Ae.zy)(),r=(0,u.useMemo)(()=>mh(t,s),[s,t]);return(0,o.jsx)(Ae.k2,{...e,to:r,children:n})}var mt=C(30433);function RW(e){return e instanceof CustomEvent}function z3(e){document.dispatchEvent(new CustomEvent(Ty,{detail:{lessonId:e}}))}function AW(e){(0,mt.A)(Ty,t=>{RW(t)&&e(t)},document)}const $3=(0,u.createContext)(!1);function au({children:e,inert:t}){const n=up();return(0,o.jsx)($3.Provider,{value:n||t,children:e})}function up(){return(0,u.useContext)($3)}function U3(e,t){(0,u.useLayoutEffect)(()=>{let n=e.current;const s=bc(n);for(const r of s)r?.addEventListener("scroll",t);return()=>{for(const r of s)r?.removeEventListener("scroll",t)}},[t,e])}function PW(e){return e?.sessionPreferences}function cu(){return ue(PW)}const MW=({children:e,className:t="lesson-link-item-tooltip",dark:n,ref:s,visible:r})=>{const i=(0,u.useMemo)(()=>V(t),[t]),a=(0,o.jsx)("div",{"aria-hidden":"true",ref:s,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,o.jsx)("div",{style:{pointerEvents:"all"},children:(0,o.jsx)("div",{className:i({visible:r}),children:(0,o.jsx)("div",{className:i("inner",{dark:n,light:!n}),children:e})})})});return(0,bs.createPortal)(a,so())};function OW({labels:e,restriction:t,restrictionData:n}){if(t?.type===Nr.QUIZ)return`${e?.quizRequirePassingScore}: "${n}"`;if(t?.type===Nr.ORDER)return e?.lessonRestricted;if(t?.type===Nr.KNOWLEDGE_CHECK)return e?.knowledgeCheckCorrectAnswerRequiredNav}function G3(e){const{children:t,className:n,dark:s,restriction:r,tooltipClassName:i,style:a}=e,{prefersKeyboardNavigation:c}=cu()??{},l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=(0,u.useRef)(null),f=xe(),p=up(),[v,g]=(0,u.useState)(!1),x=(0,u.useCallback)(()=>g(!0),[]),y=(0,u.useCallback)(()=>g(!1),[]),S=(0,u.useCallback)(()=>{h.current!=null&&(clearTimeout(h.current),h.current=null),m.current!=null&&(clearTimeout(m.current),m.current=null)},[]),I=(0,u.useCallback)(()=>{h.current=setTimeout(x,0)},[x]),b=(0,u.useCallback)(()=>{S(),c===!0&&y()},[S,y,c]),T=(0,u.useCallback)(A=>{A instanceof KeyboardEvent&&Nn(A)&&v&&(A.stopPropagation(),y())},[y,v]),L=(0,u.useCallback)(()=>{document.activeElement===l.current&&(m.current!=null&&(clearTimeout(m.current),m.current=null),x())},[x]),E=(0,u.useCallback)(()=>{m.current=setTimeout(y,150)},[y]),k=(0,u.useCallback)(()=>{if(v&&l.current&&d.current){const A=l.current.getBoundingClientRect(),R=d.current.offsetParent?.getBoundingClientRect()??A,{height:j,width:M}=A,w=A.left-R.left,O=A.top-R.top;Object.assign(d.current.style,{transform:`translate(${w}px, ${O}px)`,width:`${M}px`,height:`${j}px`})}},[v]);(0,u.useEffect)(()=>{p&&g(!1)},[p]),(0,u.useEffect)(()=>S,[S]),(0,u.useLayoutEffect)(()=>k(),[k]),(0,mt.A)("resize",k,window),(0,mt.A)("keydown",T,document),U3(l,y);const N=Ct(r!=null&&r.type===Nr.QUIZ?r.data:void 0),P=OW({labels:f,restriction:r,restrictionData:N});return(0,o.jsxs)("div",{"aria-disabled":!0,className:n,onBlur:b,onFocus:I,onMouseEnter:L,onMouseLeave:E,ref:l,role:"link",style:a,tabIndex:p?-1:0,children:[t,(0,o.jsx)("div",{className:"visually-hidden-always",children:f?.a11yRestrictedNav}),(0,o.jsx)("div",{className:"visually-hidden-always",children:P}),(0,o.jsx)(MW,{className:i,dark:s,ref:d,visible:v,children:P})]})}function BW(e){const{b:t,children:n,"data-direction":s,dark:r,isCurrentLesson:i,isTooltipEnabled:a,lessonId:c,onClick:l=()=>{},onBlur:d,onFocus:h,onHideProgressTooltip:m,onNavigate:f=()=>{},onShowProgressTooltip:p,restriction:v,showProgressDelay:g,style:x,tooltipClassName:y}=e,S=up(),T=(ie()?.theme?.progressIndicatorStyle??ct.THEME_DEFAULT)===ct.THEME_DEFAULT,L=(0,u.useRef)(null),E=(0,u.useCallback)(D=>{l(D),i?(D.preventDefault(),z3(c)):f(c)},[c,i,l,f]),[k,N]=(0,u.useState)(!1),P=(0,u.useCallback)(()=>{L.current!=null&&(clearTimeout(L.current),L.current=null)},[]),A=(0,u.useCallback)(D=>{!k&&a&&(g!=null?L.current=setTimeout(()=>{p?.()},g):p?.()),h?.(D)},[k,h,g,p,a]),R=(0,u.useCallback)(D=>{P(),a&&m?.(),d?.(D)},[P,a,d,m]),j=(0,u.useCallback)(D=>{a&&Nn(D)&&m?.()},[m,a]),M=(0,u.useCallback)(()=>{a===!0&&N(!0)},[a]),w=(0,u.useCallback)(()=>{a===!0&&N(!1)},[a]);(0,u.useEffect)(()=>{if(!k)return;const D=()=>{N(!1)};return document.addEventListener("mouseup",D),()=>{document.removeEventListener("mouseup",D)}},[k]),(0,u.useEffect)(()=>P,[P]);const O=v?.type!=null,B=t("link",{active:i,restricted:O,"theme-default":T}).toString();return O?(0,o.jsx)(G3,{className:B,dark:r,restriction:v,style:x,tooltipClassName:y,children:n}):(0,o.jsx)(wW,{"aria-current":i?"page":void 0,className:B.toString(),"data-direction":s,"data-nav-item":"",onBlur:R,onClick:E,onFocus:A,onKeyDown:j,onMouseDown:M,onMouseUp:w,style:x,tabIndex:S?-1:void 0,to:Ln(c),children:n})}function yc(e){const{className:t="lesson-link-item",isCurrentLesson:n,last:s,lessonId:r,style:i}=e,a=(0,u.useMemo)(()=>V(t),[t]),c=Ei(String(r)),l=c?.type!=null,{isComplete:d=!1}=Vo(r)??{},h=a({active:n,complete:d,last:s,restricted:l});return(0,o.jsx)("div",{className:h,children:(0,o.jsx)(BW,{...e,b:a,isCurrentLesson:n,restriction:c,style:i})})}function DW({className:e,cx:t,cy:n,diameter:s,onTransitionEnd:r,r:i,strokeLinecap:a,strokeWidth:c,value:l=0}){const d=(0,u.useRef)(null),h=`mask-${(0,u.useId)()}`,m=(100-l)/100*(2*i);return(0,mt.A)("transitionend",r,d.current),(0,o.jsxs)("svg",{height:s,viewBox:`0 0 ${s} ${s}`,width:s,children:[(0,o.jsx)("defs",{children:(0,o.jsx)("mask",{id:h,children:(0,o.jsx)("rect",{fill:"white",height:2.3*i,width:2.3*i,x:"0",y:l===0?100:m})})}),(0,o.jsx)("circle",{className:e,cx:t,cy:n,fill:"none",mask:`url(#${h})`,r:i,ref:d,strokeLinecap:a,strokeWidth:c})]})}const hp=DW;function FW({className:e,cx:t,cy:n,diameter:s,onTransitionEnd:r,r:i,strokeLinecap:a,strokeWidth:c,transform:l,value:d=0}){const h=(0,u.useRef)(null),m=Math.PI*(Number(s)-Number(c)),f=m*(100-d)/100;return(0,mt.A)("transitionend",r,h.current),(0,o.jsx)("circle",{className:e,cx:t,cy:n,fill:"transparent",r:i,ref:h,strokeDasharray:m,strokeDashoffset:f,strokeLinecap:a,strokeWidth:c,transform:l})}const W3=FW;var mp=C(49860);const{COMPACT:_W,COVER:HW,OVERLAY:VW,SIDEBAR:zW}=Eo,Sc=V("progress-circle");function $W({"aria-hidden":e,"aria-label":t,isCurrent:n,isFailed:s,isPassed:r,scope:i,value:a}){const[c,l]=mp.useState(a===100),d=(0,Ve.A)(a),{theme:h}=ie()??{},m=h?.progressIndicatorStyle??ct.THEME_DEFAULT,f=i===HW,p=i===VW,v=m===ct.THEME_DEFAULT,g=m===ct.CIRCULAR_FILL,x=m===ct.INCOMPLETE_COMPLETE,y=Sc({compact:i===_W,cover:f,current:n,sidebar:i===zW,overlay:p}),S=Sc("track",{"circular-fill":!p&&g,"incomplete-complete":f&&x}),I=Sc("runner",{"circular-fill":g,done:c,failed:s,passed:r,unstarted:a===0}),b=Sc("pass",{done:c,visible:r}),T=Sc("fail",{done:c,visible:s}),L=mp.useMemo(()=>g||a===100?a:0,[g,a]);return mp.useEffect(()=>{if(a!==100&&d===100)l(!1);else if(a===100&&!c&&!x){const E=setTimeout(()=>l(!0),300);return clearTimeout.bind(null,E)}else a===100&&!c&&x&&l(!0)},[c,x,d,a]),(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:y,fill:"none",focusable:"false",role:"img",viewBox:"0 0 16 16",xmlns:"https://www.w3.org/2000/svg",children:[(0,o.jsx)("circle",{className:S,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),v?(0,o.jsx)(W3,{className:I,cx:8,cy:8,diameter:16,r:7,strokeWidth:2,transform:"rotate(-89.9 8 8)",value:a}):(0,o.jsx)(hp,{className:I,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:L}),(0,o.jsx)("path",{className:b,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,o.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 fp=C(49860);const{COMPACT:UW,COVER:GW,OVERLAY:WW,SIDEBAR:KW}=Eo,$i=V("progress-circle");function QW({"aria-hidden":e,"aria-label":t,isFailed:n,isPassed:s,scope:r,value:i}){const[a,c]=fp.useState(i===100),l=(0,Ve.A)(i),{theme:d}=ie()??{},h=d?.progressIndicatorStyle??ct.THEME_DEFAULT,m=r===GW,f=r===WW,p=h===ct.THEME_DEFAULT,v=h===ct.CIRCULAR_FILL,g=h===ct.INCOMPLETE_COMPLETE,x=$i("default",{failed:n,passed:s}),y=$i({compact:r===UW,cover:m,overlay:f,sidebar:r===KW}),S=$i("track",{"circular-fill":!f&&v,"incomplete-complete":m&&g}),I=$i("fill",{"circular-fill":v,done:a,failed:n,passed:s,unstarted:i===0}),b=$i("pass",{done:a,visible:s}),T=$i("fail",{done:a,visible:n}),L=fp.useMemo(()=>v||i===100?i:0,[v,i]);return fp.useEffect(()=>{if(i!==100&&l===100)c(!1);else if(i===100&&!a&&!g){const E=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,E)}else i===100&&!a&&g&&c(!0)},[a,g,l,i]),(0,o.jsx)(o.Fragment,{children:p?(0,o.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,o.jsx)("circle",{cx:"3.5",cy:"3.5",r:"2.5"})}):(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:y,fill:"none",focusable:"false",role:"img",viewBox:"0 0 7 7",xmlns:"https://www.w3.org/2000/svg",children:[(0,o.jsx)("circle",{className:S,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),(0,o.jsx)(hp,{className:I,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:L}),(0,o.jsx)("path",{className:b,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,o.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 lu=C(49860);const{COMPACT:ZW,COVER:YW,OVERLAY:qW,SIDEBAR:XW}=Eo,Ic=V("progress-circle");function JW({"aria-hidden":e,"aria-label":t,isFailed:n,isPassed:s,scope:r,value:i}){const[a,c]=lu.useState(i===100),l=(0,Ve.A)(i),{theme:d}=ie()??{},h=d?.progressIndicatorStyle??ct.THEME_DEFAULT,m=r===YW,f=r===qW,p=h===ct.THEME_DEFAULT,v=h===ct.CIRCULAR_FILL,g=h===ct.INCOMPLETE_COMPLETE,x=Ic({compact:r===ZW,cover:m,sidebar:r===XW,overlay:f}),y=Ic("track",{"circular-fill":!f&&v,"incomplete-complete":m&&g}),S=Ic("runner",{"circular-fill":v,done:a,failed:n,passed:s,unstarted:i===0}),I=Ic("pass",{done:a,visible:s}),b=Ic("fail",{done:a,visible:n}),T=lu.useMemo(()=>v||i===100?i:0,[v,i]);lu.useEffect(()=>{if(i!==100&&l===100)c(!1);else if(i===100&&!a&&!g){const E=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,E)}else i===100&&!a&&g&&c(!0)},[a,g,l,i]);const L=lu.useCallback(()=>{i===100&&c(!0)},[i]);return(0,o.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,o.jsx)("circle",{className:y,cx:"7.5",cy:"7.5",fill:"transparent",r:"6.5",strokeWidth:"2",transform:"rotate(-89.9 7.5 7.5)"}),p?(0,o.jsx)(W3,{className:S,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:L,r:6.5,strokeWidth:2,transform:"rotate(-89.9 7.5 7.5)",value:i}):(0,o.jsx)(hp,{className:S,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:L,r:6.5,strokeLinecap:"round",strokeWidth:2,value:T}),(0,o.jsx)("path",{className:I,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,o.jsx)("path",{className:b,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 eK={[ne.RISE_CLASSIC]:$W,[ne.HORIZON]:QW,[ne.APEX]:JW};function K3(e){const t=Et(),n=eK[t];return(0,o.jsx)(n,{...e})}var tK=C(79729),du=C.n(tK);const Q3=e=>t=>(e(t),t.preventDefault()),Qo=e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},Ss=e=>t=>{e(t),t.preventDefault(),Qo(t)},uu=V("lesson-progress"),{COMPACT:pp,COVER:Tc,OVERLAY:gp,SIDEBAR:Lc}=Eo;function nK({canComplete:e,color:t,hasRestriction:n,isComplete:s,isCurrentLesson:r,isDark:i,isEnabled:a,isFailed:c,isLegacy:l=void 0,isPassed:d,isTooltipVisible:h,navigationStyle:m,onHideTooltip:f,onMarkComplete:p=dn,onMarkReset:v=dn,onShowTooltip:g,percentComplete:x,progressGraphic:y,scope:S,labels:I}){const b=(0,u.useRef)(),T=(0,u.useRef)(),L=(0,u.useRef)(),E=(0,u.useRef)(),{theme:{progressIndicatorStyle:k=ct.THEME_DEFAULT}}=He(),N=k===ct.THEME_DEFAULT,P=uu({compact:S===pp,cover:S===Tc&&!l,"legacy-cover":S===Tc&&l,inactive:n,overlay:S===gp,sidebar:S===Lc&&!l,"legacy-sidebar":S===Lc&&l,"theme-default":N}),A=uu("graphic",{compact:S===pp,cover:S===Tc&&!l,"legacy-cover":S===Tc&&l,overlay:S===gp,sidebar:S===Lc&&!l,"legacy-sidebar":S===Lc&&l}),R=uu("tooltip",{legacy:l}).toString(),j=(0,u.useCallback)(()=>{s?v?.():p?.()},[s,p,v]),M=(0,u.useCallback)(_=>{du()(f)&&Nn(_)&&h&&f()},[f,h]),w=(0,u.useCallback)(()=>{clearTimeout(L.current),!n&&du()(g)&&(T.current=setTimeout(g,600))},[n,g]),O=(0,u.useCallback)(()=>{clearTimeout(T.current),du()(f)&&(L.current=setTimeout(f,150))},[f]),B=(0,u.useCallback)(()=>{setTimeout(()=>{if(h){const _=b.current.getBoundingClientRect(),F=E.current.offsetParent.getBoundingClientRect(),{height:$,width:z}=_,K=_.left-F.left,J=_.top-F.top;Object.assign(E.current.style,{transform:`translate(${K}px, ${J}px)`,width:`${z}px`,height:`${$}px`})}},0)},[h]);if((0,u.useLayoutEffect)(()=>B(),[B]),(0,mt.A)("resize",B,window),(0,mt.A)("keydown",M,document),U3(b,O),e){const F=sK({labels:I,percentComplete:x,canReset:!0}),$=!a||!1,z=uu("action",{disabled:$});return(0,o.jsx)("span",{className:P,"data-testid":"lesson-progress",children:(0,o.jsx)("button",{"aria-label":F,className:z,disabled:$,onBlur:f,onClick:j,onFocus:g,type:"button",children:(0,o.jsxs)("span",{className:A,onMouseEnter:w,onMouseLeave:O,ref:b,children:[(0,o.jsx)(y,{"aria-hidden":"true",color:t,isCurrent:r,isDark:i,isFailed:c,isPassed:d,navigationStyle:m,scope:S,value:x}),a&&!n&&(0,o.jsx)(Z3,{className:R,dark:i,ref:E,scope:S,visible:h,children:F})]})})})}const D=oK({labels:I,isFailed:c,percentComplete:x});return(0,o.jsx)("span",{className:P,"data-testid":"lesson-progress",children:(0,o.jsxs)("span",{className:A,onMouseEnter:w,onMouseLeave:O,ref:b,children:[(0,o.jsx)(y,{"aria-label":D,color:t,isCurrent:r,isDark:i,isFailed:c,isPassed:d,navigationStyle:m,scope:S,value:x}),a&&!n&&(0,o.jsx)(Z3,{className:R,dark:i,ref:E,scope:S,visible:h,children:D})]})})}const Z3=(0,u.forwardRef)((e,t)=>{const{children:n,className:s,dark:r,scope:i,visible:a}=e,c=(0,u.useMemo)(()=>V(s),[s]),l=c({compact:i===pp,cover:i===Tc,overlay:i===gp,sidebar:i===Lc,visible:a}),d=c("inner",{dark:r,light:!r}),h=(0,o.jsx)("div",{"aria-hidden":"true",onClick:Qo,ref:t,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,o.jsx)("div",{style:{pointerEvents:"all"},children:(0,o.jsx)("div",{className:l,children:(0,o.jsx)("div",{className:d,children:n})})})});return(0,bs.createPortal)(h,so())});function sK({labels:e,canReset:t,percentComplete:n}){const s=n===100,{progressPieCompleted:r,progressPieUnstarted:i,progressPieClickToComplete:a,progressPieClickToReset:c}=e;return s&&t?`${r}. ${c}`:n===100&&!t?r:n===0?`${i}. ${a}`:`${n}% ${r}. ${a}`}function oK({labels:e,isFailed:t,percentComplete:n}){const s=n===100,{progressPieCompleted:r,progressPieUnstarted:i,progressPieQuizFailed:a}=e;return t?a:s?r:n===0?i:`${n}% ${r}`}const Y3=u.memo(nK);function hu({canComplete:e,id:t,isDark:n,isEnabled:s,isTooltipVisible:r,onHideTooltip:i,onShowTooltip:a,scope:c}){const l=nt(),{color:d,navigationStyle:h}=ie(),m=Vo(t),f=to(),p=y2(String(t)),v=S2(String(t)),g=Ei(String(t)),x=xe(),y=g?.type!=null,S=m?.isComplete,I=String(t)===f,b=m?.percentComplete??0,T=(0,u.useCallback)(()=>{l(jr(t))},[l,t]),L=(0,u.useCallback)(()=>{l(z7(t))},[l,t]);return(0,o.jsx)(Y3,{canComplete:e,color:d,hasRestriction:y,isComplete:S,isCurrentLesson:I,isDark:n,isEnabled:s,isFailed:p,isPassed:v,isTooltipVisible:r,labels:x,navigationStyle:h,onHideTooltip:i,onMarkComplete:T,onMarkReset:L,onShowTooltip:a,percentComplete:b,progressGraphic:K3,scope:c})}function rK({color:e,hasRestriction:t,isComplete:n,isCurrentLesson:s,isFailed:r,isPassed:i,isTooltipVisible:a,lessonTitle:c,navigationStyle:l,onHideTooltip:d,onShowTooltip:h,percentComplete:m,progressGraphic:f,scope:p,labels:v}){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"overview-list-item__progress",children:v&&(0,o.jsx)(Y3,{canComplete:!1,color:e,hasRestriction:t,isComplete:n,isCurrentLesson:s,isDark:!1,isEnabled:!0,isFailed:r,isPassed:i,isTooltipVisible:a,labels:v,navigationStyle:l,onHideTooltip:d,onShowTooltip:h,percentComplete:m,progressGraphic:f,scope:p})}),(0,o.jsx)("span",{className:"overview-list-item__title",children:c})]})}const iK=matchMedia("(prefers-reduced-motion: reduce)");function vn(){return iK.matches}function q3(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("selector(html:active-view-transition-type(a))")}function X3(){return!(typeof document>"u"||!("startViewTransition"in document)||no.isFirefox&&!q3())}function aK(e,t){if(!X3()||vn()){const n=e();return Promise.resolve(n)}return new Promise(n=>{try{const s=async()=>{await e()};(t!=null&&q3()?document.startViewTransition({update:s,types:[t]}):document.startViewTransition(s)).finished.then(()=>n()).catch(()=>n())}catch{const s=e();Promise.resolve(s).then(()=>n()).catch(()=>n())}})}const cK=3e3;function lK(){let e=0,t=0,n=null;const s=i=>{n==null||n.generation!==i||(clearTimeout(n.timeoutId),document.documentElement.classList.remove(`transition-${n.transitionType}`),n=null,t=0)};function r(i,a="default"){if(!X3()||vn())return n!=null&&s(n.generation),i(),Promise.resolve();n!=null&&s(n.generation);const l=++e;t=l;const d=setTimeout(()=>{s(l)},cK);return n={generation:l,transitionType:a,timeoutId:d},aK(()=>{t===l&&document.documentElement.classList.add(`transition-${a}`),(0,bs.flushSync)(()=>{i()})},a).finally(()=>{t===l&&s(l)})}return{navigate:r,reset(){n!=null&&s(n.generation),e+=1,t=0},get isTransitioning(){return n!=null}}}const ro=lK().navigate,dK=V("overview-list-item");function uK({className:e,id:t,last:n}){const s=ln(),r=Et(),i=to(),{color:a,navigationStyle:c}=ie(),{icon:l,title:d}=$t(t)??{},h=Ct(d),m=Vo(t),f=y2(t),p=S2(t),v=Ei(t),g=xe(),x=(0,on.uW)(d)?{"data-l10n-id":d.l10nId}:{"data-change-path":By(t,"title")},y=m?.isComplete,S=m?.percentComplete??0,I=v?.type!=null,[b,T]=(0,u.useState)(!1),L=r===ne.HORIZON?rK:hK,E=(0,u.useCallback)(()=>T(!0),[]),k=(0,u.useCallback)(()=>T(!1),[]);(0,u.useEffect)(()=>()=>{$r.Ay.Events.scrollEvent.remove("end")},[]);const N=n?"overview-list__li overview-list__li--last":"overview-list__li",P=X()(e,"overview-list-item"),A=(0,u.useCallback)(R=>{const{currentTarget:{hash:j}}=R;R.preventDefault(),$r.Ay.Events.scrollEvent.remove("end"),$r.Ay.Events.scrollEvent.register("end",()=>{ro(()=>{s(j.slice(1))},"cover-to-lesson"),$r.Ay.Events.scrollEvent.remove("end")}),$r.Ay.animateScroll.scrollTo(0,{containerId:"cover"})},[s]);return(0,o.jsx)("li",{...x,className:N,"data-testid":`overview-list-item-${t}`,role:"listitem",children:(0,o.jsx)(yc,{className:P,isTooltipEnabled:!0,lessonId:t,onBlur:k,onClick:A,onHideProgressTooltip:k,onShowProgressTooltip:E,showProgressDelay:25,tooltipClassName:"overview-list-item-tooltip",children:(0,o.jsx)(L,{color:a,hasRestriction:I,isComplete:y,isCurrentLesson:t===i,isFailed:f,isPassed:p,isTooltipVisible:b,labels:g,lessonIcon:l,lessonId:t,lessonTitle:h,navigationStyle:c,onHideTooltip:k,onShowTooltip:E,percentComplete:S,progressGraphic:K3,scope:Eo.COVER})})})}function hK({isTooltipVisible:e,lessonIcon:t,lessonId:n,lessonTitle:s,onHideTooltip:r,onShowTooltip:i,scope:a}){const c=dK("progress-circle");return(0,o.jsxs)("div",{className:c,children:[(0,o.jsx)("span",{"aria-hidden":"true",className:"overview-list-item__icon",children:(0,o.jsx)(jW,{icon:t??void 0})}),(0,o.jsx)("span",{className:"overview-list-item__title","data-testid":`overview-list-item-title-${n}`,children:s}),(0,o.jsx)(hu,{canComplete:!1,id:n,isDark:!1,isEnabled:!0,isTooltipVisible:e,onHideTooltip:r,onShowTooltip:i,scope:a})]})}const mK=V("overview-list"),fK=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),[]),pK=({className:e="",...t})=>{const n=Et(),s=X()(e,"overview-list__section-title",{"brand--ui":n===ne.RISE_CLASSIC});return(0,o.jsx)("h2",{...t,className:s})},gK=()=>{const e=sO(),t=xe(),n=fK(e);return(0,o.jsx)("nav",{"aria-label":t?.a11yRegionNavOverview,className:"overview-list",children:n.map((s,r)=>{const[i,...a]=s;if(!i)return null;const{title:c,type:l}=i,d=l==="section",h=d?a:s,m=mK("list",{sectionless:!d});return(0,o.jsxs)("section",{children:[d&&c&&(0,o.jsx)(pK,{children:(0,o.jsx)(kn,{value:c})}),(0,o.jsx)("ol",{className:m,role:"list",children:h.map((f,p)=>(0,o.jsx)(uK,{id:f.id,last:h.length>1&&p===h.length-1},f.id))})]},r)})})},vK=(0,u.memo)(gK),CK={[ne.RISE_CLASSIC]:{SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"LEFT_OVERLAY"},[ne.HORIZON]:{SPLIT_LEFT_IMAGE:"CENTERED_OVERLAY",SPLIT_RIGHT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"CENTERED_OVERLAY"},[ne.APEX]:{SPLIT_LEFT:"LEFT",SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT:"LEFT",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY"}};function xK({coverPageType:e="CENTERED",isTablet:t,themeId:n}){return t?CK[n][e]??e:e}function Ec(){const e=ie(),t=Et(),n=Zt(768);return xK({coverPageType:e.theme?.coverPageType??void 0,isTablet:n,themeId:t})}const bK=e=>Object.values(Na).find(t=>t.value==e);function yK(e){return(0,u.useMemo)(()=>bK(e)??Na.SMALL,[e])?.label.toLowerCase()}const Ui=V("cover");function J3(e){return typeof e=="object"&&e!=null}function SK(e){return J3(e)}function IK(e){if(J3(e))return SK(e.image)?e.image:void 0}function TK(){const e=Zt(1200),t=Et(),n=Ec(),s=t===ne.APEX&&(n==="SPLIT_RIGHT"||n==="SPLIT_RIGHT_IMAGE"),{description:r,media:i,navigation:a,partnerContentId:c,publishedAt:l}=ie(),h=!!dc(),m=IK(Ct(i)),f=m!=null&&Object.keys(m).length>0,p=!!a,v=!r||!p,g=!r&&!p,x=!!h,y=Ui("details",{"rise-com":!1,"rise-com-authoring":!1}),S=Ui("details-content-wrap",{columns:x,logo:f}),I=Ui("details-content",{"no-description-or-outline":v}),b=Ui("details-logo",{centered:g,"no-description-or-outline":v,"has-partner-content":!!c}),T=x&&(0,o.jsx)(zG,{hasLogo:f}),L=yK(m?.scalar),E=Ui("details-logo-image",{[L]:!0}),k=Ui("details-description-outline");return(0,o.jsx)("section",{className:y,"data-testid":"cover-details",children:(0,o.jsxs)("div",{className:S,children:[!e&&s&&T,(0,o.jsxs)("div",{className:I,children:[(0,o.jsx)(dp,{className:b,imageClassName:E}),(0,o.jsxs)("div",{className:k,children:[r&&(0,o.jsx)(H3,{}),e&&T,p&&(0,o.jsx)(Jd,{type:"outline",children:(0,o.jsx)(vK,{})})]})]}),!e&&!s&&T]})})}const LK=(0,u.forwardRef)(function({children:t,disabled:n,onClick:s,to:r,...i},a){return n?(0,o.jsx)("a",{"aria-disabled":"true",ref:a,role:"link",...i,children:t}):(0,o.jsx)(pn,{onClick:s,ref:a,to:r,...i,children:t})}),e6=V("cover"),Cn=()=>{const e=ie(),{trackingQuizId:t,theme:n}=e,s=ln(),r=window.viewType==="preview",i=wm(),a=DM(),c=Ti(),l=i?.id,d=n?.showStartButton??!0,h=t4()?c===100:e4(),f=a!=null?a:l,p=!r&&!1,{courseCTALabel:v}=uO({isCourseComplete:h===!0,percentCourseComplete:c??0});if(!d||!v||f==null)return null;const g=["cover__header-content-action-link","overview__button-enrolled",p?"overview__start-again":void 0].filter(Boolean).join(" "),x=Ln(f),y=S=>{S.preventDefault(),ro(()=>{s(x)},"cover-to-lesson")};return(0,o.jsx)("div",{className:e6("header-content-action-wrapper"),children:(0,o.jsx)(LK,{className:g,onClick:y,to:x,children:(0,o.jsx)("span",{className:e6("header-content-action-link-text"),children:v})})})},EK=V("cover"),qn=({children:e})=>{const t=EK("header-content");return(0,o.jsx)("div",{className:t,"data-testid":"cover-header-content",children:e})},Ur=e=>{const t=He(),n=rt();return kK(t,e,n)},kK=(e,t,n)=>{const{media:s,alpha:r}=t==="coverImage"?TC(e,n):LC(e,n),i="image"in s?xC(s?.image?.alt):void 0;return{alpha:r,ariaLabel:i,media:s,role:bC(i)}},NK=V("cover"),vp=()=>{const e=t2(),{alpha:t,ariaLabel:n,media:s,role:r}=Ur("coverImage"),i=NK("header-image"),a=yi({alpha:t,color:e,media:s});return(0,o.jsx)("div",{"aria-label":n,className:i,role:r,style:a??void 0})},jK=V("cover"),Cp=({children:e})=>{const t=t2(),n=`overlay-${t.toLowerCase()}`,s=jK("header-content",{[n]:!!t});return(0,o.jsxs)("div",{className:s,"data-testid":"cover-header-content",children:[e,(0,o.jsx)(vp,{})]})},wK=V("cover"),kc=({hasOverlay:e=!1})=>{const{alpha:t,ariaLabel:n,media:s,role:r}=Ur("coverImage"),i=yi({alpha:t,hasOverlay:e,media:s}),a=wK("header-graphic",{"dot-com":!1});return(0,o.jsx)("div",{"aria-label":n,className:a,"data-testid":"cover-header-graphic",role:r,style:i??void 0})},RK=V("cover");function xn({children:e}){const t=!!dc(),n=RK("header-content-info",{rbc:t,"rise-com":!1});return(0,o.jsx)("div",{className:n,"data-testid":"cover-header-content-info",children:e})}const io=V("cover");function AK({percentComplete:e}){const t=iu(),n=ds(),s=xe(),r=j2();return null}const Gr=V("cover"),PK=({percentComplete:e})=>{const t=ds(),n=xe(),s=j2();return e===0||window.isPublicShare,null;const r=Hi({percent:e,label:n.progressSummaryPercentComplete,isRTL:t});return(0,o.jsxs)("div",{className:Gr("progress"),children:[(0,o.jsx)("div",{className:Gr("progress-text"),children:r}),(0,o.jsx)("div",{className:Gr("progress-outer"),children:(0,o.jsx)("div",{className:Gr("progress-inner"),style:{width:`${e}%`}})}),s&&(0,o.jsxs)("div",{className:Gr("progress-next-lesson"),children:[(0,o.jsx)(kf,{className:Gr("progress-next-lesson-icon").toString(),decorative:!0}),(0,o.jsx)("span",{"aria-hidden":"true",className:Gr("progress-next-lesson-text"),children:s}),(0,o.jsxs)("span",{className:"visually-hidden",children:["Next lesson: ",s]})]})]})};function en(){const e=Ti()??0;return Et()===ne.APEX?(0,o.jsx)(AK,{percentComplete:e}):(0,o.jsx)(PK,{percentComplete:e})}const MK=V("cover"),bn=()=>{const e=ie(),t=Pe(e.title),n=MK("header-content-title"),s=Mi("title"),r=(0,on.uW)(e.title)?{"data-l10n-id":e.title.l10nId}:{"data-change-path":s};return(0,o.jsx)("h1",{...r,className:n,"data-testid":"cover-header-content-title",tabIndex:-1,children:t})},OK=()=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(Cp,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(Os,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(en,{}),(0,o.jsx)(Cn,{})]})})}),BK=()=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(qn,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(Os,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(en,{}),(0,o.jsx)(Cn,{})]})})}),DK=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(kc,{}),(0,o.jsx)(qn,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(Os,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(en,{}),(0,o.jsx)(Cn,{})]})})]}),FK=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(qn,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(Os,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(en,{}),(0,o.jsx)(Cn,{})]})}),(0,o.jsx)(kc,{})]});function _K(){switch(Ec()){default:case ce.LEFT_OVERLAY:case ce.CENTERED_OVERLAY:return(0,o.jsx)(OK,{});case ce.LEFT:case ce.CENTERED:return(0,o.jsx)(BK,{});case ce.SPLIT_LEFT_IMAGE:case ce.TWO_THIRDS_LEFT_IMAGE:return(0,o.jsx)(FK,{});case ce.SPLIT_RIGHT_IMAGE:case ce.TWO_THIRDS_RIGHT_IMAGE:return(0,o.jsx)(DK,{})}}function HK(){return(0,o.jsx)("header",{className:"cover__header","data-testid":"cover-header",children:(0,o.jsx)(_K,{})})}const VK=V("cover");function Nc(){return(0,o.jsxs)("svg",{"aria-hidden":"true",className:VK("header-star"),fill:"none",height:"18",viewBox:"0 0 18 18",width:"18",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{d:"M9 0V18",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,o.jsx)("path",{d:"M18 9H0",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,o.jsx)("path",{d:"M15.3 15.3002L2.69995 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,o.jsx)("path",{d:"M2.69995 15.3002L15.3 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}const zK=V("cover"),$K=()=>null,UK=()=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(Cp,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(en,{}),(0,o.jsx)(Nc,{}),(0,o.jsx)(Os,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(Cn,{})]})})}),GK=()=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(qn,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(en,{}),(0,o.jsx)(Nc,{}),(0,o.jsx)(Os,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(Cn,{})]})})}),WK=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(kc,{}),(0,o.jsx)(qn,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(en,{}),(0,o.jsx)(Nc,{}),(0,o.jsx)(Os,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(Cn,{})]})})]}),KK=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(qn,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(en,{}),(0,o.jsx)(Nc,{}),(0,o.jsx)(Os,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(Cn,{})]})}),(0,o.jsx)(kc,{})]}),QK=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(qn,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(en,{}),(0,o.jsx)(Nc,{}),(0,o.jsx)(Os,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(Cn,{})]})}),(0,o.jsx)("div",{className:"cover__header-graphic-wrap",children:(0,o.jsx)(kc,{})})]});function ZK(){switch(Ec()){default:case"CENTERED_IMAGE":return(0,o.jsx)(QK,{});case"CENTERED":case"CENTERED_ACCENT_TINT":return(0,o.jsx)(GK,{});case"SPLIT_LEFT_IMAGE":case"TWO_THIRDS_LEFT_IMAGE":return(0,o.jsx)(KK,{});case"SPLIT_RIGHT_IMAGE":case"TWO_THIRDS_RIGHT_IMAGE":return(0,o.jsx)(WK,{});case"CENTERED_OVERLAY":return(0,o.jsx)(UK,{})}}function YK(){return(0,o.jsxs)("header",{className:zK("header",{meta:!1}),"data-testid":"cover-header",children:[(0,o.jsx)(ZK,{}),(0,o.jsx)(u.Suspense,{children:(0,o.jsx)($K,{})})]})}const t6=V("cover");function mu({accentColor:e,hasOverlay:t=!1,isShape:n=!1}){const{alpha:s,ariaLabel:r,media:i,role:a}=Ur("coverImage"),c=n?{backgroundColor:e}:yi({alpha:s,hasOverlay:t,media:i});return(0,o.jsx)("div",{className:t6("header-graphic-container"),children:(0,o.jsx)("div",{"aria-label":r,className:t6("header-graphic"),"data-testid":"cover-header-graphic",role:a,style:c??void 0})})}const n6=e=>(0,o.jsx)(fu,{...e,children:(0,o.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,o.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"})})}),s6=e=>(0,o.jsx)(fu,{...e,children:(0,o.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,o.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"})})}),o6=e=>(0,o.jsx)(fu,{...e,children:(0,o.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,o.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"})})}),r6=e=>(0,o.jsx)(fu,{...e,children:(0,o.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,o.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"})})}),qK={LEFT_OVERLAY:n6,LEFT:n6,CENTERED:s6,CENTERED_OVERLAY:s6,SPLIT_LEFT:o6,SPLIT_LEFT_IMAGE:o6,SPLIT_RIGHT:r6,SPLIT_RIGHT_IMAGE:r6},fu=({children:e,className:t="svgPath",height:n,width:s,viewBox:r})=>(0,o.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focusable:"false",height:n,viewBox:r,width:s,xmlns:"http://www.w3.org/2000/svg",children:e});function Wr({className:e,coverPageType:t}){const n=t?qK[t]:null;return n?(0,o.jsx)(n,{className:e}):null}const i6=V("cover"),Gi=()=>(0,o.jsxs)("div",{className:i6("author-published-wrap"),children:[(0,o.jsx)(Os,{}),(0,o.jsx)(P3,{})]}),XK=({coverPageType:e})=>{const t=iu();return(0,o.jsxs)(Cp,{children:[(0,o.jsx)(Wr,{coverPageType:e}),(0,o.jsxs)(xn,{children:[!t&&(0,o.jsx)(en,{}),(0,o.jsx)(Gi,{}),(0,o.jsx)(bn,{}),t&&(0,o.jsx)(en,{}),(0,o.jsx)(Cn,{})]})]})},JK=({coverPageType:e})=>{const t=iu();return(0,o.jsxs)(qn,{children:[(0,o.jsx)(Wr,{coverPageType:e}),(0,o.jsxs)(xn,{children:[!t&&(0,o.jsx)(en,{}),(0,o.jsx)(Gi,{}),(0,o.jsx)(bn,{}),t&&(0,o.jsx)(en,{}),(0,o.jsx)(Cn,{})]})]})},eQ=({coverPageType:e})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Wr,{coverPageType:e}),(0,o.jsx)(mu,{}),(0,o.jsx)(qn,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(en,{}),(0,o.jsx)(Gi,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(Cn,{})]})})]}),tQ=({accentColor:e,coverPageType:t})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(qn,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(en,{}),(0,o.jsx)(Gi,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(Cn,{})]})}),(0,o.jsx)(Wr,{coverPageType:t}),(0,o.jsx)(mu,{accentColor:e,isShape:!0})]}),nQ=({coverPageType:e})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(qn,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(en,{}),(0,o.jsx)(Gi,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(Cn,{})]})}),(0,o.jsx)(Wr,{coverPageType:e}),(0,o.jsx)(mu,{})]}),sQ=({accentColor:e,coverPageType:t})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Wr,{coverPageType:t}),(0,o.jsx)(mu,{accentColor:e,isShape:!0}),(0,o.jsx)(qn,{children:(0,o.jsxs)(xn,{children:[(0,o.jsx)(en,{}),(0,o.jsx)(Gi,{}),(0,o.jsx)(bn,{}),(0,o.jsx)(Cn,{})]})})]});function oQ(e){const t=Ec(),n={...e,coverPageType:t};switch(t){default:case ce.LEFT_OVERLAY:case ce.CENTERED_OVERLAY:return(0,o.jsx)(XK,{...n});case ce.LEFT:case ce.CENTERED:return(0,o.jsx)(JK,{...n});case ce.SPLIT_LEFT:return(0,o.jsx)(tQ,{...n});case ce.SPLIT_LEFT_IMAGE:return(0,o.jsx)(nQ,{...n});case ce.SPLIT_RIGHT:return(0,o.jsx)(sQ,{...n});case ce.SPLIT_RIGHT_IMAGE:return(0,o.jsx)(eQ,{...n})}}function rQ(e){const n=!!!!dc();return(0,o.jsx)("header",{className:i6("header",{"with-info":n}),"data-testid":"cover-header",children:(0,o.jsx)(oQ,{...e})})}const iQ={[ne.RISE_CLASSIC]:HK,[ne.HORIZON]:YK,[ne.APEX]:rQ};function aQ(){const e=Et(),t=iQ[e];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t,{}),(0,o.jsx)(Yn,{anchor:ap,label:"Comments on course title"})]})}var cQ=C(73766),pu=C.n(cQ);const lQ=V("cover");function dQ({children:e}){const t=Et(),n=Ec(),s=pu()(n);return(0,o.jsx)("div",{className:lQ({layout:s}),"data-testid":`cover-layout-${s}`,"data-theme-id":t,id:"cover",children:e})}var uQ=C(78723),jc=C(62736);const hQ=V("portal-tooltip"),tn={LEFT:"LEFT",RIGHT:"RIGHT",ABOVE:"ABOVE",BELOW:"BELOW"},mQ=(e,t,n)=>{const s=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.visualViewport;let a=n;(a===tn.ABOVE||a===tn.BELOW)&&(s.bottom-r.height<0&&(a=tn.BELOW),r.height+s.top>i.height&&(a=tn.ABOVE)),(a===tn.LEFT||a===tn.RIGHT)&&(r.left<0&&(a=tn.RIGHT),r.width+s.left>i.width&&(a=tn.LEFT));const c={left:0,right:0,top:0,bottom:0};a===tn.ABOVE&&(c.top=s.top-r.height-25),a===tn.BELOW&&(c.top=s.top+s.height),a===tn.RIGHT&&(c.left=s.left+s.width+70),a===tn.LEFT&&(c.left=s.left-r.width-25),(a===tn.LEFT||a===tn.RIGHT)&&(c.top=s.top-s.height/2),(a===tn.ABOVE||a===tn.BELOW)&&(c.left=s.left+s.width/2);const l=s.left+s.width/2,d=r.width/2+l>i.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--${a.toLowerCase()}`)};function fQ({children:e,className:t,direction:n=tn.ABOVE,elementFocused:s,exitAnimation:r=!0,message:i,style:a,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),[p,v]=(0,uQ.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,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{ref:m,children:p}),i&&(v||h||s)&&!l&&(0,o.jsx)(Us,{classNames:"portal-tooltip__tooltip",exit:r,timeout:200,children:(0,o.jsx)(pQ,{buttonRef:m,className:t,direction:n,elementFocused:s,hovering:v,message:i,portalRef:f,renderInModalWhenPresent:c,style:a})})]})}function pQ({buttonRef:e,className:t,direction:n,elementFocused:s,hovering:r,message:i,portalRef:a,style:c,renderInModalWhenPresent:l=!1}){const d=(0,u.useCallback)(()=>mQ(e.current,a.current,n),[e,n,a]),h=(0,u.useCallback)(()=>{a.current&&d()},[a,d]),m=()=>{!r&&!s&&a.current&&(a.current.style=null)};return(0,jc.A)(h),(0,bs.createPortal)((0,o.jsx)("div",{"aria-hidden":!r||!s,className:hQ("tooltip").mix(t).toString(),onTransitionEnd:m,ref:a,style:c,children:i}),l?so({id:"portal",childType:"other"}):document.getElementById("portal"))}const Bs=fQ,gQ=["[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(", "),a6=(e,t=!1)=>n=>{const s=c6(n);if(s.length===0)return;const r=e>=s.length&&t?0:e;return F1()(r,s)},c6=e=>e?Array.from(e.querySelectorAll(gQ)).filter(t=>window.getComputedStyle(t).display!=="none"):[],l6=a6(0),vQ=a6(-1),xp=e=>l6(e)?.focus?.();function CQ(){const e=(0,u.useRef)(null);function t(n){const s=l6(e.current),r=vQ(e.current);Cd(n)&&(n.shiftKey?document.activeElement===s&&(r.focus(),n.preventDefault()):document.activeElement===r&&(s.focus(),n.preventDefault()))}return(0,u.useEffect)(()=>{const n=e?.current;return n?.addEventListener("keydown",t),()=>{n?.removeEventListener("keydown",t)}},[]),e}var bp;const yp=u.createContext(null);yp.displayName="UndoManagerContext";function HCe(e){return bp(yp.Provider,{value:e.undoManager,children:e.children})}function d6(){return u.useContext(yp)}function VCe(e){function t(n){const s=d6();return bp(e,{...n,undoManager:s})}return t.displayName=`withUndoManager(${e.displayName||e.name})`,t}function u6(){const e=d6();u.useEffect(()=>{if(e!=null)return e.disable(),()=>e.enable()},[e])}function zCe(e){function t(n){return u6(),bp(e,{...n})}return t.displayName=`withDisableUndoManager(${e.displayName||e.name})`,t}const _t=V("modal");function xQ({message:e}){const t=u.useId(),[n,s]=(0,u.useState)(!1),r=(0,u.useCallback)(()=>s(!0),[]),i=(0,u.useCallback)(()=>s(!1),[]);return(0,o.jsxs)("span",{className:_t("close-tooltip"),children:[(0,o.jsx)(Bs,{elementFocused:n,message:e,renderInModalWhenPresent:!0,children:(0,o.jsx)("button",{"aria-describedby":e?t:void 0,"aria-disabled":"true","aria-label":"close dialog",className:_t("close",{disabled:!0}),onBlur:i,onFocus:r,type:"button",children:(0,o.jsx)(ae,{className:_t("close-icon"),name:"close"})})}),e&&(0,o.jsx)("span",{className:"visually-hidden-always",id:t,children:e})]})}const Sp=u.forwardRef((e,t)=>{const{children:n,className:s,"data-testid":r,darkOverlay:i,disabledCloseButton:a=!1,disabledCloseButtonMessage:c,disableBackgroundScroll:l,disableCloseOnOverlayClick:d,disableCloseOnEscape:h=!1,focusFirstInput:m=!0,focusHeadingOnOpen:f=!1,focusOnOpen:p=!0,footer:v,forceToTop:g=!1,fullscreen:x=!1,heading:y,hideCloseButton:S=!1,hideHeader:I=!1,skipDialogClose:b=!1,useTopLayer:T=!0,onCancel:L,onClose:E=dn,onClickBack:k,onCloseBubbles:N=!1,onOverlayClick:P,scroll:A=!1,subHeading:R,subText:j,width:M}=e;u6();const w=CQ(),O=(0,u.useRef)(null),B=(0,u.useRef)(null),D=(0,u.useRef)(!1),_=(0,u.useCallback)(()=>{const U=w.current;!b&&U?.open&&U.close(),E()},[E,w,b]);(0,u.useEffect)(()=>{const U=H=>{if(!(!Nn(H)||h)){if(XG(w.current)){H.preventDefault(),H.stopPropagation();return}H.preventDefault(),H.stopPropagation(),L?.(H),_()}};return document.addEventListener("keydown",U,!N),()=>{document.removeEventListener("keydown",U,!N)}},[h,L,_,N,w]),(0,u.useEffect)(()=>{const U=w.current;if(!U||!h)return;const H=G=>G.preventDefault();return U.addEventListener("cancel",H),()=>{U.removeEventListener("cancel",H)}},[w,h]),(0,u.useEffect)(()=>{const U=w.current;if(U)return T?U.showModal():U.show(),p||setTimeout(()=>{U.contains(document.activeElement)&&document.activeElement?.blur()},0),()=>{U.close()}},[w,T,p]),(0,u.useEffect)(()=>{if(f&&B.current){B.current.focus();return}if(m&&w.current){const H=c6(w.current).find(Y=>Y.tagName==="INPUT"||Y.tagName==="TEXTAREA"||Y.tagName==="SELECT"),G=H||O?.current;G?.focus(),G instanceof HTMLTextAreaElement&&G.setSelectionRange(G.value.length,G.value.length)}},[m,f,w]),(0,u.useEffect)(()=>(l&&(document.scrollingElement||document.documentElement).classList.add("no-scroll"),()=>{l&&(document.scrollingElement||document.documentElement).classList.remove("no-scroll")}),[l,w]);const F=_t({"force-to-top":g}).mix(s),$=_t("content",{"with-footer":!!v,"force-scroll":!!A}),z=_t("overlay",{dark:!!i}),K=P||_,J=()=>{D.current=qG(w.current)},Q=()=>{D.current||K()};return(0,o.jsxs)("dialog",{"aria-labelledby":"modal-heading","aria-modal":"true",className:F.toString(),"data-testid":r,onClose:_,ref:U=>{w.current=U,t&&(t.current=U)},children:[(0,o.jsx)("div",{id:"modal-portal"}),(0,o.jsx)("div",{className:z,onClick:d?void 0:Q,onPointerDown:d?void 0:J}),(0,o.jsxs)("div",{className:_t("dialog",{fullscreen:x}),style:M&&!x?{width:M}:{},children:[(!I||!S)&&(0,o.jsxs)("div",{className:_t("heading-wrapper"),children:[(0,o.jsxs)("div",{className:_t("heading-flexbox"),children:[!I&&(0,o.jsxs)("div",{className:_t("header"),children:[k&&(0,o.jsx)("button",{"aria-label":"back to previous page",className:_t("back"),onClick:k,type:"button",children:(0,o.jsx)(ae,{className:_t("back-icon"),name:"arrow-left"})}),(0,o.jsxs)("h1",{className:_t("heading"),id:"modal-heading",ref:B,tabIndex:f?-1:void 0,children:[y,(0,o.jsx)("span",{className:_t("subheading"),children:R})]})]}),!S&&(a?(0,o.jsx)(xQ,{message:c}):(0,o.jsx)("button",{"aria-label":"close dialog",className:_t("close"),onClick:_,ref:O,type:"button",children:(0,o.jsx)(ae,{className:_t("close-icon"),name:"close"})}))]}),j?(0,o.jsx)("p",{className:_t("subtitle"),children:j}):null]}),(0,o.jsx)("div",{className:$,children:n}),v&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:_t("footer-shadow")}),(0,o.jsx)("div",{className:_t("footer"),children:v})]})]})]})}),Zo=V("locale-selector"),Ip=({onClose:e})=>{const t=(0,Ae.zy)(),n=ie(),s=sP(),r=Zl(),i=oP(),a=i?.length?i:s&&r?r?.map(T=>T.locale):void 0,[c,l]=(0,u.useState)(!1),d=c&&(a?.length||0)>1,h=(0,Ve.A)(d),m=Ct(n?.title),{currentLocale:f,setCurrentLocale:p}=ot(),v=K_(),g=xe(),[x,y]=(0,u.useState)(!1),S=(0,u.useCallback)(T=>{NN(T),p(T)},[p]),I=()=>{mn(tm(!1))};(0,u.useEffect)(()=>{h&&!d&&e?.()},[e,h,d]),(0,u.useEffect)(()=>{if(!a||x||s===void 0||!r)return;if(a.length===1){S(a[0]),y(!0);return}const T=lC(void 0),L=kN()??"";if(L!==""){S(L),y(!0),l(!1);return}T?.p==null&&L===""?l(!0):(l(!1),I());const k=(navigator.language??"en-US").toLowerCase(),N=a.find(P=>P.toLowerCase()===k);S(N?k:a[0]),y(!0)},[a,t,S,x,s,r,l]);const b=T=>{T.preventDefault();const L=T.target.value;S(L)};return!d||s===void 0||!r?null:(0,o.jsx)(Us,{classNames:"modal",timeout:400,children:(0,o.jsx)(Sp,{className:Zo("modal"),disableCloseOnOverlayClick:!0,hideCloseButton:!0,hideHeader:!0,onClose:I,children:(0,o.jsxs)("div",{className:Zo("container"),children:[(0,o.jsx)("div",{className:Zo("heading"),children:g.l10nChooseLanguage}),(0,o.jsx)("div",{className:Zo("course-title"),children:m}),(0,o.jsx)("div",{className:Zo("selector"),children:(0,o.jsx)("select",{onChange:b,value:f,children:a.map(T=>(0,o.jsx)("option",{value:T,children:v(T)},T))})}),(0,o.jsx)("div",{className:Zo("footer"),children:(0,o.jsx)("button",{className:Zo("continue-button"),onClick:I,type:"button",children:(0,o.jsx)("span",{className:Zo("continue-button-label"),children:g.l10nChooseLanguageContinue})})})]})})})},bQ=V("cover-container"),h6=()=>document.querySelector("h1")?.focus({preventScroll:!0});function yQ(){const{didNavigate:e,shouldSkipAutoFocusOnNavigate:t}=Pd(),s=xe()?.overviewPageTitleSuffix,r=nc();return(0,u.useEffect)(()=>{t||e&&h6()},[e,t]),(0,o.jsxs)(Hr,{title:lc(`${r} - ${s}`),children:[(0,o.jsx)("main",{children:(0,o.jsx)("div",{className:bQ({}),children:(0,o.jsxs)(dQ,{children:[(0,o.jsx)(aQ,{}),(0,o.jsx)(TK,{})]})})}),(0,o.jsx)(Ip,{onClose:h6})]})}const SQ=yQ,IQ=/^([^/\s]+)\/([^/\s]+)$/;function TQ(e){const t=IQ.exec(e.trim());return t?{lessonId:t[1],blockId:t[2]}:null}function GCe(e,t){return`${e}/${t}`}const wc="blockId";function WCe(e,t){return`#/lessons/${e}?${wc}=${t}`}const LQ=/^#\/lessons\/([^/?#]+)\?(.+)$/;function EQ(e){const t=LQ.exec(e.trim());if(!t)return null;const n=new URLSearchParams(t[2]).get(wc);return n?{lessonId:decodeURIComponent(t[1]),blockId:n}:null}const m6=(0,u.createContext)(void 0);function gu(){const e=(0,u.useContext)(m6);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 f6(e){function t(n){const s=gu();return(0,o.jsx)(e,{...n,...s})}return t.displayName=`WithMediaContextWrapper(${e.name})`,t}function kQ({children:e,lessonId:t,mode:n="readonly",openTranscript:s,closeTranscript:r,onTranscriptUpdate:i,disableTranscriptButton:a=!1}){const c={mode:n,lessonId:t||"",openTranscript:s||null,closeTranscript:r||null,onTranscriptUpdate:i||null,disableTranscriptButton:a,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,o.jsx)(m6.Provider,{value:c,children:e})}const p6=(0,u.createContext)(void 0),NQ=p6.Provider;function Rc(){return(0,u.useContext)(p6)}function jQ({children:e}){const t=ue(n=>n.transcriptPanel);return(0,o.jsx)(NQ,{value:t,children:e})}const g6=(0,he.action)(ob),Ac=(0,he.action)(rb),Tp=(0,he.action)(ib);function Is(e){return e.refs?pu()("audio-id__refs_"+e.refs.toLowerCase()):""}function Lp(e){if(e)return`audio-transcript--${e}`}function v6(e){if(e)return`audio-player-transcript-toggle--${e}`}const C6=V("course-exit");function x6(e){const t=xe(),{className:n,lmsOptions:s,style:r}=e;return s?.enableExitCourse?(0,o.jsx)("div",{className:C6("wrapper"),children:(0,o.jsx)("button",{className:C6("button").mix(n),onClick:B1,style:r,type:"button",children:t?.courseExit})}):null}const wQ=960;function Pc(){return Zt(wQ)}function RQ(){const e=He(),t=Pc(),n=Ql();return aM({course:e,isMobile:t,search:n})}function AQ(){const e=He(),t=Pc();return cM({course:e,isMobile:t})}const Ep=V("nav-control"),PQ=()=>{const[e,t]=(0,u.useState)(!1);return(0,mt.A)(ky,()=>t(!0)),(0,mt.A)(Cf,()=>t(!1)),e},MQ=({"aria-controls":e,isNavOpen:t,toggleNav:n,hideNav:s})=>{const{buttonNavigationStyle:r,lmsOptions:i,showNavigationButtons:a,...c}=ie(),l=(0,u.useRef)(null),[d,h]=(0,u.useState)(0),m=xe(),f=Pc(),p=od(),v=PQ(),g=(0,u.useMemo)(()=>c.lessons?.find(L=>L.id===p),[c.lessons,p]),x=g?.type==="quiz"&&!!g.settings?.timer,y=i?.enableExitCourse,S=x||y,I=c.navigationType===Ir.COMPACT,b=I?"fixed-course-exit":void 0;(0,u.useEffect)(()=>{l.current=document.querySelector(".page-wrap");const E=document.querySelector(".lesson-nav--previous")?.clientHeight??60,k=!a||r===Zs.FLOATING&&!f;function N({target:P}){const A=P instanceof HTMLElement?P.scrollTop:0,R=E-A;h(R)}return v&&!k?l.current.scrollTop===0?h(E):l.current.addEventListener("scroll",N):h(0),()=>l.current.removeEventListener("scroll",N)},[r,f,v,a]);const T=(0,u.useCallback)(()=>{const L=document.getElementsByClassName("nav-control__menu--top-nav-bar").item(0),E=L instanceof HTMLElement?L:null;if(l.current&&E){const k=l.current.offsetWidth-l.current.clientWidth||0;E.style.maxWidth=`calc(100% - ${k}px)`}},[]);return(0,u.useLayoutEffect)(()=>{S&&T()},[S,T]),(0,o.jsx)("div",{className:Ep("wrapper"),children:(0,o.jsxs)("div",{className:Ep("menu",{"is-timed-quiz":x,"nav-off":s,"top-nav-bar":S}),style:{marginTop:d},children:[!s&&(!I||f)&&(0,o.jsx)("button",{"aria-controls":e,"aria-expanded":t,"aria-label":t?m?.a11yNavigationMenuClose:m?.a11yNavigationMenuOpen,className:Ep("button"),onClick:n,type:"button",children:(0,o.jsx)(ae,{classNameIcon:"page-menu-toggle__icon",name:"bars-regular"})}),(0,o.jsx)(x6,{className:b,lmsOptions:i})]})})},kp=({"aria-hidden":e=void 0,"aria-label":t=void 0,progress:n=0,runnerClass:s,trackClass:r})=>(0,o.jsx)("div",{"aria-hidden":e,"aria-label":t,className:r,role:"img",children:(0,o.jsx)("div",{className:s,style:{width:`${n}%`}})}),Yo=V("nav-compact"),OQ=e=>{const{lessonPosition:t,labelLessonName:n,labelLessonPreposition:s,totalLessons:r}=e;return t<=0?null:(0,o.jsx)("div",{className:Yo("header-counter"),"data-testid":"nav-compact-counter",children:`${n} ${t} ${s} ${r}`})},BQ=e=>{const{classProgressRunner:t,classProgressText:n,classProgressTrack:s,percentComplete:r,percentCompleteText:i,navExpanded:a}=e;return(0,o.jsxs)("div",{className:Yo("header-progress"),"data-testid":"nav-compact-progress",children:[(0,o.jsx)("div",{className:n,children:i}),(0,o.jsx)(kp,{"aria-hidden":a,"aria-label":i,progress:r,runnerClass:t,trackClass:s})]})},DQ=({closeNav:e,isExpanded:t,openNav:n})=>{const s=ln(),r=nt(),i=Or(),a=ie(),c=nc(),l=Ti(),d=xe(),h=Bo(),m=Xl(),f=od(),p=T2(),v=(0,u.useMemo)(()=>a?.lessonsOnly?.length??0,[a?.lessonsOnly]),g=(0,u.useMemo)(()=>p[f]??-1,[p,f]),x=i?.navigationStyle,y=(0,u.useMemo)(()=>ic(x),[x]),S=(0,u.useCallback)(()=>{t?e():n()},[t,n,e]),I=i?.exportSettings?.webExportSettings,b=!Ps.isInstantLink&&(i?.lmsOptions?.disableCoverPage||I?.disableCoverPage),T=(0,u.useCallback)(J=>{J.preventDefault(),ro(()=>{s("/")},"lesson-to-cover")},[s]),k=`${ds()?`%${l}`:`${l}%`} ${d?.lessonComplete??""}`,{alpha:N,ariaLabel:P,media:A,role:R}=Ur("coverImage"),j=(0,u.useMemo)(()=>yi({alpha:N,color:i?.theme?.coverImageColor??void 0,media:A}),[N,i?.theme?.coverImageColor,A]),M=Yo("header",{collapsed:!t}),w=Yo("header-image",{collapsed:!t}),O="nav-compact__header-inner",B="nav-compact__header-control",D=Yo("header-title-link",{collapsed:!t}),_=Yo("header-progress-text",{collapsed:!t}),F=Yo("header-progress-track",{collapsed:!t}),$=Yo("header-progress-runner",{collapsed:!t}),z="nav-compact__header-strip",K=(0,u.useCallback)(()=>{r(Qa(!h?.active))},[r,h?.active]);return(0,o.jsxs)("section",{"aria-label":"Course Information",className:M,"data-testid":"nav-compact-header",children:[y&&j&&(0,o.jsx)("div",{"aria-label":P,className:w,role:R,style:j}),(0,o.jsxs)("div",{className:O,children:[(0,o.jsxs)("div",{className:z,children:[(0,o.jsxs)("div",{className:"nav-compact__header-controls",children:[i?.allowSearch&&m!=="restricted"&&t&&(0,o.jsx)("button",{"aria-label":d?.a11ySearchOpen,className:`${B} nav-compact__header-search`,"data-testid":"nav-compact-search",onClick:K,type:"button",children:(0,o.jsx)(hc,{className:"nav-compact__header-control-icon nav-compact__header-search-icon"})}),(0,o.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:S,type:"button",children:[t&&(0,o.jsx)(r$,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"}),!t&&(0,o.jsx)(i$,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"})]})]}),(0,o.jsx)(OQ,{labelLessonName:d?.lessonName??"",labelLessonPreposition:d?.lessonPreposition??"",lessonPosition:g,totalLessons:v})]}),(0,o.jsx)("div",{className:"nav-compact__header-title","data-testid":"nav-compact-title",children:b?(0,o.jsx)("span",{className:D,children:c}):(0,o.jsx)(pn,{className:D,onClick:T,to:"/",children:c})}),(0,o.jsx)(BQ,{classProgressRunner:$,classProgressText:_,classProgressTrack:F,navExpanded:t,percentComplete:l,percentCompleteText:k})]})]})};var FQ=C(75810),_Q=C.n(FQ),YCe=C(22063),HQ=C(514),VQ=C.n(HQ),zQ=C(99227),$Q=C.n(zQ),UQ,GQ,WQ,KQ,QQ;function b6(e,t,n="..."){const s=e?e.toString():"";return s.length>t?s.substr(0,t-1)+n:s}const qCe=e=>QQ(t=>GQ(t)>e,WQ(0,e)),ZQ=new RegExp(/^[0-9]+$/),YQ=e=>ZQ.test(e),qQ=e=>e>=0,XQ=e=>e<=100,XCe=e=>e==="",JCe=e=>YQ(e)&&XQ(e)&&qQ(e),exe=e=>String(Number(e)),y6=$e()(fi()(""),_Q()(VQ(),0)),txe=$e()(fi()(" "),wt()(y6),Oh()(" ")),S6=$e()(fi()(" "),Oh()(/(?=[A-Z]|^)/)),nxe=e=>e?UQ(y6,KQ,S6)(e):"",sxe=$e()($Q(),S6);function I6({id:e,isEnabled:t,isSectionLesson:n,last:s}){const{navigationStyle:r}=ie(),{settings:i}=$t(e)??{},a=Li(e),c=to(),l=zm(String(e)),d=(0,u.useMemo)(()=>Ho(r),[r]),h=String(e)===c,m=i?.isGeneratingAIContent===!0,f=b6(a||"",45),[p,v]=(0,u.useState)(!1),g=(0,u.useCallback)(()=>v(!0),[]),x=(0,u.useCallback)(()=>v(!1),[]),y=n?"nav-compact__outline-section-item":"nav-compact__outline-item",S=`${y}__link`,I=(0,o.jsx)(hu,{canComplete:l,id:e,isDark:d,isEnabled:t,isTooltipVisible:p,onHideTooltip:x,onShowTooltip:g,scope:Eo.COMPACT});return(0,o.jsx)("li",{className:"nav-compact__outline-list-item","data-testid":`nav-compact-lesson-${e}`,role:"listitem",children:m?(0,o.jsx)("div",{className:y,children:(0,o.jsx)("span",{"aria-disabled":"true",className:`${S} ${S}--generating`,"data-testid":`nav-compact-lesson-${e}-generating`,children:f})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(yc,{className:y,dark:d,isCurrentLesson:h,isTooltipEnabled:!l,last:s,lessonId:e,onHideProgressTooltip:x,onShowProgressTooltip:g,showProgressDelay:0,tooltipClassName:`${y}-tooltip`,children:[f,!l&&I]}),l&&I]})})}const JQ=V("nav-compact"),eZ=({id:e})=>{const t=$t(e),n=Ct(t?.title),s=JQ("outline-section-empty");return(0,o.jsx)("div",{className:s,children:(0,o.jsx)("span",{children:n})})};var Wi=C(49860);const tZ=({index:e,isEnabled:t,lessonIds:n,id:s})=>{const r=ie(),i=r?.theme,a=r?.themeId,c=i?.navigationSectionsExpanded??!0,l=$t(String(s)),d=Ct(l?.title),[h,m]=Wi.useState(c);Wi.useEffect(()=>{m(c)},[c]);const[f,p]=Wi.useState(),v=Wi.useRef(null),g=`sublistCompact-${e}`,x=String(a),y=h?"nav-compact__outline-section-toggle-icon":"nav-compact__outline-section-toggle-icon nav-compact__outline-section-toggle-icon--collapsed",S=h?"nav-compact__outline-section-list":"nav-compact__outline-section-list nav-compact__outline-section-list--collapsed",I=h?"nav-compact__outline-section-toggle":"nav-compact__outline-section-toggle nav-compact__outline-section-toggle--collapsed",b=Wi.useCallback(()=>{m(T=>!T)},[]);return Wi.useLayoutEffect(()=>{const T=setTimeout(()=>{v.current&&p(v.current.scrollHeight)},0);return()=>{clearTimeout(T)}},[n.length,x]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("button",{"aria-controls":g,"aria-expanded":h,className:I,onClick:b,tabIndex:t?void 0:-1,type:"button",children:[(0,o.jsx)("span",{className:"nav-compact__outline-section-toggle-text",children:d}),(0,o.jsx)(qy,{className:y})]}),(0,o.jsx)(au,{inert:!h,children:(0,o.jsx)("ol",{"aria-hidden":h?void 0:!0,className:S,id:g,ref:v,role:"list",style:{maxHeight:f},children:n.map((T,L)=>(0,o.jsx)(I6,{id:T,isEnabled:t&&h,isSectionLesson:!0,last:L===n.length-1},T))})})]})},nZ=({index:e,isEnabled:t,lessonIds:n})=>{const[s,...r]=n,i="nav-compact__outline-item nav-compact__outline-section";return Jt()(r)?(0,o.jsx)("li",{className:i,role:"listitem",children:(0,o.jsx)(eZ,{id:s})}):(0,o.jsx)("li",{className:i,role:"listitem",children:(0,o.jsx)(tZ,{id:s,index:e,isEnabled:t,lessonIds:r})})},sZ=({index:e,isEnabled:t,lessonIds:n})=>ld(n)?(0,o.jsx)(nZ,{index:e,isEnabled:t,lessonIds:n}):n.map((r,i)=>(0,o.jsx)(I6,{id:r,isEnabled:t,isSectionLesson:!1,last:i===n.length-1},r)),oZ=({className:e="",isEnabled:t})=>{const n=ud(),s=xe(),r=Et(),i=[e,r===ne.RISE_CLASSIC?"brand--ui":void 0,"nav-compact__outline",t?void 0:"nav-compact__outline--collapsed"].filter(Boolean).join(" ");return(0,o.jsx)("section",{"aria-label":s?.a11yRegionNavOverview,className:i,"data-testid":"nav-compact-outline",id:"nav-compact-outline",children:ms(n)&&(0,o.jsx)("ol",{className:"nav-compact__outline-list","data-testid":"nav-compact-outline-list",role:"list",children:n.map((a,c)=>Jt()(a)?null:(0,o.jsx)(sZ,{index:c,isEnabled:t,lessonIds:a},c))})})};var rZ=C(49860);const iZ=()=>{const[e,t]=rZ.useState(!1);return(0,mt.A)(Ny,()=>t(!0)),(0,mt.A)(xf,()=>t(!1)),e},T6=V("nav-compact"),L6="nav-content-compact",aZ=(0,u.forwardRef)(({closeNav:e,isExpanded:t,openNav:n},s)=>{const r=Or(),{navigationStyle:i,theme:a}=r??{},c=a?.coverImageColor,l=a?.progressIndicatorStyle,d=ue(b=>b.course?.theme?.buttonNavigationStyle==="FULL"?Math.round(-(b.ui.lessonNavNextButton?.intersectionRect?.height??0)):0),h=(0,u.useMemo)(()=>Ho(i),[i]),m=(0,u.useMemo)(()=>i===Tr.LIGHT_ACCENT||i===Tr.DARK_ACCENT,[i]),f=iZ(),p=(0,u.useMemo)(()=>ic(i),[i]),v=l===ct.CIRCULAR_FILL,g=l===ct.INCOMPLETE_COMPLETE,x=(0,u.useMemo)(()=>p&&c===vt.LIGHT,[p,c]),y=T6({accent:m,dark:h,light:!h,"image-dark-overlay":p&&!x,"image-light-overlay":p&&x,"progress-circular-fill":v,"progress-incomplete-complete":g,collapsed:!t,navNextIsVisible:f}),S=T6("wrap",{collapsed:!t}),I={transform:`translateY(${d}px)`};return(0,o.jsx)("div",{className:y,"data-testid":"nav-compact",id:L6,ref:s,style:I,children:(0,o.jsxs)("div",{className:S,children:[(0,o.jsx)(DQ,{closeNav:e,isExpanded:t,openNav:n}),(0,o.jsx)(au,{inert:!t,children:(0,o.jsx)(oZ,{isEnabled:t})})]})})});function E6(e,t){const[n,s]=(0,u.useState)(null),{root:r,rootMargin:i,threshold:a}=t;return(0,u.useEffect)(()=>{if(e&&typeof IntersectionObserver=="function"){const c=new IntersectionObserver(l=>{s(l[0])},{root:r,rootMargin:i,threshold:a});return c.observe(e),()=>{s(null),c.disconnect()}}return()=>{}},[e,r,i,a]),n}const cZ={closeNav:()=>{},openNav:()=>{},openSearch:()=>{},closeSearch:()=>{},searchActive:!1},k6=Object.assign((0,u.createContext)(cZ),{displayName:"OverlayNavControlContext"});function lZ(e){const{children:t,closeNav:n,openNav:s}=e,[r,i]=(0,u.useState)(!1),a=(0,u.useCallback)(()=>{i(!0)},[]),c=(0,u.useCallback)(()=>{i(!1)},[]);return(0,o.jsx)(k6.Provider,{value:{closeNav:n,openNav:s,openSearch:a,closeSearch:c,searchActive:r},children:t})}const vu=()=>(0,u.useContext)(k6),Cu=V("nav-overlay"),dZ=({className:e})=>{const t=xe(),n=ds(),s=Ti(),i=`${n?`%${s}`:`${s}%`} ${t?.lessonComplete??""}`,a=Cu("header-progress-runner"),c=Cu("header-progress-text"),l=Cu("header-progress-track");return(0,o.jsxs)("div",{className:Cu("header-progress").mix(e),"data-testid":"nav-overlay-progress",children:[(0,o.jsx)(kp,{"aria-hidden":!0,progress:s,runnerClass:a,trackClass:l}),(0,o.jsx)("div",{className:c,children:i})]})},ao=V("nav-overlay"),uZ=()=>{const e=ie(),t=ln(),n=nc(),{allowSearch:s,lmsOptions:r}=e,i=Xl(),a=xe(),c=vu(),l=(0,u.useRef)(null),d=ao("header-control-btn"),h=e?.exportSettings?.webExportSettings,m=!Ps.isInstantLink&&(r?.disableCoverPage||h?.disableCoverPage),f=p=>{p.preventDefault(),ro(()=>{t("/")},"lesson-to-cover")};return(0,o.jsx)("section",{"aria-label":"Course Information","data-testid":"nav-overlay-header",children:(0,o.jsxs)("div",{className:ao("header-container"),children:[(0,o.jsxs)("div",{className:ao("header-controls"),children:[(0,o.jsx)("button",{"aria-label":a?.a11yNavigationMenuClose,className:d,"data-testid":"nav-overlay-close",onClick:c.closeNav,ref:l,type:"button",children:(0,o.jsx)(Bd,{className:ao("header-close-icon")})}),s&&i!=="restricted"&&(0,o.jsx)("button",{"aria-label":a?.a11ySearchOpen,className:d,"data-testid":"nav-overlay-search",onClick:c.openSearch,type:"button",children:(0,o.jsx)(hc,{className:ao("header-search-icon")})})]}),(0,o.jsxs)("div",{className:ao("header-title-progress-container"),children:[(0,o.jsx)("h1",{className:ao("header-title"),"data-testid":"nav-overlay-title",id:"nav-overlay-title",children:m?(0,o.jsx)("span",{className:ao("header-title"),children:n}):(0,o.jsx)(pn,{className:ao("header-title-link"),onClick:f,to:"/",children:n})}),(0,o.jsx)(dZ,{})]})]})})},hZ={[$n.ARTICLE]:Zy,[$n.INTERACTION]:m$,[$n.QUIZ]:l$,[$n.VIDEO]:f$},xu=({className:e,icon:t})=>{const n=hZ[t]??Zy;return(0,o.jsx)(n,{className:e,icon:t})},co=V("nav-overlay"),N6=({first:e,id:t,isEnabled:n,isSectionLesson:s,last:r})=>{const{navigationStyle:i}=ie(),{icon:a,settings:c}=$t(t)??{},l=Li(t),d=vu(),h=zm(String(t)),m=Ho(i),f=c?.isGeneratingAIContent===!0,p=co("outline-item",{section:s}),v=`${co("outline-item")}__link`,g=co("outline-item-link-icon",{quiz:a==="Quiz"}),x=(0,u.useCallback)(()=>{d.closeNav()},[d]),[y,S]=(0,u.useState)(!1),I=(0,u.useCallback)(()=>S(!0),[]),b=(0,u.useCallback)(()=>S(!1),[]),T=(0,o.jsx)(hu,{canComplete:h,id:t,isDark:m,isEnabled:n,isTooltipVisible:y,onHideTooltip:b,onShowTooltip:I,scope:Eo.OVERLAY});return(0,o.jsx)("li",{className:co("outline-list-item",{first:e,last:r}),"data-testid":`nav-overlay-lesson-${t}`,role:"listitem",children:f?(0,o.jsx)("div",{className:p.toString(),children:(0,o.jsxs)("span",{"aria-disabled":"true",className:`${v} ${v}--generating`,"data-testid":`nav-overlay-lesson-${t}-generating`,children:[(0,o.jsx)("span",{className:co("outline-icon-wrap"),children:(0,o.jsx)(xu,{className:g,icon:a??$n.ARTICLE})}),(0,o.jsx)("span",{className:co("outline-lesson-title"),children:l})]})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(yc,{className:p.toString(),dark:m,isTooltipEnabled:!h,lessonId:t,onHideProgressTooltip:b,onNavigate:x,onShowProgressTooltip:I,showProgressDelay:null,tooltipClassName:co("outline-item-tooltip").toString(),children:[(0,o.jsx)("span",{className:co("outline-icon-wrap"),children:(0,o.jsx)(xu,{className:g,icon:a??$n.ARTICLE})}),(0,o.jsx)("span",{className:co("outline-lesson-title"),children:l}),!h&&T]}),h&&T]})})},mZ=V("nav-overlay"),fZ=({id:e})=>{const t=$t(e),n=Ct(t?.title);return(0,o.jsx)("span",{className:mZ("outline-section-text"),children:n})},j6=V("nav-overlay"),pZ=({isEnabled:e,lessonIds:t})=>{const n=(0,u.useRef)(null);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:j6("outline-section-divider")}),(0,o.jsx)("ol",{className:j6("outline-section-list"),ref:n,role:"list",children:t.map((s,r)=>(0,o.jsx)(N6,{id:s,isEnabled:e,isSectionLesson:!0,last:r===t.length-1},s))})]})},gZ=V("nav-overlay"),vZ=({index:e,isEnabled:t,lessonIds:n})=>{const[s,...r]=n,i=gZ("outline-item").mix("nav-overlay__outline-section");return Jt()(r)?(0,o.jsx)("li",{className:i,role:"listitem",children:(0,o.jsx)(fZ,{id:s})}):(0,o.jsx)("li",{className:i,role:"listitem",children:(0,o.jsx)(pZ,{index:e,isEnabled:t,lessonIds:r})})},CZ=({index:e,isEnabled:t,lessonIds:n})=>{const s=ld(n),r=Li(n[0]),i=V("nav-overlay");return s?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("h2",{className:i("outline-section-text"),children:r}),(0,o.jsx)("ol",{className:i("outline-list"),"data-testid":"nav-overlay-outline-list",role:"list",children:(0,o.jsx)(vZ,{index:e,isEnabled:t,lessonIds:n})})]}):n.map((a,c)=>(0,o.jsx)(N6,{first:c===0,id:a,isEnabled:t,isSectionLesson:!1,last:c===n.length-1},a))},xZ=V("nav-overlay"),bZ=({isEnabled:e})=>{const t=ud(),n=xe();return(0,o.jsx)("section",{"aria-label":n?.a11yRegionNavOverview,className:xZ("outline"),"data-testid":"nav-overlay-outline",id:"nav-overlay-outline",children:ms(t)&&(0,o.jsx)(o.Fragment,{children:t.map((s,r)=>Jt()(s)?null:(0,o.jsx)(CZ,{index:r,isEnabled:e,lessonIds:s},`lessonIdGroup-${r}`))})})};var yZ=C(40002),bu=C.n(yZ),Kr=C(61082),SZ=C(68848),yu=C.n(SZ);const Np=Array.isArray,w6=e=>typeof e=="number",Su=e=>!Dt()(e)&&typeof e=="object",jp=e=>typeof e=="string",IZ=(e,t,n)=>(s,r)=>{const i=yr()(r,e);if((0,on.uW)(s)){const a=n[s.l10nId];return typeof a!="string"?!1:!Jt()(yu()(t,(0,Kr.htmlDecode)(a)))}else return Su(s)?R6(e,t,n)(s):i&&jp(s)?!Jt()(yu()(t,(0,Kr.htmlDecode)(s))):!1},R6=(e,t,n)=>s=>{const r=ks()(IZ(e,t,n),s);return yr()(!0,is()(r))},TZ=R6;var LZ=C(49306),wp=C.n(LZ),EZ=C(39767),Rp=C.n(EZ);const kZ=wp(),NZ=un(),jZ=(e,t,n)=>(s,r)=>{const i=yr()(r,e);if(Np(s))return is()(Ap(e,t,n)(s));if((0,on.uW)(s)){const a=n[s.l10nId];return typeof a!="string"?0:us()(yu()(t,(0,Kr.htmlDecode)(a)))}else return Su(s)?Ap(e,t,n)(s):i&&jp(s)?us()(yu()(t,(0,Kr.htmlDecode)(s))):0},Ap=(e,t,n)=>s=>ks()(jZ(e,t,n),s),Pp=e=>{if(Np(e))return wt()(Pp,e);if(Su(e))return Pp(is()(e));if(w6(e))return e},wZ=(e,t,n)=>s=>{const r=Ap(e,t,n)(s),i=wt()(Pp,is()(r)),a=pl()(i).filter(w6),c=Rp()(kZ,0,a);return NZ("results",c,s)},RZ=(e,t,n)=>(s,r)=>{const i=yr()(r,e);return Np(s)?is()(Mp(e,t,n)(s)):Su(s)?Mp(e,t,n)(s):i&&jp(s)?di()(t,n,s):s},Mp=(e,t,n)=>s=>ks()(RZ(e,t,n),s),A6=Mp,P6=(e,t,n,s,r)=>{const i=["caption","code","description","heading","message","name","paragraph","title"];if(Jt()(e))return!1;const a=e.replace(/[-[\]{}()"'*+?.,\\^$|#\s]/g,"\\$&"),c=new RegExp(`(${a})(?![^<]*>)`,"ig"),l="<mark>$&</mark>",d=A6(i,c,l),h=A6(Object.keys(n),c,l),m=wt()(y=>{const S=d(y);return Array.isArray(S)?y:{...y,...S}},t),f=s?s(e):{},p=h(n),v=y=>f[y.id]>0||TZ(i,c,n)(y),g=y=>wZ(i,c,n)(y),x=wt()(g,So()(v,t));x.forEach(y=>{y.results+=f[y.id]??0}),r(e,x,Array.isArray(p)?n:p,m)};function AZ(e){if(!e)return!0;for(const t in e)return!1;return!0}function M6(){const{lessons:e,mondrian:t}=ie(),{currentLocale:n}=ot(),[s,r]=(0,u.useState)(null);return(0,u.useEffect)(()=>{AZ(t)||C.e("webpack_container_remote_mondrian_learn-react").then(C.t.bind(C,4246,23)).then(i=>r(()=>i.searchItemsByLesson))},[t]),(0,u.useCallback)(i=>s?.(i,e,t,n)??{},[s,e,t,n])}const PZ=$r.Ay.animateScroll,Xn=V("nav-overlay"),MZ=()=>{const e=nt(),t=Xb(),n=vu(),{lessons:s}=ie(),[r,i]=(0,u.useState)(""),a=M6(),c=(0,u.useRef)(null),l=xe(),d=Xn("search-close-btn"),h=Xn("search-clear-btn"),m=(0,u.useCallback)(()=>{n.closeSearch(),n.closeNav(),e([Xx(!0),Qa(!1),Pr(null)])},[e,n]),f=(0,u.useCallback)(()=>{i(""),c.current?.focus?.()},[]);(0,u.useEffect)(()=>{c.current?.focus?.()},[]);const p=(0,u.useCallback)(x=>{Nn(x)&&!bu()(r)?(x.preventDefault(),i(""),e(Pr(null))):Nn(x)&&bu()(r)&&m()},[e,m,r]);(0,mt.A)("keydown",p);const v=(0,u.useCallback)(x=>{i(x.target.value)},[]),g=(0,u.useCallback)(x=>{if(x.preventDefault(),r){const y=(S,I,b,T)=>{e([Pr(S),Jx(I),eb(b),tb(T),Qa(!0)]),PZ.scrollToTop({duration:500,smooth:!0})};n.closeNav(),n.closeSearch(),P6(r,s,t??{},a,y)}},[r,a,n,s,t,e]);return(0,o.jsxs)("div",{className:Xn("search"),"data-testid":"nav-overlay-search-container",children:[(0,o.jsx)("div",{className:Xn("search-header"),children:(0,o.jsx)("button",{"aria-label":l?.a11ySearchClose,className:d,"data-testid":"nav-overlay-search-close",onClick:m,type:"button",children:(0,o.jsx)(Bd,{className:Xn("search-close-icon")})})}),(0,o.jsx)("div",{className:Xn("search-body"),children:(0,o.jsxs)("form",{autoComplete:"off",onSubmit:g,children:[(0,o.jsxs)("div",{className:Xn("search-container"),children:[(0,o.jsx)(hc,{className:Xn("search-icon")}),(0,o.jsx)("input",{"aria-label":l?.a11ySearchInput,className:Xn("search-input").mix("brand--ui"),"data-testid":"nav-overlay-search-input",name:"search",onChange:v,placeholder:l?.search,ref:c,type:"input",value:r}),r&&(0,o.jsx)("button",{"aria-label":l?.a11ySearchInputClear,className:h,"data-testid":"nav-overlay-search-clear",onClick:f,type:"button",children:(0,o.jsx)(Bd,{className:Xn("search-clear-icon").toString()})})]}),(0,o.jsx)("div",{className:Xn("search-actions"),children:(0,o.jsx)("button",{className:Xn("search-submit-btn").mix("brand--ui"),"data-testid":"nav-overlay-search-submit",type:"submit",children:l?.search})})]})})]})},Op=V("nav-overlay"),O6="nav-content-overlay",OZ=({isExpanded:e,outlineRef:t})=>{const s=ud()[0],r=ld(s),i=Op("body",{section:r});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(uZ,{}),(0,o.jsx)("div",{className:i,ref:t,children:(0,o.jsx)(bZ,{isEnabled:e})})]})},BZ=({children:e,isImage:t,hasStickyHeader:n})=>{const s=Op("content",{graphic:t,"has-sticky-header":n});return(0,o.jsxs)("div",{className:s,"data-nav-scrollable":!0,"data-testid":"nav-overlay-content",children:[e,t&&(0,o.jsx)(vp,{})]})},DZ=({isExpanded:e})=>{const t=(0,u.useRef)(null),[n,s]=(0,u.useState)(null),r=ie(),i=vu(),a=(0,Ve.A)(e),c=r?.navigationStyle,l=r?.theme?.progressIndicatorStyle,d=r?.theme?.coverImageColor,h=c===Lr.ACCENT,m=c===Lr.TINT,f=Ho(c),p=c===Lr.GRAY,v=c===Lr.LIGHT,g=ic(c),x=l===ct.CIRCULAR_FILL,y=l===ct.INCOMPLETE_COMPLETE,[S,I]=(0,u.useState)(!0),{isIntersecting:b=!1}=E6(n,{root:t?.current,threshold:1})||{},T=(0,Ve.A)(b),L=(0,u.useMemo)(()=>g&&d===vt.LIGHT,[g,d]),E=Op({"accent-tint":m,accent:h,dark:f,gray:p,"image-dark-overlay":g&&!L,"image-light-overlay":g&&L,light:v,"progress-circular-fill":x,"progress-incomplete-complete":y,closing:a&&!e});return(0,u.useEffect)(()=>{e?t.current?.showModal():setTimeout(()=>{t.current?.close()},500)},[e]),(0,u.useEffect)(()=>{const k=N=>{Nn(N)&&!i.searchActive&&(N.preventDefault(),i.closeNav())};return e?document.addEventListener("keydown",k):document.removeEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[e,i]),(0,u.useEffect)(()=>{!S&&b?I(!0):T&&!b&&I(!1)},[b,S,T,I]),(0,o.jsx)("dialog",{"aria-labelledby":"nav-overlay-title","aria-modal":"true",className:E,"data-testid":"nav-overlay",id:O6,ref:t,children:(0,o.jsx)(BZ,{hasStickyHeader:S,isImage:g,children:i.searchActive?(0,o.jsx)(MZ,{}):(0,o.jsx)(OZ,{isExpanded:e,outlineRef:s})})})},Mc=V("nav-sidebar-search"),FZ=({className:e="",isEnabled:t})=>{const n=nt(),s=Xb(),r=(0,Ve.A)(t),{lessons:i}=ie(),a=Bo(),c=xe(),l=(0,u.useRef)(null),d=Mc({disabled:!t}).mix(e),h=Mc("icon"),m=Mc("input"),f=Mc("close"),p=Mc("close-icon"),v=a?.term,g=!t,[x,y]=(0,u.useState)(""),S=M6(),I=(0,u.useCallback)(()=>{n([Xx(!0),Qa(!1),Pr(null)]),y("")},[n]),b=(0,u.useCallback)(E=>{Nn(E)&&!bu()(x)?(E.preventDefault(),y(""),n(Pr(null))):Nn(E)&&bu()(x)&&I()},[n,I,x]),T=(0,u.useCallback)(E=>{v!=null&&n(Pr(null)),y(E.target.value)},[n,v]),L=(0,u.useCallback)(E=>{E.preventDefault(),P6(x,i,s??{},S,(N,P,A,R)=>n([Pr(N),Jx(P),eb(A),tb(R)]))},[n,i,s,x,S]);return(0,u.useEffect)(()=>{!r&&t&&setTimeout(()=>{l.current?.focus()},50)},[t,r]),(0,u.useEffect)(()=>{v&&v!==x&&y(v)},[x,v]),(0,o.jsxs)("form",{autoComplete:"off",className:d,"data-testid":"nav-sidebar-search",onSubmit:L,children:[(0,o.jsx)(hc,{className:h}),(0,o.jsx)("input",{"aria-label":c?.a11ySearchInput,className:m,disabled:g,name:"search",onChange:T,onKeyDown:b,placeholder:c?.search,ref:l,type:"search",value:x}),(0,o.jsx)("button",{"aria-label":c?.a11ySearchClose,className:f,onClick:I,type:"reset",children:(0,o.jsx)(Bd,{className:p})})]})},Bp=new WeakMap,B6=new ResizeObserver(e=>{requestAnimationFrame(()=>{for(const t of e)Bp.get(t.target)?.(t)})});function Iu(e,t){(0,u.useEffect)(()=>{if(e)return Bp.set(e,t),()=>Bp.delete(e)},[e,t]),(0,u.useEffect)(()=>{if(e)return B6.observe(e),()=>B6.unobserve(e)},[e])}const Jn=V("nav-sidebar-header"),_Z=V("nav-sidebar-header-ghost"),HZ=()=>ue(e=>e.ui.skipToNavButton?.offsetHeight??0),VZ=e=>{const{classProgressRunner:t,classProgressText:n,classProgressTrack:s,percentComplete:r,percentCompleteText:i}=e,a=Et(),c=(0,o.jsx)("div",{className:n,children:i});return(0,o.jsxs)("div",{className:Jn("progress"),"data-testid":"nav-sidebar-progress",children:[a===ne.APEX&&c,(0,o.jsx)(kp,{"aria-hidden":"true",progress:r,runnerClass:t,trackClass:s}),a!==ne.APEX&&c]})},zZ=({className:e,isCompact:t,isEnabled:n,navRefWidth:s,setIsCompact:r})=>{const i=nt(),a=ln(),[c,l]=(0,u.useState)(""),[d,h]=(0,u.useState)({height:0,width:0}),[m,f]=(0,u.useState)(d),[p,v]=(0,u.useState)(d),g=HZ(),[x,y]=(0,u.useState)(null),S=(0,u.useRef)(null),I=(0,u.useRef)(null),[b,T]=(0,u.useState)(null),L=ie(),E=nc(),k=xe(),N=Ti(),P=Bo(),A=A3(),R=ds(),j=Xl(),M=L?.exportSettings?.webExportSettings,w=!Ps.isInstantLink&&(L?.lmsOptions?.disableCoverPage||M?.disableCoverPage),O=L?.allowSearch&&j!=="restricted",B=L?.theme?.coverImageColor,D=L?.navigationStyle,_=(0,u.useMemo)(()=>ic(D),[D]),F=!!AQ(),$=(0,Ve.A)(P),z=(P?.active||F)??!1,[K,J]=(0,u.useState)(!0),[Q,U]=(0,u.useState)(null),H=Jn({compact:t,searching:z,transition:K}).mix(e),G=Jn("inner",{compact:t}),Y=Jn("content",{compact:t,hidden:z}),Z=Jn("graphic",{image:_}),q=Jn("progress-runner"),ee=Jn("progress-text",{compact:t}),se=Jn("progress-track"),re=Jn("search-area",{hidden:!z}),le=Jn("search-btn",{hidden:z}),Le=Jn("search-icon"),Te=Jn("title",{compact:t}),W=_Z({compact:t,searching:z}),Ie=`${R?`%${N}`:`${N}%`} ${k?.lessonComplete}`,ge=n&&!z?void 0:-1,we=n&&!z?void 0:-1,{alpha:ve,media:fe}=Ur("coverImage"),ut=(0,u.useMemo)(()=>{const Re={};return _&&Object.assign(Re,yi({alpha:ve,color:B??void 0,media:fe})),z&&(Re.height=m.height),Re},[ve,B,fe,_,z,m.height]),qt=(0,u.useMemo)(()=>{const Re={};return t&&(Re.bottom=`calc(100% - ${g}px)`,Re.width=s||0,Re.transition="width 0.3s",n||(Re.transition="width 0.3s",Re.width="0rem")),d.height&&(Re.height=d.height,Re.overflow="hidden",t&&(Re.transition="height 0.3s ease .1s, transform 0.3s ease .1s")),Re},[t,n,s,d.height,g]);(0,u.useEffect)(()=>{l(t&&A?b6(E??"",45):E)},[E,t,A]);const Be=z?void 0:{height:p.height},bt=(0,u.useCallback)(()=>{f(d),i(Qa(!0))},[i,d]),Je=(0,u.useCallback)(Re=>{Re.preventDefault(),ro(()=>{a("/")},"lesson-to-cover")},[a]);(0,u.useLayoutEffect)(()=>{U(document.querySelector("[data-nav-scrollable]"))},[]);const{isIntersecting:os=!1}=E6(x,{root:Q,threshold:0})||{},We=(0,Ve.A)(os);(0,u.useEffect)(()=>{const Re=b!=null&&window.innerHeight*.4>=b.offsetHeight;We&&!os&&Re?r(!0):!We&&os&&r(!1)},[os,We,b,r]);const sn=(0,u.useCallback)(({target:Re})=>{const Fe={height:Re?.scrollHeight??0,width:s??0};h(Fe),f(Fe),t||v(Fe)},[t,s]);Iu(b,sn),(0,u.useLayoutEffect)(()=>{const Re=Q?.scrollTop??0;(Q||Re>0)&&Q&&(Q.scrollTop=0);const Fe={height:b?.scrollHeight??0,width:s??0};h(Fe),f(Fe),v(Fe)},[Q,s,b]),(0,u.useEffect)(()=>{O&&$?.active&&!P?.active&&S?.current?.focus()},[O,P,$]),(0,u.useEffect)(()=>{z?J(!0):t&&J(!1)},[z,t]);const Xt=(0,u.useCallback)(Re=>{const Fe=Re.target;if(!(Fe instanceof HTMLElement)||!Fe.hasAttribute("data-nav-item")||!t||!b||!Q)return;const pt=b.getBoundingClientRect(),Es=Fe.getBoundingClientRect();pt.bottom>Es.top&&(Q.scrollTop-=pt.height-Es.top+5)},[Q,t,b]);return(0,mt.A)("focusin",Xt,Q),(0,u.useEffect)(()=>l(E),[E]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:W,ref:y,style:Be}),(0,o.jsx)("div",{className:H,"data-testid":"nav-sidebar-header",ref:I,style:qt,children:(0,o.jsxs)("div",{className:G,ref:T,children:[(0,o.jsx)("div",{className:Z,style:ut}),O&&(0,o.jsx)("button",{"aria-label":k?.a11ySearchOpen,className:le,onClick:bt,tabIndex:ge,type:"button",children:(0,o.jsx)(hc,{className:Le})}),(0,o.jsx)("div",{className:re,children:(0,o.jsx)(FZ,{isEnabled:n&&z})}),(0,o.jsxs)("div",{className:Y,children:[w?(0,o.jsx)("span",{className:Te,"data-testid":"nav-sidebar-title",tabIndex:we,children:c}):(0,o.jsx)(pn,{className:Te,"data-testid":"nav-sidebar-title",onClick:Je,tabIndex:we,to:"/",children:c}),(0,o.jsx)(VZ,{classProgressRunner:q,classProgressText:ee,classProgressTrack:se,percentComplete:N,percentCompleteText:Ie})]})]})})]})},$Z=V("nav-sidebar");function D6({closeNav:e,id:t,isEnabled:n,isSectionLesson:s,last:r}){const{navigationStyle:i}=ie(),{icon:a,settings:c}=$t(t)??{},l=Li(t),d=to(),h=Pc(),m=zm(String(t)),f=String(t)===d,p=c?.isGeneratingAIContent===!0,v=(0,u.useMemo)(()=>Ho(i),[i]),g=s?"nav-sidebar__outline-section-item":"nav-sidebar__outline-item",x=`${g}__link`,y=`${g}-link-icon`,S=(0,o.jsx)(xu,{className:y,icon:a??$n.ARTICLE}),[I,b]=(0,u.useState)(!1),T=(0,u.useCallback)(()=>b(!0),[]),L=(0,u.useCallback)(()=>b(!1),[]),E=(0,o.jsx)(hu,{canComplete:m,id:t,isDark:v,isEnabled:n,isTooltipVisible:I,onHideTooltip:L,onShowTooltip:T,scope:Eo.SIDEBAR}),k=()=>{e&&h&&e()};return(0,o.jsx)("li",{className:$Z("outline-list-item",{last:r}),"data-testid":`nav-outline-lesson-${t}`,role:"listitem",children:p?(0,o.jsx)("div",{className:g,children:(0,o.jsxs)("span",{"aria-disabled":"true",className:`${x} ${x}--generating`,"data-testid":`nav-outline-lesson-${t}-generating`,children:[S,l]})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(yc,{className:g,dark:v,isCurrentLesson:f,isTooltipEnabled:!m,lessonId:t,onHideProgressTooltip:L,onNavigate:k,onShowProgressTooltip:T,showProgressDelay:0,tooltipClassName:`${g}-tooltip`,children:[S,l,!m&&E]}),m&&E]})})}const UZ=({id:e})=>{const t=$t(e),n=Ct(t?.title);return(0,o.jsx)("span",{className:"nav-sidebar__outline-section-text",children:n})};var Ki=C(49860);const GZ=({closeNav:e,id:t,index:n,isEnabled:s,lessonIds:r})=>{const i=ie(),a=i?.theme,c=i?.themeId,l=a?.navigationSectionsExpanded??!0,d=Li(String(t)),[h,m]=Ki.useState(l);Ki.useEffect(()=>{m(l)},[l]);const[f,p]=Ki.useState(),v=Ki.useRef(null),g=`sidebar-sublist-${n}`,x=v.current?.clientWidth,y=String(c),S=h?"nav-sidebar__outline-section-toggle-icon":"nav-sidebar__outline-section-toggle-icon nav-sidebar__outline-section-toggle-icon--collapsed",I=h?"nav-sidebar__outline-section-list":"nav-sidebar__outline-section-list nav-sidebar__outline-section-list--collapsed",b=Ki.useCallback(()=>{m(T=>!T)},[]);return Ki.useLayoutEffect(()=>{const T=setTimeout(()=>{v.current&&p(v.current.scrollHeight)},0);return()=>{clearTimeout(T)}},[r.length,x,y]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("button",{"aria-controls":g,"aria-expanded":h,className:"nav-sidebar__outline-section-toggle","data-nav-item":"",onClick:b,tabIndex:s?void 0:-1,type:"button",children:[(0,o.jsx)("span",{className:"nav-sidebar__outline-section-toggle-text",children:d}),(0,o.jsx)(qy,{className:S})]}),(0,o.jsx)(au,{inert:!h,children:(0,o.jsx)("ol",{"aria-hidden":h?void 0:!0,className:I,id:g,ref:v,role:"list",style:{maxHeight:f},children:r.map((T,L)=>(0,o.jsx)(D6,{closeNav:e,id:T,isEnabled:s&&h,isSectionLesson:!0,last:L===r.length-1},T))})})]})},WZ=({closeNav:e,index:t,isEnabled:n,lessonIds:s})=>{const[r,...i]=s,a="nav-sidebar__outline-item nav-sidebar__outline-section";return Jt()(i)?(0,o.jsx)("li",{className:a,role:"listitem",children:(0,o.jsx)(UZ,{id:r})}):(0,o.jsx)("li",{className:a,role:"listitem",children:(0,o.jsx)(GZ,{closeNav:e,id:r,index:t,isEnabled:n,lessonIds:i})})},KZ=({closeNav:e,index:t,isEnabled:n,lessonIds:s})=>ld(s.map(String))?(0,o.jsx)(WZ,{closeNav:e,index:t,isEnabled:n,lessonIds:s}):s.map((i,a)=>(0,o.jsx)(D6,{closeNav:e,id:i,isEnabled:n,isSectionLesson:!1,last:a===s.length-1},i)),QZ=({className:e="",closeNav:t,isEnabled:n})=>{const s=ud(),[r,i]=(0,u.useState)(!n),a=xe(),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=[e,"nav-sidebar__outline",r?"nav-sidebar__outline--hidden":void 0,no.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),i(!1)):l.current=setTimeout(()=>{i(!0)},350),()=>{clearTimeout(l.current??void 0)}),[n]),(0,o.jsx)("section",{"aria-label":a?.a11yRegionNavOverview,className:d,"data-testid":"nav-sidebar-outline",id:"nav-sidebar-outline",children:ms(s)&&(0,o.jsx)("ol",{className:h,"data-testid":"nav-sidebar-outline-list",ref:c,role:"list",children:s.map((m,f)=>Jt()(m)?null:(0,o.jsx)(KZ,{closeNav:t,index:f,isEnabled:n,lessonIds:m},f))})})};var ZZ=C(4374);const Qi=V("nav-sidebar-result"),F6=({result:e})=>{const t=xe(),n=e?.icon??$n.ARTICLE,s=Ct(e?.title),r=e?.results??0,i=r===1?t?.result:t?.results,a=Qi("icon"),c=Qi("title"),l=Qi("count");return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xu,{className:a,icon:n}),(0,o.jsx)("span",{className:c,children:s}),(0,o.jsx)("span",{className:l,children:`${r} ${i}`})]})},YZ=({id:e,index:t,isEnabled:n,onSelectResult:s})=>{const r=ie(),i=(0,Ae.RQ)(hd),a=(0,Ae.RQ)(md),c=i??a,l=mP(String(e)),d=c?.params.lessonId===String(e),h=d?"page":void 0,m=r?.color,f=r?.navigationStyle,p=n?void 0:-1,v={animationDelay:`${t/10}s`},g=l?.id,x=Ei(g==null?void 0:String(g)),y=(0,u.useMemo)(()=>Ho(f),[f]),S=Qi(),I=Qi("inner",{active:d}),b=Qi("link",{dark:y,light:!y});return(0,o.jsx)("li",{className:S,role:"listitem",style:v,children:(0,o.jsx)("div",{className:I,style:{color:m},children:n&&x==null?(0,o.jsx)(pn,{"aria-current":h,className:b,onClick:s,tabIndex:p,to:Ln(e),children:(0,o.jsx)(F6,{result:l})}):(0,o.jsx)(G3,{className:b,restriction:x,tooltipClassName:"lesson-nav-link-tooltip",children:(0,o.jsx)(F6,{result:l})})})})},Tu=V("nav-sidebar-results"),qZ=[],XZ=({closeNav:e,isEnabled:t})=>{const{announcePolite:n}=Rs(),s=ie(),r=Bo(),i=xe(),c=(r?.activeLessons??qZ).filter(u2),l=r?.term,d=ms(c),h=(0,ZZ.A)(l),m=i?.noResults??"",f=s?.navigationStyle,p=(0,u.useMemo)(()=>Ho(f),[f]),v=Tu(),g=Tu("message",{dark:p,light:!p}),x=Tu("term"),y=Tu("list"),S=Zt(960),I=u.useCallback(()=>{S&&e()},[e,S]);return(0,u.useEffect)(()=>{if(h){const b=c.length===1?i?.result:i?.results,T=d?`${c.length} ${b}`:`${i?.noResults} ${l}`;n?.(T)}},[n,d,h,c,i,l]),(0,o.jsxs)("div",{className:v,"data-testid":"nav-sidebar-results",children:[!d&&h&&(0,o.jsxs)("div",{className:g,children:[m," ",(0,o.jsxs)("span",{className:x,children:['"',l,'"']})]}),d&&h&&(0,o.jsx)("ol",{className:y,"data-testid":"nav-sidebar-results-list",role:"list",children:c.map((b,T)=>(0,o.jsx)(YZ,{id:b.id,index:T,isEnabled:t,onSelectResult:I},b.id))})]})},Lu=V("nav-sidebar"),_6="nav-content-sidebar",JZ=({isExpanded:e,closeNav:t})=>{const n=ie(),s=Bo(),[r,i]=(0,u.useState)(!1),[a,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,p=n?.navigationStyle,v=n?.theme?.accentContrast,g=n?.theme?.progressIndicatorStyle,x=s?.active??!1,y=x||e?void 0:"true";(0,u.useLayoutEffect)(()=>{l&&l?.current&&c(l.current?.scrollWidth)},[r,e,l,x,c]);const S=(0,u.useMemo)(()=>lM(p),[p]),I=(0,u.useMemo)(()=>Ho(p),[p]),b=(0,u.useMemo)(()=>ic(p),[p]),T=b&&m===vt.LIGHT,L=fs(h),E=g===ct.CIRCULAR_FILL,k=g===ct.INCOMPLETE_COMPLETE,N=v?v===Ee.DARK||v===Ee.AUTO&&L===Ee.DARK:L===Ee.DARK,P=Lu("header"),A=Lu("body"),R=Lu("content"),j=Lu({accent:S,"dark-contrast":!b&&N,"light-contrast":!b&&!N,"legacy-pre-themes":f,"image-dark-overlay":b&&!T,"image-light-overlay":b&&T,"progress-circular-fill":E,"progress-incomplete-complete":k,collapsed:!e,dark:I,light:!I,searching:x});return(0,o.jsx)(au,{inert:!e,children:(0,o.jsx)(Sa,{children:(0,o.jsx)(N1,{in:e,mountOnEnter:!0,nodeRef:d,timeout:300,unmountOnExit:!0,children:(0,o.jsx)("div",{"aria-hidden":y,className:j,"data-testid":"nav-sidebar",ref:d,children:(0,o.jsxs)("div",{className:R,"data-nav-scrollable":!0,id:_6,children:[(0,o.jsx)(zZ,{className:P,isCompact:r,isEnabled:e,navRefWidth:a,setIsCompact:i}),(0,o.jsxs)("div",{className:A,"data-testid":"nav-sidebar-body",ref:l,children:[(0,o.jsx)(QZ,{closeNav:t,isEnabled:e&&!x}),(0,o.jsx)(XZ,{closeNav:t,isEnabled:e&&x})]})]})})})})})},Qr={x:null,y:null},Eu={passive:!0};function H6({children:e,onSwipeDown:t,onSwipeLeft:n,onSwipeRight:s,onSwipeUp:r,onShouldRecognizeGesture:i=()=>!0,thresholdX:a=100,thresholdY:c=100}){const l=(0,u.useRef)(),[d,h]=(0,u.useState)(Qr),[m,f]=(0,u.useState)(Qr),p=(0,u.useCallback)(y=>{const S=y.touches?.length??0,I=y.targetTouches[0],b=i?i():!0;S==1&&I&&b?h({x:I.clientX,y:I.clientY}):h(Qr)},[i]),v=(0,u.useCallback)(y=>{const S=y.targetTouches[0];S&&f({x:S.clientX,y:S.clientY})},[]),g=(0,u.useCallback)(()=>{h(Qr),f(Qr)},[]),x=(0,u.useCallback)(y=>{const S=y.touches?.length??0;if(d.x==null||d.y==null||m.x==null||m.y==null||S>0)return;const I=m.x-d.x,b=m.y-d.y;Math.abs(I)>Math.abs(b)?Math.abs(I)>a&&(I<0?n?.():s?.()):Math.abs(b)>c&&(b<0?r?.():t?.()),h(Qr),f(Qr)},[t,n,s,r,a,c,m,d]);return(0,mt.A)("touchstart",p,l.current,Eu),(0,mt.A)("touchcancel",g,l.current,Eu),(0,mt.A)("touchmove",v,l.current,Eu),(0,mt.A)("touchend",x,l.current,Eu),(0,o.jsx)("div",{ref:l,children:e})}H6.propTypes={children:Ot().oneOfType([Ot().arrayOf(Ot().element),Ot().element]).isRequired,onShouldRecognizeGesture:Ot().func,onSwipeDown:Ot().func,onSwipeLeft:Ot().func,onSwipeRight:Ot().func,onSwipeUp:Ot().func,thresholdX:Ot().number.isRequired,thresholdY:Ot().number.isRequired};function ku({isEnabled:e=!0,...t}){return e?(0,o.jsx)(H6,{...t}):(0,o.jsx)("div",{children:t.children})}ku.propTypes={children:Ot().oneOfType([Ot().arrayOf(Ot().element),Ot().element]).isRequired,isEnabled:Ot().bool.isRequired};const Nu={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},eY=[Nu.TABLET_PORTRAIT,Nu.TABLET_LANDSCAPE,Nu.MOBILE_PORTRAIT,Nu.MOBILE_LANDSCAPE],Oc=e=>eY.includes(e),tY=e=>(0,u.useMemo)(()=>{const t=window.matchMedia("(pointer: coarse)").matches,n=Oc(e);return t||n},[e]),Dp=(0,u.createContext)({isCourseNavOpen:!1});Dp.displayName="CourseNavigationContext";function nY(e){const{children:t,isCourseNavOpen:n}=e;return(0,o.jsx)(Dp.Provider,{value:{isCourseNavOpen:n},children:t})}function sY(){return(0,u.useContext)(Dp)}const V6=V("course-navigation"),{COMPACT:ju,OVERLAY:Fp,SIDEBAR:Zr}=Ir,oY={[ju]:L6,[Zr]:_6,[Fp]:O6},rY=({hasSearchResults:e,courseNavType:t,openNav:n,closeNav:s})=>{const[r,i]=(0,u.useState)(e);return(0,u.useEffect)(()=>{r&&!e&&!(t===Zr)?(s(),i(!1)):r&&t===Fp?n():i(e)},[e,t,n,s,r]),r},iY=({activeNavType:e,beginWithSidebarOpen:t,isNavOpen:n,isTablet:s,openNav:r,closeNav:i})=>{const[a,c]=(0,u.useState)();(0,u.useEffect)(()=>{e===Zr&&t&&(!a&&s&&n?i():a===!0&&!s&&!n&&r(),c(s))},[e,t,n,s,r,i,a])},aY=({beginWithSidebarOpen:e,children:t,closeNav:n,courseNavType:s,isNavOpen:r,isTablet:i,lessonNavType:a,openNav:c,previewType:l,toggleNav:d,hideNav:h})=>{const m=(0,u.useRef)(null),f=(0,u.useRef)(null),{active:p=!1}=Bo()??{},v=xe(),g=rY({hasSearchResults:p,courseNavType:s,openNav:c,closeNav:n}),x=(0,u.useMemo)(()=>g||s===ju&&i?Zr:s,[s,g,i]);iY({activeNavType:x,beginWithSidebarOpen:e,closeNav:n,openNav:c,isNavOpen:r,isTablet:i}),(0,u.useEffect)(()=>{const L=k=>{k.relatedTarget instanceof Node&&f.current?.contains(k.relatedTarget)===!0&&n()},E=()=>{f.current?.removeEventListener("click",n),f.current?.removeEventListener("keypress",n),f.current?.removeEventListener("blur",L,!0)};return x===ju&&r?(f.current?.addEventListener("click",n),f.current?.addEventListener("keypress",n),f.current?.addEventListener("blur",L,!0)):E(),E},[x,r,n]);const y=tY(l),S=(0,u.useCallback)(()=>{const L=x===Ir.SIDEBAR;y&&L&&r&&n()},[n,r,y,x]),I=(0,u.useMemo)(()=>x!=null?oY[x]:void 0,[x]),b=V6(x?.toLowerCase()??null,{"nav-open":r,"search-open":p&&r,"course-nav-type":s?.toLowerCase()}),T=V6("lessonNav",{type:a?.toLowerCase()});return(0,o.jsx)(nY,{isCourseNavOpen:r,children:(0,o.jsx)("div",{className:b,children:(0,o.jsx)(ku,{isEnabled:x===Ir.SIDEBAR,onSwipeLeft:S,children:(0,o.jsxs)("div",{className:T,children:[(0,o.jsxs)("nav",{"aria-label":v?.a11yRegionNavLesson,children:[(0,o.jsx)(MQ,{"aria-controls":I,hideNav:h,isNavOpen:r,toggleNav:d}),x===Zr&&(0,o.jsx)(JZ,{closeNav:n,isExpanded:r}),x===ju&&(0,o.jsx)(aZ,{closeNav:n,isExpanded:r,openNav:c,ref:m}),x===Fp&&(0,o.jsx)(lZ,{closeNav:n,openNav:c,children:(0,o.jsx)(DZ,{isExpanded:r})})]}),(0,o.jsx)("div",{ref:f,children:t})]})})})})},cY=({children:e,isLessonOnlyEmbed:t,...n})=>{const{buttonNavigationStyle:s,navigationType:r,lmsOptions:i,...a}=ie(),c=Pc(),l=Bm(a)===!0,d=!c,h=a.sidebarMode===ui.OPEN,m=l&&r===Zr&&h&&d,f=ls(a),p=f&&a?.theme?.blockNavigationType===_a.CONTINOUS,[v,g]=(0,u.useState)(m),x=(0,u.useCallback)(()=>{g(!0)},[]),y=(0,u.useCallback)(()=>{g(!1)},[]),S=(0,u.useCallback)(()=>v?y():x(),[v,y,x]);(0,mt.A)(Ly,x),(0,mt.A)(Ey,y);const I=f||t===!0,b=I?"fixed-course-exit":void 0,T=p?{marginInlineEnd:"2rem"}:void 0,L=l?r:void 0;return I?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x6,{className:b,lmsOptions:i,style:T}),e]}):(0,o.jsx)(aY,{...n,beginWithSidebarOpen:h,closeNav:y,courseNavType:L,hideNav:!l,isNavOpen:v,isTablet:c,lessonNavType:s,openNav:x,toggleNav:S,children:e})};var z6=C(26665);const Zi=e=>e===Zs.FLOATING||e===Zs.FLOATING_FULL;function Yr(){const e=jP();return Zt(480)&&e===Zs.FLOATING?Zs.FLOATING_FULL:e}function $6({className:e,ref:t}){return(0,o.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,o.jsx)("path",{d:"M2 8L7.65685 13.6569L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}const lY=V("lesson-nav");function dY(e){const{children:t,finish:n,lessonId:s,onFocus:r}=e,i=ln(),a=e["data-direction"];if(s!=null)return(0,o.jsx)(yc,{className:"lesson-nav-link","data-direction":a,lessonId:s,onFocus:r,tooltipClassName:a==="previous"?"lesson-nav-link-tooltip-previous":"lesson-nav-link-tooltip",children:t});const c=n?DC:"/",l=d=>{if(d.preventDefault(),c==="/"){ro(()=>{i(c)},"lesson-to-cover");return}i(c)};return(0,o.jsx)("span",{className:"lesson-nav-link",children:(0,o.jsx)(pn,{className:"lesson-nav-link__link","data-direction":e["data-direction"],onClick:l,onFocus:r,to:c,children:t})})}function Yi({children:e,className:t,direction:n,finish:s,navLessonId:r,onFocus:i,ref:a,restrictionType:c}){const d=Or()?.theme?.buttonScheme,h=c!=null,m=Yr(),p={className:lY(null,{[n]:!0,accent:d===Ha.ACCENT,dark:d===Ha.DARK,floating:m===Zs.FLOATING,"floating-full":m===Zs.FLOATING_FULL,finish:s,full:m===Zs.FULL,light:d===Ha.LIGHT,restricted:h,tint:d===Ha.TINT}).mix(t),[`data-${n}-lesson`]:!0};return(0,o.jsx)("div",{ref:a,...p,children:(0,o.jsx)(dY,{"data-direction":n,finish:s,lessonId:r,onFocus:i,children:e})})}const U6=V("lesson-nav");function uY({allowTooltip:e,lessonNameLabel:t,nextLesson:n,nextLessonNumber:s,onFocus:r,ref:i,restrictionData:a,restrictionType:c}){const l=n?.id,d=Yr(),h=Zi(d),f=hi(n)&&l,p=Pe(n?.title)||"",v=h?Ef:$6,g=f?`${t} ${s} - `:"",x=h&&f?`${t} ${s}`:`${g}${p}`;return(0,o.jsxs)(Yi,{allowTooltip:e,direction:"next",isFloating:h,navLessonId:l,onFocus:r,ref:i,restrictionData:a,restrictionType:c,children:[(0,o.jsx)("span",{className:U6("link-text").mix("brand--ui"),children:x}),(0,o.jsx)(v,{className:U6("link-icon")})]})}function hY(e){const t=xe(),n=KM(e),s=QM(e),r=$m(),i=n?.id,a=Ei(i),c=Ct(a?.data);return{lessonNameLabel:t?.lessonName,lessonPrepositionLabel:t?.lessonPreposition,nextLesson:n,nextLessonNumber:s,restrictionData:i?c:void 0,restrictionType:i?a?.type:void 0,totalLessons:r}}const wu=V("lesson-nav");function mY({allowTooltip:e,lessonNameLabel:t,lessonPrepositionLabel:n,nextLesson:s,nextLessonNumber:r,onFocus:i,ref:a,restrictionData:c,restrictionType:l,totalLessons:d}){const h=s?.id,m=Yr(),f=Zi(m),v=s&&hi(s)&&h,g=Pe(s?.title)||"",x=v?`${r} ${n} ${d} \u2014 ${g}`:g,y=f&&v?`${t} ${r}`:x;return(0,o.jsx)(Yi,{allowTooltip:e,direction:"next",navLessonId:h,onFocus:i,ref:a,restrictionData:c,restrictionType:l,children:f?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:wu("link-text"),children:y}),(0,o.jsx)(Od,{className:wu("link-icon")})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Od,{className:wu("link-icon")}),(0,o.jsx)("span",{className:wu("link-text"),children:y})]})})}function G6({lessonId:e,...t}){const n=hY(e);return Et()===ne.RISE_CLASSIC?(0,o.jsx)(uY,{...t,lessonNameLabel:n.lessonNameLabel,nextLesson:n.nextLesson,nextLessonNumber:n.nextLessonNumber,restrictionData:n.restrictionData,restrictionType:n.restrictionType}):(0,o.jsx)(mY,{...t,...n})}const W6=V("lesson-nav");function fY({allowTooltip:e,courseFinishLabel:t,onFocus:n,restrictionData:s,restrictionType:r,ref:i}){const a=Yr(),c=Zi(a),l=c?Ef:$6;return(0,o.jsxs)(Yi,{allowTooltip:e,direction:"next",finish:!0,isFloating:c,onFocus:n,ref:i,restrictionData:s,restrictionType:r,children:[(0,o.jsx)("span",{className:W6("link-text").mix("brand--ui"),children:t}),(0,o.jsx)(l,{className:W6("link-icon")})]})}const Ru=V("lesson-nav");function pY({allowTooltip:e,courseFinishLabel:t,onFocus:n,ref:s,restrictionData:r,restrictionType:i}){const a=Yr(),c=Zi(a);return(0,o.jsx)(Yi,{allowTooltip:e,direction:"next",finish:!0,onFocus:n,ref:s,restrictionData:r,restrictionType:i,children:c?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:Ru("link-text"),children:t}),(0,o.jsx)(Od,{className:Ru("link-icon")})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Od,{className:Ru("link-icon")}),(0,o.jsx)("span",{className:Ru("link-text"),children:t})]})})}function _p(e){const n=xe()?.courseFinish??"Finish";return Et()===ne.RISE_CLASSIC?(0,o.jsx)(fY,{...e,courseFinishLabel:n}):(0,o.jsx)(pY,{...e,courseFinishLabel:n})}function gY({className:e,ref:t}){return(0,o.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,o.jsx)("path",{d:"M2 8L7.65685 2.34315L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}const Au=V("lesson-nav");function vY({allowTooltip:e,className:t,courseHomeLabel:n,lessonNameLabel:s,onFocus:r,previousLesson:i,previousLessonNumber:a,ref:c,restrictionData:l,restrictionType:d}){const h=i?.id,m=Yr(),f=Zi(m),v=hi(i)&&h,g=Pe(i?.title)||n,x=f?Hy:gY,y=v?`${s} ${a} - ${g}`:g,S=v&&f?`${s} ${a}`:y;return(0,o.jsx)(Yi,{allowTooltip:e,className:t,direction:"previous",isFloating:f,navLessonId:h,onFocus:r,ref:c,restrictionData:l,restrictionType:d,children:f?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:Au("link-text").mix("brand--ui"),children:S}),(0,o.jsx)(x,{className:Au("link-icon")})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{className:Au("link-icon")}),(0,o.jsx)("span",{className:Au("link-text").mix("brand--ui"),children:S})]})})}const Pu=V("lesson-nav");function CY({allowTooltip:e,className:t,courseHomeLabel:n,lessonNameLabel:s,lessonPrepositionLabel:r,onFocus:i,previousLesson:a,previousLessonNumber:c,ref:l,restrictionData:d,restrictionType:h,totalLessons:m}){const f=a?.id,p=Yr(),v=Zi(p),x=hi(a)&&f!=null,y=Ct(a?.title)??n,S=x?`${c} ${r} ${m} \u2014 ${y}`:y,I=v&&x?`${s} ${c}`:S;return(0,o.jsx)(Yi,{allowTooltip:e,className:t,direction:"previous",navLessonId:f,onFocus:i,ref:l,restrictionData:d,restrictionType:h,children:v?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:Pu("link-text"),children:I}),(0,o.jsx)(Yy,{className:Pu("link-icon")})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Yy,{className:Pu("link-icon")}),(0,o.jsx)("span",{className:Pu("link-text"),children:I})]})})}function Hp({lessonId:e,...t}){const n=oO(e),s=rO(e),r=$m(),i=xe(),a=Et(),c=n?.id,l=Ei(c),d=Ct(l?.data),h=c!=null?d:void 0,m=c!=null?l?.type:void 0;return a===ne.RISE_CLASSIC?(0,o.jsx)(vY,{...t,courseHomeLabel:i?.courseHome,lessonNameLabel:i?.lessonName,previousLesson:n,previousLessonNumber:s,restrictionData:h,restrictionType:m}):(0,o.jsx)(CY,{...t,courseHomeLabel:i?.courseHome,lessonNameLabel:i?.lessonName,lessonPrepositionLabel:i?.lessonPreposition,previousLesson:n,previousLessonNumber:s,restrictionData:h,restrictionType:m,totalLessons:r})}const xY={threshold:0},Mu=(e,t)=>{const[n,s]=(0,u.useState)(!1),r=(0,u.useRef)(null);return(0,u.useEffect)(()=>{r.current&&r.current.disconnect(),r.current=new IntersectionObserver(([a])=>{s(a.isIntersecting)},t||xY);const{current:i}=r;return e.current?i.observe(e.current):s(!1),()=>{i.disconnect()}},[e,t]),n},K6=V("navButtonsFull"),bY=({isVisible:e})=>{(0,z6.A)(()=>window.dispatchEvent(new CustomEvent(Cf))),(0,u.useEffect)(()=>{const t=e?ky:Cf;window.dispatchEvent(new CustomEvent(t))},[e])},yY=({isVisible:e})=>{(0,z6.A)(()=>window.dispatchEvent(new CustomEvent(xf))),(0,u.useEffect)(()=>{const t=e?Ny:xf;window.dispatchEvent(new CustomEvent(t))},[e])},SY=({children:e,hideNavToHome:t,isTransitioning:n=!1,navNextEnabled:s,navFinishEnabled:r})=>{const i=(0,u.useRef)(null),a=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=to(),h=Mu(a),m=Mu(c),f=(0,u.useCallback)(()=>{i.current?.scrollTo({top:0,behavior:"smooth"})},[]),p=(0,u.useCallback)(()=>{const g=i.current?.scrollHeight;i.current?.scrollTo({top:g,behavior:"smooth"})},[]);(0,mt.A)(Td,f),(0,mt.A)(Ld,p),bY({isVisible:h}),yY({isVisible:m}),(0,u.useEffect)(()=>{if(!n&&a.current){const x=(a.current?.clientHeight??0)+1;i.current?.scrollTo({top:x})}},[n]);const v=K6("navPrev",{visible:h,hide:n});return(0,o.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:i,children:(0,o.jsxs)("div",{className:K6(),children:[!t&&d&&(0,o.jsx)("div",{className:v,children:(0,o.jsx)(Hp,{lessonId:d,ref:a})}),e,s&&d&&(0,o.jsx)(G6,{lessonId:d,ref:c}),r&&(0,o.jsx)(_p,{lessonId:d,ref:l})]})})},Bc=V("navButtonsFloating"),Q6=({transitionIn:e,buttonType:t,children:n})=>{const s=(0,u.useRef)(null),r={entered:Bc(t,{entered:!0}),exiting:Bc(t,{exiting:!0}),exited:Bc(t,{exited:!0})};return(0,o.jsx)(N1,{in:e,nodeRef:s,timeout:250,children:i=>(0,o.jsx)("div",{className:r[i],ref:s,children:n})})},Z6={threshold:.2},IY=({topRef:e,bottomRef:t,pageWrapRef:n,isTransitioning:s})=>{const r=Mu(e,Z6),i=Mu(t,Z6),[a,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)(!1),h=(0,u.useRef)(s),m=(0,u.useCallback)(()=>{n.current?.scrollTo({top:2,behavior:"smooth"})},[n]);return(0,jc.A)(m),(0,u.useEffect)(()=>{const f=h.current;h.current=s,f&&!s&&m()},[s,m]),(0,u.useEffect)(()=>{c(i&&!s),d(r&&!s)},[i,r,s]),{showPrev:l,showNext:a}},TY=({children:e,isCurrentLessonQuiz:t,isTransitioning:n=!1,navNextEnabled:s,hideNavToHome:r,navFinishEnabled:i})=>{const a=(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=to(),{showNext:p,showPrev:v}=IY({topRef:h,bottomRef:m,pageWrapRef:a,isTransitioning:n}),g=(0,u.useCallback)(()=>{a.current?.scrollTo({top:0,behavior:"smooth"})},[]),x=(0,u.useCallback)(()=>{const y=a.current?.scrollHeight;a.current?.scrollTo({top:y,behavior:"smooth"})},[]);return(0,mt.A)(Td,g),(0,mt.A)(Ld,x),(0,u.useEffect)(()=>{t&&(s||i)&&x()},[t,s,i,x]),(0,o.jsxs)("div",{className:"page-wrap",id:"page-wrap",ref:a,children:[(0,o.jsx)("div",{className:Bc("top"),ref:h}),!r&&f&&(0,o.jsx)(Q6,{buttonType:"prev",transitionIn:v,children:(0,o.jsx)(Hp,{lessonId:f,onFocus:g,ref:c})}),e,(0,o.jsx)(Q6,{buttonType:"next",transitionIn:p&&!!(s||i),children:s&&f?(0,o.jsx)(G6,{lessonId:f,onFocus:x,ref:l}):i?(0,o.jsx)(_p,{lessonId:f,onFocus:x,ref:d}):null}),(0,o.jsx)("div",{className:Bc("bottom"),ref:m})]})},Y6=(0,u.createContext)("present"),q6=(0,u.createContext)(!0);function LY({status:e,mediaActive:t,children:n}){return(0,o.jsx)(Y6.Provider,{value:e,children:(0,o.jsx)(q6.Provider,{value:t,children:n})})}function Vp(){return(0,u.useContext)(Y6)}function EY(){return(0,u.useContext)(q6)}function Ou(e){return{finished:e.finished,cancel:()=>e.cancel(),progress:()=>{const t=e.effect?.getComputedTiming().progress;return typeof t=="number"?t:null}}}function X6(e,t,n,s){return{key:e,instanceId:s,status:t,direction:n}}function kY(e,t,n){const s=e.generation+1,r=e.items.find(l=>l.key===t);let i;r!=null?i={...r,status:"entering",direction:n}:i=X6(t,"entering",n,s);const a=e.items.filter(l=>l.key!==t).map(l=>({...l,status:"exiting",direction:n})),c=a.length>1?a.slice(0,1):a;return{currentKey:t,generation:s,items:[i,...c]}}function NY(e,t,n,s){return s==="exit"?{...e,items:e.items.filter(r=>!(r.key===t&&r.instanceId===n))}:{...e,items:e.items.map(r=>r.key===t&&r.instanceId===n?{...r,status:"present"}:r)}}function jY(e,t){switch(t.type){case"ROUTE_CHANGED":return kY(e,t.nextKey,t.direction);case"ITEM_FINISHED":return t.generation!==e.generation?e:NY(e,t.key,t.instanceId,t.phase)}}const J6="(prefers-reduced-motion: reduce)";function wY(e){if(typeof window>"u"||!window.matchMedia)return()=>{};const t=window.matchMedia(J6);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function RY(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia(J6).matches}const AY=()=>!1;function PY(e){return(e.find(n=>n.status==="exiting")??e.find(n=>n.status==="present")??e[0])?.instanceId??null}function e5({current:e,animate:t,getDirection:n,reducedMotion:s,initialStatus:r="present",initialDirection:i="forward",animationTimeoutMs:a=1500,onEntered:c,onExited:l}){const d=(0,u.useSyncExternalStore)(wY,RY,AY),h=s??d,[m,f]=(0,u.useReducer)(jY,e,T=>({currentKey:T,generation:0,items:[X6(T,r,i,0)]}));m.currentKey!==e&&f({type:"ROUTE_CHANGED",nextKey:e,direction:n(m.currentKey,e)});const p=(0,u.useRef)(new Map),v=(0,u.useRef)(new Map),g=T=>{let L=p.current.get(T);return L||(L=E=>{E?v.current.set(T,E):v.current.delete(T)},p.current.set(T,L)),L},x=(0,u.useRef)(new Map),y=(0,u.useRef)(new Map),S=(0,u.useRef)(c),I=(0,u.useRef)(l);S.current=c,I.current=l;const b=(0,u.useRef)([]);return(0,u.useEffect)(()=>{const T=b.current;if(T.length!==0){b.current=[];for(const L of T)try{L.type==="enter"?S.current?.(L.key,L.instanceId):I.current?.(L.key,L.instanceId)}catch(E){console.error("useTransitionPresence callback threw:",E)}}},[m.items]),(0,u.useLayoutEffect)(()=>{const T=k=>{const N=y.current.get(k);N!=null&&(clearTimeout(N),y.current.delete(k))},L=(k,N,P,A)=>{T(N),f({type:"ITEM_FINISHED",key:k,instanceId:N,phase:P,generation:A}),b.current.push({type:P==="enter"?"enter":"exit",key:k,instanceId:N})},E=new Set(m.items.map(k=>k.instanceId));for(const[k,N]of Array.from(x.current.entries()))E.has(k)||(N.handle.cancel(),x.current.delete(k),T(k));m.items.forEach(k=>{if(k.status==="present")return;const N=k.status==="entering"?"enter":"exit",P=x.current.get(k.instanceId);if(P&&P.phase===N&&P.generation===m.generation&&P.reducedMotion===h)return;let A=null;P&&(P.phase!==N&&P.direction!==k.direction&&(A=P.handle.progress?.()??null),P.handle.cancel(),x.current.delete(k.instanceId),T(k.instanceId));const R=m.generation,j=v.current.get(k.instanceId);if(!j){L(k.key,k.instanceId,N,R);return}const M=t(j,{phase:N,direction:k.direction,reducedMotion:h,fromProgress:A});if(!M){L(k.key,k.instanceId,N,R);return}x.current.set(k.instanceId,{handle:M,phase:N,direction:k.direction,generation:R,instanceId:k.instanceId,reducedMotion:h});const w=setTimeout(()=>{const O=x.current.get(k.instanceId);O?.handle===M&&O.generation===R&&(O.handle.cancel(),x.current.delete(k.instanceId),L(k.key,k.instanceId,N,R))},a);y.current.set(k.instanceId,w),Promise.resolve(M.finished).then(()=>{const O=x.current.get(k.instanceId);O?.handle===M&&O.generation===R&&(x.current.delete(k.instanceId),L(k.key,k.instanceId,N,R))},()=>{const O=x.current.get(k.instanceId);O?.handle===M&&O.generation===R&&(x.current.delete(k.instanceId),L(k.key,k.instanceId,N,R))})})},[m.items,m.generation,t,h,a]),(0,u.useEffect)(()=>{const T=new Set(m.items.map(L=>L.instanceId));for(const L of Array.from(p.current.keys()))T.has(L)||p.current.delete(L)},[m.items]),(0,u.useEffect)(()=>()=>{x.current.forEach(({handle:T})=>T.cancel()),x.current.clear(),y.current.forEach(T=>clearTimeout(T)),y.current.clear()},[]),{presence:m.items.map(T=>({key:T.key,instanceId:T.instanceId,status:T.status,direction:T.direction,ref:g(T.instanceId)})),isTransitioning:m.items.some(T=>T.status!=="present"),mediaOwnerInstanceId:PY(m.items)}}const zp=750,t5=300,MY=59.9375,OY="ease",n5="100vh",_xe=zp+t5+750,BY=e=>e.querySelector(".page__wrapper")??e,DY=(e,t)=>{let n=0,s=e;for(;s instanceof HTMLElement&&s!==t&&t.contains(s);)n+=s.offsetTop,s=s.offsetParent;return n},FY=()=>{const e=document.getElementById("page-wrap");if(!e)return 0;const t=e.querySelector('[data-lesson-transition]:not([data-state="exiting"])'),n=t?DY(t,e):0;return Math.max(0,e.scrollTop-n)},_Y=(e,t,n)=>{const s=document.getElementById("page-wrap");s&&(s.scrollTop=0),e.scrollTop=n;const r=n-e.scrollTop;r>0&&t!==e&&(t.style.minBlockSize=`${t.offsetHeight+r}px`,e.scrollTop=n)},HY=()=>typeof window<"u"&&window.matchMedia(`(max-width: ${MY}em)`).matches?t5:0,s5=(e,t,n)=>{t!=null&&(e.currentTime=n+(1-t)*zp)},VY=(e,{phase:t,direction:n,reducedMotion:s,fromProgress:r},i=0)=>{const a=BY(e);if(a.style.minBlockSize="",t==="exit"&&_Y(e,a,i),s)return null;const c=t==="enter"?a:e;if(typeof c.animate!="function")return null;const l=HY(),d={duration:zp,easing:OY,fill:t==="exit"?"forwards":"auto",delay:l};if(t==="exit"){const f=n==="forward"?"-100%":"100%",p=c.animate([{transform:"translate3d(0, 0, 0)",opacity:1},{transform:`translate3d(0, ${f}, 0)`,opacity:.5}],d);return s5(p,r,l),Ou(p)}const h=n==="forward"?"100%":"-100%",m=c.animate([{height:n5,transform:`translate3d(0, ${h}, 0)`},{height:n5,transform:"translate3d(0, 0, 0)"}],d);return s5(m,r,l),Ou(m)},o5=(e,t)=>e===Ua?1/0:t.findIndex(n=>String(n.id)===String(e));function zY(e,t,n){if(e===null||e===t)return"forward";const s=o5(e,n);return o5(t,n)>s?"forward":"backward"}function $Y({children:e,currentLessonId:t,lessons:n,onLessonEntered:s,onTransitioningChange:r}){const i=(0,u.useRef)(new Map);i.current.set(t,e);const a=(0,u.useRef)(t),c=(0,u.useRef)(0);a.current!==t&&(a.current=t,c.current=FY());const l=(0,u.useCallback)((p,v)=>VY(p,v,c.current),[]),{presence:d,isTransitioning:h,mediaOwnerInstanceId:m}=e5({current:t,animate:l,getDirection:(p,v)=>zY(p,v,n),animationTimeoutMs:1800,onEntered:p=>{s?.(String(p))}});(0,u.useEffect)(()=>{r?.(h)},[h,r]);const f=new Set(d.map(p=>String(p.key)));for(const p of i.current.keys())f.has(p)||i.current.delete(p);return(0,o.jsx)(o.Fragment,{children:d.map(p=>{const v=String(p.key),g=p.status==="present";return(0,o.jsx)("div",{"aria-hidden":!g,"data-direction":p.direction,"data-lesson-transition":!0,"data-state":p.status,inert:g?void 0:!0,ref:p.ref,children:(0,o.jsx)(LY,{mediaActive:p.instanceId===m,status:p.status,children:i.current.get(v)})},p.instanceId)})})}var UY=C(89858),$p=C.n(UY);const GY=$p()(at()("family","continue"),at()("variant","continue")),WY=$e()(ub()(GY),Bn()([],"items")),{FULL:KY,FLOATING:r5}=Zs,QY=V("lessonNavigation"),ZY=({children:e})=>{const t=(0,u.useRef)(null);return(0,o.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:t,children:e})},YY=(e,t)=>typeof t=="object"&&t!==null&&"drawCount"in t&&typeof t.drawCount=="number"?e+t.drawCount:e+1,qY=(e=[])=>e.reduce(YY,0),XY=({children:e,isLessonOnlyEmbed:t,onLessonEntered:n})=>{const s=ie(),r=s.buttonNavigationStyle,{showNavigationButtons:i,lessonsOnly:a,lmsOptions:c}=s,l=(0,u.useRef)(null),d=Zt(480),h=to(),m=$t(h),f=Vo(h),[p,v]=(0,u.useState)(r),[g,x]=(0,u.useState)(!1),y=a?.[0]?.id,S=s.exportSettings?.webExportSettings?.disableCoverPage===!0,I=!Ps.isInstantLink&&(c?.disableCoverPage===!0||S)&&y===h,b=!Ps.isInstantLink&&c?.disableCoverPage===!0,T=c?.disableCoverPage===!0?I:b;(0,u.useEffect)(()=>{r!==p&&(v(r),window.dispatchEvent(new CustomEvent(Td)))},[r,p]);const L=m!=null&&m.type!=null?m:void 0,E=L!=null&&(WY(L)||FC(L))?f?.isComplete===!0:!0,k=L?.type==="quiz",N=f?.type==="quiz"?f.activeIndex:void 0,P=k&&N!=null&&N===qY(L.items)+1,{skipLessonsIfPassed:A,skipLessonsOptional:R,skipToLessonId:j}=Um(h),M=f?.type==="quiz"&&f.passed===!0,w=k&&M&&A&&!R&&!!j,O=k&&!P||L?.settings?.continueType==="continue"||w,B=m!=null?f2({course:s,lesson:m}):void 0,D=B!=null&&B!==!1,_=h===Ua,F=window.isPublicShare===!0,$=D&&t!==!0&&E&&!O&&!_,z=!D&&E&&!1,K=QY("wrapper",{full:r===KY||d,floating:r===r5&&!d}),Q=i!==!0||t===!0?ZY:r===r5&&!d?TY:SY;(0,u.useEffect)(()=>{const G=document.querySelector(".page__content");G&&G.classList.add("page__content--preview-nav")},[Q]);const U=s?.lessons??[],H=h?(0,o.jsx)($Y,{currentLessonId:h,lessons:U,onLessonEntered:n,onTransitioningChange:x,children:e}):e;return(0,o.jsx)("div",{className:K,ref:l,children:(0,o.jsx)(Q,{hideNavToHome:T,isTransitioning:g,navFinishEnabled:z,navNextEnabled:$,children:H})})};var JY=C(97954);function Bu({block:e,children:t}){const[n,s]=(0,u.useState)(e);return e!=null&&e!==n&&s(e),(0,o.jsx)(Wm.Provider,{value:n,children:(0,o.jsx)(ef,{...n?.settings,children:t})})}const Vxe=Wm.Consumer;function Du(e){return function(n){const s=Ut();return(0,o.jsx)(e,{...n,block:s})}}const i5=()=>(0,o.jsx)("div",{className:"unsupported-block",children:(0,o.jsxs)("span",{children:["We no longer support this block, so you can safely delete it. If you have any questions, please"," ",(0,o.jsx)("a",{href:"https://access.articulate.com/support/contact",children:"contact Articulate Support."})]})}),$xe=null;function a5(e,t){return`${e}/${t}`}function eq(e,{prepareProps:t,extras:n}){const s={...e,...n};return function(i){const a=s[a5(i.family,i.variant)];if(!a)return(0,o.jsx)(i5,{});if(a.render)return a.render(i);const{Component:c,propsBefore:l,propsAfter:d}=a;if(c===null)return null;const h={...l?.(i),...t(i),...d?.(i)};return(0,u.createElement)(c,h)}}function Up(e){const{type:t,dividerNumber:n,...s}=e;return s}const tq=e=>{const{effectiveBackgroundType:t,blockImage:n}=e;return t!==oe.IMAGE?null:n??null},nq=e=>xC(e?.alt),sq=e=>{if(!e)return null;const{alpha:t,overlayColor:n=vt.DARK}=e,s=Tt(e),r=n===vt.LIGHT?"#fff":"#000";return td({alpha:t,color:r,url:s})};function oq(){return Wn().toLowerCase()}function Fu(){const e=Ut(),t=Wn(),n=e?.background,s=Pe(n?.media)?.image;return tq({effectiveBackgroundType:t,blockImage:s})}function rq(){const e=Fu();return nq(e)}function iq(){const e=Fu();return sq(e)}function aq(){const e=Fu();return!!e&&e?.overlayColor===vt.LIGHT}function cq(){const e=Ut(),t=e?.family,n=e?.variant,s=wO(t,n),r=e?.settings?.cardMode??Gn.WHITE;return s?r.toLowerCase():null}function lq(){const e=En(),t=e?Ni(e):Lt.LIGHT;return pu()(t.toLowerCase())}function dq(){const e=Ut(),t=He(),n=zo();return WO({blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:n?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function uq(){const e=He(),t=fn(),n=En(),s=Ut(),r=Wn(),i=dq(),a=t.accentColor||e?.theme?.colorAccent;return QO({accentColor:a,accentContrast:e?.theme?.accentContrast,backgroundColor:n,backgroundType:r,customBackgroundColorContrast:i,family:s?.family,variant:s?.variant})}function hq(){const e=Ut(),t=He(),n=En(),s=zo();return YO({backgroundColor:n,blockCustomContrast:e?.settings?.customBackgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast,family:e?.family,familyBackgroundColorContrast:s?.backgroundColorContrast,variant:e?.variant})}function mq(){const e=Ut(),t=He(),n=zo();return ZO({blockBackgroundType:e?.settings?.backgroundType,familyBackgroundType:n?.backgroundType,courseBackgroundType:t?.theme?.blockBackgroundType,blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:n?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function Gp(){const e=oq(),t=lq(),n=cq(),s=uq(),r=aq(),i=mq(),a=En(),c=iq(),l=rq();return{backgroundColor:a,backgroundImageAlt:l,backgroundImageCss:c,backgroundTypeLowercase:e,cardMode:n,colorRange:t,isContrastLight:s,isLegacyBackground:i,isOverlayLight:r}}function fq(e,t){const{className:n="",tag:s="div",style:r={},...i}=e,{backgroundColor:a}=fn(),c=hq(),l=c===At.DARK?At.LIGHT:At.DARK;return a!==""&&Object.assign(r,{"--color-background-contrast":c,"--color-background-contrast-complementary":l,"--color-background-contrast-rgb":Wo(c)?.slice(0,3)}),(0,o.jsx)(s,{...i,className:n,ref:t,style:r})}const c5=(0,u.forwardRef)(fq),pq=10,l5=e=>`${e}rem`,Wp=e=>e!=null?`${e/pq}rem`:void 0,gq=["image full","image text overlay","quote background"];function vq(e){const{family:t,variant:n,backgroundType:s,isOnlyBlockInStep:r,isOnePage:i}=e;if(!i||!r)return!1;if(s===oe.IMAGE)return!0;if(!t||!n)return!1;const a=`${t} ${n}`;return gq.some(c=>c===a)}const d5={paddingBottom:"0rem",paddingTop:"0rem"},Cq=e=>{const{blockSettings:t,familyTheme:n,courseTheme:s,isFullWidthImage:r,isPresentation:i}=e;if(i)return{...d5,paddingLeft:"0rem",paddingRight:"0rem"};if(r)return d5;const a=l5(Number(B2(t?.paddingTop,n?.paddingStart,s?.blockPaddingStart,3)));return{paddingBottom:l5(Number(B2(t?.paddingBottom,n?.paddingEnd,s?.blockPaddingEnd,3))),paddingTop:a}},xq=e=>({"--rise-block-padding-top":e.paddingTop,"--rise-block-padding-bottom":e.paddingBottom,"--rise-block-padding-left":e.paddingLeft,"--rise-block-padding-right":e.paddingRight}),bq={},yq=e=>e?{bodyFontSize:Wp(e.bodyFontSize),headingFontSize:Wp(e.headingFontSize),subheadingFontSize:Wp(e.subheadingFontSize)}:bq;function Sq(){const e=Ut(),t=He(),n=zo(),s=ls(t),r=vq({backgroundType:e?.settings?.backgroundType,family:e?.family,isOnePage:s,isOnlyBlockInStep:e?.isOnlyBlockInStep,variant:e?.variant});return Cq({blockSettings:e?.settings,courseTheme:t?.theme,familyTheme:n,isFullWidthImage:r,isPresentation:Mo(t)})}function Iq(){const e=zo();return yq(e)}function Tq(){const e=Sq();return{fontSize:Iq(),padding:e}}const Lq=hh()(["settings"]),u5=V("block-wrapper"),Eq=V("bg"),kq=(e,t)=>{const{children:n,className:s,defaultBackgroundColor:r="",style:i,tag:a,type:c,...l}=e,d=Ut(),h=Gp(),m=Tq(),f=Fn(),p=Xm(r,h.backgroundColor),v=p||"transparent",g=d?.className,x={...i,...h.backgroundImageCss,"--color-background":p,...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} `,...f?xq(m.padding):{paddingBottom:m.padding.paddingBottom,paddingTop:m.padding.paddingTop}},y=X()(s,{"bg--legacy-background":h.isLegacyBackground,[`block-${c}`]:!!c}),S=Eq({card:h.cardMode,range:h.colorRange,type:h.backgroundTypeLowercase,"overlay-light":h.isOverlayLight,"contrast-light":h.isContrastLight}),I=g?u5({}).mix(S).mix(g):u5({}).mix(S),b=[y,I.toString()].join(" ");return(0,o.jsxs)(c5,{...Lq(l),className:b,ref:t,style:x,tag:a,children:[(0,o.jsx)("span",{"aria-label":h.backgroundImageAlt,role:bC(h.backgroundImageAlt)}),n]})},Me=(0,u.forwardRef)(kq);class Nq 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){Ws.L2.addError(t,{scope:this.props.scope},"source")}render(){const{hasError:t,error:n}=this.state,{FallbackComponent:s}=this.props;return t||n?(0,o.jsx)(s,{}):this.props.children}}const h5=Nq,jq=V("block-ai-scenario"),wq=(0,u.lazy)(()=>C.e("webpack_container_remote_ai_scenario_learner-player-react").then(C.t.bind(C,58812,23)));function Rq({scenarioId:e,onExit:t,onComplete:n,labels:s}){const{currentLocale:r}=ot(),i=Dn(),a=He(),c=pd(),l=(0,u.useMemo)(()=>({active:r,source:i}),[r,i]),d=a?.aiScenarios,h=e&&m5(d)?d[e]:void 0,m=m5(h)?h:void 0;return(0,o.jsx)(Me,{className:jq("wrapper"),children:(0,o.jsx)(h5,{FallbackComponent:Pq,children:(0,o.jsx)(u.Suspense,{children:(0,o.jsx)(wq,{l10n:m?.l10n,labels:s,isRTL:c,locale:l,locales:m?.locales,onComplete:n,onExit:t,resolvePath:yt,scenario:m?.data,source:m?.source,sourceLocale:m?.sourceLocale})})})})}const Aq=(0,u.memo)(Rq);function m5(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Pq(){return null}var Mq=C(77533),Kp=C.n(Mq);const f5=":focus{outline: none}",Oq=":focus:not(:focus-visible){outline: none}",p5="focus-ring-style",Qp=()=>document.getElementById(p5)||Bq(),Bq=()=>{const e=document.createElement("style");return e.id=p5,document.head.appendChild(e),e},Dq=0,Fq=-1,_q=e=>{const t=Qp();document.addEventListener("mousedown",()=>{setTimeout(()=>{t.innerHTML=f5},0),e?.(!1)}),window.addEventListener("keydown",n=>{Hq(n,e)})},Hq=(e,t)=>{const n=e.target,s=Qp();(Cd(e)||cc(e)&&!n.classList.contains("ignore-prefers"))&&(s.innerHTML="",t?.(!0))},g5=({focusVisible:e}={})=>Qp().innerHTML=e?Oq:f5,Vq=e=>e?Dq:Fq,v5=({list:e,index:t})=>{t>=0&&t<us()(e)&&e[t].focus()},zq=({list:e,currentIndex:t})=>{const n=Jl()(t||0),s=n<us()(e)?n:0;return v5({list:e,index:s}),s},$q=({list:e,currentIndex:t})=>{const n=Kp()(t||us()(e));return v5({list:e,index:n}),n};var Dc=C(49860);const Uq=1e3,Gq={fadeInGrow:"scale(0.95)",fadeInLeft:"translateX(-50px)",fadeInLeftSmall:"translateX(-25px)",fadeInRight:"translateX(50px)",fadeInUp:"translateY(25px)"},Wq=e=>{const{afterAnimatedIn:t,animateIn:n="fadeIn",children:s,className:r,duration:i=1,initiallyVisible:a,siblingDelay:c=0}=e,l=Dc.useRef(null),[d,h]=Dc.useState(!1);Dc.useEffect(()=>{const f=l.current;if(a&&f){h(!0);return}if(d||!f||typeof window>"u")return;const p=tp(),v=new IntersectionObserver(([x])=>{x!=null&&(x.isIntersecting||x.intersectionRatio>0)&&(h(!0),v.unobserve(x.target))},{root:p,rootMargin:jv,threshold:0});v.observe(f);const g=setTimeout(()=>{h(x=>{if(x)return x;const y=l.current;if(!y)return x;const S=y.getBoundingClientRect(),I=p?.getBoundingClientRect(),b=I?.top??0,T=I?.bottom??window.innerHeight,L=(T-b)*.1;return S.bottom>b-L&&S.top<T+L?!0:x})},Uq);return()=>{v.disconnect(),clearTimeout(g)}},[a,d]),Dc.useEffect(()=>{const f=l.current;if(!f||!t)return;const p=v=>{v.target instanceof Element&&v.target.parentElement===f&&v.propertyName==="opacity"&&t()};return f.addEventListener("transitionend",p),()=>{f.removeEventListener("transitionend",p)}},[t]),Dc.useEffect(()=>{const f=l.current;if(!f||!Array.isArray(s))return;Array.from(f.children).forEach((v,g)=>{v instanceof HTMLElement&&v.style.setProperty("--idx",String(g))})},[s]);const m={"--scroll-animation-step":`${c}s`,"--scroll-animation-duration":n==="none"?"0s":`${i}s`,"--scroll-animation-from":Gq[n]??"translateY(0)"};return(0,o.jsx)("div",{className:X()("scroll-animation",r,{"scroll-animation--in":d}),ref:l,style:m,children:s})},ze=e=>{const{afterAnimatedIn:t,animateBlockEntrance:n,animateIn:s,children:r,className:i,duration:a,initiallyVisible:c,isLearner:l,siblingDelay:d}=e;return l&&n&&!vn()?(0,o.jsx)(Wq,{afterAnimatedIn:t,animateIn:s,className:i,duration:a,initiallyVisible:c,siblingDelay:d,children:r}):Array.isArray(r)?(0,o.jsx)("div",{children:r}):r};var Kq=C(69419),Qq=C(58016),Zq=C.n(Qq);const Yq=/(\.\.\/)|(\.\.\.\.\/)+|%2e%2e\/|%252e%252e\/|%2f\/|\/%2e%2e/gi,qq=e=>typeof e=="string"&&e.replace(Yq,""),Rn=Zq()(qq,Kq.J);var C5=C(49860);const _u=V("blocks-button"),x5=qN,Xq=({description:e})=>(0,o.jsx)(je,{className:_u("description"),value:e}),Jq=({color:e,destination:t,editBlock:n,isEditable:s,label:r,type:i})=>{const a=A2(),c=He()?.externalLinksDisabled,l=He()?.theme,d=ac(),{mode:h}=(0,Ae.g)(),m=fn(),f=Gt(),p=Pe(t),v=(0,Kr.htmlDecode)(In(Pe(r))),g=i==="email",x=i==="exit-course",y=i==="lesson",S=i==="relative-url",I=_u("button"),b=!e||e===""||e===d,T=e??d,L={},E=P2(d),k=b&&l?.accentContrast===Ee.AUTO?Ee.AUTO:E,N=m?.buttonColorContrast??k,P=m?.buttonRadius??null,A=m?.buttonWidth??null,R=Wt({backgroundColor:T,contrast:N});Object.assign(L,{...!b&&{"--color-button-bg":T},...!b&&{"--color-button-text":R},...!b&&{"--color-button-border":"transparent"},...P!=null&&{"--radius-button":`${Number(P)}px`},...A!=null&&{"--width-button":`${Number(A)}rem`}});const j=c&&Zn(p),{handleMouseEnter:M,handleMouseLeave:w,handleFocus:O,handleBlur:B}=ou(),D=C5.useId(),_=(0,u.useCallback)(()=>{if(s)n();else{if(j)return;if(x)return B1()}},[n,j,s,x]);if(s||j||x){const F=(0,o.jsx)("button",{"aria-describedby":j?ys(D):void 0,"aria-label":v,className:I,id:j?D:void 0,onBlur:j?()=>B(D):void 0,onClick:_,onFocus:j?()=>O(D):void 0,onKeyDown:W2(_),onMouseEnter:j?()=>M(D):void 0,onMouseLeave:j?()=>w(D):void 0,style:L,tabIndex:0,type:"button",children:v});return j?(0,o.jsxs)(o.Fragment,{children:[F,(0,o.jsx)(ru,{anchorId:D})]}):F}else if(y){const F=p?Ln(p,h):"#";return(0,o.jsx)(pn,{"aria-label":v,className:I,style:L,to:F,children:v})}else{const F=S?p:Rn(p),$=g?`mailto:${p}?subject=${a}`:F,z=no.isIphoneSafari?"_top":"_self",K=g?z:"_blank",J=K==="_blank",Q=J?"noopener noreferrer nofollow":void 0,U=f?.a11yNoticeLinkNewTab||"(opens in a new tab)",H=J?`${v} ${U}`:v;return(0,o.jsx)("a",{"aria-label":H,className:I,href:$,rel:Q,style:L,tabIndex:0,target:K,children:v})}},b5=e=>{const{animateBlockEntrance:t,editable:n,editBlock:s=()=>{},initiallyVisible:r,isLearner:i,items:a=[],renderDescription:c=Xq,settings:l}=e,{buttonAlignment:d="right",buttonColor:h,buttonShowDescription:m=!0,buttonStack:f,entranceAnimation:p}=l,v=_u(null,{"no-animation":!p,description:m==!0,center:d==="center",left:d==="left",right:d==="right",rounded:x5==="rounded"}),g=a?.map(({id:x,description:y,...S})=>{const I=(0,o.jsx)(Jq,{...S,color:h,editBlock:s,isEditable:n}),b=m&&c({id:x,description:y});return(0,o.jsx)("section",{className:_u("container"),children:d==="left"&&m?(0,o.jsxs)(o.Fragment,{children:[I,b]}):(0,o.jsxs)(o.Fragment,{children:[b,I]})},x)})??null;if(f){const{paddingBottom:x,paddingTop:y}=l,S={...y!=null&&{paddingTop:`${Number(y)}rem`},...x!=null&&{paddingBottom:`${Number(x)}rem`}};return(0,o.jsx)("div",{className:v.toString(),style:S,children:g})}return(0,o.jsx)(Me,{className:v.toString(),children:(0,o.jsx)(ze,{animateBlockEntrance:t,animateIn:"fadeIn",initiallyVisible:r,isLearner:i,children:(0,o.jsx)("div",{className:"blocks-button",children:g})})})},eX=b5;class tX extends C5.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:s,editable:r,editBlock:i,isLearner:a,lessonId:c,initiallyVisible:l}=this.props;return(0,o.jsx)(b5,{animateBlockEntrance:!1,blockId:s,editable:r,editBlock:i,initiallyVisible:l,isLearner:a,items:[t],lessonId:c,settings:n,type:"right"})}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,items:r,settings:i,renderButton:a=this.renderButtonDelegate}=this.props,{entranceAnimation:c,buttonShowDescription:l=!0,buttonAlignment:d="right",buttonSpacing:h=3}=i,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":x5==="rounded"});return(0,o.jsx)(Me,{className:m,children:(0,o.jsx)(ze,{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,children:r.map((f,p)=>{const v=p===0,g={buttonColor:i.buttonColor||this.props.color,buttonStyle:i.buttonStyle,buttonStack:!0,buttonShowDescription:l,buttonAlignment:d,...v?{}:{paddingTop:h}};return(0,o.jsx)(u.Fragment,{children:a(f,g)},f.id)})})})}}var y5=C(67750),nX=C(49860);function sX(e,t){const n=SC(e.src),s=e.width&&e.height&&!n,r=s?"async":void 0,i=s?"lazy":void 0,a=s?e.width:void 0,c=s?e.height:void 0;return(0,o.jsx)("img",{...e,decoding:r,height:c,loading:i,ref:t,width:a})}const Zp=nX.forwardRef(sX);var lt=C(49860);const Yt=V("block-code"),oX=`${Ne("CDN_URI")}/assets/rise/assets/blocks/code_block_unavailable.svg`;function S5(e,t){const n=I5(y5.parse(e.data));for(const s of n)if(s.type==="notification")t[s.method]?.(s.params);else throw new Error(`Unsupported RPC type "${s.type}"`)}function*I5(e){if(Array.isArray(e))for(const t of e)yield*I5(t);else yield e}function T5(e,t,n){return lt.useEffect(()=>{const r=new AbortController;return window.addEventListener("message",i=>{i.origin===window.origin&&t!=null&&e.current&&i.source===e.current.contentWindow&&S5(i,t)},{signal:r.signal}),()=>r.abort()},[t,e]),lt.useCallback(r=>{e.current?.contentWindow?.postMessage(r,n)},[e,n])}const rX=(e,t,n)=>T5(e,n,window.origin),iX=(e,t,n)=>T5(e,n,"*"),aX=(e,t,n)=>{const[s,r]=lt.useState(()=>new BroadcastChannel(t));return lt.useEffect(()=>()=>s.close(),[s]),lt.useEffect(()=>{s.name!==t&&r(new BroadcastChannel(t))},[s,t]),lt.useEffect(()=>{const a=new AbortController;return s.addEventListener("message",c=>S5(c,n),{signal:a.signal}),()=>a.abort()},[s,n]),lt.useCallback(a=>{s.postMessage(a)},[s])},cX=Ia()?no.isLocalFilesystem?iX:aX:rX,lX=window.location.origin==="";function dX(e){let t=lX?"":"lib/sandbox/sandbox.html";return t+=`#channel=${encodeURIComponent(e)}`,t}function uX(e){return typeof e=="number"?`${e/10}rem`:"-1px"}const hX={0:"small",1:"medium",2:"full"};function Yp({editBlock:e,errors:t,isDragPreview:n,isLearn:s,isSidebarPreview:r,items:i,labels:a,onClearErrors:c,onError:l,onStep:d,previewType:h,settings:m}){const f=lt.useRef(null),v=He()?.htmlBlocksDisabled,g=n||r||!!h,[x]=i,y=Pe(x.srcdoc),S=Pe(x.media),I=S?.sandbox?.src==null?void 0:`${S.sandbox.src}/index.html`,b=m?.autoResize===!0,T=m?.width??"0",[L,E]=lt.useState("-1px");lt.useEffect(()=>{b||E(uX(m?.height))},[b,m?.height]);const[k,N]=lt.useState(0),[P,A]=lt.useState(!1),[R,j]=lt.useState(!1),[M]=lt.useState(()=>`rise-frontend-sandbox-${window.crypto.randomUUID()}`),w=dX(M),O=lt.useCallback(()=>{d?.({id:x.id})},[x.id,d]),B=lt.useCallback(({message:U})=>{l?.({message:U}),j(!0),console.error("Sandbox Error",U)},[l,j]),D=lt.useCallback(()=>{c?.(),j(!1),N(U=>U+1)},[c]),_=lt.useCallback(()=>{A(k>0)},[k]),F=lt.useCallback(({height:U})=>{b&&E(`${U}px`)},[b]),$=lt.useMemo(()=>({oncomplete:O,onerror:B,onload:_,onready:D,onresize:F}),[O,B,D,_,F]),z=cX(f,M,$),K=lt.useCallback((U,H)=>{if(f==null&&k===0)throw new Error("Attempted to send message to sandbox before it is ready");const G=y5.format.notification(U,H);z(G)},[k,f,z]),J=lt.useCallback(()=>{window.location.reload()},[]),Q=lt.useCallback(()=>{e?.()},[e]);return lt.useEffect(()=>{k&&K("onupdate",{autoResize:b,src:I,srcDoc:y})},[b,k,K,I,y]),s&&t!=null||R?(0,o.jsx)(Me,{children:(0,o.jsxs)("div",{className:Yt("error-general",{learn:s}),children:[(0,o.jsx)("div",{className:Yt("error-message"),children:"Something went wrong"}),(0,o.jsx)("div",{className:Yt("error-message-subtitle"),children:"There was an error loading this code block. Please contact your admin if the issue continues."}),(0,o.jsx)("button",{className:Yt("error-button"),onClick:J,type:"button",children:"Refresh page"})]})}):t!=null&&Object.keys(t).length>0?(0,o.jsx)(Me,{children:t[404]?(0,o.jsxs)("div",{className:Yt("error-404"),children:[(0,o.jsx)("div",{className:Yt("error-message"),children:"We couldn\u2019t find your file"}),(0,o.jsx)("div",{className:Yt("error-message-subtitle"),children:"Make sure your zip file contains an index.html file."}),(0,o.jsx)("button",{className:Yt("error-button"),onClick:Q,type:"button",children:"Retry upload"})]}):(0,o.jsxs)("div",{className:Yt("error-general"),children:[(0,o.jsx)("div",{className:Yt("error-message"),children:"Something went wrong"}),(0,o.jsxs)("div",{className:Yt("error-message-subtitle"),children:["Try refreshing the page or entering your code again. If the issue isn't fixed,"," ",(0,o.jsx)("a",{href:"https://community.articulate.com/group/code-block",rel:"noopener noreferrer",target:"_blank",children:"visit our community"}),"."]}),(0,o.jsx)("button",{className:Yt("error-button"),onClick:J,type:"button",children:"Refresh page"})]})}):v&&!g?(0,o.jsx)(Me,{children:(0,o.jsx)("div",{className:Yt("restricted"),children:(0,o.jsxs)("div",{className:Yt("restricted-card"),children:[(0,o.jsx)(Zp,{alt:"",className:Yt("restricted-icon"),src:oX}),(0,o.jsx)("div",{className:Yt("restricted-title"),children:"Subscribe to unlock full access"}),(0,o.jsx)("div",{className:Yt("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,o.jsx)(Me,{children:(0,o.jsx)("iframe",{allow:"fullscreen",className:Yt({"auto-resize":b,loaded:g||P,width:hX[T]}),"data-rise-frontend-sandbox":"",loading:"lazy",ref:f,sandbox:"allow-forms allow-popups allow-same-origin allow-scripts",scrolling:b?"no":void 0,src:w,style:{"--block-html-height":L},title:a?.a11yBlockCode},M)})}const qe=({value:e,className:t,allowTabNavigation:n=!0,tagName:s,id:r,emptyFallback:i=null,transformValue:a})=>{const{value:c}=ep(Pe(e));return c?(0,o.jsx)(je,{allowTabNavigation:n,className:t,id:r,tagName:s,transformValue:a,value:e}):i},Kxe="group",mX="tablist",fX="tabpanel",Qxe="tab",Zxe="radio",Fc=({caption:e,editable:t,id:n,isOverlayType:s,getL10nValue:r})=>{const i=!!(!s&&!t&&r(e));return{figcaptionId:i?`figcaption-${n}`:void 0,isFigure:i,role:i?"figure":void 0,tagName:i?"figure":"div"}};var pX=C(49860);function ft(e){const t=pX.forwardRef((n,s)=>{const r=rt();return(0,o.jsx)(e,{...n,getL10nValue:r,ref:s})});return t.displayName=`withLocalizedLookup(${e.displayName||e.name})`,t}var L5=C(49860);const gX=L5.lazy(async()=>{const[e,t]=await Promise.all([C.e("ace").then(C.t.bind(C,87401,23)),C.e("ace").then(C.bind(C,92763)),C.e("ace").then(C.t.bind(C,2577,23)),C.e("ace").then(C.t.bind(C,5152,23)),C.e("ace").then(C.t.bind(C,50428,23)),C.e("ace").then(C.t.bind(C,14280,23)),C.e("ace").then(C.t.bind(C,50428,23)),C.e("ace").then(C.t.bind(C,19991,23)),C.e("ace").then(C.t.bind(C,60968,23)),C.e("ace").then(C.t.bind(C,91401,23)),C.e("ace").then(C.t.bind(C,64127,23)),C.e("ace").then(C.t.bind(C,30485,23)),C.e("ace").then(C.t.bind(C,95797,23)),C.e("ace").then(C.t.bind(C,82300,23)),C.e("ace").then(C.t.bind(C,86952,23)),C.e("ace").then(C.t.bind(C,44887,23)),C.e("ace").then(C.t.bind(C,98283,23)),C.e("ace").then(C.t.bind(C,14866,23)),C.e("ace").then(C.t.bind(C,95649,23)),C.e("ace").then(C.t.bind(C,2326,23)),C.e("ace").then(C.t.bind(C,93509,23)),C.e("ace").then(C.t.bind(C,9308,23))]);return{default:t.default}}),vX=({classNames:e,code:t})=>{const[n,s]=(0,u.useState)(!1),{announcePolite:r}=Rs(),i=async()=>{const a=(0,Kr.htmlDecode)(t);await navigator.clipboard.writeText(a),s(!0),setTimeout(()=>s(!1),1e3),r("Copied!")};return(0,o.jsx)("div",{className:e,children:(0,o.jsx)(Bs,{message:n?"Copied!":"Copy",children:(0,o.jsx)("button",{"aria-label":n?"Copied!":"Copy",className:"block-code-snippet-copy",onClick:i,type:"button",children:(0,o.jsx)(ae,{name:n?"check":"copy"})})})})};class CX extends L5.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this)}renderCaption({caption:t}){return(0,o.jsx)(qe,{className:"block-text__code-caption",value:t||""})}render(){const{animateBlockEntrance:t,defaultBackgroundColor:n="",getL10nValue:s,initiallyVisible:r,isLearner:i,items:a,labels:c,settings:l,renderCaption:d=this.renderCaptionDelegate}=this.props,{entranceAnimation:h,language:m,paddingBottom:f,paddingTop:p,snippetBackgroundColor:v,snippetColorContrast:g,theme:x,useAdvancedEditor:y,wrapWords:S}=l,I=X()("block-text block-text--code",{"block-text--padding-top":Number(p)===2,"block-text--padding-bottom":Number(f)===2,"block-text--no-animation":!h}),b={backgroundColor:v},T=v==="#fafafa"||Dt()(v),L=g??Ee.DARK;if(!T){const E=Wt({backgroundColor:v,contrast:L});Object.assign(b,{"--color-snippet-contrast":E})}return(0,o.jsx)(Me,{className:I,defaultBackgroundColor:n,children:(0,o.jsx)(ze,{animateBlockEntrance:t,initiallyVisible:r,isLearner:i,children:(0,o.jsx)("div",{className:"block-text__container",children:a.slice(0,1).map(E=>{const k=Fc({...E,getL10nValue:s});return(0,o.jsx)("div",{className:"block-text__row",children:(0,o.jsx)("div",{"aria-label":c?.a11yBlockCodeSnippet,className:"block-text__col",role:"group",children:(0,o.jsxs)("figure",{"aria-labelledby":k.figcaptionId,className:"block-text__figure block-text__figure--with-copy",role:"figure",children:[(0,o.jsx)(U_,{value:E.code,children:N=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(vX,{classNames:"block-text__copy-button",code:N}),y?(0,o.jsx)(u.Suspense,{fallback:null,children:(0,o.jsx)(gX,{editorProps:{$blockScrolling:!0},maxLines:25,mode:m,name:String(E.id),readOnly:!0,setOptions:{enableSnippets:!1,showLineNumbers:!0,tabSize:2,fontSize:"1.6rem",useWorker:!1},theme:x,value:(0,Kr.htmlDecode)(X0(N)),width:"100%",wrapEnabled:S})}):(0,o.jsx)("pre",{className:"block-text__code",dangerouslySetInnerHTML:{__html:X0(N)},dir:"ltr",style:b})]})}),E.caption&&(0,o.jsx)("figcaption",{id:k.figcaptionId,children:d(E)})]})})},E.id)})})})})}}const E5=ft(CX),k5=V("continue-btn"),Hu=({children:e,className:t,href:n,onClick:s,text:r,testId:i="continue-btn"})=>{const a=t?`${k5()} ${t}`:k5();return n?(0,o.jsx)(pn,{className:a,"data-continue-btn":"","data-testid":i,onClick:s,to:n,children:e??(0,o.jsx)(kn,{value:r})}):(0,o.jsx)("button",{className:a,"data-continue-btn":"","data-testid":i,onClick:s,type:"button",children:e??(0,o.jsx)(je,{value:r})})},N5=({bgType:e,text:t,iconType:n="locked"})=>{const s=X()("continue-hint",{"continue-hint--bg-transparent":e==="transparent"});return(0,o.jsxs)("div",{className:s,"data-continue-btn":"",children:[n==="locked"&&(0,o.jsx)(ae,{className:"continue-hint__icon",name:"lock-keyhole-light"}),(0,o.jsx)("div",{className:"continue-hint__content",children:(0,o.jsx)(kn,{value:t})})]})},qp=V("block-text");function xX({blockId:e,animateBlockEntrance:t,canContinue:n=!1,isComplete:s,isLearner:r,isLastBlock:i=!1,isOnlyBlockInStep:a,items:c=[],labels:l,onStep:d=()=>{},skipContinue:h=!1,initiallyVisible:m}){const p=(0,u.useRef)(null),v=(0,Ve.A)(s),[g,x]=u.useState(!1),{announcePolite:y}=Rs(),[S,I]=u.useState(!1),b=fn(),T=He(),L=ac(),E=P2(L),k=zo(),N=c[0],{id:P}=N,A=N.title??k?.label??Xe.blockContinueLabel,R=N.type??k?.completionType??Xe.blockContinueCompletionType,j=N.completeHint??k?.completeHint??Xe.blockContinueCompleteHint,M=!R||(h?S:n||a&&s),w=h||!s||a,O=b?.continueColor||L,B=!O||O===L,D=B&&T?.theme?.accentContrast===Ee.AUTO?Ee.AUTO:E,_=b?.continueColorContrast??D,F=b?.continueRadius??null,$=b?.continueWidth??76,z=Wt({backgroundColor:O,contrast:_}),K={...!B&&{"--color-button-bg":O},...!B&&{"--color-button-text":z},...!B&&{"--color-button-border":"transparent"},...F!=null&&{"--radius-button":`${Number(F)}px`},...$!=null&&{maxWidth:`${Number($)}rem`}},J=(0,u.useCallback)(()=>{d({id:P}),x(!0),i?setTimeout(()=>{const Q=document.querySelector("[data-lesson-id]"),U=document.querySelector("main"),H=document.querySelector("h1.lesson-header__title, .lesson-header__title h1"),G=Q?.querySelector('.block-wrapper, [role="region"], .lesson-content > *:first-child');let Y=null;H?Y=H:G&&G!==p.current?.parentElement?Y=G:Q?Y=Q:U&&(Y=U),Y&&(Y.setAttribute("tabindex","-1"),Y.focus({preventScroll:!0}))},200):setTimeout(()=>{const Q=p.current;Q&&Q.focus()},100)},[P,d,i]);return(0,u.useEffect)(()=>{!v&&s&&(i||setTimeout(()=>{y?.(l?.a11yStatusAdditionalContent)},300))},[y,s,l,v,i]),(0,u.useEffect)(()=>{const Q=U=>{const{path:H}=U.detail,{blockId:G,buttonId:Y}=Oi(U.detail.path,["block","button"]);if(e==G&&Y===N.id){const Z=H.at(-1);Z==="title"?I(!0):Z==="completeHint"&&I(!1)}};return window.addEventListener(Ye,Q),()=>{window.removeEventListener(Ye,Q)}},[e,N.id]),(0,o.jsxs)(o.Fragment,{children:[w&&(0,o.jsx)(Me,{children:(0,o.jsx)(ze,{animateBlockEntrance:t,initiallyVisible:m,isLearner:r,children:(0,o.jsx)("div",{className:qp("container"),children:(0,o.jsx)("div",{className:qp("row"),children:(0,o.jsxs)("div",{className:qp("continue"),style:K,children:[M&&(0,o.jsx)(Hu,{onClick:J,text:A}),!M&&(0,o.jsx)(N5,{text:j})]})})})})}),g&&(0,o.jsx)("div",{"aria-live":"off",className:"visually-hidden-always",ref:p,role:"status",tabIndex:-1,children:l?.a11yStatusContinued||"Continued"})]})}const Xp=V("block-divider"),Jp=({isLearner:e,labels:{numberedDividerGroup:t},number:n,settings:s,type:r="divider"})=>{const{entranceAnimation:i}=s,a=r==="numbered",l=Xp({authoring:!e,spacing:r==="spacing",numbered:a,"no-animation":!i}).toString(),d=a?(0,o.jsxs)("div",{className:Xp("wrap__number"),children:[(0,o.jsx)("span",{className:"visually-hidden-always",children:t}),n]}):null;return(0,o.jsx)(Me,{className:l,children:(0,o.jsx)("div",{className:Xp("wrap",{authoring:!e&&!a}),children:d})})},bX=Jp,yX=e=>(0,o.jsx)(Jp,{type:"numbered",...e}),SX=e=>(0,o.jsx)(Jp,{type:"spacing",...e});var IX=C(15384),Vu=C.n(IX);function TX(e,t){const n=fn(),{cardMode:s,className:r="",children:i,disabled:a=!1,tag:c="div",overrideBackground:l=!1,style:d={},...h}=e,{cardMode:m,customBackgroundColorContrast:f}=n,v=He()?.theme,g=Wn(),x=s??m??Gn.WHITE,y=En()??"#ffffff",S=x===Gn.WHITE,I=g===oe.COLOR,b=g===oe.ACCENT,T=v?.accentContrast,L=g===oe.ACCENT||g===oe.COLOR,E=T===Ee.AUTO&&b||f===Ee.AUTO&&I,k=g===oe.COLOR?f:T,N=[r,"block-card"];if(S)N.push("bg--range-light","block-card--white");else if(a){N.push("block-card--disabled");const P=Wt({backgroundColor:y,contrast:k});E&&(d["--color-text"]=P,d["--color-text-opposite"]=P===At.DARK?At.LIGHT:At.DARK)}else{N.push("block-card--transparent");const A=TO(y)??y??"#ffffff";switch(g){case oe.LIGHT:case oe.GRAY:N.push("bg--range-light");break;case oe.IMAGE:N.push("bg--range-dark");break;case oe.DARK:case oe.BLACK:N.push("bg--range-dark"),d["--color-background-rgb"]=Wo(A)?.slice(0,3);break;default:{const j=d["--color-background"]??(l?y:A),M=Wt({backgroundColor:j,contrast:k});L&&M==At.LIGHT&&N.push("block-card--contrast-light");const w=Ni(j);N.push(`bg--range-${pu()(w.toLowerCase())}`),d["--color-background"]=j,d["--color-background-rgb"]=Wo(j)?.slice(0,3);break}}}return(0,o.jsx)(c,{...h,className:N.join(" "),ref:t,style:d,children:i})}const nn=(0,u.forwardRef)(TX);var kt=C(49860);function j5({ariaLabel:e,children:t,className:n="carousel-controls-item-btn",isActive:s,onClick:r,onKeyDown:i}){return(0,o.jsx)("li",{className:"carousel-controls-item",role:"listitem",children:(0,o.jsx)("button",{"aria-current":s,"aria-label":e,className:n,onClick:r,onKeyDown:i,tabIndex:s?0:-1,type:"button",children:t})})}function zu({children:e,iconNameLeft:t="chevron-left-light",iconNameRight:n="chevron-right-light",isInfinite:s=!0,isRTL:r=!1,labelCarousel:i="Carousel",labelCarouselRoleDesc:a="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:p="Slide",onChange:v,ref:g,renderSlideIndicator:x,shouldMouseEmulateTouch:y=!1,shouldUseCounter:S=!1,shouldUseGoToSlide:I=!0}){const b=kt.useId(),[T,L]=kt.useState(0),E=(0,Ve.A)(T)??0,k=kt.useRef(null),N=kt.useRef(null),P=kt.useRef(!1),A=kt.useRef(!1),R=kt.useRef(void 0),j=kt.useRef(void 0),M=`carousel-${b}`,w=kt.Children.count(e),O=(0,Ve.A)(w),B=kt.useMemo(()=>Array.from({length:w}),[w]),D=w>1;kt.useImperativeHandle(g,()=>({navigateToSlide:(Q,U=!0)=>{L(Q);const H=k.current?.children?.[Q]?.firstElementChild;U&&H?.focus()}}),[]);const _=kt.useCallback(({activeIndex:Q,dir:U})=>{const H=s?Q-1>=0?Q-1:w-1:Math.max(0,Q-1),G=s?Q+1<=w-1?Q+1:0:Math.min(w-1,Q+1);return U==="left"?r?G:H:r?H:G},[s,r,w]),F=kt.useCallback(()=>{L(Q=>_(r?{activeIndex:Q,dir:"right"}:{activeIndex:Q,dir:"left"}))},[_,r]),$=kt.useCallback(()=>{L(Q=>_(r?{activeIndex:Q,dir:"left"}:{activeIndex:Q,dir:"right"}))},[_,r]),z=kt.useCallback(Q=>{const U=k.current?.children?.[Q],H=k.current;if(U&&H){const G=U.getBoundingClientRect(),Y=H.getBoundingClientRect(),Z=G.left+G.width/2,q=Y.left+Y.width/2,ee=Z-q;H.scrollBy({left:ee,behavior:"smooth"})}},[]),K=kt.useCallback(Q=>{let U=!1,H=T;switch(Q.key){case"ArrowLeft":U=!0,H=_({activeIndex:T,dir:"left"});break;case"ArrowRight":U=!0,H=_({activeIndex:T,dir:"right"});break;case"Home":U=!0,H=0;break;case"End":U=!0,H=w-1;break}U&&(Q.stopPropagation(),Q.preventDefault()),T!==H&&(k.current?.children?.[H]?.firstChild?.focus(),z(H),L(H))},[T,_,z,w]);kt.useEffect(()=>{E!==T&&v?.(T)},[T,v,E]),kt.useEffect(()=>{w<O&&T>w-1&&L(w-1)},[T,O,w]),kt.useEffect(()=>{const Q=ee=>{ee.target.tagName==="IMG"&&ee.preventDefault(),R.current=ee.screenX},U=ee=>{const se=window.visualViewport?.scale??1,re=window.getSelection().toString()!=="";if(!A.current&&se<=1.01&&!re&&R.current!=null){j.current=ee.screenX;const le=j.current-R.current;Math.abs(le)>50&&(window.getSelection().empty(),P.current=!0,R.current=void 0,j.current=void 0,le<0?L(Te=>_({activeIndex:Te,dir:"right"})):L(Te=>_({activeIndex:Te,dir:"left"})))}},H=ee=>{P.current&&ee.stopPropagation(),P.current=!1,A.current=!1,R.current=void 0,j.current=void 0},G=ee=>{if(ee.touches.length>1){A.current=!0;return}ee.changedTouches.length===1&&ee.changedTouches[0]&&(R.current=ee.changedTouches[0].screenX)},Y=ee=>{const se=window.visualViewport?.scale??1,re=window.getSelection().toString()!=="";if(!A.current&&se<=1.01&&!re&&R.current!=null&&ee.changedTouches[0]){j.current=ee.changedTouches[0].screenX;const le=j.current-R.current;Math.abs(le)>50&&(P.current=!0,R.current=void 0,j.current=void 0,le<0?L(Te=>_({activeIndex:Te,dir:"right"})):L(Te=>_({activeIndex:Te,dir:"left"})))}},Z=()=>{P.current=!1,A.current=!1,R.current=void 0,j.current=void 0},q=N.current;return y&&(q?.addEventListener("mousedown",Q,{capture:!0}),q?.addEventListener("mousemove",U,{capture:!0}),q?.addEventListener("click",H,{capture:!0})),q?.addEventListener("touchstart",G,{passive:!0}),q?.addEventListener("touchmove",Y,{passive:!0}),q?.addEventListener("touchend",Z,{passive:!0}),q?.addEventListener("touchcancel",Z,{passive:!0}),()=>{y&&(q?.removeEventListener("mousedown",Q),q?.removeEventListener("mousemove",U),q?.removeEventListener("mouseup",Z)),q?.removeEventListener("touchstart",G),q?.removeEventListener("touchmove",Y),q?.removeEventListener("touchend",Z),q?.removeEventListener("touchcancel",Z)}},[_,y,w]);const J=kt.useCallback(Q=>()=>{z(Q),L(Q)},[z]);return(0,o.jsxs)("div",{"aria-label":i,"aria-roledescription":a,className:"carousel",dir:r?"rtl":void 0,role:"region",style:{"--carousel-active-index":T},children:[D&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{"aria-label":c,className:"carousel-controls",role:"group",children:[I&&(0,o.jsx)("ul",{className:"carousel-controls-items",ref:k,role:"list",children:B.map((Q,U)=>{const H=T===U,G=J(U);return x?x({index:U,isActive:H,onClick:G,onKeyDown:K}):(0,o.jsx)(j5,{ariaLabel:h+" "+(U+1),isActive:H,onClick:G,onKeyDown:K,children:(0,o.jsx)(ae,{className:"carousel-controls-item-btn-icon",name:H?"circle":"circle-solid"})},U)})}),(0,o.jsx)("button",{"aria-disabled":s?void 0:T===0,"aria-label":d,className:"carousel-controls-prev",onClick:!s&&T===0?void 0:F,type:"button",children:(0,o.jsx)(ae,{className:"carousel-controls-prev-icon",name:r?n:t})}),(0,o.jsx)("button",{"aria-disabled":s?void 0:T===w-1,"aria-label":l,className:"carousel-controls-next",onClick:!s&&T===w-1?void 0:$,type:"button",children:(0,o.jsx)(ae,{className:"carousel-controls-next-icon",name:r?t:n})}),S&&(0,o.jsxs)("div",{className:"carousel-controls-counter",children:[(0,o.jsx)("div",{className:"carousel-controls-counter-text",children:`${T+1} ${m} ${w}`}),(0,o.jsx)("div",{className:"carousel-controls-counter-line",children:(0,o.jsx)("div",{className:"carousel-controls-counter-line-runner",style:{width:`${Number(((T+1)/w).toFixed(2))*100}%`}})})]})]})}),(0,o.jsx)("div",{"aria-live":"polite",className:"carousel-slides",ref:N,children:kt.Children.map(e,(Q,U)=>{const H=`${M}-${U}-counter`;return(0,o.jsxs)("div",{"aria-labelledby":H,"aria-roledescription":p,className:"carousel-slide",hidden:T!==U,inert:T!==U,role:"group",children:[(0,o.jsx)("div",{className:"visually-hidden-always",id:H,children:`${U+1} ${f} ${w}`}),Q]})})})]})}const w5=(0,u.createContext)(Zp);function LX({children:e,ImageEagerOrLazy:t}){return(0,o.jsx)(w5,{value:t,children:e})}function EX(){return(0,u.use)(w5)}function An(e){const t=EX();return(0,o.jsx)(t,{...e})}const yn=(e,t)=>e==null||t==null?e===t:String(e)===String(t);function eg(e){const t=n=>{const s=pd();return(0,o.jsx)(e,{...n,isRTL:s})};return t.displayName=`withRTL(${e.displayName||e.name})`,t}const $u=({blockId:e,carouselRef:t,children:n,items:s})=>{const r=(0,u.useRef)(null),i=t??r;return(0,u.useEffect)(()=>{const a=d=>{const h=s.findIndex(m=>yn(m.id,d));h>=0&&i.current?.navigateToSlide?.(h,!1)},c=d=>{const{path:h}=d.detail,{blockId:m,cardId:f}=Oi(h,["block","card"]);m===e&&a(f)},l=d=>{const{blockId:h,itemId:m}=d.detail;yn(h,e)&&a(m)};return window.addEventListener(Ye,c),window.addEventListener(Ko,l),()=>{window.removeEventListener(Ye,c),window.removeEventListener(Ko,l)}},[s,e,i]),(0,o.jsx)(o.Fragment,{children:n({carouselRef:i})})};var kX=C(74753),NX=C.n(kX);const R5=V("audio-player-actions"),jX=({audioPlayerId:e,condensed:t=!1,transcriptMedia:n,onDelete:s,onTranscriptClick:r,onTranscriptClose:i})=>{const{mode:a,disableTranscriptButton:c}=gu(),l=Rc(),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),p=Pe(n)?.audio?.transcript,v=(0,u.useCallback)(()=>h(!0),[]),g=(0,u.useCallback)(()=>h(!1),[]),x=(0,u.useCallback)(()=>f(!0),[]),y=(0,u.useCallback)(P=>{!(P.relatedTarget instanceof Element&&P.relatedTarget.closest(".transcript-panel")!==null)&&P.currentTarget.matches(":focus-visible")&&f(!0)},[]),S=(0,u.useCallback)(()=>f(!1),[]),I=Gt(),b=l?.audioPlayerIdOpen&&l.audioPlayerIdOpen===e,T=c?"Transcripts are only available in lesson previews":b?I?.audioHideTranscript:a==="edit"?"Edit transcript":I?.audioShowTranscript,L=(0,u.useCallback)(()=>{const P=document.getElementById(Lp(e));P&&P.focus()},[e]),[E,k]=(0,u.useState)(!1);function N(){c||(b?i?.():(r?.(),k(!0)))}return(0,u.useEffect)(()=>{E&&(k(!1),L())},[E,L]),(0,o.jsxs)(o.Fragment,{children:[s&&(0,o.jsx)(Bs,{elementFocused:d,message:"Remove audio",children:(0,o.jsx)("button",{"aria-label":"Remove audio",className:R5("button",{condensed:t}),onBlur:g,onClick:s,onFocus:v,onMouseOut:g,onMouseOver:v,type:"button",children:(0,o.jsx)(ae,{name:"trash"})})}),(a==="edit"||p)&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(Bs,{elementFocused:m,message:T,renderInModalWhenPresent:a==="readonly",style:{whiteSpace:"nowrap"},children:(0,o.jsx)("button",{"aria-disabled":c,"aria-label":T,className:R5("button",{condensed:t}),id:a==="readonly"?v6(e):void 0,onBlur:S,onClick:N,onFocus:y,onMouseOut:S,onMouseOver:x,style:c?{opacity:.5}:void 0,type:"button",children:(0,o.jsx)(ae,{name:"file-audio"})})})})]})};var wX=C(29048);const A5="change";class RX extends wX.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(A5,t)}removeChangeListener(t){this.removeListener(A5,t)}}const ye=new RX(1/0),AX=[.5,.75,1,1.25,1.5,1.75,2].toReversed().map(e=>({value:e,label:`${e}x`})),ebe=.05,P5=V("audio-player-icon"),qr=({x:e,width:t,height:n,y:s,pulseBaseHeight:r,pulseBaseY:i,pulseHeight:a,pulseY:c,delay:l="0s"})=>(0,o.jsx)("rect",{className:P5("bar"),height:n,rx:1,style:{"--base-height":`${n/10}rem`,"--base-y":`${s/10}rem`,"--pulse-base-height":r&&`${r/10}rem`,"--pulse-base-y":i&&`${i/10}rem`,"--pulse-height":`${a/10}rem`,"--pulse-y":`${c/10}rem`,"--delay":l},width:t,x:e,y:s}),M5=({animating:e})=>(0,o.jsx)("span",{className:P5({animating:e}),children:(0,o.jsxs)("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 20 16",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)(qr,{delay:"0s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:0,y:7}),(0,o.jsx)(qr,{delay:"0.1s",height:4,pulseBaseHeight:3,pulseBaseY:6.5,pulseHeight:8,pulseY:4,width:2,x:3,y:6}),(0,o.jsx)(qr,{delay:"0.2s",height:10,pulseBaseHeight:8,pulseBaseY:4,pulseHeight:12,pulseY:2,width:2,x:6,y:3}),(0,o.jsx)(qr,{delay:"0.3s",height:16,pulseBaseHeight:12,pulseBaseY:2,pulseHeight:16,pulseY:0,width:2,x:9,y:0}),(0,o.jsx)(qr,{delay:"0.4s",height:8,pulseBaseHeight:6,pulseBaseY:5,pulseHeight:12,pulseY:2,width:2,x:12,y:4}),(0,o.jsx)(qr,{delay:"0.5s",height:11,pulseBaseHeight:9,pulseBaseY:3.5,pulseHeight:15,pulseY:.5,width:2,x:15,y:2.5}),(0,o.jsx)(qr,{delay:"0.6s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:18,y:7})]})});var PX,Ke=C(49860);const Uu=Ke.createContext(null);function MX({children:e,isDisabled:t,onClose:n,onOpen:s,onSelect:r,positionX:i="left"}){const[a,c]=Ke.useState(!1),l=(0,Ve.A)(a),[d,h]=Ke.useState(null),m=Ke.useRef(null),f=Ke.useRef(null),p=Ke.useRef(null),x=`${`menu-${Ke.useId()}`}-content`,y=Ke.useCallback(({direction:M,predFn:w=()=>!0})=>{if(!p.current)return;const O=Array.from(p.current.querySelectorAll('[role="menuitem"]')),B=O.length,D=O.findIndex(z=>z===document.activeElement);let _,F,$;switch(M){case"start":_=0,F=1;break;case"end":_=B-1,F=-1;break;case"backwards":_=D-1,F=-1;break;case"forwards":_=D+1,F=1;break;default:_=D+1,F=1}for(let z=0;z<=B;z++){_>=B?_=0:_<0&&(_=B-1);const K=O[_];if(K!=null&&DX(K)&&w(K)){$=K;break}else _=_+F}$&&$.focus()},[]),S=Ke.useCallback(()=>{y({direction:"start"})},[y]),I=Ke.useCallback(()=>{y({direction:"end"})},[y]),b=Ke.useCallback(()=>{y({direction:"backwards"})},[y]),T=Ke.useCallback(()=>{y({direction:"forwards"})},[y]),L=Ke.useCallback(M=>{y({direction:"forwards",predFn:w=>FX(w,M)})},[y]),E=Ke.useCallback(()=>{a?c(!1):(c(!0),setTimeout(T,25))},[T,a]),k=Ke.useCallback(()=>{f.current?.focus(),c(!1)},[]),N=Ke.useCallback(()=>{c(!0),setTimeout(T,25)},[T]),P=Ke.useCallback(()=>{c(!0),setTimeout(b,25)},[b]),A=Ke.useCallback(()=>{const{left:M,top:w}=np({anchor:f.current,popover:p.current,positionX:i});h({transform:`translate3d(${M}px, ${w}px, 0)`,visibility:"visible"})},[i]),R=Ke.useCallback(M=>{const w=M.currentTarget;O5(w)||(r?.(w.getAttribute("data-name")),k())},[k,r]),j=Ke.useCallback(M=>{const w=M.key;if(M.altKey||M.ctrlKey||M.metaKey)return;let O=!1;if(M.shiftKey)w==="Tab"?b():w.trim()!==""&&L(w),O=!0;else switch(w){case" ":case"Enter":R(M),O=!0;break;case"Esc":case"Escape":k(),O=!0;break;case"ArrowUp":b(),O=!0;break;case"Tab":case"ArrowDown":T(),O=!0;break;case"Home":case"PageUp":S(),O=!0;break;case"End":case"PageDown":I(),O=!0;break;default:L(w);break}O&&(M.stopPropagation(),M.preventDefault())},[k,R,L,S,I,T,b]);return Ke.useEffect(()=>{const M=w=>{a&&m.current!=null&&p.current!=null&&!m.current.contains(w.target)&&!p.current.contains(w.target)&&c(!1)};return a?document.addEventListener("click",M):document.removeEventListener("click",M),()=>{document.removeEventListener("click",M)}},[a]),Ke.useEffect(()=>(a?window.addEventListener("resize",A):window.removeEventListener("resize",A),()=>{window.removeEventListener("resize",A)}),[A,a]),Ke.useEffect(()=>{const M=bc(m.current);for(const w of M)a?w?.addEventListener("scroll",A,{passive:!0}):w?.removeEventListener("scroll",A);return()=>{for(const w of M)w?.removeEventListener("scroll",A)}},[A,a]),Ke.useEffect(()=>{a?A():h(null)},[A,a]),Ke.useEffect(()=>{if(l&&!a)n?.();else if(!l&&a&&(s?.(),m.current)){const M=new CustomEvent("menuopen",{bubbles:!0,detail:{target:m.current}});m.current.dispatchEvent(M)}},[l,a,n,s]),Ke.useEffect(()=>{const M=w=>{w.detail.target!==m.current&&c(!1)};return document.addEventListener("menuopen",M),()=>{document.removeEventListener("menuopen",M)}},[]),(0,o.jsx)(Uu.Provider,{value:{htmlIdContent:x,isExpanded:a,onCloseFocusTrigger:k,onExpandFocusMenuItemNext:N,onExpandFocusMenuItemPrevious:P,onFocusMenuItemByPrefix:L,onFocusMenuItemFirst:S,onFocusMenuItemLast:I,onFocusMenuItemNext:T,onFocusMenuItemPrevious:b,onItemClick:R,onItemKeyDown:j,onTriggerClick:E,refContent:p,refTrigger:f,styleContent:d},children:(0,o.jsx)("div",{"aria-owns":x,inert:t?!0:void 0,ref:m,children:e})})}function OX({as:e,children:t,label:n,labelledBy:s,...r}){const{htmlIdContent:i,isExpanded:a,onTriggerClick:c,onCloseFocusTrigger:l,onExpandFocusMenuItemNext:d,onExpandFocusMenuItemPrevious:h,refTrigger:m}=Ke.useContext(Uu),f=Ke.useCallback(v=>{let g=!1;switch(v.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&&(v.stopPropagation(),v.preventDefault())},[l,d,h]),p=e??"button";return(0,o.jsx)(p,{...r,"aria-controls":i,"aria-expanded":a,"aria-haspopup":"menu","aria-label":n,"aria-labelledby":s,"data-menu-trigger":"",onClick:c,onKeyDown:f,ref:m,type:"button",children:t})}function BX({children:e,className:t}){const{htmlIdContent:n,isExpanded:s,refContent:r,styleContent:i}=Ke.useContext(Uu);return s?bs.createPortal((0,o.jsx)("div",{className:t,"data-menu-content":"",hidden:s?void 0:!0,id:n,ref:r,role:"menu",style:i,children:e}),so()):null}function Gu({children:e,className:t,isDisabled:n,name:s,tooltipId:r}){const{onItemClick:i,onItemKeyDown:a}=Ke.useContext(Uu),c=Ke.useCallback(l=>{l.currentTarget?.focus()},[]);return(0,o.jsx)("button",{"aria-describedby":r,"aria-disabled":n,className:t,"data-menu-item":"","data-name":s,onClick:n?void 0:i,onKeyDown:a,onMouseOver:c,role:"menuitem",tabIndex:n?-1:void 0,type:"button",children:e})}function nbe({children:e}){return PX("span",{"data-menu-item-icon":"",children:e})}function O5(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function DX(e){return e!=null&&e.tagName==="BUTTON"&&!O5(e)}function FX(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const qi=V("audio-player-actions-condensed"),qo=Object.freeze({DeleteAudio:"delete-audio",EditAudio:"edit-audio",EditTranscript:"edit-transcript",RevertToSource:"revert-audio-to-source"}),_X=({audioPlayerId:e,condensed:t=!1,transcriptMedia:n,onTranscriptClick:s,onTranscriptClose:r,item:i,side:a,refs:c})=>{const{mode:l,isVariantLocale:d,handleOpenMediaModal:h,handleDelete:m,handleRevertToSource:f}=gu(),p=Rc(),v=Ut(),g=rt(),x=i&&"media"in i&&i.media?g(i.media):void 0,y=x&&"audio"in x?x.audio.aiAudioSettings:void 0,S=Dn(),I=tf(),b=S?I(S):"",[T,L]=(0,u.useState)(!1),E=(0,u.useCallback)(()=>L(!0),[]),k=(0,u.useCallback)(()=>L(!1),[]),N=y?.l10nAutoGenStatus==="reverted-to-source",P=d&&"audio"in x&&x.audio?.sourceType==="ai-audio"&&y?.l10nAutoGenStatus!=="unsupported-locale",A=Gt(),R=p?.audioPlayerIdOpen===e,j=R?A?.audioHideTranscript:l==="edit"?"Edit transcript":A?.audioShowTranscript;function M(O){switch(O){case qo.DeleteAudio:m(v.id,i,c);break;case qo.EditTranscript:R?r?.():s?.();break;case qo.EditAudio:h(v,i,c,a,{triggeredFrom:"block_audio_button"});break;case qo.RevertToSource:f(v.id,i);break}}const w=!!g(n)?.audio?.transcript;return h||m||w?(0,o.jsx)(Bs,{elementFocused:T,message:"Options",children:(0,o.jsxs)(MX,{onSelect:M,positionX:"left",children:[(0,o.jsx)(OX,{className:qi("trigger",{condensed:t}),label:"Options",onBlur:k,onFocus:E,onMouseEnter:E,onMouseLeave:k,children:(0,o.jsx)(ae,{name:"ellipsis-regular"})}),(0,o.jsxs)(BX,{className:qi("content"),children:[h?(0,o.jsx)(Gu,{className:qi("menu-item"),name:qo.EditAudio,children:"Edit audio"}):null,l==="edit"||w?(0,o.jsx)(Gu,{className:qi("menu-item"),name:qo.EditTranscript,children:j}):null,m&&v?.variant!=="audio"?(0,o.jsx)(Gu,{className:qi("menu-item"),name:qo.DeleteAudio,children:"Remove audio"}):null,f&&P?(0,o.jsx)(Bs,{message:N?"Audio currently synced to source":void 0,children:(0,o.jsxs)(Gu,{className:qi("menu-item"),isDisabled:N,name:qo.RevertToSource,children:["Revert to source audio (",b,")"]})}):null]})]})}):null};var HX,VX,Qe=C(49860);const _c=Qe.createContext(null);function zX({children:e,className:t,isDisabled:n,onClose:s,onItemActiveChange:r,onOpen:i,onSelect:a,portalArgs:c,positionX:l="left",value:d}){const[h,m]=Qe.useState(null),f=(0,Ve.A)(h),[p,v]=Qe.useState(!1),g=(0,Ve.A)(p),[x,y]=Qe.useState(null),S=Qe.useRef(null),I=Qe.useRef(null),b=Qe.useRef(null),L=`select-${Qe.useId()}`,E=`${L}-content`,k=h?.id,N=Qe.useCallback(w=>{const O=w.currentTarget;B5(O)||(v(!1),m(O),a(O.getAttribute("data-value")),w.stopPropagation())},[a]),P=Qe.useCallback(w=>{m(w)},[]),A=Qe.useCallback(()=>{v(w=>!w)},[]),R=Qe.useCallback(()=>{const{left:w,top:O}=np({anchor:I.current,popover:b.current,positionX:l}),_=window.getComputedStyle(I.current).direction==="rtl"?-w:w;y({transform:`translate3d(${_}px, ${O}px, 0)`,visibility:"visible",width:`${I.current?.offsetWidth}px`})},[l]),j=Qe.useCallback(w=>{const O=Array.from(b.current?.querySelectorAll("[data-select-item]")??[]),B=O.length,D=O.findIndex($=>$.getAttribute("data-select-item")==="current");let _,F=D+1;for(let $=0;$<B;$++){F>=B&&(F=0);const z=O[$];if(z!=null&&!B5(z)&&WX(z,w)){_=$;break}else F=B-1}_&&(m(O[_]),O[_]?.scrollIntoView({block:"center"}))},[]),M=Qe.useCallback(w=>{const O=w.key;if(w.ctrlKey||w.metaKey)return;let B=!1;const D=Array.from(b.current?.querySelectorAll("[data-select-item]")??[]),_=D.findIndex(F=>F.getAttribute("data-select-item")==="current");if(p)if(O.length===1&&O!==" "&&!w.altKey&&!w.ctrlKey&&!w.metaKey)j(O);else switch(O){case" ":case"Enter":v(!1),D[_]!=null&&a(D[_].getAttribute("data-value")),B=!0;break;case"Esc":case"Escape":v(!1),m(D.find(F=>F.getAttribute("aria-selected")==="true")),B=!0;break;case"ArrowUp":w.altKey?(v(!1),D[_]!=null&&a(D[_].getAttribute("data-value")??"")):_>0&&(m(D[_-1]),D[_-1].scrollIntoView({block:"center"})),B=!0;break;case"ArrowDown":_<D.length-1&&(m(D[_+1]),D[_+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":v(!1),D[_]!=null&&a(D[_].getAttribute("data-value"));break}else if(O.length===1&&O!==" "&&!w.altKey&&!w.ctrlKey&&!w.metaKey)v(!0),j(O);else switch(O){case" ":case"Enter":v(!0),B=!0;break;case"ArrowUp":v(!0),m(D[0]),B=!0;break;case"ArrowDown":v(!0),B=!0;break;case"Home":v(!0),m(D[0]),B=!0;break;case"End":v(!0),m(D[D.length-1]),B=!0;break}B&&(w.stopPropagation(),w.preventDefault())},[j,p,a]);return Qe.useEffect(()=>{const w=b.current?.querySelector('[data-select-item][aria-selected="true"]');m(w)},[]),Qe.useEffect(()=>{const w=b.current?.querySelector(`[data-select-item][data-value="${d}"]`);m(w)},[d]),Qe.useEffect(()=>{const w=O=>{p&&S.current!=null&&b.current!=null&&!S.current.contains(O.target)&&!b.current.contains(O.target)&&v(!1)};return p?document.addEventListener("click",w):document.removeEventListener("click",w),()=>{document.removeEventListener("click",w)}},[p]),Qe.useEffect(()=>(p?window.addEventListener("resize",R):window.removeEventListener("resize",R),()=>{window.removeEventListener("resize",R)}),[R,p]),Qe.useEffect(()=>{const w=bc(S.current);for(const O of w)p?O?.addEventListener("scroll",R,{passive:!0}):O?.removeEventListener("scroll",R);return()=>{for(const O of w)O?.removeEventListener("scroll",R)}},[R,p]),Qe.useEffect(()=>{p?R():y(null)},[R,p]),Qe.useEffect(()=>{p&&f!=null&&f!==h&&r?.({value:h.getAttribute("data-value")})},[p,f,h,r]),Qe.useEffect(()=>{if(g&&!p)s?.();else if(!g&&p&&(i?.(),S.current)){const w=new CustomEvent("comboboxopen",{bubbles:!0,detail:{target:S.current}});S.current.dispatchEvent(w)}},[g,p,s,i]),Qe.useEffect(()=>{const w=O=>{O.detail.target!==S.current&&v(!1)};return document.addEventListener("comboboxopen",w),()=>{document.removeEventListener("comboboxopen",w)}},[]),(0,o.jsx)(_c.Provider,{value:{activeEl:h,htmlIdActiveDescendant:k,htmlIdBase:L,htmlIdContent:E,isExpanded:p,onItemClick:N,onItemHover:P,onTriggerClick:A,onTriggerKeyDown:M,portalArgs:c,refContent:b,refTrigger:I,selectedValue:d,styleContent:x},children:(0,o.jsx)("div",{"aria-owns":E,className:t,inert:n?!0:void 0,ref:S,children:e})})}function $X({children:e,className:t,labelledBy:n,as:s,...r}){const{htmlIdActiveDescendant:i,htmlIdContent:a,isExpanded:c,onTriggerClick:l,onTriggerKeyDown:d,refTrigger:h}=Qe.useContext(_c),m=!!s,f=s??"button";return(0,o.jsxs)(f,{"aria-activedescendant":i,"aria-controls":a,"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,o.jsx)("span",{"data-select-trigger-text":"",children:e}),(0,o.jsx)("span",{"data-select-trigger-icon":"",children:c?(0,o.jsx)(ae,{name:"chevron-up"}):(0,o.jsx)(ae,{name:"chevron-down"})})]})}function UX({children:e,className:t,label:n,labelledBy:s,style:r={}}){const{htmlIdContent:i,isExpanded:a,portalArgs:c,refContent:l,styleContent:d}=Qe.useContext(_c);return bs.createPortal((0,o.jsx)("div",{"aria-label":n,"aria-labelledby":s,className:t,"data-select-content":"",hidden:a?void 0:!0,id:i,ref:l,role:"listbox",style:{...d,...r},children:e}),so(c))}function obe({children:e,className:t,labelText:n}){const{htmlIdBase:s}=Qe.useContext(_c),r=Qe.useId(),i=`${s}-group-label-${r}`;return HX("div",{"aria-labelledby":i,className:t,"data-select-group":"",role:"group",children:[VX("div",{"data-select-group-label":"",id:i,role:"presentation",children:n}),e]})}function GX({children:e,className:t,labelledBy:n,isDisabled:s,value:r}){const{activeEl:i,htmlIdBase:a,onItemClick:c,onItemHover:l,selectedValue:d}=Qe.useContext(_c),h=Qe.useRef(null),m=Qe.useId(),f=h.current===i,p=r===d,v=`${a}-option-${m}`,g=Qe.useCallback(()=>{l(h.current)},[l]);return(0,o.jsxs)("div",{"aria-disabled":s,"aria-labelledby":n,"aria-selected":p,className:t,"data-select-item":f?"current":"","data-value":r,id:v,onClick:s?void 0:c,onMouseEnter:g,ref:h,role:"option",children:[e,p&&(0,o.jsx)("span",{"data-select-item-selected":"",children:(0,o.jsx)(ae,{name:"check"})})]})}function B5(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function WX(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const tg=V("playback-speed-menu"),KX=({onChange:e,condensed:t=!1,speed:n})=>{const s=Gt(),[r,i]=(0,u.useState)(!1),a=(0,u.useCallback)(()=>i(!0),[]),c=(0,u.useCallback)(()=>i(!1),[]);return(0,o.jsx)(Bs,{elementFocused:r,message:s?.audioPlaySpeed,children:(0,o.jsxs)(zX,{className:tg(),onOpen:c,onSelect:l=>e(parseFloat(l)),portalArgs:{id:"portal",childType:"other"},value:String(n),children:[(0,o.jsxs)($X,{"aria-label":s?.audioPlaySpeed,className:tg("trigger",{condensed:t}),labelledBy:void 0,onBlur:c,onFocus:a,onMouseEnter:a,onMouseLeave:c,children:[n,"x"]}),(0,o.jsx)(UX,{className:tg("content"),label:s?.audioPlaySpeed,children:AX.map((l,d)=>(0,o.jsx)(GX,{value:String(l.value??""),children:l.label},d))})]})})};function QX(e=!1,t=200){const n=(0,u.useRef)(void 0),[s,r]=(0,u.useState)(e),i=(0,u.useCallback)(()=>{n.current&&clearTimeout(n.current),r(!0)},[]),a=(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:s,setActive:i,setInactive:a}}const ng=V("audio-player-volume"),ZX=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function YX(e,t){return t||e<=0?"volumeXmark":e<=1/3?"volumeLow":e<=2/3?"volume":"volumeHigh"}function qX({condensed:e=!1,muted:t,onChange:n,onMute:s,volume:r}){const i=Gt(),a=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),{isActive:d,setActive:h,setInactive:m}=QX(!1,200),f=t?0:r;function p(g){if(ZX.includes(g.code)){const S=window.getComputedStyle(g.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",I=g.code==="ArrowUp"||g.code===S?Math.min(f+.05,1):Math.max(f-.05,0);n(I),g.stopPropagation(),g.preventDefault()}else g.code==="KeyM"&&(s(),g.stopPropagation(),g.preventDefault())}(0,u.useEffect)(()=>{l.current.style.setProperty("--slider-volume",`${f*100}%`)},[f]);const v=`${Math.round(f*100)}%`;return(0,o.jsxs)("div",{className:ng(),onKeyDown:p,onMouseEnter:h,onMouseLeave:()=>m(!1),ref:a,children:[(0,o.jsx)("button",{"aria-label":f<=0?i?.a11yMediaUnmute:i?.a11yMediaMute,className:ng("button",{condensed:e}),onClick:s,ref:c,type:"button",children:(0,o.jsx)(ae,{name:YX(f,t)})}),(0,o.jsx)("input",{"aria-label":i?.a11yMediaVolume,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":f*100,"aria-valuetext":v,className:ng("slider").mix(d?"":"visually-hidden"),max:100,min:0,onChange:g=>n(g.currentTarget.valueAsNumber/100),ref:l,type:"range",value:f*100})]})}const _n=V("audio-player"),Wu=({currentTime:e,duration:t})=>Math.round(e/t*100)||0,D5=e=>{if(!e)return{hours:0,minutes:0,seconds:0};const t=Math.floor(e/3600),n=Math.floor(e%3600/60),s=e%60;return{hours:t,minutes:n,seconds:s}},F5=e=>{const{minutes:t,seconds:n}=D5(e);let s="";return t>0&&(s+=`${new Intl.NumberFormat(void 0,{style:"unit",unit:"minute",unitDisplay:"long"}).format(t)} `),s+=new Intl.NumberFormat(void 0,{style:"unit",unit:"second",unitDisplay:"long"}).format(Math.round(n)),s},XX=e=>{const{hours:t,minutes:n,seconds:s}=D5(e);function r(c,l,d){return(new Array(d+1).join(l)+c).slice(-d)}const i=r(n,"0",2),a=r(s,"0",2);return t>0?`${t}:${i}:${a}`:`${n}:${a}`};class Xi 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:s,duration:r}=this.audio,{maxTime:i}=this.state;let a=s+t;n&&a>i&&(a=i);const c=Math.max(0,r-.01);this.audio.currentTime=t<0?Math.max(a,0):Math.min(a,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(){ye.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(),ye.isPlaying&&ye.playerId===this.props.id&&ye.pause()),n.playbackSpeed!==this.state.playbackSpeed&&(this.audio.playbackRate=this.state.playbackSpeed)}componentWillUnmount(){const{recordMediaPlayheadPosition:t,id:n}=this.props;ye.playerId===n&&ye.pause(),ye.removeChangeListener(this.handleChange),t&&t(Wu(this.audio))}handleClickInsideAudioPlayer=t=>{t.stopPropagation(),t.preventDefault()};handleChange(){ye.playerId===this.props.id?this.audio&&(ye.isPlaying&&this.audio.paused?this.audio.play():!ye.isPlaying&&!this.audio.paused&&this.audio.pause(),this.forceUpdate()):ye.isPlaying&&(this.audio.pause(),this.forceUpdate())}containerResizeRef=t=>{const n=new ResizeObserver(([s])=>{if(!s)return;const r=getComputedStyle(document.documentElement),i=parseFloat(r.fontSize)/10;this.setState({condensed:s.contentRect.width<300*i})});return this.setState({condensed:t.getBoundingClientRect().width<256}),n.observe(t),()=>{n.disconnect()}};render(){const{allowTabNavigation:t,id:n,isEditor:s,isOverlayAudio:r,labels:i,mediaSrc:a,mode:c,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m,item:f,side:p,refs:v,transcriptAudioPlayerIdOpen:g}=this.props,x=ye.isPlaying&&ye.playerId===n,{currentTime:y,playerExpanded:S}=this.state,I=this.audio?.duration??0,b=Number.isFinite(I)?I:0,T=Math.round(b-y),L=XX(T),E=F5(T),k=F5(y),N=t?0:-1,P=!s,{a11yGroupAudioPlayer:A,a11yMediaPlay:R,a11yMediaPause:j,a11yMediaSeek:M}=i??{},w=_n({overlay:r,collapsed:r&&!S,expanded:!r||S,"volume-slider-below":this.props.volumeSliderPosition==="below"}),O=s||c==="edit"?"Collapse audio player":i?.audioCollapsePlayer,B=s||c==="edit"?"Expand audio player":i?.audioExpandPlayer,D=S?O:B,_=Is({refs:v}),$=g===_?Lp(g):void 0;return(0,o.jsx)("div",{className:_n("container"),"data-search-content-ignore":"",onClick:this.handleClickInsideAudioPlayer,ref:this.containerResizeRef,children:(0,o.jsxs)("div",{className:w,id:n,children:[P&&(0,o.jsx)("div",{className:_n("waveform"),children:r?(0,o.jsx)(Bs,{message:D,children:(0,o.jsx)("button",{"aria-label":D,className:_n("waveform-icon"),onClick:this.onTogglePlayer,type:"button",children:(0,o.jsx)(M5,{animating:x})})}):(0,o.jsx)("div",{className:_n("waveform-icon",{disabled:!0}),children:(0,o.jsx)(M5,{animating:x})})}),(0,o.jsxs)("div",{"aria-hidden":!t,"aria-label":A,"aria-owns":$,className:_n("housing",{"with-border":P}),inert:!this.state.playerExpanded,onKeyDown:this.onKeyDown.bind(this),role:"group",tabIndex:N,children:[(0,o.jsxs)("div",{className:_n("play-timer-housing"),children:[(0,o.jsx)("button",{"aria-label":x?j:R,className:_n("play",{condensed:this.state.condensed}),onClick:this.onPlayClick,ref:z=>{this.play=z},tabIndex:N,type:"button",children:(0,o.jsx)(ae,{className:_n("icon"),name:x?"pause-solid":"play-solid"})}),(0,o.jsx)("input",{"aria-label":M,"aria-valuemax":b,"aria-valuemin":0,"aria-valuenow":y,"aria-valuetext":k,className:_n("seek-slider"),max:b,min:0,onChange:this.onSeekSliderChange.bind(this),ref:z=>{this.seekSlider=z},step:.01,style:{"--seek-slider-percent":`${this.state.sliderPercent}%`},type:"range",value:y}),(0,o.jsx)("div",{"aria-label":E,className:_n("timer").mix(this.state.condensed?"visually-hidden-always":""),role:"timer",children:L})]}),(0,o.jsxs)("div",{className:_n("player-controls"),ref:z=>{this.playerControls=z},children:[(0,o.jsx)(KX,{condensed:this.state.condensed,onChange:z=>{this.setState({playbackSpeed:z})},speed:this.state.playbackSpeed}),(0,o.jsx)(qX,{condensed:this.state.condensed,muted:this.state.muted,onChange:this.changeVolume,onMute:this.muteToggle,volume:this.state.volume}),c==="readonly"||s?(0,o.jsx)(jX,{audioPlayerId:_,condensed:this.state.condensed,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m}):(0,o.jsx)(_X,{audioPlayerId:_,condensed:this.state.condensed,item:f,onTranscriptClick:d,onTranscriptClose:h,refs:v,side:p,transcriptMedia:m})]})]}),(0,o.jsx)("audio",{className:_n("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:z=>{this.audio=z},src:yt(`${a}`)},"audio-"+n)]},`player-${n}`)})}onKeyDown(t){const s=Ss(this.onPlayClick),r=Ss(()=>this.keySeek(5)),i=Ss(()=>this.keySeek(-5)),a=Ss(()=>this.changeVolumeDelta(.05)),c=Ss(()=>this.changeVolumeDelta(-.05)),l=Ss(()=>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=Tn()([[cc,s],[Go,Qo],[Uo,Qo],[_r,Qo],[Fr,Qo]]),p=Tn()([[cc,s],[dH,r],[uH,i]]),v=Tn()([[cc,s],[Go,r],[Uo,i],[Fr,a],[_r,c],[g=>g.code==="KeyM",l]]);Tn()([[d,f],[h,p],[m,Qo],[vr(),v]])(t)}onPlayClick(t){t.stopPropagation(),t.preventDefault();const{audioVideoPlayhead:n}=this.props,{duration:s,paused:r}=this.audio;r&&n&&this.state.shouldLoadPlayheadPosition&&(this.audio.currentTime=s*n/100||0),r?this.audio.play():this.audio.pause()}onAudioPlayPause=t=>{const{id:n,onPause:s,onPlay:r,onTranscriptUpdate:i,recordMediaPlayheadPosition:a,refs:c,transcriptMedia:l}=this.props,{paused:d,currentTime:h,duration:m}=t.currentTarget;if(d)d&&ye.playerId===n&&(ye.isPlaying=!1,s(Xi.timeMs(h)),a&&a(Wu({currentTime:h,duration:m})));else{ye.playerId=n,ye.isPlaying=!0,r(Xi.timeMs(h));const f=Is({refs:c});i?.({audioPlayerId:f,transcriptMedia:l})}this.setState({shouldLoadPlayheadPosition:!1})};onVolumeChangeHandler=t=>{const{volume:n,muted:s}=t.currentTarget;this.setState({volume:n,muted:s})};onSeekSliderChange(t){const{canRestrictSeek:n}=this.props,{maxTime:s}=this.state;let r=t.currentTarget.valueAsNumber;n&&r>s&&(r=s),this.audio.currentTime=r}onLoadedMetadata(t){const{currentTime:n,duration:s,muted:r,volume:i}=t.currentTarget,a=n/s*100;this.setState({currentTime:n,muted:r,volume:i,sliderPercent:a});const{onLoad:c}=this.props;c()}onEnded(t){const n=t.currentTarget;this.audio.currentTime=0,this.setState({currentTime:n.currentTime}),ye.isPlaying=!1,this.props.onEnd(Xi.timeMs(n.currentTime)),this.forceUpdate()}onSeeked(t){const{id:n,onSeek:s,recordMediaPlayheadPosition:r}=this.props,{currentTime:i,duration:a}=t.currentTarget;ye.isPlaying&&ye.playerId!==n&&(ye.isPlaying=!1),ye.playerId=n,s(Xi.timeMs(i)),r&&r(Wu({currentTime:i,duration:a}))}onTimeUpdate(t){const n=t.currentTarget,{recordMediaPlayheadPosition:s}=this.props,{currentTime:r,duration:i}=n,a=Math.floor(r);r>this.state.maxTime&&this.setState({maxTime:r});const c=r/i*100;D1(),this.setState({currentTime:r,sliderPercent:c}),a%5===0&&this.state.playheadPositionSaveThrottle!==a&&s&&(s(Wu(n)),this.setState({playheadPositionSaveThrottle:a}))}onTogglePlayer(t){this.setState(({playerExpanded:n})=>({playerExpanded:!n})),t.preventDefault(),t.stopPropagation()}}const JX=Xi,lo=e=>t=>t!=null&&typeof t=="object"&&"status"in t&&typeof t.status=="string"&&e.includes(t.status),eJ=lo(["uploading","processing","cropping","crushing"]),ibe=lo(["canceled"]),_5=lo(["complete"]),tJ=lo(["cropping"]),nJ=lo(["crushing"]),sJ=lo(["uploading"]),oJ=lo(["processing"]),rJ=lo(["errored"]),H5=lo(["cropping","crushing","errored","processing","uploading"]);function iJ(e){return e==null||typeof e!="object"?0:Object.values(e).filter(eJ).length}function abe(e){return Math.round(e.loaded*100/e.total)}const cbe=e=>e?.file?.name||e?.opts?.filename||"";function lbe(e){return e==null||typeof e!="object"?!1:Object.keys(e).length>0&&iJ(e)>0}const Ku=e=>X()("upload-progress__wrapper",e),V5=(0,u.createContext)(null);function z5(){return(0,u.useContext)(V5)}const dbe=V5.Provider;function aJ(e){function t(n){const s=z5();return s?(0,o.jsx)(e,{...n,getUpload:s.getUpload,handleUploadDismiss:s.handleUploadDismiss}):(0,o.jsx)(e,{...n})}return t.displayName=`withUploadStatusContext(${e.displayName||e.name})`,t}const Qu=({onClick:e,text:t})=>(0,o.jsxs)("button",{className:"upload-action-button",onClick:e,type:"button",children:[t,(0,o.jsx)("span",{className:"visually-hidden-always",children:" upload"})]}),sg=20,Hc=sg/2,og=Hc-2,$5=+(2*Math.PI*og).toFixed(3),cJ=e=>$5*(100-e)/100;function U5({classes:e,percent:t}){return(0,o.jsxs)("svg",{className:X()("upload-progress__pie",e),focusable:"false",height:`${sg}px`,width:`${sg}px`,children:[(0,o.jsx)("circle",{className:"upload-progress__border",cx:Hc,cy:Hc,r:og}),(0,o.jsx)("circle",{className:"upload-progress__progress",cx:Hc,cy:Hc,r:og,strokeDasharray:$5,strokeDashoffset:cJ(t)})]})}const lJ=({text:e})=>(0,o.jsxs)("div",{className:"upload-progress",children:[(0,o.jsx)(U5,{classes:"upload-progress__pie--processing",percent:70}),(0,o.jsx)("div",{className:"upload-progress__text",children:e})]}),dJ=({percentage:e,text:t="Uploading\u2026"})=>(0,o.jsxs)("div",{className:"upload-progress",children:[(0,o.jsx)(U5,{percent:e}),(0,o.jsx)("div",{className:"upload-progress__text",children:t})]}),rg=({classes:e,jobId:t,onCancel:n,text:s})=>(0,o.jsxs)("div",{className:Ku(e),children:[(0,o.jsx)(lJ,{text:s}),t&&(0,o.jsx)(Qu,{onClick:n,text:"Cancel"})]}),uJ=({classes:e,onCancel:t,percentage:n,text:s})=>(0,o.jsxs)("div",{className:Ku(e),children:[(0,o.jsx)(dJ,{percentage:n,text:s}),(0,o.jsx)(Qu,{onClick:t,text:"Cancel"})]}),hJ=({message:e="Error"})=>(0,o.jsxs)("div",{className:"upload-error",children:[(0,o.jsx)(ae,{name:"circle-exclamation"}),(0,o.jsx)("div",{className:"upload-error__text",children:e})]}),mJ=({classes:e,message:t,onClick:n})=>(0,o.jsxs)("div",{className:Ku(e),children:[(0,o.jsx)(hJ,{message:t}),(0,o.jsx)(Qu,{onClick:n,text:"Dismiss"})]}),fJ=({message:e="Success"})=>(0,o.jsxs)("div",{className:"upload-success",children:[(0,o.jsx)(ae,{name:"check-regular"}),(0,o.jsx)("div",{className:"upload-success__text",children:e})]}),pJ=({classes:e,message:t,onClick:n})=>(0,o.jsxs)("div",{className:Ku(e),children:[(0,o.jsx)(fJ,{message:t}),n?(0,o.jsx)(Qu,{onClick:n,text:"Dismiss"}):null]}),gJ=e=>{const{classes:t,data:n={},errorMessage:s,jobId:r,progress:i,onCancelUpload:a,onCancelProcess:c,onErrorDismiss:l,onSuccessDismiss:d,successMessage:h,uploadType:m}=e;return rJ(e)?(0,o.jsx)(mJ,{classes:t,message:s||n?.message,onClick:l}):sJ(e)?(0,o.jsx)(uJ,{classes:t,onCancel:a,percentage:i,text:`Uploading ${m}\u2026`}):oJ(e)?(0,o.jsx)(rg,{classes:t,jobId:r,onCancel:c,text:`Processing ${m}\u2026`}):nJ(e)?(0,o.jsx)(rg,{classes:t,onCancel:c,text:`Uploading ${m}\u2026`}):tJ(e)?(0,o.jsx)(rg,{classes:t,onCancel:c,text:"Cropping image\u2026"}):_5(e)&&h?(0,o.jsx)(pJ,{classes:t,message:h,onClick:d}):(0,o.jsx)("div",{})},ig=V("audio-player"),vJ=ig("upload-state");function G5({uploadId:e,onAIUploadFinish:t,volumeSliderPosition:n,...s}){const r=z5(),{mode:i}=gu(),a=Rc(),c=r&&e?r.getUpload(e):null,l=(0,u.useMemo)(()=>c&&c.mediaType==="audio"&&H5(c),[c]),d=(0,Ve.A)(l);if((0,u.useEffect)(()=>{!l&&d&&t?.()},[l,d,t]),l){const{jobId:h,status:m,progress:f,data:p}=c,v=x=>()=>r?.handleUploadDismiss(x,c),g=ig({overlay:s.isOverlayAudio,static:s.isOverlayAudio});return(0,o.jsx)("div",{className:ig("container"),children:(0,o.jsx)("div",{className:g,children:(0,o.jsx)(gJ,{classes:vJ,errorMessage:p?.message,jobId:h,onCancelProcess:v("process"),onCancelUpload:v("upload"),onErrorDismiss:v("error"),progress:f,status:m,successMessage:"Processing\u2026",uploadType:"audio"})})})}return(0,o.jsx)(JX,{...s,mode:i,transcriptAudioPlayerIdOpen:a?.audioPlayerIdOpen??null,volumeSliderPosition:n})}var CJ=C(91242),xJ=C.n(CJ),bJ=C(22954),yJ=C.n(bJ),SJ=C(82945),gbe=C(39754);function W5({children:e,...t}){return Fn()?e:(0,o.jsx)(SJ.i,{IconUnzoom:TJ,IconZoom:IJ,...t,children:e})}const IJ=()=>(0,o.jsx)(ae,{name:"arrows-two-from-center"}),TJ=()=>(0,o.jsx)(ae,{name:"arrows-two-to-center"}),LJ={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 EJ(){const t=He()?.id,n=Gm();return(0,u.useCallback)(s=>n&&t!=null?LJ.lesson({courseId:t,lessonId:s}):Ln(s),[t,n])}const kJ="about:blank",NJ=e=>{const t=e?.trim();if(!t)return null;const n=Rn(t);return n===kJ?null:/^(https?:\/\/|mailto:)/i.test(n)||/^(\.?\/|[#?])/.test(n)?n:`http://${n.replace(/^\/\//,"")}`},Ji=u.memo(({align:e,alt:t,allowTabNavigation:n=!0,cornerRadius:s,disableZoom:r,getLessonPath:i,height:a,l10nId:c,labels:l,link:d,maxHeight:h=380,onLoad:m,shouldFillWidth:f,src:p,width:v})=>{const g=EJ(),x=i??g,y=jo(t),S=d?.type==="url"&&d.destination?NJ(d.destination):null,I=d?.type==="block"?TQ(d.destination):null,b=d?.type==="lesson"&&!!d.destination||I!=null||!!S,T=n&&!r&&!b,L=X()("img-img",{"img-img--left":e==="left","img-img--right":e==="right","img-img--center":!e||e==="center","img-img--fill":f});let E={};s!=null&&(E["--corner-radius"]=`${Number(s)}px`),v>0&&a>0&&a>h?(v=Math.round(v*h/a),a=h):h&&(!v||!a)&&(E={maxHeight:h});let k=(0,o.jsx)(An,{alt:y,className:L,"data-l10n-id":c,height:a,onLoad:m,src:p,style:E,width:v});return b&&d?d.type==="lesson"?k=(0,o.jsx)(pn,{className:"img__link",to:x(d.destination),children:k}):d.type==="block"&&I?k=(0,o.jsx)(pn,{className:"img__link",to:`${x(I.lessonId)}?blockId=${I.blockId}`,children:k}):S&&(k=(0,o.jsx)("a",{className:"img__link",href:S,rel:"noopener noreferrer nofollow",target:"_blank",children:k})):T&&(k=(0,o.jsx)(W5,{a11yNameButtonUnzoom:l?.a11yUnzoomImage,a11yNameButtonZoom:l?.a11yZoomImage,children:k})),(0,o.jsx)("div",{className:"img",children:k})});var Cbe=C(17897),jJ=C(22294),wJ=C.n(jJ);const RJ=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,AJ=/\.[a-z]{2,}\.?$/i,PJ=(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,MJ=e=>ag(e);function xbe(e){try{if(MJ(e))return new URL(e);throw new Error("invalid URL")}catch{return}}const ag=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 s=RJ.exec(n);return s?!PJ(Number(s[1]),Number(s[2])):AJ.test(n)},OJ=/^<iframe\b[^>]*\ssrc="([^"]+)"[^>]*><\/iframe>$/,BJ=e=>{if(typeof e!="string")return!1;const t=OJ.exec(e);return t?ag(t[1]):!1};var DJ,FJ,_J,HJ,VJ;const K5=un()("type","embed"),zJ=wJ()("type","embedType"),$J=di()(/http:/i,"https:"),UJ=e=>({embedType:"iframe",originalUrl:e,src:e}),GJ=e=>Xr(e.embed),Xr=e=>e?.embedType||e?.type,bbe=e=>_J([[HJ,DJ(K5,UJ,$J)],[VJ,FJ(K5,zJ,e)]]),ybe=ko()($e()(BJ,M1),ag),Sbe="We are unable to generate an embed for this URL. Please check that the URL is valid and the content is publicly accessible.";var Jr=C(49860);const Q5=e=>{const t=Ne("CDN_USER_CONTENT_URI"),n=new RegExp(Ne("CDN_URI"),"g");return Ia()?e:n.test(e)?`${t}${new URL(e).pathname}${new URL(e).search}`:e},WJ=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:","")},KJ=/^\/\/cdn.embedly.+src=.*\.typeform\.com%2F/,QJ=e=>KJ.test(e),ZJ=/^\/\//,Z5=e=>e?.replace(ZJ,"https://"),Zu=e=>{try{if(e===!1)return e;const t=new URL(Z5(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}},YJ=$e()(Zu,Z5,gr()(QJ,WJ),gr()(Boolean,yt),Rn),qJ=e=>{const{paddingBottom:t,ref:n,value:s}=e;return(0,o.jsx)("div",{className:"embed--iframe",dangerouslySetInnerHTML:Jr.useMemo(()=>({__html:s}),[s]),ref:n,style:{paddingBottom:t}})};class XJ extends Jr.Component{player;refIframeContainer=Jr.createRef();refIframePlayer=Jr.createRef();state={duration:0,isReady:!1};static get defaultProps(){return{allowTabNavigation:!0,shouldPause:!1,showMetaData:!0}}componentDidUpdate(t){!t.shouldPause&&this.props.shouldPause&&ye.isPlaying&&(this.player?.pause(),ye.isPlaying=!1)}componentWillUnmount(){Xr(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}),ye.addChangeListener(this.handlePlayerChange))};handlePlayerPlay=()=>{const{id:t}=this.props;ye.isPlaying&&ye.playerId!==t&&(ye.isPlaying=!1),ye.playerId=t,ye.isPlaying=!0};handlePlayerUpdate=t=>{this.props.progressChanged?.({done:t.seconds/t.duration*100})};handlePlayerChange=()=>{const{id:t}=this.props;ye.playerId===t&&(ye.isPlaying?this.player.play():this.player.pause())};setupPlayer=()=>{this.refIframePlayer.current?.contentWindow!=null&&(this.player!=null&&this.teardownPlayer(),this.player=new(xJ()).Player(this.refIframePlayer.current),this.player.on("ready",this.handlePlayerReady))};teardownPlayer=()=>{ye.isPlaying=!1,ye.removeChangeListener(this.handlePlayerChange),this.player&&(this.player.off("play"),this.player.off("ready"),this.player.off("timeupdate"),delete this.player)};playerSupportsMethods=t=>{const n=s=>this.player.supports("method",s);return yJ()(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=Ss(this.togglePlay),i=Ss(()=>this.keySeek(5)),a=Ss(()=>this.keySeek(-5)),c=Ss(()=>this.changeVolume(10)),l=Ss(()=>this.changeVolume(-10));Tn()([[nf,r],[Go,i],[Uo,a],[Fr,c],[_r,l]])(t)};renderProvider=()=>{const{allowTabNavigation:t,embedId:n,externalLinksDisabled:s,onLinkBlur:r,onLinkFocus:i,onLinkMouseEnter:a,onLinkMouseLeave:c,showMetaData:l,data:d}=this.props,{providerUrl:h,provider:m,favicon:f}=d;if(!(l&&h))return null;const p=Zu(Rn(h)),v=s&&Zn(p),g=`${n}-provider`,x=v?"":void 0,y=v?void 0:p,S=v?void 0:"noopener noreferrer",I=v?"button":void 0,b=v?void 0:"_blank";return(0,o.jsx)("h2",{className:"embed__provider",children:(0,o.jsxs)("a",{"aria-describedby":v?ys(g):void 0,className:"brand--hoverColor","data-external":x,href:y,id:v?g:void 0,onBlur:v?()=>r?.(g):void 0,onFocus:v?()=>i?.(g):void 0,onMouseEnter:v?()=>a?.(g):void 0,onMouseLeave:v?()=>c?.(g):void 0,rel:S,role:I,style:v?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:b,children:[(0,o.jsx)(An,{alt:f?m:"",className:"embed__providerIcon",src:f}),(0,o.jsx)("span",{className:"embed__providerName",children:m})]})})};renderMetaData=()=>{const{allowTabNavigation:t,data:n,embedId:s,externalLinksDisabled:r,labels:i,onLinkBlur:a,onLinkFocus:c,onLinkMouseEnter:l,onLinkMouseLeave:d,showMetaData:h}=this.props,{src:m,title:f,description:p,provider:v}=n,g=Xr(n);if(!h&&g!=="link")return null;const x=Zu(Rn(m)),y=r&&Zn(x),S=`${s}-metadata-title`,I=`${s}-metadata-readmore`,b=T=>({"aria-describedby":y?ys(T):void 0,"data-external":y?"":void 0,href:y?void 0:x,id:y?T:void 0,onBlur:y?()=>a?.(T):void 0,onFocus:y?()=>c?.(T):void 0,onMouseEnter:y?()=>l?.(T):void 0,onMouseLeave:y?()=>d?.(T):void 0,rel:y?void 0:"noopener noreferrer nofollow",role:y?"button":void 0,style:y?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:y?void 0:"_blank"});return(0,o.jsxs)("div",{className:"embed__meta__content",children:[(0,o.jsx)("h2",{className:"embed__title",children:(0,o.jsx)("a",{className:"brand--hoverColor",...b(S),children:(0,o.jsx)(je,{value:f})})}),(0,o.jsx)(je,{className:"embed__description",value:p}),(0,o.jsxs)("a",{className:"embed__readMore brand--hoverColor",...b(I),children:[g==="link"?`${i?.embedReadMore} ${v}`:`${i?.embedViewOn} ${v}`,(0,o.jsx)("i",{className:"icon icon-chevron-right"})]})]})};render(){const{allowTabNavigation:t,data:n,embedId:s,externalLinksDisabled:r,isLesson:i,labels:a,onLinkBlur:c,onLinkFocus:l,onLinkMouseEnter:d,onLinkMouseLeave:h,showMetaData:m}=this.props,{useRelativePath:f}=n??{},{description:p,originalUrl:v,src:g,thumbnail:x,title:y}=n,S=Xr(n);if(S==="iframe"){const I=document.createElement("div");I.innerHTML=M1(g);const b=I.firstChild,T=b&&b.tagName&&b.tagName.toLowerCase()==="iframe";let L=100,E=32;if(this.props.isAuthoring&&f)return(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{className:"embed__relativeUrl--iframe",children:"Embedded iframe with a relative url"}),(0,o.jsx)("p",{className:"embed__relativeUrl--title",children:y}),(0,o.jsx)("p",{className:"embed__relativeUrl--url",children:v})]});if(T){const R=b.width.match(/%/),j=parseInt(b.width);b.src=Rn(b.src),L=R?700*(j/100):j||16,E=parseInt(b.height)}const k=E/L,N=T?`${k*100}%`:"3rem";let P=null;try{P=new URL(b.src)}catch{}if(P){const{hostname:R}=P,j=R==="typeform.com"||R.endsWith(".typeform.com"),M=R==="forms.office.com";j&&(P.searchParams.append("disable-auto-focus","true"),b.src=P.toString()),M&&(P.searchParams.append("embed","true"),b.src=P.toString())}const A=T?b.outerHTML:"<div>Error: Invalid iframe tag. Please check the iframe source.</div>";return(0,o.jsxs)("div",{"aria-hidden":!t,"aria-label":a?.embedPlayerGroup,className:"embed",role:"group",children:[f&&(0,o.jsx)("div",{className:"embed__title embed--iframe__title",children:y}),(0,o.jsx)(qJ,{paddingBottom:N,ref:this.refIframeContainer,value:A})]})}else if(i){const I=f?g:Zu(Rn(g)),b=r&&Zn(I),T=`${s}-lesson-title`,L=`${s}-lesson-url`,E=b?"":void 0,k=b?void 0:I,N=b?void 0:"noopener noreferrer nofollow",P=b?"button":void 0,A=b?void 0:"_blank";if(f){const R={"aria-describedby":b?ys(T):void 0,"data-external":b?"":void 0,href:I,id:b?T:void 0,onBlur:b?()=>c?.(T):void 0,onFocus:b?()=>l?.(T):void 0,onMouseEnter:b?()=>d?.(T):void 0,onMouseLeave:b?()=>h?.(T):void 0,rel:b?void 0:"noopener noreferrer nofollow",role:b?"button":void 0,tabIndex:t?0:-1,target:b?void 0:"_blank"};return(0,o.jsxs)("div",{"aria-hidden":!t,"aria-label":a?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[(0,o.jsx)("h2",{className:"embed__title",children:(0,o.jsx)("a",{className:"brand--hoverColor",...R,children:(0,o.jsx)(je,{value:y})})}),["link","photo"].includes(S)?(0,o.jsxs)("a",{"aria-describedby":b?ys(L):void 0,className:"embed__relativeUrl--url","data-external":E,href:k,id:b?L:void 0,onBlur:b?()=>c?.(L):void 0,onFocus:b?()=>l?.(L):void 0,onMouseEnter:b?()=>d?.(L):void 0,onMouseLeave:b?()=>h?.(L):void 0,rel:N,role:P,tabIndex:t?0:-1,target:A,children:[I,S==="photo"?(0,o.jsx)("div",{className:"embed__relativeUrl--image",children:(0,o.jsx)(An,{alt:x?y:"",className:"embed__img",src:I})}):null]}):this.renderEmbedIframe({allowTabNavigation:t,labels:a,src:g,thumbnail:x,title:y,type:S})]})}return(0,o.jsxs)("div",{"aria-hidden":!t,"aria-label":a?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[this.renderProvider(),["link","photo"].includes(S)?(0,o.jsx)("a",{"aria-describedby":b?ys(L):void 0,"data-external":E,href:k,id:b?L:void 0,onBlur:b?()=>c?.(L):void 0,onFocus:b?()=>l?.(L):void 0,onMouseEnter:b?()=>d?.(L):void 0,onMouseLeave:b?()=>h?.(L):void 0,rel:N,role:P,tabIndex:t?0:-1,target:A,children:(0,o.jsx)(An,{alt:x?y:"",className:"embed__img",src:Q5(x)})}):this.renderEmbedIframe({allowTabNavigation:t,labels:a,src:g,thumbnail:x,title:y,type:S}),this.renderMetaData()]})}else if(S==="link"){const I=f?g:Rn(g),b=f||r&&Zn(I),T=`${s}-link-readmore`,L=b?"":void 0,E=b?void 0:I,k=b?void 0:"noopener noreferrer nofollow",N=b?"button":void 0,P=b?void 0:"_blank";return(0,o.jsxs)("div",{"aria-hidden":!t,"aria-label":a?.embedLinkGroup,className:"embed embed--link brand--linkColor",role:"group",children:[(0,o.jsx)(je,{className:"embed__title",value:y}),(0,o.jsx)(je,{className:"embed__description",value:p}),(0,o.jsx)("a",{"aria-describedby":r&&b?ys(T):void 0,className:"embed__readMore brand--hoverColor","data-external":L,href:E,id:b?T:void 0,onBlur:b?()=>c?.(T):void 0,onFocus:b?()=>l?.(T):void 0,onMouseEnter:b?()=>d?.(T):void 0,onMouseLeave:b?()=>h?.(T):void 0,rel:k,role:N,target:P,children:a?.embedReadMore})]})}else return(0,o.jsxs)("div",{className:"embed embed--media",children:[m?(0,o.jsx)(je,{"aria-hidden":!t,className:"embed__title",value:y}):null,this.renderEmbedIframe({allowTabNavigation:t,labels:a,src:g,thumbnail:x,title:y,type:S})]})}renderEmbedIframe=t=>{const{allowTabNavigation:n,labels:s,src:r,thumbnail:i,title:a,type:c}=t,{useRelativePath:l}=this.props.data??{};if(c==="photo")return(0,o.jsx)("figure",{className:"embed__media-wrap embed__media-wrap--photo",children:(0,o.jsx)(Ji,{allowTabNavigation:n,labels:s,src:Q5(i)})});{const d=no.isIe11||no.isEdge,h=X()("embed__media-wrap",{"embed__media-wrap--ms_browser":d});return(0,o.jsxs)("figure",{"aria-hidden":!n,"aria-label":s?.embedPlayerGroup,className:h,onKeyDown:this.onKeyDown,ref:this.refIframeContainer,tabIndex:n?0:-1,children:[(0,o.jsx)("meta",{content:"origin",name:"referrer"}),(0,o.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:YJ(r),title:a})]})}}}const Y5=e=>{const t=Gm(),n=He(),s=e.externalLinksDisabled??(n&&"externalLinksDisabled"in n?n.externalLinksDisabled:!1),{handleMouseEnter:r,handleMouseLeave:i,handleFocus:a,handleBlur:c}=ou(),[l,d]=Jr.useState([]),h=Jr.useId();return Jr.useEffect(()=>{if(!s||!e.data){d([]);return}const m=[],{providerUrl:f,src:p,useRelativePath:v}=e.data,g=Xr(e.data);e.isLesson&&p&&Zn(Rn(p))&&(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&&Zn(Rn(f))&&m.push(`${h}-provider`)),!e.isLesson&&e.showMetaData&&f&&Zn(Rn(f))&&m.push(`${h}-provider`),!e.isLesson&&e.showMetaData&&p&&Zn(Rn(p))&&g!=="iframe"&&(m.push(`${h}-metadata-title`),m.push(`${h}-metadata-readmore`)),g==="link"&&(v||p&&Zn(Rn(p)))&&m.push(`${h}-link-readmore`),d(m)},[s,e.data,e.showMetaData,e.isLesson,h]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(XJ,{...e,embedId:h,externalLinksDisabled:s,isAuthoring:t,onLinkBlur:c,onLinkFocus:a,onLinkMouseEnter:r,onLinkMouseLeave:i}),l.map(m=>(0,o.jsx)(ru,{anchorId:m},m))]})};var JJ=C(63074);const eee={hovered:null,setHovered:dn},cg=(0,u.createContext)(null);function tee({children:e}){const t=(0,u.useContext)(cg),[n,s]=(0,u.useState)(null),r=(0,u.useMemo)(()=>({hovered:n,setHovered:s}),[n]);return t!=null?(0,o.jsx)(o.Fragment,{children:e}):(0,o.jsx)(cg.Provider,{value:r,children:e})}const nee=()=>(0,u.useContext)(cg)??eee,see=.001,oee=(e,t,n)=>e!=null&&e.kind===t&&Math.abs(e.time-n)<see,q5=V("video-seek-bar-overlay"),lg=e=>Math.max(0,Math.min(100,e)),X5=e=>{const t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?Math.max(0,t):null},ree=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const n=e.map(s=>{const r=X5(s.time);return r==null||r>=t?null:{chapter:s,startTime:r}}).filter(s=>s!=null).sort((s,r)=>s.startTime-r.startTime);return n.map((s,r)=>{const i=n[r+1],a=i!=null?i.startTime:t;return a<=s.startTime?null:{chapter:s.chapter,endTime:a,leftPercent:lg(s.startTime/t*100),startTime:s.startTime,widthPercent:lg((a-s.startTime)/t*100)}}).filter(s=>s!=null)},iee=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const n=new Set;return e.forEach(s=>{const r=X5(s);r==null||r>=t||n.add(r)}),[...n].sort((s,r)=>s-r).map(s=>({leftPercent:lg(s/t*100),time:s}))};function aee({chapters:e,checkpointTimesSeconds:t,durationSeconds:n}){const s=u.useMemo(()=>ree(e,n),[e,n]),r=u.useMemo(()=>iee(t,n),[t,n]),{hovered:i}=nee(),a=u.useMemo(()=>{const c=s.filter(d=>d.leftPercent>0).map(d=>({kind:"chapter",element:"chapter",time:d.startTime,leftPercent:d.leftPercent,key:`chapter-${d.startTime}-${d.chapter.title}`})),l=r.map(d=>({kind:"checkpoint",element:"marker",time:d.time,leftPercent:d.leftPercent,key:`checkpoint-${d.time}`}));return[...c,...l].sort((d,h)=>d.time-h.time||(d.kind===h.kind?0:d.kind==="chapter"?-1:1))},[s,r]);return a.length===0?null:(0,o.jsx)("div",{"aria-hidden":"true",className:q5("markers"),children:a.map(c=>(0,o.jsx)("span",{className:q5(c.element,{hovered:oee(i,c.kind,c.time)}),style:{left:`${c.leftPercent}%`}},c.key))})}const cee=()=>{const e=bi();return lm(e)},J5=(e,t)=>e in t?"Articulate":e.length===2?"ISO-639-1":e.length===3?"ISO-639-3":null,lee=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:{}}),dee=(e,t,n)=>{let s=e,r="",i=n??J5(e,t);return!i&&e.includes("-")&&([s,r]=e.split("-"),i=J5(s,t),i&&(e=s)),{languageCode:s,code:e,regionCode:r,standard:i??"Articulate"}},Vc=(e,t,n={})=>{const{code:s,standard:r}=dee(e.toLowerCase(),t,n.standard),{location:i,script:a,variant:c}=n;if(r!=="Articulate"){const{iso1Map:l,iso3Map:d}=lee(t),h=r==="ISO-639-1"?l[s]??null:d[s]??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,p=i&&"location"in m&&m.location?m.location.toLocaleLowerCase()===i.toLocaleLowerCase():!1,v=a&&"script"in m&&m.script?m.script.toLocaleLowerCase()===a.toLocaleLowerCase():!1;return f||p||v})||h[0]||null:null}return t[s]??null},Tbe=(e,t,n={})=>Vc(e,t,{standard:"Articulate",...n})?.ISO639_1||null,Lbe=(e,t,n={})=>Vc(e,t,{standard:"Articulate",...n})?.ISO639_3||null,Ebe=(e,t,n={})=>Vc(e,t,{standard:"ISO-639-1",...n})?.code||null,kbe=(e,t,n={})=>Vc(e,t,{standard:"ISO-639-3",...n})?.code||null,eS=e=>!!(e&&"video"in e&&e.video&&"key"in e.video&&e.video.key),tS=e=>!!(e&&"customVideo"in e&&e.customVideo&&"src"in e.customVideo&&e.customVideo.src),nS=e=>!!(e&&"customVideo"in e&&e.customVideo&&"key"in e.customVideo&&e.customVideo.key),uee=(e,t)=>{const n=eS(e)&&eS(t)&&e.video.key===t.video.key,s=tS(e)&&tS(t)&&e.customVideo.src===t.customVideo.src,r=nS(e)&&nS(t)&&e.customVideo.key===t.customVideo.key;return n||s||r},hee=e=>!!(e&&"video"in e&&e.video&&"captions"in e.video&&e.video.captions?.length),mee=e=>{const t=Dn(),{currentLocale:n}=ot(),s=Pe(e,t),r=Pe(e,n),i=cee();return(0,u.useMemo)(()=>{if(!!(n&&n!==t)&&i&&uee(s,r)&&hee(r))return r.video.captions.find(l=>Vc(l.code,i)?.code===n)?.id},[t,n,s,r,i])},fee=2,pee=0,gee=()=>({previousTime:0,triggeredTimes:new Set}),vee=(e,t,n)=>{const{previousTime:s}=n;t>s+fee&&e.filter(i=>i<=t).forEach(i=>n.triggeredTimes.add(i)),t<s-pee&&(n.triggeredTimes=new Set(e.filter(i=>i<=t))),n.previousTime=t;const r=e.find(i=>t>=i&&!n.triggeredTimes.has(i));return r==null?null:(n.triggeredTimes.add(r),r)};function Cee({checkpointTimesSeconds:e,isLoaded:t,getMediaElement:n,onCheckpointReached:s}){const r=(0,u.useRef)(s);r.current=s;const i=(0,u.useMemo)(()=>Array.from(new Set(e)).sort((a,c)=>a-c),[e]);(0,u.useEffect)(()=>{if(!t||i.length===0)return;const a=n();if(a==null)return;const c=gee(),l=a.currentTime;c.previousTime=l,i.filter(p=>p<=l&&!(p===0&&l===0)).forEach(p=>c.triggeredTimes.add(p));let d=0;const h=()=>{const p=vee(i,a.currentTime,c);p!=null&&r.current?.(p),d=requestAnimationFrame(h)},m=()=>{d===0&&(d=requestAnimationFrame(h))},f=()=>{d!==0&&(cancelAnimationFrame(d),d=0)};return a.addEventListener("play",m),a.addEventListener("playing",m),a.addEventListener("pause",f),a.addEventListener("ended",f),a.paused||m(),()=>{f(),a.removeEventListener("play",m),a.removeEventListener("playing",m),a.removeEventListener("pause",f),a.removeEventListener("ended",f)}},[n,t,i])}function sS(e){return Number.isFinite(e)&&e>0?e:0}function dg({allowTabNavigation:e=!0,audioVideoPlayhead:t,canAdjustPlaybackSpeed:n,canRestrictSeek:s,captions:r,chapters:i=[],checkpointTimesSeconds:a=[],cornerRadius:c,disableDownload:l=!1,id:d,media:h,onCheckpointReached:m,onLoad:f,poster:p,progressChanged:v,recordMediaPlayheadPosition:g,ref:x,shouldPause:y,src:S,style:I,subtitle:b,type:T}){const L=u.useRef(null),[E,k]=u.useState(0),N=u.useCallback(se=>{L.current=se,typeof x=="function"?x(se):x&&(x.current=se)},[x]),P=(0,Ve.A)(y),A=Gm(),R=Gt(),j=tf(),M=mee(h),w=T==="customVideo",O=u.useCallback(()=>L.current?.containerElement?.querySelector("video")??null,[]),B=u.useCallback(se=>{D1(),k(sS(se.duration)),v?.(se)},[v]),D=u.useCallback(se=>{g?.(se)},[g]),_=u.useCallback(()=>{ye.playerId=d,ye.isPlaying=!0},[d]),F=u.useCallback(()=>{ye.playerId===d&&(ye.isPlaying=!1)},[d]),[$,z]=u.useState(!1),K=u.useRef(!1),J=u.useCallback(()=>{z(!0);const se=L.current;if(se){const{duration:re}=se.getProgress();k(sS(re)),f?.({player:se})}},[f]);Cee({checkpointTimesSeconds:a,isLoaded:$,getMediaElement:O,onCheckpointReached:m}),u.useEffect(()=>{K.current||$&&(t!=null&&t>0&&L.current?.seekToPercent(t),K.current=!0)},[$,t]),u.useEffect(()=>{!P&&y&&L.current?.pause()},[P,y]),u.useEffect(()=>{const se=()=>{(!ye.isPlaying||ye.playerId!==d)&&L.current?.pause()};return ye.addChangeListener(se),()=>{ye.removeChangeListener(se)}},[d]);const Q=u.useMemo(()=>{const se=typeof c=="number"||typeof c=="string"?{"--ov-corner-radius":`${Number(c)}px`}:void 0;if(!(se==null&&I==null))return{...se,...I}},[c,I]),U=p==null?void 0:w?p:yt(p),H=$&&E>0&&(i.length>0||a.length>0),G=`${w?S:yt(S)}?v=1`,Y=w?"application/x-mpegURL":void 0,Z=u.useMemo(()=>[{src:G,type:Y??"video/mp4"}],[G,Y]),q=u.useMemo(()=>{const se=[];if(r==null&&b&&se.push({kind:"captions",label:"English",src:w?b:yt(b),srcLang:"en"}),r!=null)for(const re of r){const le=re.url||(re.key!=null?yt(re.key):void 0);le&&se.push({default:re.id===M?!0:void 0,kind:"captions",label:re.name||j?.(re.code)||re.code,src:le,srcLang:re.code})}return se},[r,b,w,j,M]);return(0,o.jsx)(JJ.L,{crossOrigin:no.isLocalFilesystem?void 0:"anonymous",enableDownload:A&&!l,enablePlaybackSpeed:n??void 0,enableSeek:s==null?void 0:!s,inert:!e,labelBackToMoreOptions:R?.a11yMediaMoreOptionsBack,labelCaptions:R?.a11yMediaCaptions,labelCaptionsOff:R?.a11yMediaCaptionsOff,labelContainer:R?.a11yGroupVideoPlayer??"Video player",labelCurrentTime:R?.a11yMediaCurrentTime,labelDownload:R?.a11yMediaDownload,labelDuration:R?.a11yMediaDuration,labelError:R?.a11yMediaErrorVideo,labelExitFullscreen:R?.a11yMediaExitFullscreen,labelExitPictureInPicture:R?.a11yMediaExitPictureInPicture,labelFullscreen:R?.a11yMediaFullscreen,labelMoreOptions:R?.a11yMediaMoreOptions,labelMute:R?.a11yMediaMute,labelPause:R?.a11yMediaPause,labelPictureInPicture:R?.a11yMediaPictureInPicture,labelPlay:R?.a11yMediaPlay,labelPlaybackRate:R?.a11yMediaPlaybackRate,labelPlaybackRateNormal:R?.a11yMediaPlaybackRateNormal,labelPlayVideo:R?.a11yMediaPlayVideo,labelReplay:R?.a11yMediaReplay,labelSeek:R?.a11yMediaSeek,labelSeekDisabled:R?.a11yMediaSeekDisabled,labelUnmute:R?.a11yMediaUnmute,labelVolume:R?.a11yMediaVolume,onPause:F,onPlay:_,onPlayheadSave:D,onReady:J,onTimeUpdate:B,poster:U,ref:N,seekOverlay:H?(0,o.jsx)(aee,{chapters:i,checkpointTimesSeconds:a,durationSeconds:E}):null,sources:Z,style:Q,timeUpdateInterval:1e3,tracks:q})}var xee=C(52329),oS=C.n(xee),bee=C(49508),yee=C.n(bee);const See=e=>({...e,courseId:e.courseId||Do()(["course","id"],e)}),Iee=e=>({...e,lessonId:e.lessonId||Do()(["lesson","id"],e)}),Tee=({id:e,courseId:t,lessonId:n,refs:s})=>e||(s&&n?`${n}-${s}`:n||t),ug=$e()(Tee,Iee,See),Nbe=zt()(Ra()(et()("id"),oS()("id",ug)),ko()(yee()(et(),[et()("id"),et()("uploads")]),Lo()(["id"])),oS()("isUploading",at()("status","uploading")));function jbe(e){const t=e.match(/^(.*\/)?([^/]+)$/);if(!t)return encodeURIComponent(e);const n=t[1]??"",s=t[2],r=encodeURIComponent(s);return`${n}${r}`}function Lee(e){return e.replace(/%2F/g,"/")}var Eee=C(49860);const hg=e=>!!(e&&("key"in e&&e.key||"src"in e&&e.src)),Yu=e=>hg(e)&&!e.isProcessing&&!e.error,kee=(e,t)=>t?.mediaType==="audio"?!!e&&(hg(e)||H5(t)||_5(t)&&!hg(e)):Yu(e),Nee=e=>gr()(_e()(!!e),NX()(`-${e}`));class jee extends Eee.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:s,refs:r}=this.props,i=t?.items?.length===1?t.items[0]:void 0,a=this.props.item??i;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{a!=null&&typeof a=="object"&&!Array.isArray(a)&&"id"in a&&(l=String(a.id))}catch{l=""}const d=r??`items:${c||""}/items:${l}`;if((t||n)&&a&&s)return s({blockId:t?.id??n,item:a,refs:d})}renderAudio(t,n){const{activeIndex:s,allowTabNavigation:r,block:i,blockId:a,getL10nValue:c,index:l,isOverlayAudio:d,item:h,itemIndex:m,labels:f,lessonNumber:p,shouldPause:v,side:g}=this.props,{audio:x}=c(t),y=i&&typeof i=="object"&&"blockId"in i?i.blockId:i?.id||a||"",S=h&&typeof h=="object"&&"id"in h?h.id:"",I=this.props.refs??`items:${y}/items:${S}`,b=`audio-${p}-${l}`;return(0,o.jsx)(G5,{activeIndex:s,allowTabNavigation:r,id:b,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:I,shouldPause:x.pause||v,side:g,transcriptMedia:t,uploadId:n,volumeSliderPosition:this.props.volumeSliderPosition},b)}renderImage(t){const{allowTabNavigation:n,cornerRadius:s,defaultAlign:r,imageMaxHeight:i,index:a,labels:c,onLoad:l,opts:d}=this.props,h=t?.align??r,m=t?.dimensions,f=`image-${a}`,{disableZoom:p}=d??{};return(0,o.jsx)(Ji,{align:h,allowTabNavigation:n,alt:t?.alt,cornerRadius:s,disableZoom:p,height:m?.height||m?.originalHeight,labels:c,link:t?.link,maxHeight:i,onLoad:l,shouldFillWidth:t?.fillWidth,src:Tt(t),width:m?.width||m?.originalWidth},f)}renderVideo(t,n){const{allowTabNavigation:s,blockId:r,lessonNumber:i,index:a,enableVideoPlaybackSpeed:c,shouldPause:l}=this.props,d=t.skipProcess?Lee(t.poster):t.poster,h=Nee(r)(`video-${i}-${a}-${d||""}`);return(0,o.jsx)(dg,{allowTabNavigation:s,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:s,labels:r,opts:i,shouldPause:a}=this.props,{fullEmbed:c,showMetaData:l=!0}=i,d=`embed-${this.props.index}`;return(0,o.jsx)("div",{className:s,children:(0,o.jsx)(Y5,{allowTabNavigation:n,data:t,id:d,isLesson:c,labels:r,shouldPause:t.pause||a,showMetaData:l},d)})}render(){const{blockId:t,hasPadding:n,item:s,lessonId:r,mediaType:i}=this.props,a=s&&typeof s=="object"&&"id"in s?s.id:"",c=this.props.refs??`items:${t??""}/items:${a}`,l=this.props.media,d=X()({"media-group":n}),{audio:h,embed:m,image:f,video:p}=this.props.getL10nValue(l)??{},v=ug({lessonId:r,refs:c}),g=this.props.getUpload?this.props.getUpload(v):null;return(0,o.jsxs)("div",{className:d,"data-l10n-id":Mt(l),children:[(!i||i==="image")&&Yu(f)&&this.renderImage(f),(!i||i==="audio")&&kee(h,g)&&this.renderAudio(l,v),(!i||i==="video")&&Yu(p)&&this.renderVideo(p,l),(!i||i==="embed")&&Yu(m)&&this.renderEmbed(m)]})}}const rn=aJ(Du(f6(ft(jee)))),wee=V("flashcard"),Ree="block-search-current",Aee="flashcard-side--front",rS="flashcard-side--back",Pee=60,Mee=8;class Oee 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,suppressFlipFocus:!1};cardRef=(0,u.createRef)();revealSettleTimer=void 0;render(){const{cardRef:t,handleFlip:n,handleSideReady:s,handleTouchEnd:r,props:{activeIndex:i,allowTabNavigation:a,backDescription:c,backMedia:l,backType:d,block:h,forceFlipped:m,frontDescription:f,frontMedia:p,frontType:v,id:g,index:x,isHidden:y,labels:S,lessonId:I,prefersKeyboardNavigation:b,settingShowHint:T,size:L,type:E,wrapElement:k,wrapRole:N},state:{areSidesReady:P,flipped:A,isMounted:R,suppressFlipFocus:j}}=this,M=m||A,w=wee({large:L==="large",small:L==="small",flipped:M,stack:E==="stack"});return(0,o.jsxs)(k,{"aria-hidden":!a,className:w,onClick:n,onTouchEnd:r,ref:t,role:N,children:[(0,o.jsx)(nn,{activeIndex:i,allowTabNavigation:a,blockId:h?.id,blockType:E,description:f,index:x,isActiveSide:!M,isAriaHidden:M&&R&&P,isFlipped:M,isHidden:y,itemId:g,labels:S,lessonId:I,media:p,onFlip:n,onReady:s,prefersKeyboardNavigation:b,settingShowHint:T,side:"front",size:L,suppressFlipFocus:j,tag:aS,type:v}),(0,o.jsx)(nn,{activeIndex:i,allowTabNavigation:a,blockId:h?.id,blockType:E,description:c,index:x,isActiveSide:M,isAriaHidden:!M&&R&&P,isFlipped:M,isHidden:y,itemId:g,labels:S,lessonId:I,media:l,onFlip:n,onReady:s,prefersKeyboardNavigation:b,settingShowHint:T,side:"back",size:L,suppressFlipFocus:j,tag:Bee,type:d})]})}componentDidMount(){this.setState({isMounted:!0}),window.addEventListener(Ye,this.handleNavEvent),window.addEventListener(Ko,this.handleRevealItem)}componentDidUpdate(t,n){const{props:{allowTabNavigation:s,id:r,onStep:i},state:{hasFlippedOnce:a}}=this;!n.hasFlippedOnce&&a&&i({id:r}),t.allowTabNavigation&&!s&&this.setState({flipped:!1})}componentWillUnmount(){this.clearRevealSettle(),window.removeEventListener(Ye,this.handleNavEvent),window.removeEventListener(Ko,this.handleRevealItem)}handleNavEvent=t=>{const{path:n}=t.detail,{cardId:s}=Oi(n,["block","card"]);if(s===this.props.id){let r=!1;n.includes("back")&&(r=!0),this.setState({flipped:r},()=>{this.props.type!=="stack"&&!tu(this.cardRef.current,"center")&&this.cardRef.current.scrollIntoView({behavior:"instant",block:"center"})})}};handleRevealItem=t=>{const{blockId:n,itemId:s}=t.detail;n!==this.props.blockId||!yn(s,this.props.id)||(this.clearRevealSettle(),this.tryRevealFlip(0))};tryRevealFlip=t=>{const n=this.getActiveHighlightSide();if(n!=null){this.setState({areSidesReady:!0,flipped:n==="back",suppressFlipFocus:!0},()=>{this.setState({suppressFlipFocus:!1})});return}t>=Mee||(this.revealSettleTimer=setTimeout(()=>{this.tryRevealFlip(t+1)},Pee))};clearRevealSettle=()=>{clearTimeout(this.revealSettleTimer),this.revealSettleTimer=void 0};getActiveHighlightSide=()=>{const t=this.cardRef.current;if(t==null||typeof CSS>"u"||!("highlights"in CSS))return;const n=CSS.highlights.get(Ree);if(n!=null)for(const s of n){const{startContainer:r}=s,a=(r instanceof Element?r:r.parentElement)?.closest(`.${rS}, .${Aee}`);if(a!=null&&t.contains(a))return a.classList.contains(rS)?"back":"front"}};handleFlip=t=>{const{block:n,index:s}=this.props,r=window.getSelection(),i=r.toString()&&this.cardRef.current?.contains(r.anchorNode);if(t.detail>1&&r.empty(),t&&t.target.closest("a")||i)return;const a=!this.state.flipped;this.setState({areSidesReady:!1,flipped:a,hasFlippedOnce:!0});const c=a?"back":"front",l=n?.items?.[s],d=l?.[c]?.media,h=`items:${n?.id}/items:${l?.id}/${c}`;this.props.onTranscriptUpdate?.({audioPlayerId:Is({refs:h}),transcriptMedia:d}),this.props.onFlip?.(this.props.index,a)};handleTouchEnd=t=>{t.stopPropagation()};handleSideReady=()=>{this.setState({areSidesReady:!0})}}const iS=Du(ft(Oee)),ea=V("flashcard-side"),qu=V("flashcard-side-flip");class ei extends u.PureComponent{static descriptionActionTypes={INITIAL:"INITIAL",INSERTING:"INSERTING",DELETING:"DELETING"};static initialState={descriptionAction:ei.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,ch.uniqueId)("flashcard-side")}state=ei.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:s,side:r}=this.props,i=document.getElementById(`${t}-${n}-${r}-flip-btn`);i&&s&&(i.style.opacity="0.6")};handleMouseLeaveAudio=()=>{const{itemId:t,index:n,settingShowHint:s,side:r}=this.props,i=document.getElementById(`${t}-${n}-${r}-flip-btn`);i&&s&&(i.style.opacity="1")};render(){const{props:{activeIndex:t,allowTabNavigation:n,block:s,className:r,description:i,getL10nValue:a,index:c,itemId:l,media:d,isActiveSide:h,isAriaHidden:m,isFlipped:f,labels:p,lessonId:v,onFlip:g,prefersKeyboardNavigation:x,settingShowHint:y,side:S,size:I,style:b,type:T},refDescription:L,refDescriptionBottom:E,refSide:k,state:{isAtLongOverflowBottom:N,isLong:P,isLongOverflow:A,isTooltipVisible:R,scrollbarWidthOffset:j}}=this,M=S==="front",w=S==="back",O=I==="small",B=I==="large",D=T==="description",_=T==="fullimage",F=T==="image",$=M?p?.a11yBlockFlashcardFront:p?.a11yBlockFlashcardBack,z=`items:${s?.id}/items:${l}/${M?"front":"back"}`,K=ea({back:w,flipped:f,front:M,fullimage:_}).mix(r),{image:J,audio:Q}=a(d)??{},U=ea("content",{small:O,large:B,front:M,fullimage:_,image:F,"long-overflow":A,"long-overflow-bottom":N,"has-audio":!!Q}),H=qu({"audio-expansion":!0}),G=qu("btn",{"visually-hidden":!y,"prefers-keyboard":x,round:!0}),Y=qu("icon"),Z=qu("tooltip",{visible:R}),q=ea("img",{small:O,large:B,centered:F,full:_}),ee=ea("description",{"has-audio":!!Q,long:P&&!A,"long-overflow":A,short:!P,large:B}),se=ea("description-bottom"),re=j==null?void 0:{right:j},le=J?.alt??`Image ${c+1}`,Le=Tt(J),Te=`${this.id}-click-to-flip-text`,W=`${this.id}-image`,de=`${this.id}-description`;return(0,o.jsxs)("div",{"aria-label":$,className:K,inert:m,ref:k,role:"group",style:b,tabIndex:-1,children:[(0,o.jsxs)("div",{className:U,children:[(0,o.jsxs)("div",{className:H,onMouseEnter:this.handleBtnMouseEnter,onMouseLeave:this.handleBtnMouseLeave,style:re,children:[(0,o.jsx)("button",{"aria-labelledby":`${Te} ${de} ${W}`,className:G,id:`${l}-${c}-${S}-flip-btn`,onBlur:this.handleBtnBlur,onClick:g,onFocus:this.handleBtnFocus,tabIndex:n&&h?0:-1,type:"button",children:(0,o.jsx)(UU,{className:Y})}),(0,o.jsx)("div",{"aria-hidden":"true",className:Z,id:Te,onClick:Qo,children:p?.blocksClickToFlip})]}),(_||F)&&(0,o.jsx)(Dee,{alt:le,className:q,imageId:W,l10nId:Mt(d),url:Le}),D&&(0,o.jsxs)("div",{className:ee,ref:L,tabIndex:h&&A?0:void 0,children:[(0,o.jsx)(je,{allowTabNavigation:n&&!m,id:de,value:i}),A&&(0,o.jsx)("div",{className:se,ref:E})]})]}),Q&&(0,o.jsx)("div",{className:ea("audio-player",{text:D,image:F}),onMouseEnter:this.handleMouseEnterAudio,onMouseLeave:this.handleMouseLeaveAudio,children:(0,o.jsx)(rn,{activeIndex:t,blockId:s.id,index:`${l}-${c}-${S}`,isOverlayAudio:_,item:{id:l,media:d},itemIndex:c,labels:p,lessonId:v,media:d,mediaType:"audio",refs:z,shouldPause:!h,side:S})})]})}componentDidMount(){this.checkDescriptionSize(this.props),this.checkDescriptionSizeDebounced=Vu()(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:s,blockType:r,isFlipped:i,isActiveSide:a,isHidden:c,onReady:l,suppressFlipFocus:d,type:h}}=this;t.isHidden&&!c&&this.checkDescriptionSize(this.props),t.isFlipped!==i&&(a&&s&&!d?(this.refSide.current?.focus?.(),this.readyTimeout=setTimeout(()=>{l()},700)):clearTimeout(this.readyTimeout)),h==="description"&&this.handleUpdatesDescription(t,n),r==="stack"&&a&&!t.allowTabNavigation&&s&&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=>{Nn(t)&&this.state.isTooltipVisible&&this.setState({isTooltipVisible:!1})};handleUpdatesDescription=(t,n)=>{const{props:{isFlipped:s,isActiveSide:r},state:{isLongOverflow:i}}=this;t.isFlipped!==s&&r&&this.scrollDescriptionToTop(),this.handleUpdatesDescriptionSize(t,n),!n.isLongOverflow&&i?(this.setLongBottomObserver(),this.setScrollbarWidth()):n.isLongOverflow&&!i&&this.cleanupLongBottomObserver()};handleUpdatesDescriptionSize=(t,n)=>{const{INSERTING:s,DELETING:r}=ei.descriptionActionTypes,{props:{description:i,size:a,type:c,getL10nValue:l},state:{descriptionAction:d,isLong:h,isLongOverflow:m}}=this,f=l(i)?.length||0,p=l(t.description)?.length||0;d!==s&&f>p?this.setState({descriptionAction:s}):d!==r&&f<p?this.setState({descriptionAction:r}):(d!==n.descriptionAction||h!==n.isLong||m!==n.isLongOverflow||a!==t.size||c!==t.type||f!==p)&&this.checkDescriptionSize(t)};checkDescriptionSize=t=>{const{DELETING:n}=ei.descriptionActionTypes,{props:{size:s},refDescription:{current:r},state:{descriptionAction:i,isLong:a,isLongOverflow:c}}=this;if(!r)return;r&&r.scrollHeight>r.clientHeight?a&&!c?this.setState({isLongOverflow:!0}):!a&&!c&&this.setState({isLong:!0}):(i===n||s!==t.size)&&this.setState(ei.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=s=>{const r=s?.[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 aS=Du(ft(e=>(0,o.jsx)(ei,{...e}))),Bee=e=>{const{cardMode:t,customBackgroundColorContrast:n}=fn(),s=He()?.theme,r=Fu(),i=Wn(),c=i===oe.IMAGE&&r?.overlayColor===vt.LIGHT,l=En(),d=s?.accentContrast,h=d===Ee.AUTO,m=(0,u.useMemo)(()=>{let p="#fafafa";if(t===Gn.TRANSPARENT)switch(i){case oe.DARK:p="#525252";break;case oe.BLACK:p="#1a1a1a";break;case oe.IMAGE:c?p="rgba(0, 0, 0, 0.7)":p="rgba(255, 255, 255, 0.7)";break;case oe.ACCENT:case oe.COLOR:case oe.TINT:if(l!=null)switch(Ni(l)){case Lt.LIGHT:p=as(.5,l);break;case Lt.MED:p=As(.35,l);break;case Lt.DARK:p=As(.65,l);break;case Lt.NEAR_BLACK:p=as(.1,l);break}}const v={"--color-background":p},g=i===oe.COLOR?n:d;if((i===oe.ACCENT||i===oe.COLOR)&&t===Gn.TRANSPARENT&&h){const x=Wt({backgroundColor:p,contrast:g});v["--color-text"]=x}return v},[l,i,t,n,h,c,d]),f={...e,style:m};return(0,o.jsx)(aS,{...f})},Dee=({alt:e,className:t,imageId:n,l10nId:s,url:r})=>{const i=jo(e);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(An,{alt:i,className:t,"data-l10n-id":s,id:n,src:r}),!i&&(0,o.jsx)("span",{className:"visually-hidden-always",children:"No image alternative text"})]})};class Fee 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:s,isHidden:r,isLearner:i,items:a,labels:c,lessonId:l,onStep:d,previewType:h,isRTL:m,settings:f,stack:p}=this.props,{activeIndex:v}=this.state,{prefersKeyboardNavigation:g}=this.state,{entranceAnimation:x,showHint:y}=f,S=X()("block-flashcards",{"block-flashcard--column":!p,"block-flashcard--stack":p,"block-flashcards--no-animation":!x}),b=f.flashcardSize==="1"?"small":f.flashcardSize==="2"?"large":a.length>2?"small":"large",T=h===xr.MOBILE_PORTRAIT||h===xr.MOBILE_LANDSCAPE;return(0,o.jsx)(Me,{className:S,children:p?(0,o.jsx)(ze,{animateBlockEntrance:n,initiallyVisible:s,isLearner:i,children:(0,o.jsx)("div",{className:"block-flashcard-carousel",children:(0,o.jsx)($u,{blockId:t,items:a,children:({carouselRef:L})=>(0,o.jsx)(zu,{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:L,shouldMouseEmulateTouch:T,shouldUseCounter:!0,shouldUseGoToSlide:!1,children:a.map((E,k)=>(0,o.jsx)(iS,{activeIndex:v,backDescription:E?.back?.description,backMedia:E?.back?.media,backType:E?.back?.type,blockId:t,frontDescription:E?.front?.description,frontMedia:E?.front?.media,frontType:E?.front?.type,id:E?.id,index:k,isHidden:r,labels:c,lessonId:l,onFlip:this.handleFlip.bind(this),onStep:d,prefersKeyboardNavigation:g,settingShowHint:y,size:"large",type:"stack",wrapElement:"div"},E?.id))})})})}):(0,o.jsx)(ze,{animateBlockEntrance:n,className:"block-flashcards__animation",initiallyVisible:s,isLearner:i,siblingDelay:.25,children:(0,o.jsx)("ol",{className:"block-flashcards__wrapper",role:"list",children:a.map((L,E)=>(0,o.jsx)(iS,{activeIndex:v,backDescription:L?.back?.description,backMedia:L?.back?.media,backType:L?.back?.type,blockId:t,frontDescription:L?.front?.description,frontMedia:L?.front?.media,frontType:L?.front?.type,id:L?.id,index:E,isHidden:r,labels:c,lessonId:l,onStep:d,prefersKeyboardNavigation:g,settingShowHint:y,size:b,type:"grid",wrapElement:"li",wrapRole:"listitem"},L?.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&&!aH(t)&&this.setState({prefersKeyboardNavigation:!0})};handleMouseDown=()=>{this.state.prefersKeyboardNavigation&&this.setState({prefersKeyboardNavigation:!0})};handleFlip(t,n){this.setState(s=>({flipStateMap:{...s.flipStateMap,[t]:n}}))}handleCarouselChange(t){const{block:n,onTranscriptUpdate:s}=this.props,{flipStateMap:r}=this.state,i=r[t]?"back":"front",a=n.items?.[t],c=a?.[i]?.media,l=`items:${n?.id}/items:${a?.id}/${i}`;s?.({audioPlayerId:Is({refs:l}),transcriptMedia:c}),this.setState({activeIndex:t})}}const cS=eg(ft(Du(Fee)));var zc=C(49860);const _ee="div",lS=zc.createContext(void 0);function Hee({children:e,element:t,...n},s){const[r,i]=zc.useState(null);return(0,o.jsx)(lS.Provider,{value:r,children:zc.createElement(t??_ee,{...n,ref:s},e,(0,o.jsx)("div",{ref:i}))})}const $c=zc.forwardRef(Hee);function wbe(){return zc.useContext(lS)}var Vee=C(49860);function dS(e){class t extends Vee.Component{static displayName=`withGalleryCaption(${e.displayName||e.name})`;renderCaptionDelegate;constructor(s){super(s),this.renderCaptionDelegate=this.renderCaption.bind(this)}renderCaption(s,r,i=!0){return(0,o.jsx)(qe,{allowTabNavigation:i,className:"block-gallery__caption",value:r})}render(){const{renderCaption:s=this.renderCaptionDelegate}=this.props;return(0,o.jsx)(e,{...this.props,renderCaption:s})}}return t}var Xu=C(49860);const uS=V("block-gallery-carousel");function zee({blockId:e,animateBlockEntrance:t,defaultBackgroundColor:n,editable:s,initiallyVisible:r,isLearner:i,labels:a,lessonId:c,items:l,onStep:d,previewType:h,renderCaption:m,settings:f}){l||=[];const[p,v]=Xu.useState(0),g=Xu.useCallback(I=>{v(I),d?.(l[I])},[l,d]),x=h===xr.MOBILE_PORTRAIT||h===xr.MOBILE_LANDSCAPE,y=uS({noAnimation:!f?.entranceAnimation||vn()}).toString(),S=pd();return(0,o.jsx)(Me,{className:y,defaultBackgroundColor:n,children:(0,o.jsx)(ze,{animateBlockEntrance:t,initiallyVisible:r,isLearner:i,children:(0,o.jsx)($c,{className:uS("container").toString(),children:(0,o.jsx)($u,{blockId:e,items:l,children:({carouselRef:I})=>(0,o.jsx)(zu,{isRTL:S,labelCarousel:a?.a11yBlockImageCarousel,labelCarouselRoleDesc:a?.a11yBlockImageCarouselRoleDescription,labelSlideControls:a?.a11yBlockImageCarouselSlideControls,labelSlideControlsGoToNext:a?.a11yBlockImageCarouselSlideControlsGoToNext,labelSlideControlsGoToPrevious:a?.a11yBlockImageCarouselSlideControlsGoToPrevious,labelSlideControlsGoToSlide:a?.a11yBlockImageCarouselSlideControlsGoToSlide,labelSlideCounterPreposition:a?.blocksPreposition,labelSlidePreposition:a?.a11yBlockImageCarouselSlidePreposition,labelSlideRoleDesc:a?.a11yBlockImageCarouselSlideRoleDescription,onChange:g,ref:I,shouldMouseEmulateTouch:x,children:l.map((b,T)=>(0,o.jsx)(Uee,{activeIndex:p,blockId:e,editable:s,index:T,item:b,labels:a,lessonId:c,renderCaption:m,settings:f},b.id))})})})})})}const $ee=dS(zee),mg=V("block-gallery-carousel-item");function Uee({activeIndex:e,blockId:t,editable:n,index:s,item:r,labels:i,lessonId:a,renderCaption:c,settings:l}){const[d,h]=Xu.useState(!1),{image:m,audio:f}=Pe(r.media),p=Pe(m?.link?.destination),v=m?.dimensions,g=Xu.useCallback(()=>{h(!0)},[]);return(0,o.jsxs)("figure",{className:mg(),children:[n&&!d&&(0,o.jsx)("div",{className:mg("loading"),children:"Loading image..."}),(0,o.jsxs)("div",{className:mg("image-container",{"audio-overlay":!!f}),children:[(0,o.jsx)(Ji,{alt:m?.alt,cornerRadius:l?.cornerRadius,disableZoom:!l?.zoomOnClick,height:v?.height||v?.originalHeight,l10nId:Mt(r?.media),labels:i,link:m?.link&&typeof p=="string"?{type:m.link.type,destination:p}:void 0,maxHeight:900,onLoad:g,src:Tt(m),width:v?.width||v?.originalWidth}),f&&(0,o.jsx)(rn,{blockId:t,cornerRadius:l?.cornerRadius,index:`${t}-${r.id}-${s}`,isOverlayAudio:!0,item:r,labels:i,lessonId:a,media:r.media,mediaType:"audio",shouldPause:e!==s})]}),(n||r.caption)&&(0,o.jsx)("figcaption",{children:c(r.id,r.caption)})]})}const Gee=({alt:e,cornerRadius:t,disableZoom:n,height:s,l10nId:r,labels:i,link:a,src:c,width:l})=>(0,o.jsx)("div",{className:"block-gallery__image",children:(0,o.jsx)(Ji,{alt:e,cornerRadius:t,disableZoom:n,height:s,l10nId:r,labels:i,link:a,maxHeight:900,src:c,width:l})}),Wee=e=>{switch(e){case 3:return"threecol";case 4:return"fourcol";default:return"twocol"}};function hS(e){return(0,o.jsx)($ee,{...e})}class Kee extends u.Component{static get defaultProps(){return{blockId:"",getL10nValue:()=>{},items:[],lessonId:"",width:2}}render(){const{animateBlockEntrance:t,defaultBackgroundColor:n,editable:s,getL10nValue:r,initiallyVisible:i,isLearner:a,items:c,labels:l,renderCaption:d,settings:h,width:m}=this.props,{entranceAnimation:f,cornerRadius:p,zoomOnClick:v}=h,g=X()(`block-gallery block-gallery--${Wee(m)}`,{"block-gallery--no-animation":!f||vn()});return(0,o.jsx)(Me,{className:g,defaultBackgroundColor:n,children:(0,o.jsx)("div",{className:"block-gallery__container",children:(0,o.jsx)("div",{className:"block-gallery__row",children:(0,o.jsx)(ze,{animateBlockEntrance:t,initiallyVisible:i,isLearner:a,siblingDelay:.25,children:c.map(x=>{const{id:y}=x,S=x.caption,I=r(x.media)?.image,b=I?.alt,T=I?.key,L=I?.dimensions,E=L?.width||L?.originalWidth,k=L?.height||L?.originalHeight,N=Tt(I),P=r(I?.link?.destination),A=Fc({caption:S,editable:s,id:y,getL10nValue:this.props.getL10nValue});return(0,o.jsx)("div",{className:"block-gallery__col",children:(0,o.jsxs)(A.tagName,{"aria-labelledby":A.figcaptionId,className:"block-gallery__figure",role:A.role,children:[T&&(0,o.jsx)(Gee,{alt:b,cornerRadius:p,disableZoom:!v,height:k,l10nId:Mt(x?.media),labels:l,link:I?.link&&typeof P=="string"?{type:I.link.type,destination:P}:void 0,src:N,width:E}),(s||S)&&(0,o.jsx)("figcaption",{id:A.figcaptionId,children:d(y,S)})]})},y)})})})})})}}const fg=dS(ft(Kee));var pg=C(49860);const gg=e=>["hero","full","aside"].includes(e);class Qee extends pg.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,o.jsx)(qe,{className:"block-image__caption",value:n})}render(){const{aiMagicIcon:t,aiOverlay:n,animateBlockEntrance:s,blockId:r,defaultBackgroundColor:i,editable:a,getL10nValue:c,initiallyVisible:l,isLearner:d,items:h,type:m,labels:f,lessonId:p,settings:v,renderCaption:g=this.renderCaptionDelegate}=this.props,{entranceAnimation:x,cornerRadius:y,zoomOnClick:S}=v,I=X()(`block-image block-image--${m}`,"block-image--flag-dimensions",{"block-image--no-animation":!x}),b=h[0],{id:T,caption:L}=b,{image:E,audio:k}=c(b.media)??{},N=E?.alt,P=Tt(E),A=E?.dimensions,R=A?.width||A?.originalWidth,j=A?.height||A?.originalHeight,M=Fc({caption:L,editable:a,id:T,getL10nValue:c}),w=!d&&!P,O=R&&j?R/j:void 0,B=E?.link?c(E.link.destination):void 0,D=E?.link&&typeof B=="string"?{type:E.link.type,destination:B}:void 0,_=X()("block-image__image",{"block-image__image--audio-overlay":!!k});return(0,o.jsx)(Me,{className:I,defaultBackgroundColor:i,children:(0,o.jsx)("div",{className:"block-image__container",children:(0,o.jsx)("div",{className:"block-image__row",children:(0,o.jsx)("div",{className:"block-image__col",children:(0,o.jsx)(ze,{animateBlockEntrance:s,initiallyVisible:l,isLearner:d,children:(0,o.jsxs)(M.tagName,{"aria-labelledby":M.figcaptionId,className:"block-image__figure",role:M.role,children:[(0,o.jsxs)("div",{className:_,children:[w?(0,o.jsxs)("div",{className:"block-image__waiting",style:{aspectRatio:O},children:[(0,o.jsx)("div",{children:t}),(0,o.jsx)("div",{className:"block-image__waiting-text",children:"Waiting for image\u2026"})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Ji,{alt:N,cornerRadius:y,disableZoom:!S,height:j,l10nId:Mt(b.media),labels:f,link:D,maxHeight:m==="full"?380:900,src:P,width:R}),k&&gg(m)&&(0,o.jsx)(rn,{blockId:r,cornerRadius:y,index:`${r}-${T}-0`,isOverlayAudio:!0,item:b,labels:f,lessonId:p,media:b.media,mediaType:"audio"})]}),n&&(0,o.jsx)("div",{className:"block-image__ai-overlay",children:n})]}),(a||L)&&(0,o.jsx)("figcaption",{id:M.figcaptionId,children:g(T,L)})]})})})})})})}}const Zee=ft(Qee),Yee=(e,t,n,s,r)=>t?r:(0,o.jsx)(ze,{animateBlockEntrance:e,initiallyVisible:n,isLearner:s,children:r});class qee extends pg.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,o.jsx)(qe,{className:"block-image__text",value:n})}renderCaption(t,n){return(0,o.jsx)(qe,{className:"block-image__caption",value:n})}renderImage(t,n,s,r){const{blockId:i,editable:a,lessonId:c,renderCaption:l=this.renderCaptionDelegate,getL10nValue:d}=this.props,h=d(s.media),m=h?.image,f=h?.audio,p=m?.alt,v=Tt(m),g=m?.dimensions,x=g?.width||g?.originalWidth,y=g?.height||g?.originalHeight,S=Fc({caption:n,editable:a,id:t,getL10nValue:d}),{animateBlockEntrance:I,initiallyVisible:b,isLearner:T,labels:L,settings:{cornerRadius:E,zoomOnClick:k}}=this.props,N=X()("block-image__image",{"block-image__image--audio-overlay":!!f}),P=m?.link?d(m.link.destination):void 0,A=m?.link&&typeof P=="string"?{type:m.link.type,destination:P}:void 0;return(0,o.jsx)(ze,{animateBlockEntrance:I,animateIn:r==="right"?"fadeInRight":"fadeInLeft",initiallyVisible:b,isLearner:T,children:(0,o.jsxs)(S.tagName,{"aria-labelledby":S.figcaptionId,className:"block-image__figure",role:S.role,children:[(0,o.jsxs)("div",{className:N,children:[(0,o.jsx)(Ji,{alt:p,cornerRadius:E,disableZoom:!k,height:y,l10nId:Mt(s?.media),labels:L,link:A,maxHeight:900,src:v,width:x}),f&&gg("aside")&&(0,o.jsx)(rn,{blockId:i,cornerRadius:E,index:`${i}-${t}-0`,isOverlayAudio:!0,item:s,labels:L,lessonId:c,media:s.media,mediaType:"audio"})]}),(a||n)&&(0,o.jsx)("figcaption",{id:S.figcaptionId,children:l(t,n)})]})})}render(){const{defaultBackgroundColor:t,items:n,renderParagraph:s=this.renderParagraphDelegate,settings:r,type:i}=this.props,{entranceAnimation:a,imagePosition:c,imageSize:l}=r,d=c==="right",h=X()(`block-image block-image--${i}`,{"block-image--small":l==="small","block-image--large":l==="large","block-image--reverse":d,"block-image--no-animation":!a}),m=n[0],{id:f,caption:p}=m,v="paragraph"in m?m.paragraph:void 0;return(0,o.jsx)(Me,{className:h,defaultBackgroundColor:t,children:(0,o.jsx)("div",{className:"block-image__container",children:(0,o.jsxs)("div",{className:"block-image__row",children:[(0,o.jsx)("div",{className:"block-image__col",children:d?s(f,v):this.renderImage(f,p,m,"left")}),(0,o.jsx)("div",{className:"block-image__col",children:d?this.renderImage(f,p,m,"right"):s(f,v)})]})})})}}const Xee=ft(qee);class Jee extends pg.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,o.jsx)(qe,{className:"block-image__caption",value:n})}renderOverlay(t,n){return(0,o.jsx)(qe,{className:"block-image__paragraph",value:n})}renderOverlayCaption(t,n){const{animateBlockEntrance:s,initiallyVisible:r,isLearner:i,renderOverlay:a=this.renderOverlayDelegate}=this.props;return(0,o.jsx)("div",{className:"block-image__container",children:(0,o.jsx)("div",{className:"block-image__row",children:(0,o.jsx)("div",{className:"block-image__col",children:(0,o.jsx)(ze,{animateBlockEntrance:s,animateIn:"fadeInUp",duration:1,initiallyVisible:r,isLearner:i,children:a(t,n)})})})})}render(){const{animateBlockEntrance:t,blockId:n,defaultBackgroundColor:s,editable:r,getL10nValue:i,initiallyVisible:a,isLearner:c,items:l,labels:d,lessonId:h,settings:m,type:f,renderCaption:p=this.renderCaptionDelegate}=this.props,{entranceAnimation:v,opacity:g,opacityColor:x}=m,y=Xm(m?.backgroundColor,s),S=X()(`block-image block-image--${f}`,"block-image--flag-dimensions",{"block-image--no-animation":!v,"block-image--dark":Jf(y)}),I={opacity:g||.6,backgroundColor:x||"transparent"},b=l[0],{id:T,caption:L}=b,E=i(b.media),k=E?.image,N=E?.audio,P=k?.key,A=Tt(k),R=k?.dimensions,j=R?.width||R?.originalWidth,M=R?.height||R?.originalHeight,w=jo(k?.alt),O=f==="overlay",B=Fc({caption:L,editable:r,id:T,isOverlayType:O,getL10nValue:i});return(0,o.jsxs)(Me,{"aria-labelledby":B.figcaptionId,className:S,defaultBackgroundColor:s,role:B.role,tag:B.tagName,children:[Yee(t,O,a,c,(0,o.jsxs)("div",{className:"block-image__figure",children:[P&&(0,o.jsxs)("div",{className:"block-image__image","data-l10n-id":Mt(b?.media),style:{backgroundImage:`url('${A}')`},children:[(0,o.jsx)(An,{alt:w,height:M,src:A,width:j}),(0,o.jsx)("div",{className:"block-image__overlay",style:I}),N&&gg(f)&&(0,o.jsx)(rn,{blockId:n,index:`${n}-${T}-0`,isOverlayAudio:!0,item:b,labels:d,lessonId:h,media:b.media,mediaType:"audio"})]}),O?this.renderOverlayCaption(T,L):null]})),!O&&(r||L)&&(0,o.jsx)("figcaption",{className:"block-image__container",id:B.figcaptionId,children:p(T,L)})]})}}const vg=ft(Jee),ete=e=>(0,o.jsx)(vg,{type:"overlay",...e}),tte=e=>(0,o.jsx)(vg,{type:"banner",...e}),nte=()=>{const e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return[t.slice(0,8),t.slice(8,12),t.slice(12,16),t.slice(16,20),t.slice(20)].join("-")},Ju=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():nte();var ste=C(30234),ote=C.n(ste),rte=C(27689),mS=C.n(rte),ite=C(8907),e0=C.n(ite);function Ts(e,t,n,s){const i=t==="bottom"||!n&&t!=="top"?"bottom":"top",a={renderOrder:["text"],isOverlayAudio:!1};if(!e)return a;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&&s==="timeline"&&!t?x.top:n&&s!=="timeline"?i==="bottom"?x.legacyBottom:x.legacyTop:i==="bottom"?x.bottom:x.top},p=()=>{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&&s==="timeline"&&!t?g.legacyTop:n&&s!=="timeline"?i==="bottom"?g.legacyBottom:g.legacyTop:i==="bottom"?g.bottom:g.top},v=()=>i==="bottom"?["text","audio"]:["audio","text"];return c&&!m&&!h?{...a,renderOrder:v()}:m&&!c&&!h?{...a,renderOrder:f()}:h&&!c&&!m?{...a,renderOrder:p()}:c&&m&&!h?s==="statement"?{...a,renderOrder:v()}:s==="labeled-graphic"||i==="top"||s==="process"?{...a,renderOrder:f(),audioOnlyMedia:{audio:e.audio},imageOnlyMedia:{image:e.image},videoOnlyMedia:{video:e.video}}:{...a,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?{...a,renderOrder:p(),audioOnlyMedia:{audio:e.audio},embedOnlyMedia:{embed:e.embed}}:a}var t0=C(49860);const ate=30,fS=Jm("blockSettings");class cte extends t0.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],lessonId:"",onStep:()=>{}};render(){const{animateBlockEntrance:t,blockId:n,editable:s,initiallyVisible:r,isLearner:i,items:a,labels:c,lessonId:l,onStep:d,settings:h,enableVideoPlaybackSpeed:m}=this.props,{entranceAnimation:f,accordionBehavior:p="keepOpen"}=h,v=X()("blocks-accordion",{"blocks-accordion--no-animation":!f});return(0,o.jsx)(Me,{className:v,"data-block-id":n,children:(0,o.jsx)(ze,{animateBlockEntrance:t,duration:.75,initiallyVisible:r,isLearner:i,children:(0,o.jsx)("div",{className:"blocks-accordion__container",children:(0,o.jsx)("div",{className:"blocks-accordion__row",children:(0,o.jsx)("div",{className:"blocks-accordion__col",children:(0,o.jsx)(pte,{blockId:n,editable:s,enableVideoPlaybackSpeed:m,items:a,keepOpen:p==="keepOpen",labels:c,lessonId:l,onStep:d,settings:h})})})})})})}}const lte={isOpen:!1,isActive:!1},dte=e=>(t,{id:n})=>Object.assign({},t,{[n]:e[n]||lte}),pS=(e,t)=>t.reduce(dte(e),{}),ute=(e,t)=>(n,s)=>{const r=e==s,i=r?!n.isOpen:n.isOpen,a=r&&!n.isOpen;return{isOpen:t?i:a,isActive:r}},hte=e=>(t,n)=>{const s=n==e;return{isOpen:s,isActive:s}},mte=e=>(t,n)=>({isOpen:n==e,isActive:t.isActive});class fte extends t0.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],keepOpen:!1,lessonId:"",onStep:()=>{}};constructor(t){super(t);const{items:n}=this.props;this.state={itemStatusMap:pS({},n)},this.handleNavtoTab=this.handleNavtoTab.bind(this)}componentDidMount(){window.addEventListener(Ye,this.handleNavtoTab)}componentWillUnmount(){window.removeEventListener(Ye,this.handleNavtoTab)}handleNavtoTab(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,s=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;if(n===this.props.blockId){const r=this.props.items.findIndex(({id:h})=>h===s),{items:i,onStep:a}=this.props,{itemStatusMap:c}=this.state,l=i[r].id,d=hte(l);this.setState({itemStatusMap:ks()(d,c)}),open&&a(i[r])}}UNSAFE_componentWillReceiveProps(t){const n=t.items,s=us()(n)!==us()(this.props.items);!t.keepOpen&&this.props.keepOpen?this.updateMapForOneAtATimePreference():s&&this.rebuildItemStatusMap(n)}updateMapForOneAtATimePreference(){const{itemStatusMap:t}=this.state,{items:n}=this.props,s=ote()(i=>t[i.id].isOpen,n);if(!s)return;const r=mte(s.id);this.setState({itemStatusMap:ks()(r,t)})}rebuildItemStatusMap(t){const n=this.state.itemStatusMap;this.setState({itemStatusMap:pS(n,t)})}handleItemClick(t){const{items:n,keepOpen:s,onStep:r}=this.props,{itemStatusMap:i}=this.state,a=n[t].id,c=ute(a,s);this.setState({itemStatusMap:ks()(c,i)}),open&&r(n[t])}render(){const{items:t,settings:n,editable:s,labels:r,lessonId:i,blockId:a,enableVideoPlaybackSpeed:c}=this.props,{itemStatusMap:l}=this.state,{zoomOnClick:d}=n,h=Object.values(l)?.find(m=>m.isOpen)?"open":"closed";return(0,o.jsx)("div",{className:"blocks-accordion__wrapper","data-accordion-status":h,children:t.map((m,f)=>(0,o.jsx)(vte,{blockId:a,disableZoom:!d,editable:s,focused:l[m.id].isActive,index:f,item:{...m,enableVideoPlaybackSpeed:c},labels:r,lessonId:i,onClick:this.handleItemClick.bind(this,f),open:l[m.id].isOpen},m.id))})}}const pte=fS(fte);class gte extends t0.Component{static get defaultProps(){return{editable:!1,getL10nValue:()=>{},onClick:()=>{},lessonId:"",blockId:"",open:null}}id;content;constructor(t){super(t),this.id=Ju(),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&&!this.props.suppressAutoScrollOnOpen)){const s=n.parentElement,r=s?.getBoundingClientRect()?.top,i=r!=null&&r>0&&r<window.innerHeight,a=vn()?"instant":"smooth";i||s.scrollIntoView({behavior:a,block:"start"})}}toggle(t){const{blockId:n,index:s}=this.props,r=ye.playerId,i=new RegExp(`-${s}(?:-.+)?$`);open&&r&&r.includes(n.toString())&&i.test(r)&&ye.pause(),this.props.onClick(),t.preventDefault()}renderTitle(t){const{title:n}=this.props.item;return(0,o.jsx)(je,{className:"blocks-accordion__title",id:t,value:n})}renderDescription(t){const{description:n=""}=this.props.item;return(0,o.jsx)(qe,{className:"blocks-accordion__description",value:n||""},t)}render(){const{blockId:t,blockSettings:n,editable:s,disableZoom:r,getL10nValue:i,index:a,item:c,focused:l,labels:d,lessonId:h,open:m,renderDescription:f=this.renderDescription,renderTitle:p=this.renderTitle}=this.props,{settings:v={},enableVideoPlaybackSpeed:g}=c,x=i(c.media)??{},y=Ts(x,n.audioPosition),S=Object.assign({},v,{disableZoom:r,fullEmbed:!0}),I=n?.backgroundType===oe.ACCENT||n?.backgroundType===oe.IMAGE,b=X()("blocks-accordion__item",{"blocks-accordion__item--closed":!m}),T=X()("blocks-accordion__header",{"blocks-accordion__header--editing":s,"brand--border":m&&l&&!I}),L=X()("blocks-accordion__content",{"blocks-accordion__content--will-enter":m,"brand--border":m&&l&&!I}),E=`title-${this.id}`,k=`panel-${this.id}`,N=n?.headingLevel,P=N?`h${N}`:"h2";let A=(0,o.jsxs)("button",{"aria-controls":k,"aria-expanded":m,className:T,onClick:this.toggle,onKeyDown:!s&&W2(this.toggle)||void 0,type:"button",children:[p(E),(0,o.jsx)("span",{className:"blocks-accordion__toggler-wrap",children:(0,o.jsx)(ae,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]});return s&&(A=(0,o.jsxs)("div",{className:T,children:[p(E),(0,o.jsx)("button",{"aria-controls":k,"aria-expanded":m,"aria-label":m?"Close":"Open",className:"blocks-accordion__toggler-wrap",onClick:this.toggle,type:"button",children:(0,o.jsx)(ae,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]})),(0,o.jsxs)(nn,{className:b,tag:"section",children:[(0,o.jsx)("div",{className:"blocks-accordion__header-wrap",children:(0,o.jsx)(P,{children:A})}),(0,o.jsx)("section",{"aria-labelledby":E,className:L,id:k,ref:R=>{this.content=R},children:y.renderOrder.map((R,j)=>{if(R==="text")return f(`text-${j}`);const M={blockId:t,hasPadding:!1,imageMaxHeight:1e3,item:c,labels:d,lessonId:h,enableVideoPlaybackSpeed:g,opts:S,shouldPause:!m},w=gS(x),O=w==="image-with-audio",B=O?"left":"center",_={audio:{media:y.audioOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${a}-audio`,className:"blocks-accordion__audio"},image:{media:y.imageOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${a}-image`,className:X()(`blocks-accordion__${w}`,{[`blocks-accordion__${w}--${B}`]:O})},video:{media:y.videoOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${a}-video`,className:X()(`blocks-accordion__${w}`,{[`blocks-accordion__${w}--${B}`]:O})},embed:{media:y.embedOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${a}-embed`,className:X()(`blocks-accordion__${w}`,{[`blocks-accordion__${w}--${B}`]:O})},overlay:{media:x,isOverlayAudio:!0,index:`${t}-${a}-overlay`,className:X()(`blocks-accordion__${w}`,{[`blocks-accordion__${w}--${B}`]:O})}}[R];if(!_)return null;const{className:F,...$}=_;return(0,o.jsx)("div",{className:X()(F,{"audio-on-top":this.props.blockSettings.audioPosition==="top"}),children:(0,o.jsx)("div",{className:"blocks-accordion__figure",children:(0,o.jsx)(rn,{...M,...$})})},`${R}-${j}`)})})]})}}const vte=fS(ft(e=>(0,o.jsx)(gte,{...e}))),gS=e=>{const{image:t,embed:n,video:s,audio:r}=e;return t&&!r?"image":n&&!r?"embed":s?"video":r&&!t&&!n?"audio":t&&r?"image-with-audio":r&&n?"audio-and-embed":"image"};class Cte extends t0.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=Ju(),this.handleNavtoTab=this.handleNavtoTab.bind(this),this.handleRevealItem=this.handleRevealItem.bind(this)}componentDidMount(){this.handleControls(),window.addEventListener("resize",this.tabResize=e0()(this.handleControls.bind(this),100)),window.addEventListener(Ye,this.handleNavtoTab),window.addEventListener(Ko,this.handleRevealItem),this.tabsHeaderEl?.addEventListener("scroll",this.tabScroll=e0()(this.handleControls.bind(this),50))}handleNavtoTab(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,s=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===s)},()=>{tu(this.tabsHeaderEl,"start")||this.tabsHeaderEl.scrollIntoView({behavior:"instant",block:"start"})}))}handleRevealItem(t){const{blockId:n,itemId:s}=t.detail;if(n!==this.props.blockId)return;const r=this.props.items.findIndex(({id:i})=>yn(i,s));r>=0&&this.setState({activeIndex:r})}componentDidUpdate(){this.handleControls()}componentWillUnmount(){this.tabsHeaderEl?.removeEventListener("scroll",this.tabScroll),window.removeEventListener("resize",this.tabResize),window.removeEventListener(Ye,this.handleNavtoTab),window.removeEventListener(Ko,this.handleRevealItem)}setActive(t){this.setState({activeIndex:t});const{blockId:n}=this.props,s=ye.playerId;this.state.activeIndex!=t&&s&&s.includes(n.toString())&&ye.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,s=this.tabsHeaderEl.offsetWidth,r=this.tabsHeaderEl.scrollLeft,a=(t==="next"?n?mS():wp():n?wp():mS())(r,s*.8);this.tabsHeaderEl.scrollTo({left:a,behavior:"smooth"})}arrowPrevInset(t){const n=this.arrowPrevEl.getBoundingClientRect(),s=n.right-t,r=n.left-t;return s+r}focusTab(t){t.currentTarget?.scrollIntoView({behavior:"smooth",block:"nearest"})}handleTabKeyDown(t,n){const{isRTL:s}=this.props;let r=!1,i;Uo(n)?(r=!0,i=s?t+1>this.tabs.length-1?0:t+1:t-1>=0?t-1:this.tabs.length-1):Go(n)&&(r=!0,i=s?t-1>=0?t-1:this.tabs.length-1:t+1>this.tabs.length-1?0:t+1),r&&n.preventDefault(),i!=null&&(this.tabs[i]?.focus(),this.setActive(i))}renderHeader(t,n){const{activeIndex:s,activeTouch:r,activeMouse:i}=this.state,a=this.tabsHeaderEl&&this.tabsHeaderEl.scrollWidth>this.tabsHeaderEl.clientWidth,c=X()("blocks-tabs__header-wrap",{touch:r,mouse:i&&a});return(0,o.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),onTouchStart:this.handleTouchStart.bind(this),children:[(0,o.jsx)("div",{className:"blocks-tabs__header",ref:l=>{this.tabsHeaderEl=l},role:mX,children:t.map(({title:l},d)=>{const h=t.length===1||d===s,m=t.length>1&&d+1===s,f=t.length>1&&d-1===s,p=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}),v=`tab-${this.id}-${d}`,g=`tabpanel-${this.id}-${d}`;return(0,o.jsx)("button",{"aria-controls":g,"aria-selected":h,className:p,id:v,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,o.jsx)(je,{value:l})},v)})}),(0,o.jsxs)("div",{className:"blocks-tabs__controls",ref:l=>{this.tabControls=l},children:[(0,o.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,o.jsx)(ae,{className:"blocks-tabs__arrow-icon",name:"chevron-right-solid"})}),(0,o.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,o.jsx)(ae,{className:"blocks-tabs__arrow-icon blocks-tabs__arrow-icon--next",name:"chevron-right-solid"})})]})]})}renderDescription({description:t}){return(0,o.jsx)(qe,{className:"blocks-tabs__description",value:t})}renderItem(t,n,s){const{blockId:r,getL10nValue:i,labels:a,lessonId:c,renderDescription:l=this.renderDescription}=this.props,{activeIndex:d}=this.state,h=d===n,{settings:m={},enableVideoPlaybackSpeed:f}=t,p=i(t.media)??{},v=Ts(p,this.props.settings.audioPosition,!1),g=X()("blocks-tabs__content-item",{"blocks-tabs__content-item--active":h}),x=Object.assign({},m,{disableZoom:s,fullEmbed:!0}),y=`tabpanel-${this.id}-${n}`,S=`tab-${this.id}-${n}`,I=gS(p),b=I==="image-with-audio",T=I==="audio-and-embed",L=b?p?.image?.align:"left",E=T?"embed-border":void 0;return(0,o.jsx)("div",{"aria-labelledby":S,className:g,id:y,role:fX,tabIndex:h?0:void 0,children:v.renderOrder.map((k,N)=>{if(k==="text")return(0,o.jsx)("div",{className:"blocks-tabs__description",children:l(t)},`text-${N}`);const P={blockId:r,embedClass:E,hasPadding:!1,imageMaxHeight:1e3,item:t,labels:a,lessonId:c,enableVideoPlaybackSpeed:f,opts:x,shouldPause:!h},R={audio:{media:v.audioOnlyMedia||p,isOverlayAudio:!1,index:`${r}-${n}-audio`,className:"blocks-tabs__audio"},image:{media:v.imageOnlyMedia||p,isOverlayAudio:!1,index:`${r}-${n}-image`,className:X()(`blocks-tabs__${I}`,{[`blocks-tabs__${I}--${L}`]:b})},video:{media:v.videoOnlyMedia||p,isOverlayAudio:!1,index:`${r}-${n}-video`,className:X()(`blocks-tabs__${I}`,{[`blocks-tabs__${I}--${L}`]:b})},embed:{media:v.embedOnlyMedia||p,isOverlayAudio:!1,index:`${r}-${n}-embed`,className:X()(`blocks-tabs__${I}`,{[`blocks-tabs__${I}--${L}`]:b})},overlay:{media:p,isOverlayAudio:!0,index:`${r}-${n}-overlay`,className:X()(`blocks-tabs__${I}`,{[`blocks-tabs__${I}--${L}`]:b})}}[k];if(!R)return null;const{className:j,...M}=R;return(0,o.jsx)("div",{className:X()(j,{"audio-on-top":this.props.settings.audioPosition==="top"}),children:(0,o.jsx)("div",{className:"blocks-tabs__figure",children:(0,o.jsx)(rn,{...P,...M})})},`${k}-${N}`)})},y)}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,items:r,settings:i,enableVideoPlaybackSpeed:a}=this.props,{backgroundType:c,cardMode:l,entranceAnimation:d,zoomOnClick:h}=i,m=X()("blocks-tabs",{"blocks-tabs--no-animation":!d}),f=r.length>0?r.slice(0,ate):[],p=l===Gn.TRANSPARENT&&(c===oe.ACCENT||c===oe.IMAGE),v=X()("blocks-tabs__container",{"blocks-tabs--single":f.length===1});return(0,o.jsx)(Me,{className:m,children:(0,o.jsx)(ze,{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,children:(0,o.jsx)("div",{className:v,children:(0,o.jsx)("div",{className:"blocks-tabs__row",children:(0,o.jsx)("div",{className:"blocks-tabs__col",children:(0,o.jsx)("div",{className:"blocks-tabs__wrapper",ref:g=>{this.container=g},children:(0,o.jsxs)(nn,{children:[this.renderHeader(f,p),(0,o.jsx)("div",{className:"blocks-tabs__content",children:f.map((g,x)=>this.renderItem({...g,enableVideoPlaybackSpeed:a},x,!h))})]})})})})})})})}}const xte=eg(ft(e=>(0,o.jsx)(Cte,{...e}))),Cg=V("pill-button");function vS({allowTabNavigation:e=!0,ariaLabel:t,children:n,className:s,href:r,onClick:i=()=>{},onFocus:a,ref:c,size:l="sm",testId:d,variant:h="plain"}){const m=Cg({[h]:!0,[l]:!0}).mix(s),f=!e;return r?(0,o.jsx)(pn,{"aria-hidden":f,"aria-label":t,className:m,"data-testid":d,onClick:i,onFocus:a,tabIndex:e?void 0:-1,to:r,children:(0,o.jsx)("span",{className:Cg("content"),children:n})}):(0,o.jsx)("button",{"aria-hidden":f,"aria-label":t,className:m,"data-testid":d,onClick:i,onFocus:a,ref:c,tabIndex:e?void 0:-1,type:"button",children:(0,o.jsx)("span",{className:Cg("content"),children:n})})}const CS=({allowNext:e=!1,canProceed:t=!1,isReduceMotion:n=!1,onNext:s,onSubmit:r,quizNext:i,quizSubmit:a})=>{const c=t?!0:void 0,l=t?void 0:r,d=t?-1:void 0,h=t?void 0:!0,m=t?s:void 0,f=t?void 0:-1,p=(0,u.useRef)(null),v=(0,Ve.A)(t);(0,u.useEffect)(()=>{e&&!v&&t&&setTimeout(()=>{p.current?.focus?.({preventScroll:n})},0)},[e,t,n,v]);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,o.jsxs)("div",{className:g,children:[(0,o.jsx)("div",{className:"quiz-card__submit brand--ui",children:!c&&(0,o.jsx)("button",{className:"quiz-card__button","data-testid":"quiz-submit-button",onClick:l,tabIndex:d,type:"button",children:a})}),(0,o.jsx)("br",{className:"visually-hidden-always",role:"presentation"}),e&&(0,o.jsx)("div",{className:"quiz-card__next brand--ui",children:(0,o.jsx)("button",{"aria-disabled":h,"aria-hidden":h,className:x,"data-testid":"quiz-next-button",onClick:m,ref:p,tabIndex:f,type:"button",children:i})})]})},bte=({children:e,isActive:t,isComplete:n,isTimedQuiz:s,style:r})=>(0,o.jsx)("div",{"aria-hidden":t?void 0:!0,className:yte({isActive:t,isComplete:n,isTimedQuiz:s}),"data-testid":"quiz-card",inert:t?void 0:!0,style:r,children:(0,o.jsx)("div",{className:"quiz-card__container",children:(0,o.jsx)("div",{className:"quiz-card__row",children:(0,o.jsx)("div",{className:"quiz-card__main",children:e})})})}),yte=({isActive:e,isComplete:t,isTimedQuiz:n})=>X()("quiz-card",{"quiz-card--active":e,"quiz-card--done":t,"quiz-card--timed":n}),xS=bte,{FILL_IN_THE_BLANK:bS,MATCHING:Ste,MULTIPLE_CHOICE:Ite,MULTIPLE_RESPONSE:Tte}=me;function Lte(e,t){return e.map(n=>String(t(n?.title)??"")).filter(Boolean).join(", ")}function Ete(e,t,n){const s=t!=null?e.find(r=>r.id===t):e.find(r=>r.correct===!0);return String(n(s?.title)??"")}function kte(e,t,n){return String(n(e?.[t]?.title)??"")}function yS(e,t,n){return t.filter(e).reduce((s,r,i)=>{const a=String(n(r?.title)??"");return i===0?a:s+", "+a},"")}function Nte(e,t,n){return yS(r=>Array.isArray(e)?e.includes(r.id):!!r.correct,t,n)}function jte(e,t,n){return Array.isArray(t)?yS((r,i)=>t.includes(i),e,n):""}function wte({answers:e,getL10nValue:t,selection:n,correctLabel:s,userLabel:r,matchLabel:i="Match Item: ",revealAnswers:a}){if(n==null||Object.keys(n).length===0)return"";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],p=String(t(e?.[Number(f)]?.title)??"");return a===Oe.INCORRECT?`${i}${m}. ${r}: ${p}.`:`${i}${m}. ${s}: ${h}. ${r}: ${p}.`}).join(" ")}function xg({correctAnswer:e,selectedAnswer:t,correctLabel:n,userLabel:s,revealAnswers:r}){return!e||!t||r===Oe.NONE?"":r===Oe.INCORRECT?`${s}: ${In(t)}.`:`${n}: ${In(e)}. ${s}: ${In(t)}.`}function Rte(e,t){return e.type===bS?t?.quizAcceptableResponses:t?.a11yCorrectLive}function Ate({getL10nValue:e,isComplete:t,item:n,selection:s,labels:r,revealAnswers:i}){if(!n||!t)return null;const a=n?.answers??[],c=n?.correct,l=n?.corrects,d=Rte(n,r),h=r?.a11yAnswerLive;switch(n.type){case Ste:return wte({getL10nValue:e,answers:a,selection:s,correctLabel:d,userLabel:h,revealAnswers:i});case bS:return xg({correctAnswer:Lte(a,e),selectedAnswer:s,correctLabel:d,userLabel:h,revealAnswers:i});case Ite:return xg({correctAnswer:Ete(a,c,e),selectedAnswer:kte(a,s,e),correctLabel:d,userLabel:h,revealAnswers:i});case Tte:return xg({correctAnswer:Nte(l,a,e),selectedAnswer:jte(a,s,e),correctLabel:d,userLabel:h,revealAnswers:i})}return null}const SS=({canProceed:e,feedbackRef:t,feedbackValue:n,isActive:s,isComplete:r,isCorrect:i,item:a,labels:c,quizCorrect:l,quizIncorrect:d,revealAnswers:h,selection:m})=>{const{announcePolite:f,clearAnnouncements:p}=Rs(),v=(0,Ve.A)(e),g=rt(),y=!!Pe(n),S=i?l:d,I=(0,u.useCallback)(()=>{const L=Ate({getL10nValue:g,isComplete:r,item:a,labels:c,revealAnswers:h,selection:m}),E=n?In(g(n)):"",k=S+". "+L+" "+E;let N;return k&&(N=setTimeout(()=>{f(k)},250)),()=>{clearTimeout(N)}},[f,n,g,r,a,c,S,h,m]);(0,u.useLayoutEffect)(()=>{!v&&e&&h!==Oe.NONE&&I()},[e,v,I,h]),(0,u.useEffect)(()=>p,[p]);const b=X()("quiz-card__feedback",{"quiz-card__feedback--active":e,"quiz-card__feedback--frame":y}),T=X()("quiz-card__feedback-icon",{"quiz-card__feedback-icon--correct":i});return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{"aria-hidden":s?void 0:!0,className:b,ref:t,tabIndex:s?-1:void 0,children:(0,o.jsx)("div",{className:"quiz-card__main--feedback",children:(0,o.jsxs)("div",{"aria-label":c?.a11yQuizFeedback,className:"quiz-card__feedback-wrap",role:"group",children:[(0,o.jsx)("div",{className:T,children:(0,o.jsx)("i",{"aria-hidden":"true",className:i?"icon icon-Master-05":"icon icon-Master-06"})}),(0,o.jsx)("div",{className:"quiz-card__feedback-label",children:S}),n&&(0,o.jsx)("div",{children:(0,o.jsx)(je,{allowTabNavigation:r&&s,className:"quiz-card__feedback-text",value:n})})]})})})})},{FILL_IN_THE_BLANK:Pte}=me,Mte=({children:e,type:t})=>(0,o.jsx)("div",{className:Ote({type:t}),children:e}),Ote=({type:e})=>X()("quiz-card__interactive",{"quiz-card__interactive--no-border":[Pte].includes(e)}),IS=Mte,Xo=({allowTabNavigation:e,blockId:t="",enableVideoPlaybackSpeed:n,index:s,isOverlayAudio:r,item:i,labels:a={},media:c,settings:l,shouldPause:d})=>c==null||!Object.keys(c).some(h=>h!=="tmp")?null:(0,o.jsx)("div",{className:"quiz-card__media",children:(0,o.jsx)(rn,{allowTabNavigation:e,blockId:t,enableVideoPlaybackSpeed:n,index:s,isOverlayAudio:r,item:i,labels:a,media:c,opts:l,shouldPause:d})}),Dbe=(e,t)=>n=>n>=e&&n<t,TS=e=>e<10?`0${e}`:String(e),Bte=e=>Intl.NumberFormat(void 0,{style:"percent",maximumFractionDigits:2}).format(e),LS=e=>e.reduce((t,n)=>n==null||isNaN(n)?t:t+n,0),Dte=(e,t)=>{const n=vn(),s=(0,Ve.A)(t);(0,u.useEffect)(()=>{!s&&t&&e&&du()(e.focus)&&e.focus({preventScroll:n})},[t,n,s,e])},n0=V("question-counter"),Fte=({isActive:e=!1,labels:t,questionLabel:n,questionNumber:s,totalQuestions:r})=>{const i=(0,u.useRef)(null);Dte(i.current,e);const a=`${t?.quizQuestion} ${s} ${t?.lessonPreposition} ${r}`,c=`${TS(s)}/${TS(r)}`;return(0,o.jsx)("div",{className:n0(),children:(0,o.jsxs)("h1",{"aria-label":a,className:n0("heading"),ref:i,tabIndex:-1,children:[(0,o.jsx)("span",{"aria-hidden":"true",className:n0("label"),children:n}),(0,o.jsx)("span",{"aria-hidden":"true",className:n0("count"),children:c})]})})},_te=V("question-title"),Hte=({allowTabNavigation:e,htmlId:t,value:n})=>(0,o.jsx)(je,{allowTabNavigation:e,className:_te(),"data-testid":"quiz-question-title",id:t,value:n}),Vte=({allowTabNavigation:e=!1,correctAnswerColor:t,correctAnswerColorContrast:n,errorMessageId:s,incorrectAnswerColor:r,incorrectAnswerColorContrast:i,isComplete:a,isCorrect:c=!1,labels:l,onEnterToSubmit:d=()=>{},onChange:h=()=>{},options:m,questionHtmlId:f="",quizAcceptableResponses:p="",quizAnswerPlaceholder:v,revealAnswers:g=Oe.NONE,value:x=""})=>{const y=(0,u.useRef)(null),[S]=(0,u.useState)(()=>Vr()("fitb-")),I=rt(),b=zte({options:m,getL10nValue:I}),T=`${S}-feedback`,L=`${S}-acceptable`,E=`${S}-input`,k=a?`${T} ${L}`:s||void 0,N=a?void 0:v,P=e?0:-1,A=g===Oe.ALL||g===Oe.INCORRECT,R=g===Oe.ALL||c&&g===Oe.INCORRECT,j=c?t:r,w=t&&r&&{"--fa-primary-color":Wt({backgroundColor:j,contrast:c?n:i}),"--fa-secondary-color":j},O=r&&{backgroundColor:Wt({backgroundColor:r,contrast:i}),fill:r,borderRadius:"50%"},B=X()("quiz-fill__icon",{"quiz-fill__icon--visible":a}),D=X()("quiz-fill__options",{"quiz-fill__options--visible":a}),_=(0,u.useCallback)(K=>{h(K.currentTarget.value)},[h]),F=(0,u.useCallback)(K=>{ji(K)&&d(K)},[d]),$=a?void 0:_,z=a?void 0:F;return(0,o.jsxs)("div",{className:"quiz-fill",children:[(0,o.jsxs)("div",{className:"quiz-fill__container",children:[(0,o.jsx)("input",{"aria-describedby":k,"aria-hidden":!e,"aria-invalid":s?!0:void 0,"aria-labelledby":f,"aria-readonly":a,"aria-required":"true",autoComplete:"off",className:"quiz-fill__input ignore-prefers",id:E,onChange:$,onKeyDown:z,placeholder:N,readOnly:a,ref:y,tabIndex:P,type:"text",value:x}),A&&(0,o.jsxs)("div",{className:B,id:T,children:[c&&(0,o.jsx)(ae,{"aria-label":l?.quizCorrect,name:"circle-check",styleIcon:{height:"2rem",...w}}),!c&&(0,o.jsx)(oG,{"aria-label":l?.quizIncorrect,style:O})]})]}),R&&a&&(0,o.jsx)("div",{className:D,id:L,children:(0,o.jsx)(je,{value:`${p}: ${b}`})})]})},zte=({options:e,getL10nValue:t})=>e.map(s=>(t(s.title)??"").trim()).join(", "),ES=Vte;function $te({correctAnswerColor:e,correctAnswerColorContrast:t}){const n=Gt(),s=Wt({backgroundColor:e,contrast:t}),r=e?{"--fa-primary-color":s,"--fa-secondary-color":e}:void 0;return(0,o.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,o.jsx)(ae,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--correct",name:"circle-check",style:r}),(0,o.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,o.jsx)("span",{className:"matching-results-item-feedback-text-result",children:n?.quizCorrect})})]})}var ta=C(49860);function Ute({correctAnswerValue:e,incorrectAnswerColor:t,incorrectAnswerColorContrast:n,shouldRevealCorrectAnswer:s}){const[r,i]=ta.useState(!0),[a,c]=ta.useState(!1),l=ta.useRef(null),h=`matching-text-${ta.useId()}`,m=Gt(),f=(0,Ve.A)(e),p=ta.useCallback(()=>{i(b=>!b)},[]);ta.useLayoutEffect(()=>{if(f!==e){const b=l.current;b!=null&&b.scrollWidth>b.clientWidth&&c(!0)}},[f,e]);const v=Wt({backgroundColor:t,contrast:n}),g=t?{"--fa-primary-color":v,"--fa-secondary-color":t}:void 0,x=X()("matching-results-item-feedback-text",{"matching-results-item-feedback-text--collapsed":r}),y=X()("matching-results-item-feedback-text-btn-icon",{"matching-results-item-feedback-text-btn-icon--collapsed":r}),S=X()("matching-results-item-feedback-text-extra",{"matching-results-item-feedback-text-extra--collapsed":r}),I=X()("matching-results-item-feedback-text-extra-text",{"matching-results-item-feedback-text-extra-text--collapsed":r});return(0,o.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,o.jsx)(ae,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--incorrect",name:"circle-xmark-duotone",style:g}),!s&&(0,o.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,o.jsx)("span",{className:"matching-results-item-feedback-text-result",children:m?.quizIncorrect})}),s&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("span",{className:x,children:[(0,o.jsxs)("span",{className:"matching-results-item-feedback-text-result",children:[m?.quizIncorrect,"."]}),a&&(0,o.jsx)("button",{"aria-controls":h,"aria-expanded":!r,"aria-label":r?m?.a11yMatchingItemShowMore:m?.a11yMatchingItemShowLess,className:"matching-results-item-feedback-text-btn",onClick:p,type:"button",children:(0,o.jsx)(ae,{className:y,name:"caret-down",style:g})}),(0,o.jsx)("span",{className:S,children:(0,o.jsxs)("span",{className:I,id:h,ref:l,children:[m?.quizCorrect,": ",(0,o.jsx)(kn,{value:e})]})})]})})]})}function Gte({col1Id:e,col1Value:t,col2Id:n,col2Value:s,correctAnswerColor:r,correctAnswerColorContrast:i,correctAnswerValue:a,height:c,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,revealAnswers:h}){const m=e===n,f=h!=="incorrect",p=h!=="none";return(0,o.jsxs)("li",{className:"matching-results-item",role:"listitem",children:[(0,o.jsxs)("div",{className:"matching-results-item-pieces",children:[(0,o.jsxs)("div",{className:"matching-results-item-piece",style:c?{height:c}:void 0,children:[(0,o.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,o.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,o.jsx)("span",{className:"matching-results-item-piece-content",children:(0,o.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,o.jsx)(kn,{value:t})})})]}),(0,o.jsxs)("div",{className:"matching-results-item-piece",children:[(0,o.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,o.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,o.jsx)("span",{className:"matching-results-item-piece-content",children:(0,o.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,o.jsx)(kn,{value:s})})})]})]}),p&&m&&(0,o.jsx)($te,{correctAnswerColor:r,correctAnswerColorContrast:i}),p&&!m&&(0,o.jsx)(Ute,{correctAnswerValue:a,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,shouldRevealCorrectAnswer:f})]})}function Wte({answers:e,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:s,incorrectAnswerColor:r,incorrectAnswerColorContrast:i,itemHeight:a,revealAnswers:c,rows:l}){return(0,o.jsx)("div",{className:"matching-results",children:(0,o.jsx)("ul",{className:"matching-results-list",role:"list",children:l.map((d,h)=>{const[m,f]=d,p=t==="freezeFirst"?e.find(v=>v.id===m.id)?.matchTitle:e.find(v=>v.id===f.id)?.title;return(0,o.jsx)(Gte,{col1Id:m.id,col1Value:m.value,col2Id:f.id,col2Value:f.value,correctAnswerColor:n,correctAnswerColorContrast:s,correctAnswerValue:p,height:a,incorrectAnswerColor:r,incorrectAnswerColorContrast:i,revealAnswers:c},h)})})})}function Kte(e){return Object.keys(e).length===0}function Qte(e,t){return t in e}function Zte(e,t){return Object.values(e).includes(t)}function bg(e,t){for(const n in e)if(e[n]===t)return n}function Yte(e,t,n){return{...e,[t]:n}}function s0(e,t){return t in e?Ks(e,[t]):e}function qte(e,t){const n=bg(e,t);return n===void 0?e:s0(e,n)}function kS(e,t,n){let s=s0(e,t);return s=qte(s,n),Yte(s,t,n)}function Xte(e){return Object.keys(e).length}var Jte=C(22431),yg=C.n(Jte);yg().dynamicDrop(!0),yg().pointerMoveTolerance(8);const Ds=yg();var na=C(49860);function ene(e,{onStart:t,onMove:n,onEnd:s,isEnabled:r=!0}){const i=na.useRef({x:0,y:0}),a=na.useRef({x:0,y:0}),c=na.useRef(!1),l=na.useRef(null),d=na.useRef(void 0);na.useEffect(()=>{const h=e.current;if(!h||!r||c.current)return;l.current=L3(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(),p=f.x-a.current.x,v=f.y-a.current.y;(p!==0||v!==0)&&(i.current.x+=p,i.current.y+=v,e.current&&(e.current.style.transform=`translate3d(${i.current.x}px, ${i.current.y}px, 0)`,n?.({...i.current})),a.current=f)},Ds(h).draggable({inertia:!1,autoScroll:{container:l.current,distance:5,interval:10,margin:50},listeners:{start:()=>{i.current={x:0,y:0},a.current=m(),l.current?.addEventListener("scroll",d.current,{passive:!0}),t?.()},move:f=>{i.current.x+=f.dx,i.current.y+=f.dy,h.style.transform=`translate3d(${i.current.x}px, ${i.current.y}px, 0)`,n?.({...i.current})},end:()=>{i.current={x:0,y:0},h.style.transform="",l.current?.removeEventListener("scroll",d.current),setTimeout(()=>{s?.()},0)}}}),c.current=!0,()=>{Ds(h).unset(),l.current?.removeEventListener("scroll",d.current),c.current=!1}},[e,t,n,s,r])}var NS=C(49860);function tne(e,{isEnabled:t=!0,onDrop:n,onEnter:s,onLeave:r,overlap:i=.015}){const a=NS.useRef(!1);NS.useEffect(()=>{const c=e.current;if(!(!c||!t||a.current))return Ds(c).dropzone({overlap:i,listeners:{drop:()=>{n?.()},dragenter:()=>{s?.()},dragleave:()=>{r?.()}}}),a.current=!0,()=>{Ds(c).unset(),a.current=!1}},[e,n,s,r,t,i])}var es=C(49860);const jS=es.memo(function({col:t,height:n,id:s,index:r,isActive:i,isFrozen:a,isMatched:c,isMoved:l,onClick:d,onDragEnd:h,onDragStart:m,onDrop:f,onDropZoneEnter:p,onDropZoneLeave:v,onKeyDown:g,value:x,valueOtherColumnActive:y,valueOtherColumnMatch:S}){const[I,b]=es.useState(!1),T=es.useRef(null),L=es.useRef(null),E=Gt(),k=es.useCallback(()=>{d({col:t,id:s,value:x})},[t,s,d,x]),N=es.useCallback(()=>{b(!0),m({col:t,id:s,value:x})},[t,s,m,x]),P=es.useCallback(()=>{h(),b(!1)},[h]),A=es.useCallback(()=>{f({col:t,id:s,value:x})},[t,s,f,x]),R=es.useCallback(()=>{p({col:t,id:s,value:x})},[t,s,p,x]),j=es.useCallback(()=>{v()},[v]),M=es.useCallback(_=>{g(_,{col:t,index:r})},[t,r,g]);es.useEffect(()=>{t===1&&r===0||L.current?.setAttribute("tabindex","-1")},[]),ene(T,{isEnabled:!a,onStart:N,onEnd:P}),tne(T,{isEnabled:a,onDrop:A,onEnter:R,onLeave:j});const w=X()("matching-interaction-piece",{"matching-interaction-piece--matched":c,"matching-interaction-piece--moved":l}),O=S==null?null:(0,o.jsxs)(o.Fragment,{children:[E?.a11yMatchingItemMatchedWith," ",(0,o.jsx)(kn,{value:S})]}),B=y==null?(0,o.jsx)(o.Fragment,{children:E?.a11yMatchingItemSelectableItem}):(0,o.jsxs)(o.Fragment,{children:[E?.a11yMatchingItemMatchWith," ",(0,o.jsx)(kn,{value:y})]}),D=X()("matching-interaction-item",{draggable:!a,"draggable--dragging":!a&&I,droppable:a});return(0,o.jsx)("li",{className:D,ref:T,role:"listitem",children:(0,o.jsxs)("button",{"aria-pressed":i||c?!0:void 0,className:w,"data-state":i?"active":void 0,onClick:I?void 0:k,onKeyDown:M,ref:L,style:n?{height:n}:void 0,type:"button",children:[a?(0,o.jsx)("span",{className:"matching-interaction-piece-decoration"}):(0,o.jsx)(ae,{className:"matching-interaction-piece-decoration",name:"grip-dots-vertical"}),t===2?(0,o.jsx)("span",{className:"matching-interaction-piece-jigsaw"}):null,(0,o.jsx)("span",{className:"matching-interaction-piece-content",children:(0,o.jsx)("span",{"data-matching-interaction-piece-content-inline":"",children:(0,o.jsx)(kn,{value:x})})}),(0,o.jsx)("span",{className:"visually-hidden-always",children:O}),(0,o.jsx)("span",{className:"visually-hidden-always",children:B})]},s)})});var Ze=C(49860);function nne({answers:e,columnBehavior:t,isActive:n,itemHeight:s,matches:r,onChange:i,onChangeItemHeight:a,onChangeRows:c,prefersKeyboardNavigation:l}){const d=(0,Ve.A)(n),h=(0,Ve.A)(t),m=(0,Ve.A)(e),f=(0,Ve.A)(r),p=Gt(),[v,g]=Ze.useState(void 0),[x,y]=Ze.useState(void 0),[S,I]=Ze.useState(void 0),[b,T]=Ze.useState(!1),L=Ze.useRef(null),E=Ze.useRef(null),k=Ze.useRef(null),N=Ze.useRef(void 0),P=Ze.useRef(void 0),[A,R]=Ze.useState(()=>o0({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),[j,M]=Ze.useState(()=>o0({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})),w=Ze.useMemo(()=>e.map(G=>({col:1,id:G.id,value:G.title})).toSorted((G,Y)=>{const Z=A.get(G.id)??1/0,q=A.get(Y.id)??1/0;return Z-q}),[e,A]),O=Ze.useMemo(()=>e.map(G=>({col:2,id:G.id,value:G.matchTitle})).toSorted((G,Y)=>{const Z=j.get(G.id)??1/0,q=j.get(Y.id)??1/0;return Z-q}),[e,j]),B=Ze.useCallback(()=>{for(const H of L.current?.querySelectorAll('button:not([tabindex="-1"])')??[])H.setAttribute("tabindex","-1")},[]),D=Ze.useCallback(H=>{const G=Array.from(A),Y=Array.from(j);if(t==="freezeSecond"){const Z=new Array(Y.length),q=G.map(re=>re[0]).filter(re=>!(re in H));for(const[re,le]of Object.entries(H)){const Le=j.get(le);Z[Le]=[re,Le]}for(let re=0;re<Z.length;re++)if(Z[re]==null){const le=q.shift();Z[re]=[le,re]}const ee=new Map(Z),se=wS(A,ee);se.length>0&&y(se),R(ee)}else{const Z=new Array(G.length),q=new Set(Object.values(H)),ee=Y.map(le=>le[0]).filter(le=>!q.has(le));for(const[le,Le]of Object.entries(H)){const Te=A.get(le);Z[Te]=[Le,Te]}for(let le=0;le<Z.length;le++)if(Z[le]==null){const Le=ee.shift();Z[le]=[Le,le]}const se=new Map(Z),re=wS(j,se);re.length>0&&I(re),M(se)}},[t,A,j]),_=Ze.useCallback(H=>{N.current=H},[]),F=Ze.useCallback(()=>{P.current==null&&(N.current=void 0)},[]),$=Ze.useCallback(H=>{P.current=H},[]),z=Ze.useCallback(()=>{P.current=void 0},[]),K=Ze.useCallback(H=>{const G=N.current;if(G!=null){const Y=H.col===1?H.id:G.id,Z=H.col===1?G.id:H.id,q=kS(r,Y,Z);N.current=void 0,P.current=void 0,i(q)}},[r,i]),J=Ze.useCallback(H=>{let G=null,Y=!1,Z=v;if(H.col===1&&H.id in r)G=s0(r,H.id),Z=null;else if(H.col===2&&bg(r,H.id)){const q=bg(r,H.id);G=s0(r,q),Z=null}else v==null&&(Z={col:H.col,id:H.id,value:H.value},Y=!0);if(v!=null)if(v.col===H.col)v.id===H.id?Z=null:Z={col:H.col,id:H.id,value:H.value};else{const q=H.col===1?H.id:v.id,ee=H.col===1?v.id:H.id;G=kS(r,q,ee),Y=!0,Z=null}if(G!=null&&i(G),v!==Z&&g(Z),Y){const ee=(H.col===1?k:E).current?.querySelector('button:not([aria-pressed="true"])');ee&&(B(),ee.removeAttribute("tabindex"),ee.focus({preventScroll:!l}))}},[l,v,r,i,B]),Q=Ze.useCallback((H,{col:G,index:Y})=>{const Z=H.currentTarget;let q=!1,ee=null;switch(H.key){case"ArrowUp":q=!0,ee=Z.parentElement.previousElementSibling?.firstElementChild;break;case"ArrowDown":q=!0,ee=Z.parentElement.nextElementSibling?.firstElementChild;break;case"ArrowRight":q=!0,ee=G===1?k.current?.children[Y]?.firstElementChild:void 0;break;case"ArrowLeft":q=!0,ee=G===2?E.current?.children[Y]?.firstElementChild:void 0;break;case"Home":q=!0,ee=Z.closest("ul").firstElementChild.firstElementChild;break;case"End":q=!0,ee=Z.closest("ul").lastElementChild.firstElementChild;break}q&&(H.preventDefault(),H.stopPropagation()),ee&&(B(),ee.removeAttribute("tabindex"),ee.focus())},[B]);Ze.useEffect(()=>{r!==f&&!Kte(r)&&D(r)},[D,r,f]),Ze.useEffect(()=>{const H=({shouldFocus:Z})=>{const q=v.col===1?E:k;B();const ee=q.current.querySelector('button[data-state="active"]');ee?.removeAttribute("tabindex"),Z&&ee?.focus(),g(null)},G=Z=>{L.current?.contains(Z.target)||H({shouldFocus:!1})},Y=Z=>{Nn(Z)&&v!=null&&H({shouldFocus:!0})};return v==null?(document.removeEventListener("mousedown",G),document.removeEventListener("keydown",Y)):(document.addEventListener("mousedown",G),document.addEventListener("keydown",Y)),()=>{document.removeEventListener("mousedown",G),document.removeEventListener("keydown",Y)}},[v,B]);const U=Ze.useCallback(()=>{const H=Array.from(L.current?.querySelectorAll("[data-matching-interaction-piece-content-inline]")??[]);if(H.length===0)return;const G=H[0].closest("button");let Y=0,Z;if(G){const ee=window.getComputedStyle(G),se=parseFloat(ee.paddingBlockStart)+parseFloat(ee.paddingBlockEnd),re=parseFloat(ee.borderTopWidth)+parseFloat(ee.borderBottomWidth);Y=se+re,Z=parseFloat(ee.minHeight)}const q=H.reduce((ee,se)=>Math.max(ee,se.scrollHeight+Y),0);Z&&Z>=q?a(void 0):a(q)},[a]);return Ze.useEffect(()=>{(!d&&n||m!==e)&&U()},[d,n,e,m,U]),Ze.useEffect(()=>{const H=L.current?.closest(".quiz-card");let G;return H!=null&&(G=new ResizeObserver(()=>{U()}),G.observe(H)),()=>{H!=null&&G!=null&&G.unobserve(H)}},[U]),Ze.useEffect(()=>{let H,G;return x&&(H=setTimeout(()=>{y(void 0)},1e3)),S&&(G=setTimeout(()=>{I(void 0)},1e3)),()=>{clearTimeout(H),clearTimeout(G)}},[x,S]),Ze.useEffect(()=>{b&&h!==t&&(i({}),D({}),g(void 0),R(o0({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),M(o0({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})))},[b,t,h,e,i,D]),Ze.useEffect(()=>{if(w.length<=0)return;const H=w.map((G,Y)=>[G,O[Y]]);c(H)},[w,O,c]),Ze.useEffect(()=>{T(!0)},[]),(0,o.jsxs)("div",{className:"matching-interaction","data-testid":"matching-interaction",ref:L,children:[(0,o.jsx)("ul",{"aria-label":p?.a11yMatchingColumn1,className:"matching-interaction-col matching-interaction-col-1","data-col":"1",ref:E,role:"list",children:w.map((H,G)=>{const Y=Qte(r,H.id);return(0,o.jsx)(jS,{col:1,height:s,id:H.id,index:G,isActive:v?.col===1&&v?.id===H.id,isFrozen:t==="freezeFirst",isMatched:Y,isMoved:x?.map(Z=>Z.id).includes(H.id)??!1,onClick:J,onDragEnd:F,onDragStart:_,onDrop:K,onDropZoneEnter:$,onDropZoneLeave:z,onKeyDown:Q,value:H.value,valueOtherColumnActive:v?.col===2?v?.value:void 0,valueOtherColumnMatch:Y?O[G]?.value:void 0},H.id)})}),(0,o.jsx)("ul",{"aria-label":p?.a11yMatchingColumn2,className:"matching-interaction-col matching-interaction-col-2","data-col":"2",ref:k,role:"list",children:O.map((H,G)=>{const Y=Zte(r,H.id);return(0,o.jsx)(jS,{col:2,height:s,id:H.id,index:G,isActive:v?.col===2&&v?.id===H.id,isFrozen:t==="freezeSecond",isMatched:Y,isMoved:S?.map(Z=>Z.id).includes(H.id)??!1,onClick:J,onDragEnd:F,onDragStart:_,onDrop:K,onDropZoneEnter:$,onDropZoneLeave:z,onKeyDown:Q,value:H.value,valueOtherColumnActive:v?.col===1?v?.value:void 0,valueOtherColumnMatch:Y?w[G]?.value:void 0},H.id)})})]})}const o0=({answers:e,columnBehavior:t,columnBehaviorToShuffle:n})=>{let s=e.map(r=>r.id);return t===n&&(s=(0,ch.shuffle)(s)),new Map(s.map((r,i)=>[r,i]))};function wS(e,t){const n=[];for(const[s,r]of e){const i=t.get(s);i!==r&&n.push({id:s,from:r,to:i})}return n}var r0=C(49860);function RS({columnBehavior:e="freezeSecond",matches:t={},onChange:n=()=>{},revealAnswers:s="none",...r}){const[i,a]=r0.useState([]),[c,l]=r0.useState(void 0),d=r0.useCallback(m=>{a(m)},[]),h=r0.useCallback(m=>{l(m)},[]);return r.isComplete?(0,o.jsx)(Wte,{...r,columnBehavior:e,itemHeight:c,revealAnswers:s,rows:i}):(0,o.jsx)(nne,{...r,columnBehavior:e,itemHeight:c,matches:t,onChange:n,onChangeItemHeight:h,onChangeRows:d})}function AS(e){return e==null||e===-1}function sne(e,t){return e===t}const one=({allowTabNavigation:e=!1,color:t,correctId:n="",errorMessageId:s,isComplete:r,isCorrect:i=!1,isReduceMotion:a=!1,labels:c,onChange:l=()=>{},onEnterToSubmit:d=()=>{},options:h=[],questionHtmlId:m="",renderOptionText:f,isRetaking:p,revealAnswers:v=Oe.NONE,selectedIndex:g=-1,shouldFocusFirst:x,onFocusFirstComplete:y})=>{const S=AS(g);return(0,o.jsx)($c,{"aria-invalid":s?!0:void 0,"aria-labelledby":[m,s].filter(Boolean).join(" "),"aria-required":"true",role:"radiogroup",children:h.map((I,b,T)=>(0,o.jsx)(rne,{allowTabNavigation:e,color:t,id:I.id,index:b,isComplete:r,isCorrect:i,isCorrectOption:n===I.id,isFirst:b===0,isFresh:S,isLast:b===T.length-1,isReduceMotion:a,isRetaking:p,isSelected:!p&&sne(g,b),labels:c,onChange:l,onEnterToSubmit:d,onFocusFirstComplete:y,questionHtmlId:m,renderOptionText:f,revealAnswers:v,shouldFocusFirst:x,title:I.title},I.id))})},rne=({allowTabNavigation:e,color:t,id:n,index:s,isComplete:r,isCorrect:i,isCorrectOption:a,isFresh:c,isSelected:l,isReduceMotion:d,labels:h,onChange:m,onEnterToSubmit:f,questionHtmlId:p,renderOptionText:v,isRetaking:g,revealAnswers:x,shouldFocusFirst:y,onFocusFirstComplete:S,title:I})=>{const[b]=(0,u.useState)(()=>Vr()("qmc-")),T=(0,u.useRef)(null),L=(0,Ve.A)(l),E=!!r,k=e&&(l||c&&s===0)?0:-1,N=x===Oe.ALL,P=x==Oe.INCORRECT,A=N||P&&i,R=N||P&&i||P&&!i&&l,j=r&&a&&A,M=r&&!a&&R,w=(j||M)&&!g,O=w?`${b}-result`:void 0,B=X()("quiz-multiple-choice-option",{"is-complete":r,"is-correct":j,"is-incorrect":M,"is-selected":l}),D=X()("quiz-multiple-choice-option__dot",{"quiz-multiple-choice-option__dot--active":l&&!r}),_=X()("quiz-multiple-choice-option__check",{"quiz-multiple-choice-option__check--active":j}),F=X()("quiz-multiple-choice-option__x",{"quiz-multiple-choice-option__x--active":M}),$=X()("quiz-multiple-choice-option__border"),z=(0,u.useCallback)(U=>{ji(U)&&f(U)},[f]),K=(0,u.useCallback)(()=>{m({selectedIndex:s})},[s,m]),J=(0,u.useCallback)(()=>{l&&m({selectedIndex:s})},[s,l,m]),Q=r?void 0:z;return(0,u.useEffect)(()=>{e&&T.current&&(!L&&l?T.current.focus({preventScroll:d}):y&&c&&s===0&&(T.current.focus({preventScroll:d}),S?.()))},[e,l,d,L,y,c,s,S]),(0,o.jsxs)("div",{"data-testid":"quiz-card-option",children:[(0,o.jsxs)("label",{"aria-describedby":O,className:B,ref:T,children:[(0,o.jsx)("input",{checked:l,className:"quiz-multiple-choice-option__input",disabled:E,name:p,onChange:K,onClick:r?void 0:J,onKeyDown:Q,tabIndex:k,type:"radio"}),(0,o.jsxs)("div",{className:"quiz-multiple-choice-option__indicator",style:{color:t},children:[(0,o.jsx)(B$,{className:D,dataTestId:l&&!r?"selected-dot-active":"selected-dot"}),(0,o.jsx)(t3,{className:_,"data-testid":j?"correct-check-active":"correct-check"}),(0,o.jsx)(i3,{"aria-hidden":"true",className:F,dataTestId:M?"incorrect-x-active":"incorrect-x",overrideStyle:!0})]}),(0,o.jsx)("div",{className:$}),(0,o.jsx)("div",{className:"quiz-multiple-choice-option__text","data-testid":"quiz-mc-option-text",children:v({optionId:n,title:I})})]}),w&&(0,o.jsxs)("div",{className:"visually-hidden-always",id:O,children:[l&&a&&h?.a11yQuizReviewCorrectlySelected,l&&!a&&h?.a11yQuizReviewIncorrectlySelected,!l&&a&&h?.a11yQuizReviewIncorrectlyUnselected,!l&&!a&&h?.a11yQuizReviewCorrectlyUnselected]})]})},PS=one;function ine(e){return e.length===0}function ane(e,t){return e.includes(t)}function cne(e,t){return e.includes(t)?e.filter(n=>n!==t):[...e,t]}const lne=({allowTabNavigation:e=!1,correctIds:t=[],errorMessageId:n,isComplete:s,isCorrect:r=!1,labels:i,onChange:a=()=>{},onEnterToSubmit:c=()=>{},options:l=[],questionHtmlId:d="",renderOptionText:h,isRetaking:m,revealAnswers:f=Oe.NONE,selectedIndices:p=[]})=>(0,o.jsx)("div",{"aria-labelledby":[d,n].filter(Boolean).join(" "),role:"group",children:(0,o.jsx)("ul",{children:l.map((v,g)=>(0,o.jsx)(dne,{allowTabNavigation:e,errorMessageId:n,id:v.id,index:g,isComplete:s,isCorrect:r,isCorrectOption:t.includes(v.id),isRetaking:m,isSelected:!m&&ane(p,g),labels:i,onChange:a,onEnterToSubmit:c,renderOptionText:h,revealAnswers:f,title:v.title},v.id))})}),dne=({allowTabNavigation:e,errorMessageId:t,id:n,index:s,isComplete:r,isCorrect:i,isCorrectOption:a,isSelected:c,labels:l,onChange:d,onEnterToSubmit:h,renderOptionText:m,isRetaking:f,revealAnswers:p,title:v})=>{const[g]=(0,u.useState)(()=>Vr()("qmr-")),x=r&&p===Oe.ALL&&!f,y=x?`${g}-result`:void 0,S=!!r,I=e?0:-1,b=p===Oe.ALL,T=p==Oe.INCORRECT,L=b||T&&i||T&&!i&&c,E=X()("quiz-multiple-response-option",{"quiz-multiple-response-option--complete":r,"quiz-multiple-response-option--selected":c,"quiz-multiple-response-option--correct":r&&a&&L,"quiz-multiple-response-option--incorrect":r&&!a&&L}),k=X()("quiz-multiple-response-option__border"),N=(0,u.useCallback)(R=>{ji(R)&&h(R)},[h]),P=(0,u.useCallback)(()=>{d({optionIndex:s})},[s,d]),A=r?void 0:N;return(0,o.jsxs)("li",{children:[(0,o.jsxs)("label",{"aria-describedby":y,className:E,children:[(0,o.jsx)("input",{"aria-describedby":t||void 0,"aria-invalid":t?!0:void 0,checked:c,className:"quiz-multiple-response-option__input",disabled:S,onChange:r?void 0:P,onKeyDown:A,tabIndex:I,type:"checkbox"}),(0,o.jsxs)("div",{className:"quiz-multiple-response-option__indicator",children:[(0,o.jsx)(t3,{className:"quiz-multiple-response-option__check"}),(0,o.jsx)(i3,{"aria-hidden":"true",className:"quiz-multiple-response-option__x",height:"8",overrideStyle:!0,width:"8"})]}),(0,o.jsx)("div",{className:k}),(0,o.jsx)("div",{className:"quiz-multiple-response-option__text",children:m({optionId:n,title:v})})]}),x&&(0,o.jsxs)("div",{className:"visually-hidden-always",id:y,children:[c&&a&&l?.a11yQuizReviewCorrectlyChecked,c&&!a&&l?.a11yQuizReviewIncorrectlyChecked,!c&&a&&l?.a11yQuizReviewIncorrectlyUnchecked,!c&&!a&&l?.a11yQuizReviewCorrectlyUnchecked]})]})},MS=lne;var Vbe,une,hne,zbe,$be,Ube,Gbe;const mne=So()(at()("correct",!0)),Wbe=e=>une(hne(e),Sg),fne=e=>({MATCHING:ke(),FILL_IN_THE_BLANK:Ig,MULTIPLE_CHOICE:ke(),MULTIPLE_RESPONSE:ke()})[e],Sg=$e()(J0()("id"),mne),pne=$e()(Fo(),Sg),Ig=So()(at()("correct",!0)),gne=$e()(et()("id"),Fo()),Kbe=null,{FILL_IN_THE_BLANK:vne,MATCHING:OS,MULTIPLE_CHOICE:Cne,MULTIPLE_RESPONSE:xne}=me;function BS({type:e,text:t="",matches:n={},answersLength:s=0,selectedIndices:r=[],selectedIndex:i}){switch(e){case vne:return!bl(t);case OS:return Xte(n)===s;case xne:return!ine(r);case Cne:default:return!AS(i)}}function bne({answered:e=!1,...t}){return e&&t.type!==OS?!1:BS(t)}function DS(e,t){const n=e.trim();return t?n:n.toLowerCase()}function FS({answers:e,text:t,caseSensitive:n=!1,getL10nValue:s}){if(!t)return!1;const r=DS(t,n);return e.some(i=>{const a=s(i.title);return typeof a!="string"?!1:DS(a,n)===r})}function _S(e){return Object.entries(e).every(([t,n])=>t===String(n))}function yne(e){const t=e.answers??[],n=e.correct;if(n!=null)return t.findIndex(r=>r.id===n);const s=t.findIndex(r=>r.correct===!0);return s===-1?0:s}function HS({isCorrectAnswerUnshuffled:e=!1,isShuffled:t=!1,item:n,selectedIndex:s,shuffledAnswerIndices:r}){if(s==null||t&&!Array.isArray(r))return!1;const i=t&&!e?r.indexOf(s):s,a=yne(n);return i===a}function Sne(e,t){return t.map(n=>e.indexOf(n))}function Ine(e){return typeof e=="object"&&e!==null&&"id"in e?e.id:e}function Tne(e){const t=e.answers??[],n=e.corrects??[];return n.length>0?n.map(i=>{const a=Ine(i);return t.findIndex(c=>c.id===a)}).filter(i=>i>=0).sort((i,a)=>i-a):t.map((r,i)=>r.correct===!0?i:-1).filter(r=>r>=0).sort((r,i)=>r-i)}function VS(e){return[...e].sort((t,n)=>t-n)}function zS({isShuffled:e=!1,item:t,selectedIndices:n,shuffledAnswerIndices:s}){if(!Array.isArray(n)||e&&!Array.isArray(s))return!1;const r=e?Sne(s,n):n,i=Tne(t),a=VS(r),c=VS(i);return a.length!==c.length?!1:a.every((l,d)=>l===c[d])}function $S({answers:e,feedback:t,feedbackCorrect:n,feedbackIncorrect:s,feedbackType:r,isCorrect:i,isShuffled:a=!1,selectedIndex:c,shuffledAnswerIndices:l}){switch(r){case"CHOICE":{if(c==null||!e)return;const d=a&&Array.isArray(l)?l.indexOf(c):c;return e[d]?.feedback}case"CORRECT_INCORRECT":return i?n:s;default:return t}}function Lne(e){return e==="a"?46.5:7.6}function Ene(e){return e==="d"?2:3.2}function kne(e){switch(e){case"a":return 30;case"c":case"d":return 92;default:return 76}}function US(e){switch(e){case"b":return 95;case"background":return 52;default:return 76}}function Tg(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 Nne(e){return .3}function Qbe(e){switch(e){case 3:return"three";case 4:return"four";default:return"two"}}function jne(e){return e==="light"?"#fff":"#000"}function Zbe(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 Ybe(e){return e==="b"?[52,76,95]:[52,76,92]}function qbe(e){return e==="a"?[30,76,92]:[52,76,92]}function Xbe(e){return e==="d"?[2,4.8,5.6]:[3.2,4.8,5.6]}function Jbe(e){return e==="a"?[46.5,78,120]:[7.6,20,32]}function wne(e){switch(e){case 3:return"sm";case 10:return"lg";default:return"med"}}function Lg(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 Rne(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function GS(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function WS(e){switch(e){case 4:return"med";case 6:return"lg";default:return"sm"}}function i0(e){switch(e){case 52:return"sm";case 92:return"lg";default:return"med"}}function Ane(e){switch(e){case 30:case 52:return"sm";case 92:return"lg";default:return"med"}}function Pne(e){switch(e){case 4.8:return"med";case 5.6:return"lg";default:return"sm"}}function Mne(e){switch(e){case 20:case 78:return"med";case 32:case 120:return"lg";default:return"sm"}}function One(e){switch(e){case 1:return"sm";case 3:return"lg";default:return"med"}}function Bne(e){switch(e){case 3.2:return"med";case 5.6:return"lg";default:return"sm"}}const{FILL_IN_THE_BLANK:sa,MATCHING:a0,MULTIPLE_CHOICE:c0,MULTIPLE_RESPONSE:l0}=me,Dne={FILL_IN_THE_BLANK:"a11yBlockKnowledgeCheckFIB",MATCHING:"a11yBlockKnowledgeCheckM",MULTIPLE_CHOICE:"a11yBlockKnowledgeCheckMC",MULTIPLE_RESPONSE:"a11yBlockKnowledgeCheckMR"},Fne=Pt()(null,[0,"type"]),Eg=vn();class KS 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-${Ju()}`},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(Ye,this.previewOnly__forceShowFeedback),window.addEventListener(pf,this.previewOnly__clearOverrides),this.id=Vr()("kc-")}componentDidUpdate(t,n){n.answered&&!this.state.answered?this.getType()!==sa&&xp(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(Ye,this.previewOnly__forceShowFeedback),window.removeEventListener(pf,this.previewOnly__clearOverrides)}previewOnly__forceShowFeedback(t){const{itemId:n,path:s}=t.detail,{getL10nValue:r}=this.props;if(n!==this.props.blockId)return;const i=s.at(-1);if(typeof i=="string"&&i.startsWith?.("feedback")){const a=i==="feedbackCorrect",c=s.indexOf("answers"),l=s[c+1],d=c>-1&&typeof l!="string"?l.id:null,h={forceShowFeedback:!0,forceShowFeedbackCorrect:a,forceShowFeedbackMessage:""};if(d&&"answers"in this.props.items[0]){const m=this.props.items[0].answers.find(({id:p})=>p===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 sa:return this.state.fillInText;case a0:return this.state.matches;case l0:return this.state.selectedIndices;case c0: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:cne(n,t)})}handleChoiceSelect({selectedIndex:t}){const{answered:n}=this.state;n||this.setState({errorIncomplete:!1,selectedAnswer:t,chosen:!0})}onSubmit(t,n,s,r,i){if(!n){switch(this.setState({errorIncomplete:!0}),r.type){case sa:this.wrapper?.querySelector("input")?.focus();break;case l0:case c0:this.wrapper?.querySelector("input")?.focus();break;case a0:default:break}return}i?.preventDefault(),this.setState({answered:!0,isRetaking:!1}),s&&this.props.onStep({id:t})}handleFillIn(t){this.setState({errorIncomplete:!1,fillInText:t})}handleRetake(t){const{blockId:n,lessonId:s,settings:r}=this.props,{id:i}=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},()=>{!Eg&&this.getType()===sa&&xp(this.wrapper),this.retakeAnimationStageTwo=null}),r?.retryCount!=null&&this.props.onRetryAttempt?.({blockId:n,itemId:i,lessonId:s})},950)}resetErrorIncomplete(){this.state.errorIncomplete&&this.setState({errorIncomplete:!1})}resetShouldFocusFirst=()=>{this.state.shouldFocusFirst&&this.setState({shouldFocusFirst:!1})};renderQuestionTitle({title:t}){return(0,o.jsx)(qe,{className:"quiz-card__title",id:this.state.questionHtmlId,value:t})}renderQuestion(t){const{answered:n,errorIncomplete:s,isRetaking:r,selectedAnswer:i}=this.state,{blockId:a,enableVideoPlaybackSpeed:c,getL10nValue:l,labels:d,progress:h,renderQuestionTitle:m=this.renderQuestionTitle,settings:f}=this.props,{quizCorrect:p,quizIncorrect:v,quizRequireAnswer:g,quizSubmit:x,quizTakeAgain:y}=d,{id:S,type:I}=t,b=t.type!=="DRAW_FROM_QUESTION_BANK"?t.settings:{},T=l("media"in t?t.media:{}),L=this.state.forceShowFeedbackCorrect||this.getIsCorrect({item:t}),E=this.getCanSubmit({item:t}),k=f?.requireCorrectAnswer?L:!0,N=this.onSubmit.bind(this,S,E,k,t),P=this.getFeedback({item:t,isCorrect:L,selectedAnswer:i}),A=this.getSelection({item:t}),{columnBehavior:R,correctAnswerColor:j,correctAnswerColorContrast:M,incorrectAnswerColor:w,incorrectAnswerColorContrast:O}=f,B=L?j:w,D=d.knowledgeCheckCorrectAnswerRequiredBlock,_=d.knowledgeCheckRetriesAttemptsRemaining,F=d.knowledgeCheckMaxRetriesReached,$=h?.items?.[a]?.items?.[S]?.retryAttemptCount??0,z=f?.retryCount!==0&&(f?.retryCount==null||f?.retryCount===-1||$<f?.retryCount),K=f?.retryCount!=null||f?.retryCount===-1?f?.retryCount-$:-1,J=!L,Q={"--color-feedback-icon":B,"--color-matching-feedback-bubble-bg":w,"--color-multiple-choice-complete-border":w,"--color-multiple-choice-correct-border":j,"--color-multiple-response-correct-border":j,"--color-multiple-response-incorrect-border":w,"--color-multiple-response-option-check":n?j:void 0,"--color-quiz-option-check":j,"--color-x-fill":w},H=f?.revealCorrectAnswers!==!1&&(f.retryCount==null||f.retryCount===-1||!z)?Oe.ALL:Oe.INCORRECT,G=X()("block-knowledge__retake-container",{"block-knowledge__retake-container--active":n,"block-knowledge__retake-container--active-attempts-left":n&&!r&&K>0}),Y=X()("block-knowledge__retake",{"block-knowledge__retake--active":n&&!r&&z}),Z=X()("block-knowledge__retake","block-knowledge__attempts-left",{"block-knowledge__retake--active":n&&!r&&z&&K>0}),q=X()("block-knowledge__retake","block-knowledge__no-more-attempts",{"block-knowledge__retake--active":n&&!r&&!z}),ee=!!T?.image,se=!!T?.audio,re=!!T?.video,le=!!T?.embed;let Le=null;se&&ee?Le=(0,o.jsx)(Xo,{blockId:a,enableVideoPlaybackSpeed:c,index:`${a}-${S}-audio`,isOverlayAudio:!0,item:t,labels:d,media:T,settings:b}):se&&(re||le)?Le=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Xo,{blockId:a,enableVideoPlaybackSpeed:c,index:`${a}-${S}-audio`,item:t,labels:d,media:{audio:T.audio},settings:b}),(0,o.jsx)(Xo,{blockId:a,enableVideoPlaybackSpeed:c,index:`${a}-${S}-video`,item:t,labels:d,media:re?{video:T.video}:{embed:T.embed},settings:b})]}):Le=(0,o.jsx)(Xo,{blockId:a,enableVideoPlaybackSpeed:c,index:`${a}-${S}-audio`,item:t,labels:d,media:T,settings:b});const Te=X()("block-knowledge__media",{"block-knowledge__image-with-audio":se&&ee});return(0,o.jsxs)(xS,{isActive:!0,style:Q,children:[f?.requireCorrectAnswer&&(n&&!L||!n)&&(0,o.jsxs)("div",{className:"quiz-card__require-correct-answer-disclaimer",children:[(0,o.jsx)(ae,{className:"quiz-card__require-correct-answer-disclaimer-icon",name:"info-circle"}),D]}),m(t),(0,o.jsx)("div",{className:Te,children:Le}),(0,o.jsx)(IS,{type:I,children:this.renderType({columnBehavior:R,correctAnswerColor:j,correctAnswerColorContrast:M,incorrectAnswerColor:w,incorrectAnswerColorContrast:O,isCorrect:L,item:t,onSubmit:N})}),(0,o.jsx)("div",{"aria-live":"assertive",children:s&&(0,o.jsxs)("div",{className:"quiz-card__validations","data-testid":"quiz-validation-error",children:[(0,o.jsx)("span",{"data-testid":"quiz-validation-icon",children:(0,o.jsx)(ae,{className:"quiz-card__validation-icon",name:"alert-circle"})}),(0,o.jsx)("span",{id:`${this.id}-error-incomplete-message`,children:g})]})}),(0,o.jsx)(CS,{canProceed:n,canSubmit:E,isReduceMotion:Eg,onSubmit:N,quizSubmit:x}),(0,o.jsx)(SS,{canProceed:this.state.forceShowFeedback||n,feedbackRef:this.feedbackRef,feedbackValue:P,isActive:n,isComplete:n,isCorrect:L,item:t,labels:d,quizCorrect:p,quizIncorrect:v,revealAnswers:H,selection:A}),(0,o.jsxs)("div",{"aria-hidden":!n,className:G,children:[J&&(0,o.jsxs)(o.Fragment,{children:[z?(0,o.jsxs)(vS,{allowTabNavigation:n,className:Y,onClick:this.handleRetake.bind(this,t),ref:this.takeAgainRef,size:"md",variant:"outlined",children:[(0,o.jsx)(ae,{"aria-hidden":"true",name:"arrow-rotate-left"}),y]}):null,K>0&&(0,o.jsxs)("div",{className:Z,children:[_," ",K]})]}),!z&&!L&&(0,o.jsx)("div",{className:q,children:F})]})]},S)}getIsCorrect({item:t}){const{fillInText:n,matches:s,selectedAnswer:r,selectedIndices:i}=this.state,{type:a}=t,c="answers"in t?t.answers:void 0,l="isCaseSensitive"in t?t.isCaseSensitive:!1;switch(a){case sa:return FS({answers:Ig(c),text:n,caseSensitive:l,getL10nValue:this.props.getL10nValue});case a0:return _S(s);case l0:return zS({item:{answers:c},selectedIndices:i});case c0:default:return HS({item:{answers:c},selectedIndex:r})}}getType(){const{items:t}=this.props;return Fne(t)}getCanSubmit({item:t}){const n="answers"in t?t.answers:void 0,{answered:s,fillInText:r,matches:i,selectedAnswer:a,selectedIndices:c}=this.state;return bne({type:t.type,text:r,matches:i,answersLength:n?.length??0,selectedIndices:c,selectedIndex:a,answered:s})}getFeedback({item:t,isCorrect:n,selectedAnswer:s}){if(this.state.forceShowFeedbackMessage)return this.state.forceShowFeedbackMessage;const r="feedback"in t?t.feedback:void 0,i="feedbackCorrect"in t?t.feedbackCorrect:void 0,a="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 $S({answers:l,feedback:r,feedbackCorrect:i,feedbackIncorrect:a,feedbackType:c,isCorrect:d,selectedIndex:typeof s=="number"?s:null})}getTypeLabel(){const{labels:t}=this.props,n=this.getType(),s=Dne[n];return s?t?.[s]:t?.a11yBlockKnowledgeCheck}renderMultipleResponseOptionText(t,{title:n}){return(0,o.jsx)(qe,{className:"cursorAuto",value:n})}renderMultipleChoiceOptionText(t,{title:n}){return(0,o.jsx)(qe,{className:"quiz-multiple-choice-option__label cursorAuto",value:n})}renderType({columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:s,incorrectAnswerColor:r,incorrectAnswerColorContrast:i,isCorrect:a,item:c,onSubmit:l}){const{isHidden:d,labels:h,prefersKeyboardNavigation:m,renderMultipleResponseOptionText:f=this.renderMultipleResponseOptionText,renderMultipleChoiceOptionText:p=this.renderMultipleChoiceOptionText,settings:v,progress:g,blockId:x}=this.props,{answered:y,fillInText:S,isRetaking:I,matches:b,selectedAnswer:T,selectedIndices:L,shouldFocusFirst:E,questionHtmlId:k}=this.state,{id:N,type:P}=c,A="answers"in c?c.answers:[],{quizAcceptableResponses:R,quizAnswerPlaceholder:j}=h,M=g?.items?.[x]?.items?.[N]?.retryAttemptCount??0,w=v?.retryCount!==0&&(v?.retryCount==null||v?.retryCount===-1||M<v?.retryCount),B=v?.revealCorrectAnswers!==!1&&(v.retryCount==null||v.retryCount===-1||!w)?Oe.ALL:Oe.INCORRECT,D=this.state.errorIncomplete?`${this.id}-error-incomplete-message`:void 0;switch(P){case sa:return(0,o.jsx)(ES,{allowTabNavigation:!0,correctAnswerColor:n,correctAnswerColorContrast:s,errorMessageId:D,incorrectAnswerColor:r,incorrectAnswerColorContrast:i,isComplete:y,isCorrect:a,labels:h,onChange:this.handleFillIn,onEnterToSubmit:l,options:Ig(A),questionHtmlId:k,quizAcceptableResponses:R,quizAnswerPlaceholder:j,revealAnswers:B,value:S});case a0:return(0,o.jsx)(RS,{answers:fne(P)(A),columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:s,incorrectAnswerColor:r,incorrectAnswerColorContrast:i,isActive:!d,isComplete:y,matches:b,onChange:this.handleMatchesChange,prefersKeyboardNavigation:m,revealAnswers:B});case l0:return(0,o.jsx)(MS,{allowTabNavigation:!0,correctIds:Sg(A),errorMessageId:D,isComplete:y,isCorrect:a,isRetaking:I,labels:h,onChange:this.handleMultipleResponseChange,onEnterToSubmit:l,options:A,questionHtmlId:k,renderOptionText:f.bind(this,c),revealAnswers:B,selectedIndices:L});case c0:default:return(0,o.jsx)(PS,{allowTabNavigation:!0,correctId:pne(A)||gne(A),errorMessageId:D,isComplete:y,isCorrect:a,isReduceMotion:Eg,isRetaking:I,labels:h,onChange:this.handleChoiceSelect,onEnterToSubmit:l,onFocusFirstComplete:this.resetShouldFocusFirst,options:A,questionHtmlId:k,renderOptionText:p.bind(this,c),revealAnswers:B,selectedIndex:T,shouldFocusFirst:E})}}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,items:r,settings:i,variant:a}=this.props,{answered:c,isRetaking:l}=this.state,{entranceAnimation:d,knowledgeCheckWidth:h=76}=i,m=i0(h),f=X()("block-knowledge",{"block-knowledge--answered":c,"block-knowledge--no-animation":!d,"block-knowledge--retake":l}),p=X()("block-knowledge__wrapper",`block-knowledge__wrapper--${a}`,{[`block-knowledge__container--custom-width-${m}`]:!0}),v=Array.isArray(r)&&r.length>0?r.slice(0,1):[];return(0,o.jsx)(Me,{className:f,"data-testid":"block-kc-card",ref:g=>{this.block=g},style:this.getStyle(),children:(0,o.jsx)(ze,{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,children:(0,o.jsx)("div",{className:"block-knowledge__container",children:(0,o.jsx)("div",{className:"block-knowledge__row",children:(0,o.jsx)("div",{className:`block-knowledge__col--custom-width-${m}`,children:(0,o.jsx)(nn,{"aria-label":this.getTypeLabel(),className:p,"data-testid":"block-knowledge-wrapper",ref:g=>{this.wrapper=g},children:v.map(g=>this.renderQuestion(g))})})})})})})}getStyle(){const{backgroundColor:t,settings:n}=this.props;if(n?.cardMode===Gn.TRANSPARENT)switch(n?.backgroundType){case oe.ACCENT:case oe.COLOR:case oe.TINT:if(t)switch(Ni(t)){case Lt.LIGHT:return{"--color-background-choice-hover":as(.5,t),"--color-background-feedback-frame":as(.5,t)};case Lt.MED:return{"--color-background-choice-hover":As(.3,t),"--color-background-feedback-frame":As(.3,t)};case Lt.DARK:return{"--color-background-choice-hover":As(.6,t),"--color-background-feedback-frame":As(.6,t)};case Lt.NEAR_BLACK:return{"--color-background-choice-hover":as(.15,t),"--color-background-feedback-frame":as(.15,t)}}}}}const _ne=e=>{const{blockId:t,items:[n]}=e,{questions:s}=n,[r,i]=(0,u.useState)(()=>Sb({questions:s}));(0,u.useEffect)(()=>{if(!s)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=s.find(({id:p})=>p===m);f&&i(f)};return window.addEventListener(Ye,c),()=>window.removeEventListener(Ye,c)},[t,r,s]);const a=(0,u.useMemo)(()=>r?{variant:FR[r.type],items:[r]}:{},[r]);return r?(0,o.jsx)(KS,{...e,...a}):(0,o.jsx)("div",{})},Hne=e=>e.variant==="draw from question bank",oa=e=>{const t=En()??"",n=fn(),s=rt(),r={...e,backgroundColor:t,getL10nValue:s,blockSettings:n};return Hne(r)?(0,o.jsx)(_ne,{...r}):(0,o.jsx)(KS,{...r})};var Vne=C(83854),zne=C.n(Vne);class $ne extends u.Component{refWrap;refBubbleTitle;refDialog;portal;contentRef;scrollRef;videoContainer;constructor(t){super(t),this.state={hasOverflow:!1},this.refWrap=(0,u.createRef)(),this.refBubbleTitle=(0,u.createRef)(),this.refDialog=(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=so()}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?this.contentRef.scrollTop=0:t.isActive&&!this.props.isActive&&this.state.hasOverflow&&this.contentRef.removeEventListener("scroll",this.scrollRef),this.props.forceNonModal&&this.props.isActive){const n=this.refDialog.current;n!=null&&!n.open&&(n.open=!0)}if(!t.isActive&&this.props.isActive){setTimeout(()=>{document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown)},0),this.props.suppressFocus||this.refBubbleTitle.current?.focus?.();const n=this.props.media;this.props.onTranscriptUpdate?.({audioPlayerId:Is({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))}render(){const{accentColor:t,allowNav:n,description:s,forceNonModal:r,headingLevel:i,htmlId:a,isActive:c,isMobile:l,media:d,title:h,x:m,y:f}=this.props,p=i?`h${i}`:"h2",v=X()("bubble",{"bubble--active":c}),g=Gne({x:m,y:f}),x=Wne({hasOverflow:this.state.hasOverflow,x:m,y:f}),y={borderBottomColor:t},S=`${a}-title`,I=()=>{if(!d)return(0,o.jsx)(je,{allowTabNavigation:c,className:"bubble__description",value:s});const T=this.props.getL10nValue(d)??{},L=Ts(T,this.props.audioPosition,!0,"labeled-graphic"),E={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:!c},k={audio:{media:L.audioOnlyMedia||T,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-audio`},image:{media:L.imageOnlyMedia||T,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-image`},video:{media:L.videoOnlyMedia||T,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-video`},embed:{media:L.embedOnlyMedia||T,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-embed`},overlay:{media:T,isOverlayAudio:!0,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-overlay`}};return(0,o.jsx)(o.Fragment,{children:L.renderOrder.map((N,P)=>{if(N==="text")return(0,o.jsx)(je,{allowTabNavigation:c,className:"bubble__description",value:s},`text-${P}`);const A=k[N];return!A||N==="embed"&&!c?null:(0,o.jsx)("div",{className:"bubble__media",children:(0,o.jsx)("div",{className:"bubble__figure",children:(0,o.jsx)("div",{className:X()({"labeled-graphic-bubble-media-container--audio-bottom":N==="audio"&&this.props.audioPosition==="bottom"}),children:(0,o.jsx)(rn,{...E,...A})})})},`${N}-${P}`)})})},b=(0,o.jsx)("div",{className:v,ref:this.refWrap,style:g,children:(0,o.jsxs)("dialog",{"aria-hidden":!c,"aria-labelledby":S,"aria-modal":l&&!r,className:x,id:a,onKeyDown:this.handleKeyDown,ref:this.refDialog,style:y,children:[(0,o.jsx)(p,{className:"bubble__title",id:S,ref:this.refBubbleTitle,tabIndex:-1,children:(0,o.jsx)(kn,{value:h})}),(0,o.jsx)("button",{"aria-label":"Close modal",className:"bubble__close",onClick:this.handleCloseClick,type:"button",children:(0,o.jsx)(D$,{className:"bubble__close-icon"})}),(0,o.jsx)("div",{className:"bubble__content",ref:T=>{this.contentRef=T},children:I()}),n&&this.renderControls()]})});return l?(0,bs.createPortal)((0,o.jsx)(c5,{children:b}),this.portal):b}renderControls(){const{accentColor:t,labels:n}=this.props,s={"--color-lg-accent":t};return(0,o.jsxs)("div",{className:"bubble__controls",style:s,children:[(0,o.jsx)("button",{"aria-label":n?.a11yCarouselPrevious,className:"bubble__prev",onClick:this.handlePreviousClick,type:"button",children:(0,o.jsx)("i",{className:"icon icon-chevron-left"})}),(0,o.jsx)("button",{"aria-label":n?.a11yCarouselNext,className:"bubble__next",onClick:this.handleNextClick,type:"button",children:(0,o.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=e0()(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();if(!(this.refWrap.current!=null&&n.includes(this.refWrap.current)||Array.from(document.querySelectorAll("dialog[open]")).some(r=>n.includes(r)))){if(this.props.forceNonModal){const r=document.querySelector(".block-search");if(r!=null&&n.includes(r))return}this.props.onClose({shouldFocusMarker:!1})}};handleDocumentKeyDown=t=>{Nn(t)&&this.props.isActive&&this.props.onClose({shouldFocusMarker:!1})};handleKeyDown(t){const{allowNav:n,onNextClick:s,onPreviousClick:r}=this.props,i=pH(this.contentRef,this.state.hasOverflow),a=zne()(_e()(n));Tn()([[a(Uo),r],[a(Go),s],[hH,i]])(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,s=t.scrollHeight,r=t.offsetHeight;n>=s-r-10?this.setState({hasOverflow:!1}):this.state.hasOverflow||this.setState({hasOverflow:!0})}}function Une(e){const t=rt(),n=Zt(768);return(0,o.jsx)($ne,{...e,getL10nValue:t,isMobile:n})}const Gne=({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},Wne=({hasOverflow:e,x:t,y:n})=>{const s=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":s,"bubble__body--right":!s,"bubble__body--top":r==="top","bubble__body--middle":r==="middle","bubble__body--bottom":r==="bottom"})};var Kne=C(49860);const Qne=e=>new URL(e).pathname.slice(1)+new URL(e).search;class Zne extends Kne.Component{imageEl;constructor(t){super(t),this.state={style:{}}}render(){const{canvasClassNames:t,children:n,cornerRadius:s,editable:r,editingDisabled:i,getL10nValue:a,imageLoaded:c,media:l,onCreateMarker:d,onShowAltDialog:h}=this.props,{style:m}=this.state,f=a(l)?.image??{},{alt:p,dimensions:v,key:g,src:x}=f,y=!!f.alt,S=jo(p),I=VN(f),b=X()("labeled-graphic-canvas__figure",{"labeled-graphic-canvas__figure--editable":r&&!i,"labeled-graphic-canvas__figure--editing-disabled":r&&i});let T;g?T=Tt(f):x&&(T=Tt({key:Qne(x),...f}));const L=X()("labeled-graphic-canvas__image","labeled-graphic-canvas__image--flag-dimensions",{"labeled-graphic-canvas__image--svg":SC(T)}),E={...m,...s!=null&&{"--corner-radius":`${Number(s)}px`}},k=(0,o.jsx)(An,{alt:S,className:L,"data-l10n-id":Mt(l),height:v?.height||v?.originalHeight,onClick:d,onLoad:()=>this.setState({style:I}),ref:N=>{this.imageEl=N},src:T,style:E,width:v?.width||v?.originalWidth});return(0,o.jsx)("div",{className:t||"labeled-graphic-canvas",children:(0,o.jsx)("div",{className:"labeled-graphic-canvas__item",children:(0,o.jsx)("div",{className:"labeled-graphic-canvas__bounds",children:(0,o.jsxs)("figure",{className:b,children:[y&&r&&(0,o.jsx)(Bs,{message:"Edit alt text",children:(0,o.jsx)("div",{className:"item-media__tooltip",children:(0,o.jsx)("button",{className:"labeled-graphic-canvas__alt-tag",onClick:h,type:"button",children:"ALT"})})}),c&&k,(0,o.jsx)("ol",{role:"list",children:n})]})})})})}}const Yne=ft(Zne),qne={"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"},Xne=(e,t)=>{const n=qne[t];return n?.startsWith("a11y")?e?.[n]||"":n||""};var Jne=C(49860);const QS=V("labeled-graphic-marker");class ese extends Jne.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:s}=t;n&&s&&!this.state.isComplete&&this.setState({isComplete:!0})}buildMarkerLabel=({icon:t,label:n,title:s,viewed:r})=>{const{labels:i}=this.props;return[].concat(n||[]).concat(s||[]).concat(t||[]).concat(r?i?.a11yLabeledGraphicViewed:i?.a11yLabeledGraphicUnviewed).join(", ")};render(){const{accentColor:t,ariaControls:n,hasSearchMatch:s,icon:r,isActive:i,isComplete:a,isLessonBlocksList:c,isSelected:l,isVisible:d,labels:h,markerColor:m,markerColorContrast:f,onFocus:p,styles:v,useLocalStateForCompletion:g}=this.props,x=this.props.getL10nValue(this.props.title),y=Xne(h,r),S=g?this.state.isComplete:a,I=!!m,b=fs(m),L=Wt({backgroundColor:m,contrast:f??b}),E=I?m:"#ffffff",k=I?L:t,N=this.buildMarkerLabel({icon:y,label:h&&h.a11yLabeledGraphicButtonMarker||"",title:x,viewed:S}),P=QS({active:l,dragged:this.state.isDragged,visible:d,complete:S,"search-match":s}),A={...v,"--color-lg-accent":E,"--color-lg-font":k},R=QS("pin",{selected:l,disabled:c});return(0,o.jsx)("button",{"aria-controls":n,"aria-expanded":i,"aria-label":N,className:P,onClick:this.onClick,onContextMenu:this.onItemRelease.bind(this),onFocus:p,onMouseDown:this.onItemGrab.bind(this),onMouseEnter:this.onHover.bind(this),onMouseLeave:this.onLeave.bind(this),onMouseUp:this.onItemRelease.bind(this),ref:j=>{this.marker=j},style:A,type:"button",children:(0,o.jsx)("span",{className:R,children:(0,o.jsx)("i",{className:`icon icon-Master-${r}`})})})}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:s,parentId:r}=this.props,i="labeledGraphicMarkerClick",a={detail:{itemId:n,parentId:r}},c=new CustomEvent(i,a);document.dispatchEvent(c),t||s()}onItemGrab(t){const{editable:n}=this.props;if(!n)return;const s=this.marker.getBoundingClientRect(),r=s.left-t.clientX+this.marker.offsetWidth/2,i=s.top-t.clientY+this.marker.offsetHeight/2;this.setState({posX:t.clientX,posY:t.clientY,offsetX:r,offsetY:i,isDragged:!0})}onItemDrag(t){if(this.state.isDragged){const n=t.clientX-this.state.posX,s=t.clientY-this.state.posY;this.marker.style.transform=`translate3d(${n}px, ${s}px, 0)`}}onItemRelease(t){const{editable:n}=this.props,s={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&&(s.offsetX=0,s.offsetY=0),this.setState(s)}}const tse=ft(ese);class nse 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||vn()}}componentDidMount(){const{isBlock:t,isLearner:n,isPreview:s,markerDelay:r}=this.props;n&&!t&&(this.timeout=setTimeout(()=>this.setState({showMarkers:!0}),s?0:r))}componentWillUnmount(){clearTimeout(this.timeout),clearTimeout(this.entranceDoneTimeout)}render(){const{accentColor:t,animateBlockEntrance:n,blockId:s,color:r,canvasClassNames:i,disableCreateMarker:a,editable:c,getL10nValue:l,imageLoaded:d=!0,isBlock:h,isLearner:m,isLessonBlocksList:f,isPreview:p,initiallyVisible:v,items:g,labels:x,lessonId:y,media:S,onItemClear:I,onItemHint:b,onItemSelected:T,onNextClick:L,onPreviousClick:E,onShowAltDialog:k,parentId:N,progress:P,searchMatchedItemIds:A,selected:R,settings:j={},showBubbles:M,suppressBubbleFocus:w,enableVideoPlaybackSpeed:O,forceBubbleNonModal:B}=this.props,{cornerRadius:D,headingLevel:_,markerColor:F,markerColorContrast:$}=j,{showMarkers:z}=this.state,J=F||(t||r),Q=X()("map-item",{"map-item--animated":!c}),U=n?"fadeIn":"none",H=n?1:0,G=g.length>1,Y=new Set(A?.map(String)??[]);return(0,o.jsx)(u.Fragment,{children:(0,o.jsx)(ze,{afterAnimatedIn:this.afterAnimatedIn,animateBlockEntrance:!p,animateIn:U,duration:p?0:H,initiallyVisible:v,isLearner:m,children:(0,o.jsx)(Yne,{canvasClassNames:i,cornerRadius:D,editable:c,editingDisabled:a,imageLoaded:d,media:S,onCreateMarker:this.createMarker,onShowAltDialog:k,ref:Z=>{this.canvas=Z},children:g.map((Z,q)=>{const{description:ee,id:se,icon:re,media:le,title:Le}=Z,Te=l(Z.x),W=l(Z.y),de={top:W+"%",left:Te+"%"},Ie=Do()(["items",se,"isComplete"],P),ge=yn(R,se),we=Y.has(String(se)),ve=`bubble-${s}-${se}`;return(0,o.jsxs)("li",{className:Q,role:"listitem",children:[(0,o.jsx)(tse,{accentColor:J,ariaControls:ve,editable:c,hasSearchMatch:we,icon:re,isActive:ge,isComplete:Ie,isLessonBlocksList:f,isSelected:ge,isVisible:z,itemId:se,labels:x,markerColor:F,markerColorContrast:$,onClick:()=>{T(se)},onFocus:this.onMarkerFocus(se),onHover:()=>{b()},onLeave:()=>{I()},onSetPosition:this.onSetPosition.bind(this,Z),parentId:N,ref:fe=>{this.markerRefs[se]=fe},styles:de,title:Le,useLocalStateForCompletion:h},se),!c&&M&&(0,o.jsx)(Une,{accentColor:J,allowNav:G,audioPosition:j.audioPosition,blockId:s,description:ee,enableVideoPlaybackSpeed:O,forceNonModal:B,headingLevel:_,htmlId:ve,index:q,isActive:ge,item:Z,labels:x,lessonId:y,media:le,mediaOpts:{disableZoom:!j.zoomOnClick},onClose:this.onBubbleClose(se),onNextClick:()=>{L(q)},onPreviousClick:()=>{E(q)},suppressFocus:w,title:Le,x:Number(Te),y:Number(W)},ve)]},se)})})})})}createMarker(t){const{disableCreateMarker:n,editable:s,onCreateMarker:r}=this.props;if(!s||n)return;const{x:i,y:a}=this.findItemCoordinates({e:t}),c=this.props.items.length,d={description:"",hasMedia:!1,icon:"01",id:Ju(),isActive:!1,title:"",x:String(i),y:String(a)};r({index:c,payload:d})}onBubbleClose(t){const{onClose:n}=this.props;return(s={shouldFocusMarker:!0})=>{const r=this.markerRefs[t];s.shouldFocusMarker&&r?.focus?.(),n(t)}}onMarkerFocus(t){return()=>{const{onClose:n,selected:s}=this.props;s&&s!==t&&n()}}onSetPosition(t,n,s,r){if(!this.props.editable)return;const{lesson:i,onSetMarkerPosition:a}=this.props,{id:c,items:l}=i,{x:d,y:h}=this.findItemCoordinates({e:n,offsetX:s,offsetY:r}),m={x:String(d),y:String(h)};(0,on.uW)(t.x)&&(0,on.uW)(t.y)?(this.props.updateL10n({l10n:t.x,value:m.x}),this.props.updateL10n({l10n:t.y,value:m.y})):a({itemId:t.id,lessonId:c,items:l,payload:m})}findItemCoordinates({e:t,offsetX:n=0,offsetY:s=0}){const r=this.canvas.imageEl.getBoundingClientRect(),i=20,a=this.findItemCoordinate({clientPos:t.clientX,clientOffset:n,rectSubtractor:r.left,rectDivisor:r.width,validOffsetAmount:i}),c=this.findItemCoordinate({clientPos:t.clientY,clientOffset:s,rectSubtractor:r.top,rectDivisor:r.height,validOffsetAmount:i});return{x:a,y:c}}findItemCoordinate({clientPos:t,clientOffset:n,rectSubtractor:s,rectDivisor:r,validOffsetAmount:i}){const a=i/r*100,c=100-a;let l=(t+n-s)/r*100;return l>c?l=c:l<a&&(l=a),l}afterAnimatedIn(){const{isBlock:t}=this.props;t&&this.setState({showMarkers:!0})}}const sse=ft(nse);var ose=C(49860);const rse=e=>{e.open=!0};class ise extends ose.Component{static get defaultProps(){return{onItemSelected:Function.prototype,onStep:Function.prototype,getL10nValue:()=>{}}}constructor(t){super(t),this.state={forceBubbleNonModal:!1,imageLoaded:!1,searchMatchedItemIds:[],suppressBubbleFocus:!1},this.closeOpenedBubble=this.closeOpenedBubble.bind(this),this.handleMarkerClick=this.handleMarkerClick.bind(this),this.handleNavEvent=this.handleNavEvent.bind(this),this.handleRevealItem=this.handleRevealItem.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(Ye,this.handleNavEvent),window.addEventListener(Ko,this.handleRevealItem)}handleNavEvent(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,s=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;n===this.props.blockId&&this.state.selectedItemId!==s&&this.onItemSelected(s)}handleRevealItem(t){const{items:n}=this.props,{blockId:s,itemId:r,matchingItemIds:i=[r]}=t.detail;if(!yn(s,this.props.blockId))return;const a=n.find(d=>yn(d.id,r));if(!a)return;const c=n.filter(d=>i.some(h=>yn(d.id,h))).map(d=>d.id);c.some(d=>yn(d,a.id))||c.push(a.id);const{selectedItemId:l}=this.state;l!=null&&!yn(l,a.id)&&this.getBubble(l)?.close(),this.setState({forceBubbleNonModal:!0,searchMatchedItemIds:c,selectedItemId:a.id,suppressBubbleFocus:!0},()=>{const d=this.getBubble(a.id);d!=null&&!d.open&&rse(d),this.setState({suppressBubbleFocus:!1})})}getBubble(t){return document.getElementById(`bubble-${this.props.blockId}-${t}`)}componentDidUpdate(t){const{isMobile:n}=this.props,{forceBubbleNonModal:s,selectedItemId:r}=this.state;t.isMobile===n||r==null||s||(this.getBubble(r)?.close(),this.openBubble(r))}componentWillUnmount(){this.props.readOnly||document.removeEventListener("labeledGraphicMarkerClick",this.handleMarkerClick),window.removeEventListener(Ye,this.handleNavEvent),window.removeEventListener(Ko,this.handleRevealItem)}render(){const{forceBubbleNonModal:t,imageLoaded:n,searchMatchedItemIds:s,suppressBubbleFocus:r}=this.state,{initiallyVisible:i,isLessonBlocksList:a,isPreview:c,items:l,labels:d,parentId:h,settings:m={}}=this.props,{mediaWidth:f="2"}=m,p=c?l[0].id:this.state.selectedItemId,v=X()("view-labeled-graphic",{"view-labeled-graphic--small":f==="0","view-labeled-graphic--medium":f==="1","view-labeled-graphic--full":f==="2"});return(0,o.jsx)("div",{"aria-label":d?.a11yLabeledGraphicBlock,className:v,role:"group",children:(0,o.jsx)(sse,{...this.props,canvasClassNames:this.getCanvasClassNames(),editable:!1,forceBubbleNonModal:t,imageLoaded:n,initiallyVisible:i,isLessonBlocksList:a,labels:d,markerDelay:1e3,onClose:this.closeOpenedBubble,onItemSelected:this.onItemSelected,onNextClick:this.onNextClick,onPreviousClick:this.onPreviousClick,parentId:h,searchMatchedItemIds:s,selected:p,suppressBubbleFocus:r})})}setImageLoaded(){this.setState({imageLoaded:!0})}loadImage(){const t=this.props.getL10nValue(this.props.media)?.image,{key:n,src:s}=t??{};if(!n&&!s)return;const r=setTimeout(this.setImageLoaded,1e3),i=new Image,a=n?Tt(t):s;i.src=a,i.onload=()=>{clearTimeout(r),this.setImageLoaded()}}getCanvasClassNames(){return X()("labeled-graphic-canvas",{"labeled-graphic-canvas--visible":this.state.imageLoaded})}onNextClick(t){const{blockId:n,items:s}=this.props,r=et()("id",s[Jl()(t)]||s[0]);document.querySelector(`dialog#bubble-${n}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}onPreviousClick(t){const{blockId:n,items:s}=this.props,r=et()("id",s[Kp()(t)]||s[Kp()(us()(s))]);document.querySelector(`dialog#bubble-${n}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}clearSearchReveal(t){const{selectedItemId:n}=this.state;n!=null&&this.getBubble(n)?.close(),this.setState({forceBubbleNonModal:!1,searchMatchedItemIds:[],selectedItemId:void 0},t)}onItemSelected(t){const{editBlock:n,items:s,onItemSelected:r,onStep:i}=this.props,{forceBubbleNonModal:a,selectedItemId:c}=this.state;if(!(n&&window.matchMedia("(max-width: 768px)").matches)){if(a){const l=yn(c,t);this.clearSearchReveal(()=>{l?r(t):this.onItemSelected(t)});return}c===t?this.closeOpenedBubble():(this.openBubble(t),$e()(i,Mr()(l=>l.id===t))(s)),r(t)}}handleMarkerClick(t){const{itemId:n,parentId:s}=t.detail,{selectedItemId:r}=this.state;(s!==this.props.parentId||r!==n)&&this.closeOpenedBubble()}openBubble(t,{forceNonModal:n=!1}={}){const{blockId:s}=this.props;this.setState({forceBubbleNonModal:n,selectedItemId:t});const r=document.getElementById(`bubble-${s}-${t}`);!r||r.open||(!n&&this.props.isMobile&&typeof r.showModal=="function"?r.showModal():r.show())}closeOpenedBubble(t=this.state.selectedItemId){t!=null&&(this.getBubble(t)?.close(),this.setState(n=>{const s=yn(n.selectedItemId,t);return{forceBubbleNonModal:s?!1:n.forceBubbleNonModal,searchMatchedItemIds:s?[]:n.searchMatchedItemIds,selectedItemId:s?void 0:n.selectedItemId}}))}}function ase(e){const t=rt(),n=Zt(768);return(0,o.jsx)(ise,{...e,getL10nValue:t,isMobile:n})}const cse=e=>{const{blockId:t,progress:n,isLessonBlocksList:s=!1}=e,r=Do()(["items",t],n);return(0,o.jsx)(Me,{className:"block-labeled-graphic",children:(0,o.jsx)(ase,{...e,editable:!1,isBlock:!0,isLessonBlocksList:s,parentId:t,progress:r})})};var ZS=C(49860);const Pn=V("block-list"),lse=class extends ZS.Component{static get defaultProps(){return{editable:!1,items:[],onStep:Function.prototype,type:"numbered",getL10nValue:()=>{}}}nextNumber(e){const{items:t}=this.props,s=t.length>0?t[e].number:null;let r;return!isNaN(s)&&s!==""&&(r=parseInt(s,10)+1),(r<1||r>99)&&(r=null),r}render(){const{animateBlockEntrance:e,blockId:t,defaultBackgroundColor:n,editable:s,getL10nValue:r,initiallyVisible:i,isLearner:a,items:c,labels:l,lessonId:d,media:h,onStep:m,settings:f,type:p}=this.props,{audioPosition:v,bulletPadding:g,entranceAnimation:x,listItemColor:y,listItemColorContrast:S,listWidth:I}=f,b=r(Array.isArray(h)?{}:h),T=Ts(b,v),L=wne(g),E=i0(I),k=Pn({[p]:!0,[`${p}-custom-width-${E}`]:!0,[`${p}-bullet-padding-${L}`]:!0,"no-animation":!x,presentation:this.props.isPresentation}),N=p==="numbered"?"ol":"ul";return(0,o.jsx)(Me,{className:k.toString(),defaultBackgroundColor:n,children:(0,o.jsx)("div",{className:Pn("container"),children:(0,o.jsx)("div",{className:Pn("row"),children:(0,o.jsx)($c,{className:Pn("col"),children:(0,o.jsx)("div",{className:"blocks-list__container",children:T.renderOrder.map((P,A)=>{if(P==="text")return(0,o.jsx)("div",{children:(0,o.jsx)(N,{className:Pn("list"),role:"list",children:(0,o.jsx)(ze,{animateBlockEntrance:e,animateIn:"fadeInRight",className:Pn("animated-item").toString(),initiallyVisible:i,isLearner:a,siblingDelay:.25,children:c.map((R,j)=>{const M={key:R.id,index:j,lessonId:d,blockId:t,type:p,editable:s,nextNumber:this.nextNumber.bind(this),onStep:m,listItemColor:y,listItemColorContrast:S,...R};return this.props.renderItem?this.props.renderItem(M):(0,u.createElement)(dse,{...M,key:M.key})})})})},`text-${A}`);if(P==="audio")return(0,o.jsx)("div",{className:X()("block-list__media",{"audio-on-top":T.renderOrder[0]==="audio","audio-on-bottom":T.renderOrder[0]!=="audio"}),children:(0,o.jsx)(rn,{blockId:t,hasPadding:!1,index:t,item:{media:h,id:t},labels:l,lessonId:d,media:h,refs:`items:${t}`})},`${P}-${A}`)})})})})})})}};class dse extends ZS.Component{renderTextDelegate;animateRef=null;static get defaultProps(){return{className:""}}constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this)}renderText(t){return(0,o.jsx)(qe,{...t})}handleChangeCheckbox=()=>{this.props.onStep(this.props)};render(){const{type:t,id:n,index:s,number:r,paragraph:i,editable:a,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:a,id:n,value:i};return(0,o.jsxs)("li",{className:X()("block-list__item",`block-list__item--${t}`,c),ref:p=>{this.animateRef=p},role:"listitem",style:d,children:[t==="numbered"&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:Pn("number"),style:h?{backgroundColor:h,color:Wt({contrast:m||Ee.AUTO,backgroundColor:h})}:void 0,children:r||s+1}),l(f)]}),t==="bulleted"&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"visually-hidden-always",children:"\u2022"}),(0,o.jsx)(ae,{className:Pn("bullet"),name:"circle-solid",style:h?{color:h}:void 0}),l(f)]}),t==="icon"&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:Pn("icon"),style:h?{"--color-background":h}:void 0,children:(0,o.jsx)("span",{"aria-hidden":"true",className:Pn("icon-glyph",{placeholder:!0}),children:"\u2B50\uFE0F"})}),l(f)]}),t==="checkboxes"&&(0,o.jsxs)("label",{className:Pn("option"),children:[(0,o.jsx)("input",{className:Pn("checkbox-input"),onChange:this.handleChangeCheckbox,type:"checkbox"}),(0,o.jsx)("div",{className:Pn("checkbox"),style:h?{borderColor:h,"--color-background":h}:void 0,children:(0,o.jsx)(ae,{className:Pn("checkbox__icon"),name:"check",style:h?{color:Wt({contrast:m||Ee.AUTO,backgroundColor:h})}:void 0})}),l(f)]})]})}}const d0=e=>{const t=rt(),n=Fn();return(0,o.jsx)(lse,{...e,getL10nValue:t,isPresentation:n})},use=d0,hse=e=>(0,o.jsx)(d0,{type:"checkboxes",...e}),mse=e=>(0,o.jsx)(d0,{type:"bulleted",...e}),fse=e=>(0,o.jsx)(d0,{type:"icon",...e}),pse=[{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"}],gse=(0,u.lazy)(()=>C.e("webpack_container_remote_mondrian_learn-react").then(C.t.bind(C,4246,23))),vse={subscribe(e,t){const n=`mondrian:${e}`,s=()=>{ye.isPlaying&&ye.playerId!==n&&t()};return ye.addChangeListener(s),()=>{ye.removeChangeListener(s)}},play(e){const t=`mondrian:${e}`;ye.playerId=t,ye.isPlaying=!0}};function Cse(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 xse({blockumentId:e,manifest:t}){let n=920,s=600;try{const r=t.blockuments?.[e];if(r){const i=t.items?.[r.children[0]?.id];if(i){const a=i.states[i.initialState];if(a){const c=a.width.value,l=a.height.value;typeof c=="number"&&typeof l=="number"&&(n=c,s=l)}}}}catch{}return(0,o.jsx)("svg",{"aria-hidden":"true",className:"block-mondrian__fallback",height:s,width:n})}function bse({animateBlockEntrance:e=!0,initiallyVisible:t,blockumentId:n,isLearner:s=!1,settings:r,onStep:i,onTranscriptClose:a,onTranscriptOpen:c,onTranscriptUpdate:l,labels:d,transcriptPanelState:h}){const m=He(),f=m.mondrian,p=Ql(),v={externalLinksDisabled:"externalLinksDisabled"in m?m.externalLinksDisabled:!1,isExternalLink:Zn},{currentLocale:g}=ot(),x=Dn(),y=DV(),S=(0,u.useMemo)(()=>({active:g,source:x}),[g,x]),I=(0,u.useCallback)(N=>h?.audioPlayerIdOpen===Is({refs:`items:${n}/items:${N}`}),[n,h?.audioPlayerIdOpen]),b=(0,u.useCallback)(({refocusTarget:N,itemId:P,transcript:A})=>{I(P)?a?.():c?.({audioPlayerId:Is({refs:`items:${n}/items:${P}`}),focusing:!0,refocusTarget:N,transcriptMedia:{mondrianTranscript:A}})},[n,I,a,c]),T=(0,u.useCallback)(({itemId:N,transcript:P})=>{h?.audioPlayerIdOpen&&l?.({audioPlayerId:Is({refs:`items:${n}/items:${N}`}),transcriptMedia:{mondrianTranscript:P}})},[n,l,h]),L=(0,u.useCallback)(N=>{l?.({audioPlayerId:Is({refs:`items:${n}/items:${N}`}),focusing:!0})},[n,l]),E=(0,u.useMemo)(()=>({isPanelOpenForItem:I,focusPanel:L,togglePanel:b,updateTranscript:T}),[L,I,b,T]),k=(0,u.useCallback)(N=>{if(i)for(const P of Object.values(N))P.progress>=100&&i({id:P.itemId})},[i]);return(0,o.jsx)(Me,{children:(0,o.jsx)(h5,{FallbackComponent:Ise,children:(0,o.jsx)(ze,{animateBlockEntrance:e,initiallyVisible:t,isLearner:s,children:(0,o.jsx)("div",{style:Cse(r),children:(0,o.jsx)(u.Suspense,{fallback:(0,o.jsx)(xse,{blockumentId:n,manifest:f}),children:(0,o.jsx)(gse,{blockumentId:n,hoveredItemPath:y.translationHoveredPath,labels:d,languages:pse,linkRenderConfig:v,locale:S,manifest:f,mediaStoreAdapter:vse,onMediaProgress:k,runtimeInterface:window.Runtime,searchTerm:p?.term,transcriptPanelAdapter:E})})})})})})}const yse=(0,u.memo)(bse,Sse);function Sse(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 Ise(){return null}const YS=["B","KB","MB","GB","TB","PB","EB"];function Tse(e){if(!Number.isFinite(e))return String(e);let t=Math.abs(e),n=0;for(;t>=1024&&n<YS.length-1;)t/=1024,n+=1;const s=Math.round(t*10)/10,r=Number.isInteger(s)?String(s):s.toFixed(1);return`${e<0?"-":""}${r} ${YS[n]}`}const u0=V("block-video");function Lse({item:e}){const t=rt(),{media:n}=e,s=t(n)??{},{customVideo:r={},tmp:i={},video:a={}}=s,c="poster"in a?a:{...a,...r},l=i.video&&"poster"in i.video?i.video:void 0,{poster:d}=Ia()?c:l||c,h=d?yt(d):void 0;return(0,o.jsxs)("div",{className:u0("poster-container"),children:[(0,o.jsx)(An,{alt:"Video Poster",className:u0("poster"),src:h}),(0,o.jsx)("div",{className:u0("play-overlay"),children:(0,o.jsxs)("svg",{className:u0("play-icon"),fill:"currentColor",height:"80",viewBox:"0 0 24 24",width:"80",children:[(0,o.jsx)("circle",{cx:"12",cy:"12",fill:"rgba(0,0,0,0.6)",r:"12"}),(0,o.jsx)("polygon",{fill:"white",points:"10,8 10,16 16,12"})]})})]})}const qS=V("block-video");function Ese({mediaWidth:e}){const t=qS("item",{small:e==="0",medium:e==="1",full:e==="2"});return(0,o.jsx)("div",{className:t,children:(0,o.jsx)("div",{className:qS("placeholder")})})}const kse=js()("partner-content-block-card__"),XS=e=>{const{backgroundColor:t,blockId:n,partnerContent:s}=e,r=He(),{id:i,tenantId:a}=r??{},{data:c,type:l}=s,{authors:d,bookImage:h,bookTitle:m,buyLink:f,internalId:p,nbicLink:v}=c,g={blockId:n,courseId:i,partnerContentId:p,tenantId:a,contentSubtype:l};return(0,o.jsxs)("section",{children:[(0,o.jsx)("h2",{className:"visually-hidden",children:"More Info"}),(0,o.jsxs)("ol",{className:"partner-content-block-card",role:"list",children:[(0,o.jsx)("li",{role:"listitem",children:(0,o.jsx)(g3,{authors:d,backgroundColor:t,block:!0,bookImage:h,bookTitle:m,buyLink:f,trackingInfo:g})}),(0,o.jsx)("li",{role:"listitem",children:(0,o.jsx)("div",{className:kse("divider")})}),(0,o.jsx)("li",{role:"listitem",children:(0,o.jsx)(v3,{backgroundColor:t,block:!0,link:v,trackingInfo:g})})]})]})};var kg=C(49860);const h0=V("block-video"),Nse={"--ov-width":"100%","--ov-max-height":"none"},jse={"--ov-height":"100%","--ov-max-height":"none"};function wse({audioVideoPlayhead:e,backgroundColor:t,blockId:n,blockPartnerContent:s,blockPartnerContentExists:r,captions:i,cornerRadius:a,currentLocale:c,dataL10nId:l,disableDownload:d,enableVideoPlaybackSpeed:h,forwardSeekRestricted:m,id:f,isLoaded:p,item:v,lessonId:g,loadMedia:x,media:y,mediaWidth:S,onLoad:I,onProgressChanged:b,poster:T,recordMediaPlayheadPosition:L,renderCaption:E,renderPostVideoSlot:k,subtitle:N,type:P,videoKey:A,videoSrc:R}){const j=S==="2",[M,w]=kg.useState(null),O=h0("item",{small:S==="0",medium:S==="1",full:j}),B=kg.useCallback(({player:F})=>{const $=F.containerElement?.querySelector("video");if($){const z=$.videoWidth/$.videoHeight>=1.7777777777777777;w(z?"landscape":"portrait")}I?.({player:F})},[I]),D=M==="landscape"?Nse:M==="portrait"?jse:void 0,_=kg.useCallback(F=>{const $=h0("caption",{visible:p}).toString();return(0,o.jsx)(qe,{className:$,value:F.caption})},[p]);return(0,o.jsxs)("div",{className:O,children:[(0,o.jsxs)("figure",{"data-l10n-id":l,children:[(0,o.jsx)("div",{className:h0("aspect-container"),"data-search-content-ignore":"",children:x&&(0,o.jsx)(dg,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:h,canRestrictSeek:m,captions:i,cornerRadius:a,disableDownload:d,id:`${g}-${n}-${f}-${c}`,media:y,onLoad:B,poster:T,progressChanged:b,recordMediaPlayheadPosition:L,src:R,style:D,subtitle:N,type:A?"video":P},`${g}-${n}-${f}-${c}-${T||""}`)}),p&&(0,o.jsxs)(o.Fragment,{children:[k?.(),(0,o.jsx)("figcaption",{className:h0("wrapper"),children:(E??_)(v)})]})]}),r&&(0,o.jsx)(XS,{backgroundColor:t,blockId:n,partnerContent:s})]})}const Ng=e=>e.toString().padStart(2,"0");function jg(e){const t=Math.floor(e),n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return n>0?`${n}:${Ng(s)}:${Ng(r)}`:`${s}:${Ng(r)}`}function o2e(e=[]){return e.map(({time:t,title:n})=>`${jg(t)} ${n}`).join(`
`)}const Rse=e=>{const[t,n,s]=e.split(":").reverse();return parseInt(t,10)+parseInt(n,10)*60+parseInt(s||"0",10)*3600},JS=e=>Number.isFinite(e)?Math.max(0,Math.floor(e)):0,r2e=(e,t)=>{const n=JS(t);return e.some(s=>JS(s.time)===n)},Ase=/^(\d*:)?\d{1,2}:\d{2}$/,i2e=(e,t)=>{const n=e.split(`
`).filter(r=>r.trim()!==""),s=[];for(const r of n){const[i,...a]=r.split(" ");if(!Ase.test(i))throw new Error("Chapters must use the format M:SS or H:MM:SS. Chapters will not display.");s.push({time:Rse(i),title:a.join(" ")})}for(let r=1;r<s.length;r++)if(s[r].time<=s[r-1].time)throw new Error("Chapters are out of order. Chapters will not display.");if(t!=null){for(const r of s)if(r.time>=t)throw new Error("Timestamps must be within the video duration. Chapters will not display.");for(let r=0;r<s.length;r++)if((r<s.length-1?s[r+1].time:t)-s[r].time<10)throw new Error("Chapters must be at least 10 seconds long. Chapters will not display.")}return s},uo=V("vt-chapter-strip");function Pse(e,t){for(let n=e.length-1;n>=0;n--)if(t>=e[n].time)return n;return-1}function Mse({chapters:e,currentTime:t,onSeek:n}){const s=Gt(),r=(0,u.useRef)(null),i=Pse(e,t);return(0,u.useEffect)(()=>{r.current?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[i]),e.length===0?null:(0,o.jsxs)("div",{className:uo(),children:[(0,o.jsx)("h2",{className:uo("heading"),children:s?.videoChapters||"Chapters"}),(0,o.jsx)("ul",{className:uo("list"),role:"list",children:e.map((a,c)=>{const l=c===i;return(0,o.jsx)("li",{className:uo("item"),children:(0,o.jsxs)("button",{"aria-current":l?"true":void 0,className:uo("button",{active:l}),onClick:()=>n?.(a.time),ref:l?r:void 0,type:"button",children:[(0,o.jsx)("span",{className:uo("thumbwrap"),children:(a.thumbnailStatus==null||a.thumbnailStatus==="done")&&a.thumbnail&&(0,o.jsx)("img",{alt:"",className:uo("thumb"),src:a.thumbnail})}),(0,o.jsx)("span",{className:uo("time"),children:jg(a.time)}),(0,o.jsx)("span",{className:uo("title"),children:a.title})]})},`${a.time}-${c}`)})})]})}const Ose={allowedTags:["b","i","u","c","ruby","rt","v","lang"],allowedAttributes:{c:["class"],v:["title"],lang:["lang"],ruby:[],rt:[]},disallowedTagsMode:"escape",allowedSchemes:[]};function Bse(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 Dse(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 Mn(e,t={}){if(!e)return"";let n;if(t.allowVTTTags!==!1){const s=Bse(e),r=q0()(s,Ose);n=Dse(r)}else n=q0()(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 Fse(e){return e.map(t=>({...t,stableId:t.stableId||Uc()}))}function Jo(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 eI(e){let t=e.match(/^(\d{2}):(\d{2}):(\d{2})\.(\d{3})$/);if(t){const[,n,s,r,i]=t;return parseInt(n)*36e5+parseInt(s)*6e4+parseInt(r)*1e3+parseInt(i)}if(t=e.match(/^(\d{2}):(\d{2})\.(\d{3})$/),t){const[,n,s,r]=t;return parseInt(n)*6e4+parseInt(s)*1e3+parseInt(r)}throw new Error(`Invalid timestamp format: ${e}`)}function _se(e,t=!1){const n=Math.round(e),s=Math.floor(n/36e5),r=Math.floor(n%36e5/6e4),i=Math.floor(n%6e4/1e3),a=n%1e3;if(t){const c=i.toString().padStart(2,"0");if(s>0){const l=r.toString().padStart(2,"0");return`${s}:${l}:${c}`}else return`${r}:${c}`}return`${s.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}.${a.toString().padStart(3,"0")}`}function tI(e){const t={};if(!e)return t;const n=e.match(/\S+/g)||[];for(const s of n){const r=s.indexOf(":");if(r>0){const i=Mn(s.substring(0,r),{allowVTTTags:!1}),a=Mn(s.substring(r+1),{allowVTTTags:!1});t[i]=a}}return t}function Hse(e){const t=e.match(/^<v\s+/);if(t){let i=0,a=-1;for(let c=t[0].length;c<e.length;c++)if(e[c]==="<")i++;else if(e[c]===">")if(i===0){a=c;break}else i--;if(a!==-1){const c=e.substring(t[0].length,a).trim(),l=e.substring(a+1).trim();return{speaker:Mn(c,{allowVTTTags:!1}),text:l}}}const n=e.match(/^<v>\s*(.*)$/s);if(n)return{text:n[1]};const s=e.match(/^\[([^\]]+)\]:\s*(.*)$/s);if(s)return{speaker:Mn(s[1].trim(),{allowVTTTags:!1}),text:s[2]};const r=e.match(/^([^:\n]+):\s*(.*)$/s);if(r&&r[1].length<50){const i=r[1].trim();if(!(/^\d+(\s+\w+)*\s+at\s+\d+$/.test(i)||/^\d{1,2}$/.test(i)||/\d+:\d+/.test(i)||/\bat\s+\d/.test(i)||/\bfrom\s+\d/.test(i)||/\bto\s+\d/.test(i)||/\d+\s*(AM|PM|am|pm)/.test(i)))return{speaker:Mn(i,{allowVTTTags:!1}),text:r[2]}}return{text:e}}function wg(e){return Mn(e,{preserveWhitespace:!1,allowVTTTags:!0})}function Vse(e){const t=Mn(e.substring(6).trim(),{allowVTTTags:!1}),n=tI(t);return{id:n.id,width:n.width,lines:n.lines,regionanchor:n.regionanchor,viewportanchor:n.viewportanchor,scroll:n.scroll,...n}}function zse(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*$se(e){const t=e.cues,n=e.totalDuration;for(let s=0;s<t.length;s++){const r=t[s],i=s>0?t[s-1]:void 0,a=s<t.length-1?t[s+1]:void 0,c=i?Math.max(0,r.startTimeMs-i.endTimeMs):r.startTimeMs,l=a?Math.max(0,a.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:s,isFirst:s===0,isLast:s===t.length-1,previousCue:i,nextCue:a,gapBefore:c,gapAfter:l,relativeStartPercent:d,relativeEndPercent:h,relativeWidthPercent:m}}}function a2e(e){return Array.from($se(e))}function Use(e,t,n,s,r,i,a,c){const l=[],d=/<v\s+([^>]+)>([^<]*)<\/v>/g;let h,m=0;for(;(h=d.exec(e))!==null;){const[g,x,y]=h,S={stableId:Uc(),startTime:t,endTime:n,startTimeMs:s,endTimeMs:r,duration:i,text:wg(y.trim()),settings:a,index:0,speaker:Mn(x.trim(),{allowVTTTags:!1})};c&&(S.id=c),a.position&&(S.position=a.position),a.align&&(S.align=a.align),a.line&&(S.line=a.line),a.size&&(S.size=a.size),a.vertical&&(S.vertical=a.vertical),a.region&&(S.region=a.region),l.push(S),m=h.index+g.length}const f=/<v\s+([^>]+)>([^<]*)$/,v=e.substring(m).match(f);if(v){const[,g,x]=v,y={stableId:Uc(),startTime:t,endTime:n,startTimeMs:s,endTimeMs:r,duration:i,text:wg(x.trim()),settings:a,index:0,speaker:Mn(g.trim(),{allowVTTTags:!1})};c&&(y.id=c),a.position&&(y.position=a.position),a.align&&(y.align=a.align),a.line&&(y.line=a.line),a.size&&(y.size=a.size),a.vertical&&(y.vertical=a.vertical),a.region&&(y.region=a.region),l.push(y)}return l}function Gse(e,t){let n=t,s;!Jo(e[n])&&Jo(e[n+1])&&(s=Mn(e[n],{allowVTTTags:!1}),n++);const r=e[n];if(!Jo(r))return{cues:[],nextIndex:n+1};const i=r.match(/^((?:\d{2}:)?\d{2}:\d{2}\.\d{3})\s*-->\s*((?:\d{2}:)?\d{2}:\d{2}\.\d{3})(.*)$/);if(!i)return{cues:[],nextIndex:n+1};const[,a,c,l]=i,d=tI(l.trim());n++;const h=[];for(;n<e.length&&e[n]!==""&&!Jo(e[n]);)h.push(e[n]),n++;const m=eI(a),f=eI(c),p=f-m,v=[];if(h.length===0){const g={stableId:Uc(),startTime:a,endTime:c,startTimeMs:m,endTimeMs:f,duration:p,text:"",settings:d,index:0};s&&(g.id=s),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),v.push(g)}else for(const g of h)if(g.includes("<v ")&&(g.includes("</v>")||g.match(/<v\s+[^>]+>[^<]*$/))){const x=Use(g,a,c,m,f,p,d,s);v.push(...x)}else{const x=h.join(`
`),{text:y,speaker:S}=Hse(x),I={stableId:Uc(),startTime:a,endTime:c,startTimeMs:m,endTimeMs:f,duration:p,text:wg(y),settings:d,index:0};s&&(I.id=s),S&&(I.speaker=S),d.position&&(I.position=d.position),d.align&&(I.align=d.align),d.line&&(I.line=d.line),d.size&&(I.size=d.size),d.vertical&&(I.vertical=d.vertical),d.region&&(I.region=d.region),v.push(I);break}return{cues:v,nextIndex:n}}function Wse(e){const t=e.split(`
`).map(i=>i.trim()),n=t.find(i=>i.length>0);if(!n||!n.startsWith("WEBVTT"))throw new Error('Invalid WebVTT file: Must start with "WEBVTT"');const s={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(s.header=Mn(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 i=t[r];if(i===""){r++;continue}if(i.startsWith("NOTE")){const a=[Mn(i.substring(4).trim(),{preserveWhitespace:!0,allowVTTTags:!1})];for(r++;r<t.length&&t[r]!==""&&!Jo(t[r]);)a.push(Mn(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;s.notes?.push(a.join(`
`));continue}if(i.startsWith("STYLE")){const a=[];for(r++;r<t.length&&t[r]!==""&&!Jo(t[r]);)a.push(Mn(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;s.styles?.push(a.join(`
`));continue}if(i.startsWith("REGION")){const a=Vse(i);s.regions?.push(a),r++;continue}if(Jo(i)||Jo(t[r+1])){const a=Gse(t,r);a.cues&&a.cues.length>0&&s.cues.push(...a.cues),r=a.nextIndex;continue}r++}return s.cues=Fse(s.cues),s.cues.sort((i,a)=>i.startTimeMs-a.startTimeMs),s.cues.forEach((i,a)=>{i.index=a}),s.totalDuration=s.cues.length>0?Math.max(...s.cues.map(i=>i.endTimeMs)):0,s.metadata=zse(s.cues),s}function c2e(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 s=[];for(const r in n)n[r]!==void 0&&n[r]!==null&&r!=="settings"&&s.push(`${r}:${n[r]}`);s.length>0&&(t+=" "+s.join(" ")),t+=`

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

`}return t.replace(/\s+$/,"")+`
`}const Gc=V("video-transcript-panel"),Kse=(0,u.memo)(function({cue:t,isCurrent:n,isDisabled:s,onSeek:r,sourceIndexes:i}){const a=(0,u.useCallback)(()=>{r?.(t.startTimeMs/1e3)},[t,r]);return(0,o.jsxs)("button",{"aria-current":n?"true":void 0,"aria-disabled":s,className:Gc("line",{current:n,disabled:s}),"data-cue-end-ms":t.endTimeMs,"data-cue-indexes":i.join(" "),"data-cue-start-ms":t.startTimeMs,onClick:s?void 0:a,tabIndex:s?-1:0,type:"button",children:[(0,o.jsx)("span",{className:Gc("timestamp"),children:_se(t.startTimeMs,!0)}),(0,o.jsx)("span",{className:Gc("text"),children:t.text})]})}),Qse=({captions:e,currentTime:t=0,forwardSeekRestricted:n=!1,l10nId:s,maxTimeReached:r=0,onSeek:i})=>{const[a,c]=(0,u.useState)([]);(0,u.useEffect)(()=>{if(!e||e.length===0)return;const d=new AbortController;return(async()=>{try{const m=e[0];if(!m)return;const f=m.url||(m.key?yt(m.key):null);if(!f)return;const p=await fetch(f,{signal:d.signal});if(!p.ok)return;const v=await p.text(),x=Wse(v).cues.reduce((y,S,I)=>{const b=y[y.length-1];return b!=null&&Math.floor(b.cue.startTimeMs/1e3)===Math.floor(S.startTimeMs/1e3)?(y[y.length-1]={cue:{...b.cue,text:`${b.cue.text} ${S.text}`,endTime:S.endTime,endTimeMs:S.endTimeMs,duration:S.endTimeMs-b.cue.startTimeMs},sourceIndexes:[...b.sourceIndexes,I]},y):(y.push({cue:S,sourceIndexes:[I]}),y)},[]);c(x)}catch(m){console.error("Error loading transcript:",m)}})(),()=>{d.abort()}},[e]);const l=(0,u.useMemo)(()=>{const d=t*1e3;return a.findIndex(({cue:h})=>d>=h.startTimeMs&&d<h.endTimeMs)},[a,t]);return a.length===0?null:(0,o.jsx)("div",{className:Gc(),"data-transcript-l10n-id":s,children:(0,o.jsx)("div",{className:Gc("lines"),children:a.map(({cue:d,sourceIndexes:h},m)=>(0,o.jsx)(Kse,{cue:d,isCurrent:m===l,isDisabled:n&&d.startTimeMs/1e3>r,onSeek:i,sourceIndexes:h},d.stableId))})})},Se={mode:"view"},Nt={mode:"step"},Zse={mode:"exit"},Rg={mode:"step",completesFirstItemOnView:!0},Yse={mode:"step-if",when:({items:e})=>Array.isArray(e)&&e.length>0},Ag={mode:"step-if",when:({settings:e})=>typeof e=="object"&&e!==null&&"hasCustomCompletion"in e&&e.hasCustomCompletion===!0},qse={...{"text/paragraph":Se,"text/table":Se,"text/heading paragraph":Se,"text/subheading paragraph":Se,"text/heading":Se,"text/subheading":Se,"text/two column":Se,"text/three column":Se,"text/four column":Se,"text/code":Se,"impact/a":Se,"impact/b":Se,"impact/c":Se,"impact/d":Se,"impact/note":Se,"quote/a":Se,"quote/b":Se,"quote/c":Se,"quote/d":Se,"quote/background":Se,"quote/carousel":Rg,"quote/stacked":Se,"list/numbered":Se,"list/checkboxes":Nt,"list/bulleted":Se,"list/icon":Se,"image/hero":Se,"image/full":Se,"image/text aside":Se,"image/text overlay":Se,"image/banner":Se,"gallery/centered":Rg,"gallery/two column":Se,"gallery/three column":Se,"gallery/four column":Se,"divider/divider":Se,"divider/numbered divider":Se,"divider/spacing divider":Se,"360/storyline":Nt,"interactive/accordion":Nt,"interactive/tabs":Rg,"interactive-fullscreen/labeledgraphic":Nt,"interactive-fullscreen/process":Nt,"interactive-fullscreen/scenario":Nt,"interactive-fullscreen/sorting":Nt,"interactive-fullscreen/timeline":Se,"buttons/button":Se,"buttons/button stack":Se,"flashcard/flashcard":Nt,"flashcard/stack":Nt,"knowledge/knowledge":Nt,"continue/continue":Nt,"multimedia/step":Se,"multimedia/audio":Nt,"multimedia/video":Nt,"multimedia/ai_avatar":Se,"multimedia/custom video":Nt,"multimedia/embed":Se,"multimedia/attachment":Se,"multimedia/code":Se,"knowledgeCheck/multiple choice":Nt,"knowledgeCheck/multiple response":Nt,"knowledgeCheck/fillin":Nt,"knowledgeCheck/matching":Nt,"knowledgeCheck/draw from question bank":Nt,"chart/bar":Se,"chart/line":Se,"chart/pie":Se,"ai-scenario/ai-scenario":Zse,"mondrian/mondrian":Yse,"survey/survey":Nt,"team/people":Se,"sequence/arrows":Se,"sequence/pyramid":Se,"sequence/timeline":Se,"html/inline":Ag,"html/cdn":Ag,"videoCheckpoint/videoCheckpoint":Nt,"textToVideo/textToVideo":Se,"pending/pending":Se,"spacer/spacer":Se},...{"html/vibe":Ag,"gallery/full":Se}};function Pg(e){const t=qse[a5(e.family,e.variant??"")]??Se;return{completesFirstItemOnView:(t.mode==="step"||t.mode==="step-if")&&t.completesFirstItemOnView===!0,trackSteps:t.mode==="step"||t.mode==="step-if"&&t.when(e),trackExit:t.mode==="exit"}}const Xse=e=>{const{trackSteps:t,trackExit:n}=Pg(e);return t||n},nI=e=>!!e&&e.type==="videoCheckpoint"&&e.family==="videoCheckpoint"&&e.variant==="videoCheckpoint",Mg=1e3,Jse=3,eoe=/^\d+(?:\.\d+)?$/,sI=/^\d+$/,toe=/^\d{2}(?:\.\d{1,3})?$/,m0=e=>{if(!Number.isFinite(e))return 0;const t=10**Jse;return Math.max(0,Math.round(e*t)/t)},Og=e=>e.toString().padStart(2,"0"),noe=e=>e!=null&&typeof e=="object"?e.time:void 0,u2e=e=>{const t=Math.round(m0(e)*Mg),n=Math.floor(t/36e5),s=Math.floor(t%36e5/6e4),r=Math.floor(t%6e4/1e3),i=t%Mg,a=i===0?"":`.${i.toString().padStart(3,"0")}`;return n>0?`${n}:${Og(s)}:${Og(r)}${a}`:`${Math.floor(t/6e4)}:${Og(r)}${a}`},soe=e=>{const t=e.split(":");if(t.length!==2&&t.length!==3)return null;const[n,s,r]=t.length===3?[t[0],t[1],t[2]]:[null,t[0],t[1]];if(n!=null&&!sI.test(n)||!sI.test(s)||!toe.test(r))return null;const i=n==null?0:Number.parseInt(n,10),a=Number.parseInt(s,10),[c,l=""]=r.split("."),d=Number.parseInt(c,10);if(t.length===3&&a>=60||d>=60)return null;const h=l.length===0?0:Number.parseInt(l.padEnd(3,"0"),10)/Mg;return m0(i*3600+a*60+d+h)},h2e=e=>{const t=e.trim();return t.length===0?null:eoe.test(t)?m0(Number.parseFloat(t)):soe(t)},Fs=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 s=Reflect.get(n,"placement");return s==="start"||s==="end"?s:"timestamp"},m2e=e=>Fs(e)!=="timestamp",ooe=e=>{const t=e!=null&&"checkpoint"in e?e.checkpoint:e;if(t==null||typeof t!="object")return!1;const n=Reflect.get(t,"settings");return n==null||typeof n!="object"?!1:Reflect.get(n,"required")===!0},f2e=e=>e==="timestamp"?{}:{placement:e},ho=e=>{let t;e!=null&&"checkpoint"in e?t=noe(e.checkpoint):e!=null&&"time"in e&&(t=e.time);const n=typeof t=="number"?t:Number.parseFloat(String(t));return m0(n)},roe=null,ioe=e=>{const t=e?.blocks??[];return ooe(e)?t.filter(Xse):t.filter($a)},aoe=e=>(e?.blocks??[]).filter(t=>Pg(t).trackExit),p2e=e=>e.family==="interactive-fullscreen"||e.family==="360"?!1:!(e.family==="multimedia"&&roe.has(e.variant)),ra=(e,t,n)=>{if(e==null||typeof e!="object")return n;const s=Reflect.get(e,t);return typeof s=="string"&&s.trim().length>0?s:n},coe=(e,t)=>{if(typeof e=="string"){const n=e.trim();if(n.length>0)return n}return t},loe=e=>e==null?!0:typeof e=="string"?e.trim().length===0:!1,g2e=({precedingBlock:e,ownedBlockCount:t,title:n,createdFamily:s})=>!nI(e)||t>0||s==="divider"?!1:loe(n),v2e=e=>{const t=e.filter(s=>Fs(s)==="timestamp").map((s,r)=>({id:s.checkpoint.id,time:ho(s),documentIndex:r})).sort((s,r)=>s.time-r.time||s.documentIndex-r.documentIndex),n=new Map;return t.forEach((s,r)=>{n.set(s.id,r+1)}),n},doe=(e,t)=>t==null?null:e.find(n=>yn(n.checkpoint.id,t)||n.blocks.some(s=>yn(s.id,t)))??null,uoe=e=>[...new Set(e.filter(t=>Fs(t)==="timestamp").map(t=>ho(t)))].sort((t,n)=>t-n),C2e=(e,t)=>{const n=[...e].sort((s,r)=>ho(s)-ho(r)).find(s=>ho(s)>t);return{insertBeforeItemId:n?.checkpoint.id??null,insertAtEnd:n==null}},hoe=e=>{const t=e[0]??null,n=t==null?e:e.slice(1),s=[],r=[];let i=null;n.forEach(c=>{if(nI(c)){i!=null&&r.push(i),i={checkpoint:c,blocks:[]};return}if(i!=null){i.blocks.push(c);return}s.push(c)}),i!=null&&r.push(i);const a=r.length===0?e:[...t==null?[]:[t],...s];return{videoBlock:t,leadingBlocks:s,checkpointGroups:r,inlineBlocks:a}},Wc=V("vt-learner-transcript");function moe({captions:e,currentTime:t,forwardSeekRestricted:n,l10nId:s,maxTimeReached:r,onClose:i,onSeek:a}){const c=Gt(),l=(0,u.useRef)(null),d=(0,u.useRef)(null);return(0,u.useEffect)(()=>{const h=l.current?.querySelector('[aria-current="true"]');h!=null&&h!==d.current&&(d.current=h,h.scrollIntoView({behavior:"smooth",block:"center"}))},[t]),(0,o.jsxs)("aside",{className:Wc(),children:[(0,o.jsxs)("div",{className:Wc("head"),children:[(0,o.jsx)("h3",{className:Wc("title"),children:c?.videoTranscript||"Transcript"}),(0,o.jsx)("button",{"aria-label":ra(c,"videoHideTranscript","Hide transcript"),className:Wc("close"),onClick:i,type:"button",children:(0,o.jsx)(ae,{name:"xmark"})})]}),(0,o.jsx)("div",{className:Wc("scroll"),ref:l,children:(0,o.jsx)(Qse,{captions:e,currentTime:t,forwardSeekRestricted:n,l10nId:s,maxTimeReached:r,onSeek:a})})]})}const oI=(0,u.createContext)(null),foe=oI.Provider;function poe(){return(0,u.useContext)(oI)}const goe=(e,t,n)=>{const s=(0,u.useRef)({l10nId:e,chapters:t,onSeek:n});s.current={l10nId:e,chapters:t,onSeek:n},(0,u.useEffect)(()=>{const r=i=>{const{l10nId:a,chapters:c,onSeek:l}=s.current;if(a==null||a!==i.detail.l10nId)return;const d=c?.[i.detail.chapterIndex];d!=null&&l(d.time)};return window.addEventListener(Ed,r),()=>window.removeEventListener(Ed,r)},[])},voe=(e,t,n)=>{const s=(0,u.useRef)({l10nId:e,onSeek:t,getContainer:n});s.current={l10nId:e,onSeek:t,getContainer:n},(0,u.useEffect)(()=>{const r=i=>{const{l10nId:a,onSeek:c,getContainer:l}=s.current,{l10nId:d,time:h}=i.detail;if(a==null||a!==d||typeof h!="number"||!Number.isFinite(h))return;c(h);const m=l?.();m!=null&&!tu(m,"center")&&m.scrollIntoView({behavior:"smooth",block:"center"})};return window.addEventListener(vf,r),()=>window.removeEventListener(vf,r)},[])},Coe=window!==window.parent,xoe="bcd.context";function f0(e){if(!e)return null;try{return new URL(e).origin}catch{return null}}function boe(e){return typeof e=="object"&&e!==null}function yoe(){try{const e=sessionStorage.getItem(xoe);if(!e)return null;const t=JSON.parse(e);if(boe(t)&&typeof t.packageUrl=="string")return t.packageUrl}catch{}return null}function p0(e){return e&&mf(e)?e:null}function Soe(){try{const t=new URLSearchParams(window.location.search),n=p0(f0(t.get("packageUrl")));if(n)return n;const s=p0(f0(t.get("homeUrl")));if(s)return s}catch{}const e=p0(f0(yoe()));return e||p0(f0(document.referrer))}function rI(e){if(!Coe)return;const t=Soe();t&&window.parent.postMessage(e,t)}const Ioe=250,iI={second:Number.NaN,at:Number.NEGATIVE_INFINITY},Toe=e=>{const t=(0,u.useRef)(iI),n=(0,u.useRef)(e);return n.current!==e&&(n.current=e,t.current=iI),(0,u.useCallback)(s=>{if(e==null||!Number.isFinite(s))return;const r=Math.floor(s),i=Date.now();r===t.current.second||i-t.current.at<Ioe||(t.current={second:r,at:i},rI({type:"video:timeupdate",data:{l10nId:e,time:s}}))},[e])};var Loe,aI,cI,Eoe;function x2e(){let e=null;const t=new Set;return{registerPlayer(n){e=n},onTimeUpdate(){t.forEach(n=>{n()})},getPosition(){return e?.getProgress().currentTime??0},getDuration(){return e?.getProgress().duration??0},subscribe(n){return t.add(n),()=>{t.delete(n)}},seekToTime(n){e?.seekToTime(n)}}}const koe=Object.freeze({registerPlayer(){},onTimeUpdate(){},getPosition:()=>0,getDuration:()=>0,subscribe:()=>()=>{},seekToTime(){}}),lI=(0,u.createContext)(koe),Noe=lI.Provider;function g0(){return(0,u.useContext)(lI)}function b2e(){const e=g0(),t=aI(e);return t.current=e,cI(()=>()=>t.current.getPosition(),[])}function y2e(e){const t=g0();return Eoe(t.subscribe,()=>e(t.getPosition()),()=>e(0))}function S2e(){const e=g0(),t=aI(e);return t.current=e,cI(()=>n=>t.current.seekToTime(n),[])}function I2e({store:e,children:t}){return Loe(Noe,{value:e,children:t})}var joe,woe;const v0=[];function T2e(){let e=v0;const t=new Set;return{setChapters(n){n!==e&&(e=n,t.forEach(s=>{s()}))},getChapters(){return e},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}const Roe=Object.freeze({setChapters(){},getChapters:()=>v0,subscribe:()=>()=>{}}),dI=(0,u.createContext)(Roe),Aoe=dI.Provider;function uI(){return(0,u.useContext)(dI)}function L2e(){const e=uI();return woe(e.subscribe,e.getChapters,()=>v0)}function E2e({store:e,children:t}){return joe(Aoe,{value:e,children:t})}const er=V("block-video"),Poe=V("vt-player-shell"),Moe={"--ov-width":"100%","--ov-max-height":"none"},Ooe={"--ov-height":"100%","--ov-max-height":"none"};function Boe({audioVideoPlayhead:e,backgroundColor:t,blockId:n,blockPartnerContent:s,blockPartnerContentExists:r,captions:i,chapters:a,cornerRadius:c,currentLocale:l,dataL10nId:d,disableDownload:h,enableVideoPlaybackSpeed:m,forwardSeekRestricted:f,id:p,isLearner:v,isLoaded:g,item:x,lessonId:y,loadMedia:S,media:I,mediaWidth:b,onLoad:T,onProgressChanged:L,poster:E,recordMediaPlayheadPosition:k,renderCaption:N,renderPostVideoSlot:P,showChapters:A,subtitle:R,transcriptEnabled:j,type:M,videoKey:w,videoSrc:O,shouldPause:B}){const D=poe(),_=g0(),F=uI(),[$,z]=(0,u.useState)(0),[K,J]=(0,u.useState)(0),[Q,U]=(0,u.useState)(!1),[H,G]=(0,u.useState)(null),Y=(0,u.useRef)(null),Z=Gt(),q=Toe(d),ee=(0,u.useCallback)(Be=>{z(Be.currentTime),J(bt=>Math.max(bt,Be.currentTime)),_.onTimeUpdate(Be.currentTime),q(Be.currentTime),L?.(Be)},[q,L,_]),se=(0,u.useCallback)(Be=>{const bt=er("caption",{visible:g});return(0,o.jsx)(qe,{className:bt,value:Be.caption})},[g]),re=(0,u.useCallback)(({player:Be})=>{const bt=Be.containerElement?.querySelector("video");if(bt){const Je=bt.videoWidth/bt.videoHeight>=1.7777777777777777;G(Je?"landscape":"portrait")}T?.({player:Be})},[T]),le=H==="landscape"?Moe:H==="portrait"?Ooe:void 0,Le=(0,u.useCallback)(Be=>{Y.current?.seekToTime(Be)},[Y]),Te=(0,u.useCallback)(()=>Y.current?.containerElement??null,[Y]);goe(d,a,Le),voe(d,Le,Te);const W=D?.setVideoPlayerRef,de=(0,u.useCallback)(Be=>{Y.current=Be,W?.(Be),_.registerPlayer(Be)},[W,_]),Ie=v&&A&&a!=null&&a.length>0,ge=v&&j&&i!=null&&i.length>0,we=ge&&Q;(0,u.useEffect)(()=>{F.setChapters(a??v0)},[F,a]);const ve=er("item",{small:b==="0",medium:b==="1",full:b==="2","video-training":!0,"no-side-panel":!0}),fe=D?.wrapVideo,ut=S?(0,o.jsx)(dg,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:m,canRestrictSeek:f,captions:i,chapters:a,checkpointTimesSeconds:D?.checkpointMarkerTimes,cornerRadius:c,disableDownload:h,id:`${y}-${n}-${p}-${l}`,media:I,onCheckpointReached:D?.onCheckpointReached,onLoad:re,poster:E,progressChanged:ee,recordMediaPlayheadPosition:k,ref:de,shouldPause:B,src:O,style:le,subtitle:R,type:w?"video":M},`${y}-${n}-${p}-${l}-${E||""}`):null,qt=(0,o.jsxs)("div",{className:ve,children:[(0,o.jsx)("div",{className:er("vt-layout",{"transcript-open":we}),children:(0,o.jsxs)("div",{className:er("vt-main"),children:[(0,o.jsxs)("figure",{"data-l10n-id":d,children:[(0,o.jsx)("div",{className:er("figure-container"),children:fe?fe(ut):ut}),g&&(0,o.jsxs)(o.Fragment,{children:[P?.(),v&&(0,o.jsx)("figcaption",{className:er("wrapper"),children:(N??se)(x)})]})]}),ge&&!Q&&(0,o.jsx)("div",{className:er("vt-transcript-bar"),children:(0,o.jsxs)("button",{className:er("vt-show-transcript"),onClick:()=>U(!0),type:"button",children:[(0,o.jsx)(ae,{name:"closed-captioning"}),Z?.videoViewTranscript||"Show transcript"]})}),Ie&&(0,o.jsx)(Mse,{chapters:a??[],currentTime:$,onSeek:Le})]})}),we&&(0,o.jsx)(moe,{captions:i,currentTime:$,forwardSeekRestricted:f||!1,l10nId:d,maxTimeReached:K,onClose:()=>U(!1),onSeek:Le}),r&&(0,o.jsx)(XS,{backgroundColor:t,blockId:n,partnerContent:s})]});return(0,o.jsx)("div",{className:Poe({"transcript-open":we}),children:qt})}var Bg=C(49860);function Doe({backgroundColor:e,blockId:t,cornerRadius:n,disableDownload:s,enableVideoPlaybackSpeed:r,forwardSeekRestricted:i,headingLevel:a,isGeneratingChapters:c,isLearner:l,item:d,lessonId:h,loadMedia:m,mediaWidth:f,onStep:p,partnerContent:v,audioVideoPlayhead:g,recordMediaPlayheadPosition:x,renderCaption:y,renderPostVideoSlot:S,showChapters:I,transcriptEnabled:b,type:T,isVideoTraining:L,shouldPause:E}){const[k,N]=Bg.useState(!1),{currentLocale:P}=ot(),A=rt(),{id:R,media:j,partnerContentId:M}=d,w=A(j)??{},{customVideo:O={},tmp:B={},video:D={}}=w,_="poster"in D?D:{...D,...O},F=B.video&&"poster"in B.video?B.video:void 0,{captions:$,chapters:z,key:K,poster:J,src:Q,subtitle:U}=Ia()?_:F||_,G=I||L&&!l?z??[]:[],Y=K||Q,q=(Array.isArray(v)?v:v?.content)?.find(Te=>M!=null&&tt(Te)&&"id"in Te&&Te.id===M),ee=q!=null&&tt(q),se=tt(j)&&"l10nId"in j?j.l10nId:void 0,re=Bg.useCallback(()=>{N(!0)},[]),le=Bg.useCallback(({percentComplete:Te})=>{Te>=100&&p?.({id:R})},[R,p]);if(!Y)return(0,o.jsx)(Ese,{mediaWidth:f});const Le={audioVideoPlayhead:g,backgroundColor:e,blockId:t,blockPartnerContent:q,blockPartnerContentExists:ee,captions:$,chapters:G,cornerRadius:n,currentLocale:P,dataL10nId:se,disableDownload:s,enableVideoPlaybackSpeed:r,forwardSeekRestricted:i,id:R,isLoaded:k,item:d,lessonId:h,loadMedia:m,media:j,mediaWidth:f,onLoad:re,onProgressChanged:le,poster:J,recordMediaPlayheadPosition:x,renderCaption:y,renderPostVideoSlot:S,subtitle:U,type:T,videoKey:K,videoSrc:Y,shouldPause:E};return L?(0,o.jsx)(Boe,{...Le,chapters:G,headingLevel:a,isGeneratingChapters:c,isLearner:l,showChapters:I,transcriptEnabled:b},K):(0,o.jsx)(wse,{...Le},K)}const Foe=V("block-video");function Dg({animateBlockEntrance:e,blockId:t,disableDownload:n,enableVideoPlaybackSpeed:s,initiallyVisible:r,isDragPreview:i,isLearner:a,isSidebarPreview:c,items:l,lessonId:d,loadMedia:h,onStep:m,partnerContent:f,progress:p,recordMediaPlayheadPosition:v,renderCaption:g,renderPostVideoSlot:x,settings:y,takingSnapshot:S,type:I,isGeneratingChapters:b,isVideoTraining:T,shouldPause:L}){const E=Fn(),k=l?.[0];if(k==null)return null;const N=Foe({"no-animation":!y?.entranceAnimation,presentation:E}).toString(),P=T?"2":"1",A=S||i||c;return(0,o.jsx)(Me,{className:N,children:(0,o.jsx)(ze,{animateBlockEntrance:e,initiallyVisible:r,isLearner:a,children:A?(0,o.jsx)(Lse,{item:k}):(0,o.jsx)(tee,{children:(0,o.jsx)(Doe,{audioVideoPlayhead:p?.items?.[t]?.items?.[k.id]?.audioVideoPlayhead??0,backgroundColor:y?.backgroundColor,blockId:t,cornerRadius:y?.cornerRadius,disableDownload:n,enableVideoPlaybackSpeed:s,forwardSeekRestricted:y?.forwardSeekRestricted&&!p?.isComplete,headingLevel:y?.headingLevel,isGeneratingChapters:b,isLearner:a,isVideoTraining:T,item:k,lessonId:d,loadMedia:h,mediaWidth:y?.mediaWidth??P,onStep:m,partnerContent:f,recordMediaPlayheadPosition:v,renderCaption:g,renderPostVideoSlot:x,shouldPause:L,showChapters:!!y?.showChapters,transcriptEnabled:!!y?.showTranscript,type:I})})})})}var Fg=C(49860);const C0=V("block-audio"),_g=V("block-embed"),Hn=V("block-attachment");class _oe extends Fg.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,s=C0("caption",{hidden:!n}).toString();return(0,o.jsx)(qe,{className:s,value:t})}onLoad(){this.setState({loaded:!0})}renderItem(t){const{blockId:n,getL10nValue:s,labels:r,lessonId:i,loadMedia:a,progress:c,recordMediaPlayheadPosition:l,renderCaption:d=this.renderCaptionDelegate,settings:h}=this.props,m="forwardSeekRestricted"in h?h.forwardSeekRestricted:!1,f=t.media,p=s(f)??{},{id:v}=t,g=p?.tmp?.audio?.key||p?.audio?.key,x=`${i}-${n}-${v}`,y=Pt()(0,["items",n,"items",v,"audioVideoPlayhead"],c),S=ug({lessonId:i,refs:`items:${n}/items:${v}`});return(0,o.jsxs)("div",{className:C0("item"),children:[a&&(0,o.jsx)(G5,{audioVideoPlayhead:y,canRestrictSeek:!!m&&!c?.isComplete,id:x,item:t,labels:r,mediaSrc:g,onAIUploadFinish:this.props.onAIUploadFinish,onEnd:this.handleOnEnd.bind(this,v),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:${v}`,transcriptMedia:f,uploadId:S},x),d(t)]},v)}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:s,items:r,settings:i}=this.props,{entranceAnimation:a}=i,c=C0({"no-animation":!a,presentation:this.props.isPresentation}).toString(),l=r.length>0?r.slice(0,1):[];return(0,o.jsx)(Me,{className:c,children:(0,o.jsx)(ze,{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,children:(0,o.jsx)("div",{className:C0("wrapper"),children:l.map(d=>this.renderItem(d))})})})}}const Hoe=f6(ft(_oe));function Voe(e){const t=Fn();return(0,o.jsx)(Hoe,{...e,isPresentation:t})}class zoe extends Fg.Component{static get defaultProps(){return{items:[],editable:!1,lessonId:"",blockId:"",settings:{}}}renderItem(t,n){const{id:s,settings:r={}}=t,i=this.props.getL10nValue(t.media)??{},a="embed"in i?i.embed:void 0,{loadMedia:c,labels:l,settings:d}=this.props,{showMetaData:h}=r,{cardMode:m,showBorder:f=!0}=d,p=_g("item",{border:f}).toString();return(0,o.jsx)(nn,{className:p,disabled:!f&&m==Gn.TRANSPARENT,tag:"section",children:c&&(0,o.jsx)(Y5,{data:a,id:`${n}-${s}`,isLesson:!0,labels:l,showMetaData:h})},s)}render(){const{animateBlockEntrance:t,blockId:n,getL10nValue:s,initiallyVisible:r,isLearner:i,items:a,settings:c}=this.props,{entranceAnimation:l,mediaWidth:d="0"}=c,h=s(a?.[0]?.media);if(!h)return null;const m=GJ(h),f=m!=="link",p=_g({"no-animation":!l,presentation:this.props.isPresentation,video:m==="video"}).toString(),v=_g("wrapper",{medium:f&&d==="1",full:f&&d==="2"}),g=a.length>0?a.slice(0,1):[];return(0,o.jsx)(Me,{className:p,children:(0,o.jsx)(ze,{animateBlockEntrance:t,initiallyVisible:r,isLearner:i,children:(0,o.jsx)("div",{className:v,children:g.map(x=>this.renderItem(x,n))})})})}}const $oe=ft(Jm()(zoe));function Uoe(e){const t=Fn();return(0,o.jsx)($oe,{...e,isPresentation:t})}class Goe extends Fg.Component{get attachment(){const t=this.props.items[0].media;return this.props.getL10nValue(t)?.attachment??{}}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:s}=this.props;return(0,o.jsx)(Me,{children:(0,o.jsx)(ze,{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,children:(0,o.jsx)("div",{className:"block-text--onecol",children:(0,o.jsx)("div",{className:"block-text__container",children:(0,o.jsx)("div",{className:"block-text__row",children:(0,o.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:s,size:r}){const{ariaDescribedBy:i,attachmentId:a,blockId:c,externalLinksDisabled:l,onLinkBlur:d,onLinkFocus:h,onLinkMouseEnter:m,onLinkMouseLeave:f}=this.props,p=yt(t),v=l?"":void 0,g=l?void 0:p,x=l?void 0:"noopener noreferrer nofollow",y=l?"button":void 0,S=l?0:void 0,I=l?void 0:"_blank",b=Hn({}).mix("brandHover").toString(),T=Hn("info");return(0,o.jsxs)(nn,{"aria-describedby":i,"aria-labelledby":`attachment-name-${c} attachment-icon-${c}`,className:b,"data-external":v,download:s,href:g,id:l?a:void 0,onBlur:l?()=>d?.(a):void 0,onFocus:l?()=>h?.(a):void 0,onMouseEnter:l?()=>m?.(a):void 0,onMouseLeave:l?()=>f?.(a):void 0,rel:x,role:y,tabIndex:S,tag:"a",target:I,children:[(0,o.jsxs)("div",{className:Hn("main"),children:[(0,o.jsx)("div",{className:Hn("icon"),id:`attachment-icon-${c}`,children:this.fileIcon(n)}),(0,o.jsxs)("div",{className:T,children:[(0,o.jsx)(je,{className:Hn("title").toString(),id:`attachment-name-${c}`,value:s}),(0,o.jsx)("div",{className:Hn("size").toString(),children:Tse(r)})]})]}),(0,o.jsx)("div",{className:Hn("rest"),children:(0,o.jsx)(q$,{className:"brandHover__target--fill"})})]})}renderNoFile(){const t=Hn({none:!0}).toString(),n=Hn("info");return(0,o.jsx)(nn,{className:t,children:(0,o.jsxs)("div",{className:Hn("main"),children:[(0,o.jsx)("div",{className:Hn("icon"),children:(0,o.jsx)(a3,{"aria-label":"File"})}),(0,o.jsxs)("div",{className:n,children:[(0,o.jsx)("div",{className:Hn("title").toString(),children:"File Attachment Block"}),(0,o.jsx)("div",{className:Hn("size").toString(),children:"No file added"})]})]})})}fileIcon(t){const{labels:n}=this.props,s=/excel|spreadsheet/,r=/pdf/,i=/word/,a=/powerpoint|presentation/,c=/rtf|richtext/,l=/zip/;return s.test(t)?(0,o.jsx)(xU,{"aria-label":n?.a11yExcelIcon}):r.test(t)?(0,o.jsx)(gU,{"aria-label":n?.a11yPDFIcon}):i.test(t)?(0,o.jsx)(pU,{"aria-label":n?.a11yWordIcon}):a.test(t)?(0,o.jsx)(vU,{"aria-label":n?.a11yPPTIcon}):c.test(t)?(0,o.jsx)(CU,{"aria-label":n?.a11yRTFIcon}):l.test(t)?(0,o.jsx)(bU,{"aria-label":n?.a11yZipIcon}):(0,o.jsx)(a3,{"aria-label":n?.a11yFileIcon})}}function Woe(e){const t=Jm()(e),n=ft(t),s=JG(n);function r(i){const a=He(),c=i.externalLinksDisabled??(a&&"externalLinksDisabled"in a?a.externalLinksDisabled:!1);return(0,o.jsx)(s,{...i,externalLinksDisabled:c})}return r}const Koe=Woe(Goe),Hg=V("block-process-card"),hI=({icon:e,isOverlayAudio:t=!1,onClick:n,text:s,variant:r})=>{const i=`${r}-btn`;return(0,o.jsxs)("button",{className:Hg(i,{"audio-overlay":t}),onClick:n,type:"button",children:[(0,o.jsx)("span",{className:Hg(`${i}-text`),children:s}),(0,o.jsx)(ae,{classNameIcon:Hg(`${i}-icon`),name:e})]})},Qoe=V("block-process-card"),Zoe=({activeIndex:e,enableVideoPlaybackSpeed:t,id:n,index:s,isIntroStep:r=!1,isOverlayAudio:i=!1,item:a,labels:c,lessonId:l,media:d,onMediaLoad:h,settingZoomOnClick:m})=>{const{image:f}=d??{},p=i?f?.align??"center":"center",v=Qoe("media",{legacy:!1,"audio-overlay":i,[`audio-overlay-${p}`]:i,"intro-step":r}),g=e===s;return(0,o.jsx)("div",{className:v,children:(0,o.jsx)(rn,{activeIndex:e,blockId:n,defaultAlign:"center",enableVideoPlaybackSpeed:t,hasPadding:!1,index:`${n}-${s}`,isOverlayAudio:i,item:a,itemIndex:s,labels:c,lessonId:l,media:d,onLoad:h,opts:{disableZoom:!m},shouldPause:!g})})};var Vg=C(49860);const tr=V("block-process-card"),Yoe=({text:e})=>{const t=Vg.useRef(null),{isInView:n}=qoe({ref:t,threshold:.75});return(0,o.jsxs)("div",{className:tr("swipe-badge",{animate:n}),ref:t,children:[(0,o.jsx)("span",{className:tr("swipe-badge-text"),children:e}),(0,o.jsx)(ae,{className:tr("swipe-badge-icon"),name:"chevron-right-solid"})]})};function qoe({ref:e,rootMargin:t="0px",threshold:n=.1}){const[s,r]=Vg.useState(!1);return Vg.useEffect(()=>{if(!e.current||s)return;const i=new IntersectionObserver(([a])=>{a.isIntersecting&&(r(!0),i.disconnect())},{rootMargin:t,threshold:n});return i.observe(e.current),()=>i.disconnect()},[s,e,t,n]),{isInView:s}}const Xoe=({activeIndex:e,className:t,description:n,enableVideoPlaybackSpeed:s,hasIntro:r,id:i,index:a,item:c,labels:l,lessonId:d,media:h,onClickRestart:m,onClickStart:f,settingAudioPosition:p,settingHeadingLevel:v=2,settingShowStepLabel:g=!0,settingStepLabel:x,settingZoomOnClick:y,showSwipeBadge:S,style:I,title:b,totalSteps:T,type:L})=>{const E=`h${v}`,k=L==="intro",N=L==="summary",P=L==="step",A=r?a:a+1,R=Pe(x)||l.processStepName,j=Pe(Array.isArray(h)?{}:h),M=Ts(j,p,!0,"process"),w=()=>{if(!h)return null;const O={activeIndex:e,blockId:i,enableVideoPlaybackSpeed:s,id:i,index:a,isIntroStep:k,labels:l,lessonId:d,media:h,onMediaLoad:()=>{},settingZoomOnClick:y,item:c},B={audio:{media:M.audioOnlyMedia||j,isOverlayAudio:!1},image:{media:M.imageOnlyMedia||j,isOverlayAudio:!1},video:{media:M.videoOnlyMedia||j},embed:{media:M.embedOnlyMedia||j,isOverlayAudio:!1},overlay:{media:j,isOverlayAudio:!1}};return M.renderOrder.map((D,_)=>{if(D==="text")return(0,o.jsx)(je,{className:tr("description"),value:n},`text-${_}`);const F=B[D];return F?(0,o.jsx)(Zoe,{...O,...F},`${D}-${_}`):null})};return(0,o.jsxs)("div",{className:tr(null,{[L]:!0}).mix(t),style:I,children:[P&&g&&(0,o.jsx)("div",{className:tr("number"),children:`${R} ${A}`}),(0,o.jsx)("div",{className:tr("title"),children:(0,o.jsx)(E,{children:(0,o.jsx)(je,{value:b})})}),w(),!h&&(0,o.jsx)(je,{className:tr("description"),value:n}),k&&T>1&&(0,o.jsx)(hI,{icon:"chevron-right-solid",isOverlayAudio:M.isOverlayAudio,onClick:f,text:l.processStart,variant:"start"}),N&&T>1&&(0,o.jsx)(hI,{icon:"arrow-rotate-left",isOverlayAudio:M.isOverlayAudio,onClick:m,text:l.processStartAgain,variant:"restart"}),S&&P&&(0,o.jsx)(Yoe,{text:l.processSwipe})]})};var _s=C(49860);const Joe=V("block-process-carousel"),mI=e=>e?.type==="intro",zg=e=>e?.type==="summary",$g=e=>e?.type==="step",fI=e=>e?.isHidden,ere=({animateBlockEntrance:e,enableVideoPlaybackSpeed:t,id:n,initiallyVisible:s,isLearner:r,items:i,labels:a,lessonId:c,onStep:l,onTranscriptUpdate:d,previewType:h,processRef:m,settings:{audioPosition:f,headingLevel:p,stepLabel:v,showStepLabel:g,zoomOnClick:x}})=>{const y=Zt(480),S=pd(),I=rt(),b=_s.useRef(null),[T,L]=_s.useState(0),[E,k]=_s.useState(!1),N=_s.useMemo(()=>h===xr.MOBILE_PORTRAIT||h===xr.MOBILE_LANDSCAPE,[h]),P=_s.useMemo(()=>{const F=i.filter(J=>!fI(J)),$=F.find(mI),z=F.find(zg),K=F.filter($g);return[$,...K,z].filter(Boolean)},[i]),A=_s.useMemo(()=>P.findIndex((F,$)=>$g(F)&&($g(P[$+1])||zg(P[$+1]))),[P]),R=mI(P[0]),j=zg(P[P.length-1]),M=!!h;_s.useEffect(()=>{l&&(i.forEach(F=>fI(F)&&l(F)),P.length>0&&l(P[0]))},[]);const w=_s.useCallback(()=>{b.current?.navigateToSlide?.(0)},[]),O=_s.useCallback(()=>{b.current?.navigateToSlide?.(1)},[]),B=_s.useCallback(F=>{if(L(F),m.current){const K=m.current.closest("[data-block-id]")??m.current;YG(K,{offsetTop:document.getElementById("app-header")?.offsetHeight??0})}F!==A&&!E&&k(!0),l?.(P[F]);const $=P[F]?.media;I($)?.audio&&d?.({audioPlayerId:Is({refs:`items:${n}/items:${P[F]?.id}`}),transcriptMedia:$})},[P,A,I,E,n,l,d,m]),D=({index:F,isActive:$,onClick:z,onKeyDown:K})=>{const J=R&&F===0,Q=j&&F===P.length-1,U=R?F:F+1;let H,G;J?(H=a?.a11yBlockProcessSlideControlsIntroduction,G=(0,o.jsx)(ae,{className:"carousel-controls-item-intro-icon",name:"chevron-right"})):Q?(H=a?.a11yBlockProcessSlideControlsSummary,G=(0,o.jsx)(ae,{name:"check-regular"})):(H=U.toString(),G=U.toString());const Y=`${a?.a11yBlockProcessSlideControlsGoToSlide} ${H}`;return(0,o.jsx)(j5,{"aria-label":Y,ariaLabel:Y,className:"carousel-controls-item-btn",isActive:$,onClick:z,onKeyDown:K,children:G},F)},_=e?"fadeIn":"none";return(0,o.jsx)(ze,{animateBlockEntrance:M,animateIn:_,duration:M&&e?1:0,initiallyVisible:s,isLearner:r,children:(0,o.jsx)("div",{className:Joe(),children:(0,o.jsx)($u,{blockId:n,carouselRef:b,items:P,children:()=>(0,o.jsx)(zu,{iconNameLeft:"chevron-left-solid",iconNameRight:"chevron-right-solid",isInfinite:!1,isRTL:S,labelCarousel:a?.a11yBlockProcessCarousel,labelCarouselRoleDesc:a?.a11yBlockProcessRoleDescription,labelSlideControls:a?.a11yBlockProcessSlideControls,labelSlideControlsGoToNext:a?.a11yBlockProcessSlideControlsGoToNext,labelSlideControlsGoToPrevious:a?.a11yBlockProcessSlideControlsGoToPrevious,labelSlideControlsGoToSlide:a?.a11yBlockProcessSlideControlsGoToSlide,labelSlideCounterPreposition:a?.blocksPreposition,labelSlidePreposition:a?.a11yBlockProcessSlidePreposition,labelSlideRoleDesc:a?.a11yBlockProcessSlideRoleDescription,onChange:B,ref:b,renderSlideIndicator:D,shouldMouseEmulateTouch:N,shouldUseCounter:!1,shouldUseGoToSlide:!0,children:P.map((F,$)=>(0,o.jsx)(nn,{activeIndex:T,description:F.description,enableVideoPlaybackSpeed:t,hasIntro:R,id:n,index:$,isHidden:F.isHidden,item:F,labels:a,lessonId:c,media:F.media,onClickRestart:w,onClickStart:O,settingAudioPosition:f,settingHeadingLevel:p,settingShowStepLabel:g,settingStepLabel:v,settingZoomOnClick:x,showSwipeBadge:y&&!E&&$===A,tag:Xoe,title:F.title,totalSteps:P.length,type:F.type},F.id))})})})})};var tre=C(49860);const nre=e=>{const{blockId:t}=e,n=tre.useRef(null);return(0,o.jsx)(Me,{className:"block-process",ref:n,children:(0,o.jsx)(ere,{id:t,processRef:n,...e})})},Ue=V("block-quote"),Kc=({avatar:e,alt:t,l10nId:n,showAvatar:s})=>s?(0,o.jsx)(An,{alt:jo(t),className:Ue("avatar"),"data-l10n-id":n,src:e}):null,pI=(e,{paragraph:t})=>{const n=t||"",s=Ue("text",{blank:t===""}).toString();return(0,o.jsx)(qe,{className:s,value:n})},gI=(e,{name:t})=>{const n=Ue("caption",{blank:t===""}).toString();return(0,o.jsx)(qe,{className:n,value:t})},vI=({avatar:e,blockProps:t,getL10nValue:n,item:s,renderCaption:r,renderText:i})=>{const a=s?.avatar?.media,c=n(a)?.image,l=c?.alt,d=Pm(c),h=Mt(a);return(0,o.jsx)("div",{className:Ue("slide"),children:(0,o.jsxs)("figure",{className:Ue("figure"),children:[d&&e?(0,o.jsx)(Kc,{alt:l??"",avatar:d,l10nId:h,showAvatar:!!e}):null,(0,o.jsx)("blockquote",{className:Ue("quote-body"),children:i(t,s)}),(0,o.jsx)("figcaption",{children:r(t,s)})]})})},sre=({alt:e,animateBlockEntrance:t,avatar:n,children:s,l10nId:r,initiallyVisible:i,isAuthorBlank:a=!1,isLearner:c,showAvatar:l,type:d})=>{const h=Ue("col",{"no-avatar":!n}),m=n?(0,o.jsx)("div",{className:Ue("image"),children:(0,o.jsx)("div",{className:Ue("avatar-wrap"),children:d==="c"?(0,o.jsx)(ze,{animateBlockEntrance:t,animateIn:"fadeInLeftSmall",initiallyVisible:i,isLearner:c,children:(0,o.jsx)(Kc,{alt:e,avatar:n,l10nId:r,showAvatar:l})}):(0,o.jsx)(Kc,{alt:e,avatar:n,l10nId:r,showAvatar:l})})}):null;return(0,o.jsx)("div",{className:Ue("container"),children:(0,o.jsx)("div",{className:Ue("row"),children:(0,o.jsxs)("div",{className:h,children:[(0,o.jsx)("div",{className:Ue("divider-top")}),(0,o.jsxs)("div",{className:Ue("figure",{"no-author":a,"no-avatar":!a&&!l}),children:[m,s]}),(0,o.jsx)("div",{className:Ue("divider-bottom")})]})})})},ore=({avatar:e,children:t,alt:n,l10nId:s,showAvatar:r})=>(0,o.jsx)("div",{className:Ue("figure"),children:(0,o.jsx)("div",{className:Ue("container"),children:(0,o.jsxs)("div",{className:Ue("row"),children:[(0,o.jsx)("div",{className:Ue("col"),children:e&&r?(0,o.jsx)(Kc,{alt:n,avatar:e,l10nId:s,showAvatar:r}):null}),(0,o.jsx)("div",{className:Ue("col"),children:t})]})})}),rre=({background:e,avatar:t,children:n,alt:s,l10nId:r,showAvatar:i})=>(0,o.jsx)("div",{className:Ue("background"),style:{backgroundImage:e??""},children:(0,o.jsx)("div",{className:Ue("container"),children:(0,o.jsx)("div",{className:Ue("row"),children:(0,o.jsx)("div",{className:Ue("col"),children:(0,o.jsxs)("div",{className:Ue("figure"),children:[t&&i?(0,o.jsx)(Kc,{alt:s,avatar:t,l10nId:r,showAvatar:i}):null,n]})})})})});class ire 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 s=t?.alpha??Nne(n),r=Tt(t),i=jne(n);return td({alpha:s,color:i,url:r})?.backgroundImage}renderText(t,{paragraph:n}){const s=n||"",r=Ue("text",{blank:s===""}).toString();return(0,o.jsx)(qe,{className:r,value:s})}renderCaption(t,{name:n}){const s=Ue("caption",{blank:n===""}).toString();return(0,o.jsx)(qe,{className:s,value:n})}render(){const{animateBlockEntrance:t,getL10nValue:n,initiallyVisible:s,isLearner:r,items:i,settings:a,type:c,renderText:l=this.renderTextDelegate,renderCaption:d=this.renderCaptionDelegate}=this.props,h=92,{avatarSize:m=Tg(c),divider:f=!0,dividerSize:p=h,entranceAnimation:v,quoteAlignment:g="left",quoteIcon:x=!0,quotesInline:y,quotePadding:S=2,quoteWidth:I=US(c)}=a,[b]=i,{avatar:T,background:L}=b,E=n(T?.media)?.image,k=Pm(E),N=E?.alt,P=Mt(T.media),A=n(L?.media)?.image,R=A?.overlayColor,j=this.getBackgroundImageUrl(A,R),M=a?.avatar??k!=="",w=k&&k!=="",O=c==="background",B=O&&R==="light",D=GS(I),_=WS(S),F=Lg(c,m),$=Rne(p),z=c==="a",K=c==="c"||O,J=c!=="b"&&!O,Q=b?.name==="",U=b?.paragraph==="",H=Ue(null,{[c]:!0,[`${c}-custom-width-${D}`]:!0,[`${c}-divider-off`]:z&&!f,[`${c}-divider-size-${$}`]:z&&f,[`${c}-quote-padding-${_}`]:!0,[`${c}-align-${g}`]:O,[`${c}-${D}-no-avatar`]:!k||!M,[`${c}-avatar-size-${F}`]:M&&w,[`${c}-quote-icon-off`]:K&&!x,[`${c}-legacy-quote-mark`]:J&&!y,[`${c}-overlay-legacy`]:!R,[`${c}-overlay-light`]:B,"no-animation":!v}).toString(),G=(0,o.jsx)("div",{className:Ue("wrap",{blank:Q||U}),children:(0,o.jsx)(ze,{animateBlockEntrance:t,animateIn:this.getQuoteEntranceAnimationType(),initiallyVisible:s,isLearner:r,siblingDelay:.15,children:(0,o.jsxs)("figure",{children:[(0,o.jsx)("blockquote",{children:l(this.props,b)}),(0,o.jsx)("figcaption",{children:d(this.props,b)})]})})});let Y;switch(c){case"d":Y=(0,o.jsx)(ore,{alt:N,avatar:k,initiallyVisible:s,l10nId:P,showAvatar:M,type:c,children:G});break;case"background":Y=(0,o.jsx)(rre,{alt:N,avatar:k,background:j,initiallyVisible:s,l10nId:P,showAvatar:M,type:c,children:G});break;default:Y=(0,o.jsx)(sre,{alt:N,animateBlockEntrance:t,avatar:k,initiallyVisible:s,isAuthorBlank:Q,isLearner:r,l10nId:P,showAvatar:M,type:c,children:G})}return(0,o.jsx)(Me,{className:H,children:Y})}}const Qc=ft(ire),CI=(e=>(0,o.jsx)(Qc,{...e}));C.dn(CI);const are=e=>(0,o.jsx)(Qc,{type:"b",...e}),cre=e=>(0,o.jsx)(Qc,{type:"c",...e}),lre=e=>(0,o.jsx)(Qc,{type:"d",...e}),dre=e=>(0,o.jsx)(Qc,{type:"background",...e});class ure 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:s,getL10nValue:r,initiallyVisible:i=!1,isRTL:a,isLearner:c,isLessonBlocksList:l=!1,items:d,labels:h,previewType:m,settings:f,renderText:p=pI,renderCaption:v=gI,type:g}=this.props,{avatar:x=!0,avatarSize:y=Tg(g),entranceAnimation:S,quotesInline:I,quotePadding:b=2,quoteWidth:T=US(g),showBorder:L=!0}=f,k=g!=="b"&&!(g==="background"),N=GS(T),P=WS(b),A=Lg(g,y),R=m==="mobile-portrait"||m==="mobile-landscape",j=Ue({[g]:!0,[`${g}-custom-width-${N}`]:!0,[`${g}-quote-padding-${P}`]:!0,[`${g}-${N}-no-avatar`]:!x,[`${g}-avatar-size-${A}`]:x,[`${g}-legacy-quote-mark`]:!l&&k&&!I,"no-animation":!S,"hide-border":!L,editable:s}).toString(),M=d.map(w=>(0,o.jsx)(vI,{avatar:x,blockProps:this.props,getL10nValue:r,item:w,renderCaption:v,renderText:p},w.id));return(0,o.jsx)("div",{className:Ue("slider-container"),children:(0,o.jsx)(Me,{className:j,children:(0,o.jsx)($c,{className:Ue("wrap"),children:(0,o.jsx)("div",{className:Ue("container"),children:(0,o.jsx)("div",{className:Ue("col"),children:(0,o.jsx)(nn,{className:Ue("box"),children:(0,o.jsx)(ze,{animateBlockEntrance:n,animateIn:"fadeInUp",initiallyVisible:i,isLearner:c,children:(0,o.jsx)($u,{blockId:t,items:d,children:({carouselRef:w})=>(0,o.jsx)(zu,{isRTL:a,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:w,shouldMouseEmulateTouch:R,children:M})})})})})})})})})}}const hre=eg(ft(ure)),x0=V("block-quote"),mre=e=>{const{animateBlockEntrance:t,initiallyVisible:n=!1,isLearner:s,items:r=[],settings:i,renderText:a=pI,renderCaption:c=gI,type:l="stacked"}=e,d=rt(),{avatar:h=!0,entranceAnimation:m}=i,f=i.avatarSize??Tg(l),p=Lg(l,f),v=x0({[l]:!0,[`${l}-avatar-size-${p}`]:!0,"no-animation":!m}).toString(),g=r.map(x=>(0,o.jsx)(vI,{avatar:h,blockProps:e,getL10nValue:d,item:x,renderCaption:c,renderText:a},x.id));return(0,o.jsx)(Me,{className:v,children:(0,o.jsx)($c,{className:x0("wrap"),children:(0,o.jsx)("div",{className:x0("container"),children:(0,o.jsx)(ze,{animateBlockEntrance:t,animateIn:"fadeInUp",initiallyVisible:n,isLearner:s,siblingDelay:.15,children:(0,o.jsx)("div",{className:x0("row"),children:g})})})})})};var fre=C(58516),pre=C.n(fre),gre=C(67731),xI=C.n(gre),vre=C(89955),bI=C.n(vre),Cre=C(50195),xre=C.n(Cre),bre=C(18352),nr=C.n(bre);const yI=e=>({...e.responses[e.response],hasCharacter:e.hasCharacter,type:"response"}),yre=(e,t)=>{const n=e.responses[e.response],s={emotion:t.emotion,goTo:t.goTo,nextSlide:t.nextSlide},r="action"in t?{action:t.action}:{};return{...s,...r,description:n?.feedback||"",type:"dialogue",hasCharacter:e.hasCharacter}},Sre=e=>[yI(e)],Ire=e=>{const t=!!e.responses[e.response],n=yI(e),s=yre(e,n);return t?[n,s]:[s]},Tre=e=>e.hasFeedback?[e,...Ire(e)]:e.response!=null?[e,...Sre(e)]:[e],Lre=(e,t)=>{if(!t)return;const{scene:n,slide:s}=t,r=e.findIndex(c=>c.id===n),a=(e[r]?.slides||[]).findIndex(c=>c.id===s);return{scene:r,slide:a}},SI=vd()(Lre);var Ere=C(14172),kre=C.n(Ere);const Nre=zt()(et()("filters"),So()(at()("name","rise_emotion")),ja()(Jt())),jre=zt()(et()("filters"),Mr()(at()("name","rise_emotion")),et()("value")),II=e=>new URL(e).pathname.slice(1),wre=e=>zt()(un()("key",II(e.src)),un()("thumbnailKey",II(e.thumbnail)))(e),Rre=zt()(et()("poses"),So()(Nre),wt()(e=>[jre(e),e]),kre(),ks()(wre));var N2e,Hs=C(49860);const Ug=e=>e===-1?null:e,Are=e=>rs()(Dt(),ke(),e),TI=ja()(Dt()),ia=$p()(TI,ms),LI=pre()(Rp()),EI=Are(eM),Gg=e=>Fo()(e);class Pre extends Hs.Component{static get defaultProps(){return{getCharacter:Function.prototype,onItemUpdate:Function.prototype}}continueRef;feedbackRef;resetRef;buttonRef=Hs.createRef();responseItemRef=Hs.createRef();scenarioRef=Hs.createRef();blockContentRef=Hs.createRef();endRef=Hs.createRef();textRef=Hs.createRef();refs=Hs.createRef();dynamicRefs=Hs.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 s=Array.from(t.children).find(d=>d.className.includes("-bottom"));if(!s)return;const r=t.parentElement?.classList.contains("scenario-block__dialogue__bubble")||t.parentElement?.classList.contains("scenario-block__dialogue__pane")?t.parentElement:t,i=()=>{const{scrollHeight:d,clientHeight:h}=t;return d>h+2},a=d=>{const h=d?.[0]?.isIntersecting??!1,m=i();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(a,{root:t,threshold:[0,1]}),l=()=>{};this.fadeObservers.set(t,{observer:c,scrollHandler:l}),c.observe(s)}componentDidMount(){const{initialState:t,items:n}=this.props,s=$e()(ka()("poses"),Bn()({},"character"),Gg);ia(n)&&!s(n)&&this.fetchCharacters(),t||this.resetSlides(),window.addEventListener("resize",this.onResize),window.addEventListener(Ye,this.handleNavEvent)}handleNavEvent(t){const{path:n}=t.detail,{blockId:s,sceneId:r,slideId:i,responseId:a}=Oi(n,["block","scene"]),c=n.at(-1)==="feedback";if(s!==this.props.blockId)return;const l=Ug(this.props.items.findIndex(m=>m.id===r)),d=l!==null?Ug(this.props.items[l].slides.findIndex(m=>m.id===i)):null,h=d!==null?Ug(this.props.items[l].slides[d].responses.findIndex(m=>m.id===a)):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:s,activeSlide:r}=this.state,i=Pt()([],[s,"slides"],t),a=Pt()(null,[r,"goTo"],i),c=Pt()(null,[r,"type"],i);if(n&&(a==="end"&&c==="text"||!a&&!c)&&bI()(n,t),this.shouldFocus){this.shouldFocus=!1;const m=this.scenarioRef.current?.querySelector('[data-scenario-focus][tabindex="-1"]');m?m.focus():xp(this.scenarioRef.current)}this.fadeObservers.forEach(({observer:m,scrollHandler:f},p)=>{document.contains(p)||(m.disconnect(),p.removeEventListener("scroll",f),this.fadeObservers.delete(p))})}componentWillUnmount(){clearTimeout(this.continueRef),clearTimeout(this.feedbackRef),clearTimeout(this.resetRef),window.removeEventListener("resize",this.onResize),window.removeEventListener(Ye,this.handleNavEvent),this.fadeObservers.forEach(({observer:t,scrollHandler:n},s)=>{t.disconnect(),s.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 s=this.getScene(t),r=s?.slides,i=r&&n>=0&&n<r.length;if(!s||!r||!i)return{name:"",pose:null};const{character:a}=s,c=r[n],l=`${t}.${n}`,d=[l,"response"],h=[l,"hasFeedback"],m=Pt()(null,d,this.state.slides),f=Pt()(!1,h,this.state.slides),p=Bn()("neutral","emotion",c),v=rs()(_e()(f),Pt()(p,["responses",m,"emotion"]),_e()(p)),g=zt()(Pt()(a?.poses?.neutral,["poses",v(c)]),EI);return{name:a?.name||"",pose:g(a)}}fetchCharacters(){const{getCharacter:t,items:n,onItemUpdate:s}=this.props,r=Lo()(["id","name","poses","src"]),i=c=>l=>s({itemId:c,payload:{character:l}}),a=({character:c,id:l})=>ia(c)&&t(c.id).then(d=>un()("poses",Rre(d),d)).then(r).then(i(l));n.map(a)}isCharacterHidden(){const{items:t}=this.props,{activeScene:n,activeSlide:s}=this.state,i=this.getActiveScene()?.slides?.[s],a=s===null,c=t[n];return a?!(c?.slidesHaveCharacterByDefault??!1):i&&!i.hasCharacter}getCharacterPose(){const{items:t}=this.props,{activeScene:n,activeSlide:s,prevScene:r,prevSlide:i}=this.state,a=Pt()([],[n,"slides"],t),c=Pt()(!0,[s,"hasCharacter"],a);return TI(r)&&ed()(c)?this.fetchCharacterPose(r,i):this.fetchCharacterPose(n,s)}onClick(t,n){const{items:s,onStep:r}=this.props,{activeScene:i,activeSlide:a}=this.state,c=this.getActiveScene()?.slides,l=Bn()(null,"type",c?.[a])==="dialogue",d=i===s.length-1,h=a===(c?.length??0)-1,m={activeSlide:a+1},f={activeScene:i+1,activeSlide:0},p={activeSlide:null},v={activeScene:0,activeSlide:0},g=zt()(SI(s),b=>({activeScene:b.scene,activeSlide:b.slide})),x=Tn()([[_e()(h&&d),_e()(p)],[_e()(h&&!d),_e()(f)],[vr(),_e()(m)]]),y=rs()(_e()(l),_e()(p),_e()(v)),S=Tn()([[hn()("slide"),nr()(g,[n])],[hn()("next"),x],[hn()("end"),y]]),I=()=>this.continueRef=setTimeout(this.setNextSlide,300);this.resetRef=setTimeout(this.resetSlide.bind(this,i,a),0),this.setState({prevScene:i,prevSlide:a}),this.setState(S(t),I),t==="end"&&this.resetSlides(),t==="end"&&r&&bI()(r,s)}onFocus(){this.shouldFocus=!0}onInit(){this.setState({initiated:!0})}onResize(){this.setState({resizes:this.state.resizes+1})}onResponseClick(t,n){const{activeScene:s,activeSlide:r,slides:i}=this.state,{getL10nValue:a,lessonId:c,blockId:l}=this.props,d=`${s}.${r}`,h=un()("response",t),m=un()("hasFeedback",!0),f=Gs()({[`${d}`]:h}),p=Gs()({[`${d}`]:m});n.media&&a(n.media)?.audio&&ye.playerId===`audio-${c}-${l}`&&ye.pause();const g=$e()(p,f);this.setState({slides:f(i)},()=>{this.shouldFocus=!0,this.setState({slides:g(i)})})}onTryAgainClick(){const{activeScene:t,activeSlide:n,slides:s}=this.state,r=`${t}.${n}`,i=xI()({hasFeedback:null,response:null}),a=Gs()({[`${r}`]:i});this.setState({slides:a(s)})}render(){const{blockId:t,getL10nValue:n,isPDF:s,items:r,labels:i}=this.props,{activeScene:a,activeSlide:c,initiated:l}=this.state,h=this.getActiveScene()?.slides?.[c],m=$e()(ms,Bn()({},"character"),Gg),f=$e()(ka()("poses"),Bn()({},"character"),Gg),p=$e()(is(),Pt()({},["character","poses"])),v=$e()(pl(),is(),wt()(p)),g=this.isCharacterHidden(),x=X()("scenario-block",{"scenario-block--initiated":l,"scenario-block--mobile":no.isMobile,"scenario-block--loading":m(r)&&!f(r),"scenario-block--character-hidden":g}),y=`scenario-live-${t}`,S={"aria-label":i?.a11yGroupScenario,"aria-describedby":y,className:x,ref:this.scenarioRef,role:"group",style:window.innerWidth<480?{height:window.innerHeight}:void 0},I=Tt(n(r?.[0].background?.media)?.image),b=Tn()([[Dt(),this.renderEnd],[at()("type","dialogue"),this.renderDialogues],[at()("type","text"),this.renderText],[vr(),_e()(null)]]),T=X()("scenario-block__character",{"scenario-block__character--hidden":g}),L=`${a}.${c}`,E=this.state.slides[L],k=E?.hasFeedback?h?.responses?.[E?.response]?.alt:h?.alt,N=n(k);return(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{...S,"data-l10n-id":Mt(k),children:[(0,o.jsx)("div",{"aria-live":"polite",className:"visually-hidden-always",id:y,children:N}),(0,o.jsx)("div",{className:"scenario-block__spinner"}),(0,o.jsx)("div",{className:"scenario-block__background-wrapper",children:ia(r)&&r.map(this.renderBackground)}),I&&(0,o.jsx)(An,{alt:"",onLoad:this.onInit,src:I}),(0,o.jsxs)("div",{className:"scenario-block__inner",children:[(0,o.jsx)("div",{className:T,children:f(r)&&v(r).map(this.renderPose)}),(0,o.jsx)(Sa,{children:ia(r)&&b(h)})]})]}),s&&h&&this.renderDetails(h)]})}renderBackground(t,n){const{activeScene:s}=this.state,{id:r,blurBackground:i}=t,a=this.props.getL10nValue(t?.background?.media)?.image,c=X()("scenario-block__background",{"scenario-block__background--active":s===n,"scenario-block__background--blur":i??!0}),l=Tt(a);return l?(0,o.jsx)(An,{alt:"",className:c,src:l},r):(0,o.jsx)(o.Fragment,{})}renderButton(t){const{labels:n}=this.props,{scenarioContinue:s,scenarioTryAgain:r}=n,{goTo:i,nextSlide:a}=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,o.jsxs)("span",{children:[r," ",(0,o.jsx)("i",{className:"icon icon-reload"})]}):(0,o.jsx)("span",{children:s}),m={className:"scenario-block__dialogue__button",key:"button",onClick:c==="tryAgain"?$e()(this.onFocus,this.onTryAgainClick):$e()(this.onFocus,nr()(this.onClick,[i,a]))};return(0,o.jsx)(Sa,{children:(0,o.jsx)(Us,{...l,children:(0,o.jsx)("button",{...m,type:"button",children:d})})})}renderDetails(t){const{items:n}=this.props,{activeScene:s,activeSlide:r}=this.state,{responses:i,type:a}=t,c=(m,f)=>(0,o.jsxs)("span",{children:[m," ",(0,o.jsx)(G$,{})," ",f]},m),l=zt()(SI(n),m=>`Scene ${m.scene+1} Slide ${m.slide+1}`),d=(m,{goTo:f,nextSlide:p})=>Tn()([[hn()("next"),nr()(c,[m,"Next Slide"])],[hn()("end"),nr()(c,[m,"End of Scenario"])],[vr(),nr()(c,[m,l(p||{})])]])(f),h=a==="text"?d("Continue",t):i.map((m,f)=>d(f,m));return(0,o.jsxs)("div",{className:"scenario-block__pdf-details",children:[(0,o.jsxs)("h3",{children:["Scene ",s+1," Slide ",r+1]}),h]})}renderDialogue(t,n,s){const{description:r,id:i,hasCharacter:a}=n,c="type"in n?n.type:void 0,{count:l,firstKey:d,hasFeedback:h,slide:m,totalDialogues:f}=t,p=s===0?i:s,v=s===1?d:s-1,g=s===0&&l===1,x=s===l,y=c==="dialogue"&&(g||x),S=this.dynamicRefs.current[`dialogue-${p}`],I=x&&this.dynamicRefs.current[`dialogue-${v}`],b=S&&S.offsetHeight,T=x&&I&&I.offsetHeight,L=h?30:0,E=window.innerWidth<480?20:30,k=E*2+60+T-L,N=E+60-L,P=xre()(b+L-60),A=Hs.createRef(),{settings:R,getL10nValue:j}=this.props,M=R?.audioPosition,w=j(m.media),O=Ts(w,M),B=O.renderOrder.indexOf("audio")<O.renderOrder.indexOf("text"),D=!!w?.audio,_=h&&s===f-1,F=X()("scenario-block__dialogue",{"scenario-block__dialogue--response":c==="response","scenario-block__dialogue--feedback":_,"scenario-block__dialogue--done":s<l-1,"scenario-block__dialogue--audio-top":B&&D}),$=Tn()([[_e()(g),_e()(null)],[hn()(l),_e()({top:`${k}px`})],[hn()(l-1),_e()({top:`${N}px`})],[hn()(l-2),_e()({top:`${P}px`})],[vr(),_e()({top:`-${b+30}px`})]]),z={className:F,ref:G=>{this.dynamicRefs.current[`dialogue-${p}`]=G},style:$(s)},K={appear:!0,classNames:"scenario-block__dialogue-",nodeRef:A,key:s,timeout:{enter:400,exit:400}},J=X()({"scenario-block__dialogue__bubble":a||c==="response","scenario-block__dialogue__pane":!a}),Q=this.props.getL10nValue(r)||"",U=c!=="response"&&!_&&D&&B&&(0,o.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(m)}),H=(0,o.jsxs)("div",{className:J,"data-scenario-focus":y?"":void 0,tabIndex:y?-1:void 0,children:[U,(0,o.jsxs)("div",{className:"scenario-block__dialogue__bubble__content",ref:this.setupFadeObserver,children:[c!=="response"&&!_?this.renderDialogueWithAudioPositioning(m,Q,O):(0,o.jsx)(je,{value:Q}),(0,o.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})]});return(0,o.jsx)(Us,{...K,children:(0,o.jsx)("div",{children:(0,o.jsx)("div",{...z,children:ia(r)&&H})})})}renderDialogues(t){const{activeScene:n,activeSlide:s,slides:r}=this.state,{id:i,responses:a}=t,c=`${n}.${s}`,l=r[c]||{},h=$e()(pl(),Tre,ii()(l))(t),{hasFeedback:m,response:f}=l,{feedback:p}=a[f]||{},v=Dt()(f)&&ms(a),g=m?h.length-1:h.length,x=(g===1&&Jt()(a)||g===2&&ms(a))&&m,y={count:g,firstKey:Pt()(null,[0,"id"],h),hasFeedback:m&&ia(p),slide:t,totalDialogues:h.length},S={classNames:"scenario-block__content-",nodeRef:this.blockContentRef,timeout:{enter:0,exit:1e3}},I=(0,o.jsx)("div",{className:"scenario-block__dialogues__bottom",children:(0,o.jsx)("div",{className:"scenario-block__dialogues__bottom__inner",children:(0,o.jsx)("div",{className:"scenario-block__dialogues__responses",children:(0,o.jsx)(Sa,{component:"ol",role:"list",children:a.map((b,T)=>this.renderResponse(b,t,T))})})})});return(0,o.jsx)(Us,{...S,children:(0,o.jsx)("div",{className:"scenario-block__dialogues scenario-block__content",children:(0,o.jsxs)("div",{className:"scenario-block__dialogues__inner",children:[(0,o.jsx)("div",{className:"scenario-block__dialogues__top",children:(0,o.jsx)("div",{className:"scenario-block__dialogues__top__inner",children:(0,o.jsx)(Sa,{children:h.map(this.renderDialogue.bind(this,y))})})}),v&&I,x&&this.renderButton(h[g-1])]})})},i)}renderEnd(){const{labels:t}=this.props,{scenarioComplete:n,scenarioStartOver:s}=t,r=$e()(this.onFocus,nr()(this.onClick,["end",null])),i=X()(["scenario-block__text","scenario-block__text--end","scenario-block__content"]),a={classNames:"scenario-block__content-",nodeRef:this.endRef,timeout:{enter:0,exit:400}};return(0,o.jsx)(Us,{...a,children:(0,o.jsx)("div",{className:i,children:(0,o.jsxs)("div",{className:"scenario-block__text__inner","data-scenario-focus":"",tabIndex:-1,children:[(0,o.jsx)("div",{className:"scenario-block__text__title",children:(0,o.jsx)("h2",{children:n})}),(0,o.jsxs)("button",{className:"scenario-block__text__end",onClick:r,type:"button",children:[(0,o.jsx)("span",{children:s}),(0,o.jsx)("i",{className:"icon icon-reload"})]})]})},"end")},"end")}renderPose(t,n){const{pose:s}=this.getCharacterPose(),{filters:r,id:i}=t,a=EI(t),c=$p()(at()("name","style")),l=c(at()("value","left_aligned")),d=c(at()("value","right_aligned")),h=X()("scenario-block__character__inner",{"scenario-block__character__inner--active":s===a,"scenario-block__character__inner--right":Mr()(d,r),"scenario-block__character__inner--left":Mr()(l,r)});return(0,o.jsx)("div",{className:h,"data-pose-id":i,children:(0,o.jsx)(An,{alt:"",src:a})},`pose-${n}-${i}`)}renderResponse({description:t},n,s){const{isPDF:r}=this.props,i=r?Ore:$e()(this.onFocus,nr()(this.onResponseClick,[s,n])),a=p=>{const g=p.currentTarget.querySelector(".scenario-block__response__inner");if(g){const x=g.getBoundingClientRect();if(p.clientX>x.right-16){p.preventDefault();return}}i(p)},c=p=>{const g=p.currentTarget.querySelector(".scenario-block__response__inner");if(g){const x=g.getBoundingClientRect();p.clientX>x.right-16?g.classList.add("hovering-scrollbar"):g.classList.remove("hovering-scrollbar")}},l=p=>{const g=p.currentTarget.querySelector(".scenario-block__response__inner");g&&g.classList.remove("hovering-scrollbar")},d=X()(["scenario-block__response",`scenario-block__response--${s}`]),h=X()("scenario-block__response-item",`scenario-block__response-item--${s}`),m={appear:!0,classNames:"scenario-block__response-item-",nodeRef:this.responseItemRef,timeout:{enter:0,exit:1e3}},f=(0,o.jsx)("button",{className:d,onClick:a,onMouseLeave:l,onMouseMove:c,type:"button",children:(0,o.jsxs)("div",{className:"scenario-block__response__inner",ref:this.setupFadeObserver,children:[(0,o.jsx)("div",{className:"scenario-block__response__number",children:s+1}),(0,o.jsx)(je,{value:t}),(0,o.jsx)("div",{className:"scenario-block__response__inner-bottom"})]})});return(0,o.jsx)(Us,{...m,children:(0,o.jsx)("li",{className:h,role:"listitem",children:f})},s)}renderText(t){const{description:n,goTo:s,hasCharacter:r,id:i,nextSlide:a}=t,c=this.props.getL10nValue(t.title),l=this.props.getL10nValue(n)||"",{labels:d,settings:h,getL10nValue:m}=this.props,{scenarioContinue:f,scenarioStartOver:p}=d,v=!n&&(c||"").length<22,g=h?.audioPosition,x=m(t.media),y=Ts(x,g),S=y.renderOrder.indexOf("audio")<y.renderOrder.indexOf("text"),I=!!x?.audio,b=X()("scenario-block__text","scenario-block__content",{"scenario-block__text--no-character":!r,"scenario-block__text--short":v,"scenario-block__text--audio-top":S&&I}),T={classNames:"scenario-block__content-",nodeRef:this.textRef,timeout:{enter:0,exit:400}},L=h?.headingLevel,E=L?`h${L}`:"h2",k=`scenario-title-${i}`,N=`scenario-description-${i}`,P=`${k} ${N}`,A=X()("scenario-block__text__inner",{"scenario-block__text__inner--end":s==="end"}),R=X()("scenario-block__text__title",{"scenario-block__text__title--end":s==="end"}),j=(0,o.jsx)("div",{className:R,"data-l10n-id":Mt(t.title),id:k,children:(0,o.jsx)(E,{children:c})}),M=I&&S&&(0,o.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(t)}),w=(0,o.jsx)("div",{className:"scenario-block__text__description",id:N,ref:this.setupFadeObserver,children:this.renderTextWithAudioPositioning(t,l,y)}),O=$e()(this.onFocus,nr()(this.onClick,[s,a])),B=(0,o.jsx)("button",{"aria-describedby":P,className:"scenario-block__text__continue",onClick:O,type:"button",children:(0,o.jsx)("span",{children:f})}),D=(0,o.jsxs)("button",{"aria-describedby":P,className:"scenario-block__text__end",onClick:O,type:"button",children:[(0,o.jsx)("span",{children:p}),(0,o.jsx)("i",{className:"icon icon-reload"})]});return(0,o.jsx)(Us,{...T,children:(0,o.jsx)("div",{className:b,children:(0,o.jsxs)("div",{className:A,"data-scenario-focus":"",tabIndex:-1,children:[c&&j,M,n&&w,s==="end"?D:B]})},i)},i)}renderAudioMedia(t){const{blockId:n,getL10nValue:s,labels:r,lessonId:i,items:a,settings:c}=this.props,l=s(t.media),d=a?.[this.state.activeScene];return l?(0,o.jsx)(rn,{blockId:n,index:n,item:t,labels:r,lessonId:i,lessonNumber:i,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,s){const r=s.renderOrder.indexOf("audio")<s.renderOrder.indexOf("text");return(0,o.jsxs)(o.Fragment,{children:[s.renderOrder.map((i,a)=>{if(i==="text")return(0,o.jsx)("div",{children:(0,o.jsx)(je,{value:n})},`text-${a}`);if(i==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,o.jsx)("div",{children:c},`audio-${a}`):null}return null}),(0,o.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})}renderTextWithAudioPositioning(t,n,s){const r=s.renderOrder.indexOf("audio")<s.renderOrder.indexOf("text");return(0,o.jsxs)(o.Fragment,{children:[s.renderOrder.map((i,a)=>{if(i==="text")return(0,o.jsx)("div",{children:(0,o.jsx)(je,{value:n})},`text-${a}`);if(i==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,o.jsx)("div",{children:c},`audio-${a}`):null}return null}),(0,o.jsx)("div",{className:"scenario-block__text__description-bottom"})]})}resetSlide(t,n){const{slides:s}=this.state,r=`${t}.${n}`,i={hasFeedback:!1,response:null};this.setState({slides:un()(r,i,s)})}resetSlides(){const{items:t}=this.props,n=r=>(i,a,c)=>{const{type:l,responses:d=[]}=a,h=l==="dialogue"&&d.length===0;return un()(`${r}.${c}`,{hasFeedback:h,response:null},i)},s=(r,i,a)=>zt()(Bn()([],"slides"),LI(n(a),{}),xI()(r))(i);this.setState({slides:LI(s,{},t)})}setNextSlide(){const{activeScene:t,activeSlide:n,slides:s}=this.state,r=this.getActiveScene()?.slides;if(!r)return;const{responses:i=[],type:a}=r[n]||{},c=`${t}.${n}`,l=un()("hasFeedback",!0),d=Gs()({[c]:l});a==="dialogue"&&Jt()(i)&&(this.shouldFocus=!0,this.setState({slides:d(s)}))}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 Mre=e=>{const t=rt();return(0,o.jsx)(Pre,{...e,getL10nValue:t})};function Ore(){}var Bre=C(49860);class Dre extends Bre.Component{render(){const{animateBlockEntrance:t,isLearner:n,previewType:s,initiallyVisible:r}=this.props,i=!Dt()(s),l={animateBlockEntrance:i,animateIn:t?"fadeIn":"none",duration:i&&t?1:0,initiallyVisible:r,isLearner:n};return(0,o.jsx)(Me,{className:"block-scenario",children:(0,o.jsx)(ze,{...l,children:(0,o.jsx)(Mre,{...this.props})})})}}function Fre(e){e&&(e.addEventListener("touchstart",sr,!0),e.addEventListener("touchmove",sr,!0),e.addEventListener("touchcancel",sr,!0),e.addEventListener("touchend",sr,!0))}function _re(e){e&&(e.removeEventListener("touchstart",sr,!0),e.removeEventListener("touchmove",sr,!0),e.removeEventListener("touchcancel",sr,!0),e.removeEventListener("touchend",sr,!0))}function sr(e){e?.stopPropagation?.()}const aa=V("playing-card"),kI=({id:e,isDeckTopCard:t,title:n,ref:s})=>{const[r,i]=(0,u.useState)(!1),[a,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)({x:0,y:0}),[h,m]=(0,u.useState)(!0),[f,p]=(0,u.useState)(!1),[v,g]=(0,u.useState)(0),x=Gt(),y=rt(),S=fn(),I=(0,u.useRef)(null),b=(0,u.useRef)(null),T=(0,u.useRef)(void 0),L=(0,u.useRef)(void 0),E=(0,u.useRef)(!1),k=(0,u.useCallback)(()=>{const{innerWidth:D}=window,_=I.current&&I.current.scrollHeight>I.current.clientHeight,F=D<v;_&&D>v&&g(D),p(_||F)},[v]),N=(0,u.useRef)(()=>{i(!0),c(!1)}),P=(0,u.useRef)(()=>{i(!1)});(0,u.useImperativeHandle)(s,()=>({onStartSortAttempt:N.current,onEndSortAttempt:P.current})),(0,u.useEffect)(()=>{const D=setTimeout(()=>{m(!1)},300);return()=>clearTimeout(D)},[]),(0,u.useEffect)(()=>{const D=b.current;if(!D)return;const _=()=>{i(!0),c(!1)},F=({dx:z,dy:K})=>{d(J=>({x:J.x+z,y:J.y+K}))},$=()=>{i(!1)};return N.current=_,P.current=$,Fre(D),Ds(D).draggable({inertia:!0,autoScroll:!1,modifiers:[Ds.modifiers.snap({targets:[(z,K)=>({x:z,y:K})],range:1/0,endOnly:!0,relativePoints:[{x:.5,y:.5}]})]}).on("dragstart",_).on("dragmove",F).on("dragend",$),k(),T.current=Vu()(k,250),window.addEventListener("resize",T.current),()=>{_re(D),Ds(D).off("dragstart",_).off("dragmove",F).off("dragend",$),T.current&&(T.current.cancel(),window.removeEventListener("resize",T.current)),clearTimeout(L.current)}},[k]),(0,u.useEffect)(()=>{k()},[e,k]),(0,u.useEffect)(()=>{const D=E.current;E.current=r,D&&!r&&(c(!0),clearTimeout(L.current),L.current=setTimeout(()=>{d({x:0,y:0}),c(!1)},300))},[r]);const A=S?.backgroundType===oe.ACCENT||S?.backgroundType===oe.IMAGE,R=`translate3d(${l.x}px, ${l.y}px, 0)`,j={WebkitTransform:R,transform:R},M=aa("title",{"is-max-length":f}),w=aa({draggable:!0,moving:r,fail:a,reset:h}),O=A?aa("content"):aa("content").mix("brand--border"),B=y(n)??"";return(0,o.jsxs)("div",{"aria-hidden":!t,className:w,id:e.toString(),onMouseDown:D=>{D.preventDefault()},ref:b,style:j,children:[t&&(0,o.jsx)("div",{className:"visually-hidden-always",children:`${x?.a11ySortingCurrentItem}: ${B}`}),(0,o.jsxs)(nn,{"aria-hidden":"true",className:O,children:[(0,o.jsx)(je,{className:M,id:`card-title-${e}`,ref:I,value:n}),(0,o.jsx)("div",{className:aa("handle")}),(0,o.jsx)("div",{className:aa("status"),children:(0,o.jsx)("i",{className:"icon icon-check"})})]})]},`card-${e}`)},b0=V("restart-button");function Hre({allowTabNavigation:e=!0,onClick:t,onFocus:n=dn,ref:s,text:r}){const i=b0({}).mix("button");return(0,o.jsx)("button",{"aria-hidden":!e,className:i,"data-testid":"quiz-take-again-button",onClick:t,onFocus:n,ref:s,tabIndex:Vq(e),type:"button",children:(0,o.jsxs)("div",{className:b0("content"),children:[(0,o.jsx)("span",{className:b0("text").mix("brand--ui"),children:r}),(0,o.jsx)("i",{"aria-hidden":"true",className:b0("icon").mix("icon").mix("icon-reload")})]})})}const Vre=Hre,Zc=V("deck"),zre=e=>e?.percentViewed===100,$re=(e,t)=>`${e?.correctlyAnswered??0}/${t}`,Ure=(e,t)=>String(t?.lastIncorrectCardId)===String(e.id),Gre=({count:e,items:t,id:n,onReplay:s,progress:r,ref:i})=>{const a=Gt(),c=(0,u.useRef)([]),l=(0,u.useRef)(null);(0,u.useImperativeHandle)(i,()=>({startKeyDrop(){c.current[0]?.onStartSortAttempt()},endKeyDrop(){c.current[0]?.onEndSortAttempt()},focusReplayButton(){l.current?.focus()}}));const d=zre(r),h=$re(r,e),m=()=>{s?.({id:n})};return(0,o.jsxs)("div",{className:Zc({complete:r?.percentViewed===100}),children:[(0,o.jsx)("div",{className:Zc("spacer")}),d&&(0,o.jsxs)("div",{className:Zc("cardholder"),children:[(0,o.jsxs)("div",{className:Zc("title").mix("brand--ui"),children:[h," ",a?.sortingCardsCorrect]}),(0,o.jsx)(Vre,{allowTabNavigation:d,onClick:m,ref:l,text:a?.sortingReplay??""})]}),(0,o.jsx)("div",{className:Zc("content"),children:t.map((f,p)=>(0,o.jsx)(kI,{id:f.id,isDeckTopCard:c.current[p]===c.current[0],isIncorrect:Ure(f,r),ref:v=>{c.current[p]=v},title:f.title},f.id))})]})},ti=V("pile"),Wre=({id:e,lessonId:t,deckTopCard:n,nextCard:s,isComplete:r=!1,onCardDrop:i,onNavigateToNext:a,onNavigateToPrevious:c,onKeyDropStart:l,onKeyDropEnd:d,title:h,ref:m})=>{const[f,p]=(0,u.useState)(void 0),[v,g]=(0,u.useState)(!1),[x,y]=(0,u.useState)(!0),[S,I]=(0,u.useState)(!1),[b,T]=(0,u.useState)(!1),[L,E]=(0,u.useState)(0),k=(0,u.useRef)(null),N=(0,u.useRef)(null),P=(0,u.useRef)(null),A=(0,u.useRef)(void 0),R=(0,u.useRef)(void 0),j=(0,u.useRef)(void 0),M=(0,u.useRef)(void 0),w=(0,u.useRef)(void 0),O=Gt(),B=rt(),{announcePolite:D}=Rs(),_=(0,u.useEffectEvent)(()=>{if(r||!n)return;const Z=n.id.toString(),q=n.pileId===e;i?.({id:t,itemId:Z,isCorrect:q});const ee=B(n.title)??"",se=B(h)??"";if(q){clearTimeout(R.current),clearTimeout(j.current),clearTimeout(M.current),p(n),g(!0),y(!1),D(`${O?.a11ySortingCorrect}. ${ee}, ${O?.a11ySortingCategory}: ${se}`);const re=B(s?.title)??"";re&&(M.current=setTimeout(()=>{D(`${O?.a11ySortingNextItem}. ${re}`)},500)),R.current=setTimeout(()=>{p(void 0),g(!1)},1500),j.current=setTimeout(()=>{y(!0)},1300)}else clearTimeout(R.current),clearTimeout(j.current),clearTimeout(M.current),p(void 0),g(!1),y(!0),D(O?.a11ySortingIncorrect??"")});(0,u.useImperativeHandle)(m,()=>({focus(){N.current?.focus()}}));const F=(0,u.useCallback)(()=>{const{innerWidth:Z}=window,q=k.current&&k.current.scrollHeight>(k.current.offsetParent?.clientHeight??0),ee=Z<L;q&&Z>L&&E(Z),T(q||ee)},[L]),$=(0,u.useCallback)(()=>{if(r||!n)return;l?.();const Z=n.id.toString(),q=n.pileId===e;i?.({id:t,itemId:Z,isCorrect:q});const ee=B(n.title)??"",se=B(h)??"";if(q){clearTimeout(R.current),clearTimeout(j.current),clearTimeout(M.current),p(n),g(!0),y(!1),D(`${O?.a11ySortingCorrect}. ${ee}, ${O?.a11ySortingCategory}: ${se}`);const re=B(s?.title)??"";re&&(M.current=setTimeout(()=>{D(`${O?.a11ySortingNextItem}. ${re}`)},500)),R.current=setTimeout(()=>{p(void 0),g(!1)},1500),j.current=setTimeout(()=>{y(!0)},1300)}else clearTimeout(R.current),clearTimeout(j.current),clearTimeout(M.current),p(void 0),g(!1),y(!0),D(O?.a11ySortingIncorrect??"")},[r,n,s,e,t,O,h,B,l,i,D]),z=(0,u.useCallback)(Z=>{Uo(Z)?Q3(()=>c?.())(Z):Go(Z)&&Q3(()=>a?.())(Z)},[c,a]),K=(0,u.useCallback)(()=>{r||($(),clearTimeout(w.current),w.current=setTimeout(()=>d?.(),100))},[$,d,r]),J=(0,u.useCallback)(()=>{I(!0)},[]),Q=(0,u.useCallback)(()=>{I(!1)},[]);(0,u.useEffect)(()=>{const Z=P.current;if(!Z)return;const q=re=>{const le=Ds.getElementRect(re.target),Le={x:le.left+le.width/2,y:le.top+le.height/2};re.draggable.draggable({snap:{targets:[Le]}})},ee=re=>{re.draggable.draggable({snap:{targets:[(le,Le)=>({x:le,y:Le})]}})},se=re=>{re.draggable.draggable({snap:{targets:[(le,Le)=>({x:le,y:Le})]}}),re.stopPropagation?.(),re.preventDefault?.(),_()};return Ds(Z).dropzone({overlap:"pointer"}).on("dragenter",q).on("dragleave",ee).on("drop",se),F(),A.current=Vu()(F,250),window.addEventListener("resize",A.current),()=>{Ds(Z).off("dragenter",q).off("dragleave",ee).off("drop",se),clearTimeout(R.current),clearTimeout(j.current),clearTimeout(M.current),clearTimeout(w.current),A.current&&(A.current.cancel(),window.removeEventListener("resize",A.current))}},[]);const U=X()(ti(),{"drop-success":v,complete:r}),H=X()(ti("content"),{"drop-animating":!x&&!S}),G=ti("title",{"is-max-length":b}),Y=B(h)??O?.a11ySortingCategories??"Categories";return(0,o.jsx)("div",{className:U,ref:P,children:(0,o.jsx)("div",{className:ti("wrapwrap"),children:(0,o.jsxs)(nn,{className:ti("wrap"),overrideBackground:!0,children:[(0,o.jsx)("div",{"aria-hidden":"true",className:ti("message"),children:(0,o.jsx)(je,{className:G,ref:k,value:h})}),(0,o.jsx)("button",{"aria-disabled":r,"aria-label":Y,className:H,disabled:r,onBlur:Q,onClick:K,onFocus:J,onKeyDown:z,ref:N,type:"button",children:f&&(0,o.jsx)(kI,{id:f.id,title:f.title})}),(0,o.jsx)("div",{className:ti("background")})]})})})},Wg=V("sorting"),Kre=(e,t)=>!t||!t.items?e:e.filter(n=>!t.items?.[n.id]?.isViewed),Qre=({id:e,items:t,piles:n,onCardDrop:s,onReplay:r,progress:i})=>{const[a,c]=(0,u.useState)(()=>dm()(t)),[l,d]=(0,u.useState)(!1),h=(0,u.useRef)([]),m=(0,u.useRef)(null),f=(0,u.useRef)(i?.retryAttempts),p=(0,u.useRef)(i?.percentViewed),v=(0,u.useRef)(void 0),g=(0,u.useRef)(void 0),x=(0,u.useRef)(void 0),y=Gt(),S=rt(),{announcePolite:I}=Rs(),b=(0,u.useEffectEvent)(()=>{h.current[0]?.focus()}),T=(0,u.useEffectEvent)(()=>{const R=i?.correctlyAnswered??0,j=t.length;I(`${R} ${y?.a11ySortingCompleteOf} ${j} ${y?.a11ySortingComplete}`)}),L=(0,u.useEffectEvent)(()=>{m.current?.focusReplayButton()});(0,u.useEffect)(()=>{const R=j=>{const{blockId:M,cardId:w}=Oi(j.detail.path,["block","card"]);e!==M||!w||c(O=>{const B=O.find(_=>_.id===w),D=O.filter(_=>_.id!==w);return B?[B,...D]:O})};return window.addEventListener(Ye,R),()=>{window.removeEventListener(Ye,R)}},[e]),(0,u.useEffect)(()=>{const R=i?.retryAttempts,j=f.current;return R!==j?(f.current=R,c(dm()(t)),clearTimeout(v.current),v.current=setTimeout(()=>{b()},100)):c(M=>{const w=t.filter(D=>!M.find(_=>_.id===D.id));return[...M.filter(D=>t.find(_=>_.id===D.id)).map(D=>{const _=t.find(F=>F.id===D.id);return _?{...D,..._}:D}),...w]}),()=>{clearTimeout(v.current)}},[t,i?.retryAttempts]),(0,u.useEffect)(()=>{const R=i?.percentViewed,j=p.current;return R===100&&j!==100&&(d(!0),clearTimeout(g.current),g.current=setTimeout(()=>{T()},500),clearTimeout(x.current),x.current=setTimeout(()=>{L()},100)),R!==100&&j===100&&d(!1),p.current=R,()=>{clearTimeout(g.current),clearTimeout(x.current)}},[I,i?.correctlyAnswered,i?.percentViewed,t.length]);const E=Kre(a,i),k=y?.sortingLandmark??"",N=E?.[0],P=N?S(N.title)??"":"",A=l?y?.a11ySortingCategoriesComplete:P?`${y?.a11ySortingCategories}. ${P}`:y?.a11ySortingCategories;return(0,o.jsxs)("div",{"aria-label":k,className:Wg(),role:"group",children:[(0,o.jsx)("div",{className:Wg("row"),children:(0,o.jsx)(Gre,{count:a.length,id:e,items:E,onReplay:r,progress:i,ref:m})}),(0,o.jsx)("ul",{"aria-label":A,className:Wg("row"),role:"list",children:n.map((R,j)=>(0,o.jsx)("li",{role:"listitem",children:(0,o.jsx)(Wre,{deckTopCard:E?.[0],id:R.id,isComplete:l,lessonId:e,nextCard:E?.[1],onCardDrop:s,onKeyDropEnd:()=>{m.current?.endKeyDrop()},onKeyDropStart:()=>{m.current?.startKeyDrop()},onNavigateToNext:()=>zq({list:h.current,currentIndex:j}),onNavigateToPrevious:()=>$q({list:h.current,currentIndex:j}),ref:M=>{h.current[j]=M},title:R.title})},R.id))})]})},NI=()=>()=>{},Zre=e=>{const{animateBlockEntrance:t,blockId:n,initiallyVisible:s,items:r,onCardDrop:i=NI,onReplay:a=NI,piles:c,progress:l}=e;return(0,o.jsx)(Me,{type:"sorting-activity",children:(0,o.jsx)(ze,{animateBlockEntrance:t,initiallyVisible:s,isLearner:!0,children:(0,o.jsx)(Qre,{id:n,items:r,onCardDrop:i(e),onReplay:a(e),piles:c,progress:Pt()({},["items",n],l)})})})};function Yre({accentColor:e,backgroundType:t,blockBackgroundColor:n,noteColor:s,imageBackgroundDefault:r="#ffffff"}){return s!=null&&s!==""?s:qre({accentColor:e,backgroundType:t,blockBackgroundColor:n,imageBackgroundDefault:r})}function qre({accentColor:e,backgroundType:t,blockBackgroundColor:n,imageBackgroundDefault:s="#ffffff"}){if(t!==oe.IMAGE&&n==null)return"#000000b3";switch(t){case oe.IMAGE:return s;case oe.LIGHT:case oe.GRAY:return as(.9,e);case oe.DARK:return"#494949";case oe.BLACK:return"#333333";default:{if(!n)return e;switch(Ni(n)){case Lt.LIGHT:return as(.3,n);case Lt.MED:return As(.2,n);case Lt.DARK:case Lt.NEAR_BLACK:return As(.4,n);default:return e}}}}var Xre=C(49860);const Vn=V("block-statement");class Jre extends Xre.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:s,labels:r,lessonId:i,media:a,settings:c},{paragraph:l}){const d=s==="note",h=n(Array.isArray(a)?{}:a),m=!!h?.audio,f=Ts(h,c.audioPosition,!1,"statement"),p=(0,o.jsx)("div",{className:Vn("quote"),children:f.renderOrder.map((v,g)=>{if(v==="text")return(0,o.jsx)("div",{children:(0,o.jsx)(qe,{value:l})},`text-${g}`);if(v==="audio"&&m){const x=f.renderOrder.indexOf("audio")<f.renderOrder.indexOf("text");return(0,o.jsx)("div",{className:Vn("audio-container",{top:x,bottom:!x}),children:(0,o.jsx)(rn,{blockId:t,hasPadding:!1,index:t,item:{media:a,id:t},labels:r,lessonId:i,media:a,mediaType:"audio",refs:`items:${t}`})},`audio-${g}`)}return null})});return d?(0,o.jsx)(rie,{getL10nValue:n,media:a,children:p}):p}render(){const{animateBlockEntrance:t,isLearner:n,items:s,renderText:r=this.renderTextDelegate,settings:i,type:a,initiallyVisible:c}=this.props,{entranceAnimation:l,divider:d=!0,dividerPadding:h=Ene(a),dividerSize:m=Lne(a),noteIcon:f=!0,noteSize:p="sm",statementWidth:v=kne(a)}=i,g=Ane(v),x=Pne(h),y=Mne(m),S=p,I=a==="a"||a==="b"||a==="d",b=a==="note",T=Vn({[a]:!0,[`${a}-custom-width-${g}`]:!0,[`${a}-divider-off`]:I&&!d,[`${a}-divider-padding-${x}`]:I&&d,[`${a}-divider-size-${y}`]:I&&d,[`note-size-${S}`]:b,[`note-size-${S}-no-icon`]:b&&!f,"no-animation":!l});return(0,o.jsx)(Me,{className:T.toString(),children:(0,o.jsx)("div",{className:Vn("wrap"),children:(0,o.jsx)("div",{className:Vn("container"),children:(0,o.jsx)("div",{className:Vn("row"),children:s.slice(0,1).map(L=>(0,o.jsx)(ze,{animateBlockEntrance:t,animateIn:this.getEntranceAnimationType(),duration:this.getEntranceAnimationDuration(),initiallyVisible:c,isLearner:n,children:(0,o.jsxs)("div",{className:Vn("col"),children:[(0,o.jsx)("div",{className:Vn("divider-top-container"),children:(0,o.jsx)("div",{className:Vn("divider-top")})}),r(this.props,L),(0,o.jsx)("div",{className:Vn("divider-bottom")})]})},L.id))})})})})}}const Yc=ft(Jre),eie=Yc,tie=e=>(0,o.jsx)(Yc,{type:"b",...e}),nie=e=>(0,o.jsx)(Yc,{type:"c",...e}),sie=e=>(0,o.jsx)(Yc,{type:"d",...e}),oie=e=>(0,o.jsx)(Yc,{type:"note",...e}),rie=({children:e,getL10nValue:t,media:n})=>{const s=fn(),{accentColor:r,cardMode:i,cornerRadius:a,courseColor:c,customBackgroundColorContrast:l,noteIcon:d=!0,noteIconColor:h}=s,m=s.noteColor,f=s.noteColorContrast,{theme:p}=He(),v=En(),g=Wn(),x=g===oe.COLOR,y=g===oe.ACCENT,S=p?.accentContrast,I=g===oe.DARK||g===oe.BLACK,b=m!=null&&m!=="",L=x||y||I||b?Gn.TRANSPARENT:i,E=b&&(f??Ee.AUTO)===Ee.AUTO||S===Ee.AUTO&&y||l===Ee.AUTO&&x,k=(0,u.useMemo)(()=>Yre({accentColor:r??c,backgroundType:g,blockBackgroundColor:v,noteColor:m,imageBackgroundDefault:""}),[r,g,v,c,m]),N=b?f??Ee.AUTO:g===oe.COLOR?l:S,P=Wt({backgroundColor:k,contrast:N}),A={"--color-background":k,...(E||b)&&{"--color-text":P},...a&&{"--corner-radius":`${Number(a)}px`},...h&&{"--color-theme-decorative":h},...b&&{"--color-theme":m}},R=Vn("note-icon",{off:!d}),M=(t?t(Array.isArray(n)?{}:n):void 0)?.image,w=M?.key&&Object.keys(M).length>0,O=w?zN(M)?yt(M.key):Tt(M):null,B=()=>d?w&&O?(0,o.jsx)("div",{"aria-hidden":!0,className:Vn("note-icon__custom"),style:{WebkitMaskImage:`url('${O}')`,maskImage:`url('${O}')`}}):(0,o.jsx)(ae,{name:"circle-info"}):null;return(0,o.jsxs)(nn,{cardMode:L,className:Vn("note-card"),style:A,children:[(0,o.jsx)("div",{className:R,children:B()}),e]})},Ls=V("block-step"),iie=e=>{const{blockId:t,disableZoom:n,enableVideoPlaybackSpeed:s,isOverlayAudio:r,item:i,labels:a,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=i,f=Pe(i.media)??{},p=d==="audio"&&f.audio,v=d==="embed"&&f.embed,g=d==="image"&&f.image,x=d==="video"&&f.video;if(!p&&!v&&!g&&!x&&!(d==="image-with-audio"&&r))return;const S=f.embed?Xr(f.embed):void 0,I=!!f.image,b=!!f.audio,T=I?f.image.align:"center",L=Ls("media",{audio:b&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${T}`]:r&&!!T,"audio-on-bottom":b&&!r&&h==="bottom",linkEmbed:S==="link",videoEmbed:S==="video",visual:!r&&I||!Dt()(f.video)}),E=m||{};return(0,o.jsx)("div",{className:L,children:(0,o.jsx)(rn,{blockId:t,enableVideoPlaybackSpeed:s,index:`${i.id}`,isOverlayAudio:r,item:i,labels:a,lessonId:c,lessonNumber:l,media:f,mediaType:r?void 0:d,opts:{disableZoom:n,...E},shouldPause:!0})})},aie=e=>{const{headingLevel:t,innerRef:n,item:s,isActive:r,loadMedia:i,audioPosition:a,onFocus:c,renderTitle:l,renderDescription:d,style:h}=e,{id:m}=s,f=Ls({active:r}),p=Dn(),v=Pe(s.step),g=Pe(s.step,p),x=!!(v||g),y=!!s.title,S=t||2,I=`h${S}`,b=`h${S+1}`,T=Pe(s.media),L=Ts(T,a,!0,"timeline"),E=Pe(s.description),k=(0,u.useMemo)(()=>!!Object.keys(T??{}).length||!!ep(E).value?.length,[T,E]),N=()=>{const P={audio:{item:{...s,media:L.audioOnlyMedia||T},mediaType:"audio"},image:{item:{...s,media:L.imageOnlyMedia||T},mediaType:"image"},video:{item:{...s,media:L.videoOnlyMedia||T},mediaType:"video"},embed:{item:{...s,media:L.embedOnlyMedia||T},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,o.jsx)(o.Fragment,{children:L.renderOrder.map((A,R)=>{if(A==="text")return d?(0,o.jsx)("div",{className:Ls("description"),children:d(s)},`text-${R}`):(0,o.jsx)(je,{className:Ls("description"),value:s.description},`text-${R}`);if(!T||!i)return null;const j=P[A];return j?(0,u.createElement)(iie,{...e,...j,key:`${A}-${R}`}):null})})};return(0,o.jsx)(Me,{children:(0,o.jsx)("div",{className:f,"data-id":m,ref:n,style:h,children:(0,o.jsx)(nn,{className:Ls("body"),onFocus:c,children:(0,o.jsxs)("div",{className:Ls("main-wrap"),children:[(0,o.jsxs)("div",{className:Ls("heading",{solo:!k}),children:[x&&(0,o.jsx)("div",{className:Ls("step"),children:(0,o.jsx)(I,{children:(0,o.jsx)(kn,{fallback:g,value:s.step})})}),(y||l)&&(0,o.jsx)("div",{className:Ls("title"),children:l?l(s):(0,o.jsx)(b,{children:(0,o.jsx)(je,{value:s.title})})})]}),(0,o.jsx)("div",{className:Ls("main"),children:N()})]})})})})},cie=e=>{const{id:t,settings:n,items:s,onEnter:r,enableVideoPlaybackSpeed:i,initiallyVisible:a,isLearner:c,labels:l,lessonId:d,renderTitle:h,renderDescription:m}=e,f=s[0],p=n.audioPosition,v=!(n.zoomOnClick??!0),g=n.headingLevel,x=(0,u.useCallback)((S,I)=>{r?.({id:t,payload:{activeIndex:S,itemId:I}})},[t,r]),y=(0,o.jsx)(aie,{audioPosition:p,blockId:t,disableZoom:v,enableVideoPlaybackSpeed:i,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`:"max(8px, 0.5em)"}});return c?(0,o.jsx)(ze,{animateBlockEntrance:!0,className:Ls("animate").toString(),initiallyVisible:a,isLearner:!0,children:y}):y},pe=V("block-survey"),Kg={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"}]},jI=Kg[5].map(e=>e.defaultLabel),y0=e=>{const t=AI(e.labels?.length);return Kg[t]??Kg[S0]},wI=(e,t)=>{const n=y0(e).findIndex(s=>s.value===t);return n===-1?void 0:n+1},lie=(e,t)=>y0(e)[t-1]?.value,die=2,uie=10,RI=5,hie=7,S0=3,mie=5,AI=e=>e===2||e===3||e===4||e===5?e:S0,qc=null,B2e=e=>(qc[e]??qc[S0]).map(t=>jI[t]),D2e=(e,t)=>{const n=AI(e?.length),s=qc[n]??qc[S0],r=qc[t],i=[...jI];return e?.forEach((a,c)=>{const l=s[c];l!==void 0&&(i[l]=a)}),r.map(a=>i[a])},ca=e=>Array.isArray(e)?e.length===0:!e||e.trim()==="",fie=(e,t,n)=>{const s=n?.items?.[e]?.items??{};return t.reduce((r,i)=>{const a=s?.[i.id]?.response;if(a==null)return r;if(i.questionType==="RATING"){const c=lie(i,Number(a));c!=null&&(r[i.id]=c)}else r[i.id]=String(a);return r},{})},pie=(e,t)=>t?.items?.[e]?.isSubmitted??!1,PI=(e,t)=>(0,o.jsx)(qe,{className:"block-survey__question-title",id:t,value:e.question}),gie=e=>(0,o.jsx)(qe,{value:e.startLabel}),vie=e=>(0,o.jsx)(qe,{value:e.endLabel}),Cie=(e,t)=>(0,o.jsx)(qe,{className:"block-survey__rating-label",value:e.labels?.[t]});function xie({animateBlockEntrance:e,blockId:t,initiallyVisible:n,isLearner:s,items:r=[],labels:i,onSurveySubmitted:a=dn,onSurveyPartialResponse:c=dn,lessonId:l,onStep:d,onSubmit:h,progress:m,renderLinearScaleEndLabel:f=vie,renderLinearScaleStartLabel:p=gie,renderQuestionTitle:v=PI,renderRatingLabel:g=Cie,settings:x={},title:y}){const S=rt(),I=Fn(),[b,T]=(0,u.useState)(()=>fie(t,r,m)),[L,E]=(0,u.useState)(()=>pie(t,m)),[k,N]=(0,u.useState)(!1),[P,A]=(0,u.useState)(!1),[R,j]=(0,u.useState)(new Set),[M,w]=(0,u.useState)(0),O=(0,u.useRef)(null),B=(0,u.useRef)(null),D=(0,u.useRef)(!1),_=(0,u.useCallback)(W=>{B.current=W},[]),{announcePolite:F}=Rs(),$=(0,Ve.A)(L),z=x.cardMode==="TRANSPARENT",K=`validation-error-${t}`,J=x.surveyWidth??76,Q=i0(J),U=(0,u.useCallback)((W,de)=>{T(we=>({...we,[W]:de}));const Ie=r.find(we=>we.id===W),ge=Ie?.questionType==="RATING"?wI(Ie,de):void 0;c({itemId:W,response:ge}),R.has(W)&&(j(ve=>{const fe=new Set(ve);return fe.delete(W),fe}),r.find(ve=>ve.id===W)&&r.filter(fe=>fe.isRequired&&fe.id!==W&&ca(b[fe.id])).length===0&&A(!1))},[R,r,c,b]),H=(0,u.useCallback)((W,de)=>{T(Ie=>({...Ie,[W]:de})),c({itemId:W,response:de}),R.has(W)&&(j(ge=>{const we=new Set(ge);return we.delete(W),we}),r.filter(ge=>ge.isRequired&&ge.id!==W&&ca(b[ge.id])).length===0&&A(!1))},[R,r,c,b]),G=(0,u.useCallback)((W,de)=>{T(Ie=>{const ge=Ie[W],we=Array.isArray(ge)?ge:[],ve=we.includes(de)?we.filter(fe=>fe!==de):[...we,de];return{...Ie,[W]:ve}}),R.has(W)&&(j(ge=>{const we=new Set(ge);return we.delete(W),we}),r.filter(ge=>ge.isRequired&&ge.id!==W&&ca(b[ge.id])).length===0&&A(!1))},[R,r,b]),Y=(0,u.useCallback)((W,de)=>{T(Ie=>({...Ie,[W]:de})),c({itemId:W,response:Number(de)}),R.has(W)&&(j(ge=>{const we=new Set(ge);return we.delete(W),we}),r.find(ge=>ge.id===W)&&r.filter(we=>we.isRequired&&we.id!==W&&ca(b[we.id])).length===0&&A(!1))},[R,r,c,b]),Z=(0,u.useCallback)((W,de,Ie)=>{if(Ie&&de.length>Ie)return;const ge=b[W]||"",we=Ie&&de.length===Ie&&ge.length<Ie;T(ve=>({...ve,[W]:de})),c({itemId:W,response:de}),we&&F(`Character limit reached. ${Ie} characters maximum.`),R.has(W)&&de.trim()!==""&&(j(fe=>{const ut=new Set(fe);return ut.delete(W),ut}),r.filter(fe=>fe.isRequired&&fe.id!==W&&ca(b[fe.id])).length===0&&A(!1))},[F,r,c,b,R]),q=(0,u.useCallback)(async()=>{if(!t||!l){console.error("Missing blockId or lessonId");return}N(!0);try{const W=r.flatMap(de=>{const Ie=b[de.id],ge=Array.isArray(Ie)?"":Ie||"",we=S(de.question)??"",ve={id:String(t),lessonId:String(l),itemId:de.id,questionTitle:In(String(we)),surveyTitle:In(String(S(y)??"")),isUnfinished:!1};if(de.questionType==="RATING"){const fe=wI(de,ge);if(fe===void 0)return[];const ut=y0(de),qt=Object.fromEntries(ut.map((Be,bt)=>[bt+1,S(de.labels?.[bt])??Be.defaultLabel]));return[{...ve,ratingOptions:qt,type:de.questionType,response:fe}]}if(de.questionType==="LINEAR_SCALE")return[{...ve,type:"LINEAR_SCALE",response:ge===""?void 0:Number(ge)}];if(de.questionType==="MULTIPLE_CHOICE"||de.questionType==="MULTIPLE_RESPONSE"){const fe=de.choices??[],qt=(Array.isArray(Ie)?Ie:Ie?[Ie]:[]).flatMap(Be=>{const bt=fe.find(Je=>Je.id===Be);return bt?[{id:bt.id,title:In(String(S(bt.title)??""))}]:[]});return[{...ve,type:de.questionType,response:qt}]}return[{...ve,type:de.questionType==="SHORT_RESPONSE"?"SHORT_RESPONSE":"LONG_RESPONSE",response:ge}]});window.Runtime?.reportUngradedAnswers&&await window.Runtime.reportUngradedAnswers(W),r.forEach(de=>d?.({id:de.id})),h?.(b),E(!0),a()}catch(W){console.error("Failed to submit survey:",W)}finally{N(!1)}},[t,l,r,b,d,h,y,S,a]),ee=(0,u.useCallback)(W=>{if(W.preventDefault(),k)return;const Ie=r.filter(ge=>ge.isRequired).filter(ge=>ca(b[ge.id]));if(Ie.length>0){A(!0),j(new Set(Ie.map(ge=>ge.id))),D.current=!0,w(ge=>ge+1);return}q()},[k,q,r,b]);(0,u.useEffect)(()=>{D.current&&B.current&&(B.current.focus(),D.current=!1)},[M]),(0,u.useEffect)(()=>{!$&&L&&O.current&&O.current.focus()},[L,$]);const se=(0,u.useRef)(null),re=(0,u.useRef)(new Map),le=(0,u.useCallback)((W,de)=>{const Ie=re.current;de?Ie.set(String(W),de):Ie.delete(String(W))},[]),Le=v!==PI;(0,u.useEffect)(()=>{if(!Le)return;const W=se.current;if(!W)return;const de=`.${String(pe("question-text"))}`,Ie=ge=>{if(ge.button!==0)return;const we=ge.target;if(!(we instanceof HTMLElement))return;const ve=we.closest(de);if(!(ve instanceof HTMLElement)||we.closest('[contenteditable="true"]'))return;const fe=ve.dataset.surveyItemId,ut=fe==null?void 0:re.current.get(fe);ut&&(ge.preventDefault(),ut.setFocus())};return W.addEventListener("mousedown",Ie),()=>W.removeEventListener("mousedown",Ie)},[Le]);const Te=(W,de)=>{const Ie=b[W.id]||"",ge=`survey-q-${W.id}`,we=`${ge}-char-count`,ve=`${ge}-error`,fe=R.has(W.id),ut=fe&&de===r.findIndex(We=>R.has(We.id));if(W.questionType==="LINEAR_SCALE"){const We=Math.min(uie,Math.max(die,W.scaleMax??mie)),sn=Array.from({length:We},(Fe,pt)=>pt+1),Xt=pe("linear-scale-options",{wide:We<=RI,medium:We>RI&&We<=hie}),Re=pe("linear-scale",{error:fe});return(0,o.jsxs)("fieldset",{"aria-describedby":fe?ve:void 0,className:pe("question",{error:fe}),ref:ut?_:void 0,tabIndex:-1,children:[(0,o.jsxs)("legend",{className:pe("question-text"),"data-survey-item-id":String(W.id),children:[v(W,ge,le),W.isRequired&&(0,o.jsxs)("span",{className:pe("required-indicator"),children:[" ",(0,o.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:i.surveyRequired})]})]}),(0,o.jsx)("div",{className:pe("interactive"),children:(0,o.jsxs)("div",{className:Re,children:[(0,o.jsx)("div",{className:pe("linear-scale-label"),children:p(W)}),(0,o.jsx)("div",{className:Xt,children:sn.map(Fe=>{const pt=Ie===String(Fe);return(0,o.jsxs)("label",{className:pe("linear-scale-option"),children:[(0,o.jsx)("span",{className:pe("linear-scale-number"),children:Fe}),(0,o.jsx)("div",{className:pe("linear-scale-indicator"),children:(0,o.jsx)(ae,{className:pe("linear-scale-dot",{active:pt}),"data-testid":pt?"linear-scale-dot-active":"linear-scale-dot",name:"circle-solid"})}),(0,o.jsx)("input",{checked:pt,className:pe("linear-scale-input"),name:`survey-${W.id}`,onChange:()=>Y(W.id,String(Fe)),type:"radio",value:String(Fe)})]},Fe)})}),(0,o.jsx)("div",{className:pe("linear-scale-label"),children:f(W)})]})}),fe&&(0,o.jsxs)("div",{className:pe("error-message"),id:ve,children:[(0,o.jsx)(ae,{"aria-hidden":"true",name:"alert-circle"})," ",i.surveyRatingRequired]})]},W.id)}if(W.questionType==="RATING"){const We=y0(W).map((Fe,pt)=>({value:Fe.value,label:W.labels?.[pt],icon:Fe.icon})),sn=pe("question",{error:fe}),Xt=pe("rating-options",{error:fe}),Re=fe?ve:void 0;return(0,o.jsxs)("fieldset",{"aria-describedby":Re,className:sn,ref:ut?_:void 0,tabIndex:-1,children:[(0,o.jsxs)("legend",{className:pe("question-text"),"data-survey-item-id":String(W.id),children:[v(W,ge,le),W.isRequired&&(0,o.jsxs)("span",{className:pe("required-indicator"),children:[" ",(0,o.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:i.surveyRequired})]})]}),(0,o.jsx)("div",{className:pe("interactive"),children:(0,o.jsx)("div",{className:Xt,children:We.map((Fe,pt)=>{const Es=Ie===Fe.value,xo=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("input",{checked:Es,className:pe("rating-input"),name:`survey-${W.id}`,onChange:()=>U(W.id,Fe.value),type:"radio",value:Fe.value}),(0,o.jsx)(ae,{"aria-hidden":"true",className:pe("rating-icon"),name:Fe.icon}),g(W,pt)]}),va=pe("rating-option",{selected:Es,error:fe,"two-options":We.length===2,"three-options":We.length===3,"four-options":We.length===4,"five-options":We.length===5});return z?(0,o.jsx)(nn,{cardMode:"WHITE",className:va,tag:"label",children:xo},Fe.value):(0,o.jsx)("label",{className:va,children:xo},Fe.value)})})}),fe&&(0,o.jsxs)("div",{className:pe("error-message"),id:ve,children:[(0,o.jsx)(ae,{"aria-hidden":"true",name:"alert-circle"})," ",i.surveyRatingRequired]})]},W.id)}if(W.questionType==="MULTIPLE_CHOICE"){const We=W.choices??[],sn=pe("choices",{error:fe});return(0,o.jsxs)("fieldset",{"aria-describedby":fe?ve:void 0,className:pe("question",{error:fe}),ref:ut?_:void 0,tabIndex:-1,children:[(0,o.jsxs)("legend",{className:pe("question-text"),"data-survey-item-id":String(W.id),children:[v(W,ge,le),W.isRequired&&(0,o.jsxs)("span",{className:pe("required-indicator"),children:[" ",(0,o.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:i.surveyRequired})]})]}),(0,o.jsx)("div",{className:pe("interactive"),children:(0,o.jsx)("ul",{className:sn,children:We.map(Xt=>{const Re=Ie===Xt.id;return(0,o.jsx)("li",{className:pe("choice"),children:(0,o.jsxs)("label",{className:pe("choice-option",{selected:Re}),children:[(0,o.jsx)("input",{checked:Re,className:pe("choice-input"),name:`survey-${W.id}`,onChange:()=>H(W.id,Xt.id),type:"radio",value:Xt.id}),(0,o.jsx)("span",{"aria-hidden":"true",className:pe("choice-indicator"),children:(0,o.jsx)(ae,{className:pe("choice-dot",{active:Re}),name:"circle-solid"})}),(0,o.jsx)("span",{className:pe("choice-text"),children:(0,o.jsx)(qe,{allowTabNavigation:!1,value:Xt.title})})]})},Xt.id)})})}),fe&&(0,o.jsxs)("div",{className:pe("error-message"),id:ve,children:[(0,o.jsx)(ae,{"aria-hidden":"true",name:"alert-circle"})," ",i.surveyMultipleChoiceRequired]})]},W.id)}if(W.questionType==="MULTIPLE_RESPONSE"){const We=W.choices??[],sn=b[W.id],Xt=Array.isArray(sn)?sn:[],Re=pe("choices",{error:fe});return(0,o.jsxs)("fieldset",{"aria-describedby":fe?ve:void 0,className:pe("question",{error:fe}),ref:ut?_:void 0,tabIndex:-1,children:[(0,o.jsxs)("legend",{className:pe("question-text"),"data-survey-item-id":String(W.id),children:[v(W,ge,le),W.isRequired&&(0,o.jsxs)("span",{className:pe("required-indicator"),children:[" ",(0,o.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:i.surveyRequired})]})]}),(0,o.jsx)("div",{className:pe("interactive"),children:(0,o.jsx)("ul",{className:Re,children:We.map(Fe=>{const pt=Xt.includes(Fe.id);return(0,o.jsx)("li",{className:pe("choice"),children:(0,o.jsxs)("label",{className:pe("choice-option",{selected:pt}),children:[(0,o.jsx)("input",{checked:pt,className:pe("choice-input"),name:`survey-${W.id}`,onChange:()=>G(W.id,Fe.id),type:"checkbox",value:Fe.id}),(0,o.jsx)("span",{"aria-hidden":"true",className:pe("choice-indicator",{checkbox:!0}),children:(0,o.jsx)(ae,{className:pe("choice-check",{active:pt}),name:"check"})}),(0,o.jsx)("span",{className:pe("choice-text"),children:(0,o.jsx)(qe,{allowTabNavigation:!1,value:Fe.title})})]})},Fe.id)})})}),fe&&(0,o.jsxs)("div",{className:pe("error-message"),id:ve,children:[(0,o.jsx)(ae,{"aria-hidden":"true",name:"alert-circle"})," ",i.surveyMultipleResponseRequired]})]},W.id)}const qt=Array.isArray(Ie)?"":Ie,Be=pe("question",{error:fe}),bt=pe("text-input",{error:fe}),Je=W.questionType==="SHORT_RESPONSE"||W.questionType==="LONG_RESPONSE"?W.maxLength:void 0,os=[fe?ve:null,Je?we:null].filter(Boolean).join(" ")||void 0;return(0,o.jsxs)("div",{className:Be,children:[(0,o.jsxs)("div",{className:pe("question-text"),"data-survey-item-id":String(W.id),children:[v(W,ge,le),W.isRequired&&(0,o.jsxs)("span",{className:pe("required-indicator"),children:[" ",(0,o.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:i.surveyRequired})]})]}),(0,o.jsx)("div",{className:pe("interactive"),children:(0,o.jsxs)("div",{className:pe("text-response"),children:[(0,o.jsx)("textarea",{"aria-describedby":os,"aria-invalid":fe?!0:void 0,"aria-labelledby":ge,"aria-required":W.isRequired?!0:void 0,className:bt,maxLength:Je,onChange:We=>Z(W.id,We.target.value,Je),ref:ut?_:void 0,rows:W.questionType==="LONG_RESPONSE"?4:2,value:qt}),Je&&(0,o.jsxs)("div",{className:pe("character-count"),children:[(0,o.jsxs)("span",{"aria-hidden":"true",children:[qt.length," / ",Je]}),(0,o.jsx)("span",{className:"visually-hidden-always",id:we,children:`${i.a11yBlockSurveyCharCount} ${qt.length} ${i.a11yPreposition} ${Je}`})]})]})}),fe&&(0,o.jsxs)("div",{className:pe("error-message"),id:ve,children:[(0,o.jsx)(ae,{"aria-hidden":"true",name:"alert-circle"})," ",i.surveyFreeResponseRequired]})]},W.id)};return(0,o.jsx)(ef,{...x,children:(0,o.jsx)(Me,{className:pe({presentation:I}),children:(0,o.jsx)(ze,{animateBlockEntrance:e,initiallyVisible:n,isLearner:s,children:(0,o.jsx)("div",{children:(0,o.jsx)(nn,{className:pe("container",{[`custom-width-${Q}`]:!0}),children:L?(0,o.jsx)("div",{className:pe("confirmation"),ref:O,tabIndex:-1,children:(0,o.jsxs)("p",{className:pe("confirmation-text"),children:[(0,o.jsx)(ae,{name:"circle-check-regular"})," ",i.surveyConfirmation]})}):(0,o.jsxs)("form",{noValidate:!0,onSubmit:ee,children:[y&&(0,o.jsx)(qe,{className:pe("title"),tagName:"h2",value:y}),(0,o.jsx)("div",{className:pe("questions"),ref:se,children:r.map((W,de)=>Te(W,de))}),(0,o.jsxs)("div",{className:pe("actions"),children:[(0,o.jsx)("div",{className:pe("validation-error",{visible:P}),id:`validation-error-${t}`,role:"alert",children:P&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ae,{"aria-hidden":"true",name:"alert-circle"})," ",i.surveyValidationError]})}),(0,o.jsx)("div",{className:`${pe("submit")} brand--ui`,children:(0,o.jsx)("button",{"aria-describedby":P?K:void 0,className:pe("submit-button"),"data-testid":"survey-submit-button",disabled:k,type:"submit",children:k?i.surveySubmitting:i.surveySubmit})})]})]})})})})})})}const Vs=V("block-team"),bie=e=>(0,o.jsx)(je,{className:Vs("name").toString(),value:e.name}),yie=e=>(0,o.jsx)(je,{className:Vs("role").toString(),value:e.description}),Sie=({item:e,index:t,renderName:n,renderDescription:s})=>{const r=e.avatar?.image,i=Pm(r);return(0,o.jsxs)("li",{className:Vs("card"),children:[(0,o.jsx)("div",{className:Vs("avatar-wrap"),children:i?(0,o.jsx)(An,{alt:jo(r?.alt),className:Vs("avatar").toString(),src:i}):(0,o.jsx)("div",{className:Vs("avatar",{placeholder:!0}).toString()})}),(0,o.jsxs)("div",{className:Vs("body"),children:[n(e,t),s(e,t)]})]})},Iie=e=>{const{defaultBackgroundColor:t,items:n,renderName:s=bie,renderDescription:r=yie}=e;return(0,o.jsx)(Me,{className:Vs().toString(),defaultBackgroundColor:t,children:(0,o.jsx)("div",{className:Vs("container"),children:(0,o.jsx)("ul",{className:Vs("list"),"data-count":n.length,children:n.map((i,a)=>(0,o.jsx)(Sie,{index:a,item:i,renderDescription:r,renderName:s},i.id))})})})},MI=V("block-text");function Tie({children:e,item:t,labels:n}){const s="media"in t?t.media:void 0,r=Pe(s)?.image,i=Tt(r),a=jo(r?.alt??""),l=Ut()?.settings,d=l?.images,h=l?.zoomOnClick,m=(0,u.useRef)(void 0);let f=(0,o.jsx)(An,{alt:a,"data-l10n-id":Mt(s),ref:m,src:i});return h&&(f=(0,o.jsx)(W5,{a11yNameButtonUnzoom:n?.a11yUnzoomImage,a11yNameButtonZoom:n?.a11yZoomImage,children:f})),(0,o.jsxs)("div",{className:MI("col"),children:[d&&r&&(0,o.jsx)("div",{className:MI("image"),children:f}),e]})}var Lie=C(49860);const zs=V("block-text"),Eie=class extends Lie.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,o.jsx)(je,{value:t})}renderText(e){const{labels:t,takingSnapshot:n,variant:s}=this.props,r=s?.includes("column"),i="paragraph"in e?e.paragraph:void 0;return r||n?(0,o.jsx)(Tie,{item:e,labels:t,children:(0,o.jsx)(qe,{value:i||""})}):(0,o.jsx)(qe,{className:zs("col"),value:i||""})}render(){const{blockId:e,columns:t,defaultBackgroundColor:n,heading:s,isLearner:r,items:i,labels:a,lessonId:c,media:l,settings:d,type:h,variant:m,renderText:f=this.renderTextDelegate,renderHeading:p=this.renderHeadingDelegate,getL10nValue:v}=this.props,g=v(l),x=Object.keys(g?.audio??{}).length>0,{audioPosition:y,entranceAnimation:S,cellPadding:I=1.5,tableWidth:b=76,textPadding:T=.8,textWidth:L=76}=d,E=m==="table",k=t===1,N=t>1,P=E?b:L,A=!E&&k,R=E,j=One(I),M=Bne(T),w=i0(P),O=zs({[h]:!A&&!R||N,[`${h}-custom-width`]:!N,[`${h}-custom-width-table-${w}`]:R,[`${h}-custom-width-text-${w}`]:A,[`heading-custom-text-padding-${M}`]:A,[`${h}-custom-cell-padding-${j}`]:R,"no-animation":!S,presentation:this.props.isPresentation,table:E}),B=t>2?zs("container-wide"):zs("container",{authoring:!r}),D=this.getHeadingComponent(),_=v(Array.isArray(l)?{}:l),F=Ts(_,y);return(0,o.jsx)(Me,{className:O.toString(),defaultBackgroundColor:n,children:(0,o.jsxs)("div",{className:B,"data-block-id":e,"data-block-text":"",children:[(0,o.jsx)("div",{className:zs("row"),children:s!==""?i.slice(0,1).map(($,z)=>(0,o.jsx)("div",{className:zs("col"),children:(0,o.jsx)("div",{className:zs("heading"),children:(0,o.jsx)(D,{children:p($)})})},"id"in $?$.id:z)):null}),F.renderOrder.map(($,z)=>{if($==="text")return(0,o.jsx)("div",{className:zs("row"),children:h!=="heading"?i.slice(0,t).map((K,J)=>(0,o.jsx)(u.Fragment,{children:f(K)},"id"in K?K.id:J)):null},`text-${z}`);if($==="audio"&&x){const K=F.renderOrder.indexOf("audio")<F.renderOrder.indexOf("text");return(0,o.jsx)("div",{className:zs("row",{media:!0,top:K,bottom:!K,hasHeading:m==="heading paragraph"||m==="subheading paragraph"}),children:(0,o.jsx)("div",{className:zs("col",{media:!0}),children:(0,o.jsx)(rn,{blockId:e,hasPadding:!1,index:e,item:{id:e,media:l},labels:a,lessonId:c,media:l,refs:`items:${e}`})})},`audio-${z}`)}})]})})}},or=e=>{const t=rt(),n=Fn();return(0,o.jsx)(Eie,{...e,getL10nValue:t,isPresentation:n})},OI=or,kie=e=>(0,o.jsx)(or,{columns:2,type:"twocol",...e}),Nie=e=>(0,o.jsx)(or,{columns:3,type:"threecol",...e}),jie=e=>(0,o.jsx)(or,{columns:4,type:"fourcol",...e}),wie=e=>(0,o.jsx)(or,{heading:"heading",type:"heading",...e}),Rie=e=>(0,o.jsx)(or,{heading:"subheading",type:"heading",...e}),Aie=e=>(0,o.jsx)(or,{heading:"heading",...e}),Pie=e=>(0,o.jsx)(or,{heading:"subheading",...e}),rr=V("timeline-card"),Mie=e=>{const{blockId:t,disableZoom:n,enableVideoPlaybackSpeed:s,isOverlayAudio:r,item:i,labels:a,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=i,f=Pe(i.media)??{},p=d==="audio"&&f.audio,v=d==="embed"&&f.embed,g=d==="image"&&f.image,x=d==="video"&&f.video;if(!p&&!v&&!g&&!x&&!(d==="image-with-audio"&&r))return;const S=f.embed?Xr(f.embed):void 0,I=!!f.image,b=!!f.audio,T=I?f.image.align:"center",L=rr("media",{audio:b&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${T}`]:r&&!!T,"audio-on-bottom":b&&!r&&h==="bottom",linkEmbed:S==="link",videoEmbed:S==="video",visual:!r&&I||!Dt()(f.video)}),E=m||{};return(0,o.jsx)("div",{className:L,children:(0,o.jsx)(rn,{blockId:t,enableVideoPlaybackSpeed:s,index:`${i.id}`,isOverlayAudio:r,item:i,labels:a,lessonId:c,lessonNumber:l,media:f,mediaType:r?void 0:d,opts:{disableZoom:n,...E}})})},Oie=e=>{const{headingLevel:t,innerRef:n,item:s,isActive:r,loadMedia:i,audioPosition:a,onFocus:c}=e,{id:l}=s,d=rr({active:r}),h=!!s.date,m=!!s.title,f=t||2,p=`h${f}`,v=`h${f+1}`,g=Pe(s.media)??{},x=Ts(g,a,!0,"timeline"),y=()=>{if(!g||!i)return null;const S={audio:{item:{...s,media:x.audioOnlyMedia||g},mediaType:"audio"},image:{item:{...s,media:x.imageOnlyMedia||g},mediaType:"image"},video:{item:{...s,media:x.videoOnlyMedia||g},mediaType:"video"},embed:{item:{...s,media:x.embedOnlyMedia||g},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,o.jsx)(o.Fragment,{children:x.renderOrder.map((I,b)=>{if(I==="text")return(0,o.jsx)(je,{className:rr("description"),value:s.description},`text-${b}`);const T=S[I];return T?(0,u.createElement)(Mie,{...e,...T,key:`${I}-${b}`}):null})})};return(0,o.jsx)("div",{className:d,"data-id":l,ref:n,children:(0,o.jsx)(nn,{className:rr("body"),onFocus:c,children:(0,o.jsx)("div",{className:rr("main-wrap"),children:(0,o.jsxs)("div",{className:rr("main"),children:[h&&(0,o.jsx)("div",{className:rr("date"),children:(0,o.jsx)(p,{children:(0,o.jsx)(kn,{value:s.date})})}),m&&(0,o.jsx)("div",{className:rr("title"),children:(0,o.jsx)(v,{children:(0,o.jsx)(kn,{value:s.title})})}),y()]})})})})},Xc=V("timeline"),Bie=e=>{const{audioPosition:t,disableZoom:n,enableVideoPlaybackSpeed:s,headingLevel:r,id:i,initiallyVisible:a,isBlock:c,isLearner:l,item:d,labels:h,lessonId:m,onFocus:f}=e,p=(0,o.jsx)(Oie,{audioPosition:t,blockId:i,disableZoom:n,enableVideoPlaybackSpeed:s,headingLevel:r,isActive:!0,item:d,labels:h,lessonId:m,lessonNumber:i,loadMedia:!0,onFocus:f});return c?l?(0,o.jsx)(ze,{animateBlockEntrance:!0,className:Xc("animate").toString(),initiallyVisible:a,isLearner:!0,children:p}):p:null},Die=e=>{const{id:t,items:n,labels:s,onEnter:r=Function.prototype,settings:i={}}=e,a=(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}=Oi(d.detail.path,["block","card"]);if(h!==t)return;const f=a.current.querySelector(`[data-id="${m}"]`);f&&!tu(f,"center")&&f.scrollIntoView({behavior:"instant",block:"center"})}return window.addEventListener(Ye,l),()=>{window.removeEventListener(Ye,l)}}),(0,o.jsx)("div",{"aria-label":s?.a11yBlockTimeline,className:"page__content-container",ref:a,role:"group",children:(0,o.jsx)("div",{className:Xc("wrapper"),children:(0,o.jsx)("div",{className:Xc(),children:(0,o.jsx)("ul",{className:Xc("container"),role:"list",children:n.map((l,d)=>(0,o.jsx)("li",{className:Xc("card-wrapper"),role:"listitem",children:Bie({index:d,item:l,onFocus:c,...e,disableZoom:!i.zoomOnClick,headingLevel:i.headingLevel,audioPosition:i.audioPosition})},d))})})})})},Fie=({animateBlockEntrance:e,blockId:t,enableVideoPlaybackSpeed:n,initiallyVisible:s,isLearner:r,items:i,labels:a,lessonId:c,settings:l})=>(0,o.jsx)(ze,{animateBlockEntrance:e,animateIn:"fadeIn",initiallyVisible:s,isLearner:r,children:(0,o.jsx)(Me,{type:"timeline",children:(0,o.jsx)(Die,{enableVideoPlaybackSpeed:n,id:t,initiallyVisible:s,isBlock:!0,isLearner:r,items:i,labels:a,lessonId:c,settings:l})})}),mo=V("block-sequence"),_ie=({label:e})=>(0,o.jsx)("span",{className:mo("indicator-label"),children:Pe(e)??""}),Hie=e=>(0,o.jsx)(_ie,{label:e.label}),Vie=e=>(0,o.jsx)(je,{className:mo("description").toString(),value:e.description}),Qg=e=>{const{color:t,defaultBackgroundColor:n,items:s,labels:r,renderDescription:i=Vie,renderLabel:a=Hie,variant:c}=e,l=c==="pyramid",d=c==="arrows"||c==="timeline",h=l?"figure":"ol",m=l?"div":"li",f=c==="arrows"?r?.a11yBlockArrowSequence||"Arrow sequence":c==="timeline"?r?.a11yBlockTimeline||"Timeline":void 0,p=He()?.theme?.accentContrast,v=t?{"--block-sequence-color":t,"--block-sequence-on-color":Wt({backgroundColor:t,contrast:p??void 0})}:void 0;return(0,o.jsx)(Me,{className:mo({[c]:!0}).toString(),defaultBackgroundColor:n,style:v,children:(0,o.jsx)("div",{"aria-label":d?f:void 0,className:mo("container"),role:d?"group":void 0,children:(0,o.jsx)(h,{"aria-label":l?r?.a11yBlockPyramid||"Pyramid diagram":void 0,className:mo("list"),"data-step-count":s.length,children:s.map((g,x)=>(0,o.jsxs)(m,{className:mo("step"),"data-step-id":g.id,children:[(0,o.jsxs)("div",{className:mo("indicator"),children:[l?(0,o.jsx)("div",{className:mo("label-surface"),children:a(g,x)}):a(g,x),l&&x===0&&(0,o.jsx)("span",{className:"visually-hidden-always",children:r?.a11yBlockPyramidTopLayer||"Top layer"}),l&&s.length>1&&x===s.length-1&&(0,o.jsx)("span",{className:"visually-hidden-always",children:r?.a11yBlockPyramidBaseLayer||"Base layer"})]}),(0,o.jsx)("div",{className:mo("text"),children:i(g,x)})]},g.id))})})})},zie=Pt()(null,["payload","result"]),$ie=e=>{if(e.meta?.thumbnail)return`${e.contentPrefix}/${e.meta.thumbnail}`},Uie=e=>e.meta?.version,BI=e=>e.src??null,Gie=e=>e.processing,Wie=Do()(["payload","result","completion"]),Kie=Pt()(!1,["payload","result","score"]),Qie=vd()((e,t)=>{if(!t)return!1;const{majorLimit:n,minorLimit:s}=e,[r,i]=t.split("."),a=parseInt(r)===n&&Number(i)>=s;return Number(r)>n||a}),Zie={mobile:"?forcemobile=1&devicepreview=1&phone=1&rise=true",tablet:"?forcemobile=1&devicepreview=1&rise=true"},Yie=e=>{const t=Fo()(e.split("-"));return Zie[t]},qie=Qie({majorLimit:3,minorLimit:13}),Xie=(e,t,n,s)=>{const r=t&&Yie(n),i=r?`${e}${r}`:`${e}?rise=true`;if(s){const a=i.includes("?")?"&":"?";return`${i}${a}locale=${s}`}return i},DI="about:blank",Jie="https://example.invalid",FI=new Set(["http:","https:"]),_I=e=>{if(e)try{const t=new URL(e);return FI.has(t.protocol)?t.href:void 0}catch{return}},eae=()=>_I(Ne("CDN_USER_CONTENT_URI"))??_I(window.location.origin)??Jie,HI=e=>{try{return FI.has(new URL(e,eae()).protocol)}catch{return!1}},VI=e=>{const t=Rn(e);return typeof t=="string"?t:""},tae=e=>{const t=VI(e);if(!t||t===DI||!HI(t))return;const n=VI(yt(t));return n&&n!==DI&&HI(n)?n:void 0};var nae=C(49860);class sae extends nae.Component{constructor(t){super(t),this.state={fullscreen:!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:s}=this.props,r=Fo()(n),i=t(r?.media)?.storyline??{},a=Uie(i);qie(a)||s(r)}canFullscreen(t){const{blockId:n,hasManySlBlocks:s}=this.props,{windowName:r}=t;return n===r||!s()}handleMessages(t){const{data:n}=t,{type:s}=n,r={"fullscreen:enter":this.handleFullscreenEnter,"fullscreen:exit":this.handleFullscreenExit,"course:update":this.handleCourseUpdate}[s];r&&r(n)}handleCourseUpdate(t){const{items:n,onFinishStoryline:s,onStep:r,blockId:i}=this.props,a=Fo()(n),{windowName:c}=t;if(i===c&&Wie(t)){const{score:l,success:d}=zie(t);if(Kie(t)){const h=l.scaled*100;s?.(i,d,!0,h)}else s?.(i,!0,!1);r(a)}}handleFullscreenEnter(t){this.canFullscreen(t)&&this.setState({fullscreen:!0})}handleFullscreenExit(t){this.canFullscreen(t)&&this.setState({fullscreen:!1})}render(){const{animateBlockEntrance:t,getL10nValue:n,initiallyVisible:s,isLesson:r,isLearner:i,isOnlyBlockInStep:a,items:c,labels:{a11yBlockStoryline:l},settings:d,takingSnapshot:h}=this.props,m=Fo()(c),f=n(m?.media)?.storyline??{},{mediaWidth:p="0"}=d,v=a?{}:{display:r&&!BI(f)?"none":"block"},g=X()("blocks-storyline__wrapper",{"blocks-storyline__wrapper--small":p==="0","blocks-storyline__wrapper--medium":p==="1","blocks-storyline__wrapper--full":p==="2","blocks-storyline__wrapper--snapshot":h});return(0,o.jsx)(Me,{className:"blocks-storyline",style:v,children:(0,o.jsx)(ze,{animateBlockEntrance:t,initiallyVisible:s,isLearner:i,children:(0,o.jsx)("div",{"aria-label":l,className:g,role:"group",children:h?this.renderThumbnail(f):this.renderStorylineBlock(f)})})})}renderStorylineBlock(t){return Gie(t)?this.renderProcessing():BI(t)?this.renderItem(t):this.renderEmpty()}renderThumbnail(t){const n=$ie(t),s=`${Ne("CDN_USER_CONTENT_URI")}/${n}`;return(0,o.jsx)("img",{alt:"Thumbnail",src:s})}renderEmpty(){const{renderEmpty:t}=this.props;return typeof t=="function"?t():null}renderItem(t){const{fullscreen:n}=this.state,{blockId:s,currentLocale:r,isLesson:i,previewType:a,settings:c}=this.props,{cornerRadius:l}=c,{src:d,meta:h,title:m}=t,{player:f}=h,p=Xie(d,i,a,r),v=tae(p),x={paddingBottom:`${f.height/f.width*100}%`,...l!=null&&{"--corner-radius":`${Number(l)}px`}},y=X()("blocks-storyline__item__iframe",{"blocks-storyline__item__iframe--fullscreen":n});return(0,o.jsx)("div",{className:"blocks-storyline__item",style:x,children:(0,o.jsx)("iframe",{allowFullScreen:!0,allowtransparency:"true",className:y,loading:"lazy",name:s.toString(),ref:S=>{this.iframe=S},src:v,title:m})})}renderProcessing(){const{renderProcessing:t}=this.props;return typeof t=="function"?t():null}}const oae=JA(ft(sae));var On=C(30467),rae=C(28565),zI=C(84748),iae=C(94556),$I=C.n(iae);const $2e=(e,t)=>n=>{const s=n.findIndex(i=>i.id==t);if(s===-1)return n;const r=n.slice();return r[s]=e(n[s]),r},U2e=e=>t=>t.filter(n=>n.id!=e),G2e=(e,t)=>n=>{const s=n.slice(),[r]=s.splice(e,1);return s.splice(t,0,r),s};function aae(e,t){const n=[];for(const s of t)if(n.push(s),e(s))break;return n}const cae=e=>e.some(t=>t<0),UI=e=>Array.from(Array(e)),GI=(e,t)=>UI(t).map(()=>e),lae=(e,t,n,s)=>UI(n).map((r,i)=>i===s?t:e),W2e=(e,t,n)=>n.some(s=>s[e]==t);function K2e(e,t,n){if(t>=n.length)return n.slice(0);const s=Math.floor(t/2),r=Math.ceil(t/2),i=e-s,a=e+r;return a>n.length?n.slice(n.length-t):i>=0?n.slice(i,a):n.slice(0,t)}const I0=(e,t)=>{const n=Math.min(e.length,t.length),s=new Array(n);for(let r=0;r<n;r++)s[r]=[e[r],t[r]];return s},Zg=(e,t,n=0)=>Math.round(Math.sqrt((1-n)*e**2+n*t**2)),dae=(e,t,n=0)=>Number(((1-n)*e+n*t).toFixed(2)),uae=([e=0,t=0,n=0,s=1])=>(0,Da.A)({space:"srgb",coords:[e/255,t/255,n/255],alpha:s},{format:"hex",collapse:!1}),WI=(e,t,n)=>{const s=Wo(e),r=Wo(t);if(s==null||r==null)return null;const[i,a,c,l]=s,[d,h,m,f]=r;return uae([Zg(i,d,n),Zg(a,h,n),Zg(c,m,n),dae(l,f,n)])},hae=matchMedia("(forced-colors: active)");function Jc(){return hae.matches}const mae=({activeIndex:e,values:t,opts:n})=>{const{background:s,variant:r}=Ut(),{chartColor:i,lineCurve:a}=fn(),c=En(),l=ac(),d=n?.defaultFontColor,h=Wn(),m=h===oe.IMAGE,p=Pe(s?.media)?.image?.overlayColor??vt.DARK,v=Jc();let g=i??l,x=c||"#fff";!i&&h===oe.ACCENT||i===x?g=d:m&&(g=p===vt.DARK?"#fff":"#000",x=p===vt.DARK?"#000":"#fff"),v&&(g="Highlight",x="Canvas");let y=g,S=Array(t.length).fill(g);if(e!=null&&!v){const I=m&&p===vt.LIGHT?.2:.7,b=WI(g,x,I)??g;y=b,S=lae(b,g,t.length,e)}return r==="bar"?{backgroundColor:S,data:t,hoverBackgroundColor:S}:{borderColor:y,cubicInterpolationMode:a==="linear"?"default":"monotone",data:t,lineTension:a==="linear"?0:void 0,pointBackgroundColor:S,pointBorderColor:S,pointBorderWidth:0,pointHitRadius:20,pointHoverBackgroundColor:g,pointHoverBorderColor:g,pointHoverBorderWidth:0,pointRadius:4}};function fae({activeIndex:e,children:t,opts:n,values:s}){const r=mae({activeIndex:e,opts:n,values:s});return t(r)}class pae extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,identifier:n,index:s,label:r,value:i}=this.props,a=t!=null&&t!==s,c=X()("block-chart__cartesianLegendItem",{"block-chart__cartesianLegendItem--unfocused":a});return(0,o.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,o.jsx)("dt",{className:"block-chart__cartesianLegendTerm",children:`${n}.`}),(0,o.jsxs)("dd",{className:"block-chart__cartesianLegendDefn","data-l10n-id":r.l10nId,children:[r.label,(0,o.jsx)("span",{className:"block-chart__cartesianLegendDefnPipe",role:"separator",children:"|"}),(0,o.jsx)("span",{className:"block-chart__cartesianLegendDefnVal",children:i})]})]})}}const gae=pae,vae=({activeIndex:e,labels:t,letters:n,onEvent:s,values:r})=>{const i=I0(n,I0(t,r));return i.length===0?null:(0,o.jsx)("dl",{className:"block-chart__cartesianLegend",children:i.map(([a,[c,l]],d)=>(0,o.jsx)(gae,{activeIndex:e,identifier:a,index:d,label:c,onEvent:s,value:l},a))})},Cae=(0,u.memo)(vae);function xae(e){const t=this.getLabelForValue(e),n=15,s=t.split(" "),r=[];let i="";return s.forEach(a=>{(i+a).length>n?(r.push(i),i=a):i+=(i.length>0?" ":"")+a}),r.push(i),r}const bae={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:xae,padding:10}},y:{beginAtZero:!0,border:{display:!1},grid:{drawTicks:!1},ticks:{maxTicksLimit:8,padding:15}}}};function yae({values:e,contrastColor:t}){const n=Ut(),s=Wn(),r=s===oe.IMAGE,i=(0,u.useMemo)(()=>cae(e),[e]);let a,c;const d=Pe(n?.background?.media)?.image?.overlayColor??vt.DARK,h=r&&d===vt.LIGHT;switch(s){case oe.LIGHT:case oe.GRAY:case oe.TINT:[a,c]=["#e1e1e1","#c9c9c9"];break;case oe.DARK:case oe.BLACK:case oe.IMAGE:[a,c]=["#ffffff80","#ffffffe9"];break;case oe.ACCENT:case oe.COLOR:{[a,c]=t==="#000"?["#00000080","#0000001a"]:["#ffffff80","#ffffffe9"];break}}return r&&h&&([a,c]=["#00000080","#0000001a"]),i||(c=a),[a,c]}const Sae=({onEvent:e,reduceMotion:t,shouldAnimate:n,values:s})=>{const r=En(),{customBackgroundColorContrast:i}=fn(),a=He(),c=Fn(),l=ac(),d=a?.theme?.accentContrast,h=Wn(),m=h===oe.IMAGE,f=Ut(),p=Jc(),v=fs(r),g=!i&&f?.family==="chart",x=i??Ee.DARK,y=g?v:x,I=Pe(f?.background?.media)?.image?.overlayColor??vt.DARK,b=m&&I===vt.LIGHT,T=h===oe.ACCENT||h===oe.COLOR,L=h===oe.ACCENT?l:r,E=h===oe.ACCENT?d:y,k=Wt({backgroundColor:L,contrast:E}),[N,P]=yae({values:s,contrastColor:k}),A=(0,u.useCallback)(j=>p&&m?b?"#000000":"#FFFFFF":j.tick.value===0?P:N,[N,p,P,m,b]);return(0,u.useMemo)(()=>{let j="#000";if(p)m?j=b?"#000000":"#FFFFFF":j="FieldText";else{switch(h){case oe.DARK:case oe.BLACK:case oe.IMAGE:j="#fff";break}T&&(j=k),m&&b&&(j="#000")}const M=n&&!t?1e3:0;let w,O;p?m?(w=j,O=b?"#FFFFFF":"#000000"):(w="Highlight",O="HighlightText"):(w=j,O=j==="#000"||j==="#000000"||j===Ee.DARK?"#FFFFFF":"#000000");const B=_h()(bae);return B.maintainAspectRatio=!c,B.animation.duration=M,B.defaultFontColor=j,B.onClick=e,B.onHover=e,B.plugins.tooltip.animation=!t,B.plugins.tooltip.backgroundColor=w,B.plugins.tooltip.titleColor=O,p&&!m?(B.scales.x.grid.color="FieldText",B.scales.y.grid.color="FieldText"):(B.scales.x.grid.color=N,B.scales.y.grid.color=A),B.scales.x.ticks.color=j,B.scales.y.ticks.color=j,p&&(m?B.plugins.legend.labels.color=b?"#000000":"#FFFFFF":B.plugins.legend.labels.color="FieldText"),B},[h,k,N,T,p,m,b,e,c,t,A,n])};function Iae(e){const{children:t,onEvent:n,reduceMotion:s,shouldAnimate:r,values:i}=e,a=Sae({onEvent:n,reduceMotion:s,shouldAnimate:r,values:i});return t(a)}var Tae=C(7173),Yg=C.n(Tae);const Lae=/<mark>|<\/mark>/gm,Eae=e=>t=>{const n=e(t.type).replace(Lae,"")??"";return{label:Yg()(n,{length:30}),l10nId:Mt(t?.type)}},kae=e=>parseFloat(e.value??"0"),KI=(e,t)=>({labels:e.map(Eae(t)),values:e.map(kae)});function Nae(e,t,n){const s=[];let r=0;return n.replace(e,function(...i){const a=i.length,c=i[0],l=i[a-1],d=i[a-2],h=l.slice(r,d),m=typeof t=="function"?t(...i):t;return s.push(h,m),r=d+c.length,""}),s.push(n.slice(r)),s}const jae=(e,t)=>(0,o.jsx)("mark",{children:e},t),wae=(e,t)=>Nae(new RegExp(hR()(t),"igm"),jae,e),QI=(e,t,n)=>{const s=Yg()(t,{length:e});return n?wae(s,n):s};function Rae(){let e=null;return function(n,s){if(s.clientWidth<=0)return null;e?.chart!==n&&(e=n.width>0&&n.height>0?{chart:n,ratio:n.height/n.width}:null);const r=s.clientWidth,i=r*(e?.ratio??n.height/n.width);return s.clientHeight>0&&i>s.clientHeight?{width:r,height:s.clientHeight}:{width:r,height:i}}}function Aae(){const[e,t]=u.useState(null),n=u.useRef(null),[s]=u.useState(Rae),{announcePolite:r}=Rs(),{labels:i}=fd()??{},{a11yBlockChartPreposition:a}=i??{},c=Fn(),l=u.useCallback(g=>{t(g)},[]),d=u.useCallback(()=>{const g=n.current;if(!g)return;const x=c?g.canvas?.parentElement:null;if(x&&g.width){const y=s(g,x);y&&g.resize(y.width,y.height)}else g.resize()},[s,c]),h=u.useCallback(()=>{n.current?.update()},[]),m=u.useCallback(()=>{d(),h()},[d,h]),f=u.useCallback(()=>{const g=n.current;if(g==null)return;const x=g.getDatasetMeta(0),y=x.data;if(!y?.length)return;const S=0,b=[{datasetIndex:0,element:x.data[S],index:S}];g.setActiveElements(b),g.tooltip?.setActiveElements(b,{x:0,y:0}),g.update(),l(S);const T=g.data.labels[S],L=g.data.datasets[0].data[S];setTimeout(()=>{r(`${S+1} ${a??""} ${y.length} - ${T}: ${L}`)},0)},[a,r,n,l]),p=u.useCallback(()=>{const g=n.current;if(g==null)return;const x=[];g.setActiveElements(x),g.tooltip?.setActiveElements(x,{x:0,y:0}),g.update(),l(null),r(null)},[r,n,l]),v=u.useCallback(g=>{const x=n.current;if(x==null)return;const y=x.getDatasetMeta(0),S=y.data;if(!S?.length)return;let I=!1,b=e;switch(g.key){case"ArrowLeft":I=!0,b=(e-1+S.length)%S.length;break;case"ArrowRight":I=!0,b=(e+1+S.length)%S.length;break;case"Home":I=!0,b=0;break;case"End":I=!0,b=S.length-1;break}if(I&&(g.stopPropagation(),g.preventDefault()),b!==e){const L=[{datasetIndex:0,element:y.data[b],index:b}];x.setActiveElements(L),x.tooltip?.setActiveElements(L,{x:0,y:0}),x.update(),l(b);const E=x.data.labels?.[b],k=x.data.datasets[0].data[b];r(`${b+1} ${a??""} ${S.length} - ${E}: ${k}`)}},[a,e,r,n,l]);return u.useEffect(()=>{d(),h()},[d,h]),u.useEffect(()=>{n.current&&n.current.update()},[e]),{activeIndex:e,chartRef:n,onBlur:p,onFocus:f,onKeyDown:v,onEvent:l,onResize:m}}function ZI(e){const t=n=>{const{activeIndex:s,chartRef:r,onBlur:i,onEvent:a,onFocus:c,onKeyDown:l,onResize:d}=Aae();return(0,o.jsx)(e,{...n,activeIndex:s,chartRef:r,onBlur:i,onEvent:a,onFocus:c,onKeyDown:l,onResize:d})};return t.displayName=`withChartEvents(${e.displayName||e.name})`,t}const Pae="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");class Mae 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 s=n.length?n[0].index:null;this.props.onEvent(s)};handleResize=()=>{requestAnimationFrame(()=>{this.props.onResize(),this.setLabelYTop()})};setLabelYTop=()=>{const t=this.props.chartRef.current;if(t){const{bottom:n,top:s}=t?.scales?.y??{};$I()(n)&&$I()(s)&&this.setState({labelYTop:`${(n+s)/2}px`})}};render(){const{props:{activeIndex:t,chartRef:n,getL10nValue:s,htmlIdBase:r,htmlIdTitle:i,onBlur:a,onFocus:c,onKeyDown:l,isDesktop:d,isVisible:h,items:m,itemsLabel:f,labels:p,onEvent:v,search:g,shouldAnimate:x,valuesLabel:y,variant:S},state:{labelYTop:I}}=this,b=QI(80,s(f),g),T=QI(30,s(y),g),L=KI(m,s),E=d?[]:Pae.slice(0,m.length),k=d?L.labels:E.map(M=>({label:M})),N=h?L.values:GI(0,m.length),P=`${r}-type`,A=`${r}-instructions`,R=k.map(M=>M.label),j=k.map(M=>M.l10nId).join(",");return(0,o.jsxs)("div",{className:"block-chart__cartesian",children:[(0,o.jsx)("p",{className:"visually-hidden-always",id:A,children:p?.a11yBlockChartInstructions}),(0,o.jsxs)("div",{className:"block-chart__cartesianChart",ref:this.wrapRef,children:[T&&ms(T)&&(0,o.jsxs)("div",{className:"block-chart__cartesianLabelY","data-l10n-id":Mt(y),style:{insetInlineEnd:I},children:[T,(0,o.jsx)("span",{className:"visually-hidden-always",children:p?.a11yBlockChartAxisY})]}),b&&ms(b)&&(0,o.jsxs)("div",{className:"block-chart__cartesianLabelX","data-l10n-id":Mt(f),children:[b,(0,o.jsx)("span",{className:"visually-hidden-always",children:p?.a11yBlockChartAxisX})]}),(0,o.jsx)(Iae,{onEvent:this.handleEvent,reduceMotion:vn(),shouldAnimate:x,values:N,children:M=>(0,o.jsx)(fae,{activeIndex:t,opts:M,values:N,children:w=>(0,o.jsxs)("div",{"aria-describedby":A,"aria-labelledby":`${i} ${P}`,className:"block-chart__cartesian-canvas-wrap",onBlur:a,onFocus:c,onKeyDown:l,role:"application",tabIndex:0,children:[(0,o.jsx)("div",{className:"visually-hidden-always",id:P,children:S==="bar"?p?.a11yBlockChartBar:p?.a11yBlockChartLine}),(0,o.jsx)(zI.Chart,{"aria-hidden":"true",data:{labels:R,datasets:[w]},"data-l10n-id":j,options:M,ref:n,role:"presentation",type:S,updateMode:"default"})]})})})]}),!d&&(0,o.jsx)(Cae,{activeIndex:t,labels:L.labels,letters:E,onEvent:v,values:N})]})}}function Oae(e){const t=ft(e),n=ZI(t);function s(r){const a=Ql()?.term??"",c=Fn(),l=kG(960);return(0,o.jsx)(n,{...r,isDesktop:c||l,search:a})}return s}const Bae=Oae(Mae),qg=({valueType:e,value:t,values:n})=>e==="numeric"?String(t):Bte(t/LS(n)),Dae=e=>{if(Jc())return"FieldText";const t=e.dataset.backgroundColor[e.dataIndex]??"#000";return fs(t)===Ee.DARK?At.DARK:At.LIGHT},Fae=(e,t,n)=>qg({valueType:e,value:t,values:n.dataset.data}),_ae=(e,t)=>{const{label:n,dataset:s,parsed:r}=t[0],i=qg({valueType:e,value:r,values:s.data});return`${n}: ${i}`},Hae=(e,t)=>{const n=t.dataIndex,s=t.dataset.data??[1],r=s[n],i=e==null&&r/LS(s)>=.06;return e===n||i},Vae=({activeIndex:e,onEvent:t,reduceMotion:n,settings:{valueType:s},shouldAnimate:r})=>{const i=Jc();return{animation:{animateRotate:r&&!n,duration:r&&!n?1e3:0},defaultFontFamily:'"lato", sans-serif',onClick:t,onHover:t,maintainAspectRatio:!1,plugins:{datalabels:{color:Dae,display:Hae.bind(null,e),font:{size:12,weight:"bold"},formatter:Fae.bind(null,s)},legend:{display:!1,labels:i?{color:"FieldText"}:void 0},tooltip:{animation:!n,boxPadding:"14px 10px",callbacks:{label:()=>null,title:_ae.bind(null,s)},caretPadding:10,cornerRadius:3,displayColors:!1,titleFont:{weight:"normal"},titleMarginBottom:0,titleSpacing:0,xAlign:"center",yAlign:"bottom",backgroundColor:i?"Highlight":At.LIGHT,titleColor:i?"HighlightText":At.DARK}},responsive:!1,rotation:130}},zae=({activeIndex:e,colors:t,hasBorder:n,values:s})=>{const r=En(),i=Jc(),a=e==null?t:t.map((c,l)=>l===e?c:WI(c,r||"#fff",.5)??c);return i?{backgroundColor:a,hoverBackgroundColor:a,borderWidth:.5,borderColor:"rgba(255, 255, 255, 0.3)",data:s}:{backgroundColor:a,hoverBackgroundColor:a,borderWidth:0,data:s,...n&&{borderWidth:1,borderColor:"#000"}}};function $ae({activeIndex:e,children:t,colors:n,hasBorder:s,values:r}){const i=zae({activeIndex:e,colors:n,hasBorder:s,values:r});return t(i)}class Uae extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,color:n,index:s,label:r,value:i}=this.props,a=t!=null&&t!==s,c=X()("block-chart__circleLegendItem",{"block-chart__circleLegendItem--unfocused":a});return(0,o.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,o.jsxs)("dt",{className:"block-chart__circleLegendTerm",children:[(0,o.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,o.jsx)("rect",{height:"10",rx:"1.5",width:"10"})}),(0,o.jsx)("span",{className:"block-chart__circleLegendText","data-l10n-id":r.l10nId,children:r.label})]}),(0,o.jsx)("dd",{className:"visually-hidden-always",children:i})]})}}const Gae=Uae,Wae=({activeIndex:e,colors:t,hasBorder:n,labels:s,onEvent:r,values:i,valueType:a="numeric"})=>{const c=I0(t,I0(s,i));if(c.length===0)return null;const l=X()("block-chart__circleLegend",{"block-chart__circleLegend--border":n});return(0,o.jsx)("dl",{className:l,children:c.map(([d,[h,m]],f)=>(0,o.jsx)(Gae,{activeIndex:e,color:d,index:f,label:h,onEvent:r,value:qg({valueType:a,value:m,values:i})},h.label))})},Kae=(0,u.memo)(Wae),Qae=(e,t)=>{const n=e.filter(i=>Number(i.value)>=0),s=KI(n,t),r=n.map(i=>i.color);return{...s,colors:r}};class Zae 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:s}=this.props;return Vae({activeIndex:t,onEvent:this.handleEvent,reduceMotion:vn(),settings:n,shouldAnimate:s})};handleEvent=(t,n)=>{const s=n.length?n[0].index:null;this.props.onEvent(s)};render(){const{activeIndex:t,backgroundColor:n,chartRef:s,getL10nValue:r,htmlIdBase:i,htmlIdTitle:a,onBlur:c,onFocus:l,onKeyDown:d,isVisible:h,items:m,labels:f,onEvent:p,settings:v}=this.props,{colors:g,labels:x,values:y}=Qae(m,r),S=h?y:GI(0,m.length),I=this.buildOptions(),b=`${i}-type`,T=`${i}-instructions`,L=x.map(k=>k.label),E=g.includes(n);return(0,o.jsxs)("div",{className:"block-chart__circle",children:[(0,o.jsx)("p",{className:"visually-hidden-always",id:T,children:f?.a11yBlockChartInstructions}),(0,o.jsx)("div",{className:"block-chart__circleChart",ref:this.wrapRef,children:(0,o.jsx)($ae,{activeIndex:t,colors:g,hasBorder:E,values:S,children:k=>(0,o.jsxs)("div",{"aria-describedby":T,"aria-labelledby":`${a} ${b}`,className:"block-chart__circle-canvas-wrap",onBlur:c,onFocus:l,onKeyDown:d,role:"application",tabIndex:0,children:[(0,o.jsx)("div",{className:"visually-hidden-always",id:b,children:f?.a11yBlockChartPie}),(0,o.jsx)(zI.Chart,{"aria-hidden":"true",data:{labels:L,datasets:[k]},options:I,ref:s,role:"presentation",type:"pie",updateMode:"default"})]})})}),(0,o.jsx)(Kae,{activeIndex:t,colors:g,hasBorder:E,labels:x,onEvent:p,values:S,valueType:v?.valueType})]})}}function Yae(e){const t=JO()(e),n=ZI(t);return ft(n)}const qae=Yae(Zae);On.Chart.register(On.ArcElement,On.BarController,On.BarElement,On.CategoryScale,rae.default,On.Legend,On.Legend,On.LineController,On.LineElement,On.LinearScale,On.PieController,On.PointElement,On.Title,On.Tooltip);const Xae=e=>e.displayName||e.name||"Component";class Jae extends u.PureComponent{id;constructor(t){super(t),this.state={isVisible:!1},this.id=(0,ch.uniqueId)("chart-")}componentDidMount(){this.setState({isVisible:!this.props.animateBlockEntrance||vn()})}handleAnimationEnd=()=>{this.setState({isVisible:!0})};renderTitle=()=>{const{title:t}=this.props;return(0,o.jsx)(je,{value:t})};render(){const{props:{animateBlockEntrance:t,children:n,editable:s,initiallyVisible:r,isLearner:i,items:a,itemsLabel:c,labels:l,settings:d,title:h,valuesLabel:m,variant:f,renderTitle:p=this.renderTitle},state:{isVisible:v}}=this,g=d?.headingLevel,x=g?`h${g}`:"h2",y=this.id,S=`${y}-title`;return(0,o.jsx)(Me,{className:this.props.isPresentation?"block-chart--presentation":void 0,type:"chart",children:(0,o.jsx)(ze,{afterAnimatedIn:this.handleAnimationEnd,animateBlockEntrance:t,initiallyVisible:r,isLearner:i,children:(0,o.jsx)("div",{className:"block-chart__container",children:(0,o.jsx)("div",{className:"block-chart__row",children:(0,o.jsx)("div",{className:"block-chart__rowInner",children:(0,o.jsxs)("figure",{children:[(!s&&h||s)&&(0,o.jsx)("figcaption",{children:(0,o.jsx)(x,{className:"block-chart__title",id:S,children:p()})}),(0,o.jsx)("div",{className:"block-chart__chart",children:u.cloneElement(u.Children.only(n),{htmlIdBase:y,htmlIdTitle:S,isVisible:v,items:a,itemsLabel:c,labels:l,settings:d,shouldAnimate:t,valuesLabel:m,variant:f})})]})})})})})})}}const ece=e=>{const t=Fn();return(0,o.jsx)(Jae,{...e,isPresentation:t})};function YI(e){const t=n=>(0,o.jsx)(ece,{...n,children:(0,o.jsx)(e,{})});return t.displayName=`ChartWrap(${Xae(e)})`,t}const qI=YI(Bae),tce=YI(qae),nce=e=>e.filter(t=>typeof t=="object"&&t!==null&&"variant"in t&&t.variant==="storyline").length<1;function sce(e){const t=Up(e);return(0,u.createElement)(yX,{...t,number:e.dividerNumber})}function oce(e){const t=Up(e),{items:n}=e;return(0,u.createElement)(oae,{...t,hasManySlBlocks:()=>n&&nce(n),isLesson:!0})}const rce=eq({"text/paragraph":{Component:OI},"text/table":{Component:OI},"text/heading paragraph":{Component:Aie},"text/subheading paragraph":{Component:Pie},"text/heading":{Component:wie},"text/subheading":{Component:Rie},"text/two column":{Component:kie},"text/three column":{Component:Nie},"text/four column":{Component:jie},"text/code":{Component:E5},"impact/a":{Component:eie},"impact/b":{Component:tie},"impact/c":{Component:nie},"impact/d":{Component:sie},"impact/note":{Component:oie},"quote/a":{Component:CI},"quote/b":{Component:are},"quote/c":{Component:cre},"quote/d":{Component:lre},"quote/background":{Component:dre},"quote/carousel":{Component:hre},"quote/stacked":{Component:mre},"list/numbered":{Component:use},"list/checkboxes":{Component:hse},"list/bulleted":{Component:mse},"list/icon":{Component:fse},"image/hero":{Component:Zee},"image/full":{Component:vg},"image/text aside":{Component:Xee},"image/text overlay":{Component:ete},"image/banner":{Component:tte},"gallery/centered":{Component:hS},"gallery/two column":{Component:fg},"gallery/three column":{Component:fg,propsBefore:()=>({width:3})},"gallery/four column":{Component:fg,propsBefore:()=>({width:4})},"divider/divider":{Component:bX},"divider/numbered divider":{render:sce},"divider/spacing divider":{Component:SX},"360/storyline":{render:oce},"interactive/accordion":{Component:cte},"interactive/tabs":{Component:xte},"interactive-fullscreen/labeledgraphic":{Component:cse},"interactive-fullscreen/process":{Component:nre},"interactive-fullscreen/scenario":{Component:Dre},"interactive-fullscreen/sorting":{Component:Zre},"interactive-fullscreen/timeline":{Component:Fie},"buttons/button":{Component:eX},"buttons/button stack":{Component:tX},"flashcard/flashcard":{Component:cS},"flashcard/stack":{Component:cS,propsBefore:()=>({stack:!0})},"knowledge/knowledge":{Component:oa},"continue/continue":{Component:xX},"multimedia/step":{Component:cie},"multimedia/audio":{Component:Voe},"multimedia/video":{Component:Dg},"multimedia/ai_avatar":{Component:Dg},"multimedia/custom video":{Component:Dg,propsAfter:()=>({type:"customVideo"})},"multimedia/embed":{Component:Uoe},"multimedia/attachment":{Component:Koe},"multimedia/code":{Component:E5},"knowledgeCheck/multiple choice":{Component:oa},"knowledgeCheck/multiple response":{Component:oa},"knowledgeCheck/fillin":{Component:oa},"knowledgeCheck/matching":{Component:oa},"knowledgeCheck/draw from question bank":{Component:oa},"chart/bar":{Component:qI},"chart/line":{Component:qI},"chart/pie":{Component:tce},"ai-scenario/ai-scenario":{Component:Aq},"mondrian/mondrian":{Component:yse},"survey/survey":{Component:xie},"team/people":{Component:Iie},"sequence/arrows":{Component:Qg},"sequence/pyramid":{Component:Qg},"sequence/timeline":{Component:Qg},"html/inline":{Component:Yp},"html/cdn":{Component:Yp},"videoCheckpoint/videoCheckpoint":{Component:null},"textToVideo/textToVideo":{Component:i5},"pending/pending":{Component:null},"spacer/spacer":{Component:null}},{extras:{"html/vibe":{Component:Yp},"gallery/full":{Component:hS}},prepareProps:Up});function ice(e){return(0,o.jsx)(Bu,{block:e,children:(0,o.jsx)(rce,{...e})})}const ace=1e3,cce=150,lce="onscrollend"in window;function XI(e,t){const n=e.getBoundingClientRect(),s=t?.getBoundingClientRect(),r=s?.top??0,i=s?.bottom??window.innerHeight,a=(i-r)*.02,c=n.bottom>r-a&&n.top<i+a,l=n.bottom<r;return c||l}const Xg={entries:new Map,scrollHandler:null,scrollEndHandler:null,scrollTarget:null,debounceTimer:null,register(e,t,n){const s=this.entries.size===0,r=t??window;if(this.entries.set(e,{el:e,scrollableParent:t,callback:n}),s){this.scrollTarget=r;const i=()=>{this.debounceTimer!=null&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.checkAll(),cce)};lce?(this.scrollEndHandler=()=>this.checkAll(),this.scrollTarget.addEventListener("scrollend",this.scrollEndHandler),this.scrollHandler=i,this.scrollTarget.addEventListener("scroll",this.scrollHandler)):(this.scrollHandler=i,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())XI(t.el,t.scrollableParent)&&e.push(t);e.forEach(t=>t.callback())})}},JI=({active:e=!0,children:t,onViewed:n})=>{const s=(0,u.useRef)(null),r=(0,u.useRef)(!1),i=(0,u.useRef)(n);return(0,u.useEffect)(()=>{i.current=n},[n]),(0,u.useEffect)(()=>{const a=s.current;if(!e||!a||r.current)return;let c=!0;const l=tp(),d=()=>{!c||r.current||(r.current=!0,h.disconnect(),clearTimeout(m),Xg.unregister(a),i.current())},h=new IntersectionObserver(([f])=>{f!=null&&(f.isIntersecting||f.intersectionRatio>0)&&d()},{root:l,rootMargin:jv,threshold:0});h.observe(a);const m=setTimeout(()=>{!r.current&&XI(a,l)&&d()},ace);return Xg.register(a,l,d),()=>{c=!1,h.disconnect(),clearTimeout(m),Xg.unregister(a)}},[e]),(0,o.jsx)("div",{ref:s,children:t})},dce=(0,u.memo)(function({active:t=!0,block:n,children:s,completesFirstItemOnView:r=!1,onViewed:i,onStep:a}){const c=(0,u.useCallback)(d=>{d!=null&&"id"in d&&d.id!=null&&!d.isDone&&a(d.id)},[a]),l=(0,u.useCallback)(()=>{if(!n.items?.length){i();return}if(!n.requiresInteraction){i();return}r&&n.items.length>0&&c(n.items[0])},[n,r,c,i]);return(0,o.jsx)(JI,{active:t,onViewed:l,children:u.cloneElement(u.Children.only(s),{onStep:c})})}),uce=e=>{window.parent.postMessage({type:"preview:lessonChange",data:e},"*")};function Jg(){const e=ln();return(0,u.useCallback)(t=>{e(Ln(t))},[e])}function hce(e){const t=Jg(),n=(0,u.useRef)(null);return(0,u.useEffect)(()=>{e&&n.current!==e&&(uce(e),n.current=e)},[e]),{handleNavigate:t}}const mce="draw from question bank",e1=e=>{const{animateBlockEntrance:t,backgroundBefore:n,block:s,className:r,defaultBackgroundColor:i,hideBlock:a,index:c,isLastBlock:l,isOnlyBlockInStep:d,lessonId:h,loadMedia:m,observeProgress:f=!0,onContinue:p}=e,{blockId:v,family:g,items:x=[],variant:y}=s,S=`block-${v}`,I=nt(),b=IP(),T=LP(),L=xe(),E=hf(),k=Nz(),N=cu()?.prefersKeyboardNavigation,P=CP(),A=bP(),R=Jg(),j=rd(h),M=D3("block"),w=tO({blockId:String(v),lessonId:String(h)}),O=(0,u.useCallback)(W=>{const de=y===mce?x[0]:Mr()(at()("id",W),x);I(mi({blockId:v,lessonId:h,items:[de]})),g==="continue"&&p(v,W)},[v,I,g,x,h,p,y]),B=(0,u.useCallback)(()=>{I(mi({blockId:v,lessonId:h,items:x}))},[v,I,x,h]),D=(0,u.useCallback)(W=>{const de=x?.[0],Ie=de&&"id"in de?de.id:void 0;Ie&&I(U7({blockId:v,itemId:Ie,lessonId:h,audioVideoPlayhead:W}))},[v,I,h,x]),_=(0,u.useCallback)(()=>{I(K7({blockId:v,lessonId:h,isSubmitted:!0}))},[v,I,h]),F=(0,u.useCallback)(({itemId:W,response:de})=>{I(W7({blockId:v,itemId:W,lessonId:h,response:de}))},[v,I,h]),$=(0,u.useCallback)(W=>{I(V7(W))},[I]),z=(0,u.useCallback)(()=>({itemId:W,isCorrect:de})=>I(G7({itemId:W,lessonId:h,blockId:v,isCorrect:de})),[v,I,h]),K=(0,u.useCallback)(()=>()=>I($7({lessonId:h,blockId:v})),[v,I,h]),J=Rc(),Q=(0,u.useCallback)(W=>{I(g6(W))},[I]),U=(0,u.useCallback)(()=>{I(Ac())},[I]),H=(0,u.useCallback)(W=>{I(Tp(W))},[I]),G=(0,u.useCallback)(()=>{I(jr(h))},[I,h]),Y=(0,u.useCallback)(()=>{I(T?jr(h):mi({blockId:v,lessonId:h,items:[]}))},[v,I,T,h]);if(!L)return null;const Z={...s,animateBlockEntrance:t,className:r?.toString(),color:P,defaultBackgroundColor:i,dividerNumber:w,enableVideoPlaybackSpeed:A,handleNavigate:R,onExit:G,onComplete:Y,onFinishStoryline:SN,onSurveySubmitted:_,onSurveyPartialResponse:F,initiallyVisible:c===0,isHidden:a,isLastBlock:l,isLearn:!0,isLearner:!0,isOnlyBlockInStep:d,isVideoTraining:b,labels:L,lessonId:h,loadMedia:m,onCardDrop:z,onReplay:K,onRetryAttempt:$,onTranscriptClose:U,onTranscriptOpen:Q,onTranscriptUpdate:H,partnerContent:E,prefersKeyboardNavigation:N,previewType:k,progress:j,recordMediaPlayheadPosition:D,transcriptPanelState:J},{completesFirstItemOnView:q,trackExit:ee,trackSteps:se}=Pg(s),re=Cz(h,v),le=["noOutline",r,M?"comment-preview-anchor":void 0,a?"blocks-lesson__block-wrapper--hidden":void 0].filter(Boolean).join(" "),Le=(0,o.jsx)(ice,{...Z});let Te;return ee?Te=Le:se?Te=(0,o.jsx)(dce,{active:f,block:s,completesFirstItemOnView:q,onStep:O,onViewed:B,children:Le}):Te=(0,o.jsx)(JI,{active:f,onViewed:B,children:Le}),(0,o.jsxs)("div",{className:le,"data-block-family":g,"data-block-id":v,"data-change-path":re,children:[n,Te,(0,o.jsx)(Yn,{anchor:pW(v),label:"Comments on block"})]},S)},T0=Pt(),t1=ii(),fce=et(),pce=({slides:e,currentSlide:t},n)=>(t.push(n),n.settings?.attachedToNextBlock||(e.push(t),t=[]),{slides:e,currentSlide:t}),eT=e=>{const{slides:t}=Rp()(pce,{slides:[],currentSlide:[]},e);return t};function n1(e,t,n,s){if(e.length){const i=e.slice(-1)[0];if(!ir(i.id,n))return e}const r=aae(gce(n),t.slice(e.length)).map(vce(s));return r.length?n1(e.concat(r),t,n,s):e}const ir=(e,t)=>e==null?!1:T0(!1,["items",e,"isComplete"],t),gce=e=>({family:t,items:n})=>{const s=T0({},0,n);return t==="continue"&&!ir(s.id,e)},vce=e=>(t,n,s)=>{const r=s.slice(-1)[0]||{},{family:i}=r,a=i==="continue"?T0(void 0,["items",0,"type"],r)??e?.blockContinueCompletionType??!1:!1;return $a(t)?t1(t,{requiresInteraction:!0}):t.variant!=="continue"&&(!a||a==="completeBlock"&&n!==s.length-1&&n!==s.length-2)?t:t1(t,{requiresInteraction:!0})};function tT({id:e,...t},n,s,r,i){if(t.family==="continue"){const a=T0(void 0,["items",0,"type"],t)??i?.blockContinueCompletionType??"";return t1({blockId:e,...t},{skipContinue:r,canContinue:Cce({continueType:a,blocks:n,progress:s}),lessonProgress:s,isComplete:ir(e,s)})}return{blockId:e,...t}}const Cce=({continueType:e,blocks:t,progress:n})=>{switch(e){case"completeAll":return hn()(us()(t),Sce(n));case"completeBlock":return t.length===0?!0:ir(Ice(t),n);default:return!0}},xce=e=>is()(fce("items",e)??{}),bce=e=>yce(xce(e??{})),yce=e=>So()(t=>at()("isComplete",!0,t),e),Sce=e=>us()(bce(e)),Ice=e=>Il()(e)?.id,Tce=({family:e,variant:t,isComplete:n,requiresInteraction:s})=>e==="continue"&&t==="continue"&&!!s&&!n,Lce=(e,t)=>!!e.find(s=>{if($a(s))return s.id==null?!0:!t?.items?.[s.id]?.isComplete}),Ece=e=>e.length===0?!1:ub()(t=>!!Tce(t),e),kce=(e,t)=>e.length===0?!1:Lce(e,t),Nce=({blocks:e,lessonProgress:t})=>e.findIndex(n=>{const s=n.id==null?void 0:t?.items?.[n.id],r=s&&s?.isComplete==null;return $a(n)&&r}),nT=({blocks:e,lessonProgress:t,currentBlockIndex:n})=>{const s=Nce({blocks:e,lessonProgress:t});return s>-1&&n>s},sT=(e,t,n)=>{const s=e.findIndex(r=>r.id===t);return s<=0?[]:e.slice(0,s).filter(r=>r.family==="continue"&&!ir(r.id,n))},jce=(e,t)=>{const n=["embed","video","full"],s=["interactive","interactive-fullscreen","image","flashcard","gallery","chart","knowledgeCheck"];return e!=null&&s.includes(e)||t!=null&&n.includes(t)};function oT(e){const t=(0,u.useRef)(e);t.current=e,(0,u.useEffect)(()=>{const n=s=>{if(s.defaultPrevented||s.button!==0||s.altKey||s.ctrlKey||s.metaKey||s.shiftKey)return;const r=s.target;if(!(r instanceof Element))return;const i=r.closest("a")?.getAttribute("href");if(i==null)return;const a=EQ(i);a!=null&&t.current(a)};return document.addEventListener("click",n),()=>document.removeEventListener("click",n)},[])}function wce(e,t,n){if(!e||!t||!Vl())return!1;if(nR(n,{l10n:t}))return!0;const{locales:s,defaultLocale:r}=t,i=s.find(a=>a.locale===r)?.id;return!!(i&&i!==e)}function rT(){const{currentLocale:e}=ot(),t=ue(s=>s.course?.defaultLocaleId),n=ue(s=>s.l10n);return wce(t??null,n,e)}const Rce=e=>e==="center"||e==="end"||e==="nearest"||e==="start",Ace=e=>tt(e)&&typeof e.lessonId=="string"&&(typeof e.itemId=="string"||e.itemId==null)&&(e.align===void 0||Rce(e.align)),Pce=e=>tt(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string";function Mce({animateBlockEntrance:e,blocks:t,className:n,isLessonEntering:s,isLessonExiting:r,lessonId:i,loadMedia:a,observeProgress:c=!0,nextLesson:l}){const d=rd(i),h=Jg(),m=(0,u.useRef)(null),f=(0,u.useRef)(null),p=(0,u.useRef)(null),[v,g]=(0,u.useState)(null),[,x]=(0,u.useState)(0),[y,S]=(0,u.useState)(!1),I=(0,u.useRef)(null),[b]=(0,Ae.ok)(),T=b.get(wc),L=ue(F=>F.course?.theme),E=ue(e2),k=rT()||y,N=(0,u.useRef)(r),P=(0,u.useRef)(s),A=(0,u.useRef)(i),R=(0,u.useRef)(t);N.current=r,P.current=s,A.current=i,R.current=t;const j=(0,u.useCallback)((F,$="start")=>{const z=R.current.find(K=>String(K.id)===String(F));return z==null?!1:(I.current?.(),p.current={blockId:z.id,align:$},g(z.id),x(K=>K+1),!0)},[]);oT(({lessonId:F,blockId:$})=>{F===A.current&&j($)}),(0,u.useEffect)(()=>{const F=$=>{if($.origin!==window.location.origin)return;(Array.isArray($.data)?$.data:[$.data]).forEach(K=>{tt(K)&&K.type==="preview:lessonUpdate"&&S(!0)})};return window.addEventListener("message",F),()=>window.removeEventListener("message",F)},[]),(0,u.useEffect)(()=>{const F=$=>{if(N.current||!($ instanceof CustomEvent))return;const z=$.detail;if(!Ace(z)||z.lessonId!==A.current)return;const K=z.itemId,J=z.align??"nearest";if(K==null){I.current?.(),m.current?.closest(".page")?.scrollIntoView({behavior:"smooth",block:"start"});return}j(K,J)};return window.addEventListener(Ye,F),()=>window.removeEventListener(Ye,F)},[j]),(0,u.useEffect)(()=>{I.current?.(),(T==null||!j(T))&&(p.current=null,g(null))},[T,i,j]),(0,u.useEffect)(()=>()=>I.current?.(),[]),(0,u.useEffect)(()=>{if(k||v==null)return;sT(t,v,d).forEach($=>{mn(mi({blockId:$.id,items:$.items??[],lessonId:i}))})},[k,v,t,d,i]),(0,u.useLayoutEffect)(()=>{const F=p.current;if(F==null||P.current)return;const $=document.querySelector(".page-wrap"),z=$?.querySelector(`[data-block-id="${F.blockId}"]`);$==null||z==null||(p.current=null,F.align==="start"?M($,z):z.scrollIntoView({behavior:"smooth",block:F.align}))}),(0,u.useLayoutEffect)(()=>{w()});function M(F,$){I.current?.();const z=()=>{let Z=0,q=$;for(;q instanceof HTMLElement&&q!==F&&F.contains(q);)Z+=q.offsetTop,q=q.offsetParent;return Z},K=()=>{const Z=z();Math.abs(F.scrollTop-Z)>1&&(F.scrollTop=Z)};let J=0,Q=!1;const U=()=>{Q||(Q=!0,cancelAnimationFrame(J),window.clearTimeout(G),F.removeEventListener("wheel",U,H),F.removeEventListener("touchstart",U,H),F.removeEventListener("pointerdown",U,H),window.removeEventListener("keydown",U,!0),I.current===U&&(I.current=null))},H={capture:!0,passive:!0};F.addEventListener("wheel",U,H),F.addEventListener("touchstart",U,H),F.addEventListener("pointerdown",U,H),window.addEventListener("keydown",U,!0);const G=window.setTimeout(U,2500),Y=()=>{Q||(K(),J=requestAnimationFrame(Y))};I.current=U,J=requestAnimationFrame(Y)}function w(){if(f.current){const $=t.findIndex(K=>K.id===f.current)+1,z=t[$]?.id??null;if(z){const K=document.querySelector(".page-wrap"),J=K?.querySelector(`[data-block-id="${z}"]`),Q=J?J.getBoundingClientRect().top:0;$r.Ay.animateScroll.scrollTo(Q+(K?.scrollTop??0),{smooth:!0,containerId:"page-wrap"})}f.current=null}}const O=(0,u.useCallback)((F,$)=>{ir($,d)||(f.current=F),F===t[t.length-1]?.id&&l&&(mn(jr(i)),h(l))},[h,t,i,d,l]),B=k?t:(()=>{const F=n1([],t,d,L);return Array.isArray(F)?F.filter($=>tt($)&&(typeof $.id=="string"||typeof $.id=="number")):t})(),D=v==null?-1:B.findIndex(F=>F.id===v),_=["blocks-lesson",n,E?"blocks-lesson--one-page":void 0].filter(Boolean).join(" ");return(0,o.jsx)("section",{className:_,ref:m,children:B.map((F,$,z)=>{const K=tT(F,z.slice(0,-1),d,k,L);if(!Pce(K))return null;const J=K,Q=z.length-1,H=J.family==="continue"?F.id===t[t.length-1]?.id:$===Q,G=D!==-1&&$<=D,Y=!y&&!G&&nT({blocks:B,lessonProgress:d,currentBlockIndex:$});return(0,o.jsx)(e1,{animateBlockEntrance:e,block:J,hideBlock:Y,index:$,isLastBlock:H,lessonId:i,loadMedia:a,observeProgress:c,onContinue:O},J.blockId)}).filter(JY.A)})}const s1=Mce;function L0({children:e,lessonId:t}){const n=(0,u.useRef)(null),s=(0,u.useCallback)(r=>{const i=r.detail?.lessonId;i!=null&&String(i)!==String(t)||n.current?.focus?.()},[t]);return AW(s),(0,o.jsx)("main",{className:"lesson-main",ref:n,tabIndex:-1,children:e})}const Oce=({animateBlockEntrance:e,data:t,lessonHeader:n,lessonHeaderWrapClasses:s,lessonHeaderWrapStyles:r,loadMedia:i,observeProgress:a,isLessonEntering:c,isLessonExiting:l,nextLesson:d,hideLessonHeaders:h})=>{const{id:m,items:f}=t,p={animateBlockEntrance:e,blocks:f,lessonId:m,loadMedia:i,observeProgress:a,isLessonEntering:c,isLessonExiting:l,nextLesson:d};return(0,o.jsx)("div",{className:"page","data-page":!0,children:(0,o.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,o.jsxs)(L0,{lessonId:m,children:[(0,o.jsx)("div",{className:s,inert:h,style:r,children:n}),(0,o.jsx)("div",{className:"page__content",children:(0,o.jsx)(s1,{...p})})]})})})},Bce=10;function Dce(){const e=(0,u.useRef)(null),[t,n]=(0,u.useState)(!1);return(0,u.useEffect)(()=>{let s=null;const r=()=>{const a=e.current;if(!a||!s)return;const c=s.scrollTop,l=a.getBoundingClientRect().top+c,d=c>l&&c>0;n(h=>h===d?h:d)},i=setTimeout(()=>{s=tp(),s?.addEventListener("scroll",r,{passive:!0})},Bce);return()=>{clearTimeout(i),s?.removeEventListener("scroll",r)}},[]),{isSticky:t,refProgressWrap:e}}const iT=V("progress"),Fce=V("lesson-progress-wrapper"),_ce=()=>!!document.querySelector(".lesson--preview"),Hce=({items:e,lessonProgress:t})=>{const n=t?.activeIndex??-1,s=e?.length??0;return n===-1?0:n+1===s?100:e?.[n]?.linePosition?.replace("%","")??"0"},Vce=({items:e,lessonProgress:t})=>{const n=t?.activeIndex??0,s=e?.length??0;return n>s?100:Math.round(n/s*100)},zce=e=>{const{lessonProgress:t,type:n}=e;switch(n){case"process":return Vce(e);case"sorting":return t?.percentViewed??0;case"timeline":return Hce(e);default:return t?.percentComplete??0}},$ce=e=>{const{type:t,items:n,sidebarAvailable:s,isCourseNavOpen:r,isMobile:i}=e,{isSticky:a,refProgressWrap:c}=Dce(),[l]=(0,u.useState)(so),d=r,h=r&&i,m=_ce(),f=Fce({visible:a&&!h}).mix(d&&s&&!m?"lesson--open":"").mix(s&&h&&!m?"lesson--open-mobile":"").toString(),p=iT({timeline:t==="timeline",video:t==="video"}).toString(),v=zce(e),g=t==="timeline"&&n&&n.map(y=>{const S=parseInt(String(v))>=parseInt(y.linePosition?.slice(0,-1)??"0"),I=iT("marker",{active:S}).mix(S?"brand--background":"").toString();return(0,o.jsx)("div",{className:I,style:{left:y.linePosition}},y.id)}),x=(0,o.jsx)("div",{className:"progress-wrap",children:(0,o.jsx)("div",{className:p,children:(0,o.jsxs)("div",{className:"progress__container",children:[(0,o.jsx)("div",{className:"progress__indicator brand--background",style:{transform:`translate3d(calc(${v}% * var(--dir-x)),0px,0px)`}}),g]})})});return(0,o.jsxs)("div",{ref:c,children:[x,(0,bs.createPortal)((0,o.jsx)("div",{"aria-hidden":"true",className:f,children:x}),l)]})},Uce=e=>{const t=RQ(),{isCourseNavOpen:n}=sY(),s=Zt(480);return(0,o.jsx)($ce,{...e,isCourseNavOpen:n,isMobile:s,sidebarAvailable:t})};function aT(e){return Et()===ne.RISE_CLASSIC?(0,o.jsx)(Uce,{...e}):null}function Gce(e,t){return e==null?void 0:t.quizDecks?.[e]}function Wce(e,t){const n=Ii(e,t);return n?.type==="quiz"?n:void 0}function Kce(){const e=Dr(),t=(0,Ge.Mz)((n,s)=>n==null?void 0:e(n,s),n=>Ar(n)?n:void 0);return(0,Ge.Mz)(Gce,t,Wce,(n,s,r)=>({deck:n,lesson:s,progress:r}))}function Qce(e){const t=(0,u.useMemo)(Kce,[]);return ue(n=>t(e,n))}const De=V("quiz-deck-analysis");function Zce({lessonId:e}){const{deck:t,lesson:n,progress:s}=Qce(e),r=rt();return(0,o.jsxs)("section",{className:De(),children:[(0,o.jsxs)("header",{className:De("header"),children:[(0,o.jsx)("p",{className:De("eyebrow"),children:"Internal diagnostic"}),(0,o.jsx)("h2",{children:"Quiz deck engine analysis"}),(0,o.jsx)("p",{className:De("notice"),children:"Simulation changes only the owned quiz-deck Redux attempt. They do not update canonical course progress or save to Runtime or an LMS."})]}),(0,o.jsxs)("dl",{className:De("facts"),children:[(0,o.jsx)(st,{label:"Deck status",value:t?.status??"missing"}),(0,o.jsx)(st,{label:"Lesson data",value:n?"loaded":"missing"}),(0,o.jsx)(st,{label:"Progress data",value:s?"loaded":"missing"}),(0,o.jsx)(st,{label:"Canonical progress fenced",value:t?.status==="ready"?String(t.attempt.canonicalProgressDiscarded):"not applicable"})]}),t?.status==="ready"?(0,o.jsx)(Yce,{deck:t,getL10nValue:r,lesson:n,lessonId:e,progress:s}):null,t?.status==="incompatible"?(0,o.jsxs)("section",{className:De("panel"),children:[(0,o.jsx)("h3",{children:"Saved attempt is incompatible"}),(0,o.jsxs)("dl",{className:De("facts"),children:[(0,o.jsx)(st,{label:"Reason",value:t.reason}),(0,o.jsx)(st,{label:"Saved position",value:String(t.baselineProgress.activeIndex??0)})]}),(0,o.jsx)(E0,{label:"Canonical progress snapshot",value:t.baselineProgress})]}):null,t?.status==="failed"?(0,o.jsxs)("section",{className:De("panel"),children:[(0,o.jsx)("h3",{children:"Deck preparation failed"}),(0,o.jsx)("dl",{className:De("facts"),children:(0,o.jsx)(st,{label:"Reason",value:t.reason})})]}):null]})}function Yce({deck:e,getL10nValue:t,lesson:n,lessonId:s,progress:r}){const{cards:i,structureKey:a}=e.deal,{currentProgress:c}=e.attempt,l=nt(),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=(0,u.useRef)(null),[f,p]=(0,u.useState)(),v=Hx(e);(0,u.useEffect)(()=>{if(!f)return;a===f.structureKey&&(c.retryAttempts??0)===f.retryAttempts&&c.activeIndex===1&&(h.current??d.current??m.current)?.focus(),p(void 0)},[c.activeIndex,c.retryAttempts,f,a]);function g({authoredAnswerIndex:b,cardKey:T}){l(gw({authoredAnswerIndex:b,cardKey:T,lessonId:s,retryAttempts:c.retryAttempts??0,structureKey:a}))}function x({authoredAnswerIndex:b,cardKey:T}){l(vw({authoredAnswerIndex:b,cardKey:T,lessonId:s,retryAttempts:c.retryAttempts??0,structureKey:a}))}function y({cardKey:b,text:T}){l(Cw({cardKey:b,lessonId:s,retryAttempts:c.retryAttempts??0,structureKey:a,text:T}))}function S({cardKey:b,matchAnswerId:T,promptAnswerId:L}){l(xw({cardKey:b,lessonId:s,matchAnswerId:T,promptAnswerId:L,retryAttempts:c.retryAttempts??0,structureKey:a}))}function I(){const b={retryAttempts:c.retryAttempts??0,structureKey:a};p(b),l(Sw({lessonId:s,...b}))}return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("section",{className:De("panel"),children:[(0,o.jsx)("h3",{children:"Redux sources"}),(0,o.jsxs)("div",{className:De("columns"),children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h4",{children:"Course lesson"}),(0,o.jsxs)("dl",{className:De("facts"),children:[(0,o.jsx)(st,{label:"Title",value:la({getL10nValue:t,value:n?.title})}),(0,o.jsx)(st,{label:"Lesson ID",value:String(n?.id??"missing")}),(0,o.jsx)(st,{label:"Authored items",value:String(n?.items.length??0)}),(0,o.jsx)(st,{label:"Passing score",value:String(n?.settings?.passingScore??"not set")}),(0,o.jsx)(st,{label:"Shuffle questions",value:el(n?.settings?.randomizeQuestionOrder)}),(0,o.jsx)(st,{label:"Shuffle answers",value:el(n?.settings?.shuffleAnswerChoices)})]})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("h4",{children:"Quiz attempt"}),(0,o.jsxs)("dl",{className:De("facts"),children:[(0,o.jsx)(st,{label:"Dealt cards",value:String(i.length)}),(0,o.jsx)(st,{label:"Current location",value:nle({activeIndex:c.activeIndex,cardCount:i.length})}),(0,o.jsx)(st,{label:"Retry attempt",value:String(c.retryAttempts??0)}),(0,o.jsx)(st,{label:"Complete",value:el(c.isComplete)}),(0,o.jsx)(st,{label:"Results reported",value:el(c.reportResults)}),(0,o.jsx)(st,{label:"Score / passed",value:`${c.score??"not set"} / ${el(c.passed)}`})]})]})]}),(0,o.jsxs)("div",{className:De("details-grid"),children:[(0,o.jsx)(E0,{label:"Canonical course progress",value:r}),(0,o.jsx)(E0,{label:"Owned deck progress",value:c}),(0,o.jsx)(E0,{label:"Structure identity",value:rle(a)})]})]}),(0,o.jsxs)("section",{className:De("panel"),children:[(0,o.jsx)("h3",{children:"Prepared deal"}),(0,o.jsx)("p",{className:De("help"),children:"Cards are listed in final display order. Displayed answer positions are one-based; original answer indices remain zero-based so the permutation is explicit. Multiple-choice, multiple-response, fill-in, and matching simulation controls update only the owned Redux deck and are not saved."}),v?(0,o.jsx)("div",{className:De("button-row"),children:(0,o.jsx)("button",{className:De("button"),onClick:I,type:"button",children:"Start simulation"})}):null,(0,o.jsx)("ol",{"aria-label":"Dealt question order",className:De("cards"),children:i.map((b,T)=>{const L=Vx({cardKey:b.key,deck:e})!=null||zx({cardKey:b.key,deck:e})!=null,E=$x({cardKey:b.key,deck:e})!=null,k=Ux({cardKey:b.key,deck:e})!=null,N=k||v&&T===0;return(0,o.jsx)(qce,{canChangeResponse:L||E||k,card:b,cardCount:i.length,displayIndex:T,fillInInputRef:E?d:void 0,firstAnswerButtonRef:L?h:void 0,firstMatchingSelectRef:k?m:void 0,getL10nValue:t,lesson:n,onChangeMatchingResponse:S,onCommitFillInResponse:y,onChangeMultipleChoiceSelection:g,onToggleMultipleResponseSelection:x,progress:c.items[b.progressId],showMatchingResponseControls:N},b.key)})})]})]})}function qce({card:e,cardCount:t,canChangeResponse:n,displayIndex:s,fillInInputRef:r,firstAnswerButtonRef:i,firstMatchingSelectRef:a,getL10nValue:c,lesson:l,onChangeMatchingResponse:d,onChangeMultipleChoiceSelection:h,onCommitFillInResponse:m,onToggleMultipleResponseSelection:f,progress:p,showMatchingResponseControls:v}){const g=ole({lesson:l,source:e.source}),x=e.questionType===me.MULTIPLE_CHOICE,y=e.questionType===me.MULTIPLE_RESPONSE,S=e.questionType===me.FILL_IN_THE_BLANK,I=x||y,b=g?.type===me.MATCHING?g.answers:void 0;return(0,o.jsxs)("li",{className:De("card"),children:[(0,o.jsxs)("header",{className:De("card-header"),children:[(0,o.jsxs)("p",{className:De("eyebrow"),children:["Displayed question ",s+1," of ",t]}),(0,o.jsx)("h4",{children:la({getL10nValue:c,value:g?.title})}),(0,o.jsx)("code",{children:g?.type??me.MULTIPLE_CHOICE})]}),(0,o.jsxs)("dl",{className:De("facts"),children:[(0,o.jsx)(st,{label:"Card key",value:e.key}),(0,o.jsx)(st,{label:"Question ID",value:String(e.questionId)}),(0,o.jsx)(st,{label:"Progress ID",value:String(e.progressId)}),(0,o.jsx)(st,{label:"Authored source",value:sle(e.source)}),(0,o.jsx)(st,{label:"Answer permutation",value:o1(e.answerOrder)})]}),g?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("h5",{children:"Answer display order"}),(0,o.jsx)("div",{className:De("table-wrap"),children:(0,o.jsxs)("table",{children:[(0,o.jsx)("thead",{children:(0,o.jsxs)("tr",{children:[(0,o.jsx)("th",{scope:"col",children:"Displayed position"}),(0,o.jsx)("th",{scope:"col",children:"Original answer index"}),(0,o.jsx)("th",{scope:"col",children:"Answer text"}),g.type===me.MATCHING?(0,o.jsx)("th",{scope:"col",children:"Match text"}):null,(0,o.jsx)("th",{scope:"col",children:"Answer ID"}),(0,o.jsx)("th",{scope:"col",children:"Scoring"}),I?(0,o.jsx)("th",{scope:"col",children:"Simulation"}):null]})}),(0,o.jsx)("tbody",{children:e.answerOrder.map((T,L)=>{const E=g.answers[T],k=la({getL10nValue:c,value:E?.title}),N=x?p?.selectedIndex===T:y?p?.selectedIndices?.includes(T)===!0:!1;return(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{children:L+1}),(0,o.jsx)("td",{children:T}),(0,o.jsx)("td",{children:k}),g.type===me.MATCHING?(0,o.jsx)("td",{children:la({getL10nValue:c,value:b?.[T]?.matchTitle})}):null,(0,o.jsx)("td",{children:(0,o.jsx)("code",{children:String(E?.id??"missing")})}),(0,o.jsx)("td",{children:tle({answerId:E?.id,question:g})}),I?(0,o.jsx)("td",{children:(0,o.jsx)("button",{"aria-label":`${x?"Select":"Toggle"} question ${s+1} answer ${L+1}: ${k}`,"aria-pressed":N,className:De("button"),disabled:!n,onClick:()=>{const P={authoredAnswerIndex:T,cardKey:e.key};x?h(P):f(P)},ref:L===0?i:void 0,type:"button",children:x?"Select":"Toggle"})}):null]},`${e.key}:${T}`)})})]})}),S?(0,o.jsx)(Xce,{canChangeResponse:n,cardKey:e.key,inputRef:r,onCommit:m,progress:p}):null,v&&g.type===me.MATCHING&&e.matchingOrder?(0,o.jsx)(Jce,{canChangeResponse:n,cardKey:e.key,firstSelectRef:a,getL10nValue:c,matchingOrder:e.matchingOrder,onChange:d,progress:p,question:g}):null,x?(0,o.jsx)("div",{className:De("button-row"),children:(0,o.jsx)("button",{"aria-label":`Clear question ${s+1} selection`,className:De("button"),disabled:!n,onClick:()=>h({authoredAnswerIndex:void 0,cardKey:e.key}),type:"button",children:"Clear selection"})}):null]}):(0,o.jsx)("p",{className:De("warning"),children:"Question data could not be resolved."}),e.matchingOrder?(0,o.jsxs)("dl",{className:De("facts"),children:[(0,o.jsx)(st,{label:"Prompt permutation",value:o1(e.matchingOrder.prompts)}),(0,o.jsx)(st,{label:"Match permutation",value:o1(e.matchingOrder.matches)})]}):null,(0,o.jsx)("h5",{children:"Owned progress row"}),(0,o.jsx)("pre",{className:De("json"),children:cT(p??null)})]})}function Xce({canChangeResponse:e,cardKey:t,inputRef:n,onCommit:s,progress:r}){const i=`quiz-deck-fill-in-${(0,u.useId)()}`,[a,c]=(0,u.useState)(r?.text??"");(0,u.useEffect)(()=>{c(r?.text??"")},[r]);function l(){const d=bl(a)?"":a;c(d),s({cardKey:t,text:d})}return(0,o.jsxs)("div",{className:De("response-field"),children:[(0,o.jsx)("label",{htmlFor:i,children:"Simulated response"}),(0,o.jsx)("input",{className:De("input"),disabled:!e,id:i,onBlur:l,onChange:d=>c(d.currentTarget.value),ref:n,type:"text",value:a}),(0,o.jsx)("p",{className:De("help"),children:"Whitespace-only input clears the simulated response on blur."})]})}function Jce({canChangeResponse:e,cardKey:t,firstSelectRef:n,getL10nValue:s,matchingOrder:r,onChange:i,progress:a,question:c}){return(0,o.jsxs)("div",{children:[(0,o.jsx)("h5",{children:"Simulated matches"}),r.prompts.map((l,d)=>{const h=c.answers[l],m=r.answerIds[l];return!h||m==null?null:(0,o.jsx)(ele,{canChangeResponse:e,cardKey:t,getL10nValue:s,inputRef:d===0?n:void 0,matchingOrder:r,onChange:i,progress:a,prompt:h,promptAnswerId:m,promptDisplayIndex:d,question:c},String(m))}),(0,o.jsx)("p",{className:De("help"),children:"Choosing a match reassigns it from any other prompt. Choose Unmatched to clear a pair."})]})}function ele({canChangeResponse:e,cardKey:t,getL10nValue:n,inputRef:s,matchingOrder:r,onChange:i,progress:a,prompt:c,promptAnswerId:l,promptDisplayIndex:d,question:h}){const m=`quiz-deck-matching-${(0,u.useId)()}`,f=a?.matches?.[l],p=f==null?-1:r.answerIds.findIndex(x=>String(x)===String(f)),v=r.matches.includes(p)?String(p):"",g=la({getL10nValue:n,value:c.title});return(0,o.jsxs)("div",{className:De("response-field"),children:[(0,o.jsxs)("label",{htmlFor:m,children:["Match prompt ",d+1,": ",g]}),(0,o.jsxs)("select",{className:De("input"),disabled:!e,id:m,onChange:x=>{const y=Number(x.currentTarget.value),S=x.currentTarget.value===""?void 0:r.answerIds[y];x.currentTarget.value!==""&&S==null||i({cardKey:t,matchAnswerId:S,promptAnswerId:l})},ref:s,value:v,children:[(0,o.jsx)("option",{value:"",children:"Unmatched"}),r.matches.map((x,y)=>{const S=h.answers[x];return S?(0,o.jsxs)("option",{value:x,children:[y+1,"."," ",la({getL10nValue:n,value:S.matchTitle})]},String(r.answerIds[x])):null})]})]})}function st({label:e,value:t}){return(0,o.jsxs)("div",{className:De("fact"),children:[(0,o.jsx)("dt",{children:e}),(0,o.jsx)("dd",{children:t})]})}function E0({label:e,value:t}){return(0,o.jsxs)("details",{className:De("details"),children:[(0,o.jsx)("summary",{children:e}),(0,o.jsx)("pre",{className:De("json"),children:cT(t??null)})]})}function tle({answerId:e,question:t}){if(e==null)return"missing";switch(t.type){case me.FILL_IN_THE_BLANK:return"accepted response";case me.MATCHING:return"paired response";case me.MULTIPLE_RESPONSE:return t.corrects?.includes(e)?"correct":"incorrect";case me.MULTIPLE_CHOICE:case void 0:return t.correct===e?"correct":"incorrect"}}function el(e){return e==null?"not set":e?"yes":"no"}function cT(e){return JSON.stringify(e,null,2)}function la({getL10nValue:e,value:t}){return t==null?"(missing)":String(In(String(e(t)??""))).trim()||"(empty)"}function o1(e){return`[${e.join(", ")}]`}function nle({activeIndex:e=0,cardCount:t}){return e<0?`Invalid (activeIndex ${e})`:e===0?`Start (activeIndex ${e})`:e>=uh(t)?`Results (activeIndex ${e})`:`Question ${e} of ${t} (activeIndex ${e})`}function sle(e){return e.kind==="lesson"?`lesson item ${e.lessonItemIndex}`:`question bank item ${e.lessonItemIndex}, question ${e.bankQuestionIndex}`}function ole({lesson:e,source:t}){const n=e?.items[t.lessonItemIndex];return t.kind==="lesson"?n?.type===me.DRAW_FROM_QUESTION_BANK?void 0:n:n?.type===me.DRAW_FROM_QUESTION_BANK?n.questions[t.bankQuestionIndex]:void 0}function rle(e){try{return JSON.parse(e)}catch{return e}}const ile=e=>e===q8.CONTINUE,ale=({canShowContinue:e,isExport:t,isRiseCom:n,nextLesson:s})=>e&&n&&!s&&!t,cle=e=>tt(e)&&"id"in e&&"type"in e,lle=(e,t)=>t.startsWith(`${e}-`)?t.slice(e.length+1):void 0,dle=(e,t)=>{const n=lle(String(e.id),t);return n==null?void 0:e.questions.find(s=>String(s.id)===n)},ule=(e,t)=>!e||!t||e.length!==t.length?!1:e.some((n,s)=>t[n]?.id!==t[s]?.id),hle=(e,t,n)=>{if(!Array.isArray(e)||!Array.isArray(t)||!n)return!1;const s=e.map(a=>t[a]),r=t.findIndex(a=>a.id===n),i=s.findIndex(a=>a.id===n);return r===i},mle=({lesson:e,question:t})=>{const n=String(t.id);for(const s of e?.items??[])if(cle(s)){if(s.type===me.DRAW_FROM_QUESTION_BANK){const r=dle(s,n);if(r)return r}else if(String(s.id)===n)return s}};function fle({settings:e}){const t=nt();return(0,u.useMemo)(()=>({onChoiceSelect:n=>{t(ux(n))},onFillInChange:n=>{t(hx(n))},onMatchSet:n=>{t(fx(n))},onResponseToggle:n=>{t(mx(n))},onSetIndex:n=>{t(Qh(n))},onSubmit:n=>{const{skipLessonsIfPassed:s,skipToLessonId:r}=e||{};return t(Zh({...n,passToContinue:n.passToContinue??!1,skipLessonsIfPassed:s??void 0,skipToLessonId:r??void 0}))}}),[t,e])}const lT=-1;function k0({allowedRetries:e,currentRetries:t}){const n=parseInt(String(e??lT),10),s=parseInt(String(t??0),10);return n===lT?!1:s>=n}function ple(e,t){const n=$t(e),s=Ol(n)?n.settings:void 0,r=e?aC({id:e,passingScore:t?.passingScore??80}):void 0;return(0,u.useMemo)(()=>s&&{...s,passingScore:r??s?.passingScore??80},[s,r])}const N0=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):void 0;function dT(){const[e,t]=(0,u.useState)(N0?.matches??!1);return(0,u.useEffect)(()=>{if(!N0)return;const n=s=>t(s.matches);return N0.addEventListener("change",n),()=>N0.removeEventListener("change",n)},[]),e}function gle({lessonId:e}){const t=nt(),n=$t(e),s=Ol(n)?n:void 0,r=id(e),i=(0,u.useMemo)(()=>s?.items??[],[s?.items]),a=ple(e,r),[{resolvedItems:c,drawPayload:l,recoveredFrom:d}]=(0,u.useState)(()=>wb({lessonId:e,progress:r,settings:a,sourceItems:i}));(0,u.useLayoutEffect)(()=>{d!==void 0&&(dh.RESUME_RECOVERY,l.lessonProgress.activeIndex,Object.keys(l.lessonProgress.items).length,c.length,void 0);const f=yN()?{finalize:!0,passToContinue:a?.passToContinue??!1,finalRetryAttempt:k0({allowedRetries:a?.retryCount,currentRetries:r?.retryAttempts})}:{finalize:!1};t(X7({...l,lessonId:e,...f}))},[]);const h=r?.activeIndex??0,m=dT();return vle({activeIndex:h,isReduceMotion:m,progress:r,resolvedItems:c,settings:a,sourceItems:i}),{activeIndex:h,progress:r,resolvedItems:c,retryAttempts:r?.retryAttempts??0,settings:a,sourceItems:i}}function vle({activeIndex:e,isReduceMotion:t,progress:n,resolvedItems:s,settings:r,sourceItems:i}){const a=(0,u.useRef)(e);(0,u.useEffect)(()=>{},[e])}const Cle=e=>e.length===3,xle=e=>{const t=e.findIndex(n=>n==="answers");return t===-1?null:e[t+1]?.id},ble=e=>{const t=e.findIndex(n=>n==="questions");return t===-1?null:e[t+1]?.id},yle=e=>{const t=e.at(-1);return typeof t=="string"&&t.startsWith("feedback")},Sle=({items:e,itemId:t,questionBankQuestionId:n})=>{const s=e.find(({id:r})=>r===t);return s?"questions"in s?n?s.questions.find(({id:r})=>r===n):null:s:null},Ile=(e,t,n)=>{const s=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===s:"corrects"in t?t.corrects.includes(r.id)===s:t.answers)},Tle=({lessonId:e,items:t})=>{const n=nt(),s=(0,u.useCallback)(({lessonId:i,progressId:a,question:c,answer:l},d=!0)=>{switch(c.type){case"MULTIPLE_CHOICE":n(ux({lessonId:i,itemId:a,selectedIndex:c.answers.indexOf(l)}));break;case"MULTIPLE_RESPONSE":n(mx({lessonId:i,itemId:a,selectedIndex:c.answers.indexOf(l)}));break;case"FILL_IN_THE_BLANK":n(hx({lessonId:i,itemId:a,text:typeof l.title=="string"?l.title:""}));break;case"MATCHING":n(fx({lessonId:i,itemId:a,matches:d?Object.fromEntries(c.answers.map(h=>[h.id,h.id])):{}}));break}},[n]),r=(0,u.useCallback)(({detail:i})=>{const{lessonId:a,path:c}=i,l=String(i.itemId);if(a!==e)return;if(Cle(c)){n(dx(e));return}const d=ble(c),h=Sle({items:t,itemId:l,questionBankQuestionId:d});if(!h)return;const m=d?`${l}-${d}`:l;if(n(Qh({lessonId:e,progressId:m,finalize:!1})),yle(c)){const f=xle(c),p=f?h.answers.find(({id:y})=>y===f)??null:null,v=c.at(-1),g=v==="feedbackCorrect",x=Ile(p,h,v);h.type==="MULTIPLE_RESPONSE"&&n(q7({lessonId:e,itemId:m})),x.forEach(y=>{s({lessonId:e,question:h,progressId:m,answer:y},g)}),n(Zh({finalRetryAttempt:!1,lessonId:e,isCorrect:g,itemId:m,passToContinue:!0}))}},[n,e,t,s]);(0,u.useEffect)(()=>(window.addEventListener(Ye,r),()=>{window.removeEventListener(Ye,r)}),[r])},Lle=V("quiz-item");function Ele({activeIndex:e,children:t,index:n,isActive:s,isComplete:r,isCorrect:i,isTimedQuiz:a,settings:c}){const l=c?.correctAnswerColor??void 0,d=c?.incorrectAnswerColor??void 0,f={"--color-feedback-icon":i?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,o.jsx)("div",{className:yl({activeIndex:e,index:n}),"data-testid":"quiz-item-card",inert:s?void 0:!0,children:(0,o.jsx)("div",{className:Lle("content"),children:(0,o.jsx)(xS,{isActive:s,isComplete:r,isTimedQuiz:!!a,style:f,children:(0,o.jsx)("div",{hidden:!s&&!r,children:t})})})})}const kle=V("quiz-card");function Nle({blockId:e,enableVideoPlaybackSpeed:t,index:n,isActive:s,item:r,labels:i,media:a}){const c=rt();if(!a)return null;const l=c(a),{audio:d,image:h,video:m,embed:f}=l??{},p={allowTabNavigation:s,blockId:e,enableVideoPlaybackSpeed:t,item:r,labels:i};return d&&h?(0,o.jsx)("div",{className:`${kle("media",{"image-with-audio":!0})}`,children:(0,o.jsx)(Xo,{...p,index:String(n),isOverlayAudio:!0,media:a})}):d&&(m||f)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Xo,{...p,index:`${n}-audio`,media:{audio:d}}),(0,o.jsx)(Xo,{...p,index:String(n),media:m?{video:m}:{embed:f},shouldPause:!s})]}):(0,o.jsx)(Xo,{...p,index:String(n),media:a,shouldPause:!s})}function uT(e,t){if(e===void 0||!t)return;if(Array.isArray(e))return e.map(s=>t.indexOf(s)).filter(s=>s!==-1);const n=t.indexOf(e);return n===-1?void 0:n}const{FILL_IN_THE_BLANK:jle,MATCHING:wle,MULTIPLE_CHOICE:Rle,MULTIPLE_RESPONSE:Ale}=me;function Ple({color:e,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:s,errorMessageId:r,incorrectAnswerColor:i,incorrectAnswerColorContrast:a,isActive:c,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,isShuffled:f,item:p,itemProgress:v,labels:g,onChoiceSelect:x,onFillInChange:y,onMatchSet:S,onResponseToggle:I,onSubmit:b,prefersKeyboardNavigation:T,questionHtmlId:L,quizAcceptableResponses:E,quizAnswerPlaceholder:k,revealAnswers:N}){const{answers:P,type:A}=p,R=c&&!l,j=P??[],M=("correct"in p?p.correct:void 0)??"",w=("corrects"in p?p.corrects:void 0)??[],O=v?.text??"",B=v?.matches??{},D=(0,u.useCallback)(({title:F})=>(0,o.jsx)(je,{allowTabNavigation:c,className:"quiz-multiple-choice-option__label",value:F}),[c]),_=(0,u.useCallback)(({title:F})=>(0,o.jsx)(je,{allowTabNavigation:c,tagName:"span",value:F}),[c]);switch(A){case jle:return(0,o.jsx)(ES,{allowTabNavigation:c,correctAnswerColor:n,correctAnswerColorContrast:s,errorMessageId:r,incorrectAnswerColor:i,incorrectAnswerColorContrast:a,isComplete:l,isCorrect:d,labels:g,onChange:y,onEnterToSubmit:b,options:j,questionHtmlId:L,quizAcceptableResponses:E,quizAnswerPlaceholder:k,revealAnswers:N,value:O});case wle:return(0,o.jsx)(RS,{answers:j,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:s,incorrectAnswerColor:i,incorrectAnswerColorContrast:a,isActive:c,isComplete:l,matches:B,onChange:S,prefersKeyboardNavigation:T,revealAnswers:N});case Ale:{const F=v?.selectedIndices,$=v?.shuffledAnswerIndices??[],z=f?uT(F,$):F;return(0,o.jsx)(MS,{allowTabNavigation:c,correctIds:w,errorMessageId:r,isComplete:l,isCorrect:d,isRetaking:m,labels:g,onChange:I,onEnterToSubmit:b,options:j,questionHtmlId:L,renderOptionText:_,revealAnswers:N,selectedIndices:z??[]})}case Rle:default:{const F=v?.selectedIndex,$=v?.shuffledAnswerIndices??[],z=f?uT(F,$):F;return(0,o.jsx)(PS,{allowTabNavigation:R,color:e,correctId:M,errorMessageId:r,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,labels:g,onChange:x,onEnterToSubmit:b,options:j,questionHtmlId:L,renderOptionText:D,revealAnswers:N,selectedIndex:z??-1})}}}const ni=V("quiz-card");function Mle({color:e,enableVideoPlaybackSpeed:t,hasStart:n,index:s,interaction:r,isQuestionBankQuiz:i,isReduceMotion:a,isShuffled:c,item:l,items:d,labels:h,lessonId:m,onTakeAgain:f,prefersKeyboardNavigation:p,progress:v,settings:g,showNextButton:x}){const{canProceed:y,canSubmit:S,errorIncomplete:I,feedbackRef:b,errorMessageId:T,feedbackValue:L,handleChoiceSelect:E,handleFillInChange:k,handleMatchSet:N,handleNextFeedbackClick:P,handleResponseToggle:A,handleSubmit:R,handleTakeAgain:j,isActive:M,isComplete:w,isCorrect:O,isRetaking:B,itemProgress:D,quizItemHtmlId:_,selection:F,wrapperRef:$}=r,z=n?s+1:s,K=g?.revealAnswers===!0?Oe.ALL:g?.revealAnswers??Oe.NONE,J=`q-${l.id}`,Q=l.settings,U=g?.correctAnswerColor??void 0,H=g?.correctAnswerColorContrast??void 0,G=g?.incorrectAnswerColor??void 0,Y=g?.incorrectAnswerColorContrast??void 0,Z=h?.quizQuestion??"",q=h?.quizAcceptableResponses??"",ee=h?.quizAnswerPlaceholder??"",se=h?.quizCorrect??"",re=h?.quizIncorrect??"",le=h?.quizSubmit??"",Le=v?.percentComplete===100&&i?h?.quizRestart??"":h?.quizNext??"";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fte,{isActive:M,labels:h,questionLabel:Z,questionNumber:s+1,totalQuestions:d.length}),(0,o.jsx)(Yn,{anchor:vW(m,l.id),label:"Comments on quiz question",children:(0,o.jsx)(Hte,{allowTabNavigation:M,htmlId:J,value:l.title})}),(0,o.jsx)(Nle,{blockId:l.id,enableVideoPlaybackSpeed:t,index:z,isActive:M,item:l,labels:h,media:l.media}),(0,o.jsx)(IS,{type:l.type,children:(0,o.jsx)("div",{ref:$,children:(0,o.jsx)(Ple,{canSubmit:S,color:e,columnBehavior:Q?.columnBehavior,correctAnswerColor:U,correctAnswerColorContrast:H,errorMessageId:T,incorrectAnswerColor:G,incorrectAnswerColorContrast:Y,isActive:M,isComplete:w,isCorrect:O,isReduceMotion:a,isRetaking:B,isShuffled:c,item:l,itemProgress:D,labels:h,onChoiceSelect:E,onFillInChange:k,onMatchSet:N,onResponseToggle:A,onSubmit:R,prefersKeyboardNavigation:p,questionHtmlId:J,quizAcceptableResponses:q,quizAnswerPlaceholder:ee,revealAnswers:K})})}),(0,o.jsx)("div",{"aria-live":"assertive",children:I&&(0,o.jsxs)("div",{className:`${ni("validations")}`,"data-testid":"quiz-validation-error",children:[(0,o.jsx)(ae,{className:`${ni("validation-icon")}`,"data-testid":"quiz-validation-icon",name:"alert-circle"}),(0,o.jsx)("span",{id:`${_}-error-incomplete-message`,children:h?.quizRequireAnswer})]})}),(0,o.jsx)(SS,{canProceed:y,feedbackRef:b,feedbackValue:L,isActive:M,isComplete:w,isCorrect:O,item:l,labels:h,quizCorrect:se,quizIncorrect:re,revealAnswers:K,selection:F}),(0,o.jsx)(CS,{allowNext:!f,canProceed:y,canSubmit:S,isReduceMotion:a,onNext:x?P:void 0,onSubmit:R,quizNext:Le,quizSubmit:le}),f&&(0,o.jsx)("div",{className:`${ni("retake-container",{active:w})}`,children:(0,o.jsx)("button",{className:`${ni("retake",{active:w})}`,onClick:j,type:"button",children:(0,o.jsxs)("div",{className:`${ni("retake-content")}`,children:[(0,o.jsx)("div",{className:`${ni("retake-text")}`,children:"TAKE AGAIN"}),(0,o.jsx)("i",{className:`${ni("retake-icon")} icon icon-reload`})]})})})]})}const{FILL_IN_THE_BLANK:hT,MATCHING:mT,MULTIPLE_CHOICE:fT,MULTIPLE_RESPONSE:pT}=me;function Ole(e,t){return e?.items?.[t]??{}}function Ble(e,t,n,s,r){switch(e.type){case hT:return FS({answers:e.answers??[],text:t.text,caseSensitive:e.settings?.isCaseSensitive??!1,getL10nValue:r});case mT:return _S(t.matches??{});case pT:return zS({isShuffled:n,item:e,selectedIndices:t.selectedIndices,shuffledAnswerIndices:t.shuffledAnswerIndices});case fT:default:return HS({isCorrectAnswerUnshuffled:s,isShuffled:n,item:e,selectedIndex:t.selectedIndex,shuffledAnswerIndices:t.shuffledAnswerIndices})}}function Dle(e,t){switch(e.type){case hT:return t.text;case mT:return t.matches;case pT:return t.selectedIndices;case fT:default:return t.selectedIndex}}const{FILL_IN_THE_BLANK:Fle,MATCHING:_le,MULTIPLE_CHOICE:Hle,MULTIPLE_RESPONSE:Vle}=me;function zle({hasStart:e=!1,id:t,index:n,isCorrectAnswerUnshuffled:s=!1,isShuffled:r=!1,item:i,onChoiceSelect:a,onFillInChange:c,onMatchSet:l,onResponseToggle:d,onTakeAgain:h,progress:m,reportAnswer:f,retryAttempts:p=0,setNextIndex:v,settings:g,submitAction:x,title:y}){const S=rt(),I=qb(),[b,T]=(0,u.useState)(!1),[L,E]=(0,u.useState)(Date.now),[k,N]=(0,u.useState)(!1),P=(0,u.useRef)(null),A=(0,u.useRef)(null),R=(0,u.useId)(),j=(0,u.useRef)({canSubmit:!1,isCorrect:!1,item:i,itemId:String(i.id),itemProgress:{},retryAttempts:p,revealAnswers:Oe.NONE,settings:g,startTime:L,title:y}),M=e?n+1:n,w=m?.activeIndex??0,O=M===w,B=Ole(m,i.id),D=B?.isComplete??!1,_=Ble(i,B,r,s,S),F=g?.revealAnswers===!0?Oe.ALL:g?.revealAnswers??Oe.NONE,$=F===Oe.ALL||F===Oe.INCORRECT,z=O&&D&&$,K=O&&!D&&BS({answersLength:i.answers?.length??0,matches:B?.matches,selectedIndex:B?.selectedIndex,selectedIndices:B?.selectedIndices,text:B?.text,type:i.type});j.current={canSubmit:K,isCorrect:_,item:i,itemId:String(i.id),itemProgress:B,retryAttempts:p,revealAnswers:F,settings:g,startTime:L,title:y};const J=B?.selectedIndex,Q=$S({answers:i.answers,feedback:"feedback"in i?i.feedback:void 0,feedbackCorrect:"feedbackCorrect"in i?i.feedbackCorrect:void 0,feedbackIncorrect:"feedbackIncorrect"in i?i.feedbackIncorrect:void 0,feedbackType:"feedbackType"in i?i.feedbackType:void 0,isCorrect:_,isShuffled:r,selectedIndex:J,shuffledAnswerIndices:i.shuffledAnswerIndices}),U=Dle(i,B),H=b?`${R}-error-incomplete-message`:void 0,G=(0,u.useCallback)(()=>{T(!1)},[]),Y=String(i.id),Z=(0,u.useCallback)(({selectedIndex:ve})=>{G(),a?.({lessonId:t,itemId:Y,selectedIndex:ve,shuffledAnswerIndices:i.shuffledAnswerIndices})},[t,Y,i.shuffledAnswerIndices,a,G]),q=(0,u.useCallback)(ve=>{G(),c?.({lessonId:t,itemId:Y,text:ve})},[t,Y,c,G]),ee=(0,u.useCallback)(ve=>{G(),l?.({lessonId:t,itemId:Y,matches:ve})},[t,Y,l,G]),se=(0,u.useCallback)(({optionIndex:ve})=>{G(),d?.({lessonId:t,itemId:Y,selectedIndex:ve,shuffledAnswerIndices:i.shuffledAnswerIndices})},[t,Y,i.shuffledAnswerIndices,d,G]),re=g?.passToContinue??!1,le=k0({allowedRetries:g?.retryCount,currentRetries:p}),Le=(0,u.useCallback)((ve=()=>{},fe)=>{fe&&ve(fe),v?.({fromIndex:w,lessonId:t,finalize:!0,passToContinue:re,finalRetryAttempt:le})},[w,le,re,t,v]),Te=(0,u.useCallback)((ve,fe)=>{ye.pause(),Le(ve??(()=>{}),fe)},[Le]),W=(0,u.useCallback)(()=>{O&&Te()},[O,Te]),de=(0,u.useCallback)(ve=>{ve.preventDefault();const{canSubmit:fe,isCorrect:ut,item:qt,itemId:Be,itemProgress:bt,retryAttempts:Je,revealAnswers:os,settings:We,startTime:sn,title:Xt}=j.current;if(!fe){switch(T(!0),qt.type){case Fle:case Vle:case Hle:A.current?.querySelector("input")?.focus();break;case _le:A.current?.querySelector("button")?.focus();break;default:break}return}j.current.canSubmit=!1;const Re={startTime:sn,stopTime:Date.now()},{passToContinue:Fe}=We??{},pt=k0({allowedRetries:We?.retryCount,currentRetries:Je}),Es=I({duration:Re,id:t,isCorrect:ut,item:qt,itemProgress:bt,retryAttempts:Je,title:Xt});f?.(Es);const xo={finalRetryAttempt:pt,lessonId:t,isCorrect:ut,itemId:Be,passToContinue:Fe,revealAnswers:os};if(os===Oe.ALL||os===Oe.INCORRECT){x?.(xo);return}Te(x,xo)},[I,Te,t,f,x]),Ie=(0,u.useCallback)(()=>{N(!0),setTimeout(()=>{h?.(),N(!1)},50)},[h]),ge=(0,Ve.A)(O)??!1,we=(0,Ve.A)(D)??!1;return(0,u.useEffect)(()=>{!ge&&O&&E(Date.now())},[O,ge]),{activeIndex:w,canProceed:z,canSubmit:K,feedbackRef:P,errorIncomplete:b,errorMessageId:H,feedbackValue:Q,handleChoiceSelect:Z,handleFillInChange:q,handleMatchSet:ee,handleNextFeedbackClick:W,handleResponseToggle:se,handleSubmit:de,handleTakeAgain:Ie,isActive:O,isComplete:D,isCorrect:_,isRetaking:k,itemProgress:B,prevIsActive:ge,prevIsComplete:we,quizItemHtmlId:R,selection:U,wrapperRef:A}}const $le=3;function Ule({feedbackRef:e,isActive:t,isComplete:n,isReduceMotion:s,prevIsActive:r,prevIsComplete:i,quizTop:a,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=a??$le,m=s?"instant":"smooth";document.getElementById(l??"page-wrap")?.scrollTo({top:h,behavior:m})}},[t,r,s,a,l]),(0,u.useEffect)(()=>{if(!(!t||c===Oe.NONE||s))return!i&&n&&(clearTimeout(d.current),d.current=setTimeout(()=>{const h=e.current;if(!h)return;const m=h.offsetHeight+h.offsetTop,f=s?"instant":"smooth";document.getElementById(l??"page-wrap")?.scrollTo({top:m,behavior:f})},750)),()=>{clearTimeout(d.current)}},[e,t,n,s,i,c,l])}const Gle=V("quiz-item");function Wle({color:e,enableVideoPlaybackSpeed:t,hasStart:n=!1,id:s,index:r,isCard:i=!1,isCorrectAnswerUnshuffled:a,isQuestionBankQuiz:c=!1,isShuffled:l=!1,isTimedQuiz:d,item:h,items:m,labels:f={},onChoiceSelect:p,onFillInChange:v,onMatchSet:g,onResponseToggle:x,onTakeAgain:y,prefersKeyboardNavigation:S,progress:I,quizTop:b,reportAnswer:T,retryAttempts:L=0,scrollId:E,setNextIndex:k,settings:N={revealAnswers:Oe.ALL},showNextButton:P=!0,submitAction:A,title:R}){const j=dT(),M=zle({hasStart:n,id:s,index:r,isCorrectAnswerUnshuffled:a,isShuffled:l,item:h,onChoiceSelect:p,onFillInChange:v,onMatchSet:g,onResponseToggle:x,onTakeAgain:y,progress:I,reportAnswer:T,retryAttempts:L,setNextIndex:k,settings:N,submitAction:A,title:R}),{activeIndex:w,feedbackRef:O,isActive:B,isComplete:D,isCorrect:_,prevIsActive:F,prevIsComplete:$}=M,z=N?.revealAnswers===!0?Oe.ALL:N?.revealAnswers??Oe.NONE;Ule({feedbackRef:O,isActive:B,isComplete:D,isReduceMotion:j,prevIsComplete:$,prevIsActive:F,quizTop:b,revealAnswers:z,scrollId:E});const K=(0,o.jsx)(Mle,{color:e,enableVideoPlaybackSpeed:t,hasStart:n,index:r,interaction:M,isQuestionBankQuiz:c,isReduceMotion:j,isShuffled:l,item:h,items:m,labels:f,lessonId:s,onTakeAgain:y,prefersKeyboardNavigation:S,progress:I,settings:N,showNextButton:P});return i?(0,o.jsx)(Ele,{activeIndex:w,index:n?r+1:r,isActive:B,isComplete:D,isCorrect:_,isTimedQuiz:d,settings:N,children:K}):(0,o.jsx)("div",{className:Gle("wrap"),children:K})}const dt=V("odometer"),gT=300,vT=700,Kle=300,Qle=500,j0=200,Zle=170,CT=145,ts=j0/2,ns=Zle/2,tl=70,xT=1.5,Yle=2.5,qle=225,Xle=135,bT=270,r1=7,da={start:{dx:-19,dy:8},mid:{dx:-5,dy:22},end:{dx:26,dy:-7}},ar={size:12,topOffset:-3,bottomOffset:21};function Jle(e){return e<.5?16*e**5:1+16*(e-1)**5}function ede(e){return e<.5?2*e**2:1-(-2*e+2)**2/2}function w0({angle:e,centerX:t,centerY:n,radius:s}){const r=(e-90)*Math.PI/180;return{x:t+s*Math.cos(r),y:n+s*Math.sin(r)}}function i1({centerX:e,centerY:t,counterClockwise:n=!1,endAngle:s,radius:r,startAngle:i}){const a=w0({angle:i,centerX:e,centerY:t,radius:r}),c=w0({centerX:e,centerY:t,radius:r,angle:s}),d=Math.abs(s-i)>180?"1":"0",h=n?"0":"1";return`M ${a.x} ${a.y} A ${r} ${r} 0 ${d} ${h} ${c.x} ${c.y}`}function yT(e,t,n){return t+n*bT*e/100}function tde({hasPassed:e,isResultsVisible:t,isRTL:n,onAnimationDone:s,passingLabel:r,passingScore:i,score:a=0,scoreLabel:c,shouldAnimate:l}){const[d,h]=(0,u.useState)(0),[m,f]=(0,u.useState)(0),[p,v]=(0,u.useState)(!1),x=`hatch-pattern${(0,u.useId)()}`,y=(0,u.useRef)(null),S=(0,u.useRef)(!1),I=(0,u.useRef)([]),b=(0,u.useCallback)(()=>{I.current.forEach(clearTimeout),I.current=[]},[]),T=(0,u.useCallback)(()=>{y.current!==null&&(cancelAnimationFrame(y.current),y.current=null),b()},[b]);(0,u.useEffect)(()=>{t||(T(),S.current=!1,h(0),f(0),v(!1))},[t,T]),(0,u.useEffect)(()=>{if(!t||!l||S.current)return;S.current=!0;const K=a,J=setTimeout(()=>{let Q=null;const U=H=>{Q===null&&(Q=H);const G=H-Q,Y=Math.min(G/vT,1),Z=Jle(Y),q=ede(Y);if(f(Z),h(Math.round(q*K)),Y<1)y.current=requestAnimationFrame(U);else{f(1),h(K);const ee=setTimeout(()=>{v(!0);const se=setTimeout(()=>{s?.()},Qle);I.current.push(se)},Kle-gT-vT);I.current.push(ee)}};y.current=requestAnimationFrame(U)},gT);I.current.push(J)},[t,l,a,s]),(0,u.useEffect)(()=>()=>{T()},[T]);const L=n?Xle:qle,E=n?-1:1,k=yT(i,L,E),N=yT(m*a,L,E),P=L+E*bT,A=w0({centerX:ts,centerY:ns,radius:tl,angle:N}),R=w0({centerX:ts,centerY:ns,radius:tl,angle:k}),j=m*a>=i,M=n?`%${i}`:`${i}%`,w=n?`%${d}`:`${d}%`,O=`${c} ${n?`%${a}`:`${a}%`}`,B=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:dt("pass-mark-label"),children:r}),(0,o.jsx)("div",{className:dt("pass-mark-percent"),children:M})]}),D=i1({centerX:ts,centerY:ns,counterClockwise:n,radius:tl,startAngle:L,endAngle:P}),_=i1({centerX:ts,centerY:ns,counterClockwise:n,radius:tl+3,startAngle:k,endAngle:P}),F=m>0?i1({centerX:ts,centerY:ns,counterClockwise:n,radius:tl,startAngle:L,endAngle:N}):"",$={x:R.x+(n?-13:13),y:R.y-13},z={x:$.x+(n?-13:13),y:$.y};return(0,o.jsxs)("div",{className:dt(),children:[(0,o.jsxs)("svg",{"aria-hidden":"true",className:dt("svg"),viewBox:`0 0 ${j0} ${CT}`,children:[(0,o.jsx)("defs",{children:(0,o.jsx)("pattern",{height:"1.5",id:x,patternTransform:"rotate(45)",patternUnits:"userSpaceOnUse",width:"1.5",children:(0,o.jsx)("line",{className:dt("hatch-line"),x1:"0",x2:"0",y1:"0",y2:"1.5"})})}),(0,o.jsx)("path",{className:dt("passing-zone"),d:_,fill:"none",stroke:`url(#${x})`,strokeWidth:"6"}),(0,o.jsxs)("g",{className:dt("pass-mark-lines"),children:[(0,o.jsx)("line",{className:dt("pass-mark-line"),x1:R.x,x2:$.x,y1:R.y,y2:$.y}),(0,o.jsx)("line",{className:dt("pass-mark-line"),x1:$.x,x2:z.x,y1:$.y,y2:z.y})]}),(0,o.jsx)("path",{className:dt("track"),d:D,fill:"none",strokeWidth:xT}),F&&(0,o.jsx)("path",{className:dt("progress",{passing:j}),d:F,fill:"none",strokeWidth:xT}),m>0&&(0,o.jsx)("circle",{className:dt("dot",{passing:j}),cx:A.x,cy:A.y,r:Yle}),p&&(0,o.jsx)("g",{className:dt("result-icon"),children:e?(0,o.jsx)("path",{className:dt("checkmark"),d:`M ${ts+da.start.dx} ${ns+da.start.dy} L ${ts+da.mid.dx} ${ns+da.mid.dy} L ${ts+da.end.dx} ${ns+da.end.dy}`,fill:"none",strokeLinecap:"square",strokeLinejoin:"miter",strokeWidth:r1}):(0,o.jsxs)("g",{className:dt("x-mark"),children:[(0,o.jsx)("path",{className:dt("x-line",{first:!0}),d:`M ${ts-ar.size} ${ns+ar.topOffset} L ${ts+ar.size} ${ns+ar.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:r1}),(0,o.jsx)("path",{className:dt("x-line",{second:!0}),d:`M ${ts+ar.size} ${ns+ar.topOffset} L ${ts-ar.size} ${ns+ar.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:r1})]})})]}),(0,o.jsxs)("div",{className:dt("score",{pass:p&&e,fail:p&&!e}),children:[(0,o.jsx)("div",{className:dt("score-label"),children:c}),(0,o.jsx)("div",{className:dt("pass-label"),children:O}),(0,o.jsx)("div",{className:dt("fail-label"),children:O}),(0,o.jsx)("div",{className:dt("score-percent",{hidden:p}),children:w})]}),(0,o.jsx)("div",{className:dt("pass-mark"),style:{"--pass-mark-x":`${(n?j0-z.x:z.x)/j0*100}%`,"--pass-mark-y":`${(z.y+3)/CT*100}%`},children:B}),(0,o.jsx)("div",{className:dt("pass-mark-mobile"),children:B})]})}const ST=(0,u.createContext)({handleExpiredQuiz:dn,hideTimer:dn,quizTime:0,resetQuizTimer:dn,timerDuration:0,timerHidden:!1,timerRunning:!1});function nde({children:e,handleExpiredQuiz:t=()=>{},isTimedQuiz:n,courseProgress:s,setQuizLessonTimeRemaining:r=()=>{},timerDuration:i=10}){const a=(0,u.useRef)(void 0),[c,l]=(0,u.useState)(),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),[p,v]=(0,u.useState)(),g=(0,u.useMemo)(()=>Number(i),[i]),{activeIndex:x,endIndex:y,lessonId:S,lessonProgress:I,startIndex:b}=(0,u.useMemo)(()=>{const O=s?.currentLesson,B=s?.lessons?.[O],D=B?.activeIndex||0,_=Object.keys(B?.items||{}).length+1;return{activeIndex:D,lessonId:O,endIndex:_,lessonProgress:B,startIndex:0}},[s]),T=(0,Ve.A)(S),L=(0,Ve.A)(x),E=(0,u.useCallback)(()=>{l(g*60)},[g]),k=(0,u.useCallback)(()=>{l(O=>O-1)},[l]),N=(0,u.useCallback)(()=>{h(!0),a.current||(a.current=setInterval(k,1e3))},[k,h]),P=(0,u.useCallback)(O=>{f(O!==void 0?O:!m)},[m]),A=(0,u.useCallback)(()=>{h(!1),a.current&&(a.current=clearInterval(a.current))},[h]),R=(0,u.useCallback)(()=>{c&&p!==void 0&&r({lessonId:p,timeRemaining:c})},[p,c,r]),j=(0,u.useCallback)(()=>{R(),l(void 0)},[l,R]),M=(0,u.useCallback)(()=>l(I.timeRemaining||g*60),[I,g,l]);(0,u.useEffect)(()=>{if(!n)return;const O=T!==S,B=O&&c,D=O&&n;n&&!O&&p!==S&&v(S),B&&j(),D&&M()},[n,p,S,T,c,M,j]),(0,u.useEffect)(()=>{if(n)switch(x){case b:A();break;case y:E(),A();break;default:N(),L!==x&&T===S&&R()}},[x,y,n,S,L,T,E,b,N,A,R]),(0,u.useEffect)(()=>{n&&c<1&&A()},[n,c,A]),(0,u.useEffect)(()=>()=>A(),[A]);const w=(0,u.useMemo)(()=>({handleExpiredQuiz:t,hideTimer:P,quizTime:c,resetQuizTimer:E,timerDuration:g,timerHidden:m,timerRunning:d}),[t,P,c,E,g,m,d]);return(0,o.jsx)(ST.Provider,{value:w,children:e})}const IT=()=>(0,u.useContext)(ST),sde=e=>e.isTimedQuiz?(0,o.jsx)(nde,{...e,children:e.children}):(0,o.jsx)(o.Fragment,{children:e.children}),ode={currentLesson:void 0,isRestricted:!1,isRestrictedCourse:!1,restrictingQuiz:{}};function rde(e){const t=ie(),n=Br(),s=$t(e??""),r=(0,u.useMemo)(()=>{if(!t||!n||!s)return ode;const l=o2({course:t,courseProgress:n});return h2({course:t,courseProgress:n,lesson:s,restrictingQuiz:l})},[t,n,s]),{restrictingQuiz:i}=r,a="title"in i?i.title:void 0,c=Ct(a);return(0,u.useMemo)(()=>a?{...r,restrictingQuiz:{...i,title:c}}:r,[r,i,a,c])}const TT=V("quiz-results");function ide({skipToLessonId:e}){const t=xe(),n=ZM(e),s=$m(),{lessonPreposition:r,quizSkipAhead:i}=t??{},a=n>0&&i&&r?`${i} ${n} ${r} ${s}`:i;return a?(0,o.jsxs)(Hu,{className:"continue-btn--flex",href:Ln(e),testId:"quiz-skip-ahead-btn",children:[(0,o.jsx)(ae,{"aria-hidden":"true",name:"arrow-right-from-line"}),a]}):null}function ade({isFooterVisible:e,isResultsVisible:t,lessonId:n,onTryAgainFocus:s}){const r=nt(),i=id(n),{passed:a=!1,retryAttempts:c=0}=i??{},{continueType:l,retryCount:d,skipLessonsIfPassed:h,skipLessonsOptional:m,skipToLessonId:f}=Um(n),{resetQuizTimer:p}=IT(),v=ile(l),g=xe(),x=nO(n),y=rde(x),{isRestricted:S}=y,{courseFinish:I,quizContinue:b,quizTakeAgain:T}=g??{},L=h&&a&&!!f,E=v,k=ale({canShowContinue:E,isExport:IN(),isRiseCom:!1,nextLesson:x}),N=(0,u.useCallback)(()=>{p(),r(dx(n))},[r,p,n]),P=E&&S&&x&&g&&(0,o.jsx)(N5,{bgType:"transparent",text:gM({labels:g,restrictions:y})}),A=E&&!S&&x&&(!L||m)&&b&&(0,o.jsx)(Hu,{className:L?"continue-btn--outline":void 0,href:Ln(x),text:b}),R=k&&I&&(0,o.jsx)(Hu,{href:DC,text:I}),j=(d===-1||c<d)&&(0,o.jsxs)(vS,{allowTabNavigation:t,onClick:N,onFocus:s,size:"lg",testId:"quiz-take-again-button",children:[(0,o.jsx)(ae,{"aria-hidden":"true",name:"arrow-rotate-left"}),T]});return(0,o.jsx)("div",{className:TT("footer",{active:t}),"data-testid":"quiz-results-footer",children:(0,o.jsxs)("div",{className:TT("footer-items",{hidden:!e}),inert:e?void 0:!0,children:[L&&(0,o.jsx)(ide,{skipToLessonId:f}),P,A,R,j]})})}const ua=V("quiz-results");function cde({lessonId:e,questionCount:t}){const n=nt(),s=id(e),{activeIndex:r=0,passed:i=!1,passingScore:a=80,reportResults:c=!1,score:l=0}=s??{},d=xe(),h=ds(),{skipLessonsIfPassed:m,skipToLessonId:f}=Um(e),[p,v]=(0,u.useState)(!1),g=t+1===r,x=(0,u.useRef)(g),y=(0,u.useRef)(void 0),S=(0,u.useRef)(void 0),I=(0,u.useRef)(null),b=(0,u.useId)(),{a11yQuizFailed:T="",a11yQuizPassed:L="",quizPassing:E="",quizResults:k="",quizScore:N=""}=d??{},P=`quiz-results-desc-${b}`,A=(0,u.useCallback)(()=>{S.current=setTimeout(()=>{v(!0),window.dispatchEvent(new CustomEvent(Ld))},500)},[]),R=(0,u.useCallback)(()=>{clearTimeout(S.current),S.current=void 0,v(!0)},[]);return(0,u.useEffect)(()=>()=>{clearTimeout(S.current)},[]),(0,u.useEffect)(()=>{g!==x.current&&(g?I.current?.focus():v(!1),x.current=g)},[g]),(0,u.useEffect)(()=>{if(!g||!i||!m||!f){y.current=void 0;return}const j=`${e}:${f}`;y.current!==j&&(y.current=j,n(Z7({quizId:e,destinationId:f})))},[n,i,g,e,m,f]),(0,o.jsx)("div",{className:ua(),children:(0,o.jsx)("div",{className:ua("container"),children:(0,o.jsxs)("div",{className:ua("content",{active:g}),"data-testid":"quiz-results",children:[(0,o.jsxs)("div",{className:ua("header"),children:[(0,o.jsx)("h1",{"aria-describedby":P,className:ua("label").mix("noOutline"),ref:I,tabIndex:-1,children:k}),(0,o.jsxs)("div",{className:"visually-hidden-always",id:P,children:[(0,o.jsx)("div",{children:`${E}: ${a}%`}),(0,o.jsx)("div",{children:`${N}: ${l}%`}),(0,o.jsx)("div",{children:i?L:T})]})]}),(0,o.jsx)("div",{"aria-hidden":"true",className:ua("results"),children:(0,o.jsx)(tde,{hasPassed:i,isResultsVisible:g,isRTL:h,onAnimationDone:A,passingLabel:E,passingScore:a,score:l,scoreLabel:N,shouldAnimate:c})}),(0,o.jsx)(ade,{isFooterVisible:p,isResultsVisible:g,lessonId:e,onTryAgainFocus:R})]})})})}const nl=V("callout");function lde({icon:e,title:t,children:n}){return(0,o.jsxs)("div",{className:nl(),role:"status",children:[(0,o.jsx)(ae,{className:nl("icon"),name:e}),(0,o.jsxs)("div",{className:nl("content"),children:[(0,o.jsx)("p",{className:nl("title"),children:t}),(0,o.jsx)("div",{className:nl("body"),children:n})]})]})}const dde=5,ude=15,hde=30,mde=60,fde=180,LT=300,ET=600,kT=120,pde=e=>e<=dde?{regularInterval:mde,lowTimeThreshold:kT}:e<=ude?{regularInterval:fde,lowTimeThreshold:kT}:e<=hde?{regularInterval:LT,lowTimeThreshold:LT}:{regularInterval:ET,lowTimeThreshold:ET},gde=(e,t,n,s)=>{const r=Math.floor(s/60),i=s%60,a=r===1?e:t;if(r>0&&i>0)return`${n}: ${r} ${a} and ${i} seconds`;if(r>0&&i===0)return`${n}: ${r} ${a}`;if(r===0&&i>0)return`${n}: ${i} seconds`};var $s=C(49860);const Sn=V("quiz-timer"),a1=(e,t)=>`${e.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`,vde=e=>{const t=Math.floor(e/60),n=e%60;return a1(t,n)},NT=e=>{const t=Math.floor(e/60),n=e%60;return a1(t,n)},Cde=e=>a1(e,0),jT=({area:e,exitCourseEnabled:t=!1,isStartScreenActive:n=!1,isEndScreenActive:s=!1,labelQuizTimerElapsed:r,labelQuizTimerExpired:i,labelQuizTimerExpiredAction:a,labelQuizTimerExpiredMessage:c,labelQuizTimerHide:l,labelQuizTimerLimit:d,labelQuizTimerMinute:h,labelQuizTimerMinutePlural:m,labelQuizTimerRemaining:f,labelQuizTimerShow:p,timerDisplay:v=kr.REMAINING,timerEnabled:g=!1})=>{const[x,y]=$s.useState(!1),[S,I]=$s.useState(""),b=$s.useRef(null),T=$s.useRef(!1),{hideTimer:L,quizTime:E,timerDuration:k,timerHidden:N,timerRunning:P,handleExpiredQuiz:A}=IT(),R=k*60,{isCover:j,isHeader:M,isHidden:w}=$s.useMemo(()=>({isCover:e==="cover",isHeader:e==="header",isHidden:v===kr.HIDE_TIMER}),[e,v]),O=n&&!j,B=$s.useMemo(()=>pde(k),[k]),D=$s.useMemo(()=>({expired:i||"Time expired",minute:h||"minute",minutePlural:m||"minutes",remaining:f||"Time left"}),[i,h,m,f]),_=()=>{y(!1),A()},F=$s.useCallback(()=>{const{regularInterval:J,lowTimeThreshold:Q}=B,U=E<=Q&&E>0&&!T.current,H=b.current!==null&&b.current-E>=J,G=b.current===null;if(U||H){U&&(T.current=!0),b.current=E;const Y=gde(D.minute,D.minutePlural,D.remaining,E);I(Y)}G&&(b.current=E)},[B,E,D]);if($s.useEffect(()=>{g&&E!==0&&(j||F())},[F,j,g,P,E]),$s.useEffect(()=>{if(!g||E!==0||n)return;const J=setTimeout(()=>{y(!0)},1200);return()=>clearTimeout(J)},[E,g,n]),!g||O||s)return null;const $={"header-area":M,"cover-area":j,"hide-timer":w,"exit-course":t},z={display:[j,M&&!n].some(ke())?null:"none"},K=()=>({[kr.SUMMARY]:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:Sn("label"),children:[d,":"]}),(0,o.jsxs)("div",{className:Sn("value"),children:[k," ",k===1?h:m]})]}),[kr.REMAINING]:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:Sn("label"),children:[f,":"]}),(0,o.jsx)("div",{className:Sn("value"),children:vde(E)})]}),[kr.ELAPSED]:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:Sn("label"),children:[r,":"]}),(0,o.jsx)("div",{className:Sn("value"),children:NT(R-E)})]}),[kr.ELAPSED_TOTAL]:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:Sn("label"),children:[r,":"]}),(0,o.jsxs)("div",{className:Sn("value"),children:[NT(R-E)," /"," ",Cde(k)]})]})})[j?kr.SUMMARY:v];return(0,o.jsxs)("div",{className:Sn($),"data-testid":"quiz-timer",style:z,children:[E!==0&&(0,o.jsx)("div",{"aria-atomic":"true","aria-live":"polite",className:"visually-hidden",role:"status",children:S}),E===0&&(0,o.jsx)("div",{className:"visually-hidden",role:"alert",children:i||"Time expired"}),M&&N?(0,o.jsxs)("button",{className:Sn("hide"),onClick:()=>L(!1),type:"button",children:[(0,o.jsx)(ae,{className:Sn("icon"),name:"stopwatch-regular"}),p]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:Sn("time"),children:[(0,o.jsx)(ae,{className:Sn("icon"),name:"stopwatch-regular"}),(0,o.jsx)("div",{className:Sn("desc"),children:K()})]}),M&&(0,o.jsx)("button",{className:Sn("hide"),onClick:()=>L(!0),type:"button",children:l})]}),!j&&x&&bs.createPortal((0,o.jsxs)(Sp,{className:"quiz-timer-modal","data-testid":"quiz-timer-modal",disableBackgroundScroll:!0,heading:i,hideCloseButton:!0,onCancel:_,onClose:_,onOverlayClick:()=>{},children:[(0,o.jsx)("p",{children:c}),(0,o.jsx)("button",{"data-testid":"quiz-view-results-button",onClick:_,type:"button",children:a})]}),so({childType:"dialog"}))]})},ss=V("quiz-start"),xde=e=>(e?.retryAttempts??0)>0;function wT({lessonId:e,isActive:t,hasQuestions:n=!0}){const s=nt(),r=(0,u.useRef)(null),i=id(e),a=xe(),c=ie(),l=jm(),d=$t(e),h=T2(),m=ue(L2),f=l?.authorName,p=l?.avatar,v=c?.theme?.showAuthor??!1,g=c?.theme?.showLessonCount??!1,x=h[e]??0,y=Ct(d?.description),S=Ct(d?.title),I=Vp()==="exiting",b=d?.settings?.timer,T=d?.settings?.asLesson!==!1,{a11yAuthorPrefix:L="",lessonName:E="",lessonPreposition:k="",quizStart:N="",quizTakeAgain:P="",quizTimerElapsed:A="",quizTimerExpired:R="",quizTimerExpiredAction:j="",quizTimerExpiredMessage:M="",quizTimerHide:w="",quizTimerLimit:O="",quizTimerMinute:B="",quizTimerMinutePlural:D="",quizTimerRemaining:_="",quizTimerShow:F=""}=a??{},$=xde(i),z=t&&$,K=$?"quiz-take-again-button":"quiz-start-button";(0,u.useEffect)(()=>{z&&r.current?.focus()},[z]);const J=()=>{EN(e),s(Qh({lessonId:e,fromIndex:0,finalize:!1}))},Q=$?P:N;return(0,o.jsx)("div",{"aria-hidden":!t,className:ss(),children:(0,o.jsx)("div",{className:ss("container"),children:(0,o.jsxs)("div",{className:ss("content"),children:[(0,o.jsxs)("div",{className:ss("header"),children:[(0,o.jsx)("div",{className:ss("counter"),children:T&&g&&(0,o.jsx)("div",{className:ss("count"),children:`${E} ${x} ${k} ${m}`})}),(0,o.jsx)(Yn,{anchor:M3(e),label:"Comments on quiz title",rail:"quiz",children:(0,o.jsx)("h1",{ref:r,tabIndex:-1,children:(0,o.jsx)(je,{className:ss("title"),value:S})})}),v&&p&&f?(0,o.jsxs)("div",{className:ss("author"),children:[(0,o.jsx)("img",{alt:"",src:fC(p)}),(0,o.jsxs)("span",{className:"visually-hidden",children:[L," ",f]}),(0,o.jsx)("span",{"aria-hidden":"true",children:f})]}):null]}),n&&b&&!I&&(0,o.jsx)(jT,{area:"cover",exitCourseEnabled:c?.lmsOptions?.enableExitCourse,isStartScreenActive:t,labelQuizTimerElapsed:A,labelQuizTimerExpired:R,labelQuizTimerExpiredAction:j,labelQuizTimerExpiredMessage:M,labelQuizTimerHide:w,labelQuizTimerLimit:O,labelQuizTimerMinute:B,labelQuizTimerMinutePlural:D,labelQuizTimerRemaining:_,labelQuizTimerShow:F,timerEnabled:b}),(0,o.jsx)(Yn,{anchor:fW(e),label:"Comments on quiz description",rail:"quiz",children:(0,o.jsx)(je,{allowTabNavigation:t,className:ss("description"),value:y})}),n?(0,o.jsxs)("button",{className:ss("start-button"),"data-testid":K,onClick:t?J:dn,tabIndex:t?void 0:-1,type:"button",children:[(0,o.jsx)("span",{className:ss("start-button-text"),children:Q}),(0,o.jsx)(ae,{className:ss("start-button-icon"),name:"chevron-right-solid"})]}):(0,o.jsx)(lde,{icon:"circle-exclamation",title:"No questions found",children:"This quiz has no questions. Contact your admin for help."})]})})})}function bde(){const[e,t]=(0,u.useState)();return(0,u.useEffect)(()=>{const n=document.querySelector("[data-previous-lesson]");if(!n)return;t(n.clientHeight);const s=new ResizeObserver(([r])=>{t(r.target.clientHeight)});return s.observe(n),()=>{s.disconnect()}},[]),e}const R0=V("quiz");function yde({lessonId:e}){const t=$t(e);return!e||!Ol(t)?null:(0,o.jsx)(Sde,{lessonId:e})}function Sde({lessonId:e}){const t=ie(),n=t?.color,s=xe(),r=Vp()==="exiting",a=cu()?.prefersKeyboardNavigation??!1,c=Li(e)??"",{activeIndex:l,progress:d,resolvedItems:h,retryAttempts:m,settings:f,sourceItems:p}=gle({lessonId:e}),v=fle({settings:f}),g=bde();Tle({lessonId:e,items:p});const x=uh(h.length),y=EE(l),{items:S,startOffset:I}=kE(h,l);return h.length===0?(0,o.jsx)("section",{className:R0(),"data-quiz":!0,"data-testid":"quiz",children:(0,o.jsx)("div",{className:R0("wrap"),children:(0,o.jsx)("div",{className:yl({activeIndex:0,index:0}),children:(0,o.jsx)(wT,{hasQuestions:!1,isActive:!0,lessonId:e})})})}):(0,o.jsxs)("section",{className:R0(),"data-quiz":!0,"data-testid":"quiz",children:[f?.timer&&!r&&(0,o.jsx)(jT,{area:"header",exitCourseEnabled:t?.lmsOptions?.enableExitCourse,isEndScreenActive:l===x,isStartScreenActive:l===0,labelQuizTimerElapsed:s?.quizTimerElapsed,labelQuizTimerExpired:s?.quizTimerExpired,labelQuizTimerExpiredAction:s?.quizTimerExpiredAction,labelQuizTimerExpiredMessage:s?.quizTimerExpiredMessage,labelQuizTimerHide:s?.quizTimerHide,labelQuizTimerLimit:s?.quizTimerLimit,labelQuizTimerMinute:s?.quizTimerMinute,labelQuizTimerMinutePlural:s?.quizTimerMinutePlural,labelQuizTimerRemaining:s?.quizTimerRemaining,labelQuizTimerShow:s?.quizTimerShow,timerDisplay:f?.timerDisplay??void 0,timerEnabled:f?.timer}),(0,o.jsxs)("div",{className:R0("wrap"),children:[y&&(0,o.jsx)("div",{className:yl({activeIndex:l,index:0}),children:(0,o.jsx)(wT,{isActive:l===0,lessonId:e})}),S.map((b,T)=>{const L=b.type===me.MULTIPLE_CHOICE;return(0,o.jsx)(Wle,{color:n,hasStart:!0,id:e,index:T+I,isCard:!0,isCorrectAnswerUnshuffled:L?hle(b.shuffledAnswerIndices,b.answers,b.correct):void 0,isShuffled:ule(b.shuffledAnswerIndices,b.answers),isTimedQuiz:f?.timer,item:b,items:h,labels:s??{},onChoiceSelect:v.onChoiceSelect,onFillInChange:v.onFillInChange,onMatchSet:v.onMatchSet,onResponseToggle:v.onResponseToggle,prefersKeyboardNavigation:a,progress:d,quizTop:g,reportAnswer:pC,retryAttempts:m,scrollId:"page-wrap",setNextIndex:v.onSetIndex,settings:f??void 0,submitAction:v.onSubmit,title:c},`item-${b.id}`)}),(0,o.jsx)("div",{className:yl({activeIndex:l,index:x}),inert:x===l?void 0:!0,children:(0,o.jsx)(cde,{lessonId:e,questionCount:h.length})})]})]})}function Ide({lessonProgress:e}){const t=e?.id,n=bd(Bl)===!0;return(0,o.jsx)("div",{className:"page page--lessonTypeQuiz","data-page":!0,children:(0,o.jsx)("div",{className:"page__wrapper",children:(0,o.jsx)(L0,{lessonId:t,children:(0,o.jsxs)("div",{className:"page__content",children:[(0,o.jsx)(aT,{lessonProgress:e,type:"quiz"}),n?t!=null?(0,o.jsx)(Zce,{lessonId:t}):null:(0,o.jsx)(yde,{lessonId:t},`${t??""}-${e?.retryAttempts??0}`)]})})})})}const A0=V("lesson-header"),fo=({avatar:e,authorName:t,className:n=""})=>{const s=xe();return(0,o.jsxs)("div",{className:A0("author").mix(n),children:[(0,o.jsx)("img",{alt:"",className:"lesson-header__author-img",src:e?yt(e):void 0}),(0,o.jsx)("span",{className:"visually-hidden-always",children:s?.a11yAuthorPrefix}),(0,o.jsx)("span",{className:"lesson-header__author-name",children:t})]})},P0=({showPartnerContent:e=!1})=>(0,o.jsx)("div",{className:A0("author",{"partner-content":e})}),po=()=>(0,o.jsx)("div",{className:"lesson-header__counter"}),go=({lessonName:e,lessonPreposition:t,totalLessons:n,lessonNumber:s,showPartnerContent:r=!1})=>{const{lmsOptions:i}=ie();return(0,o.jsx)("div",{className:A0("counter",{"partner-content":r}),children:(0,o.jsx)("div",{className:A0("count",{"exit-button-enabled":i?.enableExitCourse}),children:`${e} ${s} ${t} ${n}`})})},ha=({description:e})=>(0,o.jsx)(je,{className:"lesson-header__description",value:e}),Tde=({children:e})=>(0,o.jsx)("div",{className:"lesson-header__grouped-row",children:e}),Lde=({ariaLabel:e,imgRole:t,children:n,sectionStyles:s,topWrapClassName:r})=>(0,o.jsxs)("header",{className:"page__header",children:[(0,o.jsx)("div",{className:"page__header-limit",children:(0,o.jsx)("div",{className:"page__header-container",children:(0,o.jsx)("div",{className:"lesson-header__row",children:(0,o.jsx)("div",{className:"lesson-header__main",children:(0,o.jsx)("div",{className:"lesson-header",children:(0,o.jsx)("div",{className:r,children:n})})})})})}),(0,o.jsx)("div",{"aria-label":e,className:"page__header-bg",role:t,style:s})]}),vo=({title:e,id:t})=>{const n=By(t,"title"),s=(0,o.jsx)("h1",{className:"lesson-header__title","data-change-path":n,tabIndex:-1,children:(0,o.jsx)(je,{value:e})});return t==null?s:(0,o.jsx)(Yn,{anchor:M3(t),label:"Comments on lesson title",children:s})},cr=V("lesson-header"),RT=e=>`url(${rc({width:76,height:76,imageKey:e.image})})`,c1=({partnerContentAuthors:e})=>{const t=e.map(s=>s.name).join(", "),n=e.length===1;return(0,o.jsxs)("div",{className:cr("partner-content",{mobile:!0}),children:[(0,o.jsx)("div",{className:cr("partner-content-author",{single:n}),children:e.map(s=>(0,o.jsx)("div",{className:cr("partner-content-author-img",{single:n}),style:{backgroundImage:RT(s)}},s.name))}),(0,o.jsx)("span",{"aria-hidden":"true",className:cr("author-name"),children:t})]})},ma=({partnerContentAuthors:e})=>{const t=xe();return(0,o.jsx)("div",{className:cr("partner-content"),children:e.map(n=>(0,o.jsxs)("div",{className:cr("partner-content-author"),children:[(0,o.jsx)("div",{className:cr("partner-content-author-img"),style:{backgroundImage:RT(n)}}),(0,o.jsxs)("div",{children:[(0,o.jsxs)("span",{className:"visually-hidden",children:[t?.a11yAuthorPrefix," ",n.name]}),(0,o.jsx)("span",{"aria-hidden":"true",className:cr("author-name"),children:n.name})]})]},n.name))})};var AT=C(49860);const fa=V("lesson-header"),Ede=({authorName:e,avatar:t,description:n,lessonName:s,lessonNumber:r,lessonPreposition:i,partnerContentAuthors:a,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=a!=null&&c,p=t&&e&&c&&!f,v=p||f||l,g=l&&(p||f);return(0,o.jsxs)("div",{className:fa("content"),children:[v&&(0,o.jsxs)("div",{className:fa("info-row"),children:[p?(0,o.jsx)(fo,{authorName:e,avatar:t}):(0,o.jsx)(P0,{}),f&&(0,o.jsx)(ma,{partnerContentAuthors:a}),g&&(0,o.jsx)("span",{"aria-hidden":"true",className:fa("info-row--divider"),children:"|"}),l?(0,o.jsx)(go,{lessonName:s,lessonNumber:r,lessonPreposition:i,totalLessons:h}):(0,o.jsx)(po,{})]}),(0,o.jsxs)("div",{className:fa("title-wrapper",{"no-info":!v}),children:[(0,o.jsx)(vo,{id:m,title:d}),n&&(0,o.jsx)(ha,{description:n,id:m})]})]})},kde=({authorName:e,avatar:t,description:n,lessonName:s,lessonNumber:r,lessonPreposition:i,partnerContentAuthors:a,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=a!=null,p=AT.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,o.jsxs)("div",{className:fa("content"),children:[l?(0,o.jsx)(go,{lessonName:s,lessonNumber:r,lessonPreposition:i,totalLessons:h}):(0,o.jsx)(po,{}),p&&(0,o.jsx)(fo,{authorName:e,avatar:t}),c&&f&&(0,o.jsx)(c1,{partnerContentAuthors:a}),(0,o.jsx)(vo,{id:m,title:d}),n&&(0,o.jsx)(ha,{description:n,id:m})]})},Nde=({authorName:e,avatar:t,description:n,lessonName:s,lessonNumber:r,lessonPreposition:i,partnerContentAuthors:a,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=a!=null,p=AT.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,o.jsxs)("div",{className:fa("content"),children:[l?(0,o.jsx)(go,{lessonName:s,lessonNumber:r,lessonPreposition:i,totalLessons:h}):(0,o.jsx)(po,{}),(0,o.jsx)(vo,{id:m,title:d}),p?(0,o.jsx)(fo,{authorName:e,avatar:t}):(0,o.jsx)(P0,{showPartnerContent:f}),c&&f&&(0,o.jsx)(ma,{partnerContentAuthors:a}),n&&(0,o.jsx)(ha,{description:n,id:m})]})};function jde(e){const t=A3();return e.lessonHeaderSize===Fa.SMALL&&!t?(0,o.jsx)(Ede,{...e}):t?(0,o.jsx)(kde,{...e}):(0,o.jsx)(Nde,{...e})}const wde=()=>Zt(480);var PT=C(49860);const l1=V("lesson-header"),Rde=({authorName:e,avatar:t,lessonName:n,lessonNumber:s,lessonPreposition:r,partnerContentAuthors:i,showAuthor:a,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=i!=null&&a,f=t&&e&&a&&!m,p=f||m||c,v=c&&(f||m);return(0,o.jsxs)("div",{className:l1("content"),children:[p&&(0,o.jsxs)("div",{className:l1("info-row"),children:[f?(0,o.jsx)(fo,{authorName:e,avatar:t}):(0,o.jsx)(P0,{}),m&&(0,o.jsx)(ma,{partnerContentAuthors:i}),v&&(0,o.jsx)("span",{"aria-hidden":"true",className:l1("info-row--divider"),children:"|"}),c?(0,o.jsx)(go,{lessonName:n,lessonNumber:s,lessonPreposition:r,totalLessons:d}):(0,o.jsx)(po,{})]}),(0,o.jsx)("div",{children:(0,o.jsx)(vo,{id:h,title:l})})]})},Ade=({authorName:e,avatar:t,lessonName:n,lessonNumber:s,lessonPreposition:r,partnerContentAuthors:i,showAuthor:a,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=i!=null,f=PT.useMemo(()=>t&&e&&a&&!m,[t,e,a,m]);return(0,o.jsxs)(o.Fragment,{children:[c?(0,o.jsx)(go,{lessonName:n,lessonNumber:s,lessonPreposition:r,totalLessons:d}):(0,o.jsx)(po,{}),f&&(0,o.jsx)(fo,{authorName:e,avatar:t}),a&&m&&(0,o.jsx)(c1,{partnerContentAuthors:i}),(0,o.jsx)(vo,{id:h,title:l})]})},Pde=({authorName:e,avatar:t,lessonName:n,lessonNumber:s,lessonPreposition:r,partnerContentAuthors:i,showAuthor:a,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=i!=null,f=PT.useMemo(()=>t&&e&&a&&!m,[t,e,a,m]);return(0,o.jsxs)(o.Fragment,{children:[f?(0,o.jsx)(fo,{authorName:e,avatar:t}):(0,o.jsx)(P0,{}),a&&m&&(0,o.jsx)(ma,{partnerContentAuthors:i}),(0,o.jsx)(vo,{id:h,title:l}),c?(0,o.jsx)(go,{lessonName:n,lessonNumber:s,lessonPreposition:r,totalLessons:d}):(0,o.jsx)(po,{})]})};function Mde(e){const t=wde();return e.lessonHeaderSize===Fa.SMALL&&!t?(0,o.jsx)(Rde,{...e}):t?(0,o.jsx)(Ade,{...e}):(0,o.jsx)(Pde,{...e})}var MT=C(49860);const M0=V("lesson-header"),d1=()=>(0,o.jsx)("div",{className:M0("author--hidden")}),Ode=({authorName:e,avatar:t,description:n,lessonName:s,lessonNumber:r,lessonPreposition:i,partnerContentAuthors:a,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=a!=null&&c,p=t&&e&&c&&!f,v=p||f||l,g=l&&(p||f);return(0,o.jsxs)("div",{className:M0("content"),children:[v&&(0,o.jsxs)("div",{className:M0("info-row"),children:[p?(0,o.jsx)(fo,{authorName:e,avatar:t}):(0,o.jsx)(d1,{}),f&&(0,o.jsx)(ma,{partnerContentAuthors:a}),g&&(0,o.jsx)("span",{"aria-hidden":"true",className:M0("info-row--divider"),children:"|"}),l?(0,o.jsx)(go,{lessonName:s,lessonNumber:r,lessonPreposition:i,totalLessons:h}):(0,o.jsx)(po,{})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(vo,{id:m,title:d}),n&&(0,o.jsx)(ha,{description:n,id:m})]})]})},Bde=e=>{const{authorName:t,avatar:n,description:s,lessonName:r,lessonNumber:i,lessonPreposition:a,partnerContentAuthors:c,showAuthor:l,showLessonCount:d,title:h,totalLessons:m,lessonId:f}=e,p=c!=null,v=MT.useMemo(()=>n&&t&&l&&!p,[n,t,l,p]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(vo,{id:f,title:h}),(0,o.jsxs)(Tde,{children:[v?(0,o.jsx)(fo,{authorName:t,avatar:n}):(0,o.jsx)(d1,{}),l&&p&&(0,o.jsx)(ma,{partnerContentAuthors:c}),d?(0,o.jsx)(go,{lessonName:r,lessonNumber:i,lessonPreposition:a,showPartnerContent:p,totalLessons:m}):(0,o.jsx)(po,{})]}),s&&(0,o.jsx)(ha,{description:s,id:f})]})},Dde=e=>{const{authorName:t,avatar:n,description:s,lessonName:r,lessonNumber:i,lessonPreposition:a,partnerContentAuthors:c,showAuthor:l,showLessonCount:d,title:h,totalLessons:m,lessonId:f}=e,p=c!=null,v=MT.useMemo(()=>n&&t&&l&&!p,[n,t,l,p]);return(0,o.jsxs)(o.Fragment,{children:[d?(0,o.jsx)(go,{lessonName:r,lessonNumber:i,lessonPreposition:a,totalLessons:m}):(0,o.jsx)(po,{}),v?(0,o.jsx)(fo,{authorName:t,avatar:n}):(0,o.jsx)(d1,{}),l&&p&&(0,o.jsx)(c1,{partnerContentAuthors:c}),(0,o.jsx)(vo,{id:f,title:h}),s&&(0,o.jsx)(ha,{description:s,id:f})]})};function Fde(e){const t=iu();return e.lessonHeaderSize===Fa.SMALL&&!t?(0,o.jsx)(Ode,{...e}):t?(0,o.jsx)(Dde,{...e}):(0,o.jsx)(Bde,{...e})}const _de={[ne.RISE_CLASSIC]:jde,[ne.HORIZON]:Mde,[ne.APEX]:Fde};function Hde(e){const t=Et(),n=_de[t];return(0,o.jsx)(n,{...e})}const Vde=V("lesson-header"),zde=({authorName:e,avatar:t,children:n,description:s,labels:{lessonName:r,lessonPreposition:i},lessonHeaderImageColor:a,lessonHeaderSize:c,lessonHeaderStyle:l,lessonId:d,partnerContentAuthors:h,totalLessons:m,lessonNumber:f,showAuthor:p,showLessonCount:v,title:g})=>{const x=gP(),y=Qb(x),S=l===oe.IMAGE,I=Vde("top-wrap"),{alpha:b,ariaLabel:T,media:L,role:E}=Ur("lessonHeaderImage"),k=L?.image,N=(0,u.useMemo)(()=>{if(k&&S){const P=a===vt.LIGHT?"#fff":"#000";return td({alpha:b,color:P,url:Tt(k)})}},[k,S,a,b]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Lde,{ariaLabel:S?T:void 0,imgRole:S?E:void 0,sectionStyles:N,topWrapClassName:I,children:(0,o.jsx)(Hde,{authorName:e,avatar:t,description:s,lessonHeaderSize:c,lessonId:d,lessonName:r,lessonNumber:f,lessonPreposition:i,partnerContentAuthors:h,showAuthor:p,showLessonCount:v&&!y,title:g,totalLessons:m})}),n]})};function $de(e){const t=e?.customColorLessonHeaderContrast,n=e?.lessonHeaderColor;return(0,u.useMemo)(()=>{const s=fs(n),r=t??s;return(r===Ee.AUTO?s:r)===Ee.DARK?At.DARK:At.LIGHT},[t,n])}var Ude=C(89464),u1=C.n(Ude);C.dn(OT);function OT({authors:e,lessonAuthor:t,courseAuthor:n,selectedAuthorId:s}){if(s==="none")return{};if(s){const r=u1()(e,{id:s});if(r)return r}if(t){const r=u1()(e,{id:t});if(r)return r}if(n){const r=u1()(e,{id:n});if(r)return r}return{}}const{LARGE:Gde,SMALL:Wde}=Fa,{ACCENT:Kde,BLACK:Qde,COLOR:BT,DARK:Zde,GRAY:Yde,IMAGE:DT,LIGHT:qde,TINT:Xde}=oe,Jde=V("lesson-header-wrap");function eue({isLessonEntering:e,isLessonExiting:t,isMobileHeader:n,lesson:s,lessonProgress:r,loadMedia:i,observeProgress:a=!0}){const c=Or(),l=xe(),d=hf(),h=$de(c?.theme);if(!c||!l||s.type!=="blocks"&&s.type!=="quiz")return null;if(s.type==="quiz")return(0,o.jsx)(Ide,{lessonProgress:r?.type==="quiz"?r:void 0});const m=f2({course:c,lesson:s}),f=typeof m=="object"&&m!==null&&"id"in m&&(typeof m.id=="string"||typeof m.id=="number")?String(m.id):null,p=vM({course:c,lesson:s}),v=CM(c),{author:g,selectedAuthorId:x}=s,{authors:y,showLessonCount:S,theme:I}=c,{hideLessonHeaders:b,lessonHeaderColor:T,lessonHeaderImageColor:L,lessonHeaderSize:E,lessonHeaderStyle:k,navigationType:N,showAuthor:P}=I??{},R=d.find($=>$.id===x)?.data?.authors,j=OT({authors:y,lessonAuthor:g,courseAuthor:c.author,selectedAuthorId:x}),{avatar:M,authorName:w}=j,O=(0,o.jsx)(zde,{authorName:w,avatar:M,description:s.description,labels:l,lessonHeaderImageColor:L,lessonHeaderSize:E,lessonHeaderStyle:k,lessonId:s.id,lessonNumber:p,partnerContentAuthors:R,showAuthor:P,showLessonCount:S,title:s.title,totalLessons:v,children:(0,o.jsx)(aT,{id:s.id,items:s.items,lessonProgress:r,navigationType:N,scrollPosition:0,type:s.type})}),D=`image-${(L??vt.DARK).toLowerCase()}`,_=Jde({[D]:k===DT,accent:k===Kde,black:k===Qde,collapsed:b,custom:k===BT,dark:k===Zde,gray:k===Yde,image:k===DT,large:E===Gde&&!n,light:k===qde,mobile:n,small:E===Wde&&!n,tint:k===Xde,"video-training":eo(c)}),F=k===BT?{"--lesson-header-contrast-color":h,"--color-background":T}:{};return(0,o.jsx)(Oce,{animateBlockEntrance:c.animateBlockEntrance??!1,data:s,hideLessonHeaders:b??void 0,isLessonEntering:e,isLessonExiting:t,lessonHeader:O,lessonHeaderWrapClasses:_,lessonHeaderWrapStyles:F,loadMedia:i,nextLesson:f,observeProgress:a})}const tue=({percentComplete:e,trackingCompletionPercentage:t,labelCompletionRequirement:n="Completion Requirement",labelPercentCompletion:s="% Completion",labelYouCompleted:r="You completed:",labelA11yRequirementCompleted:i="Requirement completed, check mark",labelA11yRequirementNotCompleted:a="Requirement not completed, empty square"})=>{const c=ds();if(t==null)return null;const l=Hi({percent:t,label:s,isRTL:c}),d=c?`%${e}`:`${e}%`;return(0,o.jsxs)("div",{className:"progress-summary__requirement",children:[(0,o.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,o.jsx)("h2",{className:"progress-summary__requirement-title",children:n}),(0,o.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,o.jsx)("div",{children:l}),(0,o.jsxs)("div",{children:[r,"\xA0",(0,o.jsx)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:d})]})]})]}),(0,o.jsx)(FT,{labelA11yRequirementCompleted:i,labelA11yRequirementNotCompleted:a,requirementMet:e!=null&&t<=e})]})},nue=({outOfAttempts:e,quizPassed:t,quizPassingScore:n=100,quizScore:s,quizTitle:r,trackingQuizId:i,labelQuizRequirement:a="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:p="Requirement not completed, empty square"})=>{const v=ds();if(!i)return null;const g=Hi({percent:n,label:l,isRTL:v});return(0,o.jsxs)("div",{className:"progress-summary__requirement",children:[(0,o.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,o.jsx)("h2",{className:"progress-summary__requirement-title",children:a}),(0,o.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,o.jsxs)("div",{children:[c," ",g," ",r]}),s==null?(0,o.jsx)("div",{children:(0,o.jsx)(pn,{className:"progress-summary__requirement-stats-link brand--color",to:Ln(i),children:d})}):(0,o.jsxs)("div",{children:[h,"\xA0",(0,o.jsxs)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:[s,"%"]})]})]}),e&&(0,o.jsx)("span",{className:"progress-summary__requirement-no-attempts",children:m})]}),(0,o.jsx)(FT,{labelA11yRequirementCompleted:f,labelA11yRequirementNotCompleted:p,requirementMet:t})]})},FT=({requirementMet:e,labelA11yRequirementCompleted:t,labelA11yRequirementNotCompleted:n})=>e?(0,o.jsx)(ae,{"aria-label":t,classNameIcon:"progress-summary__requirement-checkbox-checked",name:"square-check"}):(0,o.jsx)("div",{"aria-label":n,className:"progress-summary__requirement-checkbox-empty",role:"img"}),sue=({dueAt:e})=>e?(0,o.jsx)("div",{className:"progress-summary__header-due brand--color brand--border",children:Xf(e)}):null;var oue=C(22043),rue=C.n(oue);const iue=900,aue=1e4;function cue(){const[e,t]=(0,u.useState)(!1),[n,s]=(0,u.useState)(!0);return(0,u.useEffect)(()=>{let r;const i=setTimeout(()=>{t(!0),r=setTimeout(()=>s(!1),aue)},iue);return()=>{clearTimeout(i),clearTimeout(r)}},[]),{recycle:n,run:e}}const lue=["#eb524d","#ffac02","#ffcc00","#28cea9","#4fbdf4","#6788e4"],due=()=>{const{recycle:e,run:t}=cue(),n=(0,u.useRef)(null);return(0,o.jsx)("div",{className:"progress-summary__confetti",children:(0,o.jsx)(rue(),{canvasRef:n,colors:lue,gravity:.4,height:window.innerHeight,numberOfPieces:500,recycle:e,run:t,width:window.innerWidth})})};var uue=C(72804);const _T=V("progress-summary-card"),hue=({completeLabel:e,isComplete:t,isUrgent:n,completedDate:s,labelDue:r})=>t?(0,o.jsxs)("div",{className:"progress-summary-card__completed-label",children:[e,(0,o.jsx)("span",{className:"progress-summary-card__completed-date",children:s})]}):r?(0,o.jsx)("div",{className:["progress-summary-card__due-label",n?"brand--color":void 0].filter(Boolean).join(" "),children:r}):null,mue=({cardImageKey:e=null,className:t,color:n="#ff6602",completedAt:s=null,coverImageKey:r=null,disable:i=!1,durationHidden:a=!1,enrolledAt:c=null,hidden:l=!1,imagesUri:d="",isLearningPath:h=!1,isUrgent:m=!1,labelAssignedToMe:f="",labelDue:p="",labelDuration:v="",labelLearningPath:g="",onClick:x=dn,progress:y=0,title:S=""})=>{const I=xe(),b=ds(),T=s!==null,L=(0,u.useCallback)(()=>{i||x?.()},[i,x]),E=(0,u.useCallback)(w=>{nf(w)&&w.preventDefault(),!i&&ji(w)&&x?.()},[i,x]),k=Hi({percent:Math.round(y),label:I?.progressSummaryPercentComplete||"% Complete",isRTL:b}),N=e||r,P=I?.progressSummaryCompleted||"Completed: ",A=s===null?"":`${Cs()(new Date(s)).format("MM/DD/YY")}`,R=_T("card",{disabled:i}),j=["progress-summary-card__title-button",t].filter(Boolean).join(" "),M=_T("image-overlay",{"not-started":!(y||T),"in-progress-completed":y||T});return(0,o.jsxs)("div",{"aria-hidden":l,className:R,onClick:L,children:[(0,o.jsxs)("div",{className:"progress-summary-card__content",children:[(0,o.jsx)("button",{"aria-disabled":i,className:j,onKeyDown:E,role:"link",tabIndex:l?-1:void 0,type:"button",children:(0,o.jsx)("span",{className:"progress-summary-card__title",children:S||I?.progressSummaryNoTitle||"(No Title)"})}),(0,o.jsxs)("div",{className:"progress-summary-card__course-info",children:[h&&(0,o.jsx)("div",{className:"progress-summary-card__hide",children:g}),c&&(0,o.jsx)("div",{className:"progress-summary-card__hide",children:f}),!!y&&!i&&!s&&(0,o.jsx)("span",{className:"progress-summary-card__hide",children:k}),!a&&!T&&(0,o.jsx)("div",{className:"progress-summary-card__duration",children:v}),(0,o.jsx)(hue,{completedDate:A,completeLabel:P,isComplete:T,isUrgent:m,labelDue:p})]})]}),(0,o.jsxs)("div",{className:"progress-summary-card__image-wrap",children:[(0,o.jsx)(uue.A,{alt:"","aria-hidden":"true",b:"fff",className:"progress-summary-card__image",f:"jpg",h:150,imageKey:N,imagesUri:d,s:"cover",style:{backgroundColor:n},w:300}),(0,o.jsx)("div",{className:M}),(0,o.jsx)("div",{className:"progress-summary-card__image-overlay-bottom-bar",children:!!y&&!i&&!T&&(0,o.jsx)("div",{"aria-hidden":"true",className:"progress-summary-card__progress-bar-wrap",children:(0,o.jsx)("div",{className:"progress-summary-card__wrap-light",children:(0,o.jsx)("div",{className:"progress-summary-card__progress-bar",style:{width:`${y}%`}})})})})]})]})},fue=Ne("IMAGES_URI"),HT=(e,t)=>e===1?t:t.concat("s"),h1=e=>e?.course?.course?.lessons??[],pue=e=>t=>h1(t).find(n=>n.type!=="section"&&n.id!=null&&!e.includes(n.id)),gue=e=>{const t=h1(e),{trackingQuizId:n,score:s}=e??{};if(n&&t.length){const r=t.find(({id:a})=>a===n),{settings:{passingScore:i}={}}=r??{};return Number(s)<Number(i)?r:!1}},vue=e=>h1(e).find(t=>t.type!=="section"),Cue=(e,t)=>(pue(e)(t)||gue(t)||vue(t))?.id??"",xue=e=>{const t=Cs().duration(e),n=t.hours(),s=t.minutes(),r=`${n} ${HT(n,"hr")}`,i=`${s} min`;return n>=100?"100+ hrs":n>0&&s>0?[r,i].join(" "):n>0?r:i},bue=({color:e,learningPathId:t})=>{const{learningPathComplete:n,isSuccess:s,nextCourse:r}=ue(x=>x.learningPathUpNext??{}),{dueAt:i,courseId:a="",lessonCount:c,lessonsCompleted:l=[],sourceType:d,timeToComplete:h}=r??{},m=xe(),f=(0,u.useMemo)(()=>Cue(l,r),[r,l]),p=r?.color??e,v={cardImageKey:r?.cardImageKey,color:p,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",a),window.top.location.assign(`/learning-path/${t}`)):ew(`${a}/lessons/${f}`)},[a,t,f,d]);return s&&!n&&(0,o.jsx)("div",{className:"progress-summary__lp-next",children:(0,o.jsxs)("div",{className:"progress-summary__lp-next-inner",children:[(0,o.jsxs)("div",{className:"progress-summary__lp-next-label",children:[m?.progressSummaryNextUp||"Next up"," ",(0,o.jsx)(ae,{"aria-hidden":"true",classNameIcon:"progress-summary__lp-next-label-icon",name:"arrow-right"})]}),(0,o.jsx)("div",{className:"progress-summary__lp-next-card",children:(0,o.jsx)(mue,{imagesUri:fue,labelCount:`${c} ${HT(c,"lesson")}`,labelDue:Xf(i),labelDuration:xue(h),noCertDownload:!0,noFavoriteBtn:!0,onClick:g,...v})})]})})},yue=`${Ne("CDN_URI")}/assets/rise/assets/trophy.svg`,Sue=e=>Object.values(e).filter(({isComplete:t})=>t).length,Iue=e=>{const{color:t,course:n={},courseProgress:s={},lessons:r=[]}=e,i=nt(),{learningPathComplete:a,lpHasFailedQuiz:c}=ue(H=>H.learningPathUpNext??{}),{lessons:l={},percentComplete:d}=s,{dueAt:h,certificateDownload:m,completionCelebration:f,lessonsOnly:p=[],riseComCourseId:v,riseComLearningPathId:g,trackingCompletionPercentage:x,trackingQuizId:y}=n,S=nc(),I=xe(),b=I??{},T=x==null&&y==null,L=T?d===100:uC(),E=p.length,k=Sue(l),N=(0,u.useCallback)(()=>{i(cw({courseId:v,learningPathId:g}))},[i,v,g]);(0,u.useEffect)(()=>{g&&N()},[]);const P=(0,u.useMemo)(()=>L?n.completedAt?n.completedAt:new Date:null,[n.completedAt,L]),A=(0,u.useMemo)(()=>r.find(H=>H.type==="quiz"&&H.id===y),[y,r]),R=Ct(A?.title),j=(0,u.useMemo)(()=>Number(A?.settings?.passingScore??100),[A]),M=y?s.lessons?.[y]:void 0,w=M?.passed??null,O=(0,u.useMemo)(()=>M?.percentComplete===100?M.score??null:null,[M]),B=p2(s,A,y),D=typeof B=="object"&&B!==null&&"outOfAttempts"in B&&B.outOfAttempts===!0,_=y?w:!0,F=vn(),$=T?"progress-summary progress-summary__no-req":"progress-summary",z=ls(n),K=`You've completed ${k} of ${E} lessons.`,Q=z?L?"Complete":"Incomplete":K,U=String(lc(S+" - Progress Summary"));return(0,o.jsx)(Hr,{title:U,children:(0,o.jsxs)("div",{className:$,children:[L&&f&&_&&!F&&(0,o.jsx)(due,{}),(0,o.jsxs)("header",{className:"progress-summary__header",children:[(0,o.jsx)("h1",{className:"progress-summary__header-title",tabIndex:-1,children:L&&!T&&_?I?.progressSummaryCongratulations||"Congratulations!":I?.progressSummary||"Progress Summary"}),T?(0,o.jsx)("div",{className:"progress-summary__lessons-completed",children:Q}):L?(0,o.jsxs)("div",{className:"progress-summary__header-completion-date",children:[_&&(0,o.jsx)("img",{alt:"trophy",className:"progress-summary__header-trophy",src:yue}),Cs()(P).format("MMMM Do, YYYY")]}):(0,o.jsx)(sue,{dueAt:h})]}),(0,o.jsxs)("section",{className:"progress-summary__section",children:[!T&&L&&(0,o.jsx)("div",{className:"progress-summary__requirements-met",children:I?.progressSummaryRequirementsMet||"You've met all the requirements."}),T?!g&&(0,o.jsxs)(pn,{className:"progress-summary__start-over",to:"/",children:[I?.progressSummaryStartOver||"Start Over",(0,o.jsx)("i",{className:"progress-summary__start-over-icon icon icon-reload"})]}):(0,o.jsxs)("div",{className:"progress-summary__requirements",children:[(0,o.jsx)(tue,{labelA11yRequirementCompleted:I?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:I?.a11yProgressSummaryRequirementNotCompleted,labelCompletionRequirement:b.progressSummaryCompletionRequirement,labelPercentCompletion:b.progressSummaryPercentCompletion,labelYouCompleted:b.progressSummaryYouCompleted,percentComplete:d,trackingCompletionPercentage:x}),(0,o.jsx)(nue,{labelA11yRequirementCompleted:I?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:I?.a11yProgressSummaryRequirementNotCompleted,labelNoAttemptsRemaining:b.progressSummaryNoAttemptsRemaining,labelQuizRequirement:b.progressSummaryQuizRequirement,labelScoreOf:b.progressSummaryScoreOf,labelScoreOfPreposition:b.progressSummaryScoreOfPreposition,labelViewQuiz:b.progressSummaryViewQuiz,labelYouScored:b.progressSummaryYouScored,outOfAttempts:D,quizPassed:w,quizPassingScore:j,quizScore:O,quizTitle:R,trackingQuizId:y})]}),(L||T)&&(0,o.jsxs)("div",{className:"progress-summary__completion-controls",children:[(0,o.jsx)("button",{className:"progress-summary__btn-back progress-summary__completion-control",onClick:Jj,role:"link",type:"button",children:I?.progressSummaryBackToLearning||"Back to my learning"}),L&&(!g&&m||g&&a)&&m&&_&&!c&&(0,o.jsx)("span",{className:"progress-summary__completion-control",children:(0,o.jsx)(b$,{})})]})]}),L&&!!g&&(0,o.jsx)(bue,{color:t,learningPathId:g})]})})},VT=({contentClassName:e,lessonId:t,...n})=>(0,o.jsx)("div",{className:"page","data-page":!0,children:(0,o.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,o.jsx)(L0,{lessonId:t,children:(0,o.jsx)("div",{className:e?`page__content ${e}`:"page__content",children:(0,o.jsx)(Iue,{...n})})})})});function Tue({content:e,isMobileHeader:t,lessonId:n,lessonProgress:s}){const r=Or(),i=Br(),a=rt(),c=xe(),l=Vp(),d=EY(),h=(0,u.useRef)(!1),m=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(l==="exiting"){h.current=!1;const S=m.current;S!=null&&(m.current=null,Sr(S));return}h.current||(h.current=!0,e.kind==="lesson"&&(Ba(n),m.current=n,mn(rj(n))))},[e.kind,n,l]),(0,u.useEffect)(()=>()=>{const S=m.current;S!=null&&Sr(S)},[]);const f=a(r?.title),p=e.kind==="progress-summary"?c?.progressSummary??"":e.kind==="lesson"?a(e.lesson.title):"",v=l==="entering",g=l==="exiting",x=l==="present",y=e.kind==="progress-summary"?(0,o.jsx)(VT,{course:r,courseProgress:i,lessonId:n,lessons:r?.lessonsOnly}):e.kind==="lesson"?(0,o.jsx)(eue,{isLessonEntering:v,isLessonExiting:g,isMobileHeader:t,lesson:e.lesson,lessonProgress:s,loadMedia:d,observeProgress:x}):null;return(0,o.jsx)(Hr,{active:!g,title:lc(`${p} - ${f}`),children:(0,o.jsx)("div",{className:"page","data-lesson-id":n,children:y})})}var O0=C(57990),Lue=C(19055),Eue=C.n(Lue);const zT=V("blocks-slide-indicator-tooltip"),kue=({disabled:e,left:t,ref:n,text:s,top:r,visible:i})=>{let a=(0,o.jsx)("span",{"aria-hidden":"true",children:s});return e&&(a=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ae,{classNameIcon:zT("icon"),name:"lock"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:"(locked content)"})]})),(0,o.jsx)("div",{"aria-hidden":!i,className:zT("wrapper",{disabled:e,visible:i}),ref:n,role:"tooltip",style:{left:t,top:r},children:a})},B0=V("blocks-slide-indicator"),Nue=({active:e,blockNavigationStyle:t,disabled:n,numberOfSlides:s,onKeyDown:r,onClick:i,ref:a,slideIndex:c})=>{const{prefersKeyboardNavigation:l}=cu()??{},[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(),p=(0,u.useRef)(null),v=(0,u.useRef)(null),g=(0,u.useRef)(void 0),x=t===Bh.NUMBERS,y=c+1,S=`${y} / ${s}`,I=e?`Step ${y} of ${s}, current step`:`Go to step ${y} of ${s}`,b=(0,u.useRef)(null);b.current||=document.getElementById("portal");const T=(0,u.useCallback)(()=>{if(p.current&&v.current){const B=p.current.getBoundingClientRect(),D=v.current.getBoundingClientRect(),_=B.left-D.width-18,F=Math.round(B.top-D.height/2+B.height/2);f({left:_,top:F})}},[]),L=(0,u.useCallback)(()=>{g.current=setTimeout(()=>{T(),h(!0)},300)},[T]),E=(0,u.useCallback)(()=>{clearTimeout(g.current),h(!1)},[]),k=(0,u.useCallback)(()=>{i(c)},[i,c]),N=(0,u.useCallback)(B=>{Nn(B)&&h(!1),r(B)},[r]),P=(0,u.useCallback)(()=>{L()},[L]),A=(0,o.jsx)(kue,{disabled:n,left:m?.left,ref:v,text:S,top:m?.top,visible:d}),R=B0("button",{active:e,disabled:n,numbers:x}),j=B0("wrapper"),M=B0("circle",{active:e,disabled:n}),w=B0("number",{active:e,disabled:n}),O=x?(0,o.jsx)("span",{"aria-hidden":"true",className:w,children:y}):(0,o.jsx)(ae,{classNameIcon:M,name:"circle-solid"});return(0,o.jsxs)("div",{className:j,ref:a,children:[(0,o.jsx)("button",{"aria-current":e?"page":void 0,"aria-disabled":n,"aria-label":I+(n?" (unavailable until previous content is completed)":""),className:R,"data-control":"",onBlur:E,onClick:n?void 0:k,onFocus:l?P:void 0,onKeyDown:N,onMouseEnter:L,onMouseLeave:E,ref:p,type:"button",children:O}),b.current&&(0,bs.createPortal)(A,b.current)]})},si=V("blocks-slide-controls"),$T=38,jue=8,wue=({activeSlideIndex:e,blockNavigationStyle:t,numberOfSlides:n,onGoToCover:s,onSlideClick:r,slideDisabledState:i,previewType:a})=>{const c=(0,u.useRef)(null),l=(0,u.useRef)(null),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),p=(0,u.useCallback)(y=>{let S=!1,I=-1;if(Fr(y)||Uo(y)){if(e-1>=0)I=e-1;else{s();return}S=!0}else _r(y)||Go(y)?(e+1<=n-1&&(I=e+1),S=!0):lH(y)?(I=0,S=!0):cH(y)&&(I=n-1,i[I]&&(I=i.findLastIndex(b=>!b)),S=!0);I>=0&&!i[I]&&r(I),S&&(y.stopPropagation(),y.preventDefault())},[e,n,s,r,i]);(0,u.useEffect)(()=>{const y=c.current,S=l.current;if(y&&S){const I=y.getBoundingClientRect(),b=S.getBoundingClientRect(),T=I.bottom-$T,L=I.top+$T;b.bottom>T?y.scrollBy({top:b.bottom-T,left:0,behavior:"smooth"}):b.top<L&&y.scrollBy({top:b.top-L,left:0,behavior:"smooth"})}},[e]);const v=(0,u.useCallback)(()=>{const y=c.current;y&&(h(y.scrollTop>jue),f(y.clientHeight+y.scrollTop<y.scrollHeight))},[]);(0,jc.A)(v);const g=(0,u.useCallback)(Vu()(v,100),[v]);Iu(c.current,v);const x=si({"touch-preview":Oc(a)});return(0,o.jsx)("div",{className:x,children:(0,o.jsx)("div",{className:si("page-control-wrapper"),children:(0,o.jsxs)("div",{className:si("page-control-inner-wrapper"),children:[(0,o.jsx)("div",{className:si("page-control"),onScroll:g,ref:c,children:(0,o.jsx)("div",{className:si("slide-dot-wrapper"),children:Eue()(y=>{const S=y===e;return(0,o.jsx)(Nue,{active:S,blockNavigationStyle:t,disabled:i[y],numberOfSlides:n,onClick:r,onKeyDown:p,ref:S?l:null,slideIndex:y},y)},n)})}),(0,o.jsx)("div",{className:si("overlay-top",{visible:d})}),(0,o.jsx)("div",{className:si("overlay-bottom",{visible:m})})]})})})};var sl;const Rue=1024,Aue=16/9,UT=Rue/Aue,m1={LARGE:280,MEDIUM:200,SMALL:150},Pue=e=>{const t=e==null?void 0:Number(e);return t===Na.SMALL.value?m1.SMALL:t===Na.LARGE.value?m1.LARGE:m1.MEDIUM},Mue=e=>typeof e=="string"||typeof e=="number",Oue=e=>sl(e)&&e.type==="slide"&&Array.isArray(e.items),ol=e=>{if(!(!tt(e)||!tt(e.experiments)))return e.experiments},Bue=(e,t)=>!Array.isArray(e)||!t?[]:e.filter(Mue).map(n=>t[String(n)]).filter(Oue),bye=(e,t)=>Bue(e,t).map(n=>n.id),Due=e=>sl(e)&&typeof e.key=="string"&&e.key.length>0,GT=e=>{if(sl(e))return Due(e.image)?e.image:void 0},Fue=e=>{if(!sl(e))return;const t=GT(e.media);if(t)return t;const n=Array.isArray(e.items)?e.items:[];for(const s of n){const r=GT(sl(s)?s.media:void 0);if(r)return r}},yye=e=>{for(const t of e?.items??[]){const n=Fue(t);if(n)return n}},_ue=e=>ol(e)?.showTitle!==!1,WT=e=>ol(e)?.imageTextLayout,KT=e=>e!==void 0&&e!=="fullBleed",Hue=e=>KT(WT(e)),Vue=e=>Hue(e)&&ol(e)?.showDescription!==!1,zue=e=>({imagePosition:e==="insetRight"||e==="bleedRight"?"right":"left",isFullBleed:e==="bleedLeft"||e==="bleedRight"||e==="overlay",isFullWidthBleed:e==="fullBleed",isOverlay:e==="overlay"}),$ue=e=>ol(e)?.titleVariant,Sye=e=>e&&ol(e)?.speakerNotes||"",QT=V("presentation-logo"),Uue=()=>{const e=ie(),t=Fn(),n=e?.theme?.showLogo??!0;if(!t||n===!1)return null;const s=e?.theme?.logoPosition??e8;return(0,o.jsx)(dp,{className:QT({[JN[s]]:!0}),imageClassName:QT("image"),resolveImageWidth:Pue})};function Gue(e,{designHeight:t,fit:n="width"}={}){const s=(0,u.useRef)(null),[r,i]=(0,u.useState)(1),a=(0,u.useRef)(null);(0,u.useLayoutEffect)(()=>{const l=s.current;if(!l)return;const d=(f,p)=>{const v=f>0?f/e:1,g=n==="contain"&&t?Math.min(v,p>0?p/t:1):v;i(x=>x===g?x:g)},h=l.getBoundingClientRect();d(h.width,h.height);const m=new ResizeObserver(f=>{a.current!=null&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{const p=f[0];p&&d(p.contentRect.width,p.contentRect.height)})});return m.observe(l),()=>{m.disconnect(),a.current!=null&&cancelAnimationFrame(a.current)}},[e,t,n]);const c={transform:`scale3d(${r}, ${r}, 1)`,transformOrigin:n==="contain"?"center":"top left"};return{containerRef:s,scale:r,scaleStyle:c}}const ZT=V("presentation-slide-frame");function Wue({children:e}){const{containerRef:t,scaleStyle:n}=Gue(1024,{designHeight:UT,fit:"contain"});return(0,o.jsx)("div",{className:ZT(),ref:t,children:(0,o.jsx)("div",{className:ZT("canvas"),style:{width:1024,height:UT,...n},children:e})})}const jt=V("blocks-lesson-slide"),f1="#fff",Kue=e=>tt(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string",Que=e=>tt(e)&&(typeof e.id=="string"||typeof e.id=="number"),p1=e=>{const t={...e,id:e.id??e.blockId};return Que(t)?t:null},Zue=["image full","image text overlay","quote background"],Yue=({className:e,hasSingleBlock:t})=>{const n=Wn(),{backgroundImageCss:s}=Gp(),r=En()||f1,i=n===oe.IMAGE;return t&&i?null:(0,o.jsx)("div",{className:e,style:i&&s?{backgroundImage:s.backgroundImage}:{background:r}})},YT=({className:e})=>{const t=Wn(),{backgroundImageCss:n}=Gp(),s=En()||f1,r=t===oe.IMAGE;return(0,o.jsx)("div",{className:e,style:r&&n?{backgroundImage:n.backgroundImage}:{background:s}})},qT=({className:e,showTitle:t,title:n,titleClassName:s,showDescription:r,description:i})=>!t&&!r?null:(0,o.jsxs)("div",{className:e,children:[t&&(0,o.jsx)(je,{className:s,tagName:"h1",value:n}),r&&(0,o.jsx)(je,{className:jt("lesson-description").toString(),value:i})]}),que=({backgroundCovers:e,composition:t,header:n,overlayText:s,renderedBlocks:r,isPresentationCourse:i,isMultimediaSlide:a,isChartSlide:c})=>{if(t?.isFullWidthBleed)return(0,o.jsxs)(o.Fragment,{children:[n,(0,o.jsx)("div",{className:jt("full-image"),children:r})]});if(t?.isOverlay)return(0,o.jsxs)("div",{className:jt("composition",{overlay:!0,bleed:!0}),children:[(0,o.jsx)("div",{className:jt("composition-image"),children:r}),s]});if(t){const l=t.imagePosition==="left"?["image","text"]:["text","image"];return(0,o.jsx)("div",{className:jt("composition",{bleed:t.isFullBleed,"image-left":t.imagePosition==="left","image-right":t.imagePosition==="right"}),children:l.map(d=>d==="image"?(0,o.jsx)("div",{className:jt("composition-image"),children:r},"image"):(0,o.jsx)("div",{className:jt("composition-text"),children:n},"text"))})}return i?(0,o.jsxs)(o.Fragment,{children:[n,a||c?r:(0,o.jsx)("div",{className:jt("body"),children:r})]}):(0,o.jsxs)(o.Fragment,{children:[n,(0,o.jsxs)("div",{className:jt("blocks-container"),children:[e,r]})]})};function Xue(e,t,n){if(n)return jt("connected-blocks");const s=t.blocks?.find(l=>l.settings?.backgroundType===oe.IMAGE),r=e.settings?.backgroundType===oe.IMAGE,i=jce(e.family??"",e.variant??"");return jt("connected-blocks",{"min-half-height":s&&(r&&!i)})}const Jue=({loadMedia:e,onContinue:t,previewType:n,ref:s,revealTargetBlockId:r,slide:i})=>{const a=ie(),c=to()??"",l=rd(c),{animateBlockEntrance:d}=a,h=i?.lastBlock,m=(0,u.useCallback)(q=>{q===h?.id&&t()},[h,t]);if(!i)return null;const{blocks:f,lessonTitle:p,lessonDescription:v,shouldShowAnimation:g=d,shouldShowTitle:x=!0,shouldShowDescription:y=!0,imageTextLayout:S,titleVariant:I}=i,b=r==null?-1:f.findIndex(q=>String(q.id??q.blockId)===String(r)),T=Mo(a),L=T&&!S?i.blocks?.[0]?.family:void 0,E=jt("inner",{presentation:T}),k=jt("lesson-title",{heading:I==="heading",subheading:I==="subheading"}).toString(),N=jt("lesson",{slides:!0,"touch-preview":Oc(n),media:L==="multimedia",chart:L==="chart"}).toString(),P=i.blocks.length===1,{settings:A,type:R,variant:j}=i.blocks?.[0]??{},M=!P||T?"none":A?.backgroundType===oe.IMAGE?"image-background":Zue.includes(`${R} ${j}`)?"legacy":"none",w=M!=="none"?jt("full-width-image",{legacy:M==="legacy",background:M==="image-background"}):null,O=x&&p,B=KT(S)&&y&&v,D=(0,o.jsx)(qT,{className:jt("lesson-header").toString(),description:v,showDescription:!!B,showTitle:!!O,title:p,titleClassName:k}),_=(0,o.jsx)(qT,{className:jt("composition-overlay-text").toString(),description:v,showDescription:!!B,showTitle:!!O,title:p,titleClassName:k}),F=S?zue(S):void 0,$=!F&&g,z=f.map((q,ee)=>{const se=b!==-1&&ee<=b;return P||se?!1:nT({blocks:i.blocks,lessonProgress:l,currentBlockIndex:ee})}),K=f.map((q,ee)=>{const se=z[ee],re=w||Xue(q,i,T),le={...q,blockId:q.blockId??q.id};if(!Kue(le))return null;const Le=le,Te=p1(q),W=Le.blockId===h?.id,de=!T&&!w&&Te?(0,o.jsx)(Bu,{block:Te,children:(0,o.jsx)(Yue,{className:jt("block-background"),hasSingleBlock:P})}):null;return(0,o.jsx)(e1,{animateBlockEntrance:$,backgroundBefore:de,block:Le,className:re,defaultBackgroundColor:f1,hideBlock:se,index:ee,isLastBlock:W,isOnlyBlockInStep:P,lessonId:c,loadMedia:e,onContinue:m},Le.blockId)}),J=f.filter((q,ee)=>!z[ee]),Q=!T&&!w&&J.length>=3,U=Q?p1(J[0]):null,H=Q?p1(J[J.length-1]):null,G=U&&H?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Bu,{block:U,children:(0,o.jsx)(YT,{className:jt("background-top-cover")})}),(0,o.jsx)(Bu,{block:H,children:(0,o.jsx)(YT,{className:jt("background-bottom-cover")})})]}):null,Y=(0,o.jsx)(que,{backgroundCovers:G,composition:F,header:D,isChartSlide:L==="chart",isMultimediaSlide:L==="multimedia",isPresentationCourse:T,overlayText:_,renderedBlocks:K}),Z=(0,o.jsxs)("div",{className:E,children:[(0,o.jsx)("div",{className:N,ref:s,children:Y}),(0,o.jsx)(Uue,{})]});return T?(0,o.jsx)(Wue,{children:Z}):(0,o.jsx)("div",{className:jt("wrapper"),children:Z})},D0=625,e0e=100;function t0e({isPresentationCourse:e,reduceMotion:t}){return(t||e?.01:D0)+e0e}const XT="ease",JT=(e,t)=>{t!=null&&(e.currentTime=(1-t)*D0)},n0e=(e,{phase:t,direction:n,reducedMotion:s,fromProgress:r})=>{if(s||typeof e.animate!="function")return null;if(t==="enter"){const c=n==="forward"?"100vh":"-100%",l=e.animate([{opacity:0,transform:`translateY(${c})`},{opacity:1,transform:"translateY(0)"}],{duration:D0,easing:XT});return JT(l,r),Ou(l)}const i=n==="forward"?"-100vh":"100%",a=e.animate([{opacity:1,transform:"translateY(0)"},{opacity:0,transform:`translateY(${i})`}],{duration:D0,easing:XT,fill:"forwards"});return JT(a,r),Ou(a)};function s0e({currentLessonRef:e,isPresentationCourse:t,numberOfSlides:n,onContinue:s,onCurrentLessonElChange:r,onSlideEntered:i,onTransitioningChange:a,previewType:c,revealTargetBlockId:l,slideIndex:d,slides:h}){const m=(0,u.useRef)(0),f=(0,u.useRef)(d),p=(0,u.useCallback)(S=>{e.current=S,r?.(S)},[e,r]);f.current!==d&&(m.current=e.current?.getBoundingClientRect()?.top??0,f.current=d);const v=h.length>0?Math.max(0,Math.min(d,h.length-1)):0,{presence:g,isTransitioning:x,mediaOwnerInstanceId:y}=e5({current:v,animate:(S,I)=>t?null:n0e(S,I),getDirection:(S,I)=>I>S?"forward":"backward",initialStatus:"present",animationTimeoutMs:825,onEntered:()=>{i()}});return(0,u.useEffect)(()=>{a(x)},[x,a]),(0,o.jsxs)(o.Fragment,{children:[g.map(S=>{const I=h[S.key],b=S.status==="exiting";return(0,o.jsx)("div",{ref:S.ref,style:b?{insetInline:0,position:"absolute",top:m.current,zIndex:0}:{position:"relative",zIndex:1},children:(0,o.jsx)(Jue,{loadMedia:S.instanceId===y,onContinue:s,previewType:c,ref:b?void 0:p,revealTargetBlockId:b?void 0:l,slide:I})},S.instanceId)}),(0,o.jsx)("div",{className:"visually-hidden-always",id:"step-counter",style:{insetBlockStart:0},children:n>0&&`Step ${v+1} of ${n}`})]})}var rl=C(49860);const o0e=50,r0e=1e3,i0e=({onSwipeDownHandler:e,onSwipeUpHandler:t,target:n,timeoutDuration:s=r0e})=>{const[r,i]=rl.useState(!1),a=rl.useRef(void 0),c=rl.useCallback(()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>i(!1),s)},[s]),l=rl.useCallback(d=>{const h=Math.abs(d.deltaY);if(r)h<o0e?(a.current&&clearTimeout(a.current),i(!1)):c();else if(h>100){const m=d.deltaY>0?e:t;i(!0),c(),m()}},[c,r,e,t]);rl.useEffect(()=>{if(!(!n||!t||!e))return n.addEventListener("wheel",l,{passive:!0}),()=>{a.current&&clearTimeout(a.current),n?.removeEventListener?.("wheel",l,{passive:!0})}},[e,t,l,n])},eL="rise-presenter-sync",Eye="presenterMode",a0e="slide",c0e="NAVIGATE_TO_SLIDE",l0e="SLIDE_CHANGE",d0e="PRESENTER_VIEW_EXIT";function u0e(){if(!(typeof BroadcastChannel>"u"))try{const e=new BroadcastChannel(eL);e.postMessage({type:d0e}),setTimeout(()=>{e.close()},0)}catch{}}let g1=null;function kye(e){g1=e}function h0e(){const e=g1;if(g1=null,!!e)try{e.closed||e.close()}catch{}}function Nye(){h0e(),u0e()}function m0e(e){const t=new URLSearchParams(e).get(a0e);if(t==null)return 0;const n=Number(t);return Number.isFinite(n)&&n>=0?n:0}function f0e(){const e=window.location.hash.split("?")[1]||"";return m0e(e)}var jye;const Ht=V("lesson-one-page-slides"),p0e=V("page-wrap"),F0=e=>e,g0e=e=>{if(e!=null&&"blockNavigationStyle"in e){const t=e.blockNavigationStyle;return typeof t=="string"?t:void 0}},v0e=e=>tt(e)&&(typeof e.id=="string"||typeof e.id=="number");function v1(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase(),n=e.getAttribute("type"),s=e.getAttribute("role"),r=e.tabIndex,i=t==="button"||["div","span"].includes(t)&&(s==="button"||r===0),a=t==="input"&&["radio","text"].includes(n??"")||t==="textarea"||s==="radio",c=["audio","video"].includes(t),l=s==="tab",d=document.querySelector(".quiz-card__interactive")?.contains?.(e)??!1;return i||a||c||l||d}const C0e=["button","checkbox","color","file","hidden","image","radio","range","reset","submit"];function tL(e){if(v1(e))return!0;if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase(),n=e.getAttribute("role"),s=e.getAttribute("type");return e.isContentEditable||n==="textbox"||t==="input"&&!C0e.includes(s??"")||(n==="slider"||n==="spinbutton"||t==="input"&&s==="range")}const nL=(e,t)=>(n,s,r)=>tT(n,r.slice(0,-1),e,void 0,t),x0e=(e,t)=>({disabled:n,slides:s},r)=>{const i=r.filter(d=>e[d.id]!=null).map(d=>({...d,...e[d.id]})),a=r[r.length-1],c=n||Ece(i)||kce(i,t),l={blocks:i,lastBlock:a,disabled:n};return{disabled:c,slides:[...s,l]}},_0=e=>{let t=!1,n=!1;if(e){const{clientHeight:s,scrollHeight:r,scrollTop:i}=e,a=Math.max(0,i),c=r-a;t=c===r,n=c-5<=s}return{isAtTop:t,isAtBottom:n}},b0e=/,? +/,y0e=[],S0e=({lessonProgress:e,previewType:t})=>{const{announcePolite:n,clearAnnouncements:s}=Rs(),r=(0,u.useRef)(null),i=(0,u.useRef)(null),a=(0,u.useRef)(null),[c,l]=(0,u.useState)(null),[d,h]=(0,u.useState)(null),m=(0,u.useCallback)(te=>{a.current=te,l(te)},[]),f=(0,u.useRef)(null),p=(0,u.useRef)(null),v=(0,u.useRef)(null),g=(0,u.useRef)(null),x=(0,u.useRef)(null),y=(0,u.useRef)(null),S=(0,u.useRef)(0),I=(0,u.useRef)(0),b=(0,u.useRef)(void 0),T=ln(),L=nt(),[E,k]=(0,u.useState)(()=>f0e()),[N,P]=(0,u.useState)(null),[A,R]=(0,u.useState)(!1),[j,M]=(0,u.useState)(!1),[w,O]=(0,u.useState)(!1),B=(0,Ve.A)(j),D=(0,Ve.A)(w),_=vn(),{lessons:F,...$}=ie()||{},z=Mo($),K=Oo($),J=eo($),Q=g0e($?.theme)||Bh.DOTS,U=F?.[0],H=U?.items||y0e,G=rT()||A;(0,u.useEffect)(()=>{const te=Ce=>{if(Ce.origin!==window.location.origin)return;(Array.isArray(Ce.data)?Ce.data:[Ce.data]).forEach(Bt=>{tt(Bt)&&Bt.type==="preview:lessonUpdate"&&R(!0)})};return window.addEventListener("message",te),()=>window.removeEventListener("message",te)},[]);const Y=(0,u.useCallback)(()=>{const te=(a.current?.scrollHeight??0)>(a.current?.clientHeight??0),{isAtBottom:Ce}=_0(a.current),it=te&&!j&&!Ce;it!=w&&O(it)},[w,j]);Iu(d,Y),(0,u.useLayoutEffect)(Y,[j]);const Z=(0,u.useCallback)(()=>{a.current?.scrollTo({top:0})},[]);(0,u.useLayoutEffect)(()=>{Z()},[E,Z]);const q=(0,u.useRef)(null),[,ee]=(0,u.useState)(0),se=(0,u.useCallback)(te=>{q.current=te,ee(Ce=>Ce+1)},[]);(0,u.useLayoutEffect)(()=>{const te=q.current;if(te==null)return;const Ce=a.current,it=Ce?.querySelector(`[data-block-id="${te}"]`);if(Ce==null||it==null)return;q.current=null;let Bt=0,Vt=it;for(;Vt instanceof HTMLElement&&Vt!==Ce&&Ce.contains(Vt);)Bt+=Vt.offsetTop,Vt=Vt.offsetParent;Ce.scrollTo({top:Bt})});const re=$?.theme,le=(0,u.useMemo)(()=>{const it=(G?H:n1([],H,e,re)).map(nL(e,re)).filter(Bt=>Bt!==null);return Object.fromEntries(it.map(Bt=>[Bt.blockId,Bt]))},[H,e,re,G]),Le=(0,u.useCallback)(te=>{const Ce={disabled:!1,slides:[]},{slides:it}=te.reduce(x0e(le,e),Ce);return it},[le,e]),Te=(0,u.useMemo)(()=>z?(F??[]).filter(te=>te?.type==="slide"):[],[z,F]),W=(0,u.useMemo)(()=>z?Te.map(te=>{const Ce=te.items.map(nL(e,re));return{blocks:Ce,lastBlock:Ce[Ce.length-1],lessonTitle:te?.title,lessonDescription:te?.description,shouldShowTitle:_ue(te),shouldShowDescription:Vue(te),shouldShowAnimation:te?.experiments?.showAnimation??!0,imageTextLayout:WT(te),titleVariant:$ue(te),disabled:!1}}):ph(H,eT,Le),[z,Te,H,Le,e,re]),de=(0,u.useMemo)(()=>W.map(te=>te.disabled),[W]),Ie=(0,u.useMemo)(()=>eT(H),[H]);(0,u.useEffect)(()=>{S.current=E},[E]),(0,u.useEffect)(()=>{I.current=W.length,W.length>0&&E>=W.length&&k(W.length-1)},[W.length,E]),(0,u.useEffect)(()=>{if(!z)return;const te=Te[E];if(!te)return;const Ce=b.current;Ce!=null&&Ce!==te.id&&Sr(Ce),Ba(te.id),L(jr(te.id)),b.current=te.id,window.parent.postMessage({type:"slide:change",data:String(te.id)},"*")},[E,z,Te,L]),(0,u.useEffect)(()=>()=>{const te=b.current;te!=null&&Sr(te)},[]);const ge=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(!K)return;const te=U?.id;if(te)return Ba(te),ge.current=te,()=>{const Ce=ge.current;Ce!=null&&Sr(Ce)}},[K,U?.id]);const we=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(!J)return;const te=U?.id;if(te)return Ba(te),we.current=te,()=>{const Ce=we.current;Ce!=null&&Sr(Ce)}},[J,U?.id]),(0,u.useEffect)(()=>{if(!(!z||typeof BroadcastChannel>"u"))try{x.current||(x.current=new BroadcastChannel(eL));const te=x.current,Ce=it=>{if(it.data.type===c0e){const Bt=it.data.slideIndex,Vt=Math.min(Bt,I.current-1);Vt>=0&&y.current&&y.current(Vt)}};return te.addEventListener("message",Ce),()=>{te.removeEventListener("message",Ce)}}catch{}},[z,T]),(0,u.useEffect)(()=>{if(!(!z||!x.current))try{x.current.postMessage({type:l0e,slideIndex:E})}catch{}},[z,E]),(0,u.useEffect)(()=>()=>{x.current?.close(),x.current=null},[]);const ve=W.length,fe=ve>0?Math.min(E,ve-1):0,ut=D3("slide"),qt=z?Te[fe]:void 0,Be=Oc(t),bt=Q!==Bh.NONE,Je=ve===0||fe===ve-1,os=e?.isComplete,We=w||Je?!os||!0:de[fe+1],sn=!w&&!Je,Xt=sn&&!We,Re=Je&&!0,Fe=(0,Ve.A)(Re),pt=w&&!Je,Es=(0,u.useCallback)(e0()(Y,100),[Y]);(0,u.useEffect)(()=>{const te=a.current;return te?.addEventListener("scroll",Es,{passive:!0}),()=>te?.removeEventListener("scroll",Es)},[Es]),(0,u.useEffect)(()=>{document.activeElement===v.current?!D&&w?p.current?.focus({preventScroll:!0}):!Fe&&Re&&g.current?.focus({preventScroll:!0}):document.activeElement===p.current&&D&&!w&&v.current?.focus({preventScroll:!0})},[w,D,Fe,B,Re,j]);const xo=jz(),va=(0,u.useRef)(!1);(0,u.useEffect)(()=>{xo&&(va.current=!0)},[xo]),(0,u.useEffect)(()=>{const te=()=>{va.current=!1};return document.addEventListener("pointerdown",te,!0),document.addEventListener("keydown",te,!0),()=>{document.removeEventListener("pointerdown",te,!0),document.removeEventListener("keydown",te,!0)}},[]);const y1=(0,u.useCallback)(()=>{va.current||a.current?.focus?.()},[]);(0,jc.A)(()=>{g5(),y1()});const zn=(0,u.useCallback)(te=>{const Ce=Math.max(0,Math.min(te,W.length-1));if(Ce===S.current){Z();return}k(Ce)},[Z,W.length]),bL=te=>{const Ce=Ie.findIndex(Bt=>Bt.some(Vt=>String(Vt.id)===String(te)));if(Ce===-1)return;const it=Ie[Ce].find(Bt=>String(Bt.id)===String(te));P(it?.id??te),se(it?.id??te),U?.id!=null&&!G&&sT(H,it?.id??te,e).forEach(Vt=>{v0e(Vt)&&L(mi({blockId:Vt.id,items:Vt.items??[],lessonId:U.id}))}),Ce!==E&&zn(Ce)},z0=(0,u.useRef)(bL);(0,u.useEffect)(()=>{z0.current=bL});const[Yhe]=(0,Ae.ok)(),S1=Yhe.get(wc);(0,u.useEffect)(()=>{S1!=null&&z0.current(S1)},[S1]),oT(({lessonId:te,blockId:Ce})=>{(U?.id==null||te===String(U.id))&&z0.current(Ce)});const cl=(0,u.useCallback)(()=>{j||(M(!0),ro(()=>{T("/")},"lesson-to-one-page-cover-stepped"))},[T,j]),qhe=$?.exportSettings?.webExportSettings,ll=z||!!(!Ps.isInstantLink&&($?.lmsOptions?.disableCoverPage||qhe?.disableCoverPage)),$0=E===0&&ll,I1=(0,u.useCallback)(ll?()=>zn(0):cl,[ll,zn,cl]);(0,u.useEffect)(()=>{y.current=zn},[zn]);const U0=(0,u.useCallback)(()=>{j||(E>0?zn(E-1):cl())},[zn,E,j,cl]),G0=(0,u.useCallback)(()=>{j||zn(E+1)},[zn,T,Je,E,j]),Xhe=(0,u.useCallback)(()=>{(E<ve-1||Je&&!1)&&G0()},[Je,E,ve,G0]),yL=(0,u.useCallback)(()=>{const te=a.current?.scrollTop??0,Ce=a.current?.clientHeight??0,it=_?"instant":"smooth";a.current?.scrollTo({top:te+Ce,behavior:it})},[_]),W0=(0,u.useCallback)(()=>{G0()},[G0]),Jhe=(0,u.useCallback)(()=>{yL()},[yL]),eme=(0,u.useCallback)(te=>{te===E||j||(zn(te),queueMicrotask(()=>{f.current?.querySelectorAll("[data-control]")?.[te]?.focus?.()}))},[zn,E,j]),tme=(0,u.useCallback)(()=>{setTimeout(()=>{if(i.current&&f.current?.contains?.(document.activeElement)){const te=Yg()(i.current.innerText,{length:75,separator:b0e});s(),n(`Content preview: ${te}`)}else y1()},0)},[n,s,y1]),Ca=(0,u.useCallback)(()=>{if(Be)return;const{isAtTop:te}=_0(a.current);if(te){E===0?I1():U0();return}},[Be,U0,E,I1]),xa=(0,u.useCallback)(()=>{if(Be||Je||We)return;const{isAtBottom:te}=_0(a.current);if(te){W0();return}},[Je,We,Be,W0]),nme=(0,u.useCallback)(()=>{const{isAtBottom:te,isAtTop:Ce}=_0(a.current),it=document.documentElement.clientWidth===window.innerWidth;return(te||Ce)&&it},[]),sme=(0,u.useCallback)(te=>{!f.current?.contains?.(document.activeElement)&&!v1(te.target)&&Ca()},[Ca]),ome=(0,u.useCallback)(te=>{!f.current?.contains?.(document.activeElement)&&!v1(te.target)&&xa()},[xa]),rme=(0,u.useCallback)(te=>{z&&!f.current?.contains?.(document.activeElement)&&!tL(te.target)&&Ca()},[z,Ca]),ime=(0,u.useCallback)(te=>{z&&!f.current?.contains?.(document.activeElement)&&!tL(te.target)&&xa()},[z,xa]),dl=(0,u.useCallback)(te=>{te===-1||te===E||zn(te)},[zn,E]),T1=(0,u.useCallback)(te=>{const Ce=Te.findIndex(({id:it})=>String(it)===String(te.detail.lessonId));dl(Ce)},[dl,Te]),L1=(0,u.useCallback)(te=>{const{itemId:Ce,lessonId:it}=te.detail;if(!z){Ce!=null&&z0.current(Ce);return}const Bt=Ce==null?-1:W.findIndex(Vt=>Vt.blocks.some(E1=>("blockId"in E1?E1.blockId:E1.id)===Ce));if(Bt!==-1){dl(Bt);return}dl(Te.findIndex(({id:Vt})=>String(Vt)===String(it)))},[z,dl,Te,W]);(0,u.useEffect)(()=>(window.addEventListener(ff,T1),window.addEventListener(Ye,L1),()=>{window.removeEventListener(ff,T1),window.removeEventListener(Ye,L1)}),[L1,T1]),(0,u.useEffect)(()=>{const te=Ce=>{y.current?.(Ce.detail.slideIndex)};return window.addEventListener(gf,te),()=>window.removeEventListener(gf,te)},[]),(0,O0.A)("ArrowUp",F0,sme),(0,O0.A)("ArrowDown",F0,ome),(0,O0.A)("ArrowLeft",F0,rme),(0,O0.A)("ArrowRight",F0,ime),i0e({target:c,onSwipeUpHandler:Ca,onSwipeDownHandler:xa,timeoutDuration:t0e({isPresentationCourse:z,reduceMotion:_})});const ame=Ht("gradient",{visible:w}),cme=(0,o.jsxs)("nav",{"aria-label":"Slide navigation",className:Ht("presentation-controls"),ref:f,children:[(0,o.jsxs)("button",{"aria-disabled":E===0&&ll,className:Ht("presentation-btn"),onClick:E===0&&ll?void 0:U0,type:"button",children:[(0,o.jsx)(ae,{classNameIcon:Ht("presentation-arrow-icon"),name:"chevron-left"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),(0,o.jsx)("span",{"aria-hidden":!0,className:Ht("counter"),children:`${fe+1} / ${ve}`}),(0,o.jsxs)("button",{"aria-disabled":!Xt,className:Ht("presentation-btn"),onClick:Xt?W0:void 0,ref:v,type:"button",children:[(0,o.jsx)(ae,{classNameIcon:Ht("presentation-arrow-icon"),name:"chevron-right"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:"Go to next step"})]})]});return(0,o.jsxs)("div",{className:Ht({}),children:[(0,o.jsx)("div",{className:p0e({transitioning:j}),id:"page-wrap",ref:m,tabIndex:-1,children:(0,o.jsx)("div",{className:"page","data-page":!0,children:(0,o.jsx)("div",{className:"page__wrapper",children:(0,o.jsx)("div",{className:"page__content",children:(0,o.jsx)(Hr,{children:(0,o.jsxs)("div",{"data-lesson-id":U?.id,children:[z?cme:(0,o.jsxs)("nav",{"aria-label":"Step navigation",className:Ht("controls",{"touch-preview":Be}),ref:f,children:[(0,o.jsxs)("button",{"aria-disabled":$0,"aria-hidden":$0,className:Ht("prev-btn",{"touch-preview":Be}),onClick:$0?void 0:U0,tabIndex:$0?-1:void 0,type:"button",children:[(0,o.jsx)(ae,{classNameIcon:Ht("arrow-icon",{"touch-preview":Be}),name:"arrow-up"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),bt&&(0,o.jsx)(wue,{activeSlideIndex:E,blockNavigationStyle:Q,numberOfSlides:ve,onGoToCover:cl,onSlideClick:eme,previewType:t,slideDisabledState:de}),(0,o.jsxs)("div",{className:Ht("next-btns"),children:[(0,o.jsxs)("button",{"aria-disabled":!pt,"aria-hidden":!pt,className:Ht("page-down-btn",{"touch-preview":Be}),onClick:pt?Jhe:void 0,ref:p,tabIndex:pt?void 0:-1,type:"button",children:[(0,o.jsx)(ae,{classNameIcon:Ht("arrow-icon",{"touch-preview":Be}),name:"arrow-down"}),(0,o.jsxs)("span",{className:"visually-hidden-always",children:["Scroll page down",!w&&(0,o.jsx)("span",{children:"(disabled because this is the bottom of the page)"}),Je&&(0,o.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,o.jsxs)("button",{"aria-disabled":We,"aria-hidden":!sn,className:Ht("next-btn",{"touch-preview":Be}),onClick:!sn||We?void 0:W0,ref:v,tabIndex:sn?void 0:-1,type:"button",children:[(0,o.jsx)(ae,{classNameIcon:Ht("arrow-icon",{"touch-preview":Be}),name:"arrow-down"}),(0,o.jsxs)("span",{className:"visually-hidden-always",children:["Go to next step",We&&(0,o.jsx)("span",{children:"(disabled until content is completed)"}),Je&&(0,o.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,o.jsxs)("button",{"aria-disabled":!Re,"aria-hidden":!Re,className:Ht("restart-btn",{"touch-preview":Be}),onClick:Re?I1:void 0,ref:g,tabIndex:Je?void 0:-1,type:"button",children:[(0,o.jsx)(ae,{classNameIcon:Ht("restart-icon",{"touch-preview":Be}),name:"arrow-rotate-left"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:"Restart"})]})]})]}),(0,o.jsxs)(ku,{onShouldRecognizeGesture:nme,onSwipeDown:Ca,onSwipeUp:xa,children:[(0,o.jsx)("main",{"aria-describedby":"step-counter",ref:i,tabIndex:z?-1:0,children:(0,o.jsx)(s0e,{currentLessonRef:r,isPresentationCourse:z,numberOfSlides:ve,onContinue:Xhe,onCurrentLessonElChange:h,onSlideEntered:tme,onTransitioningChange:M,previewType:t,revealTargetBlockId:N,slideIndex:fe,slides:W})}),(0,o.jsx)("div",{className:ame})]})]})})})})})}),ut&&qt!=null&&(0,o.jsx)("div",{className:Ht("presentation-comment"),children:(0,o.jsx)(Yn,{anchor:gW(qt.id),label:"Comments on slide"},String(qt.id))})]})},il=V("video-checkpoint-player");function I0e({activeGroup:e,animateBlockEntrance:t,hasQueuedCheckpoints:n=!1,lessonId:s,loadMedia:r,onCheckpointCompleted:i,onCheckpointDismissed:a}){const c=xe(),l=rd(s),d=nt(),h=(0,u.useRef)(!1),m=(0,u.useCallback)(()=>{if(e!=null)for(const B of aoe(e))ir(B.id,l)||d(mi({blockId:B.id,lessonId:s,items:[]}))},[e,d,s,l]),f=(0,u.useCallback)(()=>{e==null||h.current||(h.current=!0,m(),i?.(e))},[e,m,i]),p=(0,u.useCallback)(()=>{h.current||(h.current=!0,m(),a?.())},[m,a]);(0,u.useEffect)(()=>{e!=null&&(h.current=!1)},[e]);const v=(0,u.useId)(),[g,x]=(0,u.useState)(!1),y=(0,u.useCallback)(()=>x(!0),[]),S=(0,u.useCallback)(()=>x(!1),[]),I=(0,u.useMemo)(()=>ioe(e),[e]),b=(0,u.useMemo)(()=>new Set(I.map(B=>B.id)),[I]),T=I.some(B=>!ir(B.id,l)),L=ra(c,"videoCheckpointLocked","Complete the activities above to continue."),E=rt();if(e==null)return null;const k=ho(e),N=jg(k),P=Fs(e),A=P!=="timestamp",R=ra(c,"videoCheckpointNew","New checkpoint"),j=coe(E(e.checkpoint?.title),R),M=e.blocks??[];let w;n?w=ra(c,"videoCheckpointContinue","Continue"):P==="start"?w=ra(c,"videoCheckpointStartDismiss","Start video"):P==="end"?w=ra(c,"videoCheckpointDone","Done"):w=c?.videoCheckpointResume||"Resume video";const O=j;return(0,o.jsx)(Sp,{className:il(),darkOverlay:!0,"data-testid":"video-checkpoint-overlay",disableCloseOnEscape:T,disableCloseOnOverlayClick:T,disabledCloseButton:T,disabledCloseButtonMessage:L,focusHeadingOnOpen:!0,footer:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Bs,{elementFocused:T&&g,message:T?L:void 0,renderInModalWhenPresent:!0,children:(0,o.jsxs)("button",{"aria-describedby":T?v:void 0,"aria-disabled":T||void 0,className:il("resume",{locked:T}),onBlur:S,onClick:T?void 0:f,onFocus:y,type:"button",children:[w,(0,o.jsx)(kf,{className:il("resume-icon")})]})}),T&&(0,o.jsx)("span",{className:"visually-hidden-always",id:v,children:L})]}),heading:O,onCancel:T||P!=="timestamp"?void 0:f,onClose:T?dn:P==="end"?f:p,subText:A?void 0:`${c?.videoCheckpointPausedAt||"Paused at"} ${N}`,children:(0,o.jsx)("div",{className:il("blocks"),"data-testid":"video-checkpoint-content",children:M.length===0?(0,o.jsx)("p",{className:il("empty"),children:c?.videoCheckpointNoContent||"No content added to this checkpoint."}):M.map((B,D)=>(0,o.jsx)(e1,{animateBlockEntrance:t,block:{...B,blockId:B.id,requiresInteraction:b.has(B.id)||void 0},hideBlock:!1,index:D,isLastBlock:D===M.length-1,lessonId:s,loadMedia:r,onContinue:dn},`checkpoint-overlay-${B.id}`))})})}const T0e=({checkpointId:e,placement:t,lessonId:n})=>{const s=(0,u.useRef)({placement:t,lessonId:n});s.current={placement:t,lessonId:n},(0,u.useEffect)(()=>{e!=null&&rI({type:"video:checkpoint",data:{lessonId:s.current.lessonId,checkpointId:e,placement:s.current.placement}})},[e])},sL=(e,t,n)=>{mn(oy({event:e,properties:{checkpoint_id:t.checkpoint.id,checkpoint_time:ho(t),checkpoint_placement:Fs(t),lesson_id:n}}))},L0e=e=>e?.containerElement?.querySelector("video")??null;function E0e(e,t){const n=(0,u.useRef)(null),[s,r]=(0,u.useState)(null),i=(0,u.useMemo)(()=>e.find(A=>A.checkpoint.id===s)??null,[e,s]),a=(0,u.useRef)([]),[c,l]=(0,u.useState)(!1),d=(0,u.useRef)(!1),h=(0,u.useRef)(null),{startGroups:m,endGroups:f}=(0,u.useMemo)(()=>{const A=[],R=[];return e.forEach(j=>{const M=Fs(j);M==="start"?A.push(j):M==="end"&&R.push(j)}),{startGroups:A,endGroups:R}},[e]),p=(0,u.useMemo)(()=>uoe(e),[e]);T0e({checkpointId:s,placement:i&&Fs(i),lessonId:t});const v=(0,u.useCallback)(A=>{Fs(A)==="timestamp"&&n.current?.seekToTime?.(ho(A)),n.current?.pause?.(),r(A.checkpoint.id),sL("Video Checkpoint Viewed",A,t)},[t]),g=(0,u.useCallback)(A=>{if(A.length===0)return;const[R,...j]=A;a.current=j.map(M=>M.checkpoint.id),l(j.length>0),v(R)},[v]),x=(0,u.useCallback)(A=>{sL("Video Checkpoint Completed",A,t);let R;for(;R==null&&a.current.length>0;){const M=a.current.shift();R=e.find(w=>w.checkpoint.id===M)}if(R!=null){l(a.current.length>0),v(R);return}l(!1),r(null);const j=Fs(A);if((j==="timestamp"||j==="start")&&n.current?.play?.(),j==="end"){const M=h.current;h.current=null,!d.current&&M!=null&&(d.current=!0,mn(jr(M)))}},[e,t,v]),y=(0,u.useCallback)(()=>{a.current=[],l(!1)},[]),S=(0,u.useCallback)(()=>{y(),r(null)},[y]),I=(0,u.useRef)(s);I.current=s,(0,u.useEffect)(()=>{const A=R=>{const j=doe(e,R.detail?.blockId);if(j!=null){yn(j.checkpoint.id,I.current)||(y(),v(j));return}S()};return window.addEventListener(kd,A),()=>window.removeEventListener(kd,A)},[e,y,S,v]);const b=(0,u.useRef)(!1);(0,u.useEffect)(()=>{b.current||m.length===0||(b.current=!0,g(m))},[m,g]);const T=(0,u.useRef)(f);T.current=f;const L=(0,u.useRef)(t);L.current=t;const E=(0,u.useRef)(null),k=(0,u.useRef)(null),N=(0,u.useRef)(!1);return{contextValue:(0,u.useMemo)(()=>({checkpointMarkerTimes:p,setVideoPlayerRef:A=>{n.current=A,E.current!=null&&k.current!=null&&(E.current.removeEventListener("ended",k.current),E.current=null,k.current=null);const R=L0e(A);if(R!=null){const j=()=>{if(N.current)return;N.current=!0;const M=L.current,w=T.current;w.length===0?!d.current&&M!=null&&(d.current=!0,mn(jr(M))):M!=null&&(h.current=M),g(w)};R.addEventListener("ended",j),E.current=R,k.current=j}},onCheckpointReached:A=>{const R=e.filter(j=>Fs(j)==="timestamp"&&ho(j)===A);g(R)}}),[p,e,g]),activeCheckpointGroup:i,hasQueuedCheckpoints:c,handleCheckpointCompleted:x,handleCheckpointDismissed:S}}function k0e({animateBlockEntrance:e,checkpointGroups:t,children:n,lessonId:s,loadMedia:r}){const{contextValue:i,activeCheckpointGroup:a,hasQueuedCheckpoints:c,handleCheckpointCompleted:l,handleCheckpointDismissed:d}=E0e(t,s);return(0,o.jsxs)(foe,{value:i,children:[n,t.length>0&&(0,o.jsx)(I0e,{activeGroup:a,animateBlockEntrance:e,checkpointGroups:t,hasQueuedCheckpoints:c,lessonId:s,loadMedia:r,onCheckpointCompleted:l,onCheckpointDismissed:d})]})}const N0e=k0e;function j0e(e){const{inlineBlocks:t,checkpointGroups:n}=(0,u.useMemo)(()=>hoe(e.blocks),[e.blocks]);return(0,o.jsx)(N0e,{...e,checkpointGroups:n,children:(0,o.jsx)(s1,{...e,blocks:t})})}const w0e=j0e,oL=V("blocks-lesson-restart-button"),R0e=({className:e,onClick:t})=>{const n=oL.mix(e);return(0,o.jsx)("button",{className:n,onClick:t,type:"button",children:(0,o.jsx)(ae,{classNameIcon:oL("icon"),name:"arrow-rotate-left"})})},pa=V("one-page-authors");function A0e({className:e}){const t=xe(),n=wm(),s=n2(),r=kV();if(!s)return null;const i=n?.isPartnerContentAuthor&&r!=null,a=pa({}).mix(e);return i?(0,o.jsx)("div",{className:a,children:(0,o.jsx)("ul",{className:pa("list"),role:"list",children:r.map((c,l)=>(0,o.jsxs)("li",{className:pa("item"),role:"listitem",children:[(0,o.jsx)(rL,{avatarUrl:c?.image?rc({width:76,height:76,imageKey:c.image}):void 0}),(0,o.jsx)(iL,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:c?.name})]},l))})}):(0,o.jsxs)("div",{className:a,children:[(0,o.jsx)(rL,{avatarUrl:yt(s.avatar)}),(0,o.jsx)(iL,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:s.authorName})]})}function rL({avatarUrl:e}){return e?(0,o.jsx)("div",{className:pa("avatar"),style:{backgroundImage:`url(${e})`}}):(0,o.jsx)("div",{className:pa("avatar-fallback"),children:(0,o.jsx)(Wf,{decorative:!0})})}function iL({a11yAuthorPrefix:e,name:t}){const n=t||"Unknown User",s=pa("name");return(0,o.jsxs)("div",{className:s.toString(),children:[(0,o.jsx)("span",{className:"visually-hidden-always",children:e}),(0,o.jsx)("span",{children:n})]})}const aL=A0e,cL=e=>typeof e?.key=="string",Aye=e=>cL(e?.video),P0e=60,M0e=e=>typeof e!="number"||!Number.isFinite(e)||e<=0?null:e,C1=e=>{if(!cL(e))return null;const{duration:t}=e;return M0e(t)},O0e=e=>C1(e?.video)??C1(e?.tmp?.video)??C1(e?.customVideo),B0e=(e,t)=>{const n=e?.items[0]?.media;return n==null?null:O0e(t(n))},D0e=(e,t)=>{const n=Math.max(1,Math.round(e/P0e)),s=n===1?t?.coverMinute||"Minute":t?.coverMinutes||"Minutes";return`${n} ${s}`},F0e=(e,t,n)=>{const s=new Date(e);if(Number.isNaN(s.getTime()))return null;const r=new Intl.DateTimeFormat(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(s);return`${t?.coverUpdated||"Updated"} ${r}`},_0e=({authorName:e,durationSeconds:t,labels:n,locale:s="en",updatedAt:r})=>{const i=[];if(e&&i.push(e),t!=null&&i.push(D0e(t,n)),r){const a=F0e(r,n,s);a&&i.push(a)}return i},H0e=V("one-page-video-meta");function V0e({segments:e}){return(0,o.jsx)(o.Fragment,{children:e.map((t,n)=>(0,o.jsxs)("span",{children:[n>0&&(0,o.jsxs)("span",{"aria-hidden":"true",className:H0e("separator"),children:[" ","\xB7"," "]}),t.content]},t.key))})}const z0e=e=>e!=null&&e.type==="multimedia"&&e.family==="multimedia"&&e.variant==="video",$0e=e=>e?.find(z0e),U0e=V("one-page-video-meta");function G0e(){const e=ie(),t=wm(),n=n2(),s=rt(),r=xe(),{currentLocale:i}=ot(),a=_0e({authorName:n?.authorName,durationSeconds:B0e($0e(t?.type==="blocks"?t.items:void 0),s),labels:r,locale:i,updatedAt:e?.contentUpdatedAt??e?.updatedAt});if(a.length===0)return null;const c=a.map((l,d)=>({key:`${l}-${d}`,content:(0,o.jsx)("span",{children:l})}));return(0,o.jsx)("p",{className:U0e(),"data-testid":"one-page-video-meta",children:(0,o.jsx)(V0e,{segments:c})})}const W0e=G0e,K0e=V("one-page-title"),lL=({className:e,htmlId:t})=>{const n=ie(),s=Pe(n?.title),r=Mi("title"),i=(0,on.uW)(n?.title)?{"data-l10n-id":n?.title?.l10nId}:{"data-change-path":r},a=K0e({}).mix(e);return(0,o.jsx)("h1",{...i,className:a,id:t,tabIndex:-1,children:s})},al=V("one-page-lesson-header-info");function Q0e(){const e=ie(),t=al({}),n=eo(e);return(0,o.jsxs)("div",{className:t,children:[(Kl(e)||Oo(e)||n)&&(0,o.jsx)(dp,{className:al("logo"),imageClassName:al("logo-image")}),(0,o.jsx)(lL,{className:al("title").toString()}),n?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(W0e,{}),(0,o.jsx)(H3,{})]}):(0,o.jsx)(aL,{className:al("authors").toString()})]})}const Z0e=Q0e,H0=V("one-page-lesson-header"),Y0e=V("page"),q0e=H0("main").mix("lesson-header__main"),X0e=H0("container").mix(Y0e("header-container")),J0e=()=>{const e=ie(),t=Et(),n=e?.coverPageType,{alpha:s,ariaLabel:r,media:i,role:a}=Ur("coverImage"),c=e?.theme?.coverImageColor,l=n===ce.WHITE,d=n===ce.IMAGE,h=n===ce.ACCENT,m=n===ce.VIDEO&&eo(e),f=c===vt.LIGHT,p=H0({accent:h,image:d,white:l||m,video:m,"overlay-light":d&&f}),v=d?yi({alpha:s,color:c??void 0,media:i})??void 0:void 0;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("header",{className:p,children:[d&&v&&(0,o.jsx)("div",{"aria-label":r,className:H0("background-image"),role:a,style:v}),(0,o.jsx)("div",{className:X0e,children:(0,o.jsx)("div",{className:q0e,children:(0,o.jsx)(Z0e,{})})}),t===ne.APEX&&(0,o.jsx)(Wr,{coverPageType:"LEFT"})]}),(0,o.jsx)(Yn,{anchor:ap,label:"Comments on course title"})]})},ehe=V("lesson-one-page-scroll"),the=({lessonProgress:e})=>{const t=(0,u.useRef)(null),[n,s]=(0,u.useState)(!1),{lessons:r,...i}=ie(),{lmsOptions:a}=i,c=ln(),l=r?.[0],d=l?.type==="blocks"?l:void 0,h=l?.id??"",m=d?.items??[],f=eo(i),p=Oo(i),v=f?w0e:s1,g=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(!(!p&&!f)&&h)return Ba(h),g.current=h,()=>{const T=g.current;T!=null&&Sr(T)}},[h,p,f]);const x=e?.isComplete&&!0&&!f&&!p,y=e?.isComplete&&!1,S=i?.exportSettings?.webExportSettings,I=!Ps.isInstantLink&&(a?.disableCoverPage||S?.disableCoverPage),b=(0,u.useCallback)(()=>{n||(I?t.current?.scrollTo({top:0,behavior:vn()?"instant":"smooth"}):(s(!0),ro(()=>{c("/")},"lesson-to-one-page-cover-continuous").finally(()=>{s(!1)})))},[c,I,n]);return(0,o.jsx)("div",{className:ehe(),children:(0,o.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:t,children:(0,o.jsx)("div",{className:"page","data-page":!0,children:(0,o.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,o.jsxs)(L0,{lessonId:h,children:[(0,o.jsx)(J0e,{}),(0,o.jsx)("div",{className:"page__content",children:(0,o.jsx)(Hr,{children:(0,o.jsxs)("div",{"data-lesson-id":l?.id,children:[(0,o.jsx)(v,{animateBlockEntrance:i?.animateBlockEntrance,blocks:m,className:void 0,isLessonEntering:void 0,isLessonExiting:void 0,lessonId:h,loadMedia:!0,nextLesson:void 0}),x&&(0,o.jsx)(R0e,{className:void 0,onClick:b}),y&&(0,o.jsx)(_p,{lessonId:h})]})})})]})})})})})},dL=V("microlearning-progress-summary"),nhe=V("page-wrap"),she=({course:e,courseProgress:t,isStepped:n,lesson:s})=>{const r=(0,u.useRef)(null),i=(0,u.useRef)(null),[a,c]=(0,u.useState)(!1),l=dL("content",{stepped:n,mounted:a}).toString();return(0,jc.A)(()=>{const d=(i.current?.clientHeight??0)+1;r.current?.scrollTo({top:d}),c(!0)}),(0,o.jsxs)("div",{className:nhe(),id:"page-wrap",ref:r,children:[(0,o.jsx)(Hp,{className:dL("previous").toString(),lessonId:s?.id??"",ref:i}),(0,o.jsx)(VT,{contentClassName:l,course:e,courseProgress:t,lessonId:s?.id??""})]})},ohe=({isProgressSummary:e,lessonProgress:t})=>{const n=ie(),s=Br(),{previewType:r}=Pd(),i=n?.theme?.blockNavigationType===_a.STEPPED;return e?(0,o.jsx)(she,{course:n,courseProgress:s,isStepped:i,lesson:void 0}):i?(0,o.jsx)(S0e,{lessonProgress:t,previewType:r}):(0,o.jsx)(the,{lessonProgress:t})};var rhe=C(49860);function uL(){const e=nt();return rhe.useMemo(()=>({advanceQuizLessonToEnd:t=>e(Q7(t)),submitQuizAnswer:t=>e(Zh(t)),setQuizLessonTimeRemaining:t=>e(Y7(t))}),[e])}const ihe="MULTIPLE_CHOICE";function ahe({lesson:e,lessonProgress:t,getL10nRecursive:n,quizActions:s,reportAnswer:r}){if(!e||!Ol(e))return;const i=e.settings??{},a=i.passToContinue??!1,c=t?.retryAttempts??0,l=k0({allowedRetries:i.retryCount,currentRetries:c}),d=Object.values(t?.items??{}).filter(h=>!h.isComplete);d.length>0&&d.forEach(h=>{const m=mle({lesson:e,question:h});if(m){const f=m.type||ihe,p=n({duration:{startTime:0,stopTime:0},id:e.id,isCorrect:!1,isUnfinished:!0,item:{id:String(m.id||""),title:String(m.title||""),type:f},itemProgress:h,retryAttempts:c,title:e.title});r(p)}s.submitQuizAnswer({finalRetryAttempt:l,isCorrect:!1,itemId:h.id,lessonId:e.id,passToContinue:a})}),s.advanceQuizLessonToEnd({lessonId:e.id,finalize:!0,passToContinue:a,finalRetryAttempt:l})}var che=C(49860);function lhe({lesson:e,lessonProgress:t,getL10nRecursive:n}){const s=uL();return che.useCallback(()=>{ahe({lesson:e,lessonProgress:t,getL10nRecursive:n,quizActions:s,reportAnswer:pC})},[e,t,n,s])}var hL=C(49860);function dhe({children:e}){return bd(Bl)===!0?(0,o.jsx)(o.Fragment,{children:e}):(0,o.jsx)(uhe,{children:e})}function uhe({children:e}){const t=od(),n=Br(),s=$t(t),r=Vo(t),i=qb(),{setQuizLessonTimeRemaining:a}=uL(),c=hL.useMemo(()=>r??{},[r]),l=lhe({lesson:s,lessonProgress:c,getL10nRecursive:i}),d=hL.useMemo(()=>Ar(s)?s.settings:void 0,[s]),h=!!d?.timer,m=d?.timerDuration;return(0,o.jsx)(sde,{courseProgress:n,currentLessonId:t,handleExpiredQuiz:l,isTimedQuiz:h,setQuizLessonTimeRemaining:a,timerDuration:m,children:e})}function hhe({lessonId:e}){const t=nt(),[n,s]=(0,u.useState)(null),r=xe(),i=(0,u.useCallback)(c=>{c.target instanceof HTMLElement&&t(rm({offsetHeight:c.target.offsetHeight}))},[t]);(0,u.useLayoutEffect)(()=>{if(n)return t(rm({offsetHeight:n.offsetHeight})),()=>{t(rm(null))}},[t,n]),Iu(n,i);const a=(0,u.useCallback)(()=>{z3(e)},[e]);return(0,o.jsx)("button",{className:"visually-hidden btn-skip-to-lesson brand--ui",onClick:a,ref:s,type:"button",children:(0,o.jsxs)("span",{className:"btn-skip-to-lesson__wrap",children:[r?.courseSkipToLesson,(0,o.jsx)(ae,{"aria-hidden":"true",classNameIcon:"btn-skip-to-lesson__icon",name:"arrow-right"})]})})}var mhe=C(49860);const fhe=960,x1=V("transcript-panel"),phe=e=>{const{currentLocale:t}=ot();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 ghe({enhancedLabels:e,lessonId:t,questionBankActiveIndex:n}){const s=nt(),{audioPlayerIdOpen:r,focusing:i,refocusTarget:a,transcriptMedia:c}=Rc(),l=!!r,d=(0,u.useId)(),h=ue(U=>t?Ii(t,U):null),f=t?.startsWith("question-bank-")?n:h?.type==="quiz"?h.activeIndex:void 0,p=Zt(fhe),[v,g]=(0,u.useState)(0),[x,y]=(0,u.useState)(!1),[S,I]=(0,u.useState)(!1),b=(0,u.useRef)(!1),T=(0,u.useRef)(null),L=(0,u.useRef)(null),E=(0,u.useRef)(c),k=(0,u.useRef)(t),N=(0,u.useRef)(f),P=xe()||e,A=(0,u.useRef)(null),R=(0,u.useRef)({panelHeight:0,startY:null,startHeight:null,startTime:null,velocity:null}),j=(0,u.useCallback)(U=>{const G=R.current.panelHeight,Y=performance.now();I(!0);const Z=q=>{const ee=q-Y,se=Math.min(ee/300,1),re=1-Math.pow(1-se,3),le=G+(U-G)*re;g(le),R.current.panelHeight=le,se<1?requestAnimationFrame(Z):(I(!1),y(!1),R.current={startY:null,startHeight:null,startTime:null,panelHeight:null,velocity:null})};requestAnimationFrame(Z)},[y,I,g]),M=(0,u.useCallback)(U=>{const{startTime:H,startY:G,startHeight:Y}=R.current;if(!p||G===null)return;const Z=G-(U?.clientY??U?.touches?.[0]?.clientY??0),q=Y+Z;if(g(q),R.current.panelHeight=q,H!==null){const ee=performance.now()-H,se=Z/ee;R.current.velocity=se}},[p]),w=(0,u.useCallback)(U=>{const{velocity:H}=R.current;if(!H)return;Object.assign(R.current,{startY:null,startHeight:null,startTime:null}),y(!1);const G=window.innerHeight*.66;let Y;Math.abs(H)>.5?Y=H>0?window.innerHeight:150:Y=v>=G?window.innerHeight:150,j(Y),U instanceof MouseEvent&&(window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",w))},[j,v,M]),O=(0,u.useCallback)(U=>{!p||L.current.contains(U.target)||T.current.contains(U.target)||(Object.assign(R.current,{startY:U?.clientY??U?.touches?.[0]?.clientY??null,startHeight:A.current?.clientHeight??0,startTime:performance.now()}),y(!0),U.nativeEvent instanceof MouseEvent&&(window.addEventListener("mousemove",M),window.addEventListener("mouseup",w)))},[M,w,p,y]);(0,u.useEffect)(()=>{let U;const H=()=>{A?.current?.style&&(A.current.style.transition="none",A.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(Z=>{Z.style.transition="none"}))},G=()=>{clearTimeout(U),U=setTimeout(()=>{A?.current?.style&&(A.current.style.transition="",A.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(Z=>{Z.style.transition=""}))},200)};return window.addEventListener("resize",H),window.addEventListener("resize",G),()=>{window.removeEventListener("resize",H),window.removeEventListener("resize",G),clearTimeout(U)}},[]),(0,u.useEffect)(()=>{!l&&b.current&&g(0),i&&l&&A.current&&(A.current.focus(),s(Tp({audioPlayerId:r,focusing:!1}))),b.current=l},[r,s,i,l]),(0,u.useEffect)(()=>{l&&c!==E.current&&(E.current=c)},[l,c]),(0,u.useEffect)(()=>{l&&k.current!==t&&s(Ac()),k.current=t},[t,l,s]),(0,u.useEffect)(()=>{l&&N.current!==f&&N.current!==void 0&&s(Ac()),N.current=f},[f,l,s]);const B={role:"button",tabIndex:0,onMouseDown:O,onTouchStart:O,onTouchEnd:w,onTouchMove:M},[D,_]=mhe.useState(!1),F=Pe(D?E.current:c),$=phe(F);let z;l&&(z=Lp(r));const K=(0,u.useCallback)(()=>{const U=a??document.getElementById(v6(r));return U?(U.focus(),!0):!1},[r,a]),J=(0,u.useCallback)(U=>{U.stopPropagation(),U.preventDefault(),s(Ac()),K()},[s,K]),Q=(0,u.useCallback)(U=>{r&&U.key==="Escape"&&J(U)},[r,J]);return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(Us,{classNames:"transcript-panel",in:l,nodeRef:A,onEnter:()=>_(!1),onEntered:()=>_(!1),onEntering:()=>_(!1),onExit:()=>_(!0),onExited:()=>_(!1),onExiting:()=>_(!0),timeout:300,unmountOnExit:!0,children:(0,o.jsxs)("section",{"aria-hidden":!l,"aria-labelledby":d,className:x1({isOpen:l,isAnimatingMobileSwipe:S,isDragging:x}).toString(),id:z,onKeyDown:Q,ref:A,style:p&&l?{height:`${v/10}rem`,minHeight:v>0?"33vh":void 0}:{},tabIndex:-1,children:[(0,o.jsxs)("header",{...p?B:{},children:[(0,o.jsx)("h3",{id:d,ref:T,children:P?.audioTranscript}),(0,o.jsx)("button",{"aria-label":P?.audioHideTranscript,className:x1("close-button"),onClick:J,ref:L,type:"button",children:(0,o.jsx)(ae,{name:"close"})})]}),(0,o.jsx)("section",{className:x1("transcript-text",{"not-available":!$}),children:$||P?.audioNoTranscriptAvailable})]})})})}const vhe=({content:e})=>{const t=ie(),n=Br(),{didNavigate:s,shouldSkipAutoFocusOnNavigate:r}=Pd(),i=(0,Ae.g)(),a=(0,Ae.zy)(),[c]=(0,Ae.ok)(),l=c.get("embed")==="lesson-only",d=i.lessonId??"",h=c.get(wc);(0,u.useEffect)(()=>{!h||!d||window.dispatchEvent(new CustomEvent(Ye,{detail:{lessonId:d,itemId:h,path:["lessons",{id:d},"items",{id:h}],align:"start"}}))},[d,h]);const m=Zt(480);hce(d);const f=ls(t),p=(0,u.useCallback)(L=>{if(f)return;const E=document.querySelector(`[data-lesson-id="${L}"]`);(t.theme?.hideLessonHeaders?E?.querySelector("main"):E?.querySelector("h1"))?.focus({preventScroll:!0})},[t,f]),v=(0,u.useRef)(d),g=(0,u.useRef)(!1);(0,u.useEffect)(()=>{g.current||d!==v.current||r||!s||(g.current=!0,p(d))},[s,p,d,r]);const x=l?"lesson lesson--preview":"lesson",y=nt(),S=(0,u.useCallback)(({item:L,refs:E})=>{if(!L)return;const k="media"in L?L.media:null;y(g6({audioPlayerId:Is({refs:E}),transcriptMedia:k}))},[y]),I=(0,u.useCallback)(()=>{y(Ac())},[y]),b=(0,u.useCallback)(L=>{y(Tp(L))},[y]),T=Vo(d);return(0,o.jsxs)(dhe,{children:[(0,o.jsxs)("div",{className:"page-lesson-wrap",children:[!f&&(0,o.jsx)(hhe,{lessonId:d}),(0,o.jsx)("div",{className:"page-lesson",children:(0,o.jsxs)(jQ,{children:[(0,o.jsx)(kQ,{closeTranscript:I,mode:"readonly",onTranscriptUpdate:b,openTranscript:S,children:(0,o.jsx)("div",{className:x,"data-lesson":!0,children:(0,o.jsx)("div",{className:"lesson__content",children:(0,o.jsx)("div",{className:"page-view",children:(0,o.jsx)(cY,{isLessonOnlyEmbed:l,children:f?(0,o.jsx)(ohe,{isProgressSummary:e.kind==="progress-summary",lessonProgress:T}):(0,o.jsx)(XY,{isLessonOnlyEmbed:l,onLessonEntered:p,children:(0,o.jsx)(Tue,{content:e,isMobileHeader:m,lessonId:d,lessonProgress:T},a.pathname)})})})})})}),(0,o.jsx)(ghe,{lessonId:n?.currentLesson?.toString()})]})})]}),(0,o.jsx)(Ip,{onClose:()=>p(d)})]})},b1=V("one-page-cover-info");function Che({htmlIdTitle:e}){const t=Mi("title");return(0,o.jsxs)("div",{className:b1(),"data-change-path":t,children:[(0,o.jsx)(lL,{className:b1("title").toString(),htmlId:e}),(0,o.jsx)(aL,{className:b1("authors").toString()})]})}const xhe=Che,V0=V("one-page-cover"),bhe=V("cover"),yhe={passive:!0};function She(e){return typeof e=="object"&&e!=null}function Ihe(e){return She(e)&&(typeof e.id=="string"||typeof e.id=="number")}function The({previewType:e}={}){const t=(0,u.useRef)(null),n=(0,u.useRef)(null),s=(0,u.useRef)(!1),r=ln(),i=xe(),{shouldSkipAutoFocusOnNavigate:a}=Pd(),c=(0,u.useRef)(a),l=ue(Ft),d=sM(l),h=Ihe(d)?d:void 0,m=(0,u.useCallback)(()=>{const j=h?.id;return j!=null?Ln(j):null},[h?.id]),f=(0,u.useCallback)(()=>{const j=m();if(j!=null){const w=l?.theme?.blockNavigationType===_a.STEPPED?"one-page-cover-to-lesson-stepped":"one-page-cover-to-lesson-continuous";ro(()=>{r(j)},w)}},[l?.theme?.blockNavigationType,m,r]),p=(0,u.useRef)(f);p.current=f;const v=(0,u.useRef)(e);v.current=e;const g=(0,u.useCallback)(()=>{n.current?.focus?.()},[]);(0,u.useEffect)(()=>{g5(),c.current||n.current?.focus?.()},[]),(0,u.useEffect)(()=>{const j=n.current;if(!j)return;const M=w=>{(w.key==="ArrowDown"||w.key==="ArrowRight")&&!s.current&&(s.current=!0,j.removeEventListener("keyup",M),p.current())};return j.addEventListener("keyup",M),()=>j.removeEventListener("keyup",M)},[]),(0,u.useEffect)(()=>{const j=M=>{Oc(v.current)||s.current||M.deltaY>100&&(s.current=!0,document.removeEventListener("wheel",j),p.current())};return document.addEventListener("wheel",j,yhe),()=>document.removeEventListener("wheel",j)},[]);const x=(0,u.useCallback)(j=>{const M=j.target;M instanceof Node&&!t.current?.contains?.(M)&&!s.current&&(s.current=!0,f())},[f]),y=(0,u.useCallback)(j=>{j.preventDefault(),s.current||(s.current=!0,f())},[f]),S=l?.coverPageType===ce.WHITE,I=l?.coverPageType===ce.VIDEO,b=l?.coverPageType===ce.IMAGE,T=l?.coverPageType===ce.ACCENT,L=l?.theme?.blockNavigationType===_a.STEPPED,E=l?.theme?.coverImageColor??vt.DARK,k="title",P=`overlay-${E?.toLowerCase()}`,A=V0("wrapper",{[P]:b,accent:T,image:b,white:S||I,video:I}).mix(bhe("header-content")),R=m();return(0,o.jsx)(Hr,{children:(0,o.jsxs)(ku,{onSwipeUp:f,children:[(0,o.jsxs)("main",{className:A,ref:n,tabIndex:-1,children:[(0,o.jsx)(xhe,{htmlIdTitle:k}),L&&(0,o.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."}),R!=null&&(0,o.jsx)("div",{className:V0("start-wrapper"),onClick:x,children:(0,o.jsx)(pn,{"aria-label":i?.courseStart??"Start",className:V0("start-link"),onClick:y,ref:t,to:R,children:(0,o.jsx)(ae,{className:V0("start-icon"),name:"arrow-down"})})}),b&&(0,o.jsx)(vp,{})]}),(0,o.jsx)(Yn,{anchor:ap,label:"Comments on course title"}),(0,o.jsx)(Ip,{onClose:g})]})})}const Lhe=The;function Ehe({course:e,lessonId:t,progressSummaryEnabled:n}){if(n&&t===Ua)return{kind:"progress-summary"};const s=e?.lessons?.find(r=>String(r.id)===t);return s?{kind:"lesson",lesson:s}:{kind:"not-found"}}function khe(){const e=ie(),t=(0,Ae.zy)(),n=ls(e),s=e?.lessonsOnly?.[0]?.id,r=s==null?void 0:Ln(s),c=r!=null&&!yy(e)?(0,o.jsx)(Ae.C5,{replace:!0,to:{pathname:r,search:t.search}}):n?(0,o.jsx)(Lhe,{}):(0,o.jsx)(SQ,{});return(0,o.jsxs)(Ae.BV,{children:[(0,o.jsx)(Ae.qh,{element:(0,o.jsx)(mL,{}),path:hd}),(0,o.jsx)(Ae.qh,{element:(0,o.jsx)(fL,{children:(0,o.jsx)(mL,{})}),path:md}),(0,o.jsx)(Ae.qh,{element:c,index:!0}),(0,o.jsx)(Ae.qh,{element:(0,o.jsx)(fL,{children:c}),path:"/:mode"}),(0,o.jsx)(Ae.qh,{element:(0,o.jsx)(Sd,{}),path:"*"})]})}function mL(){const e=Or(),{lessonId:t=""}=(0,Ae.g)(),n=Ehe({course:e,lessonId:t,progressSummaryEnabled:!1});return n.kind==="not-found"?(0,o.jsx)(Sd,{}):(0,o.jsx)(vhe,{content:n})}function fL({children:e}){const{mode:t}=(0,Ae.g)();return aO(t)?e:(0,o.jsx)(Sd,{})}const ga=V("legacy-share-deprecation-banner"),Nhe=Date.UTC(2026,7,31),jhe="https://community.articulate.com/discussions/discuss/rise-360-legacy-preview-links-will-be-disabled-on-august-31/1265175",pL="has-legacy-share-banner",gL="--legacy-share-banner-height",vL="legacyShareBannerDismissed";function whe(){try{return sessionStorage.getItem(vL)==="true"}catch{return!1}}function Rhe(){try{return sessionStorage.setItem(vL,"true"),!0}catch{return!1}}const Ahe=()=>(0,o.jsx)("svg",{"aria-hidden":"true",className:ga("icon"),focusable:"false",viewBox:"0 0 512 512",children:(0,o.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"})}),Phe=()=>(0,o.jsx)("svg",{"aria-hidden":"true",className:ga("dismiss-icon"),focusable:"false",viewBox:"0 0 384 512",children:(0,o.jsx)("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"})});function Mhe(){const e=ie(),[t,n]=(0,u.useState)(whe),s=(0,u.useRef)(null),r=!t&&Ah()&&Date.now()<Nhe&&e!=null&&!J2(e),i=(0,u.useCallback)(()=>{Rhe(),n(!0)},[]);return(0,u.useEffect)(()=>{const a=document.getElementById("app"),c=s.current;if(!r||!a||!c)return;a.classList.add(pL);const l=()=>{const{height:h}=c.getBoundingClientRect();a.style.setProperty(gL,`${h}px`)};l();const d=new ResizeObserver(l);return d.observe(c),()=>{d.disconnect(),a.classList.remove(pL),a.style.removeProperty(gL)}},[r]),r?(0,o.jsxs)("div",{className:ga(),ref:s,role:"status",children:[(0,o.jsx)(Ahe,{}),(0,o.jsxs)("p",{className:ga("message"),children:["Access to this content will be"," ",(0,o.jsx)("a",{className:ga("link"),href:jhe,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."]}),(0,o.jsx)("button",{"aria-label":"Dismiss notice",className:ga("dismiss"),onClick:i,type:"button",children:(0,o.jsx)(Phe,{})})]}):null}const Ohe=Mhe;var Co=C(49860);const oi=V("share-password-dialog");function Bhe({failAttempt:e,onSubmit:t}){const n=ue(Ft),s=Co.useRef(null),r=Co.useRef(null),[i,a]=Co.useState(!1),c=Co.useRef(!1),{announceAssertive:l}=Rs();Co.useEffect(()=>{r.current?.showModal()},[]),Co.useEffect(()=>{e&&!c.current&&(a(!0),s.current&&(s.current.value=""),l("Incorrect password. Please try again.")),c.current=e},[l,e]),Co.useEffect(()=>{const p=r.current;if(!p)return;const v=()=>a(!1);return p.addEventListener("animationend",v),()=>{p.removeEventListener("animationend",v)}},[]);const d=Co.useCallback(p=>{p.preventDefault(),s.current&&t(s.current.value)},[t]),h=Co.useCallback(p=>{p.preventDefault()},[]),f=`You need a password to view this ${ls(n)?YA(n).toLocaleLowerCase():"course"}. If you don\u2019t know it, ask the person who shared this with you.`;return(0,o.jsxs)("dialog",{"aria-describedby":"share-password-instructions share-password-constraint","aria-labelledby":"share-password-title",className:`${oi({shaking:i})} brand--border`,onCancel:h,ref:r,children:[(0,o.jsx)("h1",{className:oi("heading"),id:"share-password-title",children:"Enter Password"}),(0,o.jsx)("p",{className:oi("instructions"),id:"share-password-instructions",children:f}),(0,o.jsx)("p",{className:"visually-hidden-always",id:"share-password-constraint",children:"This dialog requires a password to proceed and cannot be dismissed."}),(0,o.jsxs)("form",{onSubmit:d,children:[(0,o.jsx)("label",{className:oi("label"),htmlFor:"share-password",children:"password"}),(0,o.jsx)("input",{className:oi("input"),id:"share-password",ref:s,type:"password"}),(0,o.jsx)("div",{className:oi("toolbar"),children:(0,o.jsx)("button",{className:`${oi("button")} brand--background`,type:"submit",children:"View"})})]})]})}const Dhe=Bhe;function Fhe(){const e=ql();(0,u.useEffect)(()=>{window.targetMode=dz({locale:xy(e)})},[e]),(0,u.useEffect)(()=>{window.parent.postMessage({type:"ready"},"*"),window.parent.postMessage({type:jn.STATUS,data:!!window.targetMode},"*"),_q(n=>mn(Gw(n)))},[]);const t=(0,u.useRef)(!1);(0,u.useEffect)(()=>{t.current||!e||!TN()||(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=()=>mn(D8()),s=()=>mn(F8()),r=()=>window.parent.postMessage("coursePreviewIframeClicked","*");return Nx("favoriteAdded",n),Nx("favoriteRemoved",s),document.addEventListener("click",r),()=>{jx("favoriteAdded",n),jx("favoriteRemoved",s),document.removeEventListener("click",r)}},[])}function _he(e){return e.status}function CL(){return ue(_he)}function Hhe({enabled:e=!0,onAuthorized:t,onError:n,onUnauthorized:s,password:r}){const i=nt();(0,u.useEffect)(()=>{e&&(i(M7({onAuthorized:t,onError:n,onUnauthorized:s,password:r})),i(Uw()))},[i,e,t,n,s,r])}function Vhe(){const e=nt(),{courseLoaded:t,coverLoaded:n}=CL(),s=ue(a=>a.course?.coverImage?.media),r=Ct(s),i=(0,u.useCallback)(()=>{e(U8(!0))},[e]);(0,u.useEffect)(()=>{if(t&&!n){const a=r?.image,{key:c,src:l}=a||{};if(c||l){const d=c?Tt(a):l,h=setTimeout(i,5e3),m=new Image;return m.src=d,m.onload=()=>{clearTimeout(h),i()},()=>{clearTimeout(h),m.onload=null}}else i()}},[t,n,r,i])}function zhe(e={}){Hhe(e),Vhe();const t=nt(),n=iy(),s=ue(p=>p.courseLabels.labels),{courseLoaded:r,runtimeFetchError:i,coverLoaded:a,fatalError:c,fontsLoaded:l,notFound:d,partnerContentLoaded:h}=CL(),m=(0,Ve.A)(r),f=r&&l&&a&&h;return(0,u.useEffect)(()=>{!m&&r&&!l&&(n??[]).length>0&&t(Wj(n))},[t,m,r,l,n]),(0,u.useEffect)(()=>{if(!f||window.parent===window)return;window.parent.postMessage({type:"course:ready"},window.location.origin);const p=v=>{v.key==="Escape"&&window.parent.postMessage({type:"preview:escape"},window.location.origin)};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[f]),{runtimeFetchError:i??null,isLoaded:!!f,notFound:!!d,fatalError:!!c,curtainLabels:s}}function $he({course:e}){const[t,n]=(0,u.useState)(!0),[s,r]=(0,u.useState)(!1),i=e&&"hasPassword"in e?!!e.hasPassword:!1,a=!!(t&&Ah()&&e&&!J2(e)&&(i||mC())),c=(0,u.useCallback)(l=>(r(!1),LN(l).then(({isValid:d})=>{d?n(!1):(r(!0),n(!0))}).catch(d=>console.error("Verify password error",d))),[]);return{showPasswordDialog:a,failAttempt:s,onSharePasswordSubmit:c}}function Uhe(){return dV(),Fhe(),(0,o.jsxs)(wz,{children:[(0,o.jsx)(rV,{}),(0,o.jsx)(Ohe,{}),(0,o.jsx)(yV,{children:(0,o.jsx)(cB,{children:(0,o.jsx)(Ghe,{})})})]})}function Ghe(){const{enabled:e,isActive:t,onAuthorized:n,onError:s,onUnauthorized:r,password:i}=bV(),a=kz(),{isLoaded:c,notFound:l,fatalError:d,runtimeFetchError:h,curtainLabels:m}=zhe({enabled:e&&a.settled,onAuthorized:t?n:void 0,onError:t?s:void 0,onUnauthorized:t?r:void 0,password:t?i:void 0}),f=ie(),{showPasswordDialog:p,failAttempt:v,onSharePasswordSubmit:g}=$he({course:f}),x=!t&&p;return l?(0,o.jsx)(Sd,{}):c?x?(0,o.jsx)(Dhe,{failAttempt:v,onSubmit:g}):f?(0,o.jsx)(Whe,{course:f}):null:(0,o.jsx)(H2,{labels:m,runtimeFetchError:h,status:h!=null?"runtimeFetchError":d?"fatalError":"loading"})}function Whe({course:e}){const t=yP(),n=lV(),s=my(e.themeId),r=`theme ${s}${t?" one-page":""}`;return(0,o.jsx)(pO,{appType:"learn",children:(0,o.jsx)(MV,{children:(0,o.jsx)(jV,{children:(0,o.jsx)(YH,{children:(0,o.jsx)(cV,{themeId:s,children:(0,o.jsx)(ef,{children:(0,o.jsx)(tV,{children:(0,o.jsx)(tB,{course:e,children:(0,o.jsxs)("div",{className:r,id:"innerApp",ref:aV,children:[(0,o.jsx)(CV,{...n}),(0,o.jsxs)(kH,{children:[(0,o.jsx)(khe,{}),(0,o.jsx)(fO,{})]})]})})})})})})})})})}function Khe({children:e}){return(0,o.jsx)(LX,{ImageEagerOrLazy:Zp,children:e})}const Qhe={};function Zhe({children:e}){const n=ie()?.features??Qhe;return(0,o.jsx)(oV,{value:n,children:e})}const xL=document.getElementById("app");if(!xL)throw new Error("Root element #app not found");(0,SL.createRoot)(xL).render((0,o.jsx)(u.Suspense,{fallback:null,children:(0,o.jsx)(FA,{store:zb,children:(0,o.jsx)(Khe,{children:(0,o.jsx)(VA,{children:(0,o.jsx)(Zhe,{children:(0,o.jsx)(Ae.I9,{useTransitions:!1,children:(0,o.jsx)(Uhe,{})})})})})})}))},31926(ul,ba,C){const lr={"./en-au":92292,"./en-au.js":92292,"./en-ca":98838,"./en-ca.js":98838,"./en-gb":65447,"./en-gb.js":65447,"./en-ie":31244,"./en-ie.js":31244,"./en-il":47451,"./en-il.js":47451,"./en-in":46045,"./en-in.js":46045,"./en-nz":73630,"./en-nz.js":73630,"./en-sg":33200,"./en-sg.js":33200};function o(dr){const ya=K0(dr);return C(ya)}function K0(dr){if(!C.o(lr,dr)){const ya=new Error("Cannot find module '"+dr+"'");throw ya.code="MODULE_NOT_FOUND",ya}return lr[dr]}o.keys=function(){return Object.keys(lr)},o.resolve=K0,ul.exports=o,o.id=31926}}]);
