{"version":3,"file":"clappr.min.js","sources":["../node_modules/@clappr/core/dist/clappr-core.esm.js","../node_modules/@clappr/plugins/dist/clappr-plugins.esm.js","../src/base_bundle.js","../node_modules/@clappr/hlsjs-playback/dist/hlsjs-playback.esm.js","../src/main.js"],"sourcesContent":["function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _createSuper(Derived) {\n var hasNativeReflectConstruct = _isNativeReflectConstruct();\n\n return function _createSuperInternal() {\n var Super = _getPrototypeOf(Derived),\n result;\n\n if (hasNativeReflectConstruct) {\n var NewTarget = _getPrototypeOf(this).constructor;\n\n result = Reflect.construct(Super, arguments, NewTarget);\n } else {\n result = Super.apply(this, arguments);\n }\n\n return _possibleConstructorReturn(this, result);\n };\n}\n\nfunction _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}\n\nfunction _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n\n var F = function () {};\n\n return {\n s: F,\n n: function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function (e) {\n throw e;\n },\n f: F\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function () {\n it = o[Symbol.iterator]();\n },\n n: function () {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function (e) {\n didErr = true;\n err = e;\n },\n f: function () {\n try {\n if (!normalCompletion && it.return != null) it.return();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}\n\n// Copyright 2014 Globo.com Player authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n/* istanbul ignore file */\n\n/**\n * Array.prototype.find\n *\n * Original source : https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n * See also : https://tc39.github.io/ecma262/#sec-array.prototype.find\n */\nif (!Array.prototype.find) {\n // eslint-disable-next-line\n Object.defineProperty(Array.prototype, 'find', {\n // Note: ES6 arrow function syntax is not used on purpose to avoid this to be undefined\n value: function value(predicate) {\n // 1. Let O be ? ToObject(this value).\n if (this == null) throw new TypeError('\"this\" is null or not defined');\n var o = Object(this); // 2. Let len be ? ToLength(? Get(O, \"length\")).\n\n var len = o.length >>> 0; // 3. If IsCallable(predicate) is false, throw a TypeError exception.\n\n if (typeof predicate !== 'function') throw new TypeError('predicate must be a function'); // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.\n\n var thisArg = arguments[1]; // 5. Let k be 0.\n\n var k = 0; // 6. Repeat, while k < len\n\n while (k < len) {\n // a. Let Pk be ! ToString(k).\n // b. Let kValue be ? Get(O, Pk).\n // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).\n // d. If testResult is true, return kValue.\n var kValue = o[k];\n if (predicate.call(thisArg, kValue, k, o)) return kValue; // e. Increase k by 1.\n\n k++;\n } // 7. Return undefined.\n\n\n return undefined;\n }\n });\n} // polyfills for smart TVs\n\n\nif (!Object.entries) {\n Object.entries = function (obj) {\n var ownProps = Object.keys(obj),\n i = ownProps.length,\n resArray = new Array(i); // preallocate the Array\n\n while (i--) {\n resArray[i] = [ownProps[i], obj[ownProps[i]]];\n }\n\n return resArray;\n };\n}\n\nif (!Object.values) {\n Object.values = function (obj) {\n var ownProps = Object.keys(obj),\n i = ownProps.length,\n resArray = new Array(i); // preallocate the Array\n\n while (i--) {\n resArray[i] = obj[ownProps[i]];\n }\n\n return resArray;\n };\n}\n/**\n * Object.assign\n * This polyfill doesn't support symbol properties, since ES5 doesn't have symbols anyway\n *\n * Original source : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n */\n\n\nif (typeof Object.assign != 'function') {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, 'assign', {\n // length of function is 2.\n value: function assign(target, varArgs) {\n\n if (target == null) {\n // TypeError if undefined or null\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var to = Object(target);\n\n for (var index = 1; index < arguments.length; index++) {\n var nextSource = arguments[index];\n\n if (nextSource != null) {\n // Skip over if undefined or null\n for (var nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n\n return to;\n },\n writable: true,\n configurable: true\n });\n} // https://tc39.github.io/ecma262/#sec-array.prototype.findindex\n\n\nif (!Array.prototype.findIndex) {\n Object.defineProperty(Array.prototype, 'findIndex', {\n value: function value(predicate) {\n // 1. Let O be ? ToObject(this value).\n if (this == null) {\n throw new TypeError('\"this\" is null or not defined');\n }\n\n var o = Object(this); // 2. Let len be ? ToLength(? Get(O, \"length\")).\n\n var len = o.length >>> 0; // 3. If IsCallable(predicate) is false, throw a TypeError exception.\n\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate must be a function');\n } // 4. If thisArg was supplied, let T be thisArg; else let T be undefined.\n\n\n var thisArg = arguments[1]; // 5. Let k be 0.\n\n var k = 0; // 6. Repeat, while k < len\n\n while (k < len) {\n // a. Let Pk be ! ToString(k).\n // b. Let kValue be ? Get(O, Pk).\n // c. Let testResult be ToBoolean(? Call(predicate, T, « kValue, k, O »)).\n // d. If testResult is true, return k.\n var kValue = o[k];\n\n if (predicate.call(thisArg, kValue, k, o)) {\n return k;\n } // e. Increase k by 1.\n\n\n k++;\n } // 7. Return -1.\n\n\n return -1;\n },\n configurable: true,\n writable: true\n });\n}\n\n/* istanbul ignore file */\n// https://github.com/mathiasbynens/small\nvar mp4 = 'data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=';\nvar Media = {\n mp4: mp4\n};\n\n/* Zepto v1.2.0 - zepto ajax callbacks deferred event ie selector - zeptojs.com/license */\nvar Zepto = function () {\n var undefined$1,\n key,\n $,\n classList,\n emptyArray = [],\n concat = emptyArray.concat,\n filter = emptyArray.filter,\n slice = emptyArray.slice,\n document = window.document,\n elementDisplay = {},\n classCache = {},\n cssNumber = {\n 'column-count': 1,\n 'columns': 1,\n 'font-weight': 1,\n 'line-height': 1,\n 'opacity': 1,\n 'z-index': 1,\n 'zoom': 1\n },\n fragmentRE = /^\\s*<(\\w+|!)[^>]*>/,\n singleTagRE = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/,\n tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/ig,\n rootNodeRE = /^(?:body|html)$/i,\n capitalRE = /([A-Z])/g,\n // special attributes that should be get/set via method calls\n methodAttributes = ['val', 'css', 'html', 'text', 'data', 'width', 'height', 'offset'],\n adjacencyOperators = ['after', 'prepend', 'before', 'append'],\n table = document.createElement('table'),\n tableRow = document.createElement('tr'),\n containers = {\n 'tr': document.createElement('tbody'),\n 'tbody': table,\n 'thead': table,\n 'tfoot': table,\n 'td': tableRow,\n 'th': tableRow,\n '*': document.createElement('div')\n },\n readyRE = /complete|loaded|interactive/,\n simpleSelectorRE = /^[\\w-]*$/,\n class2type = {},\n toString = class2type.toString,\n zepto = {},\n camelize,\n uniq,\n tempParent = document.createElement('div'),\n propMap = {\n 'tabindex': 'tabIndex',\n 'readonly': 'readOnly',\n 'for': 'htmlFor',\n 'class': 'className',\n 'maxlength': 'maxLength',\n 'cellspacing': 'cellSpacing',\n 'cellpadding': 'cellPadding',\n 'rowspan': 'rowSpan',\n 'colspan': 'colSpan',\n 'usemap': 'useMap',\n 'frameborder': 'frameBorder',\n 'contenteditable': 'contentEditable'\n },\n isArray = Array.isArray || function (object) {\n return object instanceof Array;\n };\n\n zepto.matches = function (element, selector) {\n if (!selector || !element || element.nodeType !== 1) return false;\n var matchesSelector = element.matches || element.webkitMatchesSelector || element.mozMatchesSelector || element.oMatchesSelector || element.matchesSelector;\n if (matchesSelector) return matchesSelector.call(element, selector); // fall back to performing a selector:\n\n var match,\n parent = element.parentNode,\n temp = !parent;\n if (temp) (parent = tempParent).appendChild(element);\n match = ~zepto.qsa(parent, selector).indexOf(element);\n temp && tempParent.removeChild(element);\n return match;\n };\n\n function type(obj) {\n return obj == null ? String(obj) : class2type[toString.call(obj)] || \"object\";\n }\n\n function isFunction(value) {\n return type(value) == \"function\";\n }\n\n function isWindow(obj) {\n return obj != null && obj == obj.window;\n }\n\n function isDocument(obj) {\n return obj != null && obj.nodeType == obj.DOCUMENT_NODE;\n }\n\n function isObject(obj) {\n return type(obj) == \"object\";\n }\n\n function isPlainObject(obj) {\n return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype;\n }\n\n function likeArray(obj) {\n var length = !!obj && 'length' in obj && obj.length,\n type = $.type(obj);\n return 'function' != type && !isWindow(obj) && ('array' == type || length === 0 || typeof length == 'number' && length > 0 && length - 1 in obj);\n }\n\n function compact(array) {\n return filter.call(array, function (item) {\n return item != null;\n });\n }\n\n function flatten(array) {\n return array.length > 0 ? $.fn.concat.apply([], array) : array;\n }\n\n camelize = function (str) {\n return str.replace(/-+(.)?/g, function (match, chr) {\n return chr ? chr.toUpperCase() : '';\n });\n };\n\n function dasherize(str) {\n return str.replace(/::/g, '/').replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2').replace(/([a-z\\d])([A-Z])/g, '$1_$2').replace(/_/g, '-').toLowerCase();\n }\n\n uniq = function (array) {\n return filter.call(array, function (item, idx) {\n return array.indexOf(item) == idx;\n });\n };\n\n function classRE(name) {\n return name in classCache ? classCache[name] : classCache[name] = new RegExp('(^|\\\\s)' + name + '(\\\\s|$)');\n }\n\n function maybeAddPx(name, value) {\n return typeof value == \"number\" && !cssNumber[dasherize(name)] ? value + \"px\" : value;\n }\n\n function defaultDisplay(nodeName) {\n var element, display;\n\n if (!elementDisplay[nodeName]) {\n element = document.createElement(nodeName);\n document.body.appendChild(element);\n display = getComputedStyle(element, '').getPropertyValue(\"display\");\n element.parentNode.removeChild(element);\n display == \"none\" && (display = \"block\");\n elementDisplay[nodeName] = display;\n }\n\n return elementDisplay[nodeName];\n }\n\n function children(element) {\n return 'children' in element ? slice.call(element.children) : $.map(element.childNodes, function (node) {\n if (node.nodeType == 1) return node;\n });\n }\n\n function Z(dom, selector) {\n var i,\n len = dom ? dom.length : 0;\n\n for (i = 0; i < len; i++) this[i] = dom[i];\n\n this.length = len;\n this.selector = selector || '';\n } // `$.zepto.fragment` takes a html string and an optional tag name\n // to generate DOM nodes from the given html string.\n // The generated DOM nodes are returned as an array.\n // This function can be overridden in plugins for example to make\n // it compatible with browsers that don't support the DOM fully.\n\n\n zepto.fragment = function (html, name, properties) {\n var dom, nodes, container; // A special case optimization for a single tag\n\n if (singleTagRE.test(html)) dom = $(document.createElement(RegExp.$1));\n\n if (!dom) {\n if (html.replace) html = html.replace(tagExpanderRE, \"<$1>$2>\");\n if (name === undefined$1) name = fragmentRE.test(html) && RegExp.$1;\n if (!(name in containers)) name = '*';\n container = containers[name];\n container.innerHTML = '' + html;\n dom = $.each(slice.call(container.childNodes), function () {\n container.removeChild(this);\n });\n }\n\n if (isPlainObject(properties)) {\n nodes = $(dom);\n $.each(properties, function (key, value) {\n if (methodAttributes.indexOf(key) > -1) nodes[key](value);else nodes.attr(key, value);\n });\n }\n\n return dom;\n }; // `$.zepto.Z` swaps out the prototype of the given `dom` array\n // of nodes with `$.fn` and thus supplying all the Zepto functions\n // to the array. This method can be overridden in plugins.\n\n\n zepto.Z = function (dom, selector) {\n return new Z(dom, selector);\n }; // `$.zepto.isZ` should return `true` if the given object is a Zepto\n // collection. This method can be overridden in plugins.\n\n\n zepto.isZ = function (object) {\n return object instanceof zepto.Z;\n }; // `$.zepto.init` is Zepto's counterpart to jQuery's `$.fn.init` and\n // takes a CSS selector and an optional context (and handles various\n // special cases).\n // This method can be overridden in plugins.\n\n\n zepto.init = function (selector, context) {\n var dom; // If nothing given, return an empty Zepto collection\n\n if (!selector) return zepto.Z(); // Optimize for string selectors\n else if (typeof selector == 'string') {\n selector = selector.trim(); // If it's a html fragment, create nodes from it\n // Note: In both Chrome 21 and Firefox 15, DOM error 12\n // is thrown if the fragment doesn't begin with <\n\n if (selector[0] == '<' && fragmentRE.test(selector)) dom = zepto.fragment(selector, RegExp.$1, context), selector = null; // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined$1) return $(context).find(selector); // If it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector);\n } // If a function is given, call it when the DOM is ready\n else if (isFunction(selector)) return $(document).ready(selector); // If a Zepto collection is given, just return it\n else if (zepto.isZ(selector)) return selector;else {\n // normalize array if an array of nodes is given\n if (isArray(selector)) dom = compact(selector); // Wrap DOM nodes.\n else if (isObject(selector)) dom = [selector], selector = null; // If it's a html fragment, create nodes from it\n else if (fragmentRE.test(selector)) dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null; // If there's a context, create a collection on that context first, and select\n // nodes from there\n else if (context !== undefined$1) return $(context).find(selector); // And last but no least, if it's a CSS selector, use it to select nodes.\n else dom = zepto.qsa(document, selector);\n } // create a new Zepto collection from the nodes found\n\n return zepto.Z(dom, selector);\n }; // `$` will be the base `Zepto` object. When calling this\n // function just call `$.zepto.init, which makes the implementation\n // details of selecting nodes and creating Zepto collections\n // patchable in plugins.\n\n\n $ = function (selector, context) {\n return zepto.init(selector, context);\n };\n\n function extend(target, source, deep) {\n for (key in source) if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {\n if (isPlainObject(source[key]) && !isPlainObject(target[key])) target[key] = {};\n if (isArray(source[key]) && !isArray(target[key])) target[key] = [];\n extend(target[key], source[key], deep);\n } else if (source[key] !== undefined$1) target[key] = source[key];\n } // Copy all but undefined properties from one or more\n // objects to the `target` object.\n\n\n $.extend = function (target) {\n var deep,\n args = slice.call(arguments, 1);\n\n if (typeof target == 'boolean') {\n deep = target;\n target = args.shift();\n }\n\n args.forEach(function (arg) {\n extend(target, arg, deep);\n });\n return target;\n }; // `$.zepto.qsa` is Zepto's CSS selector implementation which\n // uses `document.querySelectorAll` and optimizes for some special cases, like `#id`.\n // This method can be overridden in plugins.\n\n\n zepto.qsa = function (element, selector) {\n var found,\n maybeID = selector[0] == '#',\n maybeClass = !maybeID && selector[0] == '.',\n nameOnly = maybeID || maybeClass ? selector.slice(1) : selector,\n // Ensure that a 1 char tag name still gets checked\n isSimple = simpleSelectorRE.test(nameOnly);\n return element.getElementById && isSimple && maybeID ? // Safari DocumentFragment doesn't have getElementById\n (found = element.getElementById(nameOnly)) ? [found] : [] : element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11 ? [] : slice.call(isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName\n maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class\n element.getElementsByTagName(selector) : // Or a tag\n element.querySelectorAll(selector) // Or it's not simple, and we need to query all\n );\n };\n\n function filtered(nodes, selector) {\n return selector == null ? $(nodes) : $(nodes).filter(selector);\n }\n\n $.contains = document.documentElement.contains ? function (parent, node) {\n return parent !== node && parent.contains(node);\n } : function (parent, node) {\n while (node && (node = node.parentNode)) if (node === parent) return true;\n\n return false;\n };\n\n function funcArg(context, arg, idx, payload) {\n return isFunction(arg) ? arg.call(context, idx, payload) : arg;\n }\n\n function setAttribute(node, name, value) {\n value == null ? node.removeAttribute(name) : node.setAttribute(name, value);\n } // access className property while respecting SVGAnimatedString\n\n\n function className(node, value) {\n var klass = node.className || '',\n svg = klass && klass.baseVal !== undefined$1;\n if (value === undefined$1) return svg ? klass.baseVal : klass;\n svg ? klass.baseVal = value : node.className = value;\n } // \"true\" => true\n // \"false\" => false\n // \"null\" => null\n // \"42\" => 42\n // \"42.5\" => 42.5\n // \"08\" => \"08\"\n // JSON => parse if valid\n // String => self\n\n\n function deserializeValue(value) {\n try {\n return value ? value == \"true\" || (value == \"false\" ? false : value == \"null\" ? null : +value + \"\" == value ? +value : /^[\\[\\{]/.test(value) ? $.parseJSON(value) : value) : value;\n } catch (e) {\n return value;\n }\n }\n\n $.type = type;\n $.isFunction = isFunction;\n $.isWindow = isWindow;\n $.isArray = isArray;\n $.isPlainObject = isPlainObject;\n\n $.isEmptyObject = function (obj) {\n var name;\n\n for (name in obj) return false;\n\n return true;\n };\n\n $.isNumeric = function (val) {\n var num = Number(val),\n type = typeof val;\n return val != null && type != 'boolean' && (type != 'string' || val.length) && !isNaN(num) && isFinite(num) || false;\n };\n\n $.inArray = function (elem, array, i) {\n return emptyArray.indexOf.call(array, elem, i);\n };\n\n $.camelCase = camelize;\n\n $.trim = function (str) {\n return str == null ? \"\" : String.prototype.trim.call(str);\n }; // plugin compatibility\n\n\n $.uuid = 0;\n $.support = {};\n $.expr = {};\n\n $.noop = function () {};\n\n $.map = function (elements, callback) {\n var value,\n values = [],\n i,\n key;\n if (likeArray(elements)) for (i = 0; i < elements.length; i++) {\n value = callback(elements[i], i);\n if (value != null) values.push(value);\n } else for (key in elements) {\n value = callback(elements[key], key);\n if (value != null) values.push(value);\n }\n return flatten(values);\n };\n\n $.each = function (elements, callback) {\n var i, key;\n\n if (likeArray(elements)) {\n for (i = 0; i < elements.length; i++) if (callback.call(elements[i], i, elements[i]) === false) return elements;\n } else {\n for (key in elements) if (callback.call(elements[key], key, elements[key]) === false) return elements;\n }\n\n return elements;\n };\n\n $.grep = function (elements, callback) {\n return filter.call(elements, callback);\n };\n\n if (window.JSON) $.parseJSON = JSON.parse; // Populate the class2type map\n\n $.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function (i, name) {\n class2type[\"[object \" + name + \"]\"] = name.toLowerCase();\n }); // Define methods that will be available on all\n // Zepto collections\n\n $.fn = {\n constructor: zepto.Z,\n length: 0,\n // Because a collection acts like an array\n // copy over these useful array functions.\n forEach: emptyArray.forEach,\n reduce: emptyArray.reduce,\n push: emptyArray.push,\n sort: emptyArray.sort,\n splice: emptyArray.splice,\n indexOf: emptyArray.indexOf,\n concat: function () {\n var i,\n value,\n args = [];\n\n for (i = 0; i < arguments.length; i++) {\n value = arguments[i];\n args[i] = zepto.isZ(value) ? value.toArray() : value;\n }\n\n return concat.apply(zepto.isZ(this) ? this.toArray() : this, args);\n },\n // `map` and `slice` in the jQuery API work differently\n // from their array counterparts\n map: function (fn) {\n return $($.map(this, function (el, i) {\n return fn.call(el, i, el);\n }));\n },\n slice: function () {\n return $(slice.apply(this, arguments));\n },\n ready: function (callback) {\n // need to check if document.body exists for IE as that browser reports\n // document ready when it hasn't yet created the body element\n if (readyRE.test(document.readyState) && document.body) callback($);else document.addEventListener('DOMContentLoaded', function () {\n callback($);\n }, false);\n return this;\n },\n get: function (idx) {\n return idx === undefined$1 ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length];\n },\n toArray: function () {\n return this.get();\n },\n size: function () {\n return this.length;\n },\n remove: function () {\n return this.each(function () {\n if (this.parentNode != null) this.parentNode.removeChild(this);\n });\n },\n each: function (callback) {\n emptyArray.every.call(this, function (el, idx) {\n return callback.call(el, idx, el) !== false;\n });\n return this;\n },\n filter: function (selector) {\n if (isFunction(selector)) return this.not(this.not(selector));\n return $(filter.call(this, function (element) {\n return zepto.matches(element, selector);\n }));\n },\n add: function (selector, context) {\n return $(uniq(this.concat($(selector, context))));\n },\n is: function (selector) {\n return this.length > 0 && zepto.matches(this[0], selector);\n },\n not: function (selector) {\n var nodes = [];\n if (isFunction(selector) && selector.call !== undefined$1) this.each(function (idx) {\n if (!selector.call(this, idx)) nodes.push(this);\n });else {\n var excludes = typeof selector == 'string' ? this.filter(selector) : likeArray(selector) && isFunction(selector.item) ? slice.call(selector) : $(selector);\n this.forEach(function (el) {\n if (excludes.indexOf(el) < 0) nodes.push(el);\n });\n }\n return $(nodes);\n },\n has: function (selector) {\n return this.filter(function () {\n return isObject(selector) ? $.contains(this, selector) : $(this).find(selector).size();\n });\n },\n eq: function (idx) {\n return idx === -1 ? this.slice(idx) : this.slice(idx, +idx + 1);\n },\n first: function () {\n var el = this[0];\n return el && !isObject(el) ? el : $(el);\n },\n last: function () {\n var el = this[this.length - 1];\n return el && !isObject(el) ? el : $(el);\n },\n find: function (selector) {\n var result,\n $this = this;\n if (!selector) result = $();else if (typeof selector == 'object') result = $(selector).filter(function () {\n var node = this;\n return emptyArray.some.call($this, function (parent) {\n return $.contains(parent, node);\n });\n });else if (this.length == 1) result = $(zepto.qsa(this[0], selector));else result = this.map(function () {\n return zepto.qsa(this, selector);\n });\n return result;\n },\n closest: function (selector, context) {\n var nodes = [],\n collection = typeof selector == 'object' && $(selector);\n this.each(function (_, node) {\n while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector))) node = node !== context && !isDocument(node) && node.parentNode;\n\n if (node && nodes.indexOf(node) < 0) nodes.push(node);\n });\n return $(nodes);\n },\n parents: function (selector) {\n var ancestors = [],\n nodes = this;\n\n while (nodes.length > 0) nodes = $.map(nodes, function (node) {\n if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {\n ancestors.push(node);\n return node;\n }\n });\n\n return filtered(ancestors, selector);\n },\n parent: function (selector) {\n return filtered(uniq(this.pluck('parentNode')), selector);\n },\n children: function (selector) {\n return filtered(this.map(function () {\n return children(this);\n }), selector);\n },\n contents: function () {\n return this.map(function () {\n return this.contentDocument || slice.call(this.childNodes);\n });\n },\n siblings: function (selector) {\n return filtered(this.map(function (i, el) {\n return filter.call(children(el.parentNode), function (child) {\n return child !== el;\n });\n }), selector);\n },\n empty: function () {\n return this.each(function () {\n this.innerHTML = '';\n });\n },\n // `pluck` is borrowed from Prototype.js\n pluck: function (property) {\n return $.map(this, function (el) {\n return el[property];\n });\n },\n show: function () {\n return this.each(function () {\n this.style.display == \"none\" && (this.style.display = '');\n if (getComputedStyle(this, '').getPropertyValue(\"display\") == \"none\") this.style.display = defaultDisplay(this.nodeName);\n });\n },\n replaceWith: function (newContent) {\n return this.before(newContent).remove();\n },\n wrap: function (structure) {\n var func = isFunction(structure);\n if (this[0] && !func) var dom = $(structure).get(0),\n clone = dom.parentNode || this.length > 1;\n return this.each(function (index) {\n $(this).wrapAll(func ? structure.call(this, index) : clone ? dom.cloneNode(true) : dom);\n });\n },\n wrapAll: function (structure) {\n if (this[0]) {\n $(this[0]).before(structure = $(structure));\n var children; // drill down to the inmost element\n\n while ((children = structure.children()).length) structure = children.first();\n\n $(structure).append(this);\n }\n\n return this;\n },\n wrapInner: function (structure) {\n var func = isFunction(structure);\n return this.each(function (index) {\n var self = $(this),\n contents = self.contents(),\n dom = func ? structure.call(this, index) : structure;\n contents.length ? contents.wrapAll(dom) : self.append(dom);\n });\n },\n unwrap: function () {\n this.parent().each(function () {\n $(this).replaceWith($(this).children());\n });\n return this;\n },\n clone: function () {\n return this.map(function () {\n return this.cloneNode(true);\n });\n },\n hide: function () {\n return this.css(\"display\", \"none\");\n },\n toggle: function (setting) {\n return this.each(function () {\n var el = $(this);\n (setting === undefined$1 ? el.css(\"display\") == \"none\" : setting) ? el.show() : el.hide();\n });\n },\n prev: function (selector) {\n return $(this.pluck('previousElementSibling')).filter(selector || '*');\n },\n next: function (selector) {\n return $(this.pluck('nextElementSibling')).filter(selector || '*');\n },\n html: function (html) {\n return 0 in arguments ? this.each(function (idx) {\n var originHtml = this.innerHTML;\n $(this).empty().append(funcArg(this, html, idx, originHtml));\n }) : 0 in this ? this[0].innerHTML : null;\n },\n text: function (text) {\n return 0 in arguments ? this.each(function (idx) {\n var newText = funcArg(this, text, idx, this.textContent);\n this.textContent = newText == null ? '' : '' + newText;\n }) : 0 in this ? this.pluck('textContent').join(\"\") : null;\n },\n attr: function (name, value) {\n var result;\n return typeof name == 'string' && !(1 in arguments) ? 0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined$1 : this.each(function (idx) {\n if (this.nodeType !== 1) return;\n if (isObject(name)) for (key in name) setAttribute(this, key, name[key]);else setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)));\n });\n },\n removeAttr: function (name) {\n return this.each(function () {\n this.nodeType === 1 && name.split(' ').forEach(function (attribute) {\n setAttribute(this, attribute);\n }, this);\n });\n },\n prop: function (name, value) {\n name = propMap[name] || name;\n return 1 in arguments ? this.each(function (idx) {\n this[name] = funcArg(this, value, idx, this[name]);\n }) : this[0] && this[0][name];\n },\n removeProp: function (name) {\n name = propMap[name] || name;\n return this.each(function () {\n delete this[name];\n });\n },\n data: function (name, value) {\n var attrName = 'data-' + name.replace(capitalRE, '-$1').toLowerCase();\n var data = 1 in arguments ? this.attr(attrName, value) : this.attr(attrName);\n return data !== null ? deserializeValue(data) : undefined$1;\n },\n val: function (value) {\n if (0 in arguments) {\n if (value == null) value = \"\";\n return this.each(function (idx) {\n this.value = funcArg(this, value, idx, this.value);\n });\n } else {\n return this[0] && (this[0].multiple ? $(this[0]).find('option').filter(function () {\n return this.selected;\n }).pluck('value') : this[0].value);\n }\n },\n offset: function (coordinates) {\n if (coordinates) return this.each(function (index) {\n var $this = $(this),\n coords = funcArg(this, coordinates, index, $this.offset()),\n parentOffset = $this.offsetParent().offset(),\n props = {\n top: coords.top - parentOffset.top,\n left: coords.left - parentOffset.left\n };\n if ($this.css('position') == 'static') props['position'] = 'relative';\n $this.css(props);\n });\n if (!this.length) return null;\n if (document.documentElement !== this[0] && !$.contains(document.documentElement, this[0])) return {\n top: 0,\n left: 0\n };\n var obj = this[0].getBoundingClientRect();\n return {\n left: obj.left + window.pageXOffset,\n top: obj.top + window.pageYOffset,\n width: Math.round(obj.width),\n height: Math.round(obj.height)\n };\n },\n css: function (property, value) {\n if (arguments.length < 2) {\n var element = this[0];\n\n if (typeof property == 'string') {\n if (!element) return;\n return element.style[camelize(property)] || getComputedStyle(element, '').getPropertyValue(property);\n } else if (isArray(property)) {\n if (!element) return;\n var props = {};\n var computedStyle = getComputedStyle(element, '');\n $.each(property, function (_, prop) {\n props[prop] = element.style[camelize(prop)] || computedStyle.getPropertyValue(prop);\n });\n return props;\n }\n }\n\n var css = '';\n\n if (type(property) == 'string') {\n if (!value && value !== 0) this.each(function () {\n this.style.removeProperty(dasherize(property));\n });else css = dasherize(property) + \":\" + maybeAddPx(property, value);\n } else {\n for (key in property) if (!property[key] && property[key] !== 0) this.each(function () {\n this.style.removeProperty(dasherize(key));\n });else css += dasherize(key) + ':' + maybeAddPx(key, property[key]) + ';';\n }\n\n return this.each(function () {\n this.style.cssText += ';' + css;\n });\n },\n index: function (element) {\n return element ? this.indexOf($(element)[0]) : this.parent().children().indexOf(this[0]);\n },\n hasClass: function (name) {\n if (!name) return false;\n return emptyArray.some.call(this, function (el) {\n return this.test(className(el));\n }, classRE(name));\n },\n addClass: function (name) {\n if (!name) return this;\n return this.each(function (idx) {\n if (!('className' in this)) return;\n classList = [];\n var cls = className(this),\n newName = funcArg(this, name, idx, cls);\n newName.split(/\\s+/g).forEach(function (klass) {\n if (!$(this).hasClass(klass)) classList.push(klass);\n }, this);\n classList.length && className(this, cls + (cls ? \" \" : \"\") + classList.join(\" \"));\n });\n },\n removeClass: function (name) {\n return this.each(function (idx) {\n if (!('className' in this)) return;\n if (name === undefined$1) return className(this, '');\n classList = className(this);\n funcArg(this, name, idx, classList).split(/\\s+/g).forEach(function (klass) {\n classList = classList.replace(classRE(klass), \" \");\n });\n className(this, classList.trim());\n });\n },\n toggleClass: function (name, when) {\n if (!name) return this;\n return this.each(function (idx) {\n var $this = $(this),\n names = funcArg(this, name, idx, className(this));\n names.split(/\\s+/g).forEach(function (klass) {\n (when === undefined$1 ? !$this.hasClass(klass) : when) ? $this.addClass(klass) : $this.removeClass(klass);\n });\n });\n },\n scrollTop: function (value) {\n if (!this.length) return;\n var hasScrollTop = ('scrollTop' in this[0]);\n if (value === undefined$1) return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset;\n return this.each(hasScrollTop ? function () {\n this.scrollTop = value;\n } : function () {\n this.scrollTo(this.scrollX, value);\n });\n },\n scrollLeft: function (value) {\n if (!this.length) return;\n var hasScrollLeft = ('scrollLeft' in this[0]);\n if (value === undefined$1) return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset;\n return this.each(hasScrollLeft ? function () {\n this.scrollLeft = value;\n } : function () {\n this.scrollTo(value, this.scrollY);\n });\n },\n position: function () {\n if (!this.length) return;\n var elem = this[0],\n // Get *real* offsetParent\n offsetParent = this.offsetParent(),\n // Get correct offsets\n offset = this.offset(),\n parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? {\n top: 0,\n left: 0\n } : offsetParent.offset(); // Subtract element margins\n // note: when an element has margin: auto the offsetLeft and marginLeft\n // are the same in Safari causing offset.left to incorrectly be 0\n\n offset.top -= parseFloat($(elem).css('margin-top')) || 0;\n offset.left -= parseFloat($(elem).css('margin-left')) || 0; // Add offsetParent borders\n\n parentOffset.top += parseFloat($(offsetParent[0]).css('border-top-width')) || 0;\n parentOffset.left += parseFloat($(offsetParent[0]).css('border-left-width')) || 0; // Subtract the two offsets\n\n return {\n top: offset.top - parentOffset.top,\n left: offset.left - parentOffset.left\n };\n },\n offsetParent: function () {\n return this.map(function () {\n var parent = this.offsetParent || document.body;\n\n while (parent && !rootNodeRE.test(parent.nodeName) && $(parent).css(\"position\") == \"static\") parent = parent.offsetParent;\n\n return parent;\n });\n }\n }; // for now\n\n $.fn.detach = $.fn.remove // Generate the `width` and `height` functions\n ;\n ['width', 'height'].forEach(function (dimension) {\n var dimensionProperty = dimension.replace(/./, function (m) {\n return m[0].toUpperCase();\n });\n\n $.fn[dimension] = function (value) {\n var offset,\n el = this[0];\n if (value === undefined$1) return isWindow(el) ? el['inner' + dimensionProperty] : isDocument(el) ? el.documentElement['scroll' + dimensionProperty] : (offset = this.offset()) && offset[dimension];else return this.each(function (idx) {\n el = $(this);\n el.css(dimension, funcArg(this, value, idx, el[dimension]()));\n });\n };\n });\n\n function traverseNode(node, fun) {\n fun(node);\n\n for (var i = 0, len = node.childNodes.length; i < len; i++) traverseNode(node.childNodes[i], fun);\n } // Generate the `after`, `prepend`, `before`, `append`,\n // `insertAfter`, `insertBefore`, `appendTo`, and `prependTo` methods.\n\n\n adjacencyOperators.forEach(function (operator, operatorIndex) {\n var inside = operatorIndex % 2; //=> prepend, append\n\n $.fn[operator] = function () {\n // arguments can be nodes, arrays of nodes, Zepto objects and HTML strings\n var argType,\n nodes = $.map(arguments, function (arg) {\n var arr = [];\n argType = type(arg);\n\n if (argType == \"array\") {\n arg.forEach(function (el) {\n if (el.nodeType !== undefined$1) return arr.push(el);else if ($.zepto.isZ(el)) return arr = arr.concat(el.get());\n arr = arr.concat(zepto.fragment(el));\n });\n return arr;\n }\n\n return argType == \"object\" || arg == null ? arg : zepto.fragment(arg);\n }),\n parent,\n copyByClone = this.length > 1;\n if (nodes.length < 1) return this;\n return this.each(function (_, target) {\n parent = inside ? target : target.parentNode; // convert all methods to a \"before\" operation\n\n target = operatorIndex == 0 ? target.nextSibling : operatorIndex == 1 ? target.firstChild : operatorIndex == 2 ? target : null;\n var parentInDocument = $.contains(document.documentElement, parent);\n nodes.forEach(function (node) {\n if (copyByClone) node = node.cloneNode(true);else if (!parent) return $(node).remove();\n parent.insertBefore(node, target);\n if (parentInDocument) traverseNode(node, function (el) {\n if (el.nodeName != null && el.nodeName.toUpperCase() === 'SCRIPT' && (!el.type || el.type === 'text/javascript') && !el.src) {\n var target = el.ownerDocument ? el.ownerDocument.defaultView : window;\n target['eval'].call(target, el.innerHTML);\n }\n });\n });\n });\n }; // after => insertAfter\n // prepend => prependTo\n // before => insertBefore\n // append => appendTo\n\n\n $.fn[inside ? operator + 'To' : 'insert' + (operatorIndex ? 'Before' : 'After')] = function (html) {\n $(html)[operator](this);\n return this;\n };\n });\n zepto.Z.prototype = Z.prototype = $.fn; // Export internal API functions in the `$.zepto` namespace\n\n zepto.uniq = uniq;\n zepto.deserializeValue = deserializeValue;\n $.zepto = zepto;\n return $;\n}();\n\nwindow.Zepto = Zepto;\nwindow.$ === undefined && (window.$ = Zepto);\n\n(function ($) {\n var jsonpID = +new Date(),\n document = window.document,\n key,\n name,\n rscript = /\n * \n * ```\n * Now, create the player:\n * ```html\n *
\n * \n * \n * \n * ```\n */\n\nvar Player = /*#__PURE__*/function (_BaseObject) {\n _inherits(Player, _BaseObject);\n\n var _super = _createSuper(Player);\n\n _createClass(Player, [{\n key: \"loader\",\n set: function set(loader) {\n this._loader = loader;\n },\n get: function get() {\n if (!this._loader) this._loader = new Loader(this.options.plugins || {}, this.options.playerId);\n return this._loader;\n }\n /**\n * Determine if the playback has ended.\n * @property ended\n * @type Boolean\n */\n\n }, {\n key: \"ended\",\n get: function get() {\n return this.core.activeContainer.ended;\n }\n /**\n * Determine if the playback is having to buffer in order for\n * playback to be smooth.\n * (i.e if a live stream is playing smoothly, this will be false)\n * @property buffering\n * @type Boolean\n */\n\n }, {\n key: \"buffering\",\n get: function get() {\n return this.core.activeContainer.buffering;\n }\n /*\n * determine if the player is ready.\n * @property isReady\n * @type {Boolean} `true` if the player is ready. ie PLAYER_READY event has fired\n */\n\n }, {\n key: \"isReady\",\n get: function get() {\n return !!this._ready;\n }\n /**\n * An events map that allows the user to add custom callbacks in player's options.\n * @property eventsMapping\n * @type {Object}\n */\n\n }, {\n key: \"eventsMapping\",\n get: function get() {\n return {\n onReady: Events.PLAYER_READY,\n onResize: Events.PLAYER_RESIZE,\n onPlay: Events.PLAYER_PLAY,\n onPause: Events.PLAYER_PAUSE,\n onStop: Events.PLAYER_STOP,\n onEnded: Events.PLAYER_ENDED,\n onSeek: Events.PLAYER_SEEK,\n onError: Events.PLAYER_ERROR,\n onTimeUpdate: Events.PLAYER_TIMEUPDATE,\n onVolumeUpdate: Events.PLAYER_VOLUMEUPDATE,\n onSubtitleAvailable: Events.PLAYER_SUBTITLE_AVAILABLE\n };\n }\n /**\n * @typedef {Object} PlaybackConfig\n * @prop {boolean} disableContextMenu\n * disables the context menu (right click) on the video element if a HTML5Video playback is used.\n * @prop {boolean} preload\n * video will be preloaded according to `preload` attribute options **default**: `'metadata'`\n * @prop {boolean} controls\n * enabled/disables displaying controls\n * @prop {boolean} crossOrigin\n * enables cross-origin capability for media-resources\n * @prop {boolean} playInline\n * enables in-line video elements\n * @prop {boolean} audioOnly\n * enforce audio-only playback (when possible)\n * @prop {Object} externalTracks\n * pass externaly loaded track to playback\n * @prop {Number} [maxBufferLength]\n * The default behavior for the **HLS playback** is to keep buffering indefinitely, even on VoD.\n * This replicates the behavior for progressive download, which continues buffering when pausing the video, thus making the video available for playback even on slow networks.\n * To change this behavior use `maxBufferLength` where **value is in seconds**.\n * @prop {Number} [maxBackBufferLength]\n * After how much distance of the playhead data should be pruned from the buffer (influences memory consumption\n * of adaptive media-engines like Hls.js or Shaka)\n * @prop {Number} [minBufferLength]\n * After how much data in the buffer at least we attempt to consume it (influences QoS-related behavior\n * of adaptive media-engines like Hls.js or Shaka). If this is too low, and the available bandwidth is varying a lot\n * and too close to the streamed bitrate, we may continuously hit under-runs.\n * @prop {Number} [initialBandwidthEstimate]\n * define an initial bandwidth \"guess\" (or previously stored/established value) for underlying adaptive-bitreate engines\n * of adaptive playback implementations, like Hls.js or Shaka\n * @prop {Number} [maxAdaptiveBitrate]\n * Limits the streamed bitrate (for adaptive media-engines in underlying playback implementations)\n * @prop {Object} [maxAdaptiveVideoDimensions]\n * Limits the video dimensions in adaptive media-engines. Should be a literal object with `height` and `width`.\n * @prop {Boolean}[enableAutomaticABR] **default**: `true`\n * Allows to enable/disable automatic bitrate switching in adaptive media-engines\n * @prop {String} [preferredTextLanguage] **default**: `'pt-BR'`\n * Allows to set a preferred text language, that may be enabled by the media-engine if available.\n * @prop {String} [preferredAudioLanguage] **default**: `'pt-BR'`\n * Allows to set a preferred audio language, that may be enabled by the media-engine if available.\n */\n\n /**\n * ## Player's constructor\n *\n * You might pass the options object to build the player.\n * ```javascript\n * var options = {source: \"http://example.com/video.mp4\", param1: \"val1\"};\n * var player = new Clappr.Player(options);\n * ```\n *\n * @method constructor\n * @param {Object} options Data\n * options to build a player instance\n * @param {Number} [options.width]\n * player's width **default**: `640`\n * @param {Number} [options.height]\n * player's height **default**: `360`\n * @param {String} [options.parentId]\n * the id of the element on the page that the player should be inserted into\n * @param {Object} [options.parent]\n * a reference to a dom element that the player should be inserted into\n * @param {String} [options.source]\n * The media source URL, or {source: <