@clickview/streamable-learning 0.48.0-rc.0 → 0.48.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.vite/manifest.json +646 -646
- package/dist/bundles.json +1 -1
- package/dist/css/DU3tPCD_.chunk.css +12 -0
- package/dist/en.json +1 -1
- package/dist/scripts/{m9QbGES0.chunk.js → ACTQklJQ.chunk.js} +2 -2
- package/dist/scripts/{m9QbGES0.chunk.js.map → ACTQklJQ.chunk.js.map} +1 -1
- package/dist/scripts/{B7if0Lk52.chunk.js → B-qOny0I2.chunk.js} +2 -2
- package/dist/scripts/{B7if0Lk52.chunk.js.map → B-qOny0I2.chunk.js.map} +1 -1
- package/dist/scripts/{BSjm_rCE.chunk.js → B5jBIPaP.chunk.js} +2 -2
- package/dist/scripts/{BSjm_rCE.chunk.js.map → B5jBIPaP.chunk.js.map} +1 -1
- package/dist/scripts/{CPkKuTSK2.chunk.js → B703cBe72.chunk.js} +2 -2
- package/dist/scripts/{CPkKuTSK2.chunk.js.map → B703cBe72.chunk.js.map} +1 -1
- package/dist/scripts/{DNNNPLMp.chunk.js → B7iwtSij.chunk.js} +2 -2
- package/dist/scripts/{DNNNPLMp.chunk.js.map → B7iwtSij.chunk.js.map} +1 -1
- package/dist/scripts/{CXNve4Wq2.chunk.js → BCBfXCYM2.chunk.js} +2 -2
- package/dist/scripts/{CXNve4Wq2.chunk.js.map → BCBfXCYM2.chunk.js.map} +1 -1
- package/dist/scripts/{CoYNU7We2.chunk.js → BKnxYKDu2.chunk.js} +2 -2
- package/dist/scripts/{CoYNU7We2.chunk.js.map → BKnxYKDu2.chunk.js.map} +1 -1
- package/dist/scripts/{BoxedFO8.chunk.js → BLrjbrp8.chunk.js} +2 -2
- package/dist/scripts/{BoxedFO8.chunk.js.map → BLrjbrp8.chunk.js.map} +1 -1
- package/dist/scripts/{CibcLNJP2.chunk.js → BTYwcYPL2.chunk.js} +2 -2
- package/dist/scripts/{CibcLNJP2.chunk.js.map → BTYwcYPL2.chunk.js.map} +1 -1
- package/dist/scripts/{CwI-7tep2.chunk.js → BXJetawx2.chunk.js} +2 -2
- package/dist/scripts/{CwI-7tep2.chunk.js.map → BXJetawx2.chunk.js.map} +1 -1
- package/dist/scripts/{BV74ZRR22.chunk.js → BZOcEcTA2.chunk.js} +2 -2
- package/dist/scripts/{BV74ZRR22.chunk.js.map → BZOcEcTA2.chunk.js.map} +1 -1
- package/dist/scripts/{DxsW8K0n2.chunk.js → BaMNOAYj2.chunk.js} +2 -2
- package/dist/scripts/{DxsW8K0n2.chunk.js.map → BaMNOAYj2.chunk.js.map} +1 -1
- package/dist/scripts/{DrDQfaFN2.chunk.js → BihZ4r0z2.chunk.js} +3 -3
- package/dist/scripts/{DrDQfaFN2.chunk.js.map → BihZ4r0z2.chunk.js.map} +1 -1
- package/dist/scripts/{CK6c6uHp2.chunk.js → BpgHKWR52.chunk.js} +2 -2
- package/dist/scripts/{CK6c6uHp2.chunk.js.map → BpgHKWR52.chunk.js.map} +1 -1
- package/dist/scripts/{JtFbyaXc.chunk.js → Br0Uc4GG.chunk.js} +2 -2
- package/dist/scripts/{JtFbyaXc.chunk.js.map → Br0Uc4GG.chunk.js.map} +1 -1
- package/dist/scripts/{Dd8r1SE32.chunk.js → BsAo7Lri2.chunk.js} +2 -2
- package/dist/scripts/{Dd8r1SE32.chunk.js.map → BsAo7Lri2.chunk.js.map} +1 -1
- package/dist/scripts/{BMjES83N2.chunk.js → BvJXPFoz2.chunk.js} +2 -2
- package/dist/scripts/{BMjES83N2.chunk.js.map → BvJXPFoz2.chunk.js.map} +1 -1
- package/dist/scripts/{CpFOQcL7.chunk.js → BxypZGPK.chunk.js} +2 -2
- package/dist/scripts/{CpFOQcL7.chunk.js.map → BxypZGPK.chunk.js.map} +1 -1
- package/dist/scripts/C4MLxDS-.chunk.js +1 -0
- package/dist/scripts/{DLp7yHzT2.chunk.js → C5i1HsPp2.chunk.js} +2 -2
- package/dist/scripts/{DLp7yHzT2.chunk.js.map → C5i1HsPp2.chunk.js.map} +1 -1
- package/dist/scripts/{Bkv1Tbyu.chunk.js → CCoZQmgX.chunk.js} +2 -2
- package/dist/scripts/{Bkv1Tbyu.chunk.js.map → CCoZQmgX.chunk.js.map} +1 -1
- package/dist/scripts/{Clh6wBrg.chunk.js → CGxa1Jzq.chunk.js} +2 -2
- package/dist/scripts/{Clh6wBrg.chunk.js.map → CGxa1Jzq.chunk.js.map} +1 -1
- package/dist/scripts/{DAvXFgC62.chunk.js → CKdklY2o2.chunk.js} +2 -2
- package/dist/scripts/{DAvXFgC62.chunk.js.map → CKdklY2o2.chunk.js.map} +1 -1
- package/dist/scripts/{CeWjJPIz.chunk.js → CN8PeBwg.chunk.js} +2 -2
- package/dist/scripts/{CeWjJPIz.chunk.js.map → CN8PeBwg.chunk.js.map} +1 -1
- package/dist/scripts/{B1jitqYS2.chunk.js → CNJrD44-2.chunk.js} +2 -2
- package/dist/scripts/{B1jitqYS2.chunk.js.map → CNJrD44-2.chunk.js.map} +1 -1
- package/dist/scripts/{DIHDe4Sg.chunk.js → CNmmq34f.chunk.js} +2 -2
- package/dist/scripts/{DIHDe4Sg.chunk.js.map → CNmmq34f.chunk.js.map} +1 -1
- package/dist/scripts/{CikSQKH-.chunk.js → CUUUI6pl.chunk.js} +2 -2
- package/dist/scripts/{CikSQKH-.chunk.js.map → CUUUI6pl.chunk.js.map} +1 -1
- package/dist/scripts/{DNO0KpY72.chunk.js → CWFInhB82.chunk.js} +2 -2
- package/dist/scripts/{DNO0KpY72.chunk.js.map → CWFInhB82.chunk.js.map} +1 -1
- package/dist/scripts/{i2-k6ULv2.chunk.js → CbLL7dIz2.chunk.js} +2 -2
- package/dist/scripts/{i2-k6ULv2.chunk.js.map → CbLL7dIz2.chunk.js.map} +1 -1
- package/dist/scripts/{KCdpQ8qv2.chunk.js → Ce1TZZdV2.chunk.js} +2 -2
- package/dist/scripts/{KCdpQ8qv2.chunk.js.map → Ce1TZZdV2.chunk.js.map} +1 -1
- package/dist/scripts/{NV4_mMU8.chunk.js → Ces-KTwe.chunk.js} +2 -2
- package/dist/scripts/{NV4_mMU8.chunk.js.map → Ces-KTwe.chunk.js.map} +1 -1
- package/dist/scripts/{0xQRFMBY.chunk.js → CkYqp83j.chunk.js} +2 -2
- package/dist/scripts/{0xQRFMBY.chunk.js.map → CkYqp83j.chunk.js.map} +1 -1
- package/dist/scripts/{DvL3J2BU.chunk.js → CrCAJmt6.chunk.js} +2 -2
- package/dist/scripts/{DvL3J2BU.chunk.js.map → CrCAJmt6.chunk.js.map} +1 -1
- package/dist/scripts/{CcDgbmw52.chunk.js → CsC3VVvE2.chunk.js} +2 -2
- package/dist/scripts/{CcDgbmw52.chunk.js.map → CsC3VVvE2.chunk.js.map} +1 -1
- package/dist/scripts/{C9UjF0q6.chunk.js → D0SYGnyF.chunk.js} +2 -2
- package/dist/scripts/{C9UjF0q6.chunk.js.map → D0SYGnyF.chunk.js.map} +1 -1
- package/dist/scripts/{BqO6i89w2.chunk.js → D7tastET2.chunk.js} +2 -2
- package/dist/scripts/{BqO6i89w2.chunk.js.map → D7tastET2.chunk.js.map} +1 -1
- package/dist/scripts/{CeI-LCE-.chunk.js → DIavEegC.chunk.js} +2 -2
- package/dist/scripts/{CeI-LCE-.chunk.js.map → DIavEegC.chunk.js.map} +1 -1
- package/dist/scripts/{BKbKu9Rp.chunk.js → DK3xia1t.chunk.js} +2 -2
- package/dist/scripts/{BKbKu9Rp.chunk.js.map → DK3xia1t.chunk.js.map} +1 -1
- package/dist/scripts/{BCdnm1Nn.chunk.js → DKnZ8BaN.chunk.js} +2 -2
- package/dist/scripts/{BCdnm1Nn.chunk.js.map → DKnZ8BaN.chunk.js.map} +1 -1
- package/dist/scripts/{awemA_vU2.chunk.js → DO8_mR5i2.chunk.js} +2 -2
- package/dist/scripts/{awemA_vU2.chunk.js.map → DO8_mR5i2.chunk.js.map} +1 -1
- package/dist/scripts/{DlQrdOls.chunk.js → DR80oZtZ.chunk.js} +2 -2
- package/dist/scripts/{DlQrdOls.chunk.js.map → DR80oZtZ.chunk.js.map} +1 -1
- package/dist/scripts/{DMq5Gp-U2.chunk.js → DU1SE31v2.chunk.js} +2 -2
- package/dist/scripts/{DMq5Gp-U2.chunk.js.map → DU1SE31v2.chunk.js.map} +1 -1
- package/dist/scripts/{XnBhLH-02.chunk.js → Dj4AeYQQ2.chunk.js} +2 -2
- package/dist/scripts/{XnBhLH-02.chunk.js.map → Dj4AeYQQ2.chunk.js.map} +1 -1
- package/dist/scripts/{CmrPRojb.chunk.js → DnSy_Myx.chunk.js} +2 -2
- package/dist/scripts/{CmrPRojb.chunk.js.map → DnSy_Myx.chunk.js.map} +1 -1
- package/dist/scripts/{D0vsmyva.chunk.js → Dr1flAez.chunk.js} +2 -2
- package/dist/scripts/{D0vsmyva.chunk.js.map → Dr1flAez.chunk.js.map} +1 -1
- package/dist/scripts/{BXT8nHry2.chunk.js → DwzBzBlI2.chunk.js} +2 -2
- package/dist/scripts/{BXT8nHry2.chunk.js.map → DwzBzBlI2.chunk.js.map} +1 -1
- package/dist/scripts/{CvqqZmNo2.chunk.js → DyT1OGvP2.chunk.js} +2 -2
- package/dist/scripts/{CvqqZmNo2.chunk.js.map → DyT1OGvP2.chunk.js.map} +1 -1
- package/dist/scripts/{E9tNds1l.chunk.js → Llxar-VU.chunk.js} +2 -2
- package/dist/scripts/{E9tNds1l.chunk.js.map → Llxar-VU.chunk.js.map} +1 -1
- package/dist/scripts/{app-B1XBsz23.js → app-BIigh9wv.js} +4 -4
- package/dist/scripts/{app-B1XBsz23.js.map → app-BIigh9wv.js.map} +1 -1
- package/dist/scripts/{BMl02f_62.chunk.js → bycmewy72.chunk.js} +2 -2
- package/dist/scripts/{BMl02f_62.chunk.js.map → bycmewy72.chunk.js.map} +1 -1
- package/dist/scripts/{DmfbtOlu.chunk.js → jWpq99N3.chunk.js} +2 -2
- package/dist/scripts/{DmfbtOlu.chunk.js.map → jWpq99N3.chunk.js.map} +1 -1
- package/dist/scripts/{BDliRFoa.chunk.js → oTYyWWB-.chunk.js} +2 -2
- package/dist/scripts/{BDliRFoa.chunk.js.map → oTYyWWB-.chunk.js.map} +1 -1
- package/dist/scripts/{lokG7Sha2.chunk.js → qcrBN1zR2.chunk.js} +2 -2
- package/dist/scripts/{lokG7Sha2.chunk.js.map → qcrBN1zR2.chunk.js.map} +1 -1
- package/dist/scripts/{UAcFqQzZ.chunk.js → smdLElLq.chunk.js} +2 -2
- package/dist/scripts/{UAcFqQzZ.chunk.js.map → smdLElLq.chunk.js.map} +1 -1
- package/dist/scripts/{D8_5yfHY2.chunk.js → tYi-sUb22.chunk.js} +2 -2
- package/dist/scripts/{D8_5yfHY2.chunk.js.map → tYi-sUb22.chunk.js.map} +1 -1
- package/package.json +1 -1
- package/dist/scripts/D5Jnyjf8.chunk.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{gt as e,v as t}from"./Dp9qJj1C.chunk.js";import{r as n}from"./BJvPfCvt.chunk.js";import{t as r}from"./ImQRQGZr.chunk.js";import{C as i,E as a,M as o,l as s,lt as c,m as l,n as u,ut as d,x as f}from"./Dun43GrB.chunk.js";import{n as p}from"./Xo0rk19-.chunk.js";import{t as m}from"./B-OL6Vs7.chunk.js";import{l as h}from"./BQ5XMoHG.chunk.js";import{t as g}from"./B7tm2CBz.chunk.js";import{t as ee}from"./C9ET3pjZ.chunk.js";import{t as te}from"./ibuOpDkQ.chunk.js";import{t as ne}from"./CxwN2xIE.chunk.js";import{t as _}from"./DeldjYRc.chunk.js";import{t as v}from"./BVWg3YHX.chunk.js";import{t as y}from"./BYYiNmLB.chunk.js";import{a as re,c as b,i as x,n as ie,o as S,r as C,s as w,t as T}from"./BDliRFoa.chunk.js";import{n as E,t as D}from"./Ca1QPe-q2.chunk.js";import{t as ae}from"./Cz6swPXe2.chunk.js";import{n as O,t as k}from"./D7d5XFW82.chunk.js";import{n as oe,t as se}from"./DjIdG9LL2.chunk.js";import{t as ce}from"./B13dpWxS2.chunk.js";import{n as le}from"./CL1ST5J62.chunk.js";import{t as ue}from"./DUNFBIIl2.chunk.js";import{s as de,t as fe}from"./CK6c6uHp2.chunk.js";import{a as A,i as j,r as M}from"./B8R4YVaF2.chunk.js";import{n as N,t as P}from"./Bx_V3too2.chunk.js";import{t as F}from"./CoualKDX.chunk.js";import{t as I}from"./iTHYgnO8.chunk.js";import{H as pe,I as me,N as L,X as he,q as ge,w as _e}from"./app-B1XBsz23.js";import{t as ve}from"./BRiYVLuz.chunk.js";import{t as R}from"./DlFudnBx.chunk.js";import{t as ye}from"./CZb3E982.chunk.js";import{t as be}from"./CwttNCGZ.chunk.js";import{t as z}from"./C9tPKnK22.chunk.js";import{t as xe}from"./BTqtjOL02.chunk.js";import{a as Se}from"./BKbKu9Rp.chunk.js";import{t as Ce}from"./Bkv1Tbyu.chunk.js";import{t as B}from"./BlBCp_pE.chunk.js";import{n as we,r as Te,t as Ee}from"./CmrPRojb.chunk.js";import{n as De,t as Oe}from"./BSjm_rCE.chunk.js";import{n as ke,t as Ae}from"./D0vsmyva.chunk.js";import{t as je}from"./CeI-LCE-.chunk.js";import{t as Me}from"./BOTX-kIq.chunk.js";import{t as V}from"./C9UjF0q6.chunk.js";import{t as Ne}from"./CUOEhUTb2.chunk.js";import{t as Pe}from"./CoYNU7We2.chunk.js";import{t as Fe}from"./BqO6i89w2.chunk.js";var H=e(d()),U=c(),W=`subject.classificationHeaderDetails`,G=({className:e})=>(0,U.jsx)(`span`,{className:e,children:`•`});function Ie(e){let{dashboardVideoCount:t,childDashboardVideoCount:n,dashboardResourceCount:r,childDashboardResourceCount:i,childClassificationCount:a}=b.getCounts(e.classification),o=t+n,s=r+i;return(0,U.jsxs)(`p`,{className:`mb-n1 font-size-normal fw-normal mt-1`,children:[!!a&&(0,U.jsx)(O,{namespace:W,phrase:`topics`,options:{count:a.toLocaleString(),smartCount:a}}),!!o&&(0,U.jsxs)(U.Fragment,{children:[a>0&&(0,U.jsx)(G,{className:`mx-2`}),(0,U.jsx)(O,{namespace:W,phrase:`videos`,options:{count:o.toLocaleString(),smartCount:o}})]}),!!s&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(G,{className:`mx-2`}),(0,U.jsx)(O,{namespace:W,phrase:`resources`,options:{count:s.toLocaleString(),smartCount:s}})]})]})}var K=`subjects.curatedClassificationEmptyState`,Le=r.encloseNamespace(K);function Re(e){let t=e.dashboard?.status===P.Archived;return(0,U.jsx)(k.Provider,{value:K,children:(0,U.jsxs)(I,{children:[(0,U.jsx)(I.Image,{src:e.imageUrl,altText:Le(`headingForNP`)}),e.isReadonly?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(I.Heading,{children:(0,U.jsx)(O,{namespace:K,phrase:`headingForCurator`})}),(0,U.jsx)(I.Info,{children:(0,U.jsx)(O,{namespace:K,phrase:`info`})}),(0,U.jsx)(n,{title:t?r.getPhrase(K,`archivedCtaTooltip`):``,spanHack:!0,children:(0,U.jsx)(I.Cta,{text:r.getPhrase(K,`add`),appLink:e.addWidgetApplink?.(),className:`btn btn-dark`,icon:be,disabled:t})})]}):(0,U.jsx)(I.Heading,{children:(0,U.jsx)(O,{phrase:`headingForNP`})})]})})}var q={itemsWrapper:`_itemsWrapper_tzf1d_1`,anchorWrapper:`_anchorWrapper_tzf1d_5`,default:`_default_tzf1d_36`,selectedItem:`_selectedItem_tzf1d_47`,disabled:`_disabled_tzf1d_62`,floatIcon:`_floatIcon_tzf1d_69`,arrowIcon:`_arrowIcon_tzf1d_75`,listIcon:`_listIcon_tzf1d_78`,tocIndent1:`_tocIndent1_tzf1d_87`,tocIndent2:`_tocIndent2_tzf1d_90`};function ze(e){let t={actionType:i.Click,entity:s.Widget,location:l.TableOfContents};function n(t){Me.preventScrollTop(),e.setControlledId(t.id),e.onItemClick?.(t),setTimeout(()=>document.getElementById(t.id)?.focus())}function r(e){return e.tocIndentation===1?q.tocIndent1:e.tocIndentation===2?q.tocIndent2:``}return(0,U.jsx)(`div`,{className:`${q.itemsWrapper}`,children:e.items.map((i,a)=>e.localState?(0,U.jsx)(E,{className:`${q.anchorWrapper} ${e.activeId===i.id?q.selectedItem:``}`,onClick:()=>{n(i)},children:(0,U.jsx)(`div`,{className:`${!e.activeId&&a===0?q.default:``} `,children:i.name})},i.id):(0,U.jsx)(D,{appLink:e.getAppLink(i),appLinkOptions:{replace:!0},className:`${q.anchorWrapper} ${e.activeId===i.id?q.selectedItem:``}`,onClick:()=>{n(i)},analyticsData:{...e.analyticsData,id:i.id,name:i.name},analyticsOptions:t,children:(0,U.jsx)(`div`,{className:`${!e.activeId&&a===0?q.default:``} ${r(i)}`,children:i.name})},i.id))})}var J={container:`_container_1n8qw_1`,mobile:`_mobile_1n8qw_7`};function Be(e){let[t,n]=H.useState(!1);function r(){let n={actionType:t?i.Hide:i.Open,entity:s.TableOfContents,location:l.Dashboard};u.logUserAction(e.analyticsData,n)}function a(){n(!t),r()}return(0,U.jsxs)(`div`,{className:`${J.mobile} d-inline-flex gap-1`,children:[t&&(0,U.jsxs)(`div`,{className:`bg-white px-3 pt-3 pb-2 border border-dark rounded-1 ps-3`,children:[(0,U.jsx)(`h2`,{className:`h5`,children:e.title}),(0,U.jsx)(ze,{items:e.widgets.map(e=>({name:e.name,id:e.id,tocIndentation:e.metadata.tocIndentation})),activeId:e.activeId,appLink:e.appLink,analyticsData:e.analyticsData,setControlledId:e.setControlledId,getAppLink:e.getAppLink,onItemClick:()=>n(!1)})]}),(0,U.jsx)(`div`,{className:J.container,children:(0,U.jsx)(ae,{className:`btn btn-outline-dark`,svg:xe,onClick:a})})]})}function Ve(e){return(0,U.jsx)(`aside`,{className:`col-3 order-1`,children:(0,U.jsxs)(`div`,{className:`${J.container} ps-3`,children:[(0,U.jsx)(`h2`,{className:`h5`,children:e.title}),(0,U.jsx)(ze,{items:e.widgets.map(e=>({name:e.name,id:e.id,tocIndentation:e.metadata.tocIndentation})),activeId:e.activeId,appLink:e.appLink,analyticsData:e.analyticsData,setControlledId:e.setControlledId,getAppLink:e.getAppLink})]})})}function He(e){function t(e){let t=ne.getCurrentRoute().appLink,n=t.params?{...t.params}:{};return n.tocId=e.id,{...t,params:n}}return(0,U.jsx)(U.Fragment,{children:e.isSmallScreen?(0,U.jsx)(Be,{...e,getAppLink:t}):(0,U.jsx)(Ve,{...e,getAppLink:t})})}var Ue=`subjects.teacherOnlyEmptyState`,We=r.encloseNamespace(Ue);function Ge(e){return(0,U.jsx)(k.Provider,{value:Ue,children:(0,U.jsxs)(I,{children:[(0,U.jsx)(I.Image,{src:e.imageUrl,altText:We(`heading`)}),(0,U.jsx)(I.Heading,{children:(0,U.jsx)(O,{phrase:`heading`})}),(0,U.jsx)(I.Info,{children:(0,U.jsx)(O,{phrase:`info`})}),(0,U.jsx)(I.Cta,{text:We(`cta`),appLink:e.ctaAppLink?.(),className:`btn btn-dark`})]})})}function Ke(e,t){let{isSystemGeneratedDashboard:n,systemGeneratedVideoWidget:r}=H.useMemo(()=>e?{isSystemGeneratedDashboard:M.isSystemGeneratedDashboard(e.widgets),systemGeneratedVideoWidget:e.widgets.find(e=>e.widgetId===j.ClassificationPinnedVideos&&e.templateId!==A.ThumbnailVerticalList)}:{isSystemGeneratedDashboard:!1,systemGeneratedVideoWidget:null},[e?.id]),i=h(!!r&&V.dashboardWidgetContent(r?.id,M.getWidgetParams(r.widgetId,r.templateId,M.getDashboardTargetType(e),t?.map(e=>e.masterId)),r?.templateId));return n?{widgets:e?.widgets?.filter(e=>e.widgetId!==j.ClassificationPinnedVideos||e.templateId===A.ThumbnailVerticalList)??[],videoList:i.data?.content??[],videoListWidgetId:r?.id}:{widgets:g.sortBy(e?.widgets,`index`)}}var Y,qe=({setActiveId:e,headingElements:t,controlledId:n,setControlledId:r})=>{let i=H.useRef(0);H.useEffect(()=>{let a=new IntersectionObserver(a=>{a.forEach(a=>{if(n){e(n),Y=window.setTimeout(()=>{r(``)},800);return}if(a.isIntersecting)e(a.target.id),i.current=window.scrollY;else{let n=i.current-window.scrollY>0,r=t[t.findIndex(e=>e.id===a.target.id)-1];n&&r?.id&&e(r?.id)}})},{rootMargin:`-67px 0px -80% 0px`});return t.forEach(e=>a.observe(e)),()=>{Y&&window.clearTimeout(Y),a.disconnect()}},[e,t.length,n])};function Je(e){let t=H.useRef(null);return H.useEffect(()=>{t.current=e}),t.current}var Ye=80,Xe=(e,t)=>{let[n,r]=H.useState(!1),i=Je(t),a=t;H.useLayoutEffect(()=>{if(!n||i!==a){let t=e.find(e=>e&&e?.id===a);if(t){let e=t.getBoundingClientRect();window.scrollBy({top:e.top-Ye,behavior:`smooth`}),n||r(!0)}}},[e,i,a,n])},Ze=`subjects.classificationComingSoon`,Qe=r.encloseNamespace(Ze);function $e(e){let t=!!e.data.followers?.data?.length;function n(){e.onToggleFollow?.()}return(0,U.jsx)(k.Provider,{value:Ze,children:(0,U.jsxs)(I,{className:`pt-0`,children:[(0,U.jsx)(I.Image,{src:e.imageUrl,altText:Qe(`comingSoon`)}),(0,U.jsx)(I.Heading,{children:(0,U.jsx)(O,{phrase:`comingSoon`})}),(0,U.jsx)(I.Info,{children:(0,U.jsx)(O,{phrase:e.showSignUp?`infoAnon`:`info`})}),e.canFollowSubjects&&(0,U.jsx)(pe,{svg:t?x:C,onClick:n,showSpinner:e.showFollowButtonSpinner,className:`btn follow-btn me-2 ${t?`btn-outline-dark`:`btn-dark`}`,children:(0,U.jsx)(O,{phrase:t?`following`:`follow`})}),e.showSignUp&&!e.canFollowSubjects&&(0,U.jsx)(D,{appLink:e.signUpAppLink,className:`btn btn-dark d-none d-lg-inline-block`,analyticsOptions:{actionType:i.Click,location:l.ClassificationComingSoon,entity:s.AppLink,workflowPhase:a.Start,descriptor:f.SignUp},analyticsData:{},tag:`button`,children:Qe(`signUp`)})]})})}function et(e){return(0,U.jsx)(we,{audiences:e.audiences,activeAudiences:e.activeAudiences,disabled:e.disabled,appLink:e.appLink,disablePersist:e.disablePersist,tooltip:e.tooltip})}function tt(e){return(0,U.jsx)(`svg`,{...e,children:(0,U.jsx)(`path`,{d:`M4.5 4a.5.5 0 0 0 0 1h16a.5.5 0 0 1 .5.5v12a.5.5 0 0 0 1 0v-12A1.5 1.5 0 0 0 20.5 4zM9 10.26a.256.256 0 0 1 .39-.218l4.482 2.74a.256.256 0 0 1 0 .437L9.39 15.958A.256.256 0 0 1 9 15.739zM18.5 6A1.5 1.5 0 0 1 20 7.5v11a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 2 18.5v-11A1.5 1.5 0 0 1 3.5 6zm-15 1a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5z`,fill:`currentColor`})})}function nt(e){let[t,n]=le(`directory:product:tip:switcher`,{on:!1,tab:e||`new-releases`});return H.useEffect(()=>{e&&n(`tab`,e)},[e]),H.useEffect(()=>{let e=null;return t.on&&(e=window.setInterval(()=>{t.tab===`new-releases`||t.tab===`all-topics`?n(`tab`,t.tab===`new-releases`?`all-topics`:`new-releases`):n(`tab`,t.tab===`curated-topic`?`video-list`:`curated-topic`)},2e3)),()=>{window.clearInterval(e)}},[t.on,t.tab]),{tab:t.tab,isHighlighting:t.on,start:()=>n(`on`,!0),stop:()=>{n({on:!1,tab:e||t.tab})}}}var X={curatedTopicTab:`_curatedTopicTab_1ji5o_1`,tabTransition:`_tabTransition_1ji5o_4`},Z=`shared.classificationDashboard`;function rt(e,n,a,o){let c=n.lg||n.xl||n.xxl||n.xs;function u(){let e=o?X.tabTransition:``;return n.xs?e+` w-100`:c?e=` ${X.curatedTopicTab}`:e}return b.isTopLevelTopic(e.classification)?[{name:c?r.getPhrase(Z,`newReleases`):``,appLink:e.appLinks?.classification?.(e.classification),active:a===`new-releases`,svg:re,analyticsData:{id:`new-releases`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:r.getPhrase(Z,`newReleases`),url:t.getHref(e.appLinks?.classification?.(e.classification))},analyticsOptions:{actionType:i.Click,entity:s.Url,location:l.MagicTabs},className:`${n.xs?`w-100`:``} ${o?X.tabTransition:``}`},{name:c?r.getPhrase(Z,`allTopics`):``,appLink:e.appLinks?.classificationDirectory?.(e.classification),active:a===`all-topics`,svg:w,analyticsData:{id:`all-topics`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:r.getPhrase(Z,`allTopics`),url:t.getHref(e.appLinks?.classificationDirectory?.(e.classification))},analyticsOptions:{actionType:i.Click,entity:s.Url,location:l.MagicTabs},className:`${n.xs?`w-100`:``} ${o?X.tabTransition:``}`}]:[{name:c?r.getPhrase(Z,`topic`):``,appLink:e.appLinks?.classification?.(e.classification),active:a===`curated-topic`,svg:S,analyticsData:{id:`curated-topic`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:r.getPhrase(Z,`topic`),url:t.getHref(e.appLinks?.classification?.(e.classification))},analyticsOptions:{actionType:i.Click,entity:s.Url,location:l.MagicTabs},className:u()},{name:c?r.getPhrase(Z,`curriculum`):``,appLink:e.appLinks?.classificationCurriculum?.(e.classification),active:a===`curriculum`,svg:tt,analyticsData:{id:`curriculum`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:r.getPhrase(Z,`curriculum`),url:t.getHref(e.appLinks?.classificationCurriculum?.(e.classification))},analyticsOptions:{actionType:i.Click,entity:s.Url,location:l.MagicTabs},className:`${n.xs?`w-100`:``} ${o?X.tabTransition:``}`}]}function it(e){let t=L(),{tab:n,isHighlighting:r}=nt(e.activeTab);return(0,U.jsx)(Ce,{borderRadius:`sm`,className:t.xs?`w-100`:``,listClassName:`d-flex flex-nowrap`,tabs:rt(e,t,n,r)})}function at(e,t,n,r,i){return!!(i||r&&!t?.length||!z.shouldShowAudiences(e)||n===`curriculum`)}function ot(e){let t=L(),n=at(e.audiences,e.activeAudiences,e.activeTab,e.isEmpty,e.isComingSoon);function r(){return!e.classification||!e.dashboard||M.isSystemGeneratedDashboard(e.dashboard.widgets)?!1:b.isTopLevelTopic(e.classification)?e.hasTopicDirectoryDashboard:!!(e.classification.externalMetadata?.isCurated&&e.hasTopicCurriculumDashboard)}function i(){let i=`d-flex flex-column py-3 mb-3`;return e.isComingSoon||(i+=` border-bottom`),(r()||n)&&!t.xs?i:i+` row-gap-3`}function a(){if(n)return t.xs?`d-flex flex-column justify-content-between row-gap-3`:`d-flex align-items-center justify-content-between`;let e=``;return e+=`d-flex align-items-center justify-content-between mb-1`,t.xs&&(e+=` row-gap-3 mb-0`),e}function o(){let e=`d-flex align-items-end justify-content-between`;return t.xs&&(e+=` row-gap-3 flex-wrap`),e}return(0,U.jsxs)(`div`,{className:i(),children:[(0,U.jsxs)(`div`,{className:a(),children:[(0,U.jsx)(Ae,{breadcrumbs:e.getBreadcrumbs?.()}),r()&&n&&(0,U.jsx)(it,{classification:e.classification,activeTab:e.activeTab,appLinks:e.appLinks,presentation:e.presentation})]}),(0,U.jsxs)(`div`,{className:o(),children:[!n&&(0,U.jsx)(et,{audiences:e.audiences,activeAudiences:e.activeAudiences,appLink:e.appLinks.audience?.(),disabled:e.disableAudiences,tooltip:e.audienceTooltip,disablePersist:!e.isViewingCurrentPresentation}),r()&&!n&&(0,U.jsx)(it,{classification:e.classification,activeTab:e.activeTab,appLinks:e.appLinks,presentation:e.presentation})]})]})}var st=`shared.classificationDashboard`;function Q(e){return e.widgetId===j.Blurb&&e.templateId===A.Heading}function ct(e){return e.widgetId===j.CuratedClassifications||e.widgetId===j.Classifications}lt.defaultProps={appLinks:{}};function lt(e){let{widgets:t,videoList:n,videoListWidgetId:i}=Ke(e.dashboard,e.activeAudiences),a=ce(_e.LGDown),o=H.useRef(new Set),s=H.useMemo(()=>t.reduce((e,t)=>(e[t.id]=!1,e),{}),[t?.length]),[c,u]=H.useState(s),[d,f]=H.useState(e.tableOfContentsId),[p,m]=H.useState(``),h=Array.from(o.current);Xe(h,d),qe({setActiveId:m,headingElements:h,controlledId:d,setControlledId:f});let g=e.classification.type===ye.Hub;function te(){return e.isComingSoon||e.isTeacherOnly?!1:!e.dashboard||e.dashboard.status===P.Archived&&!e.isReadonly||e.dashboard.status===P.Draft&&!e.isPreviewing||!t?.length?!0:n&&n.length?!1:Object.values(c).every(e=>!!e)}function ne(t,n,r){let i=M.getWidgetParams(n,r,M.getDashboardTargetType(e.dashboard),e.activeAudiences?.map(e=>e.masterId),e.curriculums.preferredCurriculum?.id);return e.getWidgetContentRequest(t,i,r)}let _=te();H.useEffect(()=>{_&&u(s)},[t?.length]);let v=H.useCallback((n,r)=>{if(c[n]===r)return;let i={...c,[n]:r};if(M.isType(e.dashboard,N.ClassificationDirectory)){u(i);return}let a=0;for(;a<t.length;){let e=t[a];if(!Q(e)){a++;continue}let n=!0,r=a+1;for(;n&&r<t.length;){let e=t[r];if(Q(e))break;!i[e.id]&&!ct(e)&&(n=!1),r++}a=r,i[e.id]=n}u(i)},[c,t]);function y(e){return Q(e)&&c[e.id]}function re(){let t=M.getDashboardTargetType(e.dashboard);return!(e.moviesAndTv||t===N.ClassificationCurriculum)}function x(e,n){return e.widgetId===j.ClassificationDashboardExternalMedia&&c[t[n-1].id]?e.name.replace(`Other videos`,`Videos`):e.name}let S=t.filter(e=>!y(e)&&!!e.metadata?.showInTableOfContents),C=t.every(ct),w=S.length>=2,T=w&&!a&&!g,E=e.settings?.hasTopicDirectories&&b.isTopLevelTopic(e.classification)&&!e.isTertiaryCustomerWithoutExchange;return(0,U.jsxs)(`div`,{className:`bg-white px-4 ${re()?`dashboard-spacing-lg`:``}`,children:[g&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`h1`,{className:`h2 mb-4`,children:e.classification.name}),(0,U.jsx)(`hr`,{className:`mt-2`})]}),!g&&(0,U.jsx)(Oe,{heading:e.classification.name,banner:e.classification.banner,imageCdnUrl:e.imageCdnUrl,actions:e.getBannerActions?.(),actionsDropdownClassName:`btn btn-outline-dark`,specialEvent:e.specialEvent,calendarTheme:{background:`bg-light-blue`,border:`border-light-blue`},showComingSoon:e.isComingSoon,detailsComponent:E?()=>(0,U.jsx)(Ie,{classification:e.classification}):null}),!g&&(0,U.jsx)(ot,{dashboard:e.dashboard,classification:e.classification,presentation:e.presentation,appLinks:e.appLinks,activeTab:e.tab,audiences:e.audiences,activeAudiences:e.activeAudiences,getBreadcrumbs:e.getBreadcrumbs,hasTopicDirectoryDashboard:e.hasTopicDirectoryDashboard,hasTopicCurriculumDashboard:e.hasTopicCurriculumDashboard,isComingSoon:e.isComingSoon,isEmpty:_,isViewingCurrentPresentation:e.isViewCurrentPresentation,disableAudiences:C||e.isReadonly,audienceTooltip:C?r.getPhrase(st,`audienceTooltip`):``}),e.isComingSoon&&(0,U.jsx)($e,{imageUrl:e.comingSoonImageUrl,data:e.classification,canFollowSubjects:e.canFollowSubjects,showFollowButtonSpinner:e.showFollowButtonSpinner,onToggleFollow:()=>e.onToggleFollow(e.classification,l.ClassificationComingSoon),showSignUp:!e.hasLocalPermissions(ee.FollowComingSoonTopics),signUpAppLink:e.appLinks.signUp?.()}),!e.isComingSoon&&(0,U.jsxs)(`div`,{className:`${T?`row no-wrap`:``}`,children:[w&&(0,U.jsx)(He,{widgets:S,title:e.classification.name,activeId:p,clickable:!e.isReadonly,analyticsData:e.analyticsData,setControlledId:f,isSmallScreen:a}),(0,U.jsx)(`div`,{className:T?`col-9 order-0`:``,children:t.map((t,n)=>y(t)?(0,U.jsx)(H.Fragment,{},t.id):(0,U.jsx)(ie,{widgetCollection:N.Classification,headingElementRef:o,id:t.id,name:x(t,n),description:t.description,classification:e.classification,templateId:t.templateId,widgetTypeId:t.widgetId,audiences:e.audiences,getContentRequest:ne,setIsEmpty:v,appLinks:e.appLinks,presentation:e.presentation,analyticsData:e.analyticsData,isScrollToTargetWidget:e.scrollToWidgetId===t.id,imageCdnUrl:e.imageCdnUrl,onSubmitFeedback:e.onSubmitFeedback,metadata:t.metadata,isBot:e.isBot,hasTableOfContents:T,lazyLoad:e.lazyLoad,dashboardTarget:M.getDashboardTargetType(e.dashboard),widgetIndex:n,hasPermissions:e.hasPermissions,hasLocalPermissions:e.hasLocalPermissions,isPreviewing:e.isReadonly,contentType:e.contentType,resourceThumbnailFallbackImageUrl:e.resourceThumbnailFallbackImageUrl,onToggleFollowClassification:e.onToggleFollow,settings:e.settings,isEditing:e.isReadonly,isTertiaryCustomerWithoutExchange:e.isTertiaryCustomerWithoutExchange,commonVideoProps:e.commonVideoProps,curriculums:e.curriculums,limitTotalItems:!1,seeMoreLink:null,onClickRemoveItem:null,badgeComponent:null},t.id))}),!!n?.length&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Se,{name:r.getPhrase(st,`videos`)}),(0,U.jsx)(fe,{videos:n,getVideoAppLink:(t,n)=>e.appLinks.videoType(t,{...n,contextId:i,includeContext:n.includeContext}),hasPermissions:e.hasPermissions,presentationAudiences:e.audiences,getPreviewQuestionsAppLink:e.appLinks.previewQuestions,commonVideoProps:e.commonVideoProps})]})]}),_&&(0,U.jsx)(Re,{dashboard:e.dashboard,isReadonly:e.isReadonly,imageUrl:e.emptyImageUrl,addWidgetApplink:e.appLinks.widgetWizard}),e.isTeacherOnly&&(0,U.jsx)(Ge,{imageUrl:e.emptyImageUrl,ctaAppLink:()=>e.appLinks.allTopics(e.classification.presentationId)})]})}var $=`subjects.topicNotFoundError`,ut=class extends p{constructor(){super(`Topic doesn't exist`)}get name(){return`TopicNotFoundError`}get heading(){return r.getPhrase($,`heading`)}get description(){return r.getPhrase($,`description`)}get cta(){return{text:r.getPhrase($,`cta`),appLink:{application:m.SUBJECTS,action:_.Subjects.CLASSIFICATION_ALL}}}};function dt(){return(0,U.jsxs)(`div`,{className:`bg-white px-4`,children:[(0,U.jsx)(De,{}),(0,U.jsxs)(`div`,{className:`d-flex flex-column row-gap-3 py-3 mb-3 border-bottom`,children:[(0,U.jsx)(ke,{}),(0,U.jsx)(Te,{})]})]})}var ft=r.encloseNamespace(`subjects.classificationView`);function pt(e,t){return{...F,classification:n=>F.classification(n||e,t),classificationDirectory:()=>F.classificationDirectory(t),audience:()=>F.classification(e,t),previewQuestions:()=>null,series:()=>null,latestReleases:()=>null,classificationLatestReleases:()=>null,playlist:()=>null,signUp:()=>null,widgetWizard:()=>null,classificationCurriculum:()=>null,searchSettings:()=>null,searchHome:()=>null,search:()=>null,editCurriculum:()=>null,getPreviewQuestionsAppLink:()=>null}}function mt(e){let{classification:t,path:n,appLinks:r}=e,i=[{name:ft(`discover`),appLink:{application:m.DASHBOARD,action:_.Dashboard.HOME}},{name:ft(`exploreAllTopicsHeading`),appLink:{application:m.SUBJECTS,action:_.Subjects.CLASSIFICATION_ALL}}];return n.forEach(e=>{i.push({name:e.name,appLink:r.classification(e),active:e.name===t.name})}),i}var ht=r.encloseNamespace(`subjects.classificationView`);function gt(e){return e?o.pick(e,[`a`,`dashboardId`,`tocId`]):{}}function _t(e){let t=Ne(`video-list`),{commonVideoProps:n}=je(),r=h(he.config()),i=h(te.currentUser()),a=Fe(),o=h(ge.streamablePresentation()),s=h(R.classification(e.id,i.data?.id)),{dashboard:c,isPreviewing:l}=T({targetType:N.Classification,dashboardId:e.queryParams?.dashboardId,classificationId:e.id}),u=pt(s.data,e.queryParams);se(oe.getClassificationMetadata({content:{classification:s.data},phraseContext:{phraseHandler:ht,titlePhrase:`pageTitle`,descriptionPhrase:`pageDescription`},canonicalLink:B.getCanonicalLink({customAppLink:u.classification(s.data)}),allowIndexing:!0,product:me.PRODUCT_NAME})),Pe(s,{notFound:ut});let d=h(o.data&&ve.presentationAudiences(v.StreamableLearning,o.data.id)),f=h(R.path(e.id,v.StreamableLearning)),p=H.useMemo(()=>z.getActiveAudiencesFromParams(d.data,e.queryParams),[d.data,e.queryParams]),m=p?.map(e=>e.masterId)??[],g={presentationId:o.data?.id,presentationName:o.data?.name,currentClassificationId:s.data?.id,currentClassificationName:s.data?.name,followingCurrentClassification:!!s.data?.followers?.data?.length,activeAudienceNames:p?.length?p.map(e=>e.name):null,activeAudienceIds:m.length?m:null};function ee(){return()=>mt({appLinks:u,classification:s.data,path:f.data})}return r.data&&c.hasCompleted&&s.data&&o.data&&f.data&&d.data?(0,U.jsx)(de.Provider,{value:{getVideoActions:t},children:(0,U.jsxs)(`div`,{className:`position-relative`,children:[!!(l&&c.data)&&(0,U.jsx)(Ee,{status:c.data.status,type:`topic`}),(0,U.jsx)(lt,{dashboard:c.data,classification:s.data,getWidgetContentRequest:V.dashboardWidgetContent,getBreadcrumbs:ee(),hasPermissions:()=>!1,hasLocalPermissions:()=>!1,presentation:o.data,getBannerActions:()=>[],audiences:d.data,activeAudiences:p,analyticsData:g,imageCdnUrl:r.data.imageCdnUrl,resourceThumbnailFallbackImageUrl:y.Fallbacks.RESOURCE_THUMBNAIL,emptyImageUrl:y.EmptyStates.Topics.TOPIC,appLinks:u,isPreviewing:l,isViewCurrentPresentation:!0,canFollowSubjects:!1,tableOfContentsId:e.queryParams.tocId,lazyLoad:!B.isBot(),isTeacherOnly:!1,contentType:ue.Livestream,hasTopicDirectoryDashboard:!1,hasTopicCurriculumDashboard:!1,isTertiaryCustomerWithoutExchange:!1,tab:`curated-topic`,curriculums:a,commonVideoProps:n})]})}):(0,U.jsx)(dt,{})}export{_t as StreamableClassificationView,gt as sanitizeStreamableClassificationParams};
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{gt as e,v as t}from"./Dp9qJj1C.chunk.js";import{r as n}from"./BJvPfCvt.chunk.js";import{t as r}from"./ImQRQGZr.chunk.js";import{C as i,E as a,M as o,l as s,lt as c,m as l,n as u,ut as d,x as f}from"./Dun43GrB.chunk.js";import{n as p}from"./Xo0rk19-.chunk.js";import{t as m}from"./B-OL6Vs7.chunk.js";import{l as h}from"./BQ5XMoHG.chunk.js";import{t as g}from"./B7tm2CBz.chunk.js";import{t as ee}from"./C9ET3pjZ.chunk.js";import{t as te}from"./ibuOpDkQ.chunk.js";import{t as ne}from"./CxwN2xIE.chunk.js";import{t as _}from"./DeldjYRc.chunk.js";import{t as v}from"./BVWg3YHX.chunk.js";import{t as y}from"./BYYiNmLB.chunk.js";import{a as re,c as b,i as x,n as ie,o as S,r as C,s as w,t as T}from"./oTYyWWB-.chunk.js";import{n as E,t as D}from"./Ca1QPe-q2.chunk.js";import{t as ae}from"./Cz6swPXe2.chunk.js";import{n as O,t as k}from"./D7d5XFW82.chunk.js";import{n as oe,t as se}from"./DjIdG9LL2.chunk.js";import{t as ce}from"./B13dpWxS2.chunk.js";import{n as le}from"./CL1ST5J62.chunk.js";import{t as ue}from"./DUNFBIIl2.chunk.js";import{s as de,t as fe}from"./BpgHKWR52.chunk.js";import{a as A,i as j,r as M}from"./B8R4YVaF2.chunk.js";import{n as N,t as P}from"./Bx_V3too2.chunk.js";import{t as F}from"./CoualKDX.chunk.js";import{t as I}from"./iTHYgnO8.chunk.js";import{H as pe,I as me,N as L,X as he,q as ge,w as _e}from"./app-BIigh9wv.js";import{t as ve}from"./BRiYVLuz.chunk.js";import{t as R}from"./DlFudnBx.chunk.js";import{t as ye}from"./CZb3E982.chunk.js";import{t as be}from"./CwttNCGZ.chunk.js";import{t as z}from"./C9tPKnK22.chunk.js";import{t as xe}from"./BTqtjOL02.chunk.js";import{a as Se}from"./DK3xia1t.chunk.js";import{t as Ce}from"./CCoZQmgX.chunk.js";import{t as B}from"./BlBCp_pE.chunk.js";import{n as we,r as Te,t as Ee}from"./DnSy_Myx.chunk.js";import{n as De,t as Oe}from"./B5jBIPaP.chunk.js";import{n as ke,t as Ae}from"./Dr1flAez.chunk.js";import{t as je}from"./DIavEegC.chunk.js";import{t as Me}from"./BOTX-kIq.chunk.js";import{t as V}from"./D0SYGnyF.chunk.js";import{t as Ne}from"./CUOEhUTb2.chunk.js";import{t as Pe}from"./BKnxYKDu2.chunk.js";import{t as Fe}from"./D7tastET2.chunk.js";var H=e(d()),U=c(),W=`subject.classificationHeaderDetails`,G=({className:e})=>(0,U.jsx)(`span`,{className:e,children:`•`});function Ie(e){let{dashboardVideoCount:t,childDashboardVideoCount:n,dashboardResourceCount:r,childDashboardResourceCount:i,childClassificationCount:a}=b.getCounts(e.classification),o=t+n,s=r+i;return(0,U.jsxs)(`p`,{className:`mb-n1 font-size-normal fw-normal mt-1`,children:[!!a&&(0,U.jsx)(O,{namespace:W,phrase:`topics`,options:{count:a.toLocaleString(),smartCount:a}}),!!o&&(0,U.jsxs)(U.Fragment,{children:[a>0&&(0,U.jsx)(G,{className:`mx-2`}),(0,U.jsx)(O,{namespace:W,phrase:`videos`,options:{count:o.toLocaleString(),smartCount:o}})]}),!!s&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(G,{className:`mx-2`}),(0,U.jsx)(O,{namespace:W,phrase:`resources`,options:{count:s.toLocaleString(),smartCount:s}})]})]})}var K=`subjects.curatedClassificationEmptyState`,Le=r.encloseNamespace(K);function Re(e){let t=e.dashboard?.status===P.Archived;return(0,U.jsx)(k.Provider,{value:K,children:(0,U.jsxs)(I,{children:[(0,U.jsx)(I.Image,{src:e.imageUrl,altText:Le(`headingForNP`)}),e.isReadonly?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(I.Heading,{children:(0,U.jsx)(O,{namespace:K,phrase:`headingForCurator`})}),(0,U.jsx)(I.Info,{children:(0,U.jsx)(O,{namespace:K,phrase:`info`})}),(0,U.jsx)(n,{title:t?r.getPhrase(K,`archivedCtaTooltip`):``,spanHack:!0,children:(0,U.jsx)(I.Cta,{text:r.getPhrase(K,`add`),appLink:e.addWidgetApplink?.(),className:`btn btn-dark`,icon:be,disabled:t})})]}):(0,U.jsx)(I.Heading,{children:(0,U.jsx)(O,{phrase:`headingForNP`})})]})})}var q={itemsWrapper:`_itemsWrapper_tzf1d_1`,anchorWrapper:`_anchorWrapper_tzf1d_5`,default:`_default_tzf1d_36`,selectedItem:`_selectedItem_tzf1d_47`,disabled:`_disabled_tzf1d_62`,floatIcon:`_floatIcon_tzf1d_69`,arrowIcon:`_arrowIcon_tzf1d_75`,listIcon:`_listIcon_tzf1d_78`,tocIndent1:`_tocIndent1_tzf1d_87`,tocIndent2:`_tocIndent2_tzf1d_90`};function ze(e){let t={actionType:i.Click,entity:s.Widget,location:l.TableOfContents};function n(t){Me.preventScrollTop(),e.setControlledId(t.id),e.onItemClick?.(t),setTimeout(()=>document.getElementById(t.id)?.focus())}function r(e){return e.tocIndentation===1?q.tocIndent1:e.tocIndentation===2?q.tocIndent2:``}return(0,U.jsx)(`div`,{className:`${q.itemsWrapper}`,children:e.items.map((i,a)=>e.localState?(0,U.jsx)(E,{className:`${q.anchorWrapper} ${e.activeId===i.id?q.selectedItem:``}`,onClick:()=>{n(i)},children:(0,U.jsx)(`div`,{className:`${!e.activeId&&a===0?q.default:``} `,children:i.name})},i.id):(0,U.jsx)(D,{appLink:e.getAppLink(i),appLinkOptions:{replace:!0},className:`${q.anchorWrapper} ${e.activeId===i.id?q.selectedItem:``}`,onClick:()=>{n(i)},analyticsData:{...e.analyticsData,id:i.id,name:i.name},analyticsOptions:t,children:(0,U.jsx)(`div`,{className:`${!e.activeId&&a===0?q.default:``} ${r(i)}`,children:i.name})},i.id))})}var J={container:`_container_1n8qw_1`,mobile:`_mobile_1n8qw_7`};function Be(e){let[t,n]=H.useState(!1);function r(){let n={actionType:t?i.Hide:i.Open,entity:s.TableOfContents,location:l.Dashboard};u.logUserAction(e.analyticsData,n)}function a(){n(!t),r()}return(0,U.jsxs)(`div`,{className:`${J.mobile} d-inline-flex gap-1`,children:[t&&(0,U.jsxs)(`div`,{className:`bg-white px-3 pt-3 pb-2 border border-dark rounded-1 ps-3`,children:[(0,U.jsx)(`h2`,{className:`h5`,children:e.title}),(0,U.jsx)(ze,{items:e.widgets.map(e=>({name:e.name,id:e.id,tocIndentation:e.metadata.tocIndentation})),activeId:e.activeId,appLink:e.appLink,analyticsData:e.analyticsData,setControlledId:e.setControlledId,getAppLink:e.getAppLink,onItemClick:()=>n(!1)})]}),(0,U.jsx)(`div`,{className:J.container,children:(0,U.jsx)(ae,{className:`btn btn-outline-dark`,svg:xe,onClick:a})})]})}function Ve(e){return(0,U.jsx)(`aside`,{className:`col-3 order-1`,children:(0,U.jsxs)(`div`,{className:`${J.container} ps-3`,children:[(0,U.jsx)(`h2`,{className:`h5`,children:e.title}),(0,U.jsx)(ze,{items:e.widgets.map(e=>({name:e.name,id:e.id,tocIndentation:e.metadata.tocIndentation})),activeId:e.activeId,appLink:e.appLink,analyticsData:e.analyticsData,setControlledId:e.setControlledId,getAppLink:e.getAppLink})]})})}function He(e){function t(e){let t=ne.getCurrentRoute().appLink,n=t.params?{...t.params}:{};return n.tocId=e.id,{...t,params:n}}return(0,U.jsx)(U.Fragment,{children:e.isSmallScreen?(0,U.jsx)(Be,{...e,getAppLink:t}):(0,U.jsx)(Ve,{...e,getAppLink:t})})}var Ue=`subjects.teacherOnlyEmptyState`,We=r.encloseNamespace(Ue);function Ge(e){return(0,U.jsx)(k.Provider,{value:Ue,children:(0,U.jsxs)(I,{children:[(0,U.jsx)(I.Image,{src:e.imageUrl,altText:We(`heading`)}),(0,U.jsx)(I.Heading,{children:(0,U.jsx)(O,{phrase:`heading`})}),(0,U.jsx)(I.Info,{children:(0,U.jsx)(O,{phrase:`info`})}),(0,U.jsx)(I.Cta,{text:We(`cta`),appLink:e.ctaAppLink?.(),className:`btn btn-dark`})]})})}function Ke(e,t){let{isSystemGeneratedDashboard:n,systemGeneratedVideoWidget:r}=H.useMemo(()=>e?{isSystemGeneratedDashboard:M.isSystemGeneratedDashboard(e.widgets),systemGeneratedVideoWidget:e.widgets.find(e=>e.widgetId===j.ClassificationPinnedVideos&&e.templateId!==A.ThumbnailVerticalList)}:{isSystemGeneratedDashboard:!1,systemGeneratedVideoWidget:null},[e?.id]),i=h(!!r&&V.dashboardWidgetContent(r?.id,M.getWidgetParams(r.widgetId,r.templateId,M.getDashboardTargetType(e),t?.map(e=>e.masterId)),r?.templateId));return n?{widgets:e?.widgets?.filter(e=>e.widgetId!==j.ClassificationPinnedVideos||e.templateId===A.ThumbnailVerticalList)??[],videoList:i.data?.content??[],videoListWidgetId:r?.id}:{widgets:g.sortBy(e?.widgets,`index`)}}var Y,qe=({setActiveId:e,headingElements:t,controlledId:n,setControlledId:r})=>{let i=H.useRef(0);H.useEffect(()=>{let a=new IntersectionObserver(a=>{a.forEach(a=>{if(n){e(n),Y=window.setTimeout(()=>{r(``)},800);return}if(a.isIntersecting)e(a.target.id),i.current=window.scrollY;else{let n=i.current-window.scrollY>0,r=t[t.findIndex(e=>e.id===a.target.id)-1];n&&r?.id&&e(r?.id)}})},{rootMargin:`-67px 0px -80% 0px`});return t.forEach(e=>a.observe(e)),()=>{Y&&window.clearTimeout(Y),a.disconnect()}},[e,t.length,n])};function Je(e){let t=H.useRef(null);return H.useEffect(()=>{t.current=e}),t.current}var Ye=80,Xe=(e,t)=>{let[n,r]=H.useState(!1),i=Je(t),a=t;H.useLayoutEffect(()=>{if(!n||i!==a){let t=e.find(e=>e&&e?.id===a);if(t){let e=t.getBoundingClientRect();window.scrollBy({top:e.top-Ye,behavior:`smooth`}),n||r(!0)}}},[e,i,a,n])},Ze=`subjects.classificationComingSoon`,Qe=r.encloseNamespace(Ze);function $e(e){let t=!!e.data.followers?.data?.length;function n(){e.onToggleFollow?.()}return(0,U.jsx)(k.Provider,{value:Ze,children:(0,U.jsxs)(I,{className:`pt-0`,children:[(0,U.jsx)(I.Image,{src:e.imageUrl,altText:Qe(`comingSoon`)}),(0,U.jsx)(I.Heading,{children:(0,U.jsx)(O,{phrase:`comingSoon`})}),(0,U.jsx)(I.Info,{children:(0,U.jsx)(O,{phrase:e.showSignUp?`infoAnon`:`info`})}),e.canFollowSubjects&&(0,U.jsx)(pe,{svg:t?x:C,onClick:n,showSpinner:e.showFollowButtonSpinner,className:`btn follow-btn me-2 ${t?`btn-outline-dark`:`btn-dark`}`,children:(0,U.jsx)(O,{phrase:t?`following`:`follow`})}),e.showSignUp&&!e.canFollowSubjects&&(0,U.jsx)(D,{appLink:e.signUpAppLink,className:`btn btn-dark d-none d-lg-inline-block`,analyticsOptions:{actionType:i.Click,location:l.ClassificationComingSoon,entity:s.AppLink,workflowPhase:a.Start,descriptor:f.SignUp},analyticsData:{},tag:`button`,children:Qe(`signUp`)})]})})}function et(e){return(0,U.jsx)(we,{audiences:e.audiences,activeAudiences:e.activeAudiences,disabled:e.disabled,appLink:e.appLink,disablePersist:e.disablePersist,tooltip:e.tooltip})}function tt(e){return(0,U.jsx)(`svg`,{...e,children:(0,U.jsx)(`path`,{d:`M4.5 4a.5.5 0 0 0 0 1h16a.5.5 0 0 1 .5.5v12a.5.5 0 0 0 1 0v-12A1.5 1.5 0 0 0 20.5 4zM9 10.26a.256.256 0 0 1 .39-.218l4.482 2.74a.256.256 0 0 1 0 .437L9.39 15.958A.256.256 0 0 1 9 15.739zM18.5 6A1.5 1.5 0 0 1 20 7.5v11a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 2 18.5v-11A1.5 1.5 0 0 1 3.5 6zm-15 1a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5z`,fill:`currentColor`})})}function nt(e){let[t,n]=le(`directory:product:tip:switcher`,{on:!1,tab:e||`new-releases`});return H.useEffect(()=>{e&&n(`tab`,e)},[e]),H.useEffect(()=>{let e=null;return t.on&&(e=window.setInterval(()=>{t.tab===`new-releases`||t.tab===`all-topics`?n(`tab`,t.tab===`new-releases`?`all-topics`:`new-releases`):n(`tab`,t.tab===`curated-topic`?`video-list`:`curated-topic`)},2e3)),()=>{window.clearInterval(e)}},[t.on,t.tab]),{tab:t.tab,isHighlighting:t.on,start:()=>n(`on`,!0),stop:()=>{n({on:!1,tab:e||t.tab})}}}var X={curatedTopicTab:`_curatedTopicTab_1ji5o_1`,tabTransition:`_tabTransition_1ji5o_4`},Z=`shared.classificationDashboard`;function rt(e,n,a,o){let c=n.lg||n.xl||n.xxl||n.xs;function u(){let e=o?X.tabTransition:``;return n.xs?e+` w-100`:c?e=` ${X.curatedTopicTab}`:e}return b.isTopLevelTopic(e.classification)?[{name:c?r.getPhrase(Z,`newReleases`):``,appLink:e.appLinks?.classification?.(e.classification),active:a===`new-releases`,svg:re,analyticsData:{id:`new-releases`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:r.getPhrase(Z,`newReleases`),url:t.getHref(e.appLinks?.classification?.(e.classification))},analyticsOptions:{actionType:i.Click,entity:s.Url,location:l.MagicTabs},className:`${n.xs?`w-100`:``} ${o?X.tabTransition:``}`},{name:c?r.getPhrase(Z,`allTopics`):``,appLink:e.appLinks?.classificationDirectory?.(e.classification),active:a===`all-topics`,svg:w,analyticsData:{id:`all-topics`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:r.getPhrase(Z,`allTopics`),url:t.getHref(e.appLinks?.classificationDirectory?.(e.classification))},analyticsOptions:{actionType:i.Click,entity:s.Url,location:l.MagicTabs},className:`${n.xs?`w-100`:``} ${o?X.tabTransition:``}`}]:[{name:c?r.getPhrase(Z,`topic`):``,appLink:e.appLinks?.classification?.(e.classification),active:a===`curated-topic`,svg:S,analyticsData:{id:`curated-topic`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:r.getPhrase(Z,`topic`),url:t.getHref(e.appLinks?.classification?.(e.classification))},analyticsOptions:{actionType:i.Click,entity:s.Url,location:l.MagicTabs},className:u()},{name:c?r.getPhrase(Z,`curriculum`):``,appLink:e.appLinks?.classificationCurriculum?.(e.classification),active:a===`curriculum`,svg:tt,analyticsData:{id:`curriculum`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:r.getPhrase(Z,`curriculum`),url:t.getHref(e.appLinks?.classificationCurriculum?.(e.classification))},analyticsOptions:{actionType:i.Click,entity:s.Url,location:l.MagicTabs},className:`${n.xs?`w-100`:``} ${o?X.tabTransition:``}`}]}function it(e){let t=L(),{tab:n,isHighlighting:r}=nt(e.activeTab);return(0,U.jsx)(Ce,{borderRadius:`sm`,className:t.xs?`w-100`:``,listClassName:`d-flex flex-nowrap`,tabs:rt(e,t,n,r)})}function at(e,t,n,r,i){return!!(i||r&&!t?.length||!z.shouldShowAudiences(e)||n===`curriculum`)}function ot(e){let t=L(),n=at(e.audiences,e.activeAudiences,e.activeTab,e.isEmpty,e.isComingSoon);function r(){return!e.classification||!e.dashboard||M.isSystemGeneratedDashboard(e.dashboard.widgets)?!1:b.isTopLevelTopic(e.classification)?e.hasTopicDirectoryDashboard:!!(e.classification.externalMetadata?.isCurated&&e.hasTopicCurriculumDashboard)}function i(){let i=`d-flex flex-column py-3 mb-3`;return e.isComingSoon||(i+=` border-bottom`),(r()||n)&&!t.xs?i:i+` row-gap-3`}function a(){if(n)return t.xs?`d-flex flex-column justify-content-between row-gap-3`:`d-flex align-items-center justify-content-between`;let e=``;return e+=`d-flex align-items-center justify-content-between mb-1`,t.xs&&(e+=` row-gap-3 mb-0`),e}function o(){let e=`d-flex align-items-end justify-content-between`;return t.xs&&(e+=` row-gap-3 flex-wrap`),e}return(0,U.jsxs)(`div`,{className:i(),children:[(0,U.jsxs)(`div`,{className:a(),children:[(0,U.jsx)(Ae,{breadcrumbs:e.getBreadcrumbs?.()}),r()&&n&&(0,U.jsx)(it,{classification:e.classification,activeTab:e.activeTab,appLinks:e.appLinks,presentation:e.presentation})]}),(0,U.jsxs)(`div`,{className:o(),children:[!n&&(0,U.jsx)(et,{audiences:e.audiences,activeAudiences:e.activeAudiences,appLink:e.appLinks.audience?.(),disabled:e.disableAudiences,tooltip:e.audienceTooltip,disablePersist:!e.isViewingCurrentPresentation}),r()&&!n&&(0,U.jsx)(it,{classification:e.classification,activeTab:e.activeTab,appLinks:e.appLinks,presentation:e.presentation})]})]})}var st=`shared.classificationDashboard`;function Q(e){return e.widgetId===j.Blurb&&e.templateId===A.Heading}function ct(e){return e.widgetId===j.CuratedClassifications||e.widgetId===j.Classifications}lt.defaultProps={appLinks:{}};function lt(e){let{widgets:t,videoList:n,videoListWidgetId:i}=Ke(e.dashboard,e.activeAudiences),a=ce(_e.LGDown),o=H.useRef(new Set),s=H.useMemo(()=>t.reduce((e,t)=>(e[t.id]=!1,e),{}),[t?.length]),[c,u]=H.useState(s),[d,f]=H.useState(e.tableOfContentsId),[p,m]=H.useState(``),h=Array.from(o.current);Xe(h,d),qe({setActiveId:m,headingElements:h,controlledId:d,setControlledId:f});let g=e.classification.type===ye.Hub;function te(){return e.isComingSoon||e.isTeacherOnly?!1:!e.dashboard||e.dashboard.status===P.Archived&&!e.isReadonly||e.dashboard.status===P.Draft&&!e.isPreviewing||!t?.length?!0:n&&n.length?!1:Object.values(c).every(e=>!!e)}function ne(t,n,r){let i=M.getWidgetParams(n,r,M.getDashboardTargetType(e.dashboard),e.activeAudiences?.map(e=>e.masterId),e.curriculums.preferredCurriculum?.id);return e.getWidgetContentRequest(t,i,r)}let _=te();H.useEffect(()=>{_&&u(s)},[t?.length]);let v=H.useCallback((n,r)=>{if(c[n]===r)return;let i={...c,[n]:r};if(M.isType(e.dashboard,N.ClassificationDirectory)){u(i);return}let a=0;for(;a<t.length;){let e=t[a];if(!Q(e)){a++;continue}let n=!0,r=a+1;for(;n&&r<t.length;){let e=t[r];if(Q(e))break;!i[e.id]&&!ct(e)&&(n=!1),r++}a=r,i[e.id]=n}u(i)},[c,t]);function y(e){return Q(e)&&c[e.id]}function re(){let t=M.getDashboardTargetType(e.dashboard);return!(e.moviesAndTv||t===N.ClassificationCurriculum)}function x(e,n){return e.widgetId===j.ClassificationDashboardExternalMedia&&c[t[n-1].id]?e.name.replace(`Other videos`,`Videos`):e.name}let S=t.filter(e=>!y(e)&&!!e.metadata?.showInTableOfContents),C=t.every(ct),w=S.length>=2,T=w&&!a&&!g,E=e.settings?.hasTopicDirectories&&b.isTopLevelTopic(e.classification)&&!e.isTertiaryCustomerWithoutExchange;return(0,U.jsxs)(`div`,{className:`bg-white px-4 ${re()?`dashboard-spacing-lg`:``}`,children:[g&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`h1`,{className:`h2 mb-4`,children:e.classification.name}),(0,U.jsx)(`hr`,{className:`mt-2`})]}),!g&&(0,U.jsx)(Oe,{heading:e.classification.name,banner:e.classification.banner,imageCdnUrl:e.imageCdnUrl,actions:e.getBannerActions?.(),actionsDropdownClassName:`btn btn-outline-dark`,specialEvent:e.specialEvent,calendarTheme:{background:`bg-light-blue`,border:`border-light-blue`},showComingSoon:e.isComingSoon,detailsComponent:E?()=>(0,U.jsx)(Ie,{classification:e.classification}):null}),!g&&(0,U.jsx)(ot,{dashboard:e.dashboard,classification:e.classification,presentation:e.presentation,appLinks:e.appLinks,activeTab:e.tab,audiences:e.audiences,activeAudiences:e.activeAudiences,getBreadcrumbs:e.getBreadcrumbs,hasTopicDirectoryDashboard:e.hasTopicDirectoryDashboard,hasTopicCurriculumDashboard:e.hasTopicCurriculumDashboard,isComingSoon:e.isComingSoon,isEmpty:_,isViewingCurrentPresentation:e.isViewCurrentPresentation,disableAudiences:C||e.isReadonly,audienceTooltip:C?r.getPhrase(st,`audienceTooltip`):``}),e.isComingSoon&&(0,U.jsx)($e,{imageUrl:e.comingSoonImageUrl,data:e.classification,canFollowSubjects:e.canFollowSubjects,showFollowButtonSpinner:e.showFollowButtonSpinner,onToggleFollow:()=>e.onToggleFollow(e.classification,l.ClassificationComingSoon),showSignUp:!e.hasLocalPermissions(ee.FollowComingSoonTopics),signUpAppLink:e.appLinks.signUp?.()}),!e.isComingSoon&&(0,U.jsxs)(`div`,{className:`${T?`row no-wrap`:``}`,children:[w&&(0,U.jsx)(He,{widgets:S,title:e.classification.name,activeId:p,clickable:!e.isReadonly,analyticsData:e.analyticsData,setControlledId:f,isSmallScreen:a}),(0,U.jsx)(`div`,{className:T?`col-9 order-0`:``,children:t.map((t,n)=>y(t)?(0,U.jsx)(H.Fragment,{},t.id):(0,U.jsx)(ie,{widgetCollection:N.Classification,headingElementRef:o,id:t.id,name:x(t,n),description:t.description,classification:e.classification,templateId:t.templateId,widgetTypeId:t.widgetId,audiences:e.audiences,getContentRequest:ne,setIsEmpty:v,appLinks:e.appLinks,presentation:e.presentation,analyticsData:e.analyticsData,isScrollToTargetWidget:e.scrollToWidgetId===t.id,imageCdnUrl:e.imageCdnUrl,onSubmitFeedback:e.onSubmitFeedback,metadata:t.metadata,isBot:e.isBot,hasTableOfContents:T,lazyLoad:e.lazyLoad,dashboardTarget:M.getDashboardTargetType(e.dashboard),widgetIndex:n,hasPermissions:e.hasPermissions,hasLocalPermissions:e.hasLocalPermissions,isPreviewing:e.isReadonly,contentType:e.contentType,resourceThumbnailFallbackImageUrl:e.resourceThumbnailFallbackImageUrl,onToggleFollowClassification:e.onToggleFollow,settings:e.settings,isEditing:e.isReadonly,isTertiaryCustomerWithoutExchange:e.isTertiaryCustomerWithoutExchange,commonVideoProps:e.commonVideoProps,curriculums:e.curriculums,limitTotalItems:!1,seeMoreLink:null,onClickRemoveItem:null,badgeComponent:null},t.id))}),!!n?.length&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Se,{name:r.getPhrase(st,`videos`)}),(0,U.jsx)(fe,{videos:n,getVideoAppLink:(t,n)=>e.appLinks.videoType(t,{...n,contextId:i,includeContext:n.includeContext}),hasPermissions:e.hasPermissions,presentationAudiences:e.audiences,getPreviewQuestionsAppLink:e.appLinks.previewQuestions,commonVideoProps:e.commonVideoProps})]})]}),_&&(0,U.jsx)(Re,{dashboard:e.dashboard,isReadonly:e.isReadonly,imageUrl:e.emptyImageUrl,addWidgetApplink:e.appLinks.widgetWizard}),e.isTeacherOnly&&(0,U.jsx)(Ge,{imageUrl:e.emptyImageUrl,ctaAppLink:()=>e.appLinks.allTopics(e.classification.presentationId)})]})}var $=`subjects.topicNotFoundError`,ut=class extends p{constructor(){super(`Topic doesn't exist`)}get name(){return`TopicNotFoundError`}get heading(){return r.getPhrase($,`heading`)}get description(){return r.getPhrase($,`description`)}get cta(){return{text:r.getPhrase($,`cta`),appLink:{application:m.SUBJECTS,action:_.Subjects.CLASSIFICATION_ALL}}}};function dt(){return(0,U.jsxs)(`div`,{className:`bg-white px-4`,children:[(0,U.jsx)(De,{}),(0,U.jsxs)(`div`,{className:`d-flex flex-column row-gap-3 py-3 mb-3 border-bottom`,children:[(0,U.jsx)(ke,{}),(0,U.jsx)(Te,{})]})]})}var ft=r.encloseNamespace(`subjects.classificationView`);function pt(e,t){return{...F,classification:n=>F.classification(n||e,t),classificationDirectory:()=>F.classificationDirectory(t),audience:()=>F.classification(e,t),previewQuestions:()=>null,series:()=>null,latestReleases:()=>null,classificationLatestReleases:()=>null,playlist:()=>null,signUp:()=>null,widgetWizard:()=>null,classificationCurriculum:()=>null,searchSettings:()=>null,searchHome:()=>null,search:()=>null,editCurriculum:()=>null,getPreviewQuestionsAppLink:()=>null}}function mt(e){let{classification:t,path:n,appLinks:r}=e,i=[{name:ft(`discover`),appLink:{application:m.DASHBOARD,action:_.Dashboard.HOME}},{name:ft(`exploreAllTopicsHeading`),appLink:{application:m.SUBJECTS,action:_.Subjects.CLASSIFICATION_ALL}}];return n.forEach(e=>{i.push({name:e.name,appLink:r.classification(e),active:e.name===t.name})}),i}var ht=r.encloseNamespace(`subjects.classificationView`);function gt(e){return e?o.pick(e,[`a`,`dashboardId`,`tocId`]):{}}function _t(e){let t=Ne(`video-list`),{commonVideoProps:n}=je(),r=h(he.config()),i=h(te.currentUser()),a=Fe(),o=h(ge.streamablePresentation()),s=h(R.classification(e.id,i.data?.id)),{dashboard:c,isPreviewing:l}=T({targetType:N.Classification,dashboardId:e.queryParams?.dashboardId,classificationId:e.id}),u=pt(s.data,e.queryParams);se(oe.getClassificationMetadata({content:{classification:s.data},phraseContext:{phraseHandler:ht,titlePhrase:`pageTitle`,descriptionPhrase:`pageDescription`},canonicalLink:B.getCanonicalLink({customAppLink:u.classification(s.data)}),allowIndexing:!0,product:me.PRODUCT_NAME})),Pe(s,{notFound:ut});let d=h(o.data&&ve.presentationAudiences(v.StreamableLearning,o.data.id)),f=h(R.path(e.id,v.StreamableLearning)),p=H.useMemo(()=>z.getActiveAudiencesFromParams(d.data,e.queryParams),[d.data,e.queryParams]),m=p?.map(e=>e.masterId)??[],g={presentationId:o.data?.id,presentationName:o.data?.name,currentClassificationId:s.data?.id,currentClassificationName:s.data?.name,followingCurrentClassification:!!s.data?.followers?.data?.length,activeAudienceNames:p?.length?p.map(e=>e.name):null,activeAudienceIds:m.length?m:null};function ee(){return()=>mt({appLinks:u,classification:s.data,path:f.data})}return r.data&&c.hasCompleted&&s.data&&o.data&&f.data&&d.data?(0,U.jsx)(de.Provider,{value:{getVideoActions:t},children:(0,U.jsxs)(`div`,{className:`position-relative`,children:[!!(l&&c.data)&&(0,U.jsx)(Ee,{status:c.data.status,type:`topic`}),(0,U.jsx)(lt,{dashboard:c.data,classification:s.data,getWidgetContentRequest:V.dashboardWidgetContent,getBreadcrumbs:ee(),hasPermissions:()=>!1,hasLocalPermissions:()=>!1,presentation:o.data,getBannerActions:()=>[],audiences:d.data,activeAudiences:p,analyticsData:g,imageCdnUrl:r.data.imageCdnUrl,resourceThumbnailFallbackImageUrl:y.Fallbacks.RESOURCE_THUMBNAIL,emptyImageUrl:y.EmptyStates.Topics.TOPIC,appLinks:u,isPreviewing:l,isViewCurrentPresentation:!0,canFollowSubjects:!1,tableOfContentsId:e.queryParams.tocId,lazyLoad:!B.isBot(),isTeacherOnly:!1,contentType:ue.Livestream,hasTopicDirectoryDashboard:!1,hasTopicCurriculumDashboard:!1,isTertiaryCustomerWithoutExchange:!1,tab:`curated-topic`,curriculums:a,commonVideoProps:n})]})}):(0,U.jsx)(dt,{})}export{_t as StreamableClassificationView,gt as sanitizeStreamableClassificationParams};
|
|
2
|
+
//# sourceMappingURL=qcrBN1zR2.chunk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lokG7Sha2.chunk.js","names":[],"sources":["../../../../libs/shared/src/apps/subjects/components/classification-dashboard/classification-header-details/ClassificationHeaderDetails.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/empty-state/CuratedClassificationEmptyState.tsx","../../../../libs/shared/src/components/table-of-contents-list/table-of-contents-list.module.scss","../../../../libs/shared/src/components/table-of-contents-list/TableOfContentsList.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/table-of-contents/table-of-contents.module.scss","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/table-of-contents/TableOfContents.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/teacher-only/TeacherOnlyEmptyState.tsx","../../../../libs/shared/src/apps/subjects/hooks/useGetTopicsWidgets.ts","../../../../libs/shared/src/hooks/useTableOfContentsActiveHeading.tsx","../../../../libs/shared/src/hooks/usePrevious.ts","../../../../libs/shared/src/hooks/useTableOfContentsScroll.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/classification-coming-soon/ClassificationComingSoon.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/audiences/ClassificationDashboardAudiences.tsx","../../../../libs/shared/src/images/svg/widgets/WidgetSeriesSvg.tsx","../../../../libs/shared/src/apps/subjects/hooks/useDirectoryTabProductTipSwitcher.ts","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/classification-tabs/classification-tabs.module.scss","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/classification-tabs/ClassificationTabs.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/classification-dashboard-nav/ClassificationDashboardNav.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/ClassificationDashboard.tsx","../../src/apps/subjects/errors/TopicNotFoundError.ts","../../src/apps/subjects/views/classification/partial-loading/PartialClassification.tsx","../../src/apps/subjects/views/classification/StreamableClassificationViewUtils.ts","../../src/apps/subjects/views/classification/StreamableClassificationView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { Classification } from 'libs/shared/interfaces';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nconst namespace = 'subject.classificationHeaderDetails';\n\nconst Separator = ({ className }: { className: string }) =>\n <span className={className}>•</span>;\n\ninterface ClassificationHeaderDetailsProps {\n classification: Classification;\n}\n\nexport function ClassificationHeaderDetails(props: ClassificationHeaderDetailsProps): React.ReactElement {\n const {\n dashboardVideoCount,\n childDashboardVideoCount,\n dashboardResourceCount,\n childDashboardResourceCount,\n childClassificationCount\n } = TopicsHelper.getCounts(props.classification);\n\n const videoCount = dashboardVideoCount + childDashboardVideoCount;\n const resourceCount = dashboardResourceCount + childDashboardResourceCount;\n\n return (\n <p className='mb-n1 font-size-normal fw-normal mt-1'>\n {!!childClassificationCount && (\n <Text\n namespace={namespace}\n phrase='topics'\n options={{ count: childClassificationCount.toLocaleString(), smartCount: childClassificationCount }}\n />\n )}\n\n {!!videoCount && (\n <>\n {childClassificationCount > 0 && <Separator className='mx-2' />}\n <Text\n namespace={namespace}\n phrase='videos'\n options={{ count: videoCount.toLocaleString(), smartCount: videoCount }}\n />\n </>\n )}\n {!!resourceCount && (\n <>\n <Separator className='mx-2' />\n <Text\n namespace={namespace}\n phrase='resources'\n options={{ count: resourceCount.toLocaleString(), smartCount: resourceCount }}\n />\n </>\n )}\n </p>\n );\n}\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { Tooltip } from 'libs/shared/components/tooltip/Tooltip';\nimport { PlusSvg } from 'libs/shared/images/svg/actions/PlusSvg';\nimport { CuratedDashboard, DashboardStatus } from 'libs/shared/interfaces';\n\nconst namespace = 'subjects.curatedClassificationEmptyState';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CuratedClassificationEmptyStateProps {\n dashboard: CuratedDashboard;\n imageUrl: string;\n isReadonly: boolean;\n addWidgetApplink?: () => Core.AppLink;\n}\n\nexport function CuratedClassificationEmptyState(props: CuratedClassificationEmptyStateProps): JSX.Element {\n const isArchived = props.dashboard?.status === DashboardStatus.Archived;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('headingForNP')} />\n {!props.isReadonly ? (\n <EmptyState.Heading>\n <Text phrase='headingForNP' />\n </EmptyState.Heading>\n ) : (\n <>\n <EmptyState.Heading>\n <Text namespace={namespace} phrase='headingForCurator' />\n </EmptyState.Heading>\n <EmptyState.Info>\n <Text namespace={namespace} phrase='info' />\n </EmptyState.Info>\n <Tooltip title={isArchived ? LanguageService.getPhrase(namespace, 'archivedCtaTooltip') : ''} spanHack>\n <EmptyState.Cta\n text={LanguageService.getPhrase(namespace, 'add')}\n appLink={props.addWidgetApplink?.()}\n className='btn btn-dark'\n icon={PlusSvg}\n disabled={isArchived}\n />\n </Tooltip>\n </>\n )}\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}\n",":local{\n $dot-size: 0.75rem;\n $track-offset: -1rem;\n\n @mixin dot {\n &::before {\n position: absolute;\n left: -1.06rem;\n top: calc(50% - $dot-size/2);\n display: block;\n content: '';\n height: $dot-size;\n width: $dot-size;\n border-radius: 50%;\n background-color: $black;\n }\n }\n\n @mixin tocIndent($depth) {\n margin-left: map-get($spacers, 3) * $depth;\n }\n \n .itemsWrapper {\n border-left: 2px solid $black;\n padding-left: 0.625rem;\n }\n\n .anchorWrapper {\n padding: 0.625rem;\n text-decoration: none;\n position: relative;\n display: block;\n }\n .anchorWrapper:hover {\n background-color: $light-blue;\n text-decoration: none;\n cursor: pointer;\n }\n\n .anchorWrapper:first-child {\n &::after {\n display: block;\n content: '';\n background-color: $white;\n height: calc(50% - $dot-size/2 + 0.05rem);\n width: 0.625rem;\n top: -0.05rem;\n position: absolute;\n left: $track-offset;\n }\n }\n .anchorWrapper:last-child {\n &::after {\n display: block;\n content: '';\n background-color: $white;\n height: calc(50% - $dot-size/2);\n width: 0.625rem;\n position: absolute;\n bottom: 0;\n left: $track-offset;\n }\n }\n\n .default {\n @include dot\n }\n\n .selectedItem {\n background-color: $gray-100;\n font-weight: 500;\n @include dot\n }\n \n .disabled:hover {\n cursor: default;\n background-color: $white;\n }\n .disabled{\n pointer-events:none\n }\n\n .floatIcon {\n position: absolute;\n right: 0;\n width: fit-content;\n padding: 0;\n .arrowIcon {\n display: none;\n }\n .listIcon {\n display: block;\n }\n &:hover {\n .listIcon {\n display: none;\n }\n .arrowIcon {\n display: block;\n }\n }\n }\n\n .tocIndent1 {\n @include tocIndent(1);\n }\n\n .tocIndent2 {\n @include tocIndent(2);\n }\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { ScrollHelper } from 'libs/common/backbone/utils/ScrollHelper';\n\nimport { EntityType, HashObject, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\n\nimport styles from './table-of-contents-list.module.scss';\n\nexport interface TableOfContentsItem<T=string> {\n name: string;\n id: T;\n tocIndentation?: number;\n}\n\ninterface TableOfContentsProps<T> {\n items: TableOfContentsItem<T>[];\n activeId: string;\n appLink?: Core.AppLink;\n analyticsData?: HashObject;\n setControlledId: (arg: string) => void;\n // set to true if the TOC is controlled by a local state rather than query params\n localState?: boolean;\n getAppLink?: (args: TableOfContentsItem<T>) => Core.AppLink;\n onItemClick?: (args: TableOfContentsItem<T>) => void;\n}\n\nexport function TableOfContentsList<T extends string>(props: TableOfContentsProps<T>): JSX.Element {\n const analyticsOptions = {\n actionType: UserAction.Click,\n entity: EntityType.Widget,\n location: LocationContext.TableOfContents\n };\n\n function onItemSelect(item: TableOfContentsItem<T>) {\n ScrollHelper.preventScrollTop();\n props.setControlledId(item.id);\n \n props.onItemClick?.(item);\n \n setTimeout(() => document.getElementById(item.id)?.focus());\n }\n\n function getTocIndentClass(item: TableOfContentsItem<T>): string {\n if (item.tocIndentation === 1)\n return styles.tocIndent1;\n \n if (item.tocIndentation === 2)\n return styles.tocIndent2;\n\n return '';\n }\n\n return (\n <div className={`${styles.itemsWrapper}`}>\n {props.items.map((item, idx) => {\n if (props.localState) {\n return (\n <DivButton\n key={item.id}\n className={`${styles.anchorWrapper} ${props.activeId === item.id ? styles.selectedItem : ''}`}\n onClick={() => {\n onItemSelect(item);\n }}\n >\n <div className={`${!props.activeId && idx === 0 ? styles.default : ''} `}>\n {item.name}\n </div>\n </DivButton>\n );\n }\n\n return (\n <AppLink\n key={item.id}\n appLink={props.getAppLink(item)}\n appLinkOptions={{ replace: true }}\n className={`${styles.anchorWrapper} ${props.activeId === item.id ? styles.selectedItem : ''}`}\n onClick={() => {\n onItemSelect(item);\n }}\n analyticsData={{\n ...props.analyticsData,\n id: item.id,\n name: item.name\n }}\n analyticsOptions={analyticsOptions}\n >\n <div className={`${!props.activeId && idx === 0 ? styles.default : ''} ${getTocIndentClass(item)}`}>\n {item.name}\n </div>\n </AppLink>\n );\n })}\n </div>\n );\n}\n","$top-nav-height: 4.1875rem;\n$cv-banner-height: calc(100vw * 22 / 120);\n$filters-area: 7.87rem;\n\n.container {\n position: sticky;\n top: 6.25rem;\n z-index: 80;\n}\n\n.mobile {\n position: fixed;\n top: calc($top-nav-height + $cv-banner-height + $filters-area);\n z-index: 80;\n right: 0;\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, HashObject, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { IconButton } from 'libs/shared/components/icon-button/IconButton';\nimport { TableOfContentsList } from 'libs/shared/components/table-of-contents-list/TableOfContentsList';\nimport { TableOfContentsSvg } from 'libs/shared/images/svg/objects/TableOfContentsSvg';\nimport { CuratedWidget } from 'libs/shared/interfaces';\nimport { ContextService } from 'libs/shared/services/ContextService';\n\nimport styles from './table-of-contents.module.scss';\n\ninterface TableOfContentsContainerProps {\n widgets: CuratedWidget[];\n title: string;\n activeId: string;\n appLink?: Core.AppLink;\n clickable?: boolean;\n analyticsData?: HashObject;\n setControlledId: (arg: string) => void;\n isSmallScreen?: boolean;\n}\ninterface TableOfContentsProps extends TableOfContentsContainerProps {\n getAppLink: (widget: CuratedWidget) => Core.AppLink;\n}\n\nfunction TableOfContentsMobile(props: TableOfContentsProps) {\n const [ isExpanded, setIsExpanded ] = React.useState(false);\n\n function logUserAction() {\n const analyticsOptions = {\n actionType: !isExpanded ? UserAction.Open : UserAction.Hide,\n entity: EntityType.TableOfContents,\n location: LocationContext.Dashboard\n };\n\n AnalyticsHelper.logUserAction(props.analyticsData, analyticsOptions);\n }\n\n function onClickIcon() {\n setIsExpanded(!isExpanded);\n logUserAction();\n }\n\n return (\n <div className={`${styles.mobile} d-inline-flex gap-1`}>\n \n {isExpanded && (\n <div className='bg-white px-3 pt-3 pb-2 border border-dark rounded-1 ps-3'>\n <h2 className='h5'>{props.title}</h2>\n <TableOfContentsList\n items={props.widgets.map(widget => (\n { name: widget.name, id: widget.id, tocIndentation: widget.metadata.tocIndentation }\n ))}\n activeId={props.activeId}\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n setControlledId={props.setControlledId}\n getAppLink={props.getAppLink}\n onItemClick={() => setIsExpanded(false)}\n />\n </div>\n )}\n <div className={styles.container}>\n <IconButton\n className='btn btn-outline-dark'\n svg={TableOfContentsSvg}\n onClick={onClickIcon}\n />\n </div>\n </div>\n );\n}\n\nfunction TableOfContents(props: TableOfContentsProps): JSX.Element {\n return (\n <aside className='col-3 order-1'>\n <div className={`${styles.container} ps-3`}>\n <h2 className='h5'>{props.title}</h2>\n \n <TableOfContentsList\n items={props.widgets.map(widget => (\n { name: widget.name, id: widget.id, tocIndentation: widget.metadata.tocIndentation }\n ))}\n activeId={props.activeId}\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n setControlledId={props.setControlledId}\n getAppLink={props.getAppLink}\n />\n </div>\n </aside>\n );\n}\n\nexport function TableOfContentsContainer(props: TableOfContentsContainerProps): JSX.Element {\n function getAppLink(widget: CuratedWidget): Core.AppLink {\n const currentAppLink = ContextService.getCurrentRoute().appLink;\n \n const params: HashObject = currentAppLink.params ?\n { ...(currentAppLink.params as HashObject) } :\n {};\n\n params.tocId = widget.id;\n\n return {\n ...currentAppLink,\n params\n };\n }\n\n return (\n <>\n {!props.isSmallScreen ?\n <TableOfContents {...props} getAppLink={getAppLink} /> :\n <TableOfContentsMobile {...props} getAppLink={getAppLink} />\n }\n </>\n );\n}\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'subjects.teacherOnlyEmptyState';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface TeacherOnlyEmptyStateProps {\n imageUrl: string;\n ctaAppLink?: () => Core.AppLink;\n}\n\nexport function TeacherOnlyEmptyState(props: TeacherOnlyEmptyStateProps): JSX.Element {\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('heading')} />\n <EmptyState.Heading>\n <Text phrase='heading' />\n </EmptyState.Heading>\n <EmptyState.Info>\n <Text phrase='info' />\n </EmptyState.Info>\n\n <EmptyState.Cta\n text={getPhrase('cta')}\n appLink={props.ctaAppLink?.()}\n className='btn btn-dark'\n />\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}\n","import React from 'react';\n\nimport { Flight } from 'libs/common/react/index';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\n\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { DashboardRequests } from 'libs/shared/flight-requests/DashboardRequests';\nimport { CuratedDashboard, CuratedMediaWidget, CuratedWidget, PresentationAudience, Video } from 'libs/shared/interfaces';\nimport { CuratedDashboardHelper } from 'libs/shared/utils/DashboardHelper';\n\nexport interface Response {\n widgets: CuratedWidget[];\n\n videoList?: Video[];\n videoListWidgetId?: string;\n}\n\n/**\n * This hook helps us with custom logic for to display system generated dashboards in a slightly\n * different way.\n */\nexport function useGetTopicsWidgets(dashboard: CuratedDashboard, activeAudiences: PresentationAudience[]): Response {\n const {\n isSystemGeneratedDashboard,\n systemGeneratedVideoWidget\n } = React.useMemo(() => {\n if (!dashboard) {\n return {\n isSystemGeneratedDashboard: false,\n systemGeneratedVideoWidget: null\n };\n }\n\n const isSystemGeneratedDashboard = CuratedDashboardHelper.isSystemGeneratedDashboard(dashboard.widgets);\n\n return {\n isSystemGeneratedDashboard,\n systemGeneratedVideoWidget: dashboard.widgets.find(widget => {\n return (\n widget.widgetId === WidgetTypeId.ClassificationPinnedVideos &&\n widget.templateId !== WidgetTemplate.ThumbnailVerticalList\n );\n })\n };\n }, [dashboard?.id]);\n\n const systemGeneratedVideoContent = Flight.useBasicFetch<CuratedMediaWidget<Video[]>>(\n !!systemGeneratedVideoWidget &&\n DashboardRequests.dashboardWidgetContent(\n systemGeneratedVideoWidget?.id,\n CuratedDashboardHelper.getWidgetParams(\n systemGeneratedVideoWidget.widgetId,\n systemGeneratedVideoWidget.templateId,\n CuratedDashboardHelper.getDashboardTargetType(dashboard),\n activeAudiences?.map(a => a.masterId)\n ),\n systemGeneratedVideoWidget?.templateId\n )\n );\n\n // Non system generated dashboards are returned as per usual\n if (!isSystemGeneratedDashboard)\n return { widgets: ArrayHelper.sortBy(dashboard?.widgets, 'index') };\n\n // System generated dashboard have the video widget removed and returned as a separate video list\n return {\n widgets: dashboard?.widgets?.filter(widget => {\n if (widget.widgetId !== WidgetTypeId.ClassificationPinnedVideos)\n return true;\n\n if (widget.templateId === WidgetTemplate.ThumbnailVerticalList)\n return true;\n\n return false;\n }) ?? [],\n videoList: systemGeneratedVideoContent.data?.content ?? [],\n videoListWidgetId: systemGeneratedVideoWidget?.id\n };\n}\n","import React from 'react';\n\ntype TableOfContentsActiveOption = {\n setActiveId: (id: string) => void,\n headingElements: Element[],\n controlledId?: string,\n setControlledId?: (arg: string) => void\n};\n\nlet timer: number;\n\nexport const useTableOfContentsActiveHeading = (\n { setActiveId, headingElements, controlledId, setControlledId }: TableOfContentsActiveOption\n) => {\n const scrollPositionRef = React.useRef(0);\n\n React.useEffect(() => {\n const callback = (headings: IntersectionObserverEntry[]) => {\n headings.forEach(heading => {\n if (controlledId) {\n setActiveId(controlledId);\n // can use scrollEnd event when the new event type is supported\n timer = window.setTimeout(() => {\n setControlledId('');\n }, 800);\n return;\n }\n if (heading.isIntersecting) {\n setActiveId(heading.target.id);\n scrollPositionRef.current = window.scrollY;\n } else {\n const scrollDistance = scrollPositionRef.current - window.scrollY;\n const isScrollingUp = scrollDistance > 0;\n const curIndex = headingElements.findIndex(h => h.id === heading.target.id);\n const prevHeading = headingElements[curIndex - 1];\n if (isScrollingUp && prevHeading?.id) {\n setActiveId(prevHeading?.id);\n }\n }\n });\n };\n\n const observer = new IntersectionObserver(callback, {\n // rootMargin top: same as the cv-nav-height\n rootMargin: '-67px 0px -80% 0px'\n });\n\n headingElements.forEach(element => observer.observe(element));\n\n return () => {\n timer && window.clearTimeout(timer);\n observer.disconnect();\n };\n }, [ setActiveId, headingElements.length, controlledId ]);\n};\n\n","import React from 'react';\n\n// https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state\nexport function usePrevious<T>(value: T): T {\n const ref = React.useRef<T>(null);\n React.useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n","import React from 'react';\n\nimport { usePrevious } from './usePrevious';\n\nconst HEADER_OFFSET = 80; // Size of header + some extra spacing\n\nexport const useTableOfContentsScroll = (elements: Element[], activeId: string) => {\n const [ hasDoneInitialScroll, setHasDoneInitialScroll ] = React.useState(false);\n\n const previousId = usePrevious(activeId);\n const currentId = activeId;\n\n React.useLayoutEffect(() => {\n if (!hasDoneInitialScroll || previousId !== currentId) {\n const target = elements.find(heading => heading && (heading?.id === currentId));\n\n if (target) {\n const rec = target.getBoundingClientRect();\n\n window.scrollBy({\n top: rec.top - HEADER_OFFSET,\n behavior: 'smooth'\n });\n \n if (!hasDoneInitialScroll)\n setHasDoneInitialScroll(true);\n }\n }\n }, [ elements, previousId, currentId, hasDoneInitialScroll ]);\n};\n","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, LocationContext, SignUpDescriptors, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { ActionButton } from 'libs/shared/components/actions/ActionButton';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { BellFilledSvg } from 'libs/shared/images/svg/objects/BellFilledSvg';\nimport { BellSvg } from 'libs/shared/images/svg/objects/BellSvg';\nimport { Classification } from 'libs/shared/interfaces';\n\nconst namespace = 'subjects.classificationComingSoon';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface ComingSoonProps {\n data: Classification;\n onToggleFollow?: () => void;\n canFollowSubjects: boolean;\n imageUrl: string;\n showFollowButtonSpinner: boolean;\n showSignUp: boolean;\n signUpAppLink: Core.AppLink;\n}\n\nexport function ClassificationComingSoon(props: ComingSoonProps): JSX.Element {\n const isFollowing = !!props.data.followers?.data?.length;\n function onClick(): void {\n props.onToggleFollow?.();\n }\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState className='pt-0'>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('comingSoon')} />\n\n <EmptyState.Heading>\n <Text phrase='comingSoon' />\n </EmptyState.Heading>\n\n <EmptyState.Info>\n <Text phrase={props.showSignUp ? 'infoAnon' : 'info'} />\n </EmptyState.Info>\n\n {props.canFollowSubjects && (\n <ActionButton\n svg={isFollowing ? BellFilledSvg : BellSvg}\n onClick={onClick}\n showSpinner={props.showFollowButtonSpinner}\n className={`btn follow-btn me-2 ${isFollowing ? 'btn-outline-dark' : 'btn-dark'}`}\n >\n <Text phrase={isFollowing ? 'following' : 'follow'} />\n </ActionButton>\n )}\n\n {props.showSignUp && !props.canFollowSubjects && (\n <AppLink\n appLink={props.signUpAppLink}\n className='btn btn-dark d-none d-lg-inline-block'\n analyticsOptions={{\n actionType: UserAction.Click,\n location: LocationContext.ClassificationComingSoon,\n entity: EntityType.AppLink,\n workflowPhase: WorkflowPhase.Start,\n descriptor: SignUpDescriptors.SignUp\n }}\n analyticsData={{}}\n tag='button'\n >\n {getPhrase('signUp')}\n </AppLink>\n )}\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}\n","import React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AudienceFilter } from 'libs/shared/apps/subjects/components/audience-filter/AudienceFilter';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\ninterface ClassificationDashboardAudiencesProps {\n audiences: PresentationAudience[];\n activeAudiences: PresentationAudience[];\n appLink: Core.AppLink;\n disabled: boolean;\n disablePersist: boolean;\n tooltip: string;\n}\n\nexport function ClassificationDashboardAudiences(props: ClassificationDashboardAudiencesProps): JSX.Element {\n return (\n <AudienceFilter\n audiences={props.audiences}\n activeAudiences={props.activeAudiences}\n disabled={props.disabled}\n appLink={props.appLink}\n disablePersist={props.disablePersist}\n tooltip={props.tooltip}\n />\n );\n}\n","import React from 'react';\n\nexport function WidgetSeriesSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n d='M4.5 4a.5.5 0 0 0 0 1h16a.5.5 0 0 1 .5.5v12a.5.5 0 0 0 1 0v-12A1.5 1.5 0 0 0 20.5 4zM9 10.26a.256.256 0 0 1 .39-.218l4.482 2.74a.256.256 0 0 1 0 .437L9.39 15.958A.256.256 0 0 1 9 15.739zM18.5 6A1.5 1.5 0 0 1 20 7.5v11a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 2 18.5v-11A1.5 1.5 0 0 1 3.5 6zm-15 1a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5z'\n fill='currentColor'\n />\n </svg>\n );\n}\n","import React from 'react';\n\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\n\nimport { ClassificationTab } from '../components/classification-dashboard/classification-tabs/ClassificationTabs';\n\ninterface ViewModel {\n tab: ClassificationTab;\n on: boolean;\n}\n\nexport function useDirectoryTabProductTipSwitcher(initialTab?: ClassificationTab) {\n const initialState: ViewModel = {\n on: false,\n tab: initialTab || 'new-releases'\n };\n\n const [ viewModel, setViewModel ] = useViewModel<ViewModel>('directory:product:tip:switcher', initialState);\n\n React.useEffect(() => {\n if (!initialTab)\n return;\n\n setViewModel('tab', initialTab);\n }, [initialTab]);\n\n React.useEffect(() => {\n let interval: number = null;\n\n if (viewModel.on) {\n interval = window.setInterval(() => {\n if (viewModel.tab === 'new-releases' || viewModel.tab === 'all-topics')\n setViewModel('tab', viewModel.tab === 'new-releases' ? 'all-topics' : 'new-releases');\n else\n setViewModel('tab', viewModel.tab === 'curated-topic' ? 'video-list' : 'curated-topic');\n }, 2000);\n }\n\n return () => {\n window.clearInterval(interval);\n };\n }, [ viewModel.on, viewModel.tab ]);\n\n return {\n tab: viewModel.tab,\n isHighlighting: viewModel.on,\n start: () => setViewModel('on', true),\n stop: () => {\n setViewModel({\n on: false,\n tab: initialTab || viewModel.tab\n });\n }\n };\n}\n",":local {\n .curatedTopicTab {\n min-width: 6rem !important;\n }\n \n .tabTransition {\n transition: background-color .5s ease-in-out;\n }\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { PillTab, PillTabSelector } from 'libs/shared/components/pill-tab-selector/PillTabSelector';\nimport { Breakpoints, useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { GridSvg } from 'libs/shared/images/svg/objects/GridSvg';\nimport { RectanglesSvg } from 'libs/shared/images/svg/objects/RectanglesSvg';\nimport { SparkleSvg } from 'libs/shared/images/svg/objects/SparkleSvg';\nimport { WidgetSeriesSvg } from 'libs/shared/images/svg/widgets/WidgetSeriesSvg';\nimport { Classification, Presentation } from 'libs/shared/interfaces';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { useDirectoryTabProductTipSwitcher } from '../../../hooks/useDirectoryTabProductTipSwitcher';\n\nimport styles from './classification-tabs.module.scss';\n\nconst namespace = 'shared.classificationDashboard';\n\nexport type ClassificationTab = 'new-releases' | 'all-topics' | 'curated-topic' | 'curriculum';\n\nfunction getTabs(\n props: ClassificationTabsProps,\n breakpoints: Breakpoints,\n activeTab: ClassificationTab,\n isHighlighting: boolean\n): PillTab[] {\n const showText = breakpoints.lg || breakpoints.xl || breakpoints.xxl || breakpoints.xs;\n\n function getTopicTabClassName(): string {\n let className = isHighlighting ? styles.tabTransition : '';\n\n if (breakpoints.xs)\n return className + ' w-100';\n\n if (showText)\n return className = ` ${styles.curatedTopicTab}`;\n\n return className;\n }\n\n if (TopicsHelper.isTopLevelTopic(props.classification)) {\n return [{\n name: showText ? LanguageService.getPhrase(namespace, 'newReleases') : '',\n appLink: props.appLinks?.classification?.(props.classification),\n active: activeTab === 'new-releases',\n svg: SparkleSvg,\n analyticsData: {\n id: 'new-releases',\n classificationId: props.classification.id,\n classificationName: props.classification.name,\n presentationId: props.presentation.id,\n presentationDescription: props.presentation.description,\n name: LanguageService.getPhrase(namespace, 'newReleases'),\n url: Core.AppLinkHelper.getHref(props.appLinks?.classification?.(props.classification))\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n },\n className: `${breakpoints.xs ? 'w-100' : ''} ${isHighlighting ? styles.tabTransition : ''}`\n }, {\n name: showText ? LanguageService.getPhrase(namespace, 'allTopics') : '',\n appLink: props.appLinks?.classificationDirectory?.(props.classification),\n active: activeTab === 'all-topics',\n svg: GridSvg,\n analyticsData: {\n id: 'all-topics',\n classificationId: props.classification.id,\n classificationName: props.classification.name,\n presentationId: props.presentation.id,\n presentationDescription: props.presentation.description,\n name: LanguageService.getPhrase(namespace, 'allTopics'),\n url: Core.AppLinkHelper.getHref(props.appLinks?.classificationDirectory?.(props.classification))\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n },\n className: `${breakpoints.xs ? 'w-100' : ''} ${isHighlighting ? styles.tabTransition : ''}`\n }];\n }\n\n return [{\n name: showText ? LanguageService.getPhrase(namespace, 'topic') : '',\n appLink: props.appLinks?.classification?.(props.classification),\n active: activeTab === 'curated-topic',\n svg: RectanglesSvg,\n analyticsData: {\n id: 'curated-topic',\n classificationId: props.classification.id,\n classificationName: props.classification.name,\n presentationId: props.presentation.id,\n presentationDescription: props.presentation.description,\n name: LanguageService.getPhrase(namespace, 'topic'),\n url: Core.AppLinkHelper.getHref(props.appLinks?.classification?.(props.classification))\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n },\n className: getTopicTabClassName()\n }, {\n name: showText ? LanguageService.getPhrase(namespace, 'curriculum') : '',\n appLink: props.appLinks?.classificationCurriculum?.(props.classification),\n active: activeTab === 'curriculum',\n svg: WidgetSeriesSvg,\n analyticsData: {\n id: 'curriculum',\n classificationId: props.classification.id,\n classificationName: props.classification.name,\n presentationId: props.presentation.id,\n presentationDescription: props.presentation.description,\n name: LanguageService.getPhrase(namespace, 'curriculum'),\n url: Core.AppLinkHelper.getHref(props.appLinks?.classificationCurriculum?.(props.classification))\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n },\n className: `${breakpoints.xs ? 'w-100' : ''} ${isHighlighting ? styles.tabTransition : ''}`\n }];\n}\n\ninterface ClassificationTabsProps {\n classification: Classification;\n presentation: Presentation;\n appLinks: {\n classification: (classification: Classification | null) => Core.AppLink,\n classificationDirectory: (classification: Classification) => Core.AppLink,\n classificationCurriculum: (classification: Classification) => Core.AppLink\n };\n activeTab: ClassificationTab;\n}\n\nexport function ClassificationTabs(props: ClassificationTabsProps): JSX.Element {\n const breakpoints = useBreakpoints();\n const { tab, isHighlighting } = useDirectoryTabProductTipSwitcher(props.activeTab);\n\n return (\n <PillTabSelector\n borderRadius='sm'\n className={breakpoints.xs ? 'w-100' : ''}\n listClassName='d-flex flex-nowrap'\n tabs={getTabs(props, breakpoints, tab, isHighlighting)}\n />\n );\n}\n","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { Classification, CuratedDashboard, Presentation, PresentationAudience } from 'libs/shared/interfaces';\nimport { AudienceHelper } from 'libs/shared/utils/audience-helper/AudienceHelper';\nimport { CuratedDashboardHelper } from 'libs/shared/utils/DashboardHelper';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { ClassificationDashboardAudiences } from '../audiences/ClassificationDashboardAudiences';\nimport { ClassificationTab, ClassificationTabs } from '../classification-tabs/ClassificationTabs';\n\nfunction shouldHideAudiences(\n audiences: PresentationAudience[],\n activeAudiences: PresentationAudience[],\n activeTab: ClassificationTab,\n isEmpty: boolean,\n isComingSoon: boolean\n): boolean {\n if (isComingSoon)\n return true;\n\n if (isEmpty && !activeAudiences?.length)\n return true;\n\n if (!AudienceHelper.shouldShowAudiences(audiences))\n return true;\n\n if (activeTab === 'curriculum')\n return true;\n\n return false;\n}\n\ninterface ClassificationDashboardNavProps {\n dashboard: CuratedDashboard;\n classification: Classification;\n presentation: Presentation;\n appLinks: {\n audience: () => Core.AppLink,\n classification: (classification: Classification | null) => Core.AppLink,\n classificationDirectory: (classification: Classification) => Core.AppLink,\n classificationCurriculum: (classification: Classification) => Core.AppLink\n };\n activeTab: ClassificationTab;\n audiences: PresentationAudience[];\n activeAudiences: PresentationAudience[];\n getBreadcrumbs: () => Breadcrumb[];\n\n hasTopicDirectoryDashboard: boolean;\n hasTopicCurriculumDashboard: boolean;\n isComingSoon: boolean;\n isEmpty: boolean;\n isViewingCurrentPresentation: boolean;\n disableAudiences: boolean;\n audienceTooltip: string;\n}\n\nexport function ClassificationDashboardNav(props: ClassificationDashboardNavProps): JSX.Element {\n const breakpoints = useBreakpoints();\n\n const hideAudiences = shouldHideAudiences(\n props.audiences,\n props.activeAudiences,\n props.activeTab,\n props.isEmpty,\n props.isComingSoon\n );\n\n function canShowTabs(): boolean {\n if (!props.classification || !props.dashboard)\n return false;\n\n if (CuratedDashboardHelper.isSystemGeneratedDashboard(props.dashboard.widgets))\n return false;\n\n /**\n * For our top-level topics, we can show the topic tab if the topic has a directory dashboard.\n */\n if (TopicsHelper.isTopLevelTopic(props.classification))\n return props.hasTopicDirectoryDashboard;\n\n /**\n * For our curated topics, we can show the curriculum tab if the topic has one, which it should\n */\n if (props.classification.externalMetadata?.isCurated && props.hasTopicCurriculumDashboard)\n return true;\n\n return false;\n }\n\n function getContainerClass(): string {\n let className = 'd-flex flex-column py-3 mb-3';\n\n if (!props.isComingSoon)\n className += ' border-bottom';\n\n if ((canShowTabs() || hideAudiences) && !breakpoints.xs)\n return className;\n\n return className + ' row-gap-3';\n }\n\n function getTopRowClass(): string {\n if (hideAudiences) {\n if (breakpoints.xs)\n return 'd-flex flex-column justify-content-between row-gap-3';\n\n return 'd-flex align-items-center justify-content-between';\n }\n\n let className = '';\n\n className += 'd-flex align-items-center justify-content-between mb-1';\n\n if (breakpoints.xs)\n className += ' row-gap-3 mb-0';\n\n return className;\n }\n\n function getBottomRowClass(): string {\n let className = 'd-flex align-items-end justify-content-between';\n\n if (breakpoints.xs)\n className += ' row-gap-3 flex-wrap';\n\n return className;\n }\n\n return (\n <div className={getContainerClass()}>\n <div className={getTopRowClass()}>\n <Breadcrumbs breadcrumbs={props.getBreadcrumbs?.()} />\n\n {canShowTabs() && hideAudiences && (\n <ClassificationTabs\n classification={props.classification}\n activeTab={props.activeTab}\n appLinks={props.appLinks}\n presentation={props.presentation}\n />\n )}\n </div>\n\n <div className={getBottomRowClass()}>\n {!hideAudiences && (\n <ClassificationDashboardAudiences\n audiences={props.audiences}\n activeAudiences={props.activeAudiences}\n appLink={props.appLinks.audience?.()}\n disabled={props.disableAudiences}\n tooltip={props.audienceTooltip}\n disablePersist={!props.isViewingCurrentPresentation}\n />\n )}\n\n {canShowTabs() && !hideAudiences && (\n <ClassificationTabs\n classification={props.classification}\n activeTab={props.activeTab}\n appLinks={props.appLinks}\n presentation={props.presentation}\n />\n )}\n </div>\n </div>\n );\n}\n","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { AnalyticsOptions, HashObject, LocationContext } from 'libs/analytics/interfaces';\n\nimport { ClassificationHeaderDetails } from 'libs/shared/apps/subjects/components/classification-dashboard/classification-header-details/ClassificationHeaderDetails';\nimport { CuratedClassificationEmptyState } from 'libs/shared/apps/subjects/components/classification-dashboard/empty-state/CuratedClassificationEmptyState';\nimport { TableOfContentsContainer } from 'libs/shared/apps/subjects/components/classification-dashboard/table-of-contents/TableOfContents';\nimport { TeacherOnlyEmptyState } from 'libs/shared/apps/subjects/components/classification-dashboard/teacher-only/TeacherOnlyEmptyState';\nimport { useGetTopicsWidgets } from 'libs/shared/apps/subjects/hooks/useGetTopicsWidgets';\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { BannerHeader } from 'libs/shared/components/banner-header/BannerHeader';\nimport { Breadcrumb } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { DashboardFeedbackData } from 'libs/shared/components/feedback-form/FeedbackForm';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { WidgetHeader } from 'libs/shared/components/widgets/curated-widgets/components/header/WidgetHeader';\nimport { WidgetContainerView } from 'libs/shared/components/widgets/curated-widgets/WidgetContainerView';\nimport { AllClassificationWidgetTemplates } from 'libs/shared/components/widgets/curated-widgets/WidgetProps';\nimport { ClassificationType } from 'libs/shared/enums/ClassificationType';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { LocalPermissionName } from 'libs/shared/enums/PermissionName';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { useMediaQuery } from 'libs/shared/hooks/UseMediaQuery';\nimport { HasLocalPermissionsFunc, HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { useTableOfContentsActiveHeading } from 'libs/shared/hooks/useTableOfContentsActiveHeading';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { CalendarEvent, CalendarEventContentType, Classification, CuratedDashboard, CuratedWidget, CuratedWidgetQueryParams, CurriculumData, DashboardStatus, DashboardTargetType, InteractiveMetadata, Presentation, PresentationAudience } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { CuratedDashboardHelper } from 'libs/shared/utils/DashboardHelper';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { ClassificationComingSoon } from './classification-coming-soon/ClassificationComingSoon';\nimport { ClassificationDashboardNav } from './classification-dashboard-nav/ClassificationDashboardNav';\nimport { ClassificationTab } from './classification-tabs/ClassificationTabs';\n\nconst namespace = 'shared.classificationDashboard';\n\nfunction isHeadingWidget(widget: CuratedWidget) {\n return widget.widgetId === WidgetTypeId.Blurb && widget.templateId === WidgetTemplate.Heading;\n}\n\nfunction isTopicWidget(widget: CuratedWidget) {\n return widget.widgetId === WidgetTypeId.CuratedClassifications || widget.widgetId === WidgetTypeId.Classifications;\n}\n\nexport interface ClassificationDashboardProps {\n dashboard: CuratedDashboard;\n classification: Classification;\n presentation: Presentation;\n hasPermissions: HasPermissionsFunc;\n hasLocalPermissions: HasLocalPermissionsFunc;\n resourceThumbnailFallbackImageUrl: string;\n hasTopicDirectoryDashboard: boolean;\n hasTopicCurriculumDashboard: boolean;\n isTertiaryCustomerWithoutExchange: boolean;\n tab: ClassificationTab;\n specialEvent?: CalendarEvent;\n curriculums: CurriculumData;\n\n audiences: PresentationAudience[];\n activeAudiences?: PresentationAudience[];\n\n getWidgetContentRequest: (\n id: string,\n params: CuratedWidgetQueryParams,\n widgetTemplate: WidgetTemplate\n ) => Flight.Request;\n\n getBannerActions?: () => ActionOptions[];\n getBreadcrumbs?: () => Breadcrumb[];\n onToggleFollow?: (classification: Classification, locationContext: LocationContext) => void;\n canFollowSubjects: boolean;\n onSubmitFeedback?: (feedback: DashboardFeedbackData) => Promise<void>;\n\n appLinks?: AllClassificationWidgetTemplates['appLinks'] & {\n signUp: () => Core.AppLink,\n widgetWizard: () => Core.AppLink,\n previewQuestions: (interactive: InteractiveMetadata) => Core.AppLink,\n classificationCurriculum: (classification: Classification) => Core.AppLink,\n audience: () => Core.AppLink\n };\n\n imageCdnUrl: string;\n emptyImageUrl: string;\n comingSoonImageUrl?: string;\n\n analyticsOptions?: AnalyticsOptions;\n analyticsData?: HashObject;\n\n scrollToWidgetId?: string;\n tableOfContentsId?: string;\n\n // Means the dashboard contains no linked or working filters\n isReadonly?: boolean;\n\n // Means the dashboard is being previewed by ClickView staff either in product or in curator\n isPreviewing?: boolean;\n\n // Means the parent topic for the dashboard has a status of \"Coming Soon\"\n isComingSoon?: boolean;\n\n showFollowButtonSpinner?: boolean;\n \n isViewCurrentPresentation?: boolean;\n\n // By default widgets will always be lazyloaded. We override this behaviour only in extenuating \n // circumstances, such as dynamic rendering for SEO.\n lazyLoad?: boolean;\n\n moviesAndTv?: boolean;\n\n isTeacherOnly?: boolean;\n \n contentType?: CalendarEventContentType;\n\n isBot?: boolean;\n\n settings?: AllClassificationWidgetTemplates['settings'];\n\n commonVideoProps: CommonVideoProps;\n}\n\nClassificationDashboard.defaultProps = {\n appLinks: {}\n};\n\nexport function ClassificationDashboard(props: ClassificationDashboardProps): JSX.Element {\n const { widgets, videoList, videoListWidgetId } = useGetTopicsWidgets(props.dashboard, props.activeAudiences);\n\n const isSmallScreen = useMediaQuery(MediaQueryStrings.LGDown);\n const headingRef = React.useRef<Set<Element>>(new Set());\n\n const initialEmptyWidgets = React.useMemo(() => {\n return widgets.reduce((acc: HashObject<boolean>, widget) => {\n acc[widget.id] = false;\n return acc;\n }, {});\n }, [widgets?.length]);\n\n const [ emptyWidgets, setEmptyWidgets ] = React.useState(initialEmptyWidgets);\n\n const [ controlledId, setControlledId ] = React.useState(props.tableOfContentsId);\n\n const [ tableOfContentActiveId, setTableOfContentActiveId ] = React.useState<string>('');\n\n const headingElements = Array.from(headingRef.current);\n useTableOfContentsScroll(headingElements, controlledId);\n useTableOfContentsActiveHeading({\n setActiveId: setTableOfContentActiveId,\n headingElements,\n controlledId,\n setControlledId\n });\n\n const isHubDashboard = props.classification.type === ClassificationType.Hub;\n\n function shouldShowEmptyState(): boolean {\n if (props.isComingSoon)\n return false;\n\n if (props.isTeacherOnly)\n return false;\n\n if (!props.dashboard)\n return true;\n\n if (props.dashboard.status === DashboardStatus.Archived && !props.isReadonly)\n return true;\n\n if (props.dashboard.status === DashboardStatus.Draft && !props.isPreviewing)\n return true;\n\n if (!widgets?.length)\n return true;\n\n if (videoList && videoList.length)\n return false;\n\n return Object.values(emptyWidgets).every(state => !!state);\n }\n\n function getWidgetContentRequest(id: string, widgetTypeId: WidgetTypeId, template: WidgetTemplate): Flight.Request {\n const params = CuratedDashboardHelper.getWidgetParams(\n widgetTypeId,\n template,\n CuratedDashboardHelper.getDashboardTargetType(props.dashboard),\n props.activeAudiences?.map(a => a.masterId),\n props.curriculums.preferredCurriculum?.id\n );\n\n return props.getWidgetContentRequest(id, params, template);\n }\n\n const showEmptyState = shouldShowEmptyState();\n\n React.useEffect(() => {\n /**\n * When we add the first widget of the dashboard, the showEmptyState is `true`, the WidgetContainer is not going to be rendered to lazyload the `content`\n * so we set the emptyWidget to initial make sure the widget container is rendered to lazyload `widget.content`\n * and let the WidgetContainer to re-set the empty state based on the actual `widget.content` from backend\n */\n if (showEmptyState) {\n setEmptyWidgets(initialEmptyWidgets);\n }\n }, [widgets?.length]);\n\n const onSetIsEmpty = React.useCallback((widgetId: string, isEmpty: boolean) => {\n if (emptyWidgets[widgetId] === isEmpty)\n return;\n\n const newEmptyState = {\n ...emptyWidgets,\n [widgetId]: isEmpty\n };\n\n // The logic beneath this if-block doesn't apply to classification directories. This is because\n // classification directories don't support audience filtering, so widgets should never be empty,\n // meaning headings should never be hidden.\n if (CuratedDashboardHelper.isType(props.dashboard, DashboardTargetType.ClassificationDirectory)) {\n setEmptyWidgets(newEmptyState);\n return;\n }\n\n let index = 0;\n\n /**\n * Every time a widget is identified as empty, we check each heading blurb widget\n * to see if it should be hidden. This will be the case when all widgets beneath a heading\n * (up until the next heading) are empty.\n */\n while (index < widgets.length) {\n const currentWidget = widgets[index];\n\n if (!isHeadingWidget(currentWidget)) {\n index++;\n continue;\n }\n\n let isHeadingEmpty = true;\n let subWidgetIndex = index + 1;\n\n while (isHeadingEmpty && subWidgetIndex < widgets.length) {\n const headingSubWidget = widgets[subWidgetIndex];\n\n if (isHeadingWidget(headingSubWidget))\n break;\n\n if (!newEmptyState[headingSubWidget.id] && !isTopicWidget(headingSubWidget))\n isHeadingEmpty = false;\n\n subWidgetIndex++;\n }\n\n index = subWidgetIndex;\n\n newEmptyState[currentWidget.id] = isHeadingEmpty;\n }\n\n setEmptyWidgets(newEmptyState);\n }, [ emptyWidgets, widgets ]);\n\n function hideWidget(widget: CuratedWidget): boolean {\n return isHeadingWidget(widget) && emptyWidgets[widget.id];\n }\n\n function useLargeDashboardSpacing(): boolean {\n const target = CuratedDashboardHelper.getDashboardTargetType(props.dashboard);\n\n if (props.moviesAndTv || target === DashboardTargetType.ClassificationCurriculum)\n return false;\n\n return true;\n }\n\n function getWidgetHeading(widget: CuratedWidget, index: number): string {\n if (widget.widgetId === WidgetTypeId.ClassificationDashboardExternalMedia) {\n const previousWidget = widgets[index - 1];\n\n if (emptyWidgets[previousWidget.id])\n return widget.name.replace('Other videos', 'Videos');\n\n return widget.name;\n }\n\n return widget.name;\n }\n\n const widgetsInTableOfContents = widgets.filter(w => {\n return !hideWidget(w) && !!w.metadata?.showInTableOfContents;\n });\n\n const isTopicOnlyDashboard = widgets.every(isTopicWidget);\n\n const shouldShowTableOfContents = widgetsInTableOfContents.length >= 2;\n const shouldShowSideTableOfContents = shouldShowTableOfContents && !isSmallScreen && !isHubDashboard;\n\n const shouldShowTopicCounts = (\n props.settings?.hasTopicDirectories &&\n TopicsHelper.isTopLevelTopic(props.classification) &&\n !props.isTertiaryCustomerWithoutExchange\n );\n\n /**\n * We don't put the .topic-dashboard class when we're in a movies and tv classification\n * because we don't want the extra padding between widgets.\n */\n return (\n <div className={`bg-white px-4 ${useLargeDashboardSpacing() ? 'dashboard-spacing-lg' : ''}`}>\n {isHubDashboard && (\n <>\n <h1 className='h2 mb-4'>{props.classification.name}</h1>\n <hr className='mt-2'/>\n </>\n )}\n\n {!isHubDashboard && (\n <BannerHeader\n heading={props.classification.name}\n banner={props.classification.banner}\n imageCdnUrl={props.imageCdnUrl}\n actions={props.getBannerActions?.()}\n actionsDropdownClassName='btn btn-outline-dark'\n specialEvent={props.specialEvent}\n calendarTheme={{\n background: 'bg-light-blue',\n border: 'border-light-blue'\n }}\n showComingSoon={props.isComingSoon}\n detailsComponent={shouldShowTopicCounts ?\n () => <ClassificationHeaderDetails classification={props.classification} /> :\n null\n }\n />\n )}\n\n {!isHubDashboard && (\n <ClassificationDashboardNav\n dashboard={props.dashboard}\n classification={props.classification}\n presentation={props.presentation}\n appLinks={props.appLinks}\n activeTab={props.tab}\n audiences={props.audiences}\n activeAudiences={props.activeAudiences}\n getBreadcrumbs={props.getBreadcrumbs}\n hasTopicDirectoryDashboard={props.hasTopicDirectoryDashboard}\n hasTopicCurriculumDashboard={props.hasTopicCurriculumDashboard}\n isComingSoon={props.isComingSoon}\n isEmpty={showEmptyState}\n isViewingCurrentPresentation={props.isViewCurrentPresentation}\n disableAudiences={isTopicOnlyDashboard || props.isReadonly}\n audienceTooltip={isTopicOnlyDashboard ? LanguageService.getPhrase(namespace, 'audienceTooltip') : ''}\n />\n )}\n\n {props.isComingSoon && (\n <ClassificationComingSoon\n imageUrl={props.comingSoonImageUrl}\n data={props.classification}\n canFollowSubjects={props.canFollowSubjects}\n showFollowButtonSpinner={props.showFollowButtonSpinner}\n onToggleFollow={() => props.onToggleFollow(props.classification, LocationContext.ClassificationComingSoon)}\n showSignUp={!props.hasLocalPermissions(LocalPermissionName.FollowComingSoonTopics)}\n signUpAppLink={props.appLinks.signUp?.()}\n />\n )}\n\n {!props.isComingSoon && (\n <div className={`${shouldShowSideTableOfContents ? 'row no-wrap' : ''}`}>\n {shouldShowTableOfContents && (\n <TableOfContentsContainer\n widgets={widgetsInTableOfContents}\n title={props.classification.name}\n activeId={tableOfContentActiveId}\n clickable={!props.isReadonly}\n analyticsData={props.analyticsData}\n setControlledId={setControlledId}\n isSmallScreen={isSmallScreen}\n />\n )}\n\n <div className={shouldShowSideTableOfContents ? 'col-9 order-0' : ''}>\n {widgets.map((widget, idx) => {\n if (hideWidget(widget))\n return <React.Fragment key={widget.id}></React.Fragment>;\n\n return (\n <WidgetContainerView\n widgetCollection={DashboardTargetType.Classification}\n headingElementRef={headingRef}\n key={widget.id}\n id={widget.id}\n name={getWidgetHeading(widget, idx)}\n description={widget.description}\n classification={props.classification}\n templateId={widget.templateId}\n widgetTypeId={widget.widgetId}\n audiences={props.audiences}\n getContentRequest={getWidgetContentRequest}\n setIsEmpty={onSetIsEmpty}\n appLinks={props.appLinks}\n presentation={props.presentation}\n analyticsData={props.analyticsData}\n isScrollToTargetWidget={props.scrollToWidgetId === widget.id}\n imageCdnUrl={props.imageCdnUrl}\n onSubmitFeedback={props.onSubmitFeedback}\n metadata={widget.metadata}\n isBot={props.isBot}\n hasTableOfContents={shouldShowSideTableOfContents}\n lazyLoad={props.lazyLoad}\n dashboardTarget={CuratedDashboardHelper.getDashboardTargetType(props.dashboard)}\n widgetIndex={idx}\n hasPermissions={props.hasPermissions}\n hasLocalPermissions={props.hasLocalPermissions}\n isPreviewing={props.isReadonly}\n contentType={props.contentType}\n resourceThumbnailFallbackImageUrl={props.resourceThumbnailFallbackImageUrl}\n onToggleFollowClassification={props.onToggleFollow}\n settings={props.settings}\n isEditing={props.isReadonly}\n isTertiaryCustomerWithoutExchange={props.isTertiaryCustomerWithoutExchange}\n commonVideoProps={props.commonVideoProps}\n curriculums={props.curriculums}\n\n // TODO: Do we actually need this shit if it wasn't even being passed in?\n limitTotalItems={false}\n seeMoreLink={null}\n onClickRemoveItem={null}\n badgeComponent={null}\n />\n );\n })}\n </div>\n\n {!!videoList?.length && (\n <>\n <WidgetHeader name={LanguageService.getPhrase(namespace, 'videos')} />\n <VideoList\n videos={videoList}\n getVideoAppLink={(video, opts) => props.appLinks.videoType(\n video,\n { ...opts, contextId: videoListWidgetId, includeContext: opts.includeContext }\n )}\n hasPermissions={props.hasPermissions}\n presentationAudiences={props.audiences}\n getPreviewQuestionsAppLink={props.appLinks.previewQuestions}\n commonVideoProps={props.commonVideoProps}\n />\n </>\n )}\n </div>\n )}\n\n {showEmptyState && (\n <CuratedClassificationEmptyState\n dashboard={props.dashboard}\n isReadonly={props.isReadonly}\n imageUrl={props.emptyImageUrl}\n addWidgetApplink={props.appLinks.widgetWizard}\n />\n )}\n\n {props.isTeacherOnly && (\n <TeacherOnlyEmptyState\n imageUrl={props.emptyImageUrl}\n ctaAppLink={() => props.appLinks.allTopics(props.classification.presentationId)}\n />\n )}\n </div>\n );\n}\n","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { ErrorCta, ErrorPageError } from 'libs/shared/errors/primitives/ErrorPageError';\n\nimport { Actions } from 'shared/constants/StreamableActions';\nimport { AppChannels } from 'shared/constants/StreamableRadioChannels';\n\nconst namespace = 'subjects.topicNotFoundError';\n\nexport class TopicNotFoundError extends ErrorPageError {\n constructor() {\n super('Topic doesn\\'t exist');\n }\n\n // @ts-ignore\n public get name(): string {\n return 'TopicNotFoundError';\n }\n\n // @ts-ignore\n public get heading(): string {\n return LanguageService.getPhrase(namespace, 'heading');\n }\n\n // @ts-ignore\n public get description(): string {\n return LanguageService.getPhrase(namespace, 'description');\n }\n\n // @ts-ignore\n public get cta(): ErrorCta {\n return {\n text: LanguageService.getPhrase(namespace, 'cta'),\n appLink: {\n application: AppChannels.SUBJECTS,\n action: Actions.Subjects.CLASSIFICATION_ALL\n }\n };\n }\n}\n","import React from 'react';\n\nimport { PartialAudienceFilter } from 'libs/shared/apps/subjects/components/audience-filter/AudienceFilter';\nimport { PartialBannerHeader } from 'libs/shared/components/banner-header/BannerHeader';\nimport { PartialBreadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\n\nexport function PartialClassification(): JSX.Element {\n return (\n <div className='bg-white px-4'>\n <PartialBannerHeader />\n\n <div className='d-flex flex-column row-gap-3 py-3 mb-3 border-bottom'>\n <PartialBreadcrumbs />\n <PartialAudienceFilter />\n </div>\n </div>\n );\n}\n","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { ClassificationDashboardProps } from 'libs/shared/apps/subjects/components/classification-dashboard/ClassificationDashboard';\nimport { Breadcrumb } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { Classification } from 'libs/shared/interfaces';\n\nimport { Actions } from 'shared/constants/StreamableActions';\nimport { AppChannels } from 'shared/constants/StreamableRadioChannels';\nimport { StreamableAppLinks } from 'shared/utils/StreamableAppLinks';\n\nconst namespace = 'subjects.classificationView';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport function getClassificationAppLinks(\n classification: Classification,\n params: HashObject\n): ClassificationDashboardProps['appLinks'] {\n return {\n ...StreamableAppLinks,\n classification: c => StreamableAppLinks.classification(c || classification, params),\n classificationDirectory: () => StreamableAppLinks.classificationDirectory(params),\n audience: () => StreamableAppLinks.classification(classification, params),\n\n // TODO: Find a nice way around having to pass these in\n previewQuestions: () => null,\n series: () => null,\n latestReleases: () => null,\n classificationLatestReleases: () => null,\n playlist: () => null,\n signUp: () => null,\n widgetWizard: () => null,\n classificationCurriculum: () => null,\n searchSettings: () => null,\n searchHome: () => null,\n search: () => null,\n editCurriculum: () => null,\n getPreviewQuestionsAppLink: () => null\n };\n}\n\ninterface GetClassificationBreadcrumbsOptions {\n classification: Classification;\n path: Classification[];\n appLinks: ClassificationDashboardProps['appLinks'];\n}\n\nexport function getClassificationBreadcrumbs(\n options: GetClassificationBreadcrumbsOptions\n): Breadcrumb[] {\n const { classification, path, appLinks } = options;\n\n const breadcrumbs: Breadcrumb[] = [{\n name: getPhrase('discover'),\n appLink: {\n application: AppChannels.DASHBOARD,\n action: Actions.Dashboard.HOME\n }\n }, {\n name: getPhrase('exploreAllTopicsHeading'),\n appLink: {\n application: AppChannels.SUBJECTS,\n action: Actions.Subjects.CLASSIFICATION_ALL\n }\n }];\n\n path.forEach(item => {\n breadcrumbs.push({\n name: item.name,\n appLink: appLinks.classification(item),\n active: item.name === classification.name\n });\n });\n\n return breadcrumbs;\n}\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { ClassificationDashboard } from 'libs/shared/apps/subjects/components/classification-dashboard/ClassificationDashboard';\nimport { PreviewBanner } from 'libs/shared/apps/subjects/components/preview-banner/PreviewBanner';\nimport { Breadcrumb } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { PresentationType } from 'libs/shared/enums/PresentationType';\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { DashboardRequests } from 'libs/shared/flight-requests/DashboardRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { AudienceFilterParams, CalendarEventContentType, Classification, Config, CurrentUser, DashboardTargetType, Presentation, PresentationAudience } from 'libs/shared/interfaces';\nimport { AudienceHelper } from 'libs/shared/utils/audience-helper/AudienceHelper';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { StreamableConstants } from 'shared/constants/StreamableConstants';\nimport { PresentationRequests } from 'shared/flight-requests/PresentationRequests';\nimport { useCommonVideoProps } from 'shared/hooks/useCommonVideoProps';\nimport { useFetchDashboard } from 'shared/hooks/useFetchDashboard';\nimport { useStreamableVideoActions } from 'shared/hooks/useStreamableVideoActions';\nimport { SeoHelper } from 'shared/utils/StreamableSeoHelper';\n\nimport { TopicNotFoundError } from 'apps/subjects/errors/TopicNotFoundError';\nimport { useCurriculums } from 'apps/videos/hooks/useCurriculums';\n\nimport { PartialClassification } from './partial-loading/PartialClassification';\nimport { getClassificationAppLinks, getClassificationBreadcrumbs } from './StreamableClassificationViewUtils';\n\nconst namespace = 'subjects.classificationView';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport interface StreamableClassificationViewQueryParams extends AudienceFilterParams {\n dashboardId?: string;\n tocId?: string;\n}\n\nexport function sanitizeStreamableClassificationParams(\n queryParams: StreamableClassificationViewQueryParams\n): StreamableClassificationViewQueryParams {\n if (!queryParams)\n return {};\n\n return ObjectHelper.pick(queryParams, [ 'a', 'dashboardId', 'tocId' ]);\n}\n\ninterface StreamableClassificationViewProps {\n id: string;\n queryParams: StreamableClassificationViewQueryParams;\n}\n\nexport function StreamableClassificationView(props: StreamableClassificationViewProps): JSX.Element {\n const getVideoActions = useStreamableVideoActions('video-list');\n\n const { commonVideoProps } = useCommonVideoProps();\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const curriculumData = useCurriculums();\n\n const presentation = Flight.useBasicFetch<Presentation>(\n PresentationRequests.streamablePresentation()\n );\n\n const classification = Flight.useBasicFetch<Classification>(\n ClassificationRequests.classification(props.id, currentUser.data?.id)\n );\n\n const { dashboard, isPreviewing } = useFetchDashboard({\n targetType: DashboardTargetType.Classification,\n dashboardId: props.queryParams?.dashboardId,\n classificationId: props.id\n });\n\n const appLinks = getClassificationAppLinks(classification.data, props.queryParams);\n\n useSetPageMetadata(PageMetadataHelper.getClassificationMetadata({\n content: { classification: classification.data },\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n canonicalLink: SeoHelper.getCanonicalLink({\n customAppLink: appLinks.classification(classification.data)\n }),\n allowIndexing: true,\n product: StreamableConstants.PRODUCT_NAME\n }));\n\n useHandleObjectError(classification, {\n notFound: TopicNotFoundError\n });\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(presentation.data &&\n AudienceRequests.presentationAudiences(PresentationType.StreamableLearning, presentation.data.id));\n\n const path = Flight.useBasicFetch<Classification[]>(\n ClassificationRequests.path(props.id, PresentationType.StreamableLearning)\n );\n\n /**\n * We use the current active audiences to re-fetch content for that specific audience set.\n */\n const activeAudiences = React.useMemo(\n () => AudienceHelper.getActiveAudiencesFromParams(audiences.data, props.queryParams),\n [ audiences.data, props.queryParams ]\n );\n const activeAudienceIds = activeAudiences?.map(a => a.masterId) ?? [];\n\n /**\n * Additional topics data to be mixed in with lower-level component analytics collection\n */\n const analyticsData = {\n presentationId: presentation.data?.id,\n presentationName: presentation.data?.name,\n currentClassificationId: classification.data?.id,\n currentClassificationName: classification.data?.name,\n followingCurrentClassification: !!classification.data?.followers?.data?.length,\n activeAudienceNames: activeAudiences?.length ? activeAudiences.map(a => a.name) : null,\n activeAudienceIds: activeAudienceIds.length ? activeAudienceIds : null\n };\n\n function getBreadcrumbs(): () => Breadcrumb[] {\n return () => getClassificationBreadcrumbs({\n appLinks: appLinks,\n classification: classification.data,\n path: path.data\n });\n }\n\n const dataLoaded = !!config.data\n && dashboard.hasCompleted\n && !!classification.data\n && !!presentation.data\n && !!path.data\n && !!audiences.data;\n\n if (!dataLoaded)\n return <PartialClassification />;\n\n return (\n <VideoActionsContext.Provider value={{ getVideoActions }}>\n <div className='position-relative'>\n {!!(isPreviewing && dashboard.data) && <PreviewBanner status={dashboard.data.status} type='topic' />}\n <ClassificationDashboard\n dashboard={dashboard.data}\n classification={classification.data}\n getWidgetContentRequest={DashboardRequests.dashboardWidgetContent}\n getBreadcrumbs={getBreadcrumbs()}\n hasPermissions={() => false}\n hasLocalPermissions={() => false}\n presentation={presentation.data}\n getBannerActions={() => []}\n audiences={audiences.data}\n activeAudiences={activeAudiences}\n analyticsData={analyticsData}\n imageCdnUrl={config.data.imageCdnUrl}\n resourceThumbnailFallbackImageUrl={ImageUrls.Fallbacks.RESOURCE_THUMBNAIL}\n emptyImageUrl={ImageUrls.EmptyStates.Topics.TOPIC}\n appLinks={appLinks}\n isPreviewing={isPreviewing}\n isViewCurrentPresentation\n canFollowSubjects={false}\n tableOfContentsId={props.queryParams.tocId}\n lazyLoad={!SeoHelper.isBot()}\n isTeacherOnly={false}\n contentType={CalendarEventContentType.Livestream}\n hasTopicDirectoryDashboard={false}\n hasTopicCurriculumDashboard={false}\n isTertiaryCustomerWithoutExchange={false}\n tab='curated-topic'\n curriculums={curriculumData}\n // just... one... more.. prop....\n commonVideoProps={common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YAAY,MACrC,SAAU,CAAC,EAAU,OAAO,CAC5B,cAAe,GACf,YAAa,GAAyB,WACtC,2BAA4B,GAC5B,4BAA6B,GAC7B,kCAAmC,GACnC,IAAI,gBACJ,YAAa,EAEK,mBAClB,CAAA,CACE,GACuB,CAAA,EAtCxB,EAAA,EAAA,KAAC,GAAD,EAAyB,CAAA"}
|
|
1
|
+
{"version":3,"file":"qcrBN1zR2.chunk.js","names":[],"sources":["../../../../libs/shared/src/apps/subjects/components/classification-dashboard/classification-header-details/ClassificationHeaderDetails.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/empty-state/CuratedClassificationEmptyState.tsx","../../../../libs/shared/src/components/table-of-contents-list/table-of-contents-list.module.scss","../../../../libs/shared/src/components/table-of-contents-list/TableOfContentsList.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/table-of-contents/table-of-contents.module.scss","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/table-of-contents/TableOfContents.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/teacher-only/TeacherOnlyEmptyState.tsx","../../../../libs/shared/src/apps/subjects/hooks/useGetTopicsWidgets.ts","../../../../libs/shared/src/hooks/useTableOfContentsActiveHeading.tsx","../../../../libs/shared/src/hooks/usePrevious.ts","../../../../libs/shared/src/hooks/useTableOfContentsScroll.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/classification-coming-soon/ClassificationComingSoon.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/audiences/ClassificationDashboardAudiences.tsx","../../../../libs/shared/src/images/svg/widgets/WidgetSeriesSvg.tsx","../../../../libs/shared/src/apps/subjects/hooks/useDirectoryTabProductTipSwitcher.ts","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/classification-tabs/classification-tabs.module.scss","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/classification-tabs/ClassificationTabs.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/classification-dashboard-nav/ClassificationDashboardNav.tsx","../../../../libs/shared/src/apps/subjects/components/classification-dashboard/ClassificationDashboard.tsx","../../src/apps/subjects/errors/TopicNotFoundError.ts","../../src/apps/subjects/views/classification/partial-loading/PartialClassification.tsx","../../src/apps/subjects/views/classification/StreamableClassificationViewUtils.ts","../../src/apps/subjects/views/classification/StreamableClassificationView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { Classification } from 'libs/shared/interfaces';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nconst namespace = 'subject.classificationHeaderDetails';\n\nconst Separator = ({ className }: { className: string }) =>\n <span className={className}>•</span>;\n\ninterface ClassificationHeaderDetailsProps {\n classification: Classification;\n}\n\nexport function ClassificationHeaderDetails(props: ClassificationHeaderDetailsProps): React.ReactElement {\n const {\n dashboardVideoCount,\n childDashboardVideoCount,\n dashboardResourceCount,\n childDashboardResourceCount,\n childClassificationCount\n } = TopicsHelper.getCounts(props.classification);\n\n const videoCount = dashboardVideoCount + childDashboardVideoCount;\n const resourceCount = dashboardResourceCount + childDashboardResourceCount;\n\n return (\n <p className='mb-n1 font-size-normal fw-normal mt-1'>\n {!!childClassificationCount && (\n <Text\n namespace={namespace}\n phrase='topics'\n options={{ count: childClassificationCount.toLocaleString(), smartCount: childClassificationCount }}\n />\n )}\n\n {!!videoCount && (\n <>\n {childClassificationCount > 0 && <Separator className='mx-2' />}\n <Text\n namespace={namespace}\n phrase='videos'\n options={{ count: videoCount.toLocaleString(), smartCount: videoCount }}\n />\n </>\n )}\n {!!resourceCount && (\n <>\n <Separator className='mx-2' />\n <Text\n namespace={namespace}\n phrase='resources'\n options={{ count: resourceCount.toLocaleString(), smartCount: resourceCount }}\n />\n </>\n )}\n </p>\n );\n}\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { Tooltip } from 'libs/shared/components/tooltip/Tooltip';\nimport { PlusSvg } from 'libs/shared/images/svg/actions/PlusSvg';\nimport { CuratedDashboard, DashboardStatus } from 'libs/shared/interfaces';\n\nconst namespace = 'subjects.curatedClassificationEmptyState';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CuratedClassificationEmptyStateProps {\n dashboard: CuratedDashboard;\n imageUrl: string;\n isReadonly: boolean;\n addWidgetApplink?: () => Core.AppLink;\n}\n\nexport function CuratedClassificationEmptyState(props: CuratedClassificationEmptyStateProps): JSX.Element {\n const isArchived = props.dashboard?.status === DashboardStatus.Archived;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('headingForNP')} />\n {!props.isReadonly ? (\n <EmptyState.Heading>\n <Text phrase='headingForNP' />\n </EmptyState.Heading>\n ) : (\n <>\n <EmptyState.Heading>\n <Text namespace={namespace} phrase='headingForCurator' />\n </EmptyState.Heading>\n <EmptyState.Info>\n <Text namespace={namespace} phrase='info' />\n </EmptyState.Info>\n <Tooltip title={isArchived ? LanguageService.getPhrase(namespace, 'archivedCtaTooltip') : ''} spanHack>\n <EmptyState.Cta\n text={LanguageService.getPhrase(namespace, 'add')}\n appLink={props.addWidgetApplink?.()}\n className='btn btn-dark'\n icon={PlusSvg}\n disabled={isArchived}\n />\n </Tooltip>\n </>\n )}\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}\n",":local{\n $dot-size: 0.75rem;\n $track-offset: -1rem;\n\n @mixin dot {\n &::before {\n position: absolute;\n left: -1.06rem;\n top: calc(50% - $dot-size/2);\n display: block;\n content: '';\n height: $dot-size;\n width: $dot-size;\n border-radius: 50%;\n background-color: $black;\n }\n }\n\n @mixin tocIndent($depth) {\n margin-left: map-get($spacers, 3) * $depth;\n }\n \n .itemsWrapper {\n border-left: 2px solid $black;\n padding-left: 0.625rem;\n }\n\n .anchorWrapper {\n padding: 0.625rem;\n text-decoration: none;\n position: relative;\n display: block;\n }\n .anchorWrapper:hover {\n background-color: $light-blue;\n text-decoration: none;\n cursor: pointer;\n }\n\n .anchorWrapper:first-child {\n &::after {\n display: block;\n content: '';\n background-color: $white;\n height: calc(50% - $dot-size/2 + 0.05rem);\n width: 0.625rem;\n top: -0.05rem;\n position: absolute;\n left: $track-offset;\n }\n }\n .anchorWrapper:last-child {\n &::after {\n display: block;\n content: '';\n background-color: $white;\n height: calc(50% - $dot-size/2);\n width: 0.625rem;\n position: absolute;\n bottom: 0;\n left: $track-offset;\n }\n }\n\n .default {\n @include dot\n }\n\n .selectedItem {\n background-color: $gray-100;\n font-weight: 500;\n @include dot\n }\n \n .disabled:hover {\n cursor: default;\n background-color: $white;\n }\n .disabled{\n pointer-events:none\n }\n\n .floatIcon {\n position: absolute;\n right: 0;\n width: fit-content;\n padding: 0;\n .arrowIcon {\n display: none;\n }\n .listIcon {\n display: block;\n }\n &:hover {\n .listIcon {\n display: none;\n }\n .arrowIcon {\n display: block;\n }\n }\n }\n\n .tocIndent1 {\n @include tocIndent(1);\n }\n\n .tocIndent2 {\n @include tocIndent(2);\n }\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { ScrollHelper } from 'libs/common/backbone/utils/ScrollHelper';\n\nimport { EntityType, HashObject, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\n\nimport styles from './table-of-contents-list.module.scss';\n\nexport interface TableOfContentsItem<T=string> {\n name: string;\n id: T;\n tocIndentation?: number;\n}\n\ninterface TableOfContentsProps<T> {\n items: TableOfContentsItem<T>[];\n activeId: string;\n appLink?: Core.AppLink;\n analyticsData?: HashObject;\n setControlledId: (arg: string) => void;\n // set to true if the TOC is controlled by a local state rather than query params\n localState?: boolean;\n getAppLink?: (args: TableOfContentsItem<T>) => Core.AppLink;\n onItemClick?: (args: TableOfContentsItem<T>) => void;\n}\n\nexport function TableOfContentsList<T extends string>(props: TableOfContentsProps<T>): JSX.Element {\n const analyticsOptions = {\n actionType: UserAction.Click,\n entity: EntityType.Widget,\n location: LocationContext.TableOfContents\n };\n\n function onItemSelect(item: TableOfContentsItem<T>) {\n ScrollHelper.preventScrollTop();\n props.setControlledId(item.id);\n \n props.onItemClick?.(item);\n \n setTimeout(() => document.getElementById(item.id)?.focus());\n }\n\n function getTocIndentClass(item: TableOfContentsItem<T>): string {\n if (item.tocIndentation === 1)\n return styles.tocIndent1;\n \n if (item.tocIndentation === 2)\n return styles.tocIndent2;\n\n return '';\n }\n\n return (\n <div className={`${styles.itemsWrapper}`}>\n {props.items.map((item, idx) => {\n if (props.localState) {\n return (\n <DivButton\n key={item.id}\n className={`${styles.anchorWrapper} ${props.activeId === item.id ? styles.selectedItem : ''}`}\n onClick={() => {\n onItemSelect(item);\n }}\n >\n <div className={`${!props.activeId && idx === 0 ? styles.default : ''} `}>\n {item.name}\n </div>\n </DivButton>\n );\n }\n\n return (\n <AppLink\n key={item.id}\n appLink={props.getAppLink(item)}\n appLinkOptions={{ replace: true }}\n className={`${styles.anchorWrapper} ${props.activeId === item.id ? styles.selectedItem : ''}`}\n onClick={() => {\n onItemSelect(item);\n }}\n analyticsData={{\n ...props.analyticsData,\n id: item.id,\n name: item.name\n }}\n analyticsOptions={analyticsOptions}\n >\n <div className={`${!props.activeId && idx === 0 ? styles.default : ''} ${getTocIndentClass(item)}`}>\n {item.name}\n </div>\n </AppLink>\n );\n })}\n </div>\n );\n}\n","$top-nav-height: 4.1875rem;\n$cv-banner-height: calc(100vw * 22 / 120);\n$filters-area: 7.87rem;\n\n.container {\n position: sticky;\n top: 6.25rem;\n z-index: 80;\n}\n\n.mobile {\n position: fixed;\n top: calc($top-nav-height + $cv-banner-height + $filters-area);\n z-index: 80;\n right: 0;\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, HashObject, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { IconButton } from 'libs/shared/components/icon-button/IconButton';\nimport { TableOfContentsList } from 'libs/shared/components/table-of-contents-list/TableOfContentsList';\nimport { TableOfContentsSvg } from 'libs/shared/images/svg/objects/TableOfContentsSvg';\nimport { CuratedWidget } from 'libs/shared/interfaces';\nimport { ContextService } from 'libs/shared/services/ContextService';\n\nimport styles from './table-of-contents.module.scss';\n\ninterface TableOfContentsContainerProps {\n widgets: CuratedWidget[];\n title: string;\n activeId: string;\n appLink?: Core.AppLink;\n clickable?: boolean;\n analyticsData?: HashObject;\n setControlledId: (arg: string) => void;\n isSmallScreen?: boolean;\n}\ninterface TableOfContentsProps extends TableOfContentsContainerProps {\n getAppLink: (widget: CuratedWidget) => Core.AppLink;\n}\n\nfunction TableOfContentsMobile(props: TableOfContentsProps) {\n const [ isExpanded, setIsExpanded ] = React.useState(false);\n\n function logUserAction() {\n const analyticsOptions = {\n actionType: !isExpanded ? UserAction.Open : UserAction.Hide,\n entity: EntityType.TableOfContents,\n location: LocationContext.Dashboard\n };\n\n AnalyticsHelper.logUserAction(props.analyticsData, analyticsOptions);\n }\n\n function onClickIcon() {\n setIsExpanded(!isExpanded);\n logUserAction();\n }\n\n return (\n <div className={`${styles.mobile} d-inline-flex gap-1`}>\n \n {isExpanded && (\n <div className='bg-white px-3 pt-3 pb-2 border border-dark rounded-1 ps-3'>\n <h2 className='h5'>{props.title}</h2>\n <TableOfContentsList\n items={props.widgets.map(widget => (\n { name: widget.name, id: widget.id, tocIndentation: widget.metadata.tocIndentation }\n ))}\n activeId={props.activeId}\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n setControlledId={props.setControlledId}\n getAppLink={props.getAppLink}\n onItemClick={() => setIsExpanded(false)}\n />\n </div>\n )}\n <div className={styles.container}>\n <IconButton\n className='btn btn-outline-dark'\n svg={TableOfContentsSvg}\n onClick={onClickIcon}\n />\n </div>\n </div>\n );\n}\n\nfunction TableOfContents(props: TableOfContentsProps): JSX.Element {\n return (\n <aside className='col-3 order-1'>\n <div className={`${styles.container} ps-3`}>\n <h2 className='h5'>{props.title}</h2>\n \n <TableOfContentsList\n items={props.widgets.map(widget => (\n { name: widget.name, id: widget.id, tocIndentation: widget.metadata.tocIndentation }\n ))}\n activeId={props.activeId}\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n setControlledId={props.setControlledId}\n getAppLink={props.getAppLink}\n />\n </div>\n </aside>\n );\n}\n\nexport function TableOfContentsContainer(props: TableOfContentsContainerProps): JSX.Element {\n function getAppLink(widget: CuratedWidget): Core.AppLink {\n const currentAppLink = ContextService.getCurrentRoute().appLink;\n \n const params: HashObject = currentAppLink.params ?\n { ...(currentAppLink.params as HashObject) } :\n {};\n\n params.tocId = widget.id;\n\n return {\n ...currentAppLink,\n params\n };\n }\n\n return (\n <>\n {!props.isSmallScreen ?\n <TableOfContents {...props} getAppLink={getAppLink} /> :\n <TableOfContentsMobile {...props} getAppLink={getAppLink} />\n }\n </>\n );\n}\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'subjects.teacherOnlyEmptyState';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface TeacherOnlyEmptyStateProps {\n imageUrl: string;\n ctaAppLink?: () => Core.AppLink;\n}\n\nexport function TeacherOnlyEmptyState(props: TeacherOnlyEmptyStateProps): JSX.Element {\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('heading')} />\n <EmptyState.Heading>\n <Text phrase='heading' />\n </EmptyState.Heading>\n <EmptyState.Info>\n <Text phrase='info' />\n </EmptyState.Info>\n\n <EmptyState.Cta\n text={getPhrase('cta')}\n appLink={props.ctaAppLink?.()}\n className='btn btn-dark'\n />\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}\n","import React from 'react';\n\nimport { Flight } from 'libs/common/react/index';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\n\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { DashboardRequests } from 'libs/shared/flight-requests/DashboardRequests';\nimport { CuratedDashboard, CuratedMediaWidget, CuratedWidget, PresentationAudience, Video } from 'libs/shared/interfaces';\nimport { CuratedDashboardHelper } from 'libs/shared/utils/DashboardHelper';\n\nexport interface Response {\n widgets: CuratedWidget[];\n\n videoList?: Video[];\n videoListWidgetId?: string;\n}\n\n/**\n * This hook helps us with custom logic for to display system generated dashboards in a slightly\n * different way.\n */\nexport function useGetTopicsWidgets(dashboard: CuratedDashboard, activeAudiences: PresentationAudience[]): Response {\n const {\n isSystemGeneratedDashboard,\n systemGeneratedVideoWidget\n } = React.useMemo(() => {\n if (!dashboard) {\n return {\n isSystemGeneratedDashboard: false,\n systemGeneratedVideoWidget: null\n };\n }\n\n const isSystemGeneratedDashboard = CuratedDashboardHelper.isSystemGeneratedDashboard(dashboard.widgets);\n\n return {\n isSystemGeneratedDashboard,\n systemGeneratedVideoWidget: dashboard.widgets.find(widget => {\n return (\n widget.widgetId === WidgetTypeId.ClassificationPinnedVideos &&\n widget.templateId !== WidgetTemplate.ThumbnailVerticalList\n );\n })\n };\n }, [dashboard?.id]);\n\n const systemGeneratedVideoContent = Flight.useBasicFetch<CuratedMediaWidget<Video[]>>(\n !!systemGeneratedVideoWidget &&\n DashboardRequests.dashboardWidgetContent(\n systemGeneratedVideoWidget?.id,\n CuratedDashboardHelper.getWidgetParams(\n systemGeneratedVideoWidget.widgetId,\n systemGeneratedVideoWidget.templateId,\n CuratedDashboardHelper.getDashboardTargetType(dashboard),\n activeAudiences?.map(a => a.masterId)\n ),\n systemGeneratedVideoWidget?.templateId\n )\n );\n\n // Non system generated dashboards are returned as per usual\n if (!isSystemGeneratedDashboard)\n return { widgets: ArrayHelper.sortBy(dashboard?.widgets, 'index') };\n\n // System generated dashboard have the video widget removed and returned as a separate video list\n return {\n widgets: dashboard?.widgets?.filter(widget => {\n if (widget.widgetId !== WidgetTypeId.ClassificationPinnedVideos)\n return true;\n\n if (widget.templateId === WidgetTemplate.ThumbnailVerticalList)\n return true;\n\n return false;\n }) ?? [],\n videoList: systemGeneratedVideoContent.data?.content ?? [],\n videoListWidgetId: systemGeneratedVideoWidget?.id\n };\n}\n","import React from 'react';\n\ntype TableOfContentsActiveOption = {\n setActiveId: (id: string) => void,\n headingElements: Element[],\n controlledId?: string,\n setControlledId?: (arg: string) => void\n};\n\nlet timer: number;\n\nexport const useTableOfContentsActiveHeading = (\n { setActiveId, headingElements, controlledId, setControlledId }: TableOfContentsActiveOption\n) => {\n const scrollPositionRef = React.useRef(0);\n\n React.useEffect(() => {\n const callback = (headings: IntersectionObserverEntry[]) => {\n headings.forEach(heading => {\n if (controlledId) {\n setActiveId(controlledId);\n // can use scrollEnd event when the new event type is supported\n timer = window.setTimeout(() => {\n setControlledId('');\n }, 800);\n return;\n }\n if (heading.isIntersecting) {\n setActiveId(heading.target.id);\n scrollPositionRef.current = window.scrollY;\n } else {\n const scrollDistance = scrollPositionRef.current - window.scrollY;\n const isScrollingUp = scrollDistance > 0;\n const curIndex = headingElements.findIndex(h => h.id === heading.target.id);\n const prevHeading = headingElements[curIndex - 1];\n if (isScrollingUp && prevHeading?.id) {\n setActiveId(prevHeading?.id);\n }\n }\n });\n };\n\n const observer = new IntersectionObserver(callback, {\n // rootMargin top: same as the cv-nav-height\n rootMargin: '-67px 0px -80% 0px'\n });\n\n headingElements.forEach(element => observer.observe(element));\n\n return () => {\n timer && window.clearTimeout(timer);\n observer.disconnect();\n };\n }, [ setActiveId, headingElements.length, controlledId ]);\n};\n\n","import React from 'react';\n\n// https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state\nexport function usePrevious<T>(value: T): T {\n const ref = React.useRef<T>(null);\n React.useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}\n","import React from 'react';\n\nimport { usePrevious } from './usePrevious';\n\nconst HEADER_OFFSET = 80; // Size of header + some extra spacing\n\nexport const useTableOfContentsScroll = (elements: Element[], activeId: string) => {\n const [ hasDoneInitialScroll, setHasDoneInitialScroll ] = React.useState(false);\n\n const previousId = usePrevious(activeId);\n const currentId = activeId;\n\n React.useLayoutEffect(() => {\n if (!hasDoneInitialScroll || previousId !== currentId) {\n const target = elements.find(heading => heading && (heading?.id === currentId));\n\n if (target) {\n const rec = target.getBoundingClientRect();\n\n window.scrollBy({\n top: rec.top - HEADER_OFFSET,\n behavior: 'smooth'\n });\n \n if (!hasDoneInitialScroll)\n setHasDoneInitialScroll(true);\n }\n }\n }, [ elements, previousId, currentId, hasDoneInitialScroll ]);\n};\n","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, LocationContext, SignUpDescriptors, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { ActionButton } from 'libs/shared/components/actions/ActionButton';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { BellFilledSvg } from 'libs/shared/images/svg/objects/BellFilledSvg';\nimport { BellSvg } from 'libs/shared/images/svg/objects/BellSvg';\nimport { Classification } from 'libs/shared/interfaces';\n\nconst namespace = 'subjects.classificationComingSoon';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface ComingSoonProps {\n data: Classification;\n onToggleFollow?: () => void;\n canFollowSubjects: boolean;\n imageUrl: string;\n showFollowButtonSpinner: boolean;\n showSignUp: boolean;\n signUpAppLink: Core.AppLink;\n}\n\nexport function ClassificationComingSoon(props: ComingSoonProps): JSX.Element {\n const isFollowing = !!props.data.followers?.data?.length;\n function onClick(): void {\n props.onToggleFollow?.();\n }\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState className='pt-0'>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('comingSoon')} />\n\n <EmptyState.Heading>\n <Text phrase='comingSoon' />\n </EmptyState.Heading>\n\n <EmptyState.Info>\n <Text phrase={props.showSignUp ? 'infoAnon' : 'info'} />\n </EmptyState.Info>\n\n {props.canFollowSubjects && (\n <ActionButton\n svg={isFollowing ? BellFilledSvg : BellSvg}\n onClick={onClick}\n showSpinner={props.showFollowButtonSpinner}\n className={`btn follow-btn me-2 ${isFollowing ? 'btn-outline-dark' : 'btn-dark'}`}\n >\n <Text phrase={isFollowing ? 'following' : 'follow'} />\n </ActionButton>\n )}\n\n {props.showSignUp && !props.canFollowSubjects && (\n <AppLink\n appLink={props.signUpAppLink}\n className='btn btn-dark d-none d-lg-inline-block'\n analyticsOptions={{\n actionType: UserAction.Click,\n location: LocationContext.ClassificationComingSoon,\n entity: EntityType.AppLink,\n workflowPhase: WorkflowPhase.Start,\n descriptor: SignUpDescriptors.SignUp\n }}\n analyticsData={{}}\n tag='button'\n >\n {getPhrase('signUp')}\n </AppLink>\n )}\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}\n","import React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AudienceFilter } from 'libs/shared/apps/subjects/components/audience-filter/AudienceFilter';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\ninterface ClassificationDashboardAudiencesProps {\n audiences: PresentationAudience[];\n activeAudiences: PresentationAudience[];\n appLink: Core.AppLink;\n disabled: boolean;\n disablePersist: boolean;\n tooltip: string;\n}\n\nexport function ClassificationDashboardAudiences(props: ClassificationDashboardAudiencesProps): JSX.Element {\n return (\n <AudienceFilter\n audiences={props.audiences}\n activeAudiences={props.activeAudiences}\n disabled={props.disabled}\n appLink={props.appLink}\n disablePersist={props.disablePersist}\n tooltip={props.tooltip}\n />\n );\n}\n","import React from 'react';\n\nexport function WidgetSeriesSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n d='M4.5 4a.5.5 0 0 0 0 1h16a.5.5 0 0 1 .5.5v12a.5.5 0 0 0 1 0v-12A1.5 1.5 0 0 0 20.5 4zM9 10.26a.256.256 0 0 1 .39-.218l4.482 2.74a.256.256 0 0 1 0 .437L9.39 15.958A.256.256 0 0 1 9 15.739zM18.5 6A1.5 1.5 0 0 1 20 7.5v11a1.5 1.5 0 0 1-1.5 1.5h-15A1.5 1.5 0 0 1 2 18.5v-11A1.5 1.5 0 0 1 3.5 6zm-15 1a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5z'\n fill='currentColor'\n />\n </svg>\n );\n}\n","import React from 'react';\n\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\n\nimport { ClassificationTab } from '../components/classification-dashboard/classification-tabs/ClassificationTabs';\n\ninterface ViewModel {\n tab: ClassificationTab;\n on: boolean;\n}\n\nexport function useDirectoryTabProductTipSwitcher(initialTab?: ClassificationTab) {\n const initialState: ViewModel = {\n on: false,\n tab: initialTab || 'new-releases'\n };\n\n const [ viewModel, setViewModel ] = useViewModel<ViewModel>('directory:product:tip:switcher', initialState);\n\n React.useEffect(() => {\n if (!initialTab)\n return;\n\n setViewModel('tab', initialTab);\n }, [initialTab]);\n\n React.useEffect(() => {\n let interval: number = null;\n\n if (viewModel.on) {\n interval = window.setInterval(() => {\n if (viewModel.tab === 'new-releases' || viewModel.tab === 'all-topics')\n setViewModel('tab', viewModel.tab === 'new-releases' ? 'all-topics' : 'new-releases');\n else\n setViewModel('tab', viewModel.tab === 'curated-topic' ? 'video-list' : 'curated-topic');\n }, 2000);\n }\n\n return () => {\n window.clearInterval(interval);\n };\n }, [ viewModel.on, viewModel.tab ]);\n\n return {\n tab: viewModel.tab,\n isHighlighting: viewModel.on,\n start: () => setViewModel('on', true),\n stop: () => {\n setViewModel({\n on: false,\n tab: initialTab || viewModel.tab\n });\n }\n };\n}\n",":local {\n .curatedTopicTab {\n min-width: 6rem !important;\n }\n \n .tabTransition {\n transition: background-color .5s ease-in-out;\n }\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { PillTab, PillTabSelector } from 'libs/shared/components/pill-tab-selector/PillTabSelector';\nimport { Breakpoints, useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { GridSvg } from 'libs/shared/images/svg/objects/GridSvg';\nimport { RectanglesSvg } from 'libs/shared/images/svg/objects/RectanglesSvg';\nimport { SparkleSvg } from 'libs/shared/images/svg/objects/SparkleSvg';\nimport { WidgetSeriesSvg } from 'libs/shared/images/svg/widgets/WidgetSeriesSvg';\nimport { Classification, Presentation } from 'libs/shared/interfaces';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { useDirectoryTabProductTipSwitcher } from '../../../hooks/useDirectoryTabProductTipSwitcher';\n\nimport styles from './classification-tabs.module.scss';\n\nconst namespace = 'shared.classificationDashboard';\n\nexport type ClassificationTab = 'new-releases' | 'all-topics' | 'curated-topic' | 'curriculum';\n\nfunction getTabs(\n props: ClassificationTabsProps,\n breakpoints: Breakpoints,\n activeTab: ClassificationTab,\n isHighlighting: boolean\n): PillTab[] {\n const showText = breakpoints.lg || breakpoints.xl || breakpoints.xxl || breakpoints.xs;\n\n function getTopicTabClassName(): string {\n let className = isHighlighting ? styles.tabTransition : '';\n\n if (breakpoints.xs)\n return className + ' w-100';\n\n if (showText)\n return className = ` ${styles.curatedTopicTab}`;\n\n return className;\n }\n\n if (TopicsHelper.isTopLevelTopic(props.classification)) {\n return [{\n name: showText ? LanguageService.getPhrase(namespace, 'newReleases') : '',\n appLink: props.appLinks?.classification?.(props.classification),\n active: activeTab === 'new-releases',\n svg: SparkleSvg,\n analyticsData: {\n id: 'new-releases',\n classificationId: props.classification.id,\n classificationName: props.classification.name,\n presentationId: props.presentation.id,\n presentationDescription: props.presentation.description,\n name: LanguageService.getPhrase(namespace, 'newReleases'),\n url: Core.AppLinkHelper.getHref(props.appLinks?.classification?.(props.classification))\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n },\n className: `${breakpoints.xs ? 'w-100' : ''} ${isHighlighting ? styles.tabTransition : ''}`\n }, {\n name: showText ? LanguageService.getPhrase(namespace, 'allTopics') : '',\n appLink: props.appLinks?.classificationDirectory?.(props.classification),\n active: activeTab === 'all-topics',\n svg: GridSvg,\n analyticsData: {\n id: 'all-topics',\n classificationId: props.classification.id,\n classificationName: props.classification.name,\n presentationId: props.presentation.id,\n presentationDescription: props.presentation.description,\n name: LanguageService.getPhrase(namespace, 'allTopics'),\n url: Core.AppLinkHelper.getHref(props.appLinks?.classificationDirectory?.(props.classification))\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n },\n className: `${breakpoints.xs ? 'w-100' : ''} ${isHighlighting ? styles.tabTransition : ''}`\n }];\n }\n\n return [{\n name: showText ? LanguageService.getPhrase(namespace, 'topic') : '',\n appLink: props.appLinks?.classification?.(props.classification),\n active: activeTab === 'curated-topic',\n svg: RectanglesSvg,\n analyticsData: {\n id: 'curated-topic',\n classificationId: props.classification.id,\n classificationName: props.classification.name,\n presentationId: props.presentation.id,\n presentationDescription: props.presentation.description,\n name: LanguageService.getPhrase(namespace, 'topic'),\n url: Core.AppLinkHelper.getHref(props.appLinks?.classification?.(props.classification))\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n },\n className: getTopicTabClassName()\n }, {\n name: showText ? LanguageService.getPhrase(namespace, 'curriculum') : '',\n appLink: props.appLinks?.classificationCurriculum?.(props.classification),\n active: activeTab === 'curriculum',\n svg: WidgetSeriesSvg,\n analyticsData: {\n id: 'curriculum',\n classificationId: props.classification.id,\n classificationName: props.classification.name,\n presentationId: props.presentation.id,\n presentationDescription: props.presentation.description,\n name: LanguageService.getPhrase(namespace, 'curriculum'),\n url: Core.AppLinkHelper.getHref(props.appLinks?.classificationCurriculum?.(props.classification))\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n },\n className: `${breakpoints.xs ? 'w-100' : ''} ${isHighlighting ? styles.tabTransition : ''}`\n }];\n}\n\ninterface ClassificationTabsProps {\n classification: Classification;\n presentation: Presentation;\n appLinks: {\n classification: (classification: Classification | null) => Core.AppLink,\n classificationDirectory: (classification: Classification) => Core.AppLink,\n classificationCurriculum: (classification: Classification) => Core.AppLink\n };\n activeTab: ClassificationTab;\n}\n\nexport function ClassificationTabs(props: ClassificationTabsProps): JSX.Element {\n const breakpoints = useBreakpoints();\n const { tab, isHighlighting } = useDirectoryTabProductTipSwitcher(props.activeTab);\n\n return (\n <PillTabSelector\n borderRadius='sm'\n className={breakpoints.xs ? 'w-100' : ''}\n listClassName='d-flex flex-nowrap'\n tabs={getTabs(props, breakpoints, tab, isHighlighting)}\n />\n );\n}\n","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { Classification, CuratedDashboard, Presentation, PresentationAudience } from 'libs/shared/interfaces';\nimport { AudienceHelper } from 'libs/shared/utils/audience-helper/AudienceHelper';\nimport { CuratedDashboardHelper } from 'libs/shared/utils/DashboardHelper';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { ClassificationDashboardAudiences } from '../audiences/ClassificationDashboardAudiences';\nimport { ClassificationTab, ClassificationTabs } from '../classification-tabs/ClassificationTabs';\n\nfunction shouldHideAudiences(\n audiences: PresentationAudience[],\n activeAudiences: PresentationAudience[],\n activeTab: ClassificationTab,\n isEmpty: boolean,\n isComingSoon: boolean\n): boolean {\n if (isComingSoon)\n return true;\n\n if (isEmpty && !activeAudiences?.length)\n return true;\n\n if (!AudienceHelper.shouldShowAudiences(audiences))\n return true;\n\n if (activeTab === 'curriculum')\n return true;\n\n return false;\n}\n\ninterface ClassificationDashboardNavProps {\n dashboard: CuratedDashboard;\n classification: Classification;\n presentation: Presentation;\n appLinks: {\n audience: () => Core.AppLink,\n classification: (classification: Classification | null) => Core.AppLink,\n classificationDirectory: (classification: Classification) => Core.AppLink,\n classificationCurriculum: (classification: Classification) => Core.AppLink\n };\n activeTab: ClassificationTab;\n audiences: PresentationAudience[];\n activeAudiences: PresentationAudience[];\n getBreadcrumbs: () => Breadcrumb[];\n\n hasTopicDirectoryDashboard: boolean;\n hasTopicCurriculumDashboard: boolean;\n isComingSoon: boolean;\n isEmpty: boolean;\n isViewingCurrentPresentation: boolean;\n disableAudiences: boolean;\n audienceTooltip: string;\n}\n\nexport function ClassificationDashboardNav(props: ClassificationDashboardNavProps): JSX.Element {\n const breakpoints = useBreakpoints();\n\n const hideAudiences = shouldHideAudiences(\n props.audiences,\n props.activeAudiences,\n props.activeTab,\n props.isEmpty,\n props.isComingSoon\n );\n\n function canShowTabs(): boolean {\n if (!props.classification || !props.dashboard)\n return false;\n\n if (CuratedDashboardHelper.isSystemGeneratedDashboard(props.dashboard.widgets))\n return false;\n\n /**\n * For our top-level topics, we can show the topic tab if the topic has a directory dashboard.\n */\n if (TopicsHelper.isTopLevelTopic(props.classification))\n return props.hasTopicDirectoryDashboard;\n\n /**\n * For our curated topics, we can show the curriculum tab if the topic has one, which it should\n */\n if (props.classification.externalMetadata?.isCurated && props.hasTopicCurriculumDashboard)\n return true;\n\n return false;\n }\n\n function getContainerClass(): string {\n let className = 'd-flex flex-column py-3 mb-3';\n\n if (!props.isComingSoon)\n className += ' border-bottom';\n\n if ((canShowTabs() || hideAudiences) && !breakpoints.xs)\n return className;\n\n return className + ' row-gap-3';\n }\n\n function getTopRowClass(): string {\n if (hideAudiences) {\n if (breakpoints.xs)\n return 'd-flex flex-column justify-content-between row-gap-3';\n\n return 'd-flex align-items-center justify-content-between';\n }\n\n let className = '';\n\n className += 'd-flex align-items-center justify-content-between mb-1';\n\n if (breakpoints.xs)\n className += ' row-gap-3 mb-0';\n\n return className;\n }\n\n function getBottomRowClass(): string {\n let className = 'd-flex align-items-end justify-content-between';\n\n if (breakpoints.xs)\n className += ' row-gap-3 flex-wrap';\n\n return className;\n }\n\n return (\n <div className={getContainerClass()}>\n <div className={getTopRowClass()}>\n <Breadcrumbs breadcrumbs={props.getBreadcrumbs?.()} />\n\n {canShowTabs() && hideAudiences && (\n <ClassificationTabs\n classification={props.classification}\n activeTab={props.activeTab}\n appLinks={props.appLinks}\n presentation={props.presentation}\n />\n )}\n </div>\n\n <div className={getBottomRowClass()}>\n {!hideAudiences && (\n <ClassificationDashboardAudiences\n audiences={props.audiences}\n activeAudiences={props.activeAudiences}\n appLink={props.appLinks.audience?.()}\n disabled={props.disableAudiences}\n tooltip={props.audienceTooltip}\n disablePersist={!props.isViewingCurrentPresentation}\n />\n )}\n\n {canShowTabs() && !hideAudiences && (\n <ClassificationTabs\n classification={props.classification}\n activeTab={props.activeTab}\n appLinks={props.appLinks}\n presentation={props.presentation}\n />\n )}\n </div>\n </div>\n );\n}\n","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { AnalyticsOptions, HashObject, LocationContext } from 'libs/analytics/interfaces';\n\nimport { ClassificationHeaderDetails } from 'libs/shared/apps/subjects/components/classification-dashboard/classification-header-details/ClassificationHeaderDetails';\nimport { CuratedClassificationEmptyState } from 'libs/shared/apps/subjects/components/classification-dashboard/empty-state/CuratedClassificationEmptyState';\nimport { TableOfContentsContainer } from 'libs/shared/apps/subjects/components/classification-dashboard/table-of-contents/TableOfContents';\nimport { TeacherOnlyEmptyState } from 'libs/shared/apps/subjects/components/classification-dashboard/teacher-only/TeacherOnlyEmptyState';\nimport { useGetTopicsWidgets } from 'libs/shared/apps/subjects/hooks/useGetTopicsWidgets';\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { BannerHeader } from 'libs/shared/components/banner-header/BannerHeader';\nimport { Breadcrumb } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { DashboardFeedbackData } from 'libs/shared/components/feedback-form/FeedbackForm';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { WidgetHeader } from 'libs/shared/components/widgets/curated-widgets/components/header/WidgetHeader';\nimport { WidgetContainerView } from 'libs/shared/components/widgets/curated-widgets/WidgetContainerView';\nimport { AllClassificationWidgetTemplates } from 'libs/shared/components/widgets/curated-widgets/WidgetProps';\nimport { ClassificationType } from 'libs/shared/enums/ClassificationType';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { LocalPermissionName } from 'libs/shared/enums/PermissionName';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { useMediaQuery } from 'libs/shared/hooks/UseMediaQuery';\nimport { HasLocalPermissionsFunc, HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { useTableOfContentsActiveHeading } from 'libs/shared/hooks/useTableOfContentsActiveHeading';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { CalendarEvent, CalendarEventContentType, Classification, CuratedDashboard, CuratedWidget, CuratedWidgetQueryParams, CurriculumData, DashboardStatus, DashboardTargetType, InteractiveMetadata, Presentation, PresentationAudience } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { CuratedDashboardHelper } from 'libs/shared/utils/DashboardHelper';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { ClassificationComingSoon } from './classification-coming-soon/ClassificationComingSoon';\nimport { ClassificationDashboardNav } from './classification-dashboard-nav/ClassificationDashboardNav';\nimport { ClassificationTab } from './classification-tabs/ClassificationTabs';\n\nconst namespace = 'shared.classificationDashboard';\n\nfunction isHeadingWidget(widget: CuratedWidget) {\n return widget.widgetId === WidgetTypeId.Blurb && widget.templateId === WidgetTemplate.Heading;\n}\n\nfunction isTopicWidget(widget: CuratedWidget) {\n return widget.widgetId === WidgetTypeId.CuratedClassifications || widget.widgetId === WidgetTypeId.Classifications;\n}\n\nexport interface ClassificationDashboardProps {\n dashboard: CuratedDashboard;\n classification: Classification;\n presentation: Presentation;\n hasPermissions: HasPermissionsFunc;\n hasLocalPermissions: HasLocalPermissionsFunc;\n resourceThumbnailFallbackImageUrl: string;\n hasTopicDirectoryDashboard: boolean;\n hasTopicCurriculumDashboard: boolean;\n isTertiaryCustomerWithoutExchange: boolean;\n tab: ClassificationTab;\n specialEvent?: CalendarEvent;\n curriculums: CurriculumData;\n\n audiences: PresentationAudience[];\n activeAudiences?: PresentationAudience[];\n\n getWidgetContentRequest: (\n id: string,\n params: CuratedWidgetQueryParams,\n widgetTemplate: WidgetTemplate\n ) => Flight.Request;\n\n getBannerActions?: () => ActionOptions[];\n getBreadcrumbs?: () => Breadcrumb[];\n onToggleFollow?: (classification: Classification, locationContext: LocationContext) => void;\n canFollowSubjects: boolean;\n onSubmitFeedback?: (feedback: DashboardFeedbackData) => Promise<void>;\n\n appLinks?: AllClassificationWidgetTemplates['appLinks'] & {\n signUp: () => Core.AppLink,\n widgetWizard: () => Core.AppLink,\n previewQuestions: (interactive: InteractiveMetadata) => Core.AppLink,\n classificationCurriculum: (classification: Classification) => Core.AppLink,\n audience: () => Core.AppLink\n };\n\n imageCdnUrl: string;\n emptyImageUrl: string;\n comingSoonImageUrl?: string;\n\n analyticsOptions?: AnalyticsOptions;\n analyticsData?: HashObject;\n\n scrollToWidgetId?: string;\n tableOfContentsId?: string;\n\n // Means the dashboard contains no linked or working filters\n isReadonly?: boolean;\n\n // Means the dashboard is being previewed by ClickView staff either in product or in curator\n isPreviewing?: boolean;\n\n // Means the parent topic for the dashboard has a status of \"Coming Soon\"\n isComingSoon?: boolean;\n\n showFollowButtonSpinner?: boolean;\n \n isViewCurrentPresentation?: boolean;\n\n // By default widgets will always be lazyloaded. We override this behaviour only in extenuating \n // circumstances, such as dynamic rendering for SEO.\n lazyLoad?: boolean;\n\n moviesAndTv?: boolean;\n\n isTeacherOnly?: boolean;\n \n contentType?: CalendarEventContentType;\n\n isBot?: boolean;\n\n settings?: AllClassificationWidgetTemplates['settings'];\n\n commonVideoProps: CommonVideoProps;\n}\n\nClassificationDashboard.defaultProps = {\n appLinks: {}\n};\n\nexport function ClassificationDashboard(props: ClassificationDashboardProps): JSX.Element {\n const { widgets, videoList, videoListWidgetId } = useGetTopicsWidgets(props.dashboard, props.activeAudiences);\n\n const isSmallScreen = useMediaQuery(MediaQueryStrings.LGDown);\n const headingRef = React.useRef<Set<Element>>(new Set());\n\n const initialEmptyWidgets = React.useMemo(() => {\n return widgets.reduce((acc: HashObject<boolean>, widget) => {\n acc[widget.id] = false;\n return acc;\n }, {});\n }, [widgets?.length]);\n\n const [ emptyWidgets, setEmptyWidgets ] = React.useState(initialEmptyWidgets);\n\n const [ controlledId, setControlledId ] = React.useState(props.tableOfContentsId);\n\n const [ tableOfContentActiveId, setTableOfContentActiveId ] = React.useState<string>('');\n\n const headingElements = Array.from(headingRef.current);\n useTableOfContentsScroll(headingElements, controlledId);\n useTableOfContentsActiveHeading({\n setActiveId: setTableOfContentActiveId,\n headingElements,\n controlledId,\n setControlledId\n });\n\n const isHubDashboard = props.classification.type === ClassificationType.Hub;\n\n function shouldShowEmptyState(): boolean {\n if (props.isComingSoon)\n return false;\n\n if (props.isTeacherOnly)\n return false;\n\n if (!props.dashboard)\n return true;\n\n if (props.dashboard.status === DashboardStatus.Archived && !props.isReadonly)\n return true;\n\n if (props.dashboard.status === DashboardStatus.Draft && !props.isPreviewing)\n return true;\n\n if (!widgets?.length)\n return true;\n\n if (videoList && videoList.length)\n return false;\n\n return Object.values(emptyWidgets).every(state => !!state);\n }\n\n function getWidgetContentRequest(id: string, widgetTypeId: WidgetTypeId, template: WidgetTemplate): Flight.Request {\n const params = CuratedDashboardHelper.getWidgetParams(\n widgetTypeId,\n template,\n CuratedDashboardHelper.getDashboardTargetType(props.dashboard),\n props.activeAudiences?.map(a => a.masterId),\n props.curriculums.preferredCurriculum?.id\n );\n\n return props.getWidgetContentRequest(id, params, template);\n }\n\n const showEmptyState = shouldShowEmptyState();\n\n React.useEffect(() => {\n /**\n * When we add the first widget of the dashboard, the showEmptyState is `true`, the WidgetContainer is not going to be rendered to lazyload the `content`\n * so we set the emptyWidget to initial make sure the widget container is rendered to lazyload `widget.content`\n * and let the WidgetContainer to re-set the empty state based on the actual `widget.content` from backend\n */\n if (showEmptyState) {\n setEmptyWidgets(initialEmptyWidgets);\n }\n }, [widgets?.length]);\n\n const onSetIsEmpty = React.useCallback((widgetId: string, isEmpty: boolean) => {\n if (emptyWidgets[widgetId] === isEmpty)\n return;\n\n const newEmptyState = {\n ...emptyWidgets,\n [widgetId]: isEmpty\n };\n\n // The logic beneath this if-block doesn't apply to classification directories. This is because\n // classification directories don't support audience filtering, so widgets should never be empty,\n // meaning headings should never be hidden.\n if (CuratedDashboardHelper.isType(props.dashboard, DashboardTargetType.ClassificationDirectory)) {\n setEmptyWidgets(newEmptyState);\n return;\n }\n\n let index = 0;\n\n /**\n * Every time a widget is identified as empty, we check each heading blurb widget\n * to see if it should be hidden. This will be the case when all widgets beneath a heading\n * (up until the next heading) are empty.\n */\n while (index < widgets.length) {\n const currentWidget = widgets[index];\n\n if (!isHeadingWidget(currentWidget)) {\n index++;\n continue;\n }\n\n let isHeadingEmpty = true;\n let subWidgetIndex = index + 1;\n\n while (isHeadingEmpty && subWidgetIndex < widgets.length) {\n const headingSubWidget = widgets[subWidgetIndex];\n\n if (isHeadingWidget(headingSubWidget))\n break;\n\n if (!newEmptyState[headingSubWidget.id] && !isTopicWidget(headingSubWidget))\n isHeadingEmpty = false;\n\n subWidgetIndex++;\n }\n\n index = subWidgetIndex;\n\n newEmptyState[currentWidget.id] = isHeadingEmpty;\n }\n\n setEmptyWidgets(newEmptyState);\n }, [ emptyWidgets, widgets ]);\n\n function hideWidget(widget: CuratedWidget): boolean {\n return isHeadingWidget(widget) && emptyWidgets[widget.id];\n }\n\n function useLargeDashboardSpacing(): boolean {\n const target = CuratedDashboardHelper.getDashboardTargetType(props.dashboard);\n\n if (props.moviesAndTv || target === DashboardTargetType.ClassificationCurriculum)\n return false;\n\n return true;\n }\n\n function getWidgetHeading(widget: CuratedWidget, index: number): string {\n if (widget.widgetId === WidgetTypeId.ClassificationDashboardExternalMedia) {\n const previousWidget = widgets[index - 1];\n\n if (emptyWidgets[previousWidget.id])\n return widget.name.replace('Other videos', 'Videos');\n\n return widget.name;\n }\n\n return widget.name;\n }\n\n const widgetsInTableOfContents = widgets.filter(w => {\n return !hideWidget(w) && !!w.metadata?.showInTableOfContents;\n });\n\n const isTopicOnlyDashboard = widgets.every(isTopicWidget);\n\n const shouldShowTableOfContents = widgetsInTableOfContents.length >= 2;\n const shouldShowSideTableOfContents = shouldShowTableOfContents && !isSmallScreen && !isHubDashboard;\n\n const shouldShowTopicCounts = (\n props.settings?.hasTopicDirectories &&\n TopicsHelper.isTopLevelTopic(props.classification) &&\n !props.isTertiaryCustomerWithoutExchange\n );\n\n /**\n * We don't put the .topic-dashboard class when we're in a movies and tv classification\n * because we don't want the extra padding between widgets.\n */\n return (\n <div className={`bg-white px-4 ${useLargeDashboardSpacing() ? 'dashboard-spacing-lg' : ''}`}>\n {isHubDashboard && (\n <>\n <h1 className='h2 mb-4'>{props.classification.name}</h1>\n <hr className='mt-2'/>\n </>\n )}\n\n {!isHubDashboard && (\n <BannerHeader\n heading={props.classification.name}\n banner={props.classification.banner}\n imageCdnUrl={props.imageCdnUrl}\n actions={props.getBannerActions?.()}\n actionsDropdownClassName='btn btn-outline-dark'\n specialEvent={props.specialEvent}\n calendarTheme={{\n background: 'bg-light-blue',\n border: 'border-light-blue'\n }}\n showComingSoon={props.isComingSoon}\n detailsComponent={shouldShowTopicCounts ?\n () => <ClassificationHeaderDetails classification={props.classification} /> :\n null\n }\n />\n )}\n\n {!isHubDashboard && (\n <ClassificationDashboardNav\n dashboard={props.dashboard}\n classification={props.classification}\n presentation={props.presentation}\n appLinks={props.appLinks}\n activeTab={props.tab}\n audiences={props.audiences}\n activeAudiences={props.activeAudiences}\n getBreadcrumbs={props.getBreadcrumbs}\n hasTopicDirectoryDashboard={props.hasTopicDirectoryDashboard}\n hasTopicCurriculumDashboard={props.hasTopicCurriculumDashboard}\n isComingSoon={props.isComingSoon}\n isEmpty={showEmptyState}\n isViewingCurrentPresentation={props.isViewCurrentPresentation}\n disableAudiences={isTopicOnlyDashboard || props.isReadonly}\n audienceTooltip={isTopicOnlyDashboard ? LanguageService.getPhrase(namespace, 'audienceTooltip') : ''}\n />\n )}\n\n {props.isComingSoon && (\n <ClassificationComingSoon\n imageUrl={props.comingSoonImageUrl}\n data={props.classification}\n canFollowSubjects={props.canFollowSubjects}\n showFollowButtonSpinner={props.showFollowButtonSpinner}\n onToggleFollow={() => props.onToggleFollow(props.classification, LocationContext.ClassificationComingSoon)}\n showSignUp={!props.hasLocalPermissions(LocalPermissionName.FollowComingSoonTopics)}\n signUpAppLink={props.appLinks.signUp?.()}\n />\n )}\n\n {!props.isComingSoon && (\n <div className={`${shouldShowSideTableOfContents ? 'row no-wrap' : ''}`}>\n {shouldShowTableOfContents && (\n <TableOfContentsContainer\n widgets={widgetsInTableOfContents}\n title={props.classification.name}\n activeId={tableOfContentActiveId}\n clickable={!props.isReadonly}\n analyticsData={props.analyticsData}\n setControlledId={setControlledId}\n isSmallScreen={isSmallScreen}\n />\n )}\n\n <div className={shouldShowSideTableOfContents ? 'col-9 order-0' : ''}>\n {widgets.map((widget, idx) => {\n if (hideWidget(widget))\n return <React.Fragment key={widget.id}></React.Fragment>;\n\n return (\n <WidgetContainerView\n widgetCollection={DashboardTargetType.Classification}\n headingElementRef={headingRef}\n key={widget.id}\n id={widget.id}\n name={getWidgetHeading(widget, idx)}\n description={widget.description}\n classification={props.classification}\n templateId={widget.templateId}\n widgetTypeId={widget.widgetId}\n audiences={props.audiences}\n getContentRequest={getWidgetContentRequest}\n setIsEmpty={onSetIsEmpty}\n appLinks={props.appLinks}\n presentation={props.presentation}\n analyticsData={props.analyticsData}\n isScrollToTargetWidget={props.scrollToWidgetId === widget.id}\n imageCdnUrl={props.imageCdnUrl}\n onSubmitFeedback={props.onSubmitFeedback}\n metadata={widget.metadata}\n isBot={props.isBot}\n hasTableOfContents={shouldShowSideTableOfContents}\n lazyLoad={props.lazyLoad}\n dashboardTarget={CuratedDashboardHelper.getDashboardTargetType(props.dashboard)}\n widgetIndex={idx}\n hasPermissions={props.hasPermissions}\n hasLocalPermissions={props.hasLocalPermissions}\n isPreviewing={props.isReadonly}\n contentType={props.contentType}\n resourceThumbnailFallbackImageUrl={props.resourceThumbnailFallbackImageUrl}\n onToggleFollowClassification={props.onToggleFollow}\n settings={props.settings}\n isEditing={props.isReadonly}\n isTertiaryCustomerWithoutExchange={props.isTertiaryCustomerWithoutExchange}\n commonVideoProps={props.commonVideoProps}\n curriculums={props.curriculums}\n\n // TODO: Do we actually need this shit if it wasn't even being passed in?\n limitTotalItems={false}\n seeMoreLink={null}\n onClickRemoveItem={null}\n badgeComponent={null}\n />\n );\n })}\n </div>\n\n {!!videoList?.length && (\n <>\n <WidgetHeader name={LanguageService.getPhrase(namespace, 'videos')} />\n <VideoList\n videos={videoList}\n getVideoAppLink={(video, opts) => props.appLinks.videoType(\n video,\n { ...opts, contextId: videoListWidgetId, includeContext: opts.includeContext }\n )}\n hasPermissions={props.hasPermissions}\n presentationAudiences={props.audiences}\n getPreviewQuestionsAppLink={props.appLinks.previewQuestions}\n commonVideoProps={props.commonVideoProps}\n />\n </>\n )}\n </div>\n )}\n\n {showEmptyState && (\n <CuratedClassificationEmptyState\n dashboard={props.dashboard}\n isReadonly={props.isReadonly}\n imageUrl={props.emptyImageUrl}\n addWidgetApplink={props.appLinks.widgetWizard}\n />\n )}\n\n {props.isTeacherOnly && (\n <TeacherOnlyEmptyState\n imageUrl={props.emptyImageUrl}\n ctaAppLink={() => props.appLinks.allTopics(props.classification.presentationId)}\n />\n )}\n </div>\n );\n}\n","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { ErrorCta, ErrorPageError } from 'libs/shared/errors/primitives/ErrorPageError';\n\nimport { Actions } from 'shared/constants/StreamableActions';\nimport { AppChannels } from 'shared/constants/StreamableRadioChannels';\n\nconst namespace = 'subjects.topicNotFoundError';\n\nexport class TopicNotFoundError extends ErrorPageError {\n constructor() {\n super('Topic doesn\\'t exist');\n }\n\n // @ts-ignore\n public get name(): string {\n return 'TopicNotFoundError';\n }\n\n // @ts-ignore\n public get heading(): string {\n return LanguageService.getPhrase(namespace, 'heading');\n }\n\n // @ts-ignore\n public get description(): string {\n return LanguageService.getPhrase(namespace, 'description');\n }\n\n // @ts-ignore\n public get cta(): ErrorCta {\n return {\n text: LanguageService.getPhrase(namespace, 'cta'),\n appLink: {\n application: AppChannels.SUBJECTS,\n action: Actions.Subjects.CLASSIFICATION_ALL\n }\n };\n }\n}\n","import React from 'react';\n\nimport { PartialAudienceFilter } from 'libs/shared/apps/subjects/components/audience-filter/AudienceFilter';\nimport { PartialBannerHeader } from 'libs/shared/components/banner-header/BannerHeader';\nimport { PartialBreadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\n\nexport function PartialClassification(): JSX.Element {\n return (\n <div className='bg-white px-4'>\n <PartialBannerHeader />\n\n <div className='d-flex flex-column row-gap-3 py-3 mb-3 border-bottom'>\n <PartialBreadcrumbs />\n <PartialAudienceFilter />\n </div>\n </div>\n );\n}\n","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { ClassificationDashboardProps } from 'libs/shared/apps/subjects/components/classification-dashboard/ClassificationDashboard';\nimport { Breadcrumb } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { Classification } from 'libs/shared/interfaces';\n\nimport { Actions } from 'shared/constants/StreamableActions';\nimport { AppChannels } from 'shared/constants/StreamableRadioChannels';\nimport { StreamableAppLinks } from 'shared/utils/StreamableAppLinks';\n\nconst namespace = 'subjects.classificationView';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport function getClassificationAppLinks(\n classification: Classification,\n params: HashObject\n): ClassificationDashboardProps['appLinks'] {\n return {\n ...StreamableAppLinks,\n classification: c => StreamableAppLinks.classification(c || classification, params),\n classificationDirectory: () => StreamableAppLinks.classificationDirectory(params),\n audience: () => StreamableAppLinks.classification(classification, params),\n\n // TODO: Find a nice way around having to pass these in\n previewQuestions: () => null,\n series: () => null,\n latestReleases: () => null,\n classificationLatestReleases: () => null,\n playlist: () => null,\n signUp: () => null,\n widgetWizard: () => null,\n classificationCurriculum: () => null,\n searchSettings: () => null,\n searchHome: () => null,\n search: () => null,\n editCurriculum: () => null,\n getPreviewQuestionsAppLink: () => null\n };\n}\n\ninterface GetClassificationBreadcrumbsOptions {\n classification: Classification;\n path: Classification[];\n appLinks: ClassificationDashboardProps['appLinks'];\n}\n\nexport function getClassificationBreadcrumbs(\n options: GetClassificationBreadcrumbsOptions\n): Breadcrumb[] {\n const { classification, path, appLinks } = options;\n\n const breadcrumbs: Breadcrumb[] = [{\n name: getPhrase('discover'),\n appLink: {\n application: AppChannels.DASHBOARD,\n action: Actions.Dashboard.HOME\n }\n }, {\n name: getPhrase('exploreAllTopicsHeading'),\n appLink: {\n application: AppChannels.SUBJECTS,\n action: Actions.Subjects.CLASSIFICATION_ALL\n }\n }];\n\n path.forEach(item => {\n breadcrumbs.push({\n name: item.name,\n appLink: appLinks.classification(item),\n active: item.name === classification.name\n });\n });\n\n return breadcrumbs;\n}\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { ClassificationDashboard } from 'libs/shared/apps/subjects/components/classification-dashboard/ClassificationDashboard';\nimport { PreviewBanner } from 'libs/shared/apps/subjects/components/preview-banner/PreviewBanner';\nimport { Breadcrumb } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { PresentationType } from 'libs/shared/enums/PresentationType';\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { DashboardRequests } from 'libs/shared/flight-requests/DashboardRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { AudienceFilterParams, CalendarEventContentType, Classification, Config, CurrentUser, DashboardTargetType, Presentation, PresentationAudience } from 'libs/shared/interfaces';\nimport { AudienceHelper } from 'libs/shared/utils/audience-helper/AudienceHelper';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { StreamableConstants } from 'shared/constants/StreamableConstants';\nimport { PresentationRequests } from 'shared/flight-requests/PresentationRequests';\nimport { useCommonVideoProps } from 'shared/hooks/useCommonVideoProps';\nimport { useFetchDashboard } from 'shared/hooks/useFetchDashboard';\nimport { useStreamableVideoActions } from 'shared/hooks/useStreamableVideoActions';\nimport { SeoHelper } from 'shared/utils/StreamableSeoHelper';\n\nimport { TopicNotFoundError } from 'apps/subjects/errors/TopicNotFoundError';\nimport { useCurriculums } from 'apps/videos/hooks/useCurriculums';\n\nimport { PartialClassification } from './partial-loading/PartialClassification';\nimport { getClassificationAppLinks, getClassificationBreadcrumbs } from './StreamableClassificationViewUtils';\n\nconst namespace = 'subjects.classificationView';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport interface StreamableClassificationViewQueryParams extends AudienceFilterParams {\n dashboardId?: string;\n tocId?: string;\n}\n\nexport function sanitizeStreamableClassificationParams(\n queryParams: StreamableClassificationViewQueryParams\n): StreamableClassificationViewQueryParams {\n if (!queryParams)\n return {};\n\n return ObjectHelper.pick(queryParams, [ 'a', 'dashboardId', 'tocId' ]);\n}\n\ninterface StreamableClassificationViewProps {\n id: string;\n queryParams: StreamableClassificationViewQueryParams;\n}\n\nexport function StreamableClassificationView(props: StreamableClassificationViewProps): JSX.Element {\n const getVideoActions = useStreamableVideoActions('video-list');\n\n const { commonVideoProps } = useCommonVideoProps();\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const curriculumData = useCurriculums();\n\n const presentation = Flight.useBasicFetch<Presentation>(\n PresentationRequests.streamablePresentation()\n );\n\n const classification = Flight.useBasicFetch<Classification>(\n ClassificationRequests.classification(props.id, currentUser.data?.id)\n );\n\n const { dashboard, isPreviewing } = useFetchDashboard({\n targetType: DashboardTargetType.Classification,\n dashboardId: props.queryParams?.dashboardId,\n classificationId: props.id\n });\n\n const appLinks = getClassificationAppLinks(classification.data, props.queryParams);\n\n useSetPageMetadata(PageMetadataHelper.getClassificationMetadata({\n content: { classification: classification.data },\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n canonicalLink: SeoHelper.getCanonicalLink({\n customAppLink: appLinks.classification(classification.data)\n }),\n allowIndexing: true,\n product: StreamableConstants.PRODUCT_NAME\n }));\n\n useHandleObjectError(classification, {\n notFound: TopicNotFoundError\n });\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(presentation.data &&\n AudienceRequests.presentationAudiences(PresentationType.StreamableLearning, presentation.data.id));\n\n const path = Flight.useBasicFetch<Classification[]>(\n ClassificationRequests.path(props.id, PresentationType.StreamableLearning)\n );\n\n /**\n * We use the current active audiences to re-fetch content for that specific audience set.\n */\n const activeAudiences = React.useMemo(\n () => AudienceHelper.getActiveAudiencesFromParams(audiences.data, props.queryParams),\n [ audiences.data, props.queryParams ]\n );\n const activeAudienceIds = activeAudiences?.map(a => a.masterId) ?? [];\n\n /**\n * Additional topics data to be mixed in with lower-level component analytics collection\n */\n const analyticsData = {\n presentationId: presentation.data?.id,\n presentationName: presentation.data?.name,\n currentClassificationId: classification.data?.id,\n currentClassificationName: classification.data?.name,\n followingCurrentClassification: !!classification.data?.followers?.data?.length,\n activeAudienceNames: activeAudiences?.length ? activeAudiences.map(a => a.name) : null,\n activeAudienceIds: activeAudienceIds.length ? activeAudienceIds : null\n };\n\n function getBreadcrumbs(): () => Breadcrumb[] {\n return () => getClassificationBreadcrumbs({\n appLinks: appLinks,\n classification: classification.data,\n path: path.data\n });\n }\n\n const dataLoaded = !!config.data\n && dashboard.hasCompleted\n && !!classification.data\n && !!presentation.data\n && !!path.data\n && !!audiences.data;\n\n if (!dataLoaded)\n return <PartialClassification />;\n\n return (\n <VideoActionsContext.Provider value={{ getVideoActions }}>\n <div className='position-relative'>\n {!!(isPreviewing && dashboard.data) && <PreviewBanner status={dashboard.data.status} type='topic' />}\n <ClassificationDashboard\n dashboard={dashboard.data}\n classification={classification.data}\n getWidgetContentRequest={DashboardRequests.dashboardWidgetContent}\n getBreadcrumbs={getBreadcrumbs()}\n hasPermissions={() => false}\n hasLocalPermissions={() => false}\n presentation={presentation.data}\n getBannerActions={() => []}\n audiences={audiences.data}\n activeAudiences={activeAudiences}\n analyticsData={analyticsData}\n imageCdnUrl={config.data.imageCdnUrl}\n resourceThumbnailFallbackImageUrl={ImageUrls.Fallbacks.RESOURCE_THUMBNAIL}\n emptyImageUrl={ImageUrls.EmptyStates.Topics.TOPIC}\n appLinks={appLinks}\n isPreviewing={isPreviewing}\n isViewCurrentPresentation\n canFollowSubjects={false}\n tableOfContentsId={props.queryParams.tocId}\n lazyLoad={!SeoHelper.isBot()}\n isTeacherOnly={false}\n contentType={CalendarEventContentType.Livestream}\n hasTopicDirectoryDashboard={false}\n hasTopicCurriculumDashboard={false}\n isTertiaryCustomerWithoutExchange={false}\n tab='curated-topic'\n curriculums={curriculumData}\n // just... one... more.. prop....\n commonVideoProps={commonVideoProps}\n />\n </div>\n </VideoActionsContext.Provider>\n );\n}\n"],"mappings":"ulEAMM,EAAY,sCAEZ,GAAa,CAAE,gBACnB,EAAA,EAAA,KAAC,OAAD,CAAiB,qBAAW,IAAa,CAAA,CAM3C,SAAgB,GAA4B,EAA6D,CACvG,GAAM,CACJ,sBACA,2BACA,yBACA,8BACA,4BACE,EAAa,UAAU,EAAM,eAAe,CAE1C,EAAa,EAAsB,EACnC,EAAgB,EAAyB,EAE/C,OACE,EAAA,EAAA,MAAC,IAAD,CAAG,UAAU,iDAAb,CACG,CAAC,CAAC,IACD,EAAA,EAAA,KAAC,EAAD,CACa,UAAA,EACX,OAAO,SACP,QAAS,CAAE,MAAO,EAAyB,gBAAgB,CAAE,WAAY,EAA0B,CACnG,CAAA,CAGH,CAAC,CAAC,IACD,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,CACG,EAA2B,IAAK,EAAA,EAAA,KAAC,EAAD,CAAW,UAAU,OAAS,CAAA,EAC/D,EAAA,EAAA,KAAC,EAAD,CACa,UAAA,EACX,OAAO,SACP,QAAS,CAAE,MAAO,EAAW,gBAAgB,CAAE,WAAY,EAAY,CACvE,CAAA,CACD,CAAA,CAAA,CAEJ,CAAC,CAAC,IACD,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,EAAD,CAAW,UAAU,OAAS,CAAA,EAC9B,EAAA,EAAA,KAAC,EAAD,CACa,UAAA,EACX,OAAO,YACP,QAAS,CAAE,MAAO,EAAc,gBAAgB,CA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