{"version":3,"sources":["webpack:///./src/shared/utilities/screenSize.js","webpack:///./node_modules/process/browser.js","webpack:///./src/components/molecules/sticky-base/sticky-base.js","webpack:///./src/shared/utilities/debounce.js","webpack:///./src/shared/utilities/pubsub.js","webpack:///./src/framework/base/base.js","webpack:///./src/shared/utilities/case.ts","webpack:///./src/shared/utilities/id.ts","webpack:///./node_modules/stickyfilljs/dist/stickyfill.js"],"names":["defaultWidths","sm","md","lg","xl","getBreakpoint","window","getComputedStyle","document","querySelector","getPropertyValue","replace","screenSmallerThan","size","widths","arguments","length","undefined","Object","prototype","hasOwnProperty","call","Error","concat","keys","join","innerWidth","screenGreatOrEqualTo","cachedSetTimeout","cachedClearTimeout","process","module","exports","defaultSetTimout","defaultClearTimeout","runTimeout","fun","setTimeout","e","this","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","noop","nextTick","args","Array","i","push","apply","title","browser","env","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","name","binding","cwd","chdir","dir","umask","StickyBase","_BaseBehavior","element","_this","_classCallCheck","_callSuper","_possibleConstructorReturn","dataset","component","sticky","style","top","calculateStickyTop","subscribe","stickyfill","refreshAll","stickNavigation","detectScroll","_inherits","key","value","stickyJS","addOne","forceSticky","_this2","megaNav","navigation","handleHorizontalScrollDebounced","debounce","sessionStorage","removeItem","initialTop","position","classList","contains","publish","bind","addEventListener","direction","transform","cookieDisclaimer","cookieDisclaimerHeight","offsetHeight","navigationHeight","megaNavHeight","navContainer","navRoot","navTop","navRootHeight","finalHeight","height","getBoundingClientRect","BaseBehavior","func","wait","immediate","_len","_key","later","callNow","pubsub","PubSub","subscriptions","topic","_step","_iterator","_createForOfIteratorHelper","s","n","done","fn","err","f","forEach","index","splice","state","events","behaviorName","camelCaseToDashCase","getAttribute","instanceId","generateId","attachInstanceId","partialState","_objectSpread","setAttribute","removeAttribute","dom","from","querySelectorAll","filter","el","closest","ref","dashCaseToCamelCase","split","console","error","_this3","delay","breakpoint","debouncedGetBreakpoint","newBreakPoint","event","useCapture","removeEventListener","obj","unsubscribe","bottom","scrollY","scroll","reason","promise","log","str","toLowerCase","x","chr","toUpperCase","alphabet","id","charAt","Math","floor","random","_createClass","defineProperties","target","props","descriptor","enumerable","configurable","writable","defineProperty","Constructor","protoProps","staticProps","testNode","seppuku","isWindowDefined","createElement","some","prefix","isInitialized","shadowRootExists","ShadowRoot","left","stickies","extend","targetObj","sourceObject","parseNumeric","val","parseFloat","getDocOffsetTop","node","docOffsetTop","offsetTop","offsetParent","Sticky","instance","TypeError","HTMLElement","_node","_stickyMode","_active","refresh","_removed","_deactivate","nodeComputedStyle","nodeComputedProps","display","marginTop","marginBottom","marginLeft","marginRight","cssFloat","isNaN","originalPosition","referenceNode","parentNode","host","nodeWinOffset","parentWinOffset","parentComputedStyle","_parent","styles","_offsetToWindow","right","documentElement","clientWidth","_offsetToParent","borderTopWidth","borderLeftWidth","borderRightWidth","_styles","width","nodeTopValue","_limits","start","pageYOffset","end","borderBottomWidth","parentPosition","_recalcPosition","clone","_clone","padding","border","borderSpacing","fontSize","insertBefore","stickyMode","abs","removeChild","Stickyfill","init","add","nodeList","addedStickies","_loop","removeOne","remove","_loop2","removeAll","checkScroll","fastCheckTimer","docHiddenKey","visibilityChangeEventName","startFastCheckTimer","clearInterval","pageXOffset","setInterval","_fastCheck"],"mappings":"2FAAA,sGAAO,IAAMA,EAAgB,CAC5BC,GAAI,IACJC,GAAI,KACJC,GAAI,KACJC,GAAI,MAIQC,EAAgB,WAAH,OACzBC,OACEC,iBAAiBC,SAASC,cAAc,QAAS,WACjDC,iBAAiB,WACjBC,QAAQ,KAAM,KAGV,SAASC,EAAkBC,GAA8B,IAAxBC,EAAMC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAGf,EAChD,IAAKkB,OAAOC,UAAUC,eAAeC,KAAKP,EAAQD,GACjD,MAAM,IAAIS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,cAAcJ,GAqBNG,QAGLA,IA5DP,SAASJ,IACD/S,EAAOqT,aAAezH,EAAOoC,MAC7BpC,EAAOpG,IAAMxF,EAAOsR,YACpB1F,EAAOoC,KAAOhO,EAAOqT,YAErBhB,EAAWzM,cACJ5F,EAAOsR,aAAe1F,EAAOpG,MACpCoG,EAAOpG,IAAMxF,EAAOsR,YACpB1F,EAAOoC,KAAOhO,EAAOqT,YAGrBpF,EAAS3E,SAAQ,SAAUhE,GACvB,OAAOA,EAAOoM,sBAe1B,SAASyB,IACLH,EAAiBM,aAAY,WACzBrF,EAAS3E,SAAQ,SAAUhE,GACvB,OAAOA,EAAOiO,kBAEnB,MA+BN/F,GAAS8E,IAKsB7Q,EAAOC,QACvCD,EAAOC,QAAU2Q,EACV5E,IACPzN,EAAOqS,WAAaA,GAxhB3B,CA2hBErS,OAAQE","file":"61-5145f8da.js","sourcesContent":["export const defaultWidths = {\r\n\tsm: 768,\r\n\tmd: 1024,\r\n\tlg: 1280,\r\n\txl: 1400\r\n};\r\n\r\n// getBreakpoint :: Void -> String\r\nexport const getBreakpoint = () =>\r\n\twindow\r\n\t\t.getComputedStyle(document.querySelector('body'), ':before')\r\n\t\t.getPropertyValue('content')\r\n\t\t.replace(/\"/g, '');\r\n\r\n// function :: String -> ?Object -> Boolean\r\nexport function screenSmallerThan(size, widths = defaultWidths) {\r\n\tif (!Object.prototype.hasOwnProperty.call(widths, size)) {\r\n\t\tthrow new Error(`size must be one of: ${Object.keys(widths).join(', ')}`);\r\n\t}\r\n\treturn window.innerWidth < widths[size];\r\n}\r\n\r\nexport function screenGreatOrEqualTo(size, widths = defaultWidths) {\r\n\tif (!Object.prototype.hasOwnProperty.call(widths, size)) {\r\n\t\tthrow new Error(`size must be one of: ${Object.keys(widths).join(', ')}`);\r\n\t}\r\n\treturn window.innerWidth >= widths[size];\r\n}\r\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","import stickyfill from 'stickyfilljs';\r\nimport BaseBehavior from '../../../framework/base/base';\r\nimport { debounce } from '../../../shared/utilities/debounce';\r\nimport { screenSmallerThan } from '../../../shared/utilities/screenSize';\r\n\r\nexport default class StickyBase extends BaseBehavior {\r\n\tconstructor(element) {\r\n\t\tsuper(element);\r\n\t\t// don't run behavior for mobile as glossary bar doesn't show on mobile\r\n\t\tif (window.getComputedStyle(this.element).getPropertyValue('display') === 'none') return;\r\n\r\n\t\tif (\r\n\t\t\t(element.dataset.component === 'onpagenav' && element.dataset.sticky === 'true') ||\r\n\t\t\telement.dataset.component === 'glossary'\r\n\t\t) {\r\n\t\t\tthis.element.style.top = this.calculateStickyTop('down') + 'px';\r\n\t\t\tthis.subscribe('cookie/height/change', () => {\r\n\t\t\t\tthis.element.style.top = this.calculateStickyTop('down') + 'px';\r\n\t\t\t\tstickyfill.refreshAll();\r\n\t\t\t});\r\n\t\t\tthis.stickNavigation(stickyfill);\r\n\t\t\tthis.detectScroll();\r\n\t\t}\r\n\t}\r\n\r\n\tstickNavigation(stickyJS) {\r\n\t\tstickyJS.addOne(this.element);\r\n\t\tstickyJS.forceSticky();\r\n\t}\r\n\r\n\t/**\r\n\t * This function controls the theme changing of OnPageNav\r\n\t * based on the scrolling of the page\r\n\t */\r\n\tdetectScroll() {\r\n\t\tconst megaNav = document.querySelector('.v2-nav');\r\n\t\tconst navigation = document.querySelector('.header__nav');\r\n\r\n\t\tconst handleHorizontalScrollDebounced = debounce(() => {\r\n\t\t\tconst { sessionStorage } = window;\r\n\t\t\tsessionStorage?.removeItem('IsMobileNavigationOpen');\r\n\t\t\tif (this.initialTop === null) {\r\n\t\t\t\tthis.initialTop = this.element.style.top;\r\n\t\t\t}\r\n\t\t\tconst position = window.getComputedStyle(this.element).getPropertyValue('position');\r\n\t\t\tif (position === 'fixed') {\r\n\t\t\t\tif ((megaNav && !megaNav.classList.contains('headroom--pinned')) || navigation) {\r\n\t\t\t\t\tthis.element.style.top = this.calculateStickyTop('down') + 'px';\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.calculateStickyTop('up');\r\n\t\t\t\t}\r\n\t\t\t\tthis.publish('position/updated', { value: 'value' });\r\n\t\t\t\tif (screenSmallerThan('sm')) {\r\n\t\t\t\t\tthis.publish('collapse/navigation-mobile');\r\n\t\t\t\t}\r\n\t\t\t\t// send event here\r\n\t\t\t\t// this.isDesktop && this.applyThemeSettings(this.themeSettings, 'value');\r\n\t\t\t} else if (position === 'absolute') {\r\n\t\t\t\tthis.calculateStickyTop('clear');\r\n\t\t\t\tthis.publish('position/updated', { value: 'default' });\r\n\t\t\t\t// send event here\r\n\t\t\t\t// this.isDesktop && this.applyThemeSettings(this.themeSettings, 'default');\r\n\t\t\t}\r\n\t\t}, 1).bind(this);\r\n\r\n\t\twindow.addEventListener('scroll', handleHorizontalScrollDebounced);\r\n\t}\r\n\r\n\t/**\r\n\t * This function calculates the updated top value of OnPageNav/glossary section\r\n\t * based on Cookie disclaimer(if present), Nav Top and Nav Root sections\r\n\t * Param is the direction of scrolling\r\n\t */\r\n\tcalculateStickyTop(direction) {\r\n\t\tif (direction === 'clear') {\r\n\t\t\tthis.element.style.transform = 'translateY(0px)';\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tconst cookieDisclaimer = document.querySelector('.v2-cookie-disclaimer--top');\r\n\t\tconst cookieDisclaimerHeight = cookieDisclaimer ? cookieDisclaimer.offsetHeight : 0;\r\n\t\tconst navHeight = document.querySelector('.header__nav')\r\n\t\t\t? this.navigationHeight(direction)\r\n\t\t\t: this.megaNavHeight(direction);\r\n\t\t// consider ESMA and cookie disc height too\r\n\t\treturn navHeight + cookieDisclaimerHeight;\r\n\t}\r\n\r\n\tmegaNavHeight(direction) {\r\n\t\tconst navContainer = document.querySelector('header.v2-nav');\r\n\t\tconst navRoot = navContainer && navContainer.querySelector('.v2-nav__root');\r\n\t\tconst navTop = navContainer && navContainer.querySelector('.v2-nav__top');\r\n\r\n\t\tlet navRootHeight = navRoot ? navRoot.offsetHeight : 0;\r\n\t\tif (direction === 'down') {\r\n\t\t\tthis.element.style.transform = 'translateY(0px)';\r\n\t\t\tif (window.innerWidth < 1200) {\r\n\t\t\t\tnavRootHeight = 0;\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst finalHeight = navRootHeight;\r\n\t\tif (direction === 'up') {\r\n\t\t\tlet height = navTop ? navTop.offsetHeight : 0;\r\n\t\t\tif (window.innerWidth < 1200) {\r\n\t\t\t\theight += navRootHeight;\r\n\t\t\t}\r\n\t\t\tthis.element.style.transform = 'translateY(' + height + 'px)';\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn finalHeight;\r\n\t}\r\n\r\n\tnavigationHeight(direction) {\r\n\t\tconst navContainer = document.querySelector('.header__nav');\r\n\t\tconst finalHeight = navContainer.getBoundingClientRect().height;\r\n\t\tif (direction === 'down') {\r\n\t\t\tthis.element.style.transform = 'translateY(0px)';\r\n\t\t}\r\n\t\tif (direction === 'up') {\r\n\t\t\tthis.element.style.transform = `translateY(${finalHeight}px)`;\r\n\t\t}\r\n\r\n\t\treturn finalHeight;\r\n\t}\r\n}\r\n","// debounce :: Function, Number, Bool -> (Any -> Void)\r\nexport function debounce(func, wait, immediate) {\r\n\tlet timeout;\r\n\treturn function debounced(...args) {\r\n\t\tconst later = () => {\r\n\t\t\ttimeout = null;\r\n\t\t\tif (!immediate) func(args);\r\n\t\t};\r\n\t\tconst callNow = immediate && !timeout;\r\n\t\tclearTimeout(timeout);\r\n\t\ttimeout = setTimeout(later, wait);\r\n\t\tif (callNow) func(args);\r\n\t};\r\n}\r\n","class PubSub {\r\n\tconstructor() {\r\n\t\tthis.subscriptions = {};\r\n\t}\r\n\r\n\tpublish(topic, ...args) {\r\n\t\tif (this.subscriptions[topic]) {\r\n\t\t\t// eslint-disable-next-line no-restricted-syntax\r\n\t\t\tfor (const fn of this.subscriptions[topic]) {\r\n\t\t\t\tfn(...args);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tsubscribe(topic, fn) {\r\n\t\tthis.subscriptions[topic] = this.subscriptions[topic] || [];\r\n\t\tthis.subscriptions[topic].push(fn);\r\n\t}\r\n\r\n\tunsubscribe(topic, fn) {\r\n\t\tif (this.subscriptions[topic]) {\r\n\t\t\tthis.subscriptions[topic].forEach((value, index) => {\r\n\t\t\t\tif (value === fn) {\r\n\t\t\t\t\tthis.subscriptions[topic].splice(index, 1);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n}\r\n\r\nconst pubsub = new PubSub();\r\n\r\nexport default pubsub;\r\n","import pubsub from '../../shared/utilities/pubsub';\r\nimport { generateId } from '../../shared/utilities/id';\r\nimport { camelCaseToDashCase, dashCaseToCamelCase } from '../../shared/utilities/case';\r\nimport { getBreakpoint } from '../../shared/utilities/screenSize';\r\nimport { debounce } from '../../shared/utilities/debounce';\r\n\r\nexport default class BaseBehavior {\r\n\tconstructor(element) {\r\n\t\tthis.element = element;\r\n\t\tthis.state = undefined;\r\n\t\tthis.events = {};\r\n\t\tthis.subscriptions = {};\r\n\t\tthis.behaviorName = camelCaseToDashCase(element.getAttribute('data-behavior'));\r\n\t\tthis.instanceId = generateId();\r\n\t\tthis.attachInstanceId();\r\n\t}\r\n\r\n\tsetState(partialState) {\r\n\t\tObject.keys(partialState).forEach(key => {\r\n\t\t\tif (!{}.hasOwnProperty.call(this.state, key)) {\r\n\t\t\t\tthrow new Error(\r\n\t\t\t\t\t`${this.behaviorName} does not have ${key} on the state object,\r\n\t\t\t\t\tmake sure to define all state properties in the constructor.`\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tthis.state = { ...(this.state || {}), ...partialState };\r\n\t}\r\n\r\n\tattachInstanceId() {\r\n\t\tthis.element.setAttribute('data-instance', `${this.behaviorName}__${this.instanceId}`);\r\n\t\tthis.element.removeAttribute('data-instance-init');\r\n\t}\r\n\r\n\tinitDomCache() {\r\n\t\tthis.dom = {};\r\n\r\n\t\t// Filter out ref's that embedded in another instance of the same behavior.\r\n\t\tArray.from(this.element.querySelectorAll(`[data-ref^=${this.behaviorName}]`))\r\n\t\t\t.filter(el => el.closest(`[data-behavior*=\"${this.behaviorName}\"]`) === this.element)\r\n\t\t\t.forEach(element => {\r\n\t\t\t\tconst ref = element.getAttribute('data-ref');\r\n\t\t\t\tconst key = dashCaseToCamelCase(ref).split('__')[1];\r\n\r\n\t\t\t\tif (key) {\r\n\t\t\t\t\tthis.dom[key] = element;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tconsole.error(\r\n\t\t\t\t\t\t`Element cannot be cached. Reference \"${ref}\" should have the format \"behavior-name__element-name\"`\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t}\r\n\r\n\tpublishBreakpointOnResize(delay = 250) {\r\n\t\tif (this.breakpoint) return;\r\n\r\n\t\tthis.breakpoint = getBreakpoint();\r\n\t\tthis.publish('SITE.BREAKPOINT', this.breakpoint);\r\n\r\n\t\tconst debouncedGetBreakpoint = debounce(() => {\r\n\t\t\tconst newBreakPoint = getBreakpoint();\r\n\t\t\tif (this.breakpoint !== newBreakPoint) {\r\n\t\t\t\tthis.publish('SITE.BREAKPOINT', newBreakPoint);\r\n\t\t\t\tthis.breakpoint = newBreakPoint;\r\n\t\t\t}\r\n\t\t}, delay);\r\n\r\n\t\twindow.addEventListener('resize', debouncedGetBreakpoint);\r\n\t}\r\n\r\n\taddEventListener(element, event, fn, useCapture = false) {\r\n\t\tif (element) {\r\n\t\t\tthis.events[event] = fn;\r\n\t\t\telement.addEventListener(event.split('.')[0], this.events[event], useCapture);\r\n\t\t}\r\n\t}\r\n\r\n\tremoveEventListener(element, event) {\r\n\t\telement.removeEventListener(event.split('.')[0], this.events[event]);\r\n\t\tthis.events[event] = null;\r\n\t\tdelete this.events[event];\r\n\t}\r\n\r\n\t// eslint-disable-next-line class-methods-use-this\r\n\tpublish(topic, obj) {\r\n\t\tpubsub.publish(topic, obj);\r\n\t}\r\n\r\n\tsubscribe(topic, fn) {\r\n\t\tthis.subscriptions[topic] = fn;\r\n\t\tpubsub.subscribe(topic, fn);\r\n\t}\r\n\r\n\tunsubscribe(topic) {\r\n\t\tpubsub.unsubscribe(topic, this.subscriptions[topic]);\r\n\t\tthis.subscriptions[topic] = null;\r\n\t\tdelete this.subscriptions[topic];\r\n\t}\r\n}\r\n\r\n// Below code is added for fixing scrolling issue on page refresh.\r\nwindow.addEventListener('load', () => {\r\n\tsetTimeout(() => {\r\n\t\tconst navigation = document.querySelector('#navigation');\r\n\t\t// eslint-disable-next-line\r\n\t\tif (navigation && navigation.getBoundingClientRect().bottom === scrollY) {\r\n\t\t\twindow.scroll(0, 0);\r\n\t\t}\r\n\t}, 0);\r\n});\r\n\r\nprocess.on('unhandledRejection', (reason, promise) => {\r\n\t// eslint-disable-next-line no-console\r\n\tconsole.log('Reason for this failure is : ', reason);\r\n\t// eslint-disable-next-line no-console\r\n\tconsole.log('promise is', promise);\r\n\t// Application specific logging, throwing an error, or other logic here\r\n});\r\n","export function camelCaseToDashCase(str: string): string {\r\n\treturn str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\r\n}\r\n\r\nexport function dashCaseToCamelCase(str: string): string {\r\n\treturn str.replace(/\\W+(.)/g, (x, chr) => chr.toUpperCase());\r\n}\r\n","const alphabet = '23456789ABDEGJKMNPQRVWXYZ';\r\n\r\nexport function generateId(length: number = 6): string {\r\n\tlet id:string = '';\r\n\r\n\tfor (let i:number = 0; i < length; i++) {\r\n\t\tid += alphabet.charAt(Math.floor(Math.random() * alphabet.length));\r\n\t}\r\n\r\n\treturn id;\r\n}\r\n","/*!\r\n * Stickyfill – `position: sticky` polyfill\r\n * v. 2.1.0 | https://github.com/wilddeer/stickyfill\r\n * MIT License\r\n */\r\n\r\n;(function(window, document) {\r\n 'use strict';\r\n \r\n /*\r\n * 1. Check if the browser supports `position: sticky` natively or is too old to run the polyfill.\r\n * If either of these is the case set `seppuku` flag. It will be checked later to disable key features\r\n * of the polyfill, but the API will remain functional to avoid breaking things.\r\n */\r\n \r\n var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\r\n \r\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\r\n \r\n var seppuku = false;\r\n \r\n var isWindowDefined = typeof window !== 'undefined';\r\n \r\n // The polyfill can’t function properly without `window` or `window.getComputedStyle`.\r\n if (!isWindowDefined || !window.getComputedStyle) seppuku = true;\r\n // Dont’t get in a way if the browser supports `position: sticky` natively.\r\n else {\r\n (function () {\r\n var testNode = document.createElement('div');\r\n \r\n if (['', '-webkit-', '-moz-', '-ms-'].some(function (prefix) {\r\n try {\r\n testNode.style.position = prefix + 'sticky';\r\n } catch (e) {}\r\n \r\n return testNode.style.position != '';\r\n })) seppuku = true;\r\n })();\r\n }\r\n \r\n /*\r\n * 2. “Global” vars used across the polyfill\r\n */\r\n var isInitialized = false;\r\n \r\n // Check if Shadow Root constructor exists to make further checks simpler\r\n var shadowRootExists = typeof ShadowRoot !== 'undefined';\r\n \r\n // Last saved scroll position\r\n var scroll = {\r\n top: null,\r\n left: null\r\n };\r\n \r\n // Array of created Sticky instances\r\n var stickies = [];\r\n \r\n /*\r\n * 3. Utility functions\r\n */\r\n function extend(targetObj, sourceObject) {\r\n for (var key in sourceObject) {\r\n if (sourceObject.hasOwnProperty(key)) {\r\n targetObj[key] = sourceObject[key];\r\n }\r\n }\r\n }\r\n \r\n function parseNumeric(val) {\r\n return parseFloat(val) || 0;\r\n }\r\n \r\n function getDocOffsetTop(node) {\r\n var docOffsetTop = 0;\r\n \r\n while (node) {\r\n docOffsetTop += node.offsetTop;\r\n node = node.offsetParent;\r\n }\r\n \r\n return docOffsetTop;\r\n }\r\n \r\n /*\r\n * 4. Sticky class\r\n */\r\n \r\n var Sticky = function () {\r\n function Sticky(node) {\r\n _classCallCheck(this, Sticky);\r\n \r\n if (!(node instanceof HTMLElement)) throw new Error('First argument must be HTMLElement');\r\n if (stickies.some(function (sticky) {\r\n return sticky._node === node;\r\n })) throw new Error('Stickyfill is already applied to this node');\r\n \r\n this._node = node;\r\n this._stickyMode = null;\r\n this._active = false;\r\n \r\n stickies.push(this);\r\n \r\n this.refresh();\r\n }\r\n \r\n _createClass(Sticky, [{\r\n key: 'refresh',\r\n value: function refresh() {\r\n if (seppuku || this._removed) return;\r\n if (this._active) this._deactivate();\r\n \r\n var node = this._node;\r\n \r\n /*\r\n * 1. Save node computed props\r\n */\r\n var nodeComputedStyle = getComputedStyle(node);\r\n var nodeComputedProps = {\r\n position: nodeComputedStyle.position,\r\n top: nodeComputedStyle.top,\r\n display: nodeComputedStyle.display,\r\n marginTop: nodeComputedStyle.marginTop,\r\n marginBottom: nodeComputedStyle.marginBottom,\r\n marginLeft: nodeComputedStyle.marginLeft,\r\n marginRight: nodeComputedStyle.marginRight,\r\n cssFloat: nodeComputedStyle.cssFloat\r\n };\r\n \r\n /*\r\n * 2. Check if the node can be activated\r\n */\r\n if (isNaN(parseFloat(nodeComputedProps.top)) || nodeComputedProps.display == 'table-cell' || nodeComputedProps.display == 'none') return;\r\n \r\n this._active = true;\r\n \r\n /*\r\n * 3. Check if the current node position is `sticky`. If it is, it means that the browser supports sticky positioning,\r\n * but the polyfill was force-enabled. We set the node’s position to `static` before continuing, so that the node\r\n * is in it’s initial position when we gather its params.\r\n */\r\n var originalPosition = node.style.position;\r\n if (nodeComputedStyle.position == 'sticky' || nodeComputedStyle.position == '-webkit-sticky') node.style.position = 'static';\r\n \r\n /*\r\n * 4. Get necessary node parameters\r\n */\r\n var referenceNode = node.parentNode;\r\n var parentNode = shadowRootExists && referenceNode instanceof ShadowRoot ? referenceNode.host : referenceNode;\r\n var nodeWinOffset = node.getBoundingClientRect();\r\n var parentWinOffset = parentNode.getBoundingClientRect();\r\n var parentComputedStyle = getComputedStyle(parentNode);\r\n \r\n this._parent = {\r\n node: parentNode,\r\n styles: {\r\n position: parentNode.style.position\r\n },\r\n offsetHeight: parentNode.offsetHeight\r\n };\r\n this._offsetToWindow = {\r\n left: nodeWinOffset.left,\r\n right: document.documentElement.clientWidth - nodeWinOffset.right\r\n };\r\n this._offsetToParent = {\r\n top: nodeWinOffset.top - parentWinOffset.top - parseNumeric(parentComputedStyle.borderTopWidth),\r\n left: nodeWinOffset.left - parentWinOffset.left - parseNumeric(parentComputedStyle.borderLeftWidth),\r\n right: -nodeWinOffset.right + parentWinOffset.right - parseNumeric(parentComputedStyle.borderRightWidth)\r\n };\r\n this._styles = {\r\n position: originalPosition,\r\n top: node.style.top,\r\n bottom: node.style.bottom,\r\n left: node.style.left,\r\n right: node.style.right,\r\n width: node.style.width,\r\n marginTop: node.style.marginTop,\r\n marginLeft: node.style.marginLeft,\r\n marginRight: node.style.marginRight\r\n };\r\n \r\n var nodeTopValue = parseNumeric(nodeComputedProps.top);\r\n this._limits = {\r\n start: nodeWinOffset.top + window.pageYOffset - nodeTopValue,\r\n end: parentWinOffset.top + window.pageYOffset + parentNode.offsetHeight - parseNumeric(parentComputedStyle.borderBottomWidth) - node.offsetHeight - nodeTopValue - parseNumeric(nodeComputedProps.marginBottom)\r\n };\r\n \r\n /*\r\n * 5. Ensure that the node will be positioned relatively to the parent node\r\n */\r\n var parentPosition = parentComputedStyle.position;\r\n \r\n if (parentPosition != 'absolute' && parentPosition != 'relative') {\r\n parentNode.style.position = 'relative';\r\n }\r\n \r\n /*\r\n * 6. Recalc node position.\r\n * It’s important to do this before clone injection to avoid scrolling bug in Chrome.\r\n */\r\n this._recalcPosition();\r\n \r\n /*\r\n * 7. Create a clone\r\n */\r\n var clone = this._clone = {};\r\n clone.node = document.createElement('div');\r\n \r\n // Apply styles to the clone\r\n extend(clone.node.style, {\r\n width: nodeWinOffset.right - nodeWinOffset.left + 'px',\r\n height: nodeWinOffset.bottom - nodeWinOffset.top + 'px',\r\n marginTop: nodeComputedProps.marginTop,\r\n marginBottom: nodeComputedProps.marginBottom,\r\n marginLeft: nodeComputedProps.marginLeft,\r\n marginRight: nodeComputedProps.marginRight,\r\n cssFloat: nodeComputedProps.cssFloat,\r\n padding: 0,\r\n border: 0,\r\n borderSpacing: 0,\r\n fontSize: '1em',\r\n position: 'static'\r\n });\r\n \r\n referenceNode.insertBefore(clone.node, node);\r\n clone.docOffsetTop = getDocOffsetTop(clone.node);\r\n }\r\n }, {\r\n key: '_recalcPosition',\r\n value: function _recalcPosition() {\r\n if (!this._active || this._removed) return;\r\n \r\n var stickyMode = scroll.top <= this._limits.start ? 'start' : scroll.top >= this._limits.end ? 'end' : 'middle';\r\n \r\n if (this._stickyMode == stickyMode) return;\r\n \r\n switch (stickyMode) {\r\n case 'start':\r\n extend(this._node.style, {\r\n position: 'absolute',\r\n left: this._offsetToParent.left + 'px',\r\n right: this._offsetToParent.right + 'px',\r\n top: this._offsetToParent.top + 'px',\r\n bottom: 'auto',\r\n width: 'auto',\r\n marginLeft: 0,\r\n marginRight: 0,\r\n marginTop: 0\r\n });\r\n break;\r\n \r\n case 'middle':\r\n extend(this._node.style, {\r\n position: 'fixed',\r\n left: this._offsetToWindow.left + 'px',\r\n right: this._offsetToWindow.right + 'px',\r\n top: this._styles.top,\r\n bottom: 'auto',\r\n width: 'auto',\r\n marginLeft: 0,\r\n marginRight: 0,\r\n marginTop: 0\r\n });\r\n break;\r\n \r\n case 'end':\r\n extend(this._node.style, {\r\n position: 'absolute',\r\n left: this._offsetToParent.left + 'px',\r\n right: this._offsetToParent.right + 'px',\r\n top: 'auto',\r\n bottom: 0,\r\n width: 'auto',\r\n marginLeft: 0,\r\n marginRight: 0\r\n });\r\n break;\r\n }\r\n \r\n this._stickyMode = stickyMode;\r\n }\r\n }, {\r\n key: '_fastCheck',\r\n value: function _fastCheck() {\r\n if (!this._active || this._removed) return;\r\n \r\n if (Math.abs(getDocOffsetTop(this._clone.node) - this._clone.docOffsetTop) > 1 || Math.abs(this._parent.node.offsetHeight - this._parent.offsetHeight) > 1) this.refresh();\r\n }\r\n }, {\r\n key: '_deactivate',\r\n value: function _deactivate() {\r\n var _this = this;\r\n \r\n if (!this._active || this._removed) return;\r\n \r\n this._clone.node.parentNode.removeChild(this._clone.node);\r\n delete this._clone;\r\n \r\n extend(this._node.style, this._styles);\r\n delete this._styles;\r\n \r\n // Check whether element’s parent node is used by other stickies.\r\n // If not, restore parent node’s styles.\r\n if (!stickies.some(function (sticky) {\r\n return sticky !== _this && sticky._parent && sticky._parent.node === _this._parent.node;\r\n })) {\r\n extend(this._parent.node.style, this._parent.styles);\r\n }\r\n delete this._parent;\r\n \r\n this._stickyMode = null;\r\n this._active = false;\r\n \r\n delete this._offsetToWindow;\r\n delete this._offsetToParent;\r\n delete this._limits;\r\n }\r\n }, {\r\n key: 'remove',\r\n value: function remove() {\r\n var _this2 = this;\r\n \r\n this._deactivate();\r\n \r\n stickies.some(function (sticky, index) {\r\n if (sticky._node === _this2._node) {\r\n stickies.splice(index, 1);\r\n return true;\r\n }\r\n });\r\n \r\n this._removed = true;\r\n }\r\n }]);\r\n \r\n return Sticky;\r\n }();\r\n \r\n /*\r\n * 5. Stickyfill API\r\n */\r\n \r\n \r\n var Stickyfill = {\r\n stickies: stickies,\r\n Sticky: Sticky,\r\n \r\n forceSticky: function forceSticky() {\r\n seppuku = false;\r\n init();\r\n \r\n this.refreshAll();\r\n },\r\n addOne: function addOne(node) {\r\n // Check whether it’s a node\r\n if (!(node instanceof HTMLElement)) {\r\n // Maybe it’s a node list of some sort?\r\n // Take first node from the list then\r\n if (node.length && node[0]) node = node[0];else return;\r\n }\r\n \r\n // Check if Stickyfill is already applied to the node\r\n // and return existing sticky\r\n for (var i = 0; i < stickies.length; i++) {\r\n if (stickies[i]._node === node) return stickies[i];\r\n }\r\n \r\n // Create and return new sticky\r\n return new Sticky(node);\r\n },\r\n add: function add(nodeList) {\r\n // If it’s a node make an array of one node\r\n if (nodeList instanceof HTMLElement) nodeList = [nodeList];\r\n // Check if the argument is an iterable of some sort\r\n if (!nodeList.length) return;\r\n \r\n // Add every element as a sticky and return an array of created Sticky instances\r\n var addedStickies = [];\r\n \r\n var _loop = function _loop(i) {\r\n var node = nodeList[i];\r\n \r\n // If it’s not an HTMLElement – create an empty element to preserve 1-to-1\r\n // correlation with input list\r\n if (!(node instanceof HTMLElement)) {\r\n addedStickies.push(void 0);\r\n return 'continue';\r\n }\r\n \r\n // If Stickyfill is already applied to the node\r\n // add existing sticky\r\n if (stickies.some(function (sticky) {\r\n if (sticky._node === node) {\r\n addedStickies.push(sticky);\r\n return true;\r\n }\r\n })) return 'continue';\r\n \r\n // Create and add new sticky\r\n addedStickies.push(new Sticky(node));\r\n };\r\n \r\n for (var i = 0; i < nodeList.length; i++) {\r\n var _ret2 = _loop(i);\r\n \r\n if (_ret2 === 'continue') continue;\r\n }\r\n \r\n return addedStickies;\r\n },\r\n refreshAll: function refreshAll() {\r\n stickies.forEach(function (sticky) {\r\n return sticky.refresh();\r\n });\r\n },\r\n removeOne: function removeOne(node) {\r\n // Check whether it’s a node\r\n if (!(node instanceof HTMLElement)) {\r\n // Maybe it’s a node list of some sort?\r\n // Take first node from the list then\r\n if (node.length && node[0]) node = node[0];else return;\r\n }\r\n \r\n // Remove the stickies bound to the nodes in the list\r\n stickies.some(function (sticky) {\r\n if (sticky._node === node) {\r\n sticky.remove();\r\n return true;\r\n }\r\n });\r\n },\r\n remove: function remove(nodeList) {\r\n // If it’s a node make an array of one node\r\n if (nodeList instanceof HTMLElement) nodeList = [nodeList];\r\n // Check if the argument is an iterable of some sort\r\n if (!nodeList.length) return;\r\n \r\n // Remove the stickies bound to the nodes in the list\r\n \r\n var _loop2 = function _loop2(i) {\r\n var node = nodeList[i];\r\n \r\n stickies.some(function (sticky) {\r\n if (sticky._node === node) {\r\n sticky.remove();\r\n return true;\r\n }\r\n });\r\n };\r\n \r\n for (var i = 0; i < nodeList.length; i++) {\r\n _loop2(i);\r\n }\r\n },\r\n removeAll: function removeAll() {\r\n while (stickies.length) {\r\n stickies[0].remove();\r\n }\r\n }\r\n };\r\n \r\n /*\r\n * 6. Setup events (unless the polyfill was disabled)\r\n */\r\n function init() {\r\n if (isInitialized) {\r\n return;\r\n }\r\n \r\n isInitialized = true;\r\n \r\n // Watch for scroll position changes and trigger recalc/refresh if needed\r\n function checkScroll() {\r\n if (window.pageXOffset != scroll.left) {\r\n scroll.top = window.pageYOffset;\r\n scroll.left = window.pageXOffset;\r\n \r\n Stickyfill.refreshAll();\r\n } else if (window.pageYOffset != scroll.top) {\r\n scroll.top = window.pageYOffset;\r\n scroll.left = window.pageXOffset;\r\n \r\n // recalc position for all stickies\r\n stickies.forEach(function (sticky) {\r\n return sticky._recalcPosition();\r\n });\r\n }\r\n }\r\n \r\n checkScroll();\r\n window.addEventListener('scroll', checkScroll);\r\n \r\n // Watch for window resizes and device orientation changes and trigger refresh\r\n window.addEventListener('resize', Stickyfill.refreshAll);\r\n window.addEventListener('orientationchange', Stickyfill.refreshAll);\r\n \r\n //Fast dirty check for layout changes every 500ms\r\n var fastCheckTimer = void 0;\r\n \r\n function startFastCheckTimer() {\r\n fastCheckTimer = setInterval(function () {\r\n stickies.forEach(function (sticky) {\r\n return sticky._fastCheck();\r\n });\r\n }, 500);\r\n }\r\n \r\n function stopFastCheckTimer() {\r\n clearInterval(fastCheckTimer);\r\n }\r\n \r\n var docHiddenKey = void 0;\r\n var visibilityChangeEventName = void 0;\r\n \r\n if ('hidden' in document) {\r\n docHiddenKey = 'hidden';\r\n visibilityChangeEventName = 'visibilitychange';\r\n } else if ('webkitHidden' in document) {\r\n docHiddenKey = 'webkitHidden';\r\n visibilityChangeEventName = 'webkitvisibilitychange';\r\n }\r\n \r\n if (visibilityChangeEventName) {\r\n if (!document[docHiddenKey]) startFastCheckTimer();\r\n \r\n document.addEventListener(visibilityChangeEventName, function () {\r\n if (document[docHiddenKey]) {\r\n stopFastCheckTimer();\r\n } else {\r\n startFastCheckTimer();\r\n }\r\n });\r\n } else startFastCheckTimer();\r\n }\r\n \r\n if (!seppuku) init();\r\n \r\n /*\r\n * 7. Expose Stickyfill\r\n */\r\n if (typeof module != 'undefined' && module.exports) {\r\n module.exports = Stickyfill;\r\n } else if (isWindowDefined) {\r\n window.Stickyfill = Stickyfill;\r\n }\r\n \r\n})(window, document);"],"sourceRoot":""}