require(["tooltip", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Tooltip }]) }); define("observableComponent", ["require", "exports", "htmlExtensions"], function (n, t, i) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = function () { function n(t, i) { i === void 0 && (i = null); this.element = t; this.ignoreNextDOMChange = !1; this.observing = !1; n.shouldInitializeAsClass(t, i) && this.setObserver() } return n.prototype.detach = function () { this.unObserve(); this.teardown() }, n.prototype.isObserving = function () { return this.observing }, n.prototype.unObserve = function () { this.observing = !1; this.modernObserver && this.modernObserver.disconnect(); i.removeEvent(this.element, i.eventTypes.DOMNodeInserted, this.obsoleteNodeInsertedEventHander); i.removeEvent(this.element, i.eventTypes.DOMNodeRemoved, this.obsoleteNodeRemovedEventHandler) }, n.prototype.setObserver = function () { this.observing = !0; typeof n.mutationObserver != "undefined" ? this.observeModern() : "MutationEvent" in window && this.observeObsolete() }, n.prototype.observeModern = function () { var t = this, i = function (n) { t.onModernMutations(n) }; this.modernObserver = new n.mutationObserver(i); this.modernObserver.observe(this.element, { childList: !0, subtree: !0 }) }, n.prototype.onModernMutations = function (n) { var r, u, f, e, i, o, t, s; if (this.ignoreNextDOMChange) { this.ignoreNextDOMChange = !1; return } for (r = !1, u = !1, f = 0, e = n; f < e.length; f++) { for (i = e[f], t = 0, o = i.addedNodes.length; t < o; t++)i.addedNodes[t].nodeType === Node.ELEMENT_NODE && (r = !0, u = !0); for (t = 0, s = i.removedNodes.length; t < s; t++)i.removedNodes[t].nodeType === Node.ELEMENT_NODE && (r = !0, i.removedNodes[t] !== this.element && (u = !0)) } r && this.teardown(); u && this.update() }, n.prototype.observeObsolete = function () { var n = this; this.obsoleteNodeInsertedEventHander = i.addDebouncedEvent(this.element, i.eventTypes.DOMNodeInserted, function () { n.onObsoleteNodeInserted() }); this.obsoleteNodeRemovedEventHandler = i.addDebouncedEvent(this.element, i.eventTypes.DOMNodeRemoved, function (t) { n.onObsoleteNodeRemoved(t) }) }, n.prototype.onObsoleteNodeInserted = function () { this.ignoreNextDOMChange || (this.teardown(), this.update()) }, n.prototype.onObsoleteNodeRemoved = function (n) { this.ignoreNextDOMChange || (this.teardown(), i.getEventTargetOrSrcElement(n) !== this.element && this.update()) }, n.shouldInitializeAsClass = function (t, i) { var r = t ? t.getAttribute(n.mwfClassAttribute) : null, u = t ? t.getAttribute(n.initializeAttribute) : null; return u === "false" ? !1 : !!t && (!r || !!i && r === i.mwfClass) }, n.mwfClassAttribute = "data-mwf-class", n.initializeAttribute = "data-js-initialize", n.mutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver, n }(); t.ObservableComponent = r }); define("htmlExtensions", ["require", "exports", "stringExtensions"], function (n, t, i) { "use strict"; function e(n, t, i, f) { var e, o, s; for (f === void 0 && (f = !1), e = 0, o = u(n); e < o.length; e++)s = o[e], y(s, i, f, r[t]) } function g(n, t, r, f) { var e, s, l, o, h, c; if (f === void 0 && (f = !1), !i.isNullOrWhiteSpace(t)) for (e = 0, s = u(n); e < s.length; e++)for (l = s[e], o = 0, h = t.split(/\s+/); o < h.length; o++)c = h[o], i.isNullOrWhiteSpace(c) || y(l, r, f, c) } function nt(n, t, r, f) { var e, s, l, o, h, c; for (f === void 0 && (f = !1), e = 0, s = u(n); e < s.length; e++)for (l = s[e], o = 0, h = u(t); o < h.length; o++)c = h[o], i.isNullOrWhiteSpace(c) || d(l, r, f, c) } function tt(n) { n = v(n); n && (n.preventDefault ? n.preventDefault() : n.returnValue = !1) } function it(n, t, i, r) { r === void 0 && (r = 150); var f, u = 0, o = function (n) { var t = Date.now(); f && (clearTimeout(f), f = undefined); !!u && t < u + r ? f = setTimeout(function () { u = Date.now(); i(n) }, r - (t - u)) : (u = t, i(n)) }; return e(n, t, o), o } function rt(n, t, r, f, e) { function p(n) { var i, t = 0; return function (r) { var u = Date.now(); clearTimeout(i); !!t && u < t + e ? i = setTimeout(function () { t = u; n(r) }, e - (u - t)) : (t = u, n(r)) } } var o, h, a, s, c, l, v; if (f === void 0 && (f = !1), e === void 0 && (e = 150), !i.isNullOrWhiteSpace(t)) for (o = 0, h = u(n); o < h.length; o++)for (a = h[o], s = 0, c = t.split(/\s+/); s < c.length; s++)l = c[s], i.isNullOrWhiteSpace(l) || (v = p(r), y(a, v, f, l)) } function ut(n, t, i, r) { r === void 0 && (r = 150); var u, f = function (n) { window.clearTimeout(u); u = setTimeout(function () { i(n) }, r) }; return e(n, t, f), f } function ft(n, t) { if (t === void 0 && (t = 5e3), document.readyState === "complete") { n.call(null); return } if (!document.attachEvent && document.readyState === "interactive") { n.call(null); return } var o, i, u, f = function () { clearTimeout(o); i && c(document, r.DOMContentLoaded, i); u && c(document, r.onreadystatechange, u); l.requestAnimationFrame.call(window, n) }; if (o = setTimeout(function () { f("timedout") }, t), document.addEventListener) { i = function () { f("domcontentloaded") }; e(document, r.DOMContentLoaded, i, !1); return } document.attachEvent && (u = function () { document.readyState === "complete" && f("readystatecomplete") }, e(document, r.onreadystatechange, u, !1)) } function et(n, t) { t === void 0 && (t = 5e3); var i, u = setTimeout(function () { clearTimeout(u); c(window, r.load, i); n.call(null) }, t); i = function () { clearTimeout(u); l.requestAnimationFrame.call(window, n) }; document.readyState === "complete" ? (clearTimeout(u), n.call(null)) : e(window, r.load, i) } function p(n, t) { !n || i.isNullOrWhiteSpace(t) || b(n, t) || (n.classList ? n.classList.add(t) : n.className = i.trim(n.className + " " + t)) } function w(n, t) { var o, e, s, r, f; if (!!n && !i.isNullOrWhiteSpace(t)) for (o = " " + i.trim(t) + " ", e = 0, s = u(n); e < s.length; e++)if (r = s[e], r.classList) r.classList.remove(t); else if (!i.isNullOrWhiteSpace(r.className)) { for (f = " " + r.className + " "; f.indexOf(o) > -1;)f = f.replace(o, " "); r.className = i.trim(f) } } function ot(n, t) { var i, r, u; if (t) for (i = 0, r = t; i < r.length; i++)u = r[i], w(n, u) } function st(n, t) { var i, r, u; if (t) for (i = 0, r = t; i < r.length; i++)u = r[i], p(n, u) } function ht(n, t) { var u, f, r; if (n && t) for (u = 0, f = t; u < f.length; u++)r = f[u], i.isNullOrWhiteSpace(r.name) || i.isNullOrWhiteSpace(r.value) || n.setAttribute(r.name, r.value) } function b(n, t) { return !n || i.isNullOrWhiteSpace(t) ? !1 : n.classList ? n.classList.contains(t) : (" " + n.className + " ").indexOf(" " + i.trim(t) + " ") > -1 } function ct(n) { return n ? n.parentElement.removeChild(n) : n } function lt(n, t) { return h(n, t) } function at(n, t) { var i = h(n, t); return !i || !i.length ? null : i[0] } function h(n, t) { var r, u; if (i.isNullOrWhiteSpace(n) || n === "#") return []; if (r = t || document, /^[\#.]?[\w-]+$/.test(n)) { switch (n[0]) { case ".": return r.getElementsByClassName ? o(r.getElementsByClassName(n.slice(1))) : o(r.querySelectorAll(n)); case "#": return u = r.querySelector(n), u ? [u] : [] }return o(r.getElementsByTagName(n)) } return o(r.querySelectorAll(n)) } function vt(n, t) { var i = h(n, t); return !i || !i.length ? null : i[0] } function yt(n, t) { var o = t || document, u, f, i, r, e; for (u = n.split(","), i = 0, r = u; i < r.length; i++)e = r[i], f += this.selectElements(e, o); return f } function o(n) { var i, t; if (!n) return []; for (i = [], t = 0; t < n.length; t++)i.push(n[t]); return i } function pt(n) { for (n === void 0 && (n = document.documentElement); n !== null;) { var t = n.getAttribute("dir"); if (!t) n = n.parentElement; else return t === "rtl" ? s.right : s.left } return s.left } function a(n) { var i, t, r; if (n) { i = n.getBoundingClientRect(); t = {}; for (r in i) t[r] = i[r]; return typeof t.width == "undefined" && (t.width = n.offsetWidth), typeof t.height == "undefined" && (t.height = n.offsetHeight), t } } function wt(n) { if (n) return { width: parseFloat(a(n).width) + parseFloat(f(n, "margin-left")) + parseFloat(f(n, "margin-right")), height: parseFloat(a(n).height) + parseFloat(f(n, "margin-top")) + parseFloat(f(n, "margin-bottom")) } } function f(n, t, r) { if (!n) return null; if (!r && r !== "") return r = n.style[t], i.isNullOrWhiteSpace(r) && (r = getComputedStyle(n), r = r[t]), r; n.style[t] = r } function c(n, t, i, f) { var e, o, s; if (n && t && i) for (e = 0, o = u(n); e < o.length; e++)s = o[e], d(s, i, f, r[t]) } function k(n) { return Array.isArray ? Array.isArray(n) : {}.toString.call(n) === "[object Array]" } function u(n) { return n ? k(n) ? n : typeof n == "string" ? n.split(/\s+/) : [n] : [] } function bt(n, t) { return !!n && n !== t && n.contains(t) } function kt(n, t) { return !!n && n.contains(t) } function dt(n) { return !n ? "" : n.textContent || n.innerText || "" } function gt(n, t) { !n || t === null || (n.textContent ? n.textContent = t : n.innerHTML = t) } function ni(n) { n && (n.innerHTML = "") } function ti(n) { return n = v(n), n.target || n.srcElement } function v(n) { return n || window.event } function y(n, t, i, r) { i === void 0 && (i = !1); !n || (window.addEventListener ? n.addEventListener(r, t, i) : n.attachEvent("on" + r, t)) } function d(n, t, i, r) { i === void 0 && (i = !1); !n || (window.removeEventListener ? n.removeEventListener(r, t, i) : n.detachEvent("on" + r, t)) } function ii(n, t, i) { if (i === void 0 && (i = {}), !n || !t) return null; var f = typeof t == "string" ? t : r[t], u = null; if (i.bubbles = typeof i.bubbles == "undefined" ? !0 : i.bubbles, i.cancelable = typeof i.cancelable == "undefined" ? !0 : i.cancelable, window.CustomEvent && typeof CustomEvent == "function") u = new CustomEvent(f, i), i.changedTouches && i.changedTouches.length && (u.changedTouches = i.changedTouches); else if (document.createEvent) u = document.createEvent("CustomEvent"), u.initCustomEvent(f, i.bubbles, i.cancelable, i.detail), i.changedTouches && i.changedTouches.length && (u.changedTouches = i.changedTouches); else { u = document.createEventObject(); try { n.fireEvent("on" + f, u) } catch (e) { return undefined } return u } return n.dispatchEvent(u), u } function ri(n) { n.stopPropagation ? n.stopPropagation() : n.returnValue = !1 } function ui(n) { return n === void 0 && (n = window), n.scrollY || n.pageYOffset || (n.document.compatMode === "CSS1Compat" ? n.document.documentElement.scrollTop : n.document.body.scrollTop) } function fi(n) { if (!n) return window.document.documentElement; for (var i = n.ownerDocument.documentElement, t = n.offsetParent; t && f(t, "position") == "static";)t = t.offsetParent; return t || i } function ei(n, t) { if (n && t) { var i = t.clientHeight, r = t.scrollHeight; r > i && (t.scrollTop = Math.min(n.offsetTop - t.firstElementChild.offsetTop, r - i)) } } function oi(n) { return typeof n.complete != "undefined" && typeof n.naturalHeight != "undefined" ? n && n.complete && n.naturalHeight > 0 : !0 } function si(n) { return n && typeof n.complete != "undefined" && typeof n.naturalHeight != "undefined" ? n && n.complete && n.naturalWidth == 0 && n.naturalHeight == 0 : !1 } function hi(n) { var i = n.touches && n.touches.length ? n.touches : [n], t = n.changedTouches && n.changedTouches[0] || i[0]; return { x: t.clientX, y: t.clientY } } function ci(n, t) { for (var i = n.matches || n.webkitMatchesSelector || n.mozMatchesSelector || n.msMatchesSelector; n;) { if (i.call(n, t)) break; n = n.parentElement } return n } function li(n, t) { t === void 0 && (t = !0); !!n && (window.PointerEvent || window.navigator.pointerEnabled) && f(n, "touchAction", t ? "pan-y pinch-zoom" : "pan-x pinch-zoom") } var l, s, r; Object.defineProperty(t, "__esModule", { value: !0 }), function (n) { n.requestAnimationFrame = window.requestAnimationFrame || function (n) { typeof n == "function" && window.setTimeout(n, 16.7) } }(l = t.SafeBrowserApis || (t.SafeBrowserApis = {})), function (n) { n[n.right = 0] = "right"; n[n.left = 1] = "left" }(s = t.Direction || (t.Direction = {})), function (n) { n[n.animationend = 0] = "animationend"; n[n.blur = 1] = "blur"; n[n.change = 2] = "change"; n[n.click = 3] = "click"; n[n.DOMContentLoaded = 4] = "DOMContentLoaded"; n[n.DOMNodeInserted = 5] = "DOMNodeInserted"; n[n.DOMNodeRemoved = 6] = "DOMNodeRemoved"; n[n.ended = 7] = "ended"; n[n.error = 8] = "error"; n[n.focus = 9] = "focus"; n[n.focusin = 10] = "focusin"; n[n.focusout = 11] = "focusout"; n[n.input = 12] = "input"; n[n.load = 13] = "load"; n[n.keydown = 14] = "keydown"; n[n.keypress = 15] = "keypress"; n[n.keyup = 16] = "keyup"; n[n.loadedmetadata = 17] = "loadedmetadata"; n[n.mousedown = 18] = "mousedown"; n[n.mousemove = 19] = "mousemove"; n[n.mouseout = 20] = "mouseout"; n[n.mouseover = 21] = "mouseover"; n[n.mouseup = 22] = "mouseup"; n[n.onreadystatechange = 23] = "onreadystatechange"; n[n.resize = 24] = "resize"; n[n.scroll = 25] = "scroll"; n[n.submit = 26] = "submit"; n[n.timeupdate = 27] = "timeupdate"; n[n.touchcancel = 28] = "touchcancel"; n[n.touchend = 29] = "touchend"; n[n.touchmove = 30] = "touchmove"; n[n.touchstart = 31] = "touchstart"; n[n.transitionend = 32] = "transitionend"; n[n.wheel = 33] = "wheel" }(r = t.eventTypes || (t.eventTypes = {})); t.addEvent = e; t.addEvents = g; t.removeEvents = nt; t.preventDefault = tt; t.addThrottledEvent = it; t.addThrottledEvents = rt; t.addDebouncedEvent = ut; t.documentReady = ft; t.onDeferred = et; t.addClass = p; t.removeClass = w; t.removeClasses = ot; t.addClasses = st; t.addAttribute = ht; t.hasClass = b; t.removeElement = ct; t.selectElements = lt; t.selectFirstElement = at; t.selectElementsT = h; t.selectFirstElementT = vt; t.selectElementsFromSelectors = yt; t.nodeListToArray = o; t.getDirection = pt; t.getClientRect = a; t.getClientRectWithMargin = wt; t.css = f; t.removeEvent = c; t.isArray = k; t.toArray = u; t.isDescendant = bt; t.isDescendantOrSelf = kt; t.getText = dt; t.setText = gt; t.removeInnerHtml = ni; t.getEventTargetOrSrcElement = ti; t.getEvent = v; t.customEvent = ii; t.stopPropagation = ri; t.getScrollY = ui; t.getOffsetParent = fi; t.scrollElementIntoView = ei; t.isImageLoadedSuccessfully = oi; t.isImageLoadFailed = si; t.getCoordinates = hi; t.getParent = ci; t.preventDefaultSwipeAction = li }); define("stringExtensions", ["require", "exports"], function (n, t) { "use strict"; function r(n) { return !n || typeof n != "string" || !i(n) } function i(n) { return !n || typeof n != "string" ? n : n.trim ? n.trim() : n.replace(/^\s+|\s+$/g, "") } function u(n, t, i) { return (i === void 0 && (i = !0), !n || !t) ? !1 : (i && (n = n.toLocaleLowerCase(), t = t.toLocaleLowerCase()), n.startsWith) ? n.startsWith(t) : n.indexOf(t) === 0 } function f(n, t, i) { return (i === void 0 && (i = !0), !n || !t) ? !1 : (i && (n = n.toLocaleLowerCase(), t = t.toLocaleLowerCase()), n.endsWith) ? n.endsWith(t) : n.lastIndexOf(t) === n.length - t.length } function e(n, t, i) { if (i === void 0 && (i = !0), !n || !t) return 0; var r = 0; for (i && (n = n.toLocaleLowerCase(), t = t.toLocaleLowerCase()); n.charCodeAt(r) === t.charCodeAt(r);)r++; return r } function o(n) { for (var i = [], t = 1; t < arguments.length; t++)i[t - 1] = arguments[t]; return n.replace(/{(\d+)}/g, function (n, t) { if (t >= i.length) return n; var r = i[t]; return typeof r != "number" && !r ? "" : typeof r == "string" ? r : r.toString() }) } Object.defineProperty(t, "__esModule", { value: !0 }); t.isNullOrWhiteSpace = r; t.trim = i; t.startsWith = u; t.endsWith = f; t.getMatchLength = e; t.format = o }); define("componentFactory", ["require", "exports", "htmlExtensions", "utility", "stringExtensions", "pageBehaviors"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function () { function n() { } return n.create = function (t) { for (var i, r = 0, u = t; r < u.length; r++) { if (i = u[r], !i.c && !i.component) throw "factoryInput should has either component or c to tell the factory what component to create.Eg.ComponentFactory.create([{ c: Carousel] or ComponentFactory.create([component: Carousel]))"; n.createComponent(i.component || i.c, i) } }, n.createComponent = function (t, r) { if (t) { var o = r && r.eventToBind ? r.eventToBind : "", f = r && r.selector ? r.selector : t.selector, s = r && r.context ? r.context : null, u = [], e = function (n, f, e) { var a, c, l, o, h; for (a = r.elements ? r.elements : f ? i.selectElementsT(f, s) : [document.body], c = 0, l = a; c < l.length; c++)o = l[c], o ? (o.mwfInstances || (o.mwfInstances = {}), o.mwfInstances[n] ? u.push(o.mwfInstances[n]) : (h = new t(o, e), (!h.isObserving || h.isObserving()) && (o.mwfInstances[n] = h, u.push(h)))) : console.error("The elements array in ComponentFactory.create() cannnot have a null element in it") }; switch (o) { case "DOMContentLoaded": if (n.onDomReadyHappened) n.callBindFunction(t, f, e, r, u); else { n.domReadyFunctions.push(function () { return n.callBindFunction(t, f, e, r, u) }); break } break; case "load": default: if (n.onDeferredHappened) n.callBindFunction(t, f, e, r, u); else { n.deferredFunctions.push(function () { return n.callBindFunction(t, f, e, r, u) }); break } } } }, n.callBindFunction = function (t, i, u, f, e) { f === void 0 && (f = null); var o = n.getTypeName(t), s = o || i || "", h = f && f.params ? f.params : {}; h.mwfClass = o; r.createPerfMarker(s + "_Begin"); u(o, i, h); r.createPerfMarker(s + "_End"); f && f.callback && f.callback(e) }, n.getTypeName = function (t) { if (t.typeName) return t.typeName; if (t.name) return t.name; var i = n.typeNameRegEx.exec(t.toString()); if (i && i.length > 1) return i[1] }, n.enumerateComponents = function (n, t) { var i, r, u; if (n && t) { i = n.mwfInstances; for (r in i) if (i.hasOwnProperty(r) && (u = i[r], u && !t(r, u))) break } }, n.detach = function (n, t) { var i = n, r; i && i.mwfInstances && !u.isNullOrWhiteSpace(t) && i.mwfInstances.hasOwnProperty(t) && (r = i.mwfInstances[t], i.mwfInstances[t] = null, r && r.detach && r.detach()) }, n.typeNameRegEx = /function\s+(\S+)\s*\(/, n.onLoadTimeoutMs = 6e3, n.onDeferredHappened = !1, n.deferredFunctions = [], n.onDomReadyHappened = !1, n.domReadyFunctions = [], n }(); t.ComponentFactory = e, function () { i.onDeferred(function () { var n, t, r, u; if (e.onDeferredHappened = !0, n = e.deferredFunctions, !n || n.length > 0) for (t = 0, r = n; t < r.length; t++)u = r[t], typeof u == "function" && i.SafeBrowserApis.requestAnimationFrame.call(window, u); e.deferredFunctions = null }, e.onLoadTimeoutMs); i.documentReady(function () { var n, t, r, u; if (e.onDomReadyHappened = !0, n = e.domReadyFunctions, !n || n.length > 0) for (t = 0, r = n; t < r.length; t++)u = r[t], typeof u == "function" && i.SafeBrowserApis.requestAnimationFrame.call(window, u); e.domReadyFunctions = null }, e.onLoadTimeoutMs); new f.PageBehaviors }() }); define("utility", ["require", "exports", "stringExtensions"], function (n, t, i) { "use strict"; function r(n) { return !isNaN(n) && typeof n == "number" } function f() { return window.innerWidth && document.documentElement.clientWidth ? Math.min(window.innerWidth, document.documentElement.clientWidth) : window.innerWidth || document.documentElement.clientWidth } function h() { return window.innerHeight && document.documentElement.clientHeight ? Math.min(window.innerHeight, document.documentElement.clientHeight) : window.innerHeight || document.documentElement.clientHeight } function c(n) { if (n != null) return { width: n.clientWidth, height: n.clientHeight } } function l(n) { var t; if ((n = n || window.event, !n) || (t = n.key || n.keyIdentifier, !t)) return t; switch (t) { case "Left": return "ArrowLeft"; case "Right": return "ArrowRight"; case "Up": return "ArrowUp"; case "Down": return "ArrowDown"; case "Esc": return "Escape"; default: return t } } function a(n) { return n = n || window.event, n == null ? null : n.which || n.keyCode || n.charCode } function v(n, t, i, r, u) { var o = "", f, e; r && (f = new Date, f.setTime(f.getTime() + r * 864e5), o = "; expires=" + f.toUTCString()); e = ""; u && (e = ";domain=" + u); window.document.cookie = n + "=" + encodeURIComponent(t) + o + ("; path=" + i + ";") + e } function y(n) { var t, i; if (!!n) for (t = 0, i = document.cookie.split("; "); t < i.length; t++) { var r = i[t], f = r.indexOf("="), u = e(r.substring(0, f)); if (u === n) return e(r.substring(u.length + 1)) } return null } function e(n) { return n = decodeURIComponent(n.replace("/+/g", " ")), n.indexOf('"') === 0 && (n = n.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, "\\")), n } function p(n) { var u; if (!!n && n.length === 6) { var t = parseInt(n.substring(0, 2), 16), i = parseInt(n.substring(2, 4), 16), r = parseInt(n.substring(4, 6), 16); if (!isNaN(t) && !isNaN(i) && !isNaN(r)) return u = (t * 299 + i * 587 + r * 114) / 255e3, u >= .5 ? 2 : 1 } return null } function w(n, t, i) { return !i || !r(n) || !r(t) || !r(i.left) || !r(i.right) || !r(i.top) || !r(i.bottom) ? !1 : n >= i.left && n <= i.right && t >= i.top && t <= i.bottom } function b(n) { console && console.warn ? console.warn(n) : console && console.error && console.error(n) } function k(n, t) { if ((t || !(o("item").toLowerCase().indexOf("perf_marker_global:true") < 0)) && !i.isNullOrWhiteSpace(n) && window.performance && window.performance.mark) { var r = n.split(" ").join("_"); window.performance.mark(r); window.console && window.console.timeStamp && window.console.timeStamp(r) } } function d(n) { if (i.isNullOrWhiteSpace(n) || !window.performance || !window.performance.mark) return 0; var r = n.split(" ").join("_"), t = window.performance.getEntriesByName(r); return t && t.length ? Math.round(t[t.length - 1].startTime) : 0 } function g(n, t) { var f; if (!r(n)) return "00:00"; f = n < 0; f && (n *= -1); var u = Math.floor(n / 3600), e = n % 3600, o = Math.floor(e / 60), i = ""; return i = t ? u > 0 ? u + ":" : "00:" : u > 0 ? u + ":" : "", n = Math.floor(e % 60), i += (o < 10 ? "0" : "") + o, i += ":" + (n === 0 ? "00" : (n < 10 ? "0" : "") + n), f ? "-" + i : i } function nt(n) { if (!JSON || !JSON.parse) throw new Error("JSON.parse unsupported."); if (!n) throw new Error("Invalid json."); return JSON.parse(n) } function u() { for (var e, t, o, n, f, i, r = [], c = 0; c < arguments.length; c++)r[c] = arguments[c]; if (!r || !r.length) return null; if (e = typeof r[0] == "boolean" && r[0], r.length < 2) return e ? null : r[0]; if (e && r.length < 3) return r[1]; for (t = e ? r[1] : r[0], o = e ? 2 : 1; o < r.length; o++)for (n in r[o]) if (r[o].hasOwnProperty(n)) { if (f = r[o][n], e) { var s = Array.isArray ? Array.isArray(f) : {}.toString.call(f) === "[object Array]", h = !!t[n] && (Array.isArray ? Array.isArray(t[n]) : {}.toString.call(t[n]) === "[object Array]"), l = !s && typeof f == "object", a = !h && !!t[n] && typeof t[n] == "object"; if (s && h) { for (i = 0; i < f.length; i++)s = Array.isArray ? Array.isArray(f[i]) : {}.toString.call(f[i]) === "[object Array]", h = !!t[n][i] && (Array.isArray ? Array.isArray(t[n][i]) : {}.toString.call(t[n][i]) === "[object Array]"), l = !s && typeof f[i] == "object", a = !h && !!t[n][i] && typeof t[n][i] == "object", t[n][i] = s ? u(!0, h ? t[n][i] : [], f[i]) : l ? u(!0, a ? t[n][i] : {}, f[i]) : f[i]; continue } else if (s) { t[n] = u(!0, [], f); continue } else if (l) { t[n] = u(!0, a ? t[n] : {}, f); continue } } t[n] = f } return t } function tt(n, t, i, r, u) { var f = !i || i < 0 ? -1 : Number(new Date) + i; t = t || 100, function e() { var i = n(); if (i && r) r(); else { if (i) return; if (f === -1 || Number(new Date) < f) setTimeout(e, t); else if (u) u(); else return } }() } function o(n, t) { return t === void 0 && (t = !0), s(location.search, n, t) } function it(n, t, i) { return i === void 0 && (i = !0), s(n, t, i) } function s(n, t, i) { if (i === void 0 && (i = !0), !t || !n) return ""; var r = "[\\?&]" + t.replace(/[\[\]]/g, "\\$&") + "=([^&#]*)", f = i ? new RegExp(r, "i") : new RegExp(r), u = f.exec(n); return u === null ? "" : decodeURIComponent(u[1].replace(/\+/g, " ")) } function rt(n, t) { var i, r; if (!t) return n; if (n.indexOf("//") === -1) throw 'To avoid unexpected results in URL parsing, url must begin with "http://", "https://", or "//"'; return i = document.createElement("a"), i.href = n, i.search = (i.search ? i.search + "&" : "?") + t, r = i.href, i = null, r } function ut(n, t) { try { if (!window.sessionStorage || !n || !t) return; sessionStorage.setItem(n, t) } catch (i) { } } function ft(n) { try { return !window.sessionStorage || !n ? null : sessionStorage.getItem(n) } catch (t) { return null } } function et(n, t) { try { if (!window.localStorage || !n || !t) return; localStorage.setItem(n, t) } catch (i) { } } function ot(n) { try { return !window.localStorage || !n ? null : localStorage.getItem(n) } catch (t) { return null } } function st() { return window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0 } Object.defineProperty(t, "__esModule", { value: !0 }); t.isNumber = r; t.getWindowWidth = f; t.getWindowHeight = h; t.getDimensions = c; t.getVirtualKey = l; t.getKeyCode = a; t.setCookie = v; t.getCookie = y; t.detectContrast = p; t.pointInRect = w; t.apiDeprecated = b; t.createPerfMarker = k; t.getPerfMarkerValue = d; t.toElapsedTimeString = g; t.parseJson = nt; t.extend = u; t.poll = tt; t.getQSPValue = o; t.getQSPFromUrl = it; t.addQSP = rt; t.saveToSessionStorage = ut; t.getValueFromSessionStorage = ft; t.saveToLocalStorage = et; t.getValueFromLocalStorage = ot; t.getScrollTop = st; var ht; (function (n) { function t() { var t; if (window.matchMedia) { for (t = 0; t < n.allWidths.length; ++t)if (!window.matchMedia("(min-width:" + n.allWidths[t] + "px)").matches) return t } else for (t = 0; t < n.allWidths.length; ++t)if (!(f() >= n.allWidths[t])) return t; return n.allWidths.length } n.allWidths = [320, 540, 768, 1084, 1400, 1779]; n.vpMin = n.allWidths[0]; n.vpMax = 2048; n.getViewport = t })(ht = t.Viewports || (t.Viewports = {})) }); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault; (function (n) { function t(n, t) { return n !== i && (typeof Object.create == "function" ? Object.defineProperty(n, "__esModule", { value: !0 }) : n.__esModule = !0), function (i, r) { return n[i] = t ? t(i, r) : r } } var i = typeof global == "object" ? global : typeof self == "object" ? self : typeof this == "object" ? this : {}; typeof define == "function" && define.amd ? define("tslib", ["exports"], function (r) { n(t(i, t(r))) }) : typeof module == "object" && typeof module.exports == "object" ? n(t(i, t(module.exports))) : n(t(i)) })(function (n) { var t = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (n, t) { n.__proto__ = t } || function (n, t) { for (var i in t) t.hasOwnProperty(i) && (n[i] = t[i]) }; __extends = function (n, i) { function r() { this.constructor = n } t(n, i); n.prototype = i === null ? Object.create(i) : (r.prototype = i.prototype, new r) }; __assign = Object.assign || function (n) { for (var t, r, i = 1, u = arguments.length; i < u; i++) { t = arguments[i]; for (r in t) Object.prototype.hasOwnProperty.call(t, r) && (n[r] = t[r]) } return n }; __rest = function (n, t) { var u = {}, r; for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && t.indexOf(i) < 0 && (u[i] = n[i]); if (n != null && typeof Object.getOwnPropertySymbols == "function") for (r = 0, i = Object.getOwnPropertySymbols(n); r < i.length; r++)t.indexOf(i[r]) < 0 && (u[i[r]] = n[i[r]]); return u }; __decorate = function (n, t, i, r) { var f = arguments.length, u = f < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, i) : r, e, o; if (typeof Reflect == "object" && typeof Reflect.decorate == "function") u = Reflect.decorate(n, t, i, r); else for (o = n.length - 1; o >= 0; o--)(e = n[o]) && (u = (f < 3 ? e(u) : f > 3 ? e(t, i, u) : e(t, i)) || u); return f > 3 && u && Object.defineProperty(t, i, u), u }; __param = function (n, t) { return function (i, r) { t(i, r, n) } }; __metadata = function (n, t) { if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(n, t) }; __awaiter = function (n, t, i, r) { return new (i || (i = Promise))(function (u, f) { function o(n) { try { e(r.next(n)) } catch (t) { f(t) } } function s(n) { try { e(r["throw"](n)) } catch (t) { f(t) } } function e(n) { n.done ? u(n.value) : new i(function (t) { t(n.value) }).then(o, s) } e((r = r.apply(n, t || [])).next()) }) }; __generator = function (n, t) { function o(n) { return function (t) { return s([n, t]) } } function s(e) { if (f) throw new TypeError("Generator is already executing."); while (r) try { if (f = 1, u && (i = u[e[0] & 2 ? "return" : e[0] ? "throw" : "next"]) && !(i = i.call(u, e[1])).done) return i; (u = 0, i) && (e = [0, i.value]); switch (e[0]) { case 0: case 1: i = e; break; case 4: return r.label++, { value: e[1], done: !1 }; case 5: r.label++; u = e[1]; e = [0]; continue; case 7: e = r.ops.pop(); r.trys.pop(); continue; default: if (!(i = r.trys, i = i.length > 0 && i[i.length - 1]) && (e[0] === 6 || e[0] === 2)) { r = 0; continue } if (e[0] === 3 && (!i || e[1] > i[0] && e[1] < i[3])) { r.label = e[1]; break } if (e[0] === 6 && r.label < i[1]) { r.label = i[1]; i = e; break } if (i && r.label < i[2]) { r.label = i[2]; r.ops.push(e); break } i[2] && r.ops.pop(); r.trys.pop(); continue }e = t.call(n, r) } catch (o) { e = [6, o]; u = 0 } finally { f = i = 0 } if (e[0] & 5) throw e[1]; return { value: e[0] ? e[1] : void 0, done: !0 } } var r = { label: 0, sent: function () { if (i[0] & 1) throw i[1]; return i[1] }, trys: [], ops: [] }, f, u, i, e; return e = { next: o(0), "throw": o(1), "return": o(2) }, typeof Symbol == "function" && (e[Symbol.iterator] = function () { return this }), e }; __exportStar = function (n, t) { for (var i in n) t.hasOwnProperty(i) || (t[i] = n[i]) }; __values = function (n) { var t = typeof Symbol == "function" && n[Symbol.iterator], i = 0; return t ? t.call(n) : { next: function () { return n && i >= n.length && (n = void 0), { value: n && n[i++], done: !n } } } }; __read = function (n, t) { var i = typeof Symbol == "function" && n[Symbol.iterator], r, u, f, e; if (!i) return n; r = i.call(n); f = []; try { while ((t === void 0 || t-- > 0) && !(u = r.next()).done) f.push(u.value) } catch (o) { e = { error: o } } finally { try { u && !u.done && (i = r["return"]) && i.call(r) } finally { if (e) throw e.error; } } return f }; __spread = function () { for (var n = [], t = 0; t < arguments.length; t++)n = n.concat(__read(arguments[t])); return n }; __await = function (n) { return this instanceof __await ? (this.v = n, this) : new __await(n) }; __asyncGenerator = function (n, t, i) { function e(n) { o[n] && (u[n] = function (t) { return new Promise(function (i, u) { r.push([n, t, i, u]) > 1 || f(n, t) }) }) } function f(n, t) { try { h(o[n](t)) } catch (i) { s(r[0][3], i) } } function h(n) { n.value instanceof __await ? Promise.resolve(n.value.v).then(c, l) : s(r[0][2], n) } function c(n) { f("next", n) } function l(n) { f("throw", n) } function s(n, t) { (n(t), r.shift(), r.length) && f(r[0][0], r[0][1]) } if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var o = i.apply(n, t || []), u, r = []; return u = {}, e("next"), e("throw"), e("return"), u[Symbol.asyncIterator] = function () { return this }, u }; __asyncDelegator = function (n) { function i(i, u) { n[i] && (t[i] = function (t) { return (r = !r) ? { value: __await(n[i](t)), done: i === "return" } : u ? u(t) : t }) } var t, r; return t = {}, i("next"), i("throw", function (n) { throw n; }), i("return"), t[Symbol.iterator] = function () { return this }, t }; __asyncValues = function (n) { if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); var t = n[Symbol.asyncIterator]; return t ? t.call(n) : typeof __values == "function" ? __values(n) : n[Symbol.iterator]() }; __makeTemplateObject = function (n, t) { return Object.defineProperty ? Object.defineProperty(n, "raw", { value: t }) : n.raw = t, n }; __importStar = function (n) { var t, i; if (n && n.__esModule) return n; if (t = {}, n != null) for (i in n) Object.hasOwnProperty.call(n, i) && (t[i] = n[i]); return t["default"] = n, t }; __importDefault = function (n) { return n && n.__esModule ? n : { "default": n } }; n("__extends", __extends); n("__assign", __assign); n("__rest", __rest); n("__decorate", __decorate); n("__param", __param); n("__metadata", __metadata); n("__awaiter", __awaiter); n("__generator", __generator); n("__exportStar", __exportStar); n("__values", __values); n("__read", __read); n("__spread", __spread); n("__await", __await); n("__asyncGenerator", __asyncGenerator); n("__asyncDelegator", __asyncDelegator); n("__asyncValues", __asyncValues); n("__makeTemplateObject", __makeTemplateObject); n("__importStar", __importStar); n("__importDefault", __importDefault) }); require(["tooltip", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Tooltip }]) }); define("choiceSummary", ["require", "exports", "tslib", "observableComponent", "htmlExtensions", "utility"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function (n) { function t(i) { var r = n.call(this, i) || this; return r.closeSummaryAndRemoveEvent = function () { u.removeEvent(r.closeSummaryButton, u.eventTypes.click, r.closeSummaryAndRemoveEvent); u.removeElement(r.element) }, r.onDropdownClicked = function (n) { u.preventDefault(n); r.toggleVisibility(); r.choiceOptions && r.choiceOptions.length > 0 && r.choiceOptions[0].focus() }, r.onNonDropdownClick = function (n) { var t = u.getEventTargetOrSrcElement(n); r.isVisible || r.element.contains(t) || r.toggleVisibility() }, r.replaceText = function (n) { var i, f; r.checkedChoiceOption = n.target; i = r.checkedChoiceOption.parentNode; r.label = u.selectFirstElement(t.spanSelector, i); f = r.labelText + r.separator + " " + u.getText(r.label); u.setText(r.dropdownText, f) }, r.toggleVisibility = function () { var n, i, u; for (r.isVisible = !r.isVisible, n = 0, i = r.choiceOptions; n < i.length; n++)u = i[n], r.isVisible ? u.setAttribute("tabindex", "-1") : u.setAttribute("tabindex", "0"); r.dropdownMenu.setAttribute(t.ariaHidden, "" + r.isVisible); r.dropdownMenu.setAttribute(t.ariaExpanded, "" + !r.isVisible); r.dropdownButton.setAttribute(t.ariaExpanded, "" + !r.isVisible); r.element.setAttribute(t.ariaExpanded, "" + !r.isVisible) }, r.onControlKeyboard = function (n) { n = u.getEvent(n); var e = f.getKeyCode(n), i = u.selectFirstElement(t.dropdownButtonSelector, r.element), o = u.selectFirstElement(".c-menu", r.element); switch (e) { case 27: o.setAttribute("aria-hidden", "true"); i.setAttribute("aria-expanded", "false"); setTimeout(function () { i.focus() }, 0) } }, r.update(), r } return i.__extends(t, n), t.prototype.update = function () { var n, i, r; if (this.dropdownButton = u.selectFirstElement(t.dropdownButtonSelector, this.element), this.dropdownMenu = u.selectFirstElement(t.dropdownMenuSelector, this.element), this.dropdownText = u.selectFirstElement(t.separatorSpanSelector, this.element), this.separator = this.dropdownText.getAttribute(t.separatorSelector), this.closeSummaryButton = u.selectFirstElement("button.c-action-trigger.c-glyph.glyph-cancel", this.element), this.labelText = u.getText(this.dropdownText), this.dropdownButton && this.separator && this.dropdownMenu && this.dropdownText && this.labelText) for (this.choiceOptions = u.selectElementsT(t.choiceOptionSelector, this.element), this.isVisible = this.dropdownMenu.getAttribute(t.ariaHidden) === "true", this.dropdownMenu.setAttribute(t.ariaExpanded, "" + !this.isVisible), u.addEvent(this.dropdownButton, u.eventTypes.click, this.onDropdownClicked), u.addEvent(document, u.eventTypes.click, this.onNonDropdownClick), u.addEvent(this.choiceOptions, u.eventTypes.click, this.replaceText), u.addEvent(this.choiceOptions, u.eventTypes.keydown, this.onControlKeyboard), n = 0, i = this.choiceOptions; n < i.length; n++)if (r = i[n], r.checked) { this.checkedChoiceOption = r; break } !this.closeSummaryButton || u.addEvent(this.closeSummaryButton, u.eventTypes.click, this.closeSummaryAndRemoveEvent, !1) }, t.prototype.teardown = function () { u.removeEvent(this.dropdownButton, u.eventTypes.click, this.onDropdownClicked); u.removeEvent(document, u.eventTypes.click, this.onNonDropdownClick); u.removeEvent(this.choiceOptions, u.eventTypes.click, this.replaceText); u.removeEvent(this.choiceOptions, u.eventTypes.keydown, this.onControlKeyboard) }, t.selector = ".c-choice-summary", t.typeName = "ChoiceSummary", t.dropdownButtonSelector = ".c-action-trigger.glyph-chevron-down", t.dropdownMenuSelector = "ul", t.ariaHidden = "aria-hidden", t.ariaLabel = "aria-label", t.ariaExpanded = "aria-expanded", t.separatorSpanSelector = ".c-choice-summary > span", t.spanSelector = "span", t.separatorSelector = "data-js-separator", t.labelSelector = "label", t.choiceOptionSelector = 'input[type="radio"]', t }(r.ObservableComponent); t.ChoiceSummary = e }); require(["choiceSummary", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.ChoiceSummary }]) }); define("tooltip", ["require", "exports", "tslib", "observableComponent", "htmlExtensions", "utility"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function (n) { function t(t) { var i = n.call(this, t) || this; return i.isVisible = !1, i.timer = 0, i.exposeToScreenReaders = !0, i.onFocus = function (n) { n = u.getEvent(n); n && n.type !== "mouseover" && i.actOnFocus() }, i.handleKeydownWhenFocused = function (n) { if (i.isVisible) { n = u.getEvent(n); var t = f.getKeyCode(n); switch (t) { case 27: i.hide(); break; case 38: case 40: u.preventDefault(n) } } }, i.onBlur = function () { i.hide(); u.addEvent(i.controller, u.eventTypes.focus, i.onFocus); u.removeEvent(i.controller, u.eventTypes.blur, i.onBlur); u.removeEvent(i.controller, u.eventTypes.keydown, i.handleKeydownWhenFocused) }, i.onMouseOver = function (n) { i.isVisible || (n = u.getEvent(n), i.tooltipXPosition = n.clientX, i.tooltipYPosition = n.clientY, i.actOnMouseOver()) }, i.onMouseOut = function () { i.timer > 0 && (window.clearTimeout(i.timer), i.timer = 0); i.hide(); u.removeEvent(i.controller, u.eventTypes.mouseout, i.onMouseOut); u.addEvent(i.controller, u.eventTypes.mouseover, i.onMouseOver) }, i.showForMouse = function () { i.show(); u.removeEvent(i.controller, u.eventTypes.mouseover, i.onMouseOver) }, i.onScroll = function () { i.isVisible && !i.animationFrameRequested && (i.animationFrameRequested = !0, u.SafeBrowserApis.requestAnimationFrame.call(window, function () { return i.handleScroll() })) }, i.update(), i } return i.__extends(t, n), t.prototype.update = function () { if (this.element) { var n = this.element.getAttribute("id"); this.controller = u.selectFirstElement("[" + t.ariaDescribedByAttribute + '="' + n + '"]'); this.controller || (this.controller = u.selectFirstElement("[" + t.dataDescribedByAttribute + '="' + n + '"]'), this.exposeToScreenReaders = !this.controller ? !0 : !1); this.element.setAttribute(t.ariaHidden, "true"); this.exposeToScreenReaders || u.addClass(this.element, t.hiddenFromScreenReadersClass); this.exposeToScreenReaders && this.element.setAttribute(t.ariaHidden, "false"); !this.controller || (u.addEvent(this.controller, u.eventTypes.mouseover, this.onMouseOver), u.addEvent(this.controller, u.eventTypes.focus, this.onFocus), u.addEvent(window, u.eventTypes.scroll, this.onScroll)) } }, t.prototype.teardown = function () { u.removeEvent(this.controller, u.eventTypes.mouseover, this.onMouseOver); u.removeEvent(this.controller, u.eventTypes.mouseout, this.onMouseOut); u.removeEvent(this.controller, u.eventTypes.focus, this.onFocus); u.removeEvent(this.controller, u.eventTypes.blur, this.onBlur); u.removeEvent(window, u.eventTypes.scroll, this.onScroll); this.controller = null; this.isVisible = !1; this.tooltipXPosition = 0; this.tooltipYPosition = 0; this.timer > 0 && (window.clearTimeout(this.timer), this.timer = 0) }, t.prototype.actOnFocus = function () { var n = u.getClientRect(this.controller); this.tooltipXPosition = n.left; this.tooltipYPosition = n.bottom; this.show(); u.addEvent(this.controller, u.eventTypes.blur, this.onBlur); u.addEvent(this.controller, u.eventTypes.keydown, this.handleKeydownWhenFocused); u.removeEvent(this.controller, u.eventTypes.focus, this.onFocus) }, t.prototype.actOnMouseOver = function () { this.timer = window.setTimeout(this.showForMouse, t.timerDelay); u.addEvent(this.controller, u.eventTypes.mouseout, this.onMouseOut) }, t.prototype.handleScroll = function () { this.animationFrameRequested = !1; var n = u.getScrollY(), t = this.scrollYOnShow - n }, t.prototype.show = function () { this.isVisible = !0; this.scrollYOnShow = u.getScrollY() }, t.prototype.hide = function () { !!this.element && this.isVisible && (this.isVisible = !1, this.exposeToScreenReaders && this.element.setAttribute(t.ariaHidden, "true")) }, t.prototype.setContent = function (n) { !this.element || u.setText(this.element, n) }, t.prototype.setPosition = function (n) { n && (!n.left || u.css(this.element, "left", n.left + "px"), !n.top || u.css(this.element, "top", n.top + "px")) }, t.selector = ".c-tooltip", t.typeName = "Tooltip", t.ariaHidden = "aria-hidden", t.hiddenClass = "x-hidden", t.timerDelay = 800, t.hookFocus = "hook-focus", t.hookHover = "hook-hover", t.ariaDescribedByAttribute = "aria-describedby", t.dataDescribedByAttribute = "data-f-describedby", t.hiddenFromScreenReadersClass = "f-hidden-from-screen-readers", t }(r.ObservableComponent); t.Tooltip = e }); require(["tooltip", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Tooltip }]) }); define("publisher", ["require", "exports", "tslib", "observableComponent"], function (n, t, i, r) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var u = function (n) { function t(t, i) { i === void 0 && (i = null); var r = n.call(this, t, i) || this; return r.element = t, r } return i.__extends(t, n), t.prototype.subscribe = function (n) { if (!n) return !1; if (this.subscribers) { if (this.subscribers.indexOf(n) !== -1) return !1 } else this.subscribers = []; return this.subscribers.push(n), !0 }, t.prototype.unsubscribe = function (n) { if (!n || !this.subscribers || !this.subscribers.length) return !1; var t = this.subscribers.indexOf(n); return t === -1 ? !1 : (this.subscribers.splice(t, 1), !0) }, t.prototype.hasSubscribers = function () { return !!this.subscribers && this.subscribers.length > 0 }, t.prototype.initiatePublish = function (n) { var t, i, r; if (this.hasSubscribers()) for (t = 0, i = this.subscribers; t < i.length; t++)r = i[t], this.publish(r, n) }, t.prototype.update = function () { }, t.prototype.teardown = function () { }, t }(r.ObservableComponent); t.Publisher = u }); require(["actionToggle", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.ActionToggle }]) }); define("alert", ["require", "exports", "tslib", "publisher", "htmlExtensions"], function (n, t, i, r, u) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var f = function (n) { function t(t) { var i = n.call(this, t) || this; return i.closeAlertAndRemoveEvent = function () { u.removeEvent(i.closeButton, u.eventTypes.click, i.closeAlertAndRemoveEvent); u.removeElement(i.element); i.initiatePublish() }, i.update(), i } return i.__extends(t, n), t.prototype.update = function () { this.element && (this.closeButton = u.selectFirstElement("button.c-action-trigger.glyph-cancel", this.element), !this.closeButton || u.addEvent(this.closeButton, u.eventTypes.click, this.closeAlertAndRemoveEvent, !1)) }, t.prototype.teardown = function () { u.removeEvent(this.closeButton, u.eventTypes.click, this.closeAlertAndRemoveEvent, !1) }, t.prototype.publish = function (n) { n.onAlertClosed() }, t.selector = ".m-alert", t.typeName = "Alert", t }(r.Publisher); t.Alert = f }); require(["alert", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Alert }]) }); define("ambientVideo", ["require", "exports", "tslib", "htmlExtensions", "observableComponent"], function (n, t, i, r, u) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var f = function (n) { function t(t) { var i = n.call(this, t) || this; return (i.observer = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver, !t) ? i : (i.update(), i) } return i.__extends(t, n), t.prototype.update = function () { var t = this, n; this.htmlRoot = r.selectFirstElement("html"); this.videoElement = r.selectFirstElement("video", this.element); n = { attributes: !0, childList: !0, characterData: !0 }; typeof MutationObserver != "undefined" ? (this.observer = new MutationObserver(function (n) { n.forEach(function () { t.checkReduceMotion() }) }), this.observer.observe(this.htmlRoot, n)) : r.addEvent(document, r.eventTypes.DOMNodeInserted, this.reduceMotion); this.checkReduceMotion() }, t.prototype.checkReduceMotion = function () { r.hasClass(this.htmlRoot, "context-set-motion-limited") && this.reduceMotion() }, t.prototype.reduceMotion = function () { this.videoElement.hasAttribute("autoplay") && this.videoElement.removeAttribute("autoplay"); this.videoElement.hasAttribute("loop") && this.videoElement.removeAttribute("loop"); this.videoElement.pause() }, t.prototype.teardown = function () { typeof MutationObserver != "undefined" ? this.observer.disconnect() : r.removeEvent(document, r.eventTypes.DOMNodeInserted, this.reduceMotion) }, t.selector = ".m-ambient-video", t.typeName = "AmbientVideo", t }(u.ObservableComponent); t.AmbientVideo = f }); require(["ambientVideo", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.AmbientVideo }]) }); define("autosuggest", ["require", "exports", "tslib", "publisher", "htmlExtensions", "stringExtensions", "utility"], function (n, t, i, r, u, f, e) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var o = function (n) { function t(i, r) { var o, s; return r === void 0 && (r = null), o = n.call(this, i, e.isNumber(r) ? {} : r) || this, o.hideNoResults = !1, o.suggestionClickListeners = [], o.publishInProgress = [], o.updateSuggestions = function (n) { o.publishInProgress.length > 0 && o.publishInProgress.pop(); var t = o.reconstructMenu(n); o.show(); t && o.setFocusToInput() }, o.handleInputKeyup = function (n) { o.input && o.input.value && (o.cachedInputValue = o.input.value); switch (e.getKeyCode(n)) { case 9: break; case 27: break; case 38: break; case 40: break; default: o.initiatePublish({ notification: "onMatchPatternChanged", properties: { pattern: o.input.value } }); o.publishInProgress.push(!0) } }, o.handleInputKeydown = function (n) { switch (e.getKeyCode(n)) { case 9: case 27: o.hide(); break; case 38: u.preventDefault(n); o.handleInputArrowKey(!0); break; case 40: u.preventDefault(n); o.handleInputArrowKey(!1) } }, o.handleMenuKeydown = function (n) { switch (e.getKeyCode(n)) { case 13: o.selectSuggestion(o.selectedSuggestion, !0); break; case 27: o.hide(); break; case 38: u.preventDefault(n); o.handleMenuArrowKey(!0); break; case 40: u.preventDefault(n); o.handleMenuArrowKey(!1) } }, o.handleClickWhenMenuOpen = function (n) { o.closeMenuFromClick(u.getEventTargetOrSrcElement(n)) }, o.handleInputClick = function () { o.show() }, o.selectSuggestionFromClick = function (n) { o.selectSuggestion(n, !0) }, o.buildStringSuggestionHtml = function (n, t) { var i = document.createElement("li"); i.setAttribute("class", "c-menu-item"); i.setAttribute("role", "presentation"); i.setAttribute("title", n); i.innerHTML = '' + o.highlight(n) + "<\/span>"; u.addAttribute(i, t); o.ignoreNextDOMChange = !0; o.menu.appendChild(i) }, o.buildProductSuggestionHtml = function (n, t) { var e = !n.category ? "" : " - " + n.category, r = document.createElement("li"), i, s, h, c, l; r.setAttribute("class", "c-menu-item"); r.setAttribute("role", "presentation"); r.setAttribute("title", n.title + e); o.searchable(r, !1); i = document.createElement("a"); i.setAttribute("role", "option"); i.setAttribute("aria-label", n.title + e + " - Link"); i.setAttribute("class", "f-product"); i.setAttribute("href", n.targetUrl); u.addAttribute(i, t); s = ""; n.imageSrc && (h = "", c = 'class="c-image' + (n.isImageRound ? " f-round" : "") + '"', f.isNullOrWhiteSpace(n.backgroundColor) || n.backgroundColor.toLowerCase() === "transparent" || (h = 'style="background:' + n.backgroundColor + '"'), s = "' + (n.title + e) + ''); l = n.category ? '' + n.category + "<\/span>" : ""; i.innerHTML = s + "
" + o.highlight(n.title) + "<\/span>" + l + "<\/div>"; r.appendChild(i); o.ignoreNextDOMChange = !0; o.menu.appendChild(r) }, o.setFocusToInput = function () { o.input && o.input.focus() }, e.isNumber(r) ? s = r : r && (e.isNumber(r.scrollLimit) && (s = r.scrollLimit), r.hideNoResults && (o.hideNoResults = r.hideNoResults)), o.itemScrollCount = Math.max(t.minimumItemScrollCount, s || t.defaultItemScrollCount), o.update(), o } return i.__extends(t, n), t.prototype.update = function () { this.element && (this.input = u.selectFirstElement("[aria-controls=" + this.element.id + "]"), this.input) && (this.element.getAttribute("role") === "combobox" && (this.input.setAttribute("role", "combobox"), this.element.setAttribute("role", "")), this.menu = u.selectFirstElement(".c-menu", this.element), this.menu) && (this.hideNoResults || (this.noResults = u.selectFirstElement(".f-auto-suggest-no-results", this.element), this.noResults && (this.noResultsItem = u.selectFirstElement(".c-menu-item span", this.noResults)), this.noResultsItem && (this.noResultsString = this.noResultsItem.textContent)), this.form = this.element.parentElement, this.form) && (this.addMenuStateAnnouncement(), u.addEvent(this.input, u.eventTypes.keyup, this.handleInputKeyup, !0), u.addEvent(this.input, u.eventTypes.keydown, this.handleInputKeydown, !0), u.addEvent(this.input, u.eventTypes.click, this.handleInputClick, !0), this.reconstructMenu(null, !0)) }, t.prototype.teardown = function () { u.removeEvent(this.input, u.eventTypes.keyup, this.handleInputKeyup, !0); u.removeEvent(this.input, u.eventTypes.keydown, this.handleInputKeydown, !0); u.removeEvent(this.input, u.eventTypes.click, this.handleInputClick, !0); u.removeEvent(document.body, u.eventTypes.click, this.handleClickWhenMenuOpen); for (var n = 0; n < this.suggestions.length; ++n)u.removeEvent(this.suggestions[n], u.eventTypes.keydown, this.handleMenuKeydown), u.removeEvent(this.suggestions[n], u.eventTypes.click, this.suggestionClickListeners[n++]); this.form = null; this.input = null; this.menu = null; this.noResults = null; this.suggestions = null; this.selectedSuggestion = null }, t.prototype.searchable = function (n, t) { var i = "data-is-searchable"; if (t === undefined) return n.getAttribute(i) !== "false"; n.setAttribute(i, t.toString()) }, t.prototype.publish = function (n, t) { if (n.onMatchPatternChanged && t.notification === "onMatchPatternChanged") n.onMatchPatternChanged(t.properties); else if (n.onSuggestionSelected && t.notification === "onSuggestionSelected") n.onSuggestionSelected(t.properties) }, t.prototype.handleInputArrowKey = function (n) { var t = this.suggestions, r = this.suggestions ? this.suggestions.length : 0, i; r > 0 && (!this.selectedSuggestion && n ? this.selectSuggestion(t[r - 1]) : this.selectedSuggestion ? (i = t.indexOf(this.selectedSuggestion), n && i === 0 ? this.selectSuggestion(t[r - 1]) : n ? this.selectSuggestion(t[i - 1]) : i === r - 1 ? this.selectSuggestion(t[0]) : this.selectSuggestion(t[i + 1])) : this.selectSuggestion(t[0])) }, t.prototype.handleMenuArrowKey = function (n) { var i = this.suggestions, r = this.suggestions ? this.suggestions.length : 0, t; r > 0 && (t = i.indexOf(this.selectedSuggestion), n && t === 0 || !n && t === r - 1 ? (this.input.value = this.cachedInputValue, this.setFocusToInput(), this.selectedSuggestion.setAttribute("data-selected", "false"), this.selectedSuggestion = null) : n ? this.selectSuggestion(i[t - 1]) : this.selectSuggestion(i[t + 1])) }, t.prototype.selectSuggestion = function (n, t) { var i, r, f; (t === void 0 && (t = !1), n) && (this.selectedSuggestion && this.selectedSuggestion.setAttribute("data-selected", "false"), this.selectedSuggestion = n, this.selectedSuggestion.setAttribute("data-selected", "true"), u.selectFirstElement("li > a, li > span", this.selectedSuggestion).focus(), i = "product", this.searchable(this.selectedSuggestion) ? (r = u.getText(this.selectedSuggestion), this.input.value = r, i = "term") : this.publishInProgress.length === 0 && (this.input.value = ""), t && (this.hide(), f = this.suggestions.indexOf(this.selectedSuggestion), this.initiatePublish({ notification: "onSuggestionSelected", properties: { srchq: this.cachedInputValue, suggestion: this.selectedSuggestion, suggestionType: i, aslinkpos: f, qrylngth: this.cachedInputValue.length, resultselected: this.selectedSuggestion.innerText } }), this.searchable(this.selectedSuggestion) && typeof this.form.submit == "function" && this.form.submit())) }, t.prototype.hide = function () { this.menu.setAttribute(t.ariaHidden, "true"); this.noResults && this.noResultsItem && (this.noResults.setAttribute(t.ariaHidden, "true"), this.noResultsItem.removeAttribute("aria-label"), this.noResultsItem.textContent = ""); this.input.setAttribute(t.ariaExpanded, "false"); u.setText(this.ariaLiveRegion, ""); u.removeEvent(document.body, u.eventTypes.click, this.handleClickWhenMenuOpen) }, t.prototype.show = function () { if (f.isNullOrWhiteSpace(this.input.value)) { this.hide(); return } if (this.input.setAttribute(t.ariaExpanded, "true"), this.suggestions && this.suggestions.length) u.setText(this.ariaLiveRegion, this.suggestions.length + " " + this.menuOpenLocString); else { !this.hideNoResults && this.noResults && this.noResultsItem && (this.noResults.setAttribute(t.ariaHidden, "false"), this.noResultsItem.setAttribute("aria-label", this.noResultsString), this.noResultsItem.textContent = this.noResultsString); this.menu.setAttribute(t.ariaHidden, "true"); u.setText(this.ariaLiveRegion, "0 " + this.menuOpenLocString); return } !this.hideNoResults && this.noResults && this.noResults.setAttribute(t.ariaHidden, "true"); this.menu.setAttribute(t.ariaHidden, "false"); u.hasClass(this.menu, "f-auto-suggest-scroll") && u.css(this.menu, "maxHeight", this.suggestions[0].offsetHeight * this.itemScrollCount + "px"); u.addEvent(document.body, u.eventTypes.click, this.handleClickWhenMenuOpen) }, t.prototype.closeMenuFromClick = function (n) { this.form.contains(n) || this.hide() }, t.prototype.reconstructMenu = function (n, t) { var s = this, f, o, i, h, r, e; if (t === void 0 && (t = !1), this.suggestions = null, this.suggestionClickListeners = [], !t) for (this.ignoreNextDOMChange = !0, u.removeInnerHtml(this.menu), f = 0, o = n; f < o.length; f++) { i = o[f]; switch (i.type) { case "string": this.buildStringSuggestionHtml(i.value, i.attributes); break; case "product": this.buildProductSuggestionHtml(i.value, i.attributes) } } for (this.suggestions = u.nodeListToArray(this.menu.children), h = function (n) { u.addEvent(r.suggestions[n], u.eventTypes.keydown, r.handleMenuKeydown); u.addEvent(r.suggestions[n], u.eventTypes.click, r.suggestionClickListeners[n] = function () { s.selectSuggestionFromClick(s.suggestions[n]) }) }, r = this, e = 0; e < this.suggestions.length; ++e)h(e); return !!this.selectedSuggestion }, t.prototype.addMenuStateAnnouncement = function () { this.ariaLiveRegion || (this.ariaLiveRegion = document.createElement("div"), u.addClass(this.ariaLiveRegion, "x-screen-reader"), this.ariaLiveRegion.setAttribute("aria-live", "assertive"), this.input.parentNode.insertBefore(this.ariaLiveRegion, this.input.previousSibling), this.ignoreNextDOMChange = !0, this.menuOpenLocString = this.element.getAttribute("data-f-loc-menu-open") || t.menuOpenFallbackString) }, t.prototype.highlight = function (n) { var t = new RegExp(this.input.value, "ig"); return n.replace(t, function (n) { return "" + n + "<\/b>" }) }, t.selector = ".m-auto-suggest", t.typeName = "AutoSuggest", t.menuOpenFallbackString = "results are available, use up and down arrow keys to navigate.", t.defaultItemScrollCount = 5, t.minimumItemScrollCount = 2, t.ariaHidden = "aria-hidden", t.ariaExpanded = "aria-expanded", t.telemetryCtNonProduct = "0", t.telemetryCtProduct = "4", t }(r.Publisher); t.AutoSuggest = o }); require(["autosuggest", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.AutoSuggest }]) }); define("button", ["require", "exports", "tslib", "observableComponent", "htmlExtensions", "utility"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function (n) { function t(t) { var i = n.call(this, t) || this; return i.handleKeydown = function (n) { var t = f.getKeyCode(n); switch (t) { case 32: u.preventDefault(n); i.emitClickEvent() } }, i.update(), i } return i.__extends(t, n), t.prototype.update = function () { this.element && this.element.nodeName === "A" && (this.element.getAttribute("role") || "").toLowerCase() === "button" && u.addEvent(this.element, u.eventTypes.keydown, this.handleKeydown) }, t.prototype.teardown = function () { u.removeEvent(this.element, u.eventTypes.keydown, this.handleKeydown) }, t.prototype.emitClickEvent = function () { u.customEvent(this.element, u.eventTypes.click) }, t.selector = ".c-button", t.typeName = "Button", t }(r.ObservableComponent); t.Button = e }); require(["button", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ c: n.Button }]) }); define("checkbox", ["require", "exports", "tslib", "publisher", "htmlExtensions"], function (n, t, i, r, u) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var f = function (n) { function t(i) { var r = n.call(this, i) || this; return r.updateCheckbox = function () { var n = r.input.checked; n !== r.checked && (r.checked = n, r.input.setAttribute(t.ariaCheckedAttribute, r.checked.toString()), r.initiatePublish({ checked: r.checked })) }, r.update(), r } return i.__extends(t, n), t.prototype.update = function () { (this.input = u.selectFirstElement(t.inputSelector, this.element), this.input) && (this.input.getAttribute(t.indeterminateAttribute) === t.indeterminateValue && (this.input.indeterminate = !0), this.checked = this.input.checked, this.input.setAttribute(t.ariaCheckedAttribute, this.checked.toString()), u.addEvent(this.input, u.eventTypes.click, this.updateCheckbox)) }, t.prototype.teardown = function () { u.removeEvent(this.input, u.eventTypes.click, this.updateCheckbox) }, t.prototype.publish = function (n, t) { n.onValueChanged(t) }, Object.defineProperty(t.prototype, "indeterminate", { get: function () { return this.input ? this.input.indeterminate : !1 }, set: function (n) { this.input && (this.input.indeterminate = n) }, enumerable: !0, configurable: !0 }), t.selector = ".c-checkbox", t.typeName = "Checkbox", t.inputSelector = 'input[type="checkbox"]', t.indeterminateAttribute = "data-js-checkbox", t.indeterminateValue = "indeterminate", t.ariaCheckedAttribute = "aria-checked", t }(r.Publisher); t.Checkbox = f }); require(["checkbox", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Checkbox }]) }); define("combo", ["require", "exports", "tslib", "publisher", "htmlExtensions", "utility", "stringExtensions"], function (n, t, i, r, u, f, e) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var o = function (n) { function t(i) { var r = n.call(this, i) || this; return r.isFirstFocus = !0, r.isCombobox = !1, r.maxDisplayedItems = t.defaultMaxDisplayedItems, r.usesAccessibleHtmlShape = !1, r.handleOnInputEvent = function () { e.isNullOrWhiteSpace(r.input.value) && (r.isMenuVisible() || r.input.setAttribute(t.ariaActiveDescendant, ""), r.hideMenu()) }, r.handleInputKeydownEvent = function (n) { var t = f.getKeyCode(n); (t === 13 || t === 40 || t === 38 && r.isMenuVisible()) && u.preventDefault(n); r.handleInputKeydown(t) }, r.handleInputKeyupEvent = function (n) { r.handleInputKeyup(f.getKeyCode(n)) }, r.handleFocusInEvent = function () { r.isFirstFocus && (r.input.value && r.input.setSelectionRange(0, r.input.value.length), r.isFirstFocus = !1) }, r.handleFocusOutEvent = function () { r.isFirstFocus = !0 }, r.handleInputOrButtonClickEvent = function (n) { u.preventDefault(n); r.handleInputOrButtonClick() }, r.handleMenuClickEvent = function (n) { r.handleMenuClick(u.getEventTargetOrSrcElement(n)) }, r.handleOffMenuClick = function (n) { r.element.contains(u.getEventTargetOrSrcElement(n)) || r.hideMenu() }, r.update(), r } return i.__extends(t, n), t.prototype.update = function () { var n, i, r; if (this.element) { if (this.comboBoxElement = u.selectFirstElement('input[role="combobox"]', this.element), this.input = u.selectFirstElementT("input", this.element), this.button = u.selectFirstElement("button", this.element), this.menu = u.selectFirstElement("ul", this.element), this.matchedElement = null, this.listItems = u.selectElements("span, a", this.menu), this.listItems === null || this.listItems.length === 0) for (this.listItems = u.selectElements('li[role="option"], a', this.menu), this.usesAccessibleHtmlShape = !0, n = 0, i = this.listItems; n < i.length; n++)r = i[n], r.getAttribute("id") || r.setAttribute("id", "item-" + ++t._uniqueId); (this.comboBoxElement ? this.element.getAttribute("data-v3") ? (this.element.setAttribute("role", "form"), this.isCombobox = !0, this.comboBoxElement = this.element) : (this.isCombobox = !0, this.comboBoxElement = this.menu) : this.element.getAttribute(t.role) === "combobox" && (this.isCombobox = !0, this.comboBoxElement = this.element, this.input.setAttribute("role", "combobox"), this.element.setAttribute("role", "form")), this.addMenuStateAnnouncement(), this.input && this.button && this.menu && !(this.listItems.length < 1)) && (this.activeValue = this.input.value, this.activeItem = this.usesAccessibleHtmlShape ? u.selectFirstElement("li." + t.activeClassName, this.menu) : u.selectFirstElement("span[class='" + t.activeClassName + "']", this.menu), u.addEvent(this.input, u.eventTypes.keydown, this.handleInputKeydownEvent, !0), u.addEvent(this.comboBoxElement, u.eventTypes.focusout, this.handleFocusOutEvent, !1), u.addEvent(this.comboBoxElement, u.eventTypes.focusin, this.handleFocusInEvent, !1), u.addEvent(this.input, u.eventTypes.keyup, this.handleInputKeyupEvent, !0), u.addEvent(this.input, u.eventTypes.click, this.handleInputOrButtonClickEvent, !0), u.addEvent(this.input, u.eventTypes.input, this.handleOnInputEvent, !0), u.addEvent(this.button, u.eventTypes.click, this.handleInputOrButtonClickEvent, !0), u.addEvent(this.listItems, u.eventTypes.click, this.handleMenuClickEvent, !0), this.activeItem && this.setActiveItemAndHideMenu(this.activeItem, !1)) } }, t.prototype.teardown = function () { u.removeEvent(this.input, u.eventTypes.keydown, this.handleInputKeydownEvent, !0); u.removeEvent(this.input, u.eventTypes.keyup, this.handleInputKeyupEvent, !0); u.removeEvent(this.input, u.eventTypes.click, this.handleInputOrButtonClickEvent, !0); u.removeEvent(this.button, u.eventTypes.click, this.handleInputOrButtonClickEvent, !0); u.removeEvent(this.listItems, u.eventTypes.click, this.handleMenuClickEvent, !0); u.removeEvent(this.comboBoxElement, u.eventTypes.focusout, this.handleFocusOutEvent, !1); u.removeEvent(this.comboBoxElement, u.eventTypes.focusin, this.handleFocusInEvent, !1); this.input = null; this.button = null; this.menu = null; this.listItems = null; this.activeItem = null }, t.prototype.publish = function (n, t) { n.onSelectionChanged(t) }, t.prototype.onSelectionChanged = function (n, t) { n === void 0 && (n = !0); t === void 0 && (t = !0); var i = this.getValue(); this.initiatePublish({ id: i.id, value: i.value, internal: n, userInitiated: t }) }, t.prototype.getValue = function () { return { id: !!this.activeItem && !!this.activeItem.parentElement ? this.usesAccessibleHtmlShape ? this.activeItem.id : this.activeItem.parentElement.id : "", value: this.input.value, internal: !1, userInitiated: !1 } }, t.prototype.showMenu = function (n) { var r, f, i, t; if ((n === void 0 && (n = !1), !this.isMenuVisible()) && (r = this.input.value, n || !e.isNullOrWhiteSpace(r))) { if (this.setMenuAriaAttributes(!0), f = this.listItems.length, f > this.maxDisplayedItems) { for (i = 0, t = 0; t < this.maxDisplayedItems; t++)i += this.listItems[t].offsetHeight; this.menu.style.maxHeight = i + "px" } u.addEvent(document.body, u.eventTypes.click, this.handleOffMenuClick); this.matchItem() } }, t.prototype.hideMenu = function () { this.isMenuVisible() && (this.setMenuAriaAttributes(!1), this.activeItem && this.activeItem.setAttribute(t.ariaSelected, "false"), this.usesAccessibleHtmlShape && this.input.setAttribute(t.ariaActiveDescendant, ""), u.removeClass(this.activeItem, t.activeClassName), this.matchedElement = null, u.removeEvent(document.body, u.eventTypes.click, this.handleOffMenuClick)) }, t.prototype.setMenuAriaAttributes = function (n) { this.isCombobox ? (this.comboBoxElement.firstElementChild.setAttribute(t.ariaExpanded, n.toString()), this.comboBoxElement.setAttribute(t.ariaExpanded, n.toString())) : this.menu.setAttribute(t.ariaHidden, (!n).toString()); n && this.ariaLiveRegion ? u.setText(this.ariaLiveRegion, this.menuOpenLocString) : u.setText(this.ariaLiveRegion, "") }, t.prototype.addMenuStateAnnouncement = function () { this.ariaLiveRegion || (this.ariaLiveRegion = document.createElement("div"), u.addClass(this.ariaLiveRegion, "x-screen-reader"), this.ariaLiveRegion.setAttribute("aria-live", "assertive"), this.input.parentNode.insertBefore(this.ariaLiveRegion, this.input.nextSibling), this.ignoreNextDOMChange = !0, this.menuOpenLocString = this.element.getAttribute("data-f-loc-menu-open") || t.menuOpenFallbackString) }, t.prototype.isMenuVisible = function () { return this.isCombobox ? this.comboBoxElement.getAttribute(t.ariaExpanded) === "true" : this.menu.getAttribute(t.ariaHidden) === "false" }, t.prototype.setActiveItemAndHideMenu = function (n, t) { t === void 0 && (t = !0); !n || (this.setActiveItem(n), this.input.value = this.activeValue = this.getActiveText(), this.hideMenu(), t && this.input.focus(), this.onSelectionChanged()) }, t.prototype.setActiveItem = function (n, i) { i === void 0 && (i = !0); this.activeItem && (u.removeClass(this.activeItem, t.activeClassName), this.activeItem.setAttribute(t.ariaSelected, "false"), this.input.setAttribute(t.ariaActiveDescendant, "")); this.activeItem = n; i && (u.addClass(this.activeItem, t.activeClassName), this.activeItem.setAttribute(t.ariaSelected, "true"), this.input.setAttribute(t.ariaActiveDescendant, this.activeItem.id)) }, t.prototype.getActiveText = function () { return this.activeItem ? u.getText(this.activeItem) : "" }, t.prototype.matchItem = function (n) { var r, t, i, f, h, o, c, s; if (n === void 0 && (n = !1), r = this.input.value, i = 0, !e.isNullOrWhiteSpace(r)) for (r = e.trim(r).toLocaleLowerCase(), f = 0, h = this.listItems; f < h.length; f++)if (o = h[f], c = u.getText(o).toLocaleLowerCase(), r === c) { t = o; i = -1; break } else s = e.getMatchLength(c, r, !1), s > 0 && (i === 0 || s > i) && (t = o, i = s); t ? this.matchedElement = t : t = this.listItems[0]; (n || i === -1) && this.setActiveItem(t, n || i === -1); u.scrollElementIntoView(t, this.menu) }, t.prototype.handleInputKeydown = function (n) { var f, e, r, i; this.activeValue = this.input.value; switch (n) { case 9: case 13: f = this.getActiveText(); this.activeValue !== f && (u.hasClass(this.activeItem, t.activeClassName) && (this.activeValue = this.input.value = f), this.onSelectionChanged()); this.hideMenu(); break; case 40: this.isMenuVisible() ? this.activeItem ? (i = this.listItems.indexOf(this.activeItem), e = this.getNextItemIndex(i), this.setActiveItem(this.listItems[e]), u.scrollElementIntoView(this.listItems[e], this.menu), this.input.focus()) : this.matchItem(!0) : this.showMenu(!0); break; case 38: this.isMenuVisible() && (r = this.listItems.length - 1, this.activeItem && (i = this.listItems.indexOf(this.activeItem), r = this.getPreviousItemIndex(i)), this.setActiveItem(this.listItems[r]), u.scrollElementIntoView(this.listItems[r], this.menu), this.input.focus()); break; case 27: this.hideMenu() } }, t.prototype.handleInputKeyup = function () { e.isNullOrWhiteSpace(this.input.value) || this.input.value === this.activeValue || (this.setActiveItem(null, !1), this.showMenu(!0), this.matchItem()) }, t.prototype.handleInputOrButtonClick = function () { this.isMenuVisible() ? this.hideMenu() : this.showMenu(!0); this.input.focus() }, t.prototype.handleMenuClick = function (n) { this.setActiveItemAndHideMenu(n) }, t.prototype.getNextItemIndex = function (n) { return (n + 1) % this.listItems.length }, t.prototype.getPreviousItemIndex = function (n) { return --n > 0 ? n : this.listItems.length - 1 }, t.selector = ".c-combo", t._uniqueId = 0, t.typeName = "Combo", t.menuOpenFallbackString = "results are available, use up and down arrow keys to navigate.", t.ariaHidden = "aria-hidden", t.ariaExpanded = "aria-expanded", t.ariaSelected = "aria-selected", t.ariaActiveDescendant = "aria-activedescendant", t.role = "role", t.activeClassName = "active", t.defaultMaxDisplayedItems = 5, t }(r.Publisher); t.Combo = o }); require(["combo", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Combo }]) }); define("dialog", ["require", "exports", "tslib", "publisher", "htmlExtensions", "utility"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function (n) { function t(i) { var r = n.call(this, i) || this; return r.shouldCloseOnEscape = !0, r.isFlowDialog = !1, r.isLightboxDialog = !1, r.pageContentContainers = [], r.handleFakeElementFocus = function () { r.firstInput.focus() }, r.handleTriggerClick = function (n) { r.activeButton = u.getEventTargetOrSrcElement(n); r.show() }, r.handleTriggerKeyDown = function (n) { var t = n.keyCode; (t === 13 || t === 32) && (u.preventDefault(n), r.activeButton = u.getEventTargetOrSrcElement(n), r.show()) }, r.show = function () { var s = u.selectElements(t.pageContentContainerSelector), n, f, i, e, o; for (r.pageContentContainers = [], r.element.setAttribute(t.ariaHidden, "false"), r.dialogWrapper.tabIndex = 0, (r.firstInput || r.initialFocusableInput) && (r.isFlowDialog ? r.initialFocusableInput.focus() : r.firstInput.focus()), r.onResized(), r.bodyOverflowX = u.css(document.body, "overflow-x"), r.bodyOverflowY = u.css(document.body, "overflow-y"), u.css(document.body, "overflow-x", "hidden"), u.css(document.body, "overflow-y", "hidden"), r.container.setAttribute(t.ariaHidden, "true"), r.checkOverflow(), n = 0, f = s; n < f.length; n++)i = f[n], e = !!(i.getAttribute(t.ariaHidden) === "true"), r.pageContentContainers.push({ element: i, hidden: e }), e || i.setAttribute(t.ariaHidden, "true"); r.dialogWrapper.scrollTop = 0; o = document.querySelector("#footerArea"); o && o.setAttribute("aria-hidden", "true"); r.initiatePublish({ notification: 1 }) }, r.hide = function () { var o = r.element.getAttribute(t.ariaHidden) === "true", n, i, f, e; if (r.element.setAttribute(t.ariaHidden, "true"), u.css(r.dialogWrapper, "height", "auto"), u.css(document.body, "overflow-x", r.bodyOverflowX), u.css(document.body, "overflow-y", r.bodyOverflowY), r.container.setAttribute(t.ariaHidden, "false"), r.dialogWrapper.setAttribute("tabindex", "-1"), r.pageContentContainers && r.pageContentContainers.length) for (n = 0, i = r.pageContentContainers; n < i.length; n++)f = i[n], f.hidden || f.element.removeAttribute(t.ariaHidden); !o && r.activeButton && r.activeButton.focus(); r.activeButton = null; r.pageContentContainers = []; e = document.querySelector("#footerArea"); e && e.removeAttribute("aria-hidden"); o || r.initiatePublish({ notification: 2 }) }, r.triggerClickPublish = function (n) { r.initiatePublish({ notification: 0, button: u.getEventTargetOrSrcElement(n) }) }, r.onKeydown = function (n) { var o = f.getKeyCode(n); switch (o) { case 13: case 32: r.closeButtons.indexOf(u.getEventTargetOrSrcElement(n)) !== -1 ? (u.preventDefault(n), r.hide()) : r.customButtons.indexOf(u.getEventTargetOrSrcElement(n)) !== -1 && r.initiatePublish({ notification: 0, button: u.getEventTargetOrSrcElement(n) }); break; case 27: u.preventDefault(n); r.shouldCloseOnEscape && r.hide(); break; case 9: var i = u.getEventTargetOrSrcElement(n), t = r.getLastFocusableInput(), e = !1; t && i === t && !n.shiftKey ? (u.preventDefault(n), r.firstInput && (r.firstInput.focus(), e = !0)) : r.firstInput && i === r.firstInput && n.shiftKey ? (u.preventDefault(n), t && (t.focus(), e = !0)) : r.dialogWrapper && r.firstInput && r.firstInput !== r.dialogWrapper && (i !== r.dialogWrapper || n.shiftKey || (u.preventDefault(n), r.firstInput && (r.firstInput.focus(), e = !0)), i === r.dialogWrapper && n.shiftKey && (u.preventDefault(n), t && t.focus())); break; case 40: r.onKeypressScroll("down"); break; case 38: r.onKeypressScroll("up") } }, r.onKeypressScroll = function (n) { var u = 200, f, i; n === "up" && (u = -200); f = document.getElementById(r.dialogId); i = f.querySelector(t.scrollSelector); i && i.scrollBy(0, u) }, r.onResized = function () { r.checkOverflow(); r.handleResponsive() }, r.checkOverflow = function () { var n = u.getClientRect(r.dialogWrapper); n.height < r.dialogWrapper.scrollHeight ? r.isScroll || u.css(r.dialogWrapper, "overflow-y", "auto") : u.css(r.dialogWrapper, "overflow-y", "hidden") }, r.handleResponsive = function () { if (r.element.getAttribute(t.ariaHidden) === "false") { var n = u.getClientRect(r.dialogWrapper); r.isFlowDialog && !r.isScroll ? n.height < r.dialogWrapper.scrollHeight ? (u.css(r.dialogWrapper, "max-height", t.heightCalculationString), u.css(r.dialogWrapper, "height", "100%")) : u.css(r.dialogWrapper, "max-height", "100%") : r.isScroll && (n.height + t.heightCalculationValue > window.innerHeight && u.css(r.dialogInnerContent, "height") !== "inherit" ? (u.css(r.dialogWrapper, "height", t.heightCalculationString), u.css(r.dialogInnerContent, "height", "inherit")) : u.css(r.dialogInnerContent, "height") !== "auto" && (u.css(r.dialogWrapper, "height", "auto"), n = u.getClientRect(r.dialogWrapper), n.height + t.heightCalculationValue < window.innerHeight ? (u.css(r.dialogInnerContent, "height", "auto"), r.element.setAttribute(t.ariaHidden, "true"), r.element.setAttribute(t.ariaHidden, "false"), r.checkOverflow()) : u.css(r.dialogWrapper, "height", t.heightCalculationString))) } }, r.appendDialog = function () { r.ignoreNextDOMChange = !0; r.element && r.element.parentElement !== document.body && document.body.appendChild(r.element) }, r.getLastFocusableInput = function () { if (!r.dialogInputs || r.dialogInputs.length === 0) return null; for (var n = r.dialogInputs.length - 1; n >= 0; n--)if (!r.dialogInputs[n].hidden && r.dialogInputs[n].getAttribute("disabled") !== "disabled") return r.dialogInputs[n]; return r.dialogWrapper }, r.update(), r } return i.__extends(t, n), t.prototype.update = function () { var n, i, r; if (this.element && this.element.id && (this.dialogId = this.element.id, this.dialogWrapper = u.selectFirstElement("div[role=dialog]", this.element), this.dialogInnerContent = u.selectFirstElement('[role="document"]', this.element), this.openButtons = u.selectElements("[data-js-dialog-show=" + this.dialogId + "]"), this.closeButtons = u.selectElements(t.closeSelector, this.element), this.dialogInputs = u.selectElements(t.dialogInputSelectors, this.element), this.customButtons = u.selectElements(t.customButtonSelector, this.element), this.appendDialog(), this.container = u.selectFirstElement('[data-grid*="container"]'), this.overlay = u.selectFirstElement('[role="presentation"]', this.element), this.isScroll = u.selectFirstElement(t.scrollSelector, this.element), u.hasClass(this.element, "f-flow") && (this.isFlowDialog = !0), u.hasClass(this.element, "f-lightbox") && (this.isLightboxDialog = !0), this.dialogWrapper && this.dialogInputs && this.dialogInputs.length && this.container && this.overlay)) { if (this.isLightboxDialog) this.closeButtons.indexOf(this.overlay) === -1 && this.closeButtons.push(this.overlay), this.dialogWrapper.removeAttribute("tabIndex"), this.dialogInputs.splice(1, 0, this.dialogWrapper), this.shouldCloseOnEscape = !0; else if (this.isFlowDialog) { for (n = 0; n < this.closeButtons.length; n++)if (i = this.closeButtons[n], u.hasClass(i, "c-glyph") && u.hasClass(i, "glyph-cancel")) { this.closeButtons.push(this.overlay); this.shouldCloseOnEscape = !0; break } this.dialogInputs.splice(0, 0, this.dialogWrapper) } this.firstInput = this.isFlowDialog ? this.dialogInputs[1] : this.dialogInputs[0]; this.initialFocusableInput = this.dialogInputs[0]; r = this.getLastFocusableInput(); r.tagName === "IFRAME" && this.addFakeLastElement(); u.addEvent(this.openButtons, u.eventTypes.click, this.handleTriggerClick); u.addEvent(this.openButtons, u.eventTypes.keydown, this.handleTriggerKeyDown); u.addEvent(this.closeButtons, u.eventTypes.click, this.hide); u.addEvent(this.customButtons, u.eventTypes.click, this.triggerClickPublish); u.addEvent(this.element, u.eventTypes.keydown, this.onKeydown); this.resizeThrottledEventHandler = u.addThrottledEvent(window, u.eventTypes.resize, this.onResized); this.element.getAttribute(t.ariaHidden) === "false" && this.onResized(); this.dialogWrapper.addEventListener("focus", function () { this.style.outline = "1px dashed" }); this.dialogWrapper.addEventListener("blur", function () { this.style.outline = "none" }) } }, t.prototype.teardown = function () { u.removeEvent(this.openButtons, u.eventTypes.click, this.handleTriggerClick); u.removeEvent(this.openButtons, u.eventTypes.keydown, this.handleTriggerKeyDown); u.removeEvent(this.closeButtons, u.eventTypes.click, this.hide); u.removeEvent(this.customButtons, u.eventTypes.click, this.triggerClickPublish); u.removeEvent(this.element, u.eventTypes.keydown, this.onKeydown); u.removeEvent(window, u.eventTypes.resize, this.resizeThrottledEventHandler) }, t.prototype.publish = function (n, t) { switch (t.notification) { case 0: if (n && n.onButtonClicked) n.onButtonClicked(t); break; case 1: n && n.onShown && n.onShown(); break; case 2: n && n.onHidden && n.onHidden() } }, t.prototype.addFakeLastElement = function () { var n = document.createElement("div"); n.setAttribute("tabindex", "0"); u.addEvent(n, u.eventTypes.focusin, this.handleFakeElementFocus); this.dialogWrapper.appendChild(n) }, t.selector = ".c-dialog", t.typeName = "Dialog", t.dialogInputSelectors = "select, input, textarea, button, a, .c-glyph[data-js-dialog-hide], iframe", t.closeSelector = "[data-js-dialog-hide]", t.customButtonSelector = 'button[type="button"]', t.ariaHidden = "aria-hidden", t.scrollSelector = ".f-dialog-scroll", t.heightCalculationValue = 24, t.heightCalculationString = "calc(100% - " + t.heightCalculationValue.toString() + "px)", t.pageContentContainerSelector = '[data-js-controlledby="dialog"]', t }(r.Publisher); t.Dialog = e }); require(["dialog", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Dialog }]) }); define("actionMenu", ["require", "exports", "tslib", "publisher", "utility", "htmlExtensions"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function (n) { function t(t) { var i = n.call(this, t) || this; return i.onTriggerClick = function (n) { if (n = f.getEvent(n), f.preventDefault(n), !i.disabled) { i.onTriggerToggled(); var t = i.items[0]; t.setAttribute("tabindex", "0"); t.focus() } }, i.onTouchMove = function (n) { n = f.getEvent(n); f.preventDefault(n); i.isExpanded() ? i.collapse() : i.expand() }, i.onItemClick = function (n) { n = f.getEvent(n); var t = n.currentTarget; if (!t.hasAttribute("aria-disabled")) { i.onItemSelected(t); i.collapse() } }, i.onNonActionMenuClick = function (n) { if (n = f.getEvent(n), !!i.element && !!i.menu) { var t = f.getEventTargetOrSrcElement(n); i.element.contains(t) || t !== i.menu && t.parentElement !== i.menu && i.collapse() } }, i.onTriggerKeyPress = function (n) { var r, t; n = f.getEvent(n); r = u.getKeyCode(n); switch (r) { case 13: case 32: f.preventDefault(n); i.disabled || (t = i.items[0], i.onTriggerToggled(), t.setAttribute("tabindex", "0"), t.focus()) } }, i.handleMenuKeydownEvent = function (n) { n = f.getEvent(n); var t = u.getKeyCode(n); (t !== 9 || i.isExpanded()) && f.preventDefault(n); i.handleMenuKeydown(f.getEventTargetOrSrcElement(n), t) }, i.update(), i } return i.__extends(t, n), t.prototype.update = function () { if (this.trigger = f.selectFirstElement(t.triggerSelector, this.element), this.menu = f.selectFirstElement(t.menuSelector, this.element), this.items = f.selectElementsT('li[class^="f-context-"]', this.element), this.disabled = this.trigger.hasAttribute("disabled"), !!this.trigger && !!this.menu && !!this.items && !!this.items.length) { var n = this.isExpanded(); this.addEventListeners(); n && this.expand() } }, t.prototype.teardown = function () { !this.trigger || !this.menu || !this.items || !this.items.length || this.removeEventListeners(); this.trigger = null; this.menu = null; this.items = null; this.selectedItem = null }, t.prototype.isExpanded = function () { return this.trigger.getAttribute(t.ariaExpanded) === "true" }, t.prototype.expand = function () { f.removeClass(this.trigger, "x-hidden-focus"); f.addClass(this.trigger, "f-active"); this.trigger.setAttribute(t.ariaExpanded, "true") }, t.prototype.collapse = function () { f.removeClass(this.trigger, "f-active"); this.trigger.setAttribute(t.ariaExpanded, "false") }, t.prototype.addEventListeners = function () { var n, t, i; for (f.addEvent(this.trigger, f.eventTypes.click, this.onTriggerClick), f.addEvent(this.trigger, f.eventTypes.keydown, this.onTriggerKeyPress), f.addEvent(this.menu, f.eventTypes.keydown, this.handleMenuKeydownEvent, !0), f.addEvent(this.trigger, f.eventTypes.touchmove, this.onTouchMove), n = 0, t = this.items; n < t.length; n++)i = t[n], f.addEvent(i, f.eventTypes.click, this.onItemClick); f.addEvent(document, f.eventTypes.click, this.onNonActionMenuClick) }, t.prototype.removeEventListeners = function () { var n, t, i; for (f.removeEvent(this.trigger, f.eventTypes.click, this.onTriggerClick), f.removeEvent(this.trigger, f.eventTypes.keydown, this.onTriggerKeyPress), f.removeEvent(this.menu, f.eventTypes.keydown, this.handleMenuKeydownEvent, !0), f.removeEvent(this.trigger, f.eventTypes.touchmove, this.onTouchMove), n = 0, t = this.items; n < t.length; n++)i = t[n], f.removeEvent(i, f.eventTypes.click, this.onItemClick); f.removeEvent(document, f.eventTypes.click, this.onNonActionMenuClick) }, t.prototype.onTriggerToggled = function () { this.isExpanded() ? this.collapse() : this.expand() }, t.prototype.onItemSelected = function (n) { var r, i; this.selectedItem = n; r = this.selectedItem.getAttribute("role") === "menuitemcheckbox"; r ? (i = this.selectedItem.getAttribute(t.ariaChecked) === "true", i ? this.selectedItem.setAttribute(t.ariaChecked, "false") : this.selectedItem.setAttribute(t.ariaChecked, "true"), this.initiatePublish({ id: this.selectedItem.id, checked: !i })) : this.initiatePublish({ id: this.selectedItem.id }) }, t.prototype.publish = function (n, t) { if (!!this.selectedItem) n.onSelection(t) }, t.prototype.handleMenuKeydown = function (n, t) { switch (t) { case 13: n.hasAttribute("aria-disabled") || (this.handleMenuEnterKey(n), this.trigger.focus(), this.collapse()); break; case 32: n.hasAttribute("aria-disabled") || (this.handleMenuEnterKey(n), n.getAttribute("role") !== "menuitemcheckbox" && (this.collapse(), this.trigger.focus())); break; case 27: case 196: this.trigger.focus(); this.collapse(); break; case 38: case 203: case 211: this.handleMenuArrowKey(!0, n); break; case 40: case 204: case 212: this.handleMenuArrowKey(!1, n); break; case 9: this.isExpanded() && (this.trigger.focus(), this.collapse()) } }, t.prototype.handleMenuArrowKey = function (n, t) { var r = this.items.indexOf(t), i; r !== -1 && (i = n ? r - 1 : r + 1, i < 0 ? i = this.items.length - 1 : i >= this.items.length && (i = 0), this.items[r].removeAttribute("tabindex"), this.items[i].setAttribute("tabindex", "0"), this.items[i].focus()) }, t.prototype.handleMenuEnterKey = function (n) { this.onItemSelected(n) }, t.selector = ".c-action-menu", t.typeName = "ActionMenu", t.ariaExpanded = "aria-expanded", t.ariaChecked = "aria-checked", t.triggerSelector = t.selector + " > button.c-action-trigger", t.menuSelector = t.triggerSelector + ' + ul[role="menu"]', t }(r.Publisher); t.ActionMenu = e }); require(["actionMenu", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.ActionMenu }]) }); require(["carousel", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Carousel }]) }); require(["rating", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ c: n.Rating }]) }); require(["heroItem", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.HeroItem }]) }); define("single-slide-carousel", ["require", "exports", "tslib", "carousel-base", "htmlExtensions", "utility", "utility"], function (n, t, i, r, u, f, e) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var o = function (n) { function t(t, i) { i === void 0 && (i = null); var r = n.call(this, t, i) || this; return r.carouselElement = t, r.nextFocusIndex = function (n) { return n >= r.focusElements.length - 1 ? -1 : n + 1 }, r.previousFocusIndex = function (n) { return n <= 0 ? -1 : n - 1 }, r.scrollFocusItemLI = function (n) { while (n.tagName !== "LI") if (!n.parentElement || n.parentElement === n) break; else n = n.parentElement; n.tagName === "LI" && r.scrollItemIntoView(n) }, r.onFocus = function () { var n = u.getEventTargetOrSrcElement(event); n && r.focusElements.indexOf(n) > -1 && r.scrollFocusItemLI(n) }, r.onKeydown = function (n) { var o = u.getEventTargetOrSrcElement(n), f, i; if (o) { var t = e.getKeyCode(n), s = t === 9 && n.shiftKey || (t === 205 || t === 214) && r.directionValue === "left" || (t === 206 || t === 213) && r.directionValue === "right", h = t === 9 || (t === 205 || t === 214) && r.directionValue === "right" || (t === 206 || t === 213) && r.directionValue === "left"; s ? (f = r.focusElements.indexOf(o), i = r.previousFocusIndex(f), i > -1 && r.scrollFocusItemLI(r.focusElements[i])) : h && (f = r.focusElements.indexOf(o), i = r.nextFocusIndex(f), i > -1 && r.scrollFocusItemLI(r.focusElements[i])) } }, r.onResized = function () { r.onCarouselResized() }, r } return i.__extends(t, n), t.prototype.update = function () { if (!n.prototype.update.call(this)) return !1; this.resizeThrottledEventHandler = u.addThrottledEvent(window, u.eventTypes.resize, this.onResized); var i = u.hasClass(this.slides[0], "f-gallery") ? t.focusGalleryItemSelector : t.focusItemSelector; return this.focusElements = u.selectElements(i, this.carouselElement), u.addEvent(this.focusElements, u.eventTypes.keydown, this.onKeydown), u.addEvent(this.focusElements, u.eventTypes.focus, this.onFocus), !0 }, t.prototype.teardown = function () { n.prototype.teardown.call(this); u.removeEvent(window, u.eventTypes.resize, this.resizeThrottledEventHandler); u.removeEvent(this.focusElements, u.eventTypes.focus, this.onFocus); u.removeEvent(this.focusElements, u.eventTypes.keydown, this.onKeydown) }, t.prototype.getSlides = function () { var n = u.selectElements(t.singleSlideSelector, this.carouselElement); return n && n.length && u.selectFirstElement("li", n[0]) ? (this.singleSlideWidth = f.getDimensions(n[0]).width, n) : null }, t.prototype.getFirstActiveIndex = function () { return 0 }, t.prototype.isScrollablePrevious = function () { var n = parseInt(u.css(this.slides[this.activeIndex], this.directionValue), 10); return !isNaN(n) && n !== 0 }, t.prototype.isScrollableNext = function () { var n = parseInt(u.css(this.slides[this.activeIndex], this.directionValue), 10), t = f.getDimensions(this.carouselElement).width, i = this.getCurrentSlideSize(); return (f.isNumber(n) || (n = 0), t + Math.abs(n) + i.gutter >= this.singleSlideWidth) ? !1 : !0 }, t.prototype.previousSlide = function () { this.changeSingleSlide(!1) }, t.prototype.nextSlide = function () { this.changeSingleSlide(!0) }, t.prototype.changeSingleSlide = function (t) { var l = this.slides[this.activeIndex], e = parseInt(u.css(l, this.directionValue), 10), i = this.getCurrentSlideSize(), o = f.getDimensions(this.carouselElement).width, r = Math.floor(o / (i.width + i.gutter)), s, a = t ? -1 : 1, v = t ? i.gutter : 0, h, c; f.isNumber(e) || (e = 0); r === 0 && (r = 1); r = o % (i.width + i.gutter) == 0 ? r - 1 : r; r = Math.max(r, 1); s = r * (i.width + i.gutter); h = t ? this.singleSlideWidth - o + e : Math.abs(e); c = s <= h ? s * a + e : h * a + e + v; u.css(l, this.directionValue, c + "px"); n.prototype.updateFlippers.call(this); this.fireSingleSlideChangedNotification(c, o, i) }, t.prototype.fireSingleSlideChangedNotification = function (t, i, f) { for (var h, c, v = u.selectElements(r.CarouselBase.allChildSelectors, this.carouselElement), y = f.width, p = f.width + f.gutter, l = -1, o = -1, s = -1, a = -1, e = 0; e < v.length; e++)if ((h = e * p + t, c = h + y, !(c < 0)) && (h < 0 && c > 0 && (l = e), s === -1 && h >= 0 && (s = e, l === -1 && (l = s)), s !== -1 && c <= i && (a = e), a !== -1 && o === -1 && h < i && c > i)) { o = e; break } o === -1 && (o = a); n.prototype.initiatePublish.call(this, { fullyVisibleItemRange: [s, a], partiallyVisibleItemRange: [l, o], userInitiated: !0 }) }, t.prototype.getCurrentSlideSize = function () { var n = u.selectFirstElement(r.CarouselBase.allChildSelectors, this.carouselElement), t; return !n ? { width: 0, gutter: 0 } : (t = this.direction === u.Direction.left ? parseInt(u.css(n, "marginRight"), 10) : parseInt(u.css(n, "marginLeft"), 10), { width: n.offsetWidth, gutter: isNaN(t) ? 0 : t }) }, t.prototype.onCarouselResized = function () { var i = this.slides[0], t = parseInt(u.css(i, this.directionValue), 10), r = f.getDimensions(this.carouselElement).width; this.singleSlideWidth = f.getDimensions(this.slides[0]).width; !isNaN(t) && t < 0 && this.singleSlideWidth + t < r && u.css(i, this.directionValue, Math.min(0, r - this.singleSlideWidth) + "px"); n.prototype.updateFlippers.call(this) }, t.prototype.scrollItemIntoView = function (t) { var l = this, o = f.getDimensions(this.carouselElement).width, e = this.slides[0], i = t.offsetLeft, r = this.getCurrentSlideSize(), s = !1, h, c; this.direction === u.Direction.left ? (h = parseInt(u.css(e, "left"), 10) || 0, h < 0 && -h > i ? (i !== 0 && (i = -i + 1), s = !0) : h + i > o - r.width && (i = o - r.width - i - 1, s = !0)) : (c = f.getDimensions(e).width, i + r.width + r.gutter + e.offsetLeft > o ? (i = -(c - i - r.width - r.gutter) + 1, s = !0) : i + e.offsetLeft < 0 && (i = o - (c - i - r.gutter) - 1, s = !0)); s && (u.css(e, this.directionValue, i + "px"), n.prototype.updateFlippers.call(this), setTimeout(function () { e.parentElement.scrollLeft = 0; l.fireSingleSlideChangedNotification(i, o, r) }, 0)) }, t.selector = ".c-carousel[class*=f-single-slide]", t.typeName = "SingleSlideCarousel", t.singleSlideSelector = r.CarouselBase.selector + " > * > ul", t.focusItemSelector = r.CarouselBase.selector + " > * > ul > li > section a, * > ul > li > section button, * > ul > li > div a", t.focusGalleryItemSelector = r.CarouselBase.selector + " > * > ul > li a", t }(r.CarouselBase); t.SingleSlideCarousel = o }); require(["single-slide-carousel", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.SingleSlideCarousel }]) }); define("productPlacementItem", ["require", "exports", "tslib", "observableComponent", "htmlExtensions"], function (n, t, i, r, u) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var f = function (n) { function t(t) { var i = n.call(this, t) || this; return t ? (i.update(), i) : i } return i.__extends(t, n), t.prototype.update = function () { this.explicit = u.selectFirstElement(t.explicitSelector, this.element); this.heading = u.selectFirstElement(t.headingSelector, this.element); this.explicit && this.heading && this.setExplicitPosition() }, t.prototype.teardown = function () { }, t.prototype.setExplicitPosition = function () { var n = u.getClientRect(this.heading).height; n < t.headingLineHeight * 3 && (u.css(this.explicit, "position", "relative"), u.css(this.explicit, "bottom", "inherit")) }, t.selector = ".m-product-placement-item", t.typeName = "ProductPlacementItem", t.explicitSelector = ".c-explicit", t.headingSelector = ".c-heading", t.headingLineHeight = 20, t }(r.ObservableComponent); t.ProductPlacementItem = f }); require(["productPlacementItem", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.ProductPlacementItem }]) }); require(["rating", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ c: n.Rating }]) }); define("carousel", ["require", "exports", "tslib", "componentFactory", "multi-slide-carousel", "single-slide-carousel", "publisher", "htmlExtensions", "utility"], function (n, t, i, r, u, f, e, o, s) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var h = function (n) { function t(i, e) { var c, h; return e === void 0 && (e = null), c = n.call(this, i, e) || this, s.apiDeprecated("Carousel is deprecated, please use either MultiSlideCarousel or SingleSlideCarousel instead."), h = null, !i || r.ComponentFactory.create([{ elements: [i], component: o.hasClass(i, t.multiSlideClass) ? u.MultiSlideCarousel : f.SingleSlideCarousel, callback: function (n) { h = n && n.length ? n[0] : null }, eventToBind: "DOMContentLoaded" }]), h } return i.__extends(t, n), t.prototype.publish = function () { s.apiDeprecated("Carousel is deprecated, please use either MultiSlideCarousel or SingleSlideCarousel instead.") }, t.selector = ".c-carousel", t.multiSlideClass = "f-multi-slide", t }(e.Publisher); t.Carousel = h }); require(["carousel", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Carousel }]) }); require(["heroItem", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.HeroItem }]) }); define("hero-item-base", ["require", "exports", "tslib", "observableComponent", "publisher", "htmlExtensions", "stringExtensions"], function (n, t, i, r, u, f, e) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var o = function (n) { function t(t, i) { var u = n.call(this, t, i) || this; return (u.heroItemBaseElement = t, u.initialized = !1, u.handleMouseAndTouchStart = function (n) { u.startCoordinates = f.getCoordinates(n) }, u.handleMouseAndTouchEnd = function (n) { var t = u.startCoordinates, i = f.getCoordinates(n), r = n.which || n.button; r === 1 && t && i && !u.isSwipe(t, i) && u.handleValidUserInteraction(n, f.getEventTargetOrSrcElement(n)) }, u.verifyPreciseInteraction = function () { return f.hasClass(u.heroItemBaseElement, "f-precise-click") ? !0 : !1 }, !r.ObservableComponent.shouldInitializeAsClass(t, i)) ? u : (f.SafeBrowserApis.requestAnimationFrame.call(window, function () { return u.update() }), u) } return i.__extends(t, n), t.prototype.update = function () { var r, n, i, u; if (!this.heroItemBaseElement) return !1; for (this.callsToAction = f.selectElementsT(this.constructor.callToActionSelector, this.heroItemBaseElement), this.videoItem = f.selectFirstElement(t.videoSelector, this.heroItemBaseElement), r = f.selectElementsT(".hiddenCTAlink", this.heroItemBaseElement), n = 0, i = r; n < i.length; n++)u = i[n], this.callsToAction.push(u); return this.addEventListeners(), this.initialized = !0, !0 }, t.prototype.teardown = function () { this.removeEventListeners(); this.initialized = !1 }, t.prototype.publish = function (n, t) { if (n.onHeroItemClicked) { n.onHeroItemClicked(t); this.preventDefaultClickAction = this.preventDefaultClickAction || t.preventDefault } }, t.prototype.addEventListeners = function () { !this.verifyPreciseInteraction() && this.verifyCallToAction() && (f.addEvent(this.heroItemBaseElement, f.eventTypes.mousedown, this.handleMouseAndTouchStart), f.addEvent(this.heroItemBaseElement, f.eventTypes.mouseup, this.handleMouseAndTouchEnd)) }, t.prototype.removeEventListeners = function () { f.removeEvent(this.heroItemBaseElement, f.eventTypes.mousedown, this.handleMouseAndTouchStart); f.removeEvent(this.heroItemBaseElement, f.eventTypes.mouseup, this.handleMouseAndTouchEnd) }, t.prototype.handleValidUserInteraction = function (n, t) { if (!t || this.isCallToActionOrDescendant(t) || f.isDescendantOrSelf(this.videoItem, t) || (e.isNullOrWhiteSpace(this.callsToAction[0].getAttribute("data-js-dialog-show")) || this.callsToAction[0].click(), !this.verifyCallToAction())) return !1; var i = { preventDefault: !1, event: n, targetElement: t, targetUri: this.callsToAction[0].href }; return this.preventDefaultClickAction = !1, this.initiatePublish(i), this.preventDefaultClickAction ? this.preventDefaultClickAction = !1 : (n && f.stopPropagation(n), this.navigateToUrl(this.callsToAction[0].href, n.ctrlKey ? "_blank" : this.callsToAction[0].target)), !0 }, t.prototype.isCallToActionOrDescendant = function (n) { for (var r, t = 0, i = this.callsToAction; t < i.length; t++)if (r = i[t], r === n || f.isDescendant(r, n)) return !0; return !1 }, t.prototype.isSwipe = function (n, i) { if (!n || !i) return !1; var r = Math.abs(i.y - n.y), u = Math.abs(i.x - n.x); return u > t.minimumSwipeDistance || r > t.minimumSwipeDistance }, t.prototype.navigateToUrl = function (n, t) { e.isNullOrWhiteSpace(n) || window.open(n, e.isNullOrWhiteSpace(t) ? "_self" : t) }, t.prototype.verifyCallToAction = function () { var n = this.callsToAction && this.callsToAction.length && !e.isNullOrWhiteSpace(this.callsToAction[0].href); return n ? this.heroItemBaseElement.setAttribute(t.dataJsHref, this.callsToAction[0].href) : this.heroItemBaseElement.removeAttribute(t.dataJsHref), n }, t.prototype.onCollectionItemHidden = function () { }, t.prototype.onCollectionItemShown = function () { }, t.prototype.triggerItem = function () { return this.callsToAction && this.callsToAction.length ? this.handleValidUserInteraction(null, this.callsToAction[0]) : !1 }, t.dataJsHref = "data-js-href", t.minimumSwipeDistance = 30, t.callToActionSelector = "a.c-call-to-action", t.videoSelector = ".c-video-player,.c-lightbox-video", t }(u.Publisher); t.HeroItemBase = o }); require(["multi-slide-carousel", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.MultiSlideCarousel }]) }); define("viewportCollision", ["require", "exports", "htmlExtensions"], function (n, t, i) { "use strict"; function r(n, t) { var r = i.getClientRect(n), u, f, e, o; return (r.left = Math.round(r.left), r.top = Math.round(r.top), r.right = Math.round(r.right), r.bottom = Math.round(r.bottom), r.width !== 0 && (u = !1, f = { top: !1, bottom: !1, left: !1, right: !1 }, t || (e = Math.min(window.innerWidth, document.documentElement.clientWidth), o = Math.min(window.innerHeight, document.documentElement.clientHeight), t = { left: 0, top: 0, right: e, bottom: o, width: e, height: o }), r.left < t.left && (u = !0, f.left = !0), r.top < t.top && (u = !0, f.top = !0), r.right > t.right && (u = !0, f.right = !0), r.bottom > t.bottom && (u = !0, f.bottom = !0), u)) ? f : !1 } function u(n, t) { var r = i.getClientRect(n), u, f; if (r.width === 0) return null; t || (u = Math.min(window.innerWidth, document.documentElement.clientWidth), f = Math.min(window.innerHeight, document.documentElement.clientHeight), t = { top: 0, right: u, bottom: f, left: 0, height: f, width: u }); var e = Math.round(r.top - t.top), o = Math.round(t.right - r.right), s = Math.round(t.bottom - r.bottom), h = Math.round(r.left - t.left); return e >= 0 && o >= 0 && s >= 0 && h >= 0 ? null : { top: e, right: o, bottom: s, left: h, clientRect: r, viewport: t } } Object.defineProperty(t, "__esModule", { value: !0 }); t.collidesWith = r; t.getCollisionExtents = u }); define("sequenceIndicator", ["require", "exports", "tslib", "observableComponent", "publisher", "htmlExtensions", "utility", "componentFactory", "tooltip"], function (n, t, i, r, u, f, e, o, s) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var h = function (n) { function t(i, u) { u === void 0 && (u = null); var o = n.call(this, i, u) || this; return o.sequenceIndicatorElement = i, o.selectedAttribute = t.ariaSelected, o.setActiveIndex = function (n) { return e.apiDeprecated("SequenceIndicator.setActiveIndex() is deprecated, please use SequenceIndicator.setControllerIndex() instead."), o.setControllerIndex(n) }, o.setControllerIndex = function (n, t, i) { if (t === void 0 && (t = !1), i === void 0 && (i = !1), n < 0 || n > o.items.length - 1 || n === o.activeIndex) return !1; var f = o.activeIndex, r = o.items[o.activeIndex], u = o.items[n], e = document.activeElement === r; return o.deselectItem(r), o.selectItem(u, i), o.activeIndex = n, (t || e) && u.focus(), o.initiatePublish({ previousIindex: f, currentIndex: n, index: n }), !0 }, o.handleClickEvent = function (n) { var t, i; f.preventDefault(n); t = f.getEventTargetOrSrcElement(n); t && (i = t.getAttribute("role"), !i && t.parentElement && (t = t.parentElement.getAttribute("role") === "tab" ? t.parentElement : null), o.setControllerIndex(o.items.indexOf(t), !1, !0)) }, o.onKeydown = function (n) { var t = !1, i = !1; switch (e.getKeyCode(n)) { case 39: case 206: case 213: i = !0; break; case 37: case 205: case 214: t = !0; break; default: switch (e.getVirtualKey(n)) { case "ArrowRight": i = !0; break; case "ArrowLeft": t = !0 } }(t || i) && (f.stopPropagation(n), f.preventDefault(n), t && !o.isLtr || i && o.isLtr ? o.next() : (t && o.isLtr || i && !o.isLtr) && o.previous()) }, r.ObservableComponent.shouldInitializeAsClass(i, u) && o.update(), o } return i.__extends(t, n), t.prototype.update = function () { var r, e = this.element.getAttribute(s.Tooltip.dataDescribedByAttribute), i, u, n; if ((!e || o.ComponentFactory.create([{ component: s.Tooltip, eventToBind: "DOMContentLoaded", elements: [document.getElementById(e)] }]), !this.sequenceIndicatorElement) || (this.sequenceIndicatorElement.getAttribute("role") === "radiogroup" && (this.selectedAttribute = t.ariaChecked), this.isInteractive = !f.hasClass(this.sequenceIndicatorElement, "f-noninteractive"), this.items = f.selectElements(this.constructor.itemSelector, this.sequenceIndicatorElement), !this.items.length)) return !1; for (i = 0, u = this.items; i < u.length; i++)n = u[i], n.getAttribute(this.selectedAttribute) === t.selectedValue && (r = this.items.indexOf(n)), this.deselectItem(n), this.isInteractive || (n.setAttribute("tabIndex", "-1"), n.setAttribute("disabled", "")); return this.selectItem(this.items[r || 0]), this.setControllerIndex(r || 0), this.isInteractive && (this.isLtr = f.getDirection(this.sequenceIndicatorElement) === f.Direction.left, f.addEvent(this.sequenceIndicatorElement, f.eventTypes.click, this.handleClickEvent), f.addEvent(this.sequenceIndicatorElement, f.eventTypes.keydown, this.onKeydown, !0)), !0 }, t.prototype.teardown = function () { this.isInteractive && (f.removeEvent(this.sequenceIndicatorElement, f.eventTypes.click, this.handleClickEvent), f.removeEvent(this.sequenceIndicatorElement, f.eventTypes.keydown, this.onKeydown)) }, t.prototype.publish = function (n, t) { var i = n, r = n; if (i.onIndexChanged) i.onIndexChanged(t); if (r.onControllerIndexChanged) r.onControllerIndexChanged(t) }, t.prototype.selectItem = function (n, i) { i === void 0 && (i = !1); !n || (n.setAttribute(this.selectedAttribute, t.selectedValue), this.isInteractive && n.setAttribute("tabindex", "0"), f.addClass(n, t.activeItemClass), i && n.getAttribute("role") === "tab" && f.addClass(n, "x-hidden-focus")) }, t.prototype.deselectItem = function (n) { !n || (n.setAttribute(this.selectedAttribute, t.deselectedValue), this.isInteractive && n.setAttribute("tabindex", "-1"), f.removeClass(n, t.activeItemClass), n.getAttribute("role") === "tab" && f.removeClass(n, "x-hidden-focus")) }, t.prototype.show = function () { this.sequenceIndicatorElement && this.sequenceIndicatorElement.setAttribute("aria-hidden", "false") }, t.prototype.hide = function () { this.sequenceIndicatorElement && this.sequenceIndicatorElement.setAttribute("aria-hidden", "true") }, t.prototype.next = function () { var n; n = this.activeIndex === this.items.length - 1 ? 0 : this.activeIndex + 1; this.setControllerIndex(n) }, t.prototype.previous = function () { var n; n = this.activeIndex === 0 ? this.items.length - 1 : this.activeIndex - 1; this.setControllerIndex(n) }, t.selector = ".c-sequence-indicator", t.typeName = "SequenceIndicator", t.itemSelector = "button", t.selectedValue = "true", t.deselectedValue = "false", t.ariaSelected = "aria-selected", t.ariaChecked = "aria-checked", t.activeItemClass = "f-active", t }(u.Publisher); t.SequenceIndicator = h }); define("actionToggle", ["require", "exports", "tslib", "publisher", "componentFactory", "tooltip", "htmlExtensions", "utility"], function (n, t, i, r, u, f, e, o) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var s = function (n) { function t(i) { var r = n.call(this, i) || this; return r.element = i, r.toggleText = function (n) { e.setText(r.element, n.innerText) }, r.toggleLabel = function (n) { e.setText(r.element, n.label) }, r.updateActionToggleState = function (n) { n !== r.isToggled() && (r.skipAriaPressed ? n ? (e.addClass(r.element, t.initializeToggledClassName), r.element.setAttribute(t.dataIsPressedAttribute, "true"), r.toggleStateProperties(r.toggledState, r.initialState)) : (e.removeClass(r.element, t.initializeToggledClassName), r.element.setAttribute(t.dataIsPressedAttribute, "false"), r.toggleStateProperties(r.initialState, r.toggledState)) : e.hasClass(r.element, "c-action-toggle") && (n ? (e.addClass(r.element, t.initializeToggledClassName), r.element.setAttribute(t.ariaPressedAttribute, "true"), r.toggleStateProperties(r.toggledState, r.initialState)) : (e.removeClass(r.element, t.initializeToggledClassName), r.element.setAttribute(t.ariaPressedAttribute, "false"), r.toggleStateProperties(r.initialState, r.toggledState))), r.initiatePublish({ toggled: n })) }, r.toggleStateProperties = function (n, t) { e.removeClass(r.element, t.glyph); e.addClass(r.element, n.glyph); r.textArialLabelToggleFunction(n); !r.tooltip || r.tooltip.setContent(n.label) }, r.onActionToggleChange = function () { r.updateActionToggleState(!r.isToggled()) }, r.handleKeydownEvent = function (n) { switch (o.getKeyCode(n)) { case 13: case 32: e.preventDefault(n); r.updateActionToggleState(!r.isToggled()); break; case 27: e.preventDefault(n); r.updateActionToggleState(!1) } }, r.update(), r } return i.__extends(t, n), t.prototype.update = function () { var i = this, n, r; this.element && (this.initializeStates(), n = e.hasClass(this.element, t.initializeToggledClassName), this.skipAriaPressed = e.hasClass(this.element, t.skipAriaPressedAttributeClassName), r = this.element.getAttribute(f.Tooltip.dataDescribedByAttribute), !r || u.ComponentFactory.create([{ component: f.Tooltip, eventToBind: "DOMContentLoaded", elements: [document.getElementById(r)], callback: function (t) { !t && !t.length || (i.tooltip = t[0], i.tooltip.setContent(n ? i.toggledState.label : i.initialState.label)) } }]), n && e.removeClass(this.element, t.initializeToggledClassName), this.updateActionToggleState(n), this.skipAriaPressed ? n ? this.element.setAttribute(t.dataIsPressedAttribute, "true") : this.element.setAttribute(t.dataIsPressedAttribute, "false") : e.hasClass(this.element, "c-action-toggle") && (n ? this.element.setAttribute(t.ariaPressedAttribute, "true") : this.element.setAttribute(t.ariaPressedAttribute, "false")), e.addEvent(this.element, e.eventTypes.click, this.onActionToggleChange), e.addEvent(this.element, e.eventTypes.keydown, this.handleKeydownEvent)) }, t.prototype.teardown = function () { e.removeEvent(this.element, e.eventTypes.click, this.onActionToggleChange); e.removeEvent(this.element, e.eventTypes.keydown, this.handleKeydownEvent) }, t.prototype.publish = function (n, t) { if (n.onActionToggled) n.onActionToggled(t) }, t.prototype.isToggled = function () { return e.hasClass(this.element, t.initializeToggledClassName) }, t.prototype.initializeStates = function () { var n, i, r, u; for (this.initialState = { label: null, innerText: null, glyph: null }, this.toggledState = { label: this.element.getAttribute(t.localizedToggledLabelAttribute), innerText: this.element.getAttribute(t.localizedToggledTextAttribute), glyph: this.element.getAttribute(t.toggledGlyphAttribute) }, n = e.getText(this.element), this.element.getAttribute(t.ariaLabelAttribute) ? (this.initialState.label = this.element.getAttribute(t.ariaLabelAttribute), this.toggledState.innerText && n && (this.initialState.innerText = n), this.textArialLabelToggleFunction = this.toggleText) : n && (this.initialState.label = n, this.textArialLabelToggleFunction = this.toggleLabel), i = 0, r = this.element.className.split(" "); i < r.length; i++)if (u = r[i], u.indexOf("glyph-") >= 0) { this.initialState.glyph = u; break } }, t.selector = ".c-action-toggle", t.typeName = "ActionToggle", t.ariaPressedAttribute = "aria-pressed", t.dataIsPressedAttribute = "data-ispressed", t.ariaLabelAttribute = "aria-label", t.initializeToggledClassName = "f-toggle", t.skipAriaPressedAttributeClassName = "f-skip-ariapressed", t.toggledGlyphAttribute = "data-toggled-glyph", t.localizedToggledLabelAttribute = "data-toggled-label", t.localizedToggledTextAttribute = "data-toggled-text", t }(r.Publisher); t.ActionToggle = s }); require(["actionToggle", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.ActionToggle }]) }); define("carousel-base", ["require", "exports", "tslib", "observableComponent", "componentFactory", "publisher", "swipe", "stringExtensions", "htmlExtensions", "utility"], function (n, t, i, r, u, f, e, o, s, h) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var c = function (n) { function t(t, i) { var u = n.call(this, t, i) || this; return (u.carouselElement = t, u.activeIndex = -1, u.onFlipperClicked = function (n) { s.getEventTargetOrSrcElement(n) === u.previousButton ? u.previousSlide() : u.nextSlide() }, u.swipeHandler = function (n) { if (n.direction === e.SwipeDirection.Right || n.direction === e.SwipeDirection.Left) { var t = n.direction === e.SwipeDirection.Right ? u.direction === s.Direction.left : u.direction !== s.Direction.left; t && u.isScrollableNext() ? u.nextSlide() : !t && u.isScrollablePrevious() && u.previousSlide() } }, !r.ObservableComponent.shouldInitializeAsClass(t, i)) ? u : (u.direction = s.getDirection(), u.directionValue = s.Direction[u.direction], u.requestAnimationFrame = s.SafeBrowserApis.requestAnimationFrame, s.preventDefaultSwipeAction(u.element), u.requestAnimationFrame.call(window, function () { return u.update() }), u) } return i.__extends(t, n), t.prototype.update = function () { var n = this; return !this.carouselElement || !this.hasSlides() ? !1 : (this.requestAnimationFrame.call(window, function () { return n.setActiveSlide(n.getFirstActiveIndex(), !1) }), this.previousButton = s.selectFirstElement(t.previousButtonSelector, this.carouselElement), this.nextButton = s.selectFirstElement(t.nextButtonSelector, this.carouselElement), !this.previousButton || !this.nextButton || (s.addEvent(this.previousButton, s.eventTypes.click, this.onFlipperClicked), s.addEvent(this.nextButton, s.eventTypes.click, this.onFlipperClicked)), this.swipe = new e.Swipe([this.carouselElement], { end: this.swipeHandler }, e.SwipeOrientation.Horizontal), !0) }, t.prototype.teardown = function () { !this.previousButton || !this.nextButton || (s.removeEvent(this.previousButton, s.eventTypes.click, this.onFlipperClicked), s.removeEvent(this.nextButton, s.eventTypes.click, this.onFlipperClicked)); this.swipe && this.swipe.tearDown(); this.slides = null; this.previousButton = null; this.nextButton = null }, t.prototype.hasSlides = function () { return this.slides = this.getSlides(), !!this.slides && !!this.slides.length }, t.prototype.getCollectionItem = function (n) { var t; return !n || !n.firstElementChild || u.ComponentFactory.enumerateComponents(n.firstElementChild, function (n, i) { return i.onCollectionItemHidden && i.onCollectionItemShown && i.triggerItem && (t = i), !t }), t }, t.prototype.setActiveSlide = function (n, i) { return (i === void 0 && (i = !0), !this.slides || !h.isNumber(n) || n < 0 || n >= this.slides.length || n === this.activeIndex) ? !1 : (this.activeIndex >= 0 && this.activeIndex < this.slides.length && s.removeClass(this.slides[this.activeIndex], t.activeClass), this.activeIndex = n, s.addClass(this.slides[n], t.activeClass), this.updateTheme(), this.updateFlippers(), !0) }, t.prototype.updateTheme = function () { s.removeClasses(this.carouselElement, [t.themeDarkClass, t.themeLightClass]); var n = this.slides[this.activeIndex].getAttribute(t.slideThemeAttribute); o.isNullOrWhiteSpace(n) || s.addClass(this.carouselElement, t.themePrefix + n) }, t.prototype.updateFlippers = function () { this.isScrollableNext() ? s.addClass(this.carouselElement, t.nextFlipperClass) : s.removeClass(this.carouselElement, t.nextFlipperClass); this.isScrollablePrevious() ? s.addClass(this.carouselElement, t.previousFlipperClass) : s.removeClass(this.carouselElement, t.previousFlipperClass) }, t.prototype.publish = function (n, t) { n.onSlideRangeChanged(t) }, t.prototype.triggerSlide = function () { if (!this.slides || !this.slides.length || !(this.activeIndex >= 0)) return !1; var n = this.getCollectionItem(this.slides[this.activeIndex]); return n && n.triggerItem() }, t.selector = ".c-carousel", t.activeClass = "f-active", t.allChildSelectors = t.selector + " > * > ul > li", t.slideThemeAttribute = "data-f-theme", t.themePrefix = "theme-", t.previousFlipperClass = "f-scrollable-previous", t.nextFlipperClass = "f-scrollable-next", t.themeLightClass = "theme-light", t.themeDarkClass = "theme-dark", t.previousButtonSelector = ".c-flipper.f-previous, .c-flipper.f-left", t.nextButtonSelector = ".c-flipper.f-next, .c-flipper.f-right", t }(f.Publisher); t.CarouselBase = c }); define("swipe", ["require", "exports", "htmlExtensions"], function (n, t, i) { "use strict"; var f, r, u; Object.defineProperty(t, "__esModule", { value: !0 }); f = function () { function n(n, t, f, e, o) { f === void 0 && (f = u.All); var s = this; (this.targets = n, this.swipeEventHandlers = t, this.active = !1, this.orientation = u.All, this.pointerEvents = { mouse: { start: "mousedown", move: "mousemove", end: "mouseup" }, touch: { start: "touchstart", move: "touchmove", end: "touchend", cancel: "touchcancel" }, pointer: { start: "pointerdown", move: "pointermove", end: "pointerup", cancel: "pointercancel" } }, this.minimumDirectionalDistance = 30, this.maximumAntiDirectionalDistance = 200, this.minimumDirectionalRatio = .6, this.minimumMoveDistance = 10, this.startHandler = function (n) { s.active = !0; s.startCoordinate = i.getCoordinates(n); s.lastMoveCoordinate = s.startCoordinate; s.swipeEventHandlers.start && s.swipeEventHandlers.start({ event: n, target: s.getEventTarget(n), coordinate: s.startCoordinate }) }, this.moveHandler = function (n) { var o; if (s.active && s.startCoordinate) { var t = i.getCoordinates(n), f = Math.abs(t.x - s.lastMoveCoordinate.x), e = Math.abs(t.y - s.lastMoveCoordinate.y); f < s.minimumMoveDistance && e < s.minimumMoveDistance || (o = f > e ? t.x > s.lastMoveCoordinate.x ? r.Left : r.Right : t.y > s.lastMoveCoordinate.y ? r.Up : r.Down, s.lastMoveCoordinate = t, f = Math.abs(t.x - s.startCoordinate.x), e = Math.abs(t.y - s.startCoordinate.y), (f > e && s.orientation !== u.Vertical || f < e && s.orientation !== u.Horizontal) && i.preventDefault(n), s.swipeEventHandlers.move && s.swipeEventHandlers.move({ event: n, target: s.getEventTarget(n), coordinate: t, direction: o })) } }, this.endHandler = function (n) { if (s.active && (s.active = !1, s.swipeEventHandlers.end)) { var t = i.getCoordinates(n), r = s.getSwipeDirection(t); s.swipeEventHandlers.end({ event: n, target: s.getEventTarget(n), coordinate: t, direction: r }) } }, this.cancelHandler = function (n) { s.active && (s.active = !1, s.swipeEventHandlers.cancel && s.swipeEventHandlers.cancel({ event: n, target: s.getEventTarget(n) })) }, this.targets && this.targets.length && t) && (this.pointerTypes = e || ["touch", "pointer", "mouse"], this.minimumMoveDistance = o || this.minimumMoveDistance, this.orientation = f, i.addEvents(this.targets, this.getEvents(this.pointerTypes, "start"), this.startHandler), i.addEvents(this.targets, this.getEvents(this.pointerTypes, "move"), this.moveHandler), i.addEvents(this.targets, this.getEvents(this.pointerTypes, "end"), this.endHandler), i.addEvents(this.targets, this.getEvents(this.pointerTypes, "cancel"), this.cancelHandler)) } return n.prototype.tearDown = function () { i.removeEvents(this.targets, this.getEvents(this.pointerTypes, "start"), this.startHandler); i.removeEvents(this.targets, this.getEvents(this.pointerTypes, "move"), this.moveHandler); i.removeEvents(this.targets, this.getEvents(this.pointerTypes, "end"), this.endHandler); i.removeEvents(this.targets, this.getEvents(this.pointerTypes, "cancel"), this.cancelHandler) }, n.prototype.getEvents = function (n, t) { for (var e, r, u = [], i = 0, f = n; i < f.length; i++)e = f[i], r = this.pointerEvents[e][t], r && u.push(r); return u.join(" ") }, n.prototype.getEventTarget = function (n) { var f, t, r, u; if (!n || !this.targets) return null; if (this.targets.length === 1) return this.targets[0]; for (f = i.getEventTargetOrSrcElement(n), t = 0, r = this.targets; t < r.length; t++)if (u = r[t], i.isDescendantOrSelf(u, f)) return u; return null }, n.prototype.getSwipeDirection = function (n) { if (!!this.startCoordinate) { var t = Math.abs(n.y - this.startCoordinate.y), i = Math.abs(n.x - this.startCoordinate.x); if (t < this.maximumAntiDirectionalDistance && i > this.minimumDirectionalDistance && t / i <= this.minimumDirectionalRatio) return n.x > this.startCoordinate.x ? r.Left : r.Right; if (i < this.maximumAntiDirectionalDistance && t > this.minimumDirectionalDistance && i / t <= this.minimumDirectionalRatio) return n.y > this.startCoordinate.y ? r.Up : r.Down } return undefined }, n }(); t.Swipe = f, function (n) { n[n.Left = 0] = "Left"; n[n.Right = 1] = "Right"; n[n.Up = 2] = "Up"; n[n.Down = 3] = "Down" }(r = t.SwipeDirection || (t.SwipeDirection = {})), function (n) { n[n.Horizontal = 0] = "Horizontal"; n[n.Vertical = 1] = "Vertical"; n[n.All = 2] = "All" }(u = t.SwipeOrientation || (t.SwipeOrientation = {})) }); define("heroItem", ["require", "exports", "tslib", "hero-item-base"], function (n, t, i, r) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var u = function (n) { function t(t, i) { i === void 0 && (i = null); var r = n.call(this, t, i) || this; return r.heroItemElement = t, r } return i.__extends(t, n), t.selector = ".c-hero, .m-hero-item", t.typeName = "HeroItem", t.callToActionSelector = "a", t }(r.HeroItemBase); t.HeroItem = u }); require(["heroItem", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.HeroItem }]) }); define("video", ["require", "exports", "videoControls", "video-closed-captions", "utility", "htmlExtensions", "stringExtensions"], function (n, t, i, r, u, f, e) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var o = function () { function n(t) { var r = this; if (this.videoComponent = t, this.canPlay = !1, this.errorMessageDisplayed = !1, this.onMouseEvent = function (n) { if (n = f.getEvent(n), n.type === "mouseover") !r.controlPanelTimer || window.clearTimeout(r.controlPanelTimer), r.showControlPanel(); else if (n.type === "mouseout") { for (var t = n.toElement || n.relatedTarget; t && t.parentNode && t.parentNode !== window;) { if (t.parentNode === r || t === r) { f.preventDefault(n); return } t = t.parentNode } r.startControlPanelTimeout() } }, this.onVideoMetadataLoaded = function () { !r.videoControls || !r.videoPlayer || (r.canPlay = !1, r.videoControls.setDuration(r.videoPlayer.duration), r.videoPlayer.getAttribute("autoplay") !== null && r.play()) }, this.onVideoTimeUpdate = function () { !r.videoControls || !r.videoPlayer || (r.videoControls.setPlayPosition(r.videoPlayer.currentTime), r.closedCaptions && r.closedCaptions.updateCaptions(r.videoPlayer.currentTime)) }, this.onVideoPlayStateChanged = function (n) { r.canPlay = r.canPlay || n.type === "canplay" || n.type === "canplaythrough"; !r.videoControls || r.videoControls.updatePlayPauseState() }, this.onVideoPlayerClicked = function () { r.isPlayable && (r.isPaused() ? r.play() : r.pause()) }, this.onVideoEnded = function () { !r.videoControls || (r.videoControls.setPlayPosition(0), r.videoControls.updatePlayPauseState()); r.closedCaptions && r.closedCaptions.updateCaptions(0) }, this.onResized = function () { !r.videoComponent || !r.triggerParagraph || (u.getDimensions(r.videoComponent).width < u.Viewports.allWidths[2] ? r.triggerParagraph.setAttribute(n.ariaHidden, "true") : r.triggerParagraph.removeAttribute(n.ariaHidden)) }, t) { if (this.videoPlayer = f.selectFirstElementT(".f-video-player", this.videoComponent), this.videoControlsContainer = f.selectFirstElement(".f-video-controls", this.videoComponent), this.videoControls = new i.VideoControls(this.videoControlsContainer, this), !this.videoPlayer || !this.videoPlayer.canPlayType) return null; this.initializeClosedCaptions(); this.triggerContainer = f.selectFirstElement("section", this.videoComponent); !this.triggerContainer || (this.trigger = f.selectFirstElement(".c-action-trigger", this.triggerContainer), this.triggerParagraph = f.selectFirstElement("p", this.triggerContainer), this.triggerParagraph && (this.resizeListener = f.addThrottledEvent(window, f.eventTypes.resize, this.onResized), this.onResized())); this.videoControlsContainer && this.videoControls && (this.videoControls.setMuted(this.videoPlayer.getAttribute("muted") !== null), this.videoControls.setVolume(parseInt(u.getCookie(n.cookieVolume) || "1", 10)), f.addEvents(this.videoComponent, "mouseover mouseout", this.onMouseEvent), f.addEvents(this.videoPlayer, "canplay canplaythrough waiting", this.onVideoPlayStateChanged), f.addEvent(this.videoPlayer, f.eventTypes.loadedmetadata, this.onVideoMetadataLoaded), f.addEvent(this.videoPlayer, f.eventTypes.timeupdate, this.onVideoTimeUpdate), f.addEvent(this.videoPlayer, f.eventTypes.ended, this.onVideoEnded), f.addEvent(this.videoPlayer, f.eventTypes.click, this.onVideoPlayerClicked), this.startControlPanelTimeout()) } } return n.prototype.startControlPanelTimeout = function () { var t = this; this.controlPanelTimer = window.setTimeout(function () { t.hideControlPanel() }, n.controlPanelTimeout) }, n.prototype.hideControlPanel = function () { !this.controlPanelTimer || window.clearTimeout(this.controlPanelTimer); !this.videoControlsContainer || f.hasClass(this.videoControlsContainer, n.showControlsClass) && (f.removeClass(this.videoControlsContainer, n.showControlsClass), f.addClass(this.videoControlsContainer, n.hideControlsClass), !this.ccOverlay || (f.removeClass(this.ccOverlay, n.fitControlsClass), this.closedCaptions && this.videoPlayer && this.closedCaptions.updateCaptions(this.videoPlayer.currentTime))); !this.videoControls || this.videoControls.prepareToHide() }, n.prototype.showControlPanel = function () { !this.videoControlsContainer || this.errorMessageDisplayed || f.hasClass(this.videoControlsContainer, n.hideControlsClass) && (f.removeClass(this.videoControlsContainer, n.hideControlsClass), f.addClass(this.videoControlsContainer, n.showControlsClass), !this.ccOverlay || (f.addClass(this.ccOverlay, n.fitControlsClass), this.closedCaptions && this.videoPlayer && this.closedCaptions.updateCaptions(this.videoPlayer.currentTime))) }, n.prototype.isPaused = function () { return !this.videoPlayer ? !1 : this.videoPlayer.paused }, n.prototype.isPlayable = function () { return !this.videoPlayer ? !1 : this.canPlay }, n.prototype.play = function () { !this.videoPlayer || this.videoPlayer.play(); !this.videoControls || this.videoControls.updatePlayPauseState() }, n.prototype.pause = function () { !this.videoPlayer || this.videoPlayer.pause(); !this.videoControls || this.videoControls.updatePlayPauseState() }, n.prototype.setPlayPosition = function (t) { u.isNumber(t) && !!this.videoPlayer && (t = Math.max(0, Math.min(t, u.isNumber(this.videoPlayer.duration) ? this.videoPlayer.duration : 0)), Math.abs(t - this.videoPlayer.currentTime) >= n.positionUpdateThreshold && (this.videoPlayer.currentTime = t)) }, n.prototype.getVolume = function () { return !!this.videoPlayer && u.isNumber(this.videoPlayer.volume) ? this.videoPlayer.volume : 0 }, n.prototype.setVolume = function (t) { u.isNumber(t) && !!this.videoPlayer && (t = Math.round(Math.max(0, Math.min(t, 1)) * 100) / 100, t !== this.videoPlayer.volume && (this.videoPlayer.volume = t, u.setCookie(n.cookieVolume, t.toString(), "/", 365), !this.videoControls || this.videoControls.setVolume(t))) }, n.prototype.isMuted = function () { return !this.videoPlayer ? !0 : this.videoPlayer.muted }, n.prototype.setMuted = function (n) { !this.videoPlayer || n === this.videoPlayer.muted || (this.videoPlayer.muted = n, !this.videoControls || this.videoControls.setMuted(n)) }, n.prototype.setFullscreen = function () { if (!!this.videoPlayer && (this.videoPlayer.requestFullscreen || this.videoPlayer.msRequestFullscreen || this.videoPlayer.mozRequestFullScreen || this.videoPlayer.webkitRequestFullscreen || this.videoPlayer.webkitSupportsFullscreen)) { var n = document.fullScreenElement || document.msFullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement, t = document.cancelFullScreen || document.msExitFullscreen || document.mozCancelFullScreen || document.webkitCancelFullScreen || document.webkitCancelFullScreen, i = this.videoPlayer.requestFullscreen || this.videoPlayer.msRequestFullscreen || this.videoPlayer.mozRequestFullScreen || this.videoPlayer.webkitRequestFullscreen || this.videoPlayer.webkitEnterFullScreen; n && t(); i.call(this.videoPlayer) } }, n.prototype.initializeClosedCaptions = function () { (this.ccOverlay = f.selectFirstElement(".f-video-cc-overlay", this.videoComponent), this.ccOverlay) && (this.closedCaptions = new r.VideoClosedCaptions(this.ccOverlay), this.initializeClosedCaptionsMenu()) }, n.prototype.initializeClosedCaptionsMenu = function (t) { var e, r, o, h, c, s, l, i; if (this.ccOverlay && this.closedCaptions) { if (!t && (t = [], r = f.selectElementsT("ul[data-video-sub-options=f-video-captions] li a[data-video-selectable]", this.videoComponent), r)) for (r = r.slice(1), o = 0, h = r; o < h.length; o++) { var i = h[o], a = this.removeIdPrefix(i.parentElement.id), v = i.parentElement.getAttribute("aria-selected") === "true"; v && (e = a); t.push({ id: a, value: f.getText(i), selected: v, href: i.href }) } if (!t || !t.length) { this.ccOptions = null; return } for (c = u.getCookie(n.cookieCcPreference), c && (e = c), s = 0, l = t; s < l.length; s++)i = l[s], e && (i.selected = e === i.id), i.id = this.addIdPrefix(i.id); this.ccOptions = t; this.videoControls.setOptions({ category: "f-video-captions", options: t }) } }, n.prototype.onOptionChanged = function (n) { switch (n.category) { case "f-video-captions": this.setCC(n.id); break; case "f-video-quality": this.setQuality(n.id); break; case "f-video-share": this.shareVideo(n.id) } }, n.prototype.setCC = function (t) { var i, r, f, e; if (this.closedCaptions) { if (i = null, t && this.ccOptions) for (r = 0, f = this.ccOptions; r < f.length; r++)if (e = f[r], e.id === t) { i = e; break } t = this.removeIdPrefix(t); this.closedCaptions.setCcLanguage(t, i ? i.href : null); u.setCookie(n.cookieCcPreference, t, "/", 365) } }, n.prototype.setQuality = function () { }, n.prototype.shareVideo = function () { }, n.prototype.addIdPrefix = function (n) { var t = this.videoComponent && this.videoComponent.id ? this.videoComponent.id + "-" : null; return t && !e.startsWith(n, t, !1) ? t + n : n }, n.prototype.removeIdPrefix = function (n) { var t = this.videoComponent && this.videoComponent.id ? this.videoComponent.id + "-" : null; return t && e.startsWith(n, t, !1) ? n.substring(t.length) : n }, n.prototype.showTrigger = function () { !this.triggerContainer || this.triggerContainer.setAttribute(n.ariaHidden, "false") }, n.prototype.hideTrigger = function () { !this.triggerContainer || this.triggerContainer.setAttribute(n.ariaHidden, "true") }, n.prototype.displayErrorMessage = function (t) { if (t && (t.title || t.message)) { if (this.errorMessageDisplayed = !0, !this.errorMessage) { this.errorMessage = {}; this.errorMessage.container = document.createElement("div"); var i = document.createElement("div"); this.errorMessage.title = document.createElement("p"); this.errorMessage.message = document.createElement("p"); this.errorMessage.container.setAttribute("role", "status"); this.errorMessage.title.setAttribute("class", "c-heading"); this.errorMessage.message.setAttribute("class", "c-paragraph"); !t.title || f.setText(this.errorMessage.title, t.title); !t.message || f.setText(this.errorMessage.message, t.message); this.errorMessage.container.appendChild(i); i.appendChild(this.errorMessage.title); i.appendChild(this.errorMessage.message); this.videoComponent.appendChild(this.errorMessage.container) } else f.setText(this.errorMessage.title, t.title || ""), f.setText(this.errorMessage.message, t.message || ""), this.errorMessage.container.setAttribute(n.ariaHidden, "false"); this.hideControlPanel(); this.hideTrigger() } }, n.prototype.hideErrorMessage = function () { !this.errorMessage || !this.errorMessage.container || (this.errorMessage.container.setAttribute(n.ariaHidden, "true"), this.errorMessageDisplayed = !1) }, n.selector = ".c-video", n.showControlsClass = "f-slidein", n.hideControlsClass = "f-slideout", n.fitControlsClass = "f-overlay-slidein", n.ariaHidden = "aria-hidden", n.cookieVolume = "vidvol", n.cookieCcPreference = "vidccpref", n.positionUpdateThreshold = .1, n.controlPanelTimeout = 3500, n }(); t.Video = o }); require(["video", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Video, eventToBind: "DOMContentLoaded" }]) }); define("videoControls", ["require", "exports", "componentFactory", "slider", "utility", "htmlExtensions"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function () { function n(t, u) { var e = this, o, s; if (this.videoControls = t, this.onPlayPauseEvents = function (t) { t.type === "click" ? !e.videoPlayer || (e.videoPlayer.isPaused() ? e.play() : e.pause()) : t.type === "mouseover" ? !e.playTooltip || f.removeClass(e.playTooltip, n.screenReaderOnlyClass) : t.type === "mouseout" && (!e.playTooltip || f.addClass(e.playTooltip, n.screenReaderOnlyClass)) }, this.onVolumeEvents = function (n) { n.type === "click" ? f.getEventTargetOrSrcElement(n) === e.volumeButton && e.setMuted(!e.videoPlayer.isMuted()) : n.type === "mouseover" || n.type === "focus" ? e.showVolumeContainer() : (n.type === "mouseout" || n.type === "blur") && e.hideVolumeContainer() }, this.onVolumeSliderEvents = function (n) { n.type === "focus" ? e.showVolumeContainer() : n.type === "blur" && e.hideVolumeContainer() }, this.onFullScreenEvents = function (t) { t.type === "click" ? !e.videoPlayer || e.videoPlayer.setFullscreen() : t.type === "mouseover" ? !e.fullScreenTooltip || e.fullScreenTooltip.setAttribute(n.ariaHidden, "false") : t.type === "mouseout" && (!e.fullScreenTooltip || e.fullScreenTooltip.setAttribute(n.ariaHidden, "true")) }, this.toggleOptionsDialog = function () { !e.optionsContainer || (e.optionsContainer.getAttribute(n.ariaHidden) === "false" ? (event.type === "click" && e.hideOptionsContainer(), event.type === "mouseout" && window.setTimeout(function (n) { n.hideOptionsContainer() }, e.cleanupInterval, e)) : e.optionsContainer.getAttribute(n.ariaHidden) === "true" && (event.type === "click" || event.type === "mouseover") && e.showOptionsContainer()) }, this.hideOptionsContainer = function () { !e.optionsContainer || e.optionsContainer.setAttribute(n.ariaHidden, "true") }, this.onOptionsDialogClick = function (n) { var t, i, r, h, u, o, s, c; if (n = f.getEvent(n), t = f.getEventTargetOrSrcElement(n), i = t.getAttribute("data-video-options"), i === "back") { e.showOptionsContainer(); f.preventDefault(n); return } if (i) { !e.optionsContainer || !e.odParent || (r = f.selectFirstElement("ul[data-video-sub-options=" + i + "]", e.optionsContainer), f.css(r, "display", "block"), h = e.calcHeight(r), f.css(e.optionsContainer, "height", h + "px"), f.css(e.odParent, "left", "-160px"), e.odSubActive = r); f.preventDefault(n); return } if (!!e.odSubActive && (f.preventDefault(n), u = t.getAttribute("data-video-selectable"), !u && t.firstElementChild && (t = t.firstElementChild, u = t.getAttribute("data-video-selectable")), u)) { for (o = 0, s = f.selectElements("a", e.odSubActive); o < s.length; o++)c = s[o], f.removeClass(c, "glyph-check-mark"); if (f.addClass(t, "glyph-check-mark"), !!e.videoPlayer) e.videoPlayer.onOptionChanged({ category: e.odSubActive.getAttribute("data-video-sub-options"), id: t.parentElement.id, href: t.getAttribute("href") }) } e.hideOptionsContainer() }, t && u) { if (this.videoPlayer = u, this.playButton = f.selectFirstElementT(".f-play-pause", this.videoControls), this.playTooltip = f.selectFirstElement("span", this.playButton), this.fullScreenButton = f.selectFirstElementT(".f-full-screen", this.videoControls), this.fullScreenTooltip = f.selectFirstElement("span", this.fullScreenButton), this.volumeButton = f.selectFirstElementT(".f-volume-button", this.videoControls), this.volumeContainer = f.selectFirstElement(".f-volume-slider", this.videoControls), this.optionsButton = f.selectFirstElementT(".f-options", this.videoControls), this.optionsContainer = f.selectFirstElement(".f-options-dialog", this.videoControls), this.timeCurrent = f.selectFirstElement(".f-current-time", this.videoControls), this.timeDuration = f.selectFirstElement(".f-duration", this.videoControls), this.cleanupInterval = 2e3, o = f.selectFirstElement(".c-slider.f-progress", this.videoControls), s = f.selectFirstElement(".c-slider", this.volumeContainer), !this.playButton || !this.playTooltip || !this.fullScreenButton || !this.fullScreenTooltip || !o || !this.volumeButton || !this.volumeContainer || !s || !this.timeCurrent || !this.timeDuration || !this.optionsButton || !this.optionsContainer) return null; this.playButton.removeAttribute("aria-label"); this.playTooltip.removeAttribute("aria-hidden"); f.addClass(this.playTooltip, n.screenReaderOnlyClass); this.initializeLocalization(); this.updatePlayPauseState(); this.optionsDialogInit(); f.addEvents(window, "resize scroll", this.hideOptionsContainer); f.addEvents(this.playButton, "click mouseover mouseout", this.onPlayPauseEvents); f.addEvents(this.fullScreenButton, "click mouseover mouseout", this.onFullScreenEvents); f.addEvents([this.volumeButton, this.volumeContainer], "click mouseover mouseout focus blur", this.onVolumeEvents); f.addEvents(this.optionsButton, "click mouseover mouseout", this.toggleOptionsDialog); i.ComponentFactory.create([{ component: r.Slider, eventToBind: "DOMContentLoaded", elements: [o, s], callback: function (n) { !n || !n.length || n.length !== 2 || (e.progressSlider = n[0], e.volumeSlider = n[1], e.progressSlider.subscribe({ onValueChanged: function (n) { return e.onProgressChanged(n) } }), e.volumeSlider.subscribe({ onValueChanged: function (n) { return e.onVolumeChanged(n) } }), f.addEvents(f.selectFirstElement("button", e.volumeSlider.element), "focus blur", e.onVolumeSliderEvents)) } }]) } } return n.prototype.initializeLocalization = function () { !this.playButton || (this.locPlay = this.playButton.getAttribute("data-locPlay") || "Play", this.locPause = this.playButton.getAttribute("data-locPause") || "Pause") }, n.prototype.setDuration = function (n) { u.isNumber(n) && (!this.progressSlider || this.progressSlider.resetSlider(0, n), !this.timeDuration || f.setText(this.timeDuration, u.toElapsedTimeString(n, !1))) }, n.prototype.setPlayPosition = function (n) { u.isNumber(n) && !!this.progressSlider && this.progressSlider.setValue(n) }, n.prototype.setVolume = function (n) { u.isNumber(n) && !!this.videoPlayer && (this.videoPlayer.setVolume(n), !this.volumeSlider || (this.volumeSlider.setValue(Math.round(n * 100)), this.updateMuteGlyph())) }, n.prototype.setMuted = function (n) { !this.videoPlayer || (this.videoPlayer.setMuted(n), this.updateMuteGlyph()) }, n.prototype.updateMuteGlyph = function () { if (!!this.videoPlayer && !!this.volumeButton) { f.removeClasses(this.volumeButton, ["glyph-volume", "glyph-mute"]); var n = this.videoPlayer.isMuted() || this.videoPlayer.getVolume() === 0; f.addClass(this.volumeButton, n ? "glyph-mute" : "glyph-volume") } }, n.prototype.prepareToHide = function () { this.hideOptionsContainer(); this.hideVolumeContainer() }, n.prototype.onProgressChanged = function (n) { if (!n) return null; !!this.videoPlayer && n.userInitiated && this.videoPlayer.setPlayPosition(n.value); var t = u.toElapsedTimeString(n.value, !0); return !this.timeCurrent || f.setText(this.timeCurrent, u.toElapsedTimeString(n.value, !1)), t }, n.prototype.onVolumeChanged = function (n) { if (!n) return null; !!this.videoPlayer && n.value > 0 && this.videoPlayer.setMuted(!1); var t = Math.round(n.value); return this.setVolume(t / 100), t.toString() }, n.prototype.play = function () { !this.videoPlayer || this.videoPlayer.play() }, n.prototype.pause = function () { !this.videoPlayer || this.videoPlayer.pause() }, n.prototype.updatePlayPauseState = function () { !this.videoPlayer || !this.playButton || (this.videoPlayer.isPlayable() ? (this.playButton.removeAttribute("disabled"), this.videoPlayer.isPaused() ? (!this.playTooltip || f.setText(this.playTooltip, this.locPlay), f.removeClass(this.playButton, "glyph-pause"), f.addClass(this.playButton, "glyph-play")) : (!this.playTooltip || f.setText(this.playTooltip, this.locPause), f.removeClass(this.playButton, "glyph-play"), f.addClass(this.playButton, "glyph-pause"), this.prepareToHide())) : (!this.playTooltip || f.setText(this.playTooltip, this.locPlay), f.removeClass(this.playButton, "glyph-pause"), f.addClass(this.playButton, "glyph-play"), this.playButton.setAttribute("disabled", "disabled"))) }, n.prototype.showVolumeContainer = function () { if (!!this.volumeContainer) { this.volumeContainer.setAttribute(n.ariaHidden, "false"); this.onlyOneDialog(this.volumeContainer) } }, n.prototype.hideVolumeContainer = function () { !this.volumeContainer || this.volumeContainer.setAttribute(n.ariaHidden, "true") }, n.prototype.optionsDialogInit = function () { !this.optionsContainer || (this.odParent = f.selectFirstElement("ul", this.optionsContainer), this.odDimensions = f.getClientRect(this.odParent), f.addEvent(this.odParent, f.eventTypes.click, this.onOptionsDialogClick)) }, n.prototype.showOptionsContainer = function () { if (!!this.optionsContainer && !!this.odParent) { this.optionsContainer.setAttribute(n.ariaHidden, "false"); f.css(this.optionsContainer, "height", this.odDimensions.height + "px"); f.css(this.optionsContainer, "overflowY", "hidden"); f.css(this.odParent, "left", "0"); this.odClearSubActive(); this.onlyOneDialog(this.optionsContainer) } }, n.prototype.onlyOneDialog = function (t) { !this.optionsContainer || !this.volumeContainer || this.optionsContainer.getAttribute(n.ariaHidden) !== "false" || this.volumeContainer.getAttribute(n.ariaHidden) !== "false" || (t === this.optionsContainer ? this.hideVolumeContainer() : this.hideOptionsContainer()) }, n.prototype.calcHeight = function (n) { if (!n || !this.videoControls) return 0; var t = f.getClientRect(n).height, r = f.getClientRect(this.videoControls.parentElement), u = f.getClientRect(this.videoControls), i = r.height - u.height; return t > i ? (f.css(this.optionsContainer, "overflowY", "scroll"), t = i) : f.css(this.optionsContainer, "overflowY", "hidden"), t }, n.prototype.odClearSubActive = function () { !this.odSubActive || (f.css(this.odSubActive, "display", "none"), this.odSubActive = null) }, n.prototype.setOptions = function (n) { var c, o, s, e, r, u, h, l, t, i, a; if (n && n.options && n.options.length && n.category && this.odParent) { if (n.category === "info") { t = n.options[0]; t && t.href && (c = f.selectFirstElementT("a", this.odParent), c && c.setAttribute("href", t.href)); return } if (o = n.category === "f-video-share" ? 1 : 2, s = f.selectFirstElement("ul[data-video-sub-options='" + n.category + "']", this.odParent), !!s && (e = f.selectElements("li", s), !!e && e.length > o)) { while (e.length > o) f.removeElement(e.pop()); for (r = e.pop(), o === 1 && (r = r.cloneNode(!0), f.removeClasses(r.firstElementChild, ["glyph-chevron-left", "c-glyph"]), r.firstElementChild.removeAttribute("data-video-options")), f.removeClass(r.firstElementChild, "glyph-check-mark"), u = null, h = 0, l = n.options; h < l.length; h++)t = l[h], i = s.appendChild(r.cloneNode(!0)), i.id = t.id, f.setText(i.firstElementChild, t.value), t.selected && (u = i.firstElementChild), t.href && (i.firstElementChild.setAttribute("href", t.href), f.addClass(i.firstElementChild, t.glyph)), t.glyph && (f.addClass(i.firstElementChild, "c-glyph"), f.addClass(i.firstElementChild, t.glyph)), t.image && (a = i.firstElementChild.appendChild(document.createElement("img")), f.addClass(a, "c-image"), a.setAttribute("src", t.image)); if (n.category !== "f-video-share" && (u || (u = r.firstElementChild), f.addClass(u, "glyph-check-mark"), !!this.videoPlayer)) this.videoPlayer.onOptionChanged({ category: n.category, id: u.parentElement.id, href: u.getAttribute("href") }) } } }, n.selector = ".f-video-controls", n.ariaHidden = "aria-hidden", n.ariaLabel = "aria-label", n.screenReaderOnlyClass = "x-screen-reader", n }(); t.VideoControls = e }); require(["slider", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Slider }]) }); define("slider", ["require", "exports", "tslib", "publisher", "htmlExtensions", "utility"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function (n) { function t(t) { var i = n.call(this, t) || this; return i.onKeyPressed = function (n) { var t, r, f, e; switch (n) { case 37: case 39: i.isVerticalSlider || (t = i.primaryDirection === u.Direction.left ? i.stepOffset : -i.stepOffset, t = n === 37 ? -t : t, i.updateThumbOffset(i.thumbOffset + t, !0, !0), u.preventDefault(u.getEvent(event))); break; case 38: case 40: i.isVerticalSlider && (t = n === 38 ? i.stepOffset : -i.stepOffset, i.updateThumbOffset(i.thumbOffset + t, !0, !0), u.preventDefault(u.getEvent(event))); break; case 33: u.preventDefault(u.getEvent(event)); t = 2 * i.stepOffset; i.updateThumbOffset(i.thumbOffset + t, !0, !0); break; case 34: u.preventDefault(u.getEvent(event)); t = -(2 * i.stepOffset); i.updateThumbOffset(i.thumbOffset + t, !0, !0); break; case 36: u.preventDefault(u.getEvent(event)); r = parseInt(i.input.getAttribute("min"), 10) || 0; i.updateThumbOffset(r, !0, !0); break; case 35: u.preventDefault(u.getEvent(event)); f = parseInt(i.input.getAttribute("step"), 10); e = i.thumbRange + f; i.updateThumbOffset(e, !0, !0) } }, i.onKeyDown = function (n) { i.onKeyPressed(f.getKeyCode(u.getEvent(n))) }, i.onMouseDown = function (n) { if (n = u.getEvent(n), i.setupDimensions(), u.getEventTargetOrSrcElement(n) === i.thumb) { u.addEvent(document, u.eventTypes.mousemove, i.onMouseMove); u.addEvent(document, u.eventTypes.mouseup, i.onMouseUp); u.addEvent(document, u.eventTypes.touchmove, i.onMouseMove); u.addEvent(document, u.eventTypes.touchcancel, i.onMouseUp); return } i.moveThumbTo(n.clientX, n.clientY) }, i.onMouseMove = function (n) { if (n.type === "mousemove" && (n = u.getEvent(n)), n.type === "touchmove") { var t = u.getEvent(n); n = t.targetTouches[0] } i.moveThumbTo(n.clientX, n.clientY) }, i.onMouseUp = function () { u.removeEvent(document, u.eventTypes.mousemove, i.onMouseMove); u.removeEvent(document, u.eventTypes.mouseup, i.onMouseUp); u.removeEvent(document, u.eventTypes.touchmove, i.onMouseMove); u.removeEvent(document, u.eventTypes.touchcancel, i.onMouseUp) }, i.onWindowResized = function () { i.setupDimensions() }, i.update(), i } return i.__extends(t, n), t.prototype.update = function () { if (this.element) { this.input = u.selectFirstElement("input", this.element); this.primaryDirection = u.getDirection(this.element); this.isVerticalSlider = u.hasClass(this.input, "f-vertical"); u.preventDefaultSwipeAction(this.element, !this.isVerticalSlider); u.addClass(this.input, "x-screen-reader"); var t = parseInt(this.input.getAttribute("min"), 10) || 0, i = parseInt(this.input.getAttribute("max"), 10) || 100, n = parseInt(this.input.getAttribute("value"), 10), r = parseInt(this.input.getAttribute("step"), 10); this.element.children[this.element.children.length - 1] === this.input ? (this.mockSlider = document.createElement("div"), this.thumb = document.createElement("button"), this.thumb.setAttribute("role", "slider"), this.thumb.setAttribute("aria-valuemin", t.toString()), this.thumb.setAttribute("aria-valuemax", i.toString()), this.thumb.setAttribute("aria-valuenow", n.toString()), this.thumb.setAttribute("aria-valuetext", n.toString()), this.input.hasAttribute("aria-label") && this.thumb.setAttribute("aria-label", this.input.getAttribute("aria-label")), this.valueTooltip = document.createElement("span"), this.track = document.createElement("span"), this.thumb.appendChild(this.valueTooltip), this.mockSlider.appendChild(this.thumb), this.mockSlider.appendChild(this.track), this.element.appendChild(this.mockSlider), this.ignoreNextDOMChange = !0) : (this.mockSlider = this.element.children[this.element.children.length - 1], this.thumb = this.mockSlider.firstElementChild, this.valueTooltip = this.thumb.firstElementChild, this.track = this.mockSlider.children[this.mockSlider.children.length - 1]); this.halfThumbOffset = this.thumb.clientWidth / 2; this.resetSliderInternal(t, i, n, r, !0) && (u.addEvent(this.element, u.eventTypes.mousedown, this.onMouseDown), u.addEvent(this.element, u.eventTypes.touchstart, this.onMouseDown), u.addEvent(this.thumb, u.eventTypes.keydown, this.onKeyDown), this.resizeListener = u.addDebouncedEvent(window, u.eventTypes.resize, this.onWindowResized)) } }, t.prototype.teardown = function () { u.removeEvent(this.element, u.eventTypes.mousedown, this.onMouseDown); u.removeEvent(this.element, u.eventTypes.touchstart, this.onMouseDown); u.removeEvent(this.thumb, u.eventTypes.keydown, this.onKeyDown); u.removeEvent(window, u.eventTypes.resize, this.resizeListener); this.input = null; this.mockSlider = null; this.thumb = null; this.valueTooltip = null; this.track = null; this.resizeListener = null }, t.prototype.resetSlider = function (n, t, i, r) { return this.resetSliderInternal(n, t, i, r, !1) }, t.prototype.resetSliderInternal = function (n, t, i, r, u) { return !f.isNumber(n) || !f.isNumber(t) ? !1 : Math.max(n, t) - Math.min(n, t) <= 0 ? !1 : (this.min = Math.min(n, t), this.max = Math.max(n, t), this.range = this.max - this.min, this.step = isNaN(r) ? this.range / 10 : r, this.value = Math.min(Math.max(isNaN(i) ? isNaN(this.value) ? this.min : this.value : i, this.min), this.max), this.setupDimensions(), this.updateThumbOffset(this.thumbOffset, u, !1, this.value), !0) }, t.prototype.setValue = function (n) { return !f.isNumber(n) || n < this.min || n > this.max ? !1 : (n !== this.value && (this.thumbOffset = (n - this.min) * this.thumbRange / this.range + this.halfThumbOffset, this.updateThumbOffset(this.thumbOffset, !1, !1, n)), !0) }, t.prototype.setupDimensions = function () { this.dimensions = u.getClientRect(this.mockSlider); this.isVerticalSlider ? (this.dimensions.left -= t.hitPadding, this.dimensions.right += t.hitPadding, this.thumbRange = this.dimensions.height - this.thumb.clientWidth, this.maxThumbOffset = this.dimensions.height) : (this.dimensions.top -= t.hitPadding, this.dimensions.bottom += t.hitPadding, this.thumbRange = this.dimensions.width - this.thumb.clientWidth, this.maxThumbOffset = this.dimensions.width); this.thumbRange = Math.max(this.thumbRange, 1); this.thumbOffset = (this.value - this.min) * this.thumbRange / this.range + this.halfThumbOffset; this.stepOffset = this.thumbRange / (this.range / this.step); this.setThumbPosition() }, t.prototype.setThumbPosition = function () { var n = Math.max(0, this.thumbOffset - this.halfThumbOffset); u.css(this.thumb, u.Direction[this.primaryDirection], n + "px"); u.css(this.track, "width", n + "px") }, t.prototype.updateThumbOffset = function (n, t, i, r) { var o, s, e; r === void 0 && (r = NaN); f.isNumber(n) || (n = this.thumbOffset); this.thumbOffset = Math.min(Math.max(0, n), this.maxThumbOffset); o = r; isNaN(o) && (o = Math.max(0, this.thumbOffset - this.halfThumbOffset) * 1e3 * this.range / this.thumbRange, o = Math.round(o) / 1e3 + this.min); this.value = Math.min(Math.max(this.min, o), this.max); this.input.setAttribute("value", this.value.toString()); o = parseFloat(this.input.getAttribute("value")); isNaN(o) || (this.value = o); s = isNaN(parseFloat(this.input.getAttribute("step"))) ? this.value % 1 == 0 ? this.value.toString() : (Math.round(this.value * 10) / 10).toString() : this.value.toString(); this.thumb.setAttribute("aria-valuenow", s); this.thumb.setAttribute("aria-valuetext", s); this.setThumbPosition(); this.valueDescriptor = null; this.initiatePublish({ value: this.value, internal: t, userInitiated: i }); e = this.valueDescriptor || {}; this.valueDescriptor = null; typeof e == "object" ? (u.setText(this.valueTooltip, e.tooltipText || s), e.ariaValueText && this.thumb.setAttribute("aria-valuetext", e.ariaValueText)) : typeof e == "string" && ((isNaN(parseFloat(e)) || e.match(":")) && this.thumb.setAttribute("aria-valuetext", e === "00:00:00" ? "0 second" : e), u.setText(this.valueTooltip, e)) }, t.prototype.publish = function (n, t) { var i = n.onValueChanged(t); !i || this.valueDescriptor || (this.valueDescriptor = i) }, t.prototype.moveThumbTo = function (n, t) { if (f.pointInRect(n, t, this.dimensions)) { var i = this.dimensions.bottom - t; this.isVerticalSlider || (i = this.primaryDirection === u.Direction.left ? n - this.dimensions.left : this.dimensions.right - n); this.updateThumbOffset(i, !0, !0) } }, t.selector = ".c-slider", t.typeName = "Slider", t.hitPadding = 20, t }(r.Publisher); t.Slider = e }); require(["slider", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Slider }]) }); define("video-closed-captions", ["require", "exports", "ttml-parser", "htmlExtensions", "utility"], function (n, t, i, r, u) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var f = function () { function n(n, t) { this.element = n; this.errorCallback = t; this.lastPlayPosition = 0; this.ccLanguageId = null; this.resetCaptions() } return n.prototype.setCcLanguage = function (n, t) { if (this.element && n !== this.ccLanguageId) { if (this.ttmlContext = null, this.resetCaptions(), !t) { this.ccLanguageId = null; return } this.ccLanguageId = n; this.loadClosedCaptions(t) } }, n.prototype.getCurrentCcLanguage = function () { return this.ccLanguageId }, n.prototype.loadClosedCaptions = function (n) { var i = this, t; n && (t = new XMLHttpRequest, t.onreadystatechange = function () { if (t.readyState === 4 && t.status === 200) i.onClosedCaptionsLoaded(t.responseXML || t.responseText) }, t.open("GET", n, !0), t.setRequestHeader("Accept", "text/xml, application/xml"), t.send()) }, n.prototype.onClosedCaptionsLoaded = function (t) { if (t) { this.element.setAttribute(n.ariaHidden, "false"); var r = this.element.id ? this.element.id + "-" : "", f = { idPrefix: r, fontMap: { "default": "Segoe ui, Arial" }, relatedMediaObjectRegion: u.getDimensions(this.element) }; this.ttmlContext = i.TtmlParser.parse(t, f); this.ttmlContext && (this.ttmlContext.setOwnerDocument(this.element.ownerDocument), this.ttmlContext.hasEvents() ? this.updateCaptions(this.lastPlayPosition) : this.element.setAttribute(n.ariaHidden, "true")) } }, n.prototype.updateCaptions = function (t) { var f, s, i, e, o; if (this.lastPlayPosition = t, this.ttmlContext && this.ttmlContext.hasEvents() && (f = Math.floor(t * 1e3), this.element.setAttribute(n.ariaHidden, "false"), s = u.getDimensions(this.element), this.ttmlContext.updateRelatedMediaObjectRegion(s) && this.resetCaptions(), this.ttmlContext.updateCurrentEvents(f))) { for (this.element.setAttribute(n.ariaHidden, "true"), r.removeInnerHtml(this.element), i = 0, e = this.ttmlContext.getCues(f); i < e.length; i++)o = e[i], this.applyUserPreferencesOverrides(o), this.element.appendChild(o); this.element.setAttribute(n.ariaHidden, "false") } }, n.prototype.resetCaptions = function () { this.ttmlContext && this.ttmlContext.resetCurrentEvents(); this.element && (this.element.setAttribute(n.ariaHidden, "true"), r.removeInnerHtml(this.element)) }, n.prototype.applyUserPreferencesOverrides = function (t) { var u, o, e, s, f, i; if (n.userPreferences) { if (n.userPreferences.text) for (u = 0, o = r.selectElements("p, span, br", t); u < o.length; u++) { f = o[u]; for (i in n.userPreferences.text) n.userPreferences.text.hasOwnProperty(i) && r.css(f, i, n.userPreferences.text[i]) } if (n.userPreferences.window) for (e = 0, s = r.toArray(t.children); e < s.length; e++) { f = s[e]; for (i in n.userPreferences.window) n.userPreferences.window.hasOwnProperty(i) && r.css(f, i, n.userPreferences.window[i]) } } }, n.ariaHidden = "aria-hidden", n }(); t.VideoClosedCaptions = f }); define("ttml-parser", ["require", "exports", "ttml-context", "ttml-time-parser", "ttml-settings", "htmlExtensions", "stringExtensions"], function (n, t, i, r, u, f, e) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var o = function () { function n() { } return n.parse = function (t, f) { var e, o, s, h; if (t = typeof t == "string" ? n.parseXml(t) : t, e = new i.TtmlContext, e.settings = new u.TtmlSettings(f), e.root = n.verifyRoot(t, e), e.body = n.getFirstElementByTagNameNS(e.root, "body", e.settings.ttmlNamespace), e.events = [], e.styleSetCache = [], e.body) { try { n.parseTtAttrs(e); o = n.ensureRegions(e); s = n.getAttributeNS(e.root, "timeBase", e.settings.ttmlParameterNamespace) || "media"; e.settings.supportedTimeBase.indexOf(s) !== -1 && (n.processAnonymousSpans(e, e.body), h = new r.TtmlTimeParser(e.settings.mediaFrameRate, e.settings.mediaTickRate), n.applyTiming(e, e.root, { start: n.mediaStart, end: n.mediaEnd }, !0, h), n.applyStyling(e, o)) } catch (c) { } e.events.push({ time: n.mediaEnd, element: null }); e.events.sort(function (n, t) { return n.time - t.time }) } return e }, n.parseXml = function (n) { var i = null, t; try { window.DOMParser ? (t = new window.DOMParser, i = t.parseFromString(n, "application/xml")) : (t = new window.ActiveXObject("Microsoft.XMLDOM"), t.async = !1, t.loadXML(n), i = t) } catch (r) { i = null } return i }, n.verifyRoot = function (t, i) { var u, r = t.documentElement; return n.getLocalTagName(r) === "tt" && (r.namespaceURI !== "http://www.w3.org/ns/ttml" && (i.settings.ttmlNamespace = r.namespaceURI, i.settings.ttmlStyleNamespace = i.settings.ttmlNamespace + "#styling", i.settings.ttmlParameterNamespace = i.settings.ttmlNamespace + "#parameter", i.settings.ttmlMetaNamespace = i.settings.ttmlNamespace + "#metadata"), u = r), u }, n.parseTtAttrs = function (t) { var h = n.getAttributeNS(t.root, "cellResolution", t.settings.ttmlParameterNamespace), u = n.getAttributeNS(t.root, "extent", t.settings.ttmlStyleNamespace), f = null, r, o, s, i, c, l; h && (r = e.trim(h).split(/\s+/), r.length === 2 && (o = Math.round(parseFloat(r[0])), s = Math.round(parseFloat(r[1])), s > 0 && o > 0 && (f = { rows: s, columns: o }))); f && (t.settings.cellResolution = f); u && u !== "auto" && (i = u.split(/\s+/), i.length === 2 && i[0].substr(i[0].length - 2) === "px" && i[1].substr(i[1].length - 2) === "px" && (c = parseFloat(i[0].substr(0, i[0].length - 2)), l = parseFloat(i[1].substr(0, i[1].length - 2)), t.settings.rootContainerRegionDimensions = { width: Math.round(c), height: Math.round(l) })) }, n.ensureRegions = function (t) { var f, i, o, r; return t.rootContainerRegion = t.root.ownerDocument.createElementNS(t.settings.ttmlNamespace, "rootcontainerregion"), t.root.appendChild(t.rootContainerRegion), f = t.settings.rootContainerRegionDimensions ? e.format("{0}px {1}px", t.settings.rootContainerRegionDimensions.width, t.settings.rootContainerRegionDimensions.height) : "auto", t.rootContainerRegion.setAttributeNS(t.settings.ttmlStyleNamespace, "extent", f), i = n.getFirstElementByTagNameNS(t.root, "head", t.settings.ttmlNamespace), i || (i = t.root.ownerDocument.createElementNS(t.settings.ttmlNamespace, "head"), t.root.appendChild(i)), t.layout = n.getFirstElementByTagNameNS(i, "layout", t.settings.ttmlNamespace), t.layout || (t.layout = t.root.ownerDocument.createElementNS(t.settings.ttmlNamespace, "layout"), t.root.appendChild(t.layout)), o = t.layout.getElementsByTagNameNS(t.settings.ttmlNamespace, "region"), o.length || (r = t.root.ownerDocument.createElementNS(t.settings.ttmlNamespace, "region"), r.setAttributeNS(u.xmlNS, "id", "anonymous"), r.setAttribute("data-isanonymous", "1"), t.layout.appendChild(r), t.body.setAttributeNS(t.settings.ttmlNamespace, "region", "anonymous")), i }, n.processAnonymousSpans = function (t, i) { var u, a, o, v, s, y, e, h, c, l, p, r; if (n.isTagNS(i, "p", t.settings.ttmlNamespace)) { for (u = [], a = void 0, o = 0, v = f.nodeListToArray(i.childNodes); o < v.length; o++)r = v[o], r.nodeType === Node.TEXT_NODE && (a !== Node.TEXT_NODE && u.push([]), u[u.length - 1].push(r)), a = r.nodeType; for (s = 0, y = u; s < y.length; s++)for (e = y[s], h = t.root.ownerDocument.createElementNS(t.settings.ttmlNamespace, "span"), h.appendChild(e[0].parentNode.replaceChild(h, e[0])), c = 1; c < e.length; c++)h.appendChild(e[c]) } for (l = 0, p = f.nodeListToArray(i.childNodes); l < p.length; l++)r = p[l], this.processAnonymousSpans(t, r) }, n.applyTiming = function (t, i, r, u, e) { var b = n.getAttributeNS(i, "begin", t.settings.ttmlNamespace), o = b ? e.parse(b) : r.start, s = 0, d = 0, l = 0, a = 0, v = n.getAttributeNS(i, "dur", t.settings.ttmlNamespace), h = n.getAttributeNS(i, "end", t.settings.ttmlNamespace), k, p, y, w, c; for (v || h ? v && h ? (l = e.parse(v), a = e.parse(h), k = Math.min(o + l, r.start + a), s = Math.min(k, r.end)) : h ? (a = e.parse(h), s = Math.min(r.start + a, r.end)) : (l = e.parse(v), s = Math.min(o + l, r.end)) : u && (o <= r.end ? (d = Math.max(0, r.end - o), s = r.end) : s = 0), s < o && (s = o), o = Math.floor(o), s = Math.floor(s), i.setAttribute("data-time-start", o.toString()), i.setAttribute("data-time-end", s.toString()), o >= 0 && t.events.filter(function (n) { return n.time === o }).length <= 0 && t.events.push({ time: o, element: i }), p = o, y = 0, w = f.nodeListToArray(i.childNodes); y < w.length; y++)c = w[y], c.nodeType === Node.ELEMENT_NODE && (n.getAttributeNS(i, "timeContainer", t.settings.ttmlNamespace) !== "seq" ? this.applyTiming(t, c, { start: o, end: s }, !0, e) : (this.applyTiming(t, c, { start: p, end: s }, !1, e), p = parseInt(c.getAttribute("data-time-end"), 10))) }, n.applyStyling = function (t, i) { for (var o, u = n.getFirstElementByTagNameNS(i, "styling", t.settings.ttmlNamespace), s = u ? f.nodeListToArray(u.getElementsByTagNameNS(t.settings.ttmlNamespace, "style")) : [], r = 0, e = f.nodeListToArray(t.root.querySelectorAll("*")); r < e.length; r++)o = e[r], this.applyStyle(t, o, s) }, n.applyStyle = function (t, i, r) { var u = {}, f, e; this.applyStylesheet(t.settings, u, i, r); n.applyInlineStyles(t.settings, u, i); f = !0; for (e in u) if (u.hasOwnProperty(e)) { f = !1; break } f || (i.setAttribute("data-styleSet", t.styleSetCache.length.toString()), t.styleSetCache.push(u)) }, n.applyStylesheet = function (t, i, r, e) { for (var p, s, l, h, a, o, v = n.getAttributeNS(r, "style", t.ttmlNamespace), w = v ? v.split(/\s+/) : [], c = 0, y = w; c < y.length; c++)for (p = y[c], s = 0, l = e; s < l.length; s++)o = l[s], n.getAttributeNS(o, "id", u.xmlNS) === p && (this.applyStylesheet(t, i, o, e), n.applyInlineStyles(t, i, o)); if (n.isTagNS(r, "region", t.ttmlNamespace)) for (h = 0, a = f.nodeListToArray(r.getElementsByTagNameNS(t.ttmlNamespace, "style")); h < a.length; h++)o = a[h], n.applyInlineStyles(t, i, o) }, n.applyInlineStyles = function (t, i, r) { for (var o, u = 0, s = f.nodeListToArray(r.attributes); u < s.length; u++)o = s[u], o.namespaceURI === t.ttmlStyleNamespace && (i[n.getLocalTagName(o)] = e.trim(o.nodeValue)) }, n.getLocalTagName = function (n) { return n.localName || n.baseName }, n.isTagNS = function (n, t, i) { return n.namespaceURI === i && this.getLocalTagName(n) === t }, n.getAttributeNS = function (n, t, i) { var e = n.getAttributeNS(i, t), u, o, r; if (!e) for (u = 0, o = f.nodeListToArray(n.attributes); u < o.length; u++)if (r = o[u], r.localName === t && r.lookupNamespaceURI(r.prefix) === i) { e = r.value; break } return e }, n.getFirstElementByTagNameNS = function (n, t, i) { if (n) { var r = n.getElementsByTagNameNS(i, t); if (r && r.length) return r[0] } return null }, n.mediaStart = -1, n.mediaEnd = 99999999, n }(); t.TtmlParser = o }); define("ttml-context", ["require", "exports", "ttml-parser", "ttml-settings", "htmlExtensions", "stringExtensions", "utility"], function (n, t, i, r, u, f, e) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var o = function () { function n() { var t = this; this.translateToHtml = function (e, o, s) { var c, h, v = t.getTagNameEquivalent(e), l = "", y = "", a, p, w, b; switch (v) { case "ttml:region": y = "cue "; case "ttml:rootcontainerregion": case "ttml:body": case "ttml:div": l = "div"; break; case "ttml:p": l = "p"; break; case "ttml:span": l = "span"; break; case "ttml:br": l = "br" }return a = i.TtmlParser.getAttributeNS(e, "role", t.settings.ttmlMetaNamespace), a && (y += " " + a), p = i.TtmlParser.getAttributeNS(e, "agent", t.settings.ttmlMetaNamespace), p && (y += " " + p), a === "x-ruby" ? l = "ruby" : a === "x-rubybase" ? l = "rb" : a === "x-rubytext" && (l = "rt"), f.isNullOrWhiteSpace(l) || (c = n.defaultStyle(t.ownerDocument.createElement(l)), u.addClass(c, f.trim(y)), w = i.TtmlParser.getAttributeNS(e, "title", t.settings.ttmlMetaNamespace), w && c.setAttribute("title", w), b = i.TtmlParser.getAttributeNS(e, "id", r.xmlNS), b && t.settings.idPrefix && c.setAttribute("id", t.settings.idPrefix + b), v === "ttml:region" && (h = c.appendChild(n.defaultStyle(t.ownerDocument.createElement("div"))), u.css(h, "display", "table"), u.css(h, "border-spacing", "0"), u.css(h, "cell-spacing", "0"), u.css(h, "cell-padding", "0"), u.css(h, "width", "100%"), u.css(h, "height", "100%"), h = h.appendChild(n.defaultStyle(t.ownerDocument.createElement("div"))), u.css(h, "display", "table-cell"), o.displayAlign && (t.translateStyle(v, h, { displayAlign: o.displayAlign }), o.displayAlign = null)), s && v === "ttml:span" && (h = c.appendChild(n.defaultStyle(t.ownerDocument.createElement("span"))), u.css(h, "white-space", "pre")), u.css(c, "position", "static"), u.css(c, "width", "100%"), t.translateStyle(v, c, o)), { outerNode: c, innerNode: h ? h : c } } } return n.prototype.setOwnerDocument = function (n) { this.ownerDocument = n }, n.prototype.updateRelatedMediaObjectRegion = function (n) { return !this.settings.relatedMediaObjectRegion || n.width !== this.settings.relatedMediaObjectRegion.width || n.height !== this.settings.relatedMediaObjectRegion.height ? (this.settings.relatedMediaObjectRegion = { width: n.width, height: n.height }, !0) : !1 }, n.prototype.hasEvents = function () { return this.events && !!this.events.length }, n.prototype.resetCurrentEvents = function () { this.currentEvents = [] }, n.prototype.updateCurrentEvents = function (n) { var t = this.getTemporallyActiveEvents(n), r = this.currentEvents ? this.currentEvents.length : 0, u = t ? t.length : 0, i; if (r !== u) return this.currentEventsTime = n, this.currentEvents = t, !0; if (this.currentEvents) for (i = 0; i < r; i++)if (this.currentEvents[i].time !== t[i].time) return this.currentEventsTime = n, this.currentEvents = t, !0; return !1 }, n.prototype.getTemporallyActiveEvents = function (n) { var t = this; return this.events.filter(function (i) { return i.element ? t.isTemporallyActive(i.element, n) : !0 }) }, n.prototype.isTemporallyActive = function (n, t) { return (parseInt(n.getAttribute("data-time-start"), 10) || 0) <= t && t < (parseInt(n.getAttribute("data-time-end"), 10) || 0) }, n.prototype.getCues = function (n) { var t = [], v, tt, s, y, o, w, h, c, b, l, k, e, d, g, a, nt, ut; for (this.currentEventsTime !== n && this.updateCurrentEvents(n), v = i.TtmlParser.getAttributeNS(this.root, "space", r.xmlNS) === "preserve", tt = this.layout ? this.layout.getElementsByTagNameNS(this.settings.ttmlNamespace, "region") : [], s = 0, y = tt; s < y.length; s++) { var p = y[s], it = i.TtmlParser.getAttributeNS(p, "id", r.xmlNS), rt = p.getAttribute("data-isanonymous"); if ((rt || it) && (o = this.translate(p, this.settings.defaultRegionStyle, v, n, this.translateToHtml), o.outerNode)) { for (w = o.innerNode, h = o.outerNode, c = 0, b = this.events; c < b.length; c++)l = b[c], l.element && this.isInRegion(l.element, rt ? null : it) && (k = this.prune(l.element, o.inheritableStyleSet, v, n, this.translateToHtml), e = k.prunedElement, k.hasPreservedContent || !e || f.trim(u.getText(e)).length || (e = null), e && w.appendChild(e)); d = h.getAttribute("data-showBackground") === "always"; (d || w.children.length) && (d && h.removeAttribute("data-showBackground"), t.push(h)) } } if (t.length) { for (g = this.translate(this.rootContainerRegion, { overflow: "hidden", padding: "0" }, !1, n, this.translateToHtml), a = 0, nt = t; a < nt.length; a++)ut = nt[a], g.innerNode.appendChild(ut); t = []; t.push(g.outerNode) } return t }, n.prototype.translate = function (n, t, i, r, u) { var f, e, o, s; return (this.isTemporallyActive(n, r) && (o = this.getTagNameEquivalent(n), e = this.getComputedStyleSet(n, t, o, r), e.display !== "none" && (s = this.getApplicableStyleSet(e, o), f = u(n, s, i))), !f) ? { outerNode: null, innerNode: null, inheritableStyleSet: null } : { outerNode: f.outerNode, innerNode: f.innerNode, inheritableStyleSet: this.getInheritableStyleSet(e) } }, n.prototype.translateStyle = function (n, t, i) { for (var r in i) i[r] && this.applyStyle(t, n, r, i[r]) }, n.prototype.prune = function (n, t, f, e, o, s) { var y, a, h, g, v, p, b, l, k, d, w, c; if (s === void 0 && (s = !1), a = !1, h = this.translate(n, t, f, e, o), h.outerNode !== null) { for (g = this.getTagNameEquivalent(n), y = h.outerNode, v = h.innerNode, p = 0, b = u.nodeListToArray(n.childNodes); p < b.length; p++)l = b[p], l.nodeType === Node.COMMENT_NODE || (l.nodeType === Node.TEXT_NODE ? (v.appendChild(document.createTextNode(l.data)), f && g === "ttml:span" && (a = !0)) : (k = f, d = i.TtmlParser.getAttributeNS(l, "space", r.xmlNS), d && (k = d === "preserve"), w = this.prune(l, h.inheritableStyleSet, k, e, o, !0), a = a || w.hasPreservedContent, w.prunedElement && v.appendChild(w.prunedElement))); if (!s) for (c = n.parentNode; c !== null && c.nodeType === Node.ELEMENT_NODE && c !== this.body;) { if (h = this.translate(c, t, f, e, o), h.outerNode) v = h.innerNode, v.appendChild(y), y = h.outerNode; else break; c = c.parentNode } } return { prunedElement: y, hasPreservedContent: a } }, n.prototype.getComputedStyleSet = function (n, t, r, f) { var o = e.extend({}, t), a, s, h, c, l; for (e.extend(o, this.styleSetCache[parseInt(n.getAttribute("data-styleSet"), 10)]), a = n.getElementsByTagNameNS(this.settings.ttmlNamespace, "set"), s = 0, h = u.nodeListToArray(a); s < h.length; s++)c = h[s], this.isTemporallyActive(c, f) && i.TtmlParser.applyInlineStyles(this.settings, o, c); return r === "ttml:p" && o.lineHeight === "normal" && (l = this.appendSpanFontSizes(n, this.getInheritableStyleSet(o), f, ""), l && (o["computed-lineHeight"] = l)), o }, n.prototype.getApplicableStyleSet = function (n, t) { var i = {}, r; n.extent && this.isStyleApplicable(t, "extent") && (i.extent = n.extent); n.color && this.isStyleApplicable(t, "color") && (i.color = n.color); for (r in n) this.isStyleApplicable(t, r) && (i[r] = n[r]); return i }, n.prototype.isStyleApplicable = function (n, t) { switch (t) { case "backgroundColor": case "display": case "visibility": return "ttml:body ttml:div ttml:p ttml:region ttml:rootcontainerregion ttml:span ttml:br".indexOf(n) >= 0; case "fontFamily": case "fontSize": case "fontStyle": case "fontWeight": return "ttml:p ttml:span ttml:br".indexOf(n) >= 0; case "color": case "textDecoration": case "textOutline": case "wrapOption": return "ttml:span ttml:br".indexOf(n) >= 0; case "direction": case "unicodeBidi": return "ttml:p ttml:span ttml:br".indexOf(n) >= 0; case "displayAlign": case "opacity": case "origin": case "overflow": case "padding": case "showBackground": case "writingMode": case "zIndex": return "ttml:region ttml:rootcontainerregion".indexOf(n) >= 0; case "extent": return "ttml:tt ttml:region ttml:rootcontainerregion".indexOf(n) >= 0; case "computed-lineHeight": case "lineHeight": case "textAlign": return "ttml:p".indexOf(n) >= 0; default: return !1 } }, n.prototype.getInheritableStyleSet = function (n) { var i = {}; for (var t in n) if (n.hasOwnProperty(t)) switch (t) { case "backgroundColor": case "computed-lineHeight": case "display": case "displayAlign": case "extent": case "opacity": case "origin": case "overflow": case "padding": case "showBackground": case "unicodeBidi": case "writingMode": case "zIndex": break; default: i[t] = n[t] }return i }, n.prototype.appendSpanFontSizes = function (n, t, i, r) { for (var f, c, s, h, e = 0, o = u.nodeListToArray(n.childNodes); e < o.length; e++)f = o[e], f.nodeType === Node.ELEMENT_NODE && (c = this.getTagNameEquivalent(f), c === "ttml:span" && (s = this.getComputedStyleSet(f, t, "ttml:span", i), h = s.fontSize, h && (r += (r ? "," : "") + h), r = this.appendSpanFontSizes(f, this.getInheritableStyleSet(s), i, r))); return r }, n.prototype.isInRegion = function (n, t) { var e, r, o, f, s, h; if (!t || (e = i.TtmlParser.getAttributeNS(n, "region", this.settings.ttmlNamespace), e === t)) return !0; if (!e) { for (r = n.parentNode; r !== null && r.nodeType === Node.ELEMENT_NODE;) { if (o = this.getRegionId(r), o) return o === t; r = r.parentNode } for (f = 0, s = u.nodeListToArray(n.getElementsByTagName("*")); f < s.length; f++)if (h = s[f], this.getRegionId(h) === t) return !0 } return !1 }, n.prototype.getRegionId = function (n) { var t; return n.nodeType === Node.ELEMENT_NODE && n.namespaceURI === this.settings.ttmlNamespace && (t = i.TtmlParser.getLocalTagName(n) === "region" ? i.TtmlParser.getAttributeNS(n, "id", r.xmlNS) : i.TtmlParser.getAttributeNS(n, "region", this.settings.ttmlNamespace)), t }, n.prototype.getTagNameEquivalent = function (n) { var t = i.TtmlParser.getLocalTagName(n), r = n.namespaceURI; return r === this.settings.ttmlNamespace ? "ttml:" + t : r === "http://www.w3.org/1999/xhtml" ? t : "" }, n.prototype.applyStyle = function (t, i, r, o) { var s = o, p, h, g, nt, tt, w, b, d, it, l, a; switch (r) { case "color": case "backgroundColor": s = n.ttmlToCssColor(o); u.css(t, r, s); return; case "direction": case "display": u.css(t, r, s); return; case "displayAlign": switch (o) { case "before": s = "top"; break; case "center": s = "middle"; break; case "after": s = "bottom" }u.css(t, "vertical-align", s); return; case "extent": p = void 0; l = void 0; o !== "auto" && (a = o.split(/\s+/), a.length === 2 && (p = this.ttmlToCssUnits(a[0], !0), l = this.ttmlToCssUnits(a[1], !1))); p || (p = (this.settings.rootContainerRegionDimensions ? this.settings.rootContainerRegionDimensions.width : this.settings.relatedMediaObjectRegion.width).toString() + "px", l = (this.settings.rootContainerRegionDimensions ? this.settings.rootContainerRegionDimensions.height : this.settings.relatedMediaObjectRegion.height).toString() + "px"); u.css(t, "position", "absolute"); u.css(t, "width", p); u.css(t, "min-width", p); u.css(t, "max-width", p); u.css(t, "height", l); u.css(t, "min-height", l); u.css(t, "max-height", l); return; case "fontFamily": this.settings.fontMap && this.settings.fontMap[o] && (s = this.settings.fontMap[o]); o === "smallCaps" && u.css(t, "fontVariant", "small-caps"); u.css(t, r, s); return; case "fontSize": h = o.split(/\s+/); g = h.length > 1 ? h[1] : h[0]; s = this.ttmlToCssFontSize(g, !1, .75, i === "ttml:region"); u.css(t, r, s); return; case "fontStyle": case "fontWeight": u.css(t, r, s); return; case "lineHeight": nt = o === "normal" ? o : this.ttmlToCssFontSize(o, !1); u.css(t, "line-height", nt); return; case "computed-lineHeight": for (tt = o.split(","), w = -1, b = 0, d = tt; b < d.length; b++)it = d[b], s = this.ttmlToCssFontSize(it, !1), s && s.indexOf("px") === s.length - 2 && (l = parseFloat(s.substr(0, s.length - 2)), !isNaN(l) && l > w && (w = l)); w >= 0 && u.css(t, "line-height", w + "px"); return; case "origin": o !== "auto" && (a = o.split(/\s+/), a.length === 2 && (u.css(t, "position", "absolute"), u.css(t, "left", this.ttmlToCssUnits(a[0], !0)), u.css(t, "top", this.ttmlToCssUnits(a[1], !1)))); return; case "opacity": u.css(t, r, s); return; case "padding": var c = e.getDimensions(t), h = o.split(/\s+/), v = void 0, y = void 0, k = void 0, rt = void 0; switch (h.length) { case 1: v = this.ttmlToCssUnits(h[0], !1, c); y = this.ttmlToCssUnits(h[0], !0, c); s = f.format("{0} {1} {0} {1}", v, y); break; case 2: v = this.ttmlToCssUnits(h[0], !1, c); y = this.ttmlToCssUnits(h[1], !0, c); s = f.format("{0} {1} {0} {1}", v, y); break; case 3: v = this.ttmlToCssUnits(h[0], !1, c); y = this.ttmlToCssUnits(h[1], !0, c); k = this.ttmlToCssUnits(h[2], !1, c); s = f.format("{0} {1} {2} {1}", v, y, k); break; case 4: v = this.ttmlToCssUnits(h[0], !1, c); y = this.ttmlToCssUnits(h[1], !0, c); k = this.ttmlToCssUnits(h[2], !1, c); rt = this.ttmlToCssUnits(h[3], !0, c); s = f.format("{0} {1} {2} {3}", v, y, k, rt) }u.css(t, "box-sizing", "border-box"); u.css(t, "border-style", "solid"); u.css(t, "border-color", "transparent"); u.css(t, "border-width", s); return; case "textAlign": switch (o) { case "start": s = "left"; break; case "end": s = "right" }u.css(t, "text-align", s); return; case "textDecoration": s = n.ttmlToCssTextDecoration(o); u.css(t, "text-decoration", s); return; case "textOutline": u.css(t, "text-shadow", this.ttmlToCssTextOutline(s)); return; case "unicodeBidi": switch (o) { case "bidiOverride": s = "bidi-override" }u.css(t, "unicode-bidi", s); return; case "visibility": u.css(t, r, s); return; case "writingMode": switch (o) { case "lr": case "lrtb": u.css(t, "writing-mode", "horizontal-tb"); u.css(t, "-webkit-writing-mode", "horizontal-tb"); u.css(t, "writing-mode", "lr-tb"); return; case "rl": case "rltb": u.css(t, "writing-mode", "horizontal-tb"); u.css(t, "-webkit-writing-mode", "horizontal-tb"); u.css(t, "writing-mode", "rl-tb"); return; case "tblr": u.css(t, "text-orientation", "upright"); u.css(t, "writing-mode", "vertical-lr"); u.css(t, "-webkit-text-orientation", "upright"); u.css(t, "-webkit-writing-mode", "vertical-lr"); u.css(t, "writing-mode", "tb-lr"); return; case "tb": case "tbrl": u.css(t, "text-orientation", "upright"); u.css(t, "writing-mode", "vertical-rl"); u.css(t, "-webkit-text-orientation", "upright"); u.css(t, "-webkit-writing-mode", "vertical-rl"); u.css(t, "writing-mode", "tb-rl"); return }return; case "wrapOption": u.css(t, "white-space", o === "noWrap" ? "nowrap" : o === "pre" ? "pre" : "normal"); return; case "zIndex": u.css(t, r, s); return; default: u.css(t, r, s); return } }, n.defaultStyle = function (t) { return u.css(t, "background-color", n.TtmlNamedColorMap.transparent), u.css(t, "offset", "0"), u.css(t, "margin", "0"), u.css(t, "padding", "0"), u.css(t, "border", "0"), t }, n.prototype.ttmlToCssUnits = function (n, t, i) { var e = n, r, h; if (n && (r = n.charAt(n.length - 1), r === "c" || r === "%")) { var o = this.settings.rootContainerRegionDimensions ? this.settings.rootContainerRegionDimensions : this.settings.relatedMediaObjectRegion, s = parseFloat(n.substr(0, n.length - 1)), f = t ? o.width : o.height, u = void 0; r === "c" ? (h = t ? this.settings.cellResolution.columns : this.settings.cellResolution.rows, u = s * f / h) : r === "%" && (i && (f = t ? i.width : i.height), u = f * s / 100); u = Math.round(u * 10) / 10; e = u + "px" } return e }, n.prototype.ttmlToCssFontSize = function (n, t, i, r) { var e, u; if (i === void 0 && (i = 1), r === void 0 && (r = !1), e = n, n && (u = n.charAt(n.length - 1), u === "c" || r && u === "%")) { var o = this.settings.rootContainerRegionDimensions ? this.settings.rootContainerRegionDimensions : this.settings.relatedMediaObjectRegion, s = parseFloat(n.substr(0, n.length - 1)), h = t ? o.width : o.height, c = t ? this.settings.cellResolution.columns : this.settings.cellResolution.rows, f = s * h / c; u === "%" && (f /= 100); f = Math.floor(f * i * 10) / 10; e = f + "px" } return e }, n.prototype.ttmlToCssTextOutline = function (t) { var r = "none", l, s, a, h, c; if (!f.isNullOrWhiteSpace(t) && t !== "none") { var i = t.split(/\s+/), o = void 0, u = void 0, e; if (i.length === 1 ? (o = $(this).css("color"), u = i[0], e = "") : i.length === 3 ? (o = i[0], u = i[1], e = i[2]) : i.length === 2 && (l = i[0].charAt(0), l >= "0" && l <= "9" ? (o = $(this).css("color"), u = i[0], e = i[1]) : (o = i[0], u = i[1], e = "")), e = this.ttmlToCssFontSize(e, !1, .75), u = this.ttmlToCssFontSize(u, !1, .75), i = n.lengthRegEx.exec(u), i && i.length === 3) { for (s = Math.round(parseFloat(i[1])), a = i[2], r = "", h = -s; h <= s; h++)for (c = -s; c <= s; c++)(h !== 0 || c !== 0) && (r += f.format("{0}{4} {1}{4} {2} {3}, ", h, c, e, n.ttmlToCssColor(o), a)); r && (r = r.substr(0, r.length - 2)) } } return r }, n.ttmlToCssTextDecoration = function (n) { for (var r, e, t, i = "", o = n.split(/\s+/), u = 0, s = o; u < s.length; u++) { t = s[u]; switch (t) { case "none": case "noUnderline": case "noLineThrough": case "noOverline": i = "none" } } for (r = 0, e = o; r < e.length; r++) { t = e[r]; switch (t) { case "none": case "noUnderline": case "noLineThrough": case "noOverline": break; case "lineThrough": i += " line-through"; break; default: i += " " + t } } return f.trim(i) }, n.ttmlToCssColor = function (t) { var r = t, i; if (t = t.toLowerCase(), t.indexOf("rgba") === 0) { if (i = n.rgbaRegEx.exec(t), i && i.length === 5) { var u = i[1], e = i[2], o = i[3], s = parseInt(i[4], 10); r = f.format("rgba({0},{1},{2},{3})", u, e, o, Math.round(s * 100 / 255) / 100) } } else if (t.charAt(0) === "#" && t.length === 9) { var u = parseInt(t.substr(1, 2), 16), e = parseInt(t.substr(3, 2), 16), o = parseInt(t.substr(5, 2), 16), s = parseInt(t.substr(7, 2), 16); r = f.format("rgba({0},{1},{2},{3})", u, e, o, Math.round(s * 100 / 255) / 100) } else n.TtmlNamedColorMap[t] && (r = n.TtmlNamedColorMap[t]); return r }, n.lengthRegEx = /\s*(\d+\.*\d*)(.*)\s*/, n.rgbaRegEx = /\s*rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)\s*/, n.TtmlNamedColorMap = { transparent: "rgba(0,0,0,0)", black: "rgba(0,0,0,1)", silver: "rgba(192,192,192,1)", gray: "rgba(128,128,128,1)", white: "rgba(255,255,255,1)", maroon: "rgba(128,0,0,1)", red: "rgba(255,0,0,1)", purple: "rgba(128,0,128,1)", fuchsia: "rgba(255,0,255,1)", magenta: "rgba(255,0,255,1)", green: "rgba(0,128,0,1)", lime: "rgba(0,255,0,1)", olive: "rgba(128,128,0,1)", yellow: "rgba(255,255,0,1)", navy: "rgba(0,0,128,1)", blue: "rgba(0,0,255,1)", teal: "rgba(0,128,128,1)", aqua: "rgba(0,255,255,1)", cyan: "rgba(0,255,255,1)" }, n }(); t.TtmlContext = o }); define("ttml-settings", ["require", "exports", "utility"], function (n, t, i) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); t.xmlNS = "http://www.w3.org/XML/1998/namespace"; var r = function () { function n(n) { this.ttmlNamespace = "http://www.w3.org/ns/ttml"; this.ttmlStyleNamespace = "http://www.w3.org/ns/ttml#styling"; this.ttmlParameterNamespace = "http://www.w3.org/ns/ttml#parameter"; this.ttmlMetaNamespace = "http://www.w3.org/ns/ttml#metadata"; this.idPrefix = ""; this.mediaFrameRate = 30; this.mediaFrameRateMultiplier = 1; this.mediaSubFrameRate = 1; this.mediaTickRate = 1e3; this.supportedTimeBase = "media"; this.cellResolution = { rows: 15, columns: 32 }; this.defaultRegionStyle = { backgroundColor: "transparent", color: "#E8E9EA", direction: "ltr", display: "auto", displayAlign: "before", extent: "auto", fontFamily: "default", fontSize: "1c", fontStyle: "normal", fontWeight: "normal", lineHeight: "normal", opacity: "1", origin: "auto", overflow: "hidden", padding: "0", showBackground: "always", textAlign: "start", textDecoration: "none", textOutline: "none", unicodeBidi: "normal", visibility: "visible", wrapOption: "noWrap", writingMode: "lrtb", zIndex: "auto" }; this.fontMap = {}; this.fontMap["default"] = "Lucida sans typewriter, Lucida console, Consolas"; this.fontMap.monospaceSerif = "Courier"; this.fontMap.proportionalSerif = "Times New Roman, Serif"; this.fontMap.monospaceSansSerif = "Lucida sans typewriter, Lucida console, Consolas"; this.fontMap.proportionalSansSerif = "Arial, Sans-serif"; this.fontMap.casual = "Verdana"; this.fontMap.cursive = "Zapf-Chancery, Segoe script, Cursive"; this.fontMap.smallCaps = "Arial, Helvetica"; this.fontMap.monospace = "Lucida sans typewriter, Lucida console, Consolas"; this.fontMap.sansSerif = "Arial, Sans-serif"; this.fontMap.serif = "Times New Roman, Serif"; n && i.extend(this, n) } return n }(); t.TtmlSettings = r }); define("ttml-time-parser", ["require", "exports"], function (n, t) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var i = function () { function n(n, t) { this.mediaFrameRate = n; this.mediaTickRate = t } return n.prototype.parse = function (t) { var i, r; if (!t) return 0; if (i = n.absoluteTimeRegex.exec(t), i && i.length > 3) { var f = parseInt(i[1], 10) * 3600, e = parseInt(i[2], 10) * 60, o = parseInt(i[3], 10), u = 0; return i[5] && (u = parseFloat(i[4]) * 1e3), i[6] && (u = Math.round(parseFloat(i[6]) * this.getTimeUnitMultiplier("f"))), 1e3 * (f + e + o) + u } return (r = n.relativeTimeRegex.exec(t), r && r.length > 3) ? Math.round(parseFloat(r[1]) * this.getTimeUnitMultiplier(r[3])) : 0 }, n.prototype.getTimeUnitMultiplier = function (n) { switch (n) { case "h": return 36e5; case "ms": return 1; case "m": return 6e4; case "s": return 1e3; case "f": return 1e3 / this.mediaFrameRate; case "t": return 1e3 / this.mediaTickRate; default: return 0 } }, n.absoluteTimeRegex = /^(\d{1,}):(\d{2}):(\d{2})((\.\d{1,})|:(\d{2,}(\.\d{1,})?))?$/, n.relativeTimeRegex = /^(\d+(\.\d+)?)(ms|[hmsft])$/, n }(); t.TtmlTimeParser = i }); define("breakpointTracker", ["require", "exports", "tslib", "publisher", "htmlExtensions", "utility"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function (n) { function t() { var i = n.call(this, null) || this; return i.onWindowResized = function () { var r = t.getWindowWidth(), n = t.identifyBreakpoint(r); i.breakpoint !== n && (i.breakpoint = n, i.initiatePublish({ breakpoint: n, width: r })) }, i.windowWidth = t.getWindowWidth(), i.breakpoint = t.identifyBreakpoint(i.windowWidth), u.addDebouncedEvent(window, u.eventTypes.resize, i.onWindowResized), i } return i.__extends(t, n), t.getBreakpointTracker = function () { return document.body.breakpointTracker || (document.body.breakpointTracker = new t), document.body.breakpointTracker }, t.prototype.getBreakpoint = function () { return this.breakpoint }, t.identifyBreakpoint = function (n) { f.isNumber(n) || (n = t.getWindowWidth()); for (var i = t.breakpoints.length - 1; i >= 0; i--)if (n >= t.breakpoints[i]) return i }, t.getWindowWidth = function () { return window.innerWidth || document.documentElement.clientWidth }, t.prototype.publish = function (n, t) { if (n.onBreakpointChanged) n.onBreakpointChanged(t) }, t.breakpoints = [0, 540, 768, 1084, 1400, 1779], t }(r.Publisher); t.BreakpointTracker = e }); define("mosaicPlacement", ["require", "exports", "tslib", "observableComponent", "breakpointTracker", "utility", "htmlExtensions"], function (n, t, i, r, u, f, e) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var o = function (n) { function t(t) { var i = n.call(this, t) || this; return i.cssClassNames = { width: { large: "f-width-large", small: "f-width-small" }, height: { large: "f-height-large", medium: "f-height-medium", small: "f-height-small" } }, i.mappings = [[[300, 0], [150, 320], [0, 160]], [[300, 540], [150, 270], [0, 135]], [[400, 768], [200, 384], [0, 0]], [[400, 542], [200, 271], [0, 135]], [[400, 542], [200, 271], [0, 135]], [[400, 542], [200, 271], [0, 135]]], i.update(), u.BreakpointTracker.getBreakpointTracker().subscribe({ onBreakpointChanged: function (n) { i.onBreakpointChanged(n) } }), i } return i.__extends(t, n), t.prototype.update = function () { this.onBreakpointChanged({ breakpoint: u.BreakpointTracker.getBreakpointTracker().getBreakpoint(), width: 0 }) }, t.prototype.teardown = function () { }, t.prototype.removeClasses = function (n) { n != null && e.removeClasses(n, this.concatenateCssClasses(this.cssClassNames)) }, t.prototype.applySizeClasses = function (n, t) { var i = f.getDimensions(n), r, u; i != null && f.isNumber(i.height) && f.isNumber(i.width) && (r = [], i.height >= this.mappings[t][0][0] ? (r.push(this.cssClassNames.height.large), u = i.width >= this.mappings[t][0][1] ? this.cssClassNames.width.large : this.cssClassNames.width.small, r.push(u)) : i.height >= this.mappings[t][1][0] ? (r.push(this.cssClassNames.height.medium), u = i.width >= this.mappings[t][1][1] ? this.cssClassNames.width.large : this.cssClassNames.width.small, r.push(u)) : (r.push(this.cssClassNames.height.small), u = i.width >= this.mappings[t][2][1] ? this.cssClassNames.width.large : this.cssClassNames.width.small, r.push(u)), e.addClasses(this.element, r)) }, t.prototype.onBreakpointChanged = function (n) { this.removeClasses(this.element); this.applySizeClasses(this.element, n.breakpoint) }, t.prototype.concatenateCssClasses = function (n) { var i, r, f, t, u; if (n != null) { i = []; for (r in n) if (n.hasOwnProperty(r) && (f = n, t = f[r], typeof t == "object")) for (u in t) t.hasOwnProperty(u) && i.push(t[u]); return i } }, t.selector = ".c-mosaic-placement", t.typeName = "MosaicPlacement", t }(r.ObservableComponent); t.MosaicPlacement = o }); require(["mosaicPlacement", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.MosaicPlacement }]) }); define("multi-slide-carousel", ["require", "exports", "tslib", "carousel-base", "componentFactory", "sequenceIndicator", "actionToggle", "htmlExtensions", "utility", "viewportCollision"], function (n, t, i, r, u, f, e, o, s, h) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var c = function (n) { function t(t, i) { i === void 0 && (i = null); var r = n.call(this, t, i) || this; return r.carouselElement = t, r.isAutoPlayPaused = !0, r.autoPlayTimer = -1, r.hasContentFocus = !1, r.isMouseOver = !1, r.hasViewportCollisions = !1, r.onActionToggled = function (n) { if (!!n) { r.playPauseButton.removeAttribute(e.ActionToggle.ariaPressedAttribute); var t = r.playPauseButton.getAttribute("aria-label"), i = r.playPauseButton.getAttribute("data-toggled-label"); r.playPauseButton.setAttribute("data-toggled-label", t); r.playPauseButton.setAttribute("aria-label", i); n.toggled ? r.startAutoPlay() : r.pauseAutoPlay() } }, r.onMouseOver = function () { r.isMouseOver = !0; r.suspendAutoPlay() }, r.onMouseOut = function () { r.isMouseOver = !1; r.resumeAutoPlay() }, r.onContentFocusIn = function () { r.hasContentFocus = !0; var n = r.playPauseButton.getAttribute("aria-label"); n = n === "Paused" ? "Play" : n === "Playing" ? "Pause" : n; r.playPauseButton.setAttribute("aria-label", n); r.suspendAutoPlay() }, r.onContentFocusOut = function () { r.hasContentFocus = !1; r.resumeAutoPlay() }, r.onWindowScrolled = function () { r.carouselElement && (r.hasViewportCollisions = !!h.collidesWith(r.carouselElement), r.hasViewportCollisions ? r.suspendAutoPlay() : r.resumeAutoPlay()) }, r } return i.__extends(t, n), t.prototype.update = function () { var i = this; return !this.isObserving() || !n.prototype.update.call(this) ? !1 : (this.playPauseButton = o.selectFirstElement(e.ActionToggle.selector, this.carouselElement), !this.playPauseButton || (this.playPauseButton.setAttribute("aria-hidden", this.slides.length > 1 ? "false" : "true"), u.ComponentFactory.create([{ component: e.ActionToggle, elements: [this.playPauseButton], callback: function (n) { if (n.length > 0 && (i.autoPlayActionToggle = n[0], !!i.autoPlayActionToggle)) { i.autoPlayActionToggle.subscribe(i); i.playPauseButton.removeAttribute(e.ActionToggle.ariaPressedAttribute); var r = i.playPauseButton.getAttribute("aria-label"), u = i.playPauseButton.getAttribute("data-toggled-label"), a = i.playPauseButton.getAttribute("data-telemetry-default-label"), v = i.playPauseButton.getAttribute("data-toggled-glyph"), f = r && r.toLowerCase(), y = a && a.toLowerCase(), p = v && v.toLowerCase(), w = f && y && f === y, b = f && p && p.search(f), c = "", l = ""; a ? (l = w ? u : r, c = w ? r : u) : v ? (c = b !== -1 ? r : u, l = b !== -1 ? u : r) : (c = r, l = u); i.playPauseButton.setAttribute("data-toggled-label", l); i.playPauseButton.setAttribute("aria-label", c); o.addEvent(i.carouselElement, o.eventTypes.mouseover, i.onMouseOver); o.addEvent(i.carouselElement, o.eventTypes.mouseout, i.onMouseOut); i.scrollThrottledEventHandler = o.addThrottledEvent(window, o.eventTypes.scroll, i.onWindowScrolled); i.hasViewportCollisions = !!h.collidesWith(i.carouselElement); i.hasContentFocus = o.isDescendantOrSelf(i.carouselElement, document.activeElement); o.addEvent(i.carouselElement, o.eventTypes.focusin, i.onContentFocusIn); o.addEvent(i.carouselElement, o.eventTypes.focusout, i.onContentFocusOut); i.autoPlayIntervalDuration = Math.max(t.autoPlayMinimumInterval, parseInt(i.carouselElement.getAttribute(t.autoPlayIntervalAttribute), 10) || t.autoPlayDefaultInterval); o.hasClass(i.carouselElement, t.autoPlayClass) && i.slides.length > 1 && i.autoPlayActionToggle.isToggled() && s.getQSPValue("mwfrun").toLowerCase() !== "formwfvdiff" && i.startAutoPlay() } }, eventToBind: "DOMContentLoaded" }])), this.loadMultiSlideController(), !0) }, t.prototype.teardown = function () { n.prototype.teardown.call(this); !this.autoPlayActionToggle || (this.autoPlayActionToggle.unsubscribe(this), o.removeEvent(this.carouselElement, o.eventTypes.mouseover, this.onMouseOver), o.removeEvent(this.carouselElement, o.eventTypes.mouseout, this.onMouseOut), this.scrollThrottledEventHandler && (o.removeEvent(window, o.eventTypes.scroll, this.scrollThrottledEventHandler), this.scrollThrottledEventHandler = null), o.removeEvent(this.carouselElement, o.eventTypes.focusin, this.onContentFocusIn), o.removeEvent(this.carouselElement, o.eventTypes.focusout, this.onContentFocusOut), this.clearAutoPlayTimers()); this.hasContentFocus = !1; this.isMouseOver = !1; this.hasViewportCollisions = !1; this.isAutoPlayPaused = !0; this.hasContentFocus = !1; this.playPauseButton = null; !this.sequenceIndicator || this.sequenceIndicator.unsubscribe(this) }, t.prototype.getSlides = function () { return o.selectElements(r.CarouselBase.allChildSelectors, this.carouselElement) }, t.prototype.getFirstActiveIndex = function () { if (!this.slides) return 0; for (var n = 0; n < this.slides.length; n++)if (o.hasClass(this.slides[n], r.CarouselBase.activeClass)) return n; return 0 }, t.prototype.isScrollablePrevious = function () { return !!this.slides && this.slides.length > 1 }, t.prototype.isScrollableNext = function () { return !!this.slides && this.slides.length > 1 }, t.prototype.previousSlide = function () { this.setActiveSlide(this.activeIndex - 1) }, t.prototype.nextSlide = function () { this.setActiveSlide(this.activeIndex + 1) }, t.prototype.setActiveSlide = function (i, u) { var f, h, c, e, s; if (u === void 0 && (u = !0), !this.slides) return !1; (f = this.activeIndex, h = i, i < 0 ? i = this.slides.length - 1 : i >= this.slides.length && (i = 0), n.prototype.setActiveSlide.call(this, i, u)) && (f !== -1 && (o.removeClasses(this.slides[f], [r.CarouselBase.activeClass, t.animateNextClass, t.animatePreviousClass]), c = f < h ? t.animateNextClass : t.animatePreviousClass, o.addClass(this.slides[this.activeIndex], c)), this.resumeAutoPlay(), this.sequenceIndicator && this.sequenceIndicator.setControllerIndex(i, !1), e = f === -1 ? null : n.prototype.getCollectionItem.call(this, this.slides[f]), s = n.prototype.getCollectionItem.call(this, this.slides[this.activeIndex]), e && e.onCollectionItemHidden(), s && s.onCollectionItemShown(), n.prototype.initiatePublish.call(this, { fullyVisibleItemRange: [i, i], partiallyVisibleItemRange: [i, i], userInitiated: u })) }, t.prototype.startAutoPlay = function () { this.isAutoPlayPaused = !1; this.isMouseOver = !1; this.resumeAutoPlay() }, t.prototype.pauseAutoPlay = function () { this.isAutoPlayPaused = !0; this.clearAutoPlayTimers() }, t.prototype.suspendAutoPlay = function () { this.clearAutoPlayTimers() }, t.prototype.resumeAutoPlay = function () { this.isAutoPlayPaused || this.isMouseOver || this.hasViewportCollisions || this.hasContentFocus && this.playPauseButton !== document.activeElement || this.setAutoPlayInterval() }, t.prototype.setAutoPlayInterval = function () { var n = this; this.clearAutoPlayTimers(); this.autoPlayTimer = setTimeout(function () { n.setActiveSlide(n.activeIndex + 1, !1) }, this.autoPlayIntervalDuration) }, t.prototype.clearAutoPlayTimers = function () { this.autoPlayTimer !== -1 && (clearTimeout(this.autoPlayTimer), this.autoPlayTimer = -1) }, t.prototype.loadMultiSlideController = function () { var n = this, t = o.selectFirstElement(f.SequenceIndicator.selector, this.carouselElement); !t || u.ComponentFactory.create([{ component: f.SequenceIndicator, elements: [t], callback: function (t) { t && t.length && (n.sequenceIndicator = t[0], !n.sequenceIndicator || (n.slides.length > 1 ? n.sequenceIndicator.show() : n.sequenceIndicator.hide(), n.sequenceIndicator.subscribe(n), n.sequenceIndicator.setControllerIndex(n.activeIndex, !1))) }, eventToBind: "DOMContentLoaded" }]) }, t.prototype.onControllerIndexChanged = function (n) { !n || this.setActiveSlide(n.currentIndex) }, t.selector = ".c-carousel[class*=f-multi-slide]", t.typeName = "MultiSlideCarousel", t.animateNextClass = "f-animate-next", t.animatePreviousClass = "f-animate-previous", t.focusContentSelector = ".c-call-to-action", t.autoPlayClass = "f-auto-play", t.autoPlayIntervalAttribute = "data-js-interval", t.autoPlayDefaultInterval = 6e3, t.autoPlayMinimumInterval = 5e3, t }(r.CarouselBase); t.MultiSlideCarousel = c }); require(["multi-slide-carousel", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.MultiSlideCarousel }]) }); define("pageBehaviors", ["require", "exports", "htmlExtensions"], function (n, t, i) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var r = function () { function n() { i.removeClass(document.documentElement, "no-js"); i.addClass(document.documentElement, "js"); i.hasClass(document.body, "c_native") && window.navigator && typeof window.navigator.gamepadInputEmulation == "string" && (window.navigator.gamepadInputEmulation = "keyboard") } return n.typeName = "PageBehaviors", n }(); t.PageBehaviors = r }); define("pagination", ["require", "exports", "tslib", "publisher", "htmlExtensions", "utility"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function (n) { function t(t) { var i = n.call(this, t) || this; return i.page = -1, i.handleClickEvent = function (n) { var t = u.getEventTargetOrSrcElement(n); t === i.previousButton || u.isDescendant(i.previousButton, t) ? i.handleButtonClick(i.previousButton) : t === i.nextButton || u.isDescendant(i.nextButton, t) ? i.handleButtonClick(i.nextButton) : i.setActivePage(i.getPageFromElement(t.parentElement), !0, !0) }, i.update(), i } return i.__extends(t, n), t.prototype.update = function () { var i, n; this.element && ((this.pages = u.selectElements(t.pageClassSelector, this.element), this.srContainer = u.selectFirstElement(t.srSelector, this.element), this.pages.length < 2) || (i = u.selectElements(t.buttonsClassSelector, this.element), i.length === 2) && (this.previousButton = i[0].parentElement, this.nextButton = i[1].parentElement, u.addEvent(this.element, u.eventTypes.click, this.handleClickEvent), n = u.selectElements(t.activeClassSelector, this.element), n && n.length !== 0 || (n = this.pages), this.setActivePage(this.getPageFromElement(n[0]), !0, !1))) }, t.prototype.teardown = function () { u.removeEvent(this.element, u.eventTypes.click, this.handleClickEvent); this.page = -1; this.pages = null; this.activeItem = null; this.previousButton = null; this.nextButton = null; this.srContainer = null }, t.prototype.publish = function (n, t) { if (n.onPageChanged) n.onPageChanged(t) }, t.prototype.getPage = function () { return this.page }, t.prototype.setPage = function (n) { return this.setActivePage(n, !1, !1) }, t.prototype.handleButtonClick = function (n) { var i = n === this.nextButton, r = n === this.previousButton, t = this.getPage(); (i || r) && this.setActivePage(t === -1 ? 0 : i ? t + 1 : t - 1, !0, !0) }, t.prototype.setActivePage = function (n, i, r) { var h = this.getPage(); if (!f.isNumber(n) || !this.pages || !(n >= 0) || !(n < this.pages.length) || n === h) return !1; if (!!this.activeItem) { var e = this.activeItem.firstElementChild, a = this.activeItem.getAttribute(t.dataLabel), c = e.getAttribute(t.href); this.activeItem.setAttribute(t.dataLabel, e.getAttribute(t.ariaLabel)); e.setAttribute(t.dataLabel, a); e.removeAttribute("aria-current"); !c || e.setAttribute(t.href, c); u.removeClass(this.activeItem, t.activeClass) } var o = this.pages[n], s = o.firstElementChild, v = o.getAttribute(t.dataLabel), l = s.getAttribute(t.href); return o.setAttribute(t.dataLabel, s.getAttribute(t.ariaLabel)), s.setAttribute(t.dataLabel, v), s.setAttribute("aria-current", "true"), this.srContainer && (this.srContainer.innerText = "Selected page " + (n + 1)), !l || s.setAttribute(t.href, l), u.addClass(o, t.activeClass), this.activeItem = o, this.page = n, this.updateButtons(), this.initiatePublish({ page: n, priorPage: h, internal: i, userinitiated: r }), !0 }, t.prototype.updateButtons = function () { var n = this.getPage(); n !== -1 && (n === 0 ? u.addClass(this.previousButton, t.hideClass) : u.removeClass(this.previousButton, t.hideClass), n === this.pages.length - 1 ? u.addClass(this.nextButton, t.hideClass) : u.removeClass(this.nextButton, t.hideClass)) }, t.prototype.getPageFromElement = function (n) { return !this.pages || !n ? -1 : this.pages.indexOf(n) }, t.selector = ".m-pagination", t.srSelector = ".x-screen-reader", t.typeName = "Pagination", t.pageClassSelector = "li[data-label],li.x-page", t.buttonsClassSelector = ".c-glyph", t.activeClass = "f-active", t.activeClassSelector = "." + t.activeClass, t.hideClass = "f-hide", t.ariaLabel = "aria-label", t.dataLabel = "data-label", t.dataHref = "data-href", t.href = "href", t }(r.Publisher); t.Pagination = e }); require(["pagination", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Pagination }]) }); define("rating", ["require", "exports", "tslib", "observableComponent", "htmlExtensions", "utility"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function (n) { function t(t) { var i = n.call(this, t) || this; return i.onRatingSelect = function (n) { i.handleRatingSelect(u.getEventTargetOrSrcElement(n)); u.preventDefault(n) }, i.onKeydown = function (n) { var t = f.getKeyCode(n); switch (t) { case 13: case 32: i.handleRatingSelect(u.getEventTargetOrSrcElement(n)) } }, i.update(), i } return i.__extends(t, n), t.prototype.update = function () { this.element && (this.buttons = u.selectElements("button", this.element), this.buttonClasses = this.getButtonClasses(), this.userRated = u.hasClass(this.element, t.userRatedSelector), this.communityRated = u.hasClass(this.element, t.communityRatedSelector), u.addEvent(this.buttons, u.eventTypes.keydown, this.onKeydown), u.addEvent(this.buttons, u.eventTypes.click, this.onRatingSelect)) }, t.prototype.teardown = function () { u.removeEvent(this.buttons, u.eventTypes.keydown, this.onKeydown); u.removeEvent(this.buttons, u.eventTypes.click, this.onRatingSelect) }, t.prototype.handleRatingSelect = function (n) { u.addClasses(this.element, [t.userRatedSelector, t.communityRatedSelector]); this.removeButtonClasses(); this.setButtonStyle(n); for (var i = 0; i < this.buttons.length; i++)if (n === this.buttons[i]) { this.selectedRating = i + 1; break } }, t.prototype.getButtonClasses = function () { for (var n = [], i = 0, r = this.buttons.length; i < r; i++)u.hasClass(this.buttons[i], t.fullClass) ? n.push(t.fullClass) : u.hasClass(this.buttons[i], t.halfClass) ? n.push(t.halfClass) : u.hasClass(this.buttons[i], t.noneClass) ? n.push(t.noneClass) : n.push(""); return n }, t.prototype.removeButtonClasses = function () { for (var n = 0, t = this.buttons.length; n < t; n++)u.removeClass(this.buttons[n], this.buttonClasses[n]) }, t.prototype.resetButtonClasses = function () { for (var n = 0, i = this.buttonClasses.length; n < i; n++)u.addClasses(this.buttons[n], [this.buttonClasses[n]]), u.hasClass(this.buttons[n], t.fullClass) && this.buttonClasses[n] !== t.fullClass && u.removeClass(this.buttons[n], t.fullClass) }, t.prototype.setButtonStyle = function (n) { for (var r = !0, i = 0, f = this.buttons.length; i < f; i++)r === !0 ? (u.addClasses(this.buttons[i], [t.fullClass]), this.buttons[i].setAttribute("aria-pressed", "true")) : (u.removeClass(this.buttons[i], t.fullClass), this.buttons[i].setAttribute("aria-pressed", "false")), this.buttons[i] === n && (r = !1) }, t.selector = ".c-rating.f-interactive", t.typeName = "Rating", t.userRatedSelector = "f-user-rated", t.communityRatedSelector = "f-community-rated", t.fullClass = "f-full", t.halfClass = "f-half", t.noneClass = "f-none", t }(r.ObservableComponent); t.Rating = e }); require(["rating", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ c: n.Rating }]) }); require(["selectMenu", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.SelectMenu }]) }); define("select", ["require", "exports", "tslib", "componentFactory", "publisher", "selectMenu", "htmlExtensions", "stringExtensions"], function (n, t, i, r, u, f, e, o) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var s = function (n) { function t(t) { var i = n.call(this, t) || this; return i.update(), i } return i.__extends(t, n), t.prototype.update = function () { var a = this, i, y, l, h, b, k, d; if (this.element && (this.select = e.selectFirstElementT("select", this.element), this.options = e.selectElementsT("option", this.select), this.select && this.options)) { !this.select.id && this.element.id && (this.select.id = this.element.id + "-select"); this.selectMenuDiv ? e.removeInnerHtml(this.selectMenuDiv) : this.selectMenuDiv = document.createElement("div"); this.selectMenuTrigger = document.createElement("button"); i = document.createElement("ul"); e.addClass(this.selectMenuDiv, "c-select-menu"); e.addClass(this.selectMenuDiv, "f-persist"); e.hasClass(this.element, "f-border") && e.addClass(this.selectMenuDiv, "f-border"); e.hasClass(this.element, "f-accent") && e.addClass(this.selectMenuDiv, "f-accent"); var c = this.select.getAttribute(t.placeHolder), v = this.select.getAttribute(t.ariaLabel), g = this.select.getAttribute(t.selectedAriaLabel), nt = this.select.getAttribute(t.ariaLabelledBy), tt = this.select.getAttribute(t.selectedAriaLabelledBy), ut = this.select.getAttribute(t.ariaDescribedBy); for (c && (this.selectMenuTrigger.setAttribute(t.placeHolder, c), e.setText(this.selectMenuTrigger, c)), v && (c || e.setText(this.selectMenuTrigger, v), this.selectMenuTrigger.setAttribute(t.ariaLabel, v)), g && this.selectMenuTrigger.setAttribute(t.selectedAriaLabel, g), nt && this.selectMenuTrigger.setAttribute(t.ariaLabelledBy, nt), tt && this.selectMenuTrigger.setAttribute(t.selectedAriaLabelledBy, tt), this.select.id !== null && this.selectMenuTrigger.setAttribute(t.ariaDescribedBy, this.select.id + "-dropdown"), this.selectMenuTrigger.setAttribute(t.ariaHaspopup, "listbox"), this.selectMenuTrigger.setAttribute(t.ariaExpanded, "false"), this.selectMenuTrigger.setAttribute("tabindex", "0"), e.addClass(i, "c-menu"), e.hasClass(this.element, "f-scroll") && e.addClass(i, "f-scroll"), i.setAttribute(t.ariaHidden, "true"), i.setAttribute("role", "listbox"), i.setAttribute("tabindex", "0"), e.hasClass(this.element, "f-flex") && e.addClass(this.selectMenuDiv, "f-flex"), this.select.hasAttribute("disabled") && (this.selectMenuDiv.setAttribute("aria-disabled", "true"), this.selectMenuTrigger.disabled = !0, this.selectMenuTrigger.removeAttribute(t.ariaHaspopup)), this.select.hasAttribute("required") && this.selectMenuDiv.setAttribute("aria-required", "true"), this.idPrefix = this.element.id || this.select.id, this.selectMenuTrigger.id = this.idPrefix + "-trigger", y = this.options.length, l = !1, h = 0; h < y; h++) { var u = this.options[h], p = u.getAttribute("selected"), rt = p === "selected" || p === "true" || p === "", w = u.getAttribute("disabled"), it = w === "disabled" || w === "true" || w === "", s = document.createElement("li"), n = document.createElement("span"); e.addClass(s, "c-menu-item"); s.setAttribute("role", "presentation"); n.setAttribute("tabindex", "0"); n.setAttribute("role", "option"); n.setAttribute("aria-posinset", (h + 1).toString()); n.setAttribute("aria-setsize", y.toString()); e.hasClass(u, "f-context-action-trigger") && e.addClass(n, "f-context-action-trigger"); !rt || l || it || (l = !0, n.setAttribute(t.ariaSelected, "true")); it && s.setAttribute("aria-disabled", "true"); u.hasAttribute("data-icon") && (b = u.getAttribute("data-icon"), o.isNullOrWhiteSpace(b) || (k = document.createElement("img"), k.src = b, n.appendChild(k), e.addClass(n, "f-icon"))); s.id = this.idPrefix + h.toString(); u.setAttribute(t.dataValue, s.id); d = document.createElement("p"); d.appendChild(document.createTextNode(e.getText(u))); n.appendChild(d); s.appendChild(n); i.appendChild(s) } l || (this.select.selectedIndex = -1); this.selectMenuDiv.appendChild(this.selectMenuTrigger); this.selectMenuDiv.appendChild(i); this.element.insertBefore(this.selectMenuDiv, this.select); this.ignoreNextDOMChange = !0; r.ComponentFactory.create([{ component: f.SelectMenu, eventToBind: "DOMContentLoaded", elements: [this.selectMenuDiv], callback: function (n) { !n && !n.length || (a.selectMenu = n[0], a.selectMenu.subscribe(a)) } }]); this.select.hasAttribute("autofocus") && this.focus() } }, t.prototype.teardown = function () { this.select = null; this.options = null; this.selectMenu = null }, t.prototype.publish = function (n, t) { n.onSelectionChanged(t) }, t.prototype.onSelectionChanged = function (n) { var i, f, e, r, u; if (!!n && !!n.id) { for (i = null, f = 0, e = this.options; f < e.length; f++)r = e[f], n.id === r.getAttribute(t.dataValue) ? (r.setAttribute("selected", "selected"), i = r) : r.removeAttribute("selected"); i && (n.id = i.value, this.selectMenuTrigger.removeAttribute(t.ariaLabel), u = this.selectMenuTrigger.getAttribute(t.selectedAriaLabel) || this.selectMenuDiv.getAttribute(t.defaultAriaLabel), u = u ? o.format(u, i.innerText) : i.innerText, this.selectMenuTrigger.setAttribute(t.ariaLabel, u), this.initiatePublish(n)) } }, t.prototype.setSelectedItem = function (n) { if (!n || !this.selectMenu || !this.options || !this.idPrefix) return !1; for (var t = 0; t < this.options.length; t++)if (this.options[t].value === n) return this.selectMenu.setSelectedItem(this.idPrefix + t.toString()); return !1 }, t.prototype.focus = function () { this.selectMenuTrigger.focus() }, t.selector = ".c-select", t.typeName = "Select", t.ariaExpanded = "aria-expanded", t.ariaHidden = "aria-hidden", t.ariaHaspopup = "aria-haspopup", t.ariaSelected = "aria-selected", t.ariaLabel = "aria-label", t.selectedAriaLabel = "data-selected-aria-label", t.defaultAriaLabel = "data-default-aria-label", t.ariaLabelledBy = "aria-labelledby", t.selectedAriaLabelledBy = "data-selected-aria-labelledby", t.ariaDescribedBy = "aria-describedby", t.placeHolder = "data-placeholder", t.dataValue = "data-value", t }(u.Publisher); t.Select = s }); require(["select", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Select }]) }); define("selectMenu", ["require", "exports", "tslib", "publisher", "htmlExtensions", "stringExtensions", "viewportCollision", "utility"], function (n, t, i, r, u, f, e, o) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var s = function (n) { function t(t) { var i = n.call(this, t) || this; return i.onTriggerClick = function (n) { n = u.getEvent(n); u.preventDefault(n); i.onTriggerToggled(n) }, i.onItemClick = function (n) { n = u.getEvent(n); i.onItemSelected(u.getEventTargetOrSrcElement(n), !1, !0); i.trigger.focus() }, i.onNonSelectMenuClick = function (n) { if (n = u.getEvent(n), !!i.element && !!i.menu) { var t = u.getEventTargetOrSrcElement(n); i.element.contains(t) || t !== i.menu && t.parentElement !== i.menu && i.collapse() } }, i.onNonSelectMenuTab = function (n) { n = u.getEvent(n); var t = o.getKeyCode(n); t === 9 && i.collapse() }, i.onTriggerKeyPress = function (n) { n = u.getEvent(n); var t = o.getKeyCode(n); switch (t) { case 13: case 32: u.preventDefault(n); i.onTriggerToggled() } }, i.handleMenuKeydownEvent = function (n) { n = u.getEvent(n); var t = o.getKeyCode(n); t !== 9 && i.isExpanded() && u.preventDefault(n); i.handleMenuKeydown(u.getEventTargetOrSrcElement(n), t, n) }, i.isOptionDisabled = function (n) { var t = u.getParent(n, ".c-menu-item"); return t && t.getAttribute("aria-disabled") === "true" }, i.update(), i } return i.__extends(t, n), t.prototype.update = function () { var s, f, a, v, e, i, r, o, n, y; if (this.element) { if (this.persist = u.hasClass(this.element, "f-persist"), this.trigger = u.selectFirstElementT('[role="button"]', this.element), this.trigger || (this.trigger = u.selectFirstElementT("button", this.element)), this.trigger) { !this.trigger.id && this.element.id && (this.trigger.id = this.element.id + "-trigger"); s = this.trigger.getAttribute(t.placeHolder) || u.getText(this.trigger); this.element.setAttribute(t.placeHolder, s); var h = this.trigger.getAttribute(t.ariaLabel), c = this.trigger.getAttribute(t.ariaLabelledBy), l = this.element.getAttribute(t.dataAriaLabelFormat); h && this.element.setAttribute(t.defaultAriaLabel, h); c && this.element.setAttribute(t.defaultAriaLabelledBy, c); l && this.trigger.setAttribute(t.dataAriaLabelFormat, l) } if (this.menu = u.selectFirstElement(".c-menu", this.element), f = u.selectElementsT(".c-menu-item a", this.element), this.items = f.length > 0 ? f : u.selectElementsT(".c-menu-item span", this.element), this.isLtr = u.getDirection(this.menu) === u.Direction.left, this.persist && (a = !!u.selectFirstElement("img", this.menu), a && (this.ignoreNextDOMChange = !0, v = document.createElement("img"), e = document.createElement("span"), u.setText(e, u.getText(this.trigger)), u.setText(this.trigger, ""), this.trigger.appendChild(v), this.trigger.appendChild(e))), !!this.trigger && !!this.menu && !!this.items && !!this.items.length) { for (i = null, u.hasClass(this.menu, t.fScroll) && u.addClass(this.element, t.fScroll), this.items.length <= t.fScrollItems ? u.removeClass(this.menu, t.fScroll) : u.hasClass(this.element, t.fScroll) && u.addClass(this.menu, t.fScroll), r = 0, o = this.items; r < o.length; r++)n = o[r], this.itemIsSelected(n) && i === null ? (i = n, n.setAttribute(this.getSelectedAttribute(n), "true")) : n.setAttribute(this.getSelectedAttribute(n), "false"), n.setAttribute("tabindex", "-1"), this.cleanSelectedAttributes(n), n.hasAttribute("role") || n.setAttribute("role", "menuitem"); y = this.isExpanded(); this.onItemSelected(i, !0, !1); this.selectedItem || this.updateAriaLabel(); this.addEventListeners(); y && this.expand() } } }, t.prototype.teardown = function () { var n, t, i; for (u.removeEvent(this.trigger, u.eventTypes.click, this.onTriggerClick), u.removeEvent(this.trigger, u.eventTypes.keydown, this.onTriggerKeyPress), u.removeEvent(this.menu, u.eventTypes.keydown, this.handleMenuKeydownEvent, !0), n = 0, t = this.items; n < t.length; n++)i = t[n], u.removeEvent(i, u.eventTypes.click, this.onItemClick); u.removeEvent(document, u.eventTypes.click, this.onNonSelectMenuClick); u.removeEvent(this.items[this.items.length - 1], u.eventTypes.keydown, this.onNonSelectMenuTab); this.persist = !1; this.trigger = null; this.menu = null; this.items = null; this.selectedItem = null }, t.prototype.setSelectedItem = function (n) { if (!n || !this.element) return !1; var t = u.selectFirstElement('[id="' + n + '"] > a', this.element) || u.selectFirstElement('[id="' + n + '"] > span', this.element); return t ? this.onItemSelected(t, !1, !1) : !1 }, t.prototype.updateAriaLabel = function () { if (this.selectedItem) { var e = this.trigger.getAttribute(t.selectedAriaLabel) || this.trigger.getAttribute(t.dataAriaLabelFormat) || this.trigger.getAttribute(t.ariaLabel), o = this.trigger.getAttribute(t.selectedAriaLabelledBy) || this.trigger.getAttribute(t.ariaLabelledBy), s = this.selectedItem ? this.selectedItem.getAttribute(t.ariaLabel) || u.getText(this.selectedItem) : u.getText(this.trigger), h = e ? f.format(e, s) : s; this.trigger.setAttribute(t.ariaLabel, h); o && this.trigger.setAttribute(t.ariaLabelledBy, f.format(o, this.trigger.id)) } else { this.trigger.removeAttribute(t.ariaLabel); this.trigger.removeAttribute(t.ariaLabelledBy); var n = this.element.getAttribute(t.placeHolder), i = this.element.getAttribute(t.dataAriaLabelFormat) || this.element.getAttribute(t.defaultAriaLabel), r = this.element.getAttribute(t.defaultAriaLabelledBy); n && u.setText(this.trigger, n); i && this.trigger.setAttribute(t.ariaLabel, f.format(i, u.getText(this.trigger))); r && this.trigger.setAttribute(t.ariaLabelledBy, f.format(r, this.trigger.id)) } }, t.prototype.isExpanded = function () { return !!this.trigger && !!this.menu && this.trigger.getAttribute(t.ariaExpanded) === "true" && this.menu.getAttribute(t.ariaHidden) === "false" }, t.prototype.itemIsSelected = function (n) { return n.getAttribute(t.ariaSelected) === "true" || n.getAttribute(t.ariaChecked) === "true" }, t.prototype.getSelectedAttribute = function (n) { return n.getAttribute("role") === "menuitemradio" ? t.ariaChecked : t.ariaSelected }, t.prototype.cleanSelectedAttributes = function (n) { var i = this.getSelectedAttribute(n) === t.ariaSelected ? t.ariaChecked : t.ariaSelected; n.removeAttribute(i) }, t.prototype.positionMenu = function () { var i = u.css(this.element, "float"), r = i === "right", o = !r && i === "left", f = o ? !0 : r || !this.isLtr ? !1 : !0, n, t; u.css(this.menu, "top", "auto"); u.css(this.menu, "bottom", "auto"); u.css(this.menu, f ? "left" : "right", "0"); u.css(this.menu, "height", "auto"); n = e.getCollisionExtents(this.menu); !n || ((n.right < 0 || n.left < 0) && (n.clientRect.width <= n.viewport.width ? f ? u.css(this.menu, "left", n.right + "px") : u.css(this.menu, "right", n.left + "px") : (u.css(this.menu, "left", -n.left + "px"), u.css(this.menu, "width", n.viewport.width + "px"))), n.bottom < 0 && (t = parseFloat(u.css(this.trigger, "height")), n.clientRect.height + t <= n.top ? u.css(this.menu, "bottom", t + "px") : n.clientRect.height <= n.viewport.height ? u.css(this.menu, "top", n.bottom + t + "px") : (u.css(this.menu, "top", -n.top + t + "px"), u.css(this.menu, "height", n.viewport.height + "px")))) }, t.prototype.expand = function () { if (!!this.trigger && !!this.menu && (this.trigger.setAttribute(t.ariaExpanded, "true"), this.menu.setAttribute(t.ariaHidden, "false"), this.positionMenu(), !!this.items)) { var n = this.items.indexOf(this.selectedItem), i = n === -1 ? 0 : n, r = this.items[i]; r.focus() } }, t.prototype.collapse = function () { !this.trigger || !this.menu || (this.trigger.setAttribute(t.ariaExpanded, "false"), this.menu.setAttribute(t.ariaHidden, "true")) }, t.prototype.addEventListeners = function () { var n, t, i; if (!!this.trigger && !!this.items) { for (u.addEvent(this.trigger, u.eventTypes.click, this.onTriggerClick), u.addEvent(this.trigger, u.eventTypes.keydown, this.onTriggerKeyPress), u.addEvent(this.menu, u.eventTypes.keydown, this.handleMenuKeydownEvent, !0), n = 0, t = this.items; n < t.length; n++)i = t[n], u.addEvent(i, u.eventTypes.click, this.onItemClick); u.addEvent(this.items[this.items.length - 1], u.eventTypes.keydown, this.onNonSelectMenuTab); u.addEvent(document, u.eventTypes.click, this.onNonSelectMenuClick) } }, t.prototype.onTriggerToggled = function (n) { this.element.getAttribute("aria-disabled") !== "true" && (this.isExpanded() ? this.collapse() : this.expand(n)) }, t.prototype.onItemSelected = function (n, t, i) { var e, f, o, s, h, r; if (!n || n === this.selectedItem) return this.collapse(), !1; if ((n.nodeName === "P" || n.nodeName === "IMG") && (n = n.parentElement), !this.isOptionDisabled(n)) { if (n.className === "c-menu") return this.collapse(), !1; for (this.persist && this.trigger && (e = u.selectFirstElementT("img", this.trigger), this.ignoreNextDOMChange = !0, e ? (f = u.selectFirstElementT("img", n), o = f ? f.getAttribute("src") : "", e.setAttribute("src", o), s = u.selectFirstElementT("span", this.trigger), u.setText(s, u.getText(n)), u.hasClass(this.trigger, "f-icon") && !f ? u.removeClass(this.trigger, "f-icon") : !u.hasClass(this.trigger, "f-icon") && f && u.addClass(this.trigger, "f-icon")) : u.setText(this.trigger, u.getText(n))), this.selectedItem && this.selectedItem.setAttribute(this.getSelectedAttribute(this.selectedItem), "false"), this.selectedItem = n, this.selectedItem.setAttribute(this.getSelectedAttribute(this.selectedItem), "true"), this.updateAriaLabel(), this.collapse(), h = null, r = this.selectedItem; r && r.parentElement !== this.menu;)r = r.parentElement; return r && this.initiatePublish({ id: r.id, href: this.selectedItem.getAttribute("href"), internal: t, userInitiated: i }), !0 } }, t.prototype.publish = function (n, t) { if (!!this.selectedItem) n.onSelectionChanged(t) }, t.prototype.handleMenuKeydown = function (n, t, i) { i === void 0 && (i = null); switch (t) { case 32: case 13: this.handleMenuEnterKey(n); this.trigger.focus(); break; case 27: this.trigger.focus(); this.collapse(); i && i.stopPropagation(); break; case 38: case 203: case 211: this.handleMenuArrowKey(!0, n); break; case 40: case 204: case 212: this.handleMenuArrowKey(!1, n); break; case 9: this.isExpanded() && this.handleMenuEnterKey(n) } }, t.prototype.handleMenuArrowKey = function (n, t) { var r = this.items.indexOf(t), u, i; if (r !== -1) { u = n ? -1 : 1; i = r; do i += u, (i < 0 || i >= this.items.length) && (i = r); while (i !== r && this.isOptionDisabled(this.items[i])); this.items[i].focus() } }, t.prototype.handleMenuEnterKey = function (n) { this.onItemSelected(n, !1, !0) }, t.selector = ".c-select-menu", t.typeName = "SelectMenu", t.dataAriaLabelFormat = "data-aria-label-format", t.selectedAriaLabel = "data-selected-aria-label", t.selectedAriaLabelledBy = "data-selected-aria-labelledby", t.ariaExpanded = "aria-expanded", t.ariaHidden = "aria-hidden", t.ariaSelected = "aria-selected", t.ariaLabel = "aria-label", t.ariaLabelledBy = "aria-labelledby", t.ariaChecked = "aria-checked", t.placeHolder = "data-placeholder", t.defaultAriaLabel = "data-default-aria-label", t.defaultAriaLabelledBy = "data-default-aria-labelledby", t.fScroll = "f-scroll", t.fScrollItems = 5, t }(r.Publisher); t.SelectMenu = s }); require(["selectMenu", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.SelectMenu }]) }); define("backToTop", ["require", "exports", "tslib", "htmlExtensions", "utility", "observableComponent"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function (n) { function t(t) { var i = n.call(this, t) || this; return (i.toggleBackToTop = function () { var n = window.pageYOffset || document.body.scrollTop, t = u.getWindowHeight(), r = n >= 2 * t ? "false" : "true"; i.element.setAttribute("aria-disabled", r) }, !t) ? i : (i.update(), i) } return i.__extends(t, n), t.prototype.update = function () { this.scrollThrottledEventHandler = r.addThrottledEvent(window, r.eventTypes.scroll, this.toggleBackToTop) }, t.prototype.teardown = function () { r.removeEvent(window, r.eventTypes.scroll, this.scrollThrottledEventHandler) }, t.selector = ".m-back-to-top", t.typeName = "BackToTop", t }(f.ObservableComponent); t.BackToTop = e }); require(["backToTop", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.BackToTop }]) }); define("social", ["require", "exports", "tslib", "observableComponent", "htmlExtensions", "utility"], function (n, t, i, r, u, f) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var e = function (n) { function t(t) { var i = n.call(this, t) || this; return (i.element = t, i.ariaExpanded = "aria-expanded", i.buttonToggle = "data-js-toggle", i.ariaHidden = "aria-hidden", i.hideClass = "f-hide", i.isHidden = !0, i.iconOverflowThresholdLength = 4, i.maxIconShowCount = i.iconOverflowThresholdLength - 1, i.handleMouseUp = function () { i.handleToggle(!1) }, i.handleKeydown = function (n) { n = u.getEvent(n); var r = f.getKeyCode(n), t = u.getEventTargetOrSrcElement(n); switch (r) { case 9: !i.isHidden && t === i.icons[i.maxIconShowCount] && n.shiftKey && (u.preventDefault(n), i.handleToggle(!1), i.toggle.focus()); break; case 13: t === i.toggle && i.handleToggle(!0) } }, i.handleToggle = function (n) { i.isHidden ? i.toggleIcons(!1, n) : i.toggleIcons(!0, n); i.ariaExpanded && i.toggle.setAttribute(i.ariaExpanded, (!i.isHidden).toString()); i.toggle.setAttribute(i.buttonToggle, (!i.isHidden).toString()) }, i.toggleIcons = function (n, t) { for (var r = 0; r < i.maxIconShowCount; r++)n ? u.removeClass(i.icons[r], i.hideClass) : u.addClass(i.icons[r], i.hideClass); for (r = Math.max(0, i.icons.length - i.maxIconShowCount); r < i.icons.length; r++)n && r > i.maxIconShowCount - 1 ? u.addClass(i.icons[r], i.hideClass) : u.removeClass(i.icons[r], i.hideClass); t && (n ? i.icons[0].focus() : i.icons[i.maxIconShowCount].focus()); i.isHidden = n }, !t) ? i : (i.update(), i) } return i.__extends(t, n), t.prototype.update = function () { if ((this.icons = u.selectElementsT('a[itemprop="sameAs"]', this.element), this.icons && this.icons.length && !(this.icons.length > t.maxIconCount)) && (this.toggle = u.selectFirstElement("button", this.element), this.toggle)) { if (this.icons.length < this.iconOverflowThresholdLength) { this.toggle.setAttribute(this.ariaHidden, "true"); return } u.addEvent(this.toggle, u.eventTypes.mouseup, this.handleMouseUp); u.addEvent(this.element, u.eventTypes.keydown, this.handleKeydown); this.toggle.getAttribute(this.ariaHidden) === "true" || (this.toggle.setAttribute(this.ariaHidden, "false"), this.ariaExpanded ? this.toggle.setAttribute(this.ariaExpanded, "false") : this.toggle.setAttribute(this.buttonToggle, "false"), this.toggleIcons(!0, !1)) } }, t.prototype.teardown = function () { u.removeEvent(this.toggle, u.eventTypes.mouseup, this.handleMouseUp); u.removeEvent(this.element, u.eventTypes.keydown, this.handleKeydown) }, t.maxIconCount = 6, t.selector = ".m-social", t.typeName = "Social", t }(r.ObservableComponent); t.Social = e }); require(["social", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Social }]) }); define("sticky", ["require", "exports", "tslib", "htmlExtensions", "publisher"], function (n, t, i, r, u) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var f = function (n) { function t(i) { var u = n.call(this, i) || this; return u.element = i, u.shouldMoveToBody = !1, u.isTransitionInProgress = !1, u.lastScrollHeight = -1, u.lastTransformValue = null, u.wasHidden = !1, u.isStuck = !1, u.setSticky = function () { u.wasHidden = r.hasClass(u.element, t.isHiddenClass); u.placeholder = u.cloneAsPlaceholder(u.element); u.element.parentElement.insertBefore(u.placeholder, u.element); u.shouldMoveToBody && document.body.appendChild(u.element); r.addClass(u.element, t.stuckClass); u.isStuck = !0; r.removeClass(u.element, t.isHiddenClass); u.initiatePublish({ isStuck: !0, isVisible: !0 }); r.addClass(u.element, t.animateClass) }, u.removeAnimationClass = function () { r.removeClass(u.element, t.animateClass); window.requestAnimationFrame(u.waitForTransitionEnd) }, u.setNotSticky = function () { u.isTransitionInProgress = !0; u.wasHidden ? window.requestAnimationFrame(u.removeAnimationClass) : (r.addClass(u.element, t.noTransitionClass), u.waitForTransitionEnd()) }, u.waitForTransitionEnd = function () { var n = r.css(u.element, "transform"); u.wasHidden && n !== u.lastTransformValue ? (u.lastTransformValue = n, window.requestAnimationFrame(u.waitForTransitionEnd)) : u.isTransitionInProgress && (u.isTransitionInProgress = !1, u.lastTransformValue = null, u.wasHidden && r.addClass(u.element, t.isHiddenClass), u.shouldMoveToBody && u.placeholder.parentElement.insertBefore(u.element, u.placeholder), u.placeholder.parentElement.removeChild(u.placeholder), r.removeClasses(u.element, [t.noTransitionClass, t.stuckClass, t.animateClass]), u.isStuck = !1, u.initiatePublish({ isStuck: !1, isVisible: !u.wasHidden }), u.wasHidden = !1) }, u.onWindowScrolled = function () { var n = u.isStuck ? r.getClientRect(u.placeholder) : r.getClientRect(u.element); !u.isStuck && n.top < 0 ? u.setSticky() : u.isStuck && n.top >= 0 && u.setNotSticky() }, u.watchForWindowScroll = function () { u.isTransitionInProgress || u.lastScrollHeight === window.pageYOffset || (u.lastScrollHeight = window.pageYOffset, u.onWindowScrolled()); window.requestAnimationFrame(u.watchForWindowScroll) }, u.update(), u } return i.__extends(t, n), t.prototype.update = function () { return this.element ? (this.shouldMoveToBody = this.element.hasAttribute(t.dataTagMove), this.watchForWindowScroll(), !0) : !1 }, t.prototype.publish = function (n, t) { if (n && n.onStickyStateChange) n.onStickyStateChange(t) }, t.prototype.teardown = function () { }, t.prototype.cloneAsPlaceholder = function () { var t = this, n; return this.placeholder || (this.placeholder = document.createElement("div"), this.placeholder.style.background = "transparent"), n = getComputedStyle(this.element), ["padding", "margin", "display", "position", "height"].forEach(function (i) { return t.placeholder.style[i] = n[i] }), this.placeholder }, t.selector = ".m-sticky", t.typeName = "Sticky", t.stuckClass = "f-stuck", t.noTransitionClass = "f-no-transition", t.isHiddenClass = "f-hidden", t.animateClass = "f-animate", t.dataTagMove = "data-move", t }(u.Publisher); t.Sticky = f }); require(["sticky", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ c: n.Sticky }]) }); define("table", ["require", "exports", "tslib", "observableComponent", "htmlExtensions", "utility", "stringExtensions"], function (n, t, i, r, u, f, e) { "use strict"; var o, s, h; Object.defineProperty(t, "__esModule", { value: !0 }); o = function (n) { function t(t) { var i = n.call(this, t) || this; return i.onSortButtonClicked = function (n) { for (var t = n.currentTarget || u.getEventTargetOrSrcElement(n), r; t !== i.element;) { if (t.getAttribute("data-sort-index")) { r = t; break } t = t.parentElement } r && i.reSort(r) }, i.onSortButtonKeydown = function (n) { var o, h, s, c, t; if (f.getKeyCode(n) === 9 || f.getVirtualKey(n) === "Tab") { var l = n.currentTarget || u.getEventTargetOrSrcElement(n), r = void 0, e = void 0; if (n.shiftKey) { for (o = 0, h = i.columnInfos; o < h.length; o++)if (t = h[o], t && t.button) if (t.button === l) { r = t; break } else e = t } else for (s = 0, c = i.columnInfos; s < c.length; s++)if (t = c[s], t && t.button) if (t.button === l) r = t; else if (r) { e = t; break } r && e && (u.preventDefault(n), e.button.focus()) } }, i.update(), i } return i.__extends(t, n), t.prototype.update = function () { this.element && (this.sortableTable = u.selectFirstElementT('table[data-f-sort="true"]', this.element), !this.sortableTable || this.ariaLiveRegion || (this.ariaLiveRegion = document.createElement("p"), u.addClass(this.ariaLiveRegion, "x-screen-reader"), this.ariaLiveRegion.setAttribute("aria-live", "assertive"), this.element.appendChild(this.ariaLiveRegion), this.ascendingLocString = this.element.getAttribute("data-f-loc-ascending") || "Sorted by {0} - ascending", this.descendingLocString = this.element.getAttribute("data-f-loc-descending") || "Sorted by {0} - descending"), this.reloadTable()) }, t.prototype.teardown = function () { for (var f, t, e, i, n = 0, r = u.selectElementsT("thead > tr", this.sortableTable); n < r.length; n++)for (f = r[n], t = 0, e = f.cells.length; t < e; t++)i = f.cells[t], u.hasClass(i, "f-sortable") && (u.removeEvent(i.firstElementChild, u.eventTypes.click, this.onSortButtonClicked), u.removeEvent(i.firstElementChild, u.eventTypes.keydown, this.onSortButtonKeydown)); this.sortableTable = null; this.tableBody = null; this.originalRows = null; this.columnInfos = null }, t.prototype.alertUserToSorting = function (n, t) { var i = this; this.ariaLiveRegion && (u.setText(this.ariaLiveRegion, e.format(t, n)), setTimeout(function () { i.ignoreNextDOMChange = !0; u.removeInnerHtml(i.ariaLiveRegion) }, 3e3)) }, t.prototype.reloadTable = function () { this.sortableTable && (this.tableBody || (this.tableBody = u.selectFirstElementT("tbody", this.sortableTable)), this.originalRows = null, !this.tableBody || (this.originalRows = u.selectElementsT("tr", this.tableBody), this.rebuildSortInfo())) }, t.prototype.rebuildSortInfo = function () { var n, r, i, t, u, f, e; if (this.originalRows && this.originalRows.length && (this.columnInfos && this.columnInfos.length || this.rebuildColumnInfo(), this.columnInfos && this.columnInfos.length)) for (n = 0, r = this.columnInfos.length; n < r; n++)if (this.columnInfos[n]) { for (i = [], t = 0, u = this.originalRows.length; t < u; t++)f = this.originalRows[t], e = new s(t, this.getSortKey(f.cells[n])), i.push(e); this.columnInfos[n].sortOrder = i } }, t.prototype.rebuildColumnInfo = function () { var c = u.selectElementsT("thead > tr", this.sortableTable), n, p, t, l, e, w, r, i, b, a, k, v, o, s, y, f; for (this.columnInfos = [], n = 0, p = c.length; n < p; n++)for (t = this.findNextNull(this.columnInfos, 0), l = 0, e = 0, w = c[n].cells.length; e < w; e++)if (r = c[n].cells[e], u.hasClass(r, "f-sortable")) i = r.firstElementChild, b = new h(r, i), r.setAttribute("aria-sort", "none"), i.setAttribute("data-sort-index", t.toString()), u.addClass(i, "c-glyph"), u.addEvent(i, u.eventTypes.click, this.onSortButtonClicked), u.addEvent(i, u.eventTypes.keydown, this.onSortButtonKeydown), this.columnInfos[t] = b, t = this.findNextNull(this.columnInfos, t + 1), n === 0 && l === 0 && (l++, u.addClass(i, "glyph-sort")); else if (n === 0) for (a = 0, k = r.colSpan; a < k; a++)this.columnInfos.push(null), t++; else t++; if (this.columnInfos.length > 2) for (v = void 0, o = void 0, s = 0, y = this.columnInfos; s < y.length; s++)f = y[s], f && f.button && (v ? (o && o.button.setAttribute("tabIndex", "-1"), o = f) : v = f) }, t.prototype.findNextNull = function (n, t) { for (var i = t, r = n.length; i < r; i++)if (!n[i]) return i; return n.length }, t.prototype.reSort = function (n) { var t = this.columnInfos[parseInt(n.getAttribute("data-sort-index"), 10)], r = t.header.getAttribute("aria-sort"), i = r !== "ascending"; this.clearSortIndicators(); this.reorderTableRows(t, i); i ? (t.header.setAttribute("aria-sort", "ascending"), u.addClass(t.button, "f-ascending"), this.alertUserToSorting(u.getText(n), this.ascendingLocString)) : (t.header.setAttribute("aria-sort", "descending"), u.addClass(t.button, "f-descending"), this.alertUserToSorting(u.getText(n), this.descendingLocString)) }, t.prototype.clearSortIndicators = function () { for (var n, t = 0, i = this.columnInfos; t < i.length; t++)(n = i[t], n) && (n.header.setAttribute("aria-sort", "none"), u.removeClass(n.button, "f-descending"), u.removeClass(n.button, "f-ascending"), u.removeClass(n.button, "glyph-sort")) }, t.prototype.reorderTableRows = function (n, t) { var r = this.tableBody.rows.length, i, u; for (n.ensureColumnInfoIsSorted(), this.ignoreNextDOMChange = !0, i = 0; i < r; i++)u = t ? n.sortOrder[i] : n.sortOrder[r - i - 1], this.tableBody.appendChild(this.originalRows[u.originalRowIndex]) }, t.prototype.getSortKey = function (n) { if (u.hasClass(n, "f-numerical")) { if (u.selectElements('[content="0.00"]', n).length > 0) return ""; var r = u.getText(n), i = r.match(t.floatRegEx); if (!!i) return i[0] } return e.trim(u.getText(n)) }, t.selector = ".c-table", t.typeName = "Table", t.floatRegEx = /(\d+|\,|\.)+/g, t }(r.ObservableComponent); t.Table = o; s = function () { function n(n, t) { this.originalRowIndex = n; this.key = t } return n }(); h = function () { function n(n, t) { this.header = n; this.button = t } return n.prototype.ensureColumnInfoIsSorted = function () { this.sortOrder && !this.isSorted && (this.sortOrder.sort(function (n, t) { var i = n.key, r = t.key, u, f; return i === r ? 0 : (u = parseFloat(i), f = parseFloat(r), isNaN(u) || isNaN(f)) ? i > r ? 1 : -1 : u > f ? 1 : -1 }), this.isSorted = !0) }, n }() }); require(["table", "componentFactory"], function (n, t) { t.ComponentFactory && t.ComponentFactory.create && t.ComponentFactory.create([{ component: n.Table }]) })