{"version":3,"sources":["components/ads-footer/components/ads-footer-legal-link/ads-footer-legal-link.tsx","components/ads-footer/components/ads-footer-link/ads-footer-link.tsx","components/ads-footer/components/ads-footer-link-header/ads-footer-link-header.tsx","components/ads-footer/components/ads-footer-link-section/ads-footer-link-section.tsx","components/ads-footer/components/ads-footer-social-link/ads-footer-social-link.tsx","components/ads-footer/ads-footer.tsx","components/ads-footer/ads-footer.scss?tag=ads-footer&encapsulation=shadow","components/core/global/pipeline.ts","components/core/utils/pipeline.ts","components/core/utils/components.ts","utils/imageHelper.tsx","utils/breakpointHelper.ts","utils/resizeHelper.ts","components/core/interfaces/Hyperlink.ts","components/core/interfaces/Icon.ts"],"names":["AdsFooterLegalLink","text","title","link","linkObj","anchorAttributes","href","hrefLang","hreflang","rel","target","onClick","class","AdsFooterLink","AdsFooterLinkHeader","headingLevel","Heading","AdsFooterLinkSection","sectionHeader","sectionLinks","length","map","slink","AdsFooterSocialLink","svgIcon","classIcon","icon","svgIconObj","active","iconObj","data","height","width","AdsFooter","this","el","setAttribute","identifier","component","newValue","Pipeline.addComponent","Pipeline.removeComponent","copyrightEl","Array","from","querySelectorAll","copyright","name","slottedLogo","socialLinks","push","footerAttributes","srLabel","sections","section","socialLink","join","legalLinks","legalLink","add","window","pipeline","set","id","tagName","toLowerCase","config","getBoolean","trackEvent","COMPONENT_REGISTER","componentId","environment","version","host","location","err","console","log","sendCustomEvent","addComponent","Pipeline.add","removeComponent","delete","Pipeline.remove","generateId","namespace","generateRandomString","Math","random","toString","substr","getClassFromSize","size","MEDIUM","SMALL","getClassFromLevel","level","PRIMARY","SECONDARY","TERTIARY","getMediaQueryBreakpointClassUp","bp","getMediaQueryBreakpointClassDown","showErrorMessage","message","ADS_CONSOLE_ERROR","warn","generateSVGImage","className","xmlns","viewBox","d","MediaTypes","getBreakpointInPixels","breakpoint","parseInt","breakpoints","mediaQueryLists","addMatchMedia","mediaType","listenerFunction","foundMatchMedia","find","m","media","newMatchMedia","matchMedia","addEventListener","removeMatchMedia","removeEventListener","callbacks","onresize","cb","timeout","callback","setTimeout","duration","subscribeToWindowResize","timeoutDuration","unSubscribeToWindowResize","index","findIndex","clearTimeout","splice","getHyperLinkObject","getIconObject","src","isIcon","inactive","getSVGIconObject","isSVGIcon","toBeDetermined"],"mappings":"wPAIaA,G,OAA2D,SAAC,GAAqB,IAAnBC,EAAmB,EAAnBA,KAAMC,EAAa,EAAbA,MAAOC,EAAM,EAANA,KAChFC,EAAU,YAAmBD,GAC7BE,EAAmB,CACvBC,KAAa,OAAPF,QAAO,IAAPA,OAAO,EAAPA,EAASE,KACfC,UAAiB,OAAPH,QAAO,IAAPA,OAAO,EAAPA,EAASI,WAAY,KAC/BC,KAAY,OAAPL,QAAO,IAAPA,OAAO,EAAPA,EAASK,MAAO,KACrBC,QAAe,OAAPN,QAAO,IAAPA,OAAO,EAAPA,EAASM,SAAU,KAC3BR,MAAOA,GAAS,KAChBS,SAAgB,OAAPP,QAAO,IAAPA,OAAO,EAAPA,EAASO,UAAW,KAC7B,aAAc,OACd,mBAAoBV,GAGtB,OACE,kBAAIW,MAAM,qBACR,iCAAOP,GAAmBJ,MCfnBY,EAAiD,SAAC,GAAqB,IAAnBV,EAAmB,EAAnBA,KAAMF,EAAa,EAAbA,KAAMC,EAAO,EAAPA,MACrEE,EAAU,YAAmBD,GAC7BE,EAAmB,CACvBC,KAAa,OAAPF,QAAO,IAAPA,OAAO,EAAPA,EAASE,KACfC,UAAiB,OAAPH,QAAO,IAAPA,OAAO,EAAPA,EAASI,WAAY,KAC/BC,KAAY,OAAPL,QAAO,IAAPA,OAAO,EAAPA,EAASK,MAAO,KACrBC,QAAe,OAAPN,QAAO,IAAPA,OAAO,EAAPA,EAASM,SAAU,KAC3BR,MAAOA,GAAS,KAChBS,SAAgB,OAAPP,QAAO,IAAPA,OAAO,EAAPA,EAASO,UAAW,KAC7B,aAAc,OACd,mBAAoBV,GAGtB,OACE,kBAAIW,MAAM,eACR,iCAAOP,GAAmBJ,KCfnB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,GAAOP,SAEhCH,EAAUa,OAAOH,EAAO,M,iCCb5B,kC,IAMaI,EAAqB,SAAC7I,GACjC,MAAoB,kBAATA,EACF,CAAEG,KAAMH,GAEVA,I,iHCaI8I,EAAgB,SAACC,GAC5B,GAAKC,EAAOD,GAGZ,MAAmB,kBAARA,EACF,CACLtH,OAAQsH,EACRE,SAAUF,GAIPA,GAQIG,EAAmB,SAACH,GAC/B,GAAKI,EAAUJ,GAGf,OAAK,YAAsC,OAAnBA,QAAG,IAAHA,OAAG,EAAHA,EAAqBpH,MAMtCoH,EALE,CACLtH,OAAQsH,EACRE,SAAUF,IAWHC,EAAS,SAACI,GACrB,OACG,YAAyBA,KACxB,YAAuD,OAA7BA,QAAc,IAAdA,OAAc,EAAdA,EAA+B3H,UAAY,YAAuD,OAA7B2H,QAAc,IAAdA,OAAc,EAAdA,EAA+BH,WAYvHE,EAAY,SAACC,G,QACxB,OACG,YAAwD,OAA9BA,QAAc,IAAdA,OAAc,EAAdA,EAAgCzH,QACzD,YAAkE,QAAxC,EAAgC,OAAhCyH,QAAc,IAAdA,OAAc,EAAdA,EAAkC3H,cAAM,eAAEE,QACnE,YAAoE,QAA1C,EAAgC,OAAhCyH,QAAc,IAAdA,OAAc,EAAdA,EAAkCH,gBAAQ,eAAEtH","file":"static/js/14.d54e60a3.chunk.js","sourcesContent":["import { FooterLegalLink } from '../../ads-footer.types';\nimport { FunctionalComponent, VNode, h } from '@stencil/core';\nimport { getHyperLinkObject } from '../../../core/interfaces/Hyperlink';\n\nexport const AdsFooterLegalLink: FunctionalComponent<FooterLegalLink> = ({ text, title, link }) => {\n const linkObj = getHyperLinkObject(link);\n const anchorAttributes = {\n href: linkObj?.href,\n hrefLang: linkObj?.hreflang || null,\n rel: linkObj?.rel || null,\n target: linkObj?.target || null,\n title: title || null,\n onClick: linkObj?.onClick || null,\n 'data-track': 'true',\n 'data-track-value': text,\n };\n\n return (\n <li class=\"footer-legal-link\">\n <a {...anchorAttributes}>{text}</a>\n </li>\n ) as VNode;\n};\n","import { FooterLink } from '../../ads-footer.types';\nimport { FunctionalComponent, VNode, h } from '@stencil/core';\nimport { getHyperLinkObject } from '../../../core/interfaces/Hyperlink';\n\nexport const AdsFooterLink: FunctionalComponent<FooterLink> = ({ link, text, title }) => {\n const linkObj = getHyperLinkObject(link);\n const anchorAttributes = {\n href: linkObj?.href,\n hrefLang: linkObj?.hreflang || null,\n rel: linkObj?.rel || null,\n target: linkObj?.target || null,\n title: title || null,\n onClick: linkObj?.onClick || null,\n 'data-track': 'true',\n 'data-track-value': text,\n };\n\n return (\n <li class=\"footer-link\">\n <a {...anchorAttributes}>{text}</a>\n </li>\n ) as VNode;\n};\n","import { FooterLinkHeader } from '../../ads-footer.types';\nimport { FunctionalComponent, VNode, h } from '@stencil/core';\nimport { getHyperLinkObject } from '../../../core/interfaces/Hyperlink';\n\nexport const AdsFooterLinkHeader: FunctionalComponent<FooterLinkHeader> = ({ link, text, title, headingLevel }) => {\n const Heading = `h${headingLevel || 2}`;\n const linkObj = getHyperLinkObject(link);\n\n const anchorAttributes = {\n href: linkObj?.href,\n hrefLang: linkObj?.hreflang || null,\n rel: linkObj?.rel || null,\n target: linkObj?.target || null,\n title: title || null,\n onClick: linkObj?.onClick || null,\n 'data-track': 'true',\n 'data-track-value': text,\n };\n\n return (\n <div class=\"footer-link-header\">\n <Heading>\n <a {...anchorAttributes}>{text}</a>\n </Heading>\n </div>\n ) as VNode;\n};\n","import { AdsFooterLink } from '../ads-footer-link/ads-footer-link';\nimport { AdsFooterLinkHeader } from '../ads-footer-link-header/ads-footer-link-header';\nimport { FooterSection } from '../../ads-footer.types';\nimport { FunctionalComponent, VNode, h } from '@stencil/core';\n\nexport const AdsFooterLinkSection: FunctionalComponent<FooterSection> = ({ sectionHeader, sectionLinks }) => {\n return sectionHeader || sectionLinks?.length > 0\n ? ((\n <div class=\"footer-link-section\">\n <AdsFooterLinkHeader\n link={sectionHeader.link}\n text={sectionHeader.text}\n title={sectionHeader.title}\n headingLevel={sectionHeader.headingLevel}\n />\n <ul class=\"c-footer__link-list\">\n {sectionLinks?.map((slink) => (<AdsFooterLink link={slink.link} text={slink.text} title={slink.title} />) as VNode)}\n </ul>\n </div>\n ) as VNode)\n : null;\n};\n","import { FooterSocialLink } from '../../ads-footer.types';\nimport { FunctionalComponent, VNode, h } from '@stencil/core';\nimport { Icon, SVGIcon, SVGIconData, getIconObject, getSVGIconObject } from '../../../core/interfaces/Icon';\nimport { generateSVGImage, isNullOrUndefined } from 'utils/index';\nimport { getHyperLinkObject } from '../../../core/interfaces/Hyperlink';\n\nexport const AdsFooterSocialLink: FunctionalComponent<FooterSocialLink> = ({ icon, title, link }) => {\n const linkObj = getHyperLinkObject(link);\n const anchorAttributes = {\n href: linkObj?.href,\n hrefLang: linkObj?.hreflang || null,\n rel: linkObj?.rel || null,\n target: linkObj?.target || null,\n title: title || null,\n onClick: linkObj?.onClick || null,\n 'data-track': 'true',\n 'data-track-value': title || null,\n };\n\n let svgIcon: SVGIconData = undefined;\n let classIcon: string = undefined;\n const svgIconObj = getSVGIconObject(icon as SVGIcon);\n svgIcon = svgIconObj?.active;\n const iconObj = getIconObject(icon as Icon);\n classIcon = iconObj?.active;\n\n return (\n <li class=\"footer-social-link\">\n <a {...anchorAttributes}>\n {(classIcon || svgIcon) && (\n <span class={classIcon && classIcon}>\n {!isNullOrUndefined(svgIcon) && generateSVGImage({ data: svgIcon.data, height: svgIcon.height, width: svgIcon.width })}\n </span>\n )}\n </a>\n </li>\n ) as VNode;\n};\n","import { Component, Element, Prop, VNode, Watch, h } from '@stencil/core';\n\nimport * as Pipeline from '../core/utils/pipeline';\nimport { AdsFooterLegalLink } from './components/ads-footer-legal-link/ads-footer-legal-link';\nimport { AdsFooterLinkSection } from './components/ads-footer-link-section/ads-footer-link-section';\nimport { AdsFooterSocialLink } from './components/ads-footer-social-link/ads-footer-social-link';\nimport { BaseComponent } from '../core/interfaces/BaseComponent';\nimport { Footer, FooterLegalLink, FooterSection, FooterSocialLink } from './ads-footer.types';\nimport { Theme } from '../core/types/globalTypes';\nimport { generateId } from '../core/utils/components';\n\n/**\n * The Footer component is a content container at the bottom of a page that displays links to social media and to content across the Arm digital estate.\n * By having the footer on each page, the user has a consistent set of navigation actions.\n * @tag `<ads-footer>`\n * @slot copyright-section - The copyright string\n * @slot logo - The logo area\n * @example\n * <ads-footer id=\"example\">\n * <div slot=\"copyright-section\">\n * Copyright © 2021 Arm Limited (or its affiliates). All rights reserved.\n * </div>\n * </ads-footer>\n */\n@Component({\n tag: 'ads-footer',\n styleUrl: 'ads-footer.scss',\n shadow: true,\n})\nexport class AdsFooter implements BaseComponent {\n /**\n * @hidden\n */\n public component: string;\n\n constructor() {\n this.el.setAttribute('id', this.identifier || generateId('ads-footer'));\n this.component = 'ads-footer';\n }\n\n @Element() private el: HTMLAdsFooterElement;\n\n /**\n * The unique identifier (optional)\n */\n @Prop({ attribute: 'id' }) identifier?: string;\n\n /**\n * Text to display as the aria-label of the component (optional)\n */\n @Prop({ reflect: true }) srLabel?: string;\n\n /**\n * The theme for this component instance (optional)\n * Values: \"default\", \"dark\"\n */\n @Prop({ reflect: true }) theme?: Theme;\n\n /**\n * The footer data\n */\n @Prop() data: Footer;\n\n /**\n * Handle identifier property changes\n * @param {string} newValue The new value for \"identifier\"\n * @hidden\n */\n @Watch('identifier')\n handleIdentifierChange(newValue: string): void {\n this.el.setAttribute('id', newValue || generateId('ads-footer'));\n }\n\n protected componentDidLoad(): void {\n Pipeline.addComponent(this.el);\n }\n\n protected disconnectedCallback(): void {\n Pipeline.removeComponent(this.el);\n }\n\n protected render(): VNode {\n const copyrightEl = Array.from(this.el.querySelectorAll('[slot=\"copyright-section\"]'));\n const copyright =\n copyrightEl?.length > 0\n ? ((\n <div class=\"c-footer__row\">\n <div class=\"c-footer__column\">\n <slot name=\"copyright-section\"></slot>\n </div>\n </div>\n ) as HTMLElement)\n : null;\n\n const slottedLogo = ['c-footer__slotted'];\n this.data?.socialLinks?.length > 0 ? slottedLogo.push('c-footer__column-6') : slottedLogo.push('c-footer__column');\n\n const footerAttributes = {\n 'aria-label': this.srLabel,\n };\n\n return (\n <footer class=\"c-footer\" {...footerAttributes}>\n <div class=\"c-footer__container\">\n <div class=\"c-footer__row\">\n {this.data?.sections?.map(\n (section: FooterSection) =>\n (<AdsFooterLinkSection sectionHeader={section.sectionHeader} sectionLinks={section.sectionLinks} />) as VNode\n )}\n </div>\n </div>\n <div class=\"c-footer__container\">\n <div class=\"c-footer__row\">\n <div class=\"c-footer__column\">\n <hr />\n </div>\n </div>\n <div class=\"c-footer__row\">\n {this.data?.socialLinks?.length > 0 ? (\n <div class=\"c-footer__column-6\">\n <ul class=\"c-footer__social-link-list\">\n {this.data?.socialLinks?.map(\n (socialLink: FooterSocialLink) =>\n (<AdsFooterSocialLink icon={socialLink.icon} title={socialLink.title} link={socialLink.link} />) as VNode\n )}\n </ul>\n </div>\n ) : null}\n <div class={slottedLogo.join(' ')}>\n <slot name=\"logo\" />\n </div>\n </div>\n {this.data?.legalLinks?.length > 0 ? (\n <div class=\"c-footer__row\">\n <div class=\"c-footer__column\">\n <ul class=\"c-footer__legal-link-list\">\n {this.data?.legalLinks?.map(\n (legalLink: FooterLegalLink) =>\n (<AdsFooterLegalLink title={legalLink.title} link={legalLink.link} text={legalLink.text} />) as VNode\n )}\n </ul>\n </div>\n </div>\n ) : null}\n {copyright}\n </div>\n </footer>\n ) as VNode;\n }\n}\n","@import 'core';\n\n@import '@fortawesome/fontawesome-pro/scss/fontawesome.scss';\n@import '@fortawesome/fontawesome-pro/scss/brands.scss';\n@import '@fortawesome/fontawesome-pro/scss/light.scss';\n@import '@fortawesome/fontawesome-pro/scss/regular.scss';\n@import '@fortawesome/fontawesome-pro/scss/solid.scss';\n\n@import './components/ads-footer-link/ads-footer-link.scss';\n@import './components/ads-footer-link-header/ads-footer-link-header.scss';\n@import './components/ads-footer-link-section/ads-footer-link-section.scss';\n@import './components/ads-footer-social-link/ads-footer-social-link.scss';\n@import './components/ads-footer-legal-link/ads-footer-legal-link.scss';\n\n/**\n * @prop --ads-footer-background-color: Background color\n * @prop --ads-footer-color: Text color\n * @prop --ads-footer-hr-border-color: Border color\n * @prop --ads-footer-legal-link-color: Legal link text color\n * @prop --ads-footer-legal-link-color-hover: Legal link text color when hovered\n * @prop --ads-footer-legal-link-color-visited: Legal link text color when visited\n * @prop --ads-footer-link-color: Link text color\n * @prop --ads-footer-link-color-hover: Link text color when hovered\n * @prop --ads-footer-link-color-visited: Link text color when visited\n * @prop --ads-footer-link-header-color: Header text color\n * @prop --ads-footer-link-header-color-hover: Header text color when hovered\n * @prop --ads-footer-link-header-color-visited: Header text color when visited\n * @prop --ads-footer-link-social-color: Social link text color\n * @prop --ads-footer-link-social-color-hover: Social link text color when hovered\n * @prop --ads-footer-link-social-color-visited: Social link text color when visited\n */\n\n* {\n margin: 0;\n padding: 0;\n text-indent: 0;\n}\n\n:host {\n background-color: var(--ads-footer-background-color, $ads-footer-background-color);\n display: block;\n position: relative;\n width: 100%;\n}\n\n:host([theme='default']) {\n @include ads-vars-component-footer-default;\n}\n\n:host([theme='dark']) {\n @include ads-vars-component-footer-dark;\n}\n\n::slotted(*) {\n width: 100%;\n}\n\n.c-footer {\n color: var(--ads-footer-color, $ads-footer-color);\n font-size: 14px;\n font-family: var(--ads-font-family);\n line-height: 21px;\n padding-bottom: 32px;\n padding-top: 32px;\n\n ul {\n list-style: none;\n margin-bottom: 16px !important;\n }\n\n hr {\n border-color: var(--ads-footer-hr-border-color, $ads-footer-hr-border-color);\n margin-top: 16px;\n }\n\n &__slotted {\n display: flex;\n margin: 16px 0;\n }\n\n &__container {\n @include ads-container(true);\n @include ads-container-breakpoint-map(true);\n\n @include media-query(md-down) {\n @include ads-container-full-width(true);\n }\n }\n\n &__row {\n @include ads-grid-row(true);\n }\n\n &__column {\n @include ads-grid-column(true);\n @include ads-grid-responsive-column(true, 12, 12);\n\n &-6 {\n @include ads-grid-column(true);\n @include ads-grid-responsive-column(true, 12, 12);\n\n @include media-query(md-up) {\n @include ads-grid-responsive-column(true, 6, 12);\n }\n }\n }\n\n &__social-link-list {\n display: grid;\n grid-auto-columns: max-content;\n grid-auto-flow: column;\n gap: 27px;\n }\n\n &__legal-link-list {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0.5rem;\n }\n}\n","import { EventTypes, environment, version } from './AppInsights/constants';\nimport { WindowGlobal } from '../types/globalTypes';\n\n/**\n * Send custom event to AppInsights\n * @param {string} component The reference to the component\n * @returns {void}\n * @hidden\n */\nconst sendCustomEvent = (component: HTMLElement): void => {\n try {\n (window as WindowGlobal)['AppInsights'].trackEvent(\n {\n name: EventTypes.COMPONENT_REGISTER,\n },\n {\n component: component.tagName.toLowerCase(),\n componentId: component.id,\n environment,\n version,\n host: window.location.host,\n }\n );\n } catch (err) {\n // eslint-disable-next-line no-console\n console.log('[APP INSIGHTS] Could not send event', err);\n }\n};\n\n/**\n * Add the component to the pipeline and send component events to AppInsights\n * @param {HTMLElement} component The component element\n * @returns {void}\n * @hidden\n */\nexport function add(component: HTMLElement): void {\n (window as WindowGlobal)['ArmDesignSystem'].pipeline.set(component.id, component.tagName.toLowerCase());\n\n // Disable sending events to AppInsights during unit tests\n if (!(window as WindowGlobal)['ArmDesignSystem'].config.getBoolean('_isTesting')) {\n sendCustomEvent(component);\n }\n}\n\n/**\n * Remove the component from the pipeline\n * @param {HTMLElement} component The component element\n * @returns {void}\n * @hidden\n */\nexport function remove(component: HTMLElement): void {\n (window as WindowGlobal)['ArmDesignSystem'].pipeline.delete(component.id);\n}\n","import * as Pipeline from '../global/pipeline';\n\n/**\n * Add a component to the ADS pipeline\n * @param {HTMLElement} component The component element\n * @return {void}\n */\nexport const addComponent = (component: HTMLElement): void => {\n Pipeline.add(component);\n};\n\n/**\n * Remove a component from the ADS pipeline\n * @param {HTMLElement} component The component element\n * @return {void}\n */\nexport const removeComponent = (component: HTMLElement): void => {\n Pipeline.remove(component);\n};\n","import { Breakpoint, ButtonLevel, ButtonLevels, ButtonSize, ButtonSizes, WindowGlobal } from '../types/globalTypes';\nimport { EventTypes, environment, version } from '../global/AppInsights/constants';\n\nexport type ShadowRootLegacy = ShadowRoot & { tagName: string };\n\n/**\n * Generates a unique component ID\n * @param {string} namespace The unique id's namespace (e.g. ads)\n * @returns {string} A generated random id (e.g. ads-1234)\n */\nexport const generateId = (namespace = 'ads'): string => {\n return `${namespace}-${generateRandomString()}`;\n};\n\n/**\n * Generates a randon string\n * @returns {string} A generated random string\n */\nexport const generateRandomString = (): string => {\n return Math.random().toString(36).substr(2, 16);\n};\n\n/**\n * Generates a size class based on a button size\n * @param {ButtonSize} size The size of the button (e.g. ButtonSizes.SMALL)\n * @returns {string} The button size class (e.g. 'is-small')\n */\nexport const getClassFromSize = (size: ButtonSize): string => {\n switch (size) {\n case ButtonSizes.MEDIUM:\n return 'is-medium';\n case ButtonSizes.SMALL:\n return 'is-small';\n default:\n return '';\n }\n};\n\n/**\n * Generates a level class based on button a level\n * @param {ButtonLevel} level The level of the button (e.g. ButtonLevels.PRIMARY)\n * @returns {string} The button level class (e.g. 'is-primary')\n */\nexport const getClassFromLevel = (level: ButtonLevel): string => {\n switch (level) {\n case ButtonLevels.PRIMARY:\n return 'is-primary';\n case ButtonLevels.SECONDARY:\n return 'is-secondary';\n case ButtonLevels.TERTIARY:\n return 'is-tertiary';\n default:\n return '';\n }\n};\n\n/**\n * Given a breakpoint it will return the appropriate class for the media-queries (breakpoints-up).\n * @param {Breakpoint} bp The breakpoint.\n * @returns {string} The class.\n */\nexport const getMediaQueryBreakpointClassUp = (bp: Breakpoint): string => `${bp.toString()}-up`;\n\n/**\n * Given a breakpoint it will return the appropriate class for the media-queries (breakpoints-down).\n * @param {Breakpoint} bp The breakpoint.\n * @returns {string} The class.\n */\nexport const getMediaQueryBreakpointClassDown = (bp: Breakpoint): string => `${bp.toString()}-down`;\n\n/**\n * Display an ADS warning with the given message\n * @param {string} message The error message to show\n * @param {string} component The reference to the component\n * @returns {void}\n */\nexport const showErrorMessage = (message: string, component: HTMLElement): void => {\n try {\n (window as WindowGlobal)['AppInsights'].trackEvent(\n {\n name: EventTypes.ADS_CONSOLE_ERROR as string,\n },\n {\n component: component.tagName.toLowerCase(),\n componentId: component.id,\n message: message,\n environment,\n version,\n host: window.location.host,\n }\n );\n } catch (err) {\n // eslint-disable-next-line no-console\n console.log('[APP INSIGHTS] Could not send console error', err);\n }\n // eslint-disable-next-line no-console\n console.warn(`ADS-Warning: ${message}`);\n};\n","import { SVGIconData } from '../components/core/interfaces/Icon';\nimport { h } from '@stencil/core';\n\n/**\n * Generates an SVG image\n * @param {IconData} icon The SVG image properties\n * @param {string} className The SVG image class name\n * @returns {HTMLElement} The generated SVG image\n */\nexport const generateSVGImage = (icon: SVGIconData, className?: string): HTMLElement => {\n return (\n <svg class={className ? className : null} xmlns=\"http://www.w3.org/2000/svg\" viewBox={`0 0 ${icon.width} ${icon.height}`}>\n <path d={icon.data} />\n </svg>\n ) as HTMLElement;\n};\n","import { Breakpoint } from '../components/core/types/globalTypes';\nimport { isNullOrUndefined } from './collection';\nimport config from './../styles/settings/configs/breakpoints-config.json';\n\n/**\n * Match media types\n */\nexport enum MediaTypes {\n minWidth = 'min-width',\n maxWidth = 'max-width',\n}\n\n/**\n * Returns the list all of breakpoint keys\n * @returns {Breakpoint[]} The list of breakpoints\n */\nexport const getBreakpoints = (): Breakpoint[] => Object.keys(config.breakpoints) as Breakpoint[];\n\n/**\n * Returns the breakpoint in pixels\n * @param {Breakpoint} breakpoint The breakpoint\n * @returns {number} The breakpoint value in pixels\n */\nexport const getBreakpointInPixels = (breakpoint: Breakpoint): number => parseInt(config.breakpoints[breakpoint], 10);\n\n/**\n * Returns the breakpoint key for given pixels\n * @param {number} pixels The pixels of the breakpoint\n * @returns {Breakpoint} The breakpoint key\n */\nexport const getBreakpointFromPixels = (pixels: number): Breakpoint =>\n Object.keys(config.breakpoints)[\n Object.values(config.breakpoints)\n .map((bp) => parseInt(bp, 10))\n .findIndex((bpPixels) => bpPixels === pixels)\n ] as Breakpoint;\n\nconst mediaQueryLists: MediaQueryList[] = [];\n\n/**\n * Adds matchMedia to window with the given properties.\n * @param {MediaTypes} mediaType The type of media\n * @param {Sizes} breakpoint The media size\n * @param {Function} listenerFunction Callback function for the listener\n */\nexport const addMatchMedia = (\n mediaType: MediaTypes,\n breakpoint: Breakpoint,\n listenerFunction: (this: MediaQueryList, ev: MediaQueryListEvent) => unknown\n): void => {\n const foundMatchMedia = mediaQueryLists.find((m) => m.media === `(${mediaType}: ${config.breakpoints[breakpoint]})`);\n if (!isNullOrUndefined(foundMatchMedia)) {\n foundMatchMedia.addEventListener('change', listenerFunction);\n } else {\n const newMatchMedia = window.matchMedia(`(${mediaType}: ${config.breakpoints[breakpoint]})`);\n mediaQueryLists.push(newMatchMedia);\n newMatchMedia.addEventListener('change', listenerFunction);\n }\n};\n\n/**\n * Removes matchMedia from window with the given properties.\n * @param {MediaTypes} mediaType The type of media\n * @param {Sizes} breakpoint The media size\n * @param {Function} listenerFunction Callback function to be removed from the listener\n */\nexport const removeMatchMedia = (\n mediaType: MediaTypes,\n breakpoint: Breakpoint,\n listenerFunction: (this: MediaQueryList, ev: MediaQueryListEvent) => unknown\n): void => {\n mediaQueryLists.find((m) => m.media === `(${mediaType}: ${config.breakpoints[breakpoint]})`)?.removeEventListener('change', listenerFunction);\n};\n\n/**\n * Matches the current window with the given media type and breakpoint\n * @param {MediaTypes} mediaType The media type\n * @param {Breakpoint} breakpoint The breakpoint\n * @returns {boolean} True if it matches, false otherwise\n */\nexport const mediaMatchingBreakpoint = (mediaType: MediaTypes, breakpoint: Breakpoint): boolean => {\n const foundMatchMedia = mediaQueryLists.find((m) => m.media === `(${mediaType}: ${config.breakpoints[breakpoint]})`);\n if (!isNullOrUndefined(foundMatchMedia)) {\n return foundMatchMedia.matches;\n }\n const newMatchMedia = window.matchMedia(`(${mediaType}: ${config.breakpoints[breakpoint]})`);\n mediaQueryLists.push(newMatchMedia);\n return newMatchMedia.matches;\n};\n","import { isNullOrUndefined } from './collection';\n\ninterface ResizeCallback {\n callback: () => void;\n duration: number;\n timeout?: NodeJS.Timeout;\n}\n\nconst defaultTimeout = 50;\n\nconst callbacks: ResizeCallback[] = [];\n\nwindow.onresize = () => {\n callbacks.map((cb: ResizeCallback) => {\n if (isNullOrUndefined(cb.timeout)) {\n cb.callback();\n cb.timeout = setTimeout(() => {\n cb.timeout = null;\n }, cb.duration);\n }\n });\n};\n\n/**\n * Subscribe to the resize listener\n * @param {function} callback The callback function to run on resize\n * @param {number} timeoutDuration The throttle timeout duration\n */\nexport const subscribeToWindowResize = (callback: () => void, timeoutDuration: number = defaultTimeout): void => {\n callbacks.push({ callback, duration: timeoutDuration });\n};\n\n/**\n * Unsubscribe to the resize listener\n * @param {function} callback The callback function to unsubscribe\n */\nexport const unSubscribeToWindowResize = (callback: () => void): void => {\n const index = callbacks.findIndex((cb: ResizeCallback) => cb.callback === callback);\n if (index >= 0) {\n if (!isNullOrUndefined(callbacks[index].timeout)) {\n clearTimeout(callbacks[index].timeout);\n }\n callbacks.splice(index, 1);\n }\n};\n","/**\n * An interface for a hyperlink\n * @docs\n * @global\n */\nexport interface HyperlinkObj {\n /* the hyperlink url (fragment) value */\n href: string;\n\n /* the language of the linked resource */\n hreflang?: string;\n\n /* the relationship between the current document and the linked document */\n rel?: string;\n\n /* the context in which the linked resource will open */\n target?: string;\n\n /* the onClick handler of the link */\n onClick?: (evt: MouseEvent) => void;\n}\n\n/**\n * Describes a link.\n * @docs\n * @global\n */\nexport type Hyperlink = HyperlinkObj | string;\n\n/**\n * Given a link object or string (href), this function will return the full object that describes a link\n * That way we can \"combine\" the two possible link inputs (string or obj) and work with objects as a result\n * @param {Hyperlink} link The link data\n * @returns {HyperlinkObj} The link in obj form\n */\nexport const getHyperLinkObject = (link: Hyperlink): HyperlinkObj => {\n if (typeof link === 'string') {\n return { href: link };\n }\n return link;\n};\n","import { isNullOrUndefined, isNullOrUndefinedOrEmpty } from 'utils/collection';\n\n/**\n * An interface for an icon object\n */\nexport interface IconObject {\n active: string;\n inactive: string;\n}\n\n/**\n * An interface for an svg icon object\n */\nexport interface SvgIconObject {\n active: SVGIconData;\n inactive: SVGIconData;\n}\n\n/**\n * An interface for an SVG image\n */\nexport interface SVGIconData {\n /* the path data for the SVG image */\n data: string;\n\n /* the height of the image */\n height: number;\n\n /* the width of the image */\n width: number;\n}\n\n/**\n * Describes an icon type.\n * @docs\n * @global\n */\nexport type Icon = IconObject | string;\n\n/**\n * Describes an icon type.\n * @docs\n * @global\n */\nexport type SVGIcon = SvgIconObject | SVGIconData;\n\n/**\n * Given an icon object or string (src), this function will return the full object that describes an icon type.\n * That way we can \"combine\" the two possible inputs (string or obj) and work with objects as a result.\n * @param {Icon} src The icon type\n * @returns {IconObject} The icon object\n */\nexport const getIconObject = (src: Icon): IconObject => {\n if (!isIcon(src)) {\n return undefined;\n }\n if (typeof src === 'string') {\n return {\n active: src,\n inactive: src,\n };\n }\n\n return src;\n};\n\n/**\n * Given a single svg icon object or an active-inactive combination, this function will return a full combination.\n * @param {SVGIcon} src The icon type\n * @returns {SvgIconObject} The icon object\n */\nexport const getSVGIconObject = (src: SVGIcon): SvgIconObject => {\n if (!isSVGIcon(src)) {\n return undefined;\n }\n if (!isNullOrUndefined((src as SVGIconData)?.data)) {\n return {\n active: src as SVGIconData,\n inactive: src as SVGIconData,\n };\n }\n return src as SvgIconObject;\n};\n\n/**\n * Determines if value is of type Icon (Type Guard)\n * @param {Icon | SVGIcon} toBeDetermined The value to check\n * @returns {boolean} True if value is of type \"Icon\". False otherwise\n */\nexport const isIcon = (toBeDetermined: Icon | SVGIcon): toBeDetermined is Icon => {\n if (\n !isNullOrUndefinedOrEmpty(toBeDetermined as string) ||\n (!isNullOrUndefinedOrEmpty((toBeDetermined as IconObject)?.active) && !isNullOrUndefinedOrEmpty((toBeDetermined as IconObject)?.inactive))\n ) {\n return true;\n }\n return false;\n};\n\n/**\n * Determines if value is of type SVGIcon (Type Guard)\n * @param {Icon | SVGIcon} toBeDetermined The value to check\n * @returns {boolean} True if value is of type \"SVGIcon\". False otherwise\n */\nexport const isSVGIcon = (toBeDetermined: Icon | SVGIcon): toBeDetermined is SVGIcon => {\n if (\n !isNullOrUndefinedOrEmpty((toBeDetermined as SVGIconData)?.data) ||\n (!isNullOrUndefinedOrEmpty((toBeDetermined as SvgIconObject)?.active?.data) &&\n !isNullOrUndefinedOrEmpty((toBeDetermined as SvgIconObject)?.inactive?.data))\n ) {\n return true;\n }\n return false;\n};\n"],"sourceRoot":""}