@clickview/lite 0.103.2 → 0.103.3
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 +407 -407
- package/dist/bundles.json +1 -1
- package/dist/en.json +1 -1
- package/dist/scripts/{BeW5XQTb2.chunk.js → BBwi4FOJ2.chunk.js} +2 -2
- package/dist/scripts/{BeW5XQTb2.chunk.js.map → BBwi4FOJ2.chunk.js.map} +1 -1
- package/dist/scripts/{D8mi6CVp2.chunk.js → BYJa-jEI2.chunk.js} +2 -2
- package/dist/scripts/{D8mi6CVp2.chunk.js.map → BYJa-jEI2.chunk.js.map} +1 -1
- package/dist/scripts/{Drh1bb9z.chunk.js → BbJGjXBH.chunk.js} +2 -2
- package/dist/scripts/{Drh1bb9z.chunk.js.map → BbJGjXBH.chunk.js.map} +1 -1
- package/dist/scripts/BcVxkWsW.chunk.js +1 -0
- package/dist/scripts/{DOYyhXN-.chunk.js → BjtsulNM.chunk.js} +2 -2
- package/dist/scripts/{DOYyhXN-.chunk.js.map → BjtsulNM.chunk.js.map} +1 -1
- package/dist/scripts/{QVwuOts3.chunk.js → C3eIGNDs.chunk.js} +2 -2
- package/dist/scripts/{QVwuOts3.chunk.js.map → C3eIGNDs.chunk.js.map} +1 -1
- package/dist/scripts/{CfrfHGSh.chunk.js → CT3yl0jK.chunk.js} +2 -2
- package/dist/scripts/{CfrfHGSh.chunk.js.map → CT3yl0jK.chunk.js.map} +1 -1
- package/dist/scripts/{wpRpI9h02.chunk.js → CbPqWgxm2.chunk.js} +2 -2
- package/dist/scripts/{wpRpI9h02.chunk.js.map → CbPqWgxm2.chunk.js.map} +1 -1
- package/dist/scripts/{CsCjBSq62.chunk.js → Cj6PScU52.chunk.js} +2 -2
- package/dist/scripts/{CsCjBSq62.chunk.js.map → Cj6PScU52.chunk.js.map} +1 -1
- package/dist/scripts/{BD_YlxPJ.chunk.js → Cl0Kjmj6.chunk.js} +2 -2
- package/dist/scripts/{BD_YlxPJ.chunk.js.map → Cl0Kjmj6.chunk.js.map} +1 -1
- package/dist/scripts/{yfjVyowY.chunk.js → DAed0ji9.chunk.js} +2 -2
- package/dist/scripts/{yfjVyowY.chunk.js.map → DAed0ji9.chunk.js.map} +1 -1
- package/dist/scripts/{CIzlhCeS.chunk.js → Dl-8A2m-.chunk.js} +2 -2
- package/dist/scripts/{CIzlhCeS.chunk.js.map → Dl-8A2m-.chunk.js.map} +1 -1
- package/dist/scripts/{BFH_tnSb2.chunk.js → RaLi1Skr2.chunk.js} +3 -3
- package/dist/scripts/{BFH_tnSb2.chunk.js.map → RaLi1Skr2.chunk.js.map} +1 -1
- package/dist/scripts/{app-DvYKGw_S.js → app-BYLHZF74.js} +4 -4
- package/dist/scripts/{app-DvYKGw_S.js.map → app-BYLHZF74.js.map} +1 -1
- package/dist/scripts/{kLCNzxrH2.chunk.js → hWjV2SVN2.chunk.js} +2 -2
- package/dist/scripts/{kLCNzxrH2.chunk.js.map → hWjV2SVN2.chunk.js.map} +1 -1
- package/package.json +1 -1
- package/dist/scripts/C2s0ZcC4.chunk.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wpRpI9h02.chunk.js","names":[],"sources":["../../src/shared/views/play/hooks/useShouldShowTableOfContents.ts","../../../../libs/shared/src/components/copyright-disclaimer/copyright-disclaimer.module.scss","../../../../libs/shared/src/components/copyright-disclaimer/CopyrightDisclaimer.tsx","../../../../libs/shared/src/components/play-page/details/video-description/VideoDescription.tsx","../../../../libs/shared/src/components/play-page/details/video-details.module.scss","../../../../libs/shared/src/components/play-page/details/VideoDetailsV2.tsx","../../../../libs/common/src/react/hooks/UseEventsServiceSubscribe.ts","../../../../libs/shared/src/components/play-page/glance/video-at-a-glance.module.scss","../../../../libs/shared/src/components/play-page/glance/VideoAtAGlanceUtilsV2.ts","../../../../libs/shared/src/components/play-page/glance/points-of-interest-list/points-of-interest-list.module.scss","../../../../libs/shared/src/components/play-page/glance/points-of-interest-list/PointsOfInterestList.tsx","../../../../libs/shared/src/components/play-page/glance/VideoAtAGlanceV2.tsx","../../../../libs/shared/src/components/play-page/resources-widget/PlayPageResources.tsx","../../../../libs/shared/src/components/play-page/clips-widget/ClipWidgetItemV2.tsx","../../src/shared/components/play-page/components/play-page-clips/PlayPageClips.tsx","../../src/shared/components/play-page/components/play-page-interactives/PlayPageInteractives.tsx","../../../../libs/shared/src/images/svg/arrows/CollapseRightSvg.tsx","../../../../libs/shared/src/images/svg/arrows/ExpandLeftSvg.tsx","../../src/shared/components/play-page/components/table-of-contents/table-of-contents.module.scss","../../src/shared/components/play-page/components/table-of-contents/TableOfContents.tsx","../../src/shared/components/play-page/components/title-and-actions/title-and-actions.module.scss","../../src/shared/components/play-page/components/title-and-actions/PlayPageTitleAndActions.tsx","../../src/shared/components/player-placeholder/player-placeholder.module.scss","../../src/shared/components/player-placeholder/PlayerPlaceholder.tsx","../../src/shared/views/play/components/play-page/hooks/useResourcePopup.ts","../../src/shared/views/play/components/play-page/play-page.module.scss","../../src/shared/views/play/components/play-page/PlayPageUtils.ts","../../src/shared/views/play/hooks/usePlayPageTableOfContent.ts","../../../../libs/shared/src/utils/ObservableTypesHelper.ts","../../src/shared/constants/PlayPageSectionsOrder.ts","../../src/shared/views/play/hooks/useSectionHeadings.ts","../../src/shared/views/play/hooks/useTheatreStyle.ts","../../src/shared/views/play/PlayPageUtil.tsx"],"sourcesContent":["import { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\n\n// returns boolean value for if we should show the TOC on the side\nexport function useShouldShowSideTableOfContents(): boolean {\n const breakpoints = useBreakpoints();\n const shouldShowSideTableOfContents = breakpoints.lg || breakpoints.xl || breakpoints.xxl;\n return shouldShowSideTableOfContents;\n}\n",":local {\n .copyrightDisclaimer {\n color: $gray-500;\n }\n .overlayContainer {\n z-index: 1100;\n width: 31.25rem;\n }\n}","import React from 'react';\nimport { Overlay } from 'react-bootstrap';\nimport { Placement } from 'react-bootstrap/esm/types';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { useHoverIntent } from 'libs/shared/hooks/UseHover';\n\nimport styles from './copyright-disclaimer.module.scss';\n\nconst namespace = 'shared.copyrightDisclaimer';\n\nconst CONTAINER_HEIGHT = 150; // px\n\ninterface CopyrightDisclaimerProps {\n placement: Placement;\n overflowPlacement?: Placement;\n className?: string;\n phraseClassName?: string;\n}\n\nexport function CopyrightDisclaimer(props: CopyrightDisclaimerProps) {\n const [ ref, isHovering ] = useHoverIntent<HTMLDivElement>({});\n\n function preventOverflow() {\n const spaceBelow = document.documentElement.clientHeight - ref.current?.getBoundingClientRect().bottom;\n\n return spaceBelow < CONTAINER_HEIGHT;\n }\n\n return (\n <div ref={ref} className={props.className}>\n <p className={`${styles.copyrightDisclaimer} ${props.phraseClassName ?? 'mb-1'}`}><Text namespace={namespace} phrase='copyrightDisclaimer' /></p>\n <Overlay\n target={ref.current}\n show={isHovering}\n placement={props.overflowPlacement && preventOverflow() ? props.overflowPlacement : props.placement}\n >\n <div className={`${styles.overlayContainer} mw-100 bg-white border rounded-3 p-2`}>\n <p><Text namespace={namespace} phrase='warning' /></p>\n <p className='fw-semibold mb-0'><Text namespace={namespace} phrase='sharing' /></p>\n </div>\n </Overlay>\n </div>\n );\n}\n","import React from 'react';\n\nimport { LinkifyHelper } from 'libs/common/react/utils/LinkifyHelper';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { ExpandableText } from 'libs/shared/components/expandable-text/ExpandableText';\nimport { VideoTypes } from 'libs/shared/interfaces';\n\ninterface VideoDescriptionProps {\n video: VideoTypes;\n}\n\nexport function VideoDescription(props: VideoDescriptionProps): React.ReactElement {\n return (\n <ExpandableText lines={12}>\n {() => (\n <p\n className='mb-0'\n dangerouslySetInnerHTML={{\n __html: TextHelper.sanitize(LinkifyHelper.linkifyText(props.video.description, { nl2br: true }))\n }}\n />\n )}\n </ExpandableText>\n );\n}\n",":local {\n @media (min-width: #{map-get($grid-breakpoints, md)}) {\n .descriptionBorder {\n border-right: 1px solid $gray-300;\n }\n }\n}","import * as React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { CopyrightDisclaimer } from 'libs/shared/components/copyright-disclaimer/CopyrightDisclaimer';\nimport { ImmersiveReader } from 'libs/shared/components/immersive-reader/ImmersiveReader';\nimport { VideoDescription } from 'libs/shared/components/play-page/details/video-description/VideoDescription';\nimport { TagHelper } from 'libs/shared/components/tags/TagHelper';\nimport { TagList } from 'libs/shared/components/tags/TagList';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { hasPPDD } from 'libs/shared/components/video-details/VideoDetailsUtils';\nimport { WidgetHeader } from 'libs/shared/components/widgets/curated-widgets/components/header/WidgetHeader';\nimport { MINIMUM_GLANCE_HEIGHT } from 'libs/shared/constants/MinimumGlanceHeight';\nimport { MasterObjectTypes } from 'libs/shared/enums/MasterObjectTypes';\nimport { TagType } from 'libs/shared/enums/TagType';\nimport { BaseObject, BasePaginatedCollection, Category, Company, CurrentUser, Library, PartnerProfile, Person, Tag, VideoTypes } from 'libs/shared/interfaces';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport styles from './video-details.module.scss';\n\nconst namespace = 'shared.videoDetailsV2';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CommaListProps<T extends BaseObject> {\n label: string;\n items: BasePaginatedCollection<T>;\n getItemAppLink?: (item: T) => Core.AppLink;\n className?: string;\n}\n\nfunction CommaList<T extends BaseObject>(props: CommaListProps<T>): React.ReactElement {\n const { label, items, className } = props;\n\n const hasItems = items && items.data && items.data.length;\n\n if (!hasItems)\n return <></>;\n\n if (typeof props.getItemAppLink !== 'function') {\n const commaSeperated = items.data.map(i => i.name?.trim()).join(', ');\n return (\n <div className={className}>{label}: {commaSeperated}</div>\n );\n }\n\n return (\n <div className={className}>\n <span>{label}: </span>\n {items.data.map((item, index) => (\n <React.Fragment key={item.id}>\n <AppLink key={item.id} appLink={props.getItemAppLink(item)}>\n {item.name?.trim()}\n </AppLink>\n {index < items.data.length - 1 && <span>, </span>}\n </React.Fragment>\n ))}\n </div>\n );\n}\n\ninterface LibraryCategoryPair {\n library: Library;\n category: Category;\n}\n\nfunction getCustomLibraryCategoryPairs(video: VideoTypes): LibraryCategoryPair[] {\n const categories = video.categories?.data;\n if (!categories?.length)\n return [];\n\n return categories.filter(category => category.libraries?.data?.[0]?.type === MasterObjectTypes.CustomLibrary)\n .map(category => ({ library: category.libraries?.data?.[0], category }));\n}\n\ninterface CreateLibraryBreadcrumbsOptions {\n pair: LibraryCategoryPair;\n getLibraryAppLink: (library: Library) => Core.AppLink;\n getFolderAppLink: (library: Library, folder: Category) => Core.AppLink;\n}\n\nfunction createLibraryBreadcrumbs(options: CreateLibraryBreadcrumbsOptions): Breadcrumb[] {\n const breadcrumbs: Breadcrumb[] = [\n {\n name: options.pair.library.name,\n appLink: options.getLibraryAppLink?.(options.pair.library)\n },\n { name: '...' },\n {\n name: options.pair.category.name,\n appLink: options.getFolderAppLink?.(options.pair.library, options.pair.category)\n }\n ];\n\n return breadcrumbs;\n}\n\nfunction DetailsSection(props: VideoDetailsWithScrollbarV2Props): React.ReactElement {\n const { video } = props;\n\n if (!VideoHelper.isVideo(video) && !VideoHelper.isClip(video))\n return <></>;\n\n const parentVideo = VideoHelper.getParentVideo(video);\n const libraryPairs = getCustomLibraryCategoryPairs(video);\n\n function getPartnerProfileAppLink(company: Company) {\n if (!company.partnerProfiles || !company.partnerProfiles?.data?.length)\n return;\n\n if (company.partnerProfiles?.count > 1 && typeof props.getPartnerDashboardHubAppLink === 'function')\n return props.getPartnerDashboardHubAppLink(company);\n\n if (typeof props.getPartnerProfileAppLink === 'function')\n return props.getPartnerProfileAppLink(company.partnerProfiles?.data?.[0]);\n\n return;\n }\n\n return (\n <div className={video.description ? 'col-md-5 ps-md-3 pt-3 pt-md-0' : 'col-12'}>\n <h2 className='h6 mb-1'><Text phrase='details' /></h2>\n {!!parentVideo.productionYear && (\n <div className='mb-1'>\n <Text phrase='productionYear' options={{ year: parentVideo.productionYear }} />\n </div>\n )}\n <CommaList<Company>\n label={getPhrase('productionCompanies', { smartCount: parentVideo.productionCompanies?.data?.length })}\n items={parentVideo.productionCompanies}\n getItemAppLink={getPartnerProfileAppLink}\n className='mb-1'\n />\n <CommaList<Company>\n label={getPhrase('distributors', { smartCount: parentVideo.distributors?.data?.length })}\n items={parentVideo.distributors}\n getItemAppLink={getPartnerProfileAppLink}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('producers', { smartCount: parentVideo.producers?.data?.length })}\n items={parentVideo.producers}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('directors', { smartCount: parentVideo.directors?.data?.length })}\n items={parentVideo.directors}\n className='mb-1'\n />\n {!!parentVideo.dateBroadcast && (\n <div className='mb-1'>\n <Text phrase='dateBroadcast' options={{ date: DateHelper.format(parentVideo.dateBroadcast, 'DD/MM/YYYY') }} />\n </div>\n )}\n {!!parentVideo.channel && (\n <div className='mb-1'>\n <Text phrase='channel' options={{ channel: parentVideo.channel.name }} />\n </div>\n )}\n {VideoHelper.canViewUploadDate(props.video) && (\n <div className='mb-1'>\n <Text phrase='dateUploaded' options={{ date: DateHelper.format(video.dateCreated, 'DD/MM/YYYY') }} />\n </div>\n )}\n {!!(libraryPairs.length && props.getLibraryAppLink && props.getFolderAppLink) && (\n <div className='mb-1'>\n <div>{getPhrase('libraries', { smartCount: libraryPairs.length })}:</div>\n {libraryPairs.map((pair, index) => (\n <div key={index}>\n <Breadcrumbs\n breadcrumbs={createLibraryBreadcrumbs({\n pair,\n getLibraryAppLink: props.getLibraryAppLink,\n getFolderAppLink: props.getFolderAppLink\n })}\n linkClassName='text-info'\n />\n </div>\n ))}\n </div>\n )}\n </div>\n );\n}\n\ninterface VideoDetailsWithScrollbarV2Props {\n video: VideoTypes;\n currentUser: CurrentUser;\n getTagAppLink?: (tag: Tag) => Core.AppLink;\n onLaunchImmersiveReader?: () => void;\n onExitImmersiveReader?: () => void;\n maxHeight?: number;\n suppressInteractivity?: boolean;\n hideTags?: boolean;\n headingRef?: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n showHeading?: boolean;\n getPartnerProfileAppLink?: (partnerProfile: PartnerProfile) => Core.AppLink;\n getPartnerDashboardHubAppLink?: (company: Company | Person) => Core.AppLink;\n getLibraryAppLink?: (library: Library) => Core.AppLink;\n getFolderAppLink?: (library: Library, folder: Category) => Core.AppLink;\n}\n\nexport function VideoDetailsWithScrollbarV2(props: VideoDetailsWithScrollbarV2Props): React.ReactElement {\n const { video, maxHeight = MINIMUM_GLANCE_HEIGHT } = props;\n\n const parentVideo = VideoHelper.getParentVideo(video);\n\n const showDescription = !!props.video.description;\n\n const showDetails = (\n hasPPDD(props.video) ||\n !!parentVideo.productionYear ||\n !!parentVideo.dateBroadcast ||\n !!parentVideo.channel ||\n VideoHelper.canViewUploadDate(props.video)\n );\n\n if (!showDescription && !showDetails)\n return <></>;\n\n function getTags(): Tag[] {\n if (props.hideTags || VideoHelper.isInteractive(props.video) || !props.video.tags?.data?.length)\n return null;\n\n return props.video.tags?.data?.filter(tag => tag.tagType === TagType.Normal);\n }\n const tags = getTags();\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <section\n id={PlayPageAnchor.VideoDetails}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.VideoDetails, el);\n }}\n className='play-page-section'\n >\n {props.showHeading && <WidgetHeader name={getPhrase('heading')} />}\n <div className='rounded border p-3 position-relative'>\n <Scrollbars autoHeight autoHeightMax={maxHeight} hideTracksWhenNotNeeded>\n <div className='row g-0'>\n {showDescription && (\n <div className={showDetails ? `${styles.descriptionBorder} pe-3 col-md-7` : 'col-12'}>\n <div className='d-flex align-items-center'>\n <h2 className='h6 mb-1'>\n <Text phrase='description' />\n </h2>\n <ImmersiveReader\n text={video.description}\n title={video.name}\n className='ps-2'\n onLaunch={props.onLaunchImmersiveReader}\n onExit={props.onExitImmersiveReader}\n analyticsOptions={{\n location: LocationContext.PlayPage,\n entity: EntityType.Video,\n actionType: UserAction.Click,\n descriptor: ClickDescriptor.LaunchImmersiveReader\n }}\n analyticsData={{ id: video.id, type: 'description' }}\n />\n </div>\n\n <VideoDescription video={props.video} />\n </div>\n )}\n\n {showDetails && (\n <DetailsSection {...props} />\n )}\n </div>\n\n {!!tags?.length && (\n <div className='mt-3'>\n <h2 className='h6 mb-1'><Text phrase='normalTags' /></h2>\n <TagList\n tags={tags}\n {...TagHelper.getTagActionProps(props.getTagAppLink, null, props.suppressInteractivity)}\n className='mt-1'\n />\n </div>\n )}\n\n {VideoHelper.isBroadcast(props.video) && (\n <CopyrightDisclaimer\n placement='bottom-start'\n className='d-flex justify-content-start mt-2'\n phraseClassName='mb-0'\n overflowPlacement='top-start'\n />\n )}\n\n </Scrollbars>\n </div>\n </section>\n </LanguageNamespaceContext.Provider>\n );\n}\n","import { useEffect } from 'react';\n\nimport { EventsService } from 'libs/common/react/services/EventsService';\n\n/**\n * \n * @param event the event to subscribe to\n * @param callback the callback function\n * @param once whether to subscribe once\n * @param shouldSubscribe conditionally determine whether to subscribe to events\n * @returns unsubscribe function\n */\nexport function useEventsServiceSubscribe(\n event: string,\n callback: (...args: any[]) => void,\n once?: boolean,\n shouldSubscribe?: boolean\n): () => void {\n const unsubscribe = () => {\n EventsService.unsubscribe(event, callback);\n };\n\n useEffect(() => {\n if (!shouldSubscribe)\n return;\n\n once ? EventsService.subscribeOnce(event, callback) : EventsService.subscribe(event, callback);\n\n return () => {\n unsubscribe();\n };\n }, []);\n\n return unsubscribe;\n}\n",":local{\n .learningIntention p:last-child {\n margin-bottom: -1rem !important; //offset last p element margin \n }\n\n .learningIntention p:not(:last-child) {\n margin-bottom: 0.5rem !important; \n }\n\n .highlightPoi {\n text-decoration: underline;\n }\n\n .icon {\n float:left;\n clear:both;\n }\n}","import { MutableRefObject, useEffect, useRef, useState } from 'react';\nimport { marked } from 'marked';\n\nimport { useEventsServiceSubscribe } from 'libs/common/react/hooks/UseEventsServiceSubscribe';\nimport { EventsService } from 'libs/common/react/services/EventsService';\n\nimport { Clip, Glance, PointOfInterest, Video } from 'libs/shared/interfaces';\n\nimport styles from './video-at-a-glance.module.scss';\n\nconst POI_LINK_LINE = /\\[\\]\\(cv:\\/\\/poi\\?id=\\d+\\)\\n*/g;\n\nfunction stripPoisFromGlanceContent(glanceContent: string): string {\n return glanceContent.replace(POI_LINK_LINE, '');\n}\n\nfunction getLearningIntentionHTML(glance: Glance): string {\n const learningIntention = stripPoisFromGlanceContent(glance.content);\n\n return marked(learningIntention, { async: false });\n}\n\nexport function useLearningIntentionMarkdown(\n video: Video,\n hasGlanceData?: boolean\n): string {\n const [ markdownHTML, setMarkdownHTML ] = useState('');\n\n useEffect(() => {\n if (!hasGlanceData || !video.glance?.content)\n return;\n\n const content = getLearningIntentionHTML(video.glance);\n\n setMarkdownHTML(content);\n }, [ video.glance?.content, hasGlanceData ]);\n\n return markdownHTML;\n}\n\nexport function hasGlanceData(video: Video | Clip): boolean {\n return video.glance?.content && video.glance?.format === 'text/markdown';\n}\n\nexport function useHighlightPointOfInterest(\n pointOfInterest: PointOfInterest,\n shouldHighlight: boolean\n): MutableRefObject<HTMLDivElement> {\n const ref = useRef<HTMLDivElement>(null);\n\n useEventsServiceSubscribe('player:poi:mouseover', onPlayerPoiMouseOver, null, shouldHighlight);\n useEventsServiceSubscribe('player:poi:mouseleave', onPlayerPoiMouseLeave, null, shouldHighlight);\n\n useEffect(() => {\n if (!ref.current || !shouldHighlight)\n return;\n\n ref.current?.addEventListener('mouseover', onGlancePoiMouseOver);\n ref.current?.addEventListener('mouseleave', onGlancePoiMouseLeave);\n\n return () => {\n ref.current?.removeEventListener('mouseover', onGlancePoiMouseOver);\n ref.current?.removeEventListener('mouseleave', onGlancePoiMouseLeave);\n };\n }, [ref.current]);\n\n function onPlayerPoiMouseOver(hoveredPoi: PointOfInterest): void {\n if (!hoveredPoi?.id || pointOfInterest?.id?.toString() !== hoveredPoi?.id?.toString())\n return;\n\n ref.current?.classList.add(styles.highlightPoi);\n }\n\n function onPlayerPoiMouseLeave(): void {\n ref.current?.classList.remove(styles.highlightPoi);\n }\n\n /**\n * `this` will be the element to which the eventListener is bound.\n */\n function onGlancePoiMouseOver(): void {\n if (pointOfInterest)\n EventsService.trigger('glance:poi:mouseover', pointOfInterest);\n }\n\n function onGlancePoiMouseLeave(): void {\n EventsService.trigger('glance:poi:mouseleave');\n }\n\n return ref;\n}\n",":local {\n .poiEntry {\n flex-wrap: nowrap;\n align-items: start;\n &:hover {\n .poiText:not(.public) {\n text-decoration: underline;\n }\n } \n }\n\n .public {\n margin-top: 0.125rem;\n }\n\n .poiText {\n margin-top: 0.125rem;\n }\n\n .poiTimeStamp {\n height: 1.5rem;\n min-width: 3.5625rem;\n &.wideBadge {\n min-width: 4.375rem;\n }\n }\n}","import React from 'react';\n\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { PointOfInterest } from 'libs/shared/interfaces';\nimport { DurationHelper } from 'libs/shared/utils/DurationHelper';\n\nimport { useHighlightPointOfInterest } from '../VideoAtAGlanceUtilsV2';\n\nimport styles from './points-of-interest-list.module.scss';\n\ninterface PointOfInterestProps {\n poi: PointOfInterest;\n suppressInteractivity?: boolean;\n onClickPoiItem: (time: number) => void;\n wideBadge?: boolean;\n}\n\nfunction PointOfInterestItem(props: PointOfInterestProps): JSX.Element {\n const timeStamp = DurationHelper.ToDisplayDuration(props.poi.startTime * 1000);\n\n const ref = useHighlightPointOfInterest(props.poi, !props.suppressInteractivity);\n\n if (props.suppressInteractivity) {\n return (\n <div className={`d-flex ${styles.poiEntry} mb-2`}>\n <span className={`d-flex rounded-pill justify-content-center align-items-center text-info bg-light-blue ${styles.poiTimeStamp} ${props.wideBadge ? styles.wideBadge : ''}`}>{timeStamp}</span>\n <div className={`${styles.public} ms-2`}>{props.poi.description}</div>\n </div>\n );\n }\n\n return (\n <DivButton\n key={props.poi.startTime}\n className={`d-flex ${styles.poiEntry} mb-2 cursor-pointer`}\n onClick={() => props.onClickPoiItem(props.poi.startTime)}\n ref={ref}\n >\n <div className={`d-flex rounded-pill justify-content-center align-items-center text-info bg-light-blue ${styles.poiTimeStamp} ${props.wideBadge ? styles.wideBadge : ''}`}>{timeStamp}</div>\n <div className={`ms-2 ${styles.poiText}`}>{props.poi.description}</div>\n </DivButton>\n );\n}\n\ninterface PointOfInterestListProps {\n pointsOfInterest: PointOfInterest[];\n suppressInteractivity?: boolean;\n onClickPoiItem: (time: number) => void;\n}\n\nconst namespace = 'shared.pointsOfInterestList';\n\nexport function PointOfInterestList(props: PointOfInterestListProps) {\n const sortedPointsOfInterest = props.pointsOfInterest.sort((a, b) => a.startTime - b.startTime);\n const hasTimePointOverHours = sortedPointsOfInterest.some(poi => poi.startTime >= 3600);\n\n return (\n <div>\n <h2 className='h6 my-2'><Text namespace={namespace} phrase='heading' /></h2>\n\n <div>\n {sortedPointsOfInterest.map(poi => {\n return (\n <PointOfInterestItem\n key={poi.startTime}\n poi={poi}\n suppressInteractivity={props.suppressInteractivity}\n onClickPoiItem={props.onClickPoiItem}\n wideBadge={hasTimePointOverHours}\n />\n );\n })}\n\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { Core } from 'libs/common/core';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { CopyContentIconButton } from 'libs/shared/components/play-page/copy-content-icon-button/CopyContentIconButton';\nimport { PointOfInterestList } from 'libs/shared/components/play-page/glance/points-of-interest-list/PointsOfInterestList';\nimport { TagHelper } from 'libs/shared/components/tags/TagHelper';\nimport { TagList } from 'libs/shared/components/tags/TagList';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { TagType } from 'libs/shared/enums/TagType';\nimport { PointOfInterest, Tag, Video } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { useLearningIntentionMarkdown } from './VideoAtAGlanceUtilsV2';\n\nimport styles from './video-at-a-glance.module.scss';\n\nconst namespace = 'shared.videoAtAGlanceV2';\n\n// Pixel value selected to try and make it so that when there are more\n// POIs below the fold, that the user can see some of the next one so\n// they know they can scroll. E.g. https://imgur.com/TQyL0Bq\nconst SCROLL_HEIGHT_MAX = 365; // in px\n\ninterface ScrollbarWrapperProps {\n hideScrollbar?: boolean;\n}\n\nfunction ScrollbarWrapper(props: React.PropsWithChildren<ScrollbarWrapperProps>): JSX.Element {\n if (props.hideScrollbar)\n return <>{props.children}</>;\n\n return (\n <div className='rounded border mb-4 bg-white'>\n <Scrollbars\n autoHeight\n autoHeightMax={SCROLL_HEIGHT_MAX}\n >\n <div className='px-3 pt-3 pb-2'>\n {props.children}\n </div>\n </Scrollbars>\n </div>\n );\n}\n\ninterface VideoAtAGlanceV2Props {\n video: Video;\n pointsOfInterest?: PointOfInterest[];\n suppressInteractivity?: boolean;\n setStartTime?: (time: number) => void;\n getTagAppLink?: (tag: Tag) => Core.AppLink;\n onClickTag?: () => void;\n hideScrollbar?: boolean;\n canViewGlance: boolean;\n}\n\nexport function VideoAtAGlanceV2(props: VideoAtAGlanceV2Props): JSX.Element {\n const learningIntentionMarkdownHTML = useLearningIntentionMarkdown(props.video, props.canViewGlance);\n const [ textToCopy, setTextToCopy ] = React.useState('');\n\n function logUserAction(): void {\n const analyticsData = {\n id: props.video.glance.id,\n name: props.video.glance.name,\n videoId: props.video.id,\n videoName: props.video.name,\n learningIntention: textToCopy\n };\n\n const analyticsOptions = {\n actionType: UserAction.Copy,\n entity: EntityType.Glance,\n location: LocationContext.PlayPage\n };\n AnalyticsHelper.logUserAction(analyticsData, analyticsOptions);\n }\n\n function getTags(): Tag[] {\n if (VideoHelper.isInteractive(props.video) || !props.video.tags?.data?.length)\n return null;\n\n return props.video.tags?.data?.filter(tag => tag.tagType === TagType.Pedagogy || tag.tagType === TagType.Skill);\n }\n const tags = getTags();\n\n const ref = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n if (ref.current?.innerText)\n setTextToCopy(ref.current.innerText);\n }, [ref.current?.innerText]);\n\n if (!props.canViewGlance)\n return <></>;\n\n function onClickPoiItem(time: number) {\n props.setStartTime(time);\n }\n\n return (\n <section className='play-page-section'>\n <ScrollbarWrapper hideScrollbar={props.hideScrollbar}>\n <h2 className='h6 mb-2'><Text namespace={namespace} phrase='learningIntention' /></h2>\n \n <div className={`mb-3 ${styles.learningIntention}`}>\n <CopyContentIconButton\n copyableContent={textToCopy}\n tooltipClassName={styles.icon}\n onClick={logUserAction}\n visible\n />\n <div\n dangerouslySetInnerHTML={{ __html: TextHelper.sanitize(learningIntentionMarkdownHTML) }}\n className='d-inline'\n ref={ref}\n >\n </div>\n </div>\n\n {!!tags?.length && (\n <div>\n <TagList\n tags={tags}\n {...TagHelper.getTagActionProps(props.getTagAppLink, props.onClickTag, props.suppressInteractivity)}\n className='mt-2'\n />\n </div>\n )}\n\n {!!props.pointsOfInterest?.length && (\n <div className='mt-3'>\n <PointOfInterestList\n pointsOfInterest={props.pointsOfInterest}\n suppressInteractivity={props.suppressInteractivity}\n onClickPoiItem={onClickPoiItem}\n />\n </div>\n )}\n </ScrollbarWrapper>\n </section>\n );\n}\n","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { EntityType, LocationContext, SignUpDescriptors, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { DownloadAllResourcesButton } from 'libs/shared/components/widgets/curated-widgets/components/download-all-resources-button/DownloadAllResourcesButton';\nimport { FixedWidget } from 'libs/shared/components/widgets/fixed-widget';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { Clip, Link, Resource, Video } from 'libs/shared/interfaces';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { DownloadHelper } from 'libs/shared/utils/DownloadHelper';\nimport { MasterTypeHelper } from 'libs/shared/utils/MasterTypeHelper';\n\nimport { ResourceWidgetItemV2 } from './ResourceWidgetItemV2';\n\nconst namespace = 'shared.playPageResources';\n\nfunction getResources(\n video: Video,\n isLearner: boolean\n): Array<Resource | Link> {\n const resources = video.resources?.data ?? [];\n const links = video.links?.data ?? [];\n\n if (!isLearner)\n return [ ...resources, ...links ];\n\n const filteredResources = resources.filter(r => {\n return [ 'additional-materials', 'student-activity' ].includes(r.metadata?.resourceType);\n });\n\n return [ ...filteredResources, ...links ];\n}\n\ninterface PlayPageResourcesProps {\n video: Video | Clip;\n imageCdnUrl: string;\n canViewResources: boolean;\n getAppLink: (resource: Resource) => Core.AppLink;\n analyticsData: HashObject;\n resourceThumbnailFallbackUrl: string;\n headingRef?: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n onDownloadAllClick?: (resources: Resource[], fileName: string, analyticsData?: HashObject) => void;\n}\n\nexport function PlayPageResources(props: PlayPageResourcesProps): JSX.Element {\n const { hasPermissions } = usePermissions();\n\n function onClickDownload(resource: Resource): void {\n DownloadHelper.downloadResource(\n resource,\n props.analyticsData,\n { location: LocationContext.PlayPage, actionType: UserAction.Download, entity: EntityType.Resource }\n );\n }\n\n const resources = getResources(props.video, hasPermissions(PermissionName.StudentExperience));\n const title = LanguageService.getPhrase(namespace, 'resources', { count: resources.length });\n\n if (!resources.length)\n return <></>;\n\n const downloadableResources = resources.filter(MasterTypeHelper.isResource);\n const showDownloadAll = props.canViewResources && downloadableResources.length > 0;\n\n return (\n <section\n id={PlayPageAnchor.Resources}\n className='play-page-section widget-hover-reveal-boundary'\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.Resources, el);\n }}\n >\n <FixedWidget\n name={title}\n contents={WidgetContents.PlayPageResourcesV2}\n collection={resources}\n prefetched\n childComponent={ResourceWidgetItemV2}\n headerRightComponent={showDownloadAll ? (\n <DownloadAllResourcesButton\n resources={downloadableResources}\n fileName={`${props.video.name}-resources`}\n analyticsData={props.analyticsData}\n onDownloadAllClick={props.onDownloadAllClick}\n revealOnHover\n />\n ) : undefined}\n extraChildComponentProps={{\n imageCdnUrl: props.imageCdnUrl,\n imageErrorFallbackUrl: props.resourceThumbnailFallbackUrl,\n actionBehaviour: props.canViewResources ? 'normal' : 'public',\n location: 'play-page',\n titlePosition: 'below',\n onClickDownload: props.canViewResources ? onClickDownload : null\n }}\n getChildAppLink={props.getAppLink}\n analyticsOptions={(() => {\n if (props.canViewResources)\n return {};\n \n return {\n workflowPhase: WorkflowPhase.Start,\n descriptor: SignUpDescriptors.SignUp\n };\n })()}\n analyticsData={props.analyticsData}\n />\n </section>\n );\n}\n","import React from 'react';\n\nimport { ThumbnailText } from 'libs/shared/components/thumbnails/thumbnail-text/ThumbnailText';\nimport { VideoThumbnail } from 'libs/shared/components/thumbnails/video/VideoThumbnail';\nimport { FixedWidgetItemProps } from 'libs/shared/components/widgets/items/FixedWidgetItemProps';\nimport { ThumbnailTextPosition } from 'libs/shared/enums/ThumbnailTextPosition';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { Clip, PresentationAudience } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\n\nexport interface ClipWidgetItemV2Props extends FixedWidgetItemProps<Clip> {\n audiences: PresentationAudience[];\n commonVideoProps: CommonVideoProps;\n showOwner?: boolean;\n}\n\nexport const ClipWidgetItemV2 = React.memo(function(props: ClipWidgetItemV2Props): JSX.Element {\n const { data: clip, thumbnailSize, preloadImage, getAppLink } = props;\n const mergedAudience = useMergeAudiences(clip.subjectPresentationAudiences?.data, props.audiences);\n\n return (\n <div className='flex-shrink-0 px-1 col-6 col-sm-4'>\n <VideoThumbnail\n type='static'\n textPosition={ThumbnailTextPosition.Independent}\n video={clip}\n appLink={getAppLink(clip)}\n imageOptions={{ size: thumbnailSize }}\n preload={preloadImage}\n analyticsData={props.analyticsData}\n analyticsOptions={props.analyticsOptions}\n audience={mergedAudience}\n hideDuration={false}\n commonVideoProps={props.commonVideoProps}\n />\n\n <div className='mt-2'>\n <ThumbnailText\n {...props}\n video={clip}\n appLink={props.getAppLink(clip)}\n />\n </div>\n </div>\n );\n});\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { ClipWidgetItemV2 } from 'libs/shared/components/play-page/clips-widget/ClipWidgetItemV2';\nimport { FixedWidget } from 'libs/shared/components/widgets/fixed-widget';\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { Clip, PresentationAudience, Video } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\n\nconst namespace = 'shared.playPageClips';\n\ninterface PlayPageClipsProps {\n presentationSlug: string | null;\n video: Video | Clip;\n clips: Clip[];\n canViewClips: boolean;\n audiences: PresentationAudience[];\n analyticsData: HashObject;\n headingRef?: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n commonVideoProps: CommonVideoProps;\n}\n\nexport function PlayPageClips(props: PlayPageClipsProps): JSX.Element {\n if (!props.canViewClips || !props.clips?.length)\n return <></>;\n\n const parentIsVideo = VideoHelper.isVideo(props.video);\n\n function getAppLink() {\n if (VideoHelper.isVideo(props.video)) {\n return {\n action: Actions.Videos.VIDEO_CLIPS,\n application: AppChannels.VIDEOS,\n args: [\n props.presentationSlug,\n props.video.id,\n TextHelper.slugify(props.video.name)\n ]\n };\n }\n return {\n action: Actions.Clips.CLIP_CLIPS,\n application: AppChannels.CLIPS,\n args: [ props.video.id, TextHelper.slugify(props.video.name) ]\n };\n }\n\n const title = LanguageService.getPhrase(\n namespace,\n parentIsVideo ? 'clips' : 'otherClips',\n { count: props.clips.length }\n );\n\n return (\n <section\n className='play-page-section'\n id={PlayPageAnchor.Clips}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.Clips, el);\n }}\n >\n <FixedWidget\n name={title}\n contents={WidgetContents.ClipsV2}\n collection={props.clips}\n prefetched\n getChildAppLink={(clip: Clip) => {\n return {\n application: AppChannels.CLIPS,\n action: Actions.Clips.PLAY_CLIP,\n args: [ clip.id, TextHelper.slugify(clip.name) ]\n };\n }}\n appLink={getAppLink()}\n childComponent={ClipWidgetItemV2}\n extraChildComponentProps={{\n audiences: props.audiences,\n showOwner: true,\n commonVideoProps: props.commonVideoProps\n }}\n analyticsData={props.analyticsData}\n />\n </section>\n );\n}\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { InteractiveWidgetItem } from 'libs/shared/components/play-page/interactives-widget/InteractiveWidgetItem';\nimport { FixedWidget } from 'libs/shared/components/widgets/fixed-widget';\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { Clip, Interactive, InteractiveMetadata, Video } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\n\nconst namespace = 'shared.playPageInteractives';\n\ninterface PlayPageInteractivesProps {\n presentationSlug: string | null;\n canViewInteractives: boolean;\n video: Video | Clip;\n interactives: InteractiveMetadata[];\n analyticsData: HashObject;\n headingRef?: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n commonVideoProps: CommonVideoProps;\n}\n\nexport function PlayPageInteractives(props: PlayPageInteractivesProps): JSX.Element {\n if (!props.canViewInteractives || !props.interactives?.length)\n return <></>;\n\n function getAppLink() {\n if (VideoHelper.isVideo(props.video))\n return {\n action: Actions.Videos.VIDEO_INTERACTIVES,\n application: AppChannels.VIDEOS,\n args: [\n props.presentationSlug,\n props.video.id,\n TextHelper.slugify(props.video.name)\n ]\n };\n\n return {\n action: Actions.Clips.CLIP_INTERACTIVES,\n application: AppChannels.CLIPS,\n args: [ props.video.id, TextHelper.slugify(props.video.name) ]\n };\n }\n\n const title = LanguageService.getPhrase(namespace, 'interactives', { count: props.interactives.length });\n \n return (\n <section className='play-page-section'\n id={PlayPageAnchor.Interactives}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.Interactives, el);\n }}\n >\n <FixedWidget\n name={title}\n contents={WidgetContents.InteractivesV2}\n collection={props.interactives}\n prefetched\n getChildAppLink={(interactive: Interactive) => {\n return {\n application: AppChannels.INTERACTIVES,\n action: Actions.Interactives.VIEW_INTERACTIVE,\n args: [ interactive.id, TextHelper.slugify(interactive.name) ]\n };\n }}\n appLink={getAppLink()}\n childComponent={InteractiveWidgetItem}\n extraChildComponentProps={{\n questionsAppLink: {\n application: AppChannels.INTERACTIVES,\n action: Actions.Interactives.PREVIEW_QUESTIONS\n },\n showOwner: true,\n commonVideoProps: props.commonVideoProps\n }}\n analyticsData={props.analyticsData}\n />\n </section>\n );\n}\n","import React from 'react';\n\nexport function CollapseRightSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n d='M5.455 12c0 .401.325.727.727.727h9.88l-3.849 3.85a.728.728 0 0 0 1.029 1.028l5.09-5.091a.73.73 0 0 0 .213-.514v7.272a.727.727 0 0 0 1.455 0V4.727a.727.727 0 0 0-1.455 0V12a.73.73 0 0 0-.213-.515l-5.09-5.09a.727.727 0 1 0-1.029 1.028l3.85 3.85H6.181a.727.727 0 0 0-.727.727'\n fill='currentColor'\n />\n </svg>\n );\n}\n","import React from 'react';\n\nexport function ExpandLeftSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n d='M20 12a.727.727 0 0 0-.727-.728h-9.88l3.848-3.849a.727.727 0 1 0-1.028-1.029l-5.091 5.091a.73.73 0 0 0-.213.514V4.727a.727.727 0 0 0-1.454 0v14.545a.727.727 0 0 0 1.454 0V12c0 .186.071.373.213.515l5.091 5.09a.727.727 0 0 0 1.029-1.028l-3.85-3.85h9.88A.727.727 0 0 0 20 12'\n fill='currentColor'\n />\n </svg>\n );\n}\n",":local{\n .showInSide {\n position: sticky;\n top: 5.4375rem;\n height: 100%;\n z-index: 80;\n }\n\n .container {\n padding-right: 0;\n height: fit-content;\n }\n\n .aside {\n .container {\n min-width: 10rem; // make enough space for the collapse icon\n }\n .collapse {\n display: none;\n right: 0;\n top: 0;\n }\n &:hover {\n .collapse {\n display: block;\n }\n }\n }\n\n .iconContainer {\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}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { PortalHelper } from 'libs/common/react/utils/PortalHelper';\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 { Text } from 'libs/shared/components/text/Text';\nimport { CollapseRightSvg } from 'libs/shared/images/svg/arrows/CollapseRightSvg';\nimport { ExpandLeftSvg } from 'libs/shared/images/svg/arrows/ExpandLeftSvg';\nimport { TableOfContentsSvg } from 'libs/shared/images/svg/objects/TableOfContentsSvg';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { ContextService } from 'libs/shared/services/ContextService';\n\nimport { PLAY_PAGE_TOC_PORTAL_ID } from 'shared/layouts/teacher-layout/TeacherLayoutComponent';\n\nimport styles from './table-of-contents.module.scss';\n\nconst namespace = 'shared.playPage';\n\nexport const TOC_IGNORE_BOUNDARY = 3;\n\nexport interface TableOfContentsItem {\n name: string;\n id: PlayPageAnchor;\n}\n\ninterface TableOfContentsProps {\n items: TableOfContentsItem[];\n activeId: string;\n appLink?: Core.AppLink;\n analyticsData?: HashObject;\n setControlledId: (arg: string) => void;\n isExpanded: boolean;\n setIsExpanded: (arg: boolean) => void;\n toggleTheatreMode?: (value: boolean) => void;\n showInSide: boolean;\n isTheatreMode: boolean;\n hasTranscription: boolean;\n shouldShow: boolean;\n}\n\nfunction TableOfContentsIcon(props: TableOfContentsProps) {\n function logUserAction() {\n const analyticsOptions = {\n actionType: !props.isExpanded ? UserAction.Open : UserAction.Hide,\n entity: EntityType.TableOfContents,\n location: LocationContext.PlayPage\n };\n\n AnalyticsHelper.logUserAction(props.analyticsData, analyticsOptions);\n }\n\n function onClickIcon() {\n const shouldExpand = !props.isExpanded;\n props.setIsExpanded(shouldExpand);\n\n if (shouldExpand) {\n props.toggleTheatreMode?.(false);\n // users has not transcription mode should still abel to collapse\n if (!props.toggleTheatreMode) {\n props.setIsExpanded(false);\n }\n } else {\n props.toggleTheatreMode?.(true);\n if (!props.toggleTheatreMode) {\n props.setIsExpanded(true);\n }\n }\n logUserAction();\n }\n\n return (\n <div className='d-flex justify-content-end'>\n <div className={styles.container}>\n <div className={`${styles.iconContainer}`} >\n <IconButton\n className={`btn btn-outline-dark ${styles.listIcon}`}\n svg={TableOfContentsSvg}\n onClick={onClickIcon}\n />\n \n <IconButton\n className={`btn btn-outline-dark ${styles.arrowIcon}`}\n svg={!props.isExpanded ? ExpandLeftSvg : CollapseRightSvg}\n onClick={onClickIcon}\n />\n </div>\n </div>\n </div>\n );\n}\n\nfunction TableOfContents(props: TableOfContentsProps) {\n function logUserAction() {\n const analyticsOptions = {\n actionType: UserAction.Hide,\n entity: EntityType.TableOfContents,\n location: LocationContext.PlayPage\n };\n\n AnalyticsHelper.logUserAction(props.analyticsData, analyticsOptions);\n }\n\n function getAppLink(item: any): 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 = item.id;\n\n return {\n ...currentAppLink,\n params\n };\n }\n\n function onClickTableOfContentsHeading() {\n if (!props.showInSide) {\n // in mobile version, collapse once user hit the TOC item\n props.setIsExpanded(false);\n }\n }\n\n return (\n <div className={!props.showInSide ? 'd-inline-flex gap-1' : `col ms-2 ps-4 ${styles.showInSide}`}>\n <aside className={`${styles.aside} position-relative ${!props.showInSide ? 'px-3 pt-3 pb-2 border border-dark rounded-1 bg-white' : 'pe-1 pt-1 '}`}>\n <div className={`${styles.container}`}>\n {/* keep this for customers has no transcription turned on */}\n {props.showInSide && !props.hasTranscription && (\n <IconButton\n className={`btn position-absolute ${styles.collapse}`}\n svg={CollapseRightSvg}\n onClick={() => {\n props.setIsExpanded(false);\n props.toggleTheatreMode?.(true);\n logUserAction();\n }}\n />\n )}\n <h2 className='h5'><Text namespace={namespace} phrase='tocHeading' /></h2>\n \n <TableOfContentsList\n items={props.items}\n activeId={props.activeId}\n getAppLink={getAppLink}\n setControlledId={props.setControlledId}\n analyticsData={props.analyticsData}\n onItemClick={() => onClickTableOfContentsHeading()}\n />\n </div>\n \n </aside>\n {/* in mobile version, always show icon on the right */}\n {!props.showInSide && <TableOfContentsIcon {...props}/>}\n </div>\n );\n}\n\nexport function TableOfContentsContainer(props: TableOfContentsProps): JSX.Element {\n if (!props.shouldShow)\n return <></>;\n \n return (\n <>\n {/* web version show table of contents next to player */}\n {props.isExpanded && props.showInSide && <TableOfContents {...props}/>}\n\n {/* web version show icon in portal (RHS of window) */}\n {PortalHelper.renderInPortalIfExists(\n !props.isExpanded && <TableOfContentsIcon {...props}/>,\n document.getElementById(PLAY_PAGE_TOC_PORTAL_ID)\n )}\n\n {/* mobile version show in portal */}\n {PortalHelper.renderInPortalIfExists(\n !props.showInSide && props.isExpanded && <TableOfContents {...props}/>,\n document.getElementById(PLAY_PAGE_TOC_PORTAL_ID)\n )}\n </>\n );\n}\n",":local {\n .series {\n font-size: 0.75rem;\n font-weight: 500;\n }\n\n .badgeListContainer {\n :global(.badge) {\n height: 1.25rem;\n display: flex;\n align-items: center;\n }\n }\n\n .clipOriginInfo:not(:last-child) {\n margin-bottom: 0.5rem !important;\n }\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { Actions } from 'libs/shared/components/actions/Actions';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { AudienceLabel } from 'libs/shared/components/audience-label/AudienceLabel';\nimport { Badge, BadgeType } from 'libs/shared/components/badges/Badge';\nimport { BadgeListContainer } from 'libs/shared/components/badges/BadgeListContainer';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { RestrictionPadlock } from 'libs/shared/components/video-list/components/restriction-padlock/RestrictionPadlock';\nimport { VideoSubText, VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { Clip, PresentationAudience, Video, YearGroup } from 'libs/shared/interfaces';\nimport { DurationHelper } from 'libs/shared/utils/DurationHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { VideoFeaturesHash } from 'shared/hooks/useVideoFeatureAccess';\n\nimport styles from './title-and-actions.module.scss';\n\nconst namespace = 'shared.playPage';\n\ninterface PlayPageTitleAndActionsProps {\n presentationSlug: string | null;\n media: Clip | Video;\n yearGroups: YearGroup[];\n audiences: PresentationAudience[];\n featureAccess: VideoFeaturesHash;\n originalVideoAppLink?: Core.AppLink;\n shareId: string;\n showTitlePadlock: boolean;\n subTextType?: VideoSubTextType;\n subtextAppLink?: Core.AppLink;\n}\n\nexport function PlayPageTitleAndActions(props: PlayPageTitleAndActionsProps): JSX.Element {\n const mergedAudience = useMergeAudiences(props.media.subjectPresentationAudiences?.data, props.audiences);\n\n const containerRef = React.useRef<HTMLDivElement>(null);\n const titleContainerRef = React.useRef<HTMLDivElement>(null);\n\n const hasBadges = (\n (VideoHelper.isVideo(props.media) && !!VideoHelper.getRating(props.media)?.value) ||\n (VideoHelper.isVideo(props.media) && !!props.media.productionYear) ||\n !!props.media.subjectPresentationAudiences?.data?.length\n );\n\n const videoActions = useVideoActions({\n location: VideoActionsLocation.PlayPage,\n shareId: props.shareId,\n presentationSlug: props.presentationSlug\n });\n\n const canViewOriginal = !!props.originalVideoAppLink &&\n VideoHelper.isClip(props.media) &&\n VideoHelper.canViewOriginalVideo(props.media);\n\n return (\n <section className='mb-3 position-relative' ref={containerRef}>\n <div className='d-inline-block w-100' ref={titleContainerRef}>\n {props.featureAccess.canNavigate &&\n <div className='ms-2 float-end'>\n <Actions\n actions={videoActions.getVideoActions(props.media)}\n actionsDropdownClassName='btn btn-outline-dark'\n fetchMore={() => videoActions.fetchMoreActions(props.media)}\n />\n </div>\n }\n\n {!!VideoHelper.isVideo(props.media) && (\n <VideoSubText\n type={props.subTextType}\n video={props.media}\n appLink={props.subtextAppLink}\n className={`${styles.series} text-truncate mw-100`}\n analyticsOptions={{ location: LocationContext.PlayPage }}\n />\n )}\n <h1 className='h4 mb-2 mw-100'>\n <span className='align-self-center'>{props.media.name}</span>\n {props.showTitlePadlock && (\n <RestrictionPadlock\n tooltipPlacement='right'\n className='d-inline-block ps-1'\n video={props.media}\n yearGroups={props.yearGroups}\n />\n )}\n </h1>\n \n {VideoHelper.isClip(props.media) && canViewOriginal && (\n <p className={`clamp-1 ${styles.clipOriginInfo}`}>\n <Text namespace={namespace} phrase='viewOriginal' />\n \n <AppLink className='info-link' appLink={props.originalVideoAppLink}>\n {props.media._parentVideo?.name}\n </AppLink>\n \n <Text\n namespace={namespace}\n phrase='timestamp'\n options={{\n timeRange: `${DurationHelper.ToDisplayTimeRange(props.media.startTime * 1000, props.media.endTime * 1000)}`\n }}\n />\n </p>\n )}\n\n {hasBadges && (\n <BadgeListContainer className={styles.badgeListContainer}>\n <AudienceLabel\n audience={mergedAudience}\n className='bg-white text-dark'\n border='dark'\n />\n {VideoHelper.isVideo(props.media) && (\n <Badge type={BadgeType.Rating} data={VideoHelper.getRating(props.media)} />\n )}\n {VideoHelper.isVideo(props.media) && (\n <Badge type={BadgeType.ProductionYear} data={props.media.productionYear} />\n )}\n </BadgeListContainer>\n )}\n </div>\n </section>\n );\n}\n",":local {\n .mask {\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 5;\n background-color: $black;\n opacity: 0.5;\n transition: opacity 100ms ease-in-out;\n }\n\n .centeredIcon {\n position: absolute;\n left: 50%;\n top: 50%;\n z-index: 10;\n transform: translate(-50%, -50%);\n color: $white;\n opacity: 1;\n width: 6.25rem;\n height: 6.25rem;\n }\n\n .bgImage {\n background-size: cover;\n }\n\n .centeredOverlay {\n position: absolute;\n left: 50%;\n top: 50%;\n z-index: 10;\n transform: translate(-50%, -50%);\n color: $white;\n opacity: 1;\n }\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { EntityType, LocationContext, SignUpDescriptors, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { SvgContainer } from 'libs/shared/components/svg-container/SvgContainer';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { PlayCircleSvg } from 'libs/shared/images/svg/actions/PlayCircleSvg';\nimport { VideoTypes } from 'libs/shared/interfaces';\nimport { ImageHelper } from 'libs/shared/utils/ImageHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport styles from './player-placeholder.module.scss';\n\nconst namespace = 'shared.playerPlaceholder';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface PlayerPlaceholderProps {\n video: VideoTypes;\n type: 'pip' | 'public';\n appLink?: Core.AppLink;\n}\n\nexport function PlayerPlaceholder(props: PlayerPlaceholderProps): JSX.Element {\n switch (props.type) {\n case 'pip':\n return <PipPlaceholder {...props} />;\n case 'public':\n return <PublicPlaceholder {...props} />;\n default:\n return <></>;\n }\n}\n\nconst PipPlaceholder = (props: PlayerPlaceholderProps) => (\n <div\n className={`position-relative responsive-img ${styles.bgImage}`}\n style={{ backgroundImage: `url('${VideoHelper.getThumbnail(props.video)?.url ?? ''}')` }}\n >\n <p className={`m-0 text-white h3 ${styles.centeredOverlay}`}>{getPhrase('playingPiP')}</p>\n <div className={styles.mask} />\n </div>\n);\n\nconst PublicPlaceholder = (props: PlayerPlaceholderProps) => {\n const thumbnailUrl = ImageHelper.createUrl(VideoHelper.getThumbnail(props.video)?.url ?? '', {\n // IMPORTANT: This should be consistent with the size used in `PublicRegionController.cs` in the backend.\n size: ImageSize.Large\n });\n\n return (\n <div\n className={`position-relative responsive-img ${styles.bgImage}`}\n style={{ backgroundImage: `url('${thumbnailUrl}')` }}\n >\n <AppLink\n appLink={props.appLink}\n analyticsOptions={{\n actionType: UserAction.Click,\n location: LocationContext.PlayPage,\n entity: EntityType.AppLink,\n workflowPhase: WorkflowPhase.Start,\n descriptor: SignUpDescriptors.SignUp\n }}\n analyticsData={{}}\n >\n <SvgContainer\n svg={PlayCircleSvg}\n className={styles.centeredIcon}\n />\n <div className={styles.mask} />\n </AppLink>\n </div>\n );\n};\n","import React from 'react';\n\nimport { AppLink } from 'libs/common/backbone/core';\nimport { Core } from 'libs/common/backbone/index';\n\nimport { Resource } from 'libs/shared/interfaces';\n\ninterface UseResourcePopupParams {\n resourcePopupId: string | undefined;\n resources: Resource[] | undefined;\n getResourceAppLink: (resource: Resource) => AppLink;\n}\n\nexport function useResourcePopup({\n resourcePopupId,\n resources,\n getResourceAppLink\n}: UseResourcePopupParams): void {\n React.useEffect(() => {\n if (!resourcePopupId)\n return;\n\n const resource = resources?.find(\n r => r.id.toString() === resourcePopupId.toString()\n );\n\n if (!resource)\n return;\n\n Core.AppLinkHelper.trigger(getResourceAppLink(resource));\n }, [resourcePopupId]);\n}\n","@import '~styles/utils/include-media';\n:local {\n .main.expandedToc {\n width: calc(100% - 15rem); //minus sidebar toc width and margin\n }\n\n .main.theatreMode {\n width: 100% !important;\n }\n\n .theatreModeContent {\n display: flex;\n margin: auto !important;\n\n @include media('<=xl') {\n max-width: 100%;\n }\n }\n\n .theatreModePlayPageContainer {\n //override TeacherLayoutComponent container style\n @media (min-width: 1200px) {\n max-width: none !important;\n }\n }\n\n .theatreModeLeftContent {\n width: calc(100% - 15rem);\n @include media('<=lg') {\n width: 100%;\n }\n }\n}","import { PlayerContextValues } from 'libs/shared/context/player-context/PlayerContext';\n\nimport styles from './play-page.module.scss';\n\ninterface GetMainClassNameProps {\n hasTheatreMode: boolean;\n shouldShowSideTableOfContents: boolean;\n tableOfContentsExpanded: boolean;\n theatreMode: boolean;\n}\n\nexport function getMainClassName(props: GetMainClassNameProps): string {\n // TOC is floating no impact on main\n if (!props.shouldShowSideTableOfContents) {\n return '';\n }\n \n // Theatre mode takes precedence\n if (props.hasTheatreMode && props.theatreMode) {\n return styles.theatreMode;\n }\n \n // Expanded TOC case\n if (props.tableOfContentsExpanded) {\n return `${styles.expandedToc} col-9`;\n }\n \n // Collapsed TOC case\n return 'pe-4';\n}\n\nexport function getContentClassName(props: GetMainClassNameProps): string {\n if (!props.hasTheatreMode) {\n return '';\n }\n\n if (props.theatreMode || !props.shouldShowSideTableOfContents) {\n return `container ${styles.theatreModeContent}`;\n }\n\n return '';\n}\n\nexport function getIsTheatreMode(hasTheatreMode: boolean, playerContext: PlayerContextValues): boolean {\n return hasTheatreMode && playerContext.defaultDisplayMode === 'theatre' && playerContext.mode === 'default';\n}\n","import React from 'react';\n\nimport { LocalStorageHelper } from 'projects/player/utils/local-storage-helper';\n\nimport { useShouldShowSideTableOfContents } from 'shared/views/play/hooks/useShouldShowTableOfContents';\n\nconst PLAY_PAGE_TOC_EXPANDED = 'play-page-toc-expanded';\n\nexport function usePlayPageTableOfContent(tocId: string, hasTheatreMode: boolean, theatreModeOn: boolean) {\n const showInSide = useShouldShowSideTableOfContents();\n const localValue = LocalStorageHelper.get(PLAY_PAGE_TOC_EXPANDED) !== 'false';\n const tocDefaultExpanded = !hasTheatreMode ? localValue : (theatreModeOn || showInSide);\n\n const [ controlledId, setControlledId ] = React.useState(tocId || '');\n const [ tableOfContentsActiveId, setTableOfContentsActiveId ] = React.useState<string>('');\n const [ tableOfContentsExpanded, setTableOfContentsExpanded ] = React.useState(tocDefaultExpanded);\n\n React.useEffect(() => {\n // Always collapse when in mobile view\n if (!showInSide) {\n setTableOfContentsExpanded(false);\n return;\n }\n\n // if has theatre mode, always expanded\n if (hasTheatreMode) {\n setTableOfContentsExpanded(true);\n return;\n }\n\n // reset to default\n setTableOfContentsExpanded(tocDefaultExpanded);\n }, [ showInSide, theatreModeOn ]);\n\n function onToggleTableOfContents() {\n if (hasTheatreMode && showInSide)\n return;\n\n setTableOfContentsExpanded(!tableOfContentsExpanded);\n LocalStorageHelper.set(PLAY_PAGE_TOC_EXPANDED, (!tableOfContentsExpanded).toString());\n }\n\n return {\n controlledId,\n setControlledId,\n tableOfContentsExpanded,\n tableOfContentsActiveId,\n setTableOfContentsActiveId,\n onToggleTableOfContents\n };\n}\n","export const ObservableTypesHelper = {\n map<K, V>(onChange: () => void): Map<K, V> {\n const map = new Map<K, V>();\n const proxy = new Proxy(map, {\n get(target: Map<K, V>, prop: string) {\n if (prop === 'set') {\n return (k: K, v: V) => {\n if (target.get(k) !== v) {\n target.set(k, v);\n onChange();\n }\n return proxy;\n };\n }\n\n const val = Reflect.get(target, prop);\n return typeof val === 'function' ? val.bind(target) : val;\n }\n });\n\n return proxy;\n }\n};\n","import { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\n\nexport const PLAY_PAGE_SECTIONS_ORDER = [\n PlayPageAnchor.Video,\n PlayPageAnchor.CurriculumLinks,\n PlayPageAnchor.Resources,\n PlayPageAnchor.Interactives,\n PlayPageAnchor.Clips,\n PlayPageAnchor.VideoDetails,\n PlayPageAnchor.ClippedFrom,\n PlayPageAnchor.Transcript,\n PlayPageAnchor.ReferenceVideo,\n PlayPageAnchor.RelatedVideos\n];\n\nexport const PLAY_PAGE_SECTIONS_ORDER_NO_GLANCE = [\n PlayPageAnchor.Video,\n PlayPageAnchor.VideoDetails,\n PlayPageAnchor.CurriculumLinks,\n PlayPageAnchor.Resources,\n PlayPageAnchor.Interactives,\n PlayPageAnchor.Clips,\n PlayPageAnchor.ClippedFrom,\n PlayPageAnchor.Transcript,\n PlayPageAnchor.ReferenceVideo,\n PlayPageAnchor.RelatedVideos\n];\n","import React from 'react';\n\nimport { useForceUpdate } from 'libs/shared/hooks/useForceUpdate';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { ObservableTypesHelper } from 'libs/shared/utils/ObservableTypesHelper';\n\nimport { PLAY_PAGE_SECTIONS_ORDER, PLAY_PAGE_SECTIONS_ORDER_NO_GLANCE } from 'shared/constants/PlayPageSectionsOrder';\n\nexport function useSectionHeadings(hasGlance: boolean) {\n const forceUpdate = useForceUpdate();\n\n // heading elements must be a live mapping of the elements on the DOM\n // there has to be a force update to recalculate heading element\n const headingRef = React.useRef<Map<PlayPageAnchor, HTMLElement>>(ObservableTypesHelper.map(forceUpdate));\n\n const headingElements = (hasGlance ? PLAY_PAGE_SECTIONS_ORDER : PLAY_PAGE_SECTIONS_ORDER_NO_GLANCE)\n .map(id => headingRef.current.get(id))\n .filter(Boolean) as HTMLElement[];\n\n return { headingRef, headingElements };\n}\n","import { DefaultDisplayMode } from 'libs/shared/context/player-context/interfaces/PlayerContextAction';\nimport { PlayerMode } from 'libs/shared/context/player-context/interfaces/PlayerMode';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\n\nexport function useTheatreModeStyle(\n hasTheatreMode: boolean,\n playerMode: PlayerMode,\n defaultDisplayMode: DefaultDisplayMode\n): boolean {\n const breakpoints = useBreakpoints();\n\n if (playerMode !== 'default') {\n return false;\n }\n\n const theatreModeOn = defaultDisplayMode === 'theatre';\n // on a smaller screen, override theatre mode style when theatre mode is on\n const overrideTheatreModeStyle = breakpoints.sm || breakpoints.md;\n const theatreMode = hasTheatreMode && theatreModeOn;\n const shouldUseTheatreModeStyle = !overrideTheatreModeStyle && theatreMode;\n return shouldUseTheatreModeStyle;\n}\n","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { Clip, InteractiveMetadata, Link, Resource } from 'libs/shared/interfaces';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\n\ninterface SectionHeadingOptions {\n clips: Clip[];\n interactives: InteractiveMetadata[];\n resources: Resource[] | Link[];\n isPlayClipPage?: boolean;\n}\n\nconst namespace = 'shared.play';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport const PlayPageUtils = {\n getSectionHeading(id: PlayPageAnchor, options: SectionHeadingOptions) {\n switch (id) {\n case PlayPageAnchor.Resources:\n return getPhrase('resourcesHeading', { count: options.resources?.length });\n\n case PlayPageAnchor.Clips:\n if (options.isPlayClipPage)\n return getPhrase('otherClipsHeading', { count: options.clips?.length - 1 });\n return getPhrase('clipsHeading', { count: options.clips?.length });\n\n case PlayPageAnchor.Interactives:\n return getPhrase('interactivesHeading', { count: options.interactives?.length });\n\n case PlayPageAnchor.Video:\n return getPhrase('videoHeading');\n\n case PlayPageAnchor.VideoDetails:\n return getPhrase('videoDetailsHeading');\n\n case PlayPageAnchor.RelatedVideos:\n return getPhrase('upNextHeading');\n\n case PlayPageAnchor.CurriculumLinks:\n return getPhrase('curriculumLinksHeading');\n\n case PlayPageAnchor.ClippedFrom:\n return getPhrase('clippedFromHeading');\n \n case PlayPageAnchor.ReferenceVideo:\n return getPhrase('referenceVideoHeading');\n\n case PlayPageAnchor.Transcript:\n return getPhrase('transcriptHeading');\n\n default:\n return '';\n }\n }\n\n};\n"],"mappings":"25EAGA,SAAgB,GAA4C,CAC1D,IAAM,EAAc,EAAe,EAEnC,OADsC,EAAY,IAAM,EAAY,IAAM,EAAY,GAExF,yGEEM,EAAY,6BAEZ,GAAmB,IASzB,SAAgB,GAAoB,EAAiC,CACnE,GAAM,CAAE,EAAK,GAAe,GAA+B,CAAC,CAAC,EAE7D,SAAS,GAAkB,CAGzB,OAFmB,SAAS,gBAAgB,aAAe,EAAI,SAAS,sBAAsB,CAAC,CAAC,OAE5E,EACtB,CAEA,OACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAU,MAAK,UAAW,EAAM,mBAAhC,EACE,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAW,GAAG,EAAO,oBAAoB,GAAG,EAAM,iBAAmB,mBAAU,EAAA,EAAA,IAAA,CAAC,EAAD,CAAiB,UAAA,EAAW,OAAO,qBAAuB,CAAA,CAAI,CAAA,GAChJ,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,OAAQ,EAAI,QACZ,KAAM,EACN,UAAW,EAAM,mBAAqB,EAAgB,EAAI,EAAM,kBAAoB,EAAM,oBAE1F,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,GAAG,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jF,KAAK,EAAe,MAClB,OAAO,EAAU,cAAc,EAEjC,KAAK,EAAe,aAClB,OAAO,EAAU,qBAAqB,EAExC,KAAK,EAAe,cAClB,OAAO,EAAU,eAAe,EAElC,KAAK,EAAe,gBAClB,OAAO,EAAU,wBAAwB,EAE3C,KAAK,EAAe,YAClB,OAAO,EAAU,oBAAoB,EAEvC,KAAK,EAAe,eAClB,OAAO,EAAU,uBAAuB,EAE1C,KAAK,EAAe,WAClB,OAAO,EAAU,mBAAmB,EAEtC,QACE,MAAO,EACX,CACF,CAEF"}
|
|
1
|
+
{"version":3,"file":"CbPqWgxm2.chunk.js","names":[],"sources":["../../src/shared/views/play/hooks/useShouldShowTableOfContents.ts","../../../../libs/shared/src/components/copyright-disclaimer/copyright-disclaimer.module.scss","../../../../libs/shared/src/components/copyright-disclaimer/CopyrightDisclaimer.tsx","../../../../libs/shared/src/components/play-page/details/video-description/VideoDescription.tsx","../../../../libs/shared/src/components/play-page/details/video-details.module.scss","../../../../libs/shared/src/components/play-page/details/VideoDetailsV2.tsx","../../../../libs/common/src/react/hooks/UseEventsServiceSubscribe.ts","../../../../libs/shared/src/components/play-page/glance/video-at-a-glance.module.scss","../../../../libs/shared/src/components/play-page/glance/VideoAtAGlanceUtilsV2.ts","../../../../libs/shared/src/components/play-page/glance/points-of-interest-list/points-of-interest-list.module.scss","../../../../libs/shared/src/components/play-page/glance/points-of-interest-list/PointsOfInterestList.tsx","../../../../libs/shared/src/components/play-page/glance/VideoAtAGlanceV2.tsx","../../../../libs/shared/src/components/play-page/resources-widget/PlayPageResources.tsx","../../../../libs/shared/src/components/play-page/clips-widget/ClipWidgetItemV2.tsx","../../src/shared/components/play-page/components/play-page-clips/PlayPageClips.tsx","../../src/shared/components/play-page/components/play-page-interactives/PlayPageInteractives.tsx","../../../../libs/shared/src/images/svg/arrows/CollapseRightSvg.tsx","../../../../libs/shared/src/images/svg/arrows/ExpandLeftSvg.tsx","../../src/shared/components/play-page/components/table-of-contents/table-of-contents.module.scss","../../src/shared/components/play-page/components/table-of-contents/TableOfContents.tsx","../../src/shared/components/play-page/components/title-and-actions/title-and-actions.module.scss","../../src/shared/components/play-page/components/title-and-actions/PlayPageTitleAndActions.tsx","../../src/shared/components/player-placeholder/player-placeholder.module.scss","../../src/shared/components/player-placeholder/PlayerPlaceholder.tsx","../../src/shared/views/play/components/play-page/hooks/useResourcePopup.ts","../../src/shared/views/play/components/play-page/play-page.module.scss","../../src/shared/views/play/components/play-page/PlayPageUtils.ts","../../src/shared/views/play/hooks/usePlayPageTableOfContent.ts","../../../../libs/shared/src/utils/ObservableTypesHelper.ts","../../src/shared/constants/PlayPageSectionsOrder.ts","../../src/shared/views/play/hooks/useSectionHeadings.ts","../../src/shared/views/play/hooks/useTheatreStyle.ts","../../src/shared/views/play/PlayPageUtil.tsx"],"sourcesContent":["import { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\n\n// returns boolean value for if we should show the TOC on the side\nexport function useShouldShowSideTableOfContents(): boolean {\n const breakpoints = useBreakpoints();\n const shouldShowSideTableOfContents = breakpoints.lg || breakpoints.xl || breakpoints.xxl;\n return shouldShowSideTableOfContents;\n}\n",":local {\n .copyrightDisclaimer {\n color: $gray-500;\n }\n .overlayContainer {\n z-index: 1100;\n width: 31.25rem;\n }\n}","import React from 'react';\nimport { Overlay } from 'react-bootstrap';\nimport { Placement } from 'react-bootstrap/esm/types';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { useHoverIntent } from 'libs/shared/hooks/UseHover';\n\nimport styles from './copyright-disclaimer.module.scss';\n\nconst namespace = 'shared.copyrightDisclaimer';\n\nconst CONTAINER_HEIGHT = 150; // px\n\ninterface CopyrightDisclaimerProps {\n placement: Placement;\n overflowPlacement?: Placement;\n className?: string;\n phraseClassName?: string;\n}\n\nexport function CopyrightDisclaimer(props: CopyrightDisclaimerProps) {\n const [ ref, isHovering ] = useHoverIntent<HTMLDivElement>({});\n\n function preventOverflow() {\n const spaceBelow = document.documentElement.clientHeight - ref.current?.getBoundingClientRect().bottom;\n\n return spaceBelow < CONTAINER_HEIGHT;\n }\n\n return (\n <div ref={ref} className={props.className}>\n <p className={`${styles.copyrightDisclaimer} ${props.phraseClassName ?? 'mb-1'}`}><Text namespace={namespace} phrase='copyrightDisclaimer' /></p>\n <Overlay\n target={ref.current}\n show={isHovering}\n placement={props.overflowPlacement && preventOverflow() ? props.overflowPlacement : props.placement}\n >\n <div className={`${styles.overlayContainer} mw-100 bg-white border rounded-3 p-2`}>\n <p><Text namespace={namespace} phrase='warning' /></p>\n <p className='fw-semibold mb-0'><Text namespace={namespace} phrase='sharing' /></p>\n </div>\n </Overlay>\n </div>\n );\n}\n","import React from 'react';\n\nimport { LinkifyHelper } from 'libs/common/react/utils/LinkifyHelper';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { ExpandableText } from 'libs/shared/components/expandable-text/ExpandableText';\nimport { VideoTypes } from 'libs/shared/interfaces';\n\ninterface VideoDescriptionProps {\n video: VideoTypes;\n}\n\nexport function VideoDescription(props: VideoDescriptionProps): React.ReactElement {\n return (\n <ExpandableText lines={12}>\n {() => (\n <p\n className='mb-0'\n dangerouslySetInnerHTML={{\n __html: TextHelper.sanitize(LinkifyHelper.linkifyText(props.video.description, { nl2br: true }))\n }}\n />\n )}\n </ExpandableText>\n );\n}\n",":local {\n @media (min-width: #{map-get($grid-breakpoints, md)}) {\n .descriptionBorder {\n border-right: 1px solid $gray-300;\n }\n }\n}","import * as React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { ClickDescriptor, EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { CopyrightDisclaimer } from 'libs/shared/components/copyright-disclaimer/CopyrightDisclaimer';\nimport { ImmersiveReader } from 'libs/shared/components/immersive-reader/ImmersiveReader';\nimport { VideoDescription } from 'libs/shared/components/play-page/details/video-description/VideoDescription';\nimport { TagHelper } from 'libs/shared/components/tags/TagHelper';\nimport { TagList } from 'libs/shared/components/tags/TagList';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { hasPPDD } from 'libs/shared/components/video-details/VideoDetailsUtils';\nimport { WidgetHeader } from 'libs/shared/components/widgets/curated-widgets/components/header/WidgetHeader';\nimport { MINIMUM_GLANCE_HEIGHT } from 'libs/shared/constants/MinimumGlanceHeight';\nimport { MasterObjectTypes } from 'libs/shared/enums/MasterObjectTypes';\nimport { TagType } from 'libs/shared/enums/TagType';\nimport { BaseObject, BasePaginatedCollection, Category, Company, CurrentUser, Library, PartnerProfile, Person, Tag, VideoTypes } from 'libs/shared/interfaces';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport styles from './video-details.module.scss';\n\nconst namespace = 'shared.videoDetailsV2';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CommaListProps<T extends BaseObject> {\n label: string;\n items: BasePaginatedCollection<T>;\n getItemAppLink?: (item: T) => Core.AppLink;\n className?: string;\n}\n\nfunction CommaList<T extends BaseObject>(props: CommaListProps<T>): React.ReactElement {\n const { label, items, className } = props;\n\n const hasItems = items && items.data && items.data.length;\n\n if (!hasItems)\n return <></>;\n\n if (typeof props.getItemAppLink !== 'function') {\n const commaSeperated = items.data.map(i => i.name?.trim()).join(', ');\n return (\n <div className={className}>{label}: {commaSeperated}</div>\n );\n }\n\n return (\n <div className={className}>\n <span>{label}: </span>\n {items.data.map((item, index) => (\n <React.Fragment key={item.id}>\n <AppLink key={item.id} appLink={props.getItemAppLink(item)}>\n {item.name?.trim()}\n </AppLink>\n {index < items.data.length - 1 && <span>, </span>}\n </React.Fragment>\n ))}\n </div>\n );\n}\n\ninterface LibraryCategoryPair {\n library: Library;\n category: Category;\n}\n\nfunction getCustomLibraryCategoryPairs(video: VideoTypes): LibraryCategoryPair[] {\n const categories = video.categories?.data;\n if (!categories?.length)\n return [];\n\n return categories.filter(category => category.libraries?.data?.[0]?.type === MasterObjectTypes.CustomLibrary)\n .map(category => ({ library: category.libraries?.data?.[0], category }));\n}\n\ninterface CreateLibraryBreadcrumbsOptions {\n pair: LibraryCategoryPair;\n getLibraryAppLink: (library: Library) => Core.AppLink;\n getFolderAppLink: (library: Library, folder: Category) => Core.AppLink;\n}\n\nfunction createLibraryBreadcrumbs(options: CreateLibraryBreadcrumbsOptions): Breadcrumb[] {\n const breadcrumbs: Breadcrumb[] = [\n {\n name: options.pair.library.name,\n appLink: options.getLibraryAppLink?.(options.pair.library)\n },\n { name: '...' },\n {\n name: options.pair.category.name,\n appLink: options.getFolderAppLink?.(options.pair.library, options.pair.category)\n }\n ];\n\n return breadcrumbs;\n}\n\nfunction DetailsSection(props: VideoDetailsWithScrollbarV2Props): React.ReactElement {\n const { video } = props;\n\n if (!VideoHelper.isVideo(video) && !VideoHelper.isClip(video))\n return <></>;\n\n const parentVideo = VideoHelper.getParentVideo(video);\n const libraryPairs = getCustomLibraryCategoryPairs(video);\n\n function getPartnerProfileAppLink(company: Company) {\n if (!company.partnerProfiles || !company.partnerProfiles?.data?.length)\n return;\n\n if (company.partnerProfiles?.count > 1 && typeof props.getPartnerDashboardHubAppLink === 'function')\n return props.getPartnerDashboardHubAppLink(company);\n\n if (typeof props.getPartnerProfileAppLink === 'function')\n return props.getPartnerProfileAppLink(company.partnerProfiles?.data?.[0]);\n\n return;\n }\n\n return (\n <div className={video.description ? 'col-md-5 ps-md-3 pt-3 pt-md-0' : 'col-12'}>\n <h2 className='h6 mb-1'><Text phrase='details' /></h2>\n {!!parentVideo.productionYear && (\n <div className='mb-1'>\n <Text phrase='productionYear' options={{ year: parentVideo.productionYear }} />\n </div>\n )}\n <CommaList<Company>\n label={getPhrase('productionCompanies', { smartCount: parentVideo.productionCompanies?.data?.length })}\n items={parentVideo.productionCompanies}\n getItemAppLink={getPartnerProfileAppLink}\n className='mb-1'\n />\n <CommaList<Company>\n label={getPhrase('distributors', { smartCount: parentVideo.distributors?.data?.length })}\n items={parentVideo.distributors}\n getItemAppLink={getPartnerProfileAppLink}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('producers', { smartCount: parentVideo.producers?.data?.length })}\n items={parentVideo.producers}\n className='mb-1'\n />\n <CommaList\n label={getPhrase('directors', { smartCount: parentVideo.directors?.data?.length })}\n items={parentVideo.directors}\n className='mb-1'\n />\n {!!parentVideo.dateBroadcast && (\n <div className='mb-1'>\n <Text phrase='dateBroadcast' options={{ date: DateHelper.format(parentVideo.dateBroadcast, 'DD/MM/YYYY') }} />\n </div>\n )}\n {!!parentVideo.channel && (\n <div className='mb-1'>\n <Text phrase='channel' options={{ channel: parentVideo.channel.name }} />\n </div>\n )}\n {VideoHelper.canViewUploadDate(props.video) && (\n <div className='mb-1'>\n <Text phrase='dateUploaded' options={{ date: DateHelper.format(video.dateCreated, 'DD/MM/YYYY') }} />\n </div>\n )}\n {!!(libraryPairs.length && props.getLibraryAppLink && props.getFolderAppLink) && (\n <div className='mb-1'>\n <div>{getPhrase('libraries', { smartCount: libraryPairs.length })}:</div>\n {libraryPairs.map((pair, index) => (\n <div key={index}>\n <Breadcrumbs\n breadcrumbs={createLibraryBreadcrumbs({\n pair,\n getLibraryAppLink: props.getLibraryAppLink,\n getFolderAppLink: props.getFolderAppLink\n })}\n linkClassName='text-info'\n />\n </div>\n ))}\n </div>\n )}\n </div>\n );\n}\n\ninterface VideoDetailsWithScrollbarV2Props {\n video: VideoTypes;\n currentUser: CurrentUser;\n getTagAppLink?: (tag: Tag) => Core.AppLink;\n onLaunchImmersiveReader?: () => void;\n onExitImmersiveReader?: () => void;\n maxHeight?: number;\n suppressInteractivity?: boolean;\n hideTags?: boolean;\n headingRef?: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n showHeading?: boolean;\n getPartnerProfileAppLink?: (partnerProfile: PartnerProfile) => Core.AppLink;\n getPartnerDashboardHubAppLink?: (company: Company | Person) => Core.AppLink;\n getLibraryAppLink?: (library: Library) => Core.AppLink;\n getFolderAppLink?: (library: Library, folder: Category) => Core.AppLink;\n}\n\nexport function VideoDetailsWithScrollbarV2(props: VideoDetailsWithScrollbarV2Props): React.ReactElement {\n const { video, maxHeight = MINIMUM_GLANCE_HEIGHT } = props;\n\n const parentVideo = VideoHelper.getParentVideo(video);\n\n const showDescription = !!props.video.description;\n\n const showDetails = (\n hasPPDD(props.video) ||\n !!parentVideo.productionYear ||\n !!parentVideo.dateBroadcast ||\n !!parentVideo.channel ||\n VideoHelper.canViewUploadDate(props.video)\n );\n\n if (!showDescription && !showDetails)\n return <></>;\n\n function getTags(): Tag[] {\n if (props.hideTags || VideoHelper.isInteractive(props.video) || !props.video.tags?.data?.length)\n return null;\n\n return props.video.tags?.data?.filter(tag => tag.tagType === TagType.Normal);\n }\n const tags = getTags();\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <section\n id={PlayPageAnchor.VideoDetails}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.VideoDetails, el);\n }}\n className='play-page-section'\n >\n {props.showHeading && <WidgetHeader name={getPhrase('heading')} />}\n <div className='rounded border p-3 position-relative'>\n <Scrollbars autoHeight autoHeightMax={maxHeight} hideTracksWhenNotNeeded>\n <div className='row g-0'>\n {showDescription && (\n <div className={showDetails ? `${styles.descriptionBorder} pe-3 col-md-7` : 'col-12'}>\n <div className='d-flex align-items-center'>\n <h2 className='h6 mb-1'>\n <Text phrase='description' />\n </h2>\n <ImmersiveReader\n text={video.description}\n title={video.name}\n className='ps-2'\n onLaunch={props.onLaunchImmersiveReader}\n onExit={props.onExitImmersiveReader}\n analyticsOptions={{\n location: LocationContext.PlayPage,\n entity: EntityType.Video,\n actionType: UserAction.Click,\n descriptor: ClickDescriptor.LaunchImmersiveReader\n }}\n analyticsData={{ id: video.id, type: 'description' }}\n />\n </div>\n\n <VideoDescription video={props.video} />\n </div>\n )}\n\n {showDetails && (\n <DetailsSection {...props} />\n )}\n </div>\n\n {!!tags?.length && (\n <div className='mt-3'>\n <h2 className='h6 mb-1'><Text phrase='normalTags' /></h2>\n <TagList\n tags={tags}\n {...TagHelper.getTagActionProps(props.getTagAppLink, null, props.suppressInteractivity)}\n className='mt-1'\n />\n </div>\n )}\n\n {VideoHelper.isBroadcast(props.video) && (\n <CopyrightDisclaimer\n placement='bottom-start'\n className='d-flex justify-content-start mt-2'\n phraseClassName='mb-0'\n overflowPlacement='top-start'\n />\n )}\n\n </Scrollbars>\n </div>\n </section>\n </LanguageNamespaceContext.Provider>\n );\n}\n","import { useEffect } from 'react';\n\nimport { EventsService } from 'libs/common/react/services/EventsService';\n\n/**\n * \n * @param event the event to subscribe to\n * @param callback the callback function\n * @param once whether to subscribe once\n * @param shouldSubscribe conditionally determine whether to subscribe to events\n * @returns unsubscribe function\n */\nexport function useEventsServiceSubscribe(\n event: string,\n callback: (...args: any[]) => void,\n once?: boolean,\n shouldSubscribe?: boolean\n): () => void {\n const unsubscribe = () => {\n EventsService.unsubscribe(event, callback);\n };\n\n useEffect(() => {\n if (!shouldSubscribe)\n return;\n\n once ? EventsService.subscribeOnce(event, callback) : EventsService.subscribe(event, callback);\n\n return () => {\n unsubscribe();\n };\n }, []);\n\n return unsubscribe;\n}\n",":local{\n .learningIntention p:last-child {\n margin-bottom: -1rem !important; //offset last p element margin \n }\n\n .learningIntention p:not(:last-child) {\n margin-bottom: 0.5rem !important; \n }\n\n .highlightPoi {\n text-decoration: underline;\n }\n\n .icon {\n float:left;\n clear:both;\n }\n}","import { MutableRefObject, useEffect, useRef, useState } from 'react';\nimport { marked } from 'marked';\n\nimport { useEventsServiceSubscribe } from 'libs/common/react/hooks/UseEventsServiceSubscribe';\nimport { EventsService } from 'libs/common/react/services/EventsService';\n\nimport { Clip, Glance, PointOfInterest, Video } from 'libs/shared/interfaces';\n\nimport styles from './video-at-a-glance.module.scss';\n\nconst POI_LINK_LINE = /\\[\\]\\(cv:\\/\\/poi\\?id=\\d+\\)\\n*/g;\n\nfunction stripPoisFromGlanceContent(glanceContent: string): string {\n return glanceContent.replace(POI_LINK_LINE, '');\n}\n\nfunction getLearningIntentionHTML(glance: Glance): string {\n const learningIntention = stripPoisFromGlanceContent(glance.content);\n\n return marked(learningIntention, { async: false });\n}\n\nexport function useLearningIntentionMarkdown(\n video: Video,\n hasGlanceData?: boolean\n): string {\n const [ markdownHTML, setMarkdownHTML ] = useState('');\n\n useEffect(() => {\n if (!hasGlanceData || !video.glance?.content)\n return;\n\n const content = getLearningIntentionHTML(video.glance);\n\n setMarkdownHTML(content);\n }, [ video.glance?.content, hasGlanceData ]);\n\n return markdownHTML;\n}\n\nexport function hasGlanceData(video: Video | Clip): boolean {\n return video.glance?.content && video.glance?.format === 'text/markdown';\n}\n\nexport function useHighlightPointOfInterest(\n pointOfInterest: PointOfInterest,\n shouldHighlight: boolean\n): MutableRefObject<HTMLDivElement> {\n const ref = useRef<HTMLDivElement>(null);\n\n useEventsServiceSubscribe('player:poi:mouseover', onPlayerPoiMouseOver, null, shouldHighlight);\n useEventsServiceSubscribe('player:poi:mouseleave', onPlayerPoiMouseLeave, null, shouldHighlight);\n\n useEffect(() => {\n if (!ref.current || !shouldHighlight)\n return;\n\n ref.current?.addEventListener('mouseover', onGlancePoiMouseOver);\n ref.current?.addEventListener('mouseleave', onGlancePoiMouseLeave);\n\n return () => {\n ref.current?.removeEventListener('mouseover', onGlancePoiMouseOver);\n ref.current?.removeEventListener('mouseleave', onGlancePoiMouseLeave);\n };\n }, [ref.current]);\n\n function onPlayerPoiMouseOver(hoveredPoi: PointOfInterest): void {\n if (!hoveredPoi?.id || pointOfInterest?.id?.toString() !== hoveredPoi?.id?.toString())\n return;\n\n ref.current?.classList.add(styles.highlightPoi);\n }\n\n function onPlayerPoiMouseLeave(): void {\n ref.current?.classList.remove(styles.highlightPoi);\n }\n\n /**\n * `this` will be the element to which the eventListener is bound.\n */\n function onGlancePoiMouseOver(): void {\n if (pointOfInterest)\n EventsService.trigger('glance:poi:mouseover', pointOfInterest);\n }\n\n function onGlancePoiMouseLeave(): void {\n EventsService.trigger('glance:poi:mouseleave');\n }\n\n return ref;\n}\n",":local {\n .poiEntry {\n flex-wrap: nowrap;\n align-items: start;\n &:hover {\n .poiText:not(.public) {\n text-decoration: underline;\n }\n } \n }\n\n .public {\n margin-top: 0.125rem;\n }\n\n .poiText {\n margin-top: 0.125rem;\n }\n\n .poiTimeStamp {\n height: 1.5rem;\n min-width: 3.5625rem;\n &.wideBadge {\n min-width: 4.375rem;\n }\n }\n}","import React from 'react';\n\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { PointOfInterest } from 'libs/shared/interfaces';\nimport { DurationHelper } from 'libs/shared/utils/DurationHelper';\n\nimport { useHighlightPointOfInterest } from '../VideoAtAGlanceUtilsV2';\n\nimport styles from './points-of-interest-list.module.scss';\n\ninterface PointOfInterestProps {\n poi: PointOfInterest;\n suppressInteractivity?: boolean;\n onClickPoiItem: (time: number) => void;\n wideBadge?: boolean;\n}\n\nfunction PointOfInterestItem(props: PointOfInterestProps): JSX.Element {\n const timeStamp = DurationHelper.ToDisplayDuration(props.poi.startTime * 1000);\n\n const ref = useHighlightPointOfInterest(props.poi, !props.suppressInteractivity);\n\n if (props.suppressInteractivity) {\n return (\n <div className={`d-flex ${styles.poiEntry} mb-2`}>\n <span className={`d-flex rounded-pill justify-content-center align-items-center text-info bg-light-blue ${styles.poiTimeStamp} ${props.wideBadge ? styles.wideBadge : ''}`}>{timeStamp}</span>\n <div className={`${styles.public} ms-2`}>{props.poi.description}</div>\n </div>\n );\n }\n\n return (\n <DivButton\n key={props.poi.startTime}\n className={`d-flex ${styles.poiEntry} mb-2 cursor-pointer`}\n onClick={() => props.onClickPoiItem(props.poi.startTime)}\n ref={ref}\n >\n <div className={`d-flex rounded-pill justify-content-center align-items-center text-info bg-light-blue ${styles.poiTimeStamp} ${props.wideBadge ? styles.wideBadge : ''}`}>{timeStamp}</div>\n <div className={`ms-2 ${styles.poiText}`}>{props.poi.description}</div>\n </DivButton>\n );\n}\n\ninterface PointOfInterestListProps {\n pointsOfInterest: PointOfInterest[];\n suppressInteractivity?: boolean;\n onClickPoiItem: (time: number) => void;\n}\n\nconst namespace = 'shared.pointsOfInterestList';\n\nexport function PointOfInterestList(props: PointOfInterestListProps) {\n const sortedPointsOfInterest = props.pointsOfInterest.sort((a, b) => a.startTime - b.startTime);\n const hasTimePointOverHours = sortedPointsOfInterest.some(poi => poi.startTime >= 3600);\n\n return (\n <div>\n <h2 className='h6 my-2'><Text namespace={namespace} phrase='heading' /></h2>\n\n <div>\n {sortedPointsOfInterest.map(poi => {\n return (\n <PointOfInterestItem\n key={poi.startTime}\n poi={poi}\n suppressInteractivity={props.suppressInteractivity}\n onClickPoiItem={props.onClickPoiItem}\n wideBadge={hasTimePointOverHours}\n />\n );\n })}\n\n </div>\n </div>\n );\n}\n","import * as React from 'react';\nimport { Scrollbars } from 'react-custom-scrollbars-2';\n\nimport { Core } from 'libs/common/core';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { CopyContentIconButton } from 'libs/shared/components/play-page/copy-content-icon-button/CopyContentIconButton';\nimport { PointOfInterestList } from 'libs/shared/components/play-page/glance/points-of-interest-list/PointsOfInterestList';\nimport { TagHelper } from 'libs/shared/components/tags/TagHelper';\nimport { TagList } from 'libs/shared/components/tags/TagList';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { TagType } from 'libs/shared/enums/TagType';\nimport { PointOfInterest, Tag, Video } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { useLearningIntentionMarkdown } from './VideoAtAGlanceUtilsV2';\n\nimport styles from './video-at-a-glance.module.scss';\n\nconst namespace = 'shared.videoAtAGlanceV2';\n\n// Pixel value selected to try and make it so that when there are more\n// POIs below the fold, that the user can see some of the next one so\n// they know they can scroll. E.g. https://imgur.com/TQyL0Bq\nconst SCROLL_HEIGHT_MAX = 365; // in px\n\ninterface ScrollbarWrapperProps {\n hideScrollbar?: boolean;\n}\n\nfunction ScrollbarWrapper(props: React.PropsWithChildren<ScrollbarWrapperProps>): JSX.Element {\n if (props.hideScrollbar)\n return <>{props.children}</>;\n\n return (\n <div className='rounded border mb-4 bg-white'>\n <Scrollbars\n autoHeight\n autoHeightMax={SCROLL_HEIGHT_MAX}\n >\n <div className='px-3 pt-3 pb-2'>\n {props.children}\n </div>\n </Scrollbars>\n </div>\n );\n}\n\ninterface VideoAtAGlanceV2Props {\n video: Video;\n pointsOfInterest?: PointOfInterest[];\n suppressInteractivity?: boolean;\n setStartTime?: (time: number) => void;\n getTagAppLink?: (tag: Tag) => Core.AppLink;\n onClickTag?: () => void;\n hideScrollbar?: boolean;\n canViewGlance: boolean;\n}\n\nexport function VideoAtAGlanceV2(props: VideoAtAGlanceV2Props): JSX.Element {\n const learningIntentionMarkdownHTML = useLearningIntentionMarkdown(props.video, props.canViewGlance);\n const [ textToCopy, setTextToCopy ] = React.useState('');\n\n function logUserAction(): void {\n const analyticsData = {\n id: props.video.glance.id,\n name: props.video.glance.name,\n videoId: props.video.id,\n videoName: props.video.name,\n learningIntention: textToCopy\n };\n\n const analyticsOptions = {\n actionType: UserAction.Copy,\n entity: EntityType.Glance,\n location: LocationContext.PlayPage\n };\n AnalyticsHelper.logUserAction(analyticsData, analyticsOptions);\n }\n\n function getTags(): Tag[] {\n if (VideoHelper.isInteractive(props.video) || !props.video.tags?.data?.length)\n return null;\n\n return props.video.tags?.data?.filter(tag => tag.tagType === TagType.Pedagogy || tag.tagType === TagType.Skill);\n }\n const tags = getTags();\n\n const ref = React.useRef<HTMLDivElement>(null);\n\n React.useEffect(() => {\n if (ref.current?.innerText)\n setTextToCopy(ref.current.innerText);\n }, [ref.current?.innerText]);\n\n if (!props.canViewGlance)\n return <></>;\n\n function onClickPoiItem(time: number) {\n props.setStartTime(time);\n }\n\n return (\n <section className='play-page-section'>\n <ScrollbarWrapper hideScrollbar={props.hideScrollbar}>\n <h2 className='h6 mb-2'><Text namespace={namespace} phrase='learningIntention' /></h2>\n \n <div className={`mb-3 ${styles.learningIntention}`}>\n <CopyContentIconButton\n copyableContent={textToCopy}\n tooltipClassName={styles.icon}\n onClick={logUserAction}\n visible\n />\n <div\n dangerouslySetInnerHTML={{ __html: TextHelper.sanitize(learningIntentionMarkdownHTML) }}\n className='d-inline'\n ref={ref}\n >\n </div>\n </div>\n\n {!!tags?.length && (\n <div>\n <TagList\n tags={tags}\n {...TagHelper.getTagActionProps(props.getTagAppLink, props.onClickTag, props.suppressInteractivity)}\n className='mt-2'\n />\n </div>\n )}\n\n {!!props.pointsOfInterest?.length && (\n <div className='mt-3'>\n <PointOfInterestList\n pointsOfInterest={props.pointsOfInterest}\n suppressInteractivity={props.suppressInteractivity}\n onClickPoiItem={onClickPoiItem}\n />\n </div>\n )}\n </ScrollbarWrapper>\n </section>\n );\n}\n","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { EntityType, LocationContext, SignUpDescriptors, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { DownloadAllResourcesButton } from 'libs/shared/components/widgets/curated-widgets/components/download-all-resources-button/DownloadAllResourcesButton';\nimport { FixedWidget } from 'libs/shared/components/widgets/fixed-widget';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { Clip, Link, Resource, Video } from 'libs/shared/interfaces';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { DownloadHelper } from 'libs/shared/utils/DownloadHelper';\nimport { MasterTypeHelper } from 'libs/shared/utils/MasterTypeHelper';\n\nimport { ResourceWidgetItemV2 } from './ResourceWidgetItemV2';\n\nconst namespace = 'shared.playPageResources';\n\nfunction getResources(\n video: Video,\n isLearner: boolean\n): Array<Resource | Link> {\n const resources = video.resources?.data ?? [];\n const links = video.links?.data ?? [];\n\n if (!isLearner)\n return [ ...resources, ...links ];\n\n const filteredResources = resources.filter(r => {\n return [ 'additional-materials', 'student-activity' ].includes(r.metadata?.resourceType);\n });\n\n return [ ...filteredResources, ...links ];\n}\n\ninterface PlayPageResourcesProps {\n video: Video | Clip;\n imageCdnUrl: string;\n canViewResources: boolean;\n getAppLink: (resource: Resource) => Core.AppLink;\n analyticsData: HashObject;\n resourceThumbnailFallbackUrl: string;\n headingRef?: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n onDownloadAllClick?: (resources: Resource[], fileName: string, analyticsData?: HashObject) => void;\n}\n\nexport function PlayPageResources(props: PlayPageResourcesProps): JSX.Element {\n const { hasPermissions } = usePermissions();\n\n function onClickDownload(resource: Resource): void {\n DownloadHelper.downloadResource(\n resource,\n props.analyticsData,\n { location: LocationContext.PlayPage, actionType: UserAction.Download, entity: EntityType.Resource }\n );\n }\n\n const resources = getResources(props.video, hasPermissions(PermissionName.StudentExperience));\n const title = LanguageService.getPhrase(namespace, 'resources', { count: resources.length });\n\n if (!resources.length)\n return <></>;\n\n const downloadableResources = resources.filter(MasterTypeHelper.isResource);\n const showDownloadAll = props.canViewResources && downloadableResources.length > 0;\n\n return (\n <section\n id={PlayPageAnchor.Resources}\n className='play-page-section widget-hover-reveal-boundary'\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.Resources, el);\n }}\n >\n <FixedWidget\n name={title}\n contents={WidgetContents.PlayPageResourcesV2}\n collection={resources}\n prefetched\n childComponent={ResourceWidgetItemV2}\n headerRightComponent={showDownloadAll ? (\n <DownloadAllResourcesButton\n resources={downloadableResources}\n fileName={`${props.video.name}-resources`}\n analyticsData={props.analyticsData}\n onDownloadAllClick={props.onDownloadAllClick}\n revealOnHover\n />\n ) : undefined}\n extraChildComponentProps={{\n imageCdnUrl: props.imageCdnUrl,\n imageErrorFallbackUrl: props.resourceThumbnailFallbackUrl,\n actionBehaviour: props.canViewResources ? 'normal' : 'public',\n location: 'play-page',\n titlePosition: 'below',\n onClickDownload: props.canViewResources ? onClickDownload : null\n }}\n getChildAppLink={props.getAppLink}\n analyticsOptions={(() => {\n if (props.canViewResources)\n return {};\n \n return {\n workflowPhase: WorkflowPhase.Start,\n descriptor: SignUpDescriptors.SignUp\n };\n })()}\n analyticsData={props.analyticsData}\n />\n </section>\n );\n}\n","import React from 'react';\n\nimport { ThumbnailText } from 'libs/shared/components/thumbnails/thumbnail-text/ThumbnailText';\nimport { VideoThumbnail } from 'libs/shared/components/thumbnails/video/VideoThumbnail';\nimport { FixedWidgetItemProps } from 'libs/shared/components/widgets/items/FixedWidgetItemProps';\nimport { ThumbnailTextPosition } from 'libs/shared/enums/ThumbnailTextPosition';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { Clip, PresentationAudience } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\n\nexport interface ClipWidgetItemV2Props extends FixedWidgetItemProps<Clip> {\n audiences: PresentationAudience[];\n commonVideoProps: CommonVideoProps;\n showOwner?: boolean;\n}\n\nexport const ClipWidgetItemV2 = React.memo(function(props: ClipWidgetItemV2Props): JSX.Element {\n const { data: clip, thumbnailSize, preloadImage, getAppLink } = props;\n const mergedAudience = useMergeAudiences(clip.subjectPresentationAudiences?.data, props.audiences);\n\n return (\n <div className='flex-shrink-0 px-1 col-6 col-sm-4'>\n <VideoThumbnail\n type='static'\n textPosition={ThumbnailTextPosition.Independent}\n video={clip}\n appLink={getAppLink(clip)}\n imageOptions={{ size: thumbnailSize }}\n preload={preloadImage}\n analyticsData={props.analyticsData}\n analyticsOptions={props.analyticsOptions}\n audience={mergedAudience}\n hideDuration={false}\n commonVideoProps={props.commonVideoProps}\n />\n\n <div className='mt-2'>\n <ThumbnailText\n {...props}\n video={clip}\n appLink={props.getAppLink(clip)}\n />\n </div>\n </div>\n );\n});\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { ClipWidgetItemV2 } from 'libs/shared/components/play-page/clips-widget/ClipWidgetItemV2';\nimport { FixedWidget } from 'libs/shared/components/widgets/fixed-widget';\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { Clip, PresentationAudience, Video } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\n\nconst namespace = 'shared.playPageClips';\n\ninterface PlayPageClipsProps {\n presentationSlug: string | null;\n video: Video | Clip;\n clips: Clip[];\n canViewClips: boolean;\n audiences: PresentationAudience[];\n analyticsData: HashObject;\n headingRef?: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n commonVideoProps: CommonVideoProps;\n}\n\nexport function PlayPageClips(props: PlayPageClipsProps): JSX.Element {\n if (!props.canViewClips || !props.clips?.length)\n return <></>;\n\n const parentIsVideo = VideoHelper.isVideo(props.video);\n\n function getAppLink() {\n if (VideoHelper.isVideo(props.video)) {\n return {\n action: Actions.Videos.VIDEO_CLIPS,\n application: AppChannels.VIDEOS,\n args: [\n props.presentationSlug,\n props.video.id,\n TextHelper.slugify(props.video.name)\n ]\n };\n }\n return {\n action: Actions.Clips.CLIP_CLIPS,\n application: AppChannels.CLIPS,\n args: [ props.video.id, TextHelper.slugify(props.video.name) ]\n };\n }\n\n const title = LanguageService.getPhrase(\n namespace,\n parentIsVideo ? 'clips' : 'otherClips',\n { count: props.clips.length }\n );\n\n return (\n <section\n className='play-page-section'\n id={PlayPageAnchor.Clips}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.Clips, el);\n }}\n >\n <FixedWidget\n name={title}\n contents={WidgetContents.ClipsV2}\n collection={props.clips}\n prefetched\n getChildAppLink={(clip: Clip) => {\n return {\n application: AppChannels.CLIPS,\n action: Actions.Clips.PLAY_CLIP,\n args: [ clip.id, TextHelper.slugify(clip.name) ]\n };\n }}\n appLink={getAppLink()}\n childComponent={ClipWidgetItemV2}\n extraChildComponentProps={{\n audiences: props.audiences,\n showOwner: true,\n commonVideoProps: props.commonVideoProps\n }}\n analyticsData={props.analyticsData}\n />\n </section>\n );\n}\n","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { HashObject } from 'libs/common/react/interfaces';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { InteractiveWidgetItem } from 'libs/shared/components/play-page/interactives-widget/InteractiveWidgetItem';\nimport { FixedWidget } from 'libs/shared/components/widgets/fixed-widget';\nimport { WidgetContents } from 'libs/shared/enums/WidgetContents';\nimport { Clip, Interactive, InteractiveMetadata, Video } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\n\nconst namespace = 'shared.playPageInteractives';\n\ninterface PlayPageInteractivesProps {\n presentationSlug: string | null;\n canViewInteractives: boolean;\n video: Video | Clip;\n interactives: InteractiveMetadata[];\n analyticsData: HashObject;\n headingRef?: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n commonVideoProps: CommonVideoProps;\n}\n\nexport function PlayPageInteractives(props: PlayPageInteractivesProps): JSX.Element {\n if (!props.canViewInteractives || !props.interactives?.length)\n return <></>;\n\n function getAppLink() {\n if (VideoHelper.isVideo(props.video))\n return {\n action: Actions.Videos.VIDEO_INTERACTIVES,\n application: AppChannels.VIDEOS,\n args: [\n props.presentationSlug,\n props.video.id,\n TextHelper.slugify(props.video.name)\n ]\n };\n\n return {\n action: Actions.Clips.CLIP_INTERACTIVES,\n application: AppChannels.CLIPS,\n args: [ props.video.id, TextHelper.slugify(props.video.name) ]\n };\n }\n\n const title = LanguageService.getPhrase(namespace, 'interactives', { count: props.interactives.length });\n \n return (\n <section className='play-page-section'\n id={PlayPageAnchor.Interactives}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.Interactives, el);\n }}\n >\n <FixedWidget\n name={title}\n contents={WidgetContents.InteractivesV2}\n collection={props.interactives}\n prefetched\n getChildAppLink={(interactive: Interactive) => {\n return {\n application: AppChannels.INTERACTIVES,\n action: Actions.Interactives.VIEW_INTERACTIVE,\n args: [ interactive.id, TextHelper.slugify(interactive.name) ]\n };\n }}\n appLink={getAppLink()}\n childComponent={InteractiveWidgetItem}\n extraChildComponentProps={{\n questionsAppLink: {\n application: AppChannels.INTERACTIVES,\n action: Actions.Interactives.PREVIEW_QUESTIONS\n },\n showOwner: true,\n commonVideoProps: props.commonVideoProps\n }}\n analyticsData={props.analyticsData}\n />\n </section>\n );\n}\n","import React from 'react';\n\nexport function CollapseRightSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n d='M5.455 12c0 .401.325.727.727.727h9.88l-3.849 3.85a.728.728 0 0 0 1.029 1.028l5.09-5.091a.73.73 0 0 0 .213-.514v7.272a.727.727 0 0 0 1.455 0V4.727a.727.727 0 0 0-1.455 0V12a.73.73 0 0 0-.213-.515l-5.09-5.09a.727.727 0 1 0-1.029 1.028l3.85 3.85H6.181a.727.727 0 0 0-.727.727'\n fill='currentColor'\n />\n </svg>\n );\n}\n","import React from 'react';\n\nexport function ExpandLeftSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n d='M20 12a.727.727 0 0 0-.727-.728h-9.88l3.848-3.849a.727.727 0 1 0-1.028-1.029l-5.091 5.091a.73.73 0 0 0-.213.514V4.727a.727.727 0 0 0-1.454 0v14.545a.727.727 0 0 0 1.454 0V12c0 .186.071.373.213.515l5.091 5.09a.727.727 0 0 0 1.029-1.028l-3.85-3.85h9.88A.727.727 0 0 0 20 12'\n fill='currentColor'\n />\n </svg>\n );\n}\n",":local{\n .showInSide {\n position: sticky;\n top: 5.4375rem;\n height: 100%;\n z-index: 80;\n }\n\n .container {\n padding-right: 0;\n height: fit-content;\n }\n\n .aside {\n .container {\n min-width: 10rem; // make enough space for the collapse icon\n }\n .collapse {\n display: none;\n right: 0;\n top: 0;\n }\n &:hover {\n .collapse {\n display: block;\n }\n }\n }\n\n .iconContainer {\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}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { PortalHelper } from 'libs/common/react/utils/PortalHelper';\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 { Text } from 'libs/shared/components/text/Text';\nimport { CollapseRightSvg } from 'libs/shared/images/svg/arrows/CollapseRightSvg';\nimport { ExpandLeftSvg } from 'libs/shared/images/svg/arrows/ExpandLeftSvg';\nimport { TableOfContentsSvg } from 'libs/shared/images/svg/objects/TableOfContentsSvg';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { ContextService } from 'libs/shared/services/ContextService';\n\nimport { PLAY_PAGE_TOC_PORTAL_ID } from 'shared/layouts/teacher-layout/TeacherLayoutComponent';\n\nimport styles from './table-of-contents.module.scss';\n\nconst namespace = 'shared.playPage';\n\nexport const TOC_IGNORE_BOUNDARY = 3;\n\nexport interface TableOfContentsItem {\n name: string;\n id: PlayPageAnchor;\n}\n\ninterface TableOfContentsProps {\n items: TableOfContentsItem[];\n activeId: string;\n appLink?: Core.AppLink;\n analyticsData?: HashObject;\n setControlledId: (arg: string) => void;\n isExpanded: boolean;\n setIsExpanded: (arg: boolean) => void;\n toggleTheatreMode?: (value: boolean) => void;\n showInSide: boolean;\n isTheatreMode: boolean;\n hasTranscription: boolean;\n shouldShow: boolean;\n}\n\nfunction TableOfContentsIcon(props: TableOfContentsProps) {\n function logUserAction() {\n const analyticsOptions = {\n actionType: !props.isExpanded ? UserAction.Open : UserAction.Hide,\n entity: EntityType.TableOfContents,\n location: LocationContext.PlayPage\n };\n\n AnalyticsHelper.logUserAction(props.analyticsData, analyticsOptions);\n }\n\n function onClickIcon() {\n const shouldExpand = !props.isExpanded;\n props.setIsExpanded(shouldExpand);\n\n if (shouldExpand) {\n props.toggleTheatreMode?.(false);\n // users has not transcription mode should still abel to collapse\n if (!props.toggleTheatreMode) {\n props.setIsExpanded(false);\n }\n } else {\n props.toggleTheatreMode?.(true);\n if (!props.toggleTheatreMode) {\n props.setIsExpanded(true);\n }\n }\n logUserAction();\n }\n\n return (\n <div className='d-flex justify-content-end'>\n <div className={styles.container}>\n <div className={`${styles.iconContainer}`} >\n <IconButton\n className={`btn btn-outline-dark ${styles.listIcon}`}\n svg={TableOfContentsSvg}\n onClick={onClickIcon}\n />\n \n <IconButton\n className={`btn btn-outline-dark ${styles.arrowIcon}`}\n svg={!props.isExpanded ? ExpandLeftSvg : CollapseRightSvg}\n onClick={onClickIcon}\n />\n </div>\n </div>\n </div>\n );\n}\n\nfunction TableOfContents(props: TableOfContentsProps) {\n function logUserAction() {\n const analyticsOptions = {\n actionType: UserAction.Hide,\n entity: EntityType.TableOfContents,\n location: LocationContext.PlayPage\n };\n\n AnalyticsHelper.logUserAction(props.analyticsData, analyticsOptions);\n }\n\n function getAppLink(item: any): 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 = item.id;\n\n return {\n ...currentAppLink,\n params\n };\n }\n\n function onClickTableOfContentsHeading() {\n if (!props.showInSide) {\n // in mobile version, collapse once user hit the TOC item\n props.setIsExpanded(false);\n }\n }\n\n return (\n <div className={!props.showInSide ? 'd-inline-flex gap-1' : `col ms-2 ps-4 ${styles.showInSide}`}>\n <aside className={`${styles.aside} position-relative ${!props.showInSide ? 'px-3 pt-3 pb-2 border border-dark rounded-1 bg-white' : 'pe-1 pt-1 '}`}>\n <div className={`${styles.container}`}>\n {/* keep this for customers has no transcription turned on */}\n {props.showInSide && !props.hasTranscription && (\n <IconButton\n className={`btn position-absolute ${styles.collapse}`}\n svg={CollapseRightSvg}\n onClick={() => {\n props.setIsExpanded(false);\n props.toggleTheatreMode?.(true);\n logUserAction();\n }}\n />\n )}\n <h2 className='h5'><Text namespace={namespace} phrase='tocHeading' /></h2>\n \n <TableOfContentsList\n items={props.items}\n activeId={props.activeId}\n getAppLink={getAppLink}\n setControlledId={props.setControlledId}\n analyticsData={props.analyticsData}\n onItemClick={() => onClickTableOfContentsHeading()}\n />\n </div>\n \n </aside>\n {/* in mobile version, always show icon on the right */}\n {!props.showInSide && <TableOfContentsIcon {...props}/>}\n </div>\n );\n}\n\nexport function TableOfContentsContainer(props: TableOfContentsProps): JSX.Element {\n if (!props.shouldShow)\n return <></>;\n \n return (\n <>\n {/* web version show table of contents next to player */}\n {props.isExpanded && props.showInSide && <TableOfContents {...props}/>}\n\n {/* web version show icon in portal (RHS of window) */}\n {PortalHelper.renderInPortalIfExists(\n !props.isExpanded && <TableOfContentsIcon {...props}/>,\n document.getElementById(PLAY_PAGE_TOC_PORTAL_ID)\n )}\n\n {/* mobile version show in portal */}\n {PortalHelper.renderInPortalIfExists(\n !props.showInSide && props.isExpanded && <TableOfContents {...props}/>,\n document.getElementById(PLAY_PAGE_TOC_PORTAL_ID)\n )}\n </>\n );\n}\n",":local {\n .series {\n font-size: 0.75rem;\n font-weight: 500;\n }\n\n .badgeListContainer {\n :global(.badge) {\n height: 1.25rem;\n display: flex;\n align-items: center;\n }\n }\n\n .clipOriginInfo:not(:last-child) {\n margin-bottom: 0.5rem !important;\n }\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { Actions } from 'libs/shared/components/actions/Actions';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { AudienceLabel } from 'libs/shared/components/audience-label/AudienceLabel';\nimport { Badge, BadgeType } from 'libs/shared/components/badges/Badge';\nimport { BadgeListContainer } from 'libs/shared/components/badges/BadgeListContainer';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { RestrictionPadlock } from 'libs/shared/components/video-list/components/restriction-padlock/RestrictionPadlock';\nimport { VideoSubText, VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { Clip, PresentationAudience, Video, YearGroup } from 'libs/shared/interfaces';\nimport { DurationHelper } from 'libs/shared/utils/DurationHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { VideoFeaturesHash } from 'shared/hooks/useVideoFeatureAccess';\n\nimport styles from './title-and-actions.module.scss';\n\nconst namespace = 'shared.playPage';\n\ninterface PlayPageTitleAndActionsProps {\n presentationSlug: string | null;\n media: Clip | Video;\n yearGroups: YearGroup[];\n audiences: PresentationAudience[];\n featureAccess: VideoFeaturesHash;\n originalVideoAppLink?: Core.AppLink;\n shareId: string;\n showTitlePadlock: boolean;\n subTextType?: VideoSubTextType;\n subtextAppLink?: Core.AppLink;\n}\n\nexport function PlayPageTitleAndActions(props: PlayPageTitleAndActionsProps): JSX.Element {\n const mergedAudience = useMergeAudiences(props.media.subjectPresentationAudiences?.data, props.audiences);\n\n const containerRef = React.useRef<HTMLDivElement>(null);\n const titleContainerRef = React.useRef<HTMLDivElement>(null);\n\n const hasBadges = (\n (VideoHelper.isVideo(props.media) && !!VideoHelper.getRating(props.media)?.value) ||\n (VideoHelper.isVideo(props.media) && !!props.media.productionYear) ||\n !!props.media.subjectPresentationAudiences?.data?.length\n );\n\n const videoActions = useVideoActions({\n location: VideoActionsLocation.PlayPage,\n shareId: props.shareId,\n presentationSlug: props.presentationSlug\n });\n\n const canViewOriginal = !!props.originalVideoAppLink &&\n VideoHelper.isClip(props.media) &&\n VideoHelper.canViewOriginalVideo(props.media);\n\n return (\n <section className='mb-3 position-relative' ref={containerRef}>\n <div className='d-inline-block w-100' ref={titleContainerRef}>\n {props.featureAccess.canNavigate &&\n <div className='ms-2 float-end'>\n <Actions\n actions={videoActions.getVideoActions(props.media)}\n actionsDropdownClassName='btn btn-outline-dark'\n fetchMore={() => videoActions.fetchMoreActions(props.media)}\n />\n </div>\n }\n\n {!!VideoHelper.isVideo(props.media) && (\n <VideoSubText\n type={props.subTextType}\n video={props.media}\n appLink={props.subtextAppLink}\n className={`${styles.series} text-truncate mw-100`}\n analyticsOptions={{ location: LocationContext.PlayPage }}\n />\n )}\n <h1 className='h4 mb-2 mw-100'>\n <span className='align-self-center'>{props.media.name}</span>\n {props.showTitlePadlock && (\n <RestrictionPadlock\n tooltipPlacement='right'\n className='d-inline-block ps-1'\n video={props.media}\n yearGroups={props.yearGroups}\n />\n )}\n </h1>\n \n {VideoHelper.isClip(props.media) && canViewOriginal && (\n <p className={`clamp-1 ${styles.clipOriginInfo}`}>\n <Text namespace={namespace} phrase='viewOriginal' />\n \n <AppLink className='info-link' appLink={props.originalVideoAppLink}>\n {props.media._parentVideo?.name}\n </AppLink>\n \n <Text\n namespace={namespace}\n phrase='timestamp'\n options={{\n timeRange: `${DurationHelper.ToDisplayTimeRange(props.media.startTime * 1000, props.media.endTime * 1000)}`\n }}\n />\n </p>\n )}\n\n {hasBadges && (\n <BadgeListContainer className={styles.badgeListContainer}>\n <AudienceLabel\n audience={mergedAudience}\n className='bg-white text-dark'\n border='dark'\n />\n {VideoHelper.isVideo(props.media) && (\n <Badge type={BadgeType.Rating} data={VideoHelper.getRating(props.media)} />\n )}\n {VideoHelper.isVideo(props.media) && (\n <Badge type={BadgeType.ProductionYear} data={props.media.productionYear} />\n )}\n </BadgeListContainer>\n )}\n </div>\n </section>\n );\n}\n",":local {\n .mask {\n position: absolute;\n width: 100%;\n height: 100%;\n z-index: 5;\n background-color: $black;\n opacity: 0.5;\n transition: opacity 100ms ease-in-out;\n }\n\n .centeredIcon {\n position: absolute;\n left: 50%;\n top: 50%;\n z-index: 10;\n transform: translate(-50%, -50%);\n color: $white;\n opacity: 1;\n width: 6.25rem;\n height: 6.25rem;\n }\n\n .bgImage {\n background-size: cover;\n }\n\n .centeredOverlay {\n position: absolute;\n left: 50%;\n top: 50%;\n z-index: 10;\n transform: translate(-50%, -50%);\n color: $white;\n opacity: 1;\n }\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { EntityType, LocationContext, SignUpDescriptors, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { SvgContainer } from 'libs/shared/components/svg-container/SvgContainer';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { PlayCircleSvg } from 'libs/shared/images/svg/actions/PlayCircleSvg';\nimport { VideoTypes } from 'libs/shared/interfaces';\nimport { ImageHelper } from 'libs/shared/utils/ImageHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport styles from './player-placeholder.module.scss';\n\nconst namespace = 'shared.playerPlaceholder';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface PlayerPlaceholderProps {\n video: VideoTypes;\n type: 'pip' | 'public';\n appLink?: Core.AppLink;\n}\n\nexport function PlayerPlaceholder(props: PlayerPlaceholderProps): JSX.Element {\n switch (props.type) {\n case 'pip':\n return <PipPlaceholder {...props} />;\n case 'public':\n return <PublicPlaceholder {...props} />;\n default:\n return <></>;\n }\n}\n\nconst PipPlaceholder = (props: PlayerPlaceholderProps) => (\n <div\n className={`position-relative responsive-img ${styles.bgImage}`}\n style={{ backgroundImage: `url('${VideoHelper.getThumbnail(props.video)?.url ?? ''}')` }}\n >\n <p className={`m-0 text-white h3 ${styles.centeredOverlay}`}>{getPhrase('playingPiP')}</p>\n <div className={styles.mask} />\n </div>\n);\n\nconst PublicPlaceholder = (props: PlayerPlaceholderProps) => {\n const thumbnailUrl = ImageHelper.createUrl(VideoHelper.getThumbnail(props.video)?.url ?? '', {\n // IMPORTANT: This should be consistent with the size used in `PublicRegionController.cs` in the backend.\n size: ImageSize.Large\n });\n\n return (\n <div\n className={`position-relative responsive-img ${styles.bgImage}`}\n style={{ backgroundImage: `url('${thumbnailUrl}')` }}\n >\n <AppLink\n appLink={props.appLink}\n analyticsOptions={{\n actionType: UserAction.Click,\n location: LocationContext.PlayPage,\n entity: EntityType.AppLink,\n workflowPhase: WorkflowPhase.Start,\n descriptor: SignUpDescriptors.SignUp\n }}\n analyticsData={{}}\n >\n <SvgContainer\n svg={PlayCircleSvg}\n className={styles.centeredIcon}\n />\n <div className={styles.mask} />\n </AppLink>\n </div>\n );\n};\n","import React from 'react';\n\nimport { AppLink } from 'libs/common/backbone/core';\nimport { Core } from 'libs/common/backbone/index';\n\nimport { Resource } from 'libs/shared/interfaces';\n\ninterface UseResourcePopupParams {\n resourcePopupId: string | undefined;\n resources: Resource[] | undefined;\n getResourceAppLink: (resource: Resource) => AppLink;\n}\n\nexport function useResourcePopup({\n resourcePopupId,\n resources,\n getResourceAppLink\n}: UseResourcePopupParams): void {\n React.useEffect(() => {\n if (!resourcePopupId)\n return;\n\n const resource = resources?.find(\n r => r.id.toString() === resourcePopupId.toString()\n );\n\n if (!resource)\n return;\n\n Core.AppLinkHelper.trigger(getResourceAppLink(resource));\n }, [resourcePopupId]);\n}\n","@import '~styles/utils/include-media';\n:local {\n .main.expandedToc {\n width: calc(100% - 15rem); //minus sidebar toc width and margin\n }\n\n .main.theatreMode {\n width: 100% !important;\n }\n\n .theatreModeContent {\n display: flex;\n margin: auto !important;\n\n @include media('<=xl') {\n max-width: 100%;\n }\n }\n\n .theatreModePlayPageContainer {\n //override TeacherLayoutComponent container style\n @media (min-width: 1200px) {\n max-width: none !important;\n }\n }\n\n .theatreModeLeftContent {\n width: calc(100% - 15rem);\n @include media('<=lg') {\n width: 100%;\n }\n }\n}","import { PlayerContextValues } from 'libs/shared/context/player-context/PlayerContext';\n\nimport styles from './play-page.module.scss';\n\ninterface GetMainClassNameProps {\n hasTheatreMode: boolean;\n shouldShowSideTableOfContents: boolean;\n tableOfContentsExpanded: boolean;\n theatreMode: boolean;\n}\n\nexport function getMainClassName(props: GetMainClassNameProps): string {\n // TOC is floating no impact on main\n if (!props.shouldShowSideTableOfContents) {\n return '';\n }\n \n // Theatre mode takes precedence\n if (props.hasTheatreMode && props.theatreMode) {\n return styles.theatreMode;\n }\n \n // Expanded TOC case\n if (props.tableOfContentsExpanded) {\n return `${styles.expandedToc} col-9`;\n }\n \n // Collapsed TOC case\n return 'pe-4';\n}\n\nexport function getContentClassName(props: GetMainClassNameProps): string {\n if (!props.hasTheatreMode) {\n return '';\n }\n\n if (props.theatreMode || !props.shouldShowSideTableOfContents) {\n return `container ${styles.theatreModeContent}`;\n }\n\n return '';\n}\n\nexport function getIsTheatreMode(hasTheatreMode: boolean, playerContext: PlayerContextValues): boolean {\n return hasTheatreMode && playerContext.defaultDisplayMode === 'theatre' && playerContext.mode === 'default';\n}\n","import React from 'react';\n\nimport { LocalStorageHelper } from 'projects/player/utils/local-storage-helper';\n\nimport { useShouldShowSideTableOfContents } from 'shared/views/play/hooks/useShouldShowTableOfContents';\n\nconst PLAY_PAGE_TOC_EXPANDED = 'play-page-toc-expanded';\n\nexport function usePlayPageTableOfContent(tocId: string, hasTheatreMode: boolean, theatreModeOn: boolean) {\n const showInSide = useShouldShowSideTableOfContents();\n const localValue = LocalStorageHelper.get(PLAY_PAGE_TOC_EXPANDED) !== 'false';\n const tocDefaultExpanded = !hasTheatreMode ? localValue : (theatreModeOn || showInSide);\n\n const [ controlledId, setControlledId ] = React.useState(tocId || '');\n const [ tableOfContentsActiveId, setTableOfContentsActiveId ] = React.useState<string>('');\n const [ tableOfContentsExpanded, setTableOfContentsExpanded ] = React.useState(tocDefaultExpanded);\n\n React.useEffect(() => {\n // Always collapse when in mobile view\n if (!showInSide) {\n setTableOfContentsExpanded(false);\n return;\n }\n\n // if has theatre mode, always expanded\n if (hasTheatreMode) {\n setTableOfContentsExpanded(true);\n return;\n }\n\n // reset to default\n setTableOfContentsExpanded(tocDefaultExpanded);\n }, [ showInSide, theatreModeOn ]);\n\n function onToggleTableOfContents() {\n if (hasTheatreMode && showInSide)\n return;\n\n setTableOfContentsExpanded(!tableOfContentsExpanded);\n LocalStorageHelper.set(PLAY_PAGE_TOC_EXPANDED, (!tableOfContentsExpanded).toString());\n }\n\n return {\n controlledId,\n setControlledId,\n tableOfContentsExpanded,\n tableOfContentsActiveId,\n setTableOfContentsActiveId,\n onToggleTableOfContents\n };\n}\n","export const ObservableTypesHelper = {\n map<K, V>(onChange: () => void): Map<K, V> {\n const map = new Map<K, V>();\n const proxy = new Proxy(map, {\n get(target: Map<K, V>, prop: string) {\n if (prop === 'set') {\n return (k: K, v: V) => {\n if (target.get(k) !== v) {\n target.set(k, v);\n onChange();\n }\n return proxy;\n };\n }\n\n const val = Reflect.get(target, prop);\n return typeof val === 'function' ? val.bind(target) : val;\n }\n });\n\n return proxy;\n }\n};\n","import { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\n\nexport const PLAY_PAGE_SECTIONS_ORDER = [\n PlayPageAnchor.Video,\n PlayPageAnchor.CurriculumLinks,\n PlayPageAnchor.Resources,\n PlayPageAnchor.Interactives,\n PlayPageAnchor.Clips,\n PlayPageAnchor.VideoDetails,\n PlayPageAnchor.ClippedFrom,\n PlayPageAnchor.Transcript,\n PlayPageAnchor.ReferenceVideo,\n PlayPageAnchor.RelatedVideos\n];\n\nexport const PLAY_PAGE_SECTIONS_ORDER_NO_GLANCE = [\n PlayPageAnchor.Video,\n PlayPageAnchor.VideoDetails,\n PlayPageAnchor.CurriculumLinks,\n PlayPageAnchor.Resources,\n PlayPageAnchor.Interactives,\n PlayPageAnchor.Clips,\n PlayPageAnchor.ClippedFrom,\n PlayPageAnchor.Transcript,\n PlayPageAnchor.ReferenceVideo,\n PlayPageAnchor.RelatedVideos\n];\n","import React from 'react';\n\nimport { useForceUpdate } from 'libs/shared/hooks/useForceUpdate';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { ObservableTypesHelper } from 'libs/shared/utils/ObservableTypesHelper';\n\nimport { PLAY_PAGE_SECTIONS_ORDER, PLAY_PAGE_SECTIONS_ORDER_NO_GLANCE } from 'shared/constants/PlayPageSectionsOrder';\n\nexport function useSectionHeadings(hasGlance: boolean) {\n const forceUpdate = useForceUpdate();\n\n // heading elements must be a live mapping of the elements on the DOM\n // there has to be a force update to recalculate heading element\n const headingRef = React.useRef<Map<PlayPageAnchor, HTMLElement>>(ObservableTypesHelper.map(forceUpdate));\n\n const headingElements = (hasGlance ? PLAY_PAGE_SECTIONS_ORDER : PLAY_PAGE_SECTIONS_ORDER_NO_GLANCE)\n .map(id => headingRef.current.get(id))\n .filter(Boolean) as HTMLElement[];\n\n return { headingRef, headingElements };\n}\n","import { DefaultDisplayMode } from 'libs/shared/context/player-context/interfaces/PlayerContextAction';\nimport { PlayerMode } from 'libs/shared/context/player-context/interfaces/PlayerMode';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\n\nexport function useTheatreModeStyle(\n hasTheatreMode: boolean,\n playerMode: PlayerMode,\n defaultDisplayMode: DefaultDisplayMode\n): boolean {\n const breakpoints = useBreakpoints();\n\n if (playerMode !== 'default') {\n return false;\n }\n\n const theatreModeOn = defaultDisplayMode === 'theatre';\n // on a smaller screen, override theatre mode style when theatre mode is on\n const overrideTheatreModeStyle = breakpoints.sm || breakpoints.md;\n const theatreMode = hasTheatreMode && theatreModeOn;\n const shouldUseTheatreModeStyle = !overrideTheatreModeStyle && theatreMode;\n return shouldUseTheatreModeStyle;\n}\n","import { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { Clip, InteractiveMetadata, Link, Resource } from 'libs/shared/interfaces';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\n\ninterface SectionHeadingOptions {\n clips: Clip[];\n interactives: InteractiveMetadata[];\n resources: Resource[] | Link[];\n isPlayClipPage?: boolean;\n}\n\nconst namespace = 'shared.play';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nexport const PlayPageUtils = {\n getSectionHeading(id: PlayPageAnchor, options: SectionHeadingOptions) {\n switch (id) {\n case PlayPageAnchor.Resources:\n return getPhrase('resourcesHeading', { count: options.resources?.length });\n\n case PlayPageAnchor.Clips:\n if (options.isPlayClipPage)\n return getPhrase('otherClipsHeading', { count: options.clips?.length - 1 });\n return getPhrase('clipsHeading', { count: options.clips?.length });\n\n case PlayPageAnchor.Interactives:\n return getPhrase('interactivesHeading', { count: options.interactives?.length });\n\n case PlayPageAnchor.Video:\n return getPhrase('videoHeading');\n\n case PlayPageAnchor.VideoDetails:\n return getPhrase('videoDetailsHeading');\n\n case PlayPageAnchor.RelatedVideos:\n return getPhrase('upNextHeading');\n\n case PlayPageAnchor.CurriculumLinks:\n return getPhrase('curriculumLinksHeading');\n\n case PlayPageAnchor.ClippedFrom:\n return getPhrase('clippedFromHeading');\n \n case PlayPageAnchor.ReferenceVideo:\n return getPhrase('referenceVideoHeading');\n\n case PlayPageAnchor.Transcript:\n return getPhrase('transcriptHeading');\n\n default:\n return '';\n }\n }\n\n};\n"],"mappings":"25EAGA,SAAgB,GAA4C,CAC1D,IAAM,EAAc,EAAe,EAEnC,OADsC,EAAY,IAAM,EAAY,IAAM,EAAY,GAExF,yGEEM,EAAY,6BAEZ,GAAmB,IASzB,SAAgB,GAAoB,EAAiC,CACnE,GAAM,CAAE,EAAK,GAAe,GAA+B,CAAC,CAAC,EAE7D,SAAS,GAAkB,CAGzB,OAFmB,SAAS,gBAAgB,aAAe,EAAI,SAAS,sBAAsB,CAAC,CAAC,OAE5E,EACtB,CAEA,OACE,EAAA,EAAA,KAAA,CAAC,MAAD,CAAU,MAAK,UAAW,EAAM,mBAAhC,EACE,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAW,GAAG,EAAO,oBAAoB,GAAG,EAAM,iBAAmB,mBAAU,EAAA,EAAA,IAAA,CAAC,EAAD,CAAiB,UAAA,EAAW,OAAO,qBAAuB,CAAA,CAAI,CAAA,GAChJ,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,OAAQ,EAAI,QACZ,KAAM,EACN,UAAW,EAAM,mBAAqB,EAAgB,EAAI,EAAM,kBAAoB,EAAM,oBAE1F,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAW,GAAG,EAAO,iBAAiB,gDAA3C,EACE,EAAA,EAAA,IAAA,CAAC,IAAD,CAAA,UAAG,EAAA,EAAA,IAAA,CAAC,EAAD,CAAiB,UAAA,EAAW,OAAO,SAAW,CAAA,CAAI,CAAA,GACrD,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,6BAAmB,EAAA,EAAA,IAAA,CAAC,EAAD,CAAiB,UAAA,EAAW,OAAO,SAAW,CAAA,CAAI,CAAA,CAC/E,GACE,CAAA,CACN,GAET,CChCA,SAAgB,GAAiB,EAAkD,CACjF,OACE,EAAA,EAAA,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,2 @@
|
|
|
1
|
-
import{o as e}from"./DAXXjFlN.chunk.js";import{y as t}from"./BftnFbcr.chunk.js";import{n}from"./B785hxeE.chunk.js";import{t as r}from"./C2w0pmFW.chunk.js";import{t as i}from"./wrLrTezN.chunk.js";import{t as a}from"./BXTI9cmX.chunk.js";import{u as o}from"./BX0wDJmp.chunk.js";import{y as s}from"./NlCAcBdo.chunk.js";import{t as c}from"./oPIkfKWW2.chunk.js";import{t as ee}from"./CcDvlSWl2.chunk.js";import{t as l}from"./DZX1tZ-D2.chunk.js";import{t as u}from"./CVHQXNzi2.chunk.js";import{t as d}from"./DbSUQ2A12.chunk.js";import{t as f}from"./YakGe6vv2.chunk.js";import{t as p}from"./DsXWD-Sn.chunk.js";import{t as m}from"./DdsRCMkN.chunk.js";import{t as te}from"./CgCqPbjJ.chunk.js";import{t as ne}from"./PgzMrOyM.chunk.js";import{t as re}from"./C5rBgkQH.chunk.js";import{t as ie}from"./B2INd6bh.chunk.js";import{t as ae}from"./BQKcAczf.chunk.js";import{i as oe}from"./_Cm5O72d.chunk.js";import{n as h,t as g}from"./CpFtf-tI2.chunk.js";import{t as se}from"./DW51cSV_2.chunk.js";import{t as _}from"./CmV-znIi2.chunk.js";import{r as v}from"./CE2wLoIp.chunk.js";import{n as ce}from"./Dy3xpenS.chunk.js";import{t as y}from"./DqM363Cd.chunk.js";import{t as b}from"./BD_YlxPJ.chunk.js";import"./C2s0ZcC4.chunk.js";import{u as le}from"./DW4eUMeA.chunk.js";import{t as ue}from"./C2pEjcxD.chunk.js";import{n as x}from"./BZ45p2V7.chunk.js";import{t as de}from"./CF6KXSqn.chunk.js";import{t as S}from"./BPavmm8c.chunk.js";import{a as fe,i as pe,n as me,t as he}from"./02GiL0bJ2.chunk.js";import{_ as ge,a as _e,c as C,d as ve,f as w,g as T,h as E,i as D,l as O,m as k,n as A,o as j,p as M,r as N,s as P,t as F,u as ye,v as I}from"./wpRpI9h02.chunk.js";import{i as be,r as xe,t as Se}from"./BgblOoyL2.chunk.js";import{t as L}from"./DkxWaE9O2.chunk.js";var R={chaptersAndSubtitles(e,t){let n={query:`subtitles[customer],chapters`,permissionFilterOption:d.StripMetadata,contentRegion:t};return{url:l.urlBuilder(`{gateway}/v1/objects/${e}`,n),publicUrl:l.urlBuilder(`/api/objects/${e}/subtitles`,n),key:`videos:${e}:subtitles:chapters:${d.StripMetadata}`,formatData:e=>({subtitles:e.subtitles.data,chapters:e.chapters.data})}},subtitleVtt(e,t){return{url:l.urlBuilder(`{player}/srt-to-vtt`,{url:e,fullSentences:!0}),publicUrl:l.urlBuilder(`/api/player/srt-to-vtt`,{url:e,fullSentences:!0}),key:`subtitle:${e}`,formatData:e=>({...t,vtt:e})}}},z=e(r()),B=y(),V={dropdown:`_dropdown_zu639_1`},H=i(),U=`shared.curriculumLinks`;function Ce(e){let{preferredCurriculum:t,availableCurriculums:n,curriculumLinks:r,updateCurriculum:i}=e.curriculums;function a(t){i(t,{shouldLog:!0,locationContext:s.PlayPage,video:e.video})}return!e.canViewCurriculumLinks||!r?.length&&!e.curriculums.mappedCurriculums.length?(0,H.jsx)(H.Fragment,{}):(0,H.jsxs)(`section`,{id:S.CurriculumLinks,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(S.CurriculumLinks,t)},className:`play-page-section`,children:[(0,H.jsx)(`h2`,{className:`h4 me-2 h-100`,children:(0,H.jsx)(h,{namespace:U,phrase:`heading`})}),(0,H.jsx)(L,{availableCurriculums:n,onChangeCurriculum:a,selectedCurriculum:t,className:V.dropdown}),(0,H.jsx)(`div`,{className:`rounded border position-relative`,children:(0,H.jsx)(B.Scrollbars,{autoHeight:!0,autoHeightMax:e.height,children:(0,H.jsx)(`div`,{className:`p-3`,children:(0,H.jsx)(x,{curriculumLinks:e.curriculums.curriculumLinks,onChangeCurriculum:a,hasCompleted:e.curriculums.hasCompleted,mappedCurriculums:e.curriculums.mappedCurriculums,isFetching:e.curriculums.isFetching,getCodeAppLink:(t,n)=>e.hasNewSearch?b.getSearchAppLink(t,{[v]:n}):null,locationContext:s.PlayPage})})})})]})}var we=`shared.play`;function W(e){let r=ce(),i=r.playerRef.current?.isPaused?.(),o=r.playerRef?.current?.hasStarted?.(),{hasPermissions:s}=ae(),c=ee(null),l=Se(),{canConsume:d}=f.getCanBeConsumed(e.video),p=j(e.hasTheatreMode,r),h=A(e.hasTheatreMode,r.mode,r.defaultDisplayMode);function _(e){e||v(!1),r.setDefaultDisplayMode?.(e?`theatre`:`normal`),r.playerRef?.current?.toggleTheatreMode?.(e)}function v(e){r.playerRef?.current?.toggleTranscript?.(e)}let{tableOfContentsActiveId:y,setTableOfContentsActiveId:b,controlledId:x,setControlledId:L,tableOfContentsExpanded:R,onToggleTableOfContents:B}=D(e.tableOfContentsId,e.hasTheatreMode,p),V=ge(e.video)&&e.featureAccess.canViewGlance,{headingRef:U,headingElements:W}=N(V),G=W.map(t=>({id:t.id,name:F.getSectionHeading(t.id,{clips:e.clips,interactives:e.interactives,resources:[...e.video.resources?.data??[],...e.video.links?.data??[]]})})),Te=f.isVideoTypeArchived(e.video),Ee=s(n.StudentExperience);be({setActiveId:b,headingElements:W,controlledId:x,setControlledId:L}),xe(W,x);let K=z.useRef(!1),q=oe({settings:c,presentationSlug:e.presentationSlug}),J=q.getResourceAppLink(e.video.id,e.shareId,e.featureAccess.canViewResourceItems);O({resourcePopupId:e.resourcePopupId,resources:e.video.resources?.data,getResourceAppLink:J});function Y(){K.current=!r?.playerRef?.current?.isPaused(),r?.playerRef?.current?.pause()}function X(){K.current&&r?.playerRef?.current?.play()}let Z={hasTheatreMode:e.hasTheatreMode,shouldShowSideTableOfContents:e.shouldShowSideTableOfContents,tableOfContentsExpanded:R,theatreMode:h},De=P(Z),Oe=_e(Z),ke=r.mode===`picture-in-picture`||e.featureAccess.canViewPublicLayout&&!e.video._canBeConsumed.value,[,Q]=re(te.PLAY_PAGE_CONTAINER_CLASS_NAME),Ae=e.commonVideoProps.getSubTextType?.(e.video),$=e.commonVideoProps.getSubTextAppLink(e.video);z.useEffect(()=>{Q(p?C.theatreModePlayPageContainer:``)},[p]),z.useEffect(()=>()=>Q(``),[]);function je(){t.trigger({action:m.SignUp.SIGN_UP,application:a.SIGN_UP})}function Me(){if(!d)return je();o||r.playerRef.current?.play(),v(!0),window.scrollTo({top:0,behavior:`smooth`})}function Ne(e){r.playerRef.current?.currentTime(e)}return(0,H.jsx)(g.Provider,{value:we,children:(0,H.jsxs)(`div`,{className:`px-4 play-page-sections-container ${e.shouldShowSideTableOfContents?`row g-0`:``}`,children:[(0,H.jsxs)(`main`,{className:`${C.main} ${De}`,children:[!!e.breadcrumbs?.length&&(0,H.jsx)(`div`,{className:`mb-2`,children:(0,H.jsx)(ue,{breadcrumbs:e.breadcrumbs})}),(0,H.jsx)(he,{restrictions:e.video._restrictions,yearGroups:e.commonVideoProps.yearGroups,objectId:e.video.id,objectTypeId:u.Video,canManageVideoAccess:e.canManageVideoAccess}),Te&&(0,H.jsx)(fe,{typeId:e.video.typeId,hasStudentExperience:Ee}),(0,H.jsxs)(`section`,{id:S.Video,className:`mb-3 ${ie.GLOBAL_PLAYER_SELECTOR}`,ref:e=>{e&&U?.current&&U.current.set(S.Video,e)},children:[d&&(0,H.jsx)(le,{objectId:e.video.id,objectTypeId:e.video.typeId,shareId:e.shareId,context:e.params?.context,contextId:e.params?.contextId,playNext:e.params?.playNext,moviesAndTv:e.params?.mtv,startTime:e.params?.t??e.params?.startTime,endTime:e.params?.endTime,mode:`default`,location:`play-page`},e.video.id),(0,H.jsx)(`div`,{className:ke?``:`d-none`,children:(0,H.jsx)(ye,{video:e.video,appLink:{application:a.SIGN_UP,action:m.SignUp.SIGN_UP},type:r.mode===`picture-in-picture`?`pip`:`public`})})]}),(0,H.jsxs)(`div`,{className:Oe,children:[(0,H.jsxs)(`div`,{className:h?`${C.theatreModeLeftContent}`:`w-100`,children:[(0,H.jsx)(ve,{presentationSlug:e.presentationSlug,media:e.video,subTextType:Ae,subtextAppLink:$,yearGroups:e.commonVideoProps.yearGroups,audiences:e.audiences,featureAccess:e.featureAccess,shareId:e.shareId,showTitlePadlock:!e.commonVideoProps.hasStudentExperience&&!e.commonVideoProps.hasGuestExperience}),V?(0,H.jsx)(T,{video:e.video,pointsOfInterest:e.pointsOfInterest,setStartTime:e=>r.playerRef.current?.currentTime(e),getTagAppLink:q.getTagAppLink,suppressInteractivity:e.featureAccess.canViewPublicLayout,canViewGlance:V}):(0,H.jsx)(I,{video:e.video,currentUser:e.currentUser,headingRef:U,onLaunchImmersiveReader:Y,onExitImmersiveReader:X,getTagAppLink:q.getTagAppLink,suppressInteractivity:e.featureAccess.canViewPublicLayout,getPartnerProfileAppLink:q.getPartnerProfileAppLink,getPartnerDashboardHubAppLink:q.getPartnerDashboardHubAppLink,getLibraryAppLink:s(n.ViewLibraries)?q.getLibraryAppLink:null,getFolderAppLink:s(n.ViewLibraries)?q.getFolderAppLink:null}),(0,H.jsx)(Ce,{height:368,curriculums:e.curriculums,canViewCurriculumLinks:e.featureAccess.canViewCurriculumLinks,headingRef:U,video:e.video,hasNewSearch:e.hasNewSearch}),(0,H.jsx)(E,{headingRef:U,video:e.video,canViewResources:e.featureAccess.canViewResourceItems,imageCdnUrl:e.commonVideoProps.imageCdnUrl,getAppLink:J,analyticsData:{videoId:e.video.id,videoName:e.video.name},resourceThumbnailFallbackUrl:ne.Fallbacks.RESOURCE_THUMBNAIL,onDownloadAllClick:l}),(0,H.jsx)(M,{presentationSlug:e.presentationSlug,headingRef:U,video:e.video,interactives:e.interactives,analyticsData:{videoId:e.video.id,videoName:e.video.name},canViewInteractives:e.featureAccess.canViewInteractives,commonVideoProps:e.commonVideoProps}),(0,H.jsx)(k,{presentationSlug:e.presentationSlug,video:e.video,headingRef:U,clips:e.clips,canViewClips:e.featureAccess.canViewClips,audiences:e.audiences,analyticsData:{videoId:e.video.id,videoName:e.video.name},commonVideoProps:e.commonVideoProps}),V&&(0,H.jsx)(I,{video:e.video,currentUser:e.currentUser,headingRef:U,onLaunchImmersiveReader:Y,onExitImmersiveReader:X,getTagAppLink:q.getTagAppLink,suppressInteractivity:e.featureAccess.canViewPublicLayout,showHeading:!0,getPartnerProfileAppLink:q.getPartnerProfileAppLink,getPartnerDashboardHubAppLink:q.getPartnerDashboardHubAppLink,getLibraryAppLink:q.getLibraryAppLink,getFolderAppLink:q.getFolderAppLink}),e.shouldShowTranscript&&(0,H.jsx)(de,{headingRef:U,video:e.video,subtitles:e.subtitles,vttSubtitles:e.vttSubtitles,chapters:e.chapters,onShowInVideo:Me,signUpLink:{action:m.SignUp.SIGN_UP,application:a.SIGN_UP},setStartTime:Ne,isBot:e.isBot,isPaused:i,isAuthenticated:e.currentUser.isAuthenticated,playerApiUrl:e.playerApiUrl}),e.featureAccess.canViewCitations&&(0,H.jsx)(me,{headingRef:U,media:e.video,contentRegion:e.currentUser.contentRegion,shareId:e.shareId,presentationSlug:e.presentationSlug}),(0,H.jsx)(pe,{presentationSlug:e.presentationSlug,currentVideo:e.video,headingRef:U,commonVideoProps:e.commonVideoProps,relatedVideos:e.relatedVideos,currentUser:e.currentUser,getVideoAppLink:(t,n)=>se.getAppLink(t,{...n,context:e.params.context,contextId:e.params.contextId,playNext:e.params.playNext,shareId:e.shareId,moviesAndTv:e.params.mtv,includeContext:e.currentUser?.isAuthenticated},e.presentationSlug),audiences:e.audiences,moviesAndTv:e.params.mtv})]}),p&&(0,H.jsx)(w,{isExpanded:R,setIsExpanded:B,toggleTheatreMode:null,items:G,activeId:y,setControlledId:L,analyticsData:{videoId:e.video.id,videoName:e.video.name},showInSide:e.shouldShowSideTableOfContents,isTheatreMode:!0,hasTranscription:e.hasTheatreMode,shouldShow:G.length>=3})]})]}),!p&&(0,H.jsx)(w,{isExpanded:R,setIsExpanded:B,toggleTheatreMode:e.hasTheatreMode?_:null,items:G,activeId:y,setControlledId:L,analyticsData:{videoId:e.video.id,videoName:e.video.name},showInSide:e.shouldShowSideTableOfContents,isTheatreMode:!1,hasTranscription:e.hasTheatreMode,shouldShow:G.length>=3})]})})}function G(e,t){let n=o(c.currentUser()),{canViewTranscript:r}=_({objectId:e,objectTypeId:u.Video}),i=o(t?p.sharedVideo(e,t):p.video(e)),a=r&&!!i.data?._curationTags?.value?.isClickViewCurated;return{shouldShowTranscript:a,shouldFetchTranscript:a&&!n.data?.isAuthenticated}}export{W as n,R as r,G as t};
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
import{o as e}from"./DAXXjFlN.chunk.js";import{y as t}from"./BftnFbcr.chunk.js";import{n}from"./B785hxeE.chunk.js";import{t as r}from"./C2w0pmFW.chunk.js";import{t as i}from"./wrLrTezN.chunk.js";import{t as a}from"./BXTI9cmX.chunk.js";import{u as o}from"./BX0wDJmp.chunk.js";import{y as s}from"./NlCAcBdo.chunk.js";import{t as c}from"./oPIkfKWW2.chunk.js";import{t as ee}from"./CcDvlSWl2.chunk.js";import{t as l}from"./DZX1tZ-D2.chunk.js";import{t as u}from"./CVHQXNzi2.chunk.js";import{t as d}from"./DbSUQ2A12.chunk.js";import{t as f}from"./YakGe6vv2.chunk.js";import{t as p}from"./DsXWD-Sn.chunk.js";import{t as m}from"./DdsRCMkN.chunk.js";import{t as te}from"./CgCqPbjJ.chunk.js";import{t as ne}from"./PgzMrOyM.chunk.js";import{t as re}from"./C5rBgkQH.chunk.js";import{t as ie}from"./B2INd6bh.chunk.js";import{t as ae}from"./BQKcAczf.chunk.js";import{i as oe}from"./_Cm5O72d.chunk.js";import{n as h,t as g}from"./CpFtf-tI2.chunk.js";import{t as se}from"./DW51cSV_2.chunk.js";import{t as _}from"./CmV-znIi2.chunk.js";import{r as v}from"./CE2wLoIp.chunk.js";import{n as ce}from"./Dy3xpenS.chunk.js";import{t as y}from"./DqM363Cd.chunk.js";import{t as b}from"./Cl0Kjmj6.chunk.js";import"./BcVxkWsW.chunk.js";import{u as le}from"./DW4eUMeA.chunk.js";import{t as ue}from"./C2pEjcxD.chunk.js";import{n as x}from"./BZ45p2V7.chunk.js";import{t as de}from"./CF6KXSqn.chunk.js";import{t as S}from"./BPavmm8c.chunk.js";import{a as fe,i as pe,n as me,t as he}from"./02GiL0bJ2.chunk.js";import{_ as ge,a as _e,c as C,d as ve,f as w,g as T,h as E,i as D,l as O,m as k,n as A,o as j,p as M,r as N,s as P,t as F,u as ye,v as I}from"./CbPqWgxm2.chunk.js";import{i as be,r as xe,t as Se}from"./BgblOoyL2.chunk.js";import{t as L}from"./DkxWaE9O2.chunk.js";var R={chaptersAndSubtitles(e,t){let n={query:`subtitles[customer],chapters`,permissionFilterOption:d.StripMetadata,contentRegion:t};return{url:l.urlBuilder(`{gateway}/v1/objects/${e}`,n),publicUrl:l.urlBuilder(`/api/objects/${e}/subtitles`,n),key:`videos:${e}:subtitles:chapters:${d.StripMetadata}`,formatData:e=>({subtitles:e.subtitles.data,chapters:e.chapters.data})}},subtitleVtt(e,t){return{url:l.urlBuilder(`{player}/srt-to-vtt`,{url:e,fullSentences:!0}),publicUrl:l.urlBuilder(`/api/player/srt-to-vtt`,{url:e,fullSentences:!0}),key:`subtitle:${e}`,formatData:e=>({...t,vtt:e})}}},z=e(r()),B=y(),V={dropdown:`_dropdown_zu639_1`},H=i(),U=`shared.curriculumLinks`;function Ce(e){let{preferredCurriculum:t,availableCurriculums:n,curriculumLinks:r,updateCurriculum:i}=e.curriculums;function a(t){i(t,{shouldLog:!0,locationContext:s.PlayPage,video:e.video})}return!e.canViewCurriculumLinks||!r?.length&&!e.curriculums.mappedCurriculums.length?(0,H.jsx)(H.Fragment,{}):(0,H.jsxs)(`section`,{id:S.CurriculumLinks,ref:t=>{t&&e.headingRef?.current&&e.headingRef.current.set(S.CurriculumLinks,t)},className:`play-page-section`,children:[(0,H.jsx)(`h2`,{className:`h4 me-2 h-100`,children:(0,H.jsx)(h,{namespace:U,phrase:`heading`})}),(0,H.jsx)(L,{availableCurriculums:n,onChangeCurriculum:a,selectedCurriculum:t,className:V.dropdown}),(0,H.jsx)(`div`,{className:`rounded border position-relative`,children:(0,H.jsx)(B.Scrollbars,{autoHeight:!0,autoHeightMax:e.height,children:(0,H.jsx)(`div`,{className:`p-3`,children:(0,H.jsx)(x,{curriculumLinks:e.curriculums.curriculumLinks,onChangeCurriculum:a,hasCompleted:e.curriculums.hasCompleted,mappedCurriculums:e.curriculums.mappedCurriculums,isFetching:e.curriculums.isFetching,getCodeAppLink:(t,n)=>e.hasNewSearch?b.getSearchAppLink(t,{[v]:n}):null,locationContext:s.PlayPage})})})})]})}var we=`shared.play`;function W(e){let r=ce(),i=r.playerRef.current?.isPaused?.(),o=r.playerRef?.current?.hasStarted?.(),{hasPermissions:s}=ae(),c=ee(null),l=Se(),{canConsume:d}=f.getCanBeConsumed(e.video),p=j(e.hasTheatreMode,r),h=A(e.hasTheatreMode,r.mode,r.defaultDisplayMode);function _(e){e||v(!1),r.setDefaultDisplayMode?.(e?`theatre`:`normal`),r.playerRef?.current?.toggleTheatreMode?.(e)}function v(e){r.playerRef?.current?.toggleTranscript?.(e)}let{tableOfContentsActiveId:y,setTableOfContentsActiveId:b,controlledId:x,setControlledId:L,tableOfContentsExpanded:R,onToggleTableOfContents:B}=D(e.tableOfContentsId,e.hasTheatreMode,p),V=ge(e.video)&&e.featureAccess.canViewGlance,{headingRef:U,headingElements:W}=N(V),G=W.map(t=>({id:t.id,name:F.getSectionHeading(t.id,{clips:e.clips,interactives:e.interactives,resources:[...e.video.resources?.data??[],...e.video.links?.data??[]]})})),Te=f.isVideoTypeArchived(e.video),Ee=s(n.StudentExperience);be({setActiveId:b,headingElements:W,controlledId:x,setControlledId:L}),xe(W,x);let K=z.useRef(!1),q=oe({settings:c,presentationSlug:e.presentationSlug}),J=q.getResourceAppLink(e.video.id,e.shareId,e.featureAccess.canViewResourceItems);O({resourcePopupId:e.resourcePopupId,resources:e.video.resources?.data,getResourceAppLink:J});function Y(){K.current=!r?.playerRef?.current?.isPaused(),r?.playerRef?.current?.pause()}function X(){K.current&&r?.playerRef?.current?.play()}let Z={hasTheatreMode:e.hasTheatreMode,shouldShowSideTableOfContents:e.shouldShowSideTableOfContents,tableOfContentsExpanded:R,theatreMode:h},De=P(Z),Oe=_e(Z),ke=r.mode===`picture-in-picture`||e.featureAccess.canViewPublicLayout&&!e.video._canBeConsumed.value,[,Q]=re(te.PLAY_PAGE_CONTAINER_CLASS_NAME),Ae=e.commonVideoProps.getSubTextType?.(e.video),$=e.commonVideoProps.getSubTextAppLink(e.video);z.useEffect(()=>{Q(p?C.theatreModePlayPageContainer:``)},[p]),z.useEffect(()=>()=>Q(``),[]);function je(){t.trigger({action:m.SignUp.SIGN_UP,application:a.SIGN_UP})}function Me(){if(!d)return je();o||r.playerRef.current?.play(),v(!0),window.scrollTo({top:0,behavior:`smooth`})}function Ne(e){r.playerRef.current?.currentTime(e)}return(0,H.jsx)(g.Provider,{value:we,children:(0,H.jsxs)(`div`,{className:`px-4 play-page-sections-container ${e.shouldShowSideTableOfContents?`row g-0`:``}`,children:[(0,H.jsxs)(`main`,{className:`${C.main} ${De}`,children:[!!e.breadcrumbs?.length&&(0,H.jsx)(`div`,{className:`mb-2`,children:(0,H.jsx)(ue,{breadcrumbs:e.breadcrumbs})}),(0,H.jsx)(he,{restrictions:e.video._restrictions,yearGroups:e.commonVideoProps.yearGroups,objectId:e.video.id,objectTypeId:u.Video,canManageVideoAccess:e.canManageVideoAccess}),Te&&(0,H.jsx)(fe,{typeId:e.video.typeId,hasStudentExperience:Ee}),(0,H.jsxs)(`section`,{id:S.Video,className:`mb-3 ${ie.GLOBAL_PLAYER_SELECTOR}`,ref:e=>{e&&U?.current&&U.current.set(S.Video,e)},children:[d&&(0,H.jsx)(le,{objectId:e.video.id,objectTypeId:e.video.typeId,shareId:e.shareId,context:e.params?.context,contextId:e.params?.contextId,playNext:e.params?.playNext,moviesAndTv:e.params?.mtv,startTime:e.params?.t??e.params?.startTime,endTime:e.params?.endTime,mode:`default`,location:`play-page`},e.video.id),(0,H.jsx)(`div`,{className:ke?``:`d-none`,children:(0,H.jsx)(ye,{video:e.video,appLink:{application:a.SIGN_UP,action:m.SignUp.SIGN_UP},type:r.mode===`picture-in-picture`?`pip`:`public`})})]}),(0,H.jsxs)(`div`,{className:Oe,children:[(0,H.jsxs)(`div`,{className:h?`${C.theatreModeLeftContent}`:`w-100`,children:[(0,H.jsx)(ve,{presentationSlug:e.presentationSlug,media:e.video,subTextType:Ae,subtextAppLink:$,yearGroups:e.commonVideoProps.yearGroups,audiences:e.audiences,featureAccess:e.featureAccess,shareId:e.shareId,showTitlePadlock:!e.commonVideoProps.hasStudentExperience&&!e.commonVideoProps.hasGuestExperience}),V?(0,H.jsx)(T,{video:e.video,pointsOfInterest:e.pointsOfInterest,setStartTime:e=>r.playerRef.current?.currentTime(e),getTagAppLink:q.getTagAppLink,suppressInteractivity:e.featureAccess.canViewPublicLayout,canViewGlance:V}):(0,H.jsx)(I,{video:e.video,currentUser:e.currentUser,headingRef:U,onLaunchImmersiveReader:Y,onExitImmersiveReader:X,getTagAppLink:q.getTagAppLink,suppressInteractivity:e.featureAccess.canViewPublicLayout,getPartnerProfileAppLink:q.getPartnerProfileAppLink,getPartnerDashboardHubAppLink:q.getPartnerDashboardHubAppLink,getLibraryAppLink:s(n.ViewLibraries)?q.getLibraryAppLink:null,getFolderAppLink:s(n.ViewLibraries)?q.getFolderAppLink:null}),(0,H.jsx)(Ce,{height:368,curriculums:e.curriculums,canViewCurriculumLinks:e.featureAccess.canViewCurriculumLinks,headingRef:U,video:e.video,hasNewSearch:e.hasNewSearch}),(0,H.jsx)(E,{headingRef:U,video:e.video,canViewResources:e.featureAccess.canViewResourceItems,imageCdnUrl:e.commonVideoProps.imageCdnUrl,getAppLink:J,analyticsData:{videoId:e.video.id,videoName:e.video.name},resourceThumbnailFallbackUrl:ne.Fallbacks.RESOURCE_THUMBNAIL,onDownloadAllClick:l}),(0,H.jsx)(M,{presentationSlug:e.presentationSlug,headingRef:U,video:e.video,interactives:e.interactives,analyticsData:{videoId:e.video.id,videoName:e.video.name},canViewInteractives:e.featureAccess.canViewInteractives,commonVideoProps:e.commonVideoProps}),(0,H.jsx)(k,{presentationSlug:e.presentationSlug,video:e.video,headingRef:U,clips:e.clips,canViewClips:e.featureAccess.canViewClips,audiences:e.audiences,analyticsData:{videoId:e.video.id,videoName:e.video.name},commonVideoProps:e.commonVideoProps}),V&&(0,H.jsx)(I,{video:e.video,currentUser:e.currentUser,headingRef:U,onLaunchImmersiveReader:Y,onExitImmersiveReader:X,getTagAppLink:q.getTagAppLink,suppressInteractivity:e.featureAccess.canViewPublicLayout,showHeading:!0,getPartnerProfileAppLink:q.getPartnerProfileAppLink,getPartnerDashboardHubAppLink:q.getPartnerDashboardHubAppLink,getLibraryAppLink:q.getLibraryAppLink,getFolderAppLink:q.getFolderAppLink}),e.shouldShowTranscript&&(0,H.jsx)(de,{headingRef:U,video:e.video,subtitles:e.subtitles,vttSubtitles:e.vttSubtitles,chapters:e.chapters,onShowInVideo:Me,signUpLink:{action:m.SignUp.SIGN_UP,application:a.SIGN_UP},setStartTime:Ne,isBot:e.isBot,isPaused:i,isAuthenticated:e.currentUser.isAuthenticated,playerApiUrl:e.playerApiUrl}),e.featureAccess.canViewCitations&&(0,H.jsx)(me,{headingRef:U,media:e.video,contentRegion:e.currentUser.contentRegion,shareId:e.shareId,presentationSlug:e.presentationSlug}),(0,H.jsx)(pe,{presentationSlug:e.presentationSlug,currentVideo:e.video,headingRef:U,commonVideoProps:e.commonVideoProps,relatedVideos:e.relatedVideos,currentUser:e.currentUser,getVideoAppLink:(t,n)=>se.getAppLink(t,{...n,context:e.params.context,contextId:e.params.contextId,playNext:e.params.playNext,shareId:e.shareId,moviesAndTv:e.params.mtv,includeContext:e.currentUser?.isAuthenticated},e.presentationSlug),audiences:e.audiences,moviesAndTv:e.params.mtv})]}),p&&(0,H.jsx)(w,{isExpanded:R,setIsExpanded:B,toggleTheatreMode:null,items:G,activeId:y,setControlledId:L,analyticsData:{videoId:e.video.id,videoName:e.video.name},showInSide:e.shouldShowSideTableOfContents,isTheatreMode:!0,hasTranscription:e.hasTheatreMode,shouldShow:G.length>=3})]})]}),!p&&(0,H.jsx)(w,{isExpanded:R,setIsExpanded:B,toggleTheatreMode:e.hasTheatreMode?_:null,items:G,activeId:y,setControlledId:L,analyticsData:{videoId:e.video.id,videoName:e.video.name},showInSide:e.shouldShowSideTableOfContents,isTheatreMode:!1,hasTranscription:e.hasTheatreMode,shouldShow:G.length>=3})]})})}function G(e,t){let n=o(c.currentUser()),{canViewTranscript:r}=_({objectId:e,objectTypeId:u.Video}),i=o(t?p.sharedVideo(e,t):p.video(e)),a=r&&!!i.data?._curationTags?.value?.isClickViewCurated;return{shouldShowTranscript:a,shouldFetchTranscript:a&&!n.data?.isAuthenticated}}export{W as n,R as r,G as t};
|
|
2
|
+
//# sourceMappingURL=Cj6PScU52.chunk.js.map
|