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AAQC,GAAYwB,cACpB1Y,KAAM,CACJ2Y,KAAMC,GAAkBC,SAE1B,GACD,CAAC,GAEJ/M,GAAAnjB,KAAI4tB,IAAAA,IAAiB,IAAIrd,sBACtBC,IAAY,IAAA2f,EAAAC,EAAAC,EACI,OAAXF,EAAC3f,EAAQ,KAAR2f,EAAY/f,iBAGb,OAAJggB,EAAAjN,GAAAnjB,KAAI4tB,IAAAA,MAAJwC,EAAoBrf,aAChB,OAAJsf,EAAAlN,GAAAnjB,KAAI0tB,IAAAA,MAAJ2C,EAAetD,yBAAyB,CACtCuB,OAAQC,GAAYwB,cACpB1Y,KAAM,CACJ2Y,KAAMC,GAAkBK,QAE1B,GAEJ,CACEjoB,UAAW,CAAC,GAGZuH,WAAY,0BAIhBuT,GAAAnjB,KAAI2tB,IAAAA,IAAgB7c,QAAQ9Q,MAC9B,CAAC,SAAAkuB,KAYqB,IAAAqC,EAAAC,EAChB,OAAJD,EAAApN,GAAAnjB,KAAI2tB,IAAAA,MAAJ4C,EAAqBxf,aACjB,OAAJyf,EAAArN,GAAAnjB,KAAI4tB,IAAAA,MAAJ4C,EAAoBzf,YACtB,CAWFuc,GAAWzX,GAAKoY,G","sources":["webpack://dh-introscroll/webpack/runtime/import chunk loading","webpack://dh-introscroll/./node_modules/balance-text/balancetext.js","webpack://dh-introscroll/./node_modules/cuid/index.js","webpack://dh-introscroll/./node_modules/cuid/lib/fingerprint.browser.js","webpack://dh-introscroll/./node_modules/cuid/lib/getRandomValue.browser.js","webpack://dh-introscroll/./node_modules/cuid/lib/pad.js","webpack://dh-introscroll/./node_modules/debounce/index.js","webpack://dh-introscroll/./node_modules/@nrk/dh-server-libs/get-element-tag.js","webpack://dh-introscroll/./node_modules/@nrk/dh-server-libs/html.js","webpack://dh-introscroll/./node_modules/@nrk/dh-server-libs/src/get-element-tag.js","webpack://dh-introscroll/./node_modules/@nrk/dh-server-libs/src/html-tagged-template-literal.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/assertClassBrand.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://dh-introscroll/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-common/dist/index.esm.js","webpack://dh-introscroll/webpack/bootstrap","webpack://dh-introscroll/webpack/runtime/amd options","webpack://dh-introscroll/webpack/runtime/compat get default export","webpack://dh-introscroll/webpack/runtime/define property getters","webpack://dh-introscroll/webpack/runtime/ensure chunk","webpack://dh-introscroll/webpack/runtime/get javascript chunk filename","webpack://dh-introscroll/webpack/runtime/get mini-css chunk filename","webpack://dh-introscroll/webpack/runtime/hasOwnProperty shorthand","webpack://dh-introscroll/webpack/runtime/make namespace object","webpack://dh-introscroll/webpack/runtime/node module decorator","webpack://dh-introscroll/webpack/runtime/publicPath","webpack://dh-introscroll/webpack/runtime/css loading","webpack://dh-introscroll/./node_modules/@nrk/dh-vh/dist/index.mjs","webpack://dh-introscroll/./src/polyfills.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-mixins/dist/index.esm.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-scrollhistorie/dist/index.esm.js","webpack://dh-introscroll/./src/lib/balance-text-wrapper.js","webpack://dh-introscroll/./src/components/article-info.ts","webpack://dh-introscroll/./src/components/introscroll.module.css?4b5f","webpack://dh-introscroll/./src/components/introscroll.js","webpack://dh-introscroll/./src/components/background.module.css?5643","webpack://dh-introscroll/./src/components/cards/cards.module.css?fefa","webpack://dh-introscroll/./src/components/media/spesialmodul.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-stegvis-video/dist/index.esm.js","webpack://dh-introscroll/./node_modules/@nrk/dh-basis-levende-stillbilde/dist/index.esm.js","webpack://dh-introscroll/./node_modules/@nrk/nrkno-snowplow/node_modules/@nrk/snowplow-web/index.js","webpack://dh-introscroll/./node_modules/@nrk/nrkno-snowplow/build-npm/nrkno-snowplow.package.mjs","webpack://dh-introscroll/./node_modules/@nrk/snowplow-web/index.js","webpack://dh-introscroll/./node_modules/@nrk/dh-snowplow/dist/index.mjs","webpack://dh-introscroll/./node_modules/@nrk/dh-snowplow/dist/shared/dh-snowplow.1ee613bf.mjs","webpack://dh-introscroll/./src/client.js"],"sourcesContent":["// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t792: 0\n};\n\nvar installChunk = (data) => {\n\tvar {ids, modules, runtime} = data;\n\t// add \"modules\" to the modules object,\n\t// then flag all \"ids\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tfor(moduleId in modules) {\n\t\tif(__webpack_require__.o(modules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = modules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\tfor(;i < ids.length; i++) {\n\t\tchunkId = ids[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[ids[i]] = 0;\n\t}\n\n}\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// import() chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[1]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = import(\"./\" + __webpack_require__.u(chunkId)).then(installChunk, (e) => {\n\t\t\t\t\t\tif(installedChunks[chunkId] !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t});\n\t\t\t\t\tvar promise = Promise.race([promise, new Promise((resolve) => (installedChunkData = installedChunks[chunkId] = [resolve]))])\n\t\t\t\t\tpromises.push(installedChunkData[1] = promise);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no external install chunk\n\n// no on chunks loaded","/*\n * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License. *\n */\n/**\n * balancetext.js\n *\n * Author: Randy Edmunds\n */\n\n/* global define, module */\n\n/*\n * Copyright (c) 2007-2009 unscriptable.com and John M. Hann\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the “Software”), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n *\n * Except as contained in this notice, the name(s) of the above\n * copyright holders (unscriptable.com and John M. Hann) shall not be\n * used in advertising or otherwise to promote the sale, use or other\n * dealings in this Software without prior written authorization.\n *\n * http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/\n *\n * Tested to work on (lowest browser):\n * - Sarari 4\n * - Chrome 16\n * - Firefox 10\n * - IE 9\n * - Edge 13\n */\n\n(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], factory);\n } else if (typeof module === \"object\" && module.exports) {\n module.exports = factory();\n } else {\n root.balanceText = factory();\n }\n}(this, () => {\n /**\n * Line breaking global vars\n */\n let breakMatches, wsnwMatches, wsnwOffset;\n\n /**\n * Selectors and elements to watch;\n * calling $.balanceText(elements) adds \"elements\" to this list.\n */\n const watching = {\n sel: [], // default class to watch\n el: [],\n };\n\n /**\n * Have handlers been initialized?\n */\n let handlersInitialized = false;\n\n /**\n * Is this a polyfill?\n */\n let polyfilled = false;\n\n\n /**\n * Do nothing\n */\n function noop() { }\n\n /**\n * Loop that works with array-likes\n * @param {Array-like} elements - List of elements to run a function on\n * @param {Function} callback - The function to call on each supplied element\n */\n function forEach(elements, callback) {\n Array.prototype.forEach.call(elements, callback);\n }\n\n /**\n * Polyfill for $(document).ready()\n *\n * @param {Function} fn - The function to execute when the document is ready\n */\n function ready(fn) {\n if (document.readyState !== \"loading\") {\n fn();\n } else if (document.addEventListener) {\n document.addEventListener(\"DOMContentLoaded\", fn);\n } else {\n document.attachEvent(\"onreadystatechange\", () => {\n if (document.readyState !== \"loading\") {\n fn();\n }\n });\n }\n }\n\n /**\n * Debounces a function over a threshold\n *\n * @param {Function} func - The function to debounce\n * @param {number} threshold - time in ms\n * @param {boolean} execAsap - when true, execute immediately\n * @param args\n * @return {Function} Debounced function\n */\n function debounce(func, threshold, execAsap, ...args) {\n let timeout;\n\n return function () {\n const obj = this;\n\n function delayed() {\n if (!execAsap) {\n func.apply(obj, args);\n }\n timeout = null;\n }\n\n if (timeout) {\n clearTimeout(timeout);\n } else if (execAsap) {\n func.apply(obj, args);\n }\n timeout = setTimeout(delayed, threshold || 100);\n };\n }\n\n /**\n * Determine whether the document supports TextWrap\n * @return {boolean}\n */\n function hasTextWrap() {\n if (typeof window === \"undefined\") {\n return false;\n }\n const { style } = document.documentElement;\n return style.textWrap || style.WebkitTextWrap || style.MozTextWrap || style.MsTextWrap;\n }\n\n /**\n * Object for tracking next whitespace params\n */\n // eslint-disable-next-line camelcase\n function NextWS_params() {\n this.reset();\n }\n\n NextWS_params.prototype.reset = function () {\n this.index = 0;\n this.width = 0;\n };\n\n /**\n * Check if index is contained in previously calculated list of white-space:nowrap ranges\n *\n * @param {number} index - the index of the character to check\n * @return {boolean}\n */\n function isWhiteSpaceNoWrap(index) {\n // Is index inside 1 of the ranges?\n // start and end are breakable, but not inside range\n return wsnwMatches.some(range => (range.start < index && index < range.end));\n }\n\n /**\n * Recursively calculate white-space:nowrap offsets for line.\n *\n * @param {Node} el - the element to act on\n * @param {boolean} includeTag - include length of tag itself\n */\n function recursiveCalcNoWrapOffsetsForLine(el, includeTag) {\n if (el.nodeType === el.ELEMENT_NODE) {\n // Found an embedded tag\n const style = window.getComputedStyle(el);\n if (style.whiteSpace === \"nowrap\") {\n // Tag with white-space:nowrap - add match, skip children\n const len = el.outerHTML.length;\n wsnwMatches.push({ start: wsnwOffset, end: wsnwOffset + len });\n wsnwOffset += len;\n } else {\n // Tag without white-space:nowrap - recursively check children of tag\n forEach(el.childNodes, (child) => {\n recursiveCalcNoWrapOffsetsForLine(child, true);\n });\n if (includeTag) {\n // Length of opening tag, attributes, and closing tag\n wsnwOffset += (el.outerHTML.length - el.innerHTML.length);\n }\n }\n } else if (el.nodeType === el.COMMENT_NODE) {\n wsnwOffset += el.length + 7; // delimiter: \n } else if (el.nodeType === el.PROCESSING_INSTRUCTION_NODE) {\n wsnwOffset += el.length + 2; // delimiter: < >\n } else {\n // Text node: add length\n wsnwOffset += el.length;\n }\n }\n\n /**\n * Calculate white-space:nowrap offsets for line.\n *\n * @param {Node} el - the element to act on\n * @param {string} oldWS - \"old\" whitespace setting for temporarily resetting\n * @param {number} lineCharOffset - char offset of current line from start of text\n */\n function calcNoWrapOffsetsForLine(el, oldWS, lineCharOffset) {\n // For first line (lineCharOffset === 0), calculate start and end offsets for each\n // white-space:nowrap element in the line.\n if (lineCharOffset === 0) {\n // Reset whiteSpace setting when breakMatches is being calculated\n // so white-space:nowrap can be detected in text\n el.style.whiteSpace = oldWS;\n\n wsnwOffset = 0;\n wsnwMatches = [];\n recursiveCalcNoWrapOffsetsForLine(el, false);\n\n // Restore temporary whitespace setting to recalc width\n el.style.whiteSpace = \"nowrap\";\n } else {\n // For all other lines, update the offsets for current line\n // 1. Ignore matches less than offset\n // 2. Subtract offset from remaining matches\n const newMatches = [];\n wsnwMatches.forEach((match) => {\n if (match.start > lineCharOffset) {\n newMatches.push({ start: match.start - lineCharOffset, end: match.end - lineCharOffset });\n }\n });\n wsnwMatches = newMatches;\n }\n }\n\n /**\n * Strip balance-text tags from an element inserted in previous run\n *\n * @param {Node} el - the element to act on\n */\n function removeTags(el) {\n // Remove soft-hyphen breaks\n let brs = el.querySelectorAll('br[data-owner=\"balance-text-hyphen\"]');\n forEach(brs, (br) => {\n br.outerHTML = \"\";\n });\n\n // Replace other breaks with whitespace\n brs = el.querySelectorAll('br[data-owner=\"balance-text\"]');\n forEach(brs, (br) => {\n br.outerHTML = \" \";\n });\n\n // Restore hyphens inserted for soft-hyphens\n let spans = el.querySelectorAll('span[data-owner=\"balance-text-softhyphen\"]');\n if (spans.length > 0) {\n forEach(spans, (span) => {\n const textNode = document.createTextNode(\"\\u00ad\");\n span.parentNode.insertBefore(textNode, span);\n span.parentNode.removeChild(span);\n });\n }\n\n // Remove spans inserted for justified text\n spans = el.querySelectorAll('span[data-owner=\"balance-text-justify\"]');\n if (spans.length > 0) {\n let txt = \"\";\n forEach(spans, (span) => {\n txt += span.textContent;\n span.parentNode.removeChild(span);\n });\n el.innerHTML = txt;\n }\n }\n\n /**\n * Checks to see if we should justify the balanced text with the\n * element based on the textAlign property in the computed CSS\n *\n * @param {Node} el - element to check\n * @return {boolean}\n */\n const isJustified = function (el) {\n const style = el.currentStyle || window.getComputedStyle(el, null);\n return (style.textAlign === \"justify\");\n };\n\n /**\n * Add whitespace after words in text to justify the string to\n * the specified size.\n * @param {Node} el - the element to justify\n * @param {string} txt - text string\n * @param {number} conWidth - container width\n * @return {string} Justified text\n */\n function justify(el, txt, conWidth) {\n txt = txt.trim();\n const words = txt.split(\" \").length;\n txt = `${txt} `;\n\n // if we don't have at least 2 words, no need to justify.\n if (words < 2) {\n return txt;\n }\n\n // Find width of text in the DOM\n const tmp = document.createElement(\"span\");\n tmp.innerHTML = txt;\n el.appendChild(tmp);\n const size = tmp.offsetWidth;\n tmp.parentNode.removeChild(tmp);\n\n // Figure out our word spacing and return the element\n const wordSpacing = Math.floor((conWidth - size) / (words - 1));\n tmp.style.wordSpacing = `${wordSpacing}px`;\n tmp.setAttribute(\"data-owner\", \"balance-text-justify\");\n\n const div = document.createElement(\"div\");\n div.appendChild(tmp);\n return div.innerHTML;\n }\n\n /**\n * Returns true iff char at index is a break char outside of HTML < > tags.\n * Break char can be: whitespace (except non-breaking-space: u00a0),\n * hypen, emdash (u2014), endash (u2013), or soft-hyphen (u00ad).\n *\n * @param {string} txt - the text to check\n * @param {number} index - the index of the character to check\n * @return {boolean}\n */\n function isBreakChar(txt, index) {\n const re = /([^\\S\\u00a0]|-|\\u2014|\\u2013|\\u00ad)(?![^<]*>)/g;\n let match;\n\n if (!breakMatches) {\n // Only calc break matches once per line\n breakMatches = [];\n match = re.exec(txt);\n while (match !== null) {\n if (!isWhiteSpaceNoWrap(match.index)) {\n breakMatches.push(match.index);\n }\n match = re.exec(txt);\n }\n }\n\n return breakMatches.indexOf(index) !== -1;\n }\n\n /**\n * In the current implementation, an index is a break\n * opportunity in txt iff it is:\n * - 0 or txt.length\n * - index of a non-whitespace char immediately preceded by a\n * whitespace, hyphen, soft-hyphen, em-dash, or en-dash char.\n *\n * Thus, it doesn't honour \"white-space\" or any other Unicode\n * line-breaking classes.)\n *\n * @precondition 0 <= index && index <= txt.length\n *\n * @param {string} txt - the text to check\n * @param {number} index - the index to check\n * @return {boolean}\n */\n function isBreakOpportunity(txt, index) {\n return ((index === 0) || (index === txt.length) ||\n (isBreakChar(txt, index - 1) && !isBreakChar(txt, index)));\n }\n\n /**\n * Finds the first break opportunity (@see isBreakOpportunity)\n * in txt that's both after-or-equal-to index c in the direction dir\n * and resulting in line width equal to or past clamp(desWidth,\n * 0, conWidth) in direction dir. Sets ret.index and ret.width\n * to the corresponding index and line width (from the start of\n * txt to ret.index).\n *\n * @param {Node} el - element\n * @param {string} txt - text string\n * @param {number} conWidth - container width\n * @param {number} desWidth - desired width\n * @param {number} dir - direction (-1 or +1)\n * @param {number} c - char index (0 <= c && c <= txt.length)\n * @param {Object} ret - return {index: {number}, width: {number}} of previous/next break\n */\n function findBreakOpportunity(el, txt, conWidth, desWidth, dir, c, ret) {\n let w;\n\n if (txt && typeof txt === \"string\") {\n for (;;) {\n while (!isBreakOpportunity(txt, c)) {\n c += dir;\n }\n\n el.innerHTML = txt.substr(0, c);\n w = el.offsetWidth;\n\n if (dir < 0) {\n if ((w <= desWidth) || (w <= 0) || (c === 0)) {\n break;\n }\n } else if ((desWidth <= w) || (conWidth <= w) || (c === txt.length)) {\n break;\n }\n\n c += dir;\n }\n }\n ret.index = c;\n ret.width = w;\n }\n\n /**\n * Detects the width of a non-breaking space character, given the height of\n * the element with no-wrap applied.\n *\n * @param {Node} el - element\n * @param {number} h - height\n * @return {number}\n */\n function getSpaceWidth(el, h) {\n const container = document.createElement(\"div\");\n\n container.style.display = \"block\";\n container.style.position = \"absolute\";\n container.style.bottom = 0;\n container.style.right = 0;\n container.style.width = 0;\n container.style.height = 0;\n container.style.margin = 0;\n container.style.padding = 0;\n container.style.visibility = \"hidden\";\n container.style.overflow = \"hidden\";\n\n const space = document.createElement(\"span\");\n\n space.style.fontSize = \"2000px\";\n space.innerHTML = \" \";\n\n container.appendChild(space);\n\n el.appendChild(container);\n\n const dims = space.getBoundingClientRect();\n container.parentNode.removeChild(container);\n\n const spaceRatio = dims.height / dims.width;\n\n return (h / spaceRatio);\n }\n\n /**\n * Get a list of elements regardless of input\n *\n * @param {string|Node|Array-like} elements - The selector to query, one or more elements\n * @return {Array<{Node}>}\n */\n function getElementsList(elements) {\n if (!elements) {\n return [];\n }\n\n // is selector\n if (typeof elements === \"string\") {\n return document.querySelectorAll(elements);\n }\n\n // is single element\n if (elements.tagName && elements.querySelectorAll) {\n return [elements];\n }\n\n return elements;\n }\n\n /**\n * When a browser has native support for the text-wrap property,\n * the text balanceText plugin will let the browser handle it natively,\n * otherwise it will apply its own text balancing code.\n *\n * @param {string|Node|Array-like} elements - the list of elements to balance\n */\n function balanceText(elements) {\n forEach(getElementsList(elements), (el) => {\n // In a lower level language, this algorithm takes time\n // comparable to normal text layout other than the fact\n // that we do two passes instead of one, so we should\n // be able to do without this limit.\n const maxTextWidth = 5000;\n\n // strip balance-text generated tags\n removeTags(el);\n\n // save settings\n const oldWS = el.style.whiteSpace;\n const oldFloat = el.style.float;\n const oldDisplay = el.style.display;\n const oldPosition = el.style.position;\n const oldLH = el.style.lineHeight;\n\n // remove line height before measuring container size\n el.style.lineHeight = \"normal\";\n\n const containerWidth = el.offsetWidth;\n const containerHeight = el.offsetHeight;\n\n // temporary settings\n el.style.whiteSpace = \"nowrap\";\n el.style.float = \"none\";\n el.style.display = \"inline\";\n el.style.position = \"static\";\n\n let nowrapWidth = el.offsetWidth;\n const nowrapHeight = el.offsetHeight;\n\n // An estimate of the average line width reduction due\n // to trimming trailing space that we expect over all\n // lines other than the last.\n const spaceWidth = ((oldWS === \"pre-wrap\") ? 0 : getSpaceWidth(el, nowrapHeight));\n\n if (containerWidth > 0 && // prevent divide by zero\n nowrapWidth > containerWidth && // text is more than 1 line\n nowrapWidth < maxTextWidth) { // text is less than arbitrary limit (make this a param?)\n let remainingText = el.innerHTML;\n let newText = \"\";\n let lineText = \"\";\n const shouldJustify = isJustified(el);\n const totLines = Math.round(containerHeight / nowrapHeight);\n let remLines = totLines;\n let lineCharOffset = 0;\n\n // loop vars\n let desiredWidth, guessIndex, le, ge, splitIndex, isHyphen, isSoftHyphen;\n\n // Determine where to break:\n while (remLines > 1) {\n // clear whitespace match cache for each line\n breakMatches = null;\n\n // Must calc white-space:nowrap offsets before first call to findBreakOpportunity()\n calcNoWrapOffsetsForLine(el, oldWS, lineCharOffset);\n\n desiredWidth = Math.round((nowrapWidth + spaceWidth) / remLines - spaceWidth);\n\n // Guessed char index\n guessIndex = Math.round((remainingText.length + 1) / remLines) - 1;\n\n le = new NextWS_params();\n\n // Find a breaking space somewhere before (or equal to) desired width,\n // not necessarily the closest to the desired width.\n findBreakOpportunity(el, remainingText, containerWidth, desiredWidth, -1, guessIndex, le);\n\n // Find first breaking char after (or equal to) desired width.\n ge = new NextWS_params();\n guessIndex = le.index;\n findBreakOpportunity(el, remainingText, containerWidth, desiredWidth, +1, guessIndex, ge);\n\n // Find first breaking char before (or equal to) desired width.\n le.reset();\n guessIndex = ge.index;\n findBreakOpportunity(el, remainingText, containerWidth, desiredWidth, -1, guessIndex, le);\n\n // Find closest string to desired length\n if (le.index === 0) {\n splitIndex = ge.index;\n } else if ((containerWidth < ge.width) || (le.index === ge.index)) {\n splitIndex = le.index;\n } else {\n splitIndex = ((Math.abs(desiredWidth - le.width) < Math.abs(ge.width - desiredWidth))\n ? le.index\n : ge.index);\n }\n\n // Break string\n lineText = remainingText.substr(0, splitIndex).replace(/\\s$/, \"\");\n\n isSoftHyphen = Boolean(lineText.match(/\\u00ad$/));\n if (isSoftHyphen) {\n // Replace soft-hyphen causing break with explicit hyphen\n lineText = lineText.replace(/\\u00ad$/, '-');\n }\n\n if (shouldJustify) {\n newText += justify(el, lineText, containerWidth);\n } else {\n newText += lineText;\n isHyphen = isSoftHyphen || Boolean(lineText.match(/(-|\\u2014|\\u2013)$/));\n newText += isHyphen ? '
'\n : '
';\n }\n remainingText = remainingText.substr(splitIndex);\n lineCharOffset = splitIndex;\n\n // update counters\n remLines--;\n el.innerHTML = remainingText;\n nowrapWidth = el.offsetWidth;\n }\n\n if (shouldJustify) {\n el.innerHTML = newText + justify(el, remainingText, containerWidth);\n } else {\n el.innerHTML = newText + remainingText;\n }\n }\n\n // restore settings\n el.style.whiteSpace = oldWS;\n el.style.float = oldFloat;\n el.style.display = oldDisplay;\n el.style.position = oldPosition;\n el.style.lineHeight = oldLH;\n });\n }\n\n /**\n * Call the balanceText plugin on elements that it's watching.\n */\n function updateWatched() {\n const selectors = watching.sel.join(\",\");\n const selectedElements = getElementsList(selectors);\n const elements = Array.prototype.concat.apply(watching.el, selectedElements);\n balanceText(elements);\n }\n\n /**\n * Initialize the events for which to re-apply BalanceText. They are:\n * - Document ready\n * - Document full load\n * - Window resize\n */\n function initHandlers() {\n if (handlersInitialized) {\n return;\n }\n\n // Apply on DOM ready\n ready(updateWatched);\n\n // Reapply on full load\n window.addEventListener(\"load\", updateWatched);\n\n // Reapply on resize\n window.addEventListener(\"resize\", debounce(updateWatched));\n\n handlersInitialized = true;\n }\n\n /**\n * Apply the BalanceText routine on the document and watch the list\n * of elements. On window resize, re-apply BalanceText to the given elements\n *\n * @param {string|Node|Array-like} elements - the elements to watch after applying BalanceText\n */\n function balanceTextAndWatch(elements) {\n if (typeof elements === \"string\") {\n watching.sel.push(elements);\n } else {\n forEach(getElementsList(elements), (el) => {\n watching.el.push(el);\n });\n }\n\n initHandlers();\n updateWatched();\n }\n\n /**\n * Stop watching elements\n *\n * @param {string|Node|Array-like} elements\n */\n function unwatch(elements) {\n if (typeof elements === \"string\") {\n watching.sel = watching.sel.filter(el => el !== elements);\n } else {\n elements = getElementsList(elements);\n watching.el = watching.el.filter(el => elements.indexOf(el) === -1);\n }\n }\n\n /**\n * Treat this app as a polyfill. Watch for changes to the .balance-text selector\n */\n function polyfill() {\n if (polyfilled) {\n return;\n }\n\n watching.sel.push(\".balance-text\");\n initHandlers();\n polyfilled = true;\n }\n\n /**\n * Public interface\n *\n * @param {string|Node|Array-like} elements - elements to balance\n * @param {Object} options - processing options\n * - {boolean} watch - watch elements for resize\n */\n function publicInterface(elements, options) {\n if (!elements) {\n // empty call means polyfill (watch for changes)\n polyfill();\n } else if (options && options.watch === true) {\n balanceTextAndWatch(elements);\n } else if (options && options.watch === false) {\n unwatch(elements);\n } else {\n balanceText(elements);\n }\n }\n\n publicInterface.updateWatched = updateWatched;\n\n if (hasTextWrap()) {\n noop.updateWatched = noop;\n return noop;\n }\n return publicInterface;\n}));\n","/**\n * cuid.js\n * Collision-resistant UID generator for browsers and node.\n * Sequential for fast db lookups and recency sorting.\n * Safe for element IDs and server-side lookups.\n *\n * Extracted from CLCTR\n *\n * Copyright (c) Eric Elliott 2012\n * MIT License\n */\n\nvar fingerprint = require('./lib/fingerprint.js');\nvar pad = require('./lib/pad.js');\nvar getRandomValue = require('./lib/getRandomValue.js');\n\nvar c = 0,\n blockSize = 4,\n base = 36,\n discreteValues = Math.pow(base, blockSize);\n\nfunction randomBlock () {\n return pad((getRandomValue() *\n discreteValues << 0)\n .toString(base), blockSize);\n}\n\nfunction safeCounter () {\n c = c < discreteValues ? c : 0;\n c++; // this is not subliminal\n return c - 1;\n}\n\nfunction cuid () {\n // Starting with a lowercase letter makes\n // it HTML element ID friendly.\n var letter = 'c', // hard-coded allows for sequential access\n\n // timestamp\n // warning: this exposes the exact date and time\n // that the uid was created.\n timestamp = (new Date().getTime()).toString(base),\n\n // Prevent same-machine collisions.\n counter = pad(safeCounter().toString(base), blockSize),\n\n // A few chars to generate distinct ids for different\n // clients (so different computers are far less\n // likely to generate the same id)\n print = fingerprint(),\n\n // Grab some more chars from Math.random()\n random = randomBlock() + randomBlock();\n\n return letter + timestamp + counter + print + random;\n}\n\ncuid.slug = function slug () {\n var date = new Date().getTime().toString(36),\n counter = safeCounter().toString(36).slice(-4),\n print = fingerprint().slice(0, 1) +\n fingerprint().slice(-1),\n random = randomBlock().slice(-2);\n\n return date.slice(-2) +\n counter + print + random;\n};\n\ncuid.isCuid = function isCuid (stringToCheck) {\n if (typeof stringToCheck !== 'string') return false;\n if (stringToCheck.startsWith('c')) return true;\n return false;\n};\n\ncuid.isSlug = function isSlug (stringToCheck) {\n if (typeof stringToCheck !== 'string') return false;\n var stringLength = stringToCheck.length;\n if (stringLength >= 7 && stringLength <= 10) return true;\n return false;\n};\n\ncuid.fingerprint = fingerprint;\n\nmodule.exports = cuid;\n","var pad = require('./pad.js');\n\nvar env = typeof window === 'object' ? window : self;\nvar globalCount = Object.keys(env).length;\nvar mimeTypesLength = navigator.mimeTypes ? navigator.mimeTypes.length : 0;\nvar clientId = pad((mimeTypesLength +\n navigator.userAgent.length).toString(36) +\n globalCount.toString(36), 4);\n\nmodule.exports = function fingerprint () {\n return clientId;\n};\n","\nvar getRandomValue;\n\nvar crypto = typeof window !== 'undefined' &&\n (window.crypto || window.msCrypto) ||\n typeof self !== 'undefined' &&\n self.crypto;\n\nif (crypto) {\n var lim = Math.pow(2, 32) - 1;\n getRandomValue = function () {\n return Math.abs(crypto.getRandomValues(new Uint32Array(1))[0] / lim);\n };\n} else {\n getRandomValue = Math.random;\n}\n\nmodule.exports = getRandomValue;\n","module.exports = function pad (num, size) {\n var s = '000000000' + num;\n return s.substr(s.length - size);\n};\n","/**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear' \n * that is a function which will clear the timer to prevent previously scheduled executions. \n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\nfunction debounce(func, wait, immediate){\n var timeout, args, context, timestamp, result;\n if (null == wait) wait = 100;\n\n function later() {\n var last = Date.now() - timestamp;\n\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n } else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n };\n\n var debounced = function(){\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout) timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n\n return result;\n };\n\n debounced.clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n \n debounced.flush = function() {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n \n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n return debounced;\n};\n\n// Adds compatibility for ES modules\ndebounce.debounce = debounce;\n\nmodule.exports = debounce;\n","module.exports = require('./src/get-element-tag')\n","module.exports = require('./src/html-tagged-template-literal.js')\n","/**\n * Creates a valid custom element name that is versioned (major)\n */\nfunction getElementTag(name, version) {\n const formattedVersion = version ? `-v${version.split('.')[0]}` : ''\n return name + formattedVersion\n}\n\nmodule.exports.getElementTag = getElementTag\n","/**\n * Concats a template literal and interpolates values correctly, as well as removes formatting whitespace and HTML comments\n */\nfunction html(strings, ...interpolations) {\n let str = strings[0]\n for (let i = 0; i < interpolations.length; i++) {\n str += interpolations[i]\n str += strings[i + 1]\n }\n\n return str.replace(/>\\s+<')\n}\n\nmodule.exports.html = html\n","import classApplyDescriptorGet from \"./classApplyDescriptorGet.js\";\nimport classPrivateFieldGet2 from \"./classPrivateFieldGet2.js\";\nfunction _classPrivateFieldGet(e, t) {\n var r = classPrivateFieldGet2(t, e);\n return classApplyDescriptorGet(e, r);\n}\nexport { _classPrivateFieldGet as default };","function _classApplyDescriptorGet(e, t) {\n return t.get ? t.get.call(e) : t.value;\n}\nexport { _classApplyDescriptorGet as default };","import assertClassBrand from \"./assertClassBrand.js\";\nfunction _classPrivateFieldGet2(s, a) {\n return s.get(assertClassBrand(s, a));\n}\nexport { _classPrivateFieldGet2 as default };","function _assertClassBrand(e, t, n) {\n if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n throw new TypeError(\"Private element is not present on this object\");\n}\nexport { _assertClassBrand as default };","import classApplyDescriptorSet from \"./classApplyDescriptorSet.js\";\nimport classPrivateFieldGet2 from \"./classPrivateFieldGet2.js\";\nfunction _classPrivateFieldSet(e, t, r) {\n var s = classPrivateFieldGet2(t, e);\n return classApplyDescriptorSet(e, s, r), r;\n}\nexport { _classPrivateFieldSet as default };","function _classApplyDescriptorSet(e, t, l) {\n if (t.set) t.set.call(e, l);else {\n if (!t.writable) throw new TypeError(\"attempted to set read only private field\");\n t.value = l;\n }\n}\nexport { _classApplyDescriptorSet as default };","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _defineProperty from '@babel/runtime/helpers/defineProperty';\n\n/* eslint-disable compat/compat */\nfunction getDefaultRoot() {\n /*\n Use document if supported\n IntersectionObserver will otherwise default to top level document,\n and IntersectionObserver will not work as expected in an iframe.\n https://github.com/w3c/IntersectionObserver/issues/372\n */\n\n /*\n Safari does not throw error on root: document, but does not trigger events as expected\n returning null for now until better feature detection is possible\n */\n return null;\n\n /*\n try {\n // eslint-disable-next-line no-new\n new IntersectionObserver(() => {}, { root: document })\n return document\n } catch (e) {\n return null\n }\n */\n}\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar defaultConfig = {\n rootMargin: '0px 0px 0px 0px',\n threshold: [0, 0.5, 1],\n root: getDefaultRoot()\n};\nclass ElementIntersectionObserver {\n constructor(elements, onChange, config) {\n _defineProperty(this, \"intersections\", void 0);\n _defineProperty(this, \"elements\", void 0);\n this.elements = elements.slice(0);\n this.intersections = elements.map(target => ({\n target,\n isIntersecting: false,\n ratio: null\n }));\n this.intersectionObserver = new IntersectionObserver(entries => {\n var intersections = this.intersections.slice(0);\n entries.forEach(entry => {\n var idx = elements.indexOf(entry.target);\n intersections.splice(idx, 1, {\n target: entry.target,\n isIntersecting: entry.isIntersecting,\n ratio: entry.intersectionRatio\n });\n });\n this.intersections = intersections;\n onChange(this.intersections);\n }, _objectSpread(_objectSpread({}, defaultConfig), config));\n elements.forEach(elm => this.intersectionObserver.observe(elm));\n }\n disconnect() {\n // Unregister trigger elements\n this.elements.forEach(elm => this.intersectionObserver.unobserve(elm));\n\n // Disconnect intersection observer\n this.intersectionObserver.disconnect();\n }\n}\n\nfunction toggleAttribute(el, name, boolValue) {\n if (!el) {\n return;\n }\n var nextValue;\n if (typeof boolValue !== 'undefined') {\n nextValue = !!boolValue;\n } else {\n nextValue = el.hasAttribute(name);\n }\n if (nextValue) {\n el.setAttribute(name, '');\n } else {\n el.removeAttribute(name);\n }\n}\nfunction setAttribute(el, name, nextValue) {\n if (!el) {\n return;\n }\n if (nextValue) {\n el.setAttribute(name, nextValue);\n } else {\n el.removeAttribute(name);\n }\n}\nvar closest = (() => {\n var proto = typeof window === 'undefined' ? {} : window.Element.prototype;\n var match = proto.matches || proto.msMatchesSelector || proto.webkitMatchesSelector;\n if (proto.closest) {\n return (el, css) => el.closest(css);\n } else {\n return (el, css) => {\n for (; el; el = el.parentElement) if (match.call(el, css)) return el;\n return null;\n };\n }\n})();\nfunction addStyle(nodeName, css) {\n var key = \"style-\".concat(nodeName.toLowerCase());\n var min = css.replace(/\\/\\*[^!][^*]*\\*\\//g, '').replace(/\\s*(^|[:;,{}]|$)\\s*/g, '$1');\n document.getElementById(key) || document.head.insertAdjacentHTML('afterbegin', \"\"));\n}\nfunction toArray(nodeList) {\n return [].slice.call(nodeList);\n}\nfunction dispatchEvent(element, name) {\n var detail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var ignore = \"prevent_recursive_dispatch_maximum_callstack\".concat(name);\n var event;\n if (element[ignore]) return true;\n // We are already processing this event, so skip sending a new one\n else element[ignore] = true; // Add name to dispatching ignore\n\n if (typeof window.CustomEvent === 'function') {\n event = new window.CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail\n });\n } else {\n event = document.createEvent('CustomEvent');\n event.initCustomEvent(name, true, true, detail);\n }\n // IE reports incorrect event.defaultPrevented\n // but correct return value on element.dispatchEvent\n var result = element.dispatchEvent(event);\n element[ignore] = null; // Remove name from dispatching ignore\n\n return result; // Follow W3C standard for return value\n}\n\nfunction easeOutQuint(t) {\n return 1 + --t * t * t * t * t;\n}\nclass VerticalScroll {\n constructor(container) {\n _defineProperty(this, \"container\", void 0);\n this.container = container;\n }\n cancel() {\n this._cancelled = true;\n }\n to(top) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var from = this.container.scrollTop;\n var distance = top - from;\n var startTime = null;\n var loop = currentTime => {\n if (this._cancelled) {\n return;\n }\n if (!startTime) {\n startTime = currentTime - 1;\n }\n var timeElapsed = currentTime - startTime;\n if (timeElapsed < duration) {\n this.container.scrollTop = from + distance * easeOutQuint(timeElapsed / duration);\n window.requestAnimationFrame(loop);\n } else {\n this.container.scrollTop = top;\n callback && callback();\n }\n };\n\n // eslint-disable-next-line compat/compat\n window.requestAnimationFrame(loop);\n }\n}\nclass HorizontalScroll {\n constructor(container) {\n _defineProperty(this, \"container\", void 0);\n this.container = container;\n }\n cancel() {\n this._cancelled = true;\n }\n to(left) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n var callback = arguments.length > 2 ? arguments[2] : undefined;\n var from = this.container.scrollLeft;\n var distance = left - from;\n var startTime = null;\n var loop = currentTime => {\n if (this._cancelled) {\n return;\n }\n if (!startTime) {\n startTime = currentTime - 1;\n }\n var timeElapsed = currentTime - startTime;\n if (timeElapsed < duration) {\n this.container.scrollLeft = from + distance * easeOutQuint(timeElapsed / duration);\n window.requestAnimationFrame(loop);\n } else {\n this.container.scrollLeft = left;\n callback && callback();\n }\n };\n\n // eslint-disable-next-line compat/compat\n window.requestAnimationFrame(loop);\n }\n}\n\nfunction testReducedMotion() {\n if (typeof window !== 'undefined') {\n return !!window.matchMedia && window.matchMedia('(prefers-reduced-motion)').matches;\n }\n return false;\n}\n\nvar MAX_SAFE_INTEGER = 9007199254740991;\nfunction withinRange(current) {\n var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var stop = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : MAX_SAFE_INTEGER;\n return current >= start && current <= stop;\n}\nfunction withinStops(currentTime, stops, targetStop) {\n var nrOfStops = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n var uniqueStops = stops.filter(unique);\n var targetTime = stops[targetStop];\n var prevTime = uniqueStops[uniqueStops.indexOf(targetTime) - nrOfStops];\n var nextTime = uniqueStops[uniqueStops.indexOf(targetTime) + nrOfStops];\n return withinRange(currentTime, prevTime, nextTime);\n}\nfunction unique(value, index, self) {\n return self.indexOf(value) === index;\n}\n\n/*\n * 'loading=\"lazy\"' is defined in terms of IntersectionObserver and the initial root.\n * As a result images with 'loading=\"lazy\"' inside a scroll container will not load\n * until they at least have one pixel visible in the viewport.\n *\n * This will hopefully fixed in a future version of the spec:\n * https://github.com/w3c/IntersectionObserver/issues/431\n *\n * scroll-container-lazy-load observes images and a scroll container.\n * Once images are close to intersecting it will change 'loading=\"lazy\"' to 'loading=\"eager\"'.\n * */\nfunction loadImage(image) {\n if (image.loading === 'lazy') {\n image.loading = 'eager';\n }\n}\nfunction connectScrollContainerLazyLoad(container, images) {\n var containerIntersecting = false;\n var deferredImages = [];\n\n // eslint-disable-next-line compat/compat\n var containerObserver = new IntersectionObserver(entries => {\n containerIntersecting = entries === null || entries === void 0 ? void 0 : entries[0].isIntersecting;\n if (containerIntersecting) {\n deferredImages.forEach(image => loadImage(image));\n deferredImages = [];\n }\n }, {\n root: getDefaultRoot(),\n threshold: [0.0]\n });\n containerObserver.observe(container);\n\n // eslint-disable-next-line compat/compat\n var imageObserver = new IntersectionObserver(entries => {\n for (var entry of entries) {\n if (entry.isIntersecting) {\n var image = entry.target;\n imageObserver.unobserve(image);\n if (containerIntersecting) {\n loadImage(image);\n } else {\n /* Defer loading of if the container is not intersecting the viewport */\n deferredImages.push(image);\n }\n }\n }\n }, {\n root: container,\n rootMargin: '300px',\n threshold: 0.0\n });\n for (var image of images) {\n imageObserver.observe(image);\n }\n return () => {\n containerObserver.disconnect();\n imageObserver.disconnect();\n };\n}\n\nfunction debounce(fn, delay) {\n var timeout;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n clearTimeout(timeout);\n timeout = setTimeout(() => fn(...args), delay);\n };\n}\n\nexport { ElementIntersectionObserver, HorizontalScroll, VerticalScroll, addStyle, closest, connectScrollContainerLazyLoad, debounce, dispatchEvent, setAttribute, testReducedMotion, toArray, toggleAttribute, withinRange, withinStops };\n//# sourceMappingURL=index.esm.js.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","__webpack_require__.amdO = {};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + ({\"199\":\"dh-karthistorie\",\"667\":\"dh-stegvis-lottie\"}[chunkId] || chunkId) + \"-chunk-\" + {\"199\":\"0813fb78909452efc7fd\",\"529\":\"9662709929211e80902a\",\"667\":\"ccdaee2133a10bfc5b0e\"}[chunkId] + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + \"a829592c9123ececa37f\" + \".css\";\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.p = \"https://static.nrk.no/dh/module/introscroll/static/\";","if (typeof document === \"undefined\") return;\nvar createStylesheet = (chunkId, fullhref, oldTag, resolve, reject) => {\n\tvar linkTag = document.createElement(\"link\");\n\n\tlinkTag.rel = \"stylesheet\";\n\tlinkTag.type = \"text/css\";\n\tif (__webpack_require__.nc) {\n\t\tlinkTag.nonce = __webpack_require__.nc;\n\t}\n\tvar onLinkComplete = (event) => {\n\t\t// avoid mem leaks.\n\t\tlinkTag.onerror = linkTag.onload = null;\n\t\tif (event.type === 'load') {\n\t\t\tresolve();\n\t\t} else {\n\t\t\tvar errorType = event && event.type;\n\t\t\tvar realHref = event && event.target && event.target.href || fullhref;\n\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + errorType + \": \" + realHref + \")\");\n\t\t\terr.name = \"ChunkLoadError\";\n\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n\t\t\terr.type = errorType;\n\t\t\terr.request = realHref;\n\t\t\tif (linkTag.parentNode) linkTag.parentNode.removeChild(linkTag)\n\t\t\treject(err);\n\t\t}\n\t}\n\tlinkTag.onerror = linkTag.onload = onLinkComplete;\n\tlinkTag.href = fullhref;\n\n\n\tif (oldTag) {\n\t\toldTag.parentNode.insertBefore(linkTag, oldTag.nextSibling);\n\t} else {\n\t\tdocument.head.appendChild(linkTag);\n\t}\n\treturn linkTag;\n};\nvar findStylesheet = (href, fullhref) => {\n\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n\tfor(var i = 0; i < existingLinkTags.length; i++) {\n\t\tvar tag = existingLinkTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return tag;\n\t}\n\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n\tfor(var i = 0; i < existingStyleTags.length; i++) {\n\t\tvar tag = existingStyleTags[i];\n\t\tvar dataHref = tag.getAttribute(\"data-href\");\n\t\tif(dataHref === href || dataHref === fullhref) return tag;\n\t}\n};\nvar loadStylesheet = (chunkId) => {\n\treturn new Promise((resolve, reject) => {\n\t\tvar href = __webpack_require__.miniCssF(chunkId);\n\t\tvar fullhref = __webpack_require__.p + href;\n\t\tif(findStylesheet(href, fullhref)) return resolve();\n\t\tcreateStylesheet(chunkId, fullhref, null, resolve, reject);\n\t});\n}\n// object to store loaded CSS chunks\nvar installedCssChunks = {\n\t792: 0\n};\n\n__webpack_require__.f.miniCss = (chunkId, promises) => {\n\tvar cssChunks = {\"529\":1};\n\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n\t\tpromises.push(installedCssChunks[chunkId] = loadStylesheet(chunkId).then(() => {\n\t\t\tinstalledCssChunks[chunkId] = 0;\n\t\t}, (e) => {\n\t\t\tdelete installedCssChunks[chunkId];\n\t\t\tthrow e;\n\t\t}));\n\t}\n};\n\n// no hmr\n\n// no prefetching\n\n// no preloaded","function t(){var t,e=navigator.userAgent||navigator.vendor||window.opera,i=e.toLowerCase();return!!e&&(!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)&&(t=/fban|fbav|instagram|firefox|opera|fxios/),t&&t.test(i))}var e={ssrOrientation:null,mode:\"max\"},i=function(t){var i,n,o;void 0===t&&(t={}),this.destroyed=!1,this.mounted=!1,this.listeners=[],this.value={portrait:0,landscape:0},this.opts=Object.assign({},e,t),this.orientation=this.getOrientation(),this.update(),this.handleUpdate=this.handleUpdate.bind(this),this.throttledUpdate=(i=this.handleUpdate,function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=this;o?(clearTimeout(n),n=setTimeout(function(){Date.now()-o>=100&&(i.apply(r,t),o=Date.now())},100-(Date.now()-o))):(i.apply(r,t),o=Date.now())})};function n(){var t=new i;return t.listen(function(t){try{document.getElementsByTagName(\"html\")[0].style.setProperty(\"--dh-vh\",t+\"px\")}catch(t){console.error(t)}}),t}function o(){return\"Dh Vh\"}i.prototype.mount=function(){\"undefined\"!=typeof window&&(window.addEventListener(\"resize\",this.throttledUpdate),window.addEventListener(\"orientationchange\",this.handleUpdate)),this.mounted=!0},i.prototype.destroy=function(){\"undefined\"!=typeof window&&(window.removeEventListener(\"resize\",this.throttledUpdate),window.removeEventListener(\"orientationchange\",this.handleUpdate)),this.mounted=!1},i.prototype.getOrientation=function(){return\"undefined\"!=typeof window?window.innerHeight>window.innerWidth?\"portrait\":\"landscape\":this.opts.ssrOrientation},i.prototype.handleUpdate=function(){this.update()},i.prototype.listen=function(t){var e=this;return this.listeners.push(t),!1===this.mounted&&this.mount(),function(){e.listeners=e.listeners.filter(function(e){return e!==t})}},i.prototype.emit=function(){var t=this,e=this.getVh(),i=this.getHeight();this.listeners.forEach(function(n){return n(e,i,t.orientation)})},i.prototype.getHeight=function(){return this.orientation?this.value[this.orientation]:0},i.prototype.getVh=function(){return this.orientation?this.value[this.orientation]/100:0},i.prototype.update=function(){var t=this.orientation;if(this.orientation=this.getOrientation(),this.orientation){var e=this.value[this.orientation],i=window.innerHeight;t!==this.orientation?(i>e&&(this.value[this.orientation]=i),this.emit()):i>e&&(this.value[this.orientation]=i,this.emit())}};export{o as test,t as checkHasVhBug,n as fixVhBug};\n//# sourceMappingURL=index.mjs.map\n","import { checkHasVhBug, fixVhBug } from '@nrk/dh-vh'\n\nif (checkHasVhBug()) {\n fixVhBug()\n}\n","import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';\nimport _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';\nimport _defineProperty from '@babel/runtime/helpers/defineProperty';\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nvar dedupeId = 0;\n\n/**\n * @template {HTMLElement} BaseClass\n * @param {(base: BaseClass) => BaseClass} mixin\n */\nfunction dedupeMixin(mixin) {\n var mixinId = dedupeId++;\n return base => {\n var _base$_appliedMixins, _base$_appliedMixins2;\n if ((_base$_appliedMixins = base._appliedMixins) !== null && _base$_appliedMixins !== void 0 && _base$_appliedMixins[mixinId]) {\n return base;\n }\n var extended = mixin(base);\n extended._appliedMixins = _objectSpread({}, (_base$_appliedMixins2 = base._appliedMixins) !== null && _base$_appliedMixins2 !== void 0 ? _base$_appliedMixins2 : {});\n extended._appliedMixins[mixinId] = true;\n return extended;\n };\n}\n\nfunction _classPrivateMethodInitSpec$1(obj, privateSet) { _checkPrivateRedeclaration$1(obj, privateSet); privateSet.add(obj); }\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration$1(obj, privateMap); privateMap.set(obj, value); }\nfunction _checkPrivateRedeclaration$1(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _classPrivateMethodGet$1(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError(\"attempted to get private field on non-instance\"); } return fn; }\nvar VIEWPORT_POSITION_ATTR = 'viewport-position';\nvar VIEWPORT_POSITIONS = {\n aboveViewport: 'ABOVE-VIEWPORT',\n inViewport: 'IN-VIEWPORT',\n belowViewport: 'BELOW-VIEWPORT'\n};\n\n/**\n * Check if element represents the browser viewport\n *\n * @param viewportContainer Element to check\n * @returns {boolean} True if element represents the browser viewport and not a scroll container\n */\nfunction isViewport(viewportContainer) {\n return (\n // eslint-disable-next-line compat/compat\n viewportContainer === document.scrollingElement || viewportContainer === document.documentElement\n );\n}\n\n/**\n * Custom Element mixin.\n *\n * Updates the `viewport-position` attribute according to whether the element is in the viewport or not.\n * Possible values for the attribute is `IN-VIEWPORT`, `ABOVE-VIEWPORT` and `BELOW-VIEWPORT`\n *\n * @template {HTMLElement} BaseClass\n * @param {BaseClass} Base\n */\nfunction _ViewportPositionMixin(Base) {\n var _observer, _createIntersectionObserver, _disconnectIntersectionObserver, _handleIntersectionChange;\n return _observer = /*#__PURE__*/new WeakMap(), _createIntersectionObserver = /*#__PURE__*/new WeakSet(), _disconnectIntersectionObserver = /*#__PURE__*/new WeakSet(), _handleIntersectionChange = /*#__PURE__*/new WeakMap(), class extends Base {\n constructor() {\n super(...arguments);\n _classPrivateMethodInitSpec$1(this, _disconnectIntersectionObserver);\n _classPrivateMethodInitSpec$1(this, _createIntersectionObserver);\n _classPrivateFieldInitSpec(this, _observer, {\n writable: true,\n value: void 0\n });\n _classPrivateFieldInitSpec(this, _handleIntersectionChange, {\n writable: true,\n value: _ref => {\n var [intersection] = _ref;\n if (intersection.isIntersecting) {\n if (this.viewportPosition !== VIEWPORT_POSITIONS.inViewport) {\n this.viewportPosition = VIEWPORT_POSITIONS.inViewport;\n }\n } else {\n if (!this.viewportPosition || this.viewportPosition === VIEWPORT_POSITIONS.inViewport) {\n var {\n top,\n bottom\n } = this.getBoundingClientRect();\n\n // The latest chrome reports bcr.bottom to be 0.5\n // Instead of checking that the bottom is outside the viewport\n // we check that the top of the element is above the viewport,\n // and that the bottom of the element is above the bottom of the viewport\n var isAbove = top <= 0 && bottom <= window.innerHeight;\n this.viewportPosition = isAbove ? VIEWPORT_POSITIONS.aboveViewport : VIEWPORT_POSITIONS.belowViewport;\n }\n }\n }\n });\n }\n static get observedAttributes() {\n var _super$observedAttrib;\n return [...((_super$observedAttrib = super.observedAttributes) !== null && _super$observedAttrib !== void 0 ? _super$observedAttrib : []), VIEWPORT_POSITION_ATTR];\n }\n connectedCallback() {\n var _super$connectedCallb;\n (_super$connectedCallb = super.connectedCallback) === null || _super$connectedCallb === void 0 || _super$connectedCallb.call(this);\n _classPrivateMethodGet$1(this, _createIntersectionObserver, _createIntersectionObserver2).call(this);\n }\n disconnectedCallback() {\n var _super$disconnectedCa;\n (_super$disconnectedCa = super.disconnectedCallback) === null || _super$disconnectedCa === void 0 || _super$disconnectedCa.call(this);\n _classPrivateMethodGet$1(this, _disconnectIntersectionObserver, _disconnectIntersectionObserver2).call(this);\n }\n /**\n * Get the viewport or the scroll container element that is used as a replacement for the viewport.\n *\n * @returns {Element|HTMLElement} viewportContainer\n */\n get viewportContainer() {\n var _document$scrollingEl;\n /*\n * Using root/document.scrollingElement to represent the viewport,\n * as this presents a unified API for scrolling for both the viewport and scrolling elements.\n * (scrollTop, scrollLeft, scrollTo)\n *\n * Some API's such as IntersectionObserver use different values for the viewport\n * (such as null and document), so take care.\n */\n\n // eslint-disable-next-line compat/compat\n return (_document$scrollingEl = document.scrollingElement) !== null && _document$scrollingEl !== void 0 ? _document$scrollingEl : document.documentElement;\n }\n\n /**\n * Get the intersection root\n * @returns {null|Element|HTMLElement|Document}\n */\n get viewportIntersectionRoot() {\n var viewportContainer = this.viewportContainer;\n if (isViewport(viewportContainer)) {\n var _navigator, _navigator$includes;\n var isIFrame = window.location !== window.parent.location;\n var isChrome = (_navigator = navigator) === null || _navigator === void 0 || (_navigator = _navigator.userAgent) === null || _navigator === void 0 || (_navigator$includes = _navigator.includes) === null || _navigator$includes === void 0 ? void 0 : _navigator$includes.call(_navigator, 'Chrome');\n // Chrome has a bug when using document in as IntersectionObserver root: https://bugs.chromium.org/p/chromium/issues/detail?id=1420155\n if (isIFrame && !isChrome) {\n /* Use document as intersection root in iframes */\n return document;\n } else {\n return null;\n }\n } else {\n return viewportContainer;\n }\n }\n\n /**\n * Position of this element relative to the viewport.\n *\n * @type {'ABOVE-VIEWPORT' | 'IN-VIEWPORT' | 'BELOW-VIEWPORT' }\n */\n set viewportPosition(value) {\n var currentValue = this.getAttribute(VIEWPORT_POSITION_ATTR);\n if (value !== currentValue) {\n this.setAttribute(VIEWPORT_POSITION_ATTR, value);\n }\n }\n\n /**\n * Position of this element relative to the viewport.\n *\n * @type {'ABOVE-VIEWPORT' | 'IN-VIEWPORT' | 'BELOW-VIEWPORT' }\n */\n get viewportPosition() {\n return this.getAttribute(VIEWPORT_POSITION_ATTR);\n }\n };\n function _createIntersectionObserver2() {\n // eslint-disable-next-line compat/compat\n _classPrivateFieldSet(this, _observer, new IntersectionObserver(_classPrivateFieldGet(this, _handleIntersectionChange), {\n threshold: [0],\n // Intersection observer uses null or document for regular viewport\n root: this.viewportIntersectionRoot,\n // Scroll snapping elements trigger intersection when they are perfectly aligned with the screen,\n // both above and below the viewport. Using -1px as root margin to prevent intersection.\n rootMargin: '-1px 0px -1px 0px'\n }));\n _classPrivateFieldGet(this, _observer).observe(this);\n }\n function _disconnectIntersectionObserver2() {\n var _classPrivateFieldGet2, _classPrivateFieldGet3;\n (_classPrivateFieldGet2 = _classPrivateFieldGet(this, _observer)) === null || _classPrivateFieldGet2 === void 0 || _classPrivateFieldGet2.unobserve(this);\n (_classPrivateFieldGet3 = _classPrivateFieldGet(this, _observer)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.disconnect();\n }\n}\n\n/**\n * @template {HTMLElement} BaseClass\n * @param {BaseClass} Base */\nvar ViewportPositionMixin = dedupeMixin(_ViewportPositionMixin);\n\nfunction _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError(\"attempted to get private field on non-instance\"); } return fn; }\nfunction _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) { _classCheckPrivateStaticAccess(receiver, classConstructor); _classCheckPrivateStaticFieldDescriptor(descriptor, \"get\"); return _classApplyDescriptorGet(receiver, descriptor); }\nfunction _classApplyDescriptorGet(receiver, descriptor) { if (descriptor.get) { return descriptor.get.call(receiver); } return descriptor.value; }\nfunction _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) { _classCheckPrivateStaticAccess(receiver, classConstructor); _classCheckPrivateStaticFieldDescriptor(descriptor, \"set\"); _classApplyDescriptorSet(receiver, descriptor, value); return value; }\nfunction _classCheckPrivateStaticFieldDescriptor(descriptor, action) { if (descriptor === undefined) { throw new TypeError(\"attempted to \" + action + \" private static field before its declaration\"); } }\nfunction _classCheckPrivateStaticAccess(receiver, classConstructor) { if (receiver !== classConstructor) { throw new TypeError(\"Private static access of wrong provenance\"); } }\nfunction _classApplyDescriptorSet(receiver, descriptor, value) { if (descriptor.set) { descriptor.set.call(receiver, value); } else { if (!descriptor.writable) { throw new TypeError(\"attempted to set read only private field\"); } descriptor.value = value; } }\n\n/**\n * @typedef BoundAttributeConfig\n * @property {string} attribute – name of attribute to bind, or name of source and target attributes separated with a semicolon\n * @property {string | function } targets – selector string or function that takes element as argument and returns list of target elements\n */\n\n/**\n * Custom element mixin that creates a one way binding between an attribute on\n * the custom element and a given attribute on it's children.\n *\n * @template {HTMLElement} BaseClass\n * @param {BaseClass} Base\n */\nfunction _AttributeBindingMixin(Base) {\n var _class, _getTargetElements, _boundAttributes;\n return _getTargetElements = /*#__PURE__*/new WeakSet(), (_class = class AttributeBindingMixinDef extends Base {\n constructor() {\n super(...arguments);\n _classPrivateMethodInitSpec(this, _getTargetElements);\n }\n /**\n * Configure the bound attributes.\n *\n * @returns {BoundAttributeConfig[]}\n */\n static get boundAttributes() {\n return [];\n }\n static get observedAttributes() {\n var _super$observedAttrib;\n var boundAttributes = {};\n\n // Parse and store configuration for faster lookup\n for (var {\n attribute,\n targets\n } of this.boundAttributes) {\n if (typeof attribute !== 'string') {\n throw Error('Bound attribute configuration must have `attribute` property of string type');\n }\n var [sourceAttribute, targetAttribute = sourceAttribute] = attribute.split(':');\n boundAttributes[sourceAttribute] = {\n sourceAttributeName: sourceAttribute,\n targetAttributeName: targetAttribute,\n targets\n };\n }\n _classStaticPrivateFieldSpecSet(AttributeBindingMixinDef, _class, _boundAttributes, boundAttributes);\n\n // Observe bound attributes\n return [...((_super$observedAttrib = super.observedAttributes) !== null && _super$observedAttrib !== void 0 ? _super$observedAttrib : []), ...Object.keys(boundAttributes)];\n }\n attributeChangedCallback(name, oldValue, newValue) {\n var _super$attributeChang;\n (_super$attributeChang = super.attributeChangedCallback) === null || _super$attributeChang === void 0 || _super$attributeChang.call(this, name, oldValue, newValue);\n if (newValue === oldValue) {\n return;\n }\n var boundAttributes = _classStaticPrivateFieldSpecGet(AttributeBindingMixinDef, _class, _boundAttributes);\n if (name in boundAttributes) {\n var configuration = boundAttributes[name];\n var targets = configuration.targets;\n var targetElements = _classPrivateMethodGet(this, _getTargetElements, _getTargetElements2).call(this, targets);\n for (var element of targetElements) {\n if (newValue !== null) {\n element.setAttribute(configuration.targetAttributeName, newValue);\n } else {\n element.removeAttribute(configuration.targetAttributeName);\n }\n }\n }\n }\n }, _boundAttributes = {\n writable: true,\n value: void 0\n }, _class);\n function _getTargetElements2(targets) {\n if (typeof targets === 'function') {\n return targets(this);\n } else if (typeof targets === 'string') {\n return Array.from(this.querySelectorAll(targets));\n } else {\n throw new Error(\"Unsupported targets type: \".concat(typeof targets));\n }\n }\n}\n\n/**\n * @template {HTMLElement} BaseClass\n * @param {BaseClass} Base\n */\nvar AttributeBindingMixin = dedupeMixin(_AttributeBindingMixin);\n\nexport { AttributeBindingMixin, VIEWPORT_POSITIONS, VIEWPORT_POSITION_ATTR, ViewportPositionMixin };\n//# sourceMappingURL=index.esm.js.map\n","import _classPrivateFieldGet from '@babel/runtime/helpers/classPrivateFieldGet';\nimport _classPrivateFieldSet from '@babel/runtime/helpers/classPrivateFieldSet';\nimport { toArray, setAttribute, dispatchEvent, ElementIntersectionObserver } from '@nrk/dh-basis-common';\nimport { ViewportPositionMixin, AttributeBindingMixin, VIEWPORT_POSITION_ATTR, VIEWPORT_POSITIONS } from '@nrk/dh-basis-mixins';\n\nfunction _classPrivateMethodInitSpec(obj, privateSet) { _checkPrivateRedeclaration(obj, privateSet); privateSet.add(obj); }\nfunction _classPrivateFieldInitSpec(obj, privateMap, value) { _checkPrivateRedeclaration(obj, privateMap); privateMap.set(obj, value); }\nfunction _checkPrivateRedeclaration(obj, privateCollection) { if (privateCollection.has(obj)) { throw new TypeError(\"Cannot initialize the same private elements twice on an object\"); } }\nfunction _classPrivateMethodGet(receiver, privateSet, fn) { if (!privateSet.has(receiver)) { throw new TypeError(\"attempted to get private field on non-instance\"); } return fn; }\n\n/* Attributes */\n// VIEWPORT_POSITION_ATTR – Added by ViewportPositionMixin\nvar ACTIVE_BACKGROUND_ATTR = 'active-background-id';\nvar ROOT_MARGIN_ATTR = 'root-margin';\n\n/* Child attributes */\nvar BG_ID_ATTR = 'data-background-id';\nvar SHOW_BACKGROUND_ATTR = 'data-show-background';\nvar ATTRIBUTE_NAME = 'data-attribute-name';\nvar ATTRIBUTE_VALUE = 'data-attribute-value';\nvar STATE_ATTR = 'data-state';\nvar VIEWPORT_POSITION_DATA_ATTR = 'data-viewport-position';\n\n/* Events */\nvar TRIGGER_ACTIVATED_EVENT = 'dh-basis-scrollhistorie-trigger-activated';\nfunction isTrigger(elm) {\n return elm.hasAttribute(SHOW_BACKGROUND_ATTR);\n}\nfunction isBackground(elm) {\n return elm.hasAttribute(BG_ID_ATTR);\n}\n\n/**\n * Custom element that manages a set of background and trigger elements.\n *\n * Background elements are annotated with a `data-background-id` attribute.\n *\n * Trigger elements are annotated with a `data-show-background` attribute,\n * `data-attribute-name` and `data-attribute-value` attributes.\n *\n *\n * When a trigger element comes into view it will set the `data-state` attribute\n * of the corresponding background to `ACTIVE`.\n * The previous and next background will get `data-state`=`PREV` and `NEXT`.\n */\nvar _activeTriggerIndex = /*#__PURE__*/new WeakMap();\nvar _observer = /*#__PURE__*/new WeakMap();\nvar _createIntersectionObserver = /*#__PURE__*/new WeakSet();\nvar _disconnectIntersectionObserver = /*#__PURE__*/new WeakSet();\nvar _handleTriggerChange = /*#__PURE__*/new WeakMap();\nvar _prepareBackgrounds = /*#__PURE__*/new WeakSet();\nvar _updateBackgrounds = /*#__PURE__*/new WeakSet();\nvar _getBackgroundId = /*#__PURE__*/new WeakSet();\nclass Scrollhistorie extends ViewportPositionMixin(AttributeBindingMixin(HTMLElement)) {\n constructor() {\n super(...arguments);\n _classPrivateMethodInitSpec(this, _getBackgroundId);\n _classPrivateMethodInitSpec(this, _updateBackgrounds);\n _classPrivateMethodInitSpec(this, _prepareBackgrounds);\n _classPrivateMethodInitSpec(this, _disconnectIntersectionObserver);\n _classPrivateMethodInitSpec(this, _createIntersectionObserver);\n _classPrivateFieldInitSpec(this, _activeTriggerIndex, {\n writable: true,\n value: void 0\n });\n _classPrivateFieldInitSpec(this, _observer, {\n writable: true,\n value: void 0\n });\n _classPrivateFieldInitSpec(this, _handleTriggerChange, {\n writable: true,\n value: intersections => {\n var activeIntersection = intersections.filter(i => i.isIntersecting).pop();\n if (!activeIntersection || !activeIntersection.target) {\n _classPrivateFieldSet(this, _activeTriggerIndex, null);\n return;\n }\n var triggerElement = activeIntersection.target;\n\n // Set active background\n this.activeBackgroundId = triggerElement.getAttribute(SHOW_BACKGROUND_ATTR);\n\n // Update attribute on active background\n var attributeName = triggerElement.getAttribute(ATTRIBUTE_NAME);\n var attributeValue = triggerElement.getAttribute(ATTRIBUTE_VALUE);\n if (attributeName) {\n var _this$activeBackgroun;\n (_this$activeBackgroun = this.activeBackground) === null || _this$activeBackgroun === void 0 || _this$activeBackgroun.setAttribute(attributeName, attributeValue);\n }\n this.triggerElements.forEach(elm => setAttribute(elm, STATE_ATTR, elm === triggerElement ? 'ACTIVE' : undefined));\n var triggerIndex = this.triggerElements.indexOf(triggerElement);\n if (triggerIndex !== _classPrivateFieldGet(this, _activeTriggerIndex)) {\n _classPrivateFieldSet(this, _activeTriggerIndex, triggerIndex);\n dispatchEvent(this, TRIGGER_ACTIVATED_EVENT, {\n triggerIndex,\n backgroundId: this.activeBackgroundId,\n attributeName,\n attributeValue\n });\n }\n }\n });\n }\n static get observedAttributes() {\n return [...super.observedAttributes, ROOT_MARGIN_ATTR, ACTIVE_BACKGROUND_ATTR];\n }\n\n // Binding VIEWPORT-POSITION attribute to background DATA-VIEWPORT-POSITION attribute\n static get boundAttributes() {\n return [{\n attribute: \"\".concat(VIEWPORT_POSITION_ATTR, \":\").concat(VIEWPORT_POSITION_DATA_ATTR),\n targets: instance => instance.backgrounds\n }];\n }\n connectedCallback() {\n super.connectedCallback();\n _classPrivateMethodGet(this, _updateBackgrounds, _updateBackgrounds2).call(this);\n _classPrivateMethodGet(this, _createIntersectionObserver, _createIntersectionObserver2).call(this);\n }\n disconnectedCallback() {\n super.disconnectedCallback();\n _classPrivateMethodGet(this, _disconnectIntersectionObserver, _disconnectIntersectionObserver2).call(this);\n }\n attributeChangedCallback(name, oldValue, newValue) {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (name === ROOT_MARGIN_ATTR) {\n _classPrivateMethodGet(this, _disconnectIntersectionObserver, _disconnectIntersectionObserver2).call(this);\n _classPrivateMethodGet(this, _createIntersectionObserver, _createIntersectionObserver2).call(this);\n } else if (name === VIEWPORT_POSITION_ATTR) {\n _classPrivateMethodGet(this, _prepareBackgrounds, _prepareBackgrounds2).call(this);\n _classPrivateMethodGet(this, _updateBackgrounds, _updateBackgrounds2).call(this);\n } else if (name === ACTIVE_BACKGROUND_ATTR) {\n _classPrivateMethodGet(this, _updateBackgrounds, _updateBackgrounds2).call(this);\n }\n }\n get triggerElements() {\n return toArray(this.children).filter(isTrigger);\n }\n get backgrounds() {\n return toArray(this.children).filter(isBackground);\n }\n\n /* Mirrored attributes: */\n\n get rootMargin() {\n return this.getAttribute(ROOT_MARGIN_ATTR) || '0px 0px 0px 0px';\n }\n set rootMargin(val) {\n this.setAttribute(ROOT_MARGIN_ATTR, val || '0px 0px 0px 0px');\n }\n set activeBackgroundId(value) {\n if (value !== this.activeBackgroundId) {\n this.setAttribute(ACTIVE_BACKGROUND_ATTR, value);\n }\n }\n get activeBackgroundId() {\n return this.getAttribute(ACTIVE_BACKGROUND_ATTR);\n }\n get activeBackground() {\n return this.querySelector(\"[\".concat(BG_ID_ATTR, \"=\\\"\").concat(this.activeBackgroundId, \"\\\"]\"));\n }\n}\nfunction _createIntersectionObserver2() {\n _classPrivateFieldSet(this, _observer, new ElementIntersectionObserver(this.triggerElements, _classPrivateFieldGet(this, _handleTriggerChange), {\n root: this.viewportIntersectionRoot,\n rootMargin: this.rootMargin\n }));\n}\nfunction _disconnectIntersectionObserver2() {\n if (_classPrivateFieldGet(this, _observer)) {\n _classPrivateFieldGet(this, _observer).disconnect();\n }\n}\nfunction _prepareBackgrounds2() {\n var viewportPosition = this.viewportPosition;\n if (viewportPosition === VIEWPORT_POSITIONS.aboveViewport || viewportPosition === VIEWPORT_POSITIONS.belowViewport) {\n var triggerElements = this.triggerElements;\n if (triggerElements.length > 0) {\n var triggerIndex = viewportPosition === VIEWPORT_POSITIONS.aboveViewport ? triggerElements.length - 1 : 0;\n this.activeBackgroundId = triggerElements[triggerIndex].getAttribute(SHOW_BACKGROUND_ATTR);\n }\n }\n}\nfunction _updateBackgrounds2() {\n var activeBackgroundId = this.activeBackgroundId;\n var backgrounds = this.backgrounds;\n backgrounds.forEach((background, idx) => {\n var backgroundId = background.getAttribute(BG_ID_ATTR);\n var isActive = backgroundId === activeBackgroundId;\n var nextActive = _classPrivateMethodGet(this, _getBackgroundId, _getBackgroundId2).call(this, backgrounds, idx + 1) === activeBackgroundId;\n var prevActive = _classPrivateMethodGet(this, _getBackgroundId, _getBackgroundId2).call(this, backgrounds, idx - 1) === activeBackgroundId;\n var state;\n if (isActive) {\n state = 'ACTIVE';\n } else if (nextActive) {\n state = 'PREV';\n } else if (prevActive) {\n state = 'NEXT';\n }\n var currentState = background.getAttribute(STATE_ATTR);\n if (state !== currentState) {\n setAttribute(background, STATE_ATTR, state);\n }\n });\n}\nfunction _getBackgroundId2(backgrounds, index) {\n if (backgrounds[index]) {\n return backgrounds[index].getAttribute(BG_ID_ATTR);\n }\n}\n\nexport { Scrollhistorie as default };\n//# sourceMappingURL=index.esm.js.map\n","import balanceText from 'balance-text'\n\nconst watching = []\nlet handlersInitialized = false\n\nfunction debounce(func, threshold, execAsap, ...args) {\n let timeout\n\n return function () {\n const obj = this\n\n function delayed() {\n if (!execAsap) {\n func.apply(obj, args)\n }\n timeout = null\n }\n\n if (timeout) {\n clearTimeout(timeout)\n } else if (execAsap) {\n func.apply(obj, args)\n }\n timeout = setTimeout(delayed, threshold || 100)\n }\n}\n\nfunction ready(fn) {\n if (document.readyState !== 'loading') {\n fn()\n } else if (document.addEventListener) {\n document.addEventListener('DOMContentLoaded', fn)\n } else {\n document.attachEvent('onreadystatechange', () => {\n if (document.readyState !== 'loading') {\n fn()\n }\n })\n }\n}\n\nfunction updateWatched() {\n watching.forEach((element) => {\n const padding = window.getComputedStyle(element).padding\n const oldDisplay = element.style.display\n const oldMargin = element.style.margin\n const oldPadding = element.style.padding\n /*\n Display span as block when balancing text.\n Padding is moved to margin so that width is calculated correctly\n */\n element.style.display = 'block'\n element.style.margin = padding\n element.style.padding = 0\n balanceText(element)\n element.style.display = oldDisplay\n element.style.margin = oldMargin\n element.style.padding = oldPadding\n })\n}\n\nfunction initializeHandlers() {\n if (handlersInitialized) {\n return\n }\n\n // Apply on DOM ready\n ready(updateWatched)\n\n // Reapply on full load\n window.addEventListener('load', updateWatched)\n\n // Reapply on resize\n window.addEventListener('resize', debounce(updateWatched))\n\n handlersInitialized = true\n}\n\nexport function balanceAndWatch(elements) {\n watching.push(...elements)\n initializeHandlers()\n updateWatched()\n}\n","export function getArticleInfo() {\n return {\n authors: getXLAuthors(),\n publishedString: getXLPublishedString(),\n }\n}\n\nfunction getXLAuthors() {\n return Array.from(document.querySelectorAll('.author__body')).map((authorElm) => {\n const authNameElm = authorElm.querySelector('.author__name') as HTMLAnchorElement\n const authRoleElm = authorElm.querySelector('.author__role')\n return {\n name: Array.from(authNameElm.childNodes ?? [])\n .filter((n) => n.nodeName === '#text')\n .map((n) => n.textContent)\n .join('')\n .trim(),\n href: authNameElm.href,\n role: authRoleElm.textContent,\n }\n })\n}\n\nfunction getXLPublishedString() {\n const publishDateElm = document.querySelector('.article-dateline__full')\n const publishDate = publishDateElm ? publishDateElm.textContent : ''\n\n const annotationElm = document.querySelector('.article-dateline-annotation')\n const publishAnnotation = annotationElm ? annotationElm.textContent : ''\n\n return `${publishAnnotation} ${publishDate}`\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"logo-wrapper\":\"dhis__logo-wrapper--db0f8\",\"logoWrapper\":\"dhis__logo-wrapper--db0f8\",\"nrklogo\":\"dhis__nrklogo--d16ef\",\"introscroll\":\"dhis__introscroll--c059f\",\"introscroll__error\":\"dhis__introscroll__error--c25da\",\"introscrollError\":\"dhis__introscroll__error--c25da\"};","import { html } from '@nrk/dh-server-libs/html'\nimport Scrollhistorie from '@nrk/dh-basis-scrollhistorie'\nimport { closest } from '@nrk/dh-basis-common'\nimport { balanceAndWatch } from '../lib/balance-text-wrapper.js'\nimport { debounce } from 'debounce'\nimport { getArticleInfo } from './article-info.ts'\n\n/* styles */\nimport styles from './introscroll.module.css'\nimport backgroundStyles from './background.module.css'\nimport cardStyles from './cards/cards.module.css'\n\nconst s = { ...styles, ...backgroundStyles, ...cardStyles }\n\nexport default class Introscroll extends Scrollhistorie {\n static get observedAttributes() {\n return ['background-color', ...super.observedAttributes]\n }\n\n #updating = false\n #viewport = { height: 0, width: 0 }\n #currentPercentage\n #debouncedUpdateSizes\n\n connectedCallback() {\n super.connectedCallback()\n this.#updateSizes()\n this.#debouncedUpdateSizes = debounce(this.#updateSizes, 500)\n window.addEventListener('resize', this.#debouncedUpdateSizes)\n // eslint-disable-next-line compat/compat\n if (document?.fonts?.ready?.then) {\n // eslint-disable-next-line promise/catch-or-return\n document.fonts.ready.then(this.#updateTitle)\n }\n\n this.#updateByline()\n\n // Date in byline is calculated on the client. Update byline to include new date.\n setTimeout(() => this.#updateByline(), 100)\n setTimeout(() => this.#updateByline(), 5000)\n\n /*\n Make media elements focusable so that we can adjust the scroll\n when a background image is focused (i.e. with a screen reader)\n */\n for (const elm of this.querySelectorAll('img, video, [role=img]')) {\n elm.tabIndex = '-1'\n }\n this.addEventListener('focus', this.#handleFocus, true)\n\n /*\n Polyfill text-wrap: balance.\n TODO: remove once Safari fully supports text-wrap: balance\n (There's currently a bug in Safari that disables text-wrap balance when used with box-decoration)\n https://bugs.webkit.org/show_bug.cgi?id=274145\n */\n if (!CSS.supports('text-wrap', 'balance') || navigator?.userAgent?.includes?.('Safari')) {\n requestAnimationFrame(() => {\n balanceAndWatch(this.querySelectorAll('.balance-text'))\n })\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n this.removeEventListener('focus', this.#handleFocus, true)\n window.removeEventListener('resize', this.#debouncedUpdateSizes)\n }\n\n attributeChangedCallback(name, prevValue, newValue) {\n super.attributeChangedCallback(name, prevValue, newValue)\n\n if (name === 'background-color' && typeof newValue === 'string') {\n this.style.setProperty('--introscroll-background-color', newValue)\n } else if (name === 'viewport-position') {\n /* TODO: remove once Safari supports scroll-driven animations */\n if (!CSS.supports('animation-timeline', 'view()')) {\n this.#updateVisiblePercentage()\n }\n }\n }\n\n /**\n * When a background image is focused:\n * - Adjust the scroll position to ensure that the background is visible.\n */\n #handleFocus = (e) => {\n const backgroundElement = e.target && closest(e.target, '[data-background-id]')\n if (!backgroundElement) {\n return\n }\n\n const backgroundId = backgroundElement.getAttribute('data-background-id')\n if (this.activeBackgroundId !== backgroundId) {\n const triggerElement = this.triggerElements.find(\n (elm) => elm.getAttribute('data-show-background') === backgroundId,\n )\n if (triggerElement) {\n window.scrollTo(0, triggerElement.offsetTop - window.innerHeight / 2)\n }\n }\n }\n\n /**\n * Update how many percent of the screen is filled with introscroll.\n * Used to fade out and translate up the last card for browsers that doesn't support scroll-driven animations.\n *\n * TODO: Remove once Safari supports scroll-driven animations\n *\n * @private\n */\n #updateVisiblePercentage() {\n if (this.#updating) {\n return\n }\n this.#updating = true\n\n const loop = () => {\n if (this.viewportPosition !== 'IN-VIEWPORT') {\n this.#updating = false\n } else {\n const bottom = Math.min(\n Math.max(this.offsetHeight - window.scrollY, 0),\n this.#viewport.height,\n )\n const percentage = bottom / this.#viewport.height\n if (percentage !== this.#currentPercentage) {\n this.style.setProperty('--introscroll-percentage', percentage.toFixed(3))\n this.#currentPercentage = percentage\n }\n requestAnimationFrame(loop)\n }\n }\n requestAnimationFrame(loop)\n }\n\n #updateByline() {\n const { authors, publishedString } = getArticleInfo()\n\n const container = this.querySelector(`.${s.byline}`)\n const expandable = authors.length > 3\n\n const authorHTML = authors.map((author) => {\n return html`\n
\n ${author.name} \n ${author.role}\n
\n `\n })\n const expandHTML = html`\n \n Vis ${authors.length - 1} bidragsytere til\n +${authors.length - 1} til\n \n `\n authorHTML.splice(1, 0, expandHTML)\n\n container.innerHTML = html`\n
${authorHTML.join('')}
\n ${publishedString} \n `\n }\n\n #updateSizes = () => {\n if (this.#viewport.height !== document.documentElement.clientHeight) {\n this.#viewport.height = document.documentElement.clientHeight\n }\n\n if (this.#viewport.width !== document.documentElement.clientWidth) {\n this.#viewport.width = document.documentElement.clientWidth\n this.#updateTitle()\n }\n }\n\n #updateTitle = () => {\n const titleCardContainer = this.querySelector(`.${s.titleCard} .${s.textContainer}`)\n let fontReduce = 0\n this.style.setProperty('--introscroll-font-reduce', `${fontReduce}px`)\n while (titleCardContainer.scrollWidth > titleCardContainer.offsetWidth && fontReduce < 20) {\n fontReduce++\n this.style.setProperty('--introscroll-font-reduce', `${fontReduce}px`)\n }\n }\n\n get backgroundColor() {\n this.getAttribute('background-color')\n }\n\n set backgroundColor(val) {\n this.setAttribute('background-color', val)\n }\n}\n","// extracted by mini-css-extract-plugin\nexport default {\"background\":\"dhis__background--dd0c3\",\"vertical\":\"dhis__vertical--ddc6d\",\"horizontal\":\"dhis__horizontal--dba9e\",\"credit\":\"dhis__credit--b3d94\",\"horizontal-cover\":\"dhis__horizontal-cover--f46ea\",\"horizontalCover\":\"dhis__horizontal-cover--f46ea\",\"horizontal-contain\":\"dhis__horizontal-contain--ff75a\",\"horizontalContain\":\"dhis__horizontal-contain--ff75a\",\"vertical-cover\":\"dhis__vertical-cover--ada53\",\"verticalCover\":\"dhis__vertical-cover--ada53\",\"vertical-contain\":\"dhis__vertical-contain--b143b\",\"verticalContain\":\"dhis__vertical-contain--b143b\",\"introscroll\":\"dhis__introscroll--a00bc\"};","// extracted by mini-css-extract-plugin\nexport default {\"card\":\"dhis__card--fd4d0\",\"text-container\":\"dhis__text-container--df1ed\",\"textContainer\":\"dhis__text-container--df1ed\",\"first\":\"dhis__first--cd235\",\"last\":\"dhis__last--ba7bd\",\"fade-up\":\"dhis__fade-up--db9ec\",\"fadeUp\":\"dhis__fade-up--db9ec\",\"title-card\":\"dhis__title-card--d2a9c\",\"titleCard\":\"dhis__title-card--d2a9c\",\"title-layout\":\"dhis__title-layout--b10fb\",\"titleLayout\":\"dhis__title-layout--b10fb\",\"large\":\"dhis__large--c57e1\",\"byline\":\"dhis__byline--eff27\",\"authors\":\"dhis__authors--a4208\",\"author\":\"dhis__author--afbf6\",\"author__name\":\"dhis__author__name--dcd8b\",\"authorName\":\"dhis__author__name--dcd8b\",\"author__role\":\"dhis__author__role--dbf9a\",\"authorRole\":\"dhis__author__role--dbf9a\",\"expandable\":\"dhis__expandable--bec76\",\"publish__date\":\"dhis__publish__date--d7da8\",\"publishDate\":\"dhis__publish__date--d7da8\"};","import { toArray, setAttribute } from '@nrk/dh-basis-common'\n\nconst CHILD_SELECTOR = '[dh-receive-introscroll-attributes]'\nconst STATE_ATTR = 'data-state'\nconst VIEWPORT_POSITION_ATTR = 'viewport-position'\nconst VIEWPORT_POSITION_DATA_ATTR = 'data-viewport-position'\n\nconst STOPS_ATTR = 'stops'\nconst TARGET_STOP_ATTR = 'target-stop'\n\n/*\n * Copies down the 'data-state' attribute to child.\n * Detects and sets 'data-viewport-position' on child.\n * */\nexport default class Spesialmodul extends HTMLElement {\n static get observedAttributes() {\n return [STATE_ATTR, VIEWPORT_POSITION_ATTR, STOPS_ATTR, TARGET_STOP_ATTR]\n }\n\n connectedCallback() {}\n\n disconnectedCallback() {}\n\n attributeChangedCallback(name, prev, next) {\n if (prev === next) {\n return\n }\n this._updateChildElements()\n }\n\n _updateChildElements() {\n const state = this.state\n const viewportPosition = this.viewportPosition\n const spesialmoduler = this.spesialmoduler\n const stops = this.stops\n const targetStop = this.targetStop\n spesialmoduler.forEach((spesialmodul) => {\n setAttribute(spesialmodul, STATE_ATTR, state)\n setAttribute(spesialmodul, VIEWPORT_POSITION_DATA_ATTR, viewportPosition)\n if (stops && stops.length) {\n setAttribute(spesialmodul, STOPS_ATTR, stops)\n setAttribute(spesialmodul, TARGET_STOP_ATTR, targetStop)\n }\n })\n }\n\n get spesialmoduler() {\n return toArray(this.querySelectorAll(CHILD_SELECTOR))\n }\n\n get viewportPosition() {\n return this.getAttribute(VIEWPORT_POSITION_ATTR)\n }\n\n set viewportPosition(value) {\n setAttribute(this, VIEWPORT_POSITION_ATTR, value)\n }\n\n get state() {\n return this.getAttribute(STATE_ATTR)\n }\n\n set state(value) {\n setAttribute(this, STATE_ATTR, value)\n }\n\n get stops() {\n return this.getAttribute(STOPS_ATTR)\n }\n\n set stops(val) {\n this.setAttribute(STOPS_ATTR, val)\n }\n\n get targetStop() {\n return Number(this.getAttribute(TARGET_STOP_ATTR))\n }\n\n set targetStop(val) {\n this.setAttribute(TARGET_STOP_ATTR, val)\n }\n}\n","import _defineProperty from '@babel/runtime/helpers/defineProperty';\nimport { closest, testReducedMotion, withinStops, toArray, setAttribute, toggleAttribute, withinRange } from '@nrk/dh-basis-common';\n\nvar STOPS_ATTR = 'stops';\nvar TARGET_STOP_ATTR = 'target-stop';\nvar AUTOPLAY_BLOCKED = 'autoplay-blocked';\nvar STATE_ATTR = 'data-state'; // Data attribute, so that it can be used on other elements\nvar VIEWPORT_POSITION_ATTR = 'data-viewport-position';\nvar READY_STATE = {\n HAVE_NOTHING: 0,\n HAVE_METADATA: 1,\n HAVE_CURRENT_DATA: 2,\n HAVE_FUTURE_DATA: 3,\n HAVE_ENOUGH_DATA: 4 // Can play through\n};\n\n// Most videos have a frame-rate of 25 fps, but not all. Use with care.\n// Used to calculate target zone.\nvar FRAME_RATE = 25;\nvar isVisible = child => child.offsetWidth > 0 || child.offsetHeight > 0;\n\n/* Ponyfill Math.sign */\nfunction sign(val) {\n return val >= 0 ? 1 : -1;\n}\nfunction round(num, decimals) {\n var multiplier = Math.pow(10.0, decimals);\n return Math.round(num * multiplier) / multiplier;\n}\nclass StegvisVideo extends HTMLElement {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"_paused\", true);\n _defineProperty(this, \"_disconnecting\", false);\n _defineProperty(this, \"_reducedMotionSeekEnabled\", false);\n _defineProperty(this, \"_onReadyStateChange\", e => {\n if (isVisible(e.target) && e.target.readyState >= READY_STATE.HAVE_ENOUGH_DATA) {\n this._startSeek();\n }\n });\n _defineProperty(this, \"_handleClick\", e => {\n var btn = closest(e.target, 'button');\n if (!btn) {\n return;\n }\n\n /* Triggers play if autoplay was blocked */\n var videoElement = this.videoElement;\n if (videoElement !== null && videoElement !== void 0 && videoElement.paused) {\n var playPromise = videoElement.play() || Promise.resolve();\n playPromise.then(() => {\n this.autoplayBlocked = false;\n });\n }\n });\n }\n static get observedAttributes() {\n return [TARGET_STOP_ATTR, STATE_ATTR, VIEWPORT_POSITION_ATTR];\n }\n connectedCallback() {\n this.addEventListener('click', this._handleClick);\n this.videoElements.forEach(videoElement => videoElement.addEventListener('canplaythrough', this._onReadyStateChange));\n }\n disconnectedCallback() {\n this._disconnecting = true;\n this.removeEventListener('click', this._handleClick);\n this.videoElements.forEach(videoElement => videoElement.removeEventListener('canplaythrough', this._onReadyStateChange));\n }\n attributeChangedCallback(name, prevValue, newValue) {\n var hasValue = newValue !== null;\n var valueChanged = prevValue !== newValue;\n if (!valueChanged) {\n return;\n }\n if (name === STATE_ATTR) {\n this._stateChanged(prevValue, newValue);\n } else if (name === VIEWPORT_POSITION_ATTR) {\n this._viewportChanged(newValue);\n } else if (name === TARGET_STOP_ATTR) {\n hasValue && this._startSeek();\n }\n }\n _stateChanged(prevState, nextState) {\n if (nextState === 'ACTIVE') {\n if (prevState === 'NEXT') {\n this._gotoStart();\n } else if (prevState === 'PREV') {\n this._gotoEnd();\n }\n this._startSeek();\n } else {\n this._paused = true;\n }\n }\n _viewportChanged(newValue) {\n if (newValue === 'IN-VIEWPORT') {\n this._preload();\n this._startSeek();\n } else if (newValue === 'ABOVE-VIEWPORT') {\n this._paused = true;\n this._gotoEnd();\n } else if (newValue === 'BELOW-VIEWPORT') {\n this._paused = true;\n this._gotoStart();\n }\n }\n _shouldPlay() {\n var _this$videoElement;\n var inViewport = typeof this.viewportPosition === 'undefined' || this.viewportPosition === 'IN-VIEWPORT';\n return ((_this$videoElement = this.videoElement) === null || _this$videoElement === void 0 ? void 0 : _this$videoElement.readyState) >= READY_STATE.HAVE_ENOUGH_DATA && inViewport && this.state === 'ACTIVE';\n }\n _preload() {\n var videoElement = this.videoElement;\n if ((videoElement === null || videoElement === void 0 ? void 0 : videoElement.readyState) < READY_STATE.HAVE_ENOUGH_DATA) {\n videoElement === null || videoElement === void 0 || videoElement.load();\n }\n }\n _gotoStart() {\n if (this.autoplayBlocked) {\n return;\n }\n var videoElement = this.videoElement;\n if (videoElement && videoElement.currentTime !== 0) {\n videoElement.currentTime = 0;\n }\n }\n _gotoEnd() {\n if (this.autoplayBlocked) {\n return;\n }\n var videoElement = this.videoElement;\n var duration = videoElement === null || videoElement === void 0 ? void 0 : videoElement.duration;\n if (Number.isFinite(duration)) {\n videoElement.currentTime = duration;\n }\n }\n _enableSeekOnReducedMotion() {\n var videoElement = this.videoElement;\n if (this._reducedMotionSeekEnabled || !videoElement) {\n return Promise.resolve();\n }\n return (videoElement.play() || Promise.resolve(true)).then(() => {\n videoElement.pause();\n this._reducedMotionSeekEnabled = true;\n }).catch(e => {\n // Ignore error\n });\n }\n _startSeek() {\n if (!this._paused || !this._shouldPlay()) {\n return;\n }\n var reducedMotion = testReducedMotion();\n this._paused = false;\n var prevTime;\n var loop = timestamp => {\n var videoElement = this.videoElement;\n var targetTime = this.stops[this.targetStop];\n if (this._disconnecting || this._paused || !videoElement || !isFinite(targetTime)) {\n this._paused = true;\n videoElement === null || videoElement === void 0 || videoElement.pause();\n return;\n }\n if (!prevTime) {\n prevTime = timestamp;\n }\n this.invisibleVideoElements.filter(video => !video.paused).forEach(invisibleVideo => invisibleVideo.pause());\n var dt = (timestamp - prevTime) / 1000;\n var framesPerTick = Math.max(Math.ceil(Math.abs(dt * FRAME_RATE)), 1);\n var buffer = 0.5 * framesPerTick / FRAME_RATE;\n var currentTime = videoElement.currentTime;\n var atTargetStop = withinRange(currentTime, targetTime - buffer, targetTime + buffer);\n if (atTargetStop) {\n if (videoElement.currentTime !== targetTime) {\n videoElement.currentTime = targetTime;\n }\n this._paused = true;\n videoElement.pause();\n } else if (reducedMotion) {\n this._enableSeekOnReducedMotion().then(() => {\n videoElement.currentTime = targetTime;\n this._paused = true;\n });\n } else {\n var speed = this._calculateSpeed(currentTime);\n var direction = sign(targetTime - currentTime);\n if (this.autoplayBlocked) ; else if (direction === 1) {\n // Use normal playback for forward playback\n videoElement.playbackRate = speed;\n if (videoElement.paused) {\n var playPromise = videoElement.play() || Promise.resolve();\n playPromise.catch(e => {\n console.error(e);\n this.autoplayBlocked = true;\n });\n }\n } else {\n // Use seeking for reverse playback:\n // https://github.com/whatwg/html/issues/3754\n videoElement.pause();\n var nextTime = round(currentTime + dt * speed * direction, 2.0);\n if (currentTime !== nextTime) {\n videoElement.currentTime = nextTime;\n }\n }\n prevTime = timestamp;\n requestAnimationFrame(loop);\n }\n };\n // eslint-disable-next-line compat/compat\n requestAnimationFrame(loop);\n }\n _calculateSpeed(currentTime) {\n return withinStops(currentTime, this.stops, this.targetStop, 1) ? 1 : 3;\n }\n get videoElement() {\n return this.videoElements.find(isVisible);\n }\n get invisibleVideoElements() {\n return this.videoElements.filter(child => !isVisible(child));\n }\n get videoElements() {\n return toArray(this.children).filter(child => child.nodeName === 'VIDEO');\n }\n get stops() {\n var stopString = this.getAttribute(STOPS_ATTR) || '';\n return stopString.replace(/[[\\]]/g, '').split(',').map(s => s.trim()).filter(Boolean).map(s => Number(s));\n }\n set stops(val) {\n this.setAttribute(STOPS_ATTR, val.map(num => num.toFixed(2)).join(','));\n }\n get targetStop() {\n return Number(this.getAttribute(TARGET_STOP_ATTR) || 0);\n }\n set targetStop(val) {\n this.setAttribute(TARGET_STOP_ATTR, val);\n }\n get state() {\n return this.getAttribute(STATE_ATTR);\n }\n set state(val) {\n setAttribute(this, STATE_ATTR, val);\n }\n get viewportPosition() {\n return this.getAttribute(VIEWPORT_POSITION_ATTR);\n }\n set viewportPosition(val) {\n this.setAttribute(VIEWPORT_POSITION_ATTR, val);\n }\n get autoplayBlocked() {\n return this.hasAttribute(AUTOPLAY_BLOCKED) || false;\n }\n set autoplayBlocked(val) {\n toggleAttribute(this, AUTOPLAY_BLOCKED, val);\n }\n}\n\nexport { StegvisVideo as default };\n//# sourceMappingURL=index.esm.js.map\n","import _defineProperty from '@babel/runtime/helpers/defineProperty';\nimport { dispatchEvent, testReducedMotion, toArray, toggleAttribute } from '@nrk/dh-basis-common';\n\nvar STATE_ATTR = 'data-state';\nvar VIEWPORT_POSITION_ATTR = 'data-viewport-position';\nvar DISABLE_FORCED_ATTRIBUTES_ATTR = 'disable-forced-attributes';\nvar IS_PAUSED = 'is-paused';\nvar AUTOPLAY_BLOCKED = 'autoplay-blocked';\nvar READY_STATE = {\n HAVE_NOTHING: 0,\n HAVE_METADATA: 1,\n HAVE_CURRENT_DATA: 2,\n HAVE_FUTURE_DATA: 3,\n HAVE_ENOUGH_DATA: 4 // Can play through\n};\nvar isVisible = child => !!child.offsetParent;\nclass LevendeStillbilde extends HTMLElement {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"_disconnecting\", false);\n _defineProperty(this, \"_visibleVideoElement\", void 0);\n _defineProperty(this, \"_handlePlayChange\", e => {\n if (e.type === 'play') {\n dispatchEvent(this, 'dh-basis-autoplay-succeeded');\n }\n if (e.target === this._visibleVideoElement) {\n this.isPaused = this._visibleVideoElement.paused;\n }\n });\n _defineProperty(this, \"_updatePlayState\", () => {\n if (!this._visibleVideoElement) {\n return;\n }\n if (this._shouldPlay()) {\n this._playVideo();\n } else {\n this._pauseVideo();\n }\n });\n _defineProperty(this, \"_handleResize\", () => {\n this._updateVisibleVideoElement();\n });\n }\n static get observedAttributes() {\n return [STATE_ATTR, DISABLE_FORCED_ATTRIBUTES_ATTR, VIEWPORT_POSITION_ATTR];\n }\n connectedCallback() {\n this._setVideoAttributes();\n this._setEventListeners();\n this._updateVisibleVideoElement();\n }\n disconnectedCallback() {\n this._disconnecting = true;\n this._removeEventListeners();\n }\n attributeChangedCallback(name, prevValue, newValue) {\n var valueChanged = prevValue !== newValue;\n if (name === STATE_ATTR || name === VIEWPORT_POSITION_ATTR) {\n if (valueChanged) {\n this._updateVisibleVideoElement();\n this._updatePlayState();\n if (name === VIEWPORT_POSITION_ATTR && newValue === 'IN-VIEWPORT') {\n this._preload();\n }\n }\n }\n }\n _setEventListeners() {\n window.addEventListener('resize', this._handleResize);\n this.videoElements.forEach(el => {\n el.addEventListener('pause', this._handlePlayChange);\n el.addEventListener('play', this._handlePlayChange);\n el.addEventListener('canplaythrough', this._updatePlayState);\n });\n }\n _removeEventListeners() {\n window.removeEventListener('resize', this._handleResize);\n this.videoElements.forEach(el => {\n el.removeEventListener('pause', this._handlePlayChange);\n el.removeEventListener('play', this._handlePlayChange);\n el.removeEventListener('canplaythrough', this._updatePlayState);\n });\n }\n _updateVisibleVideoElement() {\n // eslint-disable-next-line compat/compat\n requestAnimationFrame(() => {\n var nextVisibleVideo = this.videoElements.find(isVisible);\n if (nextVisibleVideo !== this._visibleVideoElement) {\n // Pause previous video\n this._pauseVideo();\n this._visibleVideoElement = nextVisibleVideo;\n if (this._shouldPreload()) {\n this._preload();\n }\n this._updatePlayState();\n }\n });\n }\n _setVideoAttributes() {\n if (!this.disableForcedAttributes) {\n this.videoElements.forEach(el => {\n el.setAttribute('playsInline', '');\n el.setAttribute('loop', '');\n el.setAttribute('disableRemotePlayback', '');\n el.setAttribute('x-webkit-airplay', 'deny');\n });\n }\n }\n _shouldPlay() {\n var _this$_visibleVideoEl;\n /*\n * Safari 14-15.5 hides poster on play, leaving a transparent element until enough data is available to play through.\n * We have to wait for the canplaythrough event and readystate = READY_STATE.HAVE_ENOUGH_DATA before calling `.play()`\n * */\n return ((_this$_visibleVideoEl = this._visibleVideoElement) === null || _this$_visibleVideoEl === void 0 ? void 0 : _this$_visibleVideoEl.readyState) >= READY_STATE.HAVE_ENOUGH_DATA && this.state === 'ACTIVE' && this.viewportPosition === 'IN-VIEWPORT';\n }\n _shouldPreload() {\n return this.viewportPosition === 'IN-VIEWPORT';\n }\n _preload() {\n var _this$_visibleVideoEl2;\n if (((_this$_visibleVideoEl2 = this._visibleVideoElement) === null || _this$_visibleVideoEl2 === void 0 ? void 0 : _this$_visibleVideoEl2.readyState) < READY_STATE.HAVE_ENOUGH_DATA) {\n var _this$_visibleVideoEl3;\n (_this$_visibleVideoEl3 = this._visibleVideoElement) === null || _this$_visibleVideoEl3 === void 0 || _this$_visibleVideoEl3.load();\n }\n }\n _playVideo() {\n dispatchEvent(this, 'dh-basis-autoplay-attempted');\n var reducedMotion = testReducedMotion();\n var videoElement = this._visibleVideoElement;\n if (videoElement.paused && !reducedMotion && !this.autoplayBlocked) {\n var playPromise = videoElement.play() || Promise.resolve();\n playPromise.catch(e => {\n console.error(e);\n this.autoplayBlocked = true;\n });\n }\n }\n _pauseVideo() {\n var videoElement = this._visibleVideoElement;\n if (videoElement && !videoElement.paused) {\n videoElement.pause();\n }\n }\n get videoElements() {\n return toArray(this.querySelectorAll('video'));\n }\n get disableForcedAttributes() {\n return this.hasAttribute(DISABLE_FORCED_ATTRIBUTES_ATTR);\n }\n get state() {\n return this.getAttribute(STATE_ATTR);\n }\n set state(val) {\n this.setAttribute(STATE_ATTR, val);\n }\n get isPaused() {\n return this.getAttribute(IS_PAUSED);\n }\n set isPaused(val) {\n if (val) {\n this.setAttribute(IS_PAUSED, '');\n } else {\n this.removeAttribute(IS_PAUSED);\n }\n }\n get autoplayBlocked() {\n return this.hasAttribute(AUTOPLAY_BLOCKED) || false;\n }\n set autoplayBlocked(val) {\n toggleAttribute(this, AUTOPLAY_BLOCKED, val);\n }\n get viewportPosition() {\n return this.getAttribute(VIEWPORT_POSITION_ATTR);\n }\n set viewportPosition(val) {\n this.setAttribute(VIEWPORT_POSITION_ATTR, val);\n }\n}\n\nexport { LevendeStillbilde as default };\n//# sourceMappingURL=index.esm.js.map\n","var __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\n\n// src/nrk-types.ts\nvar ClickEventKind = /* @__PURE__ */ ((ClickEventKind2) => {\n ClickEventKind2[\"Content\"] = \"content\";\n ClickEventKind2[\"Other\"] = \"other\";\n return ClickEventKind2;\n})(ClickEventKind || {});\nvar ImpressionEventKind = /* @__PURE__ */ ((ImpressionEventKind2) => {\n ImpressionEventKind2[\"Impression\"] = \"impression\";\n return ImpressionEventKind2;\n})(ImpressionEventKind || {});\nvar PlaybackEventKind = /* @__PURE__ */ ((PlaybackEventKind2) => {\n PlaybackEventKind2[\"Complete\"] = \"complete\";\n PlaybackEventKind2[\"Exit\"] = \"exit\";\n PlaybackEventKind2[\"Progress\"] = \"progress\";\n PlaybackEventKind2[\"Start\"] = \"start\";\n return PlaybackEventKind2;\n})(PlaybackEventKind || {});\nvar SearchSource = /* @__PURE__ */ ((SearchSource2) => {\n SearchSource2[\"PopularSearch\"] = \"popular-search\";\n SearchSource2[\"PreviousResult\"] = \"previous-result\";\n SearchSource2[\"Search\"] = \"search\";\n return SearchSource2;\n})(SearchSource || {});\nvar ViewportEventKind = /* @__PURE__ */ ((ViewportEventKind2) => {\n ViewportEventKind2[\"Entry\"] = \"entry\";\n ViewportEventKind2[\"Exit\"] = \"exit\";\n return ViewportEventKind2;\n})(ViewportEventKind || {});\nvar EventSchema = /* @__PURE__ */ ((EventSchema3) => {\n EventSchema3[\"BackstageEvent\"] = \"iglu:no.nrk.innlogging/backstage-event/jsonschema/1-0-0\";\n EventSchema3[\"BridgeEvent\"] = \"iglu:no.nrk/bridge-event/jsonschema/1-0-0\";\n EventSchema3[\"ClickEvent\"] = \"iglu:no.nrk/click-event/jsonschema/1-0-0\";\n EventSchema3[\"FrontstageServerEvent\"] = \"iglu:no.nrk.innlogging/frontstage-server-event/jsonschema/1-0-0\";\n EventSchema3[\"ImpressionEvent\"] = \"iglu:no.nrk/impression-event/jsonschema/1-0-0\";\n EventSchema3[\"LoginRegisterFlowEvent\"] = \"iglu:no.nrk.innlogging/login-register-flow-event/jsonschema/1-0-0\";\n EventSchema3[\"NotificationEvent\"] = \"iglu:no.nrk/notification-event/jsonschema/1-0-0\";\n EventSchema3[\"PlaybackEvent\"] = \"iglu:no.nrk/playback-event/jsonschema/1-0-0\";\n EventSchema3[\"ProfilePageEvent\"] = \"iglu:no.nrk.innlogging/profile-page-event/jsonschema/1-0-0\";\n EventSchema3[\"RadioEvent\"] = \"iglu:no.nrk.radio/radio-event/jsonschema/1-0-0\";\n EventSchema3[\"SearchEvent\"] = \"iglu:no.nrk/search-event/jsonschema/1-0-0\";\n EventSchema3[\"StepEvent\"] = \"iglu:no.nrk.dh/step-event/jsonschema/1-0-0\";\n EventSchema3[\"TimeSpentEvent\"] = \"iglu:no.nrk/time-spent-event/jsonschema/1-0-0\";\n EventSchema3[\"ViewportEvent\"] = \"iglu:no.nrk.dh/viewport-event/jsonschema/1-0-0\";\n return EventSchema3;\n})(EventSchema || {});\nvar EntitySchema = /* @__PURE__ */ ((EntitySchema2) => {\n EntitySchema2[\"Bridge\"] = \"iglu:no.nrk/bridge/jsonschema/1-0-0\";\n EntitySchema2[\"ClientID\"] = \"iglu:no.nrk.innlogging/client-id/jsonschema/1-0-0\";\n EntitySchema2[\"Content\"] = \"iglu:no.nrk/content/jsonschema/1-0-1\";\n EntitySchema2[\"Experiment\"] = \"iglu:no.nrk/experiment/jsonschema/1-0-0\";\n EntitySchema2[\"Link\"] = \"iglu:no.nrk/link/jsonschema/2-0-0\";\n EntitySchema2[\"NrkSession\"] = \"iglu:no.nrk/nrk-session/jsonschema/1-0-0\";\n EntitySchema2[\"NrkUser\"] = \"iglu:no.nrk/nrk-user/jsonschema/1-0-0\";\n EntitySchema2[\"Plug\"] = \"iglu:no.nrk/plug/jsonschema/3-0-1\";\n EntitySchema2[\"PreviousWebPage\"] = \"iglu:no.nrk/previous-web-page/jsonschema/1-0-0\";\n EntitySchema2[\"RegistrationContext\"] = \"iglu:no.nrk.innlogging/registration-context/jsonschema/1-0-0\";\n EntitySchema2[\"SearchResult\"] = \"iglu:no.nrk/search-result/jsonschema/1-0-1\";\n EntitySchema2[\"Service\"] = \"iglu:no.nrk/service/jsonschema/2-0-0\";\n EntitySchema2[\"Application\"] = \"iglu:com.snowplowanalytics.mobile/application/jsonschema/1-0-0\";\n return EntitySchema2;\n})(EntitySchema || {});\n\n// src/nrk-base-tracker.ts\nimport cuid from \"cuid\";\nvar NrkBaseTracker = class {\n constructor(snowplow, config) {\n this.sharedEntities = {};\n var _a, _b, _c;\n this.snowplow = snowplow;\n this.trackerId = (_a = config.trackerId) != null ? _a : cuid.slug();\n this.setSharedEntity(\"iglu:no.nrk/service/jsonschema/2-0-0\" /* Service */, { id: config.serviceId, environment: (_b = config.environment) != null ? _b : null });\n if (config.appVersion && config.appBuild) {\n this.setSharedEntity(\"iglu:com.snowplowanalytics.mobile/application/jsonschema/1-0-0\" /* Application */, { build: config.appBuild, version: config.appVersion });\n }\n snowplow.newTracker(this.trackerId, config.collectorUrl, {\n postPath: \"/nrk/wd6\",\n appId: config.appId,\n plugins: config.plugins,\n platform: (_c = config.platform) != null ? _c : \"web\",\n contexts: {\n webPage: config.disableWebContext !== true\n },\n stateStorageStrategy: config.disableLocalStorage ? \"cookie\" : void 0\n });\n }\n /**\n * Track page view.\n */\n trackPageView(contentEntity) {\n if (contentEntity) {\n this.snowplow.trackPageView(\n {\n context: entitiesToContexts(__spreadProps(__spreadValues({}, this.sharedEntities), {\n [\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */]: contentEntity\n }))\n },\n [this.trackerId]\n );\n } else {\n this.snowplow.trackPageView({ context: entitiesToContexts(this.sharedEntities) }, [this.trackerId]);\n }\n }\n /**\n * Generic track event for custom schemas, typed up to only support NRK\n * events and entities. All shared entities are included, and can be\n * overridden by specified entities.\n */\n trackSchemaEvent(schema, data, entities) {\n const context = entitiesToContexts(__spreadValues(__spreadValues({}, this.sharedEntities), entities));\n this.snowplow.trackSelfDescribingEvent(\n {\n event: { schema, data: __spreadValues({}, data) },\n context\n },\n [this.trackerId]\n );\n }\n /**\n * Send a standard structured event.\n */\n trackEvent(data, entities) {\n const context = entitiesToContexts(__spreadValues(__spreadValues({}, this.sharedEntities), entities));\n this.snowplow.trackStructEvent(__spreadProps(__spreadValues({}, data), { context }), [this.trackerId]);\n }\n /**\n * Set the logged in user.\n */\n setUser(userId) {\n this.snowplow.setUserId(userId, [this.trackerId]);\n this.setSharedEntity(\"iglu:no.nrk/nrk-user/jsonschema/1-0-0\" /* NrkUser */, { id: userId });\n }\n /**\n * Clear the user when logged out.\n */\n clearUser() {\n this.snowplow.setUserId(null, [this.trackerId]);\n this.removeSharedEntity(\"iglu:no.nrk/nrk-user/jsonschema/1-0-0\" /* NrkUser */);\n }\n /**\n * Add a plugin to the tracker.\n */\n addPlugin(configuration) {\n this.snowplow.addPlugin(configuration, [this.trackerId]);\n }\n /**\n * Set data for a shared entity for all events of this tracker.\n *\n * The `snowplow.addGlobalContexts()` method could potentially be used, but\n * `removeGlobalContexts()` requires the data as argument as well (awkward),\n * and there's no `getGlobalContexts()` to help with that.\n */\n setSharedEntity(schema, data) {\n this.sharedEntities[schema] = data;\n }\n /**\n * Returns any shared entities for an entity schema.\n */\n getSharedEntity(schema) {\n return this.sharedEntities[schema];\n }\n /**\n * Remove all shared entities for an entity schema.\n */\n removeSharedEntity(schema) {\n if (schema in this.sharedEntities) {\n delete this.sharedEntities[schema];\n }\n }\n};\nfunction entitiesToContexts(entities) {\n const contexts = [];\n Object.entries(entities).forEach(([schema, data]) => {\n const dataList = Array.isArray(data) ? data : [data];\n for (const entityData of dataList) {\n contexts.push({ schema, data: __spreadValues({}, entityData) });\n }\n });\n return contexts;\n}\n\n// src/nrk-player-tracker.ts\nvar NrkPlayerTracker = class extends NrkBaseTracker {\n /**\n * Tell the tracker what the current media is.\n */\n setMedia(mediaId, details) {\n const content = { id: mediaId };\n if (details == null ? void 0 : details.source) {\n content.source = details == null ? void 0 : details.source;\n }\n if (details == null ? void 0 : details.kind) {\n content.kind = details == null ? void 0 : details.kind;\n }\n this.setSharedEntity(\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */, content);\n if (details == null ? void 0 : details.channelId) {\n this.channelId = details.channelId;\n }\n if (details && \"autoplay\" in details && details.autoplay !== void 0) {\n this.autoplay = details.autoplay;\n }\n }\n /**\n * Set autoplay for the current media.\n */\n setMediaAutoplay(autoplay) {\n this.autoplay = autoplay;\n }\n /**\n * Tell the tracker that media is unknown (like for gaps in the EPG).\n */\n setUnknownMedia(channelId) {\n this.setSharedEntity(\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */, { id: \"unknown\", kind: \"unknown\" });\n this.channelId = channelId;\n }\n /**\n * Send a playback event of kind 'start'.\n *\n * Should be called when time starts running:\n * - After changing media.\n * - After user pauses playback.\n * - At replay.\n */\n sendStartEvent(startTime, live) {\n if (this.getSharedEntity(\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */) === void 0) {\n throw new Error(\"Must use setMedia() first!\");\n }\n const start = Math.max(0, Math.floor(startTime));\n this.trackSchemaEvent(\"iglu:no.nrk/playback-event/jsonschema/1-0-0\" /* PlaybackEvent */, {\n kind: \"start\" /* Start */,\n startTime: start,\n endTime: start,\n autoplay: this.autoplay,\n live,\n channelId: this.channelId\n });\n }\n /**\n * Send a playback event of kind 'progress'.\n *\n * Should be called when time stops for any reason other than complete or\n * exit.\n */\n sendProgressEvent(startTime, endTime, live) {\n this.sendPlaybackEvent(\"progress\" /* Progress */, startTime, endTime, live);\n }\n /**\n * Send a playback event of kind 'complete'.\n *\n * Should be called when:\n * - Playback reaches the end (100%) of the media (for ODM it stops, for\n * channels it continues to play the next program in the EPG).\n * - When a skip-to-next media function is invoked when binging.\n */\n sendCompleteEvent(startTime, endTime, live) {\n this.sendPlaybackEvent(\"complete\" /* Complete */, startTime, endTime != null ? endTime : startTime, live);\n }\n /**\n * Send a playback event of kind 'exit'.\n *\n * Should be called when leaving the media before a 'complete'-event is sent,\n * including when seeking away from a program in the EPG to another.\n */\n sendExitEvent(startTime, endTime, live) {\n this.sendPlaybackEvent(\"exit\" /* Exit */, startTime, endTime != null ? endTime : startTime, live);\n }\n sendPlaybackEvent(kind, startTime, endTime, live) {\n const start = Math.max(0, Math.floor(startTime));\n const end = Math.max(0, Math.floor(endTime));\n if (start === end && kind === \"progress\" /* Progress */) {\n return;\n }\n if (start > end) {\n throw new Error(`Start time can't be after end time (${start} vs ${end}). Event was ${kind}`);\n }\n this.trackSchemaEvent(\"iglu:no.nrk/playback-event/jsonschema/1-0-0\" /* PlaybackEvent */, {\n kind,\n startTime: start,\n endTime: end,\n live,\n channelId: this.channelId\n });\n }\n};\n\n// src/service-id.ts\nvar ServiceID = /* @__PURE__ */ ((ServiceID2) => {\n ServiceID2[\"Embed\"] = \"embed\";\n ServiceID2[\"Nrkbeta\"] = \"nrkbeta\";\n ServiceID2[\"Nrkinnlogging\"] = \"nrkinnlogging\";\n ServiceID2[\"Nrkno\"] = \"nrkno\";\n ServiceID2[\"Nrkp3\"] = \"nrkp3\";\n ServiceID2[\"Nrkradio\"] = \"nrkradio\";\n ServiceID2[\"Nrksuper\"] = \"nrksuper\";\n ServiceID2[\"Nrktv\"] = \"nrktv\";\n ServiceID2[\"Yr\"] = \"yr\";\n return ServiceID2;\n})(ServiceID || {});\n\n// src/snowplow-global.ts\nvar SnowplowGlobal = class {\n constructor() {\n this.snowplow = window.snowplow;\n if (this.snowplow === void 0) {\n throw new Error(\"There is no global Snowplow function.\");\n }\n }\n /**\n * Check if the global API is available (provided by the \"Snowplow tag\"). No\n * distinction is made between sp.js and sp.lite.js.\n */\n static isAvailable() {\n return window.snowplow !== void 0;\n }\n /**\n * Modify newTracker() to support adding plugins via the tracker\n * configuration. See \"Creating your own plugins\" in the JavaScript tracker\n * Snowplow docs.\n *\n * Note: The tracker configuration hasn't been thoroughly checked for\n * inconsistencies between the global API and @snowplow/browser-tracker.\n * There might be issues.\n */\n newTracker(trackerId, collectorUrl, configuration) {\n this.snowplow(\"newTracker\", trackerId, collectorUrl, configuration);\n if ((configuration == null ? void 0 : configuration.plugins) !== void 0) {\n configuration.plugins.forEach((plugin) => {\n this.addPlugin({ plugin }, [trackerId]);\n });\n }\n }\n setUserId(...args) {\n this.proxy(\"setUserId\", args, 2);\n }\n trackPageView(...args) {\n this.proxy(\"trackPageView\", args, 2);\n }\n trackSelfDescribingEvent(...args) {\n this.proxy(\"trackSelfDescribingEvent\", args, 2);\n }\n trackStructEvent(...args) {\n this.proxy(\"trackStructEvent\", args, 2);\n }\n preservePageViewId(...args) {\n this.proxy(\"preservePageViewId\", args, 1);\n }\n addPlugin(config, trackers) {\n const args = [{ Plugin: () => config.plugin }, \"Plugin\", trackers];\n this.proxy(\"addPlugin\", args, args.length);\n }\n /**\n * Make a call to the global Snowplow API, with the specified method and\n * arguments. It only supports methods which have a `trackers` argument as\n * the last (optional) argument.\n *\n * The `trackers` argument of the Snowplow methods is optional and not always\n * in the same position. The `maxArgs` argument specifies the maximum number\n * of arguments the method supports and so in which position the `trackers`\n * argument is, when present. This is necessary in order to transform the use\n * of `trackers` between the Snowplow API and the global API. So if\n * `Args['length']` is `1 | 2`, then `maxArgs` should be 2.\n */\n proxy(method, args, maxArgs) {\n const trackerIds = args.length === maxArgs ? args.pop() : void 0;\n if (trackerIds && trackerIds.length > 0) {\n trackerIds.forEach((trackerId) => {\n this.snowplow(`${method}:${trackerId}`, ...args);\n });\n } else {\n this.snowplow(method, ...args);\n }\n }\n};\nexport {\n ClickEventKind,\n EntitySchema,\n EventSchema,\n ImpressionEventKind,\n NrkBaseTracker,\n NrkPlayerTracker,\n PlaybackEventKind,\n SearchSource,\n ServiceID,\n SnowplowGlobal,\n ViewportEventKind,\n entitiesToContexts\n};\n","import { EntitySchema, EventSchema } from '@nrk/snowplow-web';\n\n/**\n * Root path to snowplow bundle on static.nrk.no.\n */\nvar staticSnowplowRoot = \"https://static.nrk.no/nrkno-snowplow\";\n/**\n * The current major version\n */\nvar staticSnowplowMajorVersion = \"1\";\n\n//@ts-expect-error post-fix version to allow multiple versions to co-exists at the same time\nvar globalKey = \"nrknoOnTrackerReady-\" + staticSnowplowMajorVersion;\n\n/**\n * Modified version of @nrk/snowplow-web. Does not allow array or undefined\n */\n\n/**\n * Typecheck and generate `{schema, data}`\n */\nfunction getTyped(schema, data) {\n return {\n schema,\n data\n };\n}\n\n/**\n * No-op type check\n */\nfunction isTypedContext(_schema, _data) {}\n/**\n * No-op type check\n */\nfunction isTypedEvent(_schema, _data) {}\n/**\n * No-op type check\n */\nfunction isTyped(_schema, _data) {}\n\n/**\n * No-op type check\n */\nfunction isTypedArray(_schema, _data) {}\n\n/**\n * Typechecks a context and return the Snowplow type\n */\nfunction asSnowplowContext(data) {\n return data;\n}\nfunction asSnowplowEntity(data) {\n return data;\n}\n\nvar typeUtil = /*#__PURE__*/Object.freeze({\n __proto__: null,\n EntitySchema: EntitySchema,\n EventSchema: EventSchema,\n asSnowplowContext: asSnowplowContext,\n asSnowplowEntity: asSnowplowEntity,\n getTyped: getTyped,\n isTyped: isTyped,\n isTypedArray: isTypedArray,\n isTypedContext: isTypedContext,\n isTypedEvent: isTypedEvent\n});\n\n/// \n/**\n * Takes a callback that will be called with the bundled JS when ready.\n *\n * This function will load the major version (defined above in JS file) from `static.nrk.no`\n * @note the callback will never be called if a network error occurs.\n */\nfunction getBundle(callback) {\n // Add callback queue placeholder if needed\n if (globalThis[globalKey] === undefined) {\n //@ts-expect-error `q` is next line\n globalThis[globalKey] = function (cb) {\n globalThis[globalKey].q.push(cb);\n };\n globalThis[globalKey].q = [];\n }\n {\n // load script if needed\n loadOnce(staticSnowplowRoot + \"/major/\" + staticSnowplowMajorVersion + \"/nrkno-snowplow-entry.js\");\n }\n\n // add callback\n globalThis[globalKey](callback);\n}\n/**\n * loadOnce loads the given script IFF it is not already present in the DOM.\n * @param {string} src URL for script\n * @returns {undefined}\n */\nfunction loadOnce(src) {\n var hasScript = document.querySelector(\"script[src=\\\"\" + src + \"\\\"]\");\n if (hasScript) {\n return;\n }\n var script = document.createElement('script');\n script.async = true;\n script.src = src;\n document.head.appendChild(script);\n}\n\nexport { typeUtil as TypeUtils, getBundle };\n","var __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\n\n// src/nrk-types.ts\nvar ClickEventKind = /* @__PURE__ */ ((ClickEventKind2) => {\n ClickEventKind2[\"Content\"] = \"content\";\n ClickEventKind2[\"Other\"] = \"other\";\n return ClickEventKind2;\n})(ClickEventKind || {});\nvar ImpressionEventKind = /* @__PURE__ */ ((ImpressionEventKind2) => {\n ImpressionEventKind2[\"Impression\"] = \"impression\";\n return ImpressionEventKind2;\n})(ImpressionEventKind || {});\nvar PlaybackEventKind = /* @__PURE__ */ ((PlaybackEventKind2) => {\n PlaybackEventKind2[\"Complete\"] = \"complete\";\n PlaybackEventKind2[\"Exit\"] = \"exit\";\n PlaybackEventKind2[\"Progress\"] = \"progress\";\n PlaybackEventKind2[\"Start\"] = \"start\";\n return PlaybackEventKind2;\n})(PlaybackEventKind || {});\nvar SearchSource = /* @__PURE__ */ ((SearchSource2) => {\n SearchSource2[\"PopularSearch\"] = \"popular-search\";\n SearchSource2[\"PreviousResult\"] = \"previous-result\";\n SearchSource2[\"Search\"] = \"search\";\n return SearchSource2;\n})(SearchSource || {});\nvar ViewportEventKind = /* @__PURE__ */ ((ViewportEventKind2) => {\n ViewportEventKind2[\"Entry\"] = \"entry\";\n ViewportEventKind2[\"Exit\"] = \"exit\";\n return ViewportEventKind2;\n})(ViewportEventKind || {});\nvar EventSchema = /* @__PURE__ */ ((EventSchema3) => {\n EventSchema3[\"BackstageEvent\"] = \"iglu:no.nrk.innlogging/backstage-event/jsonschema/1-0-0\";\n EventSchema3[\"BridgeEvent\"] = \"iglu:no.nrk/bridge-event/jsonschema/1-0-0\";\n EventSchema3[\"ClickEvent\"] = \"iglu:no.nrk/click-event/jsonschema/1-0-0\";\n EventSchema3[\"FrontstageServerEvent\"] = \"iglu:no.nrk.innlogging/frontstage-server-event/jsonschema/1-0-0\";\n EventSchema3[\"ImpressionEvent\"] = \"iglu:no.nrk/impression-event/jsonschema/1-0-0\";\n EventSchema3[\"LoginRegisterFlowEvent\"] = \"iglu:no.nrk.innlogging/login-register-flow-event/jsonschema/1-0-0\";\n EventSchema3[\"NotificationEvent\"] = \"iglu:no.nrk/notification-event/jsonschema/1-0-0\";\n EventSchema3[\"PlaybackEvent\"] = \"iglu:no.nrk/playback-event/jsonschema/1-0-0\";\n EventSchema3[\"ProfilePageEvent\"] = \"iglu:no.nrk.innlogging/profile-page-event/jsonschema/1-0-0\";\n EventSchema3[\"RadioEvent\"] = \"iglu:no.nrk.radio/radio-event/jsonschema/1-0-0\";\n EventSchema3[\"SearchEvent\"] = \"iglu:no.nrk/search-event/jsonschema/1-0-0\";\n EventSchema3[\"StepEvent\"] = \"iglu:no.nrk.dh/step-event/jsonschema/1-0-0\";\n EventSchema3[\"TimeSpentEvent\"] = \"iglu:no.nrk/time-spent-event/jsonschema/1-0-0\";\n EventSchema3[\"ViewportEvent\"] = \"iglu:no.nrk.dh/viewport-event/jsonschema/1-0-0\";\n return EventSchema3;\n})(EventSchema || {});\nvar EntitySchema = /* @__PURE__ */ ((EntitySchema2) => {\n EntitySchema2[\"Bridge\"] = \"iglu:no.nrk/bridge/jsonschema/1-0-0\";\n EntitySchema2[\"ClientID\"] = \"iglu:no.nrk.innlogging/client-id/jsonschema/1-0-0\";\n EntitySchema2[\"Content\"] = \"iglu:no.nrk/content/jsonschema/1-0-1\";\n EntitySchema2[\"Experiment\"] = \"iglu:no.nrk/experiment/jsonschema/1-0-0\";\n EntitySchema2[\"Link\"] = \"iglu:no.nrk/link/jsonschema/2-0-0\";\n EntitySchema2[\"NrkSession\"] = \"iglu:no.nrk/nrk-session/jsonschema/1-0-0\";\n EntitySchema2[\"NrkUser\"] = \"iglu:no.nrk/nrk-user/jsonschema/1-0-0\";\n EntitySchema2[\"Plug\"] = \"iglu:no.nrk/plug/jsonschema/3-0-1\";\n EntitySchema2[\"PreviousWebPage\"] = \"iglu:no.nrk/previous-web-page/jsonschema/1-0-0\";\n EntitySchema2[\"RegistrationContext\"] = \"iglu:no.nrk.innlogging/registration-context/jsonschema/1-0-0\";\n EntitySchema2[\"SearchResult\"] = \"iglu:no.nrk/search-result/jsonschema/1-0-1\";\n EntitySchema2[\"Service\"] = \"iglu:no.nrk/service/jsonschema/2-0-0\";\n EntitySchema2[\"Application\"] = \"iglu:com.snowplowanalytics.mobile/application/jsonschema/1-0-0\";\n return EntitySchema2;\n})(EntitySchema || {});\n\n// src/nrk-base-tracker.ts\nimport cuid from \"cuid\";\nvar NrkBaseTracker = class {\n constructor(snowplow, config) {\n this.sharedEntities = {};\n var _a, _b, _c;\n this.snowplow = snowplow;\n this.trackerId = (_a = config.trackerId) != null ? _a : cuid.slug();\n this.setSharedEntity(\"iglu:no.nrk/service/jsonschema/2-0-0\" /* Service */, { id: config.serviceId, environment: (_b = config.environment) != null ? _b : null });\n if (config.appVersion && config.appBuild) {\n this.setSharedEntity(\"iglu:com.snowplowanalytics.mobile/application/jsonschema/1-0-0\" /* Application */, { build: config.appBuild, version: config.appVersion });\n }\n snowplow.newTracker(this.trackerId, config.collectorUrl, {\n postPath: \"/nrk/wd6\",\n appId: config.appId,\n plugins: config.plugins,\n platform: (_c = config.platform) != null ? _c : \"web\",\n contexts: {\n webPage: config.disableWebContext !== true\n },\n stateStorageStrategy: config.disableLocalStorage ? \"cookie\" : void 0\n });\n }\n /**\n * Track page view.\n */\n trackPageView(contentEntity) {\n if (contentEntity) {\n this.snowplow.trackPageView(\n {\n context: entitiesToContexts(__spreadProps(__spreadValues({}, this.sharedEntities), {\n [\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */]: contentEntity\n }))\n },\n [this.trackerId]\n );\n } else {\n this.snowplow.trackPageView({ context: entitiesToContexts(this.sharedEntities) }, [this.trackerId]);\n }\n }\n /**\n * Generic track event for custom schemas, typed up to only support NRK\n * events and entities. All shared entities are included, and can be\n * overridden by specified entities.\n */\n trackSchemaEvent(schema, data, entities) {\n const context = entitiesToContexts(__spreadValues(__spreadValues({}, this.sharedEntities), entities));\n this.snowplow.trackSelfDescribingEvent(\n {\n event: { schema, data: __spreadValues({}, data) },\n context\n },\n [this.trackerId]\n );\n }\n /**\n * Send a standard structured event.\n */\n trackEvent(data, entities) {\n const context = entitiesToContexts(__spreadValues(__spreadValues({}, this.sharedEntities), entities));\n this.snowplow.trackStructEvent(__spreadProps(__spreadValues({}, data), { context }), [this.trackerId]);\n }\n /**\n * Set the logged in user.\n */\n setUser(userId) {\n this.snowplow.setUserId(userId, [this.trackerId]);\n this.setSharedEntity(\"iglu:no.nrk/nrk-user/jsonschema/1-0-0\" /* NrkUser */, { id: userId });\n }\n /**\n * Clear the user when logged out.\n */\n clearUser() {\n this.snowplow.setUserId(null, [this.trackerId]);\n this.removeSharedEntity(\"iglu:no.nrk/nrk-user/jsonschema/1-0-0\" /* NrkUser */);\n }\n /**\n * Add a plugin to the tracker.\n */\n addPlugin(configuration) {\n this.snowplow.addPlugin(configuration, [this.trackerId]);\n }\n /**\n * Set data for a shared entity for all events of this tracker.\n *\n * The `snowplow.addGlobalContexts()` method could potentially be used, but\n * `removeGlobalContexts()` requires the data as argument as well (awkward),\n * and there's no `getGlobalContexts()` to help with that.\n */\n setSharedEntity(schema, data) {\n this.sharedEntities[schema] = data;\n }\n /**\n * Returns any shared entities for an entity schema.\n */\n getSharedEntity(schema) {\n return this.sharedEntities[schema];\n }\n /**\n * Remove all shared entities for an entity schema.\n */\n removeSharedEntity(schema) {\n if (schema in this.sharedEntities) {\n delete this.sharedEntities[schema];\n }\n }\n};\nfunction entitiesToContexts(entities) {\n const contexts = [];\n Object.entries(entities).forEach(([schema, data]) => {\n const dataList = Array.isArray(data) ? data : [data];\n for (const entityData of dataList) {\n contexts.push({ schema, data: __spreadValues({}, entityData) });\n }\n });\n return contexts;\n}\n\n// src/nrk-player-tracker.ts\nvar NrkPlayerTracker = class extends NrkBaseTracker {\n /**\n * Tell the tracker what the current media is.\n */\n setMedia(mediaId, details) {\n const content = { id: mediaId };\n if (details == null ? void 0 : details.source) {\n content.source = details == null ? void 0 : details.source;\n }\n if (details == null ? void 0 : details.kind) {\n content.kind = details == null ? void 0 : details.kind;\n }\n this.setSharedEntity(\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */, content);\n if (details == null ? void 0 : details.channelId) {\n this.channelId = details.channelId;\n }\n if (details && \"autoplay\" in details && details.autoplay !== void 0) {\n this.autoplay = details.autoplay;\n }\n }\n /**\n * Set autoplay for the current media.\n */\n setMediaAutoplay(autoplay) {\n this.autoplay = autoplay;\n }\n /**\n * Tell the tracker that media is unknown (like for gaps in the EPG).\n */\n setUnknownMedia(channelId) {\n this.setSharedEntity(\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */, { id: \"unknown\", kind: \"unknown\" });\n this.channelId = channelId;\n }\n /**\n * Send a playback event of kind 'start'.\n *\n * Should be called when time starts running:\n * - After changing media.\n * - After user pauses playback.\n * - At replay.\n */\n sendStartEvent(startTime, live) {\n if (this.getSharedEntity(\"iglu:no.nrk/content/jsonschema/1-0-1\" /* Content */) === void 0) {\n throw new Error(\"Must use setMedia() first!\");\n }\n const start = Math.max(0, Math.floor(startTime));\n this.trackSchemaEvent(\"iglu:no.nrk/playback-event/jsonschema/1-0-0\" /* PlaybackEvent */, {\n kind: \"start\" /* Start */,\n startTime: start,\n endTime: start,\n autoplay: this.autoplay,\n live,\n channelId: this.channelId\n });\n }\n /**\n * Send a playback event of kind 'progress'.\n *\n * Should be called when time stops for any reason other than complete or\n * exit.\n */\n sendProgressEvent(startTime, endTime, live) {\n this.sendPlaybackEvent(\"progress\" /* Progress */, startTime, endTime, live);\n }\n /**\n * Send a playback event of kind 'complete'.\n *\n * Should be called when:\n * - Playback reaches the end (100%) of the media (for ODM it stops, for\n * channels it continues to play the next program in the EPG).\n * - When a skip-to-next media function is invoked when binging.\n */\n sendCompleteEvent(startTime, endTime, live) {\n this.sendPlaybackEvent(\"complete\" /* Complete */, startTime, endTime != null ? endTime : startTime, live);\n }\n /**\n * Send a playback event of kind 'exit'.\n *\n * Should be called when leaving the media before a 'complete'-event is sent,\n * including when seeking away from a program in the EPG to another.\n */\n sendExitEvent(startTime, endTime, live) {\n this.sendPlaybackEvent(\"exit\" /* Exit */, startTime, endTime != null ? endTime : startTime, live);\n }\n sendPlaybackEvent(kind, startTime, endTime, live) {\n const start = Math.max(0, Math.floor(startTime));\n const end = Math.max(0, Math.floor(endTime));\n if (start === end && kind === \"progress\" /* Progress */) {\n return;\n }\n if (start > end) {\n throw new Error(`Start time can't be after end time (${start} vs ${end}). Event was ${kind}`);\n }\n this.trackSchemaEvent(\"iglu:no.nrk/playback-event/jsonschema/1-0-0\" /* PlaybackEvent */, {\n kind,\n startTime: start,\n endTime: end,\n live,\n channelId: this.channelId\n });\n }\n};\n\n// src/service-id.ts\nvar ServiceID = /* @__PURE__ */ ((ServiceID2) => {\n ServiceID2[\"Embed\"] = \"embed\";\n ServiceID2[\"Nrkbeta\"] = \"nrkbeta\";\n ServiceID2[\"Nrkinnlogging\"] = \"nrkinnlogging\";\n ServiceID2[\"Nrkno\"] = \"nrkno\";\n ServiceID2[\"Nrkp3\"] = \"nrkp3\";\n ServiceID2[\"Nrkradio\"] = \"nrkradio\";\n ServiceID2[\"Nrksuper\"] = \"nrksuper\";\n ServiceID2[\"Nrktv\"] = \"nrktv\";\n ServiceID2[\"Yr\"] = \"yr\";\n return ServiceID2;\n})(ServiceID || {});\n\n// src/snowplow-global.ts\nvar SnowplowGlobal = class {\n constructor() {\n this.snowplow = window.snowplow;\n if (this.snowplow === void 0) {\n throw new Error(\"There is no global Snowplow function.\");\n }\n }\n /**\n * Check if the global API is available (provided by the \"Snowplow tag\"). No\n * distinction is made between sp.js and sp.lite.js.\n */\n static isAvailable() {\n return window.snowplow !== void 0;\n }\n /**\n * Modify newTracker() to support adding plugins via the tracker\n * configuration. See \"Creating your own plugins\" in the JavaScript tracker\n * Snowplow docs.\n *\n * Note: The tracker configuration hasn't been thoroughly checked for\n * inconsistencies between the global API and @snowplow/browser-tracker.\n * There might be issues.\n */\n newTracker(trackerId, collectorUrl, configuration) {\n this.snowplow(\"newTracker\", trackerId, collectorUrl, configuration);\n if ((configuration == null ? void 0 : configuration.plugins) !== void 0) {\n configuration.plugins.forEach((plugin) => {\n this.addPlugin({ plugin }, [trackerId]);\n });\n }\n }\n setUserId(...args) {\n this.proxy(\"setUserId\", args, 2);\n }\n trackPageView(...args) {\n this.proxy(\"trackPageView\", args, 2);\n }\n trackSelfDescribingEvent(...args) {\n this.proxy(\"trackSelfDescribingEvent\", args, 2);\n }\n trackStructEvent(...args) {\n this.proxy(\"trackStructEvent\", args, 2);\n }\n preservePageViewId(...args) {\n this.proxy(\"preservePageViewId\", args, 1);\n }\n addPlugin(config, trackers) {\n const args = [{ Plugin: () => config.plugin }, \"Plugin\", trackers];\n this.proxy(\"addPlugin\", args, args.length);\n }\n /**\n * Make a call to the global Snowplow API, with the specified method and\n * arguments. It only supports methods which have a `trackers` argument as\n * the last (optional) argument.\n *\n * The `trackers` argument of the Snowplow methods is optional and not always\n * in the same position. The `maxArgs` argument specifies the maximum number\n * of arguments the method supports and so in which position the `trackers`\n * argument is, when present. This is necessary in order to transform the use\n * of `trackers` between the Snowplow API and the global API. So if\n * `Args['length']` is `1 | 2`, then `maxArgs` should be 2.\n */\n proxy(method, args, maxArgs) {\n const trackerIds = args.length === maxArgs ? args.pop() : void 0;\n if (trackerIds && trackerIds.length > 0) {\n trackerIds.forEach((trackerId) => {\n this.snowplow(`${method}:${trackerId}`, ...args);\n });\n } else {\n this.snowplow(method, ...args);\n }\n }\n};\nexport {\n ClickEventKind,\n EntitySchema,\n EventSchema,\n ImpressionEventKind,\n NrkBaseTracker,\n NrkPlayerTracker,\n PlaybackEventKind,\n SearchSource,\n ServiceID,\n SnowplowGlobal,\n ViewportEventKind,\n entitiesToContexts\n};\n","import { getBundle } from '@nrk/nrkno-snowplow';\nimport { EntitySchema } from '@nrk/snowplow-web';\nimport { g as getHost } from './shared/dh-snowplow.1ee613bf.mjs';\n\nconst APP_ID = \"no.nrk.dh\";\nfunction resolveOrTimeout(promise, wait) {\n return Promise.race([\n promise.then(() => true),\n new Promise((resolve) => {\n setTimeout(() => {\n resolve(false);\n }, wait);\n })\n ]);\n}\nfunction createTracker(trackerId, { environment, contentContext }) {\n let trackerReady = false;\n let bundle;\n const host = getHost(environment);\n const eventQueue = [];\n const contexts = [\"service\", \"user\"];\n const trackOrQueue = (callback) => {\n if (trackerReady) {\n callback(bundle);\n } else {\n eventQueue.push(callback);\n }\n };\n const trackStructuredEvent = (event) => trackOrQueue(({ NrknoUtils, Snowplow }) => {\n Snowplow.trackStructEvent(\n {\n ...event,\n context: NrknoUtils.context.collect(contexts)\n },\n [trackerId]\n );\n });\n const trackSelfDescribingEvent = (event) => trackOrQueue(\n ({ NrknoUtils, Snowplow }) => Snowplow.trackSelfDescribingEvent(\n {\n event,\n context: NrknoUtils.context.collect(contexts)\n },\n [trackerId]\n )\n );\n getBundle((nrknoBundle) => {\n bundle = nrknoBundle;\n const { NrknoUtils } = nrknoBundle;\n NrknoUtils.newTracker(trackerId, APP_ID, host);\n if (contentContext) {\n const contentContextId = `${trackerId}-${contentContext.id}`;\n contexts.push(contentContextId);\n NrknoUtils.context.set(contentContextId, EntitySchema.Content, {\n source: contentContext.source,\n id: contentContext.id\n });\n }\n resolveOrTimeout(NrknoUtils.trackers.whenReady(\"main-tracker\"), 1e3).then((isResolved) => {\n trackerReady = true;\n if (isResolved === false) {\n console.warn(\"nrkno tracker not available\");\n }\n while (eventQueue.length) {\n const fn = eventQueue.pop();\n fn(bundle);\n }\n return;\n }).catch(console.error);\n });\n return {\n trackSelfDescribingEvent,\n trackStructuredEvent\n };\n}\n\nexport { createTracker, getHost };\n","function getHost(environment = \"development\") {\n if (environment === \"production\") {\n return \"https://data.nrk.no\";\n }\n return \"https://no-nrk-prod1.mini.snplow.net\";\n}\n\nexport { getHost as g };\n","import './polyfills.js'\nimport { getElementTag } from '@nrk/dh-server-libs/get-element-tag'\nimport introscroll from './components/introscroll.js'\nimport spesialmodul from './components/media/spesialmodul.js'\nimport stegvisVideo from '@nrk/dh-basis-stegvis-video'\nimport levendeStillbilde from '@nrk/dh-basis-levende-stillbilde'\nimport { toArray } from '@nrk/dh-basis-common'\nimport { createTracker } from '@nrk/dh-snowplow'\nimport { EventSchema, ViewportEventKind } from '@nrk/snowplow-web'\n\nimport styles from './components/introscroll.module.css'\nimport './components/cards/alt-text.module.css'\nimport './client.module.css'\n\nconst tag = getElementTag(__APP_NAME__, __APP_VERSION__)\n\nfunction safeDefine(elementName, constructor) {\n if (typeof customElements.get(elementName) === 'undefined') {\n customElements.define(elementName, constructor)\n }\n}\n\nexport class AppElement extends HTMLElement {\n name = tag\n #tracker\n #entryObserver\n #exitObserver\n\n connectedCallback() {\n this.initCustomElements()\n\n this.#createTracker()\n this.#startViewportLogger()\n this.addEventListener('dh-basis-scrollhistorie-trigger-activated', this.#handleTriggerActivated)\n }\n\n disconnectedCallback() {\n this.#stopViewportLogger()\n this.removeEventListener(\n 'dh-basis-scrollhistorie-trigger-activated',\n this.#handleTriggerActivated,\n )\n }\n\n async initCustomElements() {\n safeDefine('dh-introscroll', introscroll)\n safeDefine('dh-ints-basis-stegvis-video', stegvisVideo)\n safeDefine('dh-ints-basis-levende-stillbilde', levendeStillbilde)\n safeDefine('dh-ints-spesialmodul', spesialmodul)\n if (\n this.features.lottie &&\n typeof customElements.get('dh-ints-basis-stegvis-lottie') === 'undefined'\n ) {\n const stegvisLottie = (\n await import('@nrk/dh-basis-stegvis-lottie' /* webpackChunkName: \"dh-stegvis-lottie\" */)\n ).default\n\n safeDefine('dh-ints-basis-stegvis-lottie', stegvisLottie)\n }\n\n if (this.features.kart && typeof customElements.get('dh-ints-kart') === 'undefined') {\n const kart = (\n await import('./lib/karthistorie-chunk.js' /* webpackChunkName: \"dh-karthistorie\" */)\n ).default\n\n safeDefine('dh-ints-kart', kart)\n }\n\n if (location.hostname.startsWith('preview') || location.hostname.startsWith('localhost')) {\n toArray(this.querySelectorAll(`.${styles.introscroll__error}`)).forEach((error) => {\n error.style.display = 'block'\n })\n }\n }\n\n #createTracker() {\n if (window.preventTracking) {\n return\n }\n\n if (process.env.DEV) {\n import('@nrk/dh-snowplow/mock').then(({ mock }) => mock()).catch(console.error)\n }\n\n this.#tracker = createTracker('dh-introscroll', {\n environment: process.env.ENVIRONMENT,\n contentContext: {\n source: 'pp',\n id: this.dataset.selfId,\n },\n })\n }\n\n #startViewportLogger() {\n if (window.preventTracking) {\n return\n }\n\n this.#entryObserver = new IntersectionObserver((entries) => {\n if (!entries[0]?.isIntersecting) {\n return\n }\n this.#entryObserver?.disconnect()\n this.#exitObserver?.observe(this)\n this.#tracker?.trackSelfDescribingEvent({\n schema: EventSchema.ViewportEvent,\n data: {\n kind: ViewportEventKind.Entry,\n },\n })\n }, {})\n\n this.#exitObserver = new IntersectionObserver(\n (entries) => {\n if (!entries[0]?.isIntersecting) {\n return\n }\n this.#exitObserver?.disconnect()\n this.#tracker?.trackSelfDescribingEvent({\n schema: EventSchema.ViewportEvent,\n data: {\n kind: ViewportEventKind.Exit,\n },\n })\n },\n {\n threshold: [1],\n // `margin-block: 99000px -100%` setter opp et rektangel over skjermen\n // `margin-inline: 10%` sikrer at komponenter som stikker litt ut på høyre og venstre side trigger threshold på 1\n rootMargin: '99000px 10% -100% 10%',\n },\n )\n\n this.#entryObserver.observe(this)\n }\n\n #handleTriggerActivated = (e) => {\n this.#tracker?.trackSelfDescribingEvent({\n schema: EventSchema.StepEvent,\n data: {\n current: e.detail.triggerIndex + 1,\n total: this.cards.length,\n },\n })\n }\n\n #stopViewportLogger() {\n this.#entryObserver?.disconnect()\n this.#exitObserver?.disconnect()\n }\n\n get cards() {\n return this.querySelectorAll('[data-show-background]')\n }\n\n get features() {\n return JSON.parse(this.getAttribute('features'))\n }\n}\n\nsafeDefine(tag, AppElement)\n"],"names":["installedChunks","installChunk","breakMatches","wsnwMatches","wsnwOffset","watching","sel","el","handlersInitialized","polyfilled","noop","forEach","elements","callback","Array","prototype","call","NextWS_params","this","reset","isWhiteSpaceNoWrap","index","some","range","start","end","recursiveCalcNoWrapOffsetsForLine","includeTag","nodeType","ELEMENT_NODE","window","getComputedStyle","whiteSpace","len","outerHTML","length","push","childNodes","child","innerHTML","COMMENT_NODE","PROCESSING_INSTRUCTION_NODE","calcNoWrapOffsetsForLine","oldWS","lineCharOffset","style","newMatches","match","width","isJustified","currentStyle","textAlign","justify","txt","conWidth","words","trim","split","tmp","document","createElement","appendChild","size","offsetWidth","parentNode","removeChild","wordSpacing","Math","floor","setAttribute","div","isBreakChar","re","exec","indexOf","isBreakOpportunity","findBreakOpportunity","desWidth","dir","c","ret","w","substr","getElementsList","querySelectorAll","tagName","balanceText","brs","br","spans","span","textNode","createTextNode","insertBefore","textContent","removeTags","oldFloat","float","oldDisplay","display","oldPosition","position","oldLH","lineHeight","containerWidth","containerHeight","offsetHeight","nowrapWidth","nowrapHeight","spaceWidth","h","container","bottom","right","height","margin","padding","visibility","overflow","space","fontSize","dims","getBoundingClientRect","getSpaceWidth","remainingText","newText","lineText","shouldJustify","desiredWidth","guessIndex","le","ge","splitIndex","isHyphen","isSoftHyphen","remLines","round","abs","replace","Boolean","updateWatched","selectedElements","join","concat","apply","initHandlers","fn","readyState","addEventListener","attachEvent","func","threshold","execAsap","args","timeout","obj","clearTimeout","setTimeout","debounce","publicInterface","options","watch","balanceTextAndWatch","filter","unwatch","documentElement","textWrap","WebkitTextWrap","MozTextWrap","MsTextWrap","hasTextWrap","fingerprint","pad","getRandomValue","blockSize","base","discreteValues","pow","randomBlock","toString","safeCounter","cuid","Date","getTime","slug","date","counter","slice","print","random","isCuid","stringToCheck","startsWith","isSlug","stringLength","module","exports","env","self","globalCount","Object","keys","clientId","navigator","mimeTypes","userAgent","crypto","msCrypto","lim","getRandomValues","Uint32Array","num","s","wait","immediate","context","timestamp","result","later","last","now","debounced","arguments","callNow","clear","flush","getElementTag","name","version","html","strings","interpolations","str","i","_classPrivateFieldGet","e","t","get","value","classPrivateFieldGet2","_classPrivateFieldGet2","a","n","has","TypeError","_classPrivateFieldSet","r","l","set","writable","_typeof","o","Symbol","iterator","constructor","toPropertyKey","toPrimitive","String","Number","_defineProperty","defineProperty","enumerable","configurable","ownKeys","getOwnPropertySymbols","getOwnPropertyDescriptor","_objectSpread","getOwnPropertyDescriptors","defineProperties","defaultConfig","rootMargin","root","ElementIntersectionObserver","onChange","config","intersections","map","target","isIntersecting","ratio","intersectionObserver","IntersectionObserver","entries","entry","idx","splice","intersectionRatio","elm","observe","disconnect","unobserve","toggleAttribute","boolValue","hasAttribute","removeAttribute","nextValue","proto","closest","Element","matches","msMatchesSelector","webkitMatchesSelector","css","parentElement","toArray","nodeList","dispatchEvent","element","event","detail","undefined","ignore","CustomEvent","bubbles","cancelable","createEvent","initCustomEvent","testReducedMotion","matchMedia","MAX_SAFE_INTEGER","withinRange","current","withinStops","currentTime","stops","targetStop","nrOfStops","uniqueStops","unique","targetTime","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","id","loaded","__webpack_modules__","m","amdO","getter","__esModule","d","definition","key","f","chunkId","Promise","all","reduce","promises","u","miniCssF","prop","hasOwnProperty","toStringTag","nmd","paths","children","p","loadStylesheet","resolve","reject","href","fullhref","existingLinkTags","getElementsByTagName","dataHref","tag","getAttribute","rel","existingStyleTags","findStylesheet","oldTag","linkTag","type","nc","nonce","onerror","onload","errorType","realHref","err","Error","code","request","nextSibling","head","createStylesheet","installedCssChunks","miniCss","then","data","ids","modules","runtime","j","installedChunkData","promise","import","race","ssrOrientation","mode","destroyed","mounted","listeners","portrait","landscape","opts","assign","orientation","getOrientation","update","handleUpdate","bind","throttledUpdate","mount","destroy","removeEventListener","innerHeight","innerWidth","listen","emit","getVh","getHeight","vendor","opera","toLowerCase","platform","test","checkHasVhBug","setProperty","console","error","fixVhBug","dedupeId","dedupeMixin","mixin","mixinId","_base$_appliedMixins","_base$_appliedMixins2","_appliedMixins","extended","_classPrivateMethodInitSpec$1","privateSet","_checkPrivateRedeclaration$1","add","_classPrivateFieldInitSpec","privateMap","privateCollection","_classPrivateMethodGet$1","receiver","VIEWPORT_POSITION_ATTR","VIEWPORT_POSITIONS","ViewportPositionMixin","Base","_observer","_createIntersectionObserver","_disconnectIntersectionObserver","_handleIntersectionChange","WeakMap","WeakSet","super","_ref","intersection","viewportPosition","top","isAbove","observedAttributes","_super$observedAttrib","connectedCallback","_super$connectedCallb","_createIntersectionObserver2","disconnectedCallback","_super$disconnectedCa","_disconnectIntersectionObserver2","viewportContainer","_document$scrollingEl","scrollingElement","viewportIntersectionRoot","isViewport","_navigator","_navigator$includes","isIFrame","location","parent","isChrome","includes","_classPrivateFieldGet3","_classPrivateMethodInitSpec","_checkPrivateRedeclaration","_classStaticPrivateFieldSpecSet","classConstructor","descriptor","_classCheckPrivateStaticAccess","_classCheckPrivateStaticFieldDescriptor","_classApplyDescriptorSet","action","AttributeBindingMixin","_class","_getTargetElements","_boundAttributes","AttributeBindingMixinDef","boundAttributes","attribute","targets","sourceAttribute","targetAttribute","sourceAttributeName","targetAttributeName","attributeChangedCallback","oldValue","newValue","_super$attributeChang","_classApplyDescriptorGet","configuration","targetElements","_classPrivateMethodGet","_getTargetElements2","from","ACTIVE_BACKGROUND_ATTR","ROOT_MARGIN_ATTR","BG_ID_ATTR","SHOW_BACKGROUND_ATTR","STATE_ATTR","isTrigger","isBackground","_activeTriggerIndex","_handleTriggerChange","_prepareBackgrounds","_updateBackgrounds","_getBackgroundId","Scrollhistorie","HTMLElement","activeIntersection","pop","triggerElement","activeBackgroundId","_this$activeBackgroun","attributeName","attributeValue","activeBackground","triggerElements","triggerIndex","backgroundId","instance","backgrounds","_updateBackgrounds2","_prepareBackgrounds2","val","querySelector","background","state","isActive","nextActive","_getBackgroundId2","prevActive","oldMargin","oldPadding","initializeHandlers","getXLPublishedString","publishDateElm","publishDate","annotationElm","styles","_updating","_classPrivateFieldLooseKey","_viewport","_currentPercentage","_debouncedUpdateSizes","_handleFocus","_updateVisiblePercentage","_updateByline","_updateSizes","_updateTitle","Introscroll","_updateByline2","_updateVisiblePercentage2","backgroundElement","find","scrollTo","offsetTop","_classPrivateFieldLooseBase","clientHeight","clientWidth","titleCardContainer","titleCard","textContainer","fontReduce","scrollWidth","_document","fonts","ready","tabIndex","CSS","supports","requestAnimationFrame","prevValue","backgroundColor","loop","percentage","min","max","scrollY","toFixed","authors","publishedString","authorElm","_authNameElm$childNod","authNameElm","authRoleElm","nodeName","role","byline","expandable","authorHTML","author","_t","_","author__name","author__role","expandHTML","_t2","_t3","publish__date","STOPS_ATTR","TARGET_STOP_ATTR","Spesialmodul","prev","next","_updateChildElements","spesialmoduler","spesialmodul","AUTOPLAY_BLOCKED","READY_STATE","isVisible","StegvisVideo","_startSeek","videoElement","paused","play","autoplayBlocked","_handleClick","videoElements","_onReadyStateChange","_disconnecting","hasValue","_stateChanged","_viewportChanged","prevState","nextState","_gotoStart","_gotoEnd","_paused","_preload","_shouldPlay","_this$videoElement","inViewport","load","duration","isFinite","_enableSeekOnReducedMotion","_reducedMotionSeekEnabled","pause","catch","prevTime","reducedMotion","invisibleVideoElements","video","invisibleVideo","decimals","multiplier","dt","buffer","ceil","speed","_calculateSpeed","direction","playbackRate","nextTime","DISABLE_FORCED_ATTRIBUTES_ATTR","IS_PAUSED","offsetParent","LevendeStillbilde","_visibleVideoElement","isPaused","_playVideo","_pauseVideo","_updateVisibleVideoElement","_setVideoAttributes","_setEventListeners","_removeEventListeners","_updatePlayState","_handleResize","_handlePlayChange","nextVisibleVideo","_shouldPreload","disableForcedAttributes","_this$_visibleVideoEl","_this$_visibleVideoEl2","_this$_visibleVideoEl3","propertyIsEnumerable","staticSnowplowRoot","staticSnowplowMajorVersion","globalKey","getBundle","globalThis","cb","q","src","script","async","loadOnce","ViewportEventKind2","EventSchema3","EntitySchema2","APP_ID","createTracker","trackerId","environment","contentContext","bundle","trackerReady","host","getHost","eventQueue","contexts","trackOrQueue","nrknoBundle","NrknoUtils","newTracker","contentContextId","Content","source","trackers","whenReady","isResolved","warn","trackSelfDescribingEvent","Snowplow","collect","trackStructuredEvent","trackStructEvent","__APP_NAME__","__APP_VERSION__","safeDefine","elementName","customElements","define","_tracker","_entryObserver","_exitObserver","_createTracker","_startViewportLogger","_handleTriggerActivated","_stopViewportLogger","AppElement","_stopViewportLogger2","_startViewportLogger2","_createTracker2","_classPrivateFieldLoo","schema","EventSchema","StepEvent","total","cards","initCustomElements","introscroll","stegvisVideo","levendeStillbilde","features","lottie","default","kart","hostname","introscroll__error","JSON","parse","preventTracking","process","dataset","selfId","_entries$","_classPrivateFieldLoo2","_classPrivateFieldLoo3","_classPrivateFieldLoo4","ViewportEvent","kind","ViewportEventKind","Entry","_entries$2","_classPrivateFieldLoo5","_classPrivateFieldLoo6","Exit","_classPrivateFieldLoo7","_classPrivateFieldLoo8"],"sourceRoot":""}