{"version":3,"file":"dependencies-bundle.js","sources":["dependencies-bundle.js"],"sourcesContent":["require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n var id = oEmbedParameters.id;\n var url = oEmbedParameters.url;\n var idOrUrl = id || url;\n\n if (!idOrUrl) {\n throw new Error('An id or url must be passed, either in an options object or as a data-vimeo-id or data-vimeo-url attribute.');\n }\n\n if (isInteger(idOrUrl)) {\n return 'https://vimeo.com/' + idOrUrl;\n }\n\n if (isVimeoUrl(idOrUrl)) {\n return idOrUrl.replace('http:', 'https:');\n }\n\n if (id) {\n throw new TypeError('\\u201C' + id + '\\u201D is not a valid video id.');\n }\n\n throw new TypeError('\\u201C' + idOrUrl + '\\u201D is not a vimeo.com url.');\n}\n\nvar arrayIndexOfSupport = typeof Array.prototype.indexOf !== 'undefined';\nvar postMessageSupport = typeof window !== 'undefined' && typeof window.postMessage !== 'undefined';\n\nif (!isNode && (!arrayIndexOfSupport || !postMessageSupport)) {\n throw new Error('Sorry, the Vimeo Player API is not available in this browser.');\n}\n\nvar commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n\n\n\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nvar index = createCommonjsModule(function (module, exports) {\n(function (exports) {\n 'use strict';\n //shared pointer\n\n var i;\n //shortcuts\n var defineProperty = Object.defineProperty,\n is = function is(a, b) {\n return a === b || a !== a && b !== b;\n };\n\n //Polyfill global objects\n if (typeof WeakMap == 'undefined') {\n exports.WeakMap = createCollection({\n // WeakMap#delete(key:void*):boolean\n 'delete': sharedDelete,\n // WeakMap#clear():\n clear: sharedClear,\n // WeakMap#get(key:void*):void*\n get: sharedGet,\n // WeakMap#has(key:void*):boolean\n has: mapHas,\n // WeakMap#set(key:void*, value:void*):void\n set: sharedSet\n }, true);\n }\n\n if (typeof Map == 'undefined' || typeof new Map().values !== 'function' || !new Map().values().next) {\n exports.Map = createCollection({\n // WeakMap#delete(key:void*):boolean\n 'delete': sharedDelete,\n //:was Map#get(key:void*[, d3fault:void*]):void*\n // Map#has(key:void*):boolean\n has: mapHas,\n // Map#get(key:void*):boolean\n get: sharedGet,\n // Map#set(key:void*, value:void*):void\n set: sharedSet,\n // Map#keys(void):Iterator\n keys: sharedKeys,\n // Map#values(void):Iterator\n values: sharedValues,\n // Map#entries(void):Iterator\n entries: mapEntries,\n // Map#forEach(callback:Function, context:void*):void ==> callback.call(context, key, value, mapObject) === not in specs`\n forEach: sharedForEach,\n // Map#clear():\n clear: sharedClear\n });\n }\n\n if (typeof Set == 'undefined' || typeof new Set().values !== 'function' || !new Set().values().next) {\n exports.Set = createCollection({\n // Set#has(value:void*):boolean\n has: setHas,\n // Set#add(value:void*):boolean\n add: sharedAdd,\n // Set#delete(key:void*):boolean\n 'delete': sharedDelete,\n // Set#clear():\n clear: sharedClear,\n // Set#keys(void):Iterator\n keys: sharedValues, // specs actually say \"the same function object as the initial value of the values property\"\n // Set#values(void):Iterator\n values: sharedValues,\n // Set#entries(void):Iterator\n entries: setEntries,\n // Set#forEach(callback:Function, context:void*):void ==> callback.call(context, value, index) === not in specs\n forEach: sharedForEach\n });\n }\n\n if (typeof WeakSet == 'undefined') {\n exports.WeakSet = createCollection({\n // WeakSet#delete(key:void*):boolean\n 'delete': sharedDelete,\n // WeakSet#add(value:void*):boolean\n add: sharedAdd,\n // WeakSet#clear():\n clear: sharedClear,\n // WeakSet#has(value:void*):boolean\n has: setHas\n }, true);\n }\n\n /**\n * ES6 collection constructor\n * @return {Function} a collection class\n */\n function createCollection(proto, objectOnly) {\n function Collection(a) {\n if (!this || this.constructor !== Collection) return new Collection(a);\n this._keys = [];\n this._values = [];\n this._itp = []; // iteration pointers\n this.objectOnly = objectOnly;\n\n //parse initial iterable argument passed\n if (a) init.call(this, a);\n }\n\n //define size for non object-only collections\n if (!objectOnly) {\n defineProperty(proto, 'size', {\n get: sharedSize\n });\n }\n\n //set prototype\n proto.constructor = Collection;\n Collection.prototype = proto;\n\n return Collection;\n }\n\n /** parse initial iterable argument passed */\n function init(a) {\n var i;\n //init Set argument, like `[1,2,3,{}]`\n if (this.add) a.forEach(this.add, this);\n //init Map argument like `[[1,2], [{}, 4]]`\n else a.forEach(function (a) {\n this.set(a[0], a[1]);\n }, this);\n }\n\n /** delete */\n function sharedDelete(key) {\n if (this.has(key)) {\n this._keys.splice(i, 1);\n this._values.splice(i, 1);\n // update iteration pointers\n this._itp.forEach(function (p) {\n if (i < p[0]) p[0]--;\n });\n }\n // Aurora here does it while Canary doesn't\n return -1 < i;\n }\n\n function sharedGet(key) {\n return this.has(key) ? this._values[i] : undefined;\n }\n\n function has(list, key) {\n if (this.objectOnly && key !== Object(key)) throw new TypeError(\"Invalid value used as weak collection key\");\n //NaN or 0 passed\n if (key != key || key === 0) for (i = list.length; i-- && !is(list[i], key);) {} else i = list.indexOf(key);\n return -1 < i;\n }\n\n function setHas(value) {\n return has.call(this, this._values, value);\n }\n\n function mapHas(value) {\n return has.call(this, this._keys, value);\n }\n\n /** @chainable */\n function sharedSet(key, value) {\n this.has(key) ? this._values[i] = value : this._values[this._keys.push(key) - 1] = value;\n return this;\n }\n\n /** @chainable */\n function sharedAdd(value) {\n if (!this.has(value)) this._values.push(value);\n return this;\n }\n\n function sharedClear() {\n (this._keys || 0).length = this._values.length = 0;\n }\n\n /** keys, values, and iterate related methods */\n function sharedKeys() {\n return sharedIterator(this._itp, this._keys);\n }\n\n function sharedValues() {\n return sharedIterator(this._itp, this._values);\n }\n\n function mapEntries() {\n return sharedIterator(this._itp, this._keys, this._values);\n }\n\n function setEntries() {\n return sharedIterator(this._itp, this._values, this._values);\n }\n\n function sharedIterator(itp, array, array2) {\n var p = [0],\n done = false;\n itp.push(p);\n return {\n next: function next() {\n var v,\n k = p[0];\n if (!done && k < array.length) {\n v = array2 ? [array[k], array2[k]] : array[k];\n p[0]++;\n } else {\n done = true;\n itp.splice(itp.indexOf(p), 1);\n }\n return { done: done, value: v };\n }\n };\n }\n\n function sharedSize() {\n return this._values.length;\n }\n\n function sharedForEach(callback, context) {\n var it = this.entries();\n for (;;) {\n var r = it.next();\n if (r.done) break;\n callback.call(context, r.value[1], r.value[0], this);\n }\n }\n})('object' != 'undefined' && typeof commonjsGlobal != 'undefined' ? commonjsGlobal : window);\n});\n\nvar npo_src = createCommonjsModule(function (module) {\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/*! Native Promise Only\n v0.8.1 (c) Kyle Simpson\n MIT License: http://getify.mit-license.org\n*/\n\n(function UMD(name, context, definition) {\n\t// special form of UMD for polyfilling across evironments\n\tcontext[name] = context[name] || definition();\n\tif ('object' != \"undefined\" && module.exports) {\n\t\tmodule.exports = context[name];\n\t} else if (typeof undefined == \"function\" && undefined.amd) {\n\t\tundefined(function $AMD$() {\n\t\t\treturn context[name];\n\t\t});\n\t}\n})(\"Promise\", typeof commonjsGlobal != \"undefined\" ? commonjsGlobal : commonjsGlobal, function DEF() {\n\t/*jshint validthis:true */\n\t\"use strict\";\n\n\tvar builtInProp,\n\t cycle,\n\t scheduling_queue,\n\t ToString = Object.prototype.toString,\n\t timer = typeof setImmediate != \"undefined\" ? function timer(fn) {\n\t\treturn setImmediate(fn);\n\t} : setTimeout;\n\n\t// dammit, IE8.\n\ttry {\n\t\tObject.defineProperty({}, \"x\", {});\n\t\tbuiltInProp = function builtInProp(obj, name, val, config) {\n\t\t\treturn Object.defineProperty(obj, name, {\n\t\t\t\tvalue: val,\n\t\t\t\twritable: true,\n\t\t\t\tconfigurable: config !== false\n\t\t\t});\n\t\t};\n\t} catch (err) {\n\t\tbuiltInProp = function builtInProp(obj, name, val) {\n\t\t\tobj[name] = val;\n\t\t\treturn obj;\n\t\t};\n\t}\n\n\t// Note: using a queue instead of array for efficiency\n\tscheduling_queue = function Queue() {\n\t\tvar first, last, item;\n\n\t\tfunction Item(fn, self) {\n\t\t\tthis.fn = fn;\n\t\t\tthis.self = self;\n\t\t\tthis.next = void 0;\n\t\t}\n\n\t\treturn {\n\t\t\tadd: function add(fn, self) {\n\t\t\t\titem = new Item(fn, self);\n\t\t\t\tif (last) {\n\t\t\t\t\tlast.next = item;\n\t\t\t\t} else {\n\t\t\t\t\tfirst = item;\n\t\t\t\t}\n\t\t\t\tlast = item;\n\t\t\t\titem = void 0;\n\t\t\t},\n\t\t\tdrain: function drain() {\n\t\t\t\tvar f = first;\n\t\t\t\tfirst = last = cycle = void 0;\n\n\t\t\t\twhile (f) {\n\t\t\t\t\tf.fn.call(f.self);\n\t\t\t\t\tf = f.next;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}();\n\n\tfunction schedule(fn, self) {\n\t\tscheduling_queue.add(fn, self);\n\t\tif (!cycle) {\n\t\t\tcycle = timer(scheduling_queue.drain);\n\t\t}\n\t}\n\n\t// promise duck typing\n\tfunction isThenable(o) {\n\t\tvar _then,\n\t\t o_type = typeof o === \"undefined\" ? \"undefined\" : _typeof(o);\n\n\t\tif (o != null && (o_type == \"object\" || o_type == \"function\")) {\n\t\t\t_then = o.then;\n\t\t}\n\t\treturn typeof _then == \"function\" ? _then : false;\n\t}\n\n\tfunction notify() {\n\t\tfor (var i = 0; i < this.chain.length; i++) {\n\t\t\tnotifyIsolated(this, this.state === 1 ? this.chain[i].success : this.chain[i].failure, this.chain[i]);\n\t\t}\n\t\tthis.chain.length = 0;\n\t}\n\n\t// NOTE: This is a separate function to isolate\n\t// the `try..catch` so that other code can be\n\t// optimized better\n\tfunction notifyIsolated(self, cb, chain) {\n\t\tvar ret, _then;\n\t\ttry {\n\t\t\tif (cb === false) {\n\t\t\t\tchain.reject(self.msg);\n\t\t\t} else {\n\t\t\t\tif (cb === true) {\n\t\t\t\t\tret = self.msg;\n\t\t\t\t} else {\n\t\t\t\t\tret = cb.call(void 0, self.msg);\n\t\t\t\t}\n\n\t\t\t\tif (ret === chain.promise) {\n\t\t\t\t\tchain.reject(TypeError(\"Promise-chain cycle\"));\n\t\t\t\t} else if (_then = isThenable(ret)) {\n\t\t\t\t\t_then.call(ret, chain.resolve, chain.reject);\n\t\t\t\t} else {\n\t\t\t\t\tchain.resolve(ret);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\tchain.reject(err);\n\t\t}\n\t}\n\n\tfunction resolve(msg) {\n\t\tvar _then,\n\t\t self = this;\n\n\t\t// already triggered?\n\t\tif (self.triggered) {\n\t\t\treturn;\n\t\t}\n\n\t\tself.triggered = true;\n\n\t\t// unwrap\n\t\tif (self.def) {\n\t\t\tself = self.def;\n\t\t}\n\n\t\ttry {\n\t\t\tif (_then = isThenable(msg)) {\n\t\t\t\tschedule(function () {\n\t\t\t\t\tvar def_wrapper = new MakeDefWrapper(self);\n\t\t\t\t\ttry {\n\t\t\t\t\t\t_then.call(msg, function $resolve$() {\n\t\t\t\t\t\t\tresolve.apply(def_wrapper, arguments);\n\t\t\t\t\t\t}, function $reject$() {\n\t\t\t\t\t\t\treject.apply(def_wrapper, arguments);\n\t\t\t\t\t\t});\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\treject.call(def_wrapper, err);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tself.msg = msg;\n\t\t\t\tself.state = 1;\n\t\t\t\tif (self.chain.length > 0) {\n\t\t\t\t\tschedule(notify, self);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (err) {\n\t\t\treject.call(new MakeDefWrapper(self), err);\n\t\t}\n\t}\n\n\tfunction reject(msg) {\n\t\tvar self = this;\n\n\t\t// already triggered?\n\t\tif (self.triggered) {\n\t\t\treturn;\n\t\t}\n\n\t\tself.triggered = true;\n\n\t\t// unwrap\n\t\tif (self.def) {\n\t\t\tself = self.def;\n\t\t}\n\n\t\tself.msg = msg;\n\t\tself.state = 2;\n\t\tif (self.chain.length > 0) {\n\t\t\tschedule(notify, self);\n\t\t}\n\t}\n\n\tfunction iteratePromises(Constructor, arr, resolver, rejecter) {\n\t\tfor (var idx = 0; idx < arr.length; idx++) {\n\t\t\t(function IIFE(idx) {\n\t\t\t\tConstructor.resolve(arr[idx]).then(function $resolver$(msg) {\n\t\t\t\t\tresolver(idx, msg);\n\t\t\t\t}, rejecter);\n\t\t\t})(idx);\n\t\t}\n\t}\n\n\tfunction MakeDefWrapper(self) {\n\t\tthis.def = self;\n\t\tthis.triggered = false;\n\t}\n\n\tfunction MakeDef(self) {\n\t\tthis.promise = self;\n\t\tthis.state = 0;\n\t\tthis.triggered = false;\n\t\tthis.chain = [];\n\t\tthis.msg = void 0;\n\t}\n\n\tfunction Promise(executor) {\n\t\tif (typeof executor != \"function\") {\n\t\t\tthrow TypeError(\"Not a function\");\n\t\t}\n\n\t\tif (this.__NPO__ !== 0) {\n\t\t\tthrow TypeError(\"Not a promise\");\n\t\t}\n\n\t\t// instance shadowing the inherited \"brand\"\n\t\t// to signal an already \"initialized\" promise\n\t\tthis.__NPO__ = 1;\n\n\t\tvar def = new MakeDef(this);\n\n\t\tthis[\"then\"] = function then(success, failure) {\n\t\t\tvar o = {\n\t\t\t\tsuccess: typeof success == \"function\" ? success : true,\n\t\t\t\tfailure: typeof failure == \"function\" ? failure : false\n\t\t\t};\n\t\t\t// Note: `then(..)` itself can be borrowed to be used against\n\t\t\t// a different promise constructor for making the chained promise,\n\t\t\t// by substituting a different `this` binding.\n\t\t\to.promise = new this.constructor(function extractChain(resolve, reject) {\n\t\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t\t}\n\n\t\t\t\to.resolve = resolve;\n\t\t\t\to.reject = reject;\n\t\t\t});\n\t\t\tdef.chain.push(o);\n\n\t\t\tif (def.state !== 0) {\n\t\t\t\tschedule(notify, def);\n\t\t\t}\n\n\t\t\treturn o.promise;\n\t\t};\n\t\tthis[\"catch\"] = function $catch$(failure) {\n\t\t\treturn this.then(void 0, failure);\n\t\t};\n\n\t\ttry {\n\t\t\texecutor.call(void 0, function publicResolve(msg) {\n\t\t\t\tresolve.call(def, msg);\n\t\t\t}, function publicReject(msg) {\n\t\t\t\treject.call(def, msg);\n\t\t\t});\n\t\t} catch (err) {\n\t\t\treject.call(def, err);\n\t\t}\n\t}\n\n\tvar PromisePrototype = builtInProp({}, \"constructor\", Promise,\n\t/*configurable=*/false);\n\n\t// Note: Android 4 cannot use `Object.defineProperty(..)` here\n\tPromise.prototype = PromisePrototype;\n\n\t// built-in \"brand\" to signal an \"uninitialized\" promise\n\tbuiltInProp(PromisePrototype, \"__NPO__\", 0,\n\t/*configurable=*/false);\n\n\tbuiltInProp(Promise, \"resolve\", function Promise$resolve(msg) {\n\t\tvar Constructor = this;\n\n\t\t// spec mandated checks\n\t\t// note: best \"isPromise\" check that's practical for now\n\t\tif (msg && (typeof msg === \"undefined\" ? \"undefined\" : _typeof(msg)) == \"object\" && msg.__NPO__ === 1) {\n\t\t\treturn msg;\n\t\t}\n\n\t\treturn new Constructor(function executor(resolve, reject) {\n\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t}\n\n\t\t\tresolve(msg);\n\t\t});\n\t});\n\n\tbuiltInProp(Promise, \"reject\", function Promise$reject(msg) {\n\t\treturn new this(function executor(resolve, reject) {\n\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t}\n\n\t\t\treject(msg);\n\t\t});\n\t});\n\n\tbuiltInProp(Promise, \"all\", function Promise$all(arr) {\n\t\tvar Constructor = this;\n\n\t\t// spec mandated checks\n\t\tif (ToString.call(arr) != \"[object Array]\") {\n\t\t\treturn Constructor.reject(TypeError(\"Not an array\"));\n\t\t}\n\t\tif (arr.length === 0) {\n\t\t\treturn Constructor.resolve([]);\n\t\t}\n\n\t\treturn new Constructor(function executor(resolve, reject) {\n\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t}\n\n\t\t\tvar len = arr.length,\n\t\t\t msgs = Array(len),\n\t\t\t count = 0;\n\n\t\t\titeratePromises(Constructor, arr, function resolver(idx, msg) {\n\t\t\t\tmsgs[idx] = msg;\n\t\t\t\tif (++count === len) {\n\t\t\t\t\tresolve(msgs);\n\t\t\t\t}\n\t\t\t}, reject);\n\t\t});\n\t});\n\n\tbuiltInProp(Promise, \"race\", function Promise$race(arr) {\n\t\tvar Constructor = this;\n\n\t\t// spec mandated checks\n\t\tif (ToString.call(arr) != \"[object Array]\") {\n\t\t\treturn Constructor.reject(TypeError(\"Not an array\"));\n\t\t}\n\n\t\treturn new Constructor(function executor(resolve, reject) {\n\t\t\tif (typeof resolve != \"function\" || typeof reject != \"function\") {\n\t\t\t\tthrow TypeError(\"Not a function\");\n\t\t\t}\n\n\t\t\titeratePromises(Constructor, arr, function resolver(idx, msg) {\n\t\t\t\tresolve(msg);\n\t\t\t}, reject);\n\t\t});\n\t});\n\n\treturn Promise;\n});\n});\n\n/**\n * @module lib/callbacks\n */\n\nvar callbackMap = new WeakMap();\n\n/**\n * Store a callback for a method or event for a player.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name.\n * @param {(function(this:Player, *): void|{resolve: function, reject: function})} callback\n * The callback to call or an object with resolve and reject functions for a promise.\n * @return {void}\n */\nfunction storeCallback(player, name, callback) {\n var playerCallbacks = callbackMap.get(player.element) || {};\n\n if (!(name in playerCallbacks)) {\n playerCallbacks[name] = [];\n }\n\n playerCallbacks[name].push(callback);\n callbackMap.set(player.element, playerCallbacks);\n}\n\n/**\n * Get the callbacks for a player and event or method.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name\n * @return {function[]}\n */\nfunction getCallbacks(player, name) {\n var playerCallbacks = callbackMap.get(player.element) || {};\n return playerCallbacks[name] || [];\n}\n\n/**\n * Remove a stored callback for a method or event for a player.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name\n * @param {function} [callback] The specific callback to remove.\n * @return {boolean} Was this the last callback?\n */\nfunction removeCallback(player, name, callback) {\n var playerCallbacks = callbackMap.get(player.element) || {};\n\n if (!playerCallbacks[name]) {\n return true;\n }\n\n // If no callback is passed, remove all callbacks for the event\n if (!callback) {\n playerCallbacks[name] = [];\n callbackMap.set(player.element, playerCallbacks);\n\n return true;\n }\n\n var index = playerCallbacks[name].indexOf(callback);\n\n if (index !== -1) {\n playerCallbacks[name].splice(index, 1);\n }\n\n callbackMap.set(player.element, playerCallbacks);\n return playerCallbacks[name] && playerCallbacks[name].length === 0;\n}\n\n/**\n * Return the first stored callback for a player and event or method.\n *\n * @param {Player} player The player object.\n * @param {string} name The method or event name.\n * @return {function} The callback, or false if there were none\n */\nfunction shiftCallbacks(player, name) {\n var playerCallbacks = getCallbacks(player, name);\n\n if (playerCallbacks.length < 1) {\n return false;\n }\n\n var callback = playerCallbacks.shift();\n removeCallback(player, name, callback);\n return callback;\n}\n\n/**\n * Move callbacks associated with an element to another element.\n *\n * @param {HTMLElement} oldElement The old element.\n * @param {HTMLElement} newElement The new element.\n * @return {void}\n */\nfunction swapCallbacks(oldElement, newElement) {\n var playerCallbacks = callbackMap.get(oldElement);\n\n callbackMap.set(newElement, playerCallbacks);\n callbackMap.delete(oldElement);\n}\n\n/**\n * @module lib/embed\n */\n\nvar oEmbedParameters = ['id', 'url', 'width', 'maxwidth', 'height', 'maxheight', 'portrait', 'title', 'byline', 'color', 'autoplay', 'autopause', 'loop', 'responsive', 'speed', 'background', 'transparent'];\n\n/**\n * Get the 'data-vimeo'-prefixed attributes from an element as an object.\n *\n * @param {HTMLElement} element The element.\n * @param {Object} [defaults={}] The default values to use.\n * @return {Object}\n */\nfunction getOEmbedParameters(element) {\n var defaults = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return oEmbedParameters.reduce(function (params, param) {\n var value = element.getAttribute('data-vimeo-' + param);\n\n if (value || value === '') {\n params[param] = value === '' ? 1 : value;\n }\n\n return params;\n }, defaults);\n}\n\n/**\n * Make an oEmbed call for the specified URL.\n *\n * @param {string} videoUrl The vimeo.com url for the video.\n * @param {Object} [params] Parameters to pass to oEmbed.\n * @return {Promise}\n */\nfunction getOEmbedData(videoUrl) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return new Promise(function (resolve, reject) {\n if (!isVimeoUrl(videoUrl)) {\n throw new TypeError('\\u201C' + videoUrl + '\\u201D is not a vimeo.com url.');\n }\n\n var url = 'https://vimeo.com/api/oembed.json?url=' + encodeURIComponent(videoUrl);\n\n for (var param in params) {\n if (params.hasOwnProperty(param)) {\n url += '&' + param + '=' + encodeURIComponent(params[param]);\n }\n }\n\n var xhr = 'XDomainRequest' in window ? new XDomainRequest() : new XMLHttpRequest();\n xhr.open('GET', url, true);\n\n xhr.onload = function () {\n if (xhr.status === 404) {\n reject(new Error('\\u201C' + videoUrl + '\\u201D was not found.'));\n return;\n }\n\n if (xhr.status === 403) {\n reject(new Error('\\u201C' + videoUrl + '\\u201D is not embeddable.'));\n return;\n }\n\n try {\n var json = JSON.parse(xhr.responseText);\n resolve(json);\n } catch (error) {\n reject(error);\n }\n };\n\n xhr.onerror = function () {\n var status = xhr.status ? ' (' + xhr.status + ')' : '';\n reject(new Error('There was an error fetching the embed code from Vimeo' + status + '.'));\n };\n\n xhr.send();\n });\n}\n\n/**\n * Create an embed from oEmbed data inside an element.\n *\n * @param {object} data The oEmbed data.\n * @param {HTMLElement} element The element to put the iframe in.\n * @return {HTMLIFrameElement} The iframe embed.\n */\nfunction createEmbed(_ref, element) {\n var html = _ref.html;\n\n if (!element) {\n throw new TypeError('An element must be provided');\n }\n\n if (element.getAttribute('data-vimeo-initialized') !== null) {\n return element.querySelector('iframe');\n }\n\n var div = document.createElement('div');\n div.innerHTML = html;\n\n element.appendChild(div.firstChild);\n element.setAttribute('data-vimeo-initialized', 'true');\n\n return element.querySelector('iframe');\n}\n\n/**\n * Initialize all embeds within a specific element\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nfunction initializeEmbeds() {\n var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n\n var elements = [].slice.call(parent.querySelectorAll('[data-vimeo-id], [data-vimeo-url]'));\n\n var handleError = function handleError(error) {\n if ('console' in window && console.error) {\n console.error('There was an error creating an embed: ' + error);\n }\n };\n\n elements.forEach(function (element) {\n try {\n // Skip any that have data-vimeo-defer\n if (element.getAttribute('data-vimeo-defer') !== null) {\n return;\n }\n\n var params = getOEmbedParameters(element);\n var url = getVimeoUrl(params);\n\n getOEmbedData(url, params).then(function (data) {\n return createEmbed(data, element);\n }).catch(handleError);\n } catch (error) {\n handleError(error);\n }\n });\n}\n\n/**\n * Resize embeds when messaged by the player.\n *\n * @param {HTMLElement} [parent=document] The parent element.\n * @return {void}\n */\nfunction resizeEmbeds() {\n var parent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : document;\n\n var onMessage = function onMessage(event) {\n if (!isVimeoUrl(event.origin)) {\n return;\n }\n\n if (!event.data || event.data.event !== 'spacechange') {\n return;\n }\n\n var iframes = parent.querySelectorAll('iframe');\n\n for (var i = 0; i < iframes.length; i++) {\n if (iframes[i].contentWindow !== event.source) {\n continue;\n }\n\n var space = iframes[i].parentElement;\n\n if (space && space.className.indexOf('vimeo-space') !== -1) {\n space.style.paddingBottom = event.data.data[0].bottom + 'px';\n }\n\n break;\n }\n };\n\n if (window.addEventListener) {\n window.addEventListener('message', onMessage, false);\n } else if (window.attachEvent) {\n window.attachEvent('onmessage', onMessage);\n }\n}\n\n/**\n * @module lib/postmessage\n */\n\n/**\n * Parse a message received from postMessage.\n *\n * @param {*} data The data received from postMessage.\n * @return {object}\n */\nfunction parseMessageData(data) {\n if (typeof data === 'string') {\n data = JSON.parse(data);\n }\n\n return data;\n}\n\n/**\n * Post a message to the specified target.\n *\n * @param {Player} player The player object to use.\n * @param {string} method The API method to call.\n * @param {object} params The parameters to send to the player.\n * @return {void}\n */\nfunction postMessage(player, method, params) {\n if (!player.element.contentWindow || !player.element.contentWindow.postMessage) {\n return;\n }\n\n var message = {\n method: method\n };\n\n if (params !== undefined) {\n message.value = params;\n }\n\n // IE 8 and 9 do not support passing messages, so stringify them\n var ieVersion = parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\\d+).*$/, '$1'));\n if (ieVersion >= 8 && ieVersion < 10) {\n message = JSON.stringify(message);\n }\n\n player.element.contentWindow.postMessage(message, player.origin);\n}\n\n/**\n * Parse the data received from a message event.\n *\n * @param {Player} player The player that received the message.\n * @param {(Object|string)} data The message data. Strings will be parsed into JSON.\n * @return {void}\n */\nfunction processData(player, data) {\n data = parseMessageData(data);\n var callbacks = [];\n var param = void 0;\n\n if (data.event) {\n if (data.event === 'error') {\n var promises = getCallbacks(player, data.data.method);\n\n promises.forEach(function (promise) {\n var error = new Error(data.data.message);\n error.name = data.data.name;\n\n promise.reject(error);\n removeCallback(player, data.data.method, promise);\n });\n }\n\n callbacks = getCallbacks(player, 'event:' + data.event);\n param = data.data;\n } else if (data.method) {\n var callback = shiftCallbacks(player, data.method);\n\n if (callback) {\n callbacks.push(callback);\n param = data.value;\n }\n }\n\n callbacks.forEach(function (callback) {\n try {\n if (typeof callback === 'function') {\n callback.call(player, param);\n return;\n }\n\n callback.resolve(param);\n } catch (e) {\n // empty\n }\n });\n}\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar playerMap = new WeakMap();\nvar readyMap = new WeakMap();\n\nvar Player = function () {\n /**\n * Create a Player.\n *\n * @param {(HTMLIFrameElement|HTMLElement|string|jQuery)} element A reference to the Vimeo\n * player iframe, and id, or a jQuery object.\n * @param {object} [options] oEmbed parameters to use when creating an embed in the element.\n * @return {Player}\n */\n function Player(element) {\n var _this = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Player);\n\n /* global jQuery */\n if (window.jQuery && element instanceof jQuery) {\n if (element.length > 1 && window.console && console.warn) {\n console.warn('A jQuery object with multiple elements was passed, using the first element.');\n }\n\n element = element[0];\n }\n\n // Find an element by ID\n if (typeof element === 'string') {\n element = document.getElementById(element);\n }\n\n // Not an element!\n if (!isDomElement(element)) {\n throw new TypeError('You must pass either a valid element or a valid id.');\n }\n\n // Already initialized an embed in this div, so grab the iframe\n if (element.nodeName !== 'IFRAME') {\n var iframe = element.querySelector('iframe');\n\n if (iframe) {\n element = iframe;\n }\n }\n\n // iframe url is not a Vimeo url\n if (element.nodeName === 'IFRAME' && !isVimeoUrl(element.getAttribute('src') || '')) {\n throw new Error('The player element passed isn’t a Vimeo embed.');\n }\n\n // If there is already a player object in the map, return that\n if (playerMap.has(element)) {\n return playerMap.get(element);\n }\n\n this.element = element;\n this.origin = '*';\n\n var readyPromise = new npo_src(function (resolve, reject) {\n var onMessage = function onMessage(event) {\n if (!isVimeoUrl(event.origin) || _this.element.contentWindow !== event.source) {\n return;\n }\n\n if (_this.origin === '*') {\n _this.origin = event.origin;\n }\n\n var data = parseMessageData(event.data);\n var isReadyEvent = 'event' in data && data.event === 'ready';\n var isPingResponse = 'method' in data && data.method === 'ping';\n\n if (isReadyEvent || isPingResponse) {\n _this.element.setAttribute('data-ready', 'true');\n resolve();\n return;\n }\n\n processData(_this, data);\n };\n\n if (window.addEventListener) {\n window.addEventListener('message', onMessage, false);\n } else if (window.attachEvent) {\n window.attachEvent('onmessage', onMessage);\n }\n\n if (_this.element.nodeName !== 'IFRAME') {\n var params = getOEmbedParameters(element, options);\n var url = getVimeoUrl(params);\n\n getOEmbedData(url, params).then(function (data) {\n var iframe = createEmbed(data, element);\n _this.element = iframe;\n\n swapCallbacks(element, iframe);\n playerMap.set(_this.element, _this);\n\n return data;\n }).catch(function (error) {\n return reject(error);\n });\n }\n });\n\n // Store a copy of this Player in the map\n readyMap.set(this, readyPromise);\n playerMap.set(this.element, this);\n\n // Send a ping to the iframe so the ready promise will be resolved if\n // the player is already ready.\n if (this.element.nodeName === 'IFRAME') {\n postMessage(this, 'ping');\n }\n\n return this;\n }\n\n /**\n * Get a promise for a method.\n *\n * @param {string} name The API method to call.\n * @param {Object} [args={}] Arguments to send via postMessage.\n * @return {Promise}\n */\n\n\n _createClass(Player, [{\n key: 'callMethod',\n value: function callMethod(name) {\n var _this2 = this;\n\n var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return new npo_src(function (resolve, reject) {\n // We are storing the resolve/reject handlers to call later, so we\n // can’t return here.\n // eslint-disable-next-line promise/always-return\n return _this2.ready().then(function () {\n storeCallback(_this2, name, {\n resolve: resolve,\n reject: reject\n });\n\n postMessage(_this2, name, args);\n });\n });\n }\n\n /**\n * Get a promise for the value of a player property.\n *\n * @param {string} name The property name\n * @return {Promise}\n */\n\n }, {\n key: 'get',\n value: function get(name) {\n var _this3 = this;\n\n return new npo_src(function (resolve, reject) {\n name = getMethodName(name, 'get');\n\n // We are storing the resolve/reject handlers to call later, so we\n // can’t return here.\n // eslint-disable-next-line promise/always-return\n return _this3.ready().then(function () {\n storeCallback(_this3, name, {\n resolve: resolve,\n reject: reject\n });\n\n postMessage(_this3, name);\n });\n });\n }\n\n /**\n * Get a promise for setting the value of a player property.\n *\n * @param {string} name The API method to call.\n * @param {mixed} value The value to set.\n * @return {Promise}\n */\n\n }, {\n key: 'set',\n value: function set(name, value) {\n var _this4 = this;\n\n return npo_src.resolve(value).then(function (val) {\n name = getMethodName(name, 'set');\n\n if (val === undefined || val === null) {\n throw new TypeError('There must be a value to set.');\n }\n\n return _this4.ready().then(function () {\n return new npo_src(function (resolve, reject) {\n storeCallback(_this4, name, {\n resolve: resolve,\n reject: reject\n });\n\n postMessage(_this4, name, val);\n });\n });\n });\n }\n\n /**\n * Add an event listener for the specified event. Will call the\n * callback with a single parameter, `data`, that contains the data for\n * that event.\n *\n * @param {string} eventName The name of the event.\n * @param {function(*)} callback The function to call when the event fires.\n * @return {void}\n */\n\n }, {\n key: 'on',\n value: function on(eventName, callback) {\n if (!eventName) {\n throw new TypeError('You must pass an event name.');\n }\n\n if (!callback) {\n throw new TypeError('You must pass a callback function.');\n }\n\n if (typeof callback !== 'function') {\n throw new TypeError('The callback must be a function.');\n }\n\n var callbacks = getCallbacks(this, 'event:' + eventName);\n if (callbacks.length === 0) {\n this.callMethod('addEventListener', eventName).catch(function () {\n // Ignore the error. There will be an error event fired that\n // will trigger the error callback if they are listening.\n });\n }\n\n storeCallback(this, 'event:' + eventName, callback);\n }\n\n /**\n * Remove an event listener for the specified event. Will remove all\n * listeners for that event if a `callback` isn’t passed, or only that\n * specific callback if it is passed.\n *\n * @param {string} eventName The name of the event.\n * @param {function} [callback] The specific callback to remove.\n * @return {void}\n */\n\n }, {\n key: 'off',\n value: function off(eventName, callback) {\n if (!eventName) {\n throw new TypeError('You must pass an event name.');\n }\n\n if (callback && typeof callback !== 'function') {\n throw new TypeError('The callback must be a function.');\n }\n\n var lastCallback = removeCallback(this, 'event:' + eventName, callback);\n\n // If there are no callbacks left, remove the listener\n if (lastCallback) {\n this.callMethod('removeEventListener', eventName).catch(function (e) {\n // Ignore the error. There will be an error event fired that\n // will trigger the error callback if they are listening.\n });\n }\n }\n\n /**\n * A promise to load a new video.\n *\n * @promise LoadVideoPromise\n * @fulfill {number} The video with this id successfully loaded.\n * @reject {TypeError} The id was not a number.\n */\n /**\n * Load a new video into this embed. The promise will be resolved if\n * the video is successfully loaded, or it will be rejected if it could\n * not be loaded.\n *\n * @param {number} id The id of the video.\n * @return {LoadVideoPromise}\n */\n\n }, {\n key: 'loadVideo',\n value: function loadVideo(id) {\n return this.callMethod('loadVideo', id);\n }\n\n /**\n * A promise to perform an action when the Player is ready.\n *\n * @todo document errors\n * @promise LoadVideoPromise\n * @fulfill {void}\n */\n /**\n * Trigger a function when the player iframe has initialized. You do not\n * need to wait for `ready` to trigger to begin adding event listeners\n * or calling other methods.\n *\n * @return {ReadyPromise}\n */\n\n }, {\n key: 'ready',\n value: function ready() {\n var readyPromise = readyMap.get(this);\n return npo_src.resolve(readyPromise);\n }\n\n /**\n * A promise to add a cue point to the player.\n *\n * @promise AddCuePointPromise\n * @fulfill {string} The id of the cue point to use for removeCuePoint.\n * @reject {RangeError} the time was less than 0 or greater than the\n * video’s duration.\n * @reject {UnsupportedError} Cue points are not supported with the current\n * player or browser.\n */\n /**\n * Add a cue point to the player.\n *\n * @param {number} time The time for the cue point.\n * @param {object} [data] Arbitrary data to be returned with the cue point.\n * @return {AddCuePointPromise}\n */\n\n }, {\n key: 'addCuePoint',\n value: function addCuePoint(time) {\n var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n return this.callMethod('addCuePoint', { time: time, data: data });\n }\n\n /**\n * A promise to remove a cue point from the player.\n *\n * @promise AddCuePointPromise\n * @fulfill {string} The id of the cue point that was removed.\n * @reject {InvalidCuePoint} The cue point with the specified id was not\n * found.\n * @reject {UnsupportedError} Cue points are not supported with the current\n * player or browser.\n */\n /**\n * Remove a cue point from the video.\n *\n * @param {string} id The id of the cue point to remove.\n * @return {RemoveCuePointPromise}\n */\n\n }, {\n key: 'removeCuePoint',\n value: function removeCuePoint(id) {\n return this.callMethod('removeCuePoint', id);\n }\n\n /**\n * A representation of a text track on a video.\n *\n * @typedef {Object} VimeoTextTrack\n * @property {string} language The ISO language code.\n * @property {string} kind The kind of track it is (captions or subtitles).\n * @property {string} label The human‐readable label for the track.\n */\n /**\n * A promise to enable a text track.\n *\n * @promise EnableTextTrackPromise\n * @fulfill {VimeoTextTrack} The text track that was enabled.\n * @reject {InvalidTrackLanguageError} No track was available with the\n * specified language.\n * @reject {InvalidTrackError} No track was available with the specified\n * language and kind.\n */\n /**\n * Enable the text track with the specified language, and optionally the\n * specified kind (captions or subtitles).\n *\n * When set via the API, the track language will not change the viewer’s\n * stored preference.\n *\n * @param {string} language The two‐letter language code.\n * @param {string} [kind] The kind of track to enable (captions or subtitles).\n * @return {EnableTextTrackPromise}\n */\n\n }, {\n key: 'enableTextTrack',\n value: function enableTextTrack(language, kind) {\n if (!language) {\n throw new TypeError('You must pass a language.');\n }\n\n return this.callMethod('enableTextTrack', {\n language: language,\n kind: kind\n });\n }\n\n /**\n * A promise to disable the active text track.\n *\n * @promise DisableTextTrackPromise\n * @fulfill {void} The track was disabled.\n */\n /**\n * Disable the currently-active text track.\n *\n * @return {DisableTextTrackPromise}\n */\n\n }, {\n key: 'disableTextTrack',\n value: function disableTextTrack() {\n return this.callMethod('disableTextTrack');\n }\n\n /**\n * A promise to pause the video.\n *\n * @promise PausePromise\n * @fulfill {void} The video was paused.\n */\n /**\n * Pause the video if it’s playing.\n *\n * @return {PausePromise}\n */\n\n }, {\n key: 'pause',\n value: function pause() {\n return this.callMethod('pause');\n }\n\n /**\n * A promise to play the video.\n *\n * @promise PlayPromise\n * @fulfill {void} The video was played.\n */\n /**\n * Play the video if it’s paused. **Note:** on iOS and some other\n * mobile devices, you cannot programmatically trigger play. Once the\n * viewer has tapped on the play button in the player, however, you\n * will be able to use this function.\n *\n * @return {PlayPromise}\n */\n\n }, {\n key: 'play',\n value: function play() {\n return this.callMethod('play');\n }\n\n /**\n * A promise to unload the video.\n *\n * @promise UnloadPromise\n * @fulfill {void} The video was unloaded.\n */\n /**\n * Return the player to its initial state.\n *\n * @return {UnloadPromise}\n */\n\n }, {\n key: 'unload',\n value: function unload() {\n return this.callMethod('unload');\n }\n\n /**\n * A promise to get the autopause behavior of the video.\n *\n * @promise GetAutopausePromise\n * @fulfill {boolean} Whether autopause is turned on or off.\n * @reject {UnsupportedError} Autopause is not supported with the current\n * player or browser.\n */\n /**\n * Get the autopause behavior for this player.\n *\n * @return {GetAutopausePromise}\n */\n\n }, {\n key: 'getAutopause',\n value: function getAutopause() {\n return this.get('autopause');\n }\n\n /**\n * A promise to set the autopause behavior of the video.\n *\n * @promise SetAutopausePromise\n * @fulfill {boolean} Whether autopause is turned on or off.\n * @reject {UnsupportedError} Autopause is not supported with the current\n * player or browser.\n */\n /**\n * Enable or disable the autopause behavior of this player.\n *\n * By default, when another video is played in the same browser, this\n * player will automatically pause. Unless you have a specific reason\n * for doing so, we recommend that you leave autopause set to the\n * default (`true`).\n *\n * @param {boolean} autopause\n * @return {SetAutopausePromise}\n */\n\n }, {\n key: 'setAutopause',\n value: function setAutopause(autopause) {\n return this.set('autopause', autopause);\n }\n\n /**\n * A promise to get the color of the player.\n *\n * @promise GetColorPromise\n * @fulfill {string} The hex color of the player.\n */\n /**\n * Get the color for this player.\n *\n * @return {GetColorPromise}\n */\n\n }, {\n key: 'getColor',\n value: function getColor() {\n return this.get('color');\n }\n\n /**\n * A promise to set the color of the player.\n *\n * @promise SetColorPromise\n * @fulfill {string} The color was successfully set.\n * @reject {TypeError} The string was not a valid hex or rgb color.\n * @reject {ContrastError} The color was set, but the contrast is\n * outside of the acceptable range.\n * @reject {EmbedSettingsError} The owner of the player has chosen to\n * use a specific color.\n */\n /**\n * Set the color of this player to a hex or rgb string. Setting the\n * color may fail if the owner of the video has set their embed\n * preferences to force a specific color.\n *\n * @param {string} color The hex or rgb color string to set.\n * @return {SetColorPromise}\n */\n\n }, {\n key: 'setColor',\n value: function setColor(color) {\n return this.set('color', color);\n }\n\n /**\n * A representation of a cue point.\n *\n * @typedef {Object} VimeoCuePoint\n * @property {number} time The time of the cue point.\n * @property {object} data The data passed when adding the cue point.\n * @property {string} id The unique id for use with removeCuePoint.\n */\n /**\n * A promise to get the cue points of a video.\n *\n * @promise GetCuePointsPromise\n * @fulfill {VimeoCuePoint[]} The cue points added to the video.\n * @reject {UnsupportedError} Cue points are not supported with the current\n * player or browser.\n */\n /**\n * Get an array of the cue points added to the video.\n *\n * @return {GetCuePointsPromise}\n */\n\n }, {\n key: 'getCuePoints',\n value: function getCuePoints() {\n return this.get('cuePoints');\n }\n\n /**\n * A promise to get the current time of the video.\n *\n * @promise GetCurrentTimePromise\n * @fulfill {number} The current time in seconds.\n */\n /**\n * Get the current playback position in seconds.\n *\n * @return {GetCurrentTimePromise}\n */\n\n }, {\n key: 'getCurrentTime',\n value: function getCurrentTime() {\n return this.get('currentTime');\n }\n\n /**\n * A promise to set the current time of the video.\n *\n * @promise SetCurrentTimePromise\n * @fulfill {number} The actual current time that was set.\n * @reject {RangeError} the time was less than 0 or greater than the\n * video’s duration.\n */\n /**\n * Set the current playback position in seconds. If the player was\n * paused, it will remain paused. Likewise, if the player was playing,\n * it will resume playing once the video has buffered.\n *\n * You can provide an accurate time and the player will attempt to seek\n * to as close to that time as possible. The exact time will be the\n * fulfilled value of the promise.\n *\n * @param {number} currentTime\n * @return {SetCurrentTimePromise}\n */\n\n }, {\n key: 'setCurrentTime',\n value: function setCurrentTime(currentTime) {\n return this.set('currentTime', currentTime);\n }\n\n /**\n * A promise to get the duration of the video.\n *\n * @promise GetDurationPromise\n * @fulfill {number} The duration in seconds.\n */\n /**\n * Get the duration of the video in seconds. It will be rounded to the\n * nearest second before playback begins, and to the nearest thousandth\n * of a second after playback begins.\n *\n * @return {GetDurationPromise}\n */\n\n }, {\n key: 'getDuration',\n value: function getDuration() {\n return this.get('duration');\n }\n\n /**\n * A promise to get the ended state of the video.\n *\n * @promise GetEndedPromise\n * @fulfill {boolean} Whether or not the video has ended.\n */\n /**\n * Get the ended state of the video. The video has ended if\n * `currentTime === duration`.\n *\n * @return {GetEndedPromise}\n */\n\n }, {\n key: 'getEnded',\n value: function getEnded() {\n return this.get('ended');\n }\n\n /**\n * A promise to get the loop state of the player.\n *\n * @promise GetLoopPromise\n * @fulfill {boolean} Whether or not the player is set to loop.\n */\n /**\n * Get the loop state of the player.\n *\n * @return {GetLoopPromise}\n */\n\n }, {\n key: 'getLoop',\n value: function getLoop() {\n return this.get('loop');\n }\n\n /**\n * A promise to set the loop state of the player.\n *\n * @promise SetLoopPromise\n * @fulfill {boolean} The loop state that was set.\n */\n /**\n * Set the loop state of the player. When set to `true`, the player\n * will start over immediately once playback ends.\n *\n * @param {boolean} loop\n * @return {SetLoopPromise}\n */\n\n }, {\n key: 'setLoop',\n value: function setLoop(loop) {\n return this.set('loop', loop);\n }\n\n /**\n * A promise to get the paused state of the player.\n *\n * @promise GetLoopPromise\n * @fulfill {boolean} Whether or not the video is paused.\n */\n /**\n * Get the paused state of the player.\n *\n * @return {GetLoopPromise}\n */\n\n }, {\n key: 'getPaused',\n value: function getPaused() {\n return this.get('paused');\n }\n\n /**\n * A promise to get the playback rate of the player.\n *\n * @promise GetPlaybackRatePromise\n * @fulfill {number} The playback rate of the player on a scale from 0.5 to 2.\n */\n /**\n * Get the playback rate of the player on a scale from `0.5` to `2`.\n *\n * @return {GetPlaybackRatePromise}\n */\n\n }, {\n key: 'getPlaybackRate',\n value: function getPlaybackRate() {\n return this.get('playbackRate');\n }\n\n /**\n * A promise to set the playbackrate of the player.\n *\n * @promise SetPlaybackRatePromise\n * @fulfill {number} The playback rate was set.\n * @reject {RangeError} The playback rate was less than 0.5 or greater than 2.\n */\n /**\n * Set the playback rate of the player on a scale from `0.5` to `2`. When set\n * via the API, the playback rate will not be synchronized to other\n * players or stored as the viewer's preference.\n *\n * @param {number} playbackRate\n * @return {SetPlaybackRatePromise}\n */\n\n }, {\n key: 'setPlaybackRate',\n value: function setPlaybackRate(playbackRate) {\n return this.set('playbackRate', playbackRate);\n }\n\n /**\n * A promise to get the text tracks of a video.\n *\n * @promise GetTextTracksPromise\n * @fulfill {VimeoTextTrack[]} The text tracks associated with the video.\n */\n /**\n * Get an array of the text tracks that exist for the video.\n *\n * @return {GetTextTracksPromise}\n */\n\n }, {\n key: 'getTextTracks',\n value: function getTextTracks() {\n return this.get('textTracks');\n }\n\n /**\n * A promise to get the embed code for the video.\n *\n * @promise GetVideoEmbedCodePromise\n * @fulfill {string} The `