@clickview/lite 0.49.0-rc.1 → 0.49.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/bundles.json +1 -1
  2. package/dist/scripts/{1125-920cb38d1d-lite.chunk.js → 1125-ece855d933-lite.chunk.js} +2 -2
  3. package/dist/scripts/1125-ece855d933-lite.chunk.js.map +1 -0
  4. package/dist/scripts/{1361-cb263ca4be-lite.chunk.js → 1361-08527370f3-lite.chunk.js} +3 -3
  5. package/dist/scripts/{1361-cb263ca4be-lite.chunk.js.map → 1361-08527370f3-lite.chunk.js.map} +1 -1
  6. package/dist/scripts/{3231-5a94696432-lite.chunk.js → 3231-9c13e06b46-lite.chunk.js} +2 -2
  7. package/dist/scripts/{3231-5a94696432-lite.chunk.js.map → 3231-9c13e06b46-lite.chunk.js.map} +1 -1
  8. package/dist/scripts/{3332-9fb69ac559-lite.chunk.js → 3332-5dcf265f42-lite.chunk.js} +2 -2
  9. package/dist/scripts/{3332-9fb69ac559-lite.chunk.js.map → 3332-5dcf265f42-lite.chunk.js.map} +1 -1
  10. package/dist/scripts/6368-b3a9150fc0-lite.chunk.js +2 -0
  11. package/dist/scripts/6368-b3a9150fc0-lite.chunk.js.map +1 -0
  12. package/dist/scripts/{6617-5848771512-lite.chunk.js → 6617-f205e40b57-lite.chunk.js} +3 -3
  13. package/dist/scripts/6617-f205e40b57-lite.chunk.js.map +1 -0
  14. package/dist/scripts/{7293-5dba1b3eb3-lite.chunk.js → 7293-be2f707cf1-lite.chunk.js} +2 -2
  15. package/dist/scripts/{7293-5dba1b3eb3-lite.chunk.js.map → 7293-be2f707cf1-lite.chunk.js.map} +1 -1
  16. package/dist/scripts/{bundle-6fb7fc87f9.min.js → bundle-1335ff3786.min.js} +3 -3
  17. package/dist/scripts/{bundle-6fb7fc87f9.min.js.map → bundle-1335ff3786.min.js.map} +1 -1
  18. package/package.json +1 -1
  19. package/dist/scripts/1125-920cb38d1d-lite.chunk.js.map +0 -1
  20. package/dist/scripts/6368-52e3eba432-lite.chunk.js +0 -2
  21. package/dist/scripts/6368-52e3eba432-lite.chunk.js.map +0 -1
  22. package/dist/scripts/6617-5848771512-lite.chunk.js.map +0 -1
  23. /package/dist/scripts/{1361-cb263ca4be-lite.chunk.js.LICENSE.txt → 1361-08527370f3-lite.chunk.js.LICENSE.txt} +0 -0
  24. /package/dist/scripts/{6617-5848771512-lite.chunk.js.LICENSE.txt → 6617-f205e40b57-lite.chunk.js.LICENSE.txt} +0 -0
  25. /package/dist/scripts/{bundle-6fb7fc87f9.min.js.LICENSE.txt → bundle-1335ff3786.min.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"scripts/3231-5a94696432-lite.chunk.js","mappings":"8JAIaA,EAAe,CAE1BC,iBAAgB,WACd,EAAAC,MAAA,QAAc,WAAsBC,QAAQ,qBAC9C,E,sECJIC,EAAqB,CACzBC,UAAW,YACXC,gBAAiB,SAGNC,EAAgB,CAI3BC,YAAW,SAACC,EAAcC,GACxB,GAAKD,EAAL,CACA,IAAME,EAAMD,EAAU,SAAS,CAAC,EAAGN,EAAoBM,GAAWN,EAClE,OAAO,IAAWK,EAAME,EAFP,CAGnB,E,6DCLI,SAAUC,EAAoBC,GAClC,I,EAwBQC,EAxBR,GAMI,QAAa,OAAD,wBAAMD,EAAME,WAAS,CAAEC,UAAWH,EAAME,aAL9CE,EAAU,EAAlBC,OACAC,EAAU,EAAVA,WACAC,EAAU,EAAVA,WACAC,EAAS,EAATA,UACYC,EAAY,EAAxBC,WAEF,GAKI,QAAa,OAAD,wBAAMV,EAAMW,WAAS,CAAER,UAAWH,EAAMW,aAJtDC,EAAM,EAANA,OACAC,EAAI,EAAJA,KACQC,EAAU,EAAlBT,OACYU,EAAY,EAAxBL,WAiBF,OAdA,aAAgB,W,UACRT,EAAsB,QAAf,EAAAD,EAAME,iBAAS,eAAED,KAC1Be,MAAMC,QAAQhB,KAASA,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tB,EAAEvJ,6BAA6BlK,MAEjF,IAAKyV,GAA0BC,EAC7B,OAAO,EAET,IAAKA,EACH,OAAQ,EAEV,IAAMC,EAAaF,EAAuBtI,KAAKyI,cAAcF,EAAwBvI,MAErF,OAAmB,IAAfwI,EAAyBA,EAEtBA,EAAa,GAAK,EAAI,CAC/B,IAEAN,EAASA,EAAOQ,OAAON,EACzB,IAEOF,CACT,EAEAS,6BAA4B,SAACjF,GAA0D,IAAvB/O,EAAA,uDAAqB,CAAC,EACpF,GAAKiU,EAAA,WAAsBjU,KAAWiU,EAAA,UAAqBjU,IAGtD+O,GAAcA,EAAUlF,QAGxB6F,EAAewE,oBAAoBnF,GAAxC,CAIA,IAAMuB,EAAMtQ,EAANsQ,EAEN,GAAKA,EAAL,CAIiB,iBAANA,IACTA,EAAI,CAACA,IAEP,IAAM6D,EAAwB,SAACC,GAC7B,OAAOA,EAAaC,QAAQ5E,EAAa,IAAIF,aAC/C,EAGM+E,EAAiBhE,EAAEnD,QAAO,SAACoH,EAAmBC,GAElD,OADAD,EAAMJ,EAAsBK,IAAgBA,EACrCD,CACT,GAAG,CAAC,GAGJ,OAAOxF,EAAUe,QAAO,SAACrH,GACvB,OAAO6L,EAAeH,EAAsB1L,EAAS4C,MACvD,GAnBQ,CANA,CA0BV,EAEAoJ,kBAAiB,SAAC1F,GAChB,OAAKA,aAAS,EAATA,EAAWlF,QAGT,CAAEyG,EAAGvB,EAAUpK,KAAI,SAAA2L,GAAC,OAAIA,EAAEjF,IAAI,KAF5B,IAGX,EAEA6I,oBAAmB,WAAuC,IAAtCnF,EAAA,uDAAoC,GACtD,QAAKA,GAGEA,EAAUlF,OAnNU,CAoN7B,E","sources":["file:///app/packages/libs/common/src/backbone/utils/ScrollHelper.ts","file:///app/packages/libs/common/src/react/utils/LinkifyHelper.ts","file:///app/packages/libs/shared/src/components/drag-drop-move/DragDropMoveWrapper.tsx","file:///app/packages/libs/shared/src/components/pagination/Pagination.tsx","file:///app/packages/libs/shared/src/components/sortable/SortableContainerWrapper.tsx","file:///app/packages/libs/shared/src/components/sortable/SortableItemWrapper.tsx","file:///app/packages/libs/shared/src/components/video-list/video-list.scss","file:///app/packages/libs/shared/src/components/video-list/VideoList.tsx","file:///app/packages/libs/shared/src/components/video-list/VideoListHelper.tsx","file:///app/packages/libs/shared/src/components/video-list/clip-item/ClipItem.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-guidance/VideoItemGuidance.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-actions/VideoItemActions.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-description/video-item-description.scss","file:///app/packages/libs/shared/src/components/video-list/components/video-item-description/VideoItemDescription.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-left-content/video-item-left-content.scss","file:///app/packages/libs/shared/src/components/video-list/components/video-item-left-content/VideoItemLeftContent.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-restriction-badge/RestrictionBadge.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-restriction-badge/VideoItemRestrictionBadge.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-title/VideoItemTitle.tsx","file:///app/packages/libs/shared/src/components/sign-in-to-watch/SignInToWatch.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-top-right/VideoItemTopRight.tsx","file:///app/packages/libs/shared/src/components/video-list/interactive-item/InteractiveItemQuestions.tsx","file:///app/packages/libs/shared/src/components/video-list/interactive-item/InteractiveItem.tsx","file:///app/packages/libs/shared/src/components/video-list/video-item/VideoItem.tsx","file:///app/packages/libs/shared/src/context/VideoActionsContext.tsx","file:///app/packages/libs/shared/src/hooks/UseGetMediaQueryString.ts","file:///app/packages/libs/shared/src/hooks/UseMergeAudiences.ts","file:///app/packages/libs/shared/src/utils/audience-helper/AudienceStringBuilders.ts","file:///app/packages/libs/shared/src/utils/audience-helper/AudienceHelper.ts"],"sourcesContent":["import { Radio } from 'backbone';\n\nimport { CommonChannels } from '../constants/CommonChannels';\n\nexport const ScrollHelper = {\n // Will prevent scrolling to the top of the page when applinks are triggered\n preventScrollTop(): void {\n Radio.channel(CommonChannels.SHELL).trigger('prevent:scroll:top');\n }\n};","import { ObjectHash } from 'backbone';\nimport linkifyStr from 'linkifyjs/string';\nimport * as _ from 'underscore';\n\nconst BaseLinkifyOptions = {\n className: 'info-link',\n defaultProtocol: 'https'\n};\n\nexport const LinkifyHelper = {\n /**\n * The underlying linkifyStr interface escapes text within the input string\n */\n linkifyText(text: string, options?: ObjectHash): string {\n if (!text) return;\n const ops = options ? _.extend({}, BaseLinkifyOptions, options) : BaseLinkifyOptions;\n return linkifyStr(text, ops);\n }\n};","import React from 'react';\nimport { useDraggable, UseDraggableArguments, useDroppable, UseDroppableArguments } from '@dnd-kit/core';\n\ninterface DragDropMoveWrapperProps extends React.PropsWithChildren {\n droppable?: UseDroppableArguments,\n draggable?: UseDraggableArguments\n dragStyle?: string;\n dropStye?: string;\n setIsDragging?: React.Dispatch<React.SetStateAction<boolean>>\n isDragging?: boolean;\n}\n\nexport function DragDropMoveWrapper(props: DragDropMoveWrapperProps) {\n const {\n active: dragActive,\n isDragging,\n attributes,\n listeners,\n setNodeRef: draggableRef\n } = useDraggable({ ...props.draggable, disabled: !props.draggable });\n const {\n isOver,\n over,\n active: dropActive,\n setNodeRef: droppableRef\n } = useDroppable({ ...props.droppable, disabled: !props.droppable });\n\n React.useEffect(() => {\n const data = props.draggable?.data;\n if (Array.isArray(data) && data?.includes(dragActive?.id.toString())) {\n props.setIsDragging?.(isDragging);\n } else {\n props.setIsDragging?.(false);\n }\n }, [isDragging]);\n\n function isSelected() {\n const data = props.draggable?.data;\n return Array.isArray(data) && data.includes(props.draggable.id.toString());\n }\n\n return (\n <div\n ref={draggableRef}\n {...listeners}\n {...attributes}\n className={`${props.draggable ? 'cursor-grab' : 'cursor-default'} ${(isDragging && dragActive) || (props.isDragging && isSelected()) ? props.dragStyle : null}`}\n >\n <div\n ref={droppableRef}\n className={(dropActive && isOver && dragActive?.id !== over?.id) ? props.dropStye : null}\n >\n {props.children}\n </div>\n </div>\n );\n}","import * as React from 'react';\nimport { Button, ButtonProps } from 'react-bootstrap';\n\nimport { Cursors } from 'libs/common/backbone/interfaces';\nimport { ScrollHelper } from 'libs/common/backbone/utils/ScrollHelper';\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\n\nfunction buildCursor(appLink: Core.AppLink, cursorParam: string, prevHack?: boolean): Core.AppLink {\n if (!cursorParam)\n return null;\n\n const currentParams = appLink.params as HashObject ?? {};\n /* \n Currently the pagination for My Videos shows the previous cursor in the first page cursor,\n so instead of using the previous cursor from the response, the current cursor is being passed\n as the previous cursor in the app link\n */\n\n if (prevHack) {\n if (!currentParams?.previous) {\n return {\n application: appLink.application,\n action: appLink.action,\n args: appLink.args,\n params: {\n ...currentParams,\n cursor: null,\n previous: null\n }\n };\n }\n return {\n application: appLink.application,\n action: appLink.action,\n args: appLink.args,\n params: {\n ...currentParams,\n cursor: currentParams?.previous,\n previous: null\n }\n };\n }\n\n return {\n application: appLink.application,\n action: appLink.action,\n args: appLink.args,\n params: {\n ...currentParams,\n cursor: cursorParam,\n previous: currentParams.cursor\n }\n };\n}\n\ninterface CursorPaginationProps {\n cursors: Cursors;\n appLink?: Core.AppLink;\n className?: string;\n buttonVariant?: ButtonProps['variant'];\n prevHack?: boolean;\n scrollTop?: boolean;\n onClick?: (cursor: string) => void;\n}\n\nPagination.defaultProps = {\n className: 'py-2',\n buttonVariant: 'secondary'\n};\n\nexport function Pagination(\n { appLink, cursors, className, buttonVariant, prevHack, scrollTop, onClick }: CursorPaginationProps\n): JSX.Element {\n function onClickButton(page: 'next' | 'previous'): void {\n if (appLink && !scrollTop)\n ScrollHelper.preventScrollTop();\n\n AnalyticsHelper.logUserAction({ page }, {\n location: LocationContext.Pagination,\n entity: EntityType.Pagination,\n actionType: UserAction.Navigate\n });\n\n if (onClick)\n onClick(cursors[page]);\n }\n\n if (appLink) {\n return (\n <LanguageNamespaceContext.Provider value='shared.pagination'>\n <div className={className}>\n <AppLink\n appLink={buildCursor(appLink, cursors.previous, prevHack)}\n className={`btn btn-${buttonVariant} me-1 ${!cursors.previous ? 'disabled' : ''}`}\n onClick={() => onClickButton('previous')}\n // make sure disabled button and clickable button looks the same\n style={{ display: 'inline-block' }}\n >\n <Text phrase='previous' />\n </AppLink>\n \n <AppLink\n appLink={buildCursor(appLink, cursors.next)}\n className={`btn btn-${buttonVariant} ${!cursors.next ? 'disabled' : ''}`}\n onClick={() => onClickButton('next')}\n // make sure disabled button and clickable button looks the same\n style={{ display: 'inline-block' }}\n >\n <Text phrase='next' />\n </AppLink>\n </div>\n </LanguageNamespaceContext.Provider>\n );\n }\n \n return (\n <LanguageNamespaceContext.Provider value='shared.pagination'>\n <div className={className}>\n <Button\n variant={buttonVariant}\n className={`me-1 ${!cursors.previous ? 'disabled' : ''}`}\n onClick={() => onClickButton('previous')}\n >\n <Text phrase='previous' />\n </Button>\n <Button\n variant={buttonVariant}\n className={`btn ${!cursors.next ? 'disabled' : ''}`}\n onClick={() => onClickButton('next')}\n >\n <Text phrase='next' />\n </Button>\n </div>\n </LanguageNamespaceContext.Provider>\n );\n}","import React from 'react';\nimport {\n closestCenter,\n DndContext,\n DragEndEvent,\n DragOverlay,\n DragStartEvent,\n DropAnimation,\n KeyboardSensor,\n Modifiers,\n PointerSensor,\n useSensor,\n useSensors } from '@dnd-kit/core';\nimport {\n restrictToVerticalAxis\n} from '@dnd-kit/modifiers';\nimport {\n rectSortingStrategy,\n SortableContext,\n sortableKeyboardCoordinates,\n SortingStrategy,\n verticalListSortingStrategy } from '@dnd-kit/sortable';\n\ninterface SortableContainerWrapperProps {\n ids: string[];\n getDragOverlay: (id: string) => JSX.Element;\n onSortEnd: (event: DragEndEvent) => void;\n onSortStart?: (event: DragStartEvent) => void;\n dropAnimation?: DropAnimation;\n disabled?: boolean;\n vertical?: boolean;\n}\n\nSortableContainerWrapper.defaultProps = {\n dropAnimation: { duration: 250, easing: 'ease' },\n vertical: true\n};\n\nexport function SortableContainerWrapper(\n props: React.PropsWithChildren<SortableContainerWrapperProps>\n): JSX.Element {\n const [ activeId, setActiveId ] = React.useState(null);\n\n function onSortStart(event: DragStartEvent): void {\n setActiveId(event.active.id);\n props.onSortStart?.(event);\n }\n\n function onSortEnd(event: DragEndEvent): void {\n setActiveId(null);\n props.onSortEnd(event);\n }\n\n function getModifiers(): Modifiers {\n if (!props.vertical)\n return [];\n\n return [restrictToVerticalAxis];\n }\n\n function getSortingStrategy(): SortingStrategy {\n if (props.vertical)\n return verticalListSortingStrategy;\n\n return rectSortingStrategy;\n }\n\n const sensors = useSensors(\n useSensor(PointerSensor, {\n activationConstraint: {\n distance: 10\n }\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates\n })\n );\n \n if (props.disabled)\n return <>{props.children}</>;\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragStart={onSortStart}\n onDragEnd={onSortEnd}\n modifiers={getModifiers()}\n >\n <SortableContext\n items={props.ids}\n strategy={getSortingStrategy()}\n >\n {props.children}\n </SortableContext>\n\n <DragOverlay dropAnimation={props.dropAnimation}>\n {activeId ? props.getDragOverlay(activeId) : null}\n </DragOverlay>\n </DndContext>\n );\n}","import React from 'react';\nimport { DraggableAttributes } from '@dnd-kit/core';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\n\nimport { HashObject } from 'libs/common/react/interfaces';\n\ntype DragDirection = 'up' | 'down';\n\nexport type PropsWithSortableItemProps<T> = T & {\n dragAttributes?: DraggableAttributes;\n dragListeners?: HashObject;\n dragDirection?: DragDirection;\n};\n\ninterface SortableItemWrapperProps<TProps> {\n id: string;\n childProps: TProps;\n childComponent: (props: PropsWithSortableItemProps<TProps>) => JSX.Element;\n}\n\nfunction getDragDirection(index: number, activeIndex: number, overIndex: number): DragDirection {\n if (activeIndex !== index)\n return null;\n\n if (overIndex > activeIndex)\n return 'down';\n\n if (overIndex < activeIndex)\n return 'up';\n\n return null;\n}\n\nexport function SortableItemWrapper<TProps>(props: SortableItemWrapperProps<TProps>): JSX.Element {\n const {\n setNodeRef,\n transform,\n transition,\n isSorting,\n listeners,\n attributes,\n activeIndex,\n overIndex,\n index\n } = useSortable({ id: props.id });\n\n const style: HashObject = {\n transform: CSS.Transform.toString(transform),\n transition,\n touchAction: 'none',\n position: 'relative'\n };\n\n if (isSorting && index === activeIndex) {\n style.visibility = 'hidden';\n }\n\n const Children = props.childComponent;\n const dragDirection = getDragDirection(index, activeIndex, overIndex);\n\n return (\n <Children\n {...props.childProps}\n ref={setNodeRef}\n style={style}\n dragListeners={listeners}\n dragAttributes={attributes}\n dragDirection={dragDirection}\n />\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"sortableVideo\":\"xaH09\",\"videoList\":\"kO5Q0\",\"badgeContainer\":\"FP8l5\",\"dragStyle\":\"HF8j1\"};","import * as React from 'react';\nimport { DragEndEvent, DragStartEvent } from '@dnd-kit/core';\n\nimport { Cursors } from 'libs/common/backbone/interfaces';\nimport { Core } from 'libs/common/core';\n\nimport { SearchIndices } from 'libs/shared/apps/search/interfaces';\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { DragDropMoveWrapper } from 'libs/shared/components/drag-drop-move/DragDropMoveWrapper';\nimport { Checkbox } from 'libs/shared/components/forms/form-checkbox/Checkbox';\nimport { Pagination } from 'libs/shared/components/pagination/Pagination';\nimport { SortableContainerWrapper } from 'libs/shared/components/sortable/SortableContainerWrapper';\nimport { SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { BulkCheckboxManager } from 'libs/shared/hooks/useBulkCheckboxManager';\nimport { HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { CanFavouriteFunc, FavouriteFunc, InteractiveMetadata, PresentationAudience, Video, VideoTypes, YearGroup } from 'libs/shared/interfaces';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { ClipItem, ClipItemProps, SortableClipItem } from './clip-item/ClipItem';\nimport { InteractiveItem, InteractiveItemProps, SortableInteractiveItem } from './interactive-item/InteractiveItem';\nimport { SortableVideoItem, VideoItem, VideoItemProps } from './video-item/VideoItem';\n\nimport styles from './video-list.scss';\n\ntype ItemComponent = (props: ClipItemProps | InteractiveItemProps | VideoItemProps) => JSX.Element;\n\nfunction getItemComponent(video: VideoTypes, isSortable: boolean): ItemComponent {\n if (VideoHelper.isClip(video))\n return isSortable ? SortableClipItem : ClipItem;\n\n if (VideoHelper.isInteractive(video))\n return isSortable ? SortableInteractiveItem : InteractiveItem;\n\n return isSortable ? SortableVideoItem : VideoItem;\n}\n\ninterface SortableVideoListContextProps {\n isSortable: boolean;\n currentSortingIndex?: number;\n}\n\nexport const SortableVideoListContext = React.createContext<SortableVideoListContextProps>({\n isSortable: false\n});\n\nexport interface VideoListProps {\n videos: VideoTypes[];\n yearGroups?: YearGroup[];\n getVideoAppLink: (video: VideoTypes, options: GetVideoAppLinkOptions) => Core.AppLink;\n getSignInAppLink?: (appLink: Core.AppLink) => Core.AppLink;\n getPreviewQuestionsAppLink?: (interactive: InteractiveMetadata) => Core.AppLink;\n getSubTextAppLink?: (video: Video) => Core.AppLink;\n setFavourite?: FavouriteFunc;\n canFavourite?: CanFavouriteFunc;\n cursors?: Cursors;\n dragHandleIcon?: string;\n dragHandleIconSize?: SvgContainerSize;\n showSignIn?: boolean;\n showIndexes?: boolean;\n startingPositionIndex?: number;\n canRemovePrivateVideos?: boolean;\n presentationAudiences?: PresentationAudience[];\n allowBulkAction?: boolean;\n getVideosBulkAction?: (items: string[]) => ActionOptions[];\n drag?: boolean;\n typeFilter?: SearchIndices | SearchIndices[];\n checkboxHelper?: BulkCheckboxManager;\n companyLogoFallbackUrl?: string;\n subTextType?: VideoSubTextType;\n hasPermissions: HasPermissionsFunc;\n imageCdnUrl?: string;\n}\n\nexport function VideoList(props: VideoListProps): JSX.Element {\n const { isSortable } = React.useContext(SortableVideoListContext);\n const [ isDragging, setIsDragging ] = React.useState<boolean>(false);\n const { checkboxHelper: CheckboxHelper } = props;\n \n const currentAppLink = Core.AppLinkHelper.getCurrentAppLink();\n\n return (\n <>\n <div className={`position-relative ${styles.videoList}`}>\n \n {props.videos.map((v, idx) => {\n const Component = getItemComponent(v, isSortable);\n \n /**\n * Where we're provided with a starting position index by the parent, \n * we'll use that as the starting position instead of the local index.\n */\n const pagePositionStartingIndex = Number.isInteger(props.startingPositionIndex)\n ? props.startingPositionIndex\n : 0;\n\n const dragData = CheckboxHelper && CheckboxHelper.getSelectedCount() > 1 && CheckboxHelper.isChecked(v.id)\n ? CheckboxHelper.getSelected()\n : v;\n\n return (\n <DragDropMoveWrapper\n draggable={(props.drag && !isSortable) && ({ id: v.id, data: dragData })}\n dragStyle={styles.dragStyle}\n isDragging={isDragging}\n setIsDragging={setIsDragging}\n key={`${v.id}:${idx}`}\n >\n <div className='d-flex flex-row align-items-center'>\n {props.allowBulkAction && (\n <div>\n <Checkbox\n className='mx-0 mx-md-2'\n id={v.id}\n onChange={() => CheckboxHelper.onToggleItem(v.id)}\n checked={CheckboxHelper.isChecked(v.id)}\n />\n \n </div>\n )}\n <Component\n video={v}\n yearGroups={props.yearGroups}\n index={idx}\n getVideoAppLink={props.getVideoAppLink}\n getSubTextAppLink={props.getSubTextAppLink}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n dragHandleIcon={props.dragHandleIcon}\n dragHandleIconSize={props.dragHandleIconSize}\n showSignIn={props.showSignIn}\n getSignInAppLink={props.getSignInAppLink}\n analyticsData={{\n pagePositionIndex: pagePositionStartingIndex + idx\n }}\n hasPermissions={props.hasPermissions}\n canRemovePrivateVideos={props.canRemovePrivateVideos}\n presentationAudiences={props.presentationAudiences}\n showIndexes={props.showIndexes}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n getPreviewQuestionsAppLink={props.getPreviewQuestionsAppLink}\n imageCdnUrl={props.imageCdnUrl}\n />\n </div>\n </DragDropMoveWrapper>\n );\n })}\n </div>\n\n {props.cursors &&\n <Pagination appLink={currentAppLink} cursors={props.cursors} />\n }\n </>\n );\n}\n\ninterface SortableVideoListProps extends VideoListProps {\n currentSortingIndex?: number;\n onSortEnd: (event: DragEndEvent) => void;\n onSortStart: (event: DragStartEvent) => void;\n}\n\nexport const SortableVideoList = (props: SortableVideoListProps) => {\n const ids = props.videos.map(v => v.id);\n\n const getDragOverlay = (id: string) => {\n const video = props.videos.find(v => v.id === id);\n const Component = getItemComponent(video, true);\n\n return (\n <div className={`bg-white ${styles.sortableVideo}`}>\n <SortableVideoListContext.Provider value={{ isSortable: true }}>\n <Component\n video={video}\n yearGroups={props.yearGroups}\n getVideoAppLink={props.getVideoAppLink}\n getSubTextAppLink={props.getSubTextAppLink}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n dragHandleIcon={props.dragHandleIcon}\n dragHandleIconSize={props.dragHandleIconSize}\n showSignIn={props.showSignIn}\n getSignInAppLink={props.getSignInAppLink}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n imageCdnUrl={props.imageCdnUrl}\n />\n </SortableVideoListContext.Provider>\n </div>\n );\n };\n\n return (\n <SortableContainerWrapper\n ids={ids}\n getDragOverlay={getDragOverlay}\n onSortEnd={props.onSortEnd}\n onSortStart={props.onSortStart}\n >\n <SortableVideoListContext.Provider value={{ isSortable: true, currentSortingIndex: props.currentSortingIndex }}>\n <VideoList {...props} />\n </SortableVideoListContext.Provider>\n </SortableContainerWrapper>\n );\n};","import { ColProps } from 'react-bootstrap';\n\nimport { VideoItemSize } from 'libs/shared/components/video-list/BaseVideoItemProps';\nimport { Breakpoints } from 'libs/shared/hooks/useBreakpoints';\n\nexport const VideoListHelper = {\n getThumbnailColumns(): ColProps {\n return {\n xs: 12,\n sm: 5,\n lg: 3\n };\n },\n\n getDetailsColumns(): ColProps {\n return {\n xs: 12,\n sm: 7,\n lg: 9\n };\n },\n\n getSize(breakpoints: Breakpoints, size: VideoItemSize): VideoItemSize {\n if (breakpoints.sm)\n return 'sm';\n \n return size || 'md';\n },\n\n getThumbnailColSize(hasDragHandle: boolean): number {\n return hasDragHandle ? 10 : 12;\n }\n};","import * as React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { EntityType, LocationContext } from 'libs/analytics/interfaces';\n\nimport { SortableItemWrapper } from 'libs/shared/components/sortable/SortableItemWrapper';\nimport { VideoThumbnail } from 'libs/shared/components/thumbnails/video/VideoThumbnail';\nimport { BaseVideoItemProps } from 'libs/shared/components/video-list/BaseVideoItemProps';\nimport { VideoItemGuidance } from 'libs/shared/components/video-list/components/video-guidance/VideoItemGuidance';\nimport { VideoItemDescription } from 'libs/shared/components/video-list/components/video-item-description/VideoItemDescription';\nimport { VideoItemLeftContent } from 'libs/shared/components/video-list/components/video-item-left-content/VideoItemLeftContent';\nimport { VideoItemRestrictionBadge } from 'libs/shared/components/video-list/components/video-item-restriction-badge/VideoItemRestrictionBadge';\nimport { VideoItemTitle } from 'libs/shared/components/video-list/components/video-item-title/VideoItemTitle';\nimport { VideoItemTopRight } from 'libs/shared/components/video-list/components/video-item-top-right/VideoItemTopRight';\nimport { SortableVideoListContext } from 'libs/shared/components/video-list/VideoList';\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { ThumbnailTextPosition } from 'libs/shared/enums/ThumbnailTextPosition';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { useHover } from 'libs/shared/hooks/UseHover';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { Clip } from 'libs/shared/interfaces';\n\nexport type ClipItemProps = BaseVideoItemProps<Clip>;\n\nexport const ClipItem = React.forwardRef((props: ClipItemProps, ref: React.LegacyRef<HTMLDivElement>) => {\n const breakpoints = useBreakpoints();\n const [ hoverRef, hovered ] = useHover<HTMLDivElement>();\n \n const size = VideoListHelper.getSize(breakpoints, props.size);\n const isSmall = size === 'sm';\n\n const { isSortable } = React.useContext(SortableVideoListContext);\n\n const mergedAudience = useMergeAudiences(props.video.subjectPresentationAudiences?.data, props.presentationAudiences);\n\n const showDragHandle = isSortable && !breakpoints.xs && (hovered || typeof props.index === 'undefined' || !props.showIndexes);\n const showIndexes = (props.showIndexes && !showDragHandle) && !breakpoints.xs;\n const hasIconOrIndex = (showDragHandle || props.showIndexes) && !breakpoints.xs;\n\n const appLink = props.getVideoAppLink(props.video, {});\n const analyticsProps = {\n analyticsData: props.analyticsData,\n analyticsOptions: {\n entity: EntityType.Clip,\n location: LocationContext.ClipListItem\n }\n };\n\n return (\n <div ref={hoverRef} className='w-100'>\n <div className={`row g-0 ${isSmall ? '' : 'py-2'}`} ref={ref} style={props.style}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-2` : 'mb-1 px-2'}`}>\n <Row>\n <VideoItemLeftContent\n index={props.index}\n showDragHandle={showDragHandle}\n showIndexes={showIndexes}\n dragHandleIcon={props.dragHandleIcon}\n dragHandleIconSize={props.dragHandleIconSize}\n dragAttributes={props.dragAttributes}\n dragListeners={props.dragListeners}\n />\n \n <Col xs={VideoListHelper.getThumbnailColSize(hasIconOrIndex)}>\n <VideoThumbnail\n {...analyticsProps}\n video={props.video}\n appLink={appLink}\n audience={mergedAudience}\n imageOptions={{ size: ImageSize.Medium }}\n textPosition={ThumbnailTextPosition.Independent}\n type='static'\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n canRemovePrivateVideos={props.canRemovePrivateVideos}\n showSignIn={props.showSignIn}\n subTextType='none'\n imageCdnUrl={props.imageCdnUrl}\n />\n </Col>\n </Row>\n </Col>\n\n <Col\n {...VideoListHelper.getDetailsColumns()}\n className={`${isSmall ? 'pb-2' : 'px-2'} d-flex flex-column justify-content-between`}\n >\n <div>\n <VideoItemTopRight\n {...analyticsProps}\n video={props.video}\n showSignIn={props.showSignIn}\n signInAppLink={props.getSignInAppLink?.(appLink)}\n />\n\n <VideoItemTitle\n video={props.video}\n appLink={appLink}\n size={size}\n yearGroups={props.yearGroups}\n {...analyticsProps}\n />\n\n {!isSmall && (\n <VideoItemDescription video={props.video} showSignIn={props.showSignIn} />\n )}\n\n <VideoItemRestrictionBadge video={props.video} yearGroups={props.yearGroups}/>\n </div>\n\n <VideoItemGuidance\n video={props.video}\n getVideoAppLink={props.getVideoAppLink}\n hasPermissions={props.hasPermissions}\n {...analyticsProps}\n />\n </Col>\n </div>\n </div>\n );\n});\n\ntype SortableClipItemProps = ClipItemProps & {\n index: number;\n};\n\nexport const SortableClipItem = (props: SortableClipItemProps) => {\n return (\n <SortableItemWrapper id={props.video.id} childComponent={ClipItem} childProps={props} />\n );\n};","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces';\n\nimport { InteractivesTag } from 'libs/shared/components/video-guidance/interactives/InteractivesTag';\nimport { ResourcesTag } from 'libs/shared/components/video-guidance/resources/ResourcesTag';\nimport { HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { VideoTypes } from 'libs/shared/interfaces';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ninterface VideoItemGuidanceProps {\n video: VideoTypes;\n getVideoAppLink: (video: VideoTypes, opts: GetVideoAppLinkOptions) => Core.AppLink;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n hasPermissions: HasPermissionsFunc;\n}\n\nexport function VideoItemGuidance(props: VideoItemGuidanceProps): JSX.Element {\n if (!VideoHelper.showVideoGuidance(props.hasPermissions))\n return <></>;\n\n return (\n <div className={`d-flex justify-content-start align-items-center pt-sm-1 gap-1`}>\n <InteractivesTag\n appLink={props.getVideoAppLink(props.video, { scrollToPosition: PlayPageAnchor.Interactives })}\n video={props.video}\n analyticsData={props.analyticsData}\n analyticsOptions={props.analyticsOptions}\n />\n <ResourcesTag\n appLink={props.getVideoAppLink(props.video, { scrollToPosition: PlayPageAnchor.Resources })}\n video={props.video}\n analyticsData={props.analyticsData}\n analyticsOptions={props.analyticsOptions}\n />\n </div>\n );\n}","import * as React from 'react';\n\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { HashObject } from 'libs/common/react/interfaces/HashObject';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces/AnalyticsTypes';\n\nimport { Actions } from 'libs/shared/components/actions/Actions';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { Video } from 'libs/shared/interfaces';\n\ninterface VideoItemActionsProps {\n video: Video;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n}\n\nexport function VideoItemActions(props: VideoItemActionsProps): JSX.Element {\n const videoActions = React.useContext(VideoActionsContext);\n\n if (!FunctionHelper.isFunction(videoActions?.getVideoActions))\n return <></>;\n\n const actions = videoActions.getVideoActions(props.video, {\n analyticsData: props.analyticsData,\n analyticsOptions: props.analyticsOptions\n });\n\n return (\n <Actions\n actions={actions}\n className='float-end mt-n1'\n actionsDropdownClassName='btn btn-link ms-1'\n fetchMore={videoActions.fetchMoreActions ? () => videoActions.fetchMoreActions(props.video) : null}\n />\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"captionsBadge\":\"eXhiL\"};","import * as React from 'react';\n\nimport { LinkifyHelper } from 'libs/common/react/utils/LinkifyHelper';\n\nimport { Badge, BadgeType } from 'libs/shared/components/badges/Badge';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { useMediaQuery } from 'libs/shared/hooks/UseMediaQuery';\nimport { Video } from 'libs/shared/interfaces';\nimport { RestrictionHelper } from 'libs/shared/utils/RestrictionHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport styles from './video-item-description.scss';\n\ninterface InnerContentProps {\n video: Video;\n showSignIn: boolean;\n}\n\nfunction InnerContent(props: InnerContentProps): JSX.Element {\n if (!props.video.description && !VideoHelper.getCanBeConsumed(props.video)?.canNavigate) {\n return (\n <em>{VideoHelper.getPrivacyReasoning(props.video, props.showSignIn)}</em>\n );\n }\n\n const hasCaptions = !!props.video?.subtitles?.data?.length;\n\n return (\n <>\n {hasCaptions && (\n <span className={`d-inline-block align-middle ${styles.captionsBadge}`}>\n <Badge type={BadgeType.Captions} data={props.video?.subtitles} />\n </span>\n )}\n {!!props.video?.productionYear && (\n <span className='fw-semibold align-middle'>\n {hasCaptions ? ' \\u2022 ' : ''}{props.video.productionYear}\n </span>\n )}\n {!!props.video.description && (\n <span\n className='align-middle'\n dangerouslySetInnerHTML={{\n __html: `${(props.video.productionYear || hasCaptions) ? ' \\u2022 ' : ''}${LinkifyHelper.linkifyText(props.video.description)}`\n }}\n />\n )}\n </>\n );\n}\n\ninterface VideoItemDescriptionProps {\n video: Video;\n showSignIn?: boolean;\n}\n\nexport function VideoItemDescription(props: VideoItemDescriptionProps): JSX.Element {\n const isMobile = useMediaQuery(MediaQueryStrings.XS);\n const hasRestrictions = RestrictionHelper.hasRestrictions(props.video);\n\n if (isMobile || hasRestrictions)\n return <></>;\n\n return (\n <div className={`position-relative overflow-hidden clamp-2`}>\n <p className='m-0'>\n <InnerContent\n video={props.video}\n showSignIn={props.showSignIn}\n />\n </p>\n </div>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"dragHandleContainer\":\"mcAFC\"};","import React from 'react';\nimport { Col } from 'react-bootstrap';\n\nimport { PropsWithSortableItemProps } from 'libs/shared/components/sortable/SortableItemWrapper';\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport styles from './video-item-left-content.scss';\n\ninterface VideoItemLeftContentProps {\n index: number;\n showDragHandle: boolean;\n showIndexes: boolean;\n dragHandleIcon: string;\n dragHandleIconSize: SvgContainerSize;\n}\n\nfunction getClassName(showDragHandle: boolean): string {\n const baseClassName = 'd-flex justify-content-center align-items-center';\n if (!showDragHandle) return baseClassName;\n\n return `${baseClassName} cursor-pointer ${styles.dragHandleContainer}`;\n}\n\nexport function VideoItemLeftContent(props: PropsWithSortableItemProps<VideoItemLeftContentProps>): JSX.Element {\n const dragProps = props.showDragHandle ? { ...props.dragAttributes, ...props.dragListeners } : {};\n const className = getClassName(props.showDragHandle);\n\n if (!props.showDragHandle && !props.showIndexes) return <></>;\n\n return (\n <Col\n xs={2}\n className={className}\n {...dragProps}\n >\n {!!props.showDragHandle &&\n <SvgContainer svgName={props.dragHandleIcon} size={props.dragHandleIconSize} />\n }\n {!!props.showIndexes &&\n <span className='fw-semibold'>{props.index + 1}</span>\n }\n </Col>\n );\n}\n\nVideoItemLeftContent.defaultProps = {\n dragHandleIcon: cvSvgLibrary.Handle,\n dragHandleIconSize: SvgContainerSize.Small\n};","import React from 'react';\n\nimport { Badge, BadgeType } from 'libs/shared/components/badges/Badge';\nimport { Restrictions, YearGroup } from 'libs/shared/interfaces';\n\ninterface RestrictionBadgeProps {\n restrictions: Restrictions;\n yearGroups: YearGroup[];\n}\n\nexport function RestrictionBadge(props: RestrictionBadgeProps): JSX.Element {\n return (\n <Badge\n type={BadgeType.Restriction}\n data={{ restrictions: props.restrictions, yearGroups: props.yearGroups }}\n inline\n />\n );\n}","import React from 'react';\n\nimport { BadgeListContainer } from 'libs/shared/components/badges/BadgeListContainer';\nimport { RestrictionBadge } from 'libs/shared/components/video-list/components/video-item-restriction-badge/RestrictionBadge';\nimport { VideoTypes, YearGroup } from 'libs/shared/interfaces';\nimport { RestrictionHelper } from 'libs/shared/utils/RestrictionHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ninterface VideoItemRestrictionBadgeProps {\n video: VideoTypes;\n yearGroups: YearGroup[];\n className?: string;\n}\n\nexport function VideoItemRestrictionBadge(props: VideoItemRestrictionBadgeProps): JSX.Element {\n const hasRestrictions = RestrictionHelper.hasRestrictions(props.video);\n const { canConsume } = VideoHelper.getCanBeConsumed(props.video);\n\n if (!hasRestrictions || !props.yearGroups || !canConsume)\n return <></>;\n \n return (\n <BadgeListContainer className={props.className || 'pt-1'}>\n <RestrictionBadge restrictions={props.video._restrictions} yearGroups={props.yearGroups} />\n </BadgeListContainer>\n );\n}","import * as React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AnalyticsOptions, ClickDescriptor, HashObject, UserAction } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { VideoItemSize } from 'libs/shared/components/video-list/BaseVideoItemProps';\nimport { RestrictionPadlock } from 'libs/shared/components/video-list/components/restriction-padlock/RestrictionPadlock';\nimport { Video, YearGroup } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ninterface VideoItemTitleProps {\n video: Video;\n appLink: Core.AppLink;\n size?: VideoItemSize;\n analyticsData?: HashObject;\n analyticsOptions: AnalyticsOptions;\n yearGroups: YearGroup[];\n\n linkClassName?: string;\n textClassName?: string;\n}\n\nexport function VideoItemTitle(props: VideoItemTitleProps): JSX.Element {\n const { canNavigate } = VideoHelper.getCanBeConsumed(props.video);\n const title = VideoHelper.getTitle(props.video);\n\n const analyticsData: HashObject = {\n ...props.analyticsData,\n id: props.video?.id,\n name: props.video?.name\n };\n\n const analyticsOptions: AnalyticsOptions = {\n ...props.analyticsOptions,\n actionType: UserAction.Click,\n descriptor: ClickDescriptor.Title\n };\n\n const textClassName = props.textClassName || `clamp-1 align-middle ${props.size === 'md' ? 'h4' : 'h5'}`;\n\n return (\n <AppLink\n className={props.linkClassName}\n appLink={canNavigate ? props.appLink : null}\n analyticsOptions={analyticsOptions}\n analyticsData={analyticsData}\n >\n <h5 className={textClassName} title={props.video.name ?? ''}>\n {title}\n <RestrictionPadlock\n size={props.size}\n video={props.video}\n yearGroups={props.yearGroups}\n />\n </h5>\n </AppLink>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'shared.signInToWatch';\n\ninterface SignInToWatchProps {\n appLink: Core.AppLink\n className: string;\n}\n\nexport function SignInToWatch(props: SignInToWatchProps): React.ReactElement {\n return (\n <AppLink appLink={props.appLink} className={props.className}>\n <Text namespace={namespace} phrase='signInToWatch'></Text>\n </AppLink>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces/AnalyticsTypes';\n\nimport { SignInToWatch } from 'libs/shared/components/sign-in-to-watch/SignInToWatch';\nimport { VideoItemActions } from 'libs/shared/components/video-list/components/video-item-actions/VideoItemActions';\nimport { Video } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ninterface VideoItemTopRightProps {\n video: Video;\n showSignIn: boolean;\n signInAppLink?: Core.AppLink;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n}\n\nexport function VideoItemTopRight(props: VideoItemTopRightProps): JSX.Element {\n const { canNavigate } = VideoHelper.getCanBeConsumed(props.video);\n\n if (props.showSignIn && !canNavigate)\n return <SignInToWatch appLink={props.signInAppLink} className='btn btn-outline-dark float-end' />;\n\n return (\n <VideoItemActions\n video={props.video}\n analyticsData={props.analyticsData}\n analyticsOptions={props.analyticsOptions}\n />\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { InteractionLabel } from 'libs/shared/components/interactive-questions/InteractionLabel';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { useGetMediaQueryString } from 'libs/shared/hooks/UseGetMediaQueryString';\nimport { Interaction, InteractionTypeId, Timepoint } from 'libs/shared/interfaces';\n\nconst namespace = 'shared.interactiveItem';\n\nfunction useGetQuestionDisplayLimit(): number {\n const mediaQuery = useGetMediaQueryString();\n \n if (mediaQuery === MediaQueryStrings.XS)\n return 3;\n\n if (mediaQuery === MediaQueryStrings.SM)\n return 1;\n\n if (mediaQuery === MediaQueryStrings.MD || mediaQuery === MediaQueryStrings.LG)\n return 2;\n\n return 3;\n}\n\ninterface InteractiveItemQuestionsProps {\n timepoints: Timepoint[];\n appLink?: Core.AppLink;\n previewAppLink: Core.AppLink;\n}\n\nexport function InteractiveItemQuestions(props: InteractiveItemQuestionsProps): JSX.Element {\n const questionDisplayLimit = useGetQuestionDisplayLimit();\n\n if (!props.timepoints?.length)\n return <></>;\n\n const interactionsToShow: Interaction[] = [];\n let interactionCount: number = 0;\n\n props.timepoints.forEach(timepoint => {\n timepoint?.interactions.forEach(interaction => {\n if (interactionCount < questionDisplayLimit) {\n interactionCount++;\n\n // When displaying an annotation interaction, we display the \"data\" field, which may be a JSON string\n // For other interactions we display the \"name\" field, so we don't need to parse those.\n const interactionData = interaction.typeId === InteractionTypeId.Annotation && typeof(interaction.data) === 'string'\n ? JSON.parse(interaction.data)\n : interaction.data;\n\n const interactionToShow = {\n ...interaction,\n data: {\n ...interactionData,\n // Add interactive time to applink and convert to seconds\n appLink: props.appLink && { ...props.appLink, params: { t: Math.floor(timepoint.visibleAt / 1000) } }\n }\n };\n \n interactionsToShow.push(interactionToShow);\n }\n });\n });\n \n const totalInteractions = props.timepoints.reduce((acc, timepoint) => {\n const totalInteractions = timepoint?.interactions?.length ?? 0;\n acc += totalInteractions;\n\n return acc;\n }, 0);\n\n if (!interactionsToShow.length)\n return <></>;\n\n return (\n <>\n {interactionsToShow.map(interaction => {\n return (\n <div key={interaction.id} className='d-flex align-items-center mb-1'>\n <div className='clamp-1'>\n <InteractionLabel interaction={interaction} appLink={interaction.data?.appLink} smallIcon />\n </div>\n </div>\n );\n })}\n <div className='mb-1 text-link'>\n <AppLink\n className='info-link'\n appLink={props.previewAppLink}\n >\n <Text\n namespace={namespace}\n phrase='previewQuestions'\n options={{\n questionsShown: interactionsToShow.length,\n smartCount: totalInteractions\n }}\n />\n </AppLink>\n \n </div>\n </>\n );\n}","import * as React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { EntityType, LocationContext } from 'libs/analytics/interfaces';\n\nimport { SortableItemWrapper } from 'libs/shared/components/sortable/SortableItemWrapper';\nimport { VideoThumbnail } from 'libs/shared/components/thumbnails/video/VideoThumbnail';\nimport { BaseVideoItemProps } from 'libs/shared/components/video-list/BaseVideoItemProps';\nimport { VideoItemDescription } from 'libs/shared/components/video-list/components/video-item-description/VideoItemDescription';\nimport { VideoItemLeftContent } from 'libs/shared/components/video-list/components/video-item-left-content/VideoItemLeftContent';\nimport { VideoItemRestrictionBadge } from 'libs/shared/components/video-list/components/video-item-restriction-badge/VideoItemRestrictionBadge';\nimport { VideoItemTitle } from 'libs/shared/components/video-list/components/video-item-title/VideoItemTitle';\nimport { VideoItemTopRight } from 'libs/shared/components/video-list/components/video-item-top-right/VideoItemTopRight';\nimport { InteractiveItemQuestions } from 'libs/shared/components/video-list/interactive-item/InteractiveItemQuestions';\nimport { SortableVideoListContext } from 'libs/shared/components/video-list/VideoList';\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { ThumbnailTextPosition } from 'libs/shared/enums/ThumbnailTextPosition';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { useHover } from 'libs/shared/hooks/UseHover';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { InteractiveMetadata } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nexport type InteractiveItemProps = BaseVideoItemProps<InteractiveMetadata> & {\n getPreviewQuestionsAppLink: (interactive: InteractiveMetadata) => Core.AppLink;\n imageCdnUrl?: string;\n};\n\nexport const InteractiveItem = React.forwardRef((props: InteractiveItemProps, ref: React.LegacyRef<HTMLDivElement>) => {\n const breakpoints = useBreakpoints();\n const [ hoverRef, hovered ] = useHover<HTMLDivElement>();\n\n const size = VideoListHelper.getSize(breakpoints, props.size);\n const isSmall = size === 'sm';\n\n const { isSortable } = React.useContext(SortableVideoListContext);\n\n const mergedAudience = useMergeAudiences(props.video.subjectPresentationAudiences?.data, props.presentationAudiences);\n\n const showDragHandle = isSortable && !breakpoints.xs && (hovered || typeof props.index === 'undefined' || !props.showIndexes);\n const showIndexes = (props.showIndexes && !showDragHandle) && !breakpoints.xs;\n const hasIconOrIndex = (showDragHandle || props.showIndexes) && !breakpoints.xs;\n\n const appLink = props.getVideoAppLink(props.video, {});\n const analyticsProps = {\n analyticsData: props.analyticsData,\n analyticsOptions: {\n entity: EntityType.Interactive,\n location: LocationContext.InteractiveListItem\n }\n };\n\n const { canNavigate } = VideoHelper.getCanBeConsumed(props.video);\n\n return (\n <div ref={hoverRef} className='w-100'>\n <div className='row g-0 py-2' ref={ref} style={props.style}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-2` : 'mb-1 px-2'}`}>\n <Row>\n <VideoItemLeftContent\n index={props.index}\n showDragHandle={showDragHandle}\n showIndexes={showIndexes}\n dragHandleIcon={props.dragHandleIcon}\n dragHandleIconSize={props.dragHandleIconSize}\n dragAttributes={props.dragAttributes}\n dragListeners={props.dragListeners}\n />\n \n <Col xs={VideoListHelper.getThumbnailColSize(hasIconOrIndex)}>\n <VideoThumbnail\n {...analyticsProps}\n video={props.video}\n appLink={appLink}\n audience={mergedAudience}\n imageOptions={{ size: ImageSize.Medium }}\n textPosition={ThumbnailTextPosition.Independent}\n type='static'\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n canRemovePrivateVideos={props.canRemovePrivateVideos}\n showSignIn={props.showSignIn}\n subTextType='none'\n hideDuration={isSmall}\n imageCdnUrl={props.imageCdnUrl}\n />\n </Col>\n </Row>\n </Col>\n\n <Col {...VideoListHelper.getDetailsColumns()} className={isSmall ? 'pb-2' : 'px-2'}>\n <VideoItemTopRight\n {...analyticsProps}\n video={props.video}\n showSignIn={props.showSignIn}\n signInAppLink={props.getSignInAppLink?.(appLink)}\n />\n\n <VideoItemTitle\n video={props.video}\n appLink={appLink}\n size={size}\n yearGroups={props.yearGroups}\n {...analyticsProps}\n />\n\n {canNavigate ? (\n <div className='pt-sm-1 pt-md-0'>\n <InteractiveItemQuestions\n timepoints={props.video._timepoints?.value}\n appLink={appLink}\n previewAppLink={props.getPreviewQuestionsAppLink(props.video)}\n />\n </div>\n ) : (\n <VideoItemDescription video={props.video} showSignIn={props.showSignIn} />\n )}\n\n <VideoItemRestrictionBadge video={props.video} yearGroups={props.yearGroups}/>\n </Col>\n </div>\n </div>\n );\n});\n\ntype SortableInteractiveItemProps = InteractiveItemProps & {\n index: number;\n}\n\nexport const SortableInteractiveItem = (props: SortableInteractiveItemProps) => {\n return (\n <SortableItemWrapper id={props.video.id} childComponent={InteractiveItem} childProps={props} />\n );\n};","import * as React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/core';\n\nimport { EntityType, LocationContext } from 'libs/analytics/interfaces';\n\nimport { SortableItemWrapper } from 'libs/shared/components/sortable/SortableItemWrapper';\nimport { SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { VideoThumbnail } from 'libs/shared/components/thumbnails/video/VideoThumbnail';\nimport { BaseVideoItemProps } from 'libs/shared/components/video-list/BaseVideoItemProps';\nimport { VideoItemGuidance } from 'libs/shared/components/video-list/components/video-guidance/VideoItemGuidance';\nimport { VideoItemDescription } from 'libs/shared/components/video-list/components/video-item-description/VideoItemDescription';\nimport { VideoItemLeftContent } from 'libs/shared/components/video-list/components/video-item-left-content/VideoItemLeftContent';\nimport { VideoItemRestrictionBadge } from 'libs/shared/components/video-list/components/video-item-restriction-badge/VideoItemRestrictionBadge';\nimport { VideoItemTitle } from 'libs/shared/components/video-list/components/video-item-title/VideoItemTitle';\nimport { VideoItemTopRight } from 'libs/shared/components/video-list/components/video-item-top-right/VideoItemTopRight';\nimport { SortableVideoListContext } from 'libs/shared/components/video-list/VideoList';\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { VideoSubText, VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { ThumbnailTextPosition } from 'libs/shared/enums/ThumbnailTextPosition';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { useHover } from 'libs/shared/hooks/UseHover';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { Video } from 'libs/shared/interfaces';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nexport type VideoItemProps = BaseVideoItemProps<Video> & {\n getSubTextAppLink: (video: Video) => Core.AppLink;\n subTextType?: VideoSubTextType;\n};\n\nexport const VideoItem = React.forwardRef((props: VideoItemProps, ref: React.LegacyRef<HTMLDivElement>) => {\n const breakpoints = useBreakpoints();\n const [ hoverRef, hovered ] = useHover<HTMLDivElement>();\n\n const size = VideoListHelper.getSize(breakpoints, props.size);\n\n const isSmall = size === 'sm';\n\n const { isSortable } = React.useContext(SortableVideoListContext);\n\n const videoAudiences = props.video?.subjectPresentationAudiences?.data;\n const mergedAudience = useMergeAudiences(videoAudiences, props.presentationAudiences);\n\n const showDragHandle = isSortable && !breakpoints.xs && (hovered || typeof props.index === 'undefined' || !props.showIndexes);\n const showIndexes = (props.showIndexes && !showDragHandle) && !breakpoints.xs;\n const hasIconOrIndex = (showDragHandle || props.showIndexes) && !breakpoints.xs;\n\n const appLink = props.getVideoAppLink(props.video, {});\n\n function getSubTextAppLink(): Core.AppLink {\n return props.getSubTextAppLink?.(props.video);\n }\n\n const subTextAppLink = getSubTextAppLink();\n const analyticsProps = {\n analyticsData: props.analyticsData,\n analyticsOptions: props.analyticsOptions ?? {\n entity: EntityType.Video,\n location: LocationContext.VideoListItem\n }\n };\n\n return (\n <div ref={hoverRef} className='w-100'>\n <div className={`row g-0 ${isSmall ? '' : 'py-2'}`} style={props.style} ref={ref}>\n <Col\n {...VideoListHelper.getThumbnailColumns()}\n className={`flex-column align-items-flex-start mb-1 mb-sm-0 pb-sm-2 pe-sm-2 px-md-2 pb-md-0`}\n >\n <Row>\n <VideoItemLeftContent\n index={props.index}\n showDragHandle={showDragHandle}\n showIndexes={showIndexes}\n dragHandleIcon={props.dragHandleIcon}\n dragHandleIconSize={props.dragHandleIconSize}\n dragAttributes={props.dragAttributes}\n dragListeners={props.dragListeners}\n />\n \n <Col xs={VideoListHelper.getThumbnailColSize(hasIconOrIndex)}>\n <VideoThumbnail\n {...analyticsProps}\n video={props.video}\n appLink={appLink}\n audience={mergedAudience}\n imageOptions={{ size: hasIconOrIndex ? ImageSize.Small : ImageSize.Medium }}\n textPosition={ThumbnailTextPosition.Independent}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n type='static'\n canRemovePrivateVideos={props.canRemovePrivateVideos}\n showSignIn={props.showSignIn}\n hideRating={false}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType='none'\n />\n </Col>\n </Row>\n </Col>\n <Col\n {...VideoListHelper.getDetailsColumns()}\n className={`d-flex flex-column px-0 px-md-2 pb-0 pb-sm-2 pb-md-0 justify-content-md-between`}\n >\n <div>\n <VideoItemTopRight\n {...analyticsProps}\n video={props.video}\n showSignIn={props.showSignIn}\n signInAppLink={props.getSignInAppLink?.(appLink)}\n />\n\n <VideoSubText\n {...analyticsProps}\n video={props.video}\n appLink={subTextAppLink}\n type={props.subTextType}\n />\n\n <VideoItemTitle\n video={props.video}\n appLink={appLink}\n size={size}\n yearGroups={props.yearGroups}\n {...analyticsProps}\n />\n\n {!isSmall && (\n <VideoItemDescription video={props.video} showSignIn={props.showSignIn} />\n )}\n\n <VideoItemRestrictionBadge video={props.video} yearGroups={props.yearGroups}/>\n </div>\n\n <VideoItemGuidance\n video={props.video}\n getVideoAppLink={props.getVideoAppLink}\n hasPermissions={props.hasPermissions}\n {...analyticsProps}\n />\n </Col>\n </div>\n </div>\n );\n});\n\nVideoItem.defaultProps = {\n dragHandleIcon: cvSvgLibrary.Handle,\n dragHandleIconSize: SvgContainerSize.Small,\n size: 'md'\n};\n\ntype SortableVideoItemProps = VideoItemProps & {\n index: number;\n};\n\nexport const SortableVideoItem = (props: SortableVideoItemProps) => {\n return (\n <SortableItemWrapper id={props.video.id} childComponent={VideoItem} childProps={props} />\n );\n};","import * as React from 'react';\n\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces/AnalyticsTypes';\n\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { VideoTypes } from 'libs/shared/interfaces';\n\nexport interface VideoActionsOptions {\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n}\n\ntype GetVideoActions = (video: VideoTypes, options: VideoActionsOptions) => ActionOptions[];\ntype FetchMoreActions = (video: VideoTypes) => void;\n\ninterface VideoActionsContextData {\n getVideoActions: GetVideoActions;\n fetchMoreActions?: FetchMoreActions;\n}\n\nexport const VideoActionsContext = React.createContext<VideoActionsContextData>(null);","import { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\n\nimport { useMediaQuery } from './UseMediaQuery';\n\n/**\n * @deprecated Please use useBreakpoints() instead\n */\nexport function useGetMediaQueryString(): MediaQueryStrings {\n const isXS = useMediaQuery(MediaQueryStrings.XS);\n const isSM = useMediaQuery(MediaQueryStrings.SM);\n const isMD = useMediaQuery(MediaQueryStrings.MD);\n const isLG = useMediaQuery(MediaQueryStrings.LG);\n const isXL = useMediaQuery(MediaQueryStrings.XL);\n const isXXL = useMediaQuery(MediaQueryStrings.XXL);\n\n let currentString = MediaQueryStrings.LG; // default\n if (isXS) currentString = MediaQueryStrings.XS;\n if (isSM) currentString = MediaQueryStrings.SM;\n if (isMD) currentString = MediaQueryStrings.MD;\n if (isLG) currentString = MediaQueryStrings.LG;\n if (isXL) currentString = MediaQueryStrings.XL;\n if (isXXL) currentString = MediaQueryStrings.XXL;\n\n return currentString;\n}","import React from 'react';\n\nimport { Audience, PresentationAudience } from '../interfaces';\nimport { AudienceHelper } from '../utils/audience-helper/AudienceHelper';\n\nexport function useMergeAudiences(\n audiences: Audience[],\n presentationAudiences: PresentationAudience[]\n): PresentationAudience {\n // Memoize the audience functions as they are somewhat expensive and the result shouldn't change\n const sortedAudiences = React.useMemo(() => {\n if (!audiences?.length || !presentationAudiences || !AudienceHelper.shouldShowAudiences(presentationAudiences))\n return null;\n\n return AudienceHelper.getSortedPresentationAudiences(audiences, presentationAudiences);\n }, [audiences]);\n\n const mergedAudience = React.useMemo(() => {\n if (!sortedAudiences?.length)\n return null;\n\n return AudienceHelper.getMergedPresentationAudienceString(sortedAudiences);\n }, [sortedAudiences]);\n\n return mergedAudience;\n}","import { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\n\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nconst HAS_NUMBER_REGEX = /\\d/;\nconst COUNT_OFFSET = 1;\n\nexport const AudienceStringBuilders = {\n /**\n * Handles audience sets like:\n * - Year 7, Year 8, etc\n * - Kindergarten, Grade 1, Grade 2, etc\n */\n yearsAndGradesBuilder(audiences: PresentationAudience[]): string {\n /**\n * Create a string with all of the audiences\n */\n const combinedNames = audiences.map(a => a.name).join(' ');\n\n /**\n * Extract all the numbers and matches from the string\n */\n const numberList = combinedNames.split(' ').filter(name => !isNaN(+name)).map(num => +num) || [];\n const wordList = combinedNames.split(' ').filter(name => isNaN(+name)) || [];\n\n // Find an audience that doesn't have a number, like \"Kindergarten\" or \"Foundation\".\n const audienceWithoutNum = audiences.find(p => {\n return !HAS_NUMBER_REGEX.test(p.name);\n });\n\n // Get audience label prefix\n let prefix = wordList.find(name => name !== audienceWithoutNum?.name);\n\n // Pluralise the prefix is there are multiple audiences\n if (audiences.length > 1)\n prefix += 's';\n\n if (audienceWithoutNum && numberList.length)\n return `${prefix} ${audienceWithoutNum.name.charAt(0)} - ${numberList.pop()}`;\n\n /**\n * Build set of logical audience ranges\n */\n const audienceRange = processAudienceRanges(numberList);\n\n return `${prefix} ${audienceRange.join(', ')}`;\n },\n\n /**\n * Handles audience sets like:\n * - Early Level, First Level, etc\n * - Lower Primary, Middle Primary, etc\n */\n wordyLevelsBuilder(audiences: PresentationAudience[]): string {\n const audienceNames = audiences.map(a => a.name);\n\n const commonWordsAndTheirPositions: { [word: string]: 'start' | 'end' } = {};\n\n /**\n * Go through each audience name, and find the words that are common between _all_ of the audiences.\n * For example, if the audiences are \"Early Level\", \"First Level\", and \"Second Level\", the common\n * word will be \"Level\".\n * We will also save whether the common word appears at the beginning or the end of the audience name.\n */\n audienceNames.forEach((name, index) => {\n if (index === 0) {\n const wordsInName = name.split(' ');\n wordsInName.forEach((word, index) => {\n commonWordsAndTheirPositions[word] = index === 0 ? 'start' : 'end';\n });\n\n return;\n }\n\n const wordsInName = name.split(' ');\n\n Object.keys(commonWordsAndTheirPositions).forEach(word => {\n if (!wordsInName.includes(word))\n delete commonWordsAndTheirPositions[word];\n });\n });\n\n // This function currently only handles audience names with 1 common word.\n const commonWord = Object.keys(commonWordsAndTheirPositions)[0];\n const commonWordPosition = commonWordsAndTheirPositions[commonWord];\n\n if (!commonWord)\n return audiences[0].name;\n\n /**\n * At this point, we will have a common word and the position of that word.\n * We now need to build out the rest of the audience name by merging the unique words.\n * For example, if the audiences are \"Early Level\", \"First Level\", and \"Second Level\", we will get\n * \"Early - Second\"\n */\n\n const firstAudienceName = audiences[0].name;\n const lastAudienceName = audiences[audiences.length - 1].name;\n\n // Function to strip the common word out of the audience name\n const stripOutCommonWord = (name: string) => name.split(commonWord)[0];\n\n const mergedWord = `${stripOutCommonWord(firstAudienceName)} - ${stripOutCommonWord(lastAudienceName)}`;\n\n const finalName = commonWordPosition === 'start'\n ? `${commonWord} ${mergedWord}`\n : `${mergedWord} ${commonWord}`;\n\n return finalName;\n },\n\n /**\n * Handles the english secondary audiences, which can be: Lower Secondary, Upper Secondary, and Advanced\n */\n englishSecondaryBuilder(audiences: PresentationAudience[]): string {\n const firstAudience = ArrayHelper.first(audiences);\n const lastAudience = ArrayHelper.last(audiences);\n\n if (firstAudience.name === lastAudience.name)\n return firstAudience.name;\n\n if (lastAudience.name === 'Advanced') {\n const [level] = firstAudience.name.split(' ');\n\n if (level.toLowerCase() === 'lower')\n return 'Lower Sec - Adv';\n\n return 'Upper Sec - Adv';\n }\n\n return 'Lower - Upper Sec';\n },\n\n scottishSecondaryBuilder(audiences: PresentationAudience[]): string {\n const firstAudience = ArrayHelper.first(audiences);\n const lastAudience = ArrayHelper.last(audiences);\n\n if (firstAudience.name === lastAudience.name)\n return firstAudience.name;\n\n if (lastAudience.name === 'Senior Phase')\n return `${firstAudience.name} - Senior`;\n\n return 'Third - Fourth Level';\n },\n\n /**\n * Handles the audience set: Reception, Key Stage 1, Lower Key Stage 2, and Upper Key Stage 2\n */\n keyStagesBuilder(audiences: PresentationAudience[]): string {\n // The first and last audience will build out the range\n const firstAudience = ArrayHelper.first(audiences);\n const lastAudience = ArrayHelper.last(audiences);\n\n // The first word in the strings will either be \"Upper\", \"Lower\", \"Key\", or \"Reception\"\n const firstAudienceFirstWord = ArrayHelper.first(firstAudience.name.split(' '));\n const lastAudienceFirstWord = ArrayHelper.first(lastAudience.name.split(' '));\n\n // Each audience in this set except for \"Reception\" has a number. Get the numbers for the first and last audiences\n const firstAudienceNumber = firstAudience.name.split(' ').find(word => !isNaN(+word));\n const lastAudienceNumber = lastAudience.name.split(' ').find(word => !isNaN(+word));\n\n // If there's only one audience on the video:\n if (firstAudience === lastAudience) {\n // For these 2 audiences, return the full name as it's short enough already\n if (firstAudienceFirstWord === 'Key' || firstAudienceFirstWord === 'Reception')\n return firstAudience.name;\n\n // For the Upper/Lower key stage audiences, abbreviate the \"key stage\" part to KS1/KS2\n return `${firstAudienceFirstWord} KS${firstAudienceNumber}`;\n }\n\n /**\n * Handle when the object has >1 audience\n */\n\n let firstAudienceString = '';\n let lastAudienceString = '';\n\n // Reception is always shortened to \"R\" when in a range\n if (firstAudienceFirstWord === 'Reception') {\n firstAudienceString = 'R';\n } else {\n // All other audiences will be abbreviated to \"KS1/KS2\"\n firstAudienceString = `KS${firstAudienceNumber}`;\n }\n\n // The last audience will always be a key stage, so abbreviate this too\n lastAudienceString = `KS${lastAudienceNumber}`;\n\n // If the audience range contains both the \"Lower\" and \"Upper\" audiences, abbreviate those and return\n if (firstAudienceFirstWord === 'Lower' && lastAudienceFirstWord === 'Upper') {\n return `L ${firstAudienceString} - U ${lastAudienceString}`;\n }\n\n // Add \"Lower\" and \"Upper\" to the strings if it's needed\n if (firstAudienceFirstWord === 'Lower') {\n firstAudienceString = `Lower ${firstAudienceString}`;\n }\n\n if (lastAudienceFirstWord === 'Upper') {\n lastAudienceString = `Upper ${lastAudienceString}`;\n }\n\n // This handles a case where the range is Reception - Key Stage 1. In which case we don't abbreviate the key stage part to KS1.\n if (lastAudienceFirstWord === 'Key') {\n lastAudienceString = lastAudience.name;\n }\n\n return `${firstAudienceString} - ${lastAudienceString}`;\n }\n};\n\nfunction processAudienceRanges(audienceValues: number[]): string[] {\n /**\n * Lookahead by increments of offset\n */\n const offset = COUNT_OFFSET;\n\n let initialVal; let nextVal;\n let isContinguous: boolean = false;\n\n const ranges: string[] = [];\n\n // Audience values need to be in ascending order\n audienceValues = audienceValues.sort((a, b) => a - b);\n\n let i; let j;\n\n for (i = 0; i < audienceValues.length; i++) {\n j = i + 1;\n\n // Set our lower boundary to compare against\n if (!isContinguous)\n initialVal = audienceValues[i];\n\n nextVal = audienceValues[j];\n\n /**\n * Where the next number is also the next incremental value\n * we're going to continue iterating until the next value\n * is no longer contiguos.\n */\n if (audienceValues[i] + offset === nextVal) {\n isContinguous = true;\n } else if (isContinguous) {\n /**\n * Where we were tracking a contiguous set, format appropriately \n * and store the vals\n */\n\n ranges.push(`${initialVal} - ${audienceValues[i]}`);\n isContinguous = false;\n } else {\n /**\n * Where the values arent contiguous, just store the current value\n */\n\n ranges.push(`${audienceValues[i]}`);\n isContinguous = false;\n }\n }\n\n return ranges;\n}","import { HashObject } from 'libs/common/react/interfaces';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { HardCoded } from 'libs/shared/constants/HardCoded';\nimport { Audience, BaseObject, PresentationAudience } from 'libs/shared/interfaces';\n\nimport { AudienceStringBuilders } from './AudienceStringBuilders';\n\nconst DIGIT_REGEX = /([0-9]+)/ig;\nconst SPACE_REGEX = /\\s|\\+/ig;\n\n/**\n * Where there is 1 or less audiences on a presentation, it provides little value to\n * the user's experience, so we'll hide audiences altogether.\n */\nconst MIN_AUDIENCE_THRESHOLD = 1;\n\nexport const AudienceHelper = {\n /**\n * This is needed to sort an object's audiences, as they are not sorted by the backend.\n * To do this, we take the presentation audiences (sorted) and filter them by the object's\n * audiences, leaving behind a sorted array of object audiences.\n */\n getSortedPresentationAudiences(\n objectAudiences: Audience[],\n presentationAudiences: PresentationAudience[]\n ): PresentationAudience[] {\n /**\n * Atm there is a bug in flight's optimize, around multiple parts of the page \n * fetching the same object with a different response. We are filtering out\n * falsey values in our object audience ids until that's fixed. - Sha\n */\n const objectAudienceIds = objectAudiences\n .filter(v => !!v)\n .map(audience => audience.id.toString());\n\n /**\n * Remove audiences that aren't relevant for the user's current presentation\n */\n const filteredAudiences = presentationAudiences.filter(presAudience => {\n return objectAudienceIds.includes(presAudience.masterId.toString());\n });\n\n return filteredAudiences;\n },\n\n /**\n * This function accepts a set of presentation audiences, and returns a single\n * audience where the name is a merged string of the names of all of the audiences passed in.\n *\n * As we add more presentations that have different audience sets, we'll need to extend the `switch`\n * statement below to either include new string builder functions, or to include new presentation IDs\n * for existing string builder functions.\n */\n getMergedPresentationAudienceString(presentationAudiences: PresentationAudience[]): PresentationAudience {\n const { presentationId } = ArrayHelper.first(presentationAudiences);\n\n let mergedAudienceString = '';\n\n switch (+presentationId) {\n // Generic `Name Number`. Sometimes has just name. Examples: Year 12, Grade 4, Kindergarten\n case HardCoded.PresentationIds.DEFAULT:\n case HardCoded.PresentationIds.AU_SECONDARY:\n case HardCoded.PresentationIds.US_ELEMENTARY:\n case HardCoded.PresentationIds.AU_PRIMARY:\n case HardCoded.PresentationIds.STREAMABLE_LEARNING:\n if (presentationAudiences.length === 1)\n return presentationAudiences[0];\n\n mergedAudienceString = AudienceStringBuilders.yearsAndGradesBuilder(presentationAudiences);\n break;\n\n // Early Level, First Level, Second Level, etc.\n case HardCoded.PresentationIds.SCOTLAND_PRIMARY:\n case HardCoded.PresentationIds.INTERNATIONAL_PRIMARY:\n case HardCoded.PresentationIds.INTERNATIONAL_SECONDARY:\n if (presentationAudiences.length === 1)\n return presentationAudiences[0];\n\n mergedAudienceString = AudienceStringBuilders.wordyLevelsBuilder(presentationAudiences);\n break;\n\n case HardCoded.PresentationIds.ENGLISH_SECONDARY:\n mergedAudienceString = AudienceStringBuilders.englishSecondaryBuilder(presentationAudiences);\n break;\n\n \n case HardCoded.PresentationIds.SCOTLAND_SECONDARY:\n mergedAudienceString = AudienceStringBuilders.scottishSecondaryBuilder(presentationAudiences);\n break;\n\n // Key Stage 1, Lower Key Stage 2, etc.\n case HardCoded.PresentationIds.ENGLAND_PRIMARY:\n mergedAudienceString = AudienceStringBuilders.keyStagesBuilder(presentationAudiences);\n break;\n\n // These presentations only have 1 audience mapped. These are never shown as badges in the product.\n case HardCoded.PresentationIds.US_MIDDLE:\n case HardCoded.PresentationIds.US_HIGH:\n default:\n break;\n }\n\n if (!mergedAudienceString)\n return null;\n\n return { name: mergedAudienceString } as PresentationAudience;\n },\n\n /**\n * This function assumes the members array passed in is ordered by `name`.\n */\n sortMembersWithDuplicateNamesByAudience(members: BaseObject[]): BaseObject[] {\n // Returns the lowest level audience out of an array of audience objects by looking at the name\n const getLowestAudience = (audiences: Audience[]) => {\n if (!audiences.length)\n return null;\n\n let lowestAudience: Audience;\n let lowestAudienceDigit: number;\n\n audiences.forEach(audience => {\n const digit = +ArrayHelper.first(audience.name.match(DIGIT_REGEX));\n\n if (!lowestAudience) {\n lowestAudience = audience;\n lowestAudienceDigit = digit;\n return;\n }\n\n if (digit < lowestAudienceDigit)\n lowestAudience = audience;\n });\n\n return lowestAudience;\n };\n\n // This is used to track how many times a member's name appears in the collection\n const nameCountMap: HashObject<number> = {};\n\n let sorted: BaseObject[] = [];\n\n members.forEach(member => {\n if (!nameCountMap[member.name]) {\n nameCountMap[member.name] = 1;\n sorted.push(member);\n return;\n }\n\n sorted.push(member);\n nameCountMap[member.name]++;\n\n // Take the slice of duplicates that we want to sort by audience\n const slice = sorted.splice(sorted.length - nameCountMap[member.name]);\n\n // Sort the slice by lowest audience\n const sortedSlice = slice.sort((a: any, b: any) => {\n const firstObjLowestAudience = getLowestAudience(a.subjectPresentationAudiences.data);\n const secondObjLowestAudience = getLowestAudience(b.subjectPresentationAudiences.data);\n\n if (!firstObjLowestAudience && secondObjLowestAudience)\n return 1;\n\n if (!secondObjLowestAudience)\n return -1;\n\n const comparison = firstObjLowestAudience.name.localeCompare(secondObjLowestAudience.name);\n\n if (comparison === 0) return comparison;\n\n return comparison > 0 ? -1 : 1;\n });\n\n sorted = sorted.concat(sortedSlice);\n });\n\n return sorted;\n },\n\n getActiveAudiencesFromParams(audiences: PresentationAudience[], params: HashObject = {}): PresentationAudience[] {\n if (!ObjectHelper.isObject(params) || ObjectHelper.isEmpty(params))\n return;\n\n if (!audiences || !audiences.length)\n return;\n\n if (!AudienceHelper.shouldShowAudiences(audiences))\n return;\n\n // 'a' is shorthand for audience\n let { a } = params;\n\n if (!a)\n return;\n\n // Only a single query param was passed, we'll wrap it in an array\n if (typeof a === 'string')\n a = [a];\n\n const normalizeAudienceName = (audienceName: string) => {\n return audienceName.replace(SPACE_REGEX, '').toLowerCase();\n };\n\n // Build an audience lookup\n const audienceLookup = a.reduce((state: HashObject, audienceStr: string) => {\n state[normalizeAudienceName(audienceStr)] = audienceStr;\n return state;\n }, {});\n\n // Filter out our active audience based on whether their name matches the lookup object\n return audiences.filter((audience: PresentationAudience) => {\n return audienceLookup[normalizeAudienceName(audience.name)];\n });\n },\n\n getAudienceParams(audiences: PresentationAudience[]): HashObject {\n if (!audiences?.length)\n return null;\n\n return { a: audiences.map(a => a.name) };\n },\n\n shouldShowAudiences(audiences: PresentationAudience[] = []): boolean {\n if (!audiences)\n return false;\n\n return audiences.length > MIN_AUDIENCE_THRESHOLD;\n }\n};\n"],"names":["ScrollHelper","preventScrollTop","Radio","trigger","BaseLinkifyOptions","className","defaultProtocol","LinkifyHelper","linkifyText","text","options","ops","DragDropMoveWrapper","props","data","draggable","disabled","dragActive","active","isDragging","attributes","listeners","draggableRef","setNodeRef","droppable","isOver","over","dropActive","droppableRef","Array","isArray","includes","id","toString","setIsDragging","ref","dragStyle","dropStye","children","buildCursor","appLink","cursorParam","prevHack","currentParams","params","previous","application","action","args","cursor","Pagination","cursors","buttonVariant","scrollTop","onClick","onClickButton","page","location","entity","actionType","value","style","display","phrase","next","variant","defaultProps","SortableContainerWrapper","activeId","setActiveId","sensors","activationConstraint","distance","coordinateGetter","collisionDetection","onDragStart","event","onSortStart","onDragEnd","onSortEnd","modifiers","vertical","items","ids","strategy","dropAnimation","getDragOverlay","duration","easing","SortableItemWrapper","transform","transition","isSorting","activeIndex","overIndex","index","touchAction","position","visibility","Children","childComponent","dragDirection","getDragDirection","childProps","dragListeners","dragAttributes","getItemComponent","video","isSortable","VideoHelper","ClipItem","InteractiveItem","VideoItem","SortableVideoListContext","VideoList","CheckboxHelper","checkboxHelper","currentAppLink","videos","map","v","idx","Component","pagePositionStartingIndex","Number","isInteger","startingPositionIndex","dragData","getSelectedCount","isChecked","getSelected","drag","key","allowBulkAction","Checkbox","onChange","onToggleItem","checked","yearGroups","getVideoAppLink","getSubTextAppLink","setFavourite","canFavourite","dragHandleIcon","dragHandleIconSize","showSignIn","getSignInAppLink","analyticsData","pagePositionIndex","hasPermissions","canRemovePrivateVideos","presentationAudiences","showIndexes","companyLogoFallbackUrl","subTextType","getPreviewQuestionsAppLink","imageCdnUrl","SortableVideoList","find","Provider","currentSortingIndex","VideoListHelper","getThumbnailColumns","xs","sm","lg","getDetailsColumns","getSize","breakpoints","size","getThumbnailColSize","hasDragHandle","hoverRef","hovered","isSmall","mergedAudience","subjectPresentationAudiences","showDragHandle","hasIconOrIndex","analyticsProps","analyticsOptions","audience","imageOptions","textPosition","type","signInAppLink","SortableClipItem","VideoItemGuidance","scrollToPosition","VideoItemActions","videoActions","getVideoActions","actions","actionsDropdownClassName","fetchMore","fetchMoreActions","InnerContent","description","canNavigate","hasCaptions","subtitles","length","Badge","productionYear","dangerouslySetInnerHTML","__html","VideoItemDescription","isMobile","hasRestrictions","RestrictionHelper","VideoItemLeftContent","baseClassName","dragProps","Col","SvgContainer","svgName","S","RestrictionBadge","restrictions","inline","VideoItemRestrictionBadge","canConsume","_restrictions","VideoItemTitle","title","name","descriptor","textClassName","linkClassName","namespace","SignInToWatch","AppLink","Text","VideoItemTopRight","InteractiveItemQuestions","mediaQuery","questionDisplayLimit","timepoints","interactionsToShow","interactionCount","forEach","timepoint","interactions","interaction","interactionData","typeId","JSON","parse","interactionToShow","t","Math","floor","visibleAt","push","totalInteractions","reduce","acc","InteractionLabel","smallIcon","previewAppLink","questionsShown","smartCount","useBreakpoints","Row","VideoThumbnail","ThumbnailTextPosition","hideDuration","_timepoints","SortableInteractiveItem","videoAudiences","subTextAppLink","hideRating","SortableVideoItem","VideoActionsContext","useGetMediaQueryString","isXS","isSM","isMD","isLG","isXL","isXXL","currentString","useMergeAudiences","audiences","sortedAudiences","HAS_NUMBER_REGEX","AudienceStringBuilders","firstAudience","ArrayHelper","lastAudience","split","toLowerCase","DIGIT_REGEX","SPACE_REGEX","AudienceHelper","getSortedPresentationAudiences","objectAudiences","objectAudienceIds","filter","presAudience","masterId","getMergedPresentationAudienceString","mergedAudienceString","presentationId","HardCoded","combinedNames","a","join","numberList","isNaN","num","wordList","audienceWithoutNum","p","test","prefix","charAt","pop","audienceRange","audienceValues","initialVal","nextVal","i","j","isContinguous","ranges","sort","b","processAudienceRanges","audienceNames","commonWordsAndTheirPositions","wordsInName","Object","keys","word","commonWord","commonWordPosition","firstAudienceName","lastAudienceName","stripOutCommonWord","mergedWord","firstAudienceFirstWord","lastAudienceFirstWord","firstAudienceNumber","lastAudienceNumber","firstAudienceString","lastAudienceString","sortMembersWithDuplicateNamesByAudience","members","getLowestAudience","digit","match","lowestAudience","lowestAudienceDigit","nameCountMap","sorted","member","sortedSlice","splice","firstObjLowestAudience","secondObjLowestAudience","comparison","localeCompare","concat","getActiveAudiencesFromParams","ObjectHelper","shouldShowAudiences","normalizeAudienceName","audienceName","replace","audienceLookup","state","audienceStr","getAudienceParams"],"sourceRoot":""}
1
+ {"version":3,"file":"scripts/3231-9c13e06b46-lite.chunk.js","mappings":"8JAIaA,EAAe,CAE1BC,iBAAgB,WACd,EAAAC,MAAA,QAAc,WAAsBC,QAAQ,qBAC9C,E,sECJIC,EAAqB,CACzBC,UAAW,YACXC,gBAAiB,SAGNC,EAAgB,CAI3BC,YAAW,SAACC,EAAcC,GACxB,GAAKD,EAAL,CACA,IAAME,EAAMD,EAAU,SAAS,CAAC,EAAGN,EAAoBM,GAAWN,EAClE,OAAO,IAAWK,EAAME,EAFP,CAGnB,E,6DCLI,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CANA,CA0BV,EAEAoJ,kBAAiB,SAAC1F,GAChB,OAAKA,aAAS,EAATA,EAAWlF,QAGT,CAAEyG,EAAGvB,EAAUpK,KAAI,SAAA2L,GAAC,OAAIA,EAAEjF,IAAI,KAF5B,IAGX,EAEA6I,oBAAmB,WAAuC,IAAtCnF,EAAA,uDAAoC,GACtD,QAAKA,GAGEA,EAAUlF,OAnNU,CAoN7B,E","sources":["file:///app/packages/libs/common/src/backbone/utils/ScrollHelper.ts","file:///app/packages/libs/common/src/react/utils/LinkifyHelper.ts","file:///app/packages/libs/shared/src/components/drag-drop-move/DragDropMoveWrapper.tsx","file:///app/packages/libs/shared/src/components/pagination/Pagination.tsx","file:///app/packages/libs/shared/src/components/sortable/SortableContainerWrapper.tsx","file:///app/packages/libs/shared/src/components/sortable/SortableItemWrapper.tsx","file:///app/packages/libs/shared/src/components/video-list/video-list.scss","file:///app/packages/libs/shared/src/components/video-list/VideoList.tsx","file:///app/packages/libs/shared/src/components/video-list/VideoListHelper.tsx","file:///app/packages/libs/shared/src/components/video-list/clip-item/ClipItem.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-guidance/VideoItemGuidance.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-actions/VideoItemActions.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-description/video-item-description.scss","file:///app/packages/libs/shared/src/components/video-list/components/video-item-description/VideoItemDescription.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-left-content/video-item-left-content.scss","file:///app/packages/libs/shared/src/components/video-list/components/video-item-left-content/VideoItemLeftContent.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-restriction-badge/RestrictionBadge.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-restriction-badge/VideoItemRestrictionBadge.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-title/VideoItemTitle.tsx","file:///app/packages/libs/shared/src/components/sign-in-to-watch/SignInToWatch.tsx","file:///app/packages/libs/shared/src/components/video-list/components/video-item-top-right/VideoItemTopRight.tsx","file:///app/packages/libs/shared/src/components/video-list/interactive-item/InteractiveItemQuestions.tsx","file:///app/packages/libs/shared/src/components/video-list/interactive-item/InteractiveItem.tsx","file:///app/packages/libs/shared/src/components/video-list/video-item/VideoItem.tsx","file:///app/packages/libs/shared/src/context/VideoActionsContext.tsx","file:///app/packages/libs/shared/src/hooks/UseGetMediaQueryString.ts","file:///app/packages/libs/shared/src/hooks/UseMergeAudiences.ts","file:///app/packages/libs/shared/src/utils/audience-helper/AudienceStringBuilders.ts","file:///app/packages/libs/shared/src/utils/audience-helper/AudienceHelper.ts"],"sourcesContent":["import { Radio } from 'backbone';\n\nimport { CommonChannels } from '../constants/CommonChannels';\n\nexport const ScrollHelper = {\n // Will prevent scrolling to the top of the page when applinks are triggered\n preventScrollTop(): void {\n Radio.channel(CommonChannels.SHELL).trigger('prevent:scroll:top');\n }\n};","import { ObjectHash } from 'backbone';\nimport linkifyStr from 'linkifyjs/string';\nimport * as _ from 'underscore';\n\nconst BaseLinkifyOptions = {\n className: 'info-link',\n defaultProtocol: 'https'\n};\n\nexport const LinkifyHelper = {\n /**\n * The underlying linkifyStr interface escapes text within the input string\n */\n linkifyText(text: string, options?: ObjectHash): string {\n if (!text) return;\n const ops = options ? _.extend({}, BaseLinkifyOptions, options) : BaseLinkifyOptions;\n return linkifyStr(text, ops);\n }\n};","import React from 'react';\nimport { useDraggable, UseDraggableArguments, useDroppable, UseDroppableArguments } from '@dnd-kit/core';\n\ninterface DragDropMoveWrapperProps extends React.PropsWithChildren {\n droppable?: UseDroppableArguments,\n draggable?: UseDraggableArguments\n dragStyle?: string;\n dropStye?: string;\n setIsDragging?: React.Dispatch<React.SetStateAction<boolean>>\n isDragging?: boolean;\n}\n\nexport function DragDropMoveWrapper(props: DragDropMoveWrapperProps) {\n const {\n active: dragActive,\n isDragging,\n attributes,\n listeners,\n setNodeRef: draggableRef\n } = useDraggable({ ...props.draggable, disabled: !props.draggable });\n const {\n isOver,\n over,\n active: dropActive,\n setNodeRef: droppableRef\n } = useDroppable({ ...props.droppable, disabled: !props.droppable });\n\n React.useEffect(() => {\n const data = props.draggable?.data;\n if (Array.isArray(data) && data?.includes(dragActive?.id.toString())) {\n props.setIsDragging?.(isDragging);\n } else {\n props.setIsDragging?.(false);\n }\n }, [isDragging]);\n\n function isSelected() {\n const data = props.draggable?.data;\n return Array.isArray(data) && data.includes(props.draggable.id.toString());\n }\n\n return (\n <div\n ref={draggableRef}\n {...listeners}\n {...attributes}\n className={`${props.draggable ? 'cursor-grab' : 'cursor-default'} ${(isDragging && dragActive) || (props.isDragging && isSelected()) ? props.dragStyle : null}`}\n >\n <div\n ref={droppableRef}\n className={(dropActive && isOver && dragActive?.id !== over?.id) ? props.dropStye : null}\n >\n {props.children}\n </div>\n </div>\n );\n}","import * as React from 'react';\nimport { Button, ButtonProps } from 'react-bootstrap';\n\nimport { Cursors } from 'libs/common/backbone/interfaces';\nimport { ScrollHelper } from 'libs/common/backbone/utils/ScrollHelper';\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\n\nfunction buildCursor(appLink: Core.AppLink, cursorParam: string, prevHack?: boolean): Core.AppLink {\n if (!cursorParam)\n return null;\n\n const currentParams = appLink.params as HashObject ?? {};\n /* \n Currently the pagination for My Videos shows the previous cursor in the first page cursor,\n so instead of using the previous cursor from the response, the current cursor is being passed\n as the previous cursor in the app link\n */\n\n if (prevHack) {\n if (!currentParams?.previous) {\n return {\n application: appLink.application,\n action: appLink.action,\n args: appLink.args,\n params: {\n ...currentParams,\n cursor: null,\n previous: null\n }\n };\n }\n return {\n application: appLink.application,\n action: appLink.action,\n args: appLink.args,\n params: {\n ...currentParams,\n cursor: currentParams?.previous,\n previous: null\n }\n };\n }\n\n return {\n application: appLink.application,\n action: appLink.action,\n args: appLink.args,\n params: {\n ...currentParams,\n cursor: cursorParam,\n previous: currentParams.cursor\n }\n };\n}\n\ninterface CursorPaginationProps {\n cursors: Cursors;\n appLink?: Core.AppLink;\n className?: string;\n buttonVariant?: ButtonProps['variant'];\n prevHack?: boolean;\n scrollTop?: boolean;\n onClick?: (cursor: string) => void;\n}\n\nPagination.defaultProps = {\n className: 'py-2',\n buttonVariant: 'secondary'\n};\n\nexport function Pagination(\n { appLink, cursors, className, buttonVariant, prevHack, scrollTop, onClick }: CursorPaginationProps\n): JSX.Element {\n function onClickButton(page: 'next' | 'previous'): void {\n if (appLink && !scrollTop)\n ScrollHelper.preventScrollTop();\n\n AnalyticsHelper.logUserAction({ page }, {\n location: LocationContext.Pagination,\n entity: EntityType.Pagination,\n actionType: UserAction.Navigate\n });\n\n if (onClick)\n onClick(cursors[page]);\n }\n\n if (appLink) {\n return (\n <LanguageNamespaceContext.Provider value='shared.pagination'>\n <div className={className}>\n <AppLink\n appLink={buildCursor(appLink, cursors.previous, prevHack)}\n className={`btn btn-${buttonVariant} me-1 ${!cursors.previous ? 'disabled' : ''}`}\n onClick={() => onClickButton('previous')}\n // make sure disabled button and clickable button looks the same\n style={{ display: 'inline-block' }}\n >\n <Text phrase='previous' />\n </AppLink>\n \n <AppLink\n appLink={buildCursor(appLink, cursors.next)}\n className={`btn btn-${buttonVariant} ${!cursors.next ? 'disabled' : ''}`}\n onClick={() => onClickButton('next')}\n // make sure disabled button and clickable button looks the same\n style={{ display: 'inline-block' }}\n >\n <Text phrase='next' />\n </AppLink>\n </div>\n </LanguageNamespaceContext.Provider>\n );\n }\n \n return (\n <LanguageNamespaceContext.Provider value='shared.pagination'>\n <div className={className}>\n <Button\n variant={buttonVariant}\n className={`me-1 ${!cursors.previous ? 'disabled' : ''}`}\n onClick={() => onClickButton('previous')}\n >\n <Text phrase='previous' />\n </Button>\n <Button\n variant={buttonVariant}\n className={`btn ${!cursors.next ? 'disabled' : ''}`}\n onClick={() => onClickButton('next')}\n >\n <Text phrase='next' />\n </Button>\n </div>\n </LanguageNamespaceContext.Provider>\n );\n}","import React from 'react';\nimport {\n closestCenter,\n DndContext,\n DragEndEvent,\n DragOverlay,\n DragStartEvent,\n DropAnimation,\n KeyboardSensor,\n Modifiers,\n PointerSensor,\n useSensor,\n useSensors } from '@dnd-kit/core';\nimport {\n restrictToVerticalAxis\n} from '@dnd-kit/modifiers';\nimport {\n rectSortingStrategy,\n SortableContext,\n sortableKeyboardCoordinates,\n SortingStrategy,\n verticalListSortingStrategy } from '@dnd-kit/sortable';\n\ninterface SortableContainerWrapperProps {\n ids: string[];\n getDragOverlay: (id: string) => JSX.Element;\n onSortEnd: (event: DragEndEvent) => void;\n onSortStart?: (event: DragStartEvent) => void;\n dropAnimation?: DropAnimation;\n disabled?: boolean;\n vertical?: boolean;\n}\n\nSortableContainerWrapper.defaultProps = {\n dropAnimation: { duration: 250, easing: 'ease' },\n vertical: true\n};\n\nexport function SortableContainerWrapper(\n props: React.PropsWithChildren<SortableContainerWrapperProps>\n): JSX.Element {\n const [ activeId, setActiveId ] = React.useState(null);\n\n function onSortStart(event: DragStartEvent): void {\n setActiveId(event.active.id);\n props.onSortStart?.(event);\n }\n\n function onSortEnd(event: DragEndEvent): void {\n setActiveId(null);\n props.onSortEnd(event);\n }\n\n function getModifiers(): Modifiers {\n if (!props.vertical)\n return [];\n\n return [restrictToVerticalAxis];\n }\n\n function getSortingStrategy(): SortingStrategy {\n if (props.vertical)\n return verticalListSortingStrategy;\n\n return rectSortingStrategy;\n }\n\n const sensors = useSensors(\n useSensor(PointerSensor, {\n activationConstraint: {\n distance: 10\n }\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates\n })\n );\n \n if (props.disabled)\n return <>{props.children}</>;\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragStart={onSortStart}\n onDragEnd={onSortEnd}\n modifiers={getModifiers()}\n >\n <SortableContext\n items={props.ids}\n strategy={getSortingStrategy()}\n >\n {props.children}\n </SortableContext>\n\n <DragOverlay dropAnimation={props.dropAnimation}>\n {activeId ? props.getDragOverlay(activeId) : null}\n </DragOverlay>\n </DndContext>\n );\n}","import React from 'react';\nimport { DraggableAttributes } from '@dnd-kit/core';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\n\nimport { HashObject } from 'libs/common/react/interfaces';\n\ntype DragDirection = 'up' | 'down';\n\nexport type PropsWithSortableItemProps<T> = T & {\n dragAttributes?: DraggableAttributes;\n dragListeners?: HashObject;\n dragDirection?: DragDirection;\n};\n\ninterface SortableItemWrapperProps<TProps> {\n id: string;\n childProps: TProps;\n childComponent: (props: PropsWithSortableItemProps<TProps>) => JSX.Element;\n}\n\nfunction getDragDirection(index: number, activeIndex: number, overIndex: number): DragDirection {\n if (activeIndex !== index)\n return null;\n\n if (overIndex > activeIndex)\n return 'down';\n\n if (overIndex < activeIndex)\n return 'up';\n\n return null;\n}\n\nexport function SortableItemWrapper<TProps>(props: SortableItemWrapperProps<TProps>): JSX.Element {\n const {\n setNodeRef,\n transform,\n transition,\n isSorting,\n listeners,\n attributes,\n activeIndex,\n overIndex,\n index\n } = useSortable({ id: props.id });\n\n const style: HashObject = {\n transform: CSS.Transform.toString(transform),\n transition,\n touchAction: 'none',\n position: 'relative'\n };\n\n if (isSorting && index === activeIndex) {\n style.visibility = 'hidden';\n }\n\n const Children = props.childComponent;\n const dragDirection = getDragDirection(index, activeIndex, overIndex);\n\n return (\n <Children\n {...props.childProps}\n ref={setNodeRef}\n style={style}\n dragListeners={listeners}\n dragAttributes={attributes}\n dragDirection={dragDirection}\n />\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"sortableVideo\":\"xaH09\",\"videoList\":\"kO5Q0\",\"badgeContainer\":\"FP8l5\",\"dragStyle\":\"HF8j1\"};","import * as React from 'react';\nimport { DragEndEvent, DragStartEvent } from '@dnd-kit/core';\n\nimport { Cursors } from 'libs/common/backbone/interfaces';\nimport { Core } from 'libs/common/core';\n\nimport { SearchIndices } from 'libs/shared/apps/search/interfaces';\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { DragDropMoveWrapper } from 'libs/shared/components/drag-drop-move/DragDropMoveWrapper';\nimport { Checkbox } from 'libs/shared/components/forms/form-checkbox/Checkbox';\nimport { Pagination } from 'libs/shared/components/pagination/Pagination';\nimport { SortableContainerWrapper } from 'libs/shared/components/sortable/SortableContainerWrapper';\nimport { SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { BulkCheckboxManager } from 'libs/shared/hooks/useBulkCheckboxManager';\nimport { HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { CanFavouriteFunc, FavouriteFunc, InteractiveMetadata, PresentationAudience, Video, VideoTypes, YearGroup } from 'libs/shared/interfaces';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { ClipItem, ClipItemProps, SortableClipItem } from './clip-item/ClipItem';\nimport { InteractiveItem, InteractiveItemProps, SortableInteractiveItem } from './interactive-item/InteractiveItem';\nimport { SortableVideoItem, VideoItem, VideoItemProps } from './video-item/VideoItem';\n\nimport styles from './video-list.scss';\n\ntype ItemComponent = (props: ClipItemProps | InteractiveItemProps | VideoItemProps) => JSX.Element;\n\nfunction getItemComponent(video: VideoTypes, isSortable: boolean): ItemComponent {\n if (VideoHelper.isClip(video))\n return isSortable ? SortableClipItem : ClipItem;\n\n if (VideoHelper.isInteractive(video))\n return isSortable ? SortableInteractiveItem : InteractiveItem;\n\n return isSortable ? SortableVideoItem : VideoItem;\n}\n\ninterface SortableVideoListContextProps {\n isSortable: boolean;\n currentSortingIndex?: number;\n}\n\nexport const SortableVideoListContext = React.createContext<SortableVideoListContextProps>({\n isSortable: false\n});\n\nexport interface VideoListProps {\n videos: VideoTypes[];\n yearGroups?: YearGroup[];\n getVideoAppLink: (video: VideoTypes, options: GetVideoAppLinkOptions) => Core.AppLink;\n getSignInAppLink?: (appLink: Core.AppLink) => Core.AppLink;\n getPreviewQuestionsAppLink?: (interactive: InteractiveMetadata) => Core.AppLink;\n getSubTextAppLink?: (video: Video) => Core.AppLink;\n setFavourite?: FavouriteFunc;\n canFavourite?: CanFavouriteFunc;\n cursors?: Cursors;\n dragHandleIcon?: string;\n dragHandleIconSize?: SvgContainerSize;\n showSignIn?: boolean;\n showIndexes?: boolean;\n startingPositionIndex?: number;\n canRemovePrivateVideos?: boolean;\n presentationAudiences?: PresentationAudience[];\n allowBulkAction?: boolean;\n getVideosBulkAction?: (items: string[]) => ActionOptions[];\n drag?: boolean;\n typeFilter?: SearchIndices | SearchIndices[];\n checkboxHelper?: BulkCheckboxManager;\n companyLogoFallbackUrl?: string;\n subTextType?: VideoSubTextType;\n hasPermissions: HasPermissionsFunc;\n imageCdnUrl?: string;\n}\n\nexport function VideoList(props: VideoListProps): JSX.Element {\n const { isSortable } = React.useContext(SortableVideoListContext);\n const [ isDragging, setIsDragging ] = React.useState<boolean>(false);\n const { checkboxHelper: CheckboxHelper } = props;\n \n const currentAppLink = Core.AppLinkHelper.getCurrentAppLink();\n\n return (\n <>\n <div className={`position-relative ${styles.videoList}`}>\n \n {props.videos.map((v, idx) => {\n const Component = getItemComponent(v, isSortable);\n \n /**\n * Where we're provided with a starting position index by the parent, \n * we'll use that as the starting position instead of the local index.\n */\n const pagePositionStartingIndex = Number.isInteger(props.startingPositionIndex)\n ? props.startingPositionIndex\n : 0;\n\n const dragData = CheckboxHelper && CheckboxHelper.getSelectedCount() > 1 && CheckboxHelper.isChecked(v.id)\n ? CheckboxHelper.getSelected()\n : v;\n\n return (\n <DragDropMoveWrapper\n draggable={(props.drag && !isSortable) && ({ id: v.id, data: dragData })}\n dragStyle={styles.dragStyle}\n isDragging={isDragging}\n setIsDragging={setIsDragging}\n key={`${v.id}:${idx}`}\n >\n <div className='d-flex flex-row align-items-center'>\n {props.allowBulkAction && (\n <div>\n <Checkbox\n className='mx-0 mx-md-2'\n id={v.id}\n onChange={() => CheckboxHelper.onToggleItem(v.id)}\n checked={CheckboxHelper.isChecked(v.id)}\n />\n \n </div>\n )}\n <Component\n video={v}\n yearGroups={props.yearGroups}\n index={idx}\n getVideoAppLink={props.getVideoAppLink}\n getSubTextAppLink={props.getSubTextAppLink}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n dragHandleIcon={props.dragHandleIcon}\n dragHandleIconSize={props.dragHandleIconSize}\n showSignIn={props.showSignIn}\n getSignInAppLink={props.getSignInAppLink}\n analyticsData={{\n pagePositionIndex: pagePositionStartingIndex + idx\n }}\n hasPermissions={props.hasPermissions}\n canRemovePrivateVideos={props.canRemovePrivateVideos}\n presentationAudiences={props.presentationAudiences}\n showIndexes={props.showIndexes}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n getPreviewQuestionsAppLink={props.getPreviewQuestionsAppLink}\n imageCdnUrl={props.imageCdnUrl}\n />\n </div>\n </DragDropMoveWrapper>\n );\n })}\n </div>\n\n {props.cursors &&\n <Pagination appLink={currentAppLink} cursors={props.cursors} />\n }\n </>\n );\n}\n\ninterface SortableVideoListProps extends VideoListProps {\n currentSortingIndex?: number;\n onSortEnd: (event: DragEndEvent) => void;\n onSortStart: (event: DragStartEvent) => void;\n}\n\nexport const SortableVideoList = (props: SortableVideoListProps) => {\n const ids = props.videos.map(v => v.id);\n\n const getDragOverlay = (id: string) => {\n const video = props.videos.find(v => v.id === id);\n const Component = getItemComponent(video, true);\n\n return (\n <div className={`bg-white ${styles.sortableVideo}`}>\n <SortableVideoListContext.Provider value={{ isSortable: true }}>\n <Component\n video={video}\n yearGroups={props.yearGroups}\n getVideoAppLink={props.getVideoAppLink}\n getSubTextAppLink={props.getSubTextAppLink}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n dragHandleIcon={props.dragHandleIcon}\n dragHandleIconSize={props.dragHandleIconSize}\n showSignIn={props.showSignIn}\n getSignInAppLink={props.getSignInAppLink}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType={props.subTextType}\n hasPermissions={props.hasPermissions}\n imageCdnUrl={props.imageCdnUrl}\n />\n </SortableVideoListContext.Provider>\n </div>\n );\n };\n\n return (\n <SortableContainerWrapper\n ids={ids}\n getDragOverlay={getDragOverlay}\n onSortEnd={props.onSortEnd}\n onSortStart={props.onSortStart}\n >\n <SortableVideoListContext.Provider value={{ isSortable: true, currentSortingIndex: props.currentSortingIndex }}>\n <VideoList {...props} />\n </SortableVideoListContext.Provider>\n </SortableContainerWrapper>\n );\n};","import { ColProps } from 'react-bootstrap';\n\nimport { VideoItemSize } from 'libs/shared/components/video-list/BaseVideoItemProps';\nimport { Breakpoints } from 'libs/shared/hooks/useBreakpoints';\n\nexport const VideoListHelper = {\n getThumbnailColumns(): ColProps {\n return {\n xs: 12,\n sm: 5,\n lg: 3\n };\n },\n\n getDetailsColumns(): ColProps {\n return {\n xs: 12,\n sm: 7,\n lg: 9\n };\n },\n\n getSize(breakpoints: Breakpoints, size: VideoItemSize): VideoItemSize {\n if (breakpoints.sm)\n return 'sm';\n \n return size || 'md';\n },\n\n getThumbnailColSize(hasDragHandle: boolean): number {\n return hasDragHandle ? 10 : 12;\n }\n};","import * as React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { EntityType, LocationContext } from 'libs/analytics/interfaces';\n\nimport { SortableItemWrapper } from 'libs/shared/components/sortable/SortableItemWrapper';\nimport { VideoThumbnail } from 'libs/shared/components/thumbnails/video/VideoThumbnail';\nimport { BaseVideoItemProps } from 'libs/shared/components/video-list/BaseVideoItemProps';\nimport { VideoItemGuidance } from 'libs/shared/components/video-list/components/video-guidance/VideoItemGuidance';\nimport { VideoItemDescription } from 'libs/shared/components/video-list/components/video-item-description/VideoItemDescription';\nimport { VideoItemLeftContent } from 'libs/shared/components/video-list/components/video-item-left-content/VideoItemLeftContent';\nimport { VideoItemRestrictionBadge } from 'libs/shared/components/video-list/components/video-item-restriction-badge/VideoItemRestrictionBadge';\nimport { VideoItemTitle } from 'libs/shared/components/video-list/components/video-item-title/VideoItemTitle';\nimport { VideoItemTopRight } from 'libs/shared/components/video-list/components/video-item-top-right/VideoItemTopRight';\nimport { SortableVideoListContext } from 'libs/shared/components/video-list/VideoList';\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { ThumbnailTextPosition } from 'libs/shared/enums/ThumbnailTextPosition';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { useHover } from 'libs/shared/hooks/UseHover';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { Clip } from 'libs/shared/interfaces';\n\nexport type ClipItemProps = BaseVideoItemProps<Clip>;\n\nexport const ClipItem = React.forwardRef((props: ClipItemProps, ref: React.LegacyRef<HTMLDivElement>) => {\n const breakpoints = useBreakpoints();\n const [ hoverRef, hovered ] = useHover<HTMLDivElement>();\n \n const size = VideoListHelper.getSize(breakpoints, props.size);\n const isSmall = size === 'sm';\n\n const { isSortable } = React.useContext(SortableVideoListContext);\n\n const mergedAudience = useMergeAudiences(props.video.subjectPresentationAudiences?.data, props.presentationAudiences);\n\n const showDragHandle = isSortable && !breakpoints.xs && (hovered || typeof props.index === 'undefined' || !props.showIndexes);\n const showIndexes = (props.showIndexes && !showDragHandle) && !breakpoints.xs;\n const hasIconOrIndex = (showDragHandle || props.showIndexes) && !breakpoints.xs;\n\n const appLink = props.getVideoAppLink(props.video, {});\n const analyticsProps = {\n analyticsData: props.analyticsData,\n analyticsOptions: {\n entity: EntityType.Clip,\n location: LocationContext.ClipListItem\n }\n };\n\n return (\n <div ref={hoverRef} className='w-100'>\n <div className={`row g-0 ${isSmall ? '' : 'py-2'}`} ref={ref} style={props.style}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-2` : 'mb-1 px-2'}`}>\n <Row>\n <VideoItemLeftContent\n index={props.index}\n showDragHandle={showDragHandle}\n showIndexes={showIndexes}\n dragHandleIcon={props.dragHandleIcon}\n dragHandleIconSize={props.dragHandleIconSize}\n dragAttributes={props.dragAttributes}\n dragListeners={props.dragListeners}\n />\n \n <Col xs={VideoListHelper.getThumbnailColSize(hasIconOrIndex)}>\n <VideoThumbnail\n {...analyticsProps}\n video={props.video}\n appLink={appLink}\n audience={mergedAudience}\n imageOptions={{ size: ImageSize.Medium }}\n textPosition={ThumbnailTextPosition.Independent}\n type='static'\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n canRemovePrivateVideos={props.canRemovePrivateVideos}\n showSignIn={props.showSignIn}\n subTextType='none'\n imageCdnUrl={props.imageCdnUrl}\n />\n </Col>\n </Row>\n </Col>\n\n <Col\n {...VideoListHelper.getDetailsColumns()}\n className={`${isSmall ? 'pb-2' : 'px-2'} d-flex flex-column justify-content-between`}\n >\n <div>\n <VideoItemTopRight\n {...analyticsProps}\n video={props.video}\n showSignIn={props.showSignIn}\n signInAppLink={props.getSignInAppLink?.(appLink)}\n />\n\n <VideoItemTitle\n video={props.video}\n appLink={appLink}\n size={size}\n yearGroups={props.yearGroups}\n {...analyticsProps}\n />\n\n {!isSmall && (\n <VideoItemDescription video={props.video} showSignIn={props.showSignIn} />\n )}\n\n <VideoItemRestrictionBadge video={props.video} yearGroups={props.yearGroups}/>\n </div>\n\n <VideoItemGuidance\n video={props.video}\n getVideoAppLink={props.getVideoAppLink}\n hasPermissions={props.hasPermissions}\n {...analyticsProps}\n />\n </Col>\n </div>\n </div>\n );\n});\n\ntype SortableClipItemProps = ClipItemProps & {\n index: number;\n};\n\nexport const SortableClipItem = (props: SortableClipItemProps) => {\n return (\n <SortableItemWrapper id={props.video.id} childComponent={ClipItem} childProps={props} />\n );\n};","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces';\n\nimport { InteractivesTag } from 'libs/shared/components/video-guidance/interactives/InteractivesTag';\nimport { ResourcesTag } from 'libs/shared/components/video-guidance/resources/ResourcesTag';\nimport { HasPermissionsFunc } from 'libs/shared/hooks/usePermissions';\nimport { VideoTypes } from 'libs/shared/interfaces';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ninterface VideoItemGuidanceProps {\n video: VideoTypes;\n getVideoAppLink: (video: VideoTypes, opts: GetVideoAppLinkOptions) => Core.AppLink;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n hasPermissions: HasPermissionsFunc;\n}\n\nexport function VideoItemGuidance(props: VideoItemGuidanceProps): JSX.Element {\n if (!VideoHelper.showVideoGuidance(props.hasPermissions))\n return <></>;\n\n return (\n <div className={`d-flex justify-content-start align-items-center pt-sm-1 gap-1`}>\n <ResourcesTag\n appLink={props.getVideoAppLink(props.video, { scrollToPosition: PlayPageAnchor.Resources })}\n video={props.video}\n analyticsData={props.analyticsData}\n analyticsOptions={props.analyticsOptions}\n />\n <InteractivesTag\n appLink={props.getVideoAppLink(props.video, { scrollToPosition: PlayPageAnchor.Interactives })}\n video={props.video}\n analyticsData={props.analyticsData}\n analyticsOptions={props.analyticsOptions}\n />\n </div>\n );\n}","import * as React from 'react';\n\nimport { FunctionHelper } from 'libs/common/backbone/utils/FunctionHelper';\nimport { HashObject } from 'libs/common/react/interfaces/HashObject';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces/AnalyticsTypes';\n\nimport { Actions } from 'libs/shared/components/actions/Actions';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { Video } from 'libs/shared/interfaces';\n\ninterface VideoItemActionsProps {\n video: Video;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n}\n\nexport function VideoItemActions(props: VideoItemActionsProps): JSX.Element {\n const videoActions = React.useContext(VideoActionsContext);\n\n if (!FunctionHelper.isFunction(videoActions?.getVideoActions))\n return <></>;\n\n const actions = videoActions.getVideoActions(props.video, {\n analyticsData: props.analyticsData,\n analyticsOptions: props.analyticsOptions\n });\n\n return (\n <Actions\n actions={actions}\n className='float-end mt-n1'\n actionsDropdownClassName='btn btn-link ms-1'\n fetchMore={videoActions.fetchMoreActions ? () => videoActions.fetchMoreActions(props.video) : null}\n />\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"captionsBadge\":\"eXhiL\"};","import * as React from 'react';\n\nimport { LinkifyHelper } from 'libs/common/react/utils/LinkifyHelper';\n\nimport { Badge, BadgeType } from 'libs/shared/components/badges/Badge';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { useMediaQuery } from 'libs/shared/hooks/UseMediaQuery';\nimport { Video } from 'libs/shared/interfaces';\nimport { RestrictionHelper } from 'libs/shared/utils/RestrictionHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport styles from './video-item-description.scss';\n\ninterface InnerContentProps {\n video: Video;\n showSignIn: boolean;\n}\n\nfunction InnerContent(props: InnerContentProps): JSX.Element {\n if (!props.video.description && !VideoHelper.getCanBeConsumed(props.video)?.canNavigate) {\n return (\n <em>{VideoHelper.getPrivacyReasoning(props.video, props.showSignIn)}</em>\n );\n }\n\n const hasCaptions = !!props.video?.subtitles?.data?.length;\n\n return (\n <>\n {hasCaptions && (\n <span className={`d-inline-block align-middle ${styles.captionsBadge}`}>\n <Badge type={BadgeType.Captions} data={props.video?.subtitles} />\n </span>\n )}\n {!!props.video?.productionYear && (\n <span className='fw-semibold align-middle'>\n {hasCaptions ? ' \\u2022 ' : ''}{props.video.productionYear}\n </span>\n )}\n {!!props.video.description && (\n <span\n className='align-middle'\n dangerouslySetInnerHTML={{\n __html: `${(props.video.productionYear || hasCaptions) ? ' \\u2022 ' : ''}${LinkifyHelper.linkifyText(props.video.description)}`\n }}\n />\n )}\n </>\n );\n}\n\ninterface VideoItemDescriptionProps {\n video: Video;\n showSignIn?: boolean;\n}\n\nexport function VideoItemDescription(props: VideoItemDescriptionProps): JSX.Element {\n const isMobile = useMediaQuery(MediaQueryStrings.XS);\n const hasRestrictions = RestrictionHelper.hasRestrictions(props.video);\n\n if (isMobile || hasRestrictions)\n return <></>;\n\n return (\n <div className={`position-relative overflow-hidden clamp-2`}>\n <p className='m-0'>\n <InnerContent\n video={props.video}\n showSignIn={props.showSignIn}\n />\n </p>\n </div>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"dragHandleContainer\":\"mcAFC\"};","import React from 'react';\nimport { Col } from 'react-bootstrap';\n\nimport { PropsWithSortableItemProps } from 'libs/shared/components/sortable/SortableItemWrapper';\nimport { SvgContainer, SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport styles from './video-item-left-content.scss';\n\ninterface VideoItemLeftContentProps {\n index: number;\n showDragHandle: boolean;\n showIndexes: boolean;\n dragHandleIcon: string;\n dragHandleIconSize: SvgContainerSize;\n}\n\nfunction getClassName(showDragHandle: boolean): string {\n const baseClassName = 'd-flex justify-content-center align-items-center';\n if (!showDragHandle) return baseClassName;\n\n return `${baseClassName} cursor-pointer ${styles.dragHandleContainer}`;\n}\n\nexport function VideoItemLeftContent(props: PropsWithSortableItemProps<VideoItemLeftContentProps>): JSX.Element {\n const dragProps = props.showDragHandle ? { ...props.dragAttributes, ...props.dragListeners } : {};\n const className = getClassName(props.showDragHandle);\n\n if (!props.showDragHandle && !props.showIndexes) return <></>;\n\n return (\n <Col\n xs={2}\n className={className}\n {...dragProps}\n >\n {!!props.showDragHandle &&\n <SvgContainer svgName={props.dragHandleIcon} size={props.dragHandleIconSize} />\n }\n {!!props.showIndexes &&\n <span className='fw-semibold'>{props.index + 1}</span>\n }\n </Col>\n );\n}\n\nVideoItemLeftContent.defaultProps = {\n dragHandleIcon: cvSvgLibrary.Handle,\n dragHandleIconSize: SvgContainerSize.Small\n};","import React from 'react';\n\nimport { Badge, BadgeType } from 'libs/shared/components/badges/Badge';\nimport { Restrictions, YearGroup } from 'libs/shared/interfaces';\n\ninterface RestrictionBadgeProps {\n restrictions: Restrictions;\n yearGroups: YearGroup[];\n}\n\nexport function RestrictionBadge(props: RestrictionBadgeProps): JSX.Element {\n return (\n <Badge\n type={BadgeType.Restriction}\n data={{ restrictions: props.restrictions, yearGroups: props.yearGroups }}\n inline\n />\n );\n}","import React from 'react';\n\nimport { BadgeListContainer } from 'libs/shared/components/badges/BadgeListContainer';\nimport { RestrictionBadge } from 'libs/shared/components/video-list/components/video-item-restriction-badge/RestrictionBadge';\nimport { VideoTypes, YearGroup } from 'libs/shared/interfaces';\nimport { RestrictionHelper } from 'libs/shared/utils/RestrictionHelper';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ninterface VideoItemRestrictionBadgeProps {\n video: VideoTypes;\n yearGroups: YearGroup[];\n className?: string;\n}\n\nexport function VideoItemRestrictionBadge(props: VideoItemRestrictionBadgeProps): JSX.Element {\n const hasRestrictions = RestrictionHelper.hasRestrictions(props.video);\n const { canConsume } = VideoHelper.getCanBeConsumed(props.video);\n\n if (!hasRestrictions || !props.yearGroups || !canConsume)\n return <></>;\n \n return (\n <BadgeListContainer className={props.className || 'pt-1'}>\n <RestrictionBadge restrictions={props.video._restrictions} yearGroups={props.yearGroups} />\n </BadgeListContainer>\n );\n}","import * as React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AnalyticsOptions, ClickDescriptor, HashObject, UserAction } from 'libs/analytics/interfaces';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { VideoItemSize } from 'libs/shared/components/video-list/BaseVideoItemProps';\nimport { RestrictionPadlock } from 'libs/shared/components/video-list/components/restriction-padlock/RestrictionPadlock';\nimport { Video, YearGroup } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ninterface VideoItemTitleProps {\n video: Video;\n appLink: Core.AppLink;\n size?: VideoItemSize;\n analyticsData?: HashObject;\n analyticsOptions: AnalyticsOptions;\n yearGroups: YearGroup[];\n\n linkClassName?: string;\n textClassName?: string;\n}\n\nexport function VideoItemTitle(props: VideoItemTitleProps): JSX.Element {\n const { canNavigate } = VideoHelper.getCanBeConsumed(props.video);\n const title = VideoHelper.getTitle(props.video);\n\n const analyticsData: HashObject = {\n ...props.analyticsData,\n id: props.video?.id,\n name: props.video?.name\n };\n\n const analyticsOptions: AnalyticsOptions = {\n ...props.analyticsOptions,\n actionType: UserAction.Click,\n descriptor: ClickDescriptor.Title\n };\n\n const textClassName = props.textClassName || `clamp-1 align-middle ${props.size === 'md' ? 'h4' : 'h5'}`;\n\n return (\n <AppLink\n className={props.linkClassName}\n appLink={canNavigate ? props.appLink : null}\n analyticsOptions={analyticsOptions}\n analyticsData={analyticsData}\n >\n <h5 className={textClassName} title={props.video.name ?? ''}>\n {title}\n <RestrictionPadlock\n size={props.size}\n video={props.video}\n yearGroups={props.yearGroups}\n />\n </h5>\n </AppLink>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'shared.signInToWatch';\n\ninterface SignInToWatchProps {\n appLink: Core.AppLink\n className: string;\n}\n\nexport function SignInToWatch(props: SignInToWatchProps): React.ReactElement {\n return (\n <AppLink appLink={props.appLink} className={props.className}>\n <Text namespace={namespace} phrase='signInToWatch'></Text>\n </AppLink>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces/AnalyticsTypes';\n\nimport { SignInToWatch } from 'libs/shared/components/sign-in-to-watch/SignInToWatch';\nimport { VideoItemActions } from 'libs/shared/components/video-list/components/video-item-actions/VideoItemActions';\nimport { Video } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ninterface VideoItemTopRightProps {\n video: Video;\n showSignIn: boolean;\n signInAppLink?: Core.AppLink;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n}\n\nexport function VideoItemTopRight(props: VideoItemTopRightProps): JSX.Element {\n const { canNavigate } = VideoHelper.getCanBeConsumed(props.video);\n\n if (props.showSignIn && !canNavigate)\n return <SignInToWatch appLink={props.signInAppLink} className='btn btn-outline-dark float-end' />;\n\n return (\n <VideoItemActions\n video={props.video}\n analyticsData={props.analyticsData}\n analyticsOptions={props.analyticsOptions}\n />\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { InteractionLabel } from 'libs/shared/components/interactive-questions/InteractionLabel';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { useGetMediaQueryString } from 'libs/shared/hooks/UseGetMediaQueryString';\nimport { Interaction, InteractionTypeId, Timepoint } from 'libs/shared/interfaces';\n\nconst namespace = 'shared.interactiveItem';\n\nfunction useGetQuestionDisplayLimit(): number {\n const mediaQuery = useGetMediaQueryString();\n \n if (mediaQuery === MediaQueryStrings.XS)\n return 3;\n\n if (mediaQuery === MediaQueryStrings.SM)\n return 1;\n\n if (mediaQuery === MediaQueryStrings.MD || mediaQuery === MediaQueryStrings.LG)\n return 2;\n\n return 3;\n}\n\ninterface InteractiveItemQuestionsProps {\n timepoints: Timepoint[];\n appLink?: Core.AppLink;\n previewAppLink: Core.AppLink;\n}\n\nexport function InteractiveItemQuestions(props: InteractiveItemQuestionsProps): JSX.Element {\n const questionDisplayLimit = useGetQuestionDisplayLimit();\n\n if (!props.timepoints?.length)\n return <></>;\n\n const interactionsToShow: Interaction[] = [];\n let interactionCount: number = 0;\n\n props.timepoints.forEach(timepoint => {\n timepoint?.interactions.forEach(interaction => {\n if (interactionCount < questionDisplayLimit) {\n interactionCount++;\n\n // When displaying an annotation interaction, we display the \"data\" field, which may be a JSON string\n // For other interactions we display the \"name\" field, so we don't need to parse those.\n const interactionData = interaction.typeId === InteractionTypeId.Annotation && typeof(interaction.data) === 'string'\n ? JSON.parse(interaction.data)\n : interaction.data;\n\n const interactionToShow = {\n ...interaction,\n data: {\n ...interactionData,\n // Add interactive time to applink and convert to seconds\n appLink: props.appLink && { ...props.appLink, params: { t: Math.floor(timepoint.visibleAt / 1000) } }\n }\n };\n \n interactionsToShow.push(interactionToShow);\n }\n });\n });\n \n const totalInteractions = props.timepoints.reduce((acc, timepoint) => {\n const totalInteractions = timepoint?.interactions?.length ?? 0;\n acc += totalInteractions;\n\n return acc;\n }, 0);\n\n if (!interactionsToShow.length)\n return <></>;\n\n return (\n <>\n {interactionsToShow.map(interaction => {\n return (\n <div key={interaction.id} className='d-flex align-items-center mb-1'>\n <div className='clamp-1'>\n <InteractionLabel interaction={interaction} appLink={interaction.data?.appLink} smallIcon />\n </div>\n </div>\n );\n })}\n <div className='mb-1 text-link'>\n <AppLink\n className='info-link'\n appLink={props.previewAppLink}\n >\n <Text\n namespace={namespace}\n phrase='previewQuestions'\n options={{\n questionsShown: interactionsToShow.length,\n smartCount: totalInteractions\n }}\n />\n </AppLink>\n \n </div>\n </>\n );\n}","import * as React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { EntityType, LocationContext } from 'libs/analytics/interfaces';\n\nimport { SortableItemWrapper } from 'libs/shared/components/sortable/SortableItemWrapper';\nimport { VideoThumbnail } from 'libs/shared/components/thumbnails/video/VideoThumbnail';\nimport { BaseVideoItemProps } from 'libs/shared/components/video-list/BaseVideoItemProps';\nimport { VideoItemDescription } from 'libs/shared/components/video-list/components/video-item-description/VideoItemDescription';\nimport { VideoItemLeftContent } from 'libs/shared/components/video-list/components/video-item-left-content/VideoItemLeftContent';\nimport { VideoItemRestrictionBadge } from 'libs/shared/components/video-list/components/video-item-restriction-badge/VideoItemRestrictionBadge';\nimport { VideoItemTitle } from 'libs/shared/components/video-list/components/video-item-title/VideoItemTitle';\nimport { VideoItemTopRight } from 'libs/shared/components/video-list/components/video-item-top-right/VideoItemTopRight';\nimport { InteractiveItemQuestions } from 'libs/shared/components/video-list/interactive-item/InteractiveItemQuestions';\nimport { SortableVideoListContext } from 'libs/shared/components/video-list/VideoList';\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { ThumbnailTextPosition } from 'libs/shared/enums/ThumbnailTextPosition';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { useHover } from 'libs/shared/hooks/UseHover';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { InteractiveMetadata } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nexport type InteractiveItemProps = BaseVideoItemProps<InteractiveMetadata> & {\n getPreviewQuestionsAppLink: (interactive: InteractiveMetadata) => Core.AppLink;\n imageCdnUrl?: string;\n};\n\nexport const InteractiveItem = React.forwardRef((props: InteractiveItemProps, ref: React.LegacyRef<HTMLDivElement>) => {\n const breakpoints = useBreakpoints();\n const [ hoverRef, hovered ] = useHover<HTMLDivElement>();\n\n const size = VideoListHelper.getSize(breakpoints, props.size);\n const isSmall = size === 'sm';\n\n const { isSortable } = React.useContext(SortableVideoListContext);\n\n const mergedAudience = useMergeAudiences(props.video.subjectPresentationAudiences?.data, props.presentationAudiences);\n\n const showDragHandle = isSortable && !breakpoints.xs && (hovered || typeof props.index === 'undefined' || !props.showIndexes);\n const showIndexes = (props.showIndexes && !showDragHandle) && !breakpoints.xs;\n const hasIconOrIndex = (showDragHandle || props.showIndexes) && !breakpoints.xs;\n\n const appLink = props.getVideoAppLink(props.video, {});\n const analyticsProps = {\n analyticsData: props.analyticsData,\n analyticsOptions: {\n entity: EntityType.Interactive,\n location: LocationContext.InteractiveListItem\n }\n };\n\n const { canNavigate } = VideoHelper.getCanBeConsumed(props.video);\n\n return (\n <div ref={hoverRef} className='w-100'>\n <div className='row g-0 py-2' ref={ref} style={props.style}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-2` : 'mb-1 px-2'}`}>\n <Row>\n <VideoItemLeftContent\n index={props.index}\n showDragHandle={showDragHandle}\n showIndexes={showIndexes}\n dragHandleIcon={props.dragHandleIcon}\n dragHandleIconSize={props.dragHandleIconSize}\n dragAttributes={props.dragAttributes}\n dragListeners={props.dragListeners}\n />\n \n <Col xs={VideoListHelper.getThumbnailColSize(hasIconOrIndex)}>\n <VideoThumbnail\n {...analyticsProps}\n video={props.video}\n appLink={appLink}\n audience={mergedAudience}\n imageOptions={{ size: ImageSize.Medium }}\n textPosition={ThumbnailTextPosition.Independent}\n type='static'\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n canRemovePrivateVideos={props.canRemovePrivateVideos}\n showSignIn={props.showSignIn}\n subTextType='none'\n hideDuration={isSmall}\n imageCdnUrl={props.imageCdnUrl}\n />\n </Col>\n </Row>\n </Col>\n\n <Col {...VideoListHelper.getDetailsColumns()} className={isSmall ? 'pb-2' : 'px-2'}>\n <VideoItemTopRight\n {...analyticsProps}\n video={props.video}\n showSignIn={props.showSignIn}\n signInAppLink={props.getSignInAppLink?.(appLink)}\n />\n\n <VideoItemTitle\n video={props.video}\n appLink={appLink}\n size={size}\n yearGroups={props.yearGroups}\n {...analyticsProps}\n />\n\n {canNavigate ? (\n <div className='pt-sm-1 pt-md-0'>\n <InteractiveItemQuestions\n timepoints={props.video._timepoints?.value}\n appLink={appLink}\n previewAppLink={props.getPreviewQuestionsAppLink(props.video)}\n />\n </div>\n ) : (\n <VideoItemDescription video={props.video} showSignIn={props.showSignIn} />\n )}\n\n <VideoItemRestrictionBadge video={props.video} yearGroups={props.yearGroups}/>\n </Col>\n </div>\n </div>\n );\n});\n\ntype SortableInteractiveItemProps = InteractiveItemProps & {\n index: number;\n}\n\nexport const SortableInteractiveItem = (props: SortableInteractiveItemProps) => {\n return (\n <SortableItemWrapper id={props.video.id} childComponent={InteractiveItem} childProps={props} />\n );\n};","import * as React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/core';\n\nimport { EntityType, LocationContext } from 'libs/analytics/interfaces';\n\nimport { SortableItemWrapper } from 'libs/shared/components/sortable/SortableItemWrapper';\nimport { SvgContainerSize } from 'libs/shared/components/svg-container/SvgContainer';\nimport { VideoThumbnail } from 'libs/shared/components/thumbnails/video/VideoThumbnail';\nimport { BaseVideoItemProps } from 'libs/shared/components/video-list/BaseVideoItemProps';\nimport { VideoItemGuidance } from 'libs/shared/components/video-list/components/video-guidance/VideoItemGuidance';\nimport { VideoItemDescription } from 'libs/shared/components/video-list/components/video-item-description/VideoItemDescription';\nimport { VideoItemLeftContent } from 'libs/shared/components/video-list/components/video-item-left-content/VideoItemLeftContent';\nimport { VideoItemRestrictionBadge } from 'libs/shared/components/video-list/components/video-item-restriction-badge/VideoItemRestrictionBadge';\nimport { VideoItemTitle } from 'libs/shared/components/video-list/components/video-item-title/VideoItemTitle';\nimport { VideoItemTopRight } from 'libs/shared/components/video-list/components/video-item-top-right/VideoItemTopRight';\nimport { SortableVideoListContext } from 'libs/shared/components/video-list/VideoList';\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { VideoSubText, VideoSubTextType } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { ThumbnailTextPosition } from 'libs/shared/enums/ThumbnailTextPosition';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\nimport { useHover } from 'libs/shared/hooks/UseHover';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { Video } from 'libs/shared/interfaces';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nexport type VideoItemProps = BaseVideoItemProps<Video> & {\n getSubTextAppLink: (video: Video) => Core.AppLink;\n subTextType?: VideoSubTextType;\n};\n\nexport const VideoItem = React.forwardRef((props: VideoItemProps, ref: React.LegacyRef<HTMLDivElement>) => {\n const breakpoints = useBreakpoints();\n const [ hoverRef, hovered ] = useHover<HTMLDivElement>();\n\n const size = VideoListHelper.getSize(breakpoints, props.size);\n\n const isSmall = size === 'sm';\n\n const { isSortable } = React.useContext(SortableVideoListContext);\n\n const videoAudiences = props.video?.subjectPresentationAudiences?.data;\n const mergedAudience = useMergeAudiences(videoAudiences, props.presentationAudiences);\n\n const showDragHandle = isSortable && !breakpoints.xs && (hovered || typeof props.index === 'undefined' || !props.showIndexes);\n const showIndexes = (props.showIndexes && !showDragHandle) && !breakpoints.xs;\n const hasIconOrIndex = (showDragHandle || props.showIndexes) && !breakpoints.xs;\n\n const appLink = props.getVideoAppLink(props.video, {});\n\n function getSubTextAppLink(): Core.AppLink {\n return props.getSubTextAppLink?.(props.video);\n }\n\n const subTextAppLink = getSubTextAppLink();\n const analyticsProps = {\n analyticsData: props.analyticsData,\n analyticsOptions: props.analyticsOptions ?? {\n entity: EntityType.Video,\n location: LocationContext.VideoListItem\n }\n };\n\n return (\n <div ref={hoverRef} className='w-100'>\n <div className={`row g-0 ${isSmall ? '' : 'py-2'}`} style={props.style} ref={ref}>\n <Col\n {...VideoListHelper.getThumbnailColumns()}\n className={`flex-column align-items-flex-start mb-1 mb-sm-0 pb-sm-2 pe-sm-2 px-md-2 pb-md-0`}\n >\n <Row>\n <VideoItemLeftContent\n index={props.index}\n showDragHandle={showDragHandle}\n showIndexes={showIndexes}\n dragHandleIcon={props.dragHandleIcon}\n dragHandleIconSize={props.dragHandleIconSize}\n dragAttributes={props.dragAttributes}\n dragListeners={props.dragListeners}\n />\n \n <Col xs={VideoListHelper.getThumbnailColSize(hasIconOrIndex)}>\n <VideoThumbnail\n {...analyticsProps}\n video={props.video}\n appLink={appLink}\n audience={mergedAudience}\n imageOptions={{ size: hasIconOrIndex ? ImageSize.Small : ImageSize.Medium }}\n textPosition={ThumbnailTextPosition.Independent}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n type='static'\n canRemovePrivateVideos={props.canRemovePrivateVideos}\n showSignIn={props.showSignIn}\n hideRating={false}\n companyLogoFallbackUrl={props.companyLogoFallbackUrl}\n subTextType='none'\n />\n </Col>\n </Row>\n </Col>\n <Col\n {...VideoListHelper.getDetailsColumns()}\n className={`d-flex flex-column px-0 px-md-2 pb-0 pb-sm-2 pb-md-0 justify-content-md-between`}\n >\n <div>\n <VideoItemTopRight\n {...analyticsProps}\n video={props.video}\n showSignIn={props.showSignIn}\n signInAppLink={props.getSignInAppLink?.(appLink)}\n />\n\n <VideoSubText\n {...analyticsProps}\n video={props.video}\n appLink={subTextAppLink}\n type={props.subTextType}\n />\n\n <VideoItemTitle\n video={props.video}\n appLink={appLink}\n size={size}\n yearGroups={props.yearGroups}\n {...analyticsProps}\n />\n\n {!isSmall && (\n <VideoItemDescription video={props.video} showSignIn={props.showSignIn} />\n )}\n\n <VideoItemRestrictionBadge video={props.video} yearGroups={props.yearGroups}/>\n </div>\n\n <VideoItemGuidance\n video={props.video}\n getVideoAppLink={props.getVideoAppLink}\n hasPermissions={props.hasPermissions}\n {...analyticsProps}\n />\n </Col>\n </div>\n </div>\n );\n});\n\nVideoItem.defaultProps = {\n dragHandleIcon: cvSvgLibrary.Handle,\n dragHandleIconSize: SvgContainerSize.Small,\n size: 'md'\n};\n\ntype SortableVideoItemProps = VideoItemProps & {\n index: number;\n};\n\nexport const SortableVideoItem = (props: SortableVideoItemProps) => {\n return (\n <SortableItemWrapper id={props.video.id} childComponent={VideoItem} childProps={props} />\n );\n};","import * as React from 'react';\n\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsOptions } from 'libs/analytics/interfaces/AnalyticsTypes';\n\nimport { ActionOptions } from 'libs/shared/components/actions/Actions';\nimport { VideoTypes } from 'libs/shared/interfaces';\n\nexport interface VideoActionsOptions {\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n}\n\ntype GetVideoActions = (video: VideoTypes, options: VideoActionsOptions) => ActionOptions[];\ntype FetchMoreActions = (video: VideoTypes) => void;\n\ninterface VideoActionsContextData {\n getVideoActions: GetVideoActions;\n fetchMoreActions?: FetchMoreActions;\n}\n\nexport const VideoActionsContext = React.createContext<VideoActionsContextData>(null);","import { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\n\nimport { useMediaQuery } from './UseMediaQuery';\n\n/**\n * @deprecated Please use useBreakpoints() instead\n */\nexport function useGetMediaQueryString(): MediaQueryStrings {\n const isXS = useMediaQuery(MediaQueryStrings.XS);\n const isSM = useMediaQuery(MediaQueryStrings.SM);\n const isMD = useMediaQuery(MediaQueryStrings.MD);\n const isLG = useMediaQuery(MediaQueryStrings.LG);\n const isXL = useMediaQuery(MediaQueryStrings.XL);\n const isXXL = useMediaQuery(MediaQueryStrings.XXL);\n\n let currentString = MediaQueryStrings.LG; // default\n if (isXS) currentString = MediaQueryStrings.XS;\n if (isSM) currentString = MediaQueryStrings.SM;\n if (isMD) currentString = MediaQueryStrings.MD;\n if (isLG) currentString = MediaQueryStrings.LG;\n if (isXL) currentString = MediaQueryStrings.XL;\n if (isXXL) currentString = MediaQueryStrings.XXL;\n\n return currentString;\n}","import React from 'react';\n\nimport { Audience, PresentationAudience } from '../interfaces';\nimport { AudienceHelper } from '../utils/audience-helper/AudienceHelper';\n\nexport function useMergeAudiences(\n audiences: Audience[],\n presentationAudiences: PresentationAudience[]\n): PresentationAudience {\n // Memoize the audience functions as they are somewhat expensive and the result shouldn't change\n const sortedAudiences = React.useMemo(() => {\n if (!audiences?.length || !presentationAudiences || !AudienceHelper.shouldShowAudiences(presentationAudiences))\n return null;\n\n return AudienceHelper.getSortedPresentationAudiences(audiences, presentationAudiences);\n }, [audiences]);\n\n const mergedAudience = React.useMemo(() => {\n if (!sortedAudiences?.length)\n return null;\n\n return AudienceHelper.getMergedPresentationAudienceString(sortedAudiences);\n }, [sortedAudiences]);\n\n return mergedAudience;\n}","import { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\n\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nconst HAS_NUMBER_REGEX = /\\d/;\nconst COUNT_OFFSET = 1;\n\nexport const AudienceStringBuilders = {\n /**\n * Handles audience sets like:\n * - Year 7, Year 8, etc\n * - Kindergarten, Grade 1, Grade 2, etc\n */\n yearsAndGradesBuilder(audiences: PresentationAudience[]): string {\n /**\n * Create a string with all of the audiences\n */\n const combinedNames = audiences.map(a => a.name).join(' ');\n\n /**\n * Extract all the numbers and matches from the string\n */\n const numberList = combinedNames.split(' ').filter(name => !isNaN(+name)).map(num => +num) || [];\n const wordList = combinedNames.split(' ').filter(name => isNaN(+name)) || [];\n\n // Find an audience that doesn't have a number, like \"Kindergarten\" or \"Foundation\".\n const audienceWithoutNum = audiences.find(p => {\n return !HAS_NUMBER_REGEX.test(p.name);\n });\n\n // Get audience label prefix\n let prefix = wordList.find(name => name !== audienceWithoutNum?.name);\n\n // Pluralise the prefix is there are multiple audiences\n if (audiences.length > 1)\n prefix += 's';\n\n if (audienceWithoutNum && numberList.length)\n return `${prefix} ${audienceWithoutNum.name.charAt(0)} - ${numberList.pop()}`;\n\n /**\n * Build set of logical audience ranges\n */\n const audienceRange = processAudienceRanges(numberList);\n\n return `${prefix} ${audienceRange.join(', ')}`;\n },\n\n /**\n * Handles audience sets like:\n * - Early Level, First Level, etc\n * - Lower Primary, Middle Primary, etc\n */\n wordyLevelsBuilder(audiences: PresentationAudience[]): string {\n const audienceNames = audiences.map(a => a.name);\n\n const commonWordsAndTheirPositions: { [word: string]: 'start' | 'end' } = {};\n\n /**\n * Go through each audience name, and find the words that are common between _all_ of the audiences.\n * For example, if the audiences are \"Early Level\", \"First Level\", and \"Second Level\", the common\n * word will be \"Level\".\n * We will also save whether the common word appears at the beginning or the end of the audience name.\n */\n audienceNames.forEach((name, index) => {\n if (index === 0) {\n const wordsInName = name.split(' ');\n wordsInName.forEach((word, index) => {\n commonWordsAndTheirPositions[word] = index === 0 ? 'start' : 'end';\n });\n\n return;\n }\n\n const wordsInName = name.split(' ');\n\n Object.keys(commonWordsAndTheirPositions).forEach(word => {\n if (!wordsInName.includes(word))\n delete commonWordsAndTheirPositions[word];\n });\n });\n\n // This function currently only handles audience names with 1 common word.\n const commonWord = Object.keys(commonWordsAndTheirPositions)[0];\n const commonWordPosition = commonWordsAndTheirPositions[commonWord];\n\n if (!commonWord)\n return audiences[0].name;\n\n /**\n * At this point, we will have a common word and the position of that word.\n * We now need to build out the rest of the audience name by merging the unique words.\n * For example, if the audiences are \"Early Level\", \"First Level\", and \"Second Level\", we will get\n * \"Early - Second\"\n */\n\n const firstAudienceName = audiences[0].name;\n const lastAudienceName = audiences[audiences.length - 1].name;\n\n // Function to strip the common word out of the audience name\n const stripOutCommonWord = (name: string) => name.split(commonWord)[0];\n\n const mergedWord = `${stripOutCommonWord(firstAudienceName)} - ${stripOutCommonWord(lastAudienceName)}`;\n\n const finalName = commonWordPosition === 'start'\n ? `${commonWord} ${mergedWord}`\n : `${mergedWord} ${commonWord}`;\n\n return finalName;\n },\n\n /**\n * Handles the english secondary audiences, which can be: Lower Secondary, Upper Secondary, and Advanced\n */\n englishSecondaryBuilder(audiences: PresentationAudience[]): string {\n const firstAudience = ArrayHelper.first(audiences);\n const lastAudience = ArrayHelper.last(audiences);\n\n if (firstAudience.name === lastAudience.name)\n return firstAudience.name;\n\n if (lastAudience.name === 'Advanced') {\n const [level] = firstAudience.name.split(' ');\n\n if (level.toLowerCase() === 'lower')\n return 'Lower Sec - Adv';\n\n return 'Upper Sec - Adv';\n }\n\n return 'Lower - Upper Sec';\n },\n\n scottishSecondaryBuilder(audiences: PresentationAudience[]): string {\n const firstAudience = ArrayHelper.first(audiences);\n const lastAudience = ArrayHelper.last(audiences);\n\n if (firstAudience.name === lastAudience.name)\n return firstAudience.name;\n\n if (lastAudience.name === 'Senior Phase')\n return `${firstAudience.name} - Senior`;\n\n return 'Third - Fourth Level';\n },\n\n /**\n * Handles the audience set: Reception, Key Stage 1, Lower Key Stage 2, and Upper Key Stage 2\n */\n keyStagesBuilder(audiences: PresentationAudience[]): string {\n // The first and last audience will build out the range\n const firstAudience = ArrayHelper.first(audiences);\n const lastAudience = ArrayHelper.last(audiences);\n\n // The first word in the strings will either be \"Upper\", \"Lower\", \"Key\", or \"Reception\"\n const firstAudienceFirstWord = ArrayHelper.first(firstAudience.name.split(' '));\n const lastAudienceFirstWord = ArrayHelper.first(lastAudience.name.split(' '));\n\n // Each audience in this set except for \"Reception\" has a number. Get the numbers for the first and last audiences\n const firstAudienceNumber = firstAudience.name.split(' ').find(word => !isNaN(+word));\n const lastAudienceNumber = lastAudience.name.split(' ').find(word => !isNaN(+word));\n\n // If there's only one audience on the video:\n if (firstAudience === lastAudience) {\n // For these 2 audiences, return the full name as it's short enough already\n if (firstAudienceFirstWord === 'Key' || firstAudienceFirstWord === 'Reception')\n return firstAudience.name;\n\n // For the Upper/Lower key stage audiences, abbreviate the \"key stage\" part to KS1/KS2\n return `${firstAudienceFirstWord} KS${firstAudienceNumber}`;\n }\n\n /**\n * Handle when the object has >1 audience\n */\n\n let firstAudienceString = '';\n let lastAudienceString = '';\n\n // Reception is always shortened to \"R\" when in a range\n if (firstAudienceFirstWord === 'Reception') {\n firstAudienceString = 'R';\n } else {\n // All other audiences will be abbreviated to \"KS1/KS2\"\n firstAudienceString = `KS${firstAudienceNumber}`;\n }\n\n // The last audience will always be a key stage, so abbreviate this too\n lastAudienceString = `KS${lastAudienceNumber}`;\n\n // If the audience range contains both the \"Lower\" and \"Upper\" audiences, abbreviate those and return\n if (firstAudienceFirstWord === 'Lower' && lastAudienceFirstWord === 'Upper') {\n return `L ${firstAudienceString} - U ${lastAudienceString}`;\n }\n\n // Add \"Lower\" and \"Upper\" to the strings if it's needed\n if (firstAudienceFirstWord === 'Lower') {\n firstAudienceString = `Lower ${firstAudienceString}`;\n }\n\n if (lastAudienceFirstWord === 'Upper') {\n lastAudienceString = `Upper ${lastAudienceString}`;\n }\n\n // This handles a case where the range is Reception - Key Stage 1. In which case we don't abbreviate the key stage part to KS1.\n if (lastAudienceFirstWord === 'Key') {\n lastAudienceString = lastAudience.name;\n }\n\n return `${firstAudienceString} - ${lastAudienceString}`;\n }\n};\n\nfunction processAudienceRanges(audienceValues: number[]): string[] {\n /**\n * Lookahead by increments of offset\n */\n const offset = COUNT_OFFSET;\n\n let initialVal; let nextVal;\n let isContinguous: boolean = false;\n\n const ranges: string[] = [];\n\n // Audience values need to be in ascending order\n audienceValues = audienceValues.sort((a, b) => a - b);\n\n let i; let j;\n\n for (i = 0; i < audienceValues.length; i++) {\n j = i + 1;\n\n // Set our lower boundary to compare against\n if (!isContinguous)\n initialVal = audienceValues[i];\n\n nextVal = audienceValues[j];\n\n /**\n * Where the next number is also the next incremental value\n * we're going to continue iterating until the next value\n * is no longer contiguos.\n */\n if (audienceValues[i] + offset === nextVal) {\n isContinguous = true;\n } else if (isContinguous) {\n /**\n * Where we were tracking a contiguous set, format appropriately \n * and store the vals\n */\n\n ranges.push(`${initialVal} - ${audienceValues[i]}`);\n isContinguous = false;\n } else {\n /**\n * Where the values arent contiguous, just store the current value\n */\n\n ranges.push(`${audienceValues[i]}`);\n isContinguous = false;\n }\n }\n\n return ranges;\n}","import { HashObject } from 'libs/common/react/interfaces';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { HardCoded } from 'libs/shared/constants/HardCoded';\nimport { Audience, BaseObject, PresentationAudience } from 'libs/shared/interfaces';\n\nimport { AudienceStringBuilders } from './AudienceStringBuilders';\n\nconst DIGIT_REGEX = /([0-9]+)/ig;\nconst SPACE_REGEX = /\\s|\\+/ig;\n\n/**\n * Where there is 1 or less audiences on a presentation, it provides little value to\n * the user's experience, so we'll hide audiences altogether.\n */\nconst MIN_AUDIENCE_THRESHOLD = 1;\n\nexport const AudienceHelper = {\n /**\n * This is needed to sort an object's audiences, as they are not sorted by the backend.\n * To do this, we take the presentation audiences (sorted) and filter them by the object's\n * audiences, leaving behind a sorted array of object audiences.\n */\n getSortedPresentationAudiences(\n objectAudiences: Audience[],\n presentationAudiences: PresentationAudience[]\n ): PresentationAudience[] {\n /**\n * Atm there is a bug in flight's optimize, around multiple parts of the page \n * fetching the same object with a different response. We are filtering out\n * falsey values in our object audience ids until that's fixed. - Sha\n */\n const objectAudienceIds = objectAudiences\n .filter(v => !!v)\n .map(audience => audience.id.toString());\n\n /**\n * Remove audiences that aren't relevant for the user's current presentation\n */\n const filteredAudiences = presentationAudiences.filter(presAudience => {\n return objectAudienceIds.includes(presAudience.masterId.toString());\n });\n\n return filteredAudiences;\n },\n\n /**\n * This function accepts a set of presentation audiences, and returns a single\n * audience where the name is a merged string of the names of all of the audiences passed in.\n *\n * As we add more presentations that have different audience sets, we'll need to extend the `switch`\n * statement below to either include new string builder functions, or to include new presentation IDs\n * for existing string builder functions.\n */\n getMergedPresentationAudienceString(presentationAudiences: PresentationAudience[]): PresentationAudience {\n const { presentationId } = ArrayHelper.first(presentationAudiences);\n\n let mergedAudienceString = '';\n\n switch (+presentationId) {\n // Generic `Name Number`. Sometimes has just name. Examples: Year 12, Grade 4, Kindergarten\n case HardCoded.PresentationIds.DEFAULT:\n case HardCoded.PresentationIds.AU_SECONDARY:\n case HardCoded.PresentationIds.US_ELEMENTARY:\n case HardCoded.PresentationIds.AU_PRIMARY:\n case HardCoded.PresentationIds.STREAMABLE_LEARNING:\n if (presentationAudiences.length === 1)\n return presentationAudiences[0];\n\n mergedAudienceString = AudienceStringBuilders.yearsAndGradesBuilder(presentationAudiences);\n break;\n\n // Early Level, First Level, Second Level, etc.\n case HardCoded.PresentationIds.SCOTLAND_PRIMARY:\n case HardCoded.PresentationIds.INTERNATIONAL_PRIMARY:\n case HardCoded.PresentationIds.INTERNATIONAL_SECONDARY:\n if (presentationAudiences.length === 1)\n return presentationAudiences[0];\n\n mergedAudienceString = AudienceStringBuilders.wordyLevelsBuilder(presentationAudiences);\n break;\n\n case HardCoded.PresentationIds.ENGLISH_SECONDARY:\n mergedAudienceString = AudienceStringBuilders.englishSecondaryBuilder(presentationAudiences);\n break;\n\n \n case HardCoded.PresentationIds.SCOTLAND_SECONDARY:\n mergedAudienceString = AudienceStringBuilders.scottishSecondaryBuilder(presentationAudiences);\n break;\n\n // Key Stage 1, Lower Key Stage 2, etc.\n case HardCoded.PresentationIds.ENGLAND_PRIMARY:\n mergedAudienceString = AudienceStringBuilders.keyStagesBuilder(presentationAudiences);\n break;\n\n // These presentations only have 1 audience mapped. These are never shown as badges in the product.\n case HardCoded.PresentationIds.US_MIDDLE:\n case HardCoded.PresentationIds.US_HIGH:\n default:\n break;\n }\n\n if (!mergedAudienceString)\n return null;\n\n return { name: mergedAudienceString } as PresentationAudience;\n },\n\n /**\n * This function assumes the members array passed in is ordered by `name`.\n */\n sortMembersWithDuplicateNamesByAudience(members: BaseObject[]): BaseObject[] {\n // Returns the lowest level audience out of an array of audience objects by looking at the name\n const getLowestAudience = (audiences: Audience[]) => {\n if (!audiences.length)\n return null;\n\n let lowestAudience: Audience;\n let lowestAudienceDigit: number;\n\n audiences.forEach(audience => {\n const digit = +ArrayHelper.first(audience.name.match(DIGIT_REGEX));\n\n if (!lowestAudience) {\n lowestAudience = audience;\n lowestAudienceDigit = digit;\n return;\n }\n\n if (digit < lowestAudienceDigit)\n lowestAudience = audience;\n });\n\n return lowestAudience;\n };\n\n // This is used to track how many times a member's name appears in the collection\n const nameCountMap: HashObject<number> = {};\n\n let sorted: BaseObject[] = [];\n\n members.forEach(member => {\n if (!nameCountMap[member.name]) {\n nameCountMap[member.name] = 1;\n sorted.push(member);\n return;\n }\n\n sorted.push(member);\n nameCountMap[member.name]++;\n\n // Take the slice of duplicates that we want to sort by audience\n const slice = sorted.splice(sorted.length - nameCountMap[member.name]);\n\n // Sort the slice by lowest audience\n const sortedSlice = slice.sort((a: any, b: any) => {\n const firstObjLowestAudience = getLowestAudience(a.subjectPresentationAudiences.data);\n const secondObjLowestAudience = getLowestAudience(b.subjectPresentationAudiences.data);\n\n if (!firstObjLowestAudience && secondObjLowestAudience)\n return 1;\n\n if (!secondObjLowestAudience)\n return -1;\n\n const comparison = firstObjLowestAudience.name.localeCompare(secondObjLowestAudience.name);\n\n if (comparison === 0) return comparison;\n\n return comparison > 0 ? -1 : 1;\n });\n\n sorted = sorted.concat(sortedSlice);\n });\n\n return sorted;\n },\n\n getActiveAudiencesFromParams(audiences: PresentationAudience[], params: HashObject = {}): PresentationAudience[] {\n if (!ObjectHelper.isObject(params) || ObjectHelper.isEmpty(params))\n return;\n\n if (!audiences || !audiences.length)\n return;\n\n if (!AudienceHelper.shouldShowAudiences(audiences))\n return;\n\n // 'a' is shorthand for audience\n let { a } = params;\n\n if (!a)\n return;\n\n // Only a single query param was passed, we'll wrap it in an array\n if (typeof a === 'string')\n a = [a];\n\n const normalizeAudienceName = (audienceName: string) => {\n return audienceName.replace(SPACE_REGEX, '').toLowerCase();\n };\n\n // Build an audience lookup\n const audienceLookup = a.reduce((state: HashObject, audienceStr: string) => {\n state[normalizeAudienceName(audienceStr)] = audienceStr;\n return state;\n }, {});\n\n // Filter out our active audience based on whether their name matches the lookup object\n return audiences.filter((audience: PresentationAudience) => {\n return audienceLookup[normalizeAudienceName(audience.name)];\n });\n },\n\n getAudienceParams(audiences: PresentationAudience[]): HashObject {\n if (!audiences?.length)\n return null;\n\n return { a: audiences.map(a => a.name) };\n },\n\n shouldShowAudiences(audiences: PresentationAudience[] = []): boolean {\n if (!audiences)\n return false;\n\n return audiences.length > MIN_AUDIENCE_THRESHOLD;\n }\n};\n"],"names":["ScrollHelper","preventScrollTop","Radio","trigger","BaseLinkifyOptions","className","defaultProtocol","LinkifyHelper","linkifyText","text","options","ops","DragDropMoveWrapper","props","data","draggable","disabled","dragActive","active","isDragging","attributes","listeners","draggableRef","setNodeRef","droppable","isOver","over","dropActive","droppableRef","Array","isArray","includes","id","toString","setIsDragging","ref","dragStyle","dropStye","children","buildCursor","appLink","cursorParam","prevHack","currentParams","params","previous","application","action","args","cursor","Pagination","cursors","buttonVariant","scrollTop","onClick","onClickButton","page","location","entity","actionType","value","style","display","phrase","next","variant","defaultProps","SortableContainerWrapper","activeId","setActiveId","sensors","activationConstraint","distance","coordinateGetter","collisionDetection","onDragStart","event","onSortStart","onDragEnd","onSortEnd","modifiers","vertical","items","ids","strategy","dropAnimation","getDragOverlay","duration","easing","SortableItemWrapper","transform","transition","isSorting","activeIndex","overIndex","index","touchAction","position","visibility","Children","childComponent","dragDirection","getDragDirection","childProps","dragListeners","dragAttributes","getItemComponent","video","isSortable","VideoHelper","ClipItem","InteractiveItem","VideoItem","SortableVideoListContext","VideoList","CheckboxHelper","checkboxHelper","currentAppLink","videos","map","v","idx","Component","pagePositionStartingIndex","Number","isInteger","startingPositionIndex","dragData","getSelectedCount","isChecked","getSelected","drag","key","allowBulkAction","Checkbox","onChange","onToggleItem","checked","yearGroups","getVideoAppLink","getSubTextAppLink","setFavourite","canFavourite","dragHandleIcon","dragHandleIconSize","showSignIn","getSignInAppLink","analyticsData","pagePositionIndex","hasPermissions","canRemovePrivateVideos","presentationAudiences","showIndexes","companyLogoFallbackUrl","subTextType","getPreviewQuestionsAppLink","imageCdnUrl","SortableVideoList","find","Provider","currentSortingIndex","VideoListHelper","getThumbnailColumns","xs","sm","lg","getDetailsColumns","getSize","breakpoints","size","getThumbnailColSize","hasDragHandle","hoverRef","hovered","isSmall","mergedAudience","subjectPresentationAudiences","showDragHandle","hasIconOrIndex","analyticsProps","analyticsOptions","audience","imageOptions","textPosition","type","signInAppLink","SortableClipItem","VideoItemGuidance","scrollToPosition","VideoItemActions","videoActions","getVideoActions","actions","actionsDropdownClassName","fetchMore","fetchMoreActions","InnerContent","description","canNavigate","hasCaptions","subtitles","length","Badge","productionYear","dangerouslySetInnerHTML","__html","VideoItemDescription","isMobile","hasRestrictions","RestrictionHelper","VideoItemLeftContent","baseClassName","dragProps","Col","SvgContainer","svgName","S","RestrictionBadge","restrictions","inline","VideoItemRestrictionBadge","canConsume","_restrictions","VideoItemTitle","title","name","descriptor","textClassName","linkClassName","namespace","SignInToWatch","AppLink","Text","VideoItemTopRight","InteractiveItemQuestions","mediaQuery","questionDisplayLimit","timepoints","interactionsToShow","interactionCount","forEach","timepoint","interactions","interaction","interactionData","typeId","JSON","parse","interactionToShow","t","Math","floor","visibleAt","push","totalInteractions","reduce","acc","InteractionLabel","smallIcon","previewAppLink","questionsShown","smartCount","useBreakpoints","Row","VideoThumbnail","ThumbnailTextPosition","hideDuration","_timepoints","SortableInteractiveItem","videoAudiences","subTextAppLink","hideRating","SortableVideoItem","VideoActionsContext","useGetMediaQueryString","isXS","isSM","isMD","isLG","isXL","isXXL","currentString","useMergeAudiences","audiences","sortedAudiences","HAS_NUMBER_REGEX","AudienceStringBuilders","firstAudience","ArrayHelper","lastAudience","split","toLowerCase","DIGIT_REGEX","SPACE_REGEX","AudienceHelper","getSortedPresentationAudiences","objectAudiences","objectAudienceIds","filter","presAudience","masterId","getMergedPresentationAudienceString","mergedAudienceString","presentationId","HardCoded","combinedNames","a","join","numberList","isNaN","num","wordList","audienceWithoutNum","p","test","prefix","charAt","pop","audienceRange","audienceValues","initialVal","nextVal","i","j","isContinguous","ranges","sort","b","processAudienceRanges","audienceNames","commonWordsAndTheirPositions","wordsInName","Object","keys","word","commonWord","commonWordPosition","firstAudienceName","lastAudienceName","stripOutCommonWord","mergedWord","firstAudienceFirstWord","lastAudienceFirstWord","firstAudienceNumber","lastAudienceNumber","firstAudienceString","lastAudienceString","sortMembersWithDuplicateNamesByAudience","members","getLowestAudience","digit","match","lowestAudience","lowestAudienceDigit","nameCountMap","sorted","member","sortedSlice","splice","firstObjLowestAudience","secondObjLowestAudience","comparison","localeCompare","concat","getActiveAudiencesFromParams","ObjectHelper","shouldShowAudiences","normalizeAudienceName","audienceName","replace","audienceLookup","state","audienceStr","getAudienceParams"],"sourceRoot":""}