diff --git a/dist/afterglow.min.js b/dist/afterglow.min.js index 35b8230..284e40f 100644 --- a/dist/afterglow.min.js +++ b/dist/afterglow.min.js @@ -17,6 +17,6 @@ function e(o,n){i(this,e);var r=s(this,t.call(this,o,n));return r.focusedChild_= t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function l(t,e,o,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=t.textTracks();r.kind=e,o&&(r.label=o),n&&(r.language=n),r.tech=t;var s=new b["default"](r);return i.addTrack_(s),s}o.__esModule=!0;var u=t(5),c=r(u),p=t(66),f=r(p),d=t(65),h=r(d),v=t(86),y=r(v),g=t(72),b=r(g),A=t(70),m=r(A),j=t(76),w=r(j),_=t(63),k=r(_),x=t(82),T=n(x),E=t(85),C=r(E),S=t(88),O=t(79),B=t(46),P=r(B),M=t(93),I=r(M),R=t(92),D=r(R),N=function(t){function e(){var o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};i(this,e),o.reportTouchActivity=!1;var r=s(this,t.call(this,null,o,n));return r.hasStarted_=!1,r.on("playing",function(){this.hasStarted_=!0}),r.on("loadstart",function(){this.hasStarted_=!1}),r.textTracks_=o.textTracks,r.videoTracks_=o.videoTracks,r.audioTracks_=o.audioTracks,r.featuresProgressEvents||r.manualProgressOn(),r.featuresTimeupdateEvents||r.manualTimeUpdatesOn(),o.nativeCaptions!==!1&&o.nativeTextTracks!==!1||(r.featuresNativeTextTracks=!1),r.featuresNativeTextTracks||r.on("ready",r.emulateTextTracks),r.initTextTrackListeners(),r.initTrackListeners(),r.emitTapEvents(),r}return a(e,t),e.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.prototype.trackProgress=function(){this.stopTrackingProgress(),this.progressInterval=this.setInterval(T.bind(this,function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()}),500)},e.prototype.onDurationChange=function(){this.duration_=this.duration()},e.prototype.buffered=function(){return(0,S.createTimeRange)(0,0)},e.prototype.bufferedPercent=function(){return(0,O.bufferedPercent)(this.buffered(),this.duration_)},e.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},e.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.prototype.clearTracks=function(t){var e=this;t=[].concat(t),t.forEach(function(t){for(var o=e[t+"Tracks"]()||[],n=o.length;n--;){var r=o[n];"text"===t&&e.removeRemoteTextTrack(r),o.removeTrack_(r)}})},e.prototype.reset=function(){},e.prototype.error=function(t){return void 0!==t&&(this.error_=new P["default"](t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?(0,S.createTimeRange)(0,0):(0,S.createTimeRange)()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTextTrackListeners=function(){var t=T.bind(this,function(){this.trigger("texttrackchange")}),e=this.textTracks();e&&(e.addEventListener("removetrack",t),e.addEventListener("addtrack",t),this.on("dispose",T.bind(this,function(){e.removeEventListener("removetrack",t),e.removeEventListener("addtrack",t)})))},e.prototype.initTrackListeners=function(){var t=this,e=["video","audio"];e.forEach(function(e){var o=function(){t.trigger(e+"trackchange")},n=t[e+"Tracks"]();n.addEventListener("removetrack",o),n.addEventListener("addtrack",o),t.on("dispose",function(){n.removeEventListener("removetrack",o),n.removeEventListener("addtrack",o)})})},e.prototype.emulateTextTracks=function(){var t=this,e=this.textTracks();if(e){I["default"].WebVTT||null===this.el().parentNode||void 0===this.el().parentNode||!function(){var e=D["default"].createElement("script");e.src=t.options_["vtt.js"]||"https://cdn.rawgit.com/gkatsev/vtt.js/vjs-v0.12.1/dist/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},t.on("dispose",function(){e.onload=null,e.onerror=null}),I["default"].WebVTT=!0,t.el().parentNode.appendChild(e)}();var o=function(){return t.trigger("texttrackchange")},n=function(){o();for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:[];i(this,e);for(var a=void 0,l=r.length-1;l>=0;l--)if(r[l].enabled){h(r,r[l]);break}if(p.IS_IE8){a=d["default"].createElement("custom");for(var c in u["default"].prototype)"constructor"!==c&&(a[c]=u["default"].prototype[c]);for(var f in e.prototype)"constructor"!==f&&(a[f]=e.prototype[f])}return a=o=s(this,t.call(this,r,a)),a.changing_=!1,n=a,s(o,n)}return a(e,t),e.prototype.addTrack_=function(e){var o=this;e.enabled&&h(this,e),t.prototype.addTrack_.call(this,e),e.addEventListener&&e.addEventListener("enabledchange",function(){o.changing_||(o.changing_=!0,h(o,e),o.changing_=!1,o.trigger("change"))})},e.prototype.addTrack=function(t){this.addTrack_(t)},e.prototype.removeTrack=function(e){t.prototype.removeTrack_.call(this,e)},e}(u["default"]);o["default"]=v},{74:74,78:78,92:92}],64:[function(t,e,o){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e["default"]=t,e}function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}o.__esModule=!0;var l=t(73),u=t(75),c=r(u),p=t(86),f=r(p),d=t(78),h=n(d),v=function(t){function e(){var o,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var a=(0,f["default"])(r,{kind:l.AudioTrackKind[r.kind]||""}),u=o=s(this,t.call(this,a)),c=!1;if(h.IS_IE8)for(var p in e.prototype)"constructor"!==p&&(u[p]=e.prototype[p]);return Object.defineProperty(u,"enabled",{get:function(){return c},set:function(t){"boolean"==typeof t&&t!==c&&(c=t,this.trigger("enabledchange"))}}),a.enabled&&(u.enabled=a.enabled),u.loaded_=!0,n=u,s(o,n)}return a(e,t),e}(c["default"]);o["default"]=v},{73:73,75:75,78:78,86:86}],65:[function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e["default"]=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}o.__esModule=!0;var s=t(78),a=r(s),l=t(92),u=n(l),c=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];i(this,t);var o=this;if(a.IS_IE8){o=u["default"].createElement("custom");for(var n in t.prototype)"constructor"!==n&&(o[n]=t.prototype[n])}o.trackElements_=[],Object.defineProperty(o,"length",{get:function(){return this.trackElements_.length}});for(var r=0,s=e.length;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var n=s(this,t.call(this)),r=void 0,a=n;if(u.IS_IE8){a=p["default"].createElement("custom");for(var l in e.prototype)"constructor"!==l&&(a[l]=e.prototype[l])}var c=new v["default"](o);if(a.kind=c.kind,a.src=c.src,a.srclang=c.language,a.label=c.label,a["default"]=c["default"],Object.defineProperty(a,"readyState",{get:function(){return r}}),Object.defineProperty(a,"track",{get:function(){return c}}),r=y,c.addEventListener("loadeddata",function(){r=b,a.trigger({type:"load",target:a})}),u.IS_IE8){var f;return f=a,s(n,f)}return n}return a(e,t),e}(d["default"]);m.prototype.allowedEvents_={load:"load"},m.NONE=y,m.LOADING=g,m.LOADED=b,m.ERROR=A,o["default"]=m},{42:42,72:72,78:78,92:92}],67:[function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e["default"]=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}o.__esModule=!0;var s=t(78),a=r(s),l=t(92),u=n(l),c=function(){function t(e){i(this,t);var o=this;if(a.IS_IE8){o=u["default"].createElement("custom");for(var n in t.prototype)"constructor"!==n&&(o[n]=t.prototype[n])}if(t.prototype.setCues_.call(o,e),Object.defineProperty(o,"length",{get:function(){return this.length_}}),a.IS_IE8)return o}return t.prototype.setCues_=function(t){var e=this.length||0,o=0,n=t.length;this.cues_=t,this.length_=t.length;var r=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e0&&void 0!==arguments[0]?arguments[0]:[];i(this,e);var a=void 0;if(d.IS_IE8){a=v["default"].createElement("custom");for(var l in u["default"].prototype)"constructor"!==l&&(a[l]=u["default"].prototype[l]);for(var c in e.prototype)"constructor"!==c&&(a[c]=e.prototype[c])}return a=o=s(this,t.call(this,r,a)),n=a,s(o,n)}return a(e,t),e.prototype.addTrack_=function(e){t.prototype.addTrack_.call(this,e),e.addEventListener("modechange",p.bind(this,function(){this.trigger("change")}))},e.prototype.removeTrack_=function(t){for(var e=void 0,o=0,n=this.length;oCaptions Settings Dialog\n
Beginning of dialog window. Escape will cancel and close the window.
\n
\n
\n
\n Text\n \n \n \n \n \n \n
\n
\n Background\n \n \n \n \n \n \n
\n
\n Window\n \n \n \n \n \n \n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n \n \n
\n
\n \n ';return n}function u(t){var e=void 0;return t.selectedOptions?e=t.selectedOptions[0]:t.options&&(e=t.options[t.options.selectedIndex]),e.value}function c(t,e){if(e){var o=void 0;for(o=0;o select").selectedIndex=0,this.$(".vjs-bg-color > select").selectedIndex=0, this.$(".window-color > select").selectedIndex=0,this.$(".vjs-text-opacity > select").selectedIndex=0,this.$(".vjs-bg-opacity > select").selectedIndex=0,this.$(".vjs-window-opacity > select").selectedIndex=0,this.$(".vjs-edge-style select").selectedIndex=0,this.$(".vjs-font-family select").selectedIndex=0,this.$(".vjs-font-percent select").selectedIndex=2,this.updateDisplay()})),h.on(r.$(".vjs-fg-color > select"),"change",y.bind(r,r.updateDisplay)),h.on(r.$(".vjs-bg-color > select"),"change",y.bind(r,r.updateDisplay)),h.on(r.$(".window-color > select"),"change",y.bind(r,r.updateDisplay)),h.on(r.$(".vjs-text-opacity > select"),"change",y.bind(r,r.updateDisplay)),h.on(r.$(".vjs-bg-opacity > select"),"change",y.bind(r,r.updateDisplay)),h.on(r.$(".vjs-window-opacity > select"),"change",y.bind(r,r.updateDisplay)),h.on(r.$(".vjs-font-percent select"),"change",y.bind(r,r.updateDisplay)),h.on(r.$(".vjs-edge-style select"),"change",y.bind(r,r.updateDisplay)),h.on(r.$(".vjs-font-family select"),"change",y.bind(r,r.updateDisplay)),r.options_.persistTextTrackSettings&&r.restoreSettings(),r}return a(e,t),e.prototype.createEl=function(){var e=this.id_,o="TTsettingsDialogLabel-"+e,n="TTsettingsDialogDescription-"+e;return t.prototype.createEl.call(this,"div",{className:"vjs-caption-settings vjs-modal-overlay",innerHTML:l(e,o,n),tabIndex:-1},{role:"dialog","aria-labelledby":o,"aria-describedby":n})},e.prototype.getValues=function(){var t=u(this.$(".vjs-edge-style select")),e=u(this.$(".vjs-font-family select")),o=u(this.$(".vjs-fg-color > select")),n=u(this.$(".vjs-text-opacity > select")),r=u(this.$(".vjs-bg-color > select")),i=u(this.$(".vjs-bg-opacity > select")),s=u(this.$(".window-color > select")),a=u(this.$(".vjs-window-opacity > select")),l=w["default"].parseFloat(u(this.$(".vjs-font-percent > select"))),c={fontPercent:l,fontFamily:e,textOpacity:n,windowColor:s,windowOpacity:a,backgroundOpacity:i,edgeStyle:t,color:o,backgroundColor:r};for(var p in c)(""===c[p]||"none"===c[p]||"fontPercent"===p&&1===c[p])&&delete c[p];return c},e.prototype.setValues=function(t){c(this.$(".vjs-edge-style select"),t.edgeStyle),c(this.$(".vjs-font-family select"),t.fontFamily),c(this.$(".vjs-fg-color > select"),t.color),c(this.$(".vjs-text-opacity > select"),t.textOpacity),c(this.$(".vjs-bg-color > select"),t.backgroundColor),c(this.$(".vjs-bg-opacity > select"),t.backgroundOpacity),c(this.$(".window-color > select"),t.windowColor),c(this.$(".vjs-window-opacity > select"),t.windowOpacity);var e=t.fontPercent;e&&(e=e.toFixed(2)),c(this.$(".vjs-font-percent > select"),e)},e.prototype.restoreSettings=function(){var t=void 0,e=void 0;try{var o=(0,m["default"])(w["default"].localStorage.getItem("vjs-text-track-settings"));t=o[0],e=o[1],t&&b["default"].error(t)}catch(n){b["default"].warn(n)}e&&this.setValues(e)},e.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.getOwnPropertyNames(t).length>0?w["default"].localStorage.setItem("vjs-text-track-settings",JSON.stringify(t)):w["default"].localStorage.removeItem("vjs-text-track-settings")}catch(e){b["default"].warn(e)}}},e.prototype.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},e}(f["default"]);f["default"].registerComponent("TextTrackSettings",_),o["default"]=_},{145:145,5:5,81:81,82:82,85:85,93:93}],72:[function(t,e,o){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e["default"]=t,e}function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}o.__esModule=!0;var l=t(67),u=r(l),c=t(82),p=n(c),f=t(73),d=t(85),h=r(d),v=t(93),y=r(v),g=t(75),b=r(g),A=t(90),m=t(147),j=r(m),w=t(86),_=r(w),k=t(78),x=n(k),T=function(t,e){var o=new y["default"].WebVTT.Parser(y["default"],y["default"].vttjs,y["default"].WebVTT.StringDecoder()),n=[];o.oncue=function(t){e.addCue(t)},o.onparsingerror=function(t){n.push(t)},o.onflush=function(){e.trigger({type:"loadeddata",target:e})},o.parse(t),n.length>0&&(y["default"].console&&y["default"].console.groupCollapsed&&y["default"].console.groupCollapsed("Text Track parsing errors for "+e.src),n.forEach(function(t){return h["default"].error(t)}),y["default"].console&&y["default"].console.groupEnd&&y["default"].console.groupEnd()),o.flush()},E=function(t,e){var o={uri:t},n=(0,A.isCrossOrigin)(t);n&&(o.cors=n),(0,j["default"])(o,p.bind(this,function(t,o,n){return t?h["default"].error(t,o):(e.loaded_=!0,void("function"!=typeof y["default"].WebVTT?e.tech_&&!function(){var t=function(){return T(n,e)};e.tech_.on("vttjsloaded",t),e.tech_.on("vttjserror",function(){h["default"].error("vttjs failed to load, stopping trying to process "+e.src),e.tech_.off("vttjsloaded",t)})}():T(n,e)))}))},C=function(t){function e(){var o,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(i(this,e),!r.tech)throw new Error("A tech was not provided.");var a=(0,_["default"])(r,{kind:f.TextTrackKind[r.kind]||"subtitles",language:r.language||r.srclang||""}),l=f.TextTrackMode[a.mode]||"disabled",c=a["default"];"metadata"!==a.kind&&"chapters"!==a.kind||(l="hidden");var d=o=s(this,t.call(this,a));if(d.tech_=a.tech,x.IS_IE8)for(var h in e.prototype)"constructor"!==h&&(d[h]=e.prototype[h]);d.cues_=[],d.activeCues_=[];var v=new u["default"](d.cues_),y=new u["default"](d.activeCues_),g=!1,b=p.bind(d,function(){this.activeCues,g&&(this.trigger("cuechange"),g=!1)});return"disabled"!==l&&d.tech_.on("timeupdate",b),Object.defineProperty(d,"default",{get:function(){return c},set:function(){}}),Object.defineProperty(d,"mode",{get:function(){return l},set:function(t){f.TextTrackMode[t]&&(l=t,"showing"===l&&this.tech_.on("timeupdate",b),this.trigger("modechange"))}}),Object.defineProperty(d,"cues",{get:function(){return this.loaded_?v:null},set:function(){}}),Object.defineProperty(d,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return y;for(var t=this.tech_.currentTime(),e=[],o=0,n=this.cues.length;o=t?e.push(r):r.startTime===r.endTime&&r.startTime<=t&&r.startTime+.5>=t&&e.push(r)}if(g=!1,e.length!==this.activeCues_.length)g=!0;else for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;i(this,e);var a=s(this,t.call(this));if(!r&&(r=a,p.IS_IE8)){r=d["default"].createElement("custom");for(var l in e.prototype)"constructor"!==l&&(r[l]=e.prototype[l])}r.tracks_=[],Object.defineProperty(r,"length",{get:function(){return this.tracks_.length}});for(var u=0;u0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var r=s(this,t.call(this)),a=r;if(u.IS_IE8){a=p["default"].createElement("custom");for(var l in e.prototype)"constructor"!==l&&(a[l]=e.prototype[l])}var c={id:n.id||"vjs_track_"+d.newGUID(),kind:n.kind||"",label:n.label||"",language:n.language||""},f=function(t){Object.defineProperty(a,t,{get:function(){return c[t]},set:function(){}})};for(var h in c)f(h);return o=a,s(r,o)}return a(e,t),e}(v["default"]);o["default"]=y},{42:42,78:78,84:84,92:92}],76:[function(t,e,o){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e["default"]=t,e}function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}o.__esModule=!0;var l=t(74),u=r(l),c=t(78),p=n(c),f=t(92),d=r(f),h=function(t,e){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:[];i(this,e);for(var a=void 0,l=r.length-1;l>=0;l--)if(r[l].selected){h(r,r[l]);break}if(p.IS_IE8){a=d["default"].createElement("custom");for(var c in u["default"].prototype)"constructor"!==c&&(a[c]=u["default"].prototype[c]);for(var f in e.prototype)"constructor"!==f&&(a[f]=e.prototype[f])}return a=o=s(this,t.call(this,r,a)),a.changing_=!1,Object.defineProperty(a,"selectedIndex",{get:function(){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:{};i(this,e);var a=(0,f["default"])(r,{kind:l.VideoTrackKind[r.kind]||""}),u=o=s(this,t.call(this,a)),c=!1;if(h.IS_IE8)for(var p in e.prototype)"constructor"!==p&&(u[p]=e.prototype[p]);return Object.defineProperty(u,"selected",{get:function(){return c},set:function(t){"boolean"==typeof t&&t!==c&&(c=t,this.trigger("selectedchange"))}}),a.selected&&(u.selected=a.selected),n=u,s(o,n)}return a(e,t),e}(c["default"]);o["default"]=v},{73:73,75:75,78:78,86:86}],78:[function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}o.__esModule=!0,o.BACKGROUND_SIZE_SUPPORTED=o.TOUCH_ENABLED=o.IE_VERSION=o.IS_IE8=o.IS_CHROME=o.IS_EDGE=o.IS_FIREFOX=o.IS_NATIVE_ANDROID=o.IS_OLD_ANDROID=o.ANDROID_VERSION=o.IS_ANDROID=o.IOS_VERSION=o.IS_IOS=o.IS_IPOD=o.IS_IPHONE=o.IS_IPAD=void 0;var r=t(92),i=n(r),s=t(93),a=n(s),l=a["default"].navigator&&a["default"].navigator.userAgent||"",u=/AppleWebKit\/([\d.]+)/i.exec(l),c=u?parseFloat(u.pop()):null,p=o.IS_IPAD=/iPad/i.test(l),f=o.IS_IPHONE=/iPhone/i.test(l)&&!p,d=o.IS_IPOD=/iPod/i.test(l),h=(o.IS_IOS=f||p||d,o.IOS_VERSION=function(){var t=l.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),o.IS_ANDROID=/Android/i.test(l)),v=o.ANDROID_VERSION=function(){var t=l.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),o=t[2]&&parseFloat(t[2]);return e&&o?parseFloat(t[1]+"."+t[2]):e?e:null}(),y=(o.IS_OLD_ANDROID=h&&/webkit/i.test(l)&&v<2.3,o.IS_NATIVE_ANDROID=h&&v<5&&c<537,o.IS_FIREFOX=/Firefox/i.test(l),o.IS_EDGE=/Edge/i.test(l));o.IS_CHROME=!y&&/Chrome/i.test(l),o.IS_IE8=/MSIE\s8\.0/.test(l),o.IE_VERSION=function(t){return t&&parseFloat(t[1])}(/MSIE\s(\d+)\.\d/.exec(l)),o.TOUCH_ENABLED=!!("ontouchstart"in a["default"]||a["default"].DocumentTouch&&i["default"]instanceof a["default"].DocumentTouch),o.BACKGROUND_SIZE_SUPPORTED="backgroundSize"in i["default"].createElement("video").style},{92:92,93:93}],79:[function(t,e,o){"use strict";function n(t,e){var o=0,n=void 0,i=void 0;if(!e)return 0;t&&t.length||(t=(0,r.createTimeRange)(0,0));for(var s=0;se&&(i=e),o+=i-n;return o/e}o.__esModule=!0,o.bufferedPercent=n;var r=t(88)},{88:88}],80:[function(t,e,o){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e["default"]=t,e}function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){return t.raw=e,t}function s(t){return"string"==typeof t&&/\S/.test(t)}function a(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function l(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}function u(t){return!!t&&"object"===("undefined"==typeof t?"undefined":M(t))&&1===t.nodeType}function c(t){return function(e,o){if(!s(e))return D["default"][t](null);s(o)&&(o=D["default"].querySelector(o));var n=u(o)?o:D["default"];return n[t]&&n[t](e)}}function p(t){return 0===t.indexOf("#")&&(t=t.slice(1)),D["default"].getElementById(t)}function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=D["default"].createElement(t);return Object.getOwnPropertyNames(e).forEach(function(t){var o=e[t];t.indexOf("aria-")!==-1||"role"===t||"type"===t?(V["default"].warn((0,H["default"])(I,t,o)),n.setAttribute(t,o)):n[t]=o}),Object.getOwnPropertyNames(o).forEach(function(t){n.setAttribute(t,o[t])}),n}function d(t,e){"undefined"==typeof t.textContent?t.innerText=e:t.textContent=e}function h(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function v(t){var e=t[G];return e||(e=t[G]=Q.newGUID()),Y[e]||(Y[e]={}),Y[e]}function y(t){var e=t[G];return!!e&&!!Object.getOwnPropertyNames(Y[e]).length}function g(t){var e=t[G];if(e){delete Y[e];try{delete t[G]}catch(o){t.removeAttribute?t.removeAttribute(G):t[G]=null}}}function b(t,e){return a(e),t.classList?t.classList.contains(e):l(e).test(t.className)}function A(t,e){return t.classList?t.classList.add(e):b(t,e)||(t.className=(t.className+" "+e).trim()),t}function m(t,e){return t.classList?t.classList.remove(e):(a(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function j(t,e,o){var n=b(t,e);if("function"==typeof o&&(o=o(t,e)),"boolean"!=typeof o&&(o=!n),o!==n)return o?A(t,e):m(t,e),t}function w(t,e){Object.getOwnPropertyNames(e).forEach(function(o){var n=e[o];null===n||"undefined"==typeof n||n===!1?t.removeAttribute(o):t.setAttribute(o,n===!0?"":n)})}function _(t){var e={},o=",autoplay,controls,loop,muted,default,";if(t&&t.attributes&&t.attributes.length>0)for(var n=t.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,s=n[r].value;"boolean"!=typeof t[i]&&o.indexOf(","+i+",")===-1||(s=null!==s),e[i]=s}return e}function k(){D["default"].body.focus(),D["default"].onselectstart=function(){return!1}}function x(){D["default"].onselectstart=function(){return!0}}function T(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var o=D["default"].documentElement,n=D["default"].body,r=o.clientLeft||n.clientLeft||0,i=F["default"].pageXOffset||n.scrollLeft,s=e.left+i-r,a=o.clientTop||n.clientTop||0,l=F["default"].pageYOffset||n.scrollTop,u=e.top+l-a;return{left:Math.round(s),top:Math.round(u)}}function E(t,e){var o={},n=T(t),r=t.offsetWidth,i=t.offsetHeight,s=n.top,a=n.left,l=e.pageY,u=e.pageX;return e.changedTouches&&(u=e.changedTouches[0].pageX,l=e.changedTouches[0].pageY),o.y=Math.max(0,Math.min(1,(s-l+i)/i)),o.x=Math.max(0,Math.min(1,(u-a)/r)),o}function C(t){return!!t&&"object"===("undefined"==typeof t?"undefined":M(t))&&3===t.nodeType}function S(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function O(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),u(t)||C(t)?t:"string"==typeof t&&/\S/.test(t)?D["default"].createTextNode(t):void 0}).filter(function(t){return t})}function B(t,e){return O(e).forEach(function(e){return t.appendChild(e)}),t}function P(t,e){return B(S(t),e)}o.__esModule=!0,o.$$=o.$=void 0;var M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I=i(["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n has been deprecated. Use the third argument instead.\n createEl(type, properties, attributes). Attempting to set "," to ","."]);o.isEl=u,o.getEl=p,o.createEl=f,o.textContent=d,o.insertElFirst=h,o.getElData=v,o.hasElData=y,o.removeElData=g,o.hasElClass=b,o.addElClass=A,o.removeElClass=m,o.toggleElClass=j,o.setElAttributes=w,o.getElAttributes=_,o.blockTextSelection=k,o.unblockTextSelection=x,o.findElPosition=T,o.getPointerPosition=E,o.isTextNode=C,o.emptyEl=S,o.normalizeContent=O,o.appendContent=B,o.insertContent=P;var R=t(92),D=r(R),N=t(93),F=r(N),L=t(84),Q=n(L),z=t(85),V=r(z),U=t(146),H=r(U),Y={},G="vdata"+(new Date).getTime();o.$=c("querySelector"),o.$$=c("querySelectorAll")},{146:146,84:84,85:85,92:92,93:93}],81:[function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e["default"]=t,e}function i(t,e){var o=d.getElData(t);0===o.handlers[e].length&&(delete o.handlers[e],t.removeEventListener?t.removeEventListener(e,o.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,o.dispatcher)),Object.getOwnPropertyNames(o.handlers).length<=0&&(delete o.handlers,delete o.dispatcher,delete o.disabled),0===Object.getOwnPropertyNames(o).length&&d.removeElData(t)}function s(t,e,o,n){o.forEach(function(o){t(e,o,n)})}function a(t){function e(){return!0}function o(){return!1}return t&&t.isPropagationStopped||!function(){var n=t||A["default"].event;t={};for(var r in n)"layerX"!==r&&"layerY"!==r&&"keyLocation"!==r&&"webkitMovementX"!==r&&"webkitMovementY"!==r&&("returnValue"===r&&n.preventDefault||(t[r]=n[r]));if(t.target||(t.target=t.srcElement||j["default"]),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){n.preventDefault&&n.preventDefault(),t.returnValue=!1,n.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),t.cancelBubble=!0,n.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=o,t.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=o,null!==t.clientX&&void 0!==t.clientX){var i=j["default"].documentElement,s=j["default"].body;t.pageX=t.clientX+(i&&i.scrollLeft||s&&s.scrollLeft||0)-(i&&i.clientLeft||s&&s.clientLeft||0),t.pageY=t.clientY+(i&&i.scrollTop||s&&s.scrollTop||0)-(i&&i.clientTop||s&&s.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}(),t}function l(t,e,o){if(Array.isArray(e))return s(l,t,e,o);var n=d.getElData(t);n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),o.guid||(o.guid=v.newGUID()),n.handlers[e].push(o),n.dispatcher||(n.disabled=!1,n.dispatcher=function(e,o){if(!n.disabled){e=a(e);var r=n.handlers[e.type];if(r)for(var i=r.slice(0),s=0,l=i.length;s1&&void 0!==arguments[1]?arguments[1]:t;t=t<0?0:t;var o=Math.floor(t%60),n=Math.floor(t/60%60),r=Math.floor(t/3600),i=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(r=n=o="-"),r=r>0||s>0?r+":":"",n=((r||i>=10)&&n<10?"0"+n:n)+":",o=o<10?"0"+o:o,r+n+o}o.__esModule=!0,o["default"]=n},{}],84:[function(t,e,o){"use strict";function n(){return r++}o.__esModule=!0,o.newGUID=n;var r=1},{}],85:[function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}o.__esModule=!0,o.logByType=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=t(93),s=n(i),a=t(78),l=void 0,u=o.logByType=function(t,e){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:!!a.IE_VERSION&&a.IE_VERSION<11;"log"!==t&&e.unshift(t.toUpperCase()+":"),l.history.push(e),e.unshift("VIDEOJS:");var n=s["default"].console&&s["default"].console[t];n&&(o&&(e=e.map(function(t){if(t&&"object"===("undefined"==typeof t?"undefined":r(t))||Array.isArray(t))try{return JSON.stringify(t)}catch(e){return String(t)}return String(t)}).join(" ")),n.apply?n[Array.isArray(e)?"apply":"call"](s["default"].console,e):n(e))};l=function(){for(var t=arguments.length,e=Array(t),o=0;oo)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is greater than or equal to the maximum bound ("+o+").")}function i(t,e,o,n){return void 0===n&&(u["default"].warn("DEPRECATED: Function '"+t+"' on 'TimeRanges' called without an index argument."),n=0),r(t,n,o.length-1),o[n][e]}function s(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:i.bind(null,"start",0,t),end:i.bind(null,"end",1,t)}}function a(t,e){return Array.isArray(t)?s(t):void 0===t||void 0===e?s():s([[t,e]])}o.__esModule=!0,o.createTimeRange=void 0,o.createTimeRanges=a;var l=t(85),u=n(l);o.createTimeRange=a},{85:85}],89:[function(t,e,o){"use strict";function n(t){return t.charAt(0).toUpperCase()+t.slice(1)}o.__esModule=!0,o["default"]=n},{}],90:[function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}o.__esModule=!0,o.isCrossOrigin=o.getFileExtension=o.getAbsoluteURL=o.parseUrl=void 0;var r=t(92),i=n(r),s=t(93),a=n(s),l=o.parseUrl=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],o=i["default"].createElement("a");o.href=t;var n=""===o.host&&"file:"!==o.protocol,r=void 0;n&&(r=i["default"].createElement("div"),r.innerHTML='',o=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),i["default"].body.appendChild(r));for(var s={},a=0;ax',t=e.firstChild.href}return t},o.getFileExtension=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,o=e.exec(t);if(o)return o.pop().toLowerCase()}return""},o.isCrossOrigin=function(t){var e=a["default"].location,o=l(t),n=":"===o.protocol?e.protocol:o.protocol,r=n+o.host!==e.protocol+e.host;return r}},{92:92,93:93}],91:[function(e,o,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function s(t,e,o){var n=void 0;if("string"==typeof t){if(0===t.indexOf("#")&&(t=t.slice(1)),s.getPlayers()[t])return e&&Q["default"].warn('Player "'+t+'" is already initialised. Options will not be applied.'),o&&s.getPlayers()[t].ready(o),s.getPlayers()[t];n=V.getEl(t)}else n=t;if(!n||!n.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");return n.player||_["default"].players[n.playerId]||new _["default"](n,e,o)}n.__esModule=!0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=e(93),u=i(l),c=e(92),p=i(c),f=e(56),d=r(f),h=e(87),v=r(h),y=e(5),g=i(y),b=e(42),A=i(b),m=e(81),j=r(m),w=e(51),_=i(w),k=e(52),x=i(k),T=e(86),E=i(T),C=e(82),S=r(C),O=e(72),B=i(O),P=e(64),M=i(P),I=e(77),R=i(I),D=e(88),N=e(83),F=i(N),L=e(85),Q=i(L),z=e(80),V=r(z),U=e(78),H=r(U),Y=e(90),G=r(Y),W=e(43),X=i(W),J=e(131),K=i(J),q=e(147),Z=i(q),$=e(62),tt=i($); if("undefined"==typeof HTMLVideoElement&&u["default"].document&&u["default"].document.createElement&&(p["default"].createElement("video"),p["default"].createElement("audio"),p["default"].createElement("track")),u["default"].VIDEOJS_NO_DYNAMIC_STYLE!==!0){var et=V.$(".vjs-styles-defaults");if(!et){et=v.createStyleElement("vjs-styles-defaults");var ot=V.$("head");ot&&ot.insertBefore(et,ot.firstChild),v.setTextContent(et,"\n .video-js {\n width: 300px;\n height: 150px;\n }\n\n .vjs-fluid {\n padding-top: 56.25%\n }\n ")}}d.autoSetupTimeout(1,s),s.VERSION="5.12.6",s.options=_["default"].prototype.options_,s.getPlayers=function(){return _["default"].players},s.players=_["default"].players,s.getComponent=g["default"].getComponent,s.registerComponent=function(t,e){tt["default"].isTech(e)&&Q["default"].warn("The "+t+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),g["default"].registerComponent.call(g["default"],t,e)},s.getTech=tt["default"].getTech,s.registerTech=tt["default"].registerTech,s.browser=H,s.TOUCH_ENABLED=H.TOUCH_ENABLED,s.extend=X["default"],s.mergeOptions=E["default"],s.bind=S.bind,s.plugin=x["default"],s.addLanguage=function(t,e){var o;return t=(""+t).toLowerCase(),(0,K["default"])(s.options.languages,(o={},o[t]=e,o))[t]},s.log=Q["default"],s.createTimeRange=s.createTimeRanges=D.createTimeRanges,s.formatTime=F["default"],s.parseUrl=G.parseUrl,s.isCrossOrigin=G.isCrossOrigin,s.EventTarget=A["default"],s.on=j.on,s.one=j.one,s.off=j.off,s.trigger=j.trigger,s.xhr=Z["default"],s.TextTrack=B["default"],s.AudioTrack=M["default"],s.VideoTrack=R["default"],s.isEl=V.isEl,s.isTextNode=V.isTextNode,s.createEl=V.createEl,s.hasClass=V.hasElClass,s.addClass=V.addElClass,s.removeClass=V.removeElClass,s.toggleClass=V.toggleElClass,s.setAttributes=V.setElAttributes,s.getAttributes=V.getElAttributes,s.emptyEl=V.emptyEl,s.appendContent=V.appendContent,s.insertContent=V.insertContent,"function"==typeof t&&t.amd?t("videojs",[],function(){return s}):"object"===("undefined"==typeof n?"undefined":a(n))&&"object"===("undefined"==typeof o?"undefined":a(o))&&(o.exports=s),n["default"]=s},{131:131,147:147,42:42,43:43,5:5,51:51,52:52,56:56,62:62,64:64,72:72,77:77,78:78,80:80,81:81,82:82,83:83,85:85,86:86,87:87,88:88,90:90,92:92,93:93}],92:[function(t,e,o){(function(o){var n="undefined"!=typeof o?o:"undefined"!=typeof window?window:{},r=t(94);if("undefined"!=typeof document)e.exports=document;else{var i=n["__GLOBAL_DOCUMENT_CACHE@4"];i||(i=n["__GLOBAL_DOCUMENT_CACHE@4"]=r),e.exports=i}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{94:94}],93:[function(t,e,o){(function(t){"undefined"!=typeof window?e.exports=window:"undefined"!=typeof t?e.exports=t:"undefined"!=typeof self?e.exports=self:e.exports={}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],94:[function(t,e,o){},{}],95:[function(t,e,o){var n=t(111),r=n(Date,"now"),i=r||function(){return(new Date).getTime()};e.exports=i},{111:111}],96:[function(t,e,o){function n(t,e,o){function n(){g&&clearTimeout(g),d&&clearTimeout(d),A=0,d=g=b=void 0}function l(e,o){o&&clearTimeout(o),d=g=b=void 0,e&&(A=i(),h=t.apply(y,f),g||d||(f=y=void 0))}function u(){var t=e-(i()-v);t<=0||t>e?l(b,d):g=setTimeout(u,t)}function c(){l(j,g)}function p(){if(f=arguments,v=i(),y=this,b=j&&(g||!w),m===!1)var o=w&&!g;else{d||w||(A=v);var n=m-(v-A),r=n<=0||n>m;r?(d&&(d=clearTimeout(d)),A=v,h=t.apply(y,f)):d||(d=setTimeout(c,n))}return r&&g?g=clearTimeout(g):g||e===m||(g=setTimeout(u,e)),o&&(r=!0,h=t.apply(y,f)),!r||g||d||(f=y=void 0),h}var f,d,h,v,y,g,b,A=0,m=!1,j=!0;if("function"!=typeof t)throw new TypeError(s);if(e=e<0?0:+e||0,o===!0){var w=!0;j=!1}else r(o)&&(w=!!o.leading,m="maxWait"in o&&a(+o.maxWait||0,e),j="trailing"in o?!!o.trailing:j);return p.cancel=n,p}var r=t(124),i=t(95),s="Expected a function",a=Math.max;e.exports=n},{124:124,95:95}],97:[function(t,e,o){function n(t,e){if("function"!=typeof t)throw new TypeError(r);return e=i(void 0===e?t.length-1:+e||0,0),function(){for(var o=arguments,n=-1,r=i(o.length-e,0),s=Array(r);++n2?o[s-2]:void 0,l=s>2?o[2]:void 0,u=s>1?o[s-1]:void 0;for("function"==typeof a?(a=r(a,u,5),s-=2):(a="function"==typeof u?u:void 0,s-=a?1:0),l&&i(o[0],o[1],l)&&(a=s<3?void 0:a,s=1);++n-1&&t%1==0&&t-1&&t%1==0&&t<=r}var r=9007199254740991;e.exports=n},{}],117:[function(t,e,o){function n(t){return!!t&&"object"==typeof t}e.exports=n},{}],118:[function(t,e,o){function n(t){for(var e=u(t),o=e.length,n=o&&t.length,c=!!n&&a(n)&&(i(t)||r(t)||l(t)),f=-1,d=[];++f0,g=f.enumErrorProps&&(t===_||t instanceof Error),b=f.enumPrototypes&&a(t);++n2?arguments[2]:{},s=n(e);i&&(s=s.concat(Object.getOwnPropertySymbols(e))),r(s,function(n){c(t,n,e[n],o[n])})};p.supportsDescriptors=!!u,e.exports=p},{138:138,141:141}],138:[function(t,e,o){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(t,e,o){if("[object Function]"!==r.call(e))throw new TypeError("iterator must be a function");var i=t.length;if(i===+i)for(var s=0;s0&&!n.call(t,0))for(var d=0;d0)for(var v=0;v=0&&"[object Function]"===n.call(t.callee)),o}},{}],143:[function(t,e,o){"use strict";var n=t(135),r=function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),o={},n=0;n0&&(h=setTimeout(function(){d=!0,u.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",n(t)},t.timeout)),u.setRequestHeader)for(p in b)b.hasOwnProperty(p)&&u.setRequestHeader(p,b[p]);else if(t.headers&&!r(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(u.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(u),u.send(g),u}function l(){}var u=t(93),c=t(149),p=t(148),f=t(152),d=t(153);e.exports=s,s.XMLHttpRequest=u.XMLHttpRequest||l,s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:u.XDomainRequest,n(["get","put","post","patch","head","delete"],function(t){s["delete"===t?"del":t]=function(e,o,n){return o=i(e,o,n),o.method=t.toUpperCase(),a(o)}})},{148:148,149:149,152:152,153:153,93:93}],148:[function(t,e,o){function n(t){var e=r.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}e.exports=n;var r=Object.prototype.toString},{}],149:[function(t,e,o){function n(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}e.exports=n,n.proto=n(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return n(this)},configurable:!0})})},{}],150:[function(t,e,o){function n(t,e,o){if(!a(e))throw new TypeError("iterator must be a function");arguments.length<3&&(o=this),"[object Array]"===l.call(t)?r(t,e,o):"string"==typeof t?i(t,e,o):s(t,e,o)}function r(t,e,o){for(var n=0,r=t.length;n100)throw new Error("Position must be between 0 and 100.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",r({},u,{get:function(){return j},set:function(t){var e=n(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");j=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",r({},u,{get:function(){return w},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");w=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",r({},u,{get:function(){return _},set:function(t){var e=n(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");_=e,this.hasBeenReset=!0}})),a.displayState=void 0,l)return a}var s="auto",a={"":!0,lr:!0,rl:!0},l={start:!0,middle:!0,end:!0,left:!0,right:!0};i.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},t.VTTCue=t.VTTCue||i,e.VTTCue=i}(this,this.vttjs||{}),function(t,e){function o(t){if("string"!=typeof t)return!1;var e=i[t.toLowerCase()];return!!e&&t.toLowerCase()}function n(t){return"number"==typeof t&&t>=0&&t<=100}function r(){var t=100,e=3,r=0,i=100,s=0,a=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!n(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return i},set:function(t){if(!n(t))throw new Error("RegionAnchorX must be between 0 and 100.");i=t}},regionAnchorX:{enumerable:!0,get:function(){return r},set:function(t){if(!n(t))throw new Error("RegionAnchorY must be between 0 and 100.");r=t}},viewportAnchorY:{enumerable:!0,get:function(){return a},set:function(t){if(!n(t))throw new Error("ViewportAnchorY must be between 0 and 100.");a=t}},viewportAnchorX:{enumerable:!0,get:function(){return s},set:function(t){if(!n(t))throw new Error("ViewportAnchorX must be between 0 and 100.");s=t}},scroll:{enumerable:!0,get:function(){return l},set:function(t){var e=o(t);if(e===!1)throw new SyntaxError("An invalid or illegal string was specified.");l=e}}})}var i={"":!0,up:!0};t.VTTRegion=t.VTTRegion||r,e.VTTRegion=r}(this,this.vttjs||{}),function(t){function e(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function o(t){function e(t,e,o,n){return 3600*(0|t)+60*(0|e)+(0|o)+(0|n)/1e3}var o=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return o?o[3]?e(o[1],o[2],o[3].replace(":",""),o[4]):o[1]>59?e(o[1],o[2],0,o[4]):e(0,o[1],o[2],o[4]):null}function n(){this.values=h(null)}function r(t,e,o,n){var r=n?t.split(n):[t];for(var i in r)if("string"==typeof r[i]){var s=r[i].split(o);if(2===s.length){var a=s[0],l=s[1];e(a,l)}}}function i(t,i,s){function a(){var n=o(t);if(null===n)throw new e(e.Errors.BadTimeStamp,"Malformed timestamp: "+c);return t=t.replace(/^[^\sa-zA-Z-]+/,""),n}function l(t,e){var o=new n;r(t,function(t,e){switch(t){case"region":for(var n=s.length-1;n>=0;n--)if(s[n].id===e){o.set(t,s[n].region);break}break;case"vertical":o.alt(t,e,["rl","lr"]);break;case"line":var r=e.split(","),i=r[0];o.integer(t,i),o.percent(t,i)?o.set("snapToLines",!1):null,o.alt(t,i,["auto"]),2===r.length&&o.alt("lineAlign",r[1],["start","middle","end"]);break;case"position":r=e.split(","),o.percent(t,r[0]),2===r.length&&o.alt("positionAlign",r[1],["start","middle","end"]);break;case"size":o.percent(t,e);break;case"align":o.alt(t,e,["start","middle","end","left","right"])}},/:/,/\s/),e.region=o.get("region",null),e.vertical=o.get("vertical",""),e.line=o.get("line","auto"),e.lineAlign=o.get("lineAlign","start"),e.snapToLines=o.get("snapToLines",!0),e.size=o.get("size",100),e.align=o.get("align","middle"),e.position=o.get("position",{start:0,left:0,middle:50,end:100,right:100},e.align),e.positionAlign=o.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},e.align)}function u(){t=t.replace(/^\s+/,"")}var c=t;if(u(),i.startTime=a(),u(),"-->"!==t.substr(0,3))throw new e(e.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+c);t=t.substr(3),u(),i.endTime=a(),u(),l(t,i)}function s(t,e){function n(){function t(t){return e=e.substr(t.length),t}if(!e)return null;var o=e.match(/^([^<]*)(<[^>]+>?)?/);return t(o[1]?o[1]:o[2])}function r(t){return v[t]}function i(t){for(;h=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(h[0],r);return t}function s(t,e){return!b[e.localName]||b[e.localName]===t.localName}function a(e,o){var n=y[e];if(!n)return null; -var r=t.document.createElement(n);r.localName=n;var i=g[e];return i&&o&&(r[i]=o.trim()),r}for(var l,u=t.document.createElement("div"),c=u,p=[];null!==(l=n());)if("<"!==l[0])c.appendChild(t.document.createTextNode(i(l)));else{if("/"===l[1]){p.length&&p[p.length-1]===l.substr(2).replace(">","")&&(p.pop(),c=c.parentNode);continue}var f,d=o(l.substr(1,l.length-2));if(d){f=t.document.createProcessingInstruction("timestamp",d),c.appendChild(f);continue}var h=l.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!h)continue;if(f=a(h[1],h[3]),!f)continue;if(!s(c,f))continue;h[2]&&(f.className=h[2].substr(1).replace("."," ")),p.push(h[1]),c.appendChild(f),c=f}return u}function a(t){function e(t,e){for(var o=e.childNodes.length-1;o>=0;o--)t.push(e.childNodes[o])}function o(t){if(!t||!t.length)return null;var n=t.pop(),r=n.textContent||n.innerText;if(r){var i=r.match(/^.*(\n|\r)/);return i?(t.length=0,i[0]):r}return"ruby"===n.tagName?o(t):n.childNodes?(e(t,n),o(t)):void 0}var n,r=[],i="";if(!t||!t.childNodes)return"ltr";for(e(r,t);i=o(r);)for(var s=0;s=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,o=e.textTrackList,n=0,r=0;rl&&(r=new p(t),s=l),t=new p(i)}return r||i}var i=new p(e),s=e.cue,a=l(s),u=[];if(s.snapToLines){var c;switch(s.vertical){case"":u=["+y","-y"],c="height";break;case"rl":u=["+x","-x"],c="width";break;case"lr":u=["-x","+x"],c="width"}var f=i.lineHeight,d=f*Math.round(a),h=o[c]+f,v=u[0];Math.abs(d)>h&&(d=d<0?-1:1,d*=Math.ceil(h/f)*f),a<0&&(d+=""===s.vertical?o.height:o.width,u=u.reverse()),i.move(v,d)}else{var y=i.lineHeight/o.height*100;switch(s.lineAlign){case"middle":a-=y/2;break;case"end":a-=y}switch(s.vertical){case"":e.applyStyles({top:e.formatStyle(a,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(a,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(a,"%")})}u=["+y","-x","+x","-y"],i=new p(e)}var g=r(i,u);e.move(g.toCSSCompatValues(o))}function d(){}var h=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();e.prototype=h(Error.prototype),e.prototype.constructor=e,e.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},n.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,o){return o?this.has(t)?this.values[t]:e[o]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,o){for(var n=0;n=0&&e<=100))&&(this.set(t,e),!0)}};var v={"&":"&","<":"<",">":">","‎":"‎","‏":"‏"," ":" "},y={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},g={v:"title",lang:"lang"},b={rt:"ruby"},A=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];u.prototype.applyStyles=function(t,e){e=e||this.div;for(var o in t)t.hasOwnProperty(o)&&(e.style[o]=t[o])},u.prototype.formatStyle=function(t,e){return 0===t?0:t+e},c.prototype=h(u.prototype),c.prototype.constructor=c,p.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},p.prototype.overlaps=function(t){return this.leftt.left&&this.topt.top},p.prototype.overlapsAny=function(t){for(var e=0;e=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},p.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.leftt.right;case"+y":return this.topt.bottom}},p.prototype.intersectPercentage=function(t){var e=Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left)),o=Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top)),n=e*o;return n/(this.height*this.width)},p.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},p.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,o=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,n=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t;var r={left:t.left,right:t.right,top:t.top||n,height:t.height||e,bottom:t.bottom||n+(t.height||e),width:t.width||o};return r},d.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},d.convertCueToDOMTree=function(t,e){return t&&e?s(t,e):null};var m=.05,j="sans-serif",w="1.5%";d.processCues=function(t,e,o){function n(t){for(var e=0;e")===-1){l.cue.id=u;continue}case"CUE":try{i(u,l.cue,l.regionList)}catch(f){l.reportOrThrowError(f),l.cue=null,l.state="BADCUE";continue}l.state="CUETEXT";continue;case"CUETEXT":var d=u.indexOf("-->")!==-1;if(!u||d&&(p=!0)){l.oncue&&l.oncue(l.cue),l.cue=null,l.state="ID";continue}l.cue.text&&(l.cue.text+="\n"),l.cue.text+=u;continue;case"BADCUE":u||(l.state="ID");continue}}}catch(f){l.reportOrThrowError(f),"CUETEXT"===l.state&&l.cue&&l.oncue&&l.oncue(l.cue),l.cue=null,l.state="INITIAL"===l.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new e(e.Errors.BadSignature)}catch(o){t.reportOrThrowError(o)}return t.onflush&&t.onflush(),this}},t.WebVTT=d}(this,this.vttjs||{}),function(t,e){"function"==typeof define&&define.amd?define([],e.bind(this,t,t.videojs)):"undefined"!=typeof module&&module.exports?module.exports=e(t,t.videojs):e(t,t.videojs)}(window,function(t,e){"use strict";t.videojs_hotkeys={version:"0.2.17"};var o=function(o){function n(t){return 32===t.which||179===t.which}function r(t){return 37===t.which||177===t.which}function i(t){return 39===t.which||176===t.which}function s(t){return 38===t.which}function a(t){return 40===t.which}function l(t){return 77===t.which}function u(t){return 70===t.which}var c=this,p=c.el(),f=document,d={volumeStep:.1,seekStep:5,enableMute:!0,enableVolumeScroll:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,enableModifiersForNumbers:!0,playPauseKey:n,rewindKey:r,forwardKey:i,volumeUpKey:s,volumeDownKey:a,muteKey:l,fullscreenKey:u,customKeys:{}},h=1,v=2,y=3,g=4,b=5,A=6,m=7,j=e.mergeOptions||e.util.mergeOptions;o=j(d,o||{});var w=o.volumeStep,_=o.seekStep,k=o.enableMute,x=o.enableVolumeScroll,T=o.enableFullscreen,E=o.enableNumbers,C=o.enableJogStyle,S=o.alwaysCaptureHotkeys,O=o.enableModifiersForNumbers;p.hasAttribute("tabIndex")||p.setAttribute("tabIndex","-1"),p.style.outline="none",!S&&c.options_.autoplay||c.one("play",function(){p.focus()}),c.on("play",function(){var t=p.querySelector(".iframeblocker");t&&""===t.style.display&&(t.style.display="block",t.style.bottom="39px")});var B=function(t){var e,n=t.which,r=t.preventDefault;if(c.controls()){var i=f.activeElement;if(S||i==p||i==p.querySelector(".vjs-tech")||i==p.querySelector(".vjs-control-bar")||i==p.querySelector(".iframeblocker"))switch(I(t,c)){case h:r(),S&&t.stopPropagation(),c.paused()?c.play():c.pause();break;case v:r(),e=c.currentTime()-_,c.currentTime()<=_&&(e=0),c.currentTime(e);break;case y:r(),c.currentTime(c.currentTime()+_);break;case b:r(),C?(e=c.currentTime()-1,c.currentTime()<=1&&(e=0),c.currentTime(e)):c.volume(c.volume()-w);break;case g:r(),C?c.currentTime(c.currentTime()+1):c.volume(c.volume()+w);break;case A:k&&c.muted(!c.muted());break;case m:T&&(c.isFullscreen()?c.exitFullscreen():c.requestFullscreen());break;default:if((n>47&&n<59||n>95&&n<106)&&(O||!(t.metaKey||t.ctrlKey||t.altKey))&&E){var s=48;n>95&&(s=96);var a=n-s;r(),c.currentTime(c.duration()*a*.1)}for(var l in o.customKeys){var u=o.customKeys[l];u&&u.key&&u.handler&&u.key(t)&&(r(),u.handler(c,o,t))}}}},P=function(t){if(c.controls()){var e=t.relatedTarget||t.toElement||f.activeElement;e!=p&&e!=p.querySelector(".vjs-tech")&&e!=p.querySelector(".iframeblocker")||T&&(c.isFullscreen()?c.exitFullscreen():c.requestFullscreen())}},M=function(e){if(c.controls()){var o=e.relatedTarget||e.toElement||f.activeElement;if((S||o==p||o==p.querySelector(".vjs-tech")||o==p.querySelector(".iframeblocker")||o==p.querySelector(".vjs-control-bar"))&&x){e=t.event||e;var n=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));e.preventDefault(),1==n?c.volume(c.volume()+w):n==-1&&c.volume(c.volume()-w)}}},I=function(t,e){return o.playPauseKey(t,e)?h:o.rewindKey(t,e)?v:o.forwardKey(t,e)?y:o.volumeUpKey(t,e)?g:o.volumeDownKey(t,e)?b:o.muteKey(t,e)?A:o.fullscreenKey(t,e)?m:void 0};return c.on("keydown",B),c.on("dblclick",P),c.on("mousewheel",M),c.on("DOMMouseScroll",M),this};e.plugin("hotkeys",o)}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("video.js")):"function"==typeof define&&define.amd?define(["videojs"],function(o){return t.Youtube=e(o)}):t.Youtube=e(t.videojs)}(this,function(t){"use strict";function e(){YT.ready(function(){s.isApiReady=!0;for(var t=0;t1&&(this.featuresPlaybackRate=!0),this.playerReady_=!0,this.triggerReady(),this.playOnReady?this.play():this.cueOnReady&&(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)},onPlayerPlaybackQualityChange:function(){},onPlayerPlaybackRateChange:function(){this.trigger("ratechange")},onPlayerStateChange:function(t){var e=t.data;if(e!==this.lastState&&!this.errorNumber)switch(this.lastState=e,e){case-1:this.trigger("loadstart"),this.trigger("loadedmetadata"),this.trigger("durationchange"),this.trigger("ratechange");break;case YT.PlayerState.ENDED:this.trigger("ended");break;case YT.PlayerState.PLAYING:this.trigger("timeupdate"),this.trigger("durationchange"),this.trigger("playing"),this.trigger("play"),this.isSeeking&&this.onSeeked();break;case YT.PlayerState.PAUSED:this.trigger("canplay"),this.isSeeking?this.onSeeked():this.trigger("pause");break;case YT.PlayerState.BUFFERING:this.player_.trigger("timeupdate"),this.player_.trigger("waiting")}},onPlayerVolumeChange:function(){this.trigger("volumechange")},onPlayerError:function(t){this.errorNumber=t.data,this.trigger("pause"),this.trigger("error")},error:function(){var t=1e3+this.errorNumber;switch(this.errorNumber){case 5:return{code:t,message:"Error while trying to play the video"};case 2:case 100:return{code:t,message:"Unable to find the video"};case 101:case 150:return{code:t,message:"Playback on other Websites has been disabled by the video owner."}}return{code:t,message:"YouTube unknown error ("+this.errorNumber+")"}},loadVideoById_:function(t){var e={videoId:t};this.options_.start&&(e.startSeconds=this.options_.start),this.options_.end&&(e.endEnd=this.options_.end),this.ytPlayer.loadVideoById(e)},cueVideoById_:function(t){var e={videoId:t};this.options_.start&&(e.startSeconds=this.options_.start),this.options_.end&&(e.endEnd=this.options_.end),this.ytPlayer.cueVideoById(e)},src:function(t){return t&&this.setSrc({ -src:t}),this.source},poster:function(){return r?null:this.poster_},setPoster:function(t){this.poster_=t},setSrc:function(t){t&&t.src&&(delete this.errorNumber,this.source=t,this.url=s.parseUrl(t.src),this.options_.poster||this.url.videoId&&(this.poster_="https://img.youtube.com/vi/"+this.url.videoId+"/0.jpg",this.trigger("posterchange"),this.checkHighResPoster()),this.options_.autoplay&&!r?this.isReady_?this.play():this.playOnReady=!0:this.activeVideoId!==this.url.videoId&&(this.isReady_?(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId):this.cueOnReady=!0))},autoplay:function(){return this.options_.autoplay},setAutoplay:function(t){this.options_.autoplay=t},loop:function(){return this.options_.loop},setLoop:function(t){this.options_.loop=t},play:function(){this.url&&this.url.videoId&&(this.wasPausedBeforeSeek=!1,this.isReady_?(this.url.listId&&(this.activeList===this.url.listId?this.ytPlayer.playVideo():(this.ytPlayer.loadPlaylist(this.url.listId),this.activeList=this.url.listId)),this.activeVideoId===this.url.videoId?this.ytPlayer.playVideo():(this.loadVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)):(this.trigger("waiting"),this.playOnReady=!0))},pause:function(){this.ytPlayer&&this.ytPlayer.pauseVideo()},paused:function(){return!this.ytPlayer||this.lastState!==YT.PlayerState.PLAYING&&this.lastState!==YT.PlayerState.BUFFERING},currentTime:function(){return this.ytPlayer?this.ytPlayer.getCurrentTime():0},setCurrentTime:function(t){this.lastState===YT.PlayerState.PAUSED&&(this.timeBeforeSeek=this.currentTime()),this.isSeeking||(this.wasPausedBeforeSeek=this.paused()),this.ytPlayer.seekTo(t,!0),this.trigger("timeupdate"),this.trigger("seeking"),this.isSeeking=!0,this.lastState===YT.PlayerState.PAUSED&&this.timeBeforeSeek!==t&&(clearInterval(this.checkSeekedInPauseInterval),this.checkSeekedInPauseInterval=setInterval(function(){this.lastState===YT.PlayerState.PAUSED&&this.isSeeking?this.currentTime()!==this.timeBeforeSeek&&(this.trigger("timeupdate"),this.onSeeked()):clearInterval(this.checkSeekedInPauseInterval)}.bind(this),250))},seeking:function(){return this.isSeeking},seekable:function(){return this.ytPlayer?t.createTimeRange(0,this.ytPlayer.getDuration()):t.createTimeRange()},onSeeked:function(){clearInterval(this.checkSeekedInPauseInterval),this.isSeeking=!1,this.wasPausedBeforeSeek&&this.pause(),this.trigger("seeked")},playbackRate:function(){return this.ytPlayer?this.ytPlayer.getPlaybackRate():1},setPlaybackRate:function(t){this.ytPlayer&&this.ytPlayer.setPlaybackRate(t)},duration:function(){return this.ytPlayer?this.ytPlayer.getDuration():0},currentSrc:function(){return this.source&&this.source.src},ended:function(){return!!this.ytPlayer&&this.lastState===YT.PlayerState.ENDED},volume:function(){return this.ytPlayer?this.ytPlayer.getVolume()/100:1},setVolume:function(t){this.ytPlayer&&this.ytPlayer.setVolume(100*t)},muted:function(){return!!this.ytPlayer&&this.ytPlayer.isMuted()},setMuted:function(t){this.ytPlayer&&(this.muted(!0),t?this.ytPlayer.mute():this.ytPlayer.unMute(),this.setTimeout(function(){this.trigger("volumechange")},50))},buffered:function(){if(!this.ytPlayer||!this.ytPlayer.getVideoLoadedFraction)return t.createTimeRange();var e=this.ytPlayer.getVideoLoadedFraction()*this.ytPlayer.getDuration();return t.createTimeRange(0,e)},preload:function(){},load:function(){},reset:function(){},supportsFullScreen:function(){return!0},checkHighResPoster:function(){var t="https://img.youtube.com/vi/"+this.url.videoId+"/maxresdefault.jpg";try{var e=new Image;e.onload=function(){if("naturalHeight"in e){if(e.naturalHeight<=90||e.naturalWidth<=120)return}else if(e.height<=90||e.width<=120)return;this.poster_=t,this.trigger("posterchange")}.bind(this),e.onerror=function(){},e.src=t}catch(o){}}});s.isSupported=function(){return!0},s.canPlaySource=function(t){return s.canPlayType(t.type)},s.canPlayType=function(t){return"video/youtube"===t},s.parseUrl=function(t){var e={videoId:null},o=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,n=t.match(o);n&&11===n[2].length&&(e.videoId=n[2]);var r=/[?&]list=([^#\&\?]+)/;return n=t.match(r),n&&n[1]&&(e.listId=n[1]),e},s.apiReadyQueue=[],"undefined"!=typeof t.registerTech?t.registerTech("Youtube",s):t.registerComponent("Youtube",s)}),!function t(e,o,n){function r(s,a){if(!o[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=o[s]={exports:{}};e[s][0].call(c.exports,function(t){var o=e[s][1][t];return r(o?o:t)},c,c.exports,t,e,o,n)}return o[s].exports}for(var i="function"==typeof require&&require,s=0;s=o.length)break;i=o[r++]}else{if(r=o.next(),r.done)break;i=r.value}var s=i,a=t.getAttribute("data-vimeo-"+s);(a||""===a)&&(e[s]=""===a?1:a)}return e}function f(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return new Promise(function(o,n){if(!u(t))throw new TypeError("“"+t+"” is not a vimeo.com url.");var r="https://vimeo.com/api/oembed.json?url="+encodeURIComponent(t);for(var i in e)e.hasOwnProperty(i)&&(r+="&"+i+"="+encodeURIComponent(e[i]));var s="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;s.open("GET",r,!0),s.onload=function(){if(404===s.status)return void n(new Error("“"+e+"” was not found."));if(403===s.status)return void n(new Error("“"+e+"” is not embeddable."));try{var t=JSON.parse(s.responseText);o(t)}catch(e){n(e)}},s.onerror=function(){var t=s.status?" ("+s.status+")":"";n(new Error("There was an error fetching the embed code from Vimeo"+t+"."))},s.send()})}function d(t,e){var o=t.html;if(!e)throw new TypeError("An element must be provided");if(null!==e.getAttribute("data-vimeo-initialized"))return e.querySelector("iframe");var n=document.createElement("div");return n.innerHTML=o,e.appendChild(n.firstChild),e.setAttribute("data-vimeo-initialized","true"),e.querySelector("iframe")}function h(){var t=arguments.length<=0||void 0===arguments[0]?document:arguments[0],e=[].slice.call(t.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),o=function(t){"console"in window&&console.error&&console.error("There was an error creating an embed: "+t)},n=function(){if(i){if(s>=r.length)return"break";a=r[s++]}else{if(s=r.next(),s.done)return"break";a=s.value}var t=a;try{if(null!==t.getAttribute("data-vimeo-defer"))return"continue";var e=p(t),n=c(e);f(n,e).then(function(e){return d(e,t)})["catch"](o)}catch(t){o(t)}};t:for(var r=e,i=Array.isArray(r),s=0,r=i?r:r[Symbol.iterator]();;){var a,l=n();switch(l){case"break":break t;case"continue":continue}}}function v(t){return"string"==typeof t&&(t=JSON.parse(t)),t}function y(t,e,o){if(t.element.contentWindow.postMessage){var n={method:e};void 0!==o&&(n.value=o);var r=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));r>=8&&r<10&&(n=JSON.stringify(n)),t.element.contentWindow.postMessage(n,t.origin)}}function g(t,e){e=v(e);var o=[],i=void 0;if(e.event){if("error"===e.event)for(var s=n(t,e.data.method),a=s,l=Array.isArray(a),u=0,a=l?a:a[Symbol.iterator]();;){var c;if(l){if(u>=a.length)break;c=a[u++]}else{if(u=a.next(),u.done)break;c=u.value}var p=c,f=new Error(e.data.message);f.name=e.data.name,p.reject(f),r(t,e.data.method,p)}o=n(t,"event:"+e.event),i=e.data}else e.method&&(o=n(t,e.method),i=e.value,r(t,e.method));for(var d=o,h=Array.isArray(d),y=0,d=h?d:d[Symbol.iterator]();;){var g;if(h){if(y>=d.length)break;g=d[y++]}else{if(y=d.next(),y.done)break;g=y.value}var b=g;try{if("function"==typeof b){b.call(t,i);continue}b.resolve(i)}catch(t){}}}var b="undefined"!=typeof Array.prototype.indexOf,A="undefined"!=typeof window.postMessage;if(!b||!A)throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var m="undefined"!=typeof window?window:"undefined"!=typeof t?t:"undefined"!=typeof self?self:{},j=(e(function(t,e){!function(t){function e(t,e){function n(t){return this&&this.constructor===n?(this._keys=[],this._values=[],this._itp=[],this.objectOnly=e,void(t&&o.call(this,t))):new n(t)}return e||A(t,"size",{get:y}),t.constructor=n,n.prototype=t,n}function o(t){this.add?t.forEach(this.add,this):t.forEach(function(t){this.set(t[0],t[1])},this)}function n(t){return this.has(t)&&(this._keys.splice(b,1),this._values.splice(b,1),this._itp.forEach(function(t){b0&&l(o,s))}catch(l){i.call(new a(s),l)}}}function i(e){var n=this;n.triggered||(n.triggered=!0,n.def&&(n=n.def),n.msg=e,n.state=2,n.chain.length>0&&t(o,n))}function s(t,e,o,n){for(var r=0;r1&&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)),!a(e))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==e.nodeName){var r=e.querySelector("iframe");r&&(e=r)}if("IFRAME"===e.nodeName&&!u(e.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(T.has(e))return T.get(e);this.element=e,this.origin="*";var s=new w(function(t,r){var s=function(e){if(u(e.origin)&&o.element.contentWindow===e.source){"*"===o.origin&&(o.origin=e.origin);var n=v(e.data),r="event"in n&&"ready"===n.event,i="method"in n&&"ping"===n.method;return r||i?(o.element.setAttribute("data-ready","true"),void t()):void g(o,n)}};if(window.addEventListener?window.addEventListener("message",s,!1):window.attachEvent&&window.attachEvent("onmessage",s),"IFRAME"!==o.element.nodeName){var a=p(e,n),l=c(a);f(l,a).then(function(t){var n=d(t,e);return o.element=n,i(e,n),t})["catch"](function(t){return r(t)})}});return E.set(this,s),T.set(this.element,this),"IFRAME"===this.element.nodeName&&y(this,"ping"),this}return t.prototype.then=function(t){var e=arguments.length<=1||void 0===arguments[1]?function(){}:arguments[1];return this.ready().then(t,e)},t.prototype.callMethod=function(t){var e=this,n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return new w(function(r,i){return e.ready().then(function(){o(e,t,{resolve:r,reject:i}),y(e,t,n)})})},t.prototype.get=function(t){var e=this;return new w(function(n,r){return t=s(t,"get"),e.ready().then(function(){o(e,t,{resolve:n,reject:r}),y(e,t)})})},t.prototype.set=function(t,e){var n=this;return w.resolve(e).then(function(e){if(t=s(t,"set"),void 0===e||null===e)throw new TypeError("There must be a value to set.");return n.ready().then(function(){return new w(function(r,i){o(n,t,{resolve:r,reject:i}),y(n,t,e)})})})},t.prototype.on=function(t,e){if(!t)throw new TypeError("You must pass an event name.");if(!e)throw new TypeError("You must pass a callback function.");if("function"!=typeof e)throw new TypeError("The callback must be a function.");var r=n(this,"event:"+t);0===r.length&&this.callMethod("addEventListener",t)["catch"](function(){}),o(this,"event:"+t,e)},t.prototype.off=function(t,e){if(!t)throw new TypeError("You must pass an event name.");if(e&&"function"!=typeof e)throw new TypeError("The callback must be a function.");var o=r(this,"event:"+t,e);o&&this.callMethod("removeEventListener",t)["catch"](function(t){})},t.prototype.loadVideo=function(t){return this.callMethod("loadVideo",t)},t.prototype.ready=function(){var t=E.get(this);return w.resolve(t)},t.prototype.enableTextTrack=function(t,e){if(!t)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:t,kind:e})},t.prototype.disableTextTrack=function(){return this.callMethod("disableTextTrack")},t.prototype.pause=function(){return this.callMethod("pause")},t.prototype.play=function(){return this.callMethod("play")},t.prototype.unload=function(){return this.callMethod("unload")},t.prototype.getAutopause=function(){return this.get("autopause")},t.prototype.setAutopause=function(t){return this.set("autopause",t)},t.prototype.getColor=function(){return this.get("color")},t.prototype.setColor=function(t){return this.set("color",t)},t.prototype.getCurrentTime=function(){return this.get("currentTime")},t.prototype.setCurrentTime=function(t){return this.set("currentTime",t)},t.prototype.getDuration=function(){return this.get("duration")},t.prototype.getEnded=function(){return this.get("ended")},t.prototype.getLoop=function(){return this.get("loop")},t.prototype.setLoop=function(t){return this.set("loop",t)},t.prototype.getPaused=function(){return this.get("paused")},t.prototype.getTextTracks=function(){return this.get("textTracks")},t.prototype.getVideoEmbedCode=function(){return this.get("videoEmbedCode")},t.prototype.getVideoId=function(){return this.get("videoId")},t.prototype.getVideoTitle=function(){return this.get("videoTitle")},t.prototype.getVideoWidth=function(){return this.get("videoWidth")},t.prototype.getVideoHeight=function(){return this.get("videoHeight")},t.prototype.getVideoUrl=function(){return this.get("videoUrl")},t.prototype.getVolume=function(){return this.get("volume")},t.prototype.setVolume=function(t){return this.set("volume",t)},t}();return h(),C})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,o){(function(e){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(){if(!h){h=!0;var t="\n .vjs-vimeo iframe {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n ",e=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t)),e.appendChild(o)}}o.__esModule=!0;var l="undefined"!=typeof window?window.videojs:"undefined"!=typeof e?e.videojs:null,u=n(l),c=t(1),p=n(c),f=u["default"].getComponent("Component"),d=u["default"].getComponent("Tech"),h=!1,v=function(t){function e(o,n){r(this,e);var s=i(this,t.call(this,o,n));return a(),s.setPoster(o.poster),s.initVimeoPlayer(),s}return s(e,t),e.prototype.initVimeoPlayer=function(){var t=this,e={url:this.options_.source.src,byline:!1,portrait:!1,title:!1};this.options_.autoplay&&(e.autoplay=!0),this.options_.height&&(e.height=this.options_.height),this.options_.width&&(e.width=this.options_.width),this.options_.maxheight&&(e.maxheight=this.options_.maxheight),this.options_.maxwidth&&(e.maxwidth=this.options_.maxwidth),this.options_.loop&&(e.loop=this.options_.loop),this._player=new p["default"](this.el(),e),this.initVimeoState(),["play","pause","ended","timeupdate","progress","seeked"].forEach(function(e){t._player.on(e,function(o){t._vimeoState.progress.duration!=o.duration&&t.trigger("durationchange"),t._vimeoState.progress=o,t.trigger(e)})}),this._player.on("pause",function(){return t._vimeoState.playing=!1}),this._player.on("play",function(){t._vimeoState.playing=!0,t._vimeoState.ended=!1}),this._player.on("ended",function(){t._vimeoState.playing=!1,t._vimeoState.ended=!0}),this._player.on("volumechange",function(e){return t._vimeoState.volume=e}),this._player.on("error",function(e){return t.trigger("error",e)}),this.triggerReady()},e.prototype.initVimeoState=function(){var t=this._vimeoState={ended:!1,playing:!1,volume:0,progress:{seconds:0,percent:0,duration:0}};this._player.getCurrentTime().then(function(e){return t.progress.seconds=e}),this._player.getDuration().then(function(e){return t.progress.duration=e}),this._player.getPaused().then(function(e){return t.playing=!e}),this._player.getVolume().then(function(e){return t.volume=e})},e.prototype.createEl=function(){var t=u["default"].createEl("div",{id:this.options_.techId});return t.style.cssText="width:100%;height:100%;top:0;left:0;position:absolute",t.className="vjs-vimeo",t},e.prototype.controls=function(){return!0},e.prototype.supportsFullScreen=function(){return!0},e.prototype.src=function(){return this.options_.source},e.prototype.currentSrc=function(){return this.options_.source.src},e.prototype.currentTime=function(){return this._vimeoState.progress.seconds},e.prototype.setCurrentTime=function(t){this._player.setCurrentTime(t)},e.prototype.volume=function(){return this._vimeoState.volume},e.prototype.setVolume=function(t){return this._player.setVolume(volume)},e.prototype.duration=function(){return this._vimeoState.progress.duration},e.prototype.buffered=function(){var t=this._vimeoState.progress;return u["default"].createTimeRange(0,t.percent*t.duration)},e.prototype.paused=function(){return!this._vimeoState.playing},e.prototype.pause=function(){this._player.pause()},e.prototype.play=function(){this._player.play()},e.prototype.muted=function(){return 0===this._vimeoState.volume},e.prototype.ended=function(){return this._vimeoState.ended},e}(d);v.prototype.featuresTimeupdateEvents=!0,v.isSupported=function(){return!0},d.withSourceHandlers(v),v.nativeSourceHandler={},v.nativeSourceHandler.canPlayType=function(t){return"video/vimeo"===t?"maybe":""},v.nativeSourceHandler.canHandleSource=function(t){return t.type?v.nativeSourceHandler.canPlayType(t.type):t.src?v.nativeSourceHandler.canPlayType(t.src):""},v.nativeSourceHandler.handleSource=function(t,e){e.src(t.src)},v.nativeSourceHandler.dispose=function(){},v.registerSourceHandler(v.nativeSourceHandler),f.registerComponent("Vimeo",v),d.registerTech("Vimeo",v),v.VERSION="0.0.1",o["default"]=v}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[2]);var _createClass=function(){function t(t,e){for(var o=0;o=0;o--)e[o].src==t&&("hd"!==e[o]["data-quality"]?this.currentRes="sd":this.currentRes="hd")}},{key:"setResolutionsNeededFromPlayer",value:function(){if(this.resolutionsNeeded=!1,"object"==typeof this.typeAndTech){var t=this.typeAndTech.type;if(void 0!==this.sourcesByType[t]&&this.sourcesByType[t].length>1)for(var e=this.sourcesByType[t].length-1;e>=0;e--)if(void 0!==this.sourcesByType[t][e]["data-quality"]||this.sourcesByType[t][e]["data-quality"]!=this.currentRes)return void(this.resolutionsNeeded=!0)}}},{key:"removeSources",value:function(){var t=this.player_.el_.getElementsByTagName("video")[0];if("Html5"===this.player_.techName_&&t)for(var e=t.getElementsByTagName("source"),o=0;o=0;r--){var i=t[r].src;if(void 0!==i&&""!==i){if(i.search(/^\/\//)!=-1)i=o+i;else{if(i.search(/:\/\//)!=-1)continue;i=i.search(/^\//)!=-1?n+i:e+i}t[r].src=i}}return t}},{key:"getSourceForResolutionChange",value:function(){for(var t=this.typeAndTech.type,e=this.sourcesByType[t],o=e.length-1;o>=0;o--)if("hd"==this.currentRes){if(void 0==e[o]["data-quality"]||"hd"!==e[o]["data-quality"])return e[o]}else if("hd"==e[o]["data-quality"])return e[o];return e[0]}},{key:"switchResolution",value:function(){var t=this.getSourceForResolutionChange();this.switchSource(t)}},{key:"stopStream",value:function(){switch(this.player_.techName_){case"Flash":this.player_.tech_.el_.vjs_stop()}}},{key:"selectSource",value:function(t){this.removeSources();var e=this.sourcesByType,o=this.selectTypeAndTech(t);return!!o&&(this.options_.sourceResolutions=e[o.type],this.selectResolution(this.options_.sourceResolutions))}},{key:"selectTypeAndTech",value:function(t){for(var e,o,n=0,r=this.player_.options_.techOrder;ni?i:n;return t[s]}},{key:"switchSource",value:function(t){if(this.player_.cache_.src===t.src)return this.player_.trigger("resolutionchange"),this.player_;var e=this.player_.currentTime(),o=this.player_.paused();this.player_.pause(),this.stopStream(),"Html5"===this.player_.techName_?this.player_.src(t.src):this.player_.loadTech(this.player_.techName_,{src:t.src});var n=this;this.player_.ready(function(){this.player_.one("loadeddata",videojs.bind(this.player_,function(){this.player_.currentTime(e)})),this.player_.trigger("resolutionchange"),o||(this.player_.load(),this.player_.play()),localStorage.setItem("videojs_preferred_res",parseInt(t.index,10)),n.setCurrentResFromPlayer(),n.updateButton()})}},{key:"updateButton",value:function(){var t=this.prepareButtonElement(this.el_);this.resolutionsNeeded?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden"),"hd"==this.currentRes?t.addClass("vjs-ag-res-hd"):t.removeClass("vjs-ag-res-hd"),this.el_.blur()}},{key:"prepareButtonElement",value:function(t){return"function"!=typeof t.addClass&&(t.addClass=function(t){if(this.classList)this.classList.add(t);else if(-1==this.className.indexOf(t)){var e=this.className.split(" ");e.push(t),this.className=e.join(" ")}return this}),"function"!=typeof t.removeClass&&(t.removeClass=function(t){if(this.classList)this.classList.remove(t);else{var e=this.className.split(" ");e.splice(e.indexOf(t),1),this.className=e.join(" ")}return this}),t}}]),e}(VjsButtonResBBase);videojs.reduce=function(t,e,o,n){if(t&&0!==t.length){for(var r=0,i=t.length;r=0;e--)this.players[e].id===t&&this.players[e].getPlayer().play();for(var e=this.lightboxtriggers.length-1;e>=0;e--)this.lightboxtriggers[e].playerid===t&&this.lightboxtriggers[e].trigger()}},{key:"getPlayer",value:function(t){for(var e=this.players.length-1;e>=0;e--)if(this.players[e].id===t)return this.players[e].getPlayer();for(var e=this.lightboxtriggers.length-1;e>=0;e--)if(this.lightboxtriggers[e].playerid===t)return this.lightboxtriggers[e].getPlayer();return!1}},{key:"destroyPlayer",value:function(t){for(var e=this.players.length-1;e>=0;e--)if(this.players[e].id===t)return this.players[e].destroy(),this.players.splice(e,1),!0;for(var e=this.lightboxtriggers.length-1;e>=0;e--)if(this.lightboxtriggers[e].playerid===t)return this.closeLightbox(),!0;return!1}},{key:"closeLightbox",value:function(){for(var t=this.lightboxtriggers.length-1;t>=0;t--)this.lightboxtriggers[t].closeLightbox();this.consolidatePlayers()}},{key:"consolidatePlayers",value:function(){for(var t=this.players.length-1;t>=0;t--)void 0===this.players[t]||this.players[t].alive||(delete this.players[t],this.players=this.players.filter(function(){return!0}))}},{key:"configureVideoJS",value:function(){window.HELP_IMPROVE_VIDEOJS=!1}}]),t}();o["default"]=v,e.exports=o["default"]},{"./components/Eventbus":3,"./components/Lightbox":4,"./components/LightboxTrigger":5,"./components/Player":6,"./lib/DOMElement":7}],2:[function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(o,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=8&&t.ie().actualVersion<=11?this.options.youtube={ytControls:2,color:"white",modestbranding:1}:this.options.youtube={iv_load_policy:3,modestbranding:1}}},{key:"setVimeoOptions",value:function(){this.options.techOrder=["vimeo"],this.options.sources=[{type:"video/vimeo",src:"https://vimeo.com/"+this.getPlayerAttributeFromVideoElement("vimeo-id")}]}},{key:"getSkinClass",value:function(){var t="vjs-afterglow-skin";"afterglow"!==this.skin&&(t+=" afterglow-skin-"+this.skin);var e=new a["default"];return 9==e.ie().actualVersion&&(t+=" ie9-is-bad"),t}}]),t}();o["default"]=l,e.exports=o["default"]},{"../lib/Util":8}],3:[function(t,e,o){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(o,"__esModule",{value:!0});var r=function(){function t(t,e){for(var o=0;ot?("undefined"!=typeof e&&e<.9*o.width?o.playerwidth=e:o.playerwidth=.9*o.width,o.playerheight=o.playerwidth*t):("undefined"!=typeof e&&e<.92*o.height/t?o.playerheight=e*t:o.playerheight=.92*o.height,o.playerwidth=o.playerheight/t),o.playeroffsettop=(o.height-o.playerheight)/2,o.playeroffsetleft=(o.width-o.playerwidth)/2,o}},{key:"close",value:function(){this.player.destroy(!0),this.node.parentNode.removeChild(this.node),this.emit("close")}},{key:"getPlayer",value:function(){if(void 0!==this.player)return this.player.getPlayer()}}]),e}(d["default"]);o["default"]=y,e.exports=o["default"]},{"../../../../vendor/Emitter/Emitter":10,"../lib/DOMElement":7,"../lib/Util":8,"./Player":6}],5:[function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(o,"__esModule",{value:!0});var s=function(){function t(t,e){for(var o=0;o=8&&o<=11&&this.videoelement.addClass("vjs-IE")}},{key:"applyParameters",value:function(){if("false"==this.videoelement.getAttribute("data-overscale")&&this.videoelement.setAttribute("data-maxwidth",this.videoelement.getAttribute("width")),"none"!=this.videoelement.getAttribute("data-autoresize")&&"false"!=this.videoelement.getAttribute("data-autoresize")){this.videoelement.addClass("vjs-responsive");var t=this.calculateRatio();this.videoelement.node.style.paddingTop=100*t+"%",this.videoelement.removeAttribute("height"),this.videoelement.removeAttribute("width"),this.videoelement.setAttribute("data-ratio",t)}}},{key:"applyYoutubeClasses",value:function(){this.videoelement.addClass("vjs-youtube"),this.videoelement.addClass("vjs-youtube-headstart"),document.querySelector("video").controls&&this.videoelement.addClass("vjs-using-native-controls"),/iPad|iPhone|iPod|iOS/.test(navigator.platform)&&this.videoelement.addClass("vjs-iOS");var t=this.util.ie().actualVersion;t>=8&&t<=11&&this.videoelement.addClass("vjs-using-native-controls")}},{key:"applyVimeoClasses",value:function(){this.videoelement.addClass("vjs-vimeo")}},{key:"calculateRatio",value:function(){if(this.videoelement.getAttribute("data-ratio"))var t=this.videoelement.getAttribute("data-ratio");else{if(!this.videoelement.getAttribute("height")||!this.videoelement.getAttribute("width"))return console.error("Please provide witdh and height for your video element."),0;var t=this.videoelement.getAttribute("height")/this.videoelement.getAttribute("width")}return parseFloat(t)}},{key:"getSkinName",value:function(){return this.videoelement.getAttribute("data-skin")?this.videoelement.getAttribute("data-skin"):"afterglow"}},{key:"destroy",value:function(){this.videojs.paused()||this.videojs.pause(),this.videojs.isFullscreen()&&this.videojs.exitFullscreen(),this.videojs.dispose(),this.alive=!1}},{key:"getPlayer",value:function(){return this.videojs}}]),t}();o["default"]=c,e.exports=o["default"]},{"../lib/Util":8,"./Config":2}],7:[function(t,e,o){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(o,"__esModule",{value:!0});var r=function(){function t(t,e){for(var o=0;o0&&!/x64|x32/gi.test(window.navigator.userAgent)&&(t={isTheBrowser:!0,actualVersion:"11"}),t}},{key:"isMobile",value:function(){var t=function(){return navigator.userAgent.match(/Android/i)},e=function(){return navigator.userAgent.match(/BlackBerry/i)},o=function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},n=function(){return navigator.userAgent.match(/Opera Mini/i)},r=function(){return navigator.userAgent.match(/IEMobile/i)};return!!(t()||e()||o()||n()||r())}},{key:"merge_objects",value:function(t,e){var o={};for(var n in t)o[n]=t[n];for(var n in e)o[n]=e[n];return o}},{key:"addEventListener",value:function(t,e,o){null!=t&&"undefined"!=typeof t&&(t.addEventListener?t.addEventListener(e,o,!1):t.attachEvent?t.attachEvent("on"+e,o):t["on"+e]=o)}}]),t}();o["default"]=i,e.exports=o["default"]},{}],9:[function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}var r=t("./afterglow/Afterglow"),i=n(r);window.afterglow=new i["default"],document.addEventListener("DOMContentLoaded",function(){window.afterglow.init()})},{"./afterglow/Afterglow":1}],10:[function(t,e,o){"use strict";function n(t){if(t)return r(t)}function r(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},n.prototype.once=function(t,e){function o(){this.off(t,o),e.apply(this,arguments)}return o.fn=e,this.on(t,o),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var o=this._callbacks["$"+t];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n,r=0;r","")&&(p.pop(),c=c.parentNode);continue}var f,d=o(l.substr(1,l.length-2));if(d){f=t.document.createProcessingInstruction("timestamp",d),c.appendChild(f);continue}var h=l.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!h)continue;if(f=a(h[1],h[3]),!f)continue;if(!s(c,f))continue;h[2]&&(f.className=h[2].substr(1).replace("."," ")),p.push(h[1]),c.appendChild(f),c=f}return u}function a(t){function e(t,e){for(var o=e.childNodes.length-1;o>=0;o--)t.push(e.childNodes[o])}function o(t){if(!t||!t.length)return null;var n=t.pop(),r=n.textContent||n.innerText;if(r){var i=r.match(/^.*(\n|\r)/);return i?(t.length=0,i[0]):r}return"ruby"===n.tagName?o(t):n.childNodes?(e(t,n),o(t)):void 0}var n,r=[],i="";if(!t||!t.childNodes)return"ltr";for(e(r,t);i=o(r);)for(var s=0;s=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,o=e.textTrackList,n=0,r=0;rl&&(r=new p(t),s=l),t=new p(i)}return r||i}var i=new p(e),s=e.cue,a=l(s),u=[];if(s.snapToLines){var c;switch(s.vertical){case"":u=["+y","-y"],c="height";break;case"rl":u=["+x","-x"],c="width";break;case"lr":u=["-x","+x"],c="width"}var f=i.lineHeight,d=f*Math.round(a),h=o[c]+f,v=u[0];Math.abs(d)>h&&(d=d<0?-1:1,d*=Math.ceil(h/f)*f),a<0&&(d+=""===s.vertical?o.height:o.width,u=u.reverse()),i.move(v,d)}else{var y=i.lineHeight/o.height*100;switch(s.lineAlign){case"middle":a-=y/2;break;case"end":a-=y}switch(s.vertical){case"":e.applyStyles({top:e.formatStyle(a,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(a,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(a,"%")})}u=["+y","-x","+x","-y"],i=new p(e)}var g=r(i,u);e.move(g.toCSSCompatValues(o))}function d(){}var h=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();e.prototype=h(Error.prototype),e.prototype.constructor=e,e.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},n.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,o){return o?this.has(t)?this.values[t]:e[o]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,o){for(var n=0;n=0&&e<=100))&&(this.set(t,e),!0)}};var v={"&":"&","<":"<",">":">","‎":"‎","‏":"‏"," ":" "},y={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},g={v:"title",lang:"lang"},b={rt:"ruby"},A=[1470,1472,1475,1478,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,1520,1521,1522,1523,1524,1544,1547,1549,1563,1566,1567,1568,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1645,1646,1647,1649,1650,1651,1652,1653,1654,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,1666,1667,1668,1669,1670,1671,1672,1673,1674,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1695,1696,1697,1698,1699,1700,1701,1702,1703,1704,1705,1706,1707,1708,1709,1710,1711,1712,1713,1714,1715,1716,1717,1718,1719,1720,1721,1722,1723,1724,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1739,1740,1741,1742,1743,1744,1745,1746,1747,1748,1749,1765,1766,1774,1775,1786,1787,1788,1789,1790,1791,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1807,1808,1810,1811,1812,1813,1814,1815,1816,1817,1818,1819,1820,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1832,1833,1834,1835,1836,1837,1838,1839,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1880,1881,1882,1883,1884,1885,1886,1887,1888,1889,1890,1891,1892,1893,1894,1895,1896,1897,1898,1899,1900,1901,1902,1903,1904,1905,1906,1907,1908,1909,1910,1911,1912,1913,1914,1915,1916,1917,1918,1919,1920,1921,1922,1923,1924,1925,1926,1927,1928,1929,1930,1931,1932,1933,1934,1935,1936,1937,1938,1939,1940,1941,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1953,1954,1955,1956,1957,1969,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2e3,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025,2026,2036,2037,2042,2048,2049,2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2074,2084,2088,2096,2097,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,2109,2110,2112,2113,2114,2115,2116,2117,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2136,2142,2208,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,8207,64285,64287,64288,64289,64290,64291,64292,64293,64294,64295,64296,64298,64299,64300,64301,64302,64303,64304,64305,64306,64307,64308,64309,64310,64312,64313,64314,64315,64316,64318,64320,64321,64323,64324,64326,64327,64328,64329,64330,64331,64332,64333,64334,64335,64336,64337,64338,64339,64340,64341,64342,64343,64344,64345,64346,64347,64348,64349,64350,64351,64352,64353,64354,64355,64356,64357,64358,64359,64360,64361,64362,64363,64364,64365,64366,64367,64368,64369,64370,64371,64372,64373,64374,64375,64376,64377,64378,64379,64380,64381,64382,64383,64384,64385,64386,64387,64388,64389,64390,64391,64392,64393,64394,64395,64396,64397,64398,64399,64400,64401,64402,64403,64404,64405,64406,64407,64408,64409,64410,64411,64412,64413,64414,64415,64416,64417,64418,64419,64420,64421,64422,64423,64424,64425,64426,64427,64428,64429,64430,64431,64432,64433,64434,64435,64436,64437,64438,64439,64440,64441,64442,64443,64444,64445,64446,64447,64448,64449,64467,64468,64469,64470,64471,64472,64473,64474,64475,64476,64477,64478,64479,64480,64481,64482,64483,64484,64485,64486,64487,64488,64489,64490,64491,64492,64493,64494,64495,64496,64497,64498,64499,64500,64501,64502,64503,64504,64505,64506,64507,64508,64509,64510,64511,64512,64513,64514,64515,64516,64517,64518,64519,64520,64521,64522,64523,64524,64525,64526,64527,64528,64529,64530,64531,64532,64533,64534,64535,64536,64537,64538,64539,64540,64541,64542,64543,64544,64545,64546,64547,64548,64549,64550,64551,64552,64553,64554,64555,64556,64557,64558,64559,64560,64561,64562,64563,64564,64565,64566,64567,64568,64569,64570,64571,64572,64573,64574,64575,64576,64577,64578,64579,64580,64581,64582,64583,64584,64585,64586,64587,64588,64589,64590,64591,64592,64593,64594,64595,64596,64597,64598,64599,64600,64601,64602,64603,64604,64605,64606,64607,64608,64609,64610,64611,64612,64613,64614,64615,64616,64617,64618,64619,64620,64621,64622,64623,64624,64625,64626,64627,64628,64629,64630,64631,64632,64633,64634,64635,64636,64637,64638,64639,64640,64641,64642,64643,64644,64645,64646,64647,64648,64649,64650,64651,64652,64653,64654,64655,64656,64657,64658,64659,64660,64661,64662,64663,64664,64665,64666,64667,64668,64669,64670,64671,64672,64673,64674,64675,64676,64677,64678,64679,64680,64681,64682,64683,64684,64685,64686,64687,64688,64689,64690,64691,64692,64693,64694,64695,64696,64697,64698,64699,64700,64701,64702,64703,64704,64705,64706,64707,64708,64709,64710,64711,64712,64713,64714,64715,64716,64717,64718,64719,64720,64721,64722,64723,64724,64725,64726,64727,64728,64729,64730,64731,64732,64733,64734,64735,64736,64737,64738,64739,64740,64741,64742,64743,64744,64745,64746,64747,64748,64749,64750,64751,64752,64753,64754,64755,64756,64757,64758,64759,64760,64761,64762,64763,64764,64765,64766,64767,64768,64769,64770,64771,64772,64773,64774,64775,64776,64777,64778,64779,64780,64781,64782,64783,64784,64785,64786,64787,64788,64789,64790,64791,64792,64793,64794,64795,64796,64797,64798,64799,64800,64801,64802,64803,64804,64805,64806,64807,64808,64809,64810,64811,64812,64813,64814,64815,64816,64817,64818,64819,64820,64821,64822,64823,64824,64825,64826,64827,64828,64829,64848,64849,64850,64851,64852,64853,64854,64855,64856,64857,64858,64859,64860,64861,64862,64863,64864,64865,64866,64867,64868,64869,64870,64871,64872,64873,64874,64875,64876,64877,64878,64879,64880,64881,64882,64883,64884,64885,64886,64887,64888,64889,64890,64891,64892,64893,64894,64895,64896,64897,64898,64899,64900,64901,64902,64903,64904,64905,64906,64907,64908,64909,64910,64911,64914,64915,64916,64917,64918,64919,64920,64921,64922,64923,64924,64925,64926,64927,64928,64929,64930,64931,64932,64933,64934,64935,64936,64937,64938,64939,64940,64941,64942,64943,64944,64945,64946,64947,64948,64949,64950,64951,64952,64953,64954,64955,64956,64957,64958,64959,64960,64961,64962,64963,64964,64965,64966,64967,65008,65009,65010,65011,65012,65013,65014,65015,65016,65017,65018,65019,65020,65136,65137,65138,65139,65140,65142,65143,65144,65145,65146,65147,65148,65149,65150,65151,65152,65153,65154,65155,65156,65157,65158,65159,65160,65161,65162,65163,65164,65165,65166,65167,65168,65169,65170,65171,65172,65173,65174,65175,65176,65177,65178,65179,65180,65181,65182,65183,65184,65185,65186,65187,65188,65189,65190,65191,65192,65193,65194,65195,65196,65197,65198,65199,65200,65201,65202,65203,65204,65205,65206,65207,65208,65209,65210,65211,65212,65213,65214,65215,65216,65217,65218,65219,65220,65221,65222,65223,65224,65225,65226,65227,65228,65229,65230,65231,65232,65233,65234,65235,65236,65237,65238,65239,65240,65241,65242,65243,65244,65245,65246,65247,65248,65249,65250,65251,65252,65253,65254,65255,65256,65257,65258,65259,65260,65261,65262,65263,65264,65265,65266,65267,65268,65269,65270,65271,65272,65273,65274,65275,65276,67584,67585,67586,67587,67588,67589,67592,67594,67595,67596,67597,67598,67599,67600,67601,67602,67603,67604,67605,67606,67607,67608,67609,67610,67611,67612,67613,67614,67615,67616,67617,67618,67619,67620,67621,67622,67623,67624,67625,67626,67627,67628,67629,67630,67631,67632,67633,67634,67635,67636,67637,67639,67640,67644,67647,67648,67649,67650,67651,67652,67653,67654,67655,67656,67657,67658,67659,67660,67661,67662,67663,67664,67665,67666,67667,67668,67669,67671,67672,67673,67674,67675,67676,67677,67678,67679,67840,67841,67842,67843,67844,67845,67846,67847,67848,67849,67850,67851,67852,67853,67854,67855,67856,67857,67858,67859,67860,67861,67862,67863,67864,67865,67866,67867,67872,67873,67874,67875,67876,67877,67878,67879,67880,67881,67882,67883,67884,67885,67886,67887,67888,67889,67890,67891,67892,67893,67894,67895,67896,67897,67903,67968,67969,67970,67971,67972,67973,67974,67975,67976,67977,67978,67979,67980,67981,67982,67983,67984,67985,67986,67987,67988,67989,67990,67991,67992,67993,67994,67995,67996,67997,67998,67999,68e3,68001,68002,68003,68004,68005,68006,68007,68008,68009,68010,68011,68012,68013,68014,68015,68016,68017,68018,68019,68020,68021,68022,68023,68030,68031,68096,68112,68113,68114,68115,68117,68118,68119,68121,68122,68123,68124,68125,68126,68127,68128,68129,68130,68131,68132,68133,68134,68135,68136,68137,68138,68139,68140,68141,68142,68143,68144,68145,68146,68147,68160,68161,68162,68163,68164,68165,68166,68167,68176,68177,68178,68179,68180,68181,68182,68183,68184,68192,68193,68194,68195,68196,68197,68198,68199,68200,68201,68202,68203,68204,68205,68206,68207,68208,68209,68210,68211,68212,68213,68214,68215,68216,68217,68218,68219,68220,68221,68222,68223,68352,68353,68354,68355,68356,68357,68358,68359,68360,68361,68362,68363,68364,68365,68366,68367,68368,68369,68370,68371,68372,68373,68374,68375,68376,68377,68378,68379,68380,68381,68382,68383,68384,68385,68386,68387,68388,68389,68390,68391,68392,68393,68394,68395,68396,68397,68398,68399,68400,68401,68402,68403,68404,68405,68416,68417,68418,68419,68420,68421,68422,68423,68424,68425,68426,68427,68428,68429,68430,68431,68432,68433,68434,68435,68436,68437,68440,68441,68442,68443,68444,68445,68446,68447,68448,68449,68450,68451,68452,68453,68454,68455,68456,68457,68458,68459,68460,68461,68462,68463,68464,68465,68466,68472,68473,68474,68475,68476,68477,68478,68479,68608,68609,68610,68611,68612,68613,68614,68615,68616,68617,68618,68619,68620,68621,68622,68623,68624,68625,68626,68627,68628,68629,68630,68631,68632,68633,68634,68635,68636,68637,68638,68639,68640,68641,68642,68643,68644,68645,68646,68647,68648,68649,68650,68651,68652,68653,68654,68655,68656,68657,68658,68659,68660,68661,68662,68663,68664,68665,68666,68667,68668,68669,68670,68671,68672,68673,68674,68675,68676,68677,68678,68679,68680,126464,126465,126466,126467,126469,126470,126471,126472,126473,126474,126475,126476,126477,126478,126479,126480,126481,126482,126483,126484,126485,126486,126487,126488,126489,126490,126491,126492,126493,126494,126495,126497,126498,126500,126503,126505,126506,126507,126508,126509,126510,126511,126512,126513,126514,126516,126517,126518,126519,126521,126523,126530,126535,126537,126539,126541,126542,126543,126545,126546,126548,126551,126553,126555,126557,126559,126561,126562,126564,126567,126568,126569,126570,126572,126573,126574,126575,126576,126577,126578,126580,126581,126582,126583,126585,126586,126587,126588,126590,126592,126593,126594,126595,126596,126597,126598,126599,126600,126601,126603,126604,126605,126606,126607,126608,126609,126610,126611,126612,126613,126614,126615,126616,126617,126618,126619,126625,126626,126627,126629,126630,126631,126632,126633,126635,126636,126637,126638,126639,126640,126641,126642,126643,126644,126645,126646,126647,126648,126649,126650,126651,1114109];u.prototype.applyStyles=function(t,e){e=e||this.div;for(var o in t)t.hasOwnProperty(o)&&(e.style[o]=t[o])},u.prototype.formatStyle=function(t,e){return 0===t?0:t+e},c.prototype=h(u.prototype),c.prototype.constructor=c,p.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},p.prototype.overlaps=function(t){return this.leftt.left&&this.topt.top},p.prototype.overlapsAny=function(t){for(var e=0;e=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},p.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.leftt.right;case"+y":return this.topt.bottom}},p.prototype.intersectPercentage=function(t){var e=Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left)),o=Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top)),n=e*o;return n/(this.height*this.width)},p.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},p.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,o=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,n=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t;var r={left:t.left,right:t.right,top:t.top||n,height:t.height||e,bottom:t.bottom||n+(t.height||e),width:t.width||o};return r},d.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},d.convertCueToDOMTree=function(t,e){return t&&e?s(t,e):null};var m=.05,j="sans-serif",w="1.5%";d.processCues=function(t,e,o){function n(t){for(var e=0;e")===-1){l.cue.id=u;continue}case"CUE":try{i(u,l.cue,l.regionList)}catch(f){l.reportOrThrowError(f),l.cue=null,l.state="BADCUE";continue}l.state="CUETEXT";continue;case"CUETEXT":var d=u.indexOf("-->")!==-1;if(!u||d&&(p=!0)){l.oncue&&l.oncue(l.cue),l.cue=null,l.state="ID";continue}l.cue.text&&(l.cue.text+="\n"),l.cue.text+=u;continue;case"BADCUE":u||(l.state="ID");continue}}}catch(f){l.reportOrThrowError(f),"CUETEXT"===l.state&&l.cue&&l.oncue&&l.oncue(l.cue),l.cue=null,l.state="INITIAL"===l.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new e(e.Errors.BadSignature)}catch(o){t.reportOrThrowError(o)}return t.onflush&&t.onflush(),this}},t.WebVTT=d}(this,this.vttjs||{}),function(t,e){"function"==typeof define&&define.amd?define([],e.bind(this,t,t.videojs)):"undefined"!=typeof module&&module.exports?module.exports=e(t,t.videojs):e(t,t.videojs)}(window,function(t,e){"use strict";t.videojs_hotkeys={version:"0.2.17"};var o=function(o){function n(t){return 32===t.which||179===t.which}function r(t){return 37===t.which||177===t.which}function i(t){return 39===t.which||176===t.which}function s(t){return 38===t.which}function a(t){return 40===t.which}function l(t){return 77===t.which}function u(t){return 70===t.which}var c=this,p=c.el(),f=document,d={volumeStep:.1,seekStep:5,enableMute:!0,enableVolumeScroll:!0,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,enableModifiersForNumbers:!0,playPauseKey:n,rewindKey:r,forwardKey:i,volumeUpKey:s,volumeDownKey:a,muteKey:l,fullscreenKey:u,customKeys:{}},h=1,v=2,y=3,g=4,b=5,A=6,m=7,j=e.mergeOptions||e.util.mergeOptions;o=j(d,o||{});var w=o.volumeStep,_=o.seekStep,k=o.enableMute,x=o.enableVolumeScroll,T=o.enableFullscreen,E=o.enableNumbers,C=o.enableJogStyle,S=o.alwaysCaptureHotkeys,O=o.enableModifiersForNumbers;p.hasAttribute("tabIndex")||p.setAttribute("tabIndex","-1"),p.style.outline="none",!S&&c.options_.autoplay||c.one("play",function(){p.focus()}),c.on("play",function(){var t=p.querySelector(".iframeblocker");t&&""===t.style.display&&(t.style.display="block",t.style.bottom="39px")});var B=function(t){var e,n=t.which,r=t.preventDefault;if(c.controls()){var i=f.activeElement;if(S||i==p||i==p.querySelector(".vjs-tech")||i==p.querySelector(".vjs-control-bar")||i==p.querySelector(".iframeblocker"))switch(I(t,c)){case h:r(),S&&t.stopPropagation(),c.paused()?c.play():c.pause();break;case v:r(),e=c.currentTime()-_,c.currentTime()<=_&&(e=0),c.currentTime(e);break;case y:r(),c.currentTime(c.currentTime()+_);break;case b:r(),C?(e=c.currentTime()-1,c.currentTime()<=1&&(e=0),c.currentTime(e)):c.volume(c.volume()-w);break;case g:r(),C?c.currentTime(c.currentTime()+1):c.volume(c.volume()+w);break;case A:k&&c.muted(!c.muted());break;case m:T&&(c.isFullscreen()?c.exitFullscreen():c.requestFullscreen());break;default:if((n>47&&n<59||n>95&&n<106)&&(O||!(t.metaKey||t.ctrlKey||t.altKey))&&E){var s=48;n>95&&(s=96);var a=n-s;r(),c.currentTime(c.duration()*a*.1)}for(var l in o.customKeys){var u=o.customKeys[l];u&&u.key&&u.handler&&u.key(t)&&(r(),u.handler(c,o,t))}}}},P=function(t){if(c.controls()){var e=t.relatedTarget||t.toElement||f.activeElement;e!=p&&e!=p.querySelector(".vjs-tech")&&e!=p.querySelector(".iframeblocker")||T&&(c.isFullscreen()?c.exitFullscreen():c.requestFullscreen())}},M=function(e){if(c.controls()){var o=e.relatedTarget||e.toElement||f.activeElement;if((S||o==p||o==p.querySelector(".vjs-tech")||o==p.querySelector(".iframeblocker")||o==p.querySelector(".vjs-control-bar"))&&x){e=t.event||e;var n=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));e.preventDefault(),1==n?c.volume(c.volume()+w):n==-1&&c.volume(c.volume()-w)}}},I=function(t,e){return o.playPauseKey(t,e)?h:o.rewindKey(t,e)?v:o.forwardKey(t,e)?y:o.volumeUpKey(t,e)?g:o.volumeDownKey(t,e)?b:o.muteKey(t,e)?A:o.fullscreenKey(t,e)?m:void 0};return c.on("keydown",B),c.on("dblclick",P),c.on("mousewheel",M),c.on("DOMMouseScroll",M),this};e.plugin("hotkeys",o)}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("video.js")):"function"==typeof define&&define.amd?define(["videojs"],function(o){return t.Youtube=e(o)}):t.Youtube=e(t.videojs)}(this,function(t){"use strict";function e(){YT.ready(function(){s.isApiReady=!0;for(var t=0;t1&&(this.featuresPlaybackRate=!0),this.playerReady_=!0,this.triggerReady(),this.playOnReady?this.play():this.cueOnReady&&(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)},onPlayerPlaybackQualityChange:function(){},onPlayerPlaybackRateChange:function(){this.trigger("ratechange")},onPlayerStateChange:function(t){var e=t.data;if(e!==this.lastState&&!this.errorNumber)switch(this.lastState=e,e){case-1:this.trigger("loadstart"),this.trigger("loadedmetadata"),this.trigger("durationchange"),this.trigger("ratechange");break;case YT.PlayerState.ENDED:this.trigger("ended");break;case YT.PlayerState.PLAYING:this.trigger("timeupdate"),this.trigger("durationchange"),this.trigger("playing"),this.trigger("play"),this.isSeeking&&this.onSeeked();break;case YT.PlayerState.PAUSED:this.trigger("canplay"),this.isSeeking?this.onSeeked():this.trigger("pause");break;case YT.PlayerState.BUFFERING:this.player_.trigger("timeupdate"),this.player_.trigger("waiting")}},onPlayerVolumeChange:function(){this.trigger("volumechange")},onPlayerError:function(t){this.errorNumber=t.data,this.trigger("pause"),this.trigger("error")},error:function(){var t=1e3+this.errorNumber;switch(this.errorNumber){case 5:return{code:t,message:"Error while trying to play the video"};case 2:case 100:return{code:t,message:"Unable to find the video"};case 101:case 150:return{code:t,message:"Playback on other Websites has been disabled by the video owner."}}return{code:t,message:"YouTube unknown error ("+this.errorNumber+")"}},loadVideoById_:function(t){var e={videoId:t};this.options_.start&&(e.startSeconds=this.options_.start),this.options_.end&&(e.endEnd=this.options_.end),this.ytPlayer.loadVideoById(e)},cueVideoById_:function(t){var e={videoId:t};this.options_.start&&(e.startSeconds=this.options_.start),this.options_.end&&(e.endEnd=this.options_.end),this.ytPlayer.cueVideoById(e)},src:function(t){return t&&this.setSrc({src:t}),this.source; +},poster:function(){return r?null:this.poster_},setPoster:function(t){this.poster_=t},setSrc:function(t){t&&t.src&&(delete this.errorNumber,this.source=t,this.url=s.parseUrl(t.src),this.options_.poster||this.url.videoId&&(this.poster_="https://img.youtube.com/vi/"+this.url.videoId+"/0.jpg",this.trigger("posterchange"),this.checkHighResPoster()),this.options_.autoplay&&!r?this.isReady_?this.play():this.playOnReady=!0:this.activeVideoId!==this.url.videoId&&(this.isReady_?(this.cueVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId):this.cueOnReady=!0))},autoplay:function(){return this.options_.autoplay},setAutoplay:function(t){this.options_.autoplay=t},loop:function(){return this.options_.loop},setLoop:function(t){this.options_.loop=t},play:function(){this.url&&this.url.videoId&&(this.wasPausedBeforeSeek=!1,this.isReady_?(this.url.listId&&(this.activeList===this.url.listId?this.ytPlayer.playVideo():(this.ytPlayer.loadPlaylist(this.url.listId),this.activeList=this.url.listId)),this.activeVideoId===this.url.videoId?this.ytPlayer.playVideo():(this.loadVideoById_(this.url.videoId),this.activeVideoId=this.url.videoId)):(this.trigger("waiting"),this.playOnReady=!0))},pause:function(){this.ytPlayer&&this.ytPlayer.pauseVideo()},paused:function(){return!this.ytPlayer||this.lastState!==YT.PlayerState.PLAYING&&this.lastState!==YT.PlayerState.BUFFERING},currentTime:function(){return this.ytPlayer?this.ytPlayer.getCurrentTime():0},setCurrentTime:function(t){this.lastState===YT.PlayerState.PAUSED&&(this.timeBeforeSeek=this.currentTime()),this.isSeeking||(this.wasPausedBeforeSeek=this.paused()),this.ytPlayer.seekTo(t,!0),this.trigger("timeupdate"),this.trigger("seeking"),this.isSeeking=!0,this.lastState===YT.PlayerState.PAUSED&&this.timeBeforeSeek!==t&&(clearInterval(this.checkSeekedInPauseInterval),this.checkSeekedInPauseInterval=setInterval(function(){this.lastState===YT.PlayerState.PAUSED&&this.isSeeking?this.currentTime()!==this.timeBeforeSeek&&(this.trigger("timeupdate"),this.onSeeked()):clearInterval(this.checkSeekedInPauseInterval)}.bind(this),250))},seeking:function(){return this.isSeeking},seekable:function(){return this.ytPlayer?t.createTimeRange(0,this.ytPlayer.getDuration()):t.createTimeRange()},onSeeked:function(){clearInterval(this.checkSeekedInPauseInterval),this.isSeeking=!1,this.wasPausedBeforeSeek&&this.pause(),this.trigger("seeked")},playbackRate:function(){return this.ytPlayer?this.ytPlayer.getPlaybackRate():1},setPlaybackRate:function(t){this.ytPlayer&&this.ytPlayer.setPlaybackRate(t)},duration:function(){return this.ytPlayer?this.ytPlayer.getDuration():0},currentSrc:function(){return this.source&&this.source.src},ended:function(){return!!this.ytPlayer&&this.lastState===YT.PlayerState.ENDED},volume:function(){return this.ytPlayer?this.ytPlayer.getVolume()/100:1},setVolume:function(t){this.ytPlayer&&this.ytPlayer.setVolume(100*t)},muted:function(){return!!this.ytPlayer&&this.ytPlayer.isMuted()},setMuted:function(t){this.ytPlayer&&(this.muted(!0),t?this.ytPlayer.mute():this.ytPlayer.unMute(),this.setTimeout(function(){this.trigger("volumechange")},50))},buffered:function(){if(!this.ytPlayer||!this.ytPlayer.getVideoLoadedFraction)return t.createTimeRange();var e=this.ytPlayer.getVideoLoadedFraction()*this.ytPlayer.getDuration();return t.createTimeRange(0,e)},preload:function(){},load:function(){},reset:function(){},supportsFullScreen:function(){return!0},checkHighResPoster:function(){var t="https://img.youtube.com/vi/"+this.url.videoId+"/maxresdefault.jpg";try{var e=new Image;e.onload=function(){if("naturalHeight"in e){if(e.naturalHeight<=90||e.naturalWidth<=120)return}else if(e.height<=90||e.width<=120)return;this.poster_=t,this.trigger("posterchange")}.bind(this),e.onerror=function(){},e.src=t}catch(o){}}});s.isSupported=function(){return!0},s.canPlaySource=function(t){return s.canPlayType(t.type)},s.canPlayType=function(t){return"video/youtube"===t},s.parseUrl=function(t){var e={videoId:null},o=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/,n=t.match(o);n&&11===n[2].length&&(e.videoId=n[2]);var r=/[?&]list=([^#\&\?]+)/;return n=t.match(r),n&&n[1]&&(e.listId=n[1]),e},s.apiReadyQueue=[],"undefined"!=typeof document&&n(),"undefined"!=typeof t.registerTech?t.registerTech("Youtube",s):t.registerComponent("Youtube",s)}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.videojsVimeo=t()}}(function(){var t;return function e(t,o,n){function r(s,a){if(!o[s]){if(!t[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=o[s]={exports:{}};t[s][0].call(c.exports,function(e){var o=t[s][1][e];return r(o?o:e)},c,c.exports,e,t,o,n)}return o[s].exports}for(var i="function"==typeof require&&require,s=0;s=o.length)break;i=o[r++]}else{if(r=o.next(),r.done)break;i=r.value}var s=i,a=t.getAttribute("data-vimeo-"+s);(a||""===a)&&(e[s]=""===a?1:a)}return e}function d(t){var e=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return new Promise(function(o,n){if(!c(t))throw new TypeError("“"+t+"” is not a vimeo.com url.");var r="https://vimeo.com/api/oembed.json?url="+encodeURIComponent(t);for(var i in e)e.hasOwnProperty(i)&&(r+="&"+i+"="+encodeURIComponent(e[i]));var s="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;s.open("GET",r,!0),s.onload=function(){if(404===s.status)return void n(new Error("“"+e+"” was not found."));if(403===s.status)return void n(new Error("“"+e+"” is not embeddable."));try{var t=JSON.parse(s.responseText);o(t)}catch(e){n(e)}},s.onerror=function(){var t=s.status?" ("+s.status+")":"";n(new Error("There was an error fetching the embed code from Vimeo"+t+"."))},s.send()})}function h(t,e){var o=t.html;if(!e)throw new TypeError("An element must be provided");if(null!==e.getAttribute("data-vimeo-initialized"))return e.querySelector("iframe");var n=document.createElement("div");return n.innerHTML=o,e.appendChild(n.firstChild),e.setAttribute("data-vimeo-initialized","true"),e.querySelector("iframe")}function v(){var t=arguments.length<=0||void 0===arguments[0]?document:arguments[0],e=[].slice.call(t.querySelectorAll("[data-vimeo-id], [data-vimeo-url]")),o=function(t){"console"in window&&console.error&&console.error("There was an error creating an embed: "+t)},n=function(){if(i){if(s>=r.length)return"break";a=r[s++]}else{if(s=r.next(),s.done)return"break";a=s.value}var t=a;try{if(null!==t.getAttribute("data-vimeo-defer"))return"continue";var e=f(t),n=p(e);d(n,e).then(function(e){return h(e,t)})["catch"](o)}catch(t){o(t)}};t:for(var r=e,i=Array.isArray(r),s=0,r=i?r:r[Symbol.iterator]();;){var a,l=n();switch(l){case"break":break t;case"continue":continue}}}function y(t){return"string"==typeof t&&(t=JSON.parse(t)),t}function g(t,e,o){if(t.element.contentWindow&&t.element.contentWindow.postMessage){var n={method:e};void 0!==o&&(n.value=o);var r=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));r>=8&&r<10&&(n=JSON.stringify(n)),t.element.contentWindow.postMessage(n,t.origin)}}function b(t,e){e=y(e);var o=[],n=void 0;if(e.event){if("error"===e.event)for(var s=r(t,e.data.method),a=s,l=Array.isArray(a),u=0,a=l?a:a[Symbol.iterator]();;){var c;if(l){if(u>=a.length)break;c=a[u++]}else{if(u=a.next(),u.done)break;c=u.value}var p=c,f=new Error(e.data.message);f.name=e.data.name,p.reject(f),i(t,e.data.method,p)}o=r(t,"event:"+e.event),n=e.data}else e.method&&(o=r(t,e.method),n=e.value,i(t,e.method));for(var d=o,h=Array.isArray(d),v=0,d=h?d:d[Symbol.iterator]();;){var g;if(h){if(v>=d.length)break;g=d[v++]}else{if(v=d.next(),v.done)break;g=v.value}var b=g;try{if("function"==typeof b){b.call(t,n);continue}b.resolve(n)}catch(t){}}}var A="undefined"!=typeof Array.prototype.indexOf,m="undefined"!=typeof window.postMessage;if(!A||!m)throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var j="undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{},w=(o(function(t,e){!function(t){function e(t,e){function n(t){return this&&this.constructor===n?(this._keys=[],this._values=[],this._itp=[],this.objectOnly=e,void(t&&o.call(this,t))):new n(t)}return e||A(t,"size",{get:y}),t.constructor=n,n.prototype=t,n}function o(t){this.add?t.forEach(this.add,this):t.forEach(function(t){this.set(t[0],t[1])},this)}function n(t){return this.has(t)&&(this._keys.splice(b,1),this._values.splice(b,1),this._itp.forEach(function(t){b0&&l(o,s))}catch(l){i.call(new a(s),l)}}}function i(e){var n=this;n.triggered||(n.triggered=!0,n.def&&(n=n.def),n.msg=e,n.state=2,n.chain.length>0&&t(o,n))}function s(t,e,o,n){for(var r=0;r1&&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)),!l(e))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==e.nodeName){var r=e.querySelector("iframe");r&&(e=r)}if("IFRAME"===e.nodeName&&!c(e.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(E.has(e))return E.get(e);this.element=e,this.origin="*";var i=new _(function(t,r){var i=function(e){if(c(e.origin)&&o.element.contentWindow===e.source){"*"===o.origin&&(o.origin=e.origin);var n=y(e.data),r="event"in n&&"ready"===n.event,i="method"in n&&"ping"===n.method;return r||i?(o.element.setAttribute("data-ready","true"),void t()):void b(o,n)}};if(window.addEventListener?window.addEventListener("message",i,!1):window.attachEvent&&window.attachEvent("onmessage",i),"IFRAME"!==o.element.nodeName){var a=f(e,n),l=p(a);d(l,a).then(function(t){var n=h(t,e);return o.element=n,s(e,n),t})["catch"](function(t){return r(t)})}});return C.set(this,i),E.set(this.element,this),"IFRAME"===this.element.nodeName&&g(this,"ping"),this}return t.prototype.then=function(t){var e=arguments.length<=1||void 0===arguments[1]?function(){}:arguments[1];return this.ready().then(t,e)},t.prototype.callMethod=function(t){var e=this,o=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return new _(function(r,i){return e.ready().then(function(){n(e,t,{resolve:r,reject:i}),g(e,t,o)})})},t.prototype.get=function(t){var e=this;return new _(function(o,r){return t=a(t,"get"),e.ready().then(function(){n(e,t,{resolve:o,reject:r}),g(e,t)})})},t.prototype.set=function(t,e){var o=this;return _.resolve(e).then(function(e){if(t=a(t,"set"),void 0===e||null===e)throw new TypeError("There must be a value to set.");return o.ready().then(function(){return new _(function(r,i){n(o,t,{resolve:r,reject:i}),g(o,t,e)})})})},t.prototype.on=function(t,e){if(!t)throw new TypeError("You must pass an event name.");if(!e)throw new TypeError("You must pass a callback function.");if("function"!=typeof e)throw new TypeError("The callback must be a function.");var o=r(this,"event:"+t);0===o.length&&this.callMethod("addEventListener",t)["catch"](function(){}),n(this,"event:"+t,e)},t.prototype.off=function(t,e){if(!t)throw new TypeError("You must pass an event name.");if(e&&"function"!=typeof e)throw new TypeError("The callback must be a function.");var o=i(this,"event:"+t,e);o&&this.callMethod("removeEventListener",t)["catch"](function(t){})},t.prototype.loadVideo=function(t){return this.callMethod("loadVideo",t)},t.prototype.ready=function(){var t=C.get(this);return _.resolve(t)},t.prototype.enableTextTrack=function(t,e){if(!t)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:t,kind:e})},t.prototype.disableTextTrack=function(){return this.callMethod("disableTextTrack")},t.prototype.pause=function(){return this.callMethod("pause")},t.prototype.play=function(){return this.callMethod("play")},t.prototype.unload=function(){return this.callMethod("unload")},t.prototype.getAutopause=function(){return this.get("autopause")},t.prototype.setAutopause=function(t){return this.set("autopause",t)},t.prototype.getColor=function(){return this.get("color")},t.prototype.setColor=function(t){return this.set("color",t)},t.prototype.getCurrentTime=function(){return this.get("currentTime")},t.prototype.setCurrentTime=function(t){return this.set("currentTime",t)},t.prototype.getDuration=function(){return this.get("duration")},t.prototype.getEnded=function(){return this.get("ended")},t.prototype.getLoop=function(){return this.get("loop")},t.prototype.setLoop=function(t){return this.set("loop",t)},t.prototype.getPaused=function(){return this.get("paused")},t.prototype.getTextTracks=function(){return this.get("textTracks")},t.prototype.getVideoEmbedCode=function(){return this.get("videoEmbedCode")},t.prototype.getVideoId=function(){return this.get("videoId")},t.prototype.getVideoTitle=function(){return this.get("videoTitle")},t.prototype.getVideoWidth=function(){return this.get("videoWidth")},t.prototype.getVideoHeight=function(){return this.get("videoHeight")},t.prototype.getVideoUrl=function(){return this.get("videoUrl")},t.prototype.getVolume=function(){return this.get("volume")},t.prototype.setVolume=function(t){return this.set("volume",t)},t}();return v(),S})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,o){(function(e){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(){if(!h){h=!0;var t="\n .vjs-vimeo iframe {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n ",e=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t)),e.appendChild(o)}}o.__esModule=!0;var l="undefined"!=typeof window?window.videojs:"undefined"!=typeof e?e.videojs:null,u=n(l),c=t("@vimeo/player"),p=n(c),f=u["default"].getComponent("Component"),d=u["default"].getComponent("Tech"),h=!1,v=function(t){function e(o,n){r(this,e);var s=i(this,t.call(this,o,n));return a(),s.setPoster(o.poster),s.initVimeoPlayer(),s}return s(e,t),e.prototype.initVimeoPlayer=function(){var t=this,e={url:this.options_.source.src,byline:!1,portrait:!1,title:!1};this.options_.autoplay&&(e.autoplay=!0),this.options_.height&&(e.height=this.options_.height),this.options_.width&&(e.width=this.options_.width),this.options_.maxheight&&(e.maxheight=this.options_.maxheight),this.options_.maxwidth&&(e.maxwidth=this.options_.maxwidth),this.options_.loop&&(e.loop=this.options_.loop),this._player=new p["default"](this.el(),e),this.initVimeoState(),["play","pause","ended","timeupdate","progress","seeked"].forEach(function(e){t._player.on(e,function(o){t._vimeoState.progress.duration!=o.duration&&t.trigger("durationchange"),t._vimeoState.progress=o,t.trigger(e)})}),this._player.on("pause",function(){return t._vimeoState.playing=!1}),this._player.on("play",function(){t._vimeoState.playing=!0,t._vimeoState.ended=!1}),this._player.on("ended",function(){t._vimeoState.playing=!1,t._vimeoState.ended=!0}),this._player.on("volumechange",function(e){return t._vimeoState.volume=e}),this._player.on("error",function(e){return t.trigger("error",e)}),this.triggerReady()},e.prototype.initVimeoState=function(){var t=this._vimeoState={ended:!1,playing:!1,volume:0,progress:{seconds:0,percent:0,duration:0}};this._player.getCurrentTime().then(function(e){return t.progress.seconds=e}),this._player.getDuration().then(function(e){return t.progress.duration=e}),this._player.getPaused().then(function(e){return t.playing=!e}),this._player.getVolume().then(function(e){return t.volume=e})},e.prototype.createEl=function(){var t=u["default"].createEl("div",{id:this.options_.techId});return t.style.cssText="width:100%;height:100%;top:0;left:0;position:absolute",t.className="vjs-vimeo",t},e.prototype.controls=function(){return!0},e.prototype.supportsFullScreen=function(){return!0},e.prototype.src=function(){return this.options_.source},e.prototype.currentSrc=function(){return this.options_.source.src},e.prototype.currentTime=function(){return this._vimeoState.progress.seconds},e.prototype.setCurrentTime=function(t){this._player.setCurrentTime(t)},e.prototype.volume=function(){return this._vimeoState.volume},e.prototype.setVolume=function(t){return this._player.setVolume(volume)},e.prototype.duration=function(){return this._vimeoState.progress.duration},e.prototype.buffered=function(){var t=this._vimeoState.progress;return u["default"].createTimeRange(0,t.percent*t.duration)},e.prototype.paused=function(){return!this._vimeoState.playing},e.prototype.pause=function(){this._player.pause()},e.prototype.play=function(){this._player.play()},e.prototype.muted=function(){return 0===this._vimeoState.volume},e.prototype.ended=function(){return this._vimeoState.ended},e}(d);v.prototype.featuresTimeupdateEvents=!0,v.isSupported=function(){return!0},d.withSourceHandlers(v),v.nativeSourceHandler={},v.nativeSourceHandler.canPlayType=function(t){return"video/vimeo"===t?"maybe":""},v.nativeSourceHandler.canHandleSource=function(t){return t.type?v.nativeSourceHandler.canPlayType(t.type):t.src?v.nativeSourceHandler.canPlayType(t.src):""},v.nativeSourceHandler.handleSource=function(t,e){e.src(t.src)},v.nativeSourceHandler.dispose=function(){},v.registerSourceHandler(v.nativeSourceHandler),f.registerComponent("Vimeo",v),d.registerTech("Vimeo",v),v.VERSION="0.0.1",o["default"]=v}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"@vimeo/player":1}]},{},[2])(2)});var _createClass=function(){function t(t,e){for(var o=0;o=0;o--)e[o].src==t&&("hd"!==e[o]["data-quality"]?this.currentRes="sd":this.currentRes="hd")}},{key:"setResolutionsNeededFromPlayer",value:function(){if(this.resolutionsNeeded=!1,"object"==typeof this.typeAndTech){var t=this.typeAndTech.type;if(void 0!==this.sourcesByType[t]&&this.sourcesByType[t].length>1)for(var e=this.sourcesByType[t].length-1;e>=0;e--)if(void 0!==this.sourcesByType[t][e]["data-quality"]||this.sourcesByType[t][e]["data-quality"]!=this.currentRes)return void(this.resolutionsNeeded=!0)}}},{key:"removeSources",value:function(){var t=this.player_.el_.getElementsByTagName("video")[0];if("Html5"===this.player_.techName_&&t)for(var e=t.getElementsByTagName("source"),o=0;o=0;r--){var i=t[r].src;if(void 0!==i&&""!==i){if(i.search(/^\/\//)!=-1)i=o+i;else{if(i.search(/:\/\//)!=-1)continue;i=i.search(/^\//)!=-1?n+i:e+i}t[r].src=i}}return t}},{key:"getSourceForResolutionChange",value:function(){for(var t=this.typeAndTech.type,e=this.sourcesByType[t],o=e.length-1;o>=0;o--)if("hd"==this.currentRes){if(void 0==e[o]["data-quality"]||"hd"!==e[o]["data-quality"])return e[o]}else if("hd"==e[o]["data-quality"])return e[o];return e[0]}},{key:"switchResolution",value:function(){var t=this.getSourceForResolutionChange();this.switchSource(t)}},{key:"stopStream",value:function(){switch(this.player_.techName_){case"Flash":this.player_.tech_.el_.vjs_stop()}}},{key:"selectSource",value:function(t){this.removeSources();var e=this.sourcesByType,o=this.selectTypeAndTech(t);return!!o&&(this.options_.sourceResolutions=e[o.type],this.selectResolution(this.options_.sourceResolutions))}},{key:"selectTypeAndTech",value:function(t){for(var e,o,n=0,r=this.player_.options_.techOrder;ni?i:n;return t[s]}},{key:"switchSource",value:function(t){if(this.player_.cache_.src===t.src)return this.player_.trigger("resolutionchange"),this.player_;var e=this.player_.currentTime(),o=this.player_.paused();this.player_.pause(),this.stopStream(),"Html5"===this.player_.techName_?this.player_.src(t.src):this.player_.loadTech(this.player_.techName_,{src:t.src});var n=this;this.player_.ready(function(){this.player_.one("loadeddata",videojs.bind(this.player_,function(){this.player_.currentTime(e)})),this.player_.trigger("resolutionchange"),o||(this.player_.load(),this.player_.play()),localStorage.setItem("videojs_preferred_res",parseInt(t.index,10)),n.setCurrentResFromPlayer(),n.updateButton()})}},{key:"updateButton",value:function(){var t=this.prepareButtonElement(this.el_);this.resolutionsNeeded?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden"),"hd"==this.currentRes?t.addClass("vjs-ag-res-hd"):t.removeClass("vjs-ag-res-hd"),this.el_.blur()}},{key:"prepareButtonElement",value:function(t){return"function"!=typeof t.addClass&&(t.addClass=function(t){if(this.classList)this.classList.add(t);else if(-1==this.className.indexOf(t)){var e=this.className.split(" ");e.push(t),this.className=e.join(" ")}return this}),"function"!=typeof t.removeClass&&(t.removeClass=function(t){if(this.classList)this.classList.remove(t);else{var e=this.className.split(" "); +e.splice(e.indexOf(t),1),this.className=e.join(" ")}return this}),t}}]),e}(VjsButtonResBBase);videojs.reduce=function(t,e,o,n){if(t&&0!==t.length){for(var r=0,i=t.length;r=0;e--)this.players[e].id===t&&this.players[e].getPlayer().play();for(var e=this.lightboxtriggers.length-1;e>=0;e--)this.lightboxtriggers[e].playerid===t&&this.lightboxtriggers[e].trigger()}},{key:"getPlayer",value:function(t){for(var e=this.players.length-1;e>=0;e--)if(this.players[e].id===t)return this.players[e].getPlayer();for(var e=this.lightboxtriggers.length-1;e>=0;e--)if(this.lightboxtriggers[e].playerid===t)return this.lightboxtriggers[e].getPlayer();return!1}},{key:"destroyPlayer",value:function(t){for(var e=this.players.length-1;e>=0;e--)if(this.players[e].id===t)return this.players[e].destroy(),this.players.splice(e,1),!0;for(var e=this.lightboxtriggers.length-1;e>=0;e--)if(this.lightboxtriggers[e].playerid===t)return this.closeLightbox(),!0;return!1}},{key:"closeLightbox",value:function(){for(var t=this.lightboxtriggers.length-1;t>=0;t--)this.lightboxtriggers[t].closeLightbox();this.consolidatePlayers()}},{key:"consolidatePlayers",value:function(){for(var t=this.players.length-1;t>=0;t--)void 0===this.players[t]||this.players[t].alive||(delete this.players[t],this.players=this.players.filter(function(){return!0}))}},{key:"configureVideoJS",value:function(){window.HELP_IMPROVE_VIDEOJS=!1}}]),t}();o["default"]=v,e.exports=o["default"]},{"./components/Eventbus":3,"./components/Lightbox":4,"./components/LightboxTrigger":5,"./components/Player":6,"./lib/DOMElement":7}],2:[function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(o,"__esModule",{value:!0});var i=function(){function t(t,e){for(var o=0;o=8&&t.ie().actualVersion<=11?this.options.youtube={ytControls:2,color:"white",modestbranding:1}:this.options.youtube={iv_load_policy:3,modestbranding:1}}},{key:"setVimeoOptions",value:function(){this.options.techOrder=["vimeo"],this.options.sources=[{type:"video/vimeo",src:"https://vimeo.com/"+this.getPlayerAttributeFromVideoElement("vimeo-id")}]}},{key:"getSkinClass",value:function(){var t="vjs-afterglow-skin";"afterglow"!==this.skin&&(t+=" afterglow-skin-"+this.skin);var e=new a["default"];return 9==e.ie().actualVersion&&(t+=" ie9-is-bad"),t}}]),t}();o["default"]=l,e.exports=o["default"]},{"../lib/Util":8}],3:[function(t,e,o){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(o,"__esModule",{value:!0});var r=function(){function t(t,e){for(var o=0;ot?("undefined"!=typeof e&&e<.9*o.width?o.playerwidth=e:o.playerwidth=.9*o.width,o.playerheight=o.playerwidth*t):("undefined"!=typeof e&&e<.92*o.height/t?o.playerheight=e*t:o.playerheight=.92*o.height,o.playerwidth=o.playerheight/t),o.playeroffsettop=(o.height-o.playerheight)/2,o.playeroffsetleft=(o.width-o.playerwidth)/2,o}},{key:"close",value:function(){this.player.destroy(!0),this.node.parentNode.removeChild(this.node),this.emit("close")}},{key:"getPlayer",value:function(){if(void 0!==this.player)return this.player.getPlayer()}}]),e}(d["default"]);o["default"]=y,e.exports=o["default"]},{"../../../../vendor/Emitter/Emitter":10,"../lib/DOMElement":7,"../lib/Util":8,"./Player":6}],5:[function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(o,"__esModule",{value:!0});var s=function(){function t(t,e){for(var o=0;o=8&&o<=11&&this.videoelement.addClass("vjs-IE")}},{key:"applyParameters",value:function(){if("false"==this.videoelement.getAttribute("data-overscale")&&this.videoelement.setAttribute("data-maxwidth",this.videoelement.getAttribute("width")),"none"!=this.videoelement.getAttribute("data-autoresize")&&"false"!=this.videoelement.getAttribute("data-autoresize")){this.videoelement.addClass("vjs-responsive");var t=this.calculateRatio();this.videoelement.node.style.paddingTop=100*t+"%",this.videoelement.removeAttribute("height"),this.videoelement.removeAttribute("width"),this.videoelement.setAttribute("data-ratio",t)}}},{key:"applyYoutubeClasses",value:function(){this.videoelement.addClass("vjs-youtube"),this.videoelement.addClass("vjs-youtube-headstart"),document.querySelector("video").controls&&this.videoelement.addClass("vjs-using-native-controls"),/iPad|iPhone|iPod|iOS/.test(navigator.platform)&&this.videoelement.addClass("vjs-iOS");var t=this.util.ie().actualVersion;t>=8&&t<=11&&this.videoelement.addClass("vjs-using-native-controls")}},{key:"applyVimeoClasses",value:function(){this.videoelement.addClass("vjs-vimeo")}},{key:"calculateRatio",value:function(){if(this.videoelement.getAttribute("data-ratio"))var t=this.videoelement.getAttribute("data-ratio");else{if(!this.videoelement.getAttribute("height")||!this.videoelement.getAttribute("width"))return console.error("Please provide witdh and height for your video element."),0;var t=this.videoelement.getAttribute("height")/this.videoelement.getAttribute("width")}return parseFloat(t)}},{key:"getSkinName",value:function(){return this.videoelement.getAttribute("data-skin")?this.videoelement.getAttribute("data-skin"):"afterglow"}},{key:"destroy",value:function(){this.videojs.paused()||this.videojs.pause(),this.videojs.isFullscreen()&&this.videojs.exitFullscreen(),this.videojs.dispose(),this.alive=!1}},{key:"getPlayer",value:function(){return this.videojs}}]),t}();o["default"]=c,e.exports=o["default"]},{"../lib/Util":8,"./Config":2}],7:[function(t,e,o){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(o,"__esModule",{value:!0});var r=function(){function t(t,e){for(var o=0;o0&&!/x64|x32/gi.test(window.navigator.userAgent)&&(t={isTheBrowser:!0,actualVersion:"11"}),t}},{key:"isMobile",value:function(){var t=function(){return navigator.userAgent.match(/Android/i)},e=function(){return navigator.userAgent.match(/BlackBerry/i)},o=function(){return navigator.userAgent.match(/iPhone|iPad|iPod/i)},n=function(){return navigator.userAgent.match(/Opera Mini/i)},r=function(){return navigator.userAgent.match(/IEMobile/i)};return!!(t()||e()||o()||n()||r())}},{key:"merge_objects",value:function(t,e){var o={};for(var n in t)o[n]=t[n];for(var n in e)o[n]=e[n];return o}},{key:"addEventListener",value:function(t,e,o){null!=t&&"undefined"!=typeof t&&(t.addEventListener?t.addEventListener(e,o,!1):t.attachEvent?t.attachEvent("on"+e,o):t["on"+e]=o)}}]),t}();o["default"]=i,e.exports=o["default"]},{}],9:[function(t,e,o){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}var r=t("./afterglow/Afterglow"),i=n(r);window.afterglow=new i["default"],document.addEventListener("DOMContentLoaded",function(){window.afterglow.init()})},{"./afterglow/Afterglow":1}],10:[function(t,e,o){"use strict";function n(t){if(t)return r(t)}function r(t){for(var e in n.prototype)t[e]=n.prototype[e];return t}e.exports=n,n.prototype.on=n.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},n.prototype.once=function(t,e){function o(){this.off(t,o),e.apply(this,arguments)}return o.fn=e,this.on(t,o),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var o=this._callbacks["$"+t];if(!o)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var n,r=0;r + + + + afterglow development sandbox + + + + + + + +

This is just a sandbox for development.

+ + + + +

Youtube opened in lightbox

+ Open the lightbox + + + +

Vimeo opened in lightbox

+ Open the lightbox + + + \ No newline at end of file diff --git a/sandbox/test_101.html b/sandbox/test_101.html index eb223e4..6b4deca 100644 --- a/sandbox/test_101.html +++ b/sandbox/test_101.html @@ -37,5 +37,12 @@

Local video, single source, with poster and bound play event

Test 2 + + + + +

Vimeo opened in lightbox

+ Open the lightbox + \ No newline at end of file diff --git a/vendor/videojs/plugins/Youtube.js b/vendor/videojs/plugins/Youtube.js index cf390ac..6de9353 100755 --- a/vendor/videojs/plugins/Youtube.js +++ b/vendor/videojs/plugins/Youtube.js @@ -39,10 +39,8 @@ THE SOFTWARE. */ var Youtube = videojs.extend(Tech, { constructor: function(options, ready) { - if (typeof document !== 'undefined'){ - loadScript('https://www.youtube.com/iframe_api', apiLoaded); - injectCss(); - } + loadScript('https://www.youtube.com/iframe_api', apiLoaded); + Tech.call(this, options, ready); this.setPoster(options.poster); @@ -739,6 +737,10 @@ THE SOFTWARE. */ Youtube.apiReadyQueue = []; + if (typeof document !== 'undefined'){ + injectCss(); + } + // Older versions of VJS5 doesn't have the registerTech function if (typeof videojs.registerTech !== 'undefined') { videojs.registerTech('Youtube', Youtube); diff --git a/vendor/videojs/plugins/videojs-vimeo.js b/vendor/videojs/plugins/videojs-vimeo.js index 87717e3..2d1b272 100644 --- a/vendor/videojs/plugins/videojs-vimeo.js +++ b/vendor/videojs/plugins/videojs-vimeo.js @@ -1 +1,316 @@ -!function e(t,n,o){function r(a,u){if(!n[a]){if(!t[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[a]={exports:{}};t[a][0].call(f.exports,function(e){var n=t[a][1][e];return r(n?n:e)},f,f.exports,e,t,n,o)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a=n.length)break;i=n[r++]}else{if(r=n.next(),r.done)break;i=r.value}var a=i,u=e.getAttribute("data-vimeo-"+a);(u||""===u)&&(t[a]=""===u?1:u)}return t}function p(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return new Promise(function(n,o){if(!c(e))throw new TypeError("“"+e+"” is not a vimeo.com url.");var r="https://vimeo.com/api/oembed.json?url="+encodeURIComponent(e);for(var i in t)t.hasOwnProperty(i)&&(r+="&"+i+"="+encodeURIComponent(t[i]));var a="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;a.open("GET",r,!0),a.onload=function(){if(404===a.status)return void o(new Error("“"+e+"” was not found."));if(403===a.status)return void o(new Error("“"+e+"” is not embeddable."));try{var t=JSON.parse(a.responseText);n(t)}catch(e){o(e)}},a.onerror=function(){var e=a.status?" ("+a.status+")":"";o(new Error("There was an error fetching the embed code from Vimeo"+e+"."))},a.send()})}function h(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 o=document.createElement("div");return o.innerHTML=n,t.appendChild(o.firstChild),t.setAttribute("data-vimeo-initialized","true"),t.querySelector("iframe")}function d(){var e=arguments.length<=0||void 0===arguments[0]?document:arguments[0],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)},o=function(){if(i){if(a>=r.length)return"break";u=r[a++]}else{if(a=r.next(),a.done)return"break";u=a.value}var e=u;try{if(null!==e.getAttribute("data-vimeo-defer"))return"continue";var t=l(e),o=f(t);p(o,t).then(function(t){return h(t,e)}).catch(n)}catch(e){n(e)}};e:for(var r=t,i=Array.isArray(r),a=0,r=i?r:r[Symbol.iterator]();;){var u,s=o();switch(s){case"break":break e;case"continue":continue}}}function y(e){return"string"==typeof e&&(e=JSON.parse(e)),e}function v(e,t,n){if(e.element.contentWindow.postMessage){var o={method:t};void 0!==n&&(o.value=n);var r=parseFloat(navigator.userAgent.toLowerCase().replace(/^.*msie (\d+).*$/,"$1"));r>=8&&r<10&&(o=JSON.stringify(o)),e.element.contentWindow.postMessage(o,e.origin)}}function m(e,t){t=y(t);var n=[],i=void 0;if(t.event){if("error"===t.event)for(var a=o(e,t.data.method),u=a,s=Array.isArray(u),c=0,u=s?u:u[Symbol.iterator]();;){var f;if(s){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var l=f,p=new Error(t.data.message);p.name=t.data.name,l.reject(p),r(e,t.data.method,l)}n=o(e,"event:"+t.event),i=t.data}else t.method&&(n=o(e,t.method),i=t.value,r(e,t.method));for(var h=n,d=Array.isArray(h),v=0,h=d?h:h[Symbol.iterator]();;){var m;if(d){if(v>=h.length)break;m=h[v++]}else{if(v=h.next(),v.done)break;m=v.value}var g=m;try{if("function"==typeof g){g.call(e,i);continue}g.resolve(i)}catch(e){}}}var g="undefined"!=typeof Array.prototype.indexOf,w="undefined"!=typeof window.postMessage;if(!g||!w)throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var _="undefined"!=typeof window?window:"undefined"!=typeof e?e:"undefined"!=typeof self?self:{},b=(t(function(e,t){!function(e){function t(e,t){function o(e){return this&&this.constructor===o?(this._keys=[],this._values=[],this._itp=[],this.objectOnly=t,void(e&&n.call(this,e))):new o(e)}return t||w(e,"size",{get:v}),e.constructor=o,o.prototype=e,o}function n(e){this.add?e.forEach(this.add,this):e.forEach(function(e){this.set(e[0],e[1])},this)}function o(e){return this.has(e)&&(this._keys.splice(g,1),this._values.splice(g,1),this._itp.forEach(function(e){g0&&e(n,s))}catch(e){i.call(new u(s),e)}}}function i(t){var o=this;o.triggered||(o.triggered=!0,o.def&&(o=o.def),o.msg=t,o.state=2,o.chain.length>0&&e(n,o))}function a(e,t,n,o){for(var r=0;r1&&window.console&&console.warn&&console.warn("A jQuery object with multiple elements was passed, using the first element."),t=t[0]),"string"==typeof t&&(t=document.getElementById(t)),!u(t))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==t.nodeName){var r=t.querySelector("iframe");r&&(t=r)}if("IFRAME"===t.nodeName&&!c(t.getAttribute("src")||""))throw new Error("The player element passed isn’t a Vimeo embed.");if(k.has(t))return k.get(t);this.element=t,this.origin="*";var a=new T(function(e,r){var a=function(t){if(c(t.origin)&&n.element.contentWindow===t.source){"*"===n.origin&&(n.origin=t.origin);var o=y(t.data),r="event"in o&&"ready"===o.event,i="method"in o&&"ping"===o.method;return r||i?(n.element.setAttribute("data-ready","true"),void e()):void m(n,o)}};if(window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent&&window.attachEvent("onmessage",a),"IFRAME"!==n.element.nodeName){var u=l(t,o),s=f(u);p(s,u).then(function(e){var o=h(e,t);return n.element=o,i(t,o),e}).catch(function(e){return r(e)})}});return j.set(this,a),k.set(this.element,this),"IFRAME"===this.element.nodeName&&v(this,"ping"),this}return e.prototype.then=function(e){var t=arguments.length<=1||void 0===arguments[1]?function(){}:arguments[1];return this.ready().then(e,t)},e.prototype.callMethod=function(e){var t=this,o=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return new T(function(r,i){return t.ready().then(function(){n(t,e,{resolve:r,reject:i}),v(t,e,o)})})},e.prototype.get=function(e){var t=this;return new T(function(o,r){return e=a(e,"get"),t.ready().then(function(){n(t,e,{resolve:o,reject:r}),v(t,e)})})},e.prototype.set=function(e,t){var o=this;return T.resolve(t).then(function(t){if(e=a(e,"set"),void 0===t||null===t)throw new TypeError("There must be a value to set.");return o.ready().then(function(){return new T(function(r,i){n(o,e,{resolve:r,reject:i}),v(o,e,t)})})})},e.prototype.on=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.");var r=o(this,"event:"+e);0===r.length&&this.callMethod("addEventListener",e).catch(function(){}),n(this,"event:"+e,t)},e.prototype.off=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.");var n=r(this,"event:"+e,t);n&&this.callMethod("removeEventListener",e).catch(function(e){})},e.prototype.loadVideo=function(e){return this.callMethod("loadVideo",e)},e.prototype.ready=function(){var e=j.get(this);return T.resolve(e)},e.prototype.enableTextTrack=function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})},e.prototype.disableTextTrack=function(){return this.callMethod("disableTextTrack")},e.prototype.pause=function(){return this.callMethod("pause")},e.prototype.play=function(){return this.callMethod("play")},e.prototype.unload=function(){return this.callMethod("unload")},e.prototype.getAutopause=function(){return this.get("autopause")},e.prototype.setAutopause=function(e){return this.set("autopause",e)},e.prototype.getColor=function(){return this.get("color")},e.prototype.setColor=function(e){return this.set("color",e)},e.prototype.getCurrentTime=function(){return this.get("currentTime")},e.prototype.setCurrentTime=function(e){return this.set("currentTime",e)},e.prototype.getDuration=function(){return this.get("duration")},e.prototype.getEnded=function(){return this.get("ended")},e.prototype.getLoop=function(){return this.get("loop")},e.prototype.setLoop=function(e){return this.set("loop",e)},e.prototype.getPaused=function(){return this.get("paused")},e.prototype.getTextTracks=function(){return this.get("textTracks")},e.prototype.getVideoEmbedCode=function(){return this.get("videoEmbedCode")},e.prototype.getVideoId=function(){return this.get("videoId")},e.prototype.getVideoTitle=function(){return this.get("videoTitle")},e.prototype.getVideoWidth=function(){return this.get("videoWidth")},e.prototype.getVideoHeight=function(){return this.get("videoHeight")},e.prototype.getVideoUrl=function(){return this.get("videoUrl")},e.prototype.getVolume=function(){return this.get("volume")},e.prototype.setVolume=function(e){return this.set("volume",e)},e}();return d(),M})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){(function(t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(){if(!d){d=!0;var e="\n .vjs-vimeo iframe {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n ",t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n)}}n.__esModule=!0;var s="undefined"!=typeof window?window.videojs:"undefined"!=typeof t?t.videojs:null,c=o(s),f=e(1),l=o(f),p=c.default.getComponent("Component"),h=c.default.getComponent("Tech"),d=!1,y=function(e){function t(n,o){r(this,t);var a=i(this,e.call(this,n,o));return u(),a.setPoster(n.poster),a.initVimeoPlayer(),a}return a(t,e),t.prototype.initVimeoPlayer=function(){var e=this,t={url:this.options_.source.src,byline:!1,portrait:!1,title:!1};this.options_.autoplay&&(t.autoplay=!0),this.options_.height&&(t.height=this.options_.height),this.options_.width&&(t.width=this.options_.width),this.options_.maxheight&&(t.maxheight=this.options_.maxheight),this.options_.maxwidth&&(t.maxwidth=this.options_.maxwidth),this.options_.loop&&(t.loop=this.options_.loop),this._player=new l.default(this.el(),t),this.initVimeoState(),["play","pause","ended","timeupdate","progress","seeked"].forEach(function(t){e._player.on(t,function(n){e._vimeoState.progress.duration!=n.duration&&e.trigger("durationchange"),e._vimeoState.progress=n,e.trigger(t)})}),this._player.on("pause",function(){return e._vimeoState.playing=!1}),this._player.on("play",function(){e._vimeoState.playing=!0,e._vimeoState.ended=!1}),this._player.on("ended",function(){e._vimeoState.playing=!1,e._vimeoState.ended=!0}),this._player.on("volumechange",function(t){return e._vimeoState.volume=t}),this._player.on("error",function(t){return e.trigger("error",t)}),this.triggerReady()},t.prototype.initVimeoState=function(){var e=this._vimeoState={ended:!1,playing:!1,volume:0,progress:{seconds:0,percent:0,duration:0}};this._player.getCurrentTime().then(function(t){return e.progress.seconds=t}),this._player.getDuration().then(function(t){return e.progress.duration=t}),this._player.getPaused().then(function(t){return e.playing=!t}),this._player.getVolume().then(function(t){return e.volume=t})},t.prototype.createEl=function(){var e=c.default.createEl("div",{id:this.options_.techId});return e.style.cssText="width:100%;height:100%;top:0;left:0;position:absolute",e.className="vjs-vimeo",e},t.prototype.controls=function(){return!0},t.prototype.supportsFullScreen=function(){return!0},t.prototype.src=function(){return this.options_.source},t.prototype.currentSrc=function(){return this.options_.source.src},t.prototype.currentTime=function(){return this._vimeoState.progress.seconds},t.prototype.setCurrentTime=function(e){this._player.setCurrentTime(e)},t.prototype.volume=function(){return this._vimeoState.volume},t.prototype.setVolume=function(e){return this._player.setVolume(volume)},t.prototype.duration=function(){return this._vimeoState.progress.duration},t.prototype.buffered=function(){var e=this._vimeoState.progress;return c.default.createTimeRange(0,e.percent*e.duration)},t.prototype.paused=function(){return!this._vimeoState.playing},t.prototype.pause=function(){this._player.pause()},t.prototype.play=function(){this._player.play()},t.prototype.muted=function(){return 0===this._vimeoState.volume},t.prototype.ended=function(){return this._vimeoState.ended},t}(h);y.prototype.featuresTimeupdateEvents=!0,y.isSupported=function(){return!0},h.withSourceHandlers(y),y.nativeSourceHandler={},y.nativeSourceHandler.canPlayType=function(e){return"video/vimeo"===e?"maybe":""},y.nativeSourceHandler.canHandleSource=function(e){return e.type?y.nativeSourceHandler.canPlayType(e.type):e.src?y.nativeSourceHandler.canPlayType(e.src):""},y.nativeSourceHandler.handleSource=function(e,t){t.src(e.src)},y.nativeSourceHandler.dispose=function(){},y.registerSourceHandler(y.nativeSourceHandler),p.registerComponent("Vimeo",y),h.registerTech("Vimeo",y),y.VERSION="0.0.1",n.default=y}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[2]); \ No newline at end of file +/** + * videojs-vimeo + * @version 3.0.0 + * @copyright 2016 Benoit Tremblay + * @license MIT + */ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.videojsVimeo = f()}})(function(){var define,module,exports;return (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=n.length)break;i=n[o++]}else{if(o=n.next(),o.done)break;i=o.value}var a=i,u=e.getAttribute("data-vimeo-"+a);(u||""===u)&&(t[a]=""===u?1:u)}return t}function l(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return new Promise(function(n,r){if(!s(e))throw new TypeError("“"+e+"” is not a vimeo.com url.");var o="https://vimeo.com/api/oembed.json?url="+encodeURIComponent(e);for(var i in t)t.hasOwnProperty(i)&&(o+="&"+i+"="+encodeURIComponent(t[i]));var a="XDomainRequest"in window?new XDomainRequest:new XMLHttpRequest;a.open("GET",o,!0),a.onload=function(){if(404===a.status)return void r(new Error("“"+e+"” was not found."));if(403===a.status)return void r(new Error("“"+e+"” is not embeddable."));try{var t=JSON.parse(a.responseText);n(t)}catch(e){r(e)}},a.onerror=function(){var e=a.status?" ("+a.status+")":"";r(new Error("There was an error fetching the embed code from Vimeo"+e+"."))},a.send()})}function h(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 d(){var e=arguments.length<=0||void 0===arguments[0]?document:arguments[0],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)},r=function(){if(i){if(a>=o.length)return"break";u=o[a++]}else{if(a=o.next(),a.done)return"break";u=a.value}var e=u;try{if(null!==e.getAttribute("data-vimeo-defer"))return"continue";var t=f(e),r=c(t);l(r,t).then(function(t){return h(t,e)}).catch(n)}catch(e){n(e)}};e:for(var o=t,i=Array.isArray(o),a=0,o=i?o:o[Symbol.iterator]();;){var u,s=r();switch(s){case"break":break e;case"continue":continue}}}function p(e){return"string"==typeof e&&(e=JSON.parse(e)),e}function v(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=p(t);var o=[],i=void 0;if(t.event){if("error"===t.event)for(var a=n(e,t.data.method),u=a,s=Array.isArray(u),c=0,u=s?u:u[Symbol.iterator]();;){var f;if(s){if(c>=u.length)break;f=u[c++]}else{if(c=u.next(),c.done)break;f=c.value}var l=f,h=new Error(t.data.message);h.name=t.data.name,l.reject(h),r(e,t.data.method,l)}o=n(e,"event:"+t.event),i=t.data}else t.method&&(o=n(e,t.method),i=t.value,r(e,t.method));for(var d=o,v=Array.isArray(d),y=0,d=v?d:d[Symbol.iterator]();;){var m;if(v){if(y>=d.length)break;m=d[y++]}else{if(y=d.next(),y.done)break;m=y.value}var g=m;try{if("function"==typeof g){g.call(e,i);continue}g.resolve(i)}catch(e){}}}var m="undefined"!=typeof Array.prototype.indexOf,g="undefined"!=typeof window.postMessage;if(!m||!g)throw new Error("Sorry, the Vimeo Player API is not available in this browser.");var w="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},b=(e(function(e,t){!function(e){function t(e,t){function r(e){return this&&this.constructor===r?(this._keys=[],this._values=[],this._itp=[],this.objectOnly=t,void(e&&n.call(this,e))):new r(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(n,s))}catch(e){i.call(new u(s),e)}}}function i(t){var r=this;r.triggered||(r.triggered=!0,r.def&&(r=r.def),r.msg=t,r.state=2,r.chain.length>0&&e(n,r))}function a(e,t,n,r){for(var o=0;o1&&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)),!a(e))throw new TypeError("You must pass either a valid element or a valid id.");if("IFRAME"!==e.nodeName){var r=e.querySelector("iframe");r&&(e=r)}if("IFRAME"===e.nodeName&&!s(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 i=new E(function(r,i){var a=function(e){if(s(e.origin)&&t.element.contentWindow===e.source){"*"===t.origin&&(t.origin=e.origin);var n=p(e.data),o="event"in n&&"ready"===n.event,i="method"in n&&"ping"===n.method;return o||i?(t.element.setAttribute("data-ready","true"),void r()):void y(t,n)}};if(window.addEventListener?window.addEventListener("message",a,!1):window.attachEvent&&window.attachEvent("onmessage",a),"IFRAME"!==t.element.nodeName){var u=f(e,n),d=c(u);l(d,u).then(function(n){var r=h(n,e);return t.element=r,o(e,r),n}).catch(function(e){return i(e)})}});return j.set(this,i),x.set(this.element,this),"IFRAME"===this.element.nodeName&&v(this,"ping"),this}return Player.prototype.then=function(e){var t=arguments.length<=1||void 0===arguments[1]?function(){}:arguments[1];return this.ready().then(e,t)},Player.prototype.callMethod=function(e){var n=this,r=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];return new E(function(o,i){return n.ready().then(function(){t(n,e,{resolve:o,reject:i}),v(n,e,r)})})},Player.prototype.get=function(e){var n=this;return new E(function(r,o){return e=i(e,"get"),n.ready().then(function(){t(n,e,{resolve:r,reject:o}),v(n,e)})})},Player.prototype.set=function(e,n){var r=this;return E.resolve(n).then(function(n){if(e=i(e,"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(o,i){t(r,e,{resolve:o,reject:i}),v(r,e,n)})})})},Player.prototype.on=function(e,r){if(!e)throw new TypeError("You must pass an event name.");if(!r)throw new TypeError("You must pass a callback function.");if("function"!=typeof r)throw new TypeError("The callback must be a function.");var o=n(this,"event:"+e);0===o.length&&this.callMethod("addEventListener",e).catch(function(){}),t(this,"event:"+e,r)},Player.prototype.off=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.");var n=r(this,"event:"+e,t);n&&this.callMethod("removeEventListener",e).catch(function(e){})},Player.prototype.loadVideo=function(e){return this.callMethod("loadVideo",e)},Player.prototype.ready=function(){var e=j.get(this);return E.resolve(e)},Player.prototype.enableTextTrack=function(e,t){if(!e)throw new TypeError("You must pass a language.");return this.callMethod("enableTextTrack",{language:e,kind:t})},Player.prototype.disableTextTrack=function(){return this.callMethod("disableTextTrack")},Player.prototype.pause=function(){return this.callMethod("pause")},Player.prototype.play=function(){return this.callMethod("play")},Player.prototype.unload=function(){return this.callMethod("unload")},Player.prototype.getAutopause=function(){return this.get("autopause")},Player.prototype.setAutopause=function(e){return this.set("autopause",e)},Player.prototype.getColor=function(){return this.get("color")},Player.prototype.setColor=function(e){return this.set("color",e)},Player.prototype.getCurrentTime=function(){return this.get("currentTime")},Player.prototype.setCurrentTime=function(e){return this.set("currentTime",e)},Player.prototype.getDuration=function(){return this.get("duration")},Player.prototype.getEnded=function(){return this.get("ended")},Player.prototype.getLoop=function(){return this.get("loop")},Player.prototype.setLoop=function(e){return this.set("loop",e)},Player.prototype.getPaused=function(){return this.get("paused")},Player.prototype.getTextTracks=function(){return this.get("textTracks")},Player.prototype.getVideoEmbedCode=function(){return this.get("videoEmbedCode")},Player.prototype.getVideoId=function(){return this.get("videoId")},Player.prototype.getVideoTitle=function(){return this.get("videoTitle")},Player.prototype.getVideoWidth=function(){return this.get("videoWidth")},Player.prototype.getVideoHeight=function(){return this.get("videoHeight")},Player.prototype.getVideoUrl=function(){return this.get("videoUrl")},Player.prototype.getVolume=function(){return this.get("volume")},Player.prototype.setVolume=function(e){return this.set("volume",e)},Player}();return d(),Player}); +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{}],2:[function(require,module,exports){ +(function (global){ +'use strict'; + +exports.__esModule = true; + +var _video = (typeof window !== "undefined" ? window['videojs'] : typeof global !== "undefined" ? global['videojs'] : null); + +var _video2 = _interopRequireDefault(_video); + +var _player = require('@vimeo/player'); + +var _player2 = _interopRequireDefault(_player); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } + +var Component = _video2.default.getComponent('Component'); +var Tech = _video2.default.getComponent('Tech'); +var cssInjected = false; + +/** + * Vimeo - Wrapper for Video Player API + * + * @param {Object=} options Object of option names and values + * @param {Function=} ready Ready callback function + * @extends Tech + * @class Vimeo + */ + +var Vimeo = function (_Tech) { + _inherits(Vimeo, _Tech); + + function Vimeo(options, ready) { + _classCallCheck(this, Vimeo); + + var _this = _possibleConstructorReturn(this, _Tech.call(this, options, ready)); + + injectCss(); + _this.setPoster(options.poster); + _this.initVimeoPlayer(); + return _this; + } + + Vimeo.prototype.initVimeoPlayer = function initVimeoPlayer() { + var _this2 = this; + + var vimeoOptions = { + url: this.options_.source.src, + byline: false, + portrait: false, + title: false + }; + + if (this.options_.autoplay) { + vimeoOptions.autoplay = true; + } + if (this.options_.height) { + vimeoOptions.height = this.options_.height; + } + if (this.options_.width) { + vimeoOptions.width = this.options_.width; + } + if (this.options_.maxheight) { + vimeoOptions.maxheight = this.options_.maxheight; + } + if (this.options_.maxwidth) { + vimeoOptions.maxwidth = this.options_.maxwidth; + } + if (this.options_.loop) { + vimeoOptions.loop = this.options_.loop; + } + + this._player = new _player2.default(this.el(), vimeoOptions); + this.initVimeoState(); + + ['play', 'pause', 'ended', 'timeupdate', 'progress', 'seeked'].forEach(function (e) { + _this2._player.on(e, function (progress) { + if (_this2._vimeoState.progress.duration != progress.duration) { + _this2.trigger('durationchange'); + } + _this2._vimeoState.progress = progress; + _this2.trigger(e); + }); + }); + + this._player.on('pause', function () { + return _this2._vimeoState.playing = false; + }); + this._player.on('play', function () { + _this2._vimeoState.playing = true; + _this2._vimeoState.ended = false; + }); + this._player.on('ended', function () { + _this2._vimeoState.playing = false; + _this2._vimeoState.ended = true; + }); + this._player.on('volumechange', function (v) { + return _this2._vimeoState.volume = v; + }); + this._player.on('error', function (e) { + return _this2.trigger('error', e); + }); + + this.triggerReady(); + }; + + Vimeo.prototype.initVimeoState = function initVimeoState() { + var state = this._vimeoState = { + ended: false, + playing: false, + volume: 0, + progress: { + seconds: 0, + percent: 0, + duration: 0 + } + }; + + this._player.getCurrentTime().then(function (time) { + return state.progress.seconds = time; + }); + this._player.getDuration().then(function (time) { + return state.progress.duration = time; + }); + this._player.getPaused().then(function (paused) { + return state.playing = !paused; + }); + this._player.getVolume().then(function (volume) { + return state.volume = volume; + }); + }; + + Vimeo.prototype.createEl = function createEl() { + var div = _video2.default.createEl('div', { + id: this.options_.techId + }); + + div.style.cssText = 'width:100%;height:100%;top:0;left:0;position:absolute'; + div.className = 'vjs-vimeo'; + + return div; + }; + + Vimeo.prototype.controls = function controls() { + return true; + }; + + Vimeo.prototype.supportsFullScreen = function supportsFullScreen() { + return true; + }; + + Vimeo.prototype.src = function src() { + // @note: Not sure why this is needed but videojs requires it + return this.options_.source; + }; + + Vimeo.prototype.currentSrc = function currentSrc() { + return this.options_.source.src; + }; + + // @note setSrc is used in other usecases (YouTube, Html) it doesn't seem required here + // setSrc() {} + + Vimeo.prototype.currentTime = function currentTime() { + return this._vimeoState.progress.seconds; + }; + + Vimeo.prototype.setCurrentTime = function setCurrentTime(time) { + this._player.setCurrentTime(time); + }; + + Vimeo.prototype.volume = function volume() { + return this._vimeoState.volume; + }; + + Vimeo.prototype.setVolume = function setVolume(v) { + return this._player.setVolume(volume); + }; + + Vimeo.prototype.duration = function duration() { + return this._vimeoState.progress.duration; + }; + + Vimeo.prototype.buffered = function buffered() { + var progress = this._vimeoState.progress; + return _video2.default.createTimeRange(0, progress.percent * progress.duration); + }; + + Vimeo.prototype.paused = function paused() { + return !this._vimeoState.playing; + }; + + Vimeo.prototype.pause = function pause() { + this._player.pause(); + }; + + Vimeo.prototype.play = function play() { + this._player.play(); + }; + + Vimeo.prototype.muted = function muted() { + return this._vimeoState.volume === 0; + }; + + Vimeo.prototype.ended = function ended() { + return this._vimeoState.ended; + }; + + // Vimeo does has a mute API and native controls aren't being used, + // so setMuted doesn't really make sense and shouldn't be called. + // setMuted(mute) {} + + + return Vimeo; +}(Tech); + +Vimeo.prototype.featuresTimeupdateEvents = true; + +Vimeo.isSupported = function () { + return true; +}; + +// Add Source Handler pattern functions to this tech +Tech.withSourceHandlers(Vimeo); + +Vimeo.nativeSourceHandler = {}; + +/** + * Check if Vimeo can play the given videotype + * @param {String} type The mimetype to check + * @return {String} 'maybe', or '' (empty string) + */ +Vimeo.nativeSourceHandler.canPlayType = function (source) { + if (source === 'video/vimeo') { + return 'maybe'; + } + + return ''; +}; + +/* + * Check Vimeo can handle the source natively + * + * @param {Object} source The source object + * @return {String} 'maybe', or '' (empty string) + * @note: Copied over from YouTube — not sure this is relevant + */ +Vimeo.nativeSourceHandler.canHandleSource = function (source) { + if (source.type) { + return Vimeo.nativeSourceHandler.canPlayType(source.type); + } else if (source.src) { + return Vimeo.nativeSourceHandler.canPlayType(source.src); + } + + return ''; +}; + +// @note: Copied over from YouTube — not sure this is relevant +Vimeo.nativeSourceHandler.handleSource = function (source, tech) { + tech.src(source.src); +}; + +// @note: Copied over from YouTube — not sure this is relevant +Vimeo.nativeSourceHandler.dispose = function () {}; + +Vimeo.registerSourceHandler(Vimeo.nativeSourceHandler); + +// Since the iframe can't be touched using Vimeo's way of embedding, +// let's add a new styling rule to have the same style as `vjs-tech` +function injectCss() { + if (cssInjected) { + return; + } + cssInjected = true; + var css = '\n .vjs-vimeo iframe {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n '; + var head = document.head || document.getElementsByTagName('head')[0]; + + var style = document.createElement('style'); + style.type = 'text/css'; + + if (style.styleSheet) { + style.styleSheet.cssText = css; + } else { + style.appendChild(document.createTextNode(css)); + } + + head.appendChild(style); +} + +Component.registerComponent('Vimeo', Vimeo); +Tech.registerTech('Vimeo', Vimeo); + +// Include the version number. +Vimeo.VERSION = '0.0.1'; + +exports.default = Vimeo; +}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) +},{"@vimeo/player":1}]},{},[2])(2) +}); \ No newline at end of file