/* avada: this file is copied verbatim via grunt to the minified scripts folder. if an unminified version is used, remove the the "copyfiles" grunt task. */ /*! @vimeo/player v2.2.1 | (c) 2017 vimeo | mit license | https://github.com/vimeo/player.js */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e.vimeo=e.vimeo||{},e.vimeo.player=t())}(this,function(){"use strict";function e(e,t){return 0===e.indexof(t.tolowercase())?e:""+t.tolowercase()+e.substr(0,1).touppercase()+e.substr(1)}function t(e){return e instanceof window.htmlelement}function n(e){return!isnan(parsefloat(e))&&isfinite(e)&&math.floor(e)==e}function r(e){return/^(https?:)?\/\/((player|www).)?vimeo.com(?=$|\/)/.test(e)}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,o=e.url,i=t||o;if(!i)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.");if(n(i))return"https://vimeo.com/"+i;if(r(i))return i.replace("http:","https:");if(t)throw new typeerror("“"+t+"” is not a valid video id.");throw new typeerror("“"+i+"” is not a vimeo.com url.")}function i(e,t){return t={exports:{}},e(t,t.exports),t.exports}function a(e,t,n){var r=t.get(e.element)||{};t in r||(r[t]=[]),r[t].push(n),t.set(e.element,r)}function u(e,t){return(t.get(e.element)||{})[t]||[]}function s(e,t,n){var r=t.get(e.element)||{};if(!r[t])return!0;if(!n)return r[t]=[],t.set(e.element,r),!0;var o=r[t].indexof(n);return-1!==o&&r[t].splice(o,1),t.set(e.element,r),r[t]&&0===r[t].length}function c(e,t){var n=u(e,t);if(n.length<1)return!1;var r=n.shift();return s(e,t,r),r}function f(e,t){var n=t.get(e);t.set(t,n),t.delete(e)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return _.reduce(function(t,n){var r=e.getattribute("data-vimeo-"+n);return(r||""===r)&&(t[n]=""===r?1:r),t},t)}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new promise(function(n,o){if(!r(e))throw new typeerror("“"+e+"” is not a vimeo.com url.");var i="https://vimeo.com/api/oembed.json?url="+encodeuricomponent(e);for(var a in t)t.hasownproperty(a)&&(i+="&"+a+"="+encodeuricomponent(t[a]));var u="xdomainrequest"in window?new xdomainrequest:new xmlhttprequest;u.open("get",i,!0),u.onload=function(){if(404===u.status)return void o(new error("“"+e+"” was not found."));if(403===u.status)return void o(new error("“"+e+"” is not embeddable."));try{var t=json.parse(u.responsetext);n(t)}catch(e){o(e)}},u.onerror=function(){var e=u.status?" ("+u.status+")":"";o(new error("there was an error fetching the embed code from vimeo"+e+"."))},u.send()})}function d(e,t){var n=e.html;if(!t)throw new typeerror("an element must be provided");if(null!==t.getattribute("data-vimeo-initialized"))return t.queryselector("iframe");var r=document.createelement("div");return r.innerhtml=n,t.appendchild(r.firstchild),t.setattribute("data-vimeo-initialized","true"),t.queryselector("iframe")}function v(e){return"string"==typeof e&&(e=json.parse(e)),e}function p(e,t,n){if(e.element.contentwindow&&e.element.contentwindow.postmessage){var r={method:t};void 0!==n&&(r.value=n);var o=parsefloat(navigator.useragent.tolowercase().replace(/^.*msie (\d+).*$/,"$1"));o>=8&&o<10&&(r=json.stringify(r)),e.element.contentwindow.postmessage(r,e.origin)}}function y(e,t){t=v(t);var n=[],r=void 0;if(t.event){if("error"===t.event){u(e,t.data.method).foreach(function(n){var r=new error(t.data.message);r.name=t.data.name,n.reject(r),s(e,t.data.method,n)})}n=u(e,"event:"+t.event),r=t.data}else if(t.method){var o=c(e,t.method);o&&(n.push(o),r=t.value)}n.foreach(function(t){try{if("function"==typeof t)return void t.call(e,r);t.resolve(r)}catch(e){}})}function m(e,t){if(!(e instanceof t))throw new typeerror("cannot call a class as a function")}var g="undefined"!=typeof global&&"[object global]"==={}.tostring.call(global),w=void 0!==array.prototype.indexof,b="undefined"!=typeof window&&void 0!==window.postmessage;if(!(g||w&&b))throw new error("sorry, the vimeo player api is not available in this browser.");var k="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(i(function(e,t){!function(e){function t(e,t){function r(e){if(!this||this.constructor!==r)return new r(e);this._keys=[],this._values=[],this._itp=[],this.objectonly=t,e&&n.call(this,e)}return t||w(e,"size",{get:y}),e.constructor=r,r.prototype=e,r}function n(e){this.add?e.foreach(this.add,this):e.foreach(function(e){this.set(e[0],e[1])},this)}function r(e){return this.has(e)&&(this._keys.splice(g,1),this._values.splice(g,1),this._itp.foreach(function(e){g0&&e(r,u))}catch(e){a.call(new s(u),e)}}}function a(t){var n=this;n.triggered||(n.triggered=!0,n.def&&(n=n.def),n.msg=t,n.state=2,n.chain.length>0&&e(r,n))}function u(e,t,n,r){for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:{};if(m(this,player),window.jquery&&e instanceof jquery&&(e.length>1&&window.console&&console.warn&&console.warn("a jquery object with multiple elements was passed, using the first element."),e=e[0]),"string"==typeof e&&(e=document.getelementbyid(e)),!t(e))throw new typeerror("you must pass either a valid element or a valid id.");if("iframe"!==e.nodename){var a=e.queryselector("iframe");a&&(e=a)}if("iframe"===e.nodename&&!r(e.getattribute("src")||""))throw new error("the player element passed isn’t a vimeo embed.");if(x.has(e))return x.get(e);this.element=e,this.origin="*";var u=new e(function(t,a){var u=function(e){if(r(e.origin)&&n.element.contentwindow===e.source){"*"===n.origin&&(n.origin=e.origin);var o=v(e.data),i="event"in o&&"ready"===o.event,a="method"in o&&"ping"===o.method;if(i||a)return n.element.setattribute("data-ready","true"),void t();y(n,o)}};if(window.addeventlistener?window.addeventlistener("message",u,!1):window.attachevent&&window.attachevent("onmessage",u),"iframe"!==n.element.nodename){var s=l(e,i);h(o(s),s).then(function(t){var r=d(t,e);return n.element=r,f(e,r),x.set(n.element,n),t}).catch(function(e){return a(e)})}});return m.set(this,u),x.set(this.element,this),"iframe"===this.element.nodename&&p(this,"ping"),this}return j(player,[{key:"callmethod",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new e(function(r,o){return t.ready().then(function(){a(t,e,{resolve:r,reject:o}),p(t,e,n)})})}},{key:"get",value:function(t){var n=this;return new e(function(r,o){return t=e(t,"get"),n.ready().then(function(){a(n,t,{resolve:r,reject:o}),p(n,t)})})}},{key:"set",value:function(t,n){var r=this;return e.resolve(n).then(function(n){if(t=e(t,"set"),void 0===n||null===n)throw new typeerror("there must be a value to set.");return r.ready().then(function(){return new e(function(e,o){a(r,t,{resolve:e,reject:o}),p(r,t,n)})})})}},{key:"on",value:function(e,t){if(!e)throw new typeerror("you must pass an event name.");if(!t)throw new typeerror("you must pass a callback function.");if("function"!=typeof t)throw new typeerror("the callback must be a function.");0===u(this,"event:"+e).length&&this.callmethod("addeventlistener",e).catch(function(){}),a(this,"event:"+e,t)}},{key:"off",value:function(e,t){if(!e)throw new typeerror("you must pass an event name.");if(t&&"function"!=typeof t)throw new typeerror("the callback must be a function.");s(this,"event:"+e,t)&&this.callmethod("removeeventlistener",e).catch(function(e){})}},{key:"loadvideo",value:function(e){return this.callmethod("loadvideo",e)}},{key:"ready",value:function(){var e=m.get(this);return e.resolve(e)}},{key:"addcuepoint",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.callmethod("addcuepoint",{time:e,data:t})}},{key:"removecuepoint",value:function(e){return this.callmethod("removecuepoint",e)}},{key:"enabletexttrack",value:function(e,t){if(!e)throw new typeerror("you must pass a language.");return this.callmethod("enabletexttrack",{language:e,kind:t})}},{key:"disabletexttrack",value:function(){return this.callmethod("disabletexttrack")}},{key:"pause",value:function(){return this.callmethod("pause")}},{key:"play",value:function(){return this.callmethod("play")}},{key:"unload",value:function(){return this.callmethod("unload")}},{key:"getautopause",value:function(){return this.get("autopause")}},{key:"setautopause",value:function(e){return this.set("autopause",e)}},{key:"getcolor",value:function(){return this.get("color")}},{key:"setcolor",value:function(e){return this.set("color",e)}},{key:"getcuepoints",value:function(){return this.get("cuepoints")}},{key:"getcurrenttime",value:function(){return this.get("currenttime")}},{key:"setcurrenttime",value:function(e){return this.set("currenttime",e)}},{key:"getduration",value:function(){return this.get("duration")}},{key:"getended",value:function(){return this.get("ended")}},{key:"getloop",value:function(){return this.get("loop")}},{key:"setloop",value:function(e){return this.set("loop",e)}},{key:"getpaused",value:function(){return this.get("paused")}},{key:"getplaybackrate",value:function(){return this.get("playbackrate")}},{key:"setplaybackrate",value:function(e){return this.set("playbackrate",e)}},{key:"gettexttracks",value:function(){return this.get("texttracks")}},{key:"getvideoembedcode",value:function(){return this.get("videoembedcode")}},{key:"getvideoid",value:function(){return this.get("videoid")}},{key:"getvideotitle",value:function(){return this.get("videotitle")}},{key:"getvideowidth",value:function(){return this.get("videowidth")}},{key:"getvideoheight",value:function(){return this.get("videoheight")}},{key:"getvideourl",value:function(){return this.get("videourl")}},{key:"getvolume",value:function(){return this.get("volume")}},{key:"setvolume",value:function(e){return this.set("volume",e)}}]),player}();return g||(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=[].slice.call(e.queryselectorall("[data-vimeo-id], [data-vimeo-url]")),n=function(e){"console"in window&&console.error&&console.error("there was an error creating an embed: "+e)};t.foreach(function(e){try{if(null!==e.getattribute("data-vimeo-defer"))return;var t=l(e);h(o(t),t).then(function(t){return d(t,e)}).catch(n)}catch(e){n(e)}})}(),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=function(t){if(r(t.origin)&&t.data&&"spacechange"===t.data.event)for(var n=e.queryselectorall("iframe"),o=0;o