{"version":3,"sources":["webpack:///./js/components/init-tabbed-media.ts","webpack:///./js/utils/setMaxHeight.ts","webpack:///./node_modules/lodash-es/isObject.js","webpack:///./node_modules/lodash-es/_freeGlobal.js","webpack:///./node_modules/lodash-es/_root.js","webpack:///./node_modules/lodash-es/now.js","webpack:///./node_modules/lodash-es/_Symbol.js","webpack:///./node_modules/lodash-es/_getRawTag.js","webpack:///./node_modules/lodash-es/_objectToString.js","webpack:///./node_modules/lodash-es/_baseGetTag.js","webpack:///./node_modules/lodash-es/isObjectLike.js","webpack:///./node_modules/lodash-es/isSymbol.js","webpack:///./node_modules/lodash-es/toNumber.js","webpack:///./node_modules/lodash-es/debounce.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/when-dom-ready/dist/index.es2015.js"],"names":["initialiseTabbedMedia","element","autoplayIntervalRef","autoplayInterval","parseFloat","dataset","interval","items","Array","from","querySelectorAll","mediaElements","triggers","enableAutoplay","classList","contains","window","setInterval","activeItem","querySelector","nextItem","nextElementSibling","id","item","length","setVisibleItem","setVisibleMedia","add","disableAutoplay","clearInterval","remove","targetItem","find","getItem","forEach","targetMedia","media","getMedia","updateMaxHeights","container","value","content","applyChange","undoChange","height","getBoundingClientRect","calcMaxHeight","style","maxHeight","transition","setProperty","addEventListener","debounce","trigger","event","preventDefault","target","HTMLElement","IntersectionObserver","entries","entry","intersectionRatio","rootMargin","threshold","observe","whenDomReady","then","document","isObject","type","freeGlobal","global","Object","freeSelf","self","root","Function","now","Date","Symbol","objectProto","prototype","hasOwnProperty","nativeObjectToString","toString","symToStringTag","toStringTag","undefined","getRawTag","isOwn","call","tag","unmasked","e","result","objectToString","baseGetTag","isObjectLike","isSymbol","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","toNumber","other","valueOf","replace","isBinary","test","slice","nativeMax","Math","max","nativeMin","min","func","wait","options","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","apply","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","timeWaiting","remainingWait","debounced","isInvoking","arguments","this","clearTimeout","cancel","flush","g","module","exports","loadedStates","cb","doc","Promise","resolve","done","indexOf","readyState","resume","val"],"mappings":"uHAOA,SAASA,EAAsBC,GAC3B,IAIIC,EAJEC,EAAmBC,WAAWH,EAAQI,QAAQC,UAAY,IAC1DC,EAAQC,MAAMC,KAAKR,EAAQS,iBAAiB,gBAC5CC,EAAgBH,MAAMC,KAAKR,EAAQS,iBAAiB,iBACpDE,EAAWJ,MAAMC,KAAKR,EAAQS,iBAAiB,kBAmBrD,SAASG,IACDZ,EAAQa,UAAUC,SAAS,oBAG/Bb,EAAsBc,OAAOC,aAAY,WAAM,MACrCC,EAmBHjB,EAAQkB,cAAc,yBAlBrBC,EAAWF,aAAH,EAAGA,EAAYG,mBACtBD,IACDA,EAAWb,EAAM,IAErB,IAAMe,EAAE,UAAGF,SAAH,aAAG,EAAUf,QAAQkB,KACxBD,GAAOA,EAAGE,SAGfC,EAAeH,GACfI,EAAgBJ,MACjBnB,GACHF,EAAQa,UAAUa,IAAI,mBAE1B,SAASC,IACLZ,OAAOa,cAAc3B,GACrBD,EAAQa,UAAUgB,OAAO,kBAW7B,SAASL,EAAeH,GACpB,IAAMS,EAPV,SAAiBT,GACb,OAAOf,EAAMyB,MAAK,SAAAT,GAAI,OAAIA,EAAKlB,QAAQkB,OAASD,KAM7BW,CAAQX,GACtBS,IAGLxB,EAAM2B,SAAQ,SAAAX,GAAI,OAAIA,EAAKT,UAAUgB,OAAO,gBAC5CC,EAAWjB,UAAUa,IAAI,cAE7B,SAASD,EAAgBJ,GACrB,IAAMa,EAZV,SAAkBb,GACd,OAAOX,EAAcqB,MAAK,SAAAT,GAAI,OAAIA,EAAKlB,QAAQ+B,QAAUd,KAWrCe,CAASf,GACxBa,IAGLxB,EAAcuB,SAAQ,SAAAX,GAAI,OAAIA,EAAKT,UAAUgB,OAAO,gBACpDK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O,GAChB,OAAOjG,EAAa0F,GAAKzF,MAAK,WAC7B,OAAOgG,OAKK","file":"15-fda3720901c1f0f17362.js","sourcesContent":["import debounce from 'lodash/debounce';\r\nimport whenDomReady from 'when-dom-ready';\r\nimport { setMaxHeight } from '@utils/setMaxHeight';\r\nfunction initialise() {\r\n const elements = Array.from(document.querySelectorAll('.js-tabbed-media'));\r\n elements.forEach(initialiseTabbedMedia);\r\n}\r\nfunction initialiseTabbedMedia(element) {\r\n const autoplayInterval = parseFloat(element.dataset.interval || '');\r\n const items = Array.from(element.querySelectorAll('[data-item]'));\r\n const mediaElements = Array.from(element.querySelectorAll('[data-media]'));\r\n const triggers = Array.from(element.querySelectorAll('[data-target]'));\r\n let autoplayIntervalRef;\r\n // enableAutoplay();\r\n updateMaxHeights();\r\n window.addEventListener('resize', debounce(() => updateMaxHeights(), 100));\r\n triggers.forEach(trigger => {\r\n trigger.addEventListener('click', event => {\r\n event.preventDefault();\r\n if (event.target instanceof HTMLElement) {\r\n const id = event.target.dataset.target;\r\n if (!id || !id.length) {\r\n return;\r\n }\r\n disableAutoplay();\r\n setVisibleItem(id);\r\n setVisibleMedia(id);\r\n }\r\n });\r\n });\r\n function enableAutoplay() {\r\n if (element.classList.contains('is-autoplaying')) {\r\n return;\r\n }\r\n autoplayIntervalRef = window.setInterval(() => {\r\n const activeItem = getActiveItem();\r\n let nextItem = activeItem?.nextElementSibling;\r\n if (!nextItem) {\r\n nextItem = items[0];\r\n }\r\n const id = nextItem?.dataset.item;\r\n if (!id || !id.length) {\r\n return;\r\n }\r\n setVisibleItem(id);\r\n setVisibleMedia(id);\r\n }, autoplayInterval);\r\n element.classList.add('is-autoplaying');\r\n }\r\n function disableAutoplay() {\r\n window.clearInterval(autoplayIntervalRef);\r\n element.classList.remove('is-autoplaying');\r\n }\r\n function getActiveItem() {\r\n return element.querySelector('.is-active[data-item]');\r\n }\r\n function getItem(id) {\r\n return items.find(item => item.dataset.item === id);\r\n }\r\n function getMedia(id) {\r\n return mediaElements.find(item => item.dataset.media === id);\r\n }\r\n function setVisibleItem(id) {\r\n const targetItem = getItem(id);\r\n if (!targetItem) {\r\n return;\r\n }\r\n items.forEach(item => item.classList.remove('is-active'));\r\n targetItem.classList.add('is-active');\r\n }\r\n function setVisibleMedia(id) {\r\n const targetMedia = getMedia(id);\r\n if (!targetMedia) {\r\n return;\r\n }\r\n mediaElements.forEach(item => item.classList.remove('is-active'));\r\n targetMedia.classList.add('is-active');\r\n }\r\n function updateMaxHeights() {\r\n items.forEach(item => {\r\n const content = item.querySelector('[data-content]');\r\n if (!content) {\r\n return;\r\n }\r\n setMaxHeight(item, content, () => {\r\n content.style.maxHeight = 'none';\r\n content.style.transition = 'none';\r\n }, () => {\r\n content.style.maxHeight = '';\r\n content.style.transition = '';\r\n });\r\n });\r\n }\r\n const config = {\r\n rootMargin: '-30px 0px',\r\n threshold: [0, 0.6],\r\n };\r\n const observer = new IntersectionObserver(entries => {\r\n entries.forEach(entry => {\r\n if (entry.intersectionRatio > 0) {\r\n enableAutoplay();\r\n }\r\n else {\r\n disableAutoplay();\r\n }\r\n });\r\n }, config);\r\n observer.observe(element);\r\n}\r\nwhenDomReady().then(initialise);\r\n","/**\r\n * Set the max-height variable value for the container based on the target element.\r\n * @param container\r\n * @param target\r\n * @param applyChange\r\n * @param undoChange\r\n */\r\nexport function setMaxHeight(container, target, applyChange, undoChange) {\r\n const value = calcMaxHeight(target, applyChange, undoChange);\r\n container.style.setProperty('--max-height', `${value}px`);\r\n}\r\n/**\r\n * Calculate the target element's height when changes are applied.\r\n * @param element\r\n * @param applyChange\r\n * @param undoChange\r\n */\r\nexport function calcMaxHeight(element, applyChange, undoChange) {\r\n applyChange();\r\n const height = element.getBoundingClientRect().height;\r\n undoChange();\r\n return height;\r\n}\r\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n","import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","import isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/* eslint no-void: \"off\" */\n\n// Loaded ready states\nvar loadedStates = ['interactive', 'complete'];\n\n// Return Promise\nvar whenDomReady = function whenDomReady(cb, doc) {\n\treturn new Promise(function (resolve) {\n\t\t// Allow doc to be passed in as the lone first param\n\t\tif (cb && typeof cb !== 'function') {\n\t\t\tdoc = cb;\n\t\t\tcb = null;\n\t\t}\n\n\t\t// Use global document if we don't have one\n\t\tdoc = doc || window.document;\n\n\t\t// Handle DOM load\n\t\tvar done = function done() {\n\t\t\treturn resolve(void (cb && setTimeout(cb)));\n\t\t};\n\n\t\t// Resolve now if DOM has already loaded\n\t\t// Otherwise wait for DOMContentLoaded\n\t\tif (loadedStates.indexOf(doc.readyState) !== -1) {\n\t\t\tdone();\n\t\t} else {\n\t\t\tdoc.addEventListener('DOMContentLoaded', done);\n\t\t}\n\t});\n};\n\n// Promise chain helper\nwhenDomReady.resume = function (doc) {\n\treturn function (val) {\n\t\treturn whenDomReady(doc).then(function () {\n\t\t\treturn val;\n\t\t});\n\t};\n};\n\nexport default whenDomReady;\n//# sourceMappingURL=index.es2015.js.map\n"],"sourceRoot":""}