{"version":3,"file":"reveal.js","sources":["../node_modules/core-js/internals/global.js","../node_modules/core-js/internals/fails.js","../node_modules/core-js/internals/descriptors.js","../node_modules/core-js/internals/object-property-is-enumerable.js","../node_modules/core-js/internals/create-property-descriptor.js","../node_modules/core-js/internals/classof-raw.js","../node_modules/core-js/internals/indexed-object.js","../node_modules/core-js/internals/require-object-coercible.js","../node_modules/core-js/internals/to-indexed-object.js","../node_modules/core-js/internals/is-object.js","../node_modules/core-js/internals/to-primitive.js","../node_modules/core-js/internals/has.js","../node_modules/core-js/internals/document-create-element.js","../node_modules/core-js/internals/ie8-dom-define.js","../node_modules/core-js/internals/object-get-own-property-descriptor.js","../node_modules/core-js/internals/an-object.js","../node_modules/core-js/internals/object-define-property.js","../node_modules/core-js/internals/create-non-enumerable-property.js","../node_modules/core-js/internals/set-global.js","../node_modules/core-js/internals/shared-store.js","../node_modules/core-js/internals/inspect-source.js","../node_modules/core-js/internals/internal-state.js","../node_modules/core-js/internals/native-weak-map.js","../node_modules/core-js/internals/shared.js","../node_modules/core-js/internals/uid.js","../node_modules/core-js/internals/shared-key.js","../node_modules/core-js/internals/hidden-keys.js","../node_modules/core-js/internals/engine-v8-version.js","../node_modules/core-js/internals/redefine.js","../node_modules/core-js/internals/path.js","../node_modules/core-js/internals/get-built-in.js","../node_modules/core-js/internals/to-integer.js","../node_modules/core-js/internals/to-length.js","../node_modules/core-js/internals/to-absolute-index.js","../node_modules/core-js/internals/array-includes.js","../node_modules/core-js/internals/object-keys-internal.js","../node_modules/core-js/internals/enum-bug-keys.js","../node_modules/core-js/internals/object-get-own-property-names.js","../node_modules/core-js/internals/object-get-own-property-symbols.js","../node_modules/core-js/internals/own-keys.js","../node_modules/core-js/internals/copy-constructor-properties.js","../node_modules/core-js/internals/is-forced.js","../node_modules/core-js/internals/export.js","../node_modules/core-js/internals/is-array.js","../node_modules/core-js/internals/to-object.js","../node_modules/core-js/internals/create-property.js","../node_modules/core-js/internals/native-symbol.js","../node_modules/core-js/internals/use-symbol-as-uid.js","../node_modules/core-js/internals/well-known-symbol.js","../node_modules/core-js/internals/array-species-create.js","../node_modules/core-js/internals/engine-user-agent.js","../node_modules/core-js/internals/array-method-has-species-support.js","../node_modules/core-js/modules/es.array.concat.js","../node_modules/core-js/internals/a-function.js","../node_modules/core-js/internals/function-bind-context.js","../node_modules/core-js/internals/array-iteration.js","../node_modules/core-js/internals/array-method-is-strict.js","../node_modules/core-js/internals/array-method-uses-to-length.js","../node_modules/core-js/internals/array-for-each.js","../node_modules/core-js/modules/es.array.for-each.js","../node_modules/core-js/modules/es.array.map.js","../node_modules/core-js/internals/object-keys.js","../node_modules/core-js/internals/object-assign.js","../node_modules/core-js/modules/es.object.assign.js","../node_modules/core-js/internals/object-define-properties.js","../node_modules/core-js/internals/object-create.js","../node_modules/core-js/internals/html.js","../node_modules/core-js/internals/object-get-own-property-names-external.js","../node_modules/core-js/internals/well-known-symbol-wrapped.js","../node_modules/core-js/internals/define-well-known-symbol.js","../node_modules/core-js/internals/set-to-string-tag.js","../node_modules/core-js/modules/es.symbol.js","../node_modules/core-js/modules/es.symbol.description.js","../node_modules/core-js/internals/call-with-safe-iteration-closing.js","../node_modules/core-js/internals/iterators.js","../node_modules/core-js/internals/is-array-iterator-method.js","../node_modules/core-js/internals/to-string-tag-support.js","../node_modules/core-js/internals/classof.js","../node_modules/core-js/internals/get-iterator-method.js","../node_modules/core-js/internals/check-correctness-of-iteration.js","../node_modules/core-js/modules/es.array.from.js","../node_modules/core-js/internals/array-from.js","../node_modules/core-js/modules/es.array.index-of.js","../node_modules/core-js/modules/es.array.splice.js","../node_modules/core-js/modules/es.function.name.js","../node_modules/core-js/internals/a-possible-prototype.js","../node_modules/core-js/internals/object-set-prototype-of.js","../node_modules/core-js/internals/inherit-if-required.js","../node_modules/core-js/internals/whitespaces.js","../node_modules/core-js/internals/string-trim.js","../node_modules/core-js/modules/es.number.constructor.js","../node_modules/core-js/internals/object-to-string.js","../node_modules/core-js/modules/es.object.to-string.js","../node_modules/core-js/internals/native-promise-constructor.js","../node_modules/core-js/internals/task.js","../node_modules/core-js/internals/set-species.js","../node_modules/core-js/internals/iterate.js","../node_modules/core-js/internals/species-constructor.js","../node_modules/core-js/internals/engine-is-ios.js","../node_modules/core-js/internals/microtask.js","../node_modules/core-js/modules/es.promise.js","../node_modules/core-js/internals/new-promise-capability.js","../node_modules/core-js/internals/promise-resolve.js","../node_modules/core-js/internals/perform.js","../node_modules/core-js/internals/host-report-errors.js","../node_modules/core-js/internals/an-instance.js","../node_modules/core-js/internals/redefine-all.js","../node_modules/core-js/internals/regexp-flags.js","../node_modules/core-js/internals/regexp-sticky-helpers.js","../node_modules/core-js/internals/regexp-exec.js","../node_modules/core-js/modules/es.regexp.exec.js","../node_modules/core-js/internals/string-multibyte.js","../node_modules/core-js/internals/iterators-core.js","../node_modules/core-js/internals/correct-prototype-getter.js","../node_modules/core-js/internals/object-get-prototype-of.js","../node_modules/core-js/internals/create-iterator-constructor.js","../node_modules/core-js/internals/define-iterator.js","../node_modules/core-js/modules/es.string.iterator.js","../node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js","../node_modules/core-js/internals/advance-string-index.js","../node_modules/core-js/internals/regexp-exec-abstract.js","../node_modules/core-js/modules/es.string.match.js","../node_modules/core-js/internals/is-regexp.js","../node_modules/core-js/modules/es.string.split.js","../node_modules/core-js/internals/string-trim-forced.js","../node_modules/core-js/modules/es.string.trim.js","../node_modules/core-js/modules/web.dom-collections.for-each.js","../node_modules/core-js/internals/dom-iterables.js","../js/utils/constants.js","../node_modules/core-js/modules/es.string.replace.js","../node_modules/core-js/internals/same-value.js","../node_modules/core-js/modules/es.string.search.js","../js/utils/util.js","../js/utils/device.js","../js/controllers/slidecontent.js","../js/controllers/slidenumber.js","../js/utils/color.js","../js/controllers/backgrounds.js","../node_modules/core-js/modules/es.array.filter.js","../node_modules/core-js/modules/es.array.join.js","../node_modules/core-js/internals/array-reduce.js","../node_modules/core-js/modules/es.array.reduce.js","../node_modules/core-js/modules/es.array.slice.js","../node_modules/core-js/modules/es.object.keys.js","../js/controllers/autoanimate.js","../js/controllers/fragments.js","../js/controllers/overview.js","../js/controllers/keyboard.js","../js/controllers/location.js","../js/controllers/controls.js","../js/controllers/progress.js","../js/controllers/pointer.js","../node_modules/core-js/internals/object-to-array.js","../node_modules/core-js/modules/es.object.values.js","../js/utils/loader.js","../js/controllers/plugins.js","../js/controllers/print.js","../js/controllers/touch.js","../js/controllers/focus.js","../js/controllers/notes.js","../node_modules/core-js/internals/add-to-unscopables.js","../node_modules/core-js/modules/es.array.fill.js","../node_modules/core-js/internals/array-fill.js","../js/components/playback.js","../js/config.js","../js/reveal.js","../js/index.js"],"sourcesContent":["var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var fails = require('../internals/fails');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.6.5',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","module.exports = {};\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.github.io/ecma262/#sec-isarray\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n // eslint-disable-next-line no-undef\n && !Symbol.sham\n // eslint-disable-next-line no-undef\n && typeof Symbol.iterator == 'symbol';\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name)) {\n if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];\n else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n","var isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.github.io/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar fails = require('../internals/fails');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';\n\n// We can't use this feature detection in V8 since it causes\n// deoptimization and serious performance degradation\n// https://github.com/zloirock/core-js/issues/679\nvar IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {\n var array = [];\n array[IS_CONCAT_SPREADABLE] = false;\n return array.concat()[0] !== array;\n});\n\nvar SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');\n\nvar isConcatSpreadable = function (O) {\n if (!isObject(O)) return false;\n var spreadable = O[IS_CONCAT_SPREADABLE];\n return spreadable !== undefined ? !!spreadable : isArray(O);\n};\n\nvar FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;\n\n// `Array.prototype.concat` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.concat\n// with adding support of @@isConcatSpreadable and @@species\n$({ target: 'Array', proto: true, forced: FORCED }, {\n concat: function concat(arg) { // eslint-disable-line no-unused-vars\n var O = toObject(this);\n var A = arraySpeciesCreate(O, 0);\n var n = 0;\n var i, k, length, len, E;\n for (i = -1, length = arguments.length; i < length; i++) {\n E = i === -1 ? O : arguments[i];\n if (isConcatSpreadable(E)) {\n len = toLength(E.length);\n if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);\n } else {\n if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);\n createProperty(A, n++, E);\n }\n }\n A.length = n;\n return A;\n }\n});\n","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6)\n};\n","'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\n\nvar defineProperty = Object.defineProperty;\nvar cache = {};\n\nvar thrower = function (it) { throw it; };\n\nmodule.exports = function (METHOD_NAME, options) {\n if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];\n if (!options) options = {};\n var method = [][METHOD_NAME];\n var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;\n var argument0 = has(options, 0) ? options[0] : thrower;\n var argument1 = has(options, 1) ? options[1] : undefined;\n\n return cache[METHOD_NAME] = !!method && !fails(function () {\n if (ACCESSORS && !DESCRIPTORS) return true;\n var O = { length: -1 };\n\n if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });\n else O[1] = 1;\n\n method.call(O, argument0, argument1);\n });\n};\n","'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\nmodule.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n} : [].forEach;\n","'use strict';\nvar $ = require('../internals/export');\nvar forEach = require('../internals/array-for-each');\n\n// `Array.prototype.forEach` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.foreach\n$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {\n forEach: forEach\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar $map = require('../internals/array-iteration').map;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');\n// FF49- issue\nvar USES_TO_LENGTH = arrayMethodUsesToLength('map');\n\n// `Array.prototype.map` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.map\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n map: function map(callbackfn /* , thisArg */) {\n return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\nvar nativeAssign = Object.assign;\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\nmodule.exports = !nativeAssign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : nativeAssign;\n","var $ = require('../internals/export');\nvar assign = require('../internals/object-assign');\n\n// `Object.assign` method\n// https://tc39.github.io/ecma262/#sec-object.assign\n$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {\n assign: assign\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n","var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.github.io/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names').f;\n\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return nativeGetOwnPropertyNames(it);\n } catch (error) {\n return windowNames.slice();\n }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]'\n ? getWindowNames(it)\n : nativeGetOwnPropertyNames(toIndexedObject(it));\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nexports.f = wellKnownSymbol;\n","var path = require('../internals/path');\nvar has = require('../internals/has');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineProperty = require('../internals/object-define-property').f;\n\nmodule.exports = function (NAME) {\n var Symbol = path.Symbol || (path.Symbol = {});\n if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {\n value: wrappedWellKnownSymbolModule.f(NAME)\n });\n};\n","var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar IS_PURE = require('../internals/is-pure');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\nvar fails = require('../internals/fails');\nvar has = require('../internals/has');\nvar isArray = require('../internals/is-array');\nvar isObject = require('../internals/is-object');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar nativeObjectCreate = require('../internals/object-create');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertyNamesExternal = require('../internals/object-get-own-property-names-external');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar shared = require('../internals/shared');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar uid = require('../internals/uid');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar wrappedWellKnownSymbolModule = require('../internals/well-known-symbol-wrapped');\nvar defineWellKnownSymbol = require('../internals/define-well-known-symbol');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar InternalStateModule = require('../internals/internal-state');\nvar $forEach = require('../internals/array-iteration').forEach;\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty(O, P, Attributes);\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!DESCRIPTORS) symbol.description = description;\n return symbol;\n};\n\nvar isSymbol = USE_SYMBOL_AS_UID ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return Object(it) instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPrimitive(P, true);\n anObject(Attributes);\n if (has(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n } return setSymbolDescriptor(O, key, Attributes);\n } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPrimitive(V, true);\n var enumerable = nativePropertyIsEnumerable.call(this, P);\n if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPrimitive(P, true);\n if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {\n result.push(AllSymbols[key]);\n }\n });\n return result;\n};\n\n// `Symbol` constructor\n// https://tc39.github.io/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);\n var tag = uid(description);\n var setter = function (value) {\n if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n return wrap(tag, description);\n };\n\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return getInternalState(this).tag;\n });\n\n redefine($Symbol, 'withoutSetter', function (description) {\n return wrap(uid(description), description);\n });\n\n propertyIsEnumerableModule.f = $propertyIsEnumerable;\n definePropertyModule.f = $defineProperty;\n getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n wrappedWellKnownSymbolModule.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n\n if (DESCRIPTORS) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty($Symbol[PROTOTYPE], 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n if (!IS_PURE) {\n redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n }\n }\n}\n\n$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n // `Symbol.for` method\n // https://tc39.github.io/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = String(key);\n if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.github.io/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () { USE_SETTER = true; },\n useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n // `Object.create` method\n // https://tc39.github.io/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.github.io/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return getOwnPropertySymbolsModule.f(toObject(it));\n }\n});\n\n// `JSON.stringify` method behavior with symbols\n// https://tc39.github.io/ecma262/#sec-json.stringify\nif ($stringify) {\n var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {\n var symbol = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n return $stringify([symbol]) != '[null]'\n // WebKit converts symbol values to JSON as null\n || $stringify({ a: symbol }) != '{}'\n // V8 throws on boxed symbols\n || $stringify(Object(symbol)) != '{}';\n });\n\n $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {\n // eslint-disable-next-line no-unused-vars\n stringify: function stringify(it, replacer, space) {\n var args = [it];\n var index = 1;\n var $replacer;\n while (arguments.length > index) args.push(arguments[index++]);\n $replacer = replacer;\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return $stringify.apply(null, args);\n }\n });\n}\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive\nif (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {\n createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n}\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n","// `Symbol.prototype.description` getter\n// https://tc39.github.io/ecma262/#sec-symbol.prototype.description\n'use strict';\nvar $ = require('../internals/export');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar has = require('../internals/has');\nvar isObject = require('../internals/is-object');\nvar defineProperty = require('../internals/object-define-property').f;\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\n\nvar NativeSymbol = global.Symbol;\n\nif (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||\n // Safari 12 bug\n NativeSymbol().description !== undefined\n)) {\n var EmptyStringDescriptionStore = {};\n // wrap Symbol constructor for correct work with undefined description\n var SymbolWrapper = function Symbol() {\n var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);\n var result = this instanceof SymbolWrapper\n ? new NativeSymbol(description)\n // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'\n : description === undefined ? NativeSymbol() : NativeSymbol(description);\n if (description === '') EmptyStringDescriptionStore[result] = true;\n return result;\n };\n copyConstructorProperties(SymbolWrapper, NativeSymbol);\n var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;\n symbolPrototype.constructor = SymbolWrapper;\n\n var symbolToString = symbolPrototype.toString;\n var native = String(NativeSymbol('test')) == 'Symbol(test)';\n var regexp = /^Symbol\\((.*)\\)[^)]+$/;\n defineProperty(symbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n var symbol = isObject(this) ? this.valueOf() : this;\n var string = symbolToString.call(symbol);\n if (has(EmptyStringDescriptionStore, symbol)) return '';\n var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');\n return desc === '' ? undefined : desc;\n }\n });\n\n $({ global: true, forced: true }, {\n Symbol: SymbolWrapper\n });\n}\n","var anObject = require('../internals/an-object');\n\n// call something on iterator step with safe closing on error\nmodule.exports = function (iterator, fn, value, ENTRIES) {\n try {\n return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (error) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) anObject(returnMethod.call(iterator));\n throw error;\n }\n};\n","module.exports = {};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n","var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line no-throw-literal\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var $ = require('../internals/export');\nvar from = require('../internals/array-from');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.github.io/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n","'use strict';\nvar bind = require('../internals/function-bind-context');\nvar toObject = require('../internals/to-object');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar createProperty = require('../internals/create-property');\nvar getIteratorMethod = require('../internals/get-iterator-method');\n\n// `Array.from` method implementation\n// https://tc39.github.io/ecma262/#sec-array.from\nmodule.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {\n var O = toObject(arrayLike);\n var C = typeof this == 'function' ? this : Array;\n var argumentsLength = arguments.length;\n var mapfn = argumentsLength > 1 ? arguments[1] : undefined;\n var mapping = mapfn !== undefined;\n var iteratorMethod = getIteratorMethod(O);\n var index = 0;\n var length, result, step, iterator, next, value;\n if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);\n // if the target is not iterable or it's an array with the default iterator - use a simple case\n if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {\n iterator = iteratorMethod.call(O);\n next = iterator.next;\n result = new C();\n for (;!(step = next.call(iterator)).done; index++) {\n value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;\n createProperty(result, index, value);\n }\n } else {\n length = toLength(O.length);\n result = new C(length);\n for (;length > index; index++) {\n value = mapping ? mapfn(O[index], index) : O[index];\n createProperty(result, index, value);\n }\n }\n result.length = index;\n return result;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $indexOf = require('../internals/array-includes').indexOf;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar nativeIndexOf = [].indexOf;\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('indexOf');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });\n\n// `Array.prototype.indexOf` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH }, {\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? nativeIndexOf.apply(this, arguments) || 0\n : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toInteger = require('../internals/to-integer');\nvar toLength = require('../internals/to-length');\nvar toObject = require('../internals/to-object');\nvar arraySpeciesCreate = require('../internals/array-species-create');\nvar createProperty = require('../internals/create-property');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar max = Math.max;\nvar min = Math.min;\nvar MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;\nvar MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';\n\n// `Array.prototype.splice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.splice\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n splice: function splice(start, deleteCount /* , ...items */) {\n var O = toObject(this);\n var len = toLength(O.length);\n var actualStart = toAbsoluteIndex(start, len);\n var argumentsLength = arguments.length;\n var insertCount, actualDeleteCount, A, k, from, to;\n if (argumentsLength === 0) {\n insertCount = actualDeleteCount = 0;\n } else if (argumentsLength === 1) {\n insertCount = 0;\n actualDeleteCount = len - actualStart;\n } else {\n insertCount = argumentsLength - 2;\n actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);\n }\n if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {\n throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);\n }\n A = arraySpeciesCreate(O, actualDeleteCount);\n for (k = 0; k < actualDeleteCount; k++) {\n from = actualStart + k;\n if (from in O) createProperty(A, k, O[from]);\n }\n A.length = actualDeleteCount;\n if (insertCount < actualDeleteCount) {\n for (k = actualStart; k < len - actualDeleteCount; k++) {\n from = k + actualDeleteCount;\n to = k + insertCount;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];\n } else if (insertCount > actualDeleteCount) {\n for (k = len - actualDeleteCount; k > actualStart; k--) {\n from = k + actualDeleteCount - 1;\n to = k + insertCount - 1;\n if (from in O) O[to] = O[from];\n else delete O[to];\n }\n }\n for (k = 0; k < insertCount; k++) {\n O[k + actualStart] = arguments[k + 2];\n }\n O.length = len - actualDeleteCount + insertCount;\n return A;\n }\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar defineProperty = require('../internals/object-define-property').f;\n\nvar FunctionPrototype = Function.prototype;\nvar FunctionPrototypeToString = FunctionPrototype.toString;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// Function instances `.name` property\n// https://tc39.github.io/ecma262/#sec-function-instances-name\nif (DESCRIPTORS && !(NAME in FunctionPrototype)) {\n defineProperty(FunctionPrototype, NAME, {\n configurable: true,\n get: function () {\n try {\n return FunctionPrototypeToString.call(this).match(nameRE)[1];\n } catch (error) {\n return '';\n }\n }\n });\n}\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n","var anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","var isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n","// a string of all valid unicode whitespaces\n// eslint-disable-next-line max-len\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n","var requireObjectCoercible = require('../internals/require-object-coercible');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.github.io/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n","'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar has = require('../internals/has');\nvar classof = require('../internals/classof-raw');\nvar inheritIfRequired = require('../internals/inherit-if-required');\nvar toPrimitive = require('../internals/to-primitive');\nvar fails = require('../internals/fails');\nvar create = require('../internals/object-create');\nvar getOwnPropertyNames = require('../internals/object-get-own-property-names').f;\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar defineProperty = require('../internals/object-define-property').f;\nvar trim = require('../internals/string-trim').trim;\n\nvar NUMBER = 'Number';\nvar NativeNumber = global[NUMBER];\nvar NumberPrototype = NativeNumber.prototype;\n\n// Opera ~12 has broken Object#toString\nvar BROKEN_CLASSOF = classof(create(NumberPrototype)) == NUMBER;\n\n// `ToNumber` abstract operation\n// https://tc39.github.io/ecma262/#sec-tonumber\nvar toNumber = function (argument) {\n var it = toPrimitive(argument, false);\n var first, third, radix, maxCode, digits, length, index, code;\n if (typeof it == 'string' && it.length > 2) {\n it = trim(it);\n first = it.charCodeAt(0);\n if (first === 43 || first === 45) {\n third = it.charCodeAt(2);\n if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix\n } else if (first === 48) {\n switch (it.charCodeAt(1)) {\n case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i\n case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i\n default: return +it;\n }\n digits = it.slice(2);\n length = digits.length;\n for (index = 0; index < length; index++) {\n code = digits.charCodeAt(index);\n // parseInt parses a string to a first unavailable symbol\n // but ToNumber should return NaN if a string contains unavailable symbols\n if (code < 48 || code > maxCode) return NaN;\n } return parseInt(digits, radix);\n }\n } return +it;\n};\n\n// `Number` constructor\n// https://tc39.github.io/ecma262/#sec-number-constructor\nif (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {\n var NumberWrapper = function Number(value) {\n var it = arguments.length < 1 ? 0 : value;\n var dummy = this;\n return dummy instanceof NumberWrapper\n // check on 1..constructor(foo) case\n && (BROKEN_CLASSOF ? fails(function () { NumberPrototype.valueOf.call(dummy); }) : classof(dummy) != NUMBER)\n ? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);\n };\n for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (\n // ES3:\n 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +\n // ES2015 (in case, if modules with ES2015 Number statics required before):\n 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +\n 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'\n ).split(','), j = 0, key; keys.length > j; j++) {\n if (has(NativeNumber, key = keys[j]) && !has(NumberWrapper, key)) {\n defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));\n }\n }\n NumberWrapper.prototype = NumberPrototype;\n NumberPrototype.constructor = NumberWrapper;\n redefine(global, NUMBER, NumberWrapper);\n}\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar redefine = require('../internals/redefine');\nvar toString = require('../internals/object-to-string');\n\n// `Object.prototype.toString` method\n// https://tc39.github.io/ecma262/#sec-object.prototype.tostring\nif (!TO_STRING_TAG_SUPPORT) {\n redefine(Object.prototype, 'toString', toString, { unsafe: true });\n}\n","var global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\n\nvar location = global.location;\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(id + '', location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func\n (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (classof(process) == 'process') {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n typeof postMessage == 'function' &&\n !global.importScripts &&\n !fails(post) &&\n location.protocol !== 'file:'\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar callWithSafeIterationClosing = require('../internals/call-with-safe-iteration-closing');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nvar iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {\n var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);\n var iterator, iterFn, index, length, result, next, step;\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = AS_ENTRIES\n ? boundFunction(anObject(step = iterable[index])[0], step[1])\n : boundFunction(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = iterFn.call(iterable);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n\niterate.stop = function (result) {\n return new Result(true, result);\n};\n","var anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.github.io/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar classof = require('../internals/classof-raw');\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar process = global.process;\nvar Promise = global.Promise;\nvar IS_NODE = classof(process) == 'process';\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // Node.js\n if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n } else if (MutationObserver && !IS_IOS) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n then = promise.then;\n notify = function () {\n then.call(promise, flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar isObject = require('../internals/is-object');\nvar aFunction = require('../internals/a-function');\nvar anInstance = require('../internals/an-instance');\nvar classof = require('../internals/classof-raw');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar PromiseConstructor = NativePromise;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar $fetch = getBuiltIn('fetch');\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar IS_NODE = classof(process) == 'process';\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);\n if (!GLOBAL_CORE_JS_PROMISE) {\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (V8_VERSION === 66) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n if (!IS_NODE && typeof PromiseRejectionEvent != 'function') return true;\n }\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = PromiseConstructor.resolve(1);\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n return !(promise.then(function () { /* empty */ }) instanceof FakePromise);\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\n\nvar notify = function (promise, state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(promise, state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (handler = global['on' + name]) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (promise, state) {\n task.call(global, function () {\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (promise, state) {\n task.call(global, function () {\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, promise, state, unwrap) {\n return function (value) {\n fn(promise, state, value, unwrap);\n };\n};\n\nvar internalReject = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(promise, state, true);\n};\n\nvar internalResolve = function (promise, state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (promise === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, promise, wrapper, state),\n bind(internalReject, promise, wrapper, state)\n );\n } catch (error) {\n internalReject(promise, wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(promise, state, false);\n }\n } catch (error) {\n internalReject(promise, { done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aFunction(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, this, state), bind(internalReject, this, state));\n } catch (error) {\n internalReject(this, state, error);\n }\n };\n // eslint-disable-next-line no-unused-vars\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructor.prototype, {\n // `Promise.prototype.then` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(this, state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.github.io/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, promise, state);\n this.reject = bind(internalReject, promise, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && typeof NativePromise == 'function') {\n nativeThen = NativePromise.prototype.then;\n\n // wrap native Promise#then for native async functions\n redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n nativeThen.call(that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // wrap fetch result\n if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {\n // eslint-disable-next-line no-unused-vars\n fetch: function fetch(input /* , init */) {\n return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));\n }\n });\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.github.io/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.github.io/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.github.io/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.github.io/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar aFunction = require('../internals/a-function');\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\n\n// 25.4.1.5 NewPromiseCapability(C)\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","var anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n","module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n","'use strict';\nvar anObject = require('../internals/an-object');\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.dotAll) result += 's';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","'use strict';\n\nvar fails = require('./fails');\n\n// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,\n// so we use an intermediate function.\nfunction RE(s, f) {\n return RegExp(s, f);\n}\n\nexports.UNSUPPORTED_Y = fails(function () {\n // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\n var re = RE('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = RE('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') != null;\n});\n","'use strict';\nvar regexpFlags = require('./regexp-flags');\nvar stickyHelpers = require('./regexp-sticky-helpers');\n\nvar nativeExec = RegExp.prototype.exec;\n// This always refers to the native implementation, because the\n// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,\n// which loads this file before patching the method.\nvar nativeReplace = String.prototype.replace;\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = regexpFlags.call(re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = flags.replace('y', '');\n if (flags.indexOf('g') === -1) {\n flags += 'g';\n }\n\n strCopy = String(str).slice(re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = match.input.slice(charsAdded);\n match[0] = match[0].slice(charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","'use strict';\nvar $ = require('../internals/export');\nvar exec = require('../internals/regexp-exec');\n\n$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {\n exec: exec\n});\n","var toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.{ codePointAt, at }` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","'use strict';\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nif (IteratorPrototype == undefined) IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nif (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {\n createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","var has = require('../internals/has');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.github.io/ecma262/#sec-object.getprototypeof\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar regexpExec = require('../internals/regexp-exec');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$') !== '7';\n});\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n return 'a'.replace(/./, '$0') === '$0';\n})();\n\nvar REPLACE = wellKnownSymbol('replace');\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n return false;\n})();\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nmodule.exports = function (KEY, length, exec, sham) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n (KEY === 'replace' && !(\n REPLACE_SUPPORTS_NAMED_GROUPS &&\n REPLACE_KEEPS_$0 &&\n !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n )) ||\n (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n if (regexp.exec === regexpExec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n }, {\n REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,\n REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n });\n var stringMethod = methods[0];\n var regexMethod = methods[1];\n\n redefine(String.prototype, KEY, stringMethod);\n redefine(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return regexMethod.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return regexMethod.call(string, this); }\n );\n }\n\n if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);\n};\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.github.io/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n","var classof = require('./classof-raw');\nvar regexpExec = require('./regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.github.io/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n\n if (classof(R) !== 'RegExp') {\n throw TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return regexpExec.call(R, S);\n};\n\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toLength = require('../internals/to-length');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@match logic\nfixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {\n return [\n // `String.prototype.match` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.match\n function match(regexp) {\n var O = requireObjectCoercible(this);\n var matcher = regexp == undefined ? undefined : regexp[MATCH];\n return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n },\n // `RegExp.prototype[@@match]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match\n function (regexp) {\n var res = maybeCallNative(nativeMatch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n if (!rx.global) return regExpExec(rx, S);\n\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n var A = [];\n var n = 0;\n var result;\n while ((result = regExpExec(rx, S)) !== null) {\n var matchStr = String(result[0]);\n A[n] = matchStr;\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n n++;\n }\n return n === 0 ? null : A;\n }\n ];\n});\n","var isObject = require('../internals/is-object');\nvar classof = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar MATCH = wellKnownSymbol('match');\n\n// `IsRegExp` abstract operation\n// https://tc39.github.io/ecma262/#sec-isregexp\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar isRegExp = require('../internals/is-regexp');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar speciesConstructor = require('../internals/species-constructor');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar toLength = require('../internals/to-length');\nvar callRegExpExec = require('../internals/regexp-exec-abstract');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\n\nvar arrayPush = [].push;\nvar min = Math.min;\nvar MAX_UINT32 = 0xFFFFFFFF;\n\n// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError\nvar SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });\n\n// @@split logic\nfixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {\n var internalSplit;\n if (\n 'abbc'.split(/(b)*/)[1] == 'c' ||\n 'test'.split(/(?:)/, -1).length != 4 ||\n 'ab'.split(/(?:ab)*/).length != 2 ||\n '.'.split(/(.?)(.?)/).length != 4 ||\n '.'.split(/()()/).length > 1 ||\n ''.split(/.?/).length\n ) {\n // based on es5-shim implementation, need to rework it\n internalSplit = function (separator, limit) {\n var string = String(requireObjectCoercible(this));\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (separator === undefined) return [string];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) {\n return nativeSplit.call(string, separator, lim);\n }\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var match, lastIndex, lastLength;\n while (match = regexpExec.call(separatorCopy, string)) {\n lastIndex = separatorCopy.lastIndex;\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));\n lastLength = match[0].length;\n lastLastIndex = lastIndex;\n if (output.length >= lim) break;\n }\n if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop\n }\n if (lastLastIndex === string.length) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output.length > lim ? output.slice(0, lim) : output;\n };\n // Chakra, V8\n } else if ('0'.split(undefined, 0).length) {\n internalSplit = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);\n };\n } else internalSplit = nativeSplit;\n\n return [\n // `String.prototype.split` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.split\n function split(separator, limit) {\n var O = requireObjectCoercible(this);\n var splitter = separator == undefined ? undefined : separator[SPLIT];\n return splitter !== undefined\n ? splitter.call(separator, O, limit)\n : internalSplit.call(String(O), separator, limit);\n },\n // `RegExp.prototype[@@split]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split\n //\n // NOTE: This cannot be properly polyfilled in engines that don't support\n // the 'y' flag.\n function (regexp, limit) {\n var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n var C = speciesConstructor(rx, RegExp);\n\n var unicodeMatching = rx.unicode;\n var flags = (rx.ignoreCase ? 'i' : '') +\n (rx.multiline ? 'm' : '') +\n (rx.unicode ? 'u' : '') +\n (SUPPORTS_Y ? 'y' : 'g');\n\n // ^(? + rx + ) is needed, in combination with some S slicing, to\n // simulate the 'y' flag.\n var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);\n var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;\n if (lim === 0) return [];\n if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];\n var p = 0;\n var q = 0;\n var A = [];\n while (q < S.length) {\n splitter.lastIndex = SUPPORTS_Y ? q : 0;\n var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));\n var e;\n if (\n z === null ||\n (e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p\n ) {\n q = advanceStringIndex(S, q, unicodeMatching);\n } else {\n A.push(S.slice(p, q));\n if (A.length === lim) return A;\n for (var i = 1; i <= z.length - 1; i++) {\n A.push(z[i]);\n if (A.length === lim) return A;\n }\n q = p = e;\n }\n }\n A.push(S.slice(p));\n return A;\n }\n ];\n}, !SUPPORTS_Y);\n","var fails = require('../internals/fails');\nvar whitespaces = require('../internals/whitespaces');\n\nvar non = '\\u200B\\u0085\\u180E';\n\n// check that a method works with the correct list\n// of whitespaces and has a correct name\nmodule.exports = function (METHOD_NAME) {\n return fails(function () {\n return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;\n });\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $trim = require('../internals/string-trim').trim;\nvar forcedStringTrimMethod = require('../internals/string-trim-forced');\n\n// `String.prototype.trim` method\n// https://tc39.github.io/ecma262/#sec-string.prototype.trim\n$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {\n trim: function trim() {\n return $trim(this);\n }\n});\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar forEach = require('../internals/array-for-each');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n}\n","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","\r\nexport const SLIDES_SELECTOR = '.slides section';\r\nexport const HORIZONTAL_SLIDES_SELECTOR = '.slides>section';\r\nexport const VERTICAL_SLIDES_SELECTOR = '.slides>section.present>section';\r\n\r\n// Methods that may not be invoked via the postMessage API\r\nexport const POST_MESSAGE_METHOD_BLACKLIST = /registerPlugin|registerKeyboardShortcut|addKeyBinding|addEventListener/;\r\n\r\n// Regex for retrieving the fragment style from a class attribute\r\nexport const FRAGMENT_STYLE_REGEX = /fade-(down|up|right|left|out|in-then-out|in-then-semi-out)|semi-fade-out|current-visible|shrink|grow/;","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar advanceStringIndex = require('../internals/advance-string-index');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\nvar max = Math.max;\nvar min = Math.min;\nvar floor = Math.floor;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d\\d?|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d\\d?)/g;\n\nvar maybeToString = function (it) {\n return it === undefined ? it : String(it);\n};\n\n// @@replace logic\nfixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {\n var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;\n var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;\n var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';\n\n return [\n // `String.prototype.replace` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.replace\n function replace(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];\n return replacer !== undefined\n ? replacer.call(searchValue, O, replaceValue)\n : nativeReplace.call(String(O), searchValue, replaceValue);\n },\n // `RegExp.prototype[@@replace]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace\n function (regexp, replaceValue) {\n if (\n (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||\n (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)\n ) {\n var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);\n if (res.done) return res.value;\n }\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var functionalReplace = typeof replaceValue === 'function';\n if (!functionalReplace) replaceValue = String(replaceValue);\n\n var global = rx.global;\n if (global) {\n var fullUnicode = rx.unicode;\n rx.lastIndex = 0;\n }\n var results = [];\n while (true) {\n var result = regExpExec(rx, S);\n if (result === null) break;\n\n results.push(result);\n if (!global) break;\n\n var matchStr = String(result[0]);\n if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);\n }\n\n var accumulatedResult = '';\n var nextSourcePosition = 0;\n for (var i = 0; i < results.length; i++) {\n result = results[i];\n\n var matched = String(result[0]);\n var position = max(min(toInteger(result.index), S.length), 0);\n var captures = [];\n // NOTE: This is equivalent to\n // captures = result.slice(1).map(maybeToString)\n // but for some reason `nativeSlice.call(result, 1, result.length)` (called in\n // the slice polyfill when slicing native arrays) \"doesn't work\" in safari 9 and\n // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.\n for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));\n var namedCaptures = result.groups;\n if (functionalReplace) {\n var replacerArgs = [matched].concat(captures, position, S);\n if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);\n var replacement = String(replaceValue.apply(undefined, replacerArgs));\n } else {\n replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);\n }\n if (position >= nextSourcePosition) {\n accumulatedResult += S.slice(nextSourcePosition, position) + replacement;\n nextSourcePosition = position + matched.length;\n }\n }\n return accumulatedResult + S.slice(nextSourcePosition);\n }\n ];\n\n // https://tc39.github.io/ecma262/#sec-getsubstitution\n function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return nativeReplace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n }\n});\n","// `SameValue` abstract operation\n// https://tc39.github.io/ecma262/#sec-samevalue\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.github.io/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = regexp == undefined ? undefined : regexp[SEARCH];\n return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search\n function (regexp) {\n var res = maybeCallNative(nativeSearch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n","/**\r\n * Extend object a with the properties of object b.\r\n * If there's a conflict, object b takes precedence.\r\n *\r\n * @param {object} a\r\n * @param {object} b\r\n */\r\nexport const extend = ( a, b ) => {\r\n\r\n\tfor( let i in b ) {\r\n\t\ta[ i ] = b[ i ];\r\n\t}\r\n\r\n\treturn a;\r\n\r\n}\r\n\r\n/**\r\n * querySelectorAll but returns an Array.\r\n */\r\nexport const queryAll = ( el, selector ) => {\r\n\r\n\treturn Array.from( el.querySelectorAll( selector ) );\r\n\r\n}\r\n\r\n/**\r\n * classList.toggle() with cross browser support\r\n */\r\nexport const toggleClass = ( el, className, value ) => {\r\n\tif( value ) {\r\n\t\tel.classList.add( className );\r\n\t}\r\n\telse {\r\n\t\tel.classList.remove( className );\r\n\t}\r\n}\r\n\r\n/**\r\n * Utility for deserializing a value.\r\n *\r\n * @param {*} value\r\n * @return {*}\r\n */\r\nexport const deserialize = ( value ) => {\r\n\r\n\tif( typeof value === 'string' ) {\r\n\t\tif( value === 'null' ) return null;\r\n\t\telse if( value === 'true' ) return true;\r\n\t\telse if( value === 'false' ) return false;\r\n\t\telse if( value.match( /^-?[\\d\\.]+$/ ) ) return parseFloat( value );\r\n\t}\r\n\r\n\treturn value;\r\n\r\n}\r\n\r\n/**\r\n * Measures the distance in pixels between point a\r\n * and point b.\r\n *\r\n * @param {object} a point with x/y properties\r\n * @param {object} b point with x/y properties\r\n *\r\n * @return {number}\r\n */\r\nexport const distanceBetween = ( a, b ) => {\r\n\r\n\tlet dx = a.x - b.x,\r\n\t\tdy = a.y - b.y;\r\n\r\n\treturn Math.sqrt( dx*dx + dy*dy );\r\n\r\n}\r\n\r\n/**\r\n * Applies a CSS transform to the target element.\r\n *\r\n * @param {HTMLElement} element\r\n * @param {string} transform\r\n */\r\nexport const transformElement = ( element, transform ) => {\r\n\r\n\telement.style.transform = transform;\r\n\r\n}\r\n\r\n/**\r\n * Element.matches with IE support.\r\n *\r\n * @param {HTMLElement} target The element to match\r\n * @param {String} selector The CSS selector to match\r\n * the element against\r\n *\r\n * @return {Boolean}\r\n */\r\nexport const matches = ( target, selector ) => {\r\n\r\n\tlet matchesMethod = target.matches || target.matchesSelector || target.msMatchesSelector;\r\n\r\n\treturn !!( matchesMethod && matchesMethod.call( target, selector ) );\r\n\r\n}\r\n\r\n/**\r\n * Find the closest parent that matches the given\r\n * selector.\r\n *\r\n * @param {HTMLElement} target The child element\r\n * @param {String} selector The CSS selector to match\r\n * the parents against\r\n *\r\n * @return {HTMLElement} The matched parent or null\r\n * if no matching parent was found\r\n */\r\nexport const closest = ( target, selector ) => {\r\n\r\n\t// Native Element.closest\r\n\tif( typeof target.closest === 'function' ) {\r\n\t\treturn target.closest( selector );\r\n\t}\r\n\r\n\t// Polyfill\r\n\twhile( target ) {\r\n\t\tif( matches( target, selector ) ) {\r\n\t\t\treturn target;\r\n\t\t}\r\n\r\n\t\t// Keep searching\r\n\t\ttarget = target.parentNode;\r\n\t}\r\n\r\n\treturn null;\r\n\r\n}\r\n\r\n/**\r\n * Handling the fullscreen functionality via the fullscreen API\r\n *\r\n * @see http://fullscreen.spec.whatwg.org/\r\n * @see https://developer.mozilla.org/en-US/docs/DOM/Using_fullscreen_mode\r\n */\r\nexport const enterFullscreen = element => {\r\n\r\n\telement = element || document.documentElement;\r\n\r\n\t// Check which implementation is available\r\n\tlet requestMethod = element.requestFullscreen ||\r\n\t\t\t\t\t\telement.webkitRequestFullscreen ||\r\n\t\t\t\t\t\telement.webkitRequestFullScreen ||\r\n\t\t\t\t\t\telement.mozRequestFullScreen ||\r\n\t\t\t\t\t\telement.msRequestFullscreen;\r\n\r\n\tif( requestMethod ) {\r\n\t\trequestMethod.apply( element );\r\n\t}\r\n\r\n}\r\n\r\n/**\r\n * Creates an HTML element and returns a reference to it.\r\n * If the element already exists the existing instance will\r\n * be returned.\r\n *\r\n * @param {HTMLElement} container\r\n * @param {string} tagname\r\n * @param {string} classname\r\n * @param {string} innerHTML\r\n *\r\n * @return {HTMLElement}\r\n */\r\nexport const createSingletonNode = ( container, tagname, classname, innerHTML='' ) => {\r\n\r\n\t// Find all nodes matching the description\r\n\tlet nodes = container.querySelectorAll( '.' + classname );\r\n\r\n\t// Check all matches to find one which is a direct child of\r\n\t// the specified container\r\n\tfor( let i = 0; i < nodes.length; i++ ) {\r\n\t\tlet testNode = nodes[i];\r\n\t\tif( testNode.parentNode === container ) {\r\n\t\t\treturn testNode;\r\n\t\t}\r\n\t}\r\n\r\n\t// If no node was found, create it now\r\n\tlet node = document.createElement( tagname );\r\n\tnode.className = classname;\r\n\tnode.innerHTML = innerHTML;\r\n\tcontainer.appendChild( node );\r\n\r\n\treturn node;\r\n\r\n}\r\n\r\n/**\r\n * Injects the given CSS styles into the DOM.\r\n *\r\n * @param {string} value\r\n */\r\nexport const createStyleSheet = ( value ) => {\r\n\r\n\tlet tag = document.createElement( 'style' );\r\n\ttag.type = 'text/css';\r\n\r\n\tif( value && value.length > 0 ) {\r\n\t\tif( tag.styleSheet ) {\r\n\t\t\ttag.styleSheet.cssText = value;\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttag.appendChild( document.createTextNode( value ) );\r\n\t\t}\r\n\t}\r\n\r\n\tdocument.head.appendChild( tag );\r\n\r\n\treturn tag;\r\n\r\n}\r\n\r\n/**\r\n * Returns a key:value hash of all query params.\r\n */\r\nexport const getQueryHash = () => {\r\n\r\n\tlet query = {};\r\n\r\n\tlocation.search.replace( /[A-Z0-9]+?=([\\w\\.%-]*)/gi, a => {\r\n\t\tquery[ a.split( '=' ).shift() ] = a.split( '=' ).pop();\r\n\t} );\r\n\r\n\t// Basic deserialization\r\n\tfor( let i in query ) {\r\n\t\tlet value = query[ i ];\r\n\r\n\t\tquery[ i ] = deserialize( unescape( value ) );\r\n\t}\r\n\r\n\t// Do not accept new dependencies via query config to avoid\r\n\t// the potential of malicious script injection\r\n\tif( typeof query['dependencies'] !== 'undefined' ) delete query['dependencies'];\r\n\r\n\treturn query;\r\n\r\n}\r\n\r\n/**\r\n * Returns the remaining height within the parent of the\r\n * target element.\r\n *\r\n * remaining height = [ configured parent height ] - [ current parent height ]\r\n *\r\n * @param {HTMLElement} element\r\n * @param {number} [height]\r\n */\r\nexport const getRemainingHeight = ( element, height = 0 ) => {\r\n\r\n\tif( element ) {\r\n\t\tlet newHeight, oldHeight = element.style.height;\r\n\r\n\t\t// Change the .stretch element height to 0 in order find the height of all\r\n\t\t// the other elements\r\n\t\telement.style.height = '0px';\r\n\r\n\t\t// In Overview mode, the parent (.slide) height is set of 700px.\r\n\t\t// Restore it temporarily to its natural height.\r\n\t\telement.parentNode.style.height = 'auto';\r\n\r\n\t\tnewHeight = height - element.parentNode.offsetHeight;\r\n\r\n\t\t// Restore the old height, just in case\r\n\t\telement.style.height = oldHeight + 'px';\r\n\r\n\t\t// Clear the parent (.slide) height. .removeProperty works in IE9+\r\n\t\telement.parentNode.style.removeProperty('height');\r\n\r\n\t\treturn newHeight;\r\n\t}\r\n\r\n\treturn height;\r\n\r\n}","const UA = navigator.userAgent;\r\nconst testElement = document.createElement( 'div' );\r\n\r\nexport const isMobile = /(iphone|ipod|ipad|android)/gi.test( UA ) ||\r\n\t\t\t\t\t\t( navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1 ); // iPadOS\r\n\r\nexport const isChrome = /chrome/i.test( UA ) && !/edge/i.test( UA );\r\n\r\nexport const isAndroid = /android/gi.test( UA );\r\n\r\n// Flags if we should use zoom instead of transform to scale\r\n// up slides. Zoom produces crisper results but has a lot of\r\n// xbrowser quirks so we only use it in whitelisted browsers.\r\nexport const supportsZoom = 'zoom' in testElement.style && !isMobile &&\r\n\t\t\t\t( isChrome || /Version\\/[\\d\\.]+.*Safari/.test( UA ) );\r\n\r\nexport const supportsHistoryAPI = typeof window.history.replaceState === 'function' && !/PhantomJS/.test( UA );","import { HORIZONTAL_SLIDES_SELECTOR, VERTICAL_SLIDES_SELECTOR } from '../utils/constants.js'\r\nimport { extend, queryAll, closest } from '../utils/util.js'\r\nimport { isMobile } from '../utils/device.js'\r\n\r\n/**\r\n * Handles loading, unloading and playback of slide\r\n * content such as images, videos and iframes.\r\n */\r\nexport default class SlideContent {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t\tthis.startEmbeddedIframe = this.startEmbeddedIframe.bind( this );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Should the given element be preloaded?\r\n\t * Decides based on local element attributes and global config.\r\n\t *\r\n\t * @param {HTMLElement} element\r\n\t */\r\n\tshouldPreload( element ) {\r\n\r\n\t\t// Prefer an explicit global preload setting\r\n\t\tlet preload = this.Reveal.getConfig().preloadIframes;\r\n\r\n\t\t// If no global setting is available, fall back on the element's\r\n\t\t// own preload setting\r\n\t\tif( typeof preload !== 'boolean' ) {\r\n\t\t\tpreload = element.hasAttribute( 'data-preload' );\r\n\t\t}\r\n\r\n\t\treturn preload;\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the given slide is within the configured view\r\n\t * distance. Shows the slide element and loads any content\r\n\t * that is set to load lazily (data-src).\r\n\t *\r\n\t * @param {HTMLElement} slide Slide to show\r\n\t */\r\n\tload( slide, options = {} ) {\r\n\r\n\t\t// Show the slide element\r\n\t\tslide.style.display = this.Reveal.getConfig().display;\r\n\r\n\t\t// Media elements with data-src attributes\r\n\t\tqueryAll( slide, 'img[data-src], video[data-src], audio[data-src], iframe[data-src]' ).forEach( element => {\r\n\t\t\tif( element.tagName !== 'IFRAME' || this.shouldPreload( element ) ) {\r\n\t\t\t\telement.setAttribute( 'src', element.getAttribute( 'data-src' ) );\r\n\t\t\t\telement.setAttribute( 'data-lazy-loaded', '' );\r\n\t\t\t\telement.removeAttribute( 'data-src' );\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t\t// Media elements with children\r\n\t\tqueryAll( slide, 'video, audio' ).forEach( media => {\r\n\t\t\tlet sources = 0;\r\n\r\n\t\t\tqueryAll( media, 'source[data-src]' ).forEach( source => {\r\n\t\t\t\tsource.setAttribute( 'src', source.getAttribute( 'data-src' ) );\r\n\t\t\t\tsource.removeAttribute( 'data-src' );\r\n\t\t\t\tsource.setAttribute( 'data-lazy-loaded', '' );\r\n\t\t\t\tsources += 1;\r\n\t\t\t} );\r\n\r\n\t\t\t// If we rewrote sources for this video/audio element, we need\r\n\t\t\t// to manually tell it to load from its new origin\r\n\t\t\tif( sources > 0 ) {\r\n\t\t\t\tmedia.load();\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\r\n\t\t// Show the corresponding background element\r\n\t\tlet background = slide.slideBackgroundElement;\r\n\t\tif( background ) {\r\n\t\t\tbackground.style.display = 'block';\r\n\r\n\t\t\tlet backgroundContent = slide.slideBackgroundContentElement;\r\n\t\t\tlet backgroundIframe = slide.getAttribute( 'data-background-iframe' );\r\n\r\n\t\t\t// If the background contains media, load it\r\n\t\t\tif( background.hasAttribute( 'data-loaded' ) === false ) {\r\n\t\t\t\tbackground.setAttribute( 'data-loaded', 'true' );\r\n\r\n\t\t\t\tlet backgroundImage = slide.getAttribute( 'data-background-image' ),\r\n\t\t\t\t\tbackgroundVideo = slide.getAttribute( 'data-background-video' ),\r\n\t\t\t\t\tbackgroundVideoLoop = slide.hasAttribute( 'data-background-video-loop' ),\r\n\t\t\t\t\tbackgroundVideoMuted = slide.hasAttribute( 'data-background-video-muted' );\r\n\r\n\t\t\t\t// Images\r\n\t\t\t\tif( backgroundImage ) {\r\n\t\t\t\t\tbackgroundContent.style.backgroundImage = 'url('+ encodeURI( backgroundImage ) +')';\r\n\t\t\t\t}\r\n\t\t\t\t// Videos\r\n\t\t\t\telse if ( backgroundVideo && !this.Reveal.isSpeakerNotes() ) {\r\n\t\t\t\t\tlet video = document.createElement( 'video' );\r\n\r\n\t\t\t\t\tif( backgroundVideoLoop ) {\r\n\t\t\t\t\t\tvideo.setAttribute( 'loop', '' );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif( backgroundVideoMuted ) {\r\n\t\t\t\t\t\tvideo.muted = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Inline video playback works (at least in Mobile Safari) as\r\n\t\t\t\t\t// long as the video is muted and the `playsinline` attribute is\r\n\t\t\t\t\t// present\r\n\t\t\t\t\tif( isMobile ) {\r\n\t\t\t\t\t\tvideo.muted = true;\r\n\t\t\t\t\t\tvideo.autoplay = true;\r\n\t\t\t\t\t\tvideo.setAttribute( 'playsinline', '' );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Support comma separated lists of video sources\r\n\t\t\t\t\tbackgroundVideo.split( ',' ).forEach( source => {\r\n\t\t\t\t\t\tvideo.innerHTML += '';\r\n\t\t\t\t\t} );\r\n\r\n\t\t\t\t\tbackgroundContent.appendChild( video );\r\n\t\t\t\t}\r\n\t\t\t\t// Iframes\r\n\t\t\t\telse if( backgroundIframe && options.excludeIframes !== true ) {\r\n\t\t\t\t\tlet iframe = document.createElement( 'iframe' );\r\n\t\t\t\t\tiframe.setAttribute( 'allowfullscreen', '' );\r\n\t\t\t\t\tiframe.setAttribute( 'mozallowfullscreen', '' );\r\n\t\t\t\t\tiframe.setAttribute( 'webkitallowfullscreen', '' );\r\n\t\t\t\t\tiframe.setAttribute( 'allow', 'autoplay' );\r\n\r\n\t\t\t\t\tiframe.setAttribute( 'data-src', backgroundIframe );\r\n\r\n\t\t\t\t\tiframe.style.width = '100%';\r\n\t\t\t\t\tiframe.style.height = '100%';\r\n\t\t\t\t\tiframe.style.maxHeight = '100%';\r\n\t\t\t\t\tiframe.style.maxWidth = '100%';\r\n\r\n\t\t\t\t\tbackgroundContent.appendChild( iframe );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Start loading preloadable iframes\r\n\t\t\tlet backgroundIframeElement = backgroundContent.querySelector( 'iframe[data-src]' );\r\n\t\t\tif( backgroundIframeElement ) {\r\n\r\n\t\t\t\t// Check if this iframe is eligible to be preloaded\r\n\t\t\t\tif( this.shouldPreload( background ) && !/autoplay=(1|true|yes)/gi.test( backgroundIframe ) ) {\r\n\t\t\t\t\tif( backgroundIframeElement.getAttribute( 'src' ) !== backgroundIframe ) {\r\n\t\t\t\t\t\tbackgroundIframeElement.setAttribute( 'src', backgroundIframe );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Unloads and hides the given slide. This is called when the\r\n\t * slide is moved outside of the configured view distance.\r\n\t *\r\n\t * @param {HTMLElement} slide\r\n\t */\r\n\tunload( slide ) {\r\n\r\n\t\t// Hide the slide element\r\n\t\tslide.style.display = 'none';\r\n\r\n\t\t// Hide the corresponding background element\r\n\t\tlet background = this.Reveal.getSlideBackground( slide );\r\n\t\tif( background ) {\r\n\t\t\tbackground.style.display = 'none';\r\n\r\n\t\t\t// Unload any background iframes\r\n\t\t\tqueryAll( background, 'iframe[src]' ).forEach( element => {\r\n\t\t\t\telement.removeAttribute( 'src' );\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\t// Reset lazy-loaded media elements with src attributes\r\n\t\tqueryAll( slide, 'video[data-lazy-loaded][src], audio[data-lazy-loaded][src], iframe[data-lazy-loaded][src]' ).forEach( element => {\r\n\t\t\telement.setAttribute( 'data-src', element.getAttribute( 'src' ) );\r\n\t\t\telement.removeAttribute( 'src' );\r\n\t\t} );\r\n\r\n\t\t// Reset lazy-loaded media elements with children\r\n\t\tqueryAll( slide, 'video[data-lazy-loaded] source[src], audio source[src]' ).forEach( source => {\r\n\t\t\tsource.setAttribute( 'data-src', source.getAttribute( 'src' ) );\r\n\t\t\tsource.removeAttribute( 'src' );\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Enforces origin-specific format rules for embedded media.\r\n\t */\r\n\tformatEmbeddedContent() {\r\n\r\n\t\tlet _appendParamToIframeSource = ( sourceAttribute, sourceURL, param ) => {\r\n\t\t\tqueryAll( this.Reveal.getSlidesElement(), 'iframe['+ sourceAttribute +'*=\"'+ sourceURL +'\"]' ).forEach( el => {\r\n\t\t\t\tlet src = el.getAttribute( sourceAttribute );\r\n\t\t\t\tif( src && src.indexOf( param ) === -1 ) {\r\n\t\t\t\t\tel.setAttribute( sourceAttribute, src + ( !/\\?/.test( src ) ? '?' : '&' ) + param );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t};\r\n\r\n\t\t// YouTube frames must include \"?enablejsapi=1\"\r\n\t\t_appendParamToIframeSource( 'src', 'youtube.com/embed/', 'enablejsapi=1' );\r\n\t\t_appendParamToIframeSource( 'data-src', 'youtube.com/embed/', 'enablejsapi=1' );\r\n\r\n\t\t// Vimeo frames must include \"?api=1\"\r\n\t\t_appendParamToIframeSource( 'src', 'player.vimeo.com/', 'api=1' );\r\n\t\t_appendParamToIframeSource( 'data-src', 'player.vimeo.com/', 'api=1' );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Start playback of any embedded content inside of\r\n\t * the given element.\r\n\t *\r\n\t * @param {HTMLElement} element\r\n\t */\r\n\tstartEmbeddedContent( element ) {\r\n\r\n\t\tif( element && !this.Reveal.isSpeakerNotes() ) {\r\n\r\n\t\t\t// Restart GIFs\r\n\t\t\tqueryAll( element, 'img[src$=\".gif\"]' ).forEach( el => {\r\n\t\t\t\t// Setting the same unchanged source like this was confirmed\r\n\t\t\t\t// to work in Chrome, FF & Safari\r\n\t\t\t\tel.setAttribute( 'src', el.getAttribute( 'src' ) );\r\n\t\t\t} );\r\n\r\n\t\t\t// HTML5 media elements\r\n\t\t\tqueryAll( element, 'video, audio' ).forEach( el => {\r\n\t\t\t\tif( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Prefer an explicit global autoplay setting\r\n\t\t\t\tlet autoplay = this.Reveal.getConfig().autoPlayMedia;\r\n\r\n\t\t\t\t// If no global setting is available, fall back on the element's\r\n\t\t\t\t// own autoplay setting\r\n\t\t\t\tif( typeof autoplay !== 'boolean' ) {\r\n\t\t\t\t\tautoplay = el.hasAttribute( 'data-autoplay' ) || !!closest( el, '.slide-background' );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif( autoplay && typeof el.play === 'function' ) {\r\n\r\n\t\t\t\t\t// If the media is ready, start playback\r\n\t\t\t\t\tif( el.readyState > 1 ) {\r\n\t\t\t\t\t\tthis.startEmbeddedMedia( { target: el } );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Mobile devices never fire a loaded event so instead\r\n\t\t\t\t\t// of waiting, we initiate playback\r\n\t\t\t\t\telse if( isMobile ) {\r\n\t\t\t\t\t\tlet promise = el.play();\r\n\r\n\t\t\t\t\t\t// If autoplay does not work, ensure that the controls are visible so\r\n\t\t\t\t\t\t// that the viewer can start the media on their own\r\n\t\t\t\t\t\tif( promise && typeof promise.catch === 'function' && el.controls === false ) {\r\n\t\t\t\t\t\t\tpromise.catch( () => {\r\n\t\t\t\t\t\t\t\tel.controls = true;\r\n\r\n\t\t\t\t\t\t\t\t// Once the video does start playing, hide the controls again\r\n\t\t\t\t\t\t\t\tel.addEventListener( 'play', () => {\r\n\t\t\t\t\t\t\t\t\tel.controls = false;\r\n\t\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If the media isn't loaded, wait before playing\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tel.removeEventListener( 'loadeddata', this.startEmbeddedMedia ); // remove first to avoid dupes\r\n\t\t\t\t\t\tel.addEventListener( 'loadeddata', this.startEmbeddedMedia );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\r\n\t\t\t// Normal iframes\r\n\t\t\tqueryAll( element, 'iframe[src]' ).forEach( el => {\r\n\t\t\t\tif( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.startEmbeddedIframe( { target: el } );\r\n\t\t\t} );\r\n\r\n\t\t\t// Lazy loading iframes\r\n\t\t\tqueryAll( element, 'iframe[data-src]' ).forEach( el => {\r\n\t\t\t\tif( closest( el, '.fragment' ) && !closest( el, '.fragment.visible' ) ) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif( el.getAttribute( 'src' ) !== el.getAttribute( 'data-src' ) ) {\r\n\t\t\t\t\tel.removeEventListener( 'load', this.startEmbeddedIframe ); // remove first to avoid dupes\r\n\t\t\t\t\tel.addEventListener( 'load', this.startEmbeddedIframe );\r\n\t\t\t\t\tel.setAttribute( 'src', el.getAttribute( 'data-src' ) );\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Starts playing an embedded video/audio element after\r\n\t * it has finished loading.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tstartEmbeddedMedia( event ) {\r\n\r\n\t\tlet isAttachedToDOM = !!closest( event.target, 'html' ),\r\n\t\t\tisVisible \t\t= !!closest( event.target, '.present' );\r\n\r\n\t\tif( isAttachedToDOM && isVisible ) {\r\n\t\t\tevent.target.currentTime = 0;\r\n\t\t\tevent.target.play();\r\n\t\t}\r\n\r\n\t\tevent.target.removeEventListener( 'loadeddata', this.startEmbeddedMedia );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * \"Starts\" the content of an embedded iframe using the\r\n\t * postMessage API.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tstartEmbeddedIframe( event ) {\r\n\r\n\t\tlet iframe = event.target;\r\n\r\n\t\tif( iframe && iframe.contentWindow ) {\r\n\r\n\t\t\tlet isAttachedToDOM = !!closest( event.target, 'html' ),\r\n\t\t\t\tisVisible \t\t= !!closest( event.target, '.present' );\r\n\r\n\t\t\tif( isAttachedToDOM && isVisible ) {\r\n\r\n\t\t\t\t// Prefer an explicit global autoplay setting\r\n\t\t\t\tlet autoplay = this.Reveal.getConfig().autoPlayMedia;\r\n\r\n\t\t\t\t// If no global setting is available, fall back on the element's\r\n\t\t\t\t// own autoplay setting\r\n\t\t\t\tif( typeof autoplay !== 'boolean' ) {\r\n\t\t\t\t\tautoplay = iframe.hasAttribute( 'data-autoplay' ) || !!closest( iframe, '.slide-background' );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// YouTube postMessage API\r\n\t\t\t\tif( /youtube\\.com\\/embed\\//.test( iframe.getAttribute( 'src' ) ) && autoplay ) {\r\n\t\t\t\t\tiframe.contentWindow.postMessage( '{\"event\":\"command\",\"func\":\"playVideo\",\"args\":\"\"}', '*' );\r\n\t\t\t\t}\r\n\t\t\t\t// Vimeo postMessage API\r\n\t\t\t\telse if( /player\\.vimeo\\.com\\//.test( iframe.getAttribute( 'src' ) ) && autoplay ) {\r\n\t\t\t\t\tiframe.contentWindow.postMessage( '{\"method\":\"play\"}', '*' );\r\n\t\t\t\t}\r\n\t\t\t\t// Generic postMessage API\r\n\t\t\t\telse {\r\n\t\t\t\t\tiframe.contentWindow.postMessage( 'slide:start', '*' );\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Stop playback of any embedded content inside of\r\n\t * the targeted slide.\r\n\t *\r\n\t * @param {HTMLElement} element\r\n\t */\r\n\tstopEmbeddedContent( element, options = {} ) {\r\n\r\n\t\toptions = extend( {\r\n\t\t\t// Defaults\r\n\t\t\tunloadIframes: true\r\n\t\t}, options );\r\n\r\n\t\tif( element && element.parentNode ) {\r\n\t\t\t// HTML5 media elements\r\n\t\t\tqueryAll( element, 'video, audio' ).forEach( el => {\r\n\t\t\t\tif( !el.hasAttribute( 'data-ignore' ) && typeof el.pause === 'function' ) {\r\n\t\t\t\t\tel.setAttribute('data-paused-by-reveal', '');\r\n\t\t\t\t\tel.pause();\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\r\n\t\t\t// Generic postMessage API for non-lazy loaded iframes\r\n\t\t\tqueryAll( element, 'iframe' ).forEach( el => {\r\n\t\t\t\tif( el.contentWindow ) el.contentWindow.postMessage( 'slide:stop', '*' );\r\n\t\t\t\tel.removeEventListener( 'load', this.startEmbeddedIframe );\r\n\t\t\t});\r\n\r\n\t\t\t// YouTube postMessage API\r\n\t\t\tqueryAll( element, 'iframe[src*=\"youtube.com/embed/\"]' ).forEach( el => {\r\n\t\t\t\tif( !el.hasAttribute( 'data-ignore' ) && el.contentWindow && typeof el.contentWindow.postMessage === 'function' ) {\r\n\t\t\t\t\tel.contentWindow.postMessage( '{\"event\":\"command\",\"func\":\"pauseVideo\",\"args\":\"\"}', '*' );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// Vimeo postMessage API\r\n\t\t\tqueryAll( element, 'iframe[src*=\"player.vimeo.com/\"]' ).forEach( el => {\r\n\t\t\t\tif( !el.hasAttribute( 'data-ignore' ) && el.contentWindow && typeof el.contentWindow.postMessage === 'function' ) {\r\n\t\t\t\t\tel.contentWindow.postMessage( '{\"method\":\"pause\"}', '*' );\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tif( options.unloadIframes === true ) {\r\n\t\t\t\t// Unload lazy-loaded iframes\r\n\t\t\t\tqueryAll( element, 'iframe[data-src]' ).forEach( el => {\r\n\t\t\t\t\t// Only removing the src doesn't actually unload the frame\r\n\t\t\t\t\t// in all browsers (Firefox) so we set it to blank first\r\n\t\t\t\t\tel.setAttribute( 'src', 'about:blank' );\r\n\t\t\t\t\tel.removeAttribute( 'src' );\r\n\t\t\t\t} );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n}","/**\r\n * Handles the display of reveal.js' optional slide number.\r\n */\r\nexport default class SlideNumber {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t}\r\n\r\n\trender() {\r\n\r\n\t\tthis.element = document.createElement( 'div' );\r\n\t\tthis.element.className = 'slide-number';\r\n\t\tthis.Reveal.getRevealElement().appendChild( this.element );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the reveal.js config is updated.\r\n\t */\r\n\tconfigure( config, oldConfig ) {\r\n\r\n\t\tlet slideNumberDisplay = 'none';\r\n\t\tif( config.slideNumber && !this.Reveal.isPrintingPDF() ) {\r\n\t\t\tif( config.showSlideNumber === 'all' ) {\r\n\t\t\t\tslideNumberDisplay = 'block';\r\n\t\t\t}\r\n\t\t\telse if( config.showSlideNumber === 'speaker' && this.Reveal.isSpeakerNotes() ) {\r\n\t\t\t\tslideNumberDisplay = 'block';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.element.style.display = slideNumberDisplay;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the slide number to match the current slide.\r\n\t */\r\n\tupdate() {\r\n\r\n\t\t// Update slide number if enabled\r\n\t\tif( this.Reveal.getConfig().slideNumber && this.element ) {\r\n\t\t\tthis.element.innerHTML = this.getSlideNumber();\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the HTML string corresponding to the current slide\r\n\t * number, including formatting.\r\n\t */\r\n\tgetSlideNumber( slide = this.Reveal.getCurrentSlide() ) {\r\n\r\n\t\tlet config = this.Reveal.getConfig();\r\n\t\tlet value;\r\n\t\tlet format = 'h.v';\r\n\r\n\t\tif ( typeof config.slideNumber === 'function' ) {\r\n\t\t\tvalue = config.slideNumber( slide );\r\n\t\t} else {\r\n\t\t\t// Check if a custom number format is available\r\n\t\t\tif( typeof config.slideNumber === 'string' ) {\r\n\t\t\t\tformat = config.slideNumber;\r\n\t\t\t}\r\n\r\n\t\t\t// If there are ONLY vertical slides in this deck, always use\r\n\t\t\t// a flattened slide number\r\n\t\t\tif( !/c/.test( format ) && this.Reveal.getHorizontalSlides().length === 1 ) {\r\n\t\t\t\tformat = 'c';\r\n\t\t\t}\r\n\r\n\t\t\tvalue = [];\r\n\t\t\tswitch( format ) {\r\n\t\t\t\tcase 'c':\r\n\t\t\t\t\tvalue.push( this.Reveal.getSlidePastCount( slide ) + 1 );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'c/t':\r\n\t\t\t\t\tvalue.push( this.Reveal.getSlidePastCount( slide ) + 1, '/', this.Reveal.getTotalSlides() );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tlet indices = this.Reveal.getIndices( slide );\r\n\t\t\t\t\tvalue.push( indices.h + 1 );\r\n\t\t\t\t\tlet sep = format === 'h/v' ? '/' : '.';\r\n\t\t\t\t\tif( this.Reveal.isVerticalSlide( slide ) ) value.push( sep, indices.v + 1 );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet url = '#' + this.Reveal.location.getHash( slide );\r\n\t\treturn this.formatNumber( value[0], value[1], value[2], url );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Applies HTML formatting to a slide number before it's\r\n\t * written to the DOM.\r\n\t *\r\n\t * @param {number} a Current slide\r\n\t * @param {string} delimiter Character to separate slide numbers\r\n\t * @param {(number|*)} b Total slides\r\n\t * @param {HTMLElement} [url='#'+locationHash()] The url to link to\r\n\t * @return {string} HTML string fragment\r\n\t */\r\n\tformatNumber( a, delimiter, b, url = '#' + this.Reveal.location.getHash() ) {\r\n\r\n\t\tif( typeof b === 'number' && !isNaN( b ) ) {\r\n\t\t\treturn `\r\n\t\t\t\t\t${a}\r\n\t\t\t\t\t${delimiter}\r\n\t\t\t\t\t${b}\r\n\t\t\t\t\t`;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn `\r\n\t\t\t\t\t${a}\r\n\t\t\t\t\t`;\r\n\t\t}\r\n\r\n\t}\r\n\r\n}","/**\r\n * Converts various color input formats to an {r:0,g:0,b:0} object.\r\n *\r\n * @param {string} color The string representation of a color\r\n * @example\r\n * colorToRgb('#000');\r\n * @example\r\n * colorToRgb('#000000');\r\n * @example\r\n * colorToRgb('rgb(0,0,0)');\r\n * @example\r\n * colorToRgb('rgba(0,0,0)');\r\n *\r\n * @return {{r: number, g: number, b: number, [a]: number}|null}\r\n */\r\nexport const colorToRgb = ( color ) => {\r\n\r\n\tlet hex3 = color.match( /^#([0-9a-f]{3})$/i );\r\n\tif( hex3 && hex3[1] ) {\r\n\t\thex3 = hex3[1];\r\n\t\treturn {\r\n\t\t\tr: parseInt( hex3.charAt( 0 ), 16 ) * 0x11,\r\n\t\t\tg: parseInt( hex3.charAt( 1 ), 16 ) * 0x11,\r\n\t\t\tb: parseInt( hex3.charAt( 2 ), 16 ) * 0x11\r\n\t\t};\r\n\t}\r\n\r\n\tlet hex6 = color.match( /^#([0-9a-f]{6})$/i );\r\n\tif( hex6 && hex6[1] ) {\r\n\t\thex6 = hex6[1];\r\n\t\treturn {\r\n\t\t\tr: parseInt( hex6.substr( 0, 2 ), 16 ),\r\n\t\t\tg: parseInt( hex6.substr( 2, 2 ), 16 ),\r\n\t\t\tb: parseInt( hex6.substr( 4, 2 ), 16 )\r\n\t\t};\r\n\t}\r\n\r\n\tlet rgb = color.match( /^rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)$/i );\r\n\tif( rgb ) {\r\n\t\treturn {\r\n\t\t\tr: parseInt( rgb[1], 10 ),\r\n\t\t\tg: parseInt( rgb[2], 10 ),\r\n\t\t\tb: parseInt( rgb[3], 10 )\r\n\t\t};\r\n\t}\r\n\r\n\tlet rgba = color.match( /^rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\,\\s*([\\d]+|[\\d]*.[\\d]+)\\s*\\)$/i );\r\n\tif( rgba ) {\r\n\t\treturn {\r\n\t\t\tr: parseInt( rgba[1], 10 ),\r\n\t\t\tg: parseInt( rgba[2], 10 ),\r\n\t\t\tb: parseInt( rgba[3], 10 ),\r\n\t\t\ta: parseFloat( rgba[4] )\r\n\t\t};\r\n\t}\r\n\r\n\treturn null;\r\n\r\n}\r\n\r\n/**\r\n * Calculates brightness on a scale of 0-255.\r\n *\r\n * @param {string} color See colorToRgb for supported formats.\r\n * @see {@link colorToRgb}\r\n */\r\nexport const colorBrightness = ( color ) => {\r\n\r\n\tif( typeof color === 'string' ) color = colorToRgb( color );\r\n\r\n\tif( color ) {\r\n\t\treturn ( color.r * 299 + color.g * 587 + color.b * 114 ) / 1000;\r\n\t}\r\n\r\n\treturn null;\r\n\r\n}","import { queryAll } from '../utils/util.js'\r\nimport { colorToRgb, colorBrightness } from '../utils/color.js'\r\n\r\n/**\r\n * Creates and updates slide backgrounds.\r\n */\r\nexport default class Backgrounds {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t}\r\n\r\n\trender() {\r\n\r\n\t\tthis.element = document.createElement( 'div' );\r\n\t\tthis.element.className = 'backgrounds';\r\n\t\tthis.Reveal.getRevealElement().appendChild( this.element );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Creates the slide background elements and appends them\r\n\t * to the background container. One element is created per\r\n\t * slide no matter if the given slide has visible background.\r\n\t */\r\n\tcreate() {\r\n\r\n\t\tlet printMode = this.Reveal.isPrintingPDF();\r\n\r\n\t\t// Clear prior backgrounds\r\n\t\tthis.element.innerHTML = '';\r\n\t\tthis.element.classList.add( 'no-transition' );\r\n\r\n\t\t// Iterate over all horizontal slides\r\n\t\tthis.Reveal.getHorizontalSlides().forEach( slideh => {\r\n\r\n\t\t\tlet backgroundStack = this.createBackground( slideh, this.element );\r\n\r\n\t\t\t// Iterate over all vertical slides\r\n\t\t\tqueryAll( slideh, 'section' ).forEach( slidev => {\r\n\r\n\t\t\t\tthis.createBackground( slidev, backgroundStack );\r\n\r\n\t\t\t\tbackgroundStack.classList.add( 'stack' );\r\n\r\n\t\t\t} );\r\n\r\n\t\t} );\r\n\r\n\t\t// Add parallax background if specified\r\n\t\tif( this.Reveal.getConfig().parallaxBackgroundImage ) {\r\n\r\n\t\t\tthis.element.style.backgroundImage = 'url(\"' + this.Reveal.getConfig().parallaxBackgroundImage + '\")';\r\n\t\t\tthis.element.style.backgroundSize = this.Reveal.getConfig().parallaxBackgroundSize;\r\n\t\t\tthis.element.style.backgroundRepeat = this.Reveal.getConfig().parallaxBackgroundRepeat;\r\n\t\t\tthis.element.style.backgroundPosition = this.Reveal.getConfig().parallaxBackgroundPosition;\r\n\r\n\t\t\t// Make sure the below properties are set on the element - these properties are\r\n\t\t\t// needed for proper transitions to be set on the element via CSS. To remove\r\n\t\t\t// annoying background slide-in effect when the presentation starts, apply\r\n\t\t\t// these properties after short time delay\r\n\t\t\tsetTimeout( () => {\r\n\t\t\t\tthis.Reveal.getRevealElement().classList.add( 'has-parallax-background' );\r\n\t\t\t}, 1 );\r\n\r\n\t\t}\r\n\t\telse {\r\n\r\n\t\t\tthis.element.style.backgroundImage = '';\r\n\t\t\tthis.Reveal.getRevealElement().classList.remove( 'has-parallax-background' );\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a background for the given slide.\r\n\t *\r\n\t * @param {HTMLElement} slide\r\n\t * @param {HTMLElement} container The element that the background\r\n\t * should be appended to\r\n\t * @return {HTMLElement} New background div\r\n\t */\r\n\tcreateBackground( slide, container ) {\r\n\r\n\t\t// Main slide background element\r\n\t\tlet element = document.createElement( 'div' );\r\n\t\telement.className = 'slide-background ' + slide.className.replace( /present|past|future/, '' );\r\n\r\n\t\t// Inner background element that wraps images/videos/iframes\r\n\t\tlet contentElement = document.createElement( 'div' );\r\n\t\tcontentElement.className = 'slide-background-content';\r\n\r\n\t\telement.appendChild( contentElement );\r\n\t\tcontainer.appendChild( element );\r\n\r\n\t\tslide.slideBackgroundElement = element;\r\n\t\tslide.slideBackgroundContentElement = contentElement;\r\n\r\n\t\t// Syncs the background to reflect all current background settings\r\n\t\tthis.sync( slide );\r\n\r\n\t\treturn element;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Renders all of the visual properties of a slide background\r\n\t * based on the various background attributes.\r\n\t *\r\n\t * @param {HTMLElement} slide\r\n\t */\r\n\tsync( slide ) {\r\n\r\n\t\tlet element = slide.slideBackgroundElement,\r\n\t\t\tcontentElement = slide.slideBackgroundContentElement;\r\n\r\n\t\t// Reset the prior background state in case this is not the\r\n\t\t// initial sync\r\n\t\tslide.classList.remove( 'has-dark-background' );\r\n\t\tslide.classList.remove( 'has-light-background' );\r\n\r\n\t\telement.removeAttribute( 'data-loaded' );\r\n\t\telement.removeAttribute( 'data-background-hash' );\r\n\t\telement.removeAttribute( 'data-background-size' );\r\n\t\telement.removeAttribute( 'data-background-transition' );\r\n\t\telement.style.backgroundColor = '';\r\n\r\n\t\tcontentElement.style.backgroundSize = '';\r\n\t\tcontentElement.style.backgroundRepeat = '';\r\n\t\tcontentElement.style.backgroundPosition = '';\r\n\t\tcontentElement.style.backgroundImage = '';\r\n\t\tcontentElement.style.opacity = '';\r\n\t\tcontentElement.innerHTML = '';\r\n\r\n\t\tlet data = {\r\n\t\t\tbackground: slide.getAttribute( 'data-background' ),\r\n\t\t\tbackgroundSize: slide.getAttribute( 'data-background-size' ),\r\n\t\t\tbackgroundImage: slide.getAttribute( 'data-background-image' ),\r\n\t\t\tbackgroundVideo: slide.getAttribute( 'data-background-video' ),\r\n\t\t\tbackgroundIframe: slide.getAttribute( 'data-background-iframe' ),\r\n\t\t\tbackgroundColor: slide.getAttribute( 'data-background-color' ),\r\n\t\t\tbackgroundRepeat: slide.getAttribute( 'data-background-repeat' ),\r\n\t\t\tbackgroundPosition: slide.getAttribute( 'data-background-position' ),\r\n\t\t\tbackgroundTransition: slide.getAttribute( 'data-background-transition' ),\r\n\t\t\tbackgroundOpacity: slide.getAttribute( 'data-background-opacity' )\r\n\t\t};\r\n\r\n\t\tif( data.background ) {\r\n\t\t\t// Auto-wrap image urls in url(...)\r\n\t\t\tif( /^(http|file|\\/\\/)/gi.test( data.background ) || /\\.(svg|png|jpg|jpeg|gif|bmp)([?#\\s]|$)/gi.test( data.background ) ) {\r\n\t\t\t\tslide.setAttribute( 'data-background-image', data.background );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\telement.style.background = data.background;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Create a hash for this combination of background settings.\r\n\t\t// This is used to determine when two slide backgrounds are\r\n\t\t// the same.\r\n\t\tif( data.background || data.backgroundColor || data.backgroundImage || data.backgroundVideo || data.backgroundIframe ) {\r\n\t\t\telement.setAttribute( 'data-background-hash', data.background +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.backgroundSize +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.backgroundImage +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.backgroundVideo +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.backgroundIframe +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.backgroundColor +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.backgroundRepeat +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.backgroundPosition +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.backgroundTransition +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdata.backgroundOpacity );\r\n\t\t}\r\n\r\n\t\t// Additional and optional background properties\r\n\t\tif( data.backgroundSize ) element.setAttribute( 'data-background-size', data.backgroundSize );\r\n\t\tif( data.backgroundColor ) element.style.backgroundColor = data.backgroundColor;\r\n\t\tif( data.backgroundTransition ) element.setAttribute( 'data-background-transition', data.backgroundTransition );\r\n\r\n\t\tif( slide.hasAttribute( 'data-preload' ) ) element.setAttribute( 'data-preload', '' );\r\n\r\n\t\t// Background image options are set on the content wrapper\r\n\t\tif( data.backgroundSize ) contentElement.style.backgroundSize = data.backgroundSize;\r\n\t\tif( data.backgroundRepeat ) contentElement.style.backgroundRepeat = data.backgroundRepeat;\r\n\t\tif( data.backgroundPosition ) contentElement.style.backgroundPosition = data.backgroundPosition;\r\n\t\tif( data.backgroundOpacity ) contentElement.style.opacity = data.backgroundOpacity;\r\n\r\n\t\t// If this slide has a background color, we add a class that\r\n\t\t// signals if it is light or dark. If the slide has no background\r\n\t\t// color, no class will be added\r\n\t\tlet contrastColor = data.backgroundColor;\r\n\r\n\t\t// If no bg color was found, check the computed background\r\n\t\tif( !contrastColor ) {\r\n\t\t\tlet computedBackgroundStyle = window.getComputedStyle( element );\r\n\t\t\tif( computedBackgroundStyle && computedBackgroundStyle.backgroundColor ) {\r\n\t\t\t\tcontrastColor = computedBackgroundStyle.backgroundColor;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif( contrastColor ) {\r\n\t\t\tlet rgb = colorToRgb( contrastColor );\r\n\r\n\t\t\t// Ignore fully transparent backgrounds. Some browsers return\r\n\t\t\t// rgba(0,0,0,0) when reading the computed background color of\r\n\t\t\t// an element with no background\r\n\t\t\tif( rgb && rgb.a !== 0 ) {\r\n\t\t\t\tif( colorBrightness( contrastColor ) < 128 ) {\r\n\t\t\t\t\tslide.classList.add( 'has-dark-background' );\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tslide.classList.add( 'has-light-background' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the background elements to reflect the current\r\n\t * slide.\r\n\t *\r\n\t * @param {boolean} includeAll If true, the backgrounds of\r\n\t * all vertical slides (not just the present) will be updated.\r\n\t */\r\n\tupdate( includeAll = false ) {\r\n\r\n\t\tlet currentSlide = this.Reveal.getCurrentSlide();\r\n\t\tlet indices = this.Reveal.getIndices();\r\n\r\n\t\tlet currentBackground = null;\r\n\r\n\t\t// Reverse past/future classes when in RTL mode\r\n\t\tlet horizontalPast = this.Reveal.getConfig().rtl ? 'future' : 'past',\r\n\t\t\thorizontalFuture = this.Reveal.getConfig().rtl ? 'past' : 'future';\r\n\r\n\t\t// Update the classes of all backgrounds to match the\r\n\t\t// states of their slides (past/present/future)\r\n\t\tArray.from( this.element.childNodes ).forEach( ( backgroundh, h ) => {\r\n\r\n\t\t\tbackgroundh.classList.remove( 'past', 'present', 'future' );\r\n\r\n\t\t\tif( h < indices.h ) {\r\n\t\t\t\tbackgroundh.classList.add( horizontalPast );\r\n\t\t\t}\r\n\t\t\telse if ( h > indices.h ) {\r\n\t\t\t\tbackgroundh.classList.add( horizontalFuture );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbackgroundh.classList.add( 'present' );\r\n\r\n\t\t\t\t// Store a reference to the current background element\r\n\t\t\t\tcurrentBackground = backgroundh;\r\n\t\t\t}\r\n\r\n\t\t\tif( includeAll || h === indices.h ) {\r\n\t\t\t\tqueryAll( backgroundh, '.slide-background' ).forEach( ( backgroundv, v ) => {\r\n\r\n\t\t\t\t\tbackgroundv.classList.remove( 'past', 'present', 'future' );\r\n\r\n\t\t\t\t\tif( v < indices.v ) {\r\n\t\t\t\t\t\tbackgroundv.classList.add( 'past' );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( v > indices.v ) {\r\n\t\t\t\t\t\tbackgroundv.classList.add( 'future' );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tbackgroundv.classList.add( 'present' );\r\n\r\n\t\t\t\t\t\t// Only if this is the present horizontal and vertical slide\r\n\t\t\t\t\t\tif( h === indices.h ) currentBackground = backgroundv;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} );\r\n\t\t\t}\r\n\r\n\t\t} );\r\n\r\n\t\t// Stop content inside of previous backgrounds\r\n\t\tif( this.previousBackground ) {\r\n\r\n\t\t\tthis.Reveal.slideContent.stopEmbeddedContent( this.previousBackground, { unloadIframes: !this.Reveal.slideContent.shouldPreload( this.previousBackground ) } );\r\n\r\n\t\t}\r\n\r\n\t\t// Start content in the current background\r\n\t\tif( currentBackground ) {\r\n\r\n\t\t\tthis.Reveal.slideContent.startEmbeddedContent( currentBackground );\r\n\r\n\t\t\tlet currentBackgroundContent = currentBackground.querySelector( '.slide-background-content' );\r\n\t\t\tif( currentBackgroundContent ) {\r\n\r\n\t\t\t\tlet backgroundImageURL = currentBackgroundContent.style.backgroundImage || '';\r\n\r\n\t\t\t\t// Restart GIFs (doesn't work in Firefox)\r\n\t\t\t\tif( /\\.gif/i.test( backgroundImageURL ) ) {\r\n\t\t\t\t\tcurrentBackgroundContent.style.backgroundImage = '';\r\n\t\t\t\t\twindow.getComputedStyle( currentBackgroundContent ).opacity;\r\n\t\t\t\t\tcurrentBackgroundContent.style.backgroundImage = backgroundImageURL;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Don't transition between identical backgrounds. This\r\n\t\t\t// prevents unwanted flicker.\r\n\t\t\tlet previousBackgroundHash = this.previousBackground ? this.previousBackground.getAttribute( 'data-background-hash' ) : null;\r\n\t\t\tlet currentBackgroundHash = currentBackground.getAttribute( 'data-background-hash' );\r\n\t\t\tif( currentBackgroundHash && currentBackgroundHash === previousBackgroundHash && currentBackground !== this.previousBackground ) {\r\n\t\t\t\tthis.element.classList.add( 'no-transition' );\r\n\t\t\t}\r\n\r\n\t\t\tthis.previousBackground = currentBackground;\r\n\r\n\t\t}\r\n\r\n\t\t// If there's a background brightness flag for this slide,\r\n\t\t// bubble it to the .reveal container\r\n\t\tif( currentSlide ) {\r\n\t\t\t[ 'has-light-background', 'has-dark-background' ].forEach( classToBubble => {\r\n\t\t\t\tif( currentSlide.classList.contains( classToBubble ) ) {\r\n\t\t\t\t\tthis.Reveal.getRevealElement().classList.add( classToBubble );\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.Reveal.getRevealElement().classList.remove( classToBubble );\r\n\t\t\t\t}\r\n\t\t\t}, this );\r\n\t\t}\r\n\r\n\t\t// Allow the first background to apply without transition\r\n\t\tsetTimeout( () => {\r\n\t\t\tthis.element.classList.remove( 'no-transition' );\r\n\t\t}, 1 );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the position of the parallax background based\r\n\t * on the current slide index.\r\n\t */\r\n\tupdateParallax() {\r\n\r\n\t\tlet indices = this.Reveal.getIndices();\r\n\r\n\t\tif( this.Reveal.getConfig().parallaxBackgroundImage ) {\r\n\r\n\t\t\tlet horizontalSlides = this.Reveal.getHorizontalSlides(),\r\n\t\t\t\tverticalSlides = this.Reveal.getVerticalSlides();\r\n\r\n\t\t\tlet backgroundSize = this.element.style.backgroundSize.split( ' ' ),\r\n\t\t\t\tbackgroundWidth, backgroundHeight;\r\n\r\n\t\t\tif( backgroundSize.length === 1 ) {\r\n\t\t\t\tbackgroundWidth = backgroundHeight = parseInt( backgroundSize[0], 10 );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tbackgroundWidth = parseInt( backgroundSize[0], 10 );\r\n\t\t\t\tbackgroundHeight = parseInt( backgroundSize[1], 10 );\r\n\t\t\t}\r\n\r\n\t\t\tlet slideWidth = this.element.offsetWidth,\r\n\t\t\t\thorizontalSlideCount = horizontalSlides.length,\r\n\t\t\t\thorizontalOffsetMultiplier,\r\n\t\t\t\thorizontalOffset;\r\n\r\n\t\t\tif( typeof this.Reveal.getConfig().parallaxBackgroundHorizontal === 'number' ) {\r\n\t\t\t\thorizontalOffsetMultiplier = this.Reveal.getConfig().parallaxBackgroundHorizontal;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thorizontalOffsetMultiplier = horizontalSlideCount > 1 ? ( backgroundWidth - slideWidth ) / ( horizontalSlideCount-1 ) : 0;\r\n\t\t\t}\r\n\r\n\t\t\thorizontalOffset = horizontalOffsetMultiplier * indices.h * -1;\r\n\r\n\t\t\tlet slideHeight = this.element.offsetHeight,\r\n\t\t\t\tverticalSlideCount = verticalSlides.length,\r\n\t\t\t\tverticalOffsetMultiplier,\r\n\t\t\t\tverticalOffset;\r\n\r\n\t\t\tif( typeof this.Reveal.getConfig().parallaxBackgroundVertical === 'number' ) {\r\n\t\t\t\tverticalOffsetMultiplier = this.Reveal.getConfig().parallaxBackgroundVertical;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tverticalOffsetMultiplier = ( backgroundHeight - slideHeight ) / ( verticalSlideCount-1 );\r\n\t\t\t}\r\n\r\n\t\t\tverticalOffset = verticalSlideCount > 0 ? verticalOffsetMultiplier * indices.v : 0;\r\n\r\n\t\t\tthis.element.style.backgroundPosition = horizontalOffset + 'px ' + -verticalOffset + 'px';\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n}","'use strict';\nvar $ = require('../internals/export');\nvar $filter = require('../internals/array-iteration').filter;\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');\n// Edge 14- issue\nvar USES_TO_LENGTH = arrayMethodUsesToLength('filter');\n\n// `Array.prototype.filter` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.filter\n// with adding support of @@species\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n filter: function filter(callbackfn /* , thisArg */) {\n return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IndexedObject = require('../internals/indexed-object');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeJoin = [].join;\n\nvar ES3_STRINGS = IndexedObject != Object;\nvar STRICT_METHOD = arrayMethodIsStrict('join', ',');\n\n// `Array.prototype.join` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.join\n$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {\n join: function join(separator) {\n return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);\n }\n});\n","var aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar $reduce = require('../internals/array-reduce').left;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduce');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });\n\n// `Array.prototype.reduce` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar toLength = require('../internals/to-length');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar createProperty = require('../internals/create-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support');\nvar arrayMethodUsesToLength = require('../internals/array-method-uses-to-length');\n\nvar HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');\nvar USES_TO_LENGTH = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });\n\nvar SPECIES = wellKnownSymbol('species');\nvar nativeSlice = [].slice;\nvar max = Math.max;\n\n// `Array.prototype.slice` method\n// https://tc39.github.io/ecma262/#sec-array.prototype.slice\n// fallback for not array-like ES3 strings and DOM objects\n$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {\n slice: function slice(start, end) {\n var O = toIndexedObject(this);\n var length = toLength(O.length);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible\n var Constructor, result, n;\n if (isArray(O)) {\n Constructor = O.constructor;\n // cross-realm fallback\n if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {\n Constructor = undefined;\n } else if (isObject(Constructor)) {\n Constructor = Constructor[SPECIES];\n if (Constructor === null) Constructor = undefined;\n }\n if (Constructor === Array || Constructor === undefined) {\n return nativeSlice.call(O, k, fin);\n }\n }\n result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));\n for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n }\n});\n","var $ = require('../internals/export');\nvar toObject = require('../internals/to-object');\nvar nativeKeys = require('../internals/object-keys');\nvar fails = require('../internals/fails');\n\nvar FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\n$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {\n keys: function keys(it) {\n return nativeKeys(toObject(it));\n }\n});\n","import { queryAll, extend, createStyleSheet, matches, closest } from '../utils/util.js'\r\nimport { FRAGMENT_STYLE_REGEX } from '../utils/constants.js'\r\n\r\n// Counter used to generate unique IDs for auto-animated elements\r\nlet autoAnimateCounter = 0;\r\n\r\n/**\r\n * Automatically animates matching elements across\r\n * slides with the [data-auto-animate] attribute.\r\n */\r\nexport default class AutoAnimate {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Runs an auto-animation between the given slides.\r\n\t *\r\n\t * @param {HTMLElement} fromSlide\r\n\t * @param {HTMLElement} toSlide\r\n\t */\r\n\trun( fromSlide, toSlide ) {\r\n\r\n\t\t// Clean up after prior animations\r\n\t\tthis.reset();\r\n\r\n\t\t// Ensure that both slides are auto-animate targets\r\n\t\tif( fromSlide.hasAttribute( 'data-auto-animate' ) && toSlide.hasAttribute( 'data-auto-animate' ) ) {\r\n\r\n\t\t\t// Create a new auto-animate sheet\r\n\t\t\tthis.autoAnimateStyleSheet = this.autoAnimateStyleSheet || createStyleSheet();\r\n\r\n\t\t\tlet animationOptions = this.getAutoAnimateOptions( toSlide );\r\n\r\n\t\t\t// Set our starting state\r\n\t\t\tfromSlide.dataset.autoAnimate = 'pending';\r\n\t\t\ttoSlide.dataset.autoAnimate = 'pending';\r\n\r\n\t\t\t// Flag the navigation direction, needed for fragment buildup\r\n\t\t\tlet allSlides = this.Reveal.getSlides();\r\n\t\t\tanimationOptions.slideDirection = allSlides.indexOf( toSlide ) > allSlides.indexOf( fromSlide ) ? 'forward' : 'backward';\r\n\r\n\t\t\t// Inject our auto-animate styles for this transition\r\n\t\t\tlet css = this.getAutoAnimatableElements( fromSlide, toSlide ).map( elements => {\r\n\t\t\t\treturn this.autoAnimateElements( elements.from, elements.to, elements.options || {}, animationOptions, autoAnimateCounter++ );\r\n\t\t\t} );\r\n\r\n\t\t\t// Animate unmatched elements, if enabled\r\n\t\t\tif( toSlide.dataset.autoAnimateUnmatched !== 'false' && this.Reveal.getConfig().autoAnimateUnmatched === true ) {\r\n\r\n\t\t\t\t// Our default timings for unmatched elements\r\n\t\t\t\tlet defaultUnmatchedDuration = animationOptions.duration * 0.8,\r\n\t\t\t\t\tdefaultUnmatchedDelay = animationOptions.duration * 0.2;\r\n\r\n\t\t\t\tthis.getUnmatchedAutoAnimateElements( toSlide ).forEach( unmatchedElement => {\r\n\r\n\t\t\t\t\tlet unmatchedOptions = this.getAutoAnimateOptions( unmatchedElement, animationOptions );\r\n\t\t\t\t\tlet id = 'unmatched';\r\n\r\n\t\t\t\t\t// If there is a duration or delay set specifically for this\r\n\t\t\t\t\t// element our unmatched elements should adhere to those\r\n\t\t\t\t\tif( unmatchedOptions.duration !== animationOptions.duration || unmatchedOptions.delay !== animationOptions.delay ) {\r\n\t\t\t\t\t\tid = 'unmatched-' + autoAnimateCounter++;\r\n\t\t\t\t\t\tcss.push( `[data-auto-animate=\"running\"] [data-auto-animate-target=\"${id}\"] { transition: opacity ${unmatchedOptions.duration}s ease ${unmatchedOptions.delay}s; }` );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tunmatchedElement.dataset.autoAnimateTarget = id;\r\n\r\n\t\t\t\t}, this );\r\n\r\n\t\t\t\t// Our default transition for unmatched elements\r\n\t\t\t\tcss.push( `[data-auto-animate=\"running\"] [data-auto-animate-target=\"unmatched\"] { transition: opacity ${defaultUnmatchedDuration}s ease ${defaultUnmatchedDelay}s; }` );\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// Setting the whole chunk of CSS at once is the most\r\n\t\t\t// efficient way to do this. Using sheet.insertRule\r\n\t\t\t// is multiple factors slower.\r\n\t\t\tthis.autoAnimateStyleSheet.innerHTML = css.join( '' );\r\n\r\n\t\t\t// Start the animation next cycle\r\n\t\t\trequestAnimationFrame( () => {\r\n\t\t\t\tif( this.autoAnimateStyleSheet ) {\r\n\t\t\t\t\t// This forces our newly injected styles to be applied in Firefox\r\n\t\t\t\t\tgetComputedStyle( this.autoAnimateStyleSheet ).fontWeight;\r\n\r\n\t\t\t\t\ttoSlide.dataset.autoAnimate = 'running';\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\r\n\t\t\tthis.Reveal.dispatchEvent({\r\n\t\t\t\ttype: 'autoanimate',\r\n\t\t\t\tdata: {\r\n\t\t\t\t\tfromSlide,\r\n\t\t\t\t\ttoSlide,\r\n\t\t\t\t\tsheet: this.autoAnimateStyleSheet\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Rolls back all changes that we've made to the DOM so\r\n\t * that as part of animating.\r\n\t */\r\n\treset() {\r\n\r\n\t\t// Reset slides\r\n\t\tqueryAll( this.Reveal.getRevealElement(), '[data-auto-animate]:not([data-auto-animate=\"\"])' ).forEach( element => {\r\n\t\t\telement.dataset.autoAnimate = '';\r\n\t\t} );\r\n\r\n\t\t// Reset elements\r\n\t\tqueryAll( this.Reveal.getRevealElement(), '[data-auto-animate-target]' ).forEach( element => {\r\n\t\t\tdelete element.dataset.autoAnimateTarget;\r\n\t\t} );\r\n\r\n\t\t// Remove the animation sheet\r\n\t\tif( this.autoAnimateStyleSheet && this.autoAnimateStyleSheet.parentNode ) {\r\n\t\t\tthis.autoAnimateStyleSheet.parentNode.removeChild( this.autoAnimateStyleSheet );\r\n\t\t\tthis.autoAnimateStyleSheet = null;\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Creates a FLIP animation where the `to` element starts out\r\n\t * in the `from` element position and animates to its original\r\n\t * state.\r\n\t *\r\n\t * @param {HTMLElement} from\r\n\t * @param {HTMLElement} to\r\n\t * @param {Object} elementOptions Options for this element pair\r\n\t * @param {Object} animationOptions Options set at the slide level\r\n\t * @param {String} id Unique ID that we can use to identify this\r\n\t * auto-animate element in the DOM\r\n\t */\r\n\tautoAnimateElements( from, to, elementOptions, animationOptions, id ) {\r\n\r\n\t\t// 'from' elements are given a data-auto-animate-target with no value,\r\n\t\t// 'to' elements are are given a data-auto-animate-target with an ID\r\n\t\tfrom.dataset.autoAnimateTarget = '';\r\n\t\tto.dataset.autoAnimateTarget = id;\r\n\r\n\t\t// Each element may override any of the auto-animate options\r\n\t\t// like transition easing, duration and delay via data-attributes\r\n\t\tlet options = this.getAutoAnimateOptions( to, animationOptions );\r\n\r\n\t\t// If we're using a custom element matcher the element options\r\n\t\t// may contain additional transition overrides\r\n\t\tif( typeof elementOptions.delay !== 'undefined' ) options.delay = elementOptions.delay;\r\n\t\tif( typeof elementOptions.duration !== 'undefined' ) options.duration = elementOptions.duration;\r\n\t\tif( typeof elementOptions.easing !== 'undefined' ) options.easing = elementOptions.easing;\r\n\r\n\t\tlet fromProps = this.getAutoAnimatableProperties( 'from', from, elementOptions ),\r\n\t\t\ttoProps = this.getAutoAnimatableProperties( 'to', to, elementOptions );\r\n\r\n\t\t// Maintain fragment visibility for matching elements when\r\n\t\t// we're navigating forwards, this way the viewer won't need\r\n\t\t// to step through the same fragments twice\r\n\t\tif( to.classList.contains( 'fragment' ) ) {\r\n\r\n\t\t\t// Don't auto-animate the opacity of fragments to avoid\r\n\t\t\t// conflicts with fragment animations\r\n\t\t\tdelete toProps.styles['opacity'];\r\n\r\n\t\t\tif( from.classList.contains( 'fragment' ) ) {\r\n\r\n\t\t\t\tlet fromFragmentStyle = ( from.className.match( FRAGMENT_STYLE_REGEX ) || [''] )[0];\r\n\t\t\t\tlet toFragmentStyle = ( to.className.match( FRAGMENT_STYLE_REGEX ) || [''] )[0];\r\n\r\n\t\t\t\t// Only skip the fragment if the fragment animation style\r\n\t\t\t\t// remains unchanged\r\n\t\t\t\tif( fromFragmentStyle === toFragmentStyle && animationOptions.slideDirection === 'forward' ) {\r\n\t\t\t\t\tto.classList.add( 'visible', 'disabled' );\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// If translation and/or scaling are enabled, css transform\r\n\t\t// the 'to' element so that it matches the position and size\r\n\t\t// of the 'from' element\r\n\t\tif( elementOptions.translate !== false || elementOptions.scale !== false ) {\r\n\r\n\t\t\tlet presentationScale = this.Reveal.getScale();\r\n\r\n\t\t\tlet delta = {\r\n\t\t\t\tx: ( fromProps.x - toProps.x ) / presentationScale,\r\n\t\t\t\ty: ( fromProps.y - toProps.y ) / presentationScale,\r\n\t\t\t\tscaleX: fromProps.width / toProps.width,\r\n\t\t\t\tscaleY: fromProps.height / toProps.height\r\n\t\t\t};\r\n\r\n\t\t\t// Limit decimal points to avoid 0.0001px blur and stutter\r\n\t\t\tdelta.x = Math.round( delta.x * 1000 ) / 1000;\r\n\t\t\tdelta.y = Math.round( delta.y * 1000 ) / 1000;\r\n\t\t\tdelta.scaleX = Math.round( delta.scaleX * 1000 ) / 1000;\r\n\t\t\tdelta.scaleX = Math.round( delta.scaleX * 1000 ) / 1000;\r\n\r\n\t\t\tlet translate = elementOptions.translate !== false && ( delta.x !== 0 || delta.y !== 0 ),\r\n\t\t\t\tscale = elementOptions.scale !== false && ( delta.scaleX !== 0 || delta.scaleY !== 0 );\r\n\r\n\t\t\t// No need to transform if nothing's changed\r\n\t\t\tif( translate || scale ) {\r\n\r\n\t\t\t\tlet transform = [];\r\n\r\n\t\t\t\tif( translate ) transform.push( `translate(${delta.x}px, ${delta.y}px)` );\r\n\t\t\t\tif( scale ) transform.push( `scale(${delta.scaleX}, ${delta.scaleY})` );\r\n\r\n\t\t\t\tfromProps.styles['transform'] = transform.join( ' ' );\r\n\t\t\t\tfromProps.styles['transform-origin'] = 'top left';\r\n\r\n\t\t\t\ttoProps.styles['transform'] = 'none';\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// Delete all unchanged 'to' styles\r\n\t\tfor( let propertyName in toProps.styles ) {\r\n\t\t\tconst toValue = toProps.styles[propertyName];\r\n\t\t\tconst fromValue = fromProps.styles[propertyName];\r\n\r\n\t\t\tif( toValue === fromValue ) {\r\n\t\t\t\tdelete toProps.styles[propertyName];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t// If these property values were set via a custom matcher providing\r\n\t\t\t\t// an explicit 'from' and/or 'to' value, we always inject those values.\r\n\t\t\t\tif( toValue.explicitValue === true ) {\r\n\t\t\t\t\ttoProps.styles[propertyName] = toValue.value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif( fromValue.explicitValue === true ) {\r\n\t\t\t\t\tfromProps.styles[propertyName] = fromValue.value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet css = '';\r\n\r\n\t\tlet toStyleProperties = Object.keys( toProps.styles );\r\n\r\n\t\t// Only create animate this element IF at least one style\r\n\t\t// property has changed\r\n\t\tif( toStyleProperties.length > 0 ) {\r\n\r\n\t\t\t// Instantly move to the 'from' state\r\n\t\t\tfromProps.styles['transition'] = 'none';\r\n\r\n\t\t\t// Animate towards the 'to' state\r\n\t\t\ttoProps.styles['transition'] = `all ${options.duration}s ${options.easing} ${options.delay}s`;\r\n\t\t\ttoProps.styles['transition-property'] = toStyleProperties.join( ', ' );\r\n\t\t\ttoProps.styles['will-change'] = toStyleProperties.join( ', ' );\r\n\r\n\t\t\t// Build up our custom CSS. We need to override inline styles\r\n\t\t\t// so we need to make our styles vErY IMPORTANT!1!!\r\n\t\t\tlet fromCSS = Object.keys( fromProps.styles ).map( propertyName => {\r\n\t\t\t\treturn propertyName + ': ' + fromProps.styles[propertyName] + ' !important;';\r\n\t\t\t} ).join( '' );\r\n\r\n\t\t\tlet toCSS = Object.keys( toProps.styles ).map( propertyName => {\r\n\t\t\t\treturn propertyName + ': ' + toProps.styles[propertyName] + ' !important;';\r\n\t\t\t} ).join( '' );\r\n\r\n\t\t\tcss = \t'[data-auto-animate-target=\"'+ id +'\"] {'+ fromCSS +'}' +\r\n\t\t\t\t\t'[data-auto-animate=\"running\"] [data-auto-animate-target=\"'+ id +'\"] {'+ toCSS +'}';\r\n\r\n\t\t}\r\n\r\n\t\treturn css;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the auto-animate options for the given element.\r\n\t *\r\n\t * @param {HTMLElement} element Element to pick up options\r\n\t * from, either a slide or an animation target\r\n\t * @param {Object} [inheritedOptions] Optional set of existing\r\n\t * options\r\n\t */\r\n\tgetAutoAnimateOptions( element, inheritedOptions ) {\r\n\r\n\t\tlet options = {\r\n\t\t\teasing: this.Reveal.getConfig().autoAnimateEasing,\r\n\t\t\tduration: this.Reveal.getConfig().autoAnimateDuration,\r\n\t\t\tdelay: 0\r\n\t\t};\r\n\r\n\t\toptions = extend( options, inheritedOptions );\r\n\r\n\t\t// Inherit options from parent elements\r\n\t\tif( element.parentNode ) {\r\n\t\t\tlet autoAnimatedParent = closest( element.parentNode, '[data-auto-animate-target]' );\r\n\t\t\tif( autoAnimatedParent ) {\r\n\t\t\t\toptions = this.getAutoAnimateOptions( autoAnimatedParent, options );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif( element.dataset.autoAnimateEasing ) {\r\n\t\t\toptions.easing = element.dataset.autoAnimateEasing;\r\n\t\t}\r\n\r\n\t\tif( element.dataset.autoAnimateDuration ) {\r\n\t\t\toptions.duration = parseFloat( element.dataset.autoAnimateDuration );\r\n\t\t}\r\n\r\n\t\tif( element.dataset.autoAnimateDelay ) {\r\n\t\t\toptions.delay = parseFloat( element.dataset.autoAnimateDelay );\r\n\t\t}\r\n\r\n\t\treturn options;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an object containing all of the properties\r\n\t * that can be auto-animated for the given element and\r\n\t * their current computed values.\r\n\t *\r\n\t * @param {String} direction 'from' or 'to'\r\n\t */\r\n\tgetAutoAnimatableProperties( direction, element, elementOptions ) {\r\n\r\n\t\tlet config = this.Reveal.getConfig();\r\n\r\n\t\tlet properties = { styles: [] };\r\n\r\n\t\t// Position and size\r\n\t\tif( elementOptions.translate !== false || elementOptions.scale !== false ) {\r\n\t\t\tlet bounds;\r\n\r\n\t\t\t// Custom auto-animate may optionally return a custom tailored\r\n\t\t\t// measurement function\r\n\t\t\tif( typeof elementOptions.measure === 'function' ) {\r\n\t\t\t\tbounds = elementOptions.measure( element );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif( config.center ) {\r\n\t\t\t\t\t// More precise, but breaks when used in combination\r\n\t\t\t\t\t// with zoom for scaling the deck ¯\\_(ツ)_/¯\r\n\t\t\t\t\tbounds = element.getBoundingClientRect();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tlet scale = this.Reveal.getScale();\r\n\t\t\t\t\tbounds = {\r\n\t\t\t\t\t\tx: element.offsetLeft * scale,\r\n\t\t\t\t\t\ty: element.offsetTop * scale,\r\n\t\t\t\t\t\twidth: element.offsetWidth * scale,\r\n\t\t\t\t\t\theight: element.offsetHeight * scale\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tproperties.x = bounds.x;\r\n\t\t\tproperties.y = bounds.y;\r\n\t\t\tproperties.width = bounds.width;\r\n\t\t\tproperties.height = bounds.height;\r\n\t\t}\r\n\r\n\t\tconst computedStyles = getComputedStyle( element );\r\n\r\n\t\t// CSS styles\r\n\t\t( elementOptions.styles || config.autoAnimateStyles ).forEach( style => {\r\n\t\t\tlet value;\r\n\r\n\t\t\t// `style` is either the property name directly, or an object\r\n\t\t\t// definition of a style property\r\n\t\t\tif( typeof style === 'string' ) style = { property: style };\r\n\r\n\t\t\tif( typeof style.from !== 'undefined' && direction === 'from' ) {\r\n\t\t\t\tvalue = { value: style.from, explicitValue: true };\r\n\t\t\t}\r\n\t\t\telse if( typeof style.to !== 'undefined' && direction === 'to' ) {\r\n\t\t\t\tvalue = { value: style.to, explicitValue: true };\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tvalue = computedStyles[style.property];\r\n\t\t\t}\r\n\r\n\t\t\tif( value !== '' ) {\r\n\t\t\t\tproperties.styles[style.property] = value;\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t\treturn properties;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Get a list of all element pairs that we can animate\r\n\t * between the given slides.\r\n\t *\r\n\t * @param {HTMLElement} fromSlide\r\n\t * @param {HTMLElement} toSlide\r\n\t *\r\n\t * @return {Array} Each value is an array where [0] is\r\n\t * the element we're animating from and [1] is the\r\n\t * element we're animating to\r\n\t */\r\n\tgetAutoAnimatableElements( fromSlide, toSlide ) {\r\n\r\n\t\tlet matcher = typeof this.Reveal.getConfig().autoAnimateMatcher === 'function' ? this.Reveal.getConfig().autoAnimateMatcher : this.getAutoAnimatePairs;\r\n\r\n\t\tlet pairs = matcher.call( this, fromSlide, toSlide );\r\n\r\n\t\tlet reserved = [];\r\n\r\n\t\t// Remove duplicate pairs\r\n\t\treturn pairs.filter( ( pair, index ) => {\r\n\t\t\tif( reserved.indexOf( pair.to ) === -1 ) {\r\n\t\t\t\treserved.push( pair.to );\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Identifies matching elements between slides.\r\n\t *\r\n\t * You can specify a custom matcher function by using\r\n\t * the `autoAnimateMatcher` config option.\r\n\t */\r\n\tgetAutoAnimatePairs( fromSlide, toSlide ) {\r\n\r\n\t\tlet pairs = [];\r\n\r\n\t\tconst codeNodes = 'pre';\r\n\t\tconst textNodes = 'h1, h2, h3, h4, h5, h6, p, li';\r\n\t\tconst mediaNodes = 'img, video, iframe';\r\n\r\n\t\t// Eplicit matches via data-id\r\n\t\tthis.findAutoAnimateMatches( pairs, fromSlide, toSlide, '[data-id]', node => {\r\n\t\t\treturn node.nodeName + ':::' + node.getAttribute( 'data-id' );\r\n\t\t} );\r\n\r\n\t\t// Text\r\n\t\tthis.findAutoAnimateMatches( pairs, fromSlide, toSlide, textNodes, node => {\r\n\t\t\treturn node.nodeName + ':::' + node.innerText;\r\n\t\t} );\r\n\r\n\t\t// Media\r\n\t\tthis.findAutoAnimateMatches( pairs, fromSlide, toSlide, mediaNodes, node => {\r\n\t\t\treturn node.nodeName + ':::' + ( node.getAttribute( 'src' ) || node.getAttribute( 'data-src' ) );\r\n\t\t} );\r\n\r\n\t\t// Code\r\n\t\tthis.findAutoAnimateMatches( pairs, fromSlide, toSlide, codeNodes, node => {\r\n\t\t\treturn node.nodeName + ':::' + node.innerText;\r\n\t\t} );\r\n\r\n\t\tpairs.forEach( pair => {\r\n\r\n\t\t\t// Disable scale transformations on text nodes, we transiition\r\n\t\t\t// each individual text property instead\r\n\t\t\tif( matches( pair.from, textNodes ) ) {\r\n\t\t\t\tpair.options = { scale: false };\r\n\t\t\t}\r\n\t\t\t// Animate individual lines of code\r\n\t\t\telse if( matches( pair.from, codeNodes ) ) {\r\n\r\n\t\t\t\t// Transition the code block's width and height instead of scaling\r\n\t\t\t\t// to prevent its content from being squished\r\n\t\t\t\tpair.options = { scale: false, styles: [ 'width', 'height' ] };\r\n\r\n\t\t\t\t// Lines of code\r\n\t\t\t\tthis.findAutoAnimateMatches( pairs, pair.from, pair.to, '.hljs .hljs-ln-code', node => {\r\n\t\t\t\t\treturn node.textContent;\r\n\t\t\t\t}, {\r\n\t\t\t\t\tscale: false,\r\n\t\t\t\t\tstyles: [],\r\n\t\t\t\t\tmeasure: this.getLocalBoundingBox.bind( this )\r\n\t\t\t\t} );\r\n\r\n\t\t\t\t// Line numbers\r\n\t\t\t\tthis.findAutoAnimateMatches( pairs, pair.from, pair.to, '.hljs .hljs-ln-line[data-line-number]', node => {\r\n\t\t\t\t\treturn node.getAttribute( 'data-line-number' );\r\n\t\t\t\t}, {\r\n\t\t\t\t\tscale: false,\r\n\t\t\t\t\tstyles: [ 'width' ],\r\n\t\t\t\t\tmeasure: this.getLocalBoundingBox.bind( this )\r\n\t\t\t\t} );\r\n\r\n\t\t\t}\r\n\r\n\t\t}, this );\r\n\r\n\t\treturn pairs;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Helper method which returns a bounding box based on\r\n\t * the given elements offset coordinates.\r\n\t *\r\n\t * @param {HTMLElement} element\r\n\t * @return {Object} x, y, width, height\r\n\t */\r\n\tgetLocalBoundingBox( element ) {\r\n\r\n\t\tconst presentationScale = this.Reveal.getScale();\r\n\r\n\t\treturn {\r\n\t\t\tx: Math.round( ( element.offsetLeft * presentationScale ) * 100 ) / 100,\r\n\t\t\ty: Math.round( ( element.offsetTop * presentationScale ) * 100 ) / 100,\r\n\t\t\twidth: Math.round( ( element.offsetWidth * presentationScale ) * 100 ) / 100,\r\n\t\t\theight: Math.round( ( element.offsetHeight * presentationScale ) * 100 ) / 100\r\n\t\t};\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Finds matching elements between two slides.\r\n\t *\r\n\t * @param {Array} pairs \tList of pairs to push matches to\r\n\t * @param {HTMLElement} fromScope Scope within the from element exists\r\n\t * @param {HTMLElement} toScope Scope within the to element exists\r\n\t * @param {String} selector CSS selector of the element to match\r\n\t * @param {Function} serializer A function that accepts an element and returns\r\n\t * a stringified ID based on its contents\r\n\t * @param {Object} animationOptions Optional config options for this pair\r\n\t */\r\n\tfindAutoAnimateMatches( pairs, fromScope, toScope, selector, serializer, animationOptions ) {\r\n\r\n\t\tlet fromMatches = {};\r\n\t\tlet toMatches = {};\r\n\r\n\t\t[].slice.call( fromScope.querySelectorAll( selector ) ).forEach( ( element, i ) => {\r\n\t\t\tconst key = serializer( element );\r\n\t\t\tif( typeof key === 'string' && key.length ) {\r\n\t\t\t\tfromMatches[key] = fromMatches[key] || [];\r\n\t\t\t\tfromMatches[key].push( element );\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t\t[].slice.call( toScope.querySelectorAll( selector ) ).forEach( ( element, i ) => {\r\n\t\t\tconst key = serializer( element );\r\n\t\t\ttoMatches[key] = toMatches[key] || [];\r\n\t\t\ttoMatches[key].push( element );\r\n\r\n\t\t\tlet fromElement;\r\n\r\n\t\t\t// Retrieve the 'from' element\r\n\t\t\tif( fromMatches[key] ) {\r\n\t\t\t\tconst pimaryIndex = toMatches[key].length - 1;\r\n\t\t\t\tconst secondaryIndex = fromMatches[key].length - 1;\r\n\r\n\t\t\t\t// If there are multiple identical from elements, retrieve\r\n\t\t\t\t// the one at the same index as our to-element.\r\n\t\t\t\tif( fromMatches[key][ pimaryIndex ] ) {\r\n\t\t\t\t\tfromElement = fromMatches[key][ pimaryIndex ];\r\n\t\t\t\t\tfromMatches[key][ pimaryIndex ] = null;\r\n\t\t\t\t}\r\n\t\t\t\t// If there are no matching from-elements at the same index,\r\n\t\t\t\t// use the last one.\r\n\t\t\t\telse if( fromMatches[key][ secondaryIndex ] ) {\r\n\t\t\t\t\tfromElement = fromMatches[key][ secondaryIndex ];\r\n\t\t\t\t\tfromMatches[key][ secondaryIndex ] = null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// If we've got a matching pair, push it to the list of pairs\r\n\t\t\tif( fromElement ) {\r\n\t\t\t\tpairs.push({\r\n\t\t\t\t\tfrom: fromElement,\r\n\t\t\t\t\tto: element,\r\n\t\t\t\t\toptions: animationOptions\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Returns a all elements within the given scope that should\r\n\t * be considered unmatched in an auto-animate transition. If\r\n\t * fading of unmatched elements is turned on, these elements\r\n\t * will fade when going between auto-animate slides.\r\n\t *\r\n\t * Note that parents of auto-animate targets are NOT considerd\r\n\t * unmatched since fading them would break the auto-animation.\r\n\t *\r\n\t * @param {HTMLElement} rootElement\r\n\t * @return {Array}\r\n\t */\r\n\tgetUnmatchedAutoAnimateElements( rootElement ) {\r\n\r\n\t\treturn [].slice.call( rootElement.children ).reduce( ( result, element ) => {\r\n\r\n\t\t\tconst containsAnimatedElements = element.querySelector( '[data-auto-animate-target]' );\r\n\r\n\t\t\t// The element is unmatched if\r\n\t\t\t// - It is not an auto-animate target\r\n\t\t\t// - It does not contain any auto-animate targets\r\n\t\t\tif( !element.hasAttribute( 'data-auto-animate-target' ) && !containsAnimatedElements ) {\r\n\t\t\t\tresult.push( element );\r\n\t\t\t}\r\n\r\n\t\t\tif( element.querySelector( '[data-auto-animate-target]' ) ) {\r\n\t\t\t\tresult = result.concat( this.getUnmatchedAutoAnimateElements( element ) );\r\n\t\t\t}\r\n\r\n\t\t\treturn result;\r\n\r\n\t\t}, [] );\r\n\r\n\t}\r\n\r\n}","import { extend, queryAll } from '../utils/util.js'\r\n\r\n/**\r\n * Handles sorting and navigation of slide fragments.\r\n * Fragments are elements within a slide that are\r\n * revealed/animated incrementally.\r\n */\r\nexport default class Fragments {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the reveal.js config is updated.\r\n\t */\r\n\tconfigure( config, oldConfig ) {\r\n\r\n\t\tif( config.fragments === false ) {\r\n\t\t\tthis.disable();\r\n\t\t}\r\n\t\telse if( oldConfig.fragments === false ) {\r\n\t\t\tthis.enable();\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * If fragments are disabled in the deck, they should all be\r\n\t * visible rather than stepped through.\r\n\t */\r\n\tdisable() {\r\n\r\n\t\tqueryAll( this.Reveal.getSlidesElement(), '.fragment' ).forEach( element => {\r\n\t\t\telement.classList.add( 'visible' );\r\n\t\t\telement.classList.remove( 'current-fragment' );\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Reverse of #disable(). Only called if fragments have\r\n\t * previously been disabled.\r\n\t */\r\n\tenable() {\r\n\r\n\t\tqueryAll( this.Reveal.getSlidesElement(), '.fragment' ).forEach( element => {\r\n\t\t\telement.classList.remove( 'visible' );\r\n\t\t\telement.classList.remove( 'current-fragment' );\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Returns an object describing the available fragment\r\n\t * directions.\r\n\t *\r\n\t * @return {{prev: boolean, next: boolean}}\r\n\t */\r\n\tavailableRoutes() {\r\n\r\n\t\tlet currentSlide = this.Reveal.getCurrentSlide();\r\n\t\tif( currentSlide && this.Reveal.getConfig().fragments ) {\r\n\t\t\tlet fragments = currentSlide.querySelectorAll( '.fragment:not(.disabled)' );\r\n\t\t\tlet hiddenFragments = currentSlide.querySelectorAll( '.fragment:not(.disabled):not(.visible)' );\r\n\r\n\t\t\treturn {\r\n\t\t\t\tprev: fragments.length - hiddenFragments.length > 0,\r\n\t\t\t\tnext: !!hiddenFragments.length\r\n\t\t\t};\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn { prev: false, next: false };\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Return a sorted fragments list, ordered by an increasing\r\n\t * \"data-fragment-index\" attribute.\r\n\t *\r\n\t * Fragments will be revealed in the order that they are returned by\r\n\t * this function, so you can use the index attributes to control the\r\n\t * order of fragment appearance.\r\n\t *\r\n\t * To maintain a sensible default fragment order, fragments are presumed\r\n\t * to be passed in document order. This function adds a \"fragment-index\"\r\n\t * attribute to each node if such an attribute is not already present,\r\n\t * and sets that attribute to an integer value which is the position of\r\n\t * the fragment within the fragments list.\r\n\t *\r\n\t * @param {object[]|*} fragments\r\n\t * @param {boolean} grouped If true the returned array will contain\r\n\t * nested arrays for all fragments with the same index\r\n\t * @return {object[]} sorted Sorted array of fragments\r\n\t */\r\n\tsort( fragments, grouped = false ) {\r\n\r\n\t\tfragments = Array.from( fragments );\r\n\r\n\t\tlet ordered = [],\r\n\t\t\tunordered = [],\r\n\t\t\tsorted = [];\r\n\r\n\t\t// Group ordered and unordered elements\r\n\t\tfragments.forEach( fragment => {\r\n\t\t\tif( fragment.hasAttribute( 'data-fragment-index' ) ) {\r\n\t\t\t\tlet index = parseInt( fragment.getAttribute( 'data-fragment-index' ), 10 );\r\n\r\n\t\t\t\tif( !ordered[index] ) {\r\n\t\t\t\t\tordered[index] = [];\r\n\t\t\t\t}\r\n\r\n\t\t\t\tordered[index].push( fragment );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tunordered.push( [ fragment ] );\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t\t// Append fragments without explicit indices in their\r\n\t\t// DOM order\r\n\t\tordered = ordered.concat( unordered );\r\n\r\n\t\t// Manually count the index up per group to ensure there\r\n\t\t// are no gaps\r\n\t\tlet index = 0;\r\n\r\n\t\t// Push all fragments in their sorted order to an array,\r\n\t\t// this flattens the groups\r\n\t\tordered.forEach( group => {\r\n\t\t\tgroup.forEach( fragment => {\r\n\t\t\t\tsorted.push( fragment );\r\n\t\t\t\tfragment.setAttribute( 'data-fragment-index', index );\r\n\t\t\t} );\r\n\r\n\t\t\tindex ++;\r\n\t\t} );\r\n\r\n\t\treturn grouped === true ? ordered : sorted;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Sorts and formats all of fragments in the\r\n\t * presentation.\r\n\t */\r\n\tsortAll() {\r\n\r\n\t\tthis.Reveal.getHorizontalSlides().forEach( horizontalSlide => {\r\n\r\n\t\t\tlet verticalSlides = queryAll( horizontalSlide, 'section' );\r\n\t\t\tverticalSlides.forEach( ( verticalSlide, y ) => {\r\n\r\n\t\t\t\tthis.sort( verticalSlide.querySelectorAll( '.fragment' ) );\r\n\r\n\t\t\t}, this );\r\n\r\n\t\t\tif( verticalSlides.length === 0 ) this.sort( horizontalSlide.querySelectorAll( '.fragment' ) );\r\n\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Refreshes the fragments on the current slide so that they\r\n\t * have the appropriate classes (.visible + .current-fragment).\r\n\t *\r\n\t * @param {number} [index] The index of the current fragment\r\n\t * @param {array} [fragments] Array containing all fragments\r\n\t * in the current slide\r\n\t *\r\n\t * @return {{shown: array, hidden: array}}\r\n\t */\r\n\tupdate( index, fragments ) {\r\n\r\n\t\tlet changedFragments = {\r\n\t\t\tshown: [],\r\n\t\t\thidden: []\r\n\t\t};\r\n\r\n\t\tlet currentSlide = this.Reveal.getCurrentSlide();\r\n\t\tif( currentSlide && this.Reveal.getConfig().fragments ) {\r\n\r\n\t\t\tfragments = fragments || this.sort( currentSlide.querySelectorAll( '.fragment' ) );\r\n\r\n\t\t\tif( fragments.length ) {\r\n\r\n\t\t\t\tlet maxIndex = 0;\r\n\r\n\t\t\t\tif( typeof index !== 'number' ) {\r\n\t\t\t\t\tlet currentFragment = this.sort( currentSlide.querySelectorAll( '.fragment.visible' ) ).pop();\r\n\t\t\t\t\tif( currentFragment ) {\r\n\t\t\t\t\t\tindex = parseInt( currentFragment.getAttribute( 'data-fragment-index' ) || 0, 10 );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tArray.from( fragments ).forEach( ( el, i ) => {\r\n\r\n\t\t\t\t\tif( el.hasAttribute( 'data-fragment-index' ) ) {\r\n\t\t\t\t\t\ti = parseInt( el.getAttribute( 'data-fragment-index' ), 10 );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tmaxIndex = Math.max( maxIndex, i );\r\n\r\n\t\t\t\t\t// Visible fragments\r\n\t\t\t\t\tif( i <= index ) {\r\n\t\t\t\t\t\tlet wasVisible = el.classList.contains( 'visible' )\r\n\t\t\t\t\t\tel.classList.add( 'visible' );\r\n\t\t\t\t\t\tel.classList.remove( 'current-fragment' );\r\n\r\n\t\t\t\t\t\tif( i === index ) {\r\n\t\t\t\t\t\t\t// Announce the fragments one by one to the Screen Reader\r\n\t\t\t\t\t\t\tthis.Reveal.announceStatus( this.Reveal.getStatusText( el ) );\r\n\r\n\t\t\t\t\t\t\tel.classList.add( 'current-fragment' );\r\n\t\t\t\t\t\t\tthis.Reveal.slideContent.startEmbeddedContent( el );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif( !wasVisible ) {\r\n\t\t\t\t\t\t\tchangedFragments.shown.push( el )\r\n\t\t\t\t\t\t\tthis.Reveal.dispatchEvent({\r\n\t\t\t\t\t\t\t\ttarget: el,\r\n\t\t\t\t\t\t\t\ttype: 'visible',\r\n\t\t\t\t\t\t\t\tbubbles: false\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Hidden fragments\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tlet wasVisible = el.classList.contains( 'visible' )\r\n\t\t\t\t\t\tel.classList.remove( 'visible' );\r\n\t\t\t\t\t\tel.classList.remove( 'current-fragment' );\r\n\r\n\t\t\t\t\t\tif( wasVisible ) {\r\n\t\t\t\t\t\t\tchangedFragments.hidden.push( el );\r\n\t\t\t\t\t\t\tthis.Reveal.dispatchEvent({\r\n\t\t\t\t\t\t\t\ttarget: el,\r\n\t\t\t\t\t\t\t\ttype: 'hidden',\r\n\t\t\t\t\t\t\t\tbubbles: false\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} );\r\n\r\n\t\t\t\t// Write the current fragment index to the slide
.\r\n\t\t\t\t// This can be used by end users to apply styles based on\r\n\t\t\t\t// the current fragment index.\r\n\t\t\t\tindex = typeof index === 'number' ? index : -1;\r\n\t\t\t\tindex = Math.max( Math.min( index, maxIndex ), -1 );\r\n\t\t\t\tcurrentSlide.setAttribute( 'data-fragment', index );\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn changedFragments;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Formats the fragments on the given slide so that they have\r\n\t * valid indices. Call this if fragments are changed in the DOM\r\n\t * after reveal.js has already initialized.\r\n\t *\r\n\t * @param {HTMLElement} slide\r\n\t * @return {Array} a list of the HTML fragments that were synced\r\n\t */\r\n\tsync( slide = this.Reveal.getCurrentSlide() ) {\r\n\r\n\t\treturn this.sort( slide.querySelectorAll( '.fragment' ) );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Navigate to the specified slide fragment.\r\n\t *\r\n\t * @param {?number} index The index of the fragment that\r\n\t * should be shown, -1 means all are invisible\r\n\t * @param {number} offset Integer offset to apply to the\r\n\t * fragment index\r\n\t *\r\n\t * @return {boolean} true if a change was made in any\r\n\t * fragments visibility as part of this call\r\n\t */\r\n\tgoto( index, offset = 0 ) {\r\n\r\n\t\tlet currentSlide = this.Reveal.getCurrentSlide();\r\n\t\tif( currentSlide && this.Reveal.getConfig().fragments ) {\r\n\r\n\t\t\tlet fragments = this.sort( currentSlide.querySelectorAll( '.fragment:not(.disabled)' ) );\r\n\t\t\tif( fragments.length ) {\r\n\r\n\t\t\t\t// If no index is specified, find the current\r\n\t\t\t\tif( typeof index !== 'number' ) {\r\n\t\t\t\t\tlet lastVisibleFragment = this.sort( currentSlide.querySelectorAll( '.fragment:not(.disabled).visible' ) ).pop();\r\n\r\n\t\t\t\t\tif( lastVisibleFragment ) {\r\n\t\t\t\t\t\tindex = parseInt( lastVisibleFragment.getAttribute( 'data-fragment-index' ) || 0, 10 );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tindex = -1;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Apply the offset if there is one\r\n\t\t\t\tindex += offset;\r\n\r\n\t\t\t\tlet changedFragments = this.update( index, fragments );\r\n\r\n\t\t\t\tif( changedFragments.hidden.length ) {\r\n\t\t\t\t\tthis.Reveal.dispatchEvent({\r\n\t\t\t\t\t\ttype: 'fragmenthidden',\r\n\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\tfragment: changedFragments.hidden[0],\r\n\t\t\t\t\t\t\tfragments: changedFragments.hidden\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif( changedFragments.shown.length ) {\r\n\t\t\t\t\tthis.Reveal.dispatchEvent({\r\n\t\t\t\t\t\ttype: 'fragmentshown',\r\n\t\t\t\t\t\tdata: {\r\n\t\t\t\t\t\t\tfragment: changedFragments.shown[0],\r\n\t\t\t\t\t\t\tfragments: changedFragments.shown\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.Reveal.controls.update();\r\n\t\t\t\tthis.Reveal.progress.update();\r\n\r\n\t\t\t\tif( this.Reveal.getConfig().fragmentInURL ) {\r\n\t\t\t\t\tthis.Reveal.location.writeURL();\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn !!( changedFragments.shown.length || changedFragments.hidden.length );\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Navigate to the next slide fragment.\r\n\t *\r\n\t * @return {boolean} true if there was a next fragment,\r\n\t * false otherwise\r\n\t */\r\n\tnext() {\r\n\r\n\t\treturn this.goto( null, 1 );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Navigate to the previous slide fragment.\r\n\t *\r\n\t * @return {boolean} true if there was a previous fragment,\r\n\t * false otherwise\r\n\t */\r\n\tprev() {\r\n\r\n\t\treturn this.goto( null, -1 );\r\n\r\n\t}\r\n\r\n}","import { SLIDES_SELECTOR } from '../utils/constants.js'\r\nimport { extend, queryAll, transformElement } from '../utils/util.js'\r\n\r\n/**\r\n * Handles all logic related to the overview mode\r\n * (birds-eye view of all slides).\r\n */\r\nexport default class Overview {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t\tthis.active = false;\r\n\r\n\t\tthis.onSlideClicked = this.onSlideClicked.bind( this );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Displays the overview of slides (quick nav) by scaling\r\n\t * down and arranging all slide elements.\r\n\t */\r\n\tactivate() {\r\n\r\n\t\t// Only proceed if enabled in config\r\n\t\tif( this.Reveal.getConfig().overview && !this.isActive() ) {\r\n\r\n\t\t\tthis.active = true;\r\n\r\n\t\t\tthis.Reveal.getRevealElement().classList.add( 'overview' );\r\n\r\n\t\t\t// Don't auto-slide while in overview mode\r\n\t\t\tthis.Reveal.cancelAutoSlide();\r\n\r\n\t\t\t// Move the backgrounds element into the slide container to\r\n\t\t\t// that the same scaling is applied\r\n\t\t\tthis.Reveal.getSlidesElement().appendChild( this.Reveal.getBackgroundsElement() );\r\n\r\n\t\t\t// Clicking on an overview slide navigates to it\r\n\t\t\tqueryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR ).forEach( slide => {\r\n\t\t\t\tif( !slide.classList.contains( 'stack' ) ) {\r\n\t\t\t\t\tslide.addEventListener( 'click', this.onSlideClicked, true );\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\r\n\t\t\t// Calculate slide sizes\r\n\t\t\tconst margin = 70;\r\n\t\t\tconst slideSize = this.Reveal.getComputedSlideSize();\r\n\t\t\tthis.overviewSlideWidth = slideSize.width + margin;\r\n\t\t\tthis.overviewSlideHeight = slideSize.height + margin;\r\n\r\n\t\t\t// Reverse in RTL mode\r\n\t\t\tif( this.Reveal.getConfig().rtl ) {\r\n\t\t\t\tthis.overviewSlideWidth = -this.overviewSlideWidth;\r\n\t\t\t}\r\n\r\n\t\t\tthis.Reveal.updateSlidesVisibility();\r\n\r\n\t\t\tthis.layout();\r\n\t\t\tthis.update();\r\n\r\n\t\t\tthis.Reveal.layout();\r\n\r\n\t\t\tconst indices = this.Reveal.getIndices();\r\n\r\n\t\t\t// Notify observers of the overview showing\r\n\t\t\tthis.Reveal.dispatchEvent({\r\n\t\t\t\ttype: 'overviewshown',\r\n\t\t\t\tdata: {\r\n\t\t\t\t\t'indexh': indices.h,\r\n\t\t\t\t\t'indexv': indices.v,\r\n\t\t\t\t\t'currentSlide': this.Reveal.getCurrentSlide()\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Uses CSS transforms to position all slides in a grid for\r\n\t * display inside of the overview mode.\r\n\t */\r\n\tlayout() {\r\n\r\n\t\t// Layout slides\r\n\t\tthis.Reveal.getHorizontalSlides().forEach( ( hslide, h ) => {\r\n\t\t\thslide.setAttribute( 'data-index-h', h );\r\n\t\t\ttransformElement( hslide, 'translate3d(' + ( h * this.overviewSlideWidth ) + 'px, 0, 0)' );\r\n\r\n\t\t\tif( hslide.classList.contains( 'stack' ) ) {\r\n\r\n\t\t\t\tqueryAll( hslide, 'section' ).forEach( ( vslide, v ) => {\r\n\t\t\t\t\tvslide.setAttribute( 'data-index-h', h );\r\n\t\t\t\t\tvslide.setAttribute( 'data-index-v', v );\r\n\r\n\t\t\t\t\ttransformElement( vslide, 'translate3d(0, ' + ( v * this.overviewSlideHeight ) + 'px, 0)' );\r\n\t\t\t\t} );\r\n\r\n\t\t\t}\r\n\t\t} );\r\n\r\n\t\t// Layout slide backgrounds\r\n\t\tArray.from( this.Reveal.getBackgroundsElement().childNodes ).forEach( ( hbackground, h ) => {\r\n\t\t\ttransformElement( hbackground, 'translate3d(' + ( h * this.overviewSlideWidth ) + 'px, 0, 0)' );\r\n\r\n\t\t\tqueryAll( hbackground, '.slide-background' ).forEach( ( vbackground, v ) => {\r\n\t\t\t\ttransformElement( vbackground, 'translate3d(0, ' + ( v * this.overviewSlideHeight ) + 'px, 0)' );\r\n\t\t\t} );\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Moves the overview viewport to the current slides.\r\n\t * Called each time the current slide changes.\r\n\t */\r\n\tupdate() {\r\n\r\n\t\tconst vmin = Math.min( window.innerWidth, window.innerHeight );\r\n\t\tconst scale = Math.max( vmin / 5, 150 ) / vmin;\r\n\t\tconst indices = this.Reveal.getIndices();\r\n\r\n\t\tthis.Reveal.transformSlides( {\r\n\t\t\toverview: [\r\n\t\t\t\t'scale('+ scale +')',\r\n\t\t\t\t'translateX('+ ( -indices.h * this.overviewSlideWidth ) +'px)',\r\n\t\t\t\t'translateY('+ ( -indices.v * this.overviewSlideHeight ) +'px)'\r\n\t\t\t].join( ' ' )\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Exits the slide overview and enters the currently\r\n\t * active slide.\r\n\t */\r\n\tdeactivate() {\r\n\r\n\t\t// Only proceed if enabled in config\r\n\t\tif( this.Reveal.getConfig().overview ) {\r\n\r\n\t\t\tthis.active = false;\r\n\r\n\t\t\tthis.Reveal.getRevealElement().classList.remove( 'overview' );\r\n\r\n\t\t\t// Temporarily add a class so that transitions can do different things\r\n\t\t\t// depending on whether they are exiting/entering overview, or just\r\n\t\t\t// moving from slide to slide\r\n\t\t\tthis.Reveal.getRevealElement().classList.add( 'overview-deactivating' );\r\n\r\n\t\t\tsetTimeout( () => {\r\n\t\t\t\tthis.Reveal.getRevealElement().classList.remove( 'overview-deactivating' );\r\n\t\t\t}, 1 );\r\n\r\n\t\t\t// Move the background element back out\r\n\t\t\tthis.Reveal.getRevealElement().appendChild( this.Reveal.getBackgroundsElement() );\r\n\r\n\t\t\t// Clean up changes made to slides\r\n\t\t\tqueryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR ).forEach( slide => {\r\n\t\t\t\ttransformElement( slide, '' );\r\n\r\n\t\t\t\tslide.removeEventListener( 'click', this.onSlideClicked, true );\r\n\t\t\t} );\r\n\r\n\t\t\t// Clean up changes made to backgrounds\r\n\t\t\tqueryAll( this.Reveal.getBackgroundsElement(), '.slide-background' ).forEach( background => {\r\n\t\t\t\ttransformElement( background, '' );\r\n\t\t\t} );\r\n\r\n\t\t\tthis.Reveal.transformSlides( { overview: '' } );\r\n\r\n\t\t\tconst indices = this.Reveal.getIndices();\r\n\r\n\t\t\tthis.Reveal.slide( indices.h, indices.v );\r\n\t\t\tthis.Reveal.layout();\r\n\t\t\tthis.Reveal.cueAutoSlide();\r\n\r\n\t\t\t// Notify observers of the overview hiding\r\n\t\t\tthis.Reveal.dispatchEvent({\r\n\t\t\t\ttype: 'overviewhidden',\r\n\t\t\t\tdata: {\r\n\t\t\t\t\t'indexh': indices.h,\r\n\t\t\t\t\t'indexv': indices.v,\r\n\t\t\t\t\t'currentSlide': this.Reveal.getCurrentSlide()\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Toggles the slide overview mode on and off.\r\n\t *\r\n\t * @param {Boolean} [override] Flag which overrides the\r\n\t * toggle logic and forcibly sets the desired state. True means\r\n\t * overview is open, false means it's closed.\r\n\t */\r\n\ttoggle( override ) {\r\n\r\n\t\tif( typeof override === 'boolean' ) {\r\n\t\t\toverride ? this.activate() : this.deactivate();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.isActive() ? this.deactivate() : this.activate();\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the overview is currently active.\r\n\t *\r\n\t * @return {Boolean} true if the overview is active,\r\n\t * false otherwise\r\n\t */\r\n\tisActive() {\r\n\r\n\t\treturn this.active;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Invoked when a slide is and we're in the overview.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tonSlideClicked( event ) {\r\n\r\n\t\tif( this.isActive() ) {\r\n\t\t\tevent.preventDefault();\r\n\r\n\t\t\tlet element = event.target;\r\n\r\n\t\t\twhile( element && !element.nodeName.match( /section/gi ) ) {\r\n\t\t\t\telement = element.parentNode;\r\n\t\t\t}\r\n\r\n\t\t\tif( element && !element.classList.contains( 'disabled' ) ) {\r\n\r\n\t\t\t\tthis.deactivate();\r\n\r\n\t\t\t\tif( element.nodeName.match( /section/gi ) ) {\r\n\t\t\t\t\tlet h = parseInt( element.getAttribute( 'data-index-h' ), 10 ),\r\n\t\t\t\t\t\tv = parseInt( element.getAttribute( 'data-index-v' ), 10 );\r\n\r\n\t\t\t\t\tthis.Reveal.slide( h, v );\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n}","import { enterFullscreen } from '../utils/util.js'\r\n\r\n/**\r\n * Handles all reveal.js keyboard interactions.\r\n */\r\nexport default class Keyboard {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t\t// A key:value map of keyboard keys and descriptions of\r\n\t\t// the actions they trigger\r\n\t\tthis.shortcuts = {};\r\n\r\n\t\t// Holds custom key code mappings\r\n\t\tthis.bindings = {};\r\n\r\n\t\tthis.onDocumentKeyDown = this.onDocumentKeyDown.bind( this );\r\n\t\tthis.onDocumentKeyPress = this.onDocumentKeyPress.bind( this );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the reveal.js config is updated.\r\n\t */\r\n\tconfigure( config, oldConfig ) {\r\n\r\n\t\tif( config.navigationMode === 'linear' ) {\r\n\t\t\tthis.shortcuts['→ , ↓ , SPACE , N , L , J'] = 'Next slide';\r\n\t\t\tthis.shortcuts['← , ↑ , P , H , K'] = 'Previous slide';\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.shortcuts['N , SPACE'] = 'Next slide';\r\n\t\t\tthis.shortcuts['P'] = 'Previous slide';\r\n\t\t\tthis.shortcuts['← , H'] = 'Navigate left';\r\n\t\t\tthis.shortcuts['→ , L'] = 'Navigate right';\r\n\t\t\tthis.shortcuts['↑ , K'] = 'Navigate up';\r\n\t\t\tthis.shortcuts['↓ , J'] = 'Navigate down';\r\n\t\t}\r\n\r\n\t\tthis.shortcuts['Home , Shift ←'] = 'First slide';\r\n\t\tthis.shortcuts['End , Shift →'] = 'Last slide';\r\n\t\tthis.shortcuts['B , .'] = 'Pause';\r\n\t\tthis.shortcuts['F'] = 'Fullscreen';\r\n\t\tthis.shortcuts['ESC, O'] = 'Slide overview';\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Starts listening for keyboard events.\r\n\t */\r\n\tbind() {\r\n\r\n\t\tdocument.addEventListener( 'keydown', this.onDocumentKeyDown, false );\r\n\t\tdocument.addEventListener( 'keypress', this.onDocumentKeyPress, false );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Stops listening for keyboard events.\r\n\t */\r\n\tunbind() {\r\n\r\n\t\tdocument.removeEventListener( 'keydown', this.onDocumentKeyDown, false );\r\n\t\tdocument.removeEventListener( 'keypress', this.onDocumentKeyPress, false );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Add a custom key binding with optional description to\r\n\t * be added to the help screen.\r\n\t */\r\n\taddKeyBinding( binding, callback ) {\r\n\r\n\t\tif( typeof binding === 'object' && binding.keyCode ) {\r\n\t\t\tthis.bindings[binding.keyCode] = {\r\n\t\t\t\tcallback: callback,\r\n\t\t\t\tkey: binding.key,\r\n\t\t\t\tdescription: binding.description\r\n\t\t\t};\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.bindings[binding] = {\r\n\t\t\t\tcallback: callback,\r\n\t\t\t\tkey: null,\r\n\t\t\t\tdescription: null\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Removes the specified custom key binding.\r\n\t */\r\n\tremoveKeyBinding( keyCode ) {\r\n\r\n\t\tdelete this.bindings[keyCode];\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Programmatically triggers a keyboard event\r\n\t *\r\n\t * @param {int} keyCode\r\n\t */\r\n\ttriggerKey( keyCode ) {\r\n\r\n\t\tthis.onDocumentKeyDown( { keyCode } );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Registers a new shortcut to include in the help overlay\r\n\t *\r\n\t * @param {String} key\r\n\t * @param {String} value\r\n\t */\r\n\tregisterKeyboardShortcut( key, value ) {\r\n\r\n\t\tthis.shortcuts[key] = value;\r\n\r\n\t}\r\n\r\n\tgetShortcuts() {\r\n\r\n\t\treturn this.shortcuts;\r\n\r\n\t}\r\n\r\n\tgetBindings() {\r\n\r\n\t\treturn this.bindings;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Handler for the document level 'keypress' event.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tonDocumentKeyPress( event ) {\r\n\r\n\t\t// Check if the pressed key is question mark\r\n\t\tif( event.shiftKey && event.charCode === 63 ) {\r\n\t\t\tthis.Reveal.toggleHelp();\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Handler for the document level 'keydown' event.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tonDocumentKeyDown( event ) {\r\n\r\n\t\tlet config = this.Reveal.getConfig();\r\n\r\n\t\t// If there's a condition specified and it returns false,\r\n\t\t// ignore this event\r\n\t\tif( typeof config.keyboardCondition === 'function' && config.keyboardCondition(event) === false ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// If keyboardCondition is set, only capture keyboard events\r\n\t\t// for embedded decks when they are focused\r\n\t\tif( config.keyboardCondition === 'focused' && !this.Reveal.isFocused() ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t// Shorthand\r\n\t\tlet keyCode = event.keyCode;\r\n\r\n\t\t// Remember if auto-sliding was paused so we can toggle it\r\n\t\tlet autoSlideWasPaused = !this.Reveal.isAutoSliding();\r\n\r\n\t\tthis.Reveal.onUserInput( event );\r\n\r\n\t\t// Is there a focused element that could be using the keyboard?\r\n\t\tlet activeElementIsCE = document.activeElement && document.activeElement.isContentEditable === true;\r\n\t\tlet activeElementIsInput = document.activeElement && document.activeElement.tagName && /input|textarea/i.test( document.activeElement.tagName );\r\n\t\tlet activeElementIsNotes = document.activeElement && document.activeElement.className && /speaker-notes/i.test( document.activeElement.className);\r\n\r\n\t\t// Whitelist specific modified + keycode combinations\r\n\t\tlet prevSlideShortcut = event.shiftKey && event.keyCode === 32;\r\n\t\tlet firstSlideShortcut = event.shiftKey && keyCode === 37;\r\n\t\tlet lastSlideShortcut = event.shiftKey && keyCode === 39;\r\n\r\n\t\t// Prevent all other events when a modifier is pressed\r\n\t\tlet unusedModifier = \t!prevSlideShortcut && !firstSlideShortcut && !lastSlideShortcut &&\r\n\t\t\t\t\t\t\t\t( event.shiftKey || event.altKey || event.ctrlKey || event.metaKey );\r\n\r\n\t\t// Disregard the event if there's a focused element or a\r\n\t\t// keyboard modifier key is present\r\n\t\tif( activeElementIsCE || activeElementIsInput || activeElementIsNotes || unusedModifier ) return;\r\n\r\n\t\t// While paused only allow resume keyboard events; 'b', 'v', '.'\r\n\t\tlet resumeKeyCodes = [66,86,190,191];\r\n\t\tlet key;\r\n\r\n\t\t// Custom key bindings for togglePause should be able to resume\r\n\t\tif( typeof config.keyboard === 'object' ) {\r\n\t\t\tfor( key in config.keyboard ) {\r\n\t\t\t\tif( config.keyboard[key] === 'togglePause' ) {\r\n\t\t\t\t\tresumeKeyCodes.push( parseInt( key, 10 ) );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif( this.Reveal.isPaused() && resumeKeyCodes.indexOf( keyCode ) === -1 ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// Use linear navigation if we're configured to OR if\r\n\t\t// the presentation is one-dimensional\r\n\t\tlet useLinearMode = config.navigationMode === 'linear' || !this.Reveal.hasHorizontalSlides() || !this.Reveal.hasVerticalSlides();\r\n\r\n\t\tlet triggered = false;\r\n\r\n\t\t// 1. User defined key bindings\r\n\t\tif( typeof config.keyboard === 'object' ) {\r\n\r\n\t\t\tfor( key in config.keyboard ) {\r\n\r\n\t\t\t\t// Check if this binding matches the pressed key\r\n\t\t\t\tif( parseInt( key, 10 ) === keyCode ) {\r\n\r\n\t\t\t\t\tlet value = config.keyboard[ key ];\r\n\r\n\t\t\t\t\t// Callback function\r\n\t\t\t\t\tif( typeof value === 'function' ) {\r\n\t\t\t\t\t\tvalue.apply( null, [ event ] );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// String shortcuts to reveal.js API\r\n\t\t\t\t\telse if( typeof value === 'string' && typeof this.Reveal[ value ] === 'function' ) {\r\n\t\t\t\t\t\tthis.Reveal[ value ].call();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttriggered = true;\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// 2. Registered custom key bindings\r\n\t\tif( triggered === false ) {\r\n\r\n\t\t\tfor( key in this.bindings ) {\r\n\r\n\t\t\t\t// Check if this binding matches the pressed key\r\n\t\t\t\tif( parseInt( key, 10 ) === keyCode ) {\r\n\r\n\t\t\t\t\tlet action = this.bindings[ key ].callback;\r\n\r\n\t\t\t\t\t// Callback function\r\n\t\t\t\t\tif( typeof action === 'function' ) {\r\n\t\t\t\t\t\taction.apply( null, [ event ] );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// String shortcuts to reveal.js API\r\n\t\t\t\t\telse if( typeof action === 'string' && typeof this.Reveal[ action ] === 'function' ) {\r\n\t\t\t\t\t\tthis.Reveal[ action ].call();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttriggered = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// 3. System defined key bindings\r\n\t\tif( triggered === false ) {\r\n\r\n\t\t\t// Assume true and try to prove false\r\n\t\t\ttriggered = true;\r\n\r\n\t\t\t// P, PAGE UP\r\n\t\t\tif( keyCode === 80 || keyCode === 33 ) {\r\n\t\t\t\tthis.Reveal.prev();\r\n\t\t\t}\r\n\t\t\t// N, PAGE DOWN\r\n\t\t\telse if( keyCode === 78 || keyCode === 34 ) {\r\n\t\t\t\tthis.Reveal.next();\r\n\t\t\t}\r\n\t\t\t// H, LEFT\r\n\t\t\telse if( keyCode === 72 || keyCode === 37 ) {\r\n\t\t\t\tif( firstSlideShortcut ) {\r\n\t\t\t\t\tthis.Reveal.slide( 0 );\r\n\t\t\t\t}\r\n\t\t\t\telse if( !this.Reveal.overview.isActive() && useLinearMode ) {\r\n\t\t\t\t\tthis.Reveal.prev();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.Reveal.left();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// L, RIGHT\r\n\t\t\telse if( keyCode === 76 || keyCode === 39 ) {\r\n\t\t\t\tif( lastSlideShortcut ) {\r\n\t\t\t\t\tthis.Reveal.slide( Number.MAX_VALUE );\r\n\t\t\t\t}\r\n\t\t\t\telse if( !this.Reveal.overview.isActive() && useLinearMode ) {\r\n\t\t\t\t\tthis.Reveal.next();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.Reveal.right();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// K, UP\r\n\t\t\telse if( keyCode === 75 || keyCode === 38 ) {\r\n\t\t\t\tif( !this.Reveal.overview.isActive() && useLinearMode ) {\r\n\t\t\t\t\tthis.Reveal.prev();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.Reveal.up();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// J, DOWN\r\n\t\t\telse if( keyCode === 74 || keyCode === 40 ) {\r\n\t\t\t\tif( !this.Reveal.overview.isActive() && useLinearMode ) {\r\n\t\t\t\t\tthis.Reveal.next();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.Reveal.down();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// HOME\r\n\t\t\telse if( keyCode === 36 ) {\r\n\t\t\t\tthis.Reveal.slide( 0 );\r\n\t\t\t}\r\n\t\t\t// END\r\n\t\t\telse if( keyCode === 35 ) {\r\n\t\t\t\tthis.Reveal.slide( Number.MAX_VALUE );\r\n\t\t\t}\r\n\t\t\t// SPACE\r\n\t\t\telse if( keyCode === 32 ) {\r\n\t\t\t\tif( this.Reveal.overview.isActive() ) {\r\n\t\t\t\t\tthis.Reveal.overview.deactivate();\r\n\t\t\t\t}\r\n\t\t\t\tif( event.shiftKey ) {\r\n\t\t\t\t\tthis.Reveal.prev();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tthis.Reveal.next();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// TWO-SPOT, SEMICOLON, B, V, PERIOD, LOGITECH PRESENTER TOOLS \"BLACK SCREEN\" BUTTON\r\n\t\t\telse if( keyCode === 58 || keyCode === 59 || keyCode === 66 || keyCode === 86 || keyCode === 190 || keyCode === 191 ) {\r\n\t\t\t\tthis.Reveal.togglePause();\r\n\t\t\t}\r\n\t\t\t// F\r\n\t\t\telse if( keyCode === 70 ) {\r\n\t\t\t\tenterFullscreen( config.embedded ? this.Reveal.getViewportElement() : document.documentElement );\r\n\t\t\t}\r\n\t\t\t// A\r\n\t\t\telse if( keyCode === 65 ) {\r\n\t\t\t\tif ( config.autoSlideStoppable ) {\r\n\t\t\t\t\tthis.Reveal.toggleAutoSlide( autoSlideWasPaused );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttriggered = false;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// If the input resulted in a triggered action we should prevent\r\n\t\t// the browsers default behavior\r\n\t\tif( triggered ) {\r\n\t\t\tevent.preventDefault && event.preventDefault();\r\n\t\t}\r\n\t\t// ESC or O key\r\n\t\telse if( keyCode === 27 || keyCode === 79 ) {\r\n\t\t\tif( this.Reveal.closeOverlay() === false ) {\r\n\t\t\t\tthis.Reveal.overview.toggle();\r\n\t\t\t}\r\n\r\n\t\t\tevent.preventDefault && event.preventDefault();\r\n\t\t}\r\n\r\n\t\t// If auto-sliding is enabled we need to cue up\r\n\t\t// another timeout\r\n\t\tthis.Reveal.cueAutoSlide();\r\n\r\n\t}\r\n\r\n}","import { supportsHistoryAPI } from '../utils/device.js'\r\n\r\n/**\r\n * Reads and writes the URL based on reveal.js' current state.\r\n */\r\nexport default class Location {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t\t// Delays updates to the URL due to a Chrome thumbnailer bug\r\n\t\tthis.writeURLTimeout = 0;\r\n\r\n\t\tthis.onWindowHashChange = this.onWindowHashChange.bind( this );\r\n\r\n\t}\r\n\r\n\tbind() {\r\n\r\n\t\twindow.addEventListener( 'hashchange', this.onWindowHashChange, false );\r\n\r\n\t}\r\n\r\n\tunbind() {\r\n\r\n\t\twindow.removeEventListener( 'hashchange', this.onWindowHashChange, false );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Reads the current URL (hash) and navigates accordingly.\r\n\t */\r\n\treadURL() {\r\n\r\n\t\tlet config = this.Reveal.getConfig();\r\n\t\tlet indices = this.Reveal.getIndices();\r\n\t\tlet currentSlide = this.Reveal.getCurrentSlide();\r\n\r\n\t\tlet hash = window.location.hash;\r\n\r\n\t\t// Attempt to parse the hash as either an index or name\r\n\t\tlet bits = hash.slice( 2 ).split( '/' ),\r\n\t\t\tname = hash.replace( /#\\/?/gi, '' );\r\n\r\n\t\t// If the first bit is not fully numeric and there is a name we\r\n\t\t// can assume that this is a named link\r\n\t\tif( !/^[0-9]*$/.test( bits[0] ) && name.length ) {\r\n\t\t\tlet element;\r\n\r\n\t\t\tlet f;\r\n\r\n\t\t\t// Parse named links with fragments (#/named-link/2)\r\n\t\t\tif( /\\/[-\\d]+$/g.test( name ) ) {\r\n\t\t\t\tf = parseInt( name.split( '/' ).pop(), 10 );\r\n\t\t\t\tf = isNaN(f) ? undefined : f;\r\n\t\t\t\tname = name.split( '/' ).shift();\r\n\t\t\t}\r\n\r\n\t\t\t// Ensure the named link is a valid HTML ID attribute\r\n\t\t\ttry {\r\n\t\t\t\telement = document.getElementById( decodeURIComponent( name ) );\r\n\t\t\t}\r\n\t\t\tcatch ( error ) { }\r\n\r\n\t\t\t// Ensure that we're not already on a slide with the same name\r\n\t\t\tlet isSameNameAsCurrentSlide = currentSlide ? currentSlide.getAttribute( 'id' ) === name : false;\r\n\r\n\t\t\tif( element ) {\r\n\t\t\t\t// If the slide exists and is not the current slide...\r\n\t\t\t\tif ( !isSameNameAsCurrentSlide || typeof f !== 'undefined' ) {\r\n\t\t\t\t\t// ...find the position of the named slide and navigate to it\r\n\t\t\t\t\tlet slideIndices = this.Reveal.getIndices( element );\r\n\t\t\t\t\tthis.Reveal.slide( slideIndices.h, slideIndices.v, f );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If the slide doesn't exist, navigate to the current slide\r\n\t\t\telse {\r\n\t\t\t\tthis.Reveal.slide( indices.h || 0, indices.v || 0 );\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tlet hashIndexBase = config.hashOneBasedIndex ? 1 : 0;\r\n\r\n\t\t\t// Read the index components of the hash\r\n\t\t\tlet h = ( parseInt( bits[0], 10 ) - hashIndexBase ) || 0,\r\n\t\t\t\tv = ( parseInt( bits[1], 10 ) - hashIndexBase ) || 0,\r\n\t\t\t\tf;\r\n\r\n\t\t\tif( config.fragmentInURL ) {\r\n\t\t\t\tf = parseInt( bits[2], 10 );\r\n\t\t\t\tif( isNaN( f ) ) {\r\n\t\t\t\t\tf = undefined;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif( h !== indices.h || v !== indices.v || f !== undefined ) {\r\n\t\t\t\tthis.Reveal.slide( h, v, f );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the page URL (hash) to reflect the current\r\n\t * state.\r\n\t *\r\n\t * @param {number} delay The time in ms to wait before\r\n\t * writing the hash\r\n\t */\r\n\twriteURL( delay ) {\r\n\r\n\t\tlet config = this.Reveal.getConfig();\r\n\t\tlet currentSlide = this.Reveal.getCurrentSlide();\r\n\r\n\t\t// Make sure there's never more than one timeout running\r\n\t\tclearTimeout( this.writeURLTimeout );\r\n\r\n\t\t// If a delay is specified, timeout this call\r\n\t\tif( typeof delay === 'number' ) {\r\n\t\t\tthis.writeURLTimeout = setTimeout( this.writeURL, delay );\r\n\t\t}\r\n\t\telse if( currentSlide ) {\r\n\t\t\t// If we're configured to push to history OR the history\r\n\t\t\t// API is not avaialble.\r\n\t\t\tif( config.history || supportsHistoryAPI === false ) {\r\n\t\t\t\twindow.location.hash = this.getHash();\r\n\t\t\t}\r\n\t\t\t// If we're configured to reflect the current slide in the\r\n\t\t\t// URL without pushing to history.\r\n\t\t\telse if( config.hash ) {\r\n\t\t\t\twindow.history.replaceState( null, null, '#' + this.getHash() );\r\n\t\t\t}\r\n\t\t\t// UPDATE: The below nuking of all hash changes breaks\r\n\t\t\t// anchors on pages where reveal.js is running. Removed\r\n\t\t\t// in 4.0. Why was it here in the first place? ¯\\_(ツ)_/¯\r\n\t\t\t//\r\n\t\t\t// If history and hash are both disabled, a hash may still\r\n\t\t\t// be added to the URL by clicking on a href with a hash\r\n\t\t\t// target. Counter this by always removing the hash.\r\n\t\t\t// else {\r\n\t\t\t// \twindow.history.replaceState( null, null, window.location.pathname + window.location.search );\r\n\t\t\t// }\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Return a hash URL that will resolve to the given slide location.\r\n\t *\r\n\t * @param {HTMLElement} [slide=currentSlide] The slide to link to\r\n\t */\r\n\tgetHash( slide ) {\r\n\r\n\t\tlet url = '/';\r\n\r\n\t\t// Attempt to create a named link based on the slide's ID\r\n\t\tlet s = slide || this.Reveal.getCurrentSlide();\r\n\t\tlet id = s ? s.getAttribute( 'id' ) : null;\r\n\t\tif( id ) {\r\n\t\t\tid = encodeURIComponent( id );\r\n\t\t}\r\n\r\n\t\tlet index = this.Reveal.getIndices( slide );\r\n\t\tif( !this.Reveal.getConfig().fragmentInURL ) {\r\n\t\t\tindex.f = undefined;\r\n\t\t}\r\n\r\n\t\t// If the current slide has an ID, use that as a named link,\r\n\t\t// but we don't support named links with a fragment index\r\n\t\tif( typeof id === 'string' && id.length ) {\r\n\t\t\turl = '/' + id;\r\n\r\n\t\t\t// If there is also a fragment, append that at the end\r\n\t\t\t// of the named link, like: #/named-link/2\r\n\t\t\tif( index.f >= 0 ) url += '/' + index.f;\r\n\t\t}\r\n\t\t// Otherwise use the /h/v index\r\n\t\telse {\r\n\t\t\tlet hashIndexBase = this.Reveal.getConfig().hashOneBasedIndex ? 1 : 0;\r\n\t\t\tif( index.h > 0 || index.v > 0 || index.f >= 0 ) url += index.h + hashIndexBase;\r\n\t\t\tif( index.v > 0 || index.f >= 0 ) url += '/' + (index.v + hashIndexBase );\r\n\t\t\tif( index.f >= 0 ) url += '/' + index.f;\r\n\t\t}\r\n\r\n\t\treturn url;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Handler for the window level 'hashchange' event.\r\n\t *\r\n\t * @param {object} [event]\r\n\t */\r\n\tonWindowHashChange( event ) {\r\n\r\n\t\tthis.readURL();\r\n\r\n\t}\r\n\r\n}","import { queryAll } from '../utils/util.js'\r\nimport { isAndroid } from '../utils/device.js'\r\n\r\n/**\r\n * Manages our presentation controls. This includes both\r\n * the built-in control arrows as well as event monitoring\r\n * of any elements within the presentation with either of the\r\n * following helper classes:\r\n * - .navigate-up\r\n * - .navigate-right\r\n * - .navigate-down\r\n * - .navigate-left\r\n * - .navigate-next\r\n * - .navigate-prev\r\n */\r\nexport default class Controls {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t\tthis.onNavigateLeftClicked = this.onNavigateLeftClicked.bind( this );\r\n\t\tthis.onNavigateRightClicked = this.onNavigateRightClicked.bind( this );\r\n\t\tthis.onNavigateUpClicked = this.onNavigateUpClicked.bind( this );\r\n\t\tthis.onNavigateDownClicked = this.onNavigateDownClicked.bind( this );\r\n\t\tthis.onNavigatePrevClicked = this.onNavigatePrevClicked.bind( this );\r\n\t\tthis.onNavigateNextClicked = this.onNavigateNextClicked.bind( this );\r\n\r\n\t}\r\n\r\n\trender() {\r\n\r\n\t\tconst rtl = this.Reveal.getConfig().rtl;\r\n\t\tconst revealElement = this.Reveal.getRevealElement();\r\n\r\n\t\tthis.element = document.createElement( 'aside' );\r\n\t\tthis.element.className = 'controls';\r\n\t\tthis.element.innerHTML =\r\n\t\t\t`\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t`;\r\n\r\n\t\tthis.Reveal.getRevealElement().appendChild( this.element );\r\n\r\n\t\t// There can be multiple instances of controls throughout the page\r\n\t\tthis.controlsLeft = queryAll( revealElement, '.navigate-left' );\r\n\t\tthis.controlsRight = queryAll( revealElement, '.navigate-right' );\r\n\t\tthis.controlsUp = queryAll( revealElement, '.navigate-up' );\r\n\t\tthis.controlsDown = queryAll( revealElement, '.navigate-down' );\r\n\t\tthis.controlsPrev = queryAll( revealElement, '.navigate-prev' );\r\n\t\tthis.controlsNext = queryAll( revealElement, '.navigate-next' );\r\n\r\n\t\t// The left, right and down arrows in the standard reveal.js controls\r\n\t\tthis.controlsRightArrow = this.element.querySelector( '.navigate-right' );\r\n\t\tthis.controlsLeftArrow = this.element.querySelector( '.navigate-left' );\r\n\t\tthis.controlsDownArrow = this.element.querySelector( '.navigate-down' );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the reveal.js config is updated.\r\n\t */\r\n\tconfigure( config, oldConfig ) {\r\n\r\n\t\tthis.element.style.display = config.controls ? 'block' : 'none';\r\n\r\n\t\tthis.element.setAttribute( 'data-controls-layout', config.controlsLayout );\r\n\t\tthis.element.setAttribute( 'data-controls-back-arrows', config.controlsBackArrows );\r\n\r\n\t}\r\n\r\n\tbind() {\r\n\r\n\t\t// Listen to both touch and click events, in case the device\r\n\t\t// supports both\r\n\t\tlet pointerEvents = [ 'touchstart', 'click' ];\r\n\r\n\t\t// Only support touch for Android, fixes double navigations in\r\n\t\t// stock browser\r\n\t\tif( isAndroid ) {\r\n\t\t\tpointerEvents = [ 'touchstart' ];\r\n\t\t}\r\n\r\n\t\tpointerEvents.forEach( eventName => {\r\n\t\t\tthis.controlsLeft.forEach( el => el.addEventListener( eventName, this.onNavigateLeftClicked, false ) );\r\n\t\t\tthis.controlsRight.forEach( el => el.addEventListener( eventName, this.onNavigateRightClicked, false ) );\r\n\t\t\tthis.controlsUp.forEach( el => el.addEventListener( eventName, this.onNavigateUpClicked, false ) );\r\n\t\t\tthis.controlsDown.forEach( el => el.addEventListener( eventName, this.onNavigateDownClicked, false ) );\r\n\t\t\tthis.controlsPrev.forEach( el => el.addEventListener( eventName, this.onNavigatePrevClicked, false ) );\r\n\t\t\tthis.controlsNext.forEach( el => el.addEventListener( eventName, this.onNavigateNextClicked, false ) );\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\tunbind() {\r\n\r\n\t\t[ 'touchstart', 'click' ].forEach( eventName => {\r\n\t\t\tthis.controlsLeft.forEach( el => el.removeEventListener( eventName, this.onNavigateLeftClicked, false ) );\r\n\t\t\tthis.controlsRight.forEach( el => el.removeEventListener( eventName, this.onNavigateRightClicked, false ) );\r\n\t\t\tthis.controlsUp.forEach( el => el.removeEventListener( eventName, this.onNavigateUpClicked, false ) );\r\n\t\t\tthis.controlsDown.forEach( el => el.removeEventListener( eventName, this.onNavigateDownClicked, false ) );\r\n\t\t\tthis.controlsPrev.forEach( el => el.removeEventListener( eventName, this.onNavigatePrevClicked, false ) );\r\n\t\t\tthis.controlsNext.forEach( el => el.removeEventListener( eventName, this.onNavigateNextClicked, false ) );\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the state of all control/navigation arrows.\r\n\t */\r\n\tupdate() {\r\n\r\n\t\tlet routes = this.Reveal.availableRoutes();\r\n\r\n\t\t// Remove the 'enabled' class from all directions\r\n\t\t[...this.controlsLeft, ...this.controlsRight, ...this.controlsUp, ...this.controlsDown, ...this.controlsPrev, ...this.controlsNext].forEach( node => {\r\n\t\t\tnode.classList.remove( 'enabled', 'fragmented' );\r\n\r\n\t\t\t// Set 'disabled' attribute on all directions\r\n\t\t\tnode.setAttribute( 'disabled', 'disabled' );\r\n\t\t} );\r\n\r\n\t\t// Add the 'enabled' class to the available routes; remove 'disabled' attribute to enable buttons\r\n\t\tif( routes.left ) this.controlsLeft.forEach( el => { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } );\r\n\t\tif( routes.right ) this.controlsRight.forEach( el => { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } );\r\n\t\tif( routes.up ) this.controlsUp.forEach( el => { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } );\r\n\t\tif( routes.down ) this.controlsDown.forEach( el => { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } );\r\n\r\n\t\t// Prev/next buttons\r\n\t\tif( routes.left || routes.up ) this.controlsPrev.forEach( el => { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } );\r\n\t\tif( routes.right || routes.down ) this.controlsNext.forEach( el => { el.classList.add( 'enabled' ); el.removeAttribute( 'disabled' ); } );\r\n\r\n\t\t// Highlight fragment directions\r\n\t\tlet currentSlide = this.Reveal.getCurrentSlide();\r\n\t\tif( currentSlide ) {\r\n\r\n\t\t\tlet fragmentsRoutes = this.Reveal.fragments.availableRoutes();\r\n\r\n\t\t\t// Always apply fragment decorator to prev/next buttons\r\n\t\t\tif( fragmentsRoutes.prev ) this.controlsPrev.forEach( el => { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } );\r\n\t\t\tif( fragmentsRoutes.next ) this.controlsNext.forEach( el => { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } );\r\n\r\n\t\t\t// Apply fragment decorators to directional buttons based on\r\n\t\t\t// what slide axis they are in\r\n\t\t\tif( this.Reveal.isVerticalSlide( currentSlide ) ) {\r\n\t\t\t\tif( fragmentsRoutes.prev ) this.controlsUp.forEach( el => { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } );\r\n\t\t\t\tif( fragmentsRoutes.next ) this.controlsDown.forEach( el => { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif( fragmentsRoutes.prev ) this.controlsLeft.forEach( el => { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } );\r\n\t\t\t\tif( fragmentsRoutes.next ) this.controlsRight.forEach( el => { el.classList.add( 'fragmented', 'enabled' ); el.removeAttribute( 'disabled' ); } );\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif( this.Reveal.getConfig().controlsTutorial ) {\r\n\r\n\t\t\tlet indices = this.Reveal.getIndices();\r\n\r\n\t\t\t// Highlight control arrows with an animation to ensure\r\n\t\t\t// that the viewer knows how to navigate\r\n\t\t\tif( !this.Reveal.hasNavigatedVertically() && routes.down ) {\r\n\t\t\t\tthis.controlsDownArrow.classList.add( 'highlight' );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.controlsDownArrow.classList.remove( 'highlight' );\r\n\r\n\t\t\t\tif( this.Reveal.getConfig().rtl ) {\r\n\r\n\t\t\t\t\tif( !this.Reveal.hasNavigatedHorizontally() && routes.left && indices.v === 0 ) {\r\n\t\t\t\t\t\tthis.controlsLeftArrow.classList.add( 'highlight' );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis.controlsLeftArrow.classList.remove( 'highlight' );\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tif( !this.Reveal.hasNavigatedHorizontally() && routes.right && indices.v === 0 ) {\r\n\t\t\t\t\t\tthis.controlsRightArrow.classList.add( 'highlight' );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis.controlsRightArrow.classList.remove( 'highlight' );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Event handlers for navigation control buttons.\r\n\t */\r\n\tonNavigateLeftClicked( event ) {\r\n\r\n\t\tevent.preventDefault();\r\n\t\tthis.Reveal.onUserInput();\r\n\r\n\t\tif( this.Reveal.getConfig().navigationMode === 'linear' ) {\r\n\t\t\tthis.Reveal.prev();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.Reveal.left();\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tonNavigateRightClicked( event ) {\r\n\r\n\t\tevent.preventDefault();\r\n\t\tthis.Reveal.onUserInput();\r\n\r\n\t\tif( this.Reveal.getConfig().navigationMode === 'linear' ) {\r\n\t\t\tthis.Reveal.next();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.Reveal.right();\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tonNavigateUpClicked( event ) {\r\n\r\n\t\tevent.preventDefault();\r\n\t\tthis.Reveal.onUserInput();\r\n\r\n\t\tthis.Reveal.up();\r\n\r\n\t}\r\n\r\n\tonNavigateDownClicked( event ) {\r\n\r\n\t\tevent.preventDefault();\r\n\t\tthis.Reveal.onUserInput();\r\n\r\n\t\tthis.Reveal.down();\r\n\r\n\t}\r\n\r\n\tonNavigatePrevClicked( event ) {\r\n\r\n\t\tevent.preventDefault();\r\n\t\tthis.Reveal.onUserInput();\r\n\r\n\t\tthis.Reveal.prev();\r\n\r\n\t}\r\n\r\n\tonNavigateNextClicked( event ) {\r\n\r\n\t\tevent.preventDefault();\r\n\t\tthis.Reveal.onUserInput();\r\n\r\n\t\tthis.Reveal.next();\r\n\r\n\t}\r\n\r\n\r\n}","/**\r\n * Creates a visual progress bar for the presentation.\r\n */\r\nexport default class Progress {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t\tthis.onProgressClicked = this.onProgressClicked.bind( this );\r\n\r\n\t}\r\n\r\n\trender() {\r\n\r\n\t\tthis.element = document.createElement( 'div' );\r\n\t\tthis.element.className = 'progress';\r\n\t\tthis.Reveal.getRevealElement().appendChild( this.element );\r\n\r\n\t\tthis.bar = document.createElement( 'span' );\r\n\t\tthis.element.appendChild( this.bar );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the reveal.js config is updated.\r\n\t */\r\n\tconfigure( config, oldConfig ) {\r\n\r\n\t\tthis.element.style.display = config.progress ? 'block' : 'none';\r\n\r\n\t}\r\n\r\n\tbind() {\r\n\r\n\t\tif( this.Reveal.getConfig().progress && this.element ) {\r\n\t\t\tthis.element.addEventListener( 'click', this.onProgressClicked, false );\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tunbind() {\r\n\r\n\t\tif ( this.Reveal.getConfig().progress && this.element ) {\r\n\t\t\tthis.element.removeEventListener( 'click', this.onProgressClicked, false );\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the progress bar to reflect the current slide.\r\n\t */\r\n\tupdate() {\r\n\r\n\t\t// Update progress if enabled\r\n\t\tif( this.Reveal.getConfig().progress && this.bar ) {\r\n\r\n\t\t\tthis.bar.style.transform = 'scaleX('+ this.Reveal.getProgress() +')';\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tgetMaxWidth() {\r\n\r\n\t\treturn this.Reveal.getRevealElement().offsetWidth;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Clicking on the progress bar results in a navigation to the\r\n\t * closest approximate horizontal slide using this equation:\r\n\t *\r\n\t * ( clickX / presentationWidth ) * numberOfSlides\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tonProgressClicked( event ) {\r\n\r\n\t\tthis.Reveal.onUserInput( event );\r\n\r\n\t\tevent.preventDefault();\r\n\r\n\t\tlet slidesTotal = this.Reveal.getHorizontalSlides().length;\r\n\t\tlet slideIndex = Math.floor( ( event.clientX / this.getMaxWidth() ) * slidesTotal );\r\n\r\n\t\tif( this.Reveal.getConfig().rtl ) {\r\n\t\t\tslideIndex = slidesTotal - slideIndex;\r\n\t\t}\r\n\r\n\t\tthis.Reveal.slide( slideIndex );\r\n\r\n\t}\r\n\r\n\r\n}","/**\r\n * Handles hiding of the pointer/cursor when inactive.\r\n */\r\nexport default class Pointer {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t\t// Throttles mouse wheel navigation\r\n\t\tthis.lastMouseWheelStep = 0;\r\n\r\n\t\t// Is the mouse pointer currently hidden from view\r\n\t\tthis.cursorHidden = false;\r\n\r\n\t\t// Timeout used to determine when the cursor is inactive\r\n\t\tthis.cursorInactiveTimeout = 0;\r\n\r\n\t\tthis.onDocumentCursorActive = this.onDocumentCursorActive.bind( this );\r\n\t\tthis.onDocumentMouseScroll = this.onDocumentMouseScroll.bind( this );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the reveal.js config is updated.\r\n\t */\r\n\tconfigure( config, oldConfig ) {\r\n\r\n\t\tif( config.mouseWheel ) {\r\n\t\t\tdocument.addEventListener( 'DOMMouseScroll', this.onDocumentMouseScroll, false ); // FF\r\n\t\t\tdocument.addEventListener( 'mousewheel', this.onDocumentMouseScroll, false );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdocument.removeEventListener( 'DOMMouseScroll', this.onDocumentMouseScroll, false ); // FF\r\n\t\t\tdocument.removeEventListener( 'mousewheel', this.onDocumentMouseScroll, false );\r\n\t\t}\r\n\r\n\t\t// Auto-hide the mouse pointer when its inactive\r\n\t\tif( config.hideInactiveCursor ) {\r\n\t\t\tdocument.addEventListener( 'mousemove', this.onDocumentCursorActive, false );\r\n\t\t\tdocument.addEventListener( 'mousedown', this.onDocumentCursorActive, false );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.showCursor();\r\n\r\n\t\t\tdocument.removeEventListener( 'mousemove', this.onDocumentCursorActive, false );\r\n\t\t\tdocument.removeEventListener( 'mousedown', this.onDocumentCursorActive, false );\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Shows the mouse pointer after it has been hidden with\r\n\t * #hideCursor.\r\n\t */\r\n\tshowCursor() {\r\n\r\n\t\tif( this.cursorHidden ) {\r\n\t\t\tthis.cursorHidden = false;\r\n\t\t\tthis.Reveal.getRevealElement().style.cursor = '';\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Hides the mouse pointer when it's on top of the .reveal\r\n\t * container.\r\n\t */\r\n\thideCursor() {\r\n\r\n\t\tif( this.cursorHidden === false ) {\r\n\t\t\tthis.cursorHidden = true;\r\n\t\t\tthis.Reveal.getRevealElement().style.cursor = 'none';\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Called whenever there is mouse input at the document level\r\n\t * to determine if the cursor is active or not.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tonDocumentCursorActive( event ) {\r\n\r\n\t\tthis.showCursor();\r\n\r\n\t\tclearTimeout( this.cursorInactiveTimeout );\r\n\r\n\t\tthis.cursorInactiveTimeout = setTimeout( this.hideCursor.bind( this ), this.Reveal.getConfig().hideCursorTime );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Handles mouse wheel scrolling, throttled to avoid skipping\r\n\t * multiple slides.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tonDocumentMouseScroll( event ) {\r\n\r\n\t\tif( Date.now() - this.lastMouseWheelStep > 1000 ) {\r\n\r\n\t\t\tthis.lastMouseWheelStep = Date.now();\r\n\r\n\t\t\tlet delta = event.detail || -event.wheelDelta;\r\n\t\t\tif( delta > 0 ) {\r\n\t\t\t\tthis.Reveal.next();\r\n\t\t\t}\r\n\t\t\telse if( delta < 0 ) {\r\n\t\t\t\tthis.Reveal.prev();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n}","var DESCRIPTORS = require('../internals/descriptors');\nvar objectKeys = require('../internals/object-keys');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar propertyIsEnumerable = require('../internals/object-property-is-enumerable').f;\n\n// `Object.{ entries, values }` methods implementation\nvar createMethod = function (TO_ENTRIES) {\n return function (it) {\n var O = toIndexedObject(it);\n var keys = objectKeys(O);\n var length = keys.length;\n var i = 0;\n var result = [];\n var key;\n while (length > i) {\n key = keys[i++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {\n result.push(TO_ENTRIES ? [key, O[key]] : O[key]);\n }\n }\n return result;\n };\n};\n\nmodule.exports = {\n // `Object.entries` method\n // https://tc39.github.io/ecma262/#sec-object.entries\n entries: createMethod(true),\n // `Object.values` method\n // https://tc39.github.io/ecma262/#sec-object.values\n values: createMethod(false)\n};\n","var $ = require('../internals/export');\nvar $values = require('../internals/object-to-array').values;\n\n// `Object.values` method\n// https://tc39.github.io/ecma262/#sec-object.values\n$({ target: 'Object', stat: true }, {\n values: function values(O) {\n return $values(O);\n }\n});\n","/**\r\n * Loads a JavaScript file from the given URL and executes it.\r\n *\r\n * @param {string} url Address of the .js file to load\r\n * @param {function} callback Method to invoke when the script\r\n * has loaded and executed\r\n */\r\nexport const loadScript = ( url, callback ) => {\r\n\r\n\tconst script = document.createElement( 'script' );\r\n\tscript.type = 'text/javascript';\r\n\tscript.async = false;\r\n\tscript.defer = false;\r\n\tscript.src = url;\r\n\r\n\tif( typeof callback === 'function' ) {\r\n\r\n\t\t// Success callback\r\n\t\tscript.onload = script.onreadystatechange = event => {\r\n\t\t\tif( event.type === 'load' || /loaded|complete/.test( script.readyState ) ) {\r\n\r\n\t\t\t\t// Kill event listeners\r\n\t\t\t\tscript.onload = script.onreadystatechange = script.onerror = null;\r\n\r\n\t\t\t\tcallback();\r\n\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// Error callback\r\n\t\tscript.onerror = err => {\r\n\r\n\t\t\t// Kill event listeners\r\n\t\t\tscript.onload = script.onreadystatechange = script.onerror = null;\r\n\r\n\t\t\tcallback( new Error( 'Failed loading script: ' + script.src + '\\n' + err ) );\r\n\r\n\t\t};\r\n\r\n\t}\r\n\r\n\t// Append the script at the end of \r\n\tconst head = document.querySelector( 'head' );\r\n\thead.insertBefore( script, head.lastChild );\r\n\r\n}","import { loadScript } from '../utils/loader.js'\r\n\r\n/**\r\n * Manages loading and registering of reveal.js plugins.\r\n */\r\nexport default class Plugins {\r\n\r\n\tconstructor( reveal ) {\r\n\r\n\t\tthis.Reveal = reveal;\r\n\r\n\t\t// Flags our current state (idle -> loading -> loaded)\r\n\t\tthis.state = 'idle';\r\n\r\n\t\t// An id:instance map of currently registed plugins\r\n\t\tthis.registeredPlugins = {};\r\n\r\n\t\tthis.asyncDependencies = [];\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Loads reveal.js dependencies, registers and\r\n\t * initializes plugins.\r\n\t *\r\n\t * Plugins are direct references to a reveal.js plugin\r\n\t * object that we register and initialize after any\r\n\t * synchronous dependencies have loaded.\r\n\t *\r\n\t * Dependencies are defined via the 'dependencies' config\r\n\t * option and will be loaded prior to starting reveal.js.\r\n\t * Some dependencies may have an 'async' flag, if so they\r\n\t * will load after reveal.js has been started up.\r\n\t */\r\n\tload( plugins, dependencies ) {\r\n\r\n\t\tthis.state = 'loading';\r\n\r\n\t\tplugins.forEach( this.registerPlugin.bind( this ) );\r\n\r\n\t\treturn new Promise( resolve => {\r\n\r\n\t\t\tlet scripts = [],\r\n\t\t\t\tscriptsToLoad = 0;\r\n\r\n\t\t\tdependencies.forEach( s => {\r\n\t\t\t\t// Load if there's no condition or the condition is truthy\r\n\t\t\t\tif( !s.condition || s.condition() ) {\r\n\t\t\t\t\tif( s.async ) {\r\n\t\t\t\t\t\tthis.asyncDependencies.push( s );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tscripts.push( s );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} );\r\n\r\n\t\t\tif( scripts.length ) {\r\n\t\t\t\tscriptsToLoad = scripts.length;\r\n\r\n\t\t\t\tconst scriptLoadedCallback = (s) => {\r\n\t\t\t\t\tif( s && typeof s.callback === 'function' ) s.callback();\r\n\r\n\t\t\t\t\tif( --scriptsToLoad === 0 ) {\r\n\t\t\t\t\t\tthis.initPlugins().then( resolve );\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\t// Load synchronous scripts\r\n\t\t\t\tscripts.forEach( s => {\r\n\t\t\t\t\tif( typeof s.id === 'string' ) {\r\n\t\t\t\t\t\tthis.registerPlugin( s );\r\n\t\t\t\t\t\tscriptLoadedCallback( s );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if( typeof s.src === 'string' ) {\r\n\t\t\t\t\t\tloadScript( s.src, () => scriptLoadedCallback(s) );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tconsole.warn( 'Unrecognized plugin format', s );\r\n\t\t\t\t\t\tscriptLoadedCallback();\r\n\t\t\t\t\t}\r\n\t\t\t\t} );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthis.initPlugins().then( resolve );\r\n\t\t\t}\r\n\r\n\t\t} );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Initializes our plugins and waits for them to be ready\r\n\t * before proceeding.\r\n\t */\r\n\tinitPlugins() {\r\n\r\n\t\treturn new Promise( resolve => {\r\n\r\n\t\t\tlet pluginValues = Object.values( this.registeredPlugins );\r\n\t\t\tlet pluginsToInitialize = pluginValues.length;\r\n\r\n\t\t\t// If there are no plugins, skip this step\r\n\t\t\tif( pluginsToInitialize === 0 ) {\r\n\t\t\t\tthis.loadAsync().then( resolve );\r\n\t\t\t}\r\n\t\t\t// ... otherwise initialize plugins\r\n\t\t\telse {\r\n\r\n\t\t\t\tlet initNextPlugin;\r\n\r\n\t\t\t\tlet afterPlugInitialized = () => {\r\n\t\t\t\t\tif( --pluginsToInitialize === 0 ) {\r\n\t\t\t\t\t\tthis.loadAsync().then( resolve );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tinitNextPlugin();\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\r\n\t\t\t\tlet i = 0;\r\n\r\n\t\t\t\t// Initialize plugins serially\r\n\t\t\t\tinitNextPlugin = () => {\r\n\r\n\t\t\t\t\tlet plugin = pluginValues[i++];\r\n\r\n\t\t\t\t\t// If the plugin has an 'init' method, invoke it\r\n\t\t\t\t\tif( typeof plugin.init === 'function' ) {\r\n\t\t\t\t\t\tlet promise = plugin.init( this.Reveal );\r\n\r\n\t\t\t\t\t\t// If the plugin returned a Promise, wait for it\r\n\t\t\t\t\t\tif( promise && typeof promise.then === 'function' ) {\r\n\t\t\t\t\t\t\tpromise.then( afterPlugInitialized );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tafterPlugInitialized();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tafterPlugInitialized();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tinitNextPlugin();\r\n\r\n\t\t\t}\r\n\r\n\t\t} )\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Loads all async reveal.js dependencies.\r\n\t */\r\n\tloadAsync() {\r\n\r\n\t\tthis.state = 'loaded';\r\n\r\n\t\tif( this.asyncDependencies.length ) {\r\n\t\t\tthis.asyncDependencies.forEach( s => {\r\n\t\t\t\tloadScript( s.src, s.callback );\r\n\t\t\t} );\r\n\t\t}\r\n\r\n\t\treturn Promise.resolve();\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Registers a new plugin with this reveal.js instance.\r\n\t *\r\n\t * reveal.js waits for all regisered plugins to initialize\r\n\t * before considering itself ready, as long as the plugin\r\n\t * is registered before calling `Reveal.initialize()`.\r\n\t */\r\n\tregisterPlugin( plugin ) {\r\n\r\n\t\t// Backwards compatibility to make reveal.js ~3.9.0\r\n\t\t// plugins work with reveal.js 4.0.0\r\n\t\tif( arguments.length === 2 && typeof arguments[0] === 'string' ) {\r\n\t\t\tplugin = arguments[1];\r\n\t\t\tplugin.id = arguments[0];\r\n\t\t}\r\n\t\t// Plugin can optionally be a function which we call\r\n\t\t// to create an instance of the plugin\r\n\t\telse if( typeof plugin === 'function' ) {\r\n\t\t\tplugin = plugin();\r\n\t\t}\r\n\r\n\t\tlet id = plugin.id;\r\n\r\n\t\tif( typeof id !== 'string' ) {\r\n\t\t\tconsole.warn( 'Unrecognized plugin format; can\\'t find plugin.id', plugin );\r\n\t\t}\r\n\t\telse if( this.registeredPlugins[id] === undefined ) {\r\n\t\t\tthis.registeredPlugins[id] = plugin;\r\n\r\n\t\t\t// If a plugin is registered after reveal.js is loaded,\r\n\t\t\t// initialize it right away\r\n\t\t\tif( this.state === 'loaded' && typeof plugin.init === 'function' ) {\r\n\t\t\t\tplugin.init( this.Reveal );\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tconsole.warn( 'reveal.js: \"'+ id +'\" plugin has already been registered' );\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if a specific plugin has been registered.\r\n\t *\r\n\t * @param {String} id Unique plugin identifier\r\n\t */\r\n\thasPlugin( id ) {\r\n\r\n\t\treturn !!this.registeredPlugins[id];\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Returns the specific plugin instance, if a plugin\r\n\t * with the given ID has been registered.\r\n\t *\r\n\t * @param {String} id Unique plugin identifier\r\n\t */\r\n\tgetPlugin( id ) {\r\n\r\n\t\treturn this.registeredPlugins[id];\r\n\r\n\t}\r\n\r\n\tgetRegisteredPlugins() {\r\n\r\n\t\treturn this.registeredPlugins;\r\n\r\n\t}\r\n\r\n}\r\n","import { SLIDES_SELECTOR } from '../utils/constants.js'\r\nimport { queryAll, createStyleSheet } from '../utils/util.js'\r\n\r\n/**\r\n * Setups up our presentation for printing/exporting to PDF.\r\n */\r\nexport default class Print {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Configures the presentation for printing to a static\r\n\t * PDF.\r\n\t */\r\n\tsetupPDF() {\r\n\r\n\t\tlet config = this.Reveal.getConfig();\r\n\r\n\t\tlet slideSize = this.Reveal.getComputedSlideSize( window.innerWidth, window.innerHeight );\r\n\r\n\t\t// Dimensions of the PDF pages\r\n\t\tlet pageWidth = Math.floor( slideSize.width * ( 1 + config.margin ) ),\r\n\t\t\tpageHeight = Math.floor( slideSize.height * ( 1 + config.margin ) );\r\n\r\n\t\t// Dimensions of slides within the pages\r\n\t\tlet slideWidth = slideSize.width,\r\n\t\t\tslideHeight = slideSize.height;\r\n\r\n\t\t// Let the browser know what page size we want to print\r\n\t\tcreateStyleSheet( '@page{size:'+ pageWidth +'px '+ pageHeight +'px; margin: 0px;}' );\r\n\r\n\t\t// Limit the size of certain elements to the dimensions of the slide\r\n\t\tcreateStyleSheet( '.reveal section>img, .reveal section>video, .reveal section>iframe{max-width: '+ slideWidth +'px; max-height:'+ slideHeight +'px}' );\r\n\r\n\t\tdocument.documentElement.classList.add( 'print-pdf' );\r\n\t\tdocument.body.style.width = pageWidth + 'px';\r\n\t\tdocument.body.style.height = pageHeight + 'px';\r\n\r\n\t\t// Make sure stretch elements fit on slide\r\n\t\tthis.Reveal.layoutSlideContents( slideWidth, slideHeight );\r\n\r\n\t\t// Compute slide numbers now, before we start duplicating slides\r\n\t\tlet doingSlideNumbers = config.slideNumber && /all|print/i.test( config.showSlideNumber );\r\n\t\tqueryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR ).forEach( function( slide ) {\r\n\t\t\tslide.setAttribute( 'data-slide-number', this.Reveal.slideNumber.getSlideNumber( slide ) );\r\n\t\t}, this );\r\n\r\n\t\t// Slide and slide background layout\r\n\t\tqueryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR ).forEach( function( slide ) {\r\n\r\n\t\t\t// Vertical stacks are not centred since their section\r\n\t\t\t// children will be\r\n\t\t\tif( slide.classList.contains( 'stack' ) === false ) {\r\n\t\t\t\t// Center the slide inside of the page, giving the slide some margin\r\n\t\t\t\tlet left = ( pageWidth - slideWidth ) / 2,\r\n\t\t\t\t\ttop = ( pageHeight - slideHeight ) / 2;\r\n\r\n\t\t\t\tlet contentHeight = slide.scrollHeight;\r\n\t\t\t\tlet numberOfPages = Math.max( Math.ceil( contentHeight / pageHeight ), 1 );\r\n\r\n\t\t\t\t// Adhere to configured pages per slide limit\r\n\t\t\t\tnumberOfPages = Math.min( numberOfPages, config.pdfMaxPagesPerSlide );\r\n\r\n\t\t\t\t// Center slides vertically\r\n\t\t\t\tif( numberOfPages === 1 && config.center || slide.classList.contains( 'center' ) ) {\r\n\t\t\t\t\ttop = Math.max( ( pageHeight - contentHeight ) / 2, 0 );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Wrap the slide in a page element and hide its overflow\r\n\t\t\t\t// so that no page ever flows onto another\r\n\t\t\t\tlet page = document.createElement( 'div' );\r\n\t\t\t\tpage.className = 'pdf-page';\r\n\t\t\t\tpage.style.height = ( ( pageHeight + config.pdfPageHeightOffset ) * numberOfPages ) + 'px';\r\n\t\t\t\tslide.parentNode.insertBefore( page, slide );\r\n\t\t\t\tpage.appendChild( slide );\r\n\r\n\t\t\t\t// Position the slide inside of the page\r\n\t\t\t\tslide.style.left = left + 'px';\r\n\t\t\t\tslide.style.top = top + 'px';\r\n\t\t\t\tslide.style.width = slideWidth + 'px';\r\n\r\n\t\t\t\tif( slide.slideBackgroundElement ) {\r\n\t\t\t\t\tpage.insertBefore( slide.slideBackgroundElement, slide );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Inject notes if `showNotes` is enabled\r\n\t\t\t\tif( config.showNotes ) {\r\n\r\n\t\t\t\t\t// Are there notes for this slide?\r\n\t\t\t\t\tlet notes = this.Reveal.getSlideNotes( slide );\r\n\t\t\t\t\tif( notes ) {\r\n\r\n\t\t\t\t\t\tlet notesSpacing = 8;\r\n\t\t\t\t\t\tlet notesLayout = typeof config.showNotes === 'string' ? config.showNotes : 'inline';\r\n\t\t\t\t\t\tlet notesElement = document.createElement( 'div' );\r\n\t\t\t\t\t\tnotesElement.classList.add( 'speaker-notes' );\r\n\t\t\t\t\t\tnotesElement.classList.add( 'speaker-notes-pdf' );\r\n\t\t\t\t\t\tnotesElement.setAttribute( 'data-layout', notesLayout );\r\n\t\t\t\t\t\tnotesElement.innerHTML = notes;\r\n\r\n\t\t\t\t\t\tif( notesLayout === 'separate-page' ) {\r\n\t\t\t\t\t\t\tpage.parentNode.insertBefore( notesElement, page.nextSibling );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tnotesElement.style.left = notesSpacing + 'px';\r\n\t\t\t\t\t\t\tnotesElement.style.bottom = notesSpacing + 'px';\r\n\t\t\t\t\t\t\tnotesElement.style.width = ( pageWidth - notesSpacing*2 ) + 'px';\r\n\t\t\t\t\t\t\tpage.appendChild( notesElement );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Inject slide numbers if `slideNumbers` are enabled\r\n\t\t\t\tif( doingSlideNumbers ) {\r\n\t\t\t\t\tlet numberElement = document.createElement( 'div' );\r\n\t\t\t\t\tnumberElement.classList.add( 'slide-number' );\r\n\t\t\t\t\tnumberElement.classList.add( 'slide-number-pdf' );\r\n\t\t\t\t\tnumberElement.innerHTML = slide.getAttribute( 'data-slide-number' );\r\n\t\t\t\t\tpage.appendChild( numberElement );\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Copy page and show fragments one after another\r\n\t\t\t\tif( config.pdfSeparateFragments ) {\r\n\r\n\t\t\t\t\t// Each fragment 'group' is an array containing one or more\r\n\t\t\t\t\t// fragments. Multiple fragments that appear at the same time\r\n\t\t\t\t\t// are part of the same group.\r\n\t\t\t\t\tlet fragmentGroups = this.Reveal.fragments.sort( page.querySelectorAll( '.fragment' ), true );\r\n\r\n\t\t\t\t\tlet previousFragmentStep;\r\n\t\t\t\t\tlet previousPage;\r\n\r\n\t\t\t\t\tfragmentGroups.forEach( function( fragments ) {\r\n\r\n\t\t\t\t\t\t// Remove 'current-fragment' from the previous group\r\n\t\t\t\t\t\tif( previousFragmentStep ) {\r\n\t\t\t\t\t\t\tpreviousFragmentStep.forEach( function( fragment ) {\r\n\t\t\t\t\t\t\t\tfragment.classList.remove( 'current-fragment' );\r\n\t\t\t\t\t\t\t} );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t// Show the fragments for the current index\r\n\t\t\t\t\t\tfragments.forEach( function( fragment ) {\r\n\t\t\t\t\t\t\tfragment.classList.add( 'visible', 'current-fragment' );\r\n\t\t\t\t\t\t}, this );\r\n\r\n\t\t\t\t\t\t// Create a separate page for the current fragment state\r\n\t\t\t\t\t\tlet clonedPage = page.cloneNode( true );\r\n\t\t\t\t\t\tpage.parentNode.insertBefore( clonedPage, ( previousPage || page ).nextSibling );\r\n\r\n\t\t\t\t\t\tpreviousFragmentStep = fragments;\r\n\t\t\t\t\t\tpreviousPage = clonedPage;\r\n\r\n\t\t\t\t\t}, this );\r\n\r\n\t\t\t\t\t// Reset the first/original page so that all fragments are hidden\r\n\t\t\t\t\tfragmentGroups.forEach( function( fragments ) {\r\n\t\t\t\t\t\tfragments.forEach( function( fragment ) {\r\n\t\t\t\t\t\t\tfragment.classList.remove( 'visible', 'current-fragment' );\r\n\t\t\t\t\t\t} );\r\n\t\t\t\t\t} );\r\n\r\n\t\t\t\t}\r\n\t\t\t\t// Show all fragments\r\n\t\t\t\telse {\r\n\t\t\t\t\tqueryAll( page, '.fragment:not(.fade-out)' ).forEach( function( fragment ) {\r\n\t\t\t\t\t\tfragment.classList.add( 'visible' );\r\n\t\t\t\t\t} );\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}, this );\r\n\r\n\t\t// Notify subscribers that the PDF layout is good to go\r\n\t\tthis.Reveal.dispatchEvent({ type: 'pdf-ready' });\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if this instance is being used to print a PDF.\r\n\t */\r\n\tisPrintingPDF() {\r\n\r\n\t\treturn ( /print-pdf/gi ).test( window.location.search );\r\n\r\n\t}\r\n\r\n}","import { isAndroid } from '../utils/device.js'\r\n\r\nconst SWIPE_THRESHOLD = 40;\r\n\r\n/**\r\n * Controls all touch interactions and navigations for\r\n * a presentation.\r\n */\r\nexport default class Touch {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t\t// Holds information about the currently ongoing touch interaction\r\n\t\tthis.touchStartX = 0;\r\n\t\tthis.touchStartY = 0;\r\n\t\tthis.touchStartCount = 0;\r\n\t\tthis.touchCaptured = false;\r\n\r\n\t\tthis.onPointerDown = this.onPointerDown.bind( this );\r\n\t\tthis.onPointerMove = this.onPointerMove.bind( this );\r\n\t\tthis.onPointerUp = this.onPointerUp.bind( this );\r\n\t\tthis.onTouchStart = this.onTouchStart.bind( this );\r\n\t\tthis.onTouchMove = this.onTouchMove.bind( this );\r\n\t\tthis.onTouchEnd = this.onTouchEnd.bind( this );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t */\r\n\tbind() {\r\n\r\n\t\tlet revealElement = this.Reveal.getRevealElement();\r\n\r\n\t\tif( 'onpointerdown' in window ) {\r\n\t\t\t// Use W3C pointer events\r\n\t\t\trevealElement.addEventListener( 'pointerdown', this.onPointerDown, false );\r\n\t\t\trevealElement.addEventListener( 'pointermove', this.onPointerMove, false );\r\n\t\t\trevealElement.addEventListener( 'pointerup', this.onPointerUp, false );\r\n\t\t}\r\n\t\telse if( window.navigator.msPointerEnabled ) {\r\n\t\t\t// IE 10 uses prefixed version of pointer events\r\n\t\t\trevealElement.addEventListener( 'MSPointerDown', this.onPointerDown, false );\r\n\t\t\trevealElement.addEventListener( 'MSPointerMove', this.onPointerMove, false );\r\n\t\t\trevealElement.addEventListener( 'MSPointerUp', this.onPointerUp, false );\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// Fall back to touch events\r\n\t\t\trevealElement.addEventListener( 'touchstart', this.onTouchStart, false );\r\n\t\t\trevealElement.addEventListener( 'touchmove', this.onTouchMove, false );\r\n\t\t\trevealElement.addEventListener( 'touchend', this.onTouchEnd, false );\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t *\r\n\t */\r\n\tunbind() {\r\n\r\n\t\tlet revealElement = this.Reveal.getRevealElement();\r\n\r\n\t\trevealElement.removeEventListener( 'pointerdown', this.onPointerDown, false );\r\n\t\trevealElement.removeEventListener( 'pointermove', this.onPointerMove, false );\r\n\t\trevealElement.removeEventListener( 'pointerup', this.onPointerUp, false );\r\n\r\n\t\trevealElement.removeEventListener( 'MSPointerDown', this.onPointerDown, false );\r\n\t\trevealElement.removeEventListener( 'MSPointerMove', this.onPointerMove, false );\r\n\t\trevealElement.removeEventListener( 'MSPointerUp', this.onPointerUp, false );\r\n\r\n\t\trevealElement.removeEventListener( 'touchstart', this.onTouchStart, false );\r\n\t\trevealElement.removeEventListener( 'touchmove', this.onTouchMove, false );\r\n\t\trevealElement.removeEventListener( 'touchend', this.onTouchEnd, false );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if the target element prevents the triggering of\r\n\t * swipe navigation.\r\n\t */\r\n\tisSwipePrevented( target ) {\r\n\r\n\t\twhile( target && typeof target.hasAttribute === 'function' ) {\r\n\t\t\tif( target.hasAttribute( 'data-prevent-swipe' ) ) return true;\r\n\t\t\ttarget = target.parentNode;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Handler for the 'touchstart' event, enables support for\r\n\t * swipe and pinch gestures.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tonTouchStart( event ) {\r\n\r\n\t\tif( this.isSwipePrevented( event.target ) ) return true;\r\n\r\n\t\tthis.touchStartX = event.touches[0].clientX;\r\n\t\tthis.touchStartY = event.touches[0].clientY;\r\n\t\tthis.touchStartCount = event.touches.length;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Handler for the 'touchmove' event.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tonTouchMove( event ) {\r\n\r\n\t\tif( this.isSwipePrevented( event.target ) ) return true;\r\n\r\n\t\tlet config = this.Reveal.getConfig();\r\n\r\n\t\t// Each touch should only trigger one action\r\n\t\tif( !this.touchCaptured ) {\r\n\t\t\tthis.Reveal.onUserInput( event );\r\n\r\n\t\t\tlet currentX = event.touches[0].clientX;\r\n\t\t\tlet currentY = event.touches[0].clientY;\r\n\r\n\t\t\t// There was only one touch point, look for a swipe\r\n\t\t\tif( event.touches.length === 1 && this.touchStartCount !== 2 ) {\r\n\r\n\t\t\t\tlet availableRoutes = this.Reveal.availableRoutes({ includeFragments: true });\r\n\r\n\t\t\t\tlet deltaX = currentX - this.touchStartX,\r\n\t\t\t\t\tdeltaY = currentY - this.touchStartY;\r\n\r\n\t\t\t\tif( deltaX > SWIPE_THRESHOLD && Math.abs( deltaX ) > Math.abs( deltaY ) ) {\r\n\t\t\t\t\tthis.touchCaptured = true;\r\n\t\t\t\t\tif( config.navigationMode === 'linear' ) {\r\n\t\t\t\t\t\tif( config.rtl ) {\r\n\t\t\t\t\t\t\tthis.Reveal.next();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tthis.Reveal.prev();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis.Reveal.left();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if( deltaX < -SWIPE_THRESHOLD && Math.abs( deltaX ) > Math.abs( deltaY ) ) {\r\n\t\t\t\t\tthis.touchCaptured = true;\r\n\t\t\t\t\tif( config.navigationMode === 'linear' ) {\r\n\t\t\t\t\t\tif( config.rtl ) {\r\n\t\t\t\t\t\t\tthis.Reveal.prev();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tthis.Reveal.next();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis.Reveal.right();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if( deltaY > SWIPE_THRESHOLD && availableRoutes.up ) {\r\n\t\t\t\t\tthis.touchCaptured = true;\r\n\t\t\t\t\tif( config.navigationMode === 'linear' ) {\r\n\t\t\t\t\t\tthis.Reveal.prev();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis.Reveal.up();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if( deltaY < -SWIPE_THRESHOLD && availableRoutes.down ) {\r\n\t\t\t\t\tthis.touchCaptured = true;\r\n\t\t\t\t\tif( config.navigationMode === 'linear' ) {\r\n\t\t\t\t\t\tthis.Reveal.next();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tthis.Reveal.down();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If we're embedded, only block touch events if they have\r\n\t\t\t\t// triggered an action\r\n\t\t\t\tif( config.embedded ) {\r\n\t\t\t\t\tif( this.touchCaptured || this.Reveal.isVerticalSlide() ) {\r\n\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Not embedded? Block them all to avoid needless tossing\r\n\t\t\t\t// around of the viewport in iOS\r\n\t\t\t\telse {\r\n\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t// There's a bug with swiping on some Android devices unless\r\n\t\t// the default action is always prevented\r\n\t\telse if( isAndroid ) {\r\n\t\t\tevent.preventDefault();\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Handler for the 'touchend' event.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tonTouchEnd( event ) {\r\n\r\n\t\tthis.touchCaptured = false;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Convert pointer down to touch start.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tonPointerDown( event ) {\r\n\r\n\t\tif( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === \"touch\" ) {\r\n\t\t\tevent.touches = [{ clientX: event.clientX, clientY: event.clientY }];\r\n\t\t\tthis.onTouchStart( event );\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Convert pointer move to touch move.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tonPointerMove( event ) {\r\n\r\n\t\tif( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === \"touch\" ) {\r\n\t\t\tevent.touches = [{ clientX: event.clientX, clientY: event.clientY }];\r\n\t\t\tthis.onTouchMove( event );\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Convert pointer up to touch end.\r\n\t *\r\n\t * @param {object} event\r\n\t */\r\n\tonPointerUp( event ) {\r\n\r\n\t\tif( event.pointerType === event.MSPOINTER_TYPE_TOUCH || event.pointerType === \"touch\" ) {\r\n\t\t\tevent.touches = [{ clientX: event.clientX, clientY: event.clientY }];\r\n\t\t\tthis.onTouchEnd( event );\r\n\t\t}\r\n\r\n\t}\r\n\r\n}","import { closest } from '../utils/util.js'\r\n\r\n/**\r\n * Manages focus when a presentation is embedded. This\r\n * helps us only capture keyboard from the presentation\r\n * a user is currently interacting with in a page where\r\n * multiple presentations are embedded.\r\n */\r\n\r\nconst STATE_FOCUS = 'focus';\r\nconst STATE_BLUR = 'blur';\r\n\r\nexport default class Focus {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t\tthis.onRevealPointerDown = this.onRevealPointerDown.bind( this );\r\n\t\tthis.onDocumentPointerDown = this.onDocumentPointerDown.bind( this );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the reveal.js config is updated.\r\n\t */\r\n\tconfigure( config, oldConfig ) {\r\n\r\n\t\tif( config.embedded ) {\r\n\t\t\tthis.blur();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.focus();\r\n\t\t\tthis.unbind();\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tbind() {\r\n\r\n\t\tif( this.Reveal.getConfig().embedded ) {\r\n\t\t\tthis.Reveal.getRevealElement().addEventListener( 'pointerdown', this.onRevealPointerDown, false );\r\n\t\t}\r\n\r\n\t}\r\n\r\n\tunbind() {\r\n\r\n\t\tthis.Reveal.getRevealElement().removeEventListener( 'pointerdown', this.onRevealPointerDown, false );\r\n\t\tdocument.removeEventListener( 'pointerdown', this.onDocumentPointerDown, false );\r\n\r\n\t}\r\n\r\n\tfocus() {\r\n\r\n\t\tif( this.state !== STATE_FOCUS ) {\r\n\t\t\tthis.Reveal.getRevealElement().classList.add( 'focused' );\r\n\t\t\tdocument.addEventListener( 'pointerdown', this.onDocumentPointerDown, false );\r\n\t\t}\r\n\r\n\t\tthis.state = STATE_FOCUS;\r\n\r\n\t}\r\n\r\n\tblur() {\r\n\r\n\t\tif( this.state !== STATE_BLUR ) {\r\n\t\t\tthis.Reveal.getRevealElement().classList.remove( 'focused' );\r\n\t\t\tdocument.removeEventListener( 'pointerdown', this.onDocumentPointerDown, false );\r\n\t\t}\r\n\r\n\t\tthis.state = STATE_BLUR;\r\n\r\n\t}\r\n\r\n\tisFocused() {\r\n\r\n\t\treturn this.state === STATE_FOCUS;\r\n\r\n\t}\r\n\r\n\tonRevealPointerDown( event ) {\r\n\r\n\t\tthis.focus();\r\n\r\n\t}\r\n\r\n\tonDocumentPointerDown( event ) {\r\n\r\n\t\tlet revealElement = closest( event.target, '.reveal' );\r\n\t\tif( !revealElement || revealElement !== this.Reveal.getRevealElement() ) {\r\n\t\t\tthis.blur();\r\n\t\t}\r\n\r\n\t}\r\n\r\n}","/**\r\n * Handles the showing and \r\n */\r\nexport default class Notes {\r\n\r\n\tconstructor( Reveal ) {\r\n\r\n\t\tthis.Reveal = Reveal;\r\n\r\n\t}\r\n\r\n\trender() {\r\n\r\n\t\tthis.element = document.createElement( 'div' );\r\n\t\tthis.element.className = 'speaker-notes';\r\n\t\tthis.element.setAttribute( 'data-prevent-swipe', '' );\r\n\t\tthis.element.setAttribute( 'tabindex', '0' );\r\n\t\tthis.Reveal.getRevealElement().appendChild( this.element );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Called when the reveal.js config is updated.\r\n\t */\r\n\tconfigure( config, oldConfig ) {\r\n\r\n\t\tif( config.showNotes ) {\r\n\t\t\tthis.element.setAttribute( 'data-layout', typeof config.showNotes === 'string' ? config.showNotes : 'inline' );\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Pick up notes from the current slide and display them\r\n\t * to the viewer.\r\n\t *\r\n\t * @see {@link config.showNotes}\r\n\t */\r\n\tupdate() {\r\n\r\n\t\tif( this.Reveal.getConfig().showNotes && this.element && this.Reveal.getCurrentSlide() && !this.Reveal.print.isPrintingPDF() ) {\r\n\r\n\t\t\tthis.element.innerHTML = this.getSlideNotes() || 'No notes on this slide.';\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Updates the visibility of the speaker notes sidebar that\r\n\t * is used to share annotated slides. The notes sidebar is\r\n\t * only visible if showNotes is true and there are notes on\r\n\t * one or more slides in the deck.\r\n\t */\r\n\tupdateVisibility() {\r\n\r\n\t\tif( this.Reveal.getConfig().showNotes && this.hasNotes() && !this.Reveal.print.isPrintingPDF() ) {\r\n\t\t\tthis.Reveal.getRevealElement().classList.add( 'show-notes' );\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.Reveal.getRevealElement().classList.remove( 'show-notes' );\r\n\t\t}\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if there are speaker notes for ANY slide in the\r\n\t * presentation.\r\n\t */\r\n\thasNotes() {\r\n\r\n\t\treturn this.Reveal.getSlidesElement().querySelectorAll( '[data-notes], aside.notes' ).length > 0;\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Checks if this presentation is running inside of the\r\n\t * speaker notes window.\r\n\t *\r\n\t * @return {boolean}\r\n\t */\r\n\tisSpeakerNotesWindow() {\r\n\r\n\t\treturn !!window.location.search.match( /receiver/gi );\r\n\r\n\t}\r\n\r\n\t/**\r\n\t * Retrieves the speaker notes from a slide. Notes can be\r\n\t * defined in two ways:\r\n\t * 1. As a data-notes attribute on the slide
\r\n\t * 2. As an