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A,GAAgB,aAEtD,UAACmM,SAAAA,CAAOpE,IAAKA,EAAKqE,KAAMiC,IACxB,UAAC7J,IAAAA,UAAE,4DAGL,UAACgD,SAAAA,CACCnH,UAAU,yBAEV6H,cAAY,OAIZT,QAASuI,WAERxB,EACC,UAAC4B,EAAAA,CAASA,CAAAA,CAAC/P,UAAU,gCAErB,UAACgQ,EAAAA,CAAQA,CAAAA,CAAChQ,UAAU,qCAIzB,QAACP,EAAAA,KAAAA,EAAAA,EAAMC,MAAND,CAAMC,GAAWA,GACjB,UAACoI,aAAAA,CAAW9H,UAAU,oCACpB,UAAC4H,OAAAA,CAAK5H,UAAU,yCACd,UAACmE,IAAAA,UAAGzE,WAMXoO,GACC,UAAClG,OAAAA,CAAK5H,UAAU,eAAe2H,IAAK4G,WAClC,UAACvF,EAAAA,CAAeA,CAAAA,CACdrB,IAAK6G,EACL9G,IAAKoG,EACL7G,MAAOA,EACPQ,IAAK9H,QAMjB","sources":["webpack://_N_E/../design-system/src/components/primitives/kaltura-embed/three-play-script.ts","webpack://_N_E/../design-system/src/components/primitives/kaltura-embed/kaltura-video-events.ts","webpack://_N_E/../design-system/src/components/primitives/kaltura-embed/kaltura-embed.tsx","webpack://_N_E/../design-system/src/components/primitives/media-asset/media-asset-kaltura-modal.tsx","webpack://_N_E/../design-system/src/components/primitives/media-asset/media-asset.tsx","webpack://_N_E/../design-system/src/components/primitives/media-asset/media-asset-image.tsx","webpack://_N_E/../design-system/src/components/primitives/media-asset/media-asset.scss?ac4a","webpack://_N_E/../design-system/src/components/primitives/wowza-embed/wowza.tsx","webpack://_N_E/../design-system/src/components/primitives/embed/embed.scss?ab13","webpack://_N_E/./src/hooks/use-data-layer.ts","webpack://_N_E/../design-system/src/components/primitives/kaltura-embed/kaltura-embed.scss?97a2","webpack://_N_E/../design-system/src/components/primitives/wowza-embed/wowza.scss?edb8","webpack://_N_E/../design-system/src/components/primitives/embed/embed.tsx","webpack://_N_E/../design-system/src/utils/constants.ts","webpack://_N_E/../design-system/src/hooks/use-script.ts","webpack://_N_E/../design-system/src/utils/cloudinary.ts","webpack://_N_E/../design-system/src/hooks/use-prefers-reduced-motion.ts","webpack://_N_E/../design-system/src/components/primitives/media-asset/media-asset-video.tsx"],"sourcesContent":["export interface ThreePlayScriptArgs {\n threePlayId: string;\n threePlayProjectId: string;\n videoTargetId: string;\n threePlayTargetId: string;\n}\n\n// https://support.3playmedia.com/hc/en-us/articles/227736108-Kaltura-Plugin-SDK-Set-Up\n\nexport function createThreePlayScript({\n threePlayId,\n threePlayProjectId,\n videoTargetId,\n threePlayTargetId,\n}: ThreePlayScriptArgs) {\n if (\n !threePlayId ||\n !threePlayProjectId ||\n !threePlayTargetId ||\n !videoTargetId\n ) {\n return null;\n }\n\n const url = new URL(\"https://plugin.3playmedia.com/ajax.js\");\n\n url.searchParams.set(\"pt\", \"602\"); // some magic number - if it's autoplay, then use pt = \"895\"\n url.searchParams.set(\"mf\", threePlayId);\n url.searchParams.set(\"p\", threePlayProjectId);\n url.searchParams.set(\"target\", threePlayTargetId);\n\n url.searchParams.set(\"vembed\", \"0\");\n url.searchParams.set(\"video_target\", videoTargetId);\n url.searchParams.set(\"p3sdk_version\", \"1.10.7\");\n\n return url.href;\n}\n","import {\n DataLayerEvent,\n PushDataLayerFn,\n useDataLayer,\n} from \"frontend/hooks/use-data-layer\";\n\nexport interface KalturaEmbedNode extends HTMLElement {\n evaluate: (str: string) => string | number;\n kBind: (event: string, callback: (time: number) => void) => unknown;\n duration: number;\n currentTime: number;\n zero: boolean;\n twentyfive: boolean;\n fifty: boolean;\n seventyfive: boolean;\n hundred: boolean;\n}\n\nexport function setKalturaVideoEvents(\n targetId: string,\n pushDataLayer: PushDataLayerFn,\n) {\n try {\n // http://player.kaltura.com/docs/api#kBind\n\n const kdp = document.getElementById(targetId) as KalturaEmbedNode;\n kdp.duration = 0;\n kdp.currentTime = 0;\n kdp.zero = false;\n kdp.twentyfive = false;\n kdp.fifty = false;\n kdp.seventyfive = false;\n kdp.hundred = false;\n\n let videoTitle = kdp.evaluate(\n \"{mediaProxy.entry.name} : {mediaProxy.entry.name}\",\n );\n const videoType = kdp.evaluate(\"{mediaProxy.isLive}\")\n ? \"livestream\"\n : \"recorded\";\n\n let videoEvent: DataLayerEvent;\n\n kdp.kBind(\"mediaReady\", function () {\n const fetchedTitle = document.getElementById(targetId);\n // get element from fetchedTitle .find(\"iframe\").prop('title','Video Player')\n const title = fetchedTitle\n ?.querySelector(\"iframe\")\n ?.contentDocument?.querySelector(\"title\")?.text;\n\n // Get entryId from targetId that has this structure kaltura-player--\n const entryId = targetId.split(\"-\")[2];\n\n if (!videoTitle || videoTitle === \" : \") {\n videoTitle = `${title} : ${entryId}`;\n }\n });\n\n kdp.kBind(\"playerUpdatePlayhead\", function (time: number) {\n // set video duration to a number\n let videoDuration = 0;\n if (kdp.evaluate(\"{duration}\")) {\n videoDuration = Number(kdp.evaluate(\"{duration}\"));\n }\n videoEvent = {\n /* eslint-disable camelcase */\n event: \"video\",\n event_data: {\n video_title: videoTitle,\n video_duration: videoDuration,\n video_milestone: 0,\n video_type: videoType,\n },\n /* eslint-enable camelcase */\n };\n const p = Math.round((time / videoDuration) * 100);\n kdp.currentTime = time;\n if (p > 0) {\n if (!kdp.zero) {\n // eslint-disable-next-line camelcase\n videoEvent.event_data.video_milestone = 1;\n pushDataLayer(videoEvent);\n kdp.zero = true;\n }\n if (p >= 25 && !kdp.twentyfive) {\n // eslint-disable-next-line camelcase\n videoEvent.event_data.video_milestone = 25;\n useDataLayer().pushDataLayer(videoEvent);\n kdp.twentyfive = true;\n }\n if (p >= 50 && !kdp.fifty) {\n // eslint-disable-next-line camelcase\n videoEvent.event_data.video_milestone = 50;\n useDataLayer().pushDataLayer(videoEvent);\n kdp.fifty = true;\n }\n if (p >= 75 && !kdp.seventyfive) {\n // eslint-disable-next-line camelcase\n videoEvent.event_data.video_milestone = 75;\n useDataLayer().pushDataLayer(videoEvent);\n kdp.seventyfive = true;\n }\n if (p >= 90 && !kdp.hundred) {\n // eslint-disable-next-line camelcase\n videoEvent.event_data.video_milestone = 100;\n useDataLayer().pushDataLayer(videoEvent);\n kdp.hundred = true;\n }\n }\n });\n } catch (e) {\n console.error(e);\n }\n}\n","import \"./kaltura-embed.scss\";\n\nimport \"./kaltura-types\";\n\nimport cn from \"clsx\";\nimport { ReactNode, useEffect, useRef, useState, useId } from \"react\";\nimport { loadScript } from \"design-system/hooks/use-script\";\nimport { createThreePlayScript } from \"./three-play-script\";\nimport {\n KALTURA_PARTNER_ID,\n KALTURA_SCRIPT_SRC,\n KALTURA_UI_CONF_ID,\n} from \"design-system/utils/constants\";\nimport { setKalturaVideoEvents } from \"./kaltura-video-events\";\nimport { useDataLayer } from \"frontend/hooks/use-data-layer\";\n\n// Add type definition for Kaltura player\ninterface KalturaPlayer extends HTMLElement {\n sendNotification: (\n notificationName: string,\n notificationData?: unknown,\n ) => void;\n}\n\nexport interface KalturaEmbedProps {\n entryId: string;\n title?: string;\n withModal?: boolean;\n className?: string;\n duration?: string;\n caption?: ReactNode;\n description?: ReactNode;\n threePlayId?: string;\n threePlayProjectId?: string;\n noModalMobileOverride?: boolean;\n hide?: {\n caption?: boolean;\n focusables?: boolean;\n };\n}\n\n/**\n * Component for embedding Kaltura video player widgets. Used within the `MediaAsset` primitive.\n * See the docs for more details: http://player.kaltura.com/docs/api\n *\n * ## See it in use on...\n * - The [article kitchen sink page](/story/example-pages-article-pages-kitchen-sink--story)\n *\n * - **`id: P-016-000-00`**\n */\nexport function KalturaEmbed({\n hide,\n caption,\n description,\n duration,\n entryId,\n title,\n withModal,\n className,\n threePlayId,\n threePlayProjectId,\n}: KalturaEmbedProps) {\n // We need unique ids because the carousel creates duplicates to animate between slides.\n // Replace colons with dashes to avoid invalid HTML IDs.\n const uniqueId = useId().replace(/:/g, \"\");\n const buttonTextRef = useRef(null);\n const [play, setPlay] = useState(withModal ?? false);\n const { pushDataLayer } = useDataLayer();\n const withModalRef = useRef(play);\n\n const videoTargetId = `kaltura-player-${entryId}-${uniqueId}`;\n const threePlayTargetId = `threePlay-${entryId}`;\n\n const hasThreePlay = Boolean(threePlayId && threePlayProjectId);\n const ariaLabel = title ? `Play ${title} video` : `Play video content`;\n\n // Add ref to track if player is active\n const playerActiveRef = useRef(false);\n\n useEffect(() => {\n if (play) {\n loadScript(KALTURA_SCRIPT_SRC, {\n onload: () => {\n buttonTextRef.current?.classList.add(\"hbs-global-visually-hidden\");\n\n if (window.kWidget) {\n try {\n window.kWidget.embed({\n entry_id: entryId,\n targetId: videoTargetId,\n wid: `_${KALTURA_PARTNER_ID}`,\n uiconf_id: KALTURA_UI_CONF_ID,\n flashvars: {\n autoPlay: true,\n },\n readyCallback: (playerId) => {\n playerActiveRef.current = true;\n setKalturaVideoEvents(playerId, pushDataLayer);\n\n const kdp = document.getElementById(\n playerId,\n ) as KalturaPlayer | null;\n if (kdp?.sendNotification) {\n setTimeout(() => {\n kdp.sendNotification(\"doPlay\");\n }, 100);\n }\n\n if (threePlayId && threePlayProjectId) {\n const threePlayScriptSrc = createThreePlayScript({\n threePlayId,\n threePlayProjectId,\n videoTargetId,\n threePlayTargetId,\n });\n loadScript(threePlayScriptSrc, { allowDuplicates: true });\n }\n },\n });\n } catch (error) {\n console.error(`Failed to embed Kaltura player:`, error);\n setPlay(false);\n playerActiveRef.current = false;\n }\n }\n },\n });\n }\n }, [\n play,\n videoTargetId,\n entryId,\n threePlayId,\n threePlayProjectId,\n threePlayTargetId,\n pushDataLayer,\n ]);\n\n useEffect(() => {\n const observer = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n // Only destroy if player is active and element is hidden\n if (!entry.isIntersecting && playerActiveRef.current) {\n if (window.kWidget) {\n window.kWidget.destroy(videoTargetId);\n setPlay(false);\n playerActiveRef.current = false;\n if (buttonTextRef.current) {\n buttonTextRef.current.classList.remove(\n \"hbs-global-visually-hidden\",\n );\n }\n }\n }\n });\n },\n { threshold: [0] },\n );\n\n const element = document.getElementById(videoTargetId);\n if (element) {\n observer.observe(element);\n }\n\n return () => {\n observer.disconnect();\n if (window.kWidget && playerActiveRef.current) {\n window.kWidget.destroy(videoTargetId);\n setPlay(false);\n playerActiveRef.current = false;\n }\n };\n }, [videoTargetId]);\n\n // Add effect to reset player when destroyed\n useEffect(() => {\n const resetPlayer = () => {\n const playerContainer = document.getElementById(videoTargetId);\n if (playerContainer) {\n const playBtn = document.getElementById(`${videoTargetId}_playBtn`);\n if (playBtn) {\n playBtn.style.display = \"block\";\n }\n\n const thumbnail = playerContainer.querySelector(\".kWidgetCentered\");\n if (thumbnail) {\n (thumbnail as HTMLElement).style.display = \"block\";\n }\n\n if (buttonTextRef.current) {\n buttonTextRef.current.classList.remove(\"hbs-global-visually-hidden\");\n }\n }\n };\n\n // Reset player when play state changes to false\n if (!play) {\n resetPlayer();\n }\n }, [play, videoTargetId]);\n\n // Add effect to listen for reset events\n useEffect(() => {\n const containerElement = document\n .getElementById(videoTargetId)\n ?.closest(\".hbs-kaltura-embed\");\n\n const handleReset = () => {\n setPlay(false);\n playerActiveRef.current = false;\n };\n\n if (containerElement) {\n containerElement.addEventListener(\"resetKalturaPlayer\", handleReset);\n }\n\n return () => {\n if (containerElement) {\n containerElement.removeEventListener(\"resetKalturaPlayer\", handleReset);\n }\n };\n }, [videoTargetId]);\n\n return (\n
\n
\n
\n
\n
\n play !== true && setPlay(true)}\n aria-label={ariaLabel}\n className=\"kWidgetCentered kWidgetPlayBtn\"\n id={`${videoTargetId}_playBtn`}\n >\n {/* eslint-disable-next-line react/forbid-elements */}\n \n
\n
\n\n {!withModalRef.current && (\n
\n \n Play\n {\" \"}\n {duration && (\n \n \n Video duration:\n \n {duration}\n \n )}\n
\n )}\n
\n\n {hasThreePlay && (\n
\n )}\n\n {description && (\n
{description}
\n )}\n\n {!hide?.caption && caption && (\n
\n \n
{caption}
\n
\n
\n )}\n
\n );\n}\n","import { CSSProperties, forwardRef, useState } from \"react\";\nimport cn from \"clsx\";\nimport * as Dialog from \"@radix-ui/react-dialog\";\nimport { KALTURA_PARTNER_ID } from \"design-system/utils/constants\";\nimport {\n KalturaEmbed,\n KalturaEmbedProps,\n} from \"design-system/components/primitives/kaltura-embed/kaltura-embed\";\n\nexport interface MediaAssetKalturaModalProps {\n kaltura: KalturaEmbedProps;\n className?: string;\n aspectRatio?: `${string}/${string}`;\n hide?: {\n caption?: boolean;\n focusables?: boolean;\n };\n}\n\nexport const MediaAssetKalturaModal = forwardRef<\n HTMLButtonElement,\n MediaAssetKalturaModalProps\n>(({ kaltura, className, aspectRatio, hide }, ref) => {\n const [open, setOpen] = useState(false);\n\n // https://developer.kaltura.com/api-docs/Engage_and_Publish/kaltura-thumbnail-api.html\n const poster = `https://cdnsecakmi.kaltura.com/p/${KALTURA_PARTNER_ID}/thumbnail/entry_id/${kaltura.entryId}/width/2000/type/1/quality/100`;\n const imgStyle = aspectRatio\n ? ({\n aspectRatio: aspectRatio,\n objectFit: \"cover\",\n objectPosition: \"center center\",\n } as CSSProperties)\n : {};\n const ariaLabel = kaltura.title\n ? `Play ${kaltura.title} video`\n : `Play video content`;\n\n return (\n \n
\n {hide?.focusables ? (\n
\n {/* eslint-disable-next-line react/forbid-elements */}\n \"\"\n {ariaLabel}\n
\n ) : (\n \n {/* eslint-disable-next-line react/forbid-elements */}\n \"\"\n {ariaLabel}\n \n )}\n\n
\n \n Play\n {\" \"}\n {kaltura.duration && (\n \n \n Video duration:\n \n {kaltura.duration}\n \n )}\n
\n
\n\n \n \n \n
\n \n ✕\n \n \n
\n
\n
\n
\n
\n );\n});\n","import \"./media-asset.scss\";\n\nimport { MediaAssetImage, MediaAssetImageProps } from \"./media-asset-image\";\nimport { MediaAssetVideo, MediaAssetVideoProps } from \"./media-asset-video\";\nimport { MediaAssetKalturaModal } from \"./media-asset-kaltura-modal\";\nimport {\n KalturaEmbed,\n KalturaEmbedProps,\n} from \"design-system/components/primitives/kaltura-embed/kaltura-embed\";\nimport { forwardRef } from \"react\";\nimport { Embed, EmbedProps } from \"../embed/embed\";\nimport { WowzaEmbed, WowzaEmbedProps } from \"../wowza-embed/wowza\";\n\nexport interface MediaAssetProps {\n image?: MediaAssetImageProps;\n video?: MediaAssetVideoProps;\n kaltura?: KalturaEmbedProps;\n embed?: EmbedProps;\n wowzaEmbed?: WowzaEmbedProps;\n className?: string;\n aspectRatio?: `${string}/${string}`;\n hide?: {\n caption?: boolean;\n focusables?: boolean;\n };\n}\n\n/**\n * - **`id: P-018-000-11`**\n */\nexport const MediaAsset = forwardRef(\n (\n { className, hide, image, video, kaltura, embed, aspectRatio, wowzaEmbed },\n ref,\n ) => {\n if (image) {\n return (\n \n );\n }\n\n if (video) {\n return (\n \n );\n }\n\n if (embed) {\n return ;\n }\n\n if (wowzaEmbed) {\n return ;\n }\n\n if (kaltura) {\n if (kaltura.withModal) {\n return (\n \n );\n }\n return ;\n }\n\n return null;\n },\n);\n","import { ReactNode, forwardRef } from \"react\";\nimport cn from \"clsx\";\nimport { CloudinaryProps, cloudinary } from \"design-system/utils/cloudinary\";\nimport { EditAttributes } from \"design-system/types/types\";\nimport { useStoreSelector } from \"design-system/store/store\";\n\n// add support for missing attribute \"fetchPriority\" (experimental img attr)\ndeclare module \"react\" {\n interface ImgHTMLAttributes extends HTMLAttributes {\n fetchpriority?: \"high\" | \"low\" | \"auto\";\n }\n}\n\nexport interface MediaAssetImageProps {\n src: string;\n alt?: string;\n align?: string;\n gravity?: CloudinaryProps[\"gravity\"];\n caption?: ReactNode;\n className?: string;\n mobileWidth?: number;\n aspectRatio?: `${string}/${string}`;\n intrinsicAspectRatio?: `${string}/${string}`;\n height?: string; // height will be ignored if aspectRatio is set\n width?: string;\n quality?:\n | \"q_auto\"\n | \"q_auto:best\"\n | \"q_auto:good\"\n | \"q_auto:eco\"\n | \"q_auto:low\"\n | number;\n loading?: \"lazy\" | \"eager\";\n hide?: {\n caption?: boolean;\n focusables?: boolean;\n };\n\n editAttributes?: {\n src?: EditAttributes;\n };\n}\n\nexport const MediaAssetImage = forwardRef<\n HTMLImageElement,\n MediaAssetImageProps\n>(\n (\n {\n align,\n gravity,\n alt = \"\",\n caption,\n className,\n aspectRatio,\n intrinsicAspectRatio,\n height = \"auto\",\n hide,\n src,\n mobileWidth = 600,\n loading = \"lazy\",\n width = \"100%\",\n quality,\n editAttributes,\n },\n ref,\n ) => {\n const Head = useStoreSelector((store) => store.framework.Head);\n\n const cloudinaryProps: CloudinaryProps = {};\n\n if (width?.includes(\"px\")) {\n cloudinaryProps.width = parseInt(width.replace(\"px\", \"\"));\n if (cloudinaryProps.width < mobileWidth) {\n mobileWidth = cloudinaryProps.width;\n }\n }\n\n if (aspectRatio) {\n cloudinaryProps.ratio = aspectRatio.replace(\n \"/\",\n \":\",\n ) as `${string}:${string}`;\n } else if (intrinsicAspectRatio) {\n cloudinaryProps.ratio = intrinsicAspectRatio.replace(\n \"/\",\n \":\",\n ) as `${string}:${string}`;\n aspectRatio = intrinsicAspectRatio;\n }\n\n if (!aspectRatio && height?.includes(\"px\")) {\n cloudinaryProps.height = parseInt(height.replace(\"px\", \"\"));\n }\n\n if (gravity) {\n cloudinaryProps.gravity = gravity;\n }\n\n if (quality) {\n cloudinaryProps.quality = quality;\n }\n\n const defaultSrc = cloudinary(src, cloudinaryProps);\n const mobileSrc = cloudinary(src, {\n ...cloudinaryProps,\n width: mobileWidth,\n });\n const sizes = `(max-width: 600px) ${mobileWidth}px`;\n const srcSet = `${mobileSrc} ${mobileWidth}w, ${defaultSrc}`;\n\n let position = \"center center\";\n // Convert cloudinary gravity to object-position\n if (cloudinaryProps.gravity === \"west\") position = \"left\";\n if (cloudinaryProps.gravity === \"north\") position = \"top\";\n if (cloudinaryProps.gravity === \"east\") position = \"right\";\n if (cloudinaryProps.gravity === \"south\") position = \"bottom\";\n if (cloudinaryProps.gravity === \"center\") position = \"center\";\n if (cloudinaryProps.gravity === \"auto\") position = \"inherit\";\n\n return (\n <>\n {loading === \"eager\" && (\n \n \n \n )}\n\n \n \n {/* eslint-disable-next-line react/forbid-elements */}\n setLoaded(true)} // IG: this is not firing in Next.js for some reason - need to investigate more\n // If we don't force the aspect ratio using css, storybook will not render the image correctly since images are not hosted on cloudinary\n style={\n aspectRatio\n ? {\n aspectRatio,\n objectFit: \"cover\",\n objectPosition: position,\n }\n : {}\n }\n />\n \n\n {!hide?.caption && caption && (\n
\n {caption}\n
\n )}\n \n \n );\n },\n);\n","// extracted by mini-css-extract-plugin","import \"./wowza.scss\";\nimport { ReactNode, useEffect, useRef } from \"react\";\nimport { loadScript } from \"design-system/hooks/use-script\";\nimport { MediaAssetImageProps } from \"../media-asset/media-asset-image\";\nimport { useDataLayer } from \"frontend/hooks/use-data-layer\";\n\nexport interface WowzaEmbedProps {\n videoPath: string;\n media?: MediaAssetImageProps;\n caption?: ReactNode;\n}\n\nexport function WowzaEmbed({ videoPath, media, caption }: WowzaEmbedProps) {\n const videoRef = useRef(null);\n const { pushDataLayer } = useDataLayer();\n\n useEffect(() => {\n const videoElement = videoRef.current;\n\n if (!videoElement) return;\n\n // push data layer event when video is played\n const handleOnClick = () => {\n pushDataLayer({\n event: \"video\",\n /* eslint-disable camelcase */\n event_data: {\n video_title: \"livestream\",\n video_type: \"livestream\",\n },\n });\n };\n\n videoElement.addEventListener(\"play\", handleOnClick);\n\n return () => {\n videoElement.removeEventListener(\"play\", handleOnClick);\n };\n }, [pushDataLayer]);\n\n // load video.js script\n useEffect(() => {\n if (videoPath) {\n loadScript(\"https://vjs.zencdn.net/7.11.4/video.min.js\", {\n defer: true,\n });\n } else {\n console.warn(\"video.js script not loaded\");\n }\n }, [videoPath]);\n\n // load video.js css\n useEffect(() => {\n const link = document.head.appendChild(\n Object.assign(document.createElement(\"link\"), {\n rel: \"stylesheet\",\n href: \"https://vjs.zencdn.net/7.11.4/video-js.css\",\n }),\n );\n\n // add wowza class to stats topper\n const element = document.querySelector(\".hbs-topper.hbs-statistics-topper\");\n if (element) {\n element.classList.add(\"hbs-wowza-embed-topper\");\n }\n\n return () => {\n // cleanup: remove dynamically added link\n document.head.removeChild(link);\n };\n }, []);\n\n return (\n
\n \n \n

\n To view this video please enable JavaScript, and consider upgrading to\n a web browser that supports HTML5 video.\n

\n \n
\n \n
{caption}
\n
\n
\n
\n );\n}\n","// extracted by mini-css-extract-plugin","type DataLayerEventType =\n | \"search_results\"\n | \"search_result_click\"\n | \"no_search_results\"\n | \"video\"\n | \"program_finder_comparison\"\n | \"program_finder_result_click\"\n | \"no_program_finder_results\"\n | \"program_finder_results\"\n | \"page_load\"\n | \"program_page_navigation\"\n | \"bento_box_search_results\"\n | \"info_box_item_click\";\n\nexport interface DataLayerEvent {\n event: DataLayerEventType;\n event_data: DataLayerEventData;\n}\n\nexport interface PageProperties {\n story_id?: string;\n program_acronym?: string;\n pub_date?: string;\n story_type?: string;\n parent_topic?: string;\n child_topic?: string;\n related_topics?: string;\n related_faculty?: string;\n authors?: string;\n related_industry?: string;\n related_geo?: string;\n}\n\nexport interface DataLayerEventData

{\n profile_code?: string;\n program_page?: P;\n article_blog?: P;\n participant_story?: P;\n video_title?: string | number;\n video_duration?: number;\n video_milestone?: number;\n video_type?: string;\n program_name?: string;\n program_action?: string;\n compared_programs?: string;\n facet_filter_category?: string;\n facet_filter_value?: string;\n facet_filter_full?: string;\n facet_filter_depth?: number;\n search_term?: string;\n search_results_count?: number;\n search_type?: string;\n search_type_ahead?: boolean;\n search_numresults?: number;\n search_result_title?: string;\n search_result_page_url?: string;\n search_result_url?: string;\n search_result_position?: number;\n search_result_page?: number;\n search_result_tab?: string;\n search_result_category?: string;\n top_search?: boolean;\n top_search_title?: string;\n top_search_url?: string;\n top_search_position?: number;\n in_page_navigation_item?: string;\n bento_box_category?: string;\n bento_box_numresults?: string;\n bento_box_category_clicked?: string;\n explore_search?: boolean;\n explore_search_category?: string;\n explore_search_info_box?: string;\n explore_search_info_box_clicked?: string;\n infobox_name?: string;\n infobox_category?: string;\n infobox_item_type?: string;\n infobox_item_url?: string;\n infobox_item_link_text?: string;\n}\n\nexport type PushDataLayerFn = (data: DataLayerEvent) => void;\n\nexport function useDataLayer() {\n return {\n pushDataLayer: (data: DataLayerEvent) => {\n window?.dataLayer?.push(data);\n },\n };\n}\n","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","import \"./embed.scss\";\n\nimport cn from \"clsx\";\nimport { Alignment } from \"design-system/types/types\";\n\nexport interface EmbedProps {\n className?: string;\n align?: Alignment;\n type?: string;\n src: string;\n aspectRatio?: boolean;\n width?: number;\n height?: number;\n title?: string;\n}\n\n/**\n * For video & audio embeds\n *\n * ## See it in use on...\n * - The [kitchen sink detail page](/story/example-pages-detail-pages-kitchen-sink--story)\n *\n * - **`id: P-011-000-00`**\n */\nexport function Embed({\n align = \"center\",\n type,\n src,\n aspectRatio = true,\n width,\n height,\n title,\n className,\n}: EmbedProps) {\n let ratio = aspectRatio ? false : 56.25; // Default to 16:9\n\n if (width && height && aspectRatio) {\n ratio = (height / width) * 100;\n }\n\n return (\n \n \n \n \n \n );\n}\n","export const KEYCODES = {\n GRID: \"0\",\n ESCAPE: 27,\n LEFT_ARROW: 37,\n RIGHT_ARROW: 39,\n ENTER: 13,\n SPACE: 32,\n} as const;\n\nexport const BREAKPOINTS = {\n MOBILE: 300,\n TABLET: 600,\n DESKTOP: 1024,\n DESKTOP_LG: 1200,\n DESKTOP_XL: 1340,\n} as const;\n\nexport const KALTURA_PARTNER_ID = 1423662;\nexport const KALTURA_UI_CONF_ID = 24701771;\nexport const KALTURA_SCRIPT_SRC = `https://cdnapisec.kaltura.com/p/${KALTURA_PARTNER_ID}/sp/${KALTURA_PARTNER_ID}00/embedIframeJs/uiconf_id/${KALTURA_UI_CONF_ID}/partner_id/${KALTURA_PARTNER_ID}`;\n","import { useEffect } from \"react\";\n\ninterface UseScriptOpts {\n type?: string;\n allowDuplicates?: boolean;\n onload?: () => void;\n dataTarget?: string;\n defer?: boolean;\n dataQpTargetId?: string;\n}\n\nexport function loadScript(\n src?: string | null | false | undefined,\n opts?: UseScriptOpts,\n) {\n if (!src) return;\n\n const { type, onload, allowDuplicates, dataTarget, defer, dataQpTargetId } =\n opts || {};\n\n const element = document.querySelector(`script[src='${src}']`);\n\n if (!element || allowDuplicates) {\n const script = document.createElement(\"script\");\n\n script.src = src;\n if (type) script.type = type;\n if (onload) script.onload = onload;\n\n // Data Wrapper Embed\n if (dataTarget) script.dataset.target = dataTarget;\n\n // Form Assembly Embed\n if (dataQpTargetId) {\n script.setAttribute(\"data-qp-target-id\", dataQpTargetId);\n }\n\n if (defer) script.defer = defer;\n\n document.head.appendChild(script);\n\n return script;\n } else {\n if (onload) onload();\n }\n}\n\nexport function useScript(\n src: string | null | false | undefined,\n opts?: UseScriptOpts,\n) {\n useEffect(() => {\n const script = loadScript(src, opts);\n return () => {\n if (script) script.remove();\n };\n }, [src, opts]);\n}\n","// https://cloudinary.com/documentation/transformation_reference\n\nexport interface CloudinaryProps {\n crop?: \"fill\" | \"fit\" | \"crop\" | \"auto\";\n width?: number;\n height?: number;\n zoom?: number;\n opacity?: number;\n ratio?: `${string}:${string}`;\n gravity?:\n | \"face\"\n | \"faces\"\n | \"north_west\"\n | \"north\"\n | \"north_east\"\n | \"east\"\n | \"center\"\n | \"west\"\n | \"south_west\"\n | \"south\"\n | \"south_east\"\n | \"auto\"\n // User friendly names\n | \"Left\"\n | \"Top\"\n | \"Right\"\n | \"Bottom\"\n | \"Center\"\n | \"Auto\";\n\n quality?:\n | \"q_auto\"\n | \"q_auto:best\"\n | \"q_auto:good\"\n | \"q_auto:eco\"\n | \"q_auto:low\"\n | number;\n format?: \"auto\" | \"svg\" | \"gif\" | \"webp\" | \"jpg\" | \"ico\" | \"pdf\" | \"png\";\n rotate?: number | \"auto_right\" | \"auto_left\" | \"vflip\" | \"hflip\" | \"ignore\";\n}\n\nexport function cloudinary(url?: string, props: CloudinaryProps = {}): string {\n if (!url) return \"\";\n // contentful sends protocol-relative image src\n if (url.startsWith(\"//\")) url = \"https:\" + url;\n // does not work on local images\n if (!url.startsWith(\"http\")) return url;\n // disable for storybook\n if (\n url.includes(\".chromatic.\") ||\n url.includes(\"hbs-design-system.netlify.app\") ||\n url.includes(\"designsystem.hbs.edu\")\n ) {\n return url;\n }\n\n const src = encodeURIComponent(url);\n\n const format = \"f_\" + (props.format || \"webp\");\n\n let crop = \"c_fill\";\n if (props.crop) crop = `c_${props.crop}`;\n\n let quality = \"q_auto\";\n if (props.quality) {\n const testQ = Number(props.quality);\n isNaN(testQ)\n ? (quality = props.quality.toString())\n : (quality = `q_${testQ}`);\n }\n\n const transforms: Array = [quality];\n\n if (props.width || props.height || props.ratio) transforms.push(crop);\n\n // Convert user friendly names to cloudinary names\n if (props.gravity === \"Left\") props.gravity = \"west\";\n if (props.gravity === \"Top\") props.gravity = \"north\";\n if (props.gravity === \"Right\") props.gravity = \"east\";\n if (props.gravity === \"Bottom\") props.gravity = \"south\";\n if (props.gravity === \"Center\") props.gravity = \"center\";\n if (props.gravity === \"Auto\") props.gravity = \"auto\";\n\n if (props.width) transforms.push(`w_${props.width}`);\n if (props.height) transforms.push(`h_${props.height}`);\n if (props.rotate) transforms.push(`a_${props.rotate}`);\n if (props.ratio) transforms.push(`ar_${props.ratio}`);\n if (props.gravity) transforms.push(`g_${props.gravity}`);\n if (props.opacity) transforms.push(`o_${props.opacity}`);\n if (props.zoom) transforms.push(`z_${props.zoom}`);\n\n return `https://cloudinary.hbs.edu/hbsit/image/fetch/${transforms.join(\n \",\",\n )}/${format}/${src}`;\n}\n","import { useEffect, useState } from \"react\";\n\n/**\n * Access user's reduced motion preference.\n *\n * @return {boolean} - User's motion preference\n */\nexport function usePrefersReducedMotion(): boolean {\n const [matches, setMatches] = useState(false);\n\n useEffect(() => {\n const motionQuery = window.matchMedia(\"(prefers-reduced-motion)\");\n\n const motionQueryOnChange = (e: MediaQueryListEvent) =>\n setMatches(e.matches);\n\n motionQuery.addEventListener(\"change\", motionQueryOnChange);\n\n // set initial value\n setMatches(motionQuery.matches);\n\n return () => motionQuery.removeEventListener(\"change\", motionQueryOnChange);\n }, []);\n\n return matches;\n}\n","/* eslint-disable react/no-unescaped-entities */\nimport {\n useState,\n useEffect,\n useRef,\n useId,\n MouseEvent,\n ReactNode,\n} from \"react\";\nimport { usePrefersReducedMotion } from \"design-system/hooks/use-prefers-reduced-motion\";\nimport cn from \"clsx\";\n\nimport { IconPause } from \"design-system/components/icons/icon-pause\";\nimport { IconPlay } from \"design-system/components/icons/icon-play\";\nimport { EditAttributes } from \"design-system/types/types\";\nimport { MediaAssetImage } from \"./media-asset-image\";\n\nexport interface MediaAssetVideoProps {\n align?: string;\n caption?: ReactNode;\n description?: string;\n backupImage?: string;\n className?: string;\n inline?: boolean;\n src: string;\n mimeType: string;\n width?: string;\n aspectRatio?: `${string}/${string}`;\n hide?: {\n caption?: boolean;\n focusables?: boolean;\n };\n\n editAttributes?: {\n src?: EditAttributes;\n };\n}\n\nexport function MediaAssetVideo({\n align,\n description,\n backupImage,\n caption,\n className,\n hide,\n inline = true,\n src,\n mimeType,\n width = \"100%\",\n aspectRatio,\n editAttributes,\n}: MediaAssetVideoProps) {\n const [loaded, setLoaded] = useState(false);\n const [isPlaying, setIsPlaying] = useState(inline);\n const figureRef = useRef(null);\n const spanRef = useRef(null);\n const videoRef = useRef(null);\n const imageBackupRef = useRef(null);\n const staticImageRef = useRef(null);\n const prefersReducedMotion = usePrefersReducedMotion();\n const id = useId();\n\n const figureClass = cn(\n `hbs-media-asset hbs-media-asset--video`,\n align && `hbs-global-${align}`,\n loaded && \"hbs-media-asset--loaded\",\n backupImage && \"hidden with-backup-image\",\n className,\n );\n\n const isInline = inline && {\n autoPlay: true,\n controls: false,\n loop: true,\n muted: true,\n playsInline: true,\n };\n\n useEffect(() => {\n const video = videoRef.current;\n\n if (video) {\n prefersReducedMotion ? video.pause() : void video.play();\n }\n }, [prefersReducedMotion]);\n\n useEffect(() => {\n const figure = figureRef.current;\n\n function removeImage() {\n const figureSpan = spanRef.current;\n const imageBackup = imageBackupRef.current;\n if (!figure?.classList.contains(\"hbs-media-asset--loaded\")) {\n figure?.classList.add(\"hbs-media-asset--loaded\");\n }\n if (!figureSpan?.classList.contains(\"hbs-media-asset__wrapper\")) {\n figureSpan?.classList.add(\"hbs-media-asset__wrapper\");\n }\n figure?.classList.remove(\"hidden\");\n imageBackup?.classList.add(\"hidden\");\n }\n\n if (loaded) {\n if (!figure?.classList.contains(\"hbs-media-asset--loaded\")) {\n setLoaded(true);\n removeImage();\n }\n }\n\n if (figure?.classList.contains(\"hbs-media-asset--loaded\")) {\n removeImage();\n }\n }, [loaded, spanRef, imageBackupRef]);\n\n useEffect(() => {\n const removeStaticImage = () => {\n const figure = figureRef.current;\n\n if (figure?.classList.contains(\"hbs-media-asset--loaded\")) {\n const figureSpan = spanRef.current;\n const imageBackup = imageBackupRef.current;\n if (!figure?.classList.contains(\"hbs-media-asset--loaded\")) {\n figure?.classList.add(\"hbs-media-asset--loaded\");\n }\n if (!figureSpan?.classList.contains(\"hbs-media-asset__wrapper\")) {\n figureSpan?.classList.add(\"hbs-media-asset__wrapper\");\n }\n figure?.classList.remove(\"hidden\");\n imageBackup?.classList.add(\"hidden\");\n }\n };\n\n window.addEventListener(\"canplay\", removeStaticImage);\n return () => window.removeEventListener(\"canplay\", removeStaticImage);\n }, []);\n\n const togglePause = (e: MouseEvent) => {\n e.stopPropagation();\n\n const video = videoRef.current;\n if (!video) {\n return;\n }\n\n video.paused ? void video.play() : video.pause();\n\n setIsPlaying(!video.paused);\n };\n\n return (\n <>\n

\n \n setLoaded(true)}\n onClick={togglePause}\n style={\n aspectRatio\n ? {\n aspectRatio,\n objectFit: \"cover\",\n objectPosition: \"center center\",\n }\n : {}\n }\n aria-label={description ? `Video of ${description}` : \"\"}\n >\n \n

Sorry, your browser doesn't support embedded videos.

\n \n\n \n {isPlaying ? (\n \n ) : (\n \n )}\n \n \n {!hide?.caption && caption && (\n
\n \n

{caption}

\n
\n
\n )}\n
\n\n {backupImage && (\n \n \n \n )}\n \n );\n}\n"],"names":["KalturaEmbed","hide","caption","description","duration","entryId","title","withModal","className","threePlayId","threePlayProjectId","uniqueId","useId","replace","buttonTextRef","useRef","play","setPlay","useState","pushDataLayer","useDataLayer","withModalRef","videoTargetId","threePlayTargetId","hasThreePlay","Boolean","playerActiveRef","useEffect","loadScript","KALTURA_SCRIPT_SRC","onload","current","classList","add","window","kWidget","embed","entry_id","targetId","wid","KALTURA_PARTNER_ID","uiconf_id","KALTURA_UI_CONF_ID","flashvars","autoPlay","readyCallback","setKalturaVideoEvents","videoEvent","kdp","document","getElementById","currentTime","zero","twentyfive","fifty","seventyfive","hundred","videoTitle","evaluate","videoType","kBind","fetchedTitle","querySelector","contentDocument","text","split","time","videoDuration","Number","event","event_data","video_title","video_duration","video_milestone","video_type","p","Math","round","e","console","error","playerId","sendNotification","setTimeout","threePlayScriptSrc","createThreePlayScript","url","URL","searchParams","set","href","allowDuplicates","observer","IntersectionObserver","entries","forEach","entry","isIntersecting","destroy","remove","threshold","element","observe","disconnect","resetPlayer","playerContainer","playBtn","style","display","thumbnail","containerElement","closest","handleReset","addEventListener","removeEventListener","figure","cn","div","data-chromatic","id","position","width","height","button","onClick","aria-label","ariaLabel","img","loading","alt","src","ref","span","aria-hidden","figcaption","MediaAssetKalturaModal","forwardRef","kaltura","aspectRatio","open","setOpen","poster","imgStyle","objectFit","objectPosition","Dialog","onOpenChange","focusables","MediaAsset","image","video","wowzaEmbed","MediaAssetImage","MediaAssetVideo","Embed","WowzaEmbed","align","gravity","intrinsicAspectRatio","mobileWidth","quality","editAttributes","Head","useStoreSelector","store","framework","cloudinaryProps","includes","parseInt","ratio","defaultSrc","cloudinary","mobileSrc","sizes","srcSet","link","rel","as","imageSrcSet","imageSizes","fetchpriority","videoPath","media","videoRef","videoElement","handleOnClick","defer","warn","head","appendChild","Object","assign","createElement","removeChild","controls","preload","data-setup","undefined","source","type","dataLayer","push","data","paddingTop","BREAKPOINTS","MOBILE","TABLET","DESKTOP","DESKTOP_LG","DESKTOP_XL","opts","dataTarget","dataQpTargetId","script","dataset","target","setAttribute","props","startsWith","encodeURIComponent","format","crop","testQ","isNaN","toString","transforms","rotate","opacity","zoom","join","backupImage","inline","mimeType","loaded","setLoaded","isPlaying","setIsPlaying","figureRef","spanRef","imageBackupRef","staticImageRef","prefersReducedMotion","usePrefersReducedMotion","matches","setMatches","motionQuery","matchMedia","motionQueryOnChange","figureClass","isInline","loop","muted","playsInline","pause","removeImage","figureSpan","imageBackup","contains","removeStaticImage","togglePause","stopPropagation","paused","onCanPlay","IconPause","IconPlay"],"sourceRoot":"","ignoreList":[]}