@clickview/lite 0.103.1 → 0.103.2

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.
Files changed (52) hide show
  1. package/dist/.vite/manifest.json +271 -271
  2. package/dist/bundles.json +1 -1
  3. package/dist/en.json +1 -1
  4. package/dist/scripts/{igSDXA6g.chunk.js → 1WHinyQW.chunk.js} +2 -2
  5. package/dist/scripts/{igSDXA6g.chunk.js.map → 1WHinyQW.chunk.js.map} +1 -1
  6. package/dist/scripts/{kMWvzbRv2.chunk.js → B1ag1ah72.chunk.js} +2 -2
  7. package/dist/scripts/{kMWvzbRv2.chunk.js.map → B1ag1ah72.chunk.js.map} +1 -1
  8. package/dist/scripts/{D2_GYzlb.chunk.js → B6Pc3q-u.chunk.js} +2 -2
  9. package/dist/scripts/{D2_GYzlb.chunk.js.map → B6Pc3q-u.chunk.js.map} +1 -1
  10. package/dist/scripts/{sCuSDiER2.chunk.js → BPbjSFkC2.chunk.js} +2 -2
  11. package/dist/scripts/{sCuSDiER2.chunk.js.map → BPbjSFkC2.chunk.js.map} +1 -1
  12. package/dist/scripts/{CNm_4jj62.chunk.js → BZFomoIH2.chunk.js} +2 -2
  13. package/dist/scripts/BZFomoIH2.chunk.js.map +1 -0
  14. package/dist/scripts/{CW_rYB-i2.chunk.js → BazdM9Ah2.chunk.js} +2 -2
  15. package/dist/scripts/{CW_rYB-i2.chunk.js.map → BazdM9Ah2.chunk.js.map} +1 -1
  16. package/dist/scripts/{BcPrUEuC2.chunk.js → CNPnPJMp2.chunk.js} +2 -2
  17. package/dist/scripts/{BcPrUEuC2.chunk.js.map → CNPnPJMp2.chunk.js.map} +1 -1
  18. package/dist/scripts/{Dd23z1_x2.chunk.js → CUp7_5gE2.chunk.js} +2 -2
  19. package/dist/scripts/{Dd23z1_x2.chunk.js.map → CUp7_5gE2.chunk.js.map} +1 -1
  20. package/dist/scripts/{C-zUHAyD.chunk.js → CajcIz6S.chunk.js} +2 -2
  21. package/dist/scripts/{C-zUHAyD.chunk.js.map → CajcIz6S.chunk.js.map} +1 -1
  22. package/dist/scripts/{Drx3PvJj.chunk.js → Cc9f2ux0.chunk.js} +2 -2
  23. package/dist/scripts/{Drx3PvJj.chunk.js.map → Cc9f2ux0.chunk.js.map} +1 -1
  24. package/dist/scripts/Cj_F4Lv92.chunk.js +2 -0
  25. package/dist/scripts/{C8l37H7t2.chunk.js.map → Cj_F4Lv92.chunk.js.map} +1 -1
  26. package/dist/scripts/{DFrz_upP2.chunk.js → CtBGtgb32.chunk.js} +2 -2
  27. package/dist/scripts/{DFrz_upP2.chunk.js.map → CtBGtgb32.chunk.js.map} +1 -1
  28. package/dist/scripts/{BpiZZWnJ2.chunk.js → CtWAorP42.chunk.js} +2 -2
  29. package/dist/scripts/{BpiZZWnJ2.chunk.js.map → CtWAorP42.chunk.js.map} +1 -1
  30. package/dist/scripts/{C3Qd_bbV2.chunk.js → D8mi6CVp2.chunk.js} +2 -2
  31. package/dist/scripts/{C3Qd_bbV2.chunk.js.map → D8mi6CVp2.chunk.js.map} +1 -1
  32. package/dist/scripts/{3K2h5K5-.chunk.js → DJfIirut.chunk.js} +2 -2
  33. package/dist/scripts/{3K2h5K5-.chunk.js.map → DJfIirut.chunk.js.map} +1 -1
  34. package/dist/scripts/{Cc63s6rS2.chunk.js → DaaQ5htA2.chunk.js} +2 -2
  35. package/dist/scripts/{Cc63s6rS2.chunk.js.map → DaaQ5htA2.chunk.js.map} +1 -1
  36. package/dist/scripts/{CHwPLUZK.chunk.js → DkFP4cXM.chunk.js} +2 -2
  37. package/dist/scripts/{CHwPLUZK.chunk.js.map → DkFP4cXM.chunk.js.map} +1 -1
  38. package/dist/scripts/{izXlxhJf.chunk.js → Dzy1nQk7.chunk.js} +2 -2
  39. package/dist/scripts/{izXlxhJf.chunk.js.map → Dzy1nQk7.chunk.js.map} +1 -1
  40. package/dist/scripts/{DGy8Ldlr.chunk.js → FIUOppmy.chunk.js} +2 -2
  41. package/dist/scripts/{DGy8Ldlr.chunk.js.map → FIUOppmy.chunk.js.map} +1 -1
  42. package/dist/scripts/{CPBvCqVK.chunk.js → H511PXuG.chunk.js} +2 -2
  43. package/dist/scripts/{CPBvCqVK.chunk.js.map → H511PXuG.chunk.js.map} +1 -1
  44. package/dist/scripts/{D8Op6EUa2.chunk.js → IYIY9hIU2.chunk.js} +2 -2
  45. package/dist/scripts/{D8Op6EUa2.chunk.js.map → IYIY9hIU2.chunk.js.map} +1 -1
  46. package/dist/scripts/{app-BHlllGhO.js → app-DvYKGw_S.js} +3 -3
  47. package/dist/scripts/{app-BHlllGhO.js.map → app-DvYKGw_S.js.map} +1 -1
  48. package/dist/scripts/{2HZlmQRs2.chunk.js → lJ6ZVpyv2.chunk.js} +2 -2
  49. package/dist/scripts/{2HZlmQRs2.chunk.js.map → lJ6ZVpyv2.chunk.js.map} +1 -1
  50. package/package.json +1 -1
  51. package/dist/scripts/C8l37H7t2.chunk.js +0 -2
  52. package/dist/scripts/CNm_4jj62.chunk.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{o as e}from"./DAXXjFlN.chunk.js";import{r as t}from"./D8uRDrkd.chunk.js";import{x as n,y as r}from"./BftnFbcr.chunk.js";import{n as i,t as a}from"./B785hxeE.chunk.js";import{t as o}from"./CQyJ7YGa.chunk.js";import{t as s}from"./CPKixrGf.chunk.js";import{t as c}from"./C2w0pmFW.chunk.js";import{t as l}from"./wrLrTezN.chunk.js";import{t as u}from"./BXTI9cmX.chunk.js";import{C as d,p as f,u as p}from"./BX0wDJmp.chunk.js";import{t as m}from"./C1SLt-ar.chunk.js";import{N as h,P as g,U as _,l as v,y,z as b}from"./NlCAcBdo.chunk.js";import{n as x}from"./CAs8k4pN.chunk.js";import{t as S}from"./RjGIOTdP.chunk.js";import{n as ee,t as C}from"./DTGfiG8Y.chunk.js";import{a as w,i as T,r as E,t as D}from"./Cr6TXzQQ2.chunk.js";import{t as O}from"./oPIkfKWW2.chunk.js";import{n as k,t as A}from"./CmcCVXi32.chunk.js";import{t as j}from"./Dat7ugzw2.chunk.js";import{t as M}from"./CcDvlSWl2.chunk.js";import{t as N}from"./DZX1tZ-D2.chunk.js";import{t as te}from"./xwiwWcv12.chunk.js";import{t as P}from"./CVHQXNzi2.chunk.js";import{t as ne}from"./DdsRCMkN.chunk.js";import{t as re}from"./D_gWf2lC.chunk.js";import{t as ie}from"./CYEpX3hx.chunk.js";import{t as F}from"./PgzMrOyM.chunk.js";import{t as ae}from"./C5rBgkQH.chunk.js";import{t as I}from"./B0aLOQEJ2.chunk.js";import{t as L}from"./klg9VDIV2.chunk.js";import{t as oe}from"./QCFxJYkI2.chunk.js";import{t as se}from"./Ci5E3nqm2.chunk.js";import{t as ce}from"./9LNlP5yJ.chunk.js";import{t as R}from"./Vp01-r6R.chunk.js";import{n as le,t as ue}from"./A8xLZrSw.chunk.js";import{t as de}from"./BQKcAczf.chunk.js";import{t as fe}from"./D3WOV5RE.chunk.js";import{t as z}from"./DR9DEoQL.chunk.js";import{n as B,t as V}from"./CpFtf-tI2.chunk.js";import{t as pe}from"./CXnhm0VS2.chunk.js";import{t as H}from"./YmXEsLuD.chunk.js";import{t as me}from"./CEtJop-5.chunk.js";import{t as he}from"./Delmxf6C.chunk.js";import{t as ge}from"./9PCtVxot.chunk.js";import{t as _e}from"./D0bhWkNM.chunk.js";import{n as ve,r as ye,t as be}from"./D4jQxS0H.chunk.js";import{t as U}from"./CuVGnzB82.chunk.js";import{t as W}from"./C7HU4huj.chunk.js";import{t as G}from"./5ONJSThP.chunk.js";import{t as xe}from"./DOnmTMfX.chunk.js";import{t as K}from"./9kSpxveW.chunk.js";import{t as Se}from"./DDJBf9pK.chunk.js";import{n as Ce}from"./B-eFTZdx2.chunk.js";import{t as we}from"./QOx-iXyN2.chunk.js";import{t as Te}from"./DBHDBu1Y.chunk.js";import{t as Ee}from"./GhOuBMgg.chunk.js";import{t as De}from"./DMZ_X3HL.chunk.js";import{t as Oe}from"./DewCxv4i.chunk.js";import{t as ke}from"./DMaQV7L2.chunk.js";import{t as Ae}from"./CETzluXN.chunk.js";import{t as q}from"./NVkf8UeY.chunk.js";import{t as je}from"./DmKYYMW8.chunk.js";import{n as Me,r as Ne,t as Pe}from"./f5U4vAvn2.chunk.js";import{t as Fe}from"./D7UO1XFN2.chunk.js";import{t as Ie}from"./DELN_PAD2.chunk.js";import{t as Le}from"./AEt1phMH2.chunk.js";import{t as Re}from"./QDUcHuL-2.chunk.js";import{n as ze,t as Be}from"./C2pEjcxD.chunk.js";import{t as Ve}from"./CJPrWMiv.chunk.js";import{t as He}from"./D0n6BTgT.chunk.js";import{t as Ue}from"./BmR4qY-v2.chunk.js";import{n as We,t as Ge}from"./y3q_PHh_.chunk.js";import{a as Ke,o as J,t as qe}from"./C-zUHAyD.chunk.js";import{i as Je}from"./Dw_ycuUx.chunk.js";import{o as Ye,r as Xe}from"./YcLj4o6h.chunk.js";import{t as Ze}from"./cX5MHowe.chunk.js";import{r as Qe}from"./CHQUozwb.chunk.js";import{n as $e,t as et}from"./DWeyYfUG.chunk.js";import{t as tt}from"./kMWvzbRv2.chunk.js";import{t as nt}from"./DFrZwydG2.chunk.js";import{t as rt}from"./BpiZZWnJ2.chunk.js";import{n as it,t as at}from"./CyLi05602.chunk.js";import{i as ot,n as st,r as ct,t as lt}from"./BgblOoyL2.chunk.js";import{t as ut}from"./CaJxXKnx.chunk.js";var Y=e(c()),X=l(),dt=`subject.classificationHeaderDetails`,ft=({className:e})=>(0,X.jsx)(`span`,{className:e,children:`•`});function pt(e){let{dashboardVideoCount:t,childDashboardVideoCount:n,dashboardResourceCount:r,childDashboardResourceCount:i,childClassificationCount:a}=x.getCounts(e.classification),o=t+n,s=r+i;return(0,X.jsxs)(`p`,{className:`mb-n1 font-size-normal fw-normal mt-1`,children:[!!a&&(0,X.jsx)(B,{namespace:dt,phrase:`topics`,options:{count:a.toLocaleString(),smartCount:a}}),!!o&&(0,X.jsxs)(X.Fragment,{children:[a>0&&(0,X.jsx)(ft,{className:`mx-2`}),(0,X.jsx)(B,{namespace:dt,phrase:`videos`,options:{count:o.toLocaleString(),smartCount:o}})]}),!!s&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ft,{className:`mx-2`}),(0,X.jsx)(B,{namespace:dt,phrase:`resources`,options:{count:s.toLocaleString(),smartCount:s}})]})]})}var Z=`subjects.curatedClassificationEmptyState`,mt=o.encloseNamespace(Z);function ht(e){let n=e.dashboard?.status===A.Archived;return(0,X.jsx)(V.Provider,{value:Z,children:(0,X.jsxs)(R,{children:[(0,X.jsx)(R.Image,{src:e.imageUrl,altText:mt(`headingForNP`)}),e.isReadonly?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(R.Heading,{children:(0,X.jsx)(B,{namespace:Z,phrase:`headingForCurator`})}),(0,X.jsx)(R.Info,{children:(0,X.jsx)(B,{namespace:Z,phrase:`info`})}),(0,X.jsx)(t,{title:n?o.getPhrase(Z,`archivedCtaTooltip`):``,spanHack:!0,children:(0,X.jsx)(R.Cta,{text:o.getPhrase(Z,`add`),appLink:e.addWidgetApplink?.(),className:`btn btn-dark`,icon:Se,disabled:n})})]}):(0,X.jsx)(R.Heading,{children:(0,X.jsx)(B,{phrase:`headingForNP`})})]})})}var gt={container:`_container_1n8qw_1`,mobile:`_mobile_1n8qw_7`};function _t(e){let[t,n]=Y.useState(!1);function r(){let n={actionType:t?b.Hide:b.Open,entity:v.TableOfContents,location:y.Dashboard};ie.logUserAction(e.analyticsData,n)}function i(){n(!t),r()}return(0,X.jsxs)(`div`,{className:`${gt.mobile} d-inline-flex gap-1`,children:[t&&(0,X.jsxs)(`div`,{className:`bg-white px-3 pt-3 pb-2 border border-dark rounded-1 ps-3`,children:[(0,X.jsx)(`h2`,{className:`h5`,children:e.title}),(0,X.jsx)(st,{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,X.jsx)(`div`,{className:gt.container,children:(0,X.jsx)(ce,{className:`btn btn-outline-dark`,svg:Ie,onClick:i})})]})}function vt(e){return(0,X.jsx)(`aside`,{className:`col-3 order-1`,children:(0,X.jsxs)(`div`,{className:`${gt.container} ps-3`,children:[(0,X.jsx)(`h2`,{className:`h5`,children:e.title}),(0,X.jsx)(st,{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 yt(e){function t(e){let t=L.getCurrentRoute().appLink,n=t.params?{...t.params}:{};return n.tocId=e.id,{...t,params:n}}return(0,X.jsx)(X.Fragment,{children:e.isSmallScreen?(0,X.jsx)(_t,{...e,getAppLink:t}):(0,X.jsx)(vt,{...e,getAppLink:t})})}var bt=`subjects.teacherOnlyEmptyState`,xt=o.encloseNamespace(bt);function St(e){return(0,X.jsx)(V.Provider,{value:bt,children:(0,X.jsxs)(R,{children:[(0,X.jsx)(R.Image,{src:e.imageUrl,altText:xt(`heading`)}),(0,X.jsx)(R.Heading,{children:(0,X.jsx)(B,{phrase:`heading`})}),(0,X.jsx)(R.Info,{children:(0,X.jsx)(B,{phrase:`info`})}),(0,X.jsx)(R.Cta,{text:xt(`cta`),appLink:e.ctaAppLink?.(),className:`btn btn-dark`})]})})}function Ct(e,t){let{isSystemGeneratedDashboard:n,systemGeneratedVideoWidget:r}=Y.useMemo(()=>e?{isSystemGeneratedDashboard:E.isSystemGeneratedDashboard(e.widgets),systemGeneratedVideoWidget:e.widgets.find(e=>e.widgetId===T.ClassificationPinnedVideos&&e.templateId!==w.ThumbnailVerticalList)}:{isSystemGeneratedDashboard:!1,systemGeneratedVideoWidget:null},[e?.id]),i=p(!!r&&Oe.dashboardWidgetContent(r?.id,E.getWidgetParams(r.widgetId,r.templateId,E.getDashboardTargetType(e),t?.map(e=>e.masterId)),r?.templateId));return n?{widgets:e?.widgets?.filter(e=>e.widgetId!==T.ClassificationPinnedVideos||e.templateId===w.ThumbnailVerticalList)??[],videoList:i.data?.content??[],videoListWidgetId:r?.id}:{widgets:m.sortBy(e?.widgets,`index`)}}var wt=`subjects.classificationComingSoon`,Tt=o.encloseNamespace(wt);function Et(e){let t=!!e.data.followers?.data?.length;function n(){e.onToggleFollow?.()}return(0,X.jsx)(V.Provider,{value:wt,children:(0,X.jsxs)(R,{className:`pt-0`,children:[(0,X.jsx)(R.Image,{src:e.imageUrl,altText:Tt(`comingSoon`)}),(0,X.jsx)(R.Heading,{children:(0,X.jsx)(B,{phrase:`comingSoon`})}),(0,X.jsx)(R.Info,{children:(0,X.jsx)(B,{phrase:e.showSignUp?`infoAnon`:`info`})}),e.canFollowSubjects&&(0,X.jsx)(U,{svg:t?H:me,onClick:n,showSpinner:e.showFollowButtonSpinner,className:`btn follow-btn me-2 ${t?`btn-outline-dark`:`btn-dark`}`,children:(0,X.jsx)(B,{phrase:t?`following`:`follow`})}),e.showSignUp&&!e.canFollowSubjects&&(0,X.jsx)(se,{appLink:e.signUpAppLink,className:`btn btn-dark d-none d-lg-inline-block`,analyticsOptions:{actionType:b.Click,location:y.ClassificationComingSoon,entity:v.AppLink,workflowPhase:_.Start,descriptor:h.SignUp},analyticsData:{},tag:`button`,children:Tt(`signUp`)})]})})}function Dt(e){return(0,X.jsx)(at,{audiences:e.audiences,activeAudiences:e.activeAudiences,disabled:e.disabled,appLink:e.appLink,disablePersist:e.disablePersist,tooltip:e.tooltip})}function Ot(e){return(0,X.jsx)(`svg`,{...e,children:(0,X.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 kt(e){let[t,n]=ae(`directory:product:tip:switcher`,{on:!1,tab:e||`new-releases`});return Y.useEffect(()=>{e&&n(`tab`,e)},[e]),Y.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 Q={curatedTopicTab:`_curatedTopicTab_1ji5o_1`,tabTransition:`_tabTransition_1ji5o_4`},$=`shared.classificationDashboard`;function At(e,t,n,i){let a=t.lg||t.xl||t.xxl||t.xs;function s(){let e=i?Q.tabTransition:``;return t.xs?e+` w-100`:a?e=` ${Q.curatedTopicTab}`:e}return x.isTopLevelTopic(e.classification)?[{name:a?o.getPhrase($,`newReleases`):``,appLink:e.appLinks?.classification?.(e.classification),active:n===`new-releases`,svg:Je,analyticsData:{id:`new-releases`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:o.getPhrase($,`newReleases`),url:r.getHref(e.appLinks?.classification?.(e.classification))},analyticsOptions:{actionType:b.Click,entity:v.Url,location:y.MagicTabs},className:`${t.xs?`w-100`:``} ${i?Q.tabTransition:``}`},{name:a?o.getPhrase($,`allTopics`):``,appLink:e.appLinks?.classificationDirectory?.(e.classification),active:n===`all-topics`,svg:J,analyticsData:{id:`all-topics`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:o.getPhrase($,`allTopics`),url:r.getHref(e.appLinks?.classificationDirectory?.(e.classification))},analyticsOptions:{actionType:b.Click,entity:v.Url,location:y.MagicTabs},className:`${t.xs?`w-100`:``} ${i?Q.tabTransition:``}`}]:[{name:a?o.getPhrase($,`topic`):``,appLink:e.appLinks?.classification?.(e.classification),active:n===`curated-topic`,svg:Ke,analyticsData:{id:`curated-topic`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:o.getPhrase($,`topic`),url:r.getHref(e.appLinks?.classification?.(e.classification))},analyticsOptions:{actionType:b.Click,entity:v.Url,location:y.MagicTabs},className:s()},{name:a?o.getPhrase($,`curriculum`):``,appLink:e.appLinks?.classificationCurriculum?.(e.classification),active:n===`curriculum`,svg:Ot,analyticsData:{id:`curriculum`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:o.getPhrase($,`curriculum`),url:r.getHref(e.appLinks?.classificationCurriculum?.(e.classification))},analyticsOptions:{actionType:b.Click,entity:v.Url,location:y.MagicTabs},className:`${t.xs?`w-100`:``} ${i?Q.tabTransition:``}`}]}function jt(e){let t=G(),{tab:n,isHighlighting:r}=kt(e.activeTab);return(0,X.jsx)(Ve,{borderRadius:`sm`,className:t.xs?`w-100`:``,listClassName:`d-flex flex-nowrap`,tabs:At(e,t,n,r)})}function Mt(e,t,n,r,i){return!!(i||r&&!t?.length||!S.shouldShowAudiences(e)||n===`curriculum`)}function Nt(e){let t=G(),n=e.forceHideAudiences||Mt(e.audiences,e.activeAudiences,e.activeTab,e.isEmpty,e.isComingSoon);function r(){return!e.classification||!e.dashboard||E.isSystemGeneratedDashboard(e.dashboard.widgets)?!1:x.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,X.jsxs)(`div`,{className:i(),children:[(0,X.jsxs)(`div`,{className:a(),children:[(0,X.jsx)(Be,{breadcrumbs:e.getBreadcrumbs?.()}),r()&&n&&(0,X.jsx)(jt,{classification:e.classification,activeTab:e.activeTab,appLinks:e.appLinks,presentation:e.presentation})]}),(0,X.jsxs)(`div`,{className:o(),children:[!n&&(0,X.jsx)(Dt,{audiences:e.audiences,activeAudiences:e.activeAudiences,appLink:e.appLinks.audience?.(),disabled:e.disableAudiences,tooltip:e.audienceTooltip,disablePersist:!e.isViewingCurrentPresentation}),r()&&!n&&(0,X.jsx)(jt,{classification:e.classification,activeTab:e.activeTab,appLinks:e.appLinks,presentation:e.presentation})]})]})}var Pt=`shared.classificationDashboard`;function Ft(e){return e.widgetId===T.Blurb&&e.templateId===w.Heading}function It(e){return e.widgetId===T.CuratedClassifications||e.widgetId===T.Classifications}var Lt=[T.ClassificationAllVideos];function Rt(e,t){let n=e[t];return n?Lt.includes(n.widgetId)&&t===e.length-1:!1}function zt(e){let t=e?.[0];return t?D.hasNoContent(t.widgetId)?!1:!t.content||Array.isArray(t.content)&&!t.content.length:!0}Bt.defaultProps={appLinks:{}};function Bt(e){let{widgets:t,videoList:n,videoListWidgetId:r}=Ct(e.dashboard,e.activeAudiences),i=W(K.LGDown),s=Y.useRef(new Set),c=Y.useMemo(()=>t.reduce((e,t)=>(e[t.id]=!1,e),{}),[t?.length]),[l,u]=Y.useState(c),[d,f]=Y.useState(e.tableOfContentsId),[p,m]=Y.useState(``),h=Array.from(s.current);ct(h,d),ot({setActiveId:m,headingElements:h,controlledId:d,setControlledId:f});let g=e.classification.type===ee.Hub,_=!!e.dashboard?.metadata?.channelId;function v(){return e.isComingSoon||e.isTeacherOnly?!1:!e.dashboard||e.dashboard.status===A.Archived&&!e.isReadonly||e.dashboard.status===A.Draft&&!e.isPreviewing||!t?.length?!0:n&&n.length?!1:Object.values(l).every(e=>!!e)}function b(t,n,r,i){let a=E.getWidgetParams(n,r,E.getDashboardTargetType(e.dashboard),e.activeAudiences?.map(e=>e.masterId),e.curriculums.preferredCurriculum?.id);return i&&e.getWidgetContentRequestWithCursor?e.getWidgetContentRequestWithCursor(t,a,r,i):e.getWidgetContentRequest(t,a,r)}let S=v();Y.useEffect(()=>{S&&u(c)},[t?.length]);let C=Y.useCallback((n,r)=>{if(l[n]===r)return;let i={...l,[n]:r};if(E.isType(e.dashboard,k.ClassificationDirectory)){u(i);return}let a=0;for(;a<t.length;){let e=t[a];if(!Ft(e)){a++;continue}let n=!0,r=a+1;for(;n&&r<t.length;){let e=t[r];if(Ft(e))break;!i[e.id]&&!It(e)&&(n=!1),r++}a=r,i[e.id]=n}u(i)},[l,t]);function w(e){return Ft(e)&&l[e.id]}function O(){let t=E.getDashboardTargetType(e.dashboard);return!(e.moviesAndTv||t===k.ClassificationCurriculum)}function j(e,n){if(e.widgetId===T.ClassificationDashboardExternalMedia){let r=t[n-1];return l[r.id]?e.name.replace(`Other videos`,`Videos`):e.name}return e.name}let M=t.filter(e=>!w(e)&&!!e.metadata?.showInTableOfContents),N=t.every(It),te=M.length>=2,P=te&&!i,ne=e.settings?.hasTopicDirectories&&x.isTopLevelTopic(e.classification)&&!e.isTertiaryCustomerWithoutExchange&&!g;return(0,X.jsxs)(`div`,{className:`bg-white px-4 ${O()?`dashboard-spacing-lg`:``}`,children:[(0,X.jsx)(Ge,{type:_?`channel-topic`:`default`,logo:_&&e.channel?._logo.value,logoBgColour:_&&e.channel?._colour.value,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:ne?()=>(0,X.jsx)(pt,{classification:e.classification}):null}),g?(0,X.jsx)(`div`,{className:`py-3 mb-3 border-bottom`,children:(0,X.jsx)(`div`,{className:`mt-3`,children:(0,X.jsx)(nt,{children:()=>(0,X.jsx)(`p`,{className:`mb-0`,children:e.classification.description})})})}):(0,X.jsx)(Nt,{forceHideAudiences:_,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:S,isViewingCurrentPresentation:e.isViewCurrentPresentation,disableAudiences:N||e.isReadonly,audienceTooltip:N?o.getPhrase(Pt,`audienceTooltip`):``}),e.isComingSoon&&(0,X.jsx)(Et,{imageUrl:e.comingSoonImageUrl,data:e.classification,canFollowSubjects:e.canFollowSubjects,showFollowButtonSpinner:e.showFollowButtonSpinner,onToggleFollow:()=>e.onToggleFollow(e.classification,y.ClassificationComingSoon),showSignUp:!e.hasLocalPermissions(a.FollowComingSoonTopics),signUpAppLink:e.appLinks.signUp?.()}),!e.isComingSoon&&(0,X.jsxs)(`div`,{className:`${P?`row no-wrap`:``}`,children:[te&&(0,X.jsx)(yt,{widgets:M,title:e.classification.name,activeId:p,clickable:!e.isReadonly,analyticsData:e.analyticsData,setControlledId:f,isSmallScreen:i}),(0,X.jsx)(`div`,{className:P?`col-9 order-0`:``,children:t.map((n,r)=>w(n)?(0,X.jsx)(Y.Fragment,{},n.id):Lt.includes(n.widgetId)?(0,X.jsx)(tt,{index:r,item:n,infiniteFetch:Rt(t,r)&&!!e.getWidgetContentRequestWithCursor,dashboardTarget:E.getDashboardTargetType(e.dashboard),getName:e=>j(e,r),getWidgetMetadata:e=>e.metadata,getContent:e=>e.content,getCursor:e=>e.cursor,getRequest:e=>b(n.id,n.widgetId,n.templateId,e),isEmptyPredicate:zt,audiences:e.audiences,appLinks:e.appLinks,commonVideoProps:e.commonVideoProps,hasPermissions:e.hasPermissions,hasLocalPermissions:e.hasLocalPermissions,resultsTransformers:D.getWidgetResultsTransformers(),presentation:e.presentation,analyticsData:e.analyticsData,imageCdnUrl:e.imageCdnUrl,imageUrls:e.imageUrls,resourceThumbnailFallbackImageUrl:e.resourceThumbnailFallbackImageUrl,lazyLoad:e.lazyLoad,headingElementRef:s,hasTableOfContents:P,isScrollToTargetWidget:e.scrollToWidgetId===n.id,isBot:e.isBot,isPreviewing:e.isReadonly,isEditing:e.isReadonly,curriculums:e.curriculums,contentType:e.contentType,setIsEmpty:e=>C(n.id,e),getSelectedItems:null,appLinkOptions:null},n.id):(0,X.jsx)(qe,{widgetCollection:k.Classification,headingElementRef:s,id:n.id,name:j(n,r),description:n.description,classification:e.classification,templateId:n.templateId,widgetTypeId:n.widgetId,audiences:e.audiences,getContentRequest:b,setIsEmpty:C,appLinks:e.appLinks,presentation:e.presentation,analyticsData:e.analyticsData,isScrollToTargetWidget:e.scrollToWidgetId===n.id,imageCdnUrl:e.imageCdnUrl,imageUrls:e.imageUrls,onSubmitFeedback:e.onSubmitFeedback,onDownloadAllClick:e.onDownloadAllClick,metadata:n.metadata,isBot:e.isBot,hasTableOfContents:P,lazyLoad:e.lazyLoad,dashboardTarget:E.getDashboardTargetType(e.dashboard),widgetIndex:r,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},n.id))}),!!n?.length&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Re,{name:o.getPhrase(Pt,`videos`)}),(0,X.jsx)(Xe,{videos:n,getVideoAppLink:(t,n)=>e.appLinks.videoType(t,{...n,contextId:r,includeContext:n.includeContext}),hasPermissions:e.hasPermissions,presentationAudiences:e.audiences,getPreviewQuestionsAppLink:e.appLinks.previewQuestions,commonVideoProps:e.commonVideoProps})]})]}),S&&(0,X.jsx)(ht,{dashboard:e.dashboard,isReadonly:e.isReadonly,imageUrl:e.emptyImageUrl,addWidgetApplink:e.appLinks.widgetWizard}),e.isTeacherOnly&&(0,X.jsx)(St,{imageUrl:e.emptyImageUrl,ctaAppLink:()=>e.appLinks.allTopics(e.classification.presentationId)})]})}function Vt(){return(0,X.jsxs)(`div`,{className:`bg-white px-4`,children:[(0,X.jsx)(We,{}),(0,X.jsxs)(`div`,{className:`d-flex flex-column row-gap-3 py-3 mb-3 border-bottom`,children:[(0,X.jsx)(ze,{}),(0,X.jsx)(it,{})]})]})}var Ht={follow:()=>`{gateway}/v1/users/me/classifications/following`,unfollow:e=>N.urlBuilder(`{gateway}/v1/users/me/classifications/following`,{id:e})},Ut={follow(e,t,n,r){return{url:Ht.follow(),key:`follow:${e.join(`,`)}`,type:d.POST,data:e,formatData:()=>e.map(e=>({id:e,followers:{data:[t]}})),success:n,error:r,invalidationKeys:[...e.map(e=>`classification:${e}`),`my:subject:preferences`,`classifications`]}},unfollow(e,t,n,r){return{url:Ht.unfollow(e),key:`unfollow:${e.join(`,`)}`,type:d.DELETE,formatData:()=>e.map(e=>({id:e,followers:{data:[]}})),success:n,error:r,invalidationKeys:[...e.map(e=>`classification:${e}`),`my:subject:preferences`,`classifications`]}}},Wt={followButton:`_followButton_1ylet_2`},Gt=o.encloseNamespace(`subjects.classification`);function Kt(e){let{classification:t,analyticsData:n}=e,[r,a]=Y.useState(!1),o=pe(),s=f(),{hasPermissions:c}=de(),l=p(O.currentUser()),u=W(K.MDDown),d=W(K.SMDown),m=c(i.FollowSubjects);function h(e,r){if(!m||!t)return;let i=e.id.toString()===t.id?.toString();i&&a(!0);let c=x.isFollowing(e),u=c?Ut.unfollow:Ut.follow;s(u([e.id],l.data?.id)).then(()=>{ie.logUserAction(n,{location:r,actionType:b.Follow,workflowPhase:_.Complete,descriptor:c?g.Off:g.On,entity:v.Classification}),i||o.success(Gt(c?`unfollowed`:`followed`,{name:e.name}))}).finally(()=>{i&&a(!1)})}function S(){if(!m||!t)return[];let e=!!t.followers?.data?.length;return[{label:d?``:Gt(e?`following`:`follow`),onClick:()=>h(t,y.Banner),svg:e?H:me,className:`btn follow-btn ${e?`btn-outline-dark`:`btn-dark`} ${Wt.followButton}`,button:!0,tooltip:e||u?void 0:Gt(`followBtnTooltip`),showSpinner:r}]}return{canFollowSubjects:m,showFollowButtonSpinner:r,onToggleFollow:h,getFollowBannerActions:S}}var qt=`subjects.topicNotFoundError`,Jt=class extends s{constructor(){super(`Topic doesn't exist`)}get name(){return`TopicNotFoundError`}get heading(){return o.getPhrase(qt,`heading`)}get description(){return o.getPhrase(qt,`description`)}get cta(){return{text:o.getPhrase(qt,`cta`),appLink:{application:u.SUBJECT,action:ne.Subjects.PRESENTATION_TOPICS,args:[null]}}}};function Yt(e,t,n){let{hasTopicDirectories:r,hasTopicVideoListFeature:i}=M(null),{dashboard:a,isPreviewing:o,isTeacherOnly:s}=q({classificationId:e,queryParams:t,targetType:k.Classification}),{dashboard:c}=q({classificationId:e,queryParams:t,targetType:k.ClassificationDirectory}),{dashboard:l}=q({classificationId:e,queryParams:t,targetType:k.ClassificationCurriculum});function u(){switch(n){case k.Classification:return a;case k.ClassificationDirectory:return c;case k.ClassificationCurriculum:return l}}return{dashboard:u(),hasTopicDirectoryDashboard:r&&!!c.data,hasTopicCurriculumDashboard:i&&!!l.data,isTeacherOnly:s,isPreviewing:o}}Zt.defaultProps={queryParams:{}};var Xt=o.encloseNamespace(`subjects.classification`);function Zt(e){let t=f(),{hasPermissions:r,hasLocalPermissions:a}=de(),o=M(null),s=lt(),c=p(re.config()),l=p(O.currentUser()),{openInCurationStudioLabel:u,isUserCurator:d,getOpenInCurationStudioLink:m}=Qe(),h=Ae(),g=p(r(i.CanSubmitFeedback)&&l.data?.isAuthenticated&&te.customer(l.data.customerId)),C=p(I.classification(e.id,l.data?.id)),w=C.data?.type===ee.Hub,T=w?C.data?.id:e.queryParams.hubTopic,D=p(C.data&&I.presentationById(C.data.presentationId)),k=p(C.data&&ke.audiencesByPresentationId(C.data.presentationId)),A=p(C.data&&Le.nextTopicSpecialEvent(e.id,C.data.presentationId)),j=p(l.data?.isAuthenticated&&De.libraries()),{availablePresentations:N,canAccessPresentation:ne}=xe(),ae=p(I.path(e.id)),{dashboard:L,hasTopicDirectoryDashboard:se,hasTopicCurriculumDashboard:ce,isPreviewing:R,isTeacherOnly:B}=Yt(e.id,e.queryParams,e.targetType),V=we(),pe=fe(),H=p(I.regionAlternatives(e.id)),me=z.getPreferredRegionAlternative(H.data,l.data?.contentRegion);ue(le.getClassificationMetadata({content:{classification:C.data,dashboard:L.data},phraseContext:{phraseHandler:Xt,titlePhrase:`pageTitle`,descriptionPhrase:`pageDescription`},canonicalLink:z.getCanonicalLink({stripPresentationSlug:!0,customAppLink:he.getAppLink({...C.data,name:me?.name||C.data?.name},e.queryParams,N),hrefTransformer:z.createRegionHrefTransformer(H.data,l.data?.contentRegion)}),allowIndexing:z.allowIndexing(),hrefLang:z.getContentHrefLang(H.data,()=>he.getAppLink(C.data,{},N))})),He(C,{notFound:Jt}),Ce({id:e.id,app:`topics`});let{commonVideoProps:ve}=Ue({locationContext:y.VideoThumbnail,mtv:e.queryParams.mtv,hubTopic:T}),ye=$e({location:et.VideoItem,presentationSlug:e.presentationSlug}),U=Y.useMemo(()=>S.getActiveAudiencesFromParams(k.data,e.queryParams),[k.data,e.queryParams]),W=U?.map(e=>e.masterId)??[],G={presentationId:D.data?.id,presentationName:D.data?.name,currentClassificationId:C.data?.id,currentClassificationName:C.data?.name,followingCurrentClassification:!!C.data?.followers?.data?.length,activeAudienceNames:U?.length?U.map(e=>e.name):null,activeAudienceIds:W.length?W:null},{canFollowSubjects:K,showFollowButtonSpinner:Se,onToggleFollow:q,getFollowBannerActions:Fe}=Kt({classification:C.data,analyticsData:G}),Ie=C.data?.status===Te.ComingSoon&&!R,Re=E.getDashboardTargetType(L.data);async function ze(e){let a=await t(Me.submitFeedback({type:Ne.Footer,user:Pe.getUserInfo(l.data,g.data),tags:Pe.getTags(l.data,oe.Primary,r(i.StudentExperience),[`topics`,`in product feedback`])},{reaction:e.type,feedback:e.content,location:`Topic Footer`,presentationName:D.data.description,presentationId:D.data.id,dashboardName:L.data.name,dashboardId:L.data.id,classificationName:C.data.name,classificationId:C.data.id,currentPageUrl:n.GetCurrentUrl()}));return ie.logUserAction({feedbackType:e.type,content:e.content,presentationId:D.data.id,classificationId:C.data.id,dashboardId:L.data.id},{actionType:b.Submit,location:y.ClassificationFooter,entity:v.Feedback,workflowPhase:_.Complete}),a}function Be(){if(w||J)return[];let e=Fe();return d?[...e.map(e=>({...e,className:`${e.className} me-2`})),{label:u,href:m(P.Subject,C.data?.id,D.data?.id),openInNewTab:!0}]:e}let Ve=be(C.data,Re,{...e.queryParams,hubTopic:T},l.data,e.presentationSlug,N),We=Ze({name:C.data?.name});function Ge(){if(ne(D.data?.id))return()=>We}function Ke(e,t,n,r){let{hasTwig:i,hasTigtag:a}=je.hasTwigOrTigtag(j.data,l.data);return Oe.dashboardWidgetContent(e,t,n,D.data,{hideTigTag:!a,hideTwig:!i,cursor:r})}let J=L.data?.metadata?.channelId,qe=p(J&&Ee.partnerProfile(L.data?.metadata?.channelId));return!(c.data&&L.hasCompleted&&C.data&&D.data&&ae.data&&N&&k.data&&A.hasCompleted&&(!J||qe.hasCompleted))&&!w?(0,X.jsx)(Vt,{}):(0,X.jsx)(Ye.Provider,{value:ye,children:(0,X.jsxs)(`div`,{className:`position-relative`,children:[!!(R&&L.data)&&(0,X.jsx)(rt,{status:L.data.status,type:`topic`}),(0,X.jsx)(Bt,{dashboard:L.data,classification:C.data,channel:qe.data,getWidgetContentRequest:Ke,getWidgetContentRequestWithCursor:Ke,getBreadcrumbs:Ge(),hasPermissions:r,hasLocalPermissions:a,presentation:D.data,curriculums:h,onToggleFollow:q,getBannerActions:Be,audiences:e.queryParams.mtv?null:k.data,activeAudiences:U,analyticsData:G,imageCdnUrl:c.data.imageCdnUrl,imageUrls:ut,resourceThumbnailFallbackImageUrl:F.Fallbacks.RESOURCE_THUMBNAIL,emptyImageUrl:B?F.EmptyStates.Topics.TEACHER_ONLY:F.EmptyStates.Topics.TOPIC,isComingSoon:Ie,showFollowButtonSpinner:Se,comingSoonImageUrl:F.EmptyStates.Topics.COMING_SOON,appLinks:{...Ve,signUp:_e.getSignUpAppLink,widgetWizard:()=>null,previewQuestions:e=>ge.getPreviewQuestionsAppLink(e)},isPreviewing:R,canFollowSubjects:K,onSubmitFeedback:r(i.CanSubmitFeedback)&&ze,tableOfContentsId:e.queryParams.tocId,lazyLoad:!z.isBot(),moviesAndTv:e.queryParams.mtv,isTeacherOnly:B,specialEvent:A.data,isBot:z.isBot(),hasTopicDirectoryDashboard:se,hasTopicCurriculumDashboard:ce,tab:x.getActiveTopicTab(C.data,e.targetType),settings:o,isTertiaryCustomerWithoutExchange:V&&!pe?.hasProduct(oe.Exchange),commonVideoProps:ve,onDownloadAllClick:s})]})})}var Qt=o.encloseNamespace(`liveClassification.classificationView`);$t.defaultProps={queryParams:{}};function $t(e){let{commonVideoProps:t}=Ue({locationContext:y.VideoThumbnail}),n=$e({location:et.VideoItem,presentationSlug:e.presentationSlug}),r=Ae(),i=lt(),{openInCurationStudioLabel:a,isUserCurator:o,getOpenInCurationStudioLink:s}=Qe(`clickview-live`),c=p(re.config()),l=p(O.currentUser()),u=p(I.classification(e.id,l.data?.id)),{dashboard:d,presentation:f,isPreviewing:m}=q({targetType:k.Classification,classificationId:e.id,queryParams:e.queryParams}),h=p(f&&ke.presentationAudiences(C.StreamableLearning,f.id)),g=p(I.path(e.id,C.StreamableLearning)),_=ve(u.data,e.queryParams,e.presentationSlug);ue(le.getClassificationMetadata({content:{classification:u.data,dashboard:d.data},phraseContext:{phraseHandler:Qt,titlePhrase:`pageTitle`,descriptionPhrase:`pageDescription`},canonicalLink:z.getCanonicalLink({stripPresentationSlug:!0,customAppLink:_.classification(u.data)}),allowIndexing:z.allowIndexing()})),He(u,{notFound:Jt});let v=Y.useMemo(()=>S.getActiveAudiencesFromParams(h.data,e.queryParams),[h.data,e.queryParams]),b=v?.map(e=>e.masterId)??[],x={presentationId:f?.id,presentationName:f?.name,currentClassificationId:u.data?.id,currentClassificationName:u.data?.name,followingCurrentClassification:!!u.data?.followers?.data?.length,activeAudienceNames:v?.length?v.map(e=>e.name):null,activeAudienceIds:b.length?b:null},{canFollowSubjects:ee,showFollowButtonSpinner:w,onToggleFollow:T,getFollowBannerActions:E}=Kt({classification:u.data,analyticsData:x});function D(){let e=E();return o?[...e.map(e=>({...e,className:`${e.className} me-2`})),{label:a,href:s(P.Subject,u.data?.id,f?.id),openInNewTab:!0}]:e}function A(){return()=>ye({appLinks:_,classification:u.data,path:g.data,presentationSlug:e.presentationSlug})}return c.data&&d.hasCompleted&&u.data&&f&&g.data&&h.data?(0,X.jsx)(Ye.Provider,{value:n,children:(0,X.jsxs)(`div`,{className:`position-relative`,children:[!!(m&&d.data)&&(0,X.jsx)(rt,{status:d.data.status,type:`topic`}),(0,X.jsx)(Bt,{dashboard:d.data,classification:u.data,getWidgetContentRequest:Oe.dashboardWidgetContent,getBreadcrumbs:A(),hasPermissions:()=>!1,hasLocalPermissions:()=>!1,presentation:f,getBannerActions:D,onToggleFollow:T,showFollowButtonSpinner:w,audiences:h.data,activeAudiences:v,analyticsData:x,imageCdnUrl:c.data.imageCdnUrl,imageUrls:ut,resourceThumbnailFallbackImageUrl:F.Live.Fallbacks.RESOURCE_THUMBNAIL,emptyImageUrl:F.Live.EmptyStates.Topics.TOPIC,appLinks:_,isPreviewing:m,isViewCurrentPresentation:!0,canFollowSubjects:ee,tableOfContentsId:e.queryParams.tocId,lazyLoad:!z.isBot(),isTeacherOnly:!1,contentType:j.Livestream,hasTopicDirectoryDashboard:!1,hasTopicCurriculumDashboard:!1,isTertiaryCustomerWithoutExchange:!1,tab:`curated-topic`,curriculums:r,commonVideoProps:t,onDownloadAllClick:i})]})}):(0,X.jsx)(Vt,{})}var en=Fe({[C.Subject]:e=>(0,X.jsx)(Zt,{presentationSlug:e.presentationSlug,id:e.id,queryParams:e.queryParams,targetType:e.targetType},`${e.id}:${e.targetType}`),[C.StreamableLearning]:e=>e.targetType===k.Classification?(0,X.jsx)($t,{presentationSlug:e.presentationSlug,id:e.id,queryParams:e.queryParams},`${e.id}:${e.targetType}`):null});en.displayName=`BaseClassificationView`;export{en as BaseClassificationView};
2
- //# sourceMappingURL=D2_GYzlb.chunk.js.map
1
+ import{o as e}from"./DAXXjFlN.chunk.js";import{r as t}from"./D8uRDrkd.chunk.js";import{x as n,y as r}from"./BftnFbcr.chunk.js";import{n as i,t as a}from"./B785hxeE.chunk.js";import{t as o}from"./CQyJ7YGa.chunk.js";import{t as s}from"./CPKixrGf.chunk.js";import{t as c}from"./C2w0pmFW.chunk.js";import{t as l}from"./wrLrTezN.chunk.js";import{t as u}from"./BXTI9cmX.chunk.js";import{C as d,p as f,u as p}from"./BX0wDJmp.chunk.js";import{t as m}from"./C1SLt-ar.chunk.js";import{N as h,P as g,U as _,l as v,y,z as b}from"./NlCAcBdo.chunk.js";import{n as x}from"./CAs8k4pN.chunk.js";import{t as S}from"./RjGIOTdP.chunk.js";import{n as ee,t as C}from"./DTGfiG8Y.chunk.js";import{a as w,i as T,r as E,t as D}from"./Cr6TXzQQ2.chunk.js";import{t as O}from"./oPIkfKWW2.chunk.js";import{n as k,t as A}from"./CmcCVXi32.chunk.js";import{t as j}from"./Dat7ugzw2.chunk.js";import{t as M}from"./CcDvlSWl2.chunk.js";import{t as N}from"./DZX1tZ-D2.chunk.js";import{t as te}from"./xwiwWcv12.chunk.js";import{t as P}from"./CVHQXNzi2.chunk.js";import{t as ne}from"./DdsRCMkN.chunk.js";import{t as re}from"./D_gWf2lC.chunk.js";import{t as ie}from"./CYEpX3hx.chunk.js";import{t as F}from"./PgzMrOyM.chunk.js";import{t as ae}from"./C5rBgkQH.chunk.js";import{t as I}from"./B0aLOQEJ2.chunk.js";import{t as L}from"./klg9VDIV2.chunk.js";import{t as oe}from"./QCFxJYkI2.chunk.js";import{t as se}from"./Ci5E3nqm2.chunk.js";import{t as ce}from"./9LNlP5yJ.chunk.js";import{t as R}from"./Vp01-r6R.chunk.js";import{n as le,t as ue}from"./A8xLZrSw.chunk.js";import{t as de}from"./BQKcAczf.chunk.js";import{t as fe}from"./D3WOV5RE.chunk.js";import{t as z}from"./DR9DEoQL.chunk.js";import{n as B,t as V}from"./CpFtf-tI2.chunk.js";import{t as pe}from"./CXnhm0VS2.chunk.js";import{t as H}from"./YmXEsLuD.chunk.js";import{t as me}from"./CEtJop-5.chunk.js";import{t as he}from"./Delmxf6C.chunk.js";import{t as ge}from"./9PCtVxot.chunk.js";import{t as _e}from"./D0bhWkNM.chunk.js";import{n as ve,r as ye,t as be}from"./D4jQxS0H.chunk.js";import{t as U}from"./CuVGnzB82.chunk.js";import{t as W}from"./C7HU4huj.chunk.js";import{t as G}from"./5ONJSThP.chunk.js";import{t as xe}from"./DOnmTMfX.chunk.js";import{t as K}from"./9kSpxveW.chunk.js";import{t as Se}from"./DDJBf9pK.chunk.js";import{n as Ce}from"./B-eFTZdx2.chunk.js";import{t as we}from"./QOx-iXyN2.chunk.js";import{t as Te}from"./DBHDBu1Y.chunk.js";import{t as Ee}from"./GhOuBMgg.chunk.js";import{t as De}from"./DMZ_X3HL.chunk.js";import{t as Oe}from"./DewCxv4i.chunk.js";import{t as ke}from"./DMaQV7L2.chunk.js";import{t as Ae}from"./CETzluXN.chunk.js";import{t as q}from"./NVkf8UeY.chunk.js";import{t as je}from"./DmKYYMW8.chunk.js";import{n as Me,r as Ne,t as Pe}from"./f5U4vAvn2.chunk.js";import{t as Fe}from"./D7UO1XFN2.chunk.js";import{t as Ie}from"./DELN_PAD2.chunk.js";import{t as Le}from"./AEt1phMH2.chunk.js";import{t as Re}from"./QDUcHuL-2.chunk.js";import{n as ze,t as Be}from"./C2pEjcxD.chunk.js";import{t as Ve}from"./CJPrWMiv.chunk.js";import{t as He}from"./D0n6BTgT.chunk.js";import{t as Ue}from"./BmR4qY-v2.chunk.js";import{n as We,t as Ge}from"./y3q_PHh_.chunk.js";import{a as Ke,o as J,t as qe}from"./CajcIz6S.chunk.js";import{i as Je}from"./Dw_ycuUx.chunk.js";import{o as Ye,r as Xe}from"./YcLj4o6h.chunk.js";import{t as Ze}from"./cX5MHowe.chunk.js";import{r as Qe}from"./CHQUozwb.chunk.js";import{n as $e,t as et}from"./DWeyYfUG.chunk.js";import{t as tt}from"./B1ag1ah72.chunk.js";import{t as nt}from"./DFrZwydG2.chunk.js";import{t as rt}from"./CtWAorP42.chunk.js";import{n as it,t as at}from"./CyLi05602.chunk.js";import{i as ot,n as st,r as ct,t as lt}from"./BgblOoyL2.chunk.js";import{t as ut}from"./CaJxXKnx.chunk.js";var Y=e(c()),X=l(),dt=`subject.classificationHeaderDetails`,ft=({className:e})=>(0,X.jsx)(`span`,{className:e,children:`•`});function pt(e){let{dashboardVideoCount:t,childDashboardVideoCount:n,dashboardResourceCount:r,childDashboardResourceCount:i,childClassificationCount:a}=x.getCounts(e.classification),o=t+n,s=r+i;return(0,X.jsxs)(`p`,{className:`mb-n1 font-size-normal fw-normal mt-1`,children:[!!a&&(0,X.jsx)(B,{namespace:dt,phrase:`topics`,options:{count:a.toLocaleString(),smartCount:a}}),!!o&&(0,X.jsxs)(X.Fragment,{children:[a>0&&(0,X.jsx)(ft,{className:`mx-2`}),(0,X.jsx)(B,{namespace:dt,phrase:`videos`,options:{count:o.toLocaleString(),smartCount:o}})]}),!!s&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(ft,{className:`mx-2`}),(0,X.jsx)(B,{namespace:dt,phrase:`resources`,options:{count:s.toLocaleString(),smartCount:s}})]})]})}var Z=`subjects.curatedClassificationEmptyState`,mt=o.encloseNamespace(Z);function ht(e){let n=e.dashboard?.status===A.Archived;return(0,X.jsx)(V.Provider,{value:Z,children:(0,X.jsxs)(R,{children:[(0,X.jsx)(R.Image,{src:e.imageUrl,altText:mt(`headingForNP`)}),e.isReadonly?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(R.Heading,{children:(0,X.jsx)(B,{namespace:Z,phrase:`headingForCurator`})}),(0,X.jsx)(R.Info,{children:(0,X.jsx)(B,{namespace:Z,phrase:`info`})}),(0,X.jsx)(t,{title:n?o.getPhrase(Z,`archivedCtaTooltip`):``,spanHack:!0,children:(0,X.jsx)(R.Cta,{text:o.getPhrase(Z,`add`),appLink:e.addWidgetApplink?.(),className:`btn btn-dark`,icon:Se,disabled:n})})]}):(0,X.jsx)(R.Heading,{children:(0,X.jsx)(B,{phrase:`headingForNP`})})]})})}var gt={container:`_container_1n8qw_1`,mobile:`_mobile_1n8qw_7`};function _t(e){let[t,n]=Y.useState(!1);function r(){let n={actionType:t?b.Hide:b.Open,entity:v.TableOfContents,location:y.Dashboard};ie.logUserAction(e.analyticsData,n)}function i(){n(!t),r()}return(0,X.jsxs)(`div`,{className:`${gt.mobile} d-inline-flex gap-1`,children:[t&&(0,X.jsxs)(`div`,{className:`bg-white px-3 pt-3 pb-2 border border-dark rounded-1 ps-3`,children:[(0,X.jsx)(`h2`,{className:`h5`,children:e.title}),(0,X.jsx)(st,{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,X.jsx)(`div`,{className:gt.container,children:(0,X.jsx)(ce,{className:`btn btn-outline-dark`,svg:Ie,onClick:i})})]})}function vt(e){return(0,X.jsx)(`aside`,{className:`col-3 order-1`,children:(0,X.jsxs)(`div`,{className:`${gt.container} ps-3`,children:[(0,X.jsx)(`h2`,{className:`h5`,children:e.title}),(0,X.jsx)(st,{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 yt(e){function t(e){let t=L.getCurrentRoute().appLink,n=t.params?{...t.params}:{};return n.tocId=e.id,{...t,params:n}}return(0,X.jsx)(X.Fragment,{children:e.isSmallScreen?(0,X.jsx)(_t,{...e,getAppLink:t}):(0,X.jsx)(vt,{...e,getAppLink:t})})}var bt=`subjects.teacherOnlyEmptyState`,xt=o.encloseNamespace(bt);function St(e){return(0,X.jsx)(V.Provider,{value:bt,children:(0,X.jsxs)(R,{children:[(0,X.jsx)(R.Image,{src:e.imageUrl,altText:xt(`heading`)}),(0,X.jsx)(R.Heading,{children:(0,X.jsx)(B,{phrase:`heading`})}),(0,X.jsx)(R.Info,{children:(0,X.jsx)(B,{phrase:`info`})}),(0,X.jsx)(R.Cta,{text:xt(`cta`),appLink:e.ctaAppLink?.(),className:`btn btn-dark`})]})})}function Ct(e,t){let{isSystemGeneratedDashboard:n,systemGeneratedVideoWidget:r}=Y.useMemo(()=>e?{isSystemGeneratedDashboard:E.isSystemGeneratedDashboard(e.widgets),systemGeneratedVideoWidget:e.widgets.find(e=>e.widgetId===T.ClassificationPinnedVideos&&e.templateId!==w.ThumbnailVerticalList)}:{isSystemGeneratedDashboard:!1,systemGeneratedVideoWidget:null},[e?.id]),i=p(!!r&&Oe.dashboardWidgetContent(r?.id,E.getWidgetParams(r.widgetId,r.templateId,E.getDashboardTargetType(e),t?.map(e=>e.masterId)),r?.templateId));return n?{widgets:e?.widgets?.filter(e=>e.widgetId!==T.ClassificationPinnedVideos||e.templateId===w.ThumbnailVerticalList)??[],videoList:i.data?.content??[],videoListWidgetId:r?.id}:{widgets:m.sortBy(e?.widgets,`index`)}}var wt=`subjects.classificationComingSoon`,Tt=o.encloseNamespace(wt);function Et(e){let t=!!e.data.followers?.data?.length;function n(){e.onToggleFollow?.()}return(0,X.jsx)(V.Provider,{value:wt,children:(0,X.jsxs)(R,{className:`pt-0`,children:[(0,X.jsx)(R.Image,{src:e.imageUrl,altText:Tt(`comingSoon`)}),(0,X.jsx)(R.Heading,{children:(0,X.jsx)(B,{phrase:`comingSoon`})}),(0,X.jsx)(R.Info,{children:(0,X.jsx)(B,{phrase:e.showSignUp?`infoAnon`:`info`})}),e.canFollowSubjects&&(0,X.jsx)(U,{svg:t?H:me,onClick:n,showSpinner:e.showFollowButtonSpinner,className:`btn follow-btn me-2 ${t?`btn-outline-dark`:`btn-dark`}`,children:(0,X.jsx)(B,{phrase:t?`following`:`follow`})}),e.showSignUp&&!e.canFollowSubjects&&(0,X.jsx)(se,{appLink:e.signUpAppLink,className:`btn btn-dark d-none d-lg-inline-block`,analyticsOptions:{actionType:b.Click,location:y.ClassificationComingSoon,entity:v.AppLink,workflowPhase:_.Start,descriptor:h.SignUp},analyticsData:{},tag:`button`,children:Tt(`signUp`)})]})})}function Dt(e){return(0,X.jsx)(at,{audiences:e.audiences,activeAudiences:e.activeAudiences,disabled:e.disabled,appLink:e.appLink,disablePersist:e.disablePersist,tooltip:e.tooltip})}function Ot(e){return(0,X.jsx)(`svg`,{...e,children:(0,X.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 kt(e){let[t,n]=ae(`directory:product:tip:switcher`,{on:!1,tab:e||`new-releases`});return Y.useEffect(()=>{e&&n(`tab`,e)},[e]),Y.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 Q={curatedTopicTab:`_curatedTopicTab_1ji5o_1`,tabTransition:`_tabTransition_1ji5o_4`},$=`shared.classificationDashboard`;function At(e,t,n,i){let a=t.lg||t.xl||t.xxl||t.xs;function s(){let e=i?Q.tabTransition:``;return t.xs?e+` w-100`:a?e=` ${Q.curatedTopicTab}`:e}return x.isTopLevelTopic(e.classification)?[{name:a?o.getPhrase($,`newReleases`):``,appLink:e.appLinks?.classification?.(e.classification),active:n===`new-releases`,svg:Je,analyticsData:{id:`new-releases`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:o.getPhrase($,`newReleases`),url:r.getHref(e.appLinks?.classification?.(e.classification))},analyticsOptions:{actionType:b.Click,entity:v.Url,location:y.MagicTabs},className:`${t.xs?`w-100`:``} ${i?Q.tabTransition:``}`},{name:a?o.getPhrase($,`allTopics`):``,appLink:e.appLinks?.classificationDirectory?.(e.classification),active:n===`all-topics`,svg:J,analyticsData:{id:`all-topics`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:o.getPhrase($,`allTopics`),url:r.getHref(e.appLinks?.classificationDirectory?.(e.classification))},analyticsOptions:{actionType:b.Click,entity:v.Url,location:y.MagicTabs},className:`${t.xs?`w-100`:``} ${i?Q.tabTransition:``}`}]:[{name:a?o.getPhrase($,`topic`):``,appLink:e.appLinks?.classification?.(e.classification),active:n===`curated-topic`,svg:Ke,analyticsData:{id:`curated-topic`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:o.getPhrase($,`topic`),url:r.getHref(e.appLinks?.classification?.(e.classification))},analyticsOptions:{actionType:b.Click,entity:v.Url,location:y.MagicTabs},className:s()},{name:a?o.getPhrase($,`curriculum`):``,appLink:e.appLinks?.classificationCurriculum?.(e.classification),active:n===`curriculum`,svg:Ot,analyticsData:{id:`curriculum`,classificationId:e.classification.id,classificationName:e.classification.name,presentationId:e.presentation.id,presentationDescription:e.presentation.description,name:o.getPhrase($,`curriculum`),url:r.getHref(e.appLinks?.classificationCurriculum?.(e.classification))},analyticsOptions:{actionType:b.Click,entity:v.Url,location:y.MagicTabs},className:`${t.xs?`w-100`:``} ${i?Q.tabTransition:``}`}]}function jt(e){let t=G(),{tab:n,isHighlighting:r}=kt(e.activeTab);return(0,X.jsx)(Ve,{borderRadius:`sm`,className:t.xs?`w-100`:``,listClassName:`d-flex flex-nowrap`,tabs:At(e,t,n,r)})}function Mt(e,t,n,r,i){return!!(i||r&&!t?.length||!S.shouldShowAudiences(e)||n===`curriculum`)}function Nt(e){let t=G(),n=e.forceHideAudiences||Mt(e.audiences,e.activeAudiences,e.activeTab,e.isEmpty,e.isComingSoon);function r(){return!e.classification||!e.dashboard||E.isSystemGeneratedDashboard(e.dashboard.widgets)?!1:x.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,X.jsxs)(`div`,{className:i(),children:[(0,X.jsxs)(`div`,{className:a(),children:[(0,X.jsx)(Be,{breadcrumbs:e.getBreadcrumbs?.()}),r()&&n&&(0,X.jsx)(jt,{classification:e.classification,activeTab:e.activeTab,appLinks:e.appLinks,presentation:e.presentation})]}),(0,X.jsxs)(`div`,{className:o(),children:[!n&&(0,X.jsx)(Dt,{audiences:e.audiences,activeAudiences:e.activeAudiences,appLink:e.appLinks.audience?.(),disabled:e.disableAudiences,tooltip:e.audienceTooltip,disablePersist:!e.isViewingCurrentPresentation}),r()&&!n&&(0,X.jsx)(jt,{classification:e.classification,activeTab:e.activeTab,appLinks:e.appLinks,presentation:e.presentation})]})]})}var Pt=`shared.classificationDashboard`;function Ft(e){return e.widgetId===T.Blurb&&e.templateId===w.Heading}function It(e){return e.widgetId===T.CuratedClassifications||e.widgetId===T.Classifications}var Lt=[T.ClassificationAllVideos];function Rt(e,t){let n=e[t];return n?Lt.includes(n.widgetId)&&t===e.length-1:!1}function zt(e){let t=e?.[0];return t?D.hasNoContent(t.widgetId)?!1:!t.content||Array.isArray(t.content)&&!t.content.length:!0}Bt.defaultProps={appLinks:{}};function Bt(e){let{widgets:t,videoList:n,videoListWidgetId:r}=Ct(e.dashboard,e.activeAudiences),i=W(K.LGDown),s=Y.useRef(new Set),c=Y.useMemo(()=>t.reduce((e,t)=>(e[t.id]=!1,e),{}),[t?.length]),[l,u]=Y.useState(c),[d,f]=Y.useState(e.tableOfContentsId),[p,m]=Y.useState(``),h=Array.from(s.current);ct(h,d),ot({setActiveId:m,headingElements:h,controlledId:d,setControlledId:f});let g=e.classification.type===ee.Hub,_=!!e.dashboard?.metadata?.channelId;function v(){return e.isComingSoon||e.isTeacherOnly?!1:!e.dashboard||e.dashboard.status===A.Archived&&!e.isReadonly||e.dashboard.status===A.Draft&&!e.isPreviewing||!t?.length?!0:n&&n.length?!1:Object.values(l).every(e=>!!e)}function b(t,n,r,i){let a=E.getWidgetParams(n,r,E.getDashboardTargetType(e.dashboard),e.activeAudiences?.map(e=>e.masterId),e.curriculums.preferredCurriculum?.id);return i&&e.getWidgetContentRequestWithCursor?e.getWidgetContentRequestWithCursor(t,a,r,i):e.getWidgetContentRequest(t,a,r)}let S=v();Y.useEffect(()=>{S&&u(c)},[t?.length]);let C=Y.useCallback((n,r)=>{if(l[n]===r)return;let i={...l,[n]:r};if(E.isType(e.dashboard,k.ClassificationDirectory)){u(i);return}let a=0;for(;a<t.length;){let e=t[a];if(!Ft(e)){a++;continue}let n=!0,r=a+1;for(;n&&r<t.length;){let e=t[r];if(Ft(e))break;!i[e.id]&&!It(e)&&(n=!1),r++}a=r,i[e.id]=n}u(i)},[l,t]);function w(e){return Ft(e)&&l[e.id]}function O(){let t=E.getDashboardTargetType(e.dashboard);return!(e.moviesAndTv||t===k.ClassificationCurriculum)}function j(e,n){if(e.widgetId===T.ClassificationDashboardExternalMedia){let r=t[n-1];return l[r.id]?e.name.replace(`Other videos`,`Videos`):e.name}return e.name}let M=t.filter(e=>!w(e)&&!!e.metadata?.showInTableOfContents),N=t.every(It),te=M.length>=2,P=te&&!i,ne=e.settings?.hasTopicDirectories&&x.isTopLevelTopic(e.classification)&&!e.isTertiaryCustomerWithoutExchange&&!g;return(0,X.jsxs)(`div`,{className:`bg-white px-4 ${O()?`dashboard-spacing-lg`:``}`,children:[(0,X.jsx)(Ge,{type:_?`channel-topic`:`default`,logo:_&&e.channel?._logo.value,logoBgColour:_&&e.channel?._colour.value,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:ne?()=>(0,X.jsx)(pt,{classification:e.classification}):null}),g?(0,X.jsx)(`div`,{className:`py-3 mb-3 border-bottom`,children:(0,X.jsx)(`div`,{className:`mt-3`,children:(0,X.jsx)(nt,{children:()=>(0,X.jsx)(`p`,{className:`mb-0`,children:e.classification.description})})})}):(0,X.jsx)(Nt,{forceHideAudiences:_,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:S,isViewingCurrentPresentation:e.isViewCurrentPresentation,disableAudiences:N||e.isReadonly,audienceTooltip:N?o.getPhrase(Pt,`audienceTooltip`):``}),e.isComingSoon&&(0,X.jsx)(Et,{imageUrl:e.comingSoonImageUrl,data:e.classification,canFollowSubjects:e.canFollowSubjects,showFollowButtonSpinner:e.showFollowButtonSpinner,onToggleFollow:()=>e.onToggleFollow(e.classification,y.ClassificationComingSoon),showSignUp:!e.hasLocalPermissions(a.FollowComingSoonTopics),signUpAppLink:e.appLinks.signUp?.()}),!e.isComingSoon&&(0,X.jsxs)(`div`,{className:`${P?`row no-wrap`:``}`,children:[te&&(0,X.jsx)(yt,{widgets:M,title:e.classification.name,activeId:p,clickable:!e.isReadonly,analyticsData:e.analyticsData,setControlledId:f,isSmallScreen:i}),(0,X.jsx)(`div`,{className:P?`col-9 order-0`:``,children:t.map((n,r)=>w(n)?(0,X.jsx)(Y.Fragment,{},n.id):Lt.includes(n.widgetId)?(0,X.jsx)(tt,{index:r,item:n,infiniteFetch:Rt(t,r)&&!!e.getWidgetContentRequestWithCursor,dashboardTarget:E.getDashboardTargetType(e.dashboard),getName:e=>j(e,r),getWidgetMetadata:e=>e.metadata,getContent:e=>e.content,getCursor:e=>e.cursor,getRequest:e=>b(n.id,n.widgetId,n.templateId,e),isEmptyPredicate:zt,audiences:e.audiences,appLinks:e.appLinks,commonVideoProps:e.commonVideoProps,hasPermissions:e.hasPermissions,hasLocalPermissions:e.hasLocalPermissions,resultsTransformers:D.getWidgetResultsTransformers(),presentation:e.presentation,analyticsData:e.analyticsData,imageCdnUrl:e.imageCdnUrl,imageUrls:e.imageUrls,resourceThumbnailFallbackImageUrl:e.resourceThumbnailFallbackImageUrl,lazyLoad:e.lazyLoad,headingElementRef:s,hasTableOfContents:P,isScrollToTargetWidget:e.scrollToWidgetId===n.id,isBot:e.isBot,isPreviewing:e.isReadonly,isEditing:e.isReadonly,curriculums:e.curriculums,contentType:e.contentType,setIsEmpty:e=>C(n.id,e),getSelectedItems:null,appLinkOptions:null},n.id):(0,X.jsx)(qe,{widgetCollection:k.Classification,headingElementRef:s,id:n.id,name:j(n,r),description:n.description,classification:e.classification,templateId:n.templateId,widgetTypeId:n.widgetId,audiences:e.audiences,getContentRequest:b,setIsEmpty:C,appLinks:e.appLinks,presentation:e.presentation,analyticsData:e.analyticsData,isScrollToTargetWidget:e.scrollToWidgetId===n.id,imageCdnUrl:e.imageCdnUrl,imageUrls:e.imageUrls,onSubmitFeedback:e.onSubmitFeedback,onDownloadAllClick:e.onDownloadAllClick,metadata:n.metadata,isBot:e.isBot,hasTableOfContents:P,lazyLoad:e.lazyLoad,dashboardTarget:E.getDashboardTargetType(e.dashboard),widgetIndex:r,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},n.id))}),!!n?.length&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Re,{name:o.getPhrase(Pt,`videos`)}),(0,X.jsx)(Xe,{videos:n,getVideoAppLink:(t,n)=>e.appLinks.videoType(t,{...n,contextId:r,includeContext:n.includeContext}),hasPermissions:e.hasPermissions,presentationAudiences:e.audiences,getPreviewQuestionsAppLink:e.appLinks.previewQuestions,commonVideoProps:e.commonVideoProps})]})]}),S&&(0,X.jsx)(ht,{dashboard:e.dashboard,isReadonly:e.isReadonly,imageUrl:e.emptyImageUrl,addWidgetApplink:e.appLinks.widgetWizard}),e.isTeacherOnly&&(0,X.jsx)(St,{imageUrl:e.emptyImageUrl,ctaAppLink:()=>e.appLinks.allTopics(e.classification.presentationId)})]})}function Vt(){return(0,X.jsxs)(`div`,{className:`bg-white px-4`,children:[(0,X.jsx)(We,{}),(0,X.jsxs)(`div`,{className:`d-flex flex-column row-gap-3 py-3 mb-3 border-bottom`,children:[(0,X.jsx)(ze,{}),(0,X.jsx)(it,{})]})]})}var Ht={follow:()=>`{gateway}/v1/users/me/classifications/following`,unfollow:e=>N.urlBuilder(`{gateway}/v1/users/me/classifications/following`,{id:e})},Ut={follow(e,t,n,r){return{url:Ht.follow(),key:`follow:${e.join(`,`)}`,type:d.POST,data:e,formatData:()=>e.map(e=>({id:e,followers:{data:[t]}})),success:n,error:r,invalidationKeys:[...e.map(e=>`classification:${e}`),`my:subject:preferences`,`classifications`]}},unfollow(e,t,n,r){return{url:Ht.unfollow(e),key:`unfollow:${e.join(`,`)}`,type:d.DELETE,formatData:()=>e.map(e=>({id:e,followers:{data:[]}})),success:n,error:r,invalidationKeys:[...e.map(e=>`classification:${e}`),`my:subject:preferences`,`classifications`]}}},Wt={followButton:`_followButton_1ylet_2`},Gt=o.encloseNamespace(`subjects.classification`);function Kt(e){let{classification:t,analyticsData:n}=e,[r,a]=Y.useState(!1),o=pe(),s=f(),{hasPermissions:c}=de(),l=p(O.currentUser()),u=W(K.MDDown),d=W(K.SMDown),m=c(i.FollowSubjects);function h(e,r){if(!m||!t)return;let i=e.id.toString()===t.id?.toString();i&&a(!0);let c=x.isFollowing(e),u=c?Ut.unfollow:Ut.follow;s(u([e.id],l.data?.id)).then(()=>{ie.logUserAction(n,{location:r,actionType:b.Follow,workflowPhase:_.Complete,descriptor:c?g.Off:g.On,entity:v.Classification}),i||o.success(Gt(c?`unfollowed`:`followed`,{name:e.name}))}).finally(()=>{i&&a(!1)})}function S(){if(!m||!t)return[];let e=!!t.followers?.data?.length;return[{label:d?``:Gt(e?`following`:`follow`),onClick:()=>h(t,y.Banner),svg:e?H:me,className:`btn follow-btn ${e?`btn-outline-dark`:`btn-dark`} ${Wt.followButton}`,button:!0,tooltip:e||u?void 0:Gt(`followBtnTooltip`),showSpinner:r}]}return{canFollowSubjects:m,showFollowButtonSpinner:r,onToggleFollow:h,getFollowBannerActions:S}}var qt=`subjects.topicNotFoundError`,Jt=class extends s{constructor(){super(`Topic doesn't exist`)}get name(){return`TopicNotFoundError`}get heading(){return o.getPhrase(qt,`heading`)}get description(){return o.getPhrase(qt,`description`)}get cta(){return{text:o.getPhrase(qt,`cta`),appLink:{application:u.SUBJECT,action:ne.Subjects.PRESENTATION_TOPICS,args:[null]}}}};function Yt(e,t,n){let{hasTopicDirectories:r,hasTopicVideoListFeature:i}=M(null),{dashboard:a,isPreviewing:o,isTeacherOnly:s}=q({classificationId:e,queryParams:t,targetType:k.Classification}),{dashboard:c}=q({classificationId:e,queryParams:t,targetType:k.ClassificationDirectory}),{dashboard:l}=q({classificationId:e,queryParams:t,targetType:k.ClassificationCurriculum});function u(){switch(n){case k.Classification:return a;case k.ClassificationDirectory:return c;case k.ClassificationCurriculum:return l}}return{dashboard:u(),hasTopicDirectoryDashboard:r&&!!c.data,hasTopicCurriculumDashboard:i&&!!l.data,isTeacherOnly:s,isPreviewing:o}}Zt.defaultProps={queryParams:{}};var Xt=o.encloseNamespace(`subjects.classification`);function Zt(e){let t=f(),{hasPermissions:r,hasLocalPermissions:a}=de(),o=M(null),s=lt(),c=p(re.config()),l=p(O.currentUser()),{openInCurationStudioLabel:u,isUserCurator:d,getOpenInCurationStudioLink:m}=Qe(),h=Ae(),g=p(r(i.CanSubmitFeedback)&&l.data?.isAuthenticated&&te.customer(l.data.customerId)),C=p(I.classification(e.id,l.data?.id)),w=C.data?.type===ee.Hub,T=w?C.data?.id:e.queryParams.hubTopic,D=p(C.data&&I.presentationById(C.data.presentationId)),k=p(C.data&&ke.audiencesByPresentationId(C.data.presentationId)),A=p(C.data&&Le.nextTopicSpecialEvent(e.id,C.data.presentationId)),j=p(l.data?.isAuthenticated&&De.libraries()),{availablePresentations:N,canAccessPresentation:ne}=xe(),ae=p(I.path(e.id)),{dashboard:L,hasTopicDirectoryDashboard:se,hasTopicCurriculumDashboard:ce,isPreviewing:R,isTeacherOnly:B}=Yt(e.id,e.queryParams,e.targetType),V=we(),pe=fe(),H=p(I.regionAlternatives(e.id)),me=z.getPreferredRegionAlternative(H.data,l.data?.contentRegion);ue(le.getClassificationMetadata({content:{classification:C.data,dashboard:L.data},phraseContext:{phraseHandler:Xt,titlePhrase:`pageTitle`,descriptionPhrase:`pageDescription`},canonicalLink:z.getCanonicalLink({stripPresentationSlug:!0,customAppLink:he.getAppLink({...C.data,name:me?.name||C.data?.name},e.queryParams,N),hrefTransformer:z.createRegionHrefTransformer(H.data,l.data?.contentRegion)}),allowIndexing:z.allowIndexing(),hrefLang:z.getContentHrefLang(H.data,()=>he.getAppLink(C.data,{},N))})),He(C,{notFound:Jt}),Ce({id:e.id,app:`topics`});let{commonVideoProps:ve}=Ue({locationContext:y.VideoThumbnail,mtv:e.queryParams.mtv,hubTopic:T}),ye=$e({location:et.VideoItem,presentationSlug:e.presentationSlug}),U=Y.useMemo(()=>S.getActiveAudiencesFromParams(k.data,e.queryParams),[k.data,e.queryParams]),W=U?.map(e=>e.masterId)??[],G={presentationId:D.data?.id,presentationName:D.data?.name,currentClassificationId:C.data?.id,currentClassificationName:C.data?.name,followingCurrentClassification:!!C.data?.followers?.data?.length,activeAudienceNames:U?.length?U.map(e=>e.name):null,activeAudienceIds:W.length?W:null},{canFollowSubjects:K,showFollowButtonSpinner:Se,onToggleFollow:q,getFollowBannerActions:Fe}=Kt({classification:C.data,analyticsData:G}),Ie=C.data?.status===Te.ComingSoon&&!R,Re=E.getDashboardTargetType(L.data);async function ze(e){let a=await t(Me.submitFeedback({type:Ne.Footer,user:Pe.getUserInfo(l.data,g.data),tags:Pe.getTags(l.data,oe.Primary,r(i.StudentExperience),[`topics`,`in product feedback`])},{reaction:e.type,feedback:e.content,location:`Topic Footer`,presentationName:D.data.description,presentationId:D.data.id,dashboardName:L.data.name,dashboardId:L.data.id,classificationName:C.data.name,classificationId:C.data.id,currentPageUrl:n.GetCurrentUrl()}));return ie.logUserAction({feedbackType:e.type,content:e.content,presentationId:D.data.id,classificationId:C.data.id,dashboardId:L.data.id},{actionType:b.Submit,location:y.ClassificationFooter,entity:v.Feedback,workflowPhase:_.Complete}),a}function Be(){if(w||J)return[];let e=Fe();return d?[...e.map(e=>({...e,className:`${e.className} me-2`})),{label:u,href:m(P.Subject,C.data?.id,D.data?.id),openInNewTab:!0}]:e}let Ve=be(C.data,Re,{...e.queryParams,hubTopic:T},l.data,e.presentationSlug,N),We=Ze({name:C.data?.name});function Ge(){if(ne(D.data?.id))return()=>We}function Ke(e,t,n,r){let{hasTwig:i,hasTigtag:a}=je.hasTwigOrTigtag(j.data,l.data);return Oe.dashboardWidgetContent(e,t,n,D.data,{hideTigTag:!a,hideTwig:!i,cursor:r})}let J=L.data?.metadata?.channelId,qe=p(J&&Ee.partnerProfile(L.data?.metadata?.channelId));return!(c.data&&L.hasCompleted&&C.data&&D.data&&ae.data&&N&&k.data&&A.hasCompleted&&(!J||qe.hasCompleted))&&!w?(0,X.jsx)(Vt,{}):(0,X.jsx)(Ye.Provider,{value:ye,children:(0,X.jsxs)(`div`,{className:`position-relative`,children:[!!(R&&L.data)&&(0,X.jsx)(rt,{status:L.data.status,type:`topic`}),(0,X.jsx)(Bt,{dashboard:L.data,classification:C.data,channel:qe.data,getWidgetContentRequest:Ke,getWidgetContentRequestWithCursor:Ke,getBreadcrumbs:Ge(),hasPermissions:r,hasLocalPermissions:a,presentation:D.data,curriculums:h,onToggleFollow:q,getBannerActions:Be,audiences:e.queryParams.mtv?null:k.data,activeAudiences:U,analyticsData:G,imageCdnUrl:c.data.imageCdnUrl,imageUrls:ut,resourceThumbnailFallbackImageUrl:F.Fallbacks.RESOURCE_THUMBNAIL,emptyImageUrl:B?F.EmptyStates.Topics.TEACHER_ONLY:F.EmptyStates.Topics.TOPIC,isComingSoon:Ie,showFollowButtonSpinner:Se,comingSoonImageUrl:F.EmptyStates.Topics.COMING_SOON,appLinks:{...Ve,signUp:_e.getSignUpAppLink,widgetWizard:()=>null,previewQuestions:e=>ge.getPreviewQuestionsAppLink(e)},isPreviewing:R,canFollowSubjects:K,onSubmitFeedback:r(i.CanSubmitFeedback)&&ze,tableOfContentsId:e.queryParams.tocId,lazyLoad:!z.isBot(),moviesAndTv:e.queryParams.mtv,isTeacherOnly:B,specialEvent:A.data,isBot:z.isBot(),hasTopicDirectoryDashboard:se,hasTopicCurriculumDashboard:ce,tab:x.getActiveTopicTab(C.data,e.targetType),settings:o,isTertiaryCustomerWithoutExchange:V&&!pe?.hasProduct(oe.Exchange),commonVideoProps:ve,onDownloadAllClick:s})]})})}var Qt=o.encloseNamespace(`liveClassification.classificationView`);$t.defaultProps={queryParams:{}};function $t(e){let{commonVideoProps:t}=Ue({locationContext:y.VideoThumbnail}),n=$e({location:et.VideoItem,presentationSlug:e.presentationSlug}),r=Ae(),i=lt(),{openInCurationStudioLabel:a,isUserCurator:o,getOpenInCurationStudioLink:s}=Qe(`clickview-live`),c=p(re.config()),l=p(O.currentUser()),u=p(I.classification(e.id,l.data?.id)),{dashboard:d,presentation:f,isPreviewing:m}=q({targetType:k.Classification,classificationId:e.id,queryParams:e.queryParams}),h=p(f&&ke.presentationAudiences(C.StreamableLearning,f.id)),g=p(I.path(e.id,C.StreamableLearning)),_=ve(u.data,e.queryParams,e.presentationSlug);ue(le.getClassificationMetadata({content:{classification:u.data,dashboard:d.data},phraseContext:{phraseHandler:Qt,titlePhrase:`pageTitle`,descriptionPhrase:`pageDescription`},canonicalLink:z.getCanonicalLink({stripPresentationSlug:!0,customAppLink:_.classification(u.data)}),allowIndexing:z.allowIndexing()})),He(u,{notFound:Jt});let v=Y.useMemo(()=>S.getActiveAudiencesFromParams(h.data,e.queryParams),[h.data,e.queryParams]),b=v?.map(e=>e.masterId)??[],x={presentationId:f?.id,presentationName:f?.name,currentClassificationId:u.data?.id,currentClassificationName:u.data?.name,followingCurrentClassification:!!u.data?.followers?.data?.length,activeAudienceNames:v?.length?v.map(e=>e.name):null,activeAudienceIds:b.length?b:null},{canFollowSubjects:ee,showFollowButtonSpinner:w,onToggleFollow:T,getFollowBannerActions:E}=Kt({classification:u.data,analyticsData:x});function D(){let e=E();return o?[...e.map(e=>({...e,className:`${e.className} me-2`})),{label:a,href:s(P.Subject,u.data?.id,f?.id),openInNewTab:!0}]:e}function A(){return()=>ye({appLinks:_,classification:u.data,path:g.data,presentationSlug:e.presentationSlug})}return c.data&&d.hasCompleted&&u.data&&f&&g.data&&h.data?(0,X.jsx)(Ye.Provider,{value:n,children:(0,X.jsxs)(`div`,{className:`position-relative`,children:[!!(m&&d.data)&&(0,X.jsx)(rt,{status:d.data.status,type:`topic`}),(0,X.jsx)(Bt,{dashboard:d.data,classification:u.data,getWidgetContentRequest:Oe.dashboardWidgetContent,getBreadcrumbs:A(),hasPermissions:()=>!1,hasLocalPermissions:()=>!1,presentation:f,getBannerActions:D,onToggleFollow:T,showFollowButtonSpinner:w,audiences:h.data,activeAudiences:v,analyticsData:x,imageCdnUrl:c.data.imageCdnUrl,imageUrls:ut,resourceThumbnailFallbackImageUrl:F.Live.Fallbacks.RESOURCE_THUMBNAIL,emptyImageUrl:F.Live.EmptyStates.Topics.TOPIC,appLinks:_,isPreviewing:m,isViewCurrentPresentation:!0,canFollowSubjects:ee,tableOfContentsId:e.queryParams.tocId,lazyLoad:!z.isBot(),isTeacherOnly:!1,contentType:j.Livestream,hasTopicDirectoryDashboard:!1,hasTopicCurriculumDashboard:!1,isTertiaryCustomerWithoutExchange:!1,tab:`curated-topic`,curriculums:r,commonVideoProps:t,onDownloadAllClick:i})]})}):(0,X.jsx)(Vt,{})}var en=Fe({[C.Subject]:e=>(0,X.jsx)(Zt,{presentationSlug:e.presentationSlug,id:e.id,queryParams:e.queryParams,targetType:e.targetType},`${e.id}:${e.targetType}`),[C.StreamableLearning]:e=>e.targetType===k.Classification?(0,X.jsx)($t,{presentationSlug:e.presentationSlug,id:e.id,queryParams:e.queryParams},`${e.id}:${e.targetType}`):null});en.displayName=`BaseClassificationView`;export{en as BaseClassificationView};
2
+ //# sourceMappingURL=B6Pc3q-u.chunk.js.map