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L,MAAOkK,EAAKlK,KAAK,CACjB6B,KAAMkJ,EAAeb,GACrB9B,UAAW8B,EAAKgB,EAAE,GAAKX,EAAYW,EAAE,GAG3C,GAEIK,EAAY,CACd,IAAI9E,EAAOsE,EAAeQ,IAAe,IAMzC,GAJa,MAAT9E,GAAgBA,EAAKkF,UAAU,CAAC,MAAM,CACxClF,EAAOA,EAAKb,SAAS,CAAC,IAGpBa,IAASnC,EAAKO,MAAM,CAAC4B,IAAI,CAAE,CAE7B,GAAuB,GAAG,CAAtBiE,EAAQxF,MAAM,CAChB,MAAO,aAAE2D,EAAa2B,WAAY,CAAEC,KAAM,EAAE,CAAG,EAGjDD,EAAWoB,OAAO,CAAG,CAAEnG,KAAM8E,EAAYvK,KAAK,EAC9CwK,EAAWC,IAAI,CAAGC,CACpB,MAAO,GAAIgB,GAA6BH,EAAWJ,YAAY,CAAE,CAC/D,IAAMK,EAAkBpJ,EAAI6I,IAAI,CAC9B,GAAUf,EAAKgB,EAAE,GAAKK,EAAWJ,YAAY,EAG3CK,IACFhB,EAAWoB,OAAO,CAAG,CACnBnG,EAFiB,GAEX+F,EAAgBxL,KAAK,CAC3B6B,KAAMkJ,EAAeS,GACvB,CAEJ,MACEhB,CADK,CACMoB,OAAO,CAAG,CACnBnG,KAAM8F,EAAWvL,KAAK,CACtB6B,KAAMkJ,EAAeQ,EACvB,CAEJ,CAYA,OAVAf,EAAWC,IAAI,CAACY,OAAO,CAAC,IAClBnB,EAAK9B,SAAS,EAAIsC,EAAQxF,MAAM,CAAG,GAAG,CACxCgF,EAAKQ,OAAO,CAAGA,CAAAA,EAGbgB,GAA6BxB,EAAKgB,EAAE,GAAKX,EAAYY,YAAY,EAAE,CACrEjB,EAAKQ,OAAO,CAAGe,CAAAA,CAEnB,GAEO,aAAE5C,aAAa2B,CAAW,CACnC","sources":["webpack://_N_E/../design-system/src/components/primitives/head/head.tsx","webpack://_N_E/./src/contentful/components/primitives/head-title-description.ts","webpack://_N_E/./src/contentful/components/primitives/head.contentful.tsx","webpack://_N_E/../design-system/src/hooks/use-breakpoint.ts","webpack://_N_E/../design-system/src/components/primitives/breadcrumbs/breadcrumbs-item.tsx","webpack://_N_E/../design-system/src/components/primitives/breadcrumbs/breadcrumbs.tsx","webpack://_N_E/../design-system/src/components/primitives/breadcrumbs/breadcrumbs-item.scss?dc91","webpack://_N_E/./src/hooks/use-page-navigation.ts","webpack://_N_E/../design-system/src/components/primitives/breadcrumbs/breadcrumbs.scss?0886"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { MediaAssetImageProps } from \"../media-asset/media-asset-image\";\nimport { cloudinary } from \"design-system/utils/cloudinary\";\nimport { useStoreSelector } from \"design-system/store/store\";\nimport { DataLayerEventData } from \"frontend/hooks/use-data-layer\";\n\nexport type ArticleStructuredData = Partial<{\n name: string;\n author: string;\n datePublished: string;\n image: string;\n articleSection: string;\n articleBody: string;\n url: string;\n}>;\n\nexport type EventStructuredData = Partial<{\n name: string;\n startDate: string;\n endDate?: string;\n eventAttendanceMode?: string;\n eventStatus?: string;\n location: Array;\n image?: string;\n description?: string;\n offers?: object;\n performer?: object;\n organizer?: object;\n}>;\n\nexport interface HeadProps {\n gtagId?: string;\n title?: string;\n description?: string;\n canonicalUrl?: string;\n type?: string;\n siteName?: string;\n image?: MediaAssetImageProps;\n twitterCard?: \"summary\" | \"summary_large_image\" | \"app\" | \"player\";\n twitterCreator?: string;\n twitterSite?: string;\n metaOverride?: Record;\n children?: ReactNode;\n openGraphDescription?: string;\n noIndex?: boolean;\n noFollow?: boolean;\n convertId?: string;\n pageLoadEventData?: DataLayerEventData;\n articleStructuredData?: ArticleStructuredData;\n eventStructuredData?: EventStructuredData;\n}\n\nexport function Head({\n gtagId,\n title = \"Harvard Business School\",\n description = \"Harvard Business School\",\n siteName = \"Harvard Business School\",\n canonicalUrl,\n type = \"website\",\n image,\n twitterCard = \"summary\",\n twitterCreator = \"@HarvardHBS\",\n twitterSite = \"@HarvardHBS\",\n metaOverride,\n children,\n openGraphDescription,\n noFollow,\n noIndex,\n convertId,\n pageLoadEventData,\n articleStructuredData,\n eventStructuredData,\n}: HeadProps) {\n const Container = useStoreSelector((store) => store.framework.Head);\n const imageSrc = cloudinary(image?.src);\n\n const meta = {\n \"og:title\": title,\n \"og:description\": openGraphDescription ?? description,\n \"og:url\": canonicalUrl,\n \"og:type\": type,\n \"og:site_name\": siteName,\n \"og:image\": imageSrc,\n \"og:image:width\": image?.width,\n \"og:image:height\": image?.height,\n \"og:image:alt\": image?.alt,\n \"twitter:title\": title,\n \"twitter:description\": description,\n \"twitter:card\": twitterCard,\n \"twitter:creator\": twitterCreator,\n \"twitter:site\": twitterSite,\n \"twitter:image\": imageSrc,\n \"twitter:image:alt\": image?.alt,\n ...metaOverride,\n };\n\n return (\n \n \n {noIndex && }\n {noFollow && (\n \n )}\n {title}\n {description ? : null}\n {Object.entries(meta).map(\n ([property, value]) =>\n value && ,\n )}\n {canonicalUrl && }\n {convertId && (\n \n )}\n {/* https://developers.google.com/search/docs/appearance/structured-data/article */}\n {articleStructuredData && (\n \n )}\n {/* https://developers.google.com/search/docs/appearance/structured-data/event */}\n {eventStructuredData && (\n \n )}\n\n {/* https://github.com/harvard-hbs/analytics-contentful-cms-data-layers/blob/2a2c659dd844557f1d42dc7ad162dc06ac49bca9/global/Page%20Load.md */}\n {pageLoadEventData && (\n \n )}\n\n {/* https://developers.google.com/tag-platform/tag-manager/datalayer#installation */}\n {gtagId && (\n \n )}\n {children}\n \n );\n}\n","import { documentToString } from \"frontend/contentful/lib/document-to-string\";\nimport { isContentType } from \"frontend/contentful/lib/is-content-type\";\nimport {\n CtaBannerEntry,\n RichTextEntry,\n SectionIntroTextEntry,\n} from \"frontend/contentful/schema/blocks\";\nimport {\n ParticipantStoryEntry,\n ProfilePageEntry,\n} from \"frontend/contentful/schema/pages\";\nimport { TimelineEventEntry } from \"frontend/contentful/schema/primitives\";\nimport {\n PersonEntry,\n SchoolLeadershipPersonDetailsEntry,\n} from \"frontend/contentful/schema/semantics\";\nimport {\n ContentfulEntry,\n ContentfulRichText,\n EntryRef,\n} from \"frontend/contentful/schema/sys\";\nimport { useContentful } from \"frontend/hooks/use-contentful\";\nimport { usePageProps } from \"frontend/hooks/use-page-props\";\nimport { stripHtml } from \"../utils/strip-html\";\n\nconst DESCRIPTION_MAX_LENGTH = 160;\n\nfunction documentToDescription(document?: ContentfulRichText) {\n if (\n document &&\n typeof document === \"object\" &&\n Array.isArray(document.content)\n ) {\n return stripHtml(documentToString(document).replace(/\\s\\s+/g, \" \"));\n }\n return \"\";\n}\n\ninterface UseHeadFallbackValuesProps {\n title: string;\n description: string;\n}\n\nexport function useHeadTitleDescription({\n title,\n description,\n}: UseHeadFallbackValuesProps) {\n const { entry: pageEntryRef } = usePageProps();\n const { getEntry, site } = useContentful();\n\n const pageEntry = getEntry(pageEntryRef);\n\n if (!title || !description) {\n // extract a default title from the topper title\n if (pageEntry?.fields) {\n if (\"topper\" in pageEntry.fields) {\n if (\n pageEntry.fields.topper &&\n typeof pageEntry.fields.topper === \"object\"\n ) {\n const topper = getEntry(\n pageEntry.fields.topper as EntryRef,\n );\n\n if (topper) {\n if (!title) {\n if (\n \"title\" in topper.fields &&\n typeof topper.fields.title === \"string\"\n ) {\n title = topper.fields.title;\n }\n }\n\n if (!description) {\n if (\"subtitle\" in topper.fields && topper.fields.subtitle) {\n if (typeof topper.fields.subtitle === \"string\") {\n description = topper.fields.subtitle;\n } else if (typeof topper.fields.subtitle === \"object\") {\n description = documentToDescription(\n topper.fields.subtitle as ContentfulRichText,\n );\n }\n }\n }\n }\n }\n }\n // if no topper title, use page title\n if (!title && pageEntry.fields.title) {\n title = pageEntry.fields.title;\n }\n if (\n !title &&\n isContentType(\"participantStory\", pageEntry)\n ) {\n if (pageEntry.fields.subTitle) title = pageEntry.fields.subTitle;\n }\n // if no topper description, pull out of body content - require a description longer than 30 characters\n if (!description || description.length < 30) {\n // account for profile pages separately\n if (isContentType(\"profilePage\", pageEntry)) {\n if (pageEntry.fields.profile) {\n const entry = getEntry(pageEntry.fields.profile);\n\n if (\n isContentType(\"person\", entry) &&\n entry.fields.bio\n ) {\n description = documentToDescription(entry.fields.bio);\n }\n if (\n isContentType(\n \"schoolLeadershipPersonDetails\",\n entry,\n )\n ) {\n const person = getEntry(entry.fields.person);\n if (person?.fields.bio) {\n description = documentToDescription(person.fields.bio);\n }\n }\n }\n } else {\n let content: Array = [];\n // body is used for article page\n if (\n \"body\" in pageEntry.fields &&\n Array.isArray(pageEntry.fields.body)\n ) {\n content = pageEntry.fields.body as Array;\n }\n // blocks is used for every other page type\n if (\n \"blocks\" in pageEntry.fields &&\n Array.isArray(pageEntry.fields.blocks)\n ) {\n content = pageEntry.fields.blocks as Array;\n }\n\n // break after first find\n for (const block of content) {\n const entry = getEntry(block);\n // set description to first DESCRIPTION_MAX_LENGTH characters of specific blocks\n if (\n isContentType(\"richText\", entry) &&\n entry.fields.text\n ) {\n description = documentToDescription(entry.fields.text);\n break;\n }\n if (\n isContentType(\"ctaBanner\", entry) &&\n entry.fields.subtitle\n ) {\n description = documentToDescription(entry.fields.subtitle);\n break;\n }\n if (\n isContentType(\"sectionIntroText\", entry)\n ) {\n if (entry.fields.intro) {\n description = documentToDescription(entry.fields.intro);\n break;\n } else if (entry.fields.bodyText) {\n description = documentToDescription(entry.fields.bodyText);\n break;\n }\n }\n if (isContentType(\"timelineEvent\", entry)) {\n if (entry.fields.title) {\n description = documentToDescription(entry.fields.title);\n break;\n }\n if (entry.fields.description) {\n description = documentToDescription(entry.fields.description);\n break;\n }\n }\n }\n }\n }\n }\n\n if (site?.fields.title) {\n if (title && site.fields.title !== title) {\n // append the site to the end of the title\n title = title + \" | \" + site.fields.title;\n } else {\n // default to the site name for a page title\n title = site.fields.title + \" | \" + \"Harvard Business School\";\n }\n }\n }\n\n if (!title) title = \"Harvard Business School\";\n if (!description) description = title;\n\n description = description.substring(0, DESCRIPTION_MAX_LENGTH);\n\n return { title, description };\n}\n","import type { SeoEntry } from \"frontend/contentful/schema/semantics\";\nimport { Head, HeadProps } from \"design-system/components/primitives/head/head\";\nimport { createMediaAssetProps } from \"./media-asset.props\";\nimport { useContentful } from \"frontend/hooks/use-contentful\";\nimport { EntryRef } from \"frontend/contentful/schema/sys\";\nimport { usePageProps } from \"frontend/hooks/use-page-props\";\nimport { GOOGLE_TAG_IDS } from \"frontend/lib/constants\";\nimport { useHeadTitleDescription } from \"./head-title-description\";\nimport { DataLayerEventData } from \"frontend/hooks/use-data-layer\";\n\ninterface ContentfulHeadProps extends HeadProps {\n entry?: EntryRef;\n}\n\nexport function ContentfulHead({ entry, ...props }: ContentfulHeadProps) {\n const { request } = usePageProps();\n const { getEntry, site, isEditorMode, isPageLoaded } = useContentful();\n\n entry = getEntry(entry);\n\n const { title, description } = useHeadTitleDescription({\n title: props.title ?? entry?.fields.title ?? \"\",\n description: props.description ?? entry?.fields.description ?? \"\",\n });\n\n const openGraphMedia = getEntry(entry?.fields?.openGraphMedia);\n const mediaProps = createMediaAssetProps(openGraphMedia);\n\n let canonicalUrl = entry?.fields.canonicalUrl;\n if (!canonicalUrl) canonicalUrl = `https://${request.host}${request.path}`;\n\n let gtagId: string | undefined = GOOGLE_TAG_IDS.DEFAULT;\n if (site?.fields.domain === \"exed\") gtagId = GOOGLE_TAG_IDS.EXED;\n if (site?.fields.domain === \"online\") gtagId = GOOGLE_TAG_IDS.ONLINE;\n if (site?.fields.domain === \"my\") {\n gtagId = GOOGLE_TAG_IDS.MY;\n }\n\n const pageLoadEventData: DataLayerEventData = { ...props.pageLoadEventData };\n\n if (site?.fields.slug) {\n pageLoadEventData.profile_code =\n site.fields.slug === \"/\" ? site.fields.domain : site.fields.slug;\n }\n\n if (request.query.gtag) {\n if (request.query.gtag === \"false\") gtagId = undefined;\n else gtagId = request.query.gtag;\n }\n // ?gtag=false should remove gtag script - also disable in editor mode\n if (!isPageLoaded || isEditorMode) gtagId = undefined;\n\n return (\n \n );\n}\n","/**\n * Check for breakpoint.\n *\n * @return - whether breakpoint is mobile, tablet, or desktop\n */\n\nimport { useEffect, useState } from \"react\";\nimport { BREAKPOINTS } from \"design-system/utils/constants\";\n\nconst { TABLET, DESKTOP } = BREAKPOINTS;\n\ninterface UseBreakpointsProps {\n isMobile: boolean;\n isTablet: boolean;\n isDesktop: boolean;\n}\n\nexport function useBreakpoint(\n initialValue: Partial = {},\n): UseBreakpointsProps {\n const [state, setState] = useState({\n isMobile: false,\n isTablet: false,\n isDesktop: false,\n ...initialValue,\n });\n\n useEffect(() => {\n const tablet = window.matchMedia(\n `(min-width: ${TABLET}px) and (max-width: ${DESKTOP - 1}px)`,\n );\n\n const onTabletChange = (e: MediaQueryListEvent) => {\n if (e.matches) {\n // TABLET\n setState({ isMobile: false, isTablet: true, isDesktop: false });\n } else {\n if (window.innerWidth < DESKTOP) {\n // MOBILE\n setState({ isMobile: true, isTablet: false, isDesktop: false });\n } else {\n // DESKTOP\n setState({ isMobile: false, isTablet: false, isDesktop: true });\n }\n }\n };\n\n tablet.addEventListener(\"change\", onTabletChange);\n\n setState({\n isMobile: !tablet.matches && window.innerWidth < DESKTOP,\n isTablet: tablet.matches,\n isDesktop: !tablet.matches && window.innerWidth > TABLET,\n });\n\n return () => {\n tablet.removeEventListener(\"change\", onTabletChange);\n };\n }, []);\n\n return state;\n}\n","import \"./breadcrumbs-item.scss\";\n\nimport { Icon } from \"design-system/components/icons/icon\";\nimport { Link } from \"../link/link\";\n\nexport interface BreadcrumbsItemProps {\n link?: string;\n title?: string;\n isCurrent?: boolean;\n}\n\nexport function BreadcrumbsItem({\n title,\n link,\n isCurrent = false,\n}: BreadcrumbsItemProps) {\n if (!title) return null;\n\n return (\n
  • \n {isCurrent ? (\n \n {title}\n \n ) : (\n \n {title}\n \n )}\n\n \n
  • \n );\n}\n","import \"./breadcrumbs.scss\";\n\nimport { useState } from \"react\";\nimport { BreadcrumbsItem, BreadcrumbsItemProps } from \"./breadcrumbs-item\";\nimport { useBreakpoint } from \"design-system/hooks/use-breakpoint\";\nimport {\n SimpleTheme,\n defaultPageSectionTheme,\n} from \"design-system/utils/theme\";\nimport { Icon } from \"design-system/components/icons/icon\";\n\nexport interface BreadcrumbsProps {\n breadcrumbs: Array;\n theme?: SimpleTheme;\n rootLink?: string;\n siteType?: string;\n}\n\n/**\n * ## See it in use on...\n * - A [detail page](/story/example-pages-detail-pages-advancing-racial-equity-diversity-action--story)\n *\n * - **`id: P-007-000-00`**\n */\nexport function Breadcrumbs({\n breadcrumbs,\n theme = defaultPageSectionTheme,\n rootLink = \"/\",\n siteType,\n}: BreadcrumbsProps) {\n const { isMobile, isTablet, isDesktop } = useBreakpoint({ isMobile: true });\n const [isExpanded, setIsExpanded] = useState(false);\n\n if (!breadcrumbs || breadcrumbs.length < 1) {\n return null;\n }\n\n const homeLabel =\n siteType === \"internal\" ? \"myHBS\" : \"Harvard Business School\";\n const homeLabelMobile = siteType === \"internal\" ? \"myHBS\" : \"HBS\";\n\n const formattedBreadcrumbs: Array = [\n {\n link: rootLink,\n title: isMobile ? homeLabelMobile : homeLabel,\n },\n ...breadcrumbs,\n ];\n\n breadcrumbs.unshift();\n\n const smallScreensSplitIndex = isDesktop\n ? formattedBreadcrumbs.length\n : isTablet\n ? 4\n : 2;\n const isTruncated =\n smallScreensSplitIndex + 1 < formattedBreadcrumbs.length && !isExpanded;\n\n return (\n
    \n \n
    \n );\n}\n","// extracted by mini-css-extract-plugin","import { BreadcrumbsProps } from \"design-system/components/primitives/breadcrumbs/breadcrumbs\";\nimport { SiblingNavigationProps } from \"design-system/components/primitives/sibling-navigation/sibling-navigation\";\nimport { SiblingNavigationItemProps } from \"design-system/components/primitives/sibling-navigation/sibling-navigation-item\";\nimport { usePageProps } from \"frontend/hooks/use-page-props\";\nimport { SiteMapPage } from \"frontend/types\";\nimport { useContentful } from \"./use-contentful\";\nimport { isContentType } from \"frontend/contentful/lib/is-content-type\";\nimport {\n ArchivePageEntry,\n LandingPageEntry,\n} from \"frontend/contentful/schema/pages\";\nimport { PageSectionThemeEntry } from \"frontend/contentful/schema/blocks\";\n\ninterface SiblingNavigationItemPropsWithID extends SiblingNavigationItemProps {\n id: string;\n}\n\ninterface SiblingNavigationPropsWithID extends SiblingNavigationProps {\n menu: Array;\n}\n\nexport function usePageNavigation() {\n const { map, request, currentPage, entry } = usePageProps();\n const { site, getEntry } = useContentful();\n\n const domain = request.domain;\n\n const siteType = site?.fields.domain === \"my\" ? \"internal\" : \"external\";\n\n let rootLink;\n if (siteType === \"internal\") {\n rootLink = \"https://inside.hbs.edu/myhbs.aspx\";\n } else if (domain === \"www\") {\n rootLink = \"/\";\n } else {\n rootLink = \"https://www.hbs.edu\";\n }\n\n const breadcrumbs: BreadcrumbsProps = {\n breadcrumbs: [],\n rootLink: rootLink,\n theme: undefined,\n siteType: siteType,\n };\n const navigation: SiblingNavigationPropsWithID = { menu: [] };\n const submenu: Array = [];\n\n const page = getEntry(entry);\n\n if (isContentType(\"landingPage\", page)) {\n const firstBlockEntry = getEntry(page?.fields.blocks?.[0]);\n if (\n isContentType(\"pageSectionTheme\", firstBlockEntry)\n ) {\n breadcrumbs.theme = firstBlockEntry.fields.theme;\n }\n } else if (isContentType(\"archivePage\", page)) {\n const firstTopContentEntry = getEntry(page?.fields.topContent?.[0]);\n if (\n isContentType(\n \"pageSectionTheme\",\n firstTopContentEntry,\n )\n ) {\n breadcrumbs.theme = firstTopContentEntry.fields.theme;\n }\n }\n\n if (!site || !currentPage) {\n return { breadcrumbs, navigation };\n }\n\n if (currentPage.hidden) return { breadcrumbs, navigation };\n\n const getRelativeUrl = (item: SiteMapPage) =>\n item.url.replace(`${domain}.hbs.edu`, \"\");\n\n const addBreadcrumb = (item: SiteMapPage) => {\n const link = getRelativeUrl(item) || \"/\";\n\n if (!breadcrumbs.breadcrumbs.find((item) => item.link === link)) {\n breadcrumbs.breadcrumbs.unshift({\n title: item.title,\n link,\n isCurrent: item.id === currentPage.id,\n });\n\n if (item.parentPageId) {\n const parent = map.find((parent) => parent.id === item.parentPageId);\n if (parent) addBreadcrumb(parent);\n }\n }\n };\n\n addBreadcrumb(currentPage);\n\n // map is sorted in `use-page-props`\n map.forEach((item) => {\n if (item.hidden) return;\n\n if (item.parentPageId && item.parentPageId === currentPage.id) {\n submenu.push({\n id: item.id,\n title: item.title,\n link: getRelativeUrl(item),\n });\n }\n });\n\n const parentPage = map.find((item) => item.id === currentPage.parentPageId);\n const grandParentPage = parentPage\n ? map.find((item) => item.id === parentPage?.parentPageId)\n : null;\n\n const currentPageWithSiblings: Array = [];\n const isCurrentPageDeepestLevel =\n grandParentPage?.parentPageId && submenu.length === 0;\n\n map.forEach((item) => {\n if (item.hidden) return;\n\n /**\n * If current page is at the deepest level, display all\n * parent/uncles and siblings.\n *\n * @example\n * - Uncle\n * - Uncle\n * - Parent\n * - Current Page\n * - Sibling\n * ...\n */\n if (isCurrentPageDeepestLevel) {\n // For uncles\n if (parentPage && parentPage.parentPageId === item.parentPageId) {\n navigation.menu.push({\n id: item.id,\n title: item.title,\n link: getRelativeUrl(item),\n isCurrent: false,\n });\n\n return;\n }\n\n // For siblings or current page, save as\n // the submenu for current page's parent.\n if (item.parentPageId === currentPage.parentPageId) {\n currentPageWithSiblings.push({\n id: item.id,\n title: item.title,\n link: getRelativeUrl(item),\n isCurrent: item.id === currentPage.id,\n });\n\n return;\n }\n }\n\n /**\n * If current page has children, display all\n * siblings and children.\n *\n * @example\n * - Sibling\n * - Sibling\n * - Current Page\n * - Child\n * - Child\n * ...\n */\n if (\n !isCurrentPageDeepestLevel &&\n item.parentPageId &&\n item.parentPageId === currentPage.parentPageId\n ) {\n navigation.menu.push({\n id: item.id,\n title: item.title,\n link: getRelativeUrl(item),\n isCurrent: item.id === currentPage.id,\n });\n }\n });\n\n if (parentPage) {\n let slug = getRelativeUrl(parentPage) || \"/\";\n\n if (slug !== \"/\" && slug.startsWith(\"/\")) {\n slug = slug.substring(1);\n }\n\n if (slug === site.fields.slug) {\n // if parent is site homepage and current page has no children, do not display sidebar navigation\n if (submenu.length === 0) {\n return { breadcrumbs, navigation: { menu: [] } };\n }\n // if parent is site homepage, set nav title to current page and menu as children\n navigation.heading = { text: currentPage.title };\n navigation.menu = submenu;\n } else if (isCurrentPageDeepestLevel && parentPage.parentPageId) {\n const grandParentPage = map.find(\n (item) => item.id === parentPage.parentPageId,\n );\n\n if (grandParentPage) {\n navigation.heading = {\n text: grandParentPage.title,\n link: getRelativeUrl(grandParentPage),\n };\n }\n } else {\n navigation.heading = {\n text: parentPage.title,\n link: getRelativeUrl(parentPage),\n };\n }\n }\n\n navigation.menu.forEach((item) => {\n if (item.isCurrent && submenu.length > 0) {\n item.submenu = submenu;\n }\n\n if (isCurrentPageDeepestLevel && item.id === currentPage.parentPageId) {\n item.submenu = currentPageWithSiblings;\n }\n });\n\n return { breadcrumbs, navigation };\n}\n","// extracted by mini-css-extract-plugin"],"names":["Head","gtagId","title","description","siteName","canonicalUrl","type","image","twitterCard","twitterCreator","twitterSite","metaOverride","children","openGraphDescription","noFollow","noIndex","convertId","pageLoadEventData","articleStructuredData","eventStructuredData","Container","useStoreSelector","store","framework","imageSrc","cloudinary","src","meta","width","height","alt","link","rel","href","name","content","Object","entries","map","property","value","script","dangerouslySetInnerHTML","__html","JSON","stringify","publisher","url","articleBody","datePublished","articleSection","author","startDate","endDate","eventAttendanceMode","eventStatus","location","offers","organizer","documentToDescription","document","Array","isArray","stripHtml","documentToString","replace","ContentfulHead","entry","props","request","usePageProps","getEntry","site","isEditorMode","isPageLoaded","useContentful","useHeadTitleDescription","pageEntryRef","pageEntry","fields","topper","subtitle","isContentType","subTitle","length","profile","bio","person","block","body","blocks","text","intro","bodyText","substring","DESCRIPTION_MAX_LENGTH","openGraphMedia","mediaProps","createMediaAssetProps","host","path","GOOGLE_TAG_IDS","DEFAULT","domain","EXED","ONLINE","MY","slug","profile_code","query","gtag","undefined","TABLET","DESKTOP","BREAKPOINTS","useBreakpoint","initialValue","state","setState","useState","isMobile","isTablet","isDesktop","useEffect","tablet","window","matchMedia","onTabletChange","e","matches","innerWidth","addEventListener","removeEventListener","BreadcrumbsItem","isCurrent","li","className","span","aria-current","Link","target","Icon","Breadcrumbs","breadcrumbs","theme","defaultPageSectionTheme","rootLink","siteType","isExpanded","setIsExpanded","formattedBreadcrumbs","homeLabelMobile","homeLabel","unshift","smallScreensSplitIndex","isTruncated","div","data-theme","nav","aria-label","ol","button","onClick","slice","item","i","key","usePageNavigation","page","currentPage","navigation","menu","submenu","firstBlockEntry","firstTopContentEntry","topContent","hidden","getRelativeUrl","addBreadcrumb","find","id","parentPageId","parent","forEach","push","parentPage","grandParentPage","currentPageWithSiblings","isCurrentPageDeepestLevel","startsWith","heading"],"sourceRoot":"","ignoreList":[]}