@clickview/reports 0.59.0-rc.0 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +1 -1
- package/dist/css/{8398-reports-654be61f5b.chunk.css → 8398-reports-c099d9cdcf.chunk.css} +1 -1
- package/dist/scripts/{8398-c69188360f-reports.chunk.js → 8398-40659ed9bc-reports.chunk.js} +2 -2
- package/dist/scripts/{bundle-464e392370.min.js → bundle-34a0734a29.min.js} +2 -2
- package/package.json +1 -1
- /package/dist/scripts/{8398-c69188360f-reports.chunk.js.LICENSE.txt → 8398-40659ed9bc-reports.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-464e392370.min.js.LICENSE.txt → bundle-34a0734a29.min.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 8398-
|
|
2
|
-
(self.webpackChunk_clickview_reports=self.webpackChunk_clickview_reports||[]).push([[8398],{62700:(t,e,r)=>{"use strict";r.d(e,{c:()=>b,l:()=>d});var n=r(32735),o=r(232),i=r.n(o),a=r(8604),u=r(83345);const c={heatMap:"epapa",legend:"uhH4p"};function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var s="shared.engagementHeatMap",f="#f1f1f1",p=i().scale(["#daf07d","#08bd1a"]),y=[0,.01,.25,.5,.75,1];function h(t,e){return t?p(t/e).hex():f}function v(t,e){for(var r=[],n=0;n<t.length;n++){var o=n>0&&t[n-1],i=t[n],a=n<t.length-1&&t[n+1];i===o&&i===a||r.push("".concat(h(i,e)," ").concat(100/t.length*n,"%"))}return"linear-gradient(to right, ".concat(r.join(","),")")}function d(){var t=Math.max.apply(Math,y),e=100/y.length;return n.createElement("div",{className:"d-flex justify-content-between w-100"},n.createElement(u.x,{namespace:s,phrase:"less"}),n.createElement("div",{className:"d-flex mx-1 flex-grow-1 ".concat(c.legend)},y.map((function(r,o){return n.createElement("div",{key:o,style:{width:"".concat(e,"%"),backgroundColor:h(r,t)}})}))),n.createElement(u.x,{namespace:s,phrase:"more"}))}function b(t){var e,r,o,i=(0,a.O)(t.engagement),u=null!==(e=t.max)&&void 0!==e?e:Math.max.apply(Math,function(t){if(Array.isArray(t))return l(t)}(o=i)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return n.createElement("div",{className:"border rounded ".concat(c.heatMap," ").concat(null!==(r=t.className)&&void 0!==r?r:""),style:{background:v(i,u)}})}},54316:(t,e,r)=>{"use strict";r.d(e,{z:()=>m});var n=r(32735),o=r(56081),i=r(23481),a=r(62700),u=r(26136),c=r(29427),l=r(40782),s=r(64818);const f={heatMap:"rwDjh",avatarContainer:"kW4ZM"};function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var y=i.T.encloseNamespace("shared.engagementTable");function h(t){var e;return n.createElement("div",{className:"".concat(null!==(e=t.className)&&void 0!==e?e:"")},t.children)}function v(t){return n.createElement(h,{className:"d-inline-block ".concat(t.column.isSorted?"fw-bold":"")},y(t.phraseKey))}function d(t){return n.useMemo((function(){var e,r,o=(e=t.engagement,r=0,e.forEach((function(t){var e,n=Math.max.apply(Math,function(t){if(Array.isArray(t))return p(t)}(e=t.heatMap)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());n>r&&(r=n)})),r);return[{Header:function(t){var e=t.column;return n.createElement(v,{column:e,phraseKey:"name"})},width:22,accessor:"user",sortType:function(e,r){return(0,u.B)(e.values.user,t.anonymiseUsers)>(0,u.B)(r.values.user,t.anonymiseUsers)?1:-1},Cell:function(e){var r,o,i,a,l=e.value,p=(o=l,i=t.anonymiseUsers,{name:(a=(0,u.B)(o,i).split(" ").filter((function(t){return!!t})))[0],surname:a.slice(1).join(" ")}),y=p.name,v=p.surname;return n.createElement(h,{className:"d-flex align-items-center h-100"},n.createElement("span",{className:f.avatarContainer},n.createElement(c.q,{imageCdnUrl:t.imageCdnUrl,initials:s.l.getInitials(y,v),imageUrl:!t.anonymiseUsers&&"avatar"in l?null===(r=l.avatar)||void 0===r?void 0:r.url:null,showAnonymousUser:"profileId"in l})),n.createElement("span",{className:"ms-2 clamp-1"},y," ",v))}},{Header:function(t){var e=t.column;return n.createElement(v,{column:e,phraseKey:"views"})},accessor:"viewCount",width:15,sortType:"basic",sortDescFirst:!0,Cell:function(t){var e=t.value;return n.createElement(h,{className:"d-flex align-items-center h-100"},n.createElement("div",null,e))}},{Header:function(t){var e=t.column;return n.createElement(v,{column:e,phraseKey:"engagement"})},accessor:"engagementRate",width:20,sortType:"basic",sortDescFirst:!0,Cell:function(t){var e=t.value;return n.createElement(h,{className:"w-33"},n.createElement(l.O,{percentage:e,layout:l.I.LabelBefore}))}},{Header:function(t){var e=t.column;return n.createElement(v,{column:e,phraseKey:"heatMap"})},accessor:"heatMap",width:48,disableSortBy:!0,Cell:function(t){var e=t.row.original;return n.createElement(h,{className:"d-flex align-items-center h-100"},n.createElement(a.c,{engagement:e,max:o,className:"".concat(f.heatMap," flex-grow-1")}))}}]}),[t.anonymiseUsers])}var b={table:"bg-white rounded px-0",header:"border-bottom",headerCell:"m-3",cell:"mx-3 my-2"};function m(t){var e,r,i,a=d({engagement:t.engagement,imageCdnUrl:t.imageCdnUrl,anonymiseUsers:t.anonymiseUsers}),u=(e=t.engagement,r=t.users,i=t.interactiveResults,n.useMemo((function(){var t=[];return e.forEach((function(e){var n,o=null==r?void 0:r.find((function(t){return t.id===e.userId})),a=null===(n=null==i?void 0:i.find((function(t){var r;return(null===(r=t.publicUser)||void 0===r?void 0:r.profileId)===e.profileId})))||void 0===n?void 0:n.publicUser;o?t.push(Object.assign(Object.assign({},e),{user:o})):a&&t.push(Object.assign(Object.assign({},e),{user:a}))})),t}),[null==r?void 0:r.length]));return u.length?n.createElement(o.i,{columns:a,data:u,theme:Object.assign(Object.assign({},b),{table:t.border?"".concat(b.table," border"):b.table}),enableSort:!0}):n.createElement(n.Fragment,null)}},8604:(t,e,r)=>{"use strict";function n(t){return new Array(Math.ceil(t.videoDuration)).fill(null).map((function(e,r){return t.heatMap[r]||0}))}r.d(e,{O:()=>n})},49475:(t,e,r)=>{"use strict";function n(t){var e=[];return Object.keys(t).forEach((function(r){var n=t[r];n&&e.push("".concat(r,":").concat(Array.isArray(n)?n.join(","):n))})),e.join(":")}r.d(e,{u:()=>n})},60051:(t,e,r)=>{"use strict";var n;r.d(e,{f:()=>n}),function(t){t.Share="share",t.MasterObject="masterobject"}(n||(n={}))},47812:(t,e,r)=>{"use strict";r.d(e,{k:()=>o});var n=r(99940),o={createViewKey:function(t,e,r,o,i){var a={mediaId:t.toString(),mediaIdType:e};return r&&(a.shareContextId=r),{url:"/api/player/create-view-key",key:"view:key:".concat(t,":").concat(e),type:n.k.POST,data:a,cacheDuration:28800,success:o,error:i}}}},17285:(t,e,r)=>{"use strict";r.d(e,{O:()=>c});var n=r(32735),o=r(23481),i=r(62700),a=r(73013),u=o.T.encloseNamespace("shared.videoEngagementOverlay");function c(t){return n.createElement("div",{className:"bg-white rounded p-2 ".concat(a.Z.partialLoadingContainer)},t.hasHeading&&n.createElement("div",{className:"partial-loading-background w-25 mb-3"}," "),n.createElement("div",{className:"ratio ratio-16x9 partial-loading-background mb-2"}),n.createElement("div",{className:"d-flex flex-column justify-content-end"},n.createElement("div",{className:a.Z.heatMapContainer},n.createElement("div",{className:"position-relative"},n.createElement(i.c,{engagement:{heatMap:[],videoDuration:0},className:a.Z.heatMap}))),n.createElement("div",{className:"d-flex justify-content-between mt-2"},n.createElement("strong",null,!t.hasHeading&&u("engagement")),n.createElement("div",{className:"w-33"},n.createElement(i.l,null)))))}},44311:(t,e,r)=>{"use strict";r.d(e,{p:()=>Mh});var n=r(32735),o=r(23481),i=r(62700),a=r(8604),u=(r(39682),r(76032));function c(t){return c="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},c(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function f(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function y(t,e,r){return e=b(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,r||[],b(t).constructor):e.apply(t,r))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(h=function(){return!!t})()}function v(t,e,r,n){var o=d(b(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=b(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},d.apply(null,arguments)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}var w=function(t){function e(t,r){return l(this,e),y(this,e,[t,r])}return m(e,t),f(e,[{key:"handleClick",value:function(t){var r=this;v(e,"handleClick",this,3)([t]),this.requestAnimationFrame((function(){r.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(t,r,n){if(!this.options_.item)return v(e,"createEl",this,3)([t,r,n]);var o=this.options_.item.getCollabsibleName(),i=this.options_.item.getCollabsibleValue(),a=this.options_.item.className,c='<span class="vjs-menu-item-text">'.concat(o,"</span>");this.valueHolder_=u.Z.dom.createEl("span",{innerHTML:i});var l=v(e,"createEl",this,3)([t,{className:"vjs-menu-item cv-cog-menu-item ".concat(i?"cv-has-cog-value":""," ").concat(a||"").trim(),innerHTML:c},n]);return l.appendChild(this.valueHolder_),l}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}])}(u.Z.getComponent("MenuItem")),O=function(t){function e(t,r){var n;return l(this,e),(n=y(this,e,[t,r])).controlText("Settings"),n}return m(e,t),f(e,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(v(e,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(v(e,"buildCSSClass",this,3)([]))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach((function(t){t.updateCollapsibleValue&&t.updateCollapsibleValue()})),v(e,"pressButton",this,3)([]))}},{key:"createItems",value:function(){for(var t,e=this,r=[],n=0;n<this.options_.items.length;n++){var o=this.options_.items[n];o.isCollabsible&&o.showInCollabsibleMenu()&&o.isCollapsed&&r.push(new w(this.player_,{item:o}))}return(null===(t=this.additionalItems)||void 0===t?void 0:t.length)&&this.additionalItems.forEach((function(t){var n,o=new t.ctor(e.player_,Object.assign(Object.assign({},e.options_),null!==(n=t.options)&&void 0!==n?n:{}));r.splice(t.index,0,o)})),r}},{key:"update",value:function(){v(e,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(t){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(e){return e.name===t.name}))||(this.additionalItems.push(t),this.update())}}])}(u.Z.getComponent("MenuButton"));function j(t){return j="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},j(t)}function P(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,S(n.key),n)}}function S(t){var e=function(t){if("object"!=j(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==j(e)?e:e+""}function _(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_=function(){return!!t})()}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=E(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},k.apply(null,arguments)}function E(t){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(t)}function C(t,e){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},C(t,e)}u.Z.registerComponent("cogButton",O);var T=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=E(e),function(t,e){if(e&&("object"==j(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_()?Reflect.construct(e,r||[],E(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&C(t,e)}(e,t),r=e,n=[{key:"createEl",value:function(){return u.Z.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(t){var r,n,o,i=this;(r=e,n=this,"function"==typeof(o=k(E(1&3?r.prototype:r),"handleClick",n))?function(t){return o.apply(n,t)}:o)([t]),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){i.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}],n&&P(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("MenuItem"));function x(t){return x="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},x(t)}function L(){return L="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=A(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},L.apply(null,arguments)}function R(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,D(n.key),n)}}function I(t,e,r){return e&&B(t.prototype,e),r&&B(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function D(t){var e=function(t){if("object"!=x(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==x(e)?e:e+""}function M(t,e,r){return e=A(e),function(t,e){if(e&&("object"==x(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,N()?Reflect.construct(e,r||[],A(t).constructor):e.apply(t,r))}function N(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(N=function(){return!!t})()}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function Z(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&F(t,e)}function F(t,e){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},F(t,e)}var z=u.Z.getComponent("MenuItem"),G=u.Z.getComponent("MenuButton"),V=["large","medium","small"],U=function(t){function e(t,r){return R(this,e),M(this,e,[t,r])}return Z(e,t),I(e,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(z),H=function(t){function e(t,r){var n;return R(this,e),(n=M(this,e,[t,r])).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0,n.player_.ready((function(){n.update()})),n}return Z(e,t),I(e,[{key:"createItems",value:function(){var t=this,e=this.player_.textTrackSettings;if(e){var r=e.getSizeSetting(),n=[new T(this.player_,{label:"Caption Text Size",onClickBack:function(){t.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return V.map((function(e){n.push(new U(t.player_,{label:e.charAt(0).toUpperCase()+e.substring(1),selectable:!0,multiSelectable:!1,selected:e===r,value:e}))})),n}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=L(A(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){G.prototype.handleClick.apply(this)}}])}(G);u.Z.registerComponent("SubtitleSizeButton",H);var q=r(28400);function W(t,e,r,n){if(t.length)for(var o=t.length-1;o>=0;o--){var i=t[o];if(i.kind===e){if(r&&i.label!==r)continue;if(n&&i.language!==n)continue;return i}}}function Q(t,e,r,n){t.kind===e&&(r&&t.label!==r||(t.loaded_?n(t):t.one("loadeddata",(function(){n(t)}))))}function K(t){if(null==t?void 0:t.cues.length)for(var e=0;e<t.cues.length;e++){var r=t.cues[e];(null==r?void 0:r.text)&&(r.text=q.m.sanitize(r.text))}}var Y={getTrack:function(t,e,r,n){return W(t.textTracks(),e,r,n)},useTrack:function(t,e,r,n,o){var i=t.textTracks(),a=W(i,e,r,o);if(a)Q(a,e,r,n);else{var u=function(t){Q(t.track,e,r,n)};i.addEventListener("addtrack",u),t.one("dispose",(function(){i.removeEventListener("addtrack",u)}))}},getCurrentTextTrack:function(t){return this.findTrackByPredicate(t,(function(t){return"showing"===t.mode}))},findTrackByPredicate:function(t,e){if(!t)return null;for(var r=t.textTracks(),n=0;n<r.length;n++){var o=r[n];if(e(o))return o}return null},forEachTrack:function(t,e){if(t)for(var r=t.textTracks(),n=0;n<r.length;n++)e(r[n])},sanitizeTrack:function(t,e){if(t&&e)if(t.loaded)K(t);else{var r=function(){return K(t)};t.addEventListener("loadeddata",r),e.one("dispose",(function(){t.removeEventListener("loadeddata",r)}))}}},$=function(t,e,r){var n,o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){for(var a=arguments.length,u=new Array(a),c=0;c<a;c++)u[c]=arguments[c];var l=!1,s=function(){n=null,s=null,t.apply(this,u)};return!n&&r&&(t.apply(o,u),l=!0),i.clearTimeout(n),n=i.setTimeout(s,e),l};return a.cancel=function(){i.clearTimeout(n),n=null},a};function X(t){return X="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},X(t)}function J(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,rt(n.key),n)}}function et(t,e,r){return e&&tt(t.prototype,e),r&&tt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function rt(t){var e=function(t){if("object"!=X(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==X(e)?e:e+""}function nt(t,e,r){return e=ut(e),function(t,e){if(e&&("object"==X(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ot()?Reflect.construct(e,r||[],ut(t).constructor):e.apply(t,r))}function ot(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ot=function(){return!!t})()}function it(t,e,r,n){var o=at(ut(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function at(){return at="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ut(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},at.apply(null,arguments)}function ut(t){return ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ut(t)}function ct(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&<(t,e)}function lt(t,e){return lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},lt(t,e)}var st=u.Z.getComponent("MenuItem"),ft=function(t){function e(t,r){var n;return J(this,e),(n=nt(this,e,[t,r])).onChange=$(n.onChange,100,!1,n),n.bindEventListeners(),n}return ct(e,t),et(e,[{key:"createEl",value:function(){var t=this.localize("Search");return it(e,"createEl",this,3)(["li",{className:"vjs-menu-item cv-search-input-menu-item-container ".concat(this.options_.className||"").trim(),innerHTML:'\n <div class="cv-search-input-menu-item">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="'.concat(t,'" type="text" autocomplete="off" spellcheck="false" aria-label="').concat(t,'" />\n </div>\n ')}])}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var t=this,e=this.$("input");this.onChange=this.onChange.bind(this),e.addEventListener("keyup",this.onChange),e.addEventListener("blur",(function(e){t.options_.menuButton.menu.handleBlur(e)}))}},{key:"onChange",value:function(t){var e=t.target;this.options_.search(e.value)}}])}(st);u.Z.registerComponent("SearchInputMenuItem",ft);var pt=function(t){function e(){return J(this,e),nt(this,e,arguments)}return ct(e,t),et(e,[{key:"createEl",value:function(t,r,n){return it(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:"vjs-menu-item cv-no-results"}),n])}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}}])}(st);function yt(t){return yt="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},yt(t)}function ht(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vt(n.key),n)}}function vt(t){var e=function(t){if("object"!=yt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=yt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yt(e)?e:e+""}function dt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dt=function(){return!!t})()}function bt(t){return bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bt(t)}function mt(t,e){return mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mt(t,e)}u.Z.registerComponent("NoMatchingResultsMenuItem",pt);var gt=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=bt(e),function(t,e){if(e&&("object"==yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,dt()?Reflect.construct(e,r||[],bt(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mt(t,e)}(e,t),r=e,(n=[{key:"update",value:function(t,e){var r=this;if(null==t?void 0:t.length){var n=[],o=0;t.forEach((function(t){var i=r.options_.label.substr(o,t);i&&n.push(i),n.push('<span class="cv-highlight">'),n.push(r.options_.label.substr(t,e)),n.push("</span>"),o=t+e})),n.push(this.options_.label.substring(o,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(n.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&ht(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("MenuItem"));function wt(t){return wt="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},wt(t)}function Ot(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jt(n.key),n)}}function jt(t){var e=function(t){if("object"!=wt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=wt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wt(e)?e:e+""}function Pt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pt=function(){return!!t})()}function St(t,e,r,n){var o=_t(kt(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function _t(){return _t="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=kt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},_t.apply(null,arguments)}function kt(t){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},kt(t)}function Et(t,e){return Et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Et(t,e)}var Ct=u.Z.getComponent("MenuButton"),Tt=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=kt(e),function(t,e){if(e&&("object"==wt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Pt()?Reflect.construct(e,r||[],kt(t).constructor):e.apply(t,r))}(this,e,[t,r])).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0,n.update=n.update.bind(n),n.search=n.search.bind(n),n.player_.textTracks().addEventListener("selectedlanguagechange",n.update),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Et(t,e)}(e,t),r=e,(n=[{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.update),t.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.update)}))}},{key:"createItems",value:function(){var t,e=Y.getCurrentTextTrack(this.player_);if(e){if(null===(t=e.cues)||void 0===t?void 0:t.length){for(var r=[new ft(this.player_,{menuButton:this,search:this.search})],n=0;n<e.cues.length;n++){var o=e.cues[n];r.push(new gt(this.player_,{cue:o,label:o.text,selected:!1,multiSelectable:!1}))}var i=new pt(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return i.hide(),r.push(i),r}this.bindTrackEvents(e)}}},{key:"search",value:function(t){var e;t=t.trim();var r=Y.getCurrentTextTrack(this.player_);if(null===(e=null==r?void 0:r.cues)||void 0===e?void 0:e.length){var n=this.findMatches(t,r);this.toggleItemVisibility(t,n),this.toggleNoResults(t,n)}}},{key:"findMatches",value:function(t,e){var r={};if(!t)return r;for(var n=new RegExp(t,"gi"),o=0;o<e.cues.length;o++){for(var i=e.cues[o].text,a=[],u=void 0;u=n.exec(i);)a.push(u.index);a.length&&(r[o]=a)}return r}},{key:"toggleItemVisibility",value:function(t,e){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(r,n){!t||e[n]?r.show():r.hide(),r.update(e[n],t.length)}))}},{key:"toggleNoResults",value:function(t,e){var r=this.menu.children_[this.menu.children_.length-1];!t||Object.keys(e).length?r.hide():r.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(St(e,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){St(e,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){St(e,"pressButton",this,3)([]);var t=this.menu.children_[0];(null==t?void 0:t.focus)&&(null==t||t.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Ct.prototype.handleClick.apply(this)}}])&&Ot(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Ct);function xt(t){return xt="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},xt(t)}function Lt(){return Lt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=At(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Lt.apply(null,arguments)}function Rt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Dt(n.key),n)}}function It(t,e,r){return e&&Bt(t.prototype,e),r&&Bt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Dt(t){var e=function(t){if("object"!=xt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=xt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xt(e)?e:e+""}function Mt(t,e,r){return e=At(e),function(t,e){if(e&&("object"==xt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Nt()?Reflect.construct(e,r||[],At(t).constructor):e.apply(t,r))}function Nt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nt=function(){return!!t})()}function At(t){return At=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},At(t)}function Zt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ft(t,e)}function Ft(t,e){return Ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ft(t,e)}u.Z.registerComponent("subtitleSearchButton",Tt);var zt=u.Z.getComponent("MenuItem"),Gt=u.Z.getComponent("MenuButton"),Vt=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"}],Ut=function(t){function e(t,r){return Rt(this,e),Mt(this,e,[t,r])}return Zt(e,t),It(e,[{key:"createEl",value:function(){return u.Z.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(t){switch(t){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">⇑</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">⇓</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>'}return""}}])}(zt),Ht=function(t){function e(){var t;return Rt(this,e),(t=Mt(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return Zt(e,t),It(e,[{key:"createItems",value:function(){var t=this,e=[];return e.push(new T(this.player_,{label:"Keyboard Shortcuts"})),Vt.forEach((function(r){e.push(new Ut(t.player_,r))})),e}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat((t=e,r=this,"function"==typeof(n=Lt(At(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!this.player_.options_.mobile}},{key:"showCollapsibleMenu",value:function(){Gt.prototype.handleClick.apply(this)}}])}(Gt);function qt(t){return qt="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},qt(t)}function Wt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qt(n.key),n)}}function Qt(t){var e=function(t){if("object"!=qt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qt(e)?e:e+""}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kt=function(){return!!t})()}function Yt(t,e,r,n){var o=$t(Xt(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function $t(){return $t="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Xt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},$t.apply(null,arguments)}function Xt(t){return Xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xt(t)}function Jt(t,e){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jt(t,e)}u.Z.registerComponent("KeyboardShortcutsButton",Ht);var te="cv-collapsed",ee=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Xt(e),function(t,e){if(e&&("object"==qt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kt()?Reflect.construct(e,r||[],Xt(t).constructor):e.apply(t,r))}(this,e,[t,r])).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(n),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.one("play",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update),n.player_.off("play",n.update)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jt(t,e)}(e,t),r=e,(n=[{key:"toggleHidden",value:function(t){for(var e=0;e<this.children_.length;e++){var r=this.children_[e];r.isCollabsible&&(r.alwaysCollapsed||t?(r.isCollapsed=!0,r.addClass(te)):(r.isCollapsed=!1,r.removeClass(te)))}this.getChild("cogButton").update()}},{key:"update",value:function(){var t=this.player_.isFullscreen(),e=this.player_.whiteboardModePlugin().side,r=this.player_.el().getBoundingClientRect(),n=!t||"left"!==e&&"right"!==e?r.width:r.height;if(n){this.addClass("cv-collapsorator-ready");var o=n<(!t||"left"!==e&&"right"!==e&&"top"!==e?600:1200);this.player_.options_.deferMenus&&(o=!0),this.toggleHidden(o)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(Yt(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Yt(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}}])&&Wt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));u.Z.registerComponent("collapserator",ee);var re=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"],ne=r(57900),oe=r(52881),ie=r(65858),ae=r(50873);function ue(t){return ue="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},ue(t)}function ce(){ce=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==ue(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ue(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function le(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,se(n.key),n)}}function se(t){var e=function(t){if("object"!=ue(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ue(e)?e:e+""}var fe=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()},(e=[{key:"logStream",value:function(){var t="v:".concat(this.options.videoId);ne.SG.cacheExists(t)||(this.collectionApiClient.log({type:ie.Vw.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:ie.eq.V3}),ne.SG&&ne.SG.cacheSet(t,null,300))}},{key:"logVideoProgress",value:function(t){var e=this,r=this.getAnalyticsData();this.collectionApiClient.log(t.map((function(t){return{type:ie.Vw.StreamProgress,actionContext:e.getActionContext(),data:Object.assign(Object.assign({},r),{progress:t}),eventVersion:ie.eq.V2}})))}},{key:"logUserAction",value:function(t,e){var r=Object.assign(Object.assign({},this.getAnalyticsData()),t),n=Object.assign(Object.assign({},this.getActionContext()),e);this.collectionApiClient.log({type:e.actionType,data:r,actionContext:n,eventVersion:e.eventVersion||ie.eq.V2})}},{key:"getAnalyticsData",value:function(){var t=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(t.video.shareId=this.options.shareId);var e=this.getEntityType();return e===ie.py.Interactive?t.interactive={id:+this.options.mediaId}:e===ie.py.Clip&&(t.clip={id:+this.options.mediaId}),t}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var t=this;this.collectionApiClient=new oe.q({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return t.getCurrentUser()},shouldLog:ae.k.shouldLog,formatData:ae.k.formatData})}},{key:"getCurrentUser",value:function(){return t=this,e=void 0,r=void 0,n=ce().mark((function t(){return ce().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?ie.MC.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return ie.py.Video;case"MasterInteractive":return ie.py.Interactive;case"MasterClip":return ie.py.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return ie.LZ.Player;case"interactive-player":return ie.LZ.InteractivePlayer;case"create-clip-player":return ie.LZ.CreateClipPlayer}}}])&&le(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function pe(t){return pe="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},pe(t)}function ye(t){var e="function"==typeof Map?new Map:void 0;return ye=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(he())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&ve(o,r.prototype),o}(t,arguments,de(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ve(r,t)},ye(t)}function he(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(he=function(){return!!t})()}function ve(t,e){return ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ve(t,e)}function de(t){return de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},de(t)}var be=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=de(e),function(t,e){if(e&&("object"==pe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,he()?Reflect.construct(e,r||[],de(t).constructor):e.apply(t,r))}(this,e,[(null==r?void 0:r.title)||"Ajax error"])).url=t,n.response=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ve(t,e)}(e,t),r=e,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(ye(Error));function me(t){return me="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},me(t)}function ge(){ge=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==me(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(me(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function we(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Oe(n.key),n)}}function Oe(t){var e=function(t){if("object"!=me(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==me(e)?e:e+""}var je=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},Pe=new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tokens={gateway:null}},e=[{key:"get",value:function(t,e){return je(this,void 0,void 0,ge().mark((function r(){return ge().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(t,{method:"GET",mode:"cors",headers:this.getHeaders(e)});case 3:return r.t1=r.sent,r.next=6,r.t0.parseResponse.call(r.t0,r.t1);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"delete",value:function(t,e){return je(this,void 0,void 0,ge().mark((function r(){return ge().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,fetch(t,{method:"DELETE",headers:this.getHeaders(e)});case 2:case"end":return r.stop()}}),r,this)})))}},{key:"post",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return je(this,void 0,void 0,ge().mark((function o(){var i;return ge().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,fetch(t,{method:"POST",headers:this.getHeaders(r),body:e,mode:"cors"});case 2:if(i=o.sent,!n){o.next=7;break}return o.next=6,this.parseResponse(i);case 6:return o.abrupt("return",o.sent);case 7:case"end":return o.stop()}}),o,this)})))}},{key:"put",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return je(this,void 0,void 0,ge().mark((function o(){var i;return ge().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,fetch(t,{method:"PUT",headers:this.getHeaders(r),body:e,mode:"cors"});case 2:if(i=o.sent,!n){o.next=7;break}return o.next=6,this.parseResponse(i);case 6:return o.abrupt("return",o.sent);case 7:case"end":return o.stop()}}),o,this)})))}},{key:"setToken",value:function(t,e){this.tokens[t]=e}},{key:"getHeaders",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={"Content-Type":"application/json"};return this.tokens[t.tokenName]&&(e.authorization="Bearer ".concat(this.tokens[t.tokenName])),e}},{key:"parseResponse",value:function(t){return je(this,void 0,void 0,ge().mark((function e(){var r,n;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(404!==t.status){e.next=2;break}return e.abrupt("return",null);case 2:if(t.ok){e.next=15;break}return e.prev=3,e.next=6,t.json();case 6:r=e.sent,e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(3),new be(t.url);case 12:throw e.prev=12,new be(t.url,r);case 15:return e.next=17,t.json();case 17:return n=e.sent,e.abrupt("return",n);case 19:case"end":return e.stop()}}),e,null,[[3,9,12,15]])})))}}],e&&we(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()),Se=r(19389),_e=r.n(Se);function ke(t){return ke="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},ke(t)}function Ee(t,e,r){return(e=function(t){var e=function(t){if("object"!=ke(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ke(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ke(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ce(t){t.paused()?t.play():t.pause()}function Te(t,e){t.currentTime(t.currentTime()+e)}function xe(t,e){t.volume(t.volume()+e)}var Le,Re=Ee(Ee(Ee(Ee(Ee(Ee(Ee(Ee(Ee(Ee({},"f",(function(t){document[t.fsApi_.fullscreenEnabled]&&(t.isFullscreen()?t.exitFullscreen():t.requestFullscreen())})),"m",(function(t){var e=t.volume(),r=t.lastVolume_();if(0===e){var n=r<.1?.1:r;t.volume(n),t.muted(!1)}else t.muted(!t.muted())})),"k",Ce),"space",Ce),"left",(function(t){return Te(t,-5)})),"right",(function(t){return Te(t,5)})),"j",(function(t){return Te(t,-10)})),"l",(function(t){return Te(t,10)})),"up",(function(t){return xe(t,.05)})),"down",(function(t){return xe(t,-.05)}));!function(t){t.PhysicallyChapteredVideo="physically-chaptered-video"}(Le||(Le={}));var Be=r(83765);function Ie(t){return Ie="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},Ie(t)}function De(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Me(n.key),n)}}function Me(t){var e=function(t){if("object"!=Ie(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ie(e)?e:e+""}function Ne(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ne=function(){return!!t})()}function Ae(){return Ae="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ze(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ae.apply(null,arguments)}function Ze(t){return Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ze(t)}function Fe(t,e){return Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fe(t,e)}r(35571);var ze=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ze(e),function(t,e){if(e&&("object"==Ie(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ne()?Reflect.construct(e,r||[],Ze(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.configureMenuDimensions=n.configureMenuDimensions.bind(n),n.initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fe(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){this.player.ready(this.configureMenuDimensions),this.player.one("play",this.configureMenuDimensions),this.player.on("resize",this.configureMenuDimensions),this.player.on("fullscreenchange",this.configureMenuDimensions),this.player.on("resizemenus",this.configureMenuDimensions),this.player.on("ready",this.configureMenuDimensions)}},{key:"dispose",value:function(){var t,r,n;this.player.off("resize",this.configureMenuDimensions),this.player.off("fullscreenchange",this.configureMenuDimensions),this.player.off("resizemenus",this.configureMenuDimensions),this.player.off("ready",this.configureMenuDimensions),(t=e,r=this,"function"==typeof(n=Ae(Ze(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"configureMenuDimensions",value:function(){var t=this,e=function(e){if(!t.options.mobile){var r=t.player.getChild("collapserator"),n=r.getChild("volumePanel"),o=r.children_.indexOf(n);r.removeChild(n),r.addChild("volumePanel",{inline:e},o),t.player.trigger("volumechange")}},r=this.player.isFullscreen();if(r&&!this.options.mobile){var n=this.player.whiteboardModePlugin().side;if(e("top"!==n),"left"===n||"right"===n||"top"===n){var o=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(t){t.style.paddingTop=null,t.style.marginBottom=null,t.style.width="calc(".concat(o,"px - 4em)")}))}}r||e(!0);var i=this.player.currentWidth(),a=this.player.currentHeight()/i*100,u=this.player.el().querySelector(".cv-collapsorator"),c=this.player.el().querySelectorAll(".vjs-menu"),l=u&&u.offsetHeight;l?("CreateClipSeekBar"===this.options.seekBarName&&(l+=22),c&&c.length&&c.forEach((function(e){!r&&t.options.overflowControls?e.style.paddingTop="80%":e.style.paddingTop="calc(".concat(a,"% - ").concat(l,"px)"),e.style.marginBottom="".concat(l,"px"),e.style.width=null,e.querySelector(".vjs-menu-content")&&(i<=450?t.player.addClass("cv-player-small"):t.player.removeClass("cv-player-small"))}))):this.player.one("play",this.configureMenuDimensions)}}],n&&De(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));u.Z.registerPlugin("configureMenuDimensionsPlugin",ze);var Ge="cv-persisttest",Ve=function(){try{return window.localStorage.setItem(Ge,"cv-player-storage-test"),window.localStorage.removeItem(Ge),!0}catch(t){return!1}},Ue=function(t){return window.localStorage.getItem(t)},He=function(t,e){window.localStorage.setItem(t,e)};function qe(t){return qe="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},qe(t)}function We(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qe(n.key),n)}}function Qe(t){var e=function(t){if("object"!=qe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qe(e)?e:e+""}function Ke(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ke=function(){return!!t})()}function Ye(){return Ye="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=$e(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ye.apply(null,arguments)}function $e(t){return $e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$e(t)}function Xe(t,e){return Xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xe(t,e)}var Je=u.Z.getPlugin("plugin"),tr="cvplayer-volume",er="cvplayer-mute",rr=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=$e(e),function(t,e){if(e&&("object"==qe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ke()?Reflect.construct(e,r||[],$e(t).constructor):e.apply(t,r))}(this,e,[t])).enabled=!0,r.player.ready((function(){return r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xe(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){this.player.options_.mobile?this.removeVolumeControl():Ve()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var t=Ue(tr),e=Ue(er);t&&this.player.volume(+t),e&&this.player.muted("true"===e)}},{key:"saveVolumeState",value:function(){this.enabled&&(He(tr,this.player.volume().toString()),He(er,this.player.muted().toString()))}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var t=this.player.getChild("collapserator"),e=t.getChild("volumePanel");t.removeChild(e)}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"dispose",value:function(){var t,r,n;this.player.off("volumechange",this.saveVolumeState),(t=e,r=this,"function"==typeof(n=Ye($e(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}}],n&&We(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Je);function nr(t){return nr="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},nr(t)}function or(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ir(n.key),n)}}function ir(t){var e=function(t){if("object"!=nr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=nr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==nr(e)?e:e+""}function ar(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ar=function(){return!!t})()}function ur(t){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ur(t)}function cr(t,e){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cr(t,e)}u.Z.registerPlugin("persistVolumePlugin",rr);var lr=u.Z.getPlugin("plugin"),sr="cvplayer-playback-rate",fr=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=ur(e),function(t,e){if(e&&("object"==nr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ar()?Reflect.construct(e,r||[],ur(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.player.dataLoaded((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cr(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){var t,e=this;if(Ve()){this.savePlaybackRate=this.savePlaybackRate.bind(this),this.player.on("ratechange",this.savePlaybackRate),this.one("dispose",(function(){e.player.off("ratechange",e.savePlaybackRate)}));var r=+Ue(sr);(null===(t=this.player.options_.playbackRates)||void 0===t?void 0:t.some((function(t){return t===r})))&&this.player.playbackRate(r)}}},{key:"savePlaybackRate",value:function(){var t,e=this.player.playbackRate().toString();He(sr,e),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({rate:e},{actionType:ie.Vw.Select,workflowPhase:ie.eu.Complete,descriptor:ie.UX.ChangeSpeed,entity:ie.py.PlaybackSpeed,eventVersion:ie.eq.V3})}}])&&or(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(lr);function pr(t){return pr="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},pr(t)}function yr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hr(n.key),n)}}function hr(t){var e=function(t){if("object"!=pr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=pr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pr(e)?e:e+""}function vr(t,e){if(e&&("object"==pr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function dr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dr=function(){return!!t})()}function br(t){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},br(t)}function mr(t,e){return mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mr(t,e)}u.Z.registerPlugin("persistPlaybackRatePlugin",fr);var gr=function(t){function e(t){var r,n,o,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,i=[t],o=br(o=e),(r=vr(n,dr()?Reflect.construct(o,i||[],br(n).constructor):o.apply(n,i))).fullscreenBecauseOfRotate=!1,r.player.supportsFullScreen()?(r.onRotate=r.onRotate.bind(r),r.onFullscreenChange=r.onFullscreenChange.bind(r),r.player.ready((function(){return r.initialize()})),r):vr(r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mr(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.player.on("fullscreenchange",this.onFullscreenChange),window.addEventListener("orientationchange",this.onRotate)}},{key:"dispose",value:function(){this.player.off("fullscreenchange",this.onFullscreenChange),window.removeEventListener("orientationchange",this.onRotate)}},{key:"onFullscreenChange",value:function(){this.player.isFullscreen()||(this.fullscreenBecauseOfRotate=!1)}},{key:"onRotate",value:function(){var t=this.getAngle();90===t||-90===t||270===t?(this.player.requestFullscreen(),this.fullscreenBecauseOfRotate=!0):this.fullscreenBecauseOfRotate&&this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"getAngle",value:function(){var t,e;return"number"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.angle)?window.screen.orientation.angle:0}}])&&yr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));u.Z.registerPlugin("fullscreenOnRotatePlugin",gr);var wr="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n";function Or(t){return Or="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},Or(t)}function jr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Pr(n.key),n)}}function Pr(t){var e=function(t){if("object"!=Or(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Or(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Or(e)?e:e+""}function Sr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Sr=function(){return!!t})()}function _r(t){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_r(t)}function kr(t,e){return kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kr(t,e)}var Er=function(t){function e(t,r){var n,o,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=_r(e),function(t,e){if(e&&("object"==Or(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Sr()?Reflect.construct(e,r||[],_r(t).constructor):e.apply(t,r))}(this,e,[t,r])).update=(o=n.update.bind(n),i=window.performance.now(),function(){var t=window.performance.now();t-i>=1e3&&(o.apply(void 0,arguments),i=t)}),t.on("timeupdate",n.update),t.one("dispose",(function(){t.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kr(t,e)}(e,t),r=e,(n=[{key:"update",value:function(){var t=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(t)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var t={innerHTML:wr,className:this.buildCSSClass()},e={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},r=u.Z.dom.createEl("a",t,e);return this.createControlTextEl(r),r.addEventListener("click",this.pause.bind(this)),r}},{key:"pause",value:function(){this.player_.pause()}}])&&jr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Button"));function Cr(t){return Cr="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},Cr(t)}function Tr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xr(n.key),n)}}function xr(t){var e=function(t){if("object"!=Cr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Cr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Cr(e)?e:e+""}function Lr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Lr=function(){return!!t})()}function Rr(t){return Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rr(t)}function Br(t,e){return Br=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Br(t,e)}Er.prototype.controlText_="Open in ClickView",u.Z.registerComponent("OpenExternallyButton",Er);var Ir=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Rr(e),function(t,e){if(e&&("object"==Cr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Lr()?Reflect.construct(e,r||[],Rr(t).constructor):e.apply(t,r))}(this,e,[t,r])).options=r,t.ready((function(){return n.onReady()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Br(t,e)}(e,t),r=e,(n=[{key:"onReady",value:function(){var t=this.player.getChild("collapserator"),e=t.getChild("customControlSpacer"),r=t.children_.indexOf(e);t.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},r+1)}}])&&Tr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function Dr(t){return Dr="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},Dr(t)}function Mr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Nr(n.key),n)}}function Nr(t){var e=function(t){if("object"!=Dr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Dr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dr(e)?e:e+""}function Ar(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ar=function(){return!!t})()}function Zr(t,e,r,n){var o=Fr(zr(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Fr(){return Fr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=zr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Fr.apply(null,arguments)}function zr(t){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zr(t)}function Gr(t,e){return Gr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gr(t,e)}u.Z.registerPlugin("openExternallyPlugin",Ir);var Vr=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=zr(e),function(t,e){if(e&&("object"==Dr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ar()?Reflect.construct(e,r||[],zr(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gr(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(Zr(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Zr(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"setUi",value:function(t,e){var r=this,n=t>0,o=n?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(o,"'>\n <div class='cv-touch-text'>\n ").concat(n?"+":"").concat(10*t,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){r.removeText()}),e)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Mr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("component"));function Ur(t){return Ur="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},Ur(t)}function Hr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qr(n.key),n)}}function qr(t){var e=function(t){if("object"!=Ur(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ur(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ur(e)?e:e+""}function Wr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wr=function(){return!!t})()}function Qr(){return Qr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Kr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Qr.apply(null,arguments)}function Kr(t){return Kr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kr(t)}function Yr(t,e){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yr(t,e)}u.Z.registerComponent("TouchControls",Vr);var $r=u.Z.getPlugin("plugin"),Xr=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=Kr(e),function(t,e){if(e&&("object"==Ur(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wr()?Reflect.construct(e,r||[],Kr(t).constructor):e.apply(t,r))}(this,e,[t])).doubleTouchCount=0,r.seekStartTime=0,r.directionModifier=0,r.bindFunctions(),r.player.ready((function(){return r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yr(t,e)}(e,t),r=e,n=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this),this.unBindEventListeners=this.unBindEventListeners.bind(this)}},{key:"initialize",value:function(){var t=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){t.player.off("ready",t.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.tech.on("touchstart",this.onTouchStart),this.tech.on("touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&"Html5"===this.tech.name()&&(this.tech.off("touchstart",this.onTouchStart),this.tech.off("touchend",this.onTouchEnd))}},{key:"dispose",value:function(){var t,r,n;(t=e,r=this,"function"==typeof(n=Qr(Kr(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([]),this.unBindEventListeners()}},{key:"onTouchStart",value:function(t){this.touchStartTime=t.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(t){var e=this;if(t.changedTouches.length){if(t.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(t),void(this.lastTouchTime=t.timeStamp);this.resetProperties(),this.lastTouchTime=t.timeStamp,t.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){e.doubleTouchCount||(e.player.paused()?e.player.play():e.userActive&&e.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(t){var e=this.player.el().getBoundingClientRect(),r=e.left+e.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),t.changedTouches[0].pageX<r?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var n=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>n+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}],n&&Hr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}($r);function Jr(t){return Jr="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},Jr(t)}function tn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,en(n.key),n)}}function en(t){var e=function(t){if("object"!=Jr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Jr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jr(e)?e:e+""}u.Z.registerPlugin("touchControls",Xr);var rn=function(){return t=function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=r.id,this.plugin=e,this.source=r,this.enabled=this.enabled.bind(this)},(e=[{key:"enabled",value:function(t){return void 0===t?this.plugin.currentSource===this.source:(t&&this.plugin.setSource(this.source.id),t)}}])&&tn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function nn(t){return nn="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},nn(t)}function on(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,an(n.key),n)}}function an(t){var e=function(t){if("object"!=nn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=nn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==nn(e)?e:e+""}function un(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(un=function(){return!!t})()}function cn(t){return cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},cn(t)}function ln(t,e){return ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ln(t,e)}var sn=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=cn(e),function(t,e){if(e&&("object"==nn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,un()?Reflect.construct(e,r||[],cn(t).constructor):e.apply(t,r))}(this,e,[t])).options_=r,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ln(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){var t=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",(function(){t.qualityLevels.off("change",t.onQualityChange)}))}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var t=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",t.id)}},{key:"setSource",value:function(t){var e=this,r=this.getSourceById(t);if(null===r)return this.currentSource;var n=this.player.currentTime(),o=!this.player.paused();this._currentSource=r;var i=this.player.playbackRate();return this.player.src({src:r.url,type:r.mimeType}),this.player.one("loadedmetadata",(function(){e.player.playbackRate(i),e.player.currentTime()!==n&&e.player.currentTime(n),o&&e.player.play()})),this.trigger({event:"sourcechange",source:r}),this.sourceChangeUpdateQualityLevels(r),r}},{key:"getSourceById",value:function(t){return this.sources.find((function(e){return e.id===t}))}},{key:"repopulateSources",value:function(t){for(var e=null;this.qualityLevels.length;)this.qualityLevels[0].enabled&&(e=this.qualityLevels[0].id),this.qualityLevels.removeQualityLevel(this.qualityLevels[0]);this.sources=[],this.populateSources(t,e)}},{key:"sortSources",value:function(t){return t.sort((function(t,e){return t.id===e.id?0:+t.id>+e.id?-1:1}))}},{key:"populateSources",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null;(t=this.sortSources(t)).forEach((function(t){e.qualityLevels.addQualityLevel(new rn(e,t)),e.sources.push(t),e.trigger({event:"addsource",source:t}),null===r?t.default&&(n=t):t.id===r&&(n=t)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(t){for(var e=this.qualityLevels,r=-1,n=0;n<e.length;n++)if(e[n].id===t.id){r=n;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})}}],n&&on(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function fn(t){return fn="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},fn(t)}function pn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,yn(n.key),n)}}function yn(t){var e=function(t){if("object"!=fn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=fn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fn(e)?e:e+""}u.Z.registerPlugin("progressiveFiles",sn);var hn=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(t,e){var r=t.getQualityLevelById(e);if(r||(r=this.getNextBestQuality(t,e)),!r)return null;for(var n=0;n<t.length;n++){var o=t[n];o.enabled=r.id===o.id}return r}},{key:"getNextBestQuality",value:function(t,e){var r=this.getKnownProfiles(),n=r.indexOf(e);if(n>=0){for(var o=n+1;o<r.length;o++){var i=r[o],a=t.getQualityLevelById(i);if(a)return a}for(var u=n-1;u>0;u--){var c=r[u],l=t.getQualityLevelById(c);if(l)return l}}return null}}],null&&pn(t.prototype,null),e&&pn(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function vn(t){return vn="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},vn(t)}function dn(){dn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==vn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(vn(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function bn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mn(n.key),n)}}function mn(t){var e=function(t){if("object"!=vn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=vn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vn(e)?e:e+""}var gn=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e.name,this.playbackProfile=e.playbackProfile,this.address=new URL(e.httpsAddress)},(e=[{key:"getUrl",value:function(t){return t?this.address+"cache?file="+encodeURIComponent(t):null}},{key:"ping",value:function(){return t=this,e=void 0,r=void 0,n=dn().mark((function t(){var e,r,n,o;return dn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new AbortController,r=setTimeout((function(){return e.abort()}),1e3),t.prev=3,t.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:e.signal});case 6:return n=t.sent,t.next=9,n.text();case 9:return o=t.sent,clearTimeout(r),t.abrupt("return","PONG"===o);case 14:return t.prev=14,t.t0=t.catch(3),t.abrupt("return",!1);case 17:case"end":return t.stop()}}),t,this,[[3,14]])})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}}])&&bn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function wn(t){return wn="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},wn(t)}function On(){On=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==wn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(wn(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function jn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Pn(n.key),n)}}function Pn(t){var e=function(t){if("object"!=wn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=wn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wn(e)?e:e+""}var Sn=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.player=e,this.logger=u.Z.log.createLogger("localcache")},(e=[{key:"setSource",value:function(t,e){return r=this,n=void 0,o=void 0,i=On().mark((function r(){var n;return On().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.player.localCache||void 0===(null==t?void 0:t.src)){r.next=5;break}return r.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(n=r.sent)&&(this.logger.debug("Using Local Cache",n),t.src=n.getUrl(t.src));case 5:e(null,t);case 6:case"end":return r.stop()}}),r,this)})),new(o||(o=Promise))((function(t,e){function a(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(a,u)}c((i=i.apply(r,n||[])).next())}));var r,n,o,i}}])&&jn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function _n(t){return _n="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},_n(t)}function kn(){kn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==_n(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(_n(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function En(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Cn(n.key),n)}}function Cn(t){var e=function(t){if("object"!=_n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=_n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_n(e)?e:e+""}function Tn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tn=function(){return!!t})()}function xn(){return xn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ln(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},xn.apply(null,arguments)}function Ln(t){return Ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ln(t)}function Rn(t,e){return Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Rn(t,e)}u.Z.use("*",(function(t){return new Sn(t)}));var Bn='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',In=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ln(e),function(t,e){if(e&&("object"==_n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Tn()?Reflect.construct(e,r||[],Ln(t).constructor):e.apply(t,r))}(this,e,[t,r])).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(n),t.ready((function(){n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rn(t,e)}(e,t),r=e,n=[{key:"createEl",value:function(){return(t=e,r=this,"function"==typeof(n=xn(Ln(1&3?t.prototype:t),"createEl",r))?function(t){return n.apply(r,t)}:n)(["div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Bn,"</div>")},{title:"Streaming from ClickView Local Cache"}]);var t,r,n}},{key:"initialize",value:function(){var t=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){t.localCachePlugin.off("localcachechanged",t.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return t=this,e=void 0,r=void 0,n=kn().mark((function t(){return kn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.localCachePlugin.getActiveLocalCache();case 2:t.sent?this.show():this.hide();case 4:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}}],n&&En(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function Dn(t){return Dn="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},Dn(t)}function Mn(){Mn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Dn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Dn(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Nn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,An(n.key),n)}}function An(t){var e=function(t){if("object"!=Dn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Dn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dn(e)?e:e+""}function Zn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zn=function(){return!!t})()}function Fn(){return Fn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=zn(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Fn.apply(null,arguments)}function zn(t){return zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zn(t)}function Gn(t,e){return Gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gn(t,e)}u.Z.registerComponent("localCacheIndicator",In);var Vn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},Un=function(t){function e(t,r){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=zn(e),function(t,e){if(e&&("object"==Dn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zn()?Reflect.construct(e,r||[],zn(t).constructor):e.apply(t,r))}(this,e,[t])).logger_=u.Z.log.createLogger("localcache"),void 0===r)throw Error("no options defined");return n.localCaches_=r.localCacheAddresses.map((function(t){return new gn(t)})),n.player.ready((function(){n.initialize(),r.enabled&&n.enable()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gn(t,e)}(e,t),r=e,n=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"removeLocalCache",value:function(t){this.localCaches_=this.localCaches_.filter((function(e){return e!==t}))}},{key:"dispose",value:function(){var t,r,n;(t=e,r=this,"function"==typeof(n=Fn(zn(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"initialize",value:function(){this.player.controlBar.addChild("localCacheIndicator")}},{key:"handleNetworkError",value:function(){return Vn(this,void 0,void 0,Mn().mark((function t(){var e;return Mn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getActiveLocalCache();case 2:if(!(e=t.sent)){t.next=8;break}return t.next=6,e.ping();case 6:t.sent&&this.removeLocalCache(e);case 8:return this.resetActiveLocalCache(),t.next=11,this.getActiveLocalCache();case 11:return this.resetSource(),t.abrupt("return",!0);case 13:case"end":return t.stop()}}),t,this)})))}},{key:"resetSource",value:function(){for(var t=this.player.qualityLevels(),e=0;e<t.length;e++)t[e].enabled&&(t[e].enabled=!0)}},{key:"getActiveLocalCacheInternal",value:function(){return Vn(this,void 0,void 0,Mn().mark((function t(){var e,r,n,o=this;return Mn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[],r=function(t){return Vn(o,void 0,void 0,Mn().mark((function r(){return Mn().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.ping();case 2:if(!r.sent){r.next=4;break}e.push(t);case 4:case"end":return r.stop()}}),r)})))},t.next=4,Promise.all(this.localCaches_.map((function(t){return r(t)})));case 4:if(!(e.length>0)){t.next=8;break}return n=e[0],this.onLocalCacheChange(n),t.abrupt("return",n);case 8:return t.abrupt("return",null);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"onLocalCacheChange",value:function(t){this.logger_.debug("Local Cache changed",t),this.trigger("localcachechanged",{localCache:t});var e=!1;t&&t.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",t.playbackProfile),hn.enableProfileOrNextBest(this.player.qualityLevels(),t.playbackProfile),e=!0),e||this.player.src(this.player.src())}}],n&&Nn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function Hn(t){return Hn="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},Hn(t)}function qn(){qn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Hn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Hn(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Wn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qn(n.key),n)}}function Qn(t){var e=function(t){if("object"!=Hn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Hn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hn(e)?e:e+""}function Kn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kn=function(){return!!t})()}function Yn(){return Yn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=$n(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Yn.apply(null,arguments)}function $n(t){return $n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$n(t)}function Xn(t,e){return Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xn(t,e)}u.Z.registerPlugin("localCache",Un);var Jn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},to=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=$n(e),function(t,e){if(e&&("object"==Hn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kn()?Reflect.construct(e,r||[],$n(t).constructor):e.apply(t,r))}(this,e,[t])).playerApi=r.playerApi,n.fileToken=r.fileToken,n.logger=u.Z.log.createLogger("video-signature-expiry-plugin"),n.bindErrorHandlers(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xn(t,e)}(e,t),r=e,n=[{key:"bindErrorHandlers",value:function(){this.onError=this.onError.bind(this),this.player.on("error",this.onError)}},{key:"dispose",value:function(){var t,r,n;this.player.off("error",this.onError),(t=e,r=this,"function"==typeof(n=Yn($n(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"onError",value:function(){return Jn(this,void 0,void 0,qn().mark((function t(){var e,r=this;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=this.player.error().code)===MediaError.MEDIA_ERR_NETWORK||e===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this.player.localCache().getActiveLocalCache();case 5:if(!t.sent){t.next=8;break}return this.callErrorHandler((function(){return r.player.localCache().handleNetworkError()})),t.abrupt("return");case 8:this.callErrorHandler((function(){return r.handleVideoSignatureExpiry()}));case 9:case"end":return t.stop()}}),t,this)})))}},{key:"handleVideoSignatureExpiry",value:function(){return Jn(this,void 0,void 0,qn().mark((function t(){var e,r;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.playerApi&&this.fileToken){t.next=2;break}return t.abrupt("return",!1);case 2:if(!(this.refetchedSourcesTimestamp+9e5>Date.now())){t.next=4;break}return t.abrupt("return",!1);case 4:return this.refetchedSourcesTimestamp=Date.now(),e=null,t.prev=6,this.logger.debug("Detected expired mp4 urls, attempting to refetch"),r="".concat(this.playerApi.origin,"/api/files?fileToken=").concat(this.fileToken),t.next=11,Pe.get(r);case 11:e=t.sent,t.next=18;break;case 14:return t.prev=14,t.t0=t.catch(6),this.logger.error("Failed to refetch expired mp4 urls"),t.abrupt("return",!1);case 18:return this.logger.debug("Mp4 urls successfully refetched"),this.player.progressiveFiles().repopulateSources(e.progressive.map((function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}}))),this.fileToken=e.fileToken,t.abrupt("return",!0);case 22:case"end":return t.stop()}}),t,this,[[6,14]])})))}},{key:"callErrorHandler",value:function(t){return Jn(this,void 0,void 0,qn().mark((function e(){var r,n,o,i,a=this;return qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.player.currentTime(),n=!this.player.paused(),o=this.player.playbackRate(),i=function(){a.player.playbackRate(o),a.player.currentTime(r),n&&a.player.play(),a.player.error(null)},this.player.one("loadedmetadata",i),e.next=7,t();case 7:if(!e.sent){e.next=9;break}return e.abrupt("return");case 9:this.player.off("loadedmetadata",i);case 10:case"end":return e.stop()}}),e,this)})))}}],n&&Wn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function eo(t){return eo="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},eo(t)}function ro(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,no(n.key),n)}}function no(t){var e=function(t){if("object"!=eo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=eo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==eo(e)?e:e+""}function oo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(oo=function(){return!!t})()}function io(t){return io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},io(t)}function ao(t,e){return ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ao(t,e)}u.Z.registerPlugin("handleNetworkErrors",to);var uo=u.Z.getPlugin("plugin"),co="cvplayer-show-subtitles",lo="cvplayer-selected-language",so="cvplayer-subtitle-size",fo=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=io(e),function(t,e){if(e&&("object"==eo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,oo()?Reflect.construct(e,r||[],io(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ao(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.applyUserPreferences=this.applyUserPreferences.bind(this),this.player.textTracks().length&&(this.bindEventListeners(),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var t=!!this.options.showSubtitles,e=this.safeGet(co);if("true"===e&&(t=!0),"false"===e&&(t=!1),t){var r=this.guessWhichTrack();r&&(r.mode="showing")}else this.disableSubtitles();var n=this.safeGet(so);n||(n=this.options.subtitleSize),this.player.options_.mobile&&(n="medium"),n&&this.player.textTrackSettings.setSizeSetting(n)}},{key:"safeGet",value:function(t){if(Ve())return Ue(t)}},{key:"onSelectedLanguageChange",value:function(){for(var t,e,r=this.player.textTracks(),n=0;n<r.length;n++){var o=r[n];if("showing"===o.mode)return He(co,"true"),He(lo,o.language),void(null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:o.language},{actionType:ie.Vw.Select,entity:ie.py.Subtitle,workflowPhase:ie.eu.Complete,descriptor:ie.DL.On}))}var i;He(co,"false"),i=lo,window.localStorage.removeItem(i),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:""},{actionType:ie.Vw.Select,entity:ie.py.Subtitle,workflowPhase:ie.eu.Complete,descriptor:ie.DL.Off,eventVersion:ie.eq.V3})}},{key:"bindEventListeners",value:function(){var t=this;Ve()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){t.player.off("cv:languageselected",t.onSelectedLanguageChange),t.player.off("changesubtitlesize",t.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var t=this.player.textTrackSettings.getSizeSetting();He(so,t)}},{key:"guessWhichTrack",value:function(){for(var t,e,r=this.safeGet(lo)||window.navigator.language,n=this.getLanguageParts(r),o=n.language,i=n.country,a=this.player.textTracks(),u=0;u<a.length;u++){var c=a[u],l=this.getLanguageParts(c.language),s=l.language,f=l.country;if(s===o&&(t=c,f||(e=c),f===i))return t}return e||t||null}},{key:"getLanguageParts",value:function(t){var e=t.toLowerCase().split("-");return{language:e[0],country:e[1]}}},{key:"disableSubtitles",value:function(){for(var t=this.player.textTracks(),e=0;e<t.length;e++)t[e].mode="disabled"}},{key:"previewModeSubtitles",value:function(){var t=this.guessWhichTrack();t&&(t.mode="showing"),this.player.off("changesubtitlesize",this.onChangeSubtitleSize),this.player.textTrackSettings.setSizeSetting("large"),this.player.on("changesubtitlesize",this.onChangeSubtitleSize)}}])&&ro(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(uo);function po(t){return po="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},po(t)}function yo(){yo=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==po(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(po(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function ho(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vo(n.key),n)}}function vo(t){var e=function(t){if("object"!=po(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=po(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==po(e)?e:e+""}function bo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(bo=function(){return!!t})()}function mo(t){return mo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mo(t)}function go(t,e){return go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},go(t,e)}u.Z.registerPlugin("persistSubtitleSettingsPlugin",fo);var wo=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},Oo=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=mo(e),function(t,e){if(e&&("object"==po(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,bo()?Reflect.construct(e,r||[],mo(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&go(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){return wo(this,void 0,void 0,yo().mark((function t(){var e,r,n,o,i=this;return yo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getActiveLocalCache();case 2:if(e=t.sent,(r=e?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(r="1080"),Ve()&&(n=Ue(this.getStorageKey(!!e)))&&(r=n),o=this.player.qualityLevels(),(null==e?void 0:e.playbackProfile)||hn.enableProfileOrNextBest(o,r),Ve()){t.next=10;break}return t.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),o.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){o.off("change",i.onQualityLevelsChange)}));case 13:case"end":return t.stop()}}),t,this)})))}},{key:"onQualityLevelsChange",value:function(){var t;return wo(this,void 0,void 0,yo().mark((function e(){var r,n,o;return yo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:r=e.sent,n=this.player.qualityLevels(),o=n[n.selectedIndex],He(this.getStorageKey(r),o.id),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({quality:o.id},{actionType:ie.Vw.Select,workflowPhase:ie.eu.Complete,descriptor:ie.UX.ChangeResolution,entity:ie.py.Resolution,eventVersion:ie.eq.V3});case 7:case"end":return e.stop()}}),e,this)})))}},{key:"isLocalCacheActive",value:function(){return wo(this,void 0,void 0,yo().mark((function t(){return yo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.localCache().getActiveLocalCache();case 2:return t.abrupt("return",!!t.sent);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(t){return t?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&ho(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function jo(t){return jo="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},jo(t)}function Po(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function So(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Eo(n.key),n)}}function ko(t,e,r){return e&&_o(t.prototype,e),r&&_o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Eo(t){var e=function(t){if("object"!=jo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jo(e)?e:e+""}function Co(t,e,r){return e=xo(e),function(t,e){if(e&&("object"==jo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,To()?Reflect.construct(e,r||[],xo(t).constructor):e.apply(t,r))}function To(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(To=function(){return!!t})()}function xo(t){return xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xo(t)}function Lo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ro(t,e)}function Ro(t,e){return Ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ro(t,e)}u.Z.registerPlugin("persistQualitySettingsPlugin",Oo);var Bo=u.Z.getComponent("Component"),Io=function(t){function e(t,r){return So(this,e),Co(this,e,[t,r])}return Lo(e,t),ko(e,[{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var t=this.options_.event,e=this.player_.duration(),r=(t.end.time-t.start.time)/e;this.el_.style.width=100*r+"%";var n=t.start.time/e;this.el_.style.left=100*n+"%"}}])}(Bo),Do=function(t){function e(){var t;return So(this,e),(t=Co(this,e,arguments)).events_=[],t}return Lo(e,t),ko(e,[{key:"update",value:function(){for(var t=this,e=this.children(),r=e.length;r>0;r--)this.removeChild(e[r]);this.events_.forEach((function(e){var r=new Io(t.player(),{event:e});t.addChild(r),r.update()}))}},{key:"addEvents",value:function(t){var e,r;(e=this.events_).push.apply(e,function(t){if(Array.isArray(t))return Po(t)}(r=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return Po(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Po(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),this.update()}},{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"cv-progress-reporter-display"})}}])}(Bo);function Mo(t){return Mo="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},Mo(t)}function No(t,e,r){return(e=Zo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ao(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zo(n.key),n)}}function Zo(t){var e=function(t){if("object"!=Mo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Mo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mo(e)?e:e+""}function Fo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fo=function(){return!!t})()}function zo(t){return zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zo(t)}function Go(t,e){return Go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Go(t,e)}var Vo=u.Z.getPlugin("plugin"),Uo="play",Ho="playing",qo="pause",Wo="seekstart",Qo="ended",Ko="pausedseek",Yo=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=zo(e),function(t,e){if(e&&("object"==Mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Fo()?Reflect.construct(e,r||[],zo(t).constructor):e.apply(t,r))}(this,e,[t,r])).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=r,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Go(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var t=this,e=No(No(No(No(No(No({},Uo,(function(){return t.onPlay()})),qo,(function(){return t.onPause()})),"timeupdate",(function(){return t.onTimeUpdate()})),"seeking",(function(){return t.onSeeking()})),Qo,(function(){return t.onEnded()})),Ho,(function(){return t.onPlaying()})),r=Object.keys(e);r.forEach((function(r){return t.player.on(r,e[r])})),this.one("dispose",(function(){r.forEach((function(r){return t.player.off(r,e[r])}))}))}},{key:"startInterval",value:function(){var t=this,e=this.options.interval||5e3;this.interval=window.setInterval((function(){return t.flushBuffer()}),e),this.player.one("dispose",(function(){return window.clearInterval(t.interval)}))}},{key:"addEasterEgg",value:function(){var t,e,r=this,n="",o=function(e){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(n+=e.key)&&r.addDisplay(),window.clearTimeout(t),t=window.setTimeout((function(){n=""}),500)},i=!1,a=function(){i=!0,e=window.setTimeout((function(){i&&r.addDisplay()}),1e4)};function u(){i=!1,window.clearTimeout(e)}this.player.el().addEventListener("keyup",o);var c=this.player.getChild("Collapserator").getChild("PlayToggle");c.on("touchstart",a),c.on("touchend",u),this.player.one("dispose",(function(){var t,e;null===(e=null===(t=r.player)||void 0===t?void 0:t.el())||void 0===e||e.removeEventListener("keyup",o),c.off("touchstart",a),c.off("touchend",u)}))}},{key:"addDisplay",value:function(){var t=this;this.progressReporterDisplay||(this.progressReporterDisplay=new Do(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){t.progressReporterDisplay=void 0})))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent("seekend"),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(Uo)}},{key:"onPause",value:function(){var t=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){t.isPlaying=!1,t.logEvent(qo),delete t.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(Uo)),this.isPlaying&&!this.isSeeking&&this.logEvent(Ho)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(Ko),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(Wo))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(Qo)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(t){if(this.player){var e=this.player.currentTime();t===Wo&&(e=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:e,type:t})}}},{key:"shouldUseCarriedOverTime",value:function(t){return this.lastPlayingTime&&(t===Ho||t===Uo)}},{key:"shouldSaveCarriedOverTime",value:function(t){return t===Ho||t===qo}},{key:"shouldClearCarriedOverTime",value:function(t){return t===Qo||t===Ko}},{key:"flushBuffer",value:function(){for(var t,e,r=[],n={};this.eventBuffer.length;){var o=this.eventBuffer.shift();this.shouldClearCarriedOverTime(o.type)?delete this.lastPlayingTime:n.start?o.type===Ho&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(o.type)&&(this.lastPlayingTime=o.time),n.end=o,r.push(n),n={}):(this.shouldUseCarriedOverTime(o.type)&&(o.time=this.lastPlayingTime,delete this.lastPlayingTime),n.start=o)}this.eventBuffer=[],r.length&&this.validateEvents(r)&&(this.options.onFlush(r),null===(t=this.player)||void 0===t||t.trigger("progressflush"),null===(e=this.progressReporterDisplay)||void 0===e||e.addEvents(r))}},{key:"validateEvents",value:function(t){var e=0;t.forEach((function(t){e+=t.end.time-t.start.time}));var r=this.options.interval||5e3;return r/=1e3,r+=.5,r*=this.player.playbackRate(),e<r}}],n&&Ao(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Vo);function $o(t){return $o="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},$o(t)}function Xo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Jo(n.key),n)}}function Jo(t){var e=function(t){if("object"!=$o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=$o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$o(e)?e:e+""}function ti(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ti=function(){return!!t})()}function ei(t){return ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ei(t)}function ri(t,e){return ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ri(t,e)}u.Z.registerPlugin("progressReporterPlugin",Yo);var ni=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ei(e),function(t,e){if(e&&("object"==$o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ti()?Reflect.construct(e,r||[],ei(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ri(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){return u.Z.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&Xo(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component")),oi=["top","left","right","bottom"],ii={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};function ai(t){return ai="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},ai(t)}function ui(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ci(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,si(n.key),n)}}function li(t,e,r){return e&&ci(t.prototype,e),r&&ci(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function si(t){var e=function(t){if("object"!=ai(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ai(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ai(e)?e:e+""}function fi(t,e,r){return e=hi(e),function(t,e){if(e&&("object"==ai(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pi()?Reflect.construct(e,r||[],hi(t).constructor):e.apply(t,r))}function pi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pi=function(){return!!t})()}function yi(){return yi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=hi(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},yi.apply(null,arguments)}function hi(t){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hi(t)}function vi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&di(t,e)}function di(t,e){return di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},di(t,e)}var bi=u.Z.getComponent("Component"),mi=function(t){function e(t,r){var n;return ui(this,e),(n=fi(this,e,[t,r])).bindEventListeners(),n}return vi(e,t),li(e,[{key:"createEl",value:function(){return(t=e,r=this,"function"==typeof(n=yi(hi(1&3?t.prototype:t),"createEl",r))?function(t){return n.apply(r,t)}:n)(["div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)}]);var t,r,n}},{key:"bindEventListeners",value:function(){var t=this,e=this.el(),r=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move",t.addClass("cv-drag-over")},n=function(e){e.preventDefault(),t.removeClass("cv-drag-over"),t.player_.whiteboardModePlugin().setWhiteboardMode(t.options_.side)},o=function(){t.removeClass("cv-drag-over")};e.addEventListener("dragover",r),e.addEventListener("drop",n),e.addEventListener("dragleave",o),this.on("dispose",(function(){e.removeEventListener("dragover",r),e.removeEventListener("drop",n),e.removeEventListener("dragleave",o)}))}}])}(bi),gi=function(t){function e(t,r){var n;return ui(this,e),(n=fi(this,e,[t,r])).addChildren(),n}return vi(e,t),li(e,[{key:"addChildren",value:function(){var t=this;oi.forEach((function(e){t.addChild(new mi(t.player_,{side:e}))}))}}])}(bi);function wi(t){return wi="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},wi(t)}function Oi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ji(n.key),n)}}function ji(t){var e=function(t){if("object"!=wi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=wi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wi(e)?e:e+""}function Pi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pi=function(){return!!t})()}function Si(t){return Si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Si(t)}function _i(t,e){return _i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_i(t,e)}var ki=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Si(e),function(t,e){if(e&&("object"==wi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Pi()?Reflect.construct(e,r||[],Si(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_i(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Oi(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("MenuItem"));function Ei(t){return Ei="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},Ei(t)}function Ci(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ti(n.key),n)}}function Ti(t){var e=function(t){if("object"!=Ei(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ei(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ei(e)?e:e+""}function xi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xi=function(){return!!t})()}function Li(){return Li="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ri(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Li.apply(null,arguments)}function Ri(t){return Ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ri(t)}function Bi(t,e){return Bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bi(t,e)}var Ii=u.Z.getComponent("MenuButton"),Di=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=Ri(e),function(t,e){if(e&&("object"==Ei(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xi()?Reflect.construct(e,r||[],Ri(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bi(t,e)}(e,t),r=e,n=[{key:"createItems",value:function(){var t=this,e=this.player_.whiteboardModePlugin().side,r=[new T(this.player_,{label:"Video Controls"})];return oi.forEach((function(n){r.push(new ki(t.player_,{side:n,label:ii[n],selectable:!0,multiSelectable:!1,selected:n===e}))})),r}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=Li(Ri(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.whiteboardModePlugin().side;return ii[t]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Ii.prototype.handleClick.apply(this)}}],n&&Ci(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Ii);function Mi(t){return Mi="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},Mi(t)}function Ni(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ai(n.key),n)}}function Ai(t){var e=function(t){if("object"!=Mi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Mi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mi(e)?e:e+""}function Zi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zi=function(){return!!t})()}function Fi(t){return Fi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fi(t)}function zi(t,e){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zi(t,e)}var Gi="cv-whiteboard-side",Vi=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=Fi(e),function(t,e){if(e&&("object"==Mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zi()?Reflect.construct(e,r||[],Fi(t).constructor):e.apply(t,r))}(this,e,[t])).side="bottom",r.player.ready((function(){r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zi(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(Ve()){var t=Ue(Gi);t&&(this.side=t)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var t=this,e=this.player.getChild("collapserator"),r=new ni(this.player);this.button=new Di(this.player),e.addChild(r),e.addChild(this.button),this.player.trigger("cv-updatecog");var n=function(){t.player.isFullscreen()&&e.el().setAttribute("draggable","true")},o=function(){t.player.isFullscreen()&&e.el().setAttribute("draggable","false")},i=function(e){t.player.isFullscreen()&&(t.player.addClass("cv-dragging"),e.dataTransfer.setData("text/plain","handle"))},a=function(){t.player.isFullscreen()&&(t.player.removeClass("cv-dragging"),e.el().setAttribute("draggable","false"))};r.el().addEventListener("mousedown",n),r.el().addEventListener("mouseup",o),e.el().addEventListener("dragstart",i),e.el().addEventListener("dragend",a),this.on("dispose",(function(){r.el().removeEventListener("mousedown",n),r.el().removeEventListener("mouseup",o),e.el().removeEventListener("dragstart",i),e.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new gi(this.player))}},{key:"initFullscreenListener",value:function(){var t=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){t.player.off("fullscreenchange",t.update)}))}},{key:"setWhiteboardMode",value:function(t){this.side=t,this.button.update(),Ve()&&He(Gi,t),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"update",value:function(){this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),u.Z.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.trigger("cv-updatecog"),this.player.isFullscreen()&&"bottom"!==this.side&&(this.player.addClass("cv-whiteboard-".concat(this.side)),u.Z.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}}],n&&Ni(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function Ui(t){return Ui="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},Ui(t)}function Hi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qi(n.key),n)}}function qi(t){var e=function(t){if("object"!=Ui(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ui(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ui(e)?e:e+""}function Wi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wi=function(){return!!t})()}function Qi(t){return Qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qi(t)}function Ki(t,e){return Ki=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ki(t,e)}u.Z.registerPlugin("whiteboardModePlugin",Vi);var Yi=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Qi(e),function(t,e){if(e&&("object"==Ui(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wi()?Reflect.construct(e,r||[],Qi(t).constructor):e.apply(t,r))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ki(t,e)}(e,t),r=e,(n=[{key:"deferMenu",value:function(){var t={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",t)}},{key:"buildSubtitles",value:function(){for(var t=[],e=!1,r=this.player.textTracks(),n=0;n<r.length;n++){var o=r[n],i="showing"===o.mode;t.unshift({id:o.label,name:o.label,selected:i}),i&&(e=!0)}return t.push({id:null,name:"Off",selected:!e}),t}},{key:"buildQualities",value:function(){for(var t=[],e=this.player.qualityLevels(),r=0;r<e.length;r++){var n=e[r];t.push({id:n.id,name:n.id+"p",selected:n.enabled})}return t}},{key:"buildPlaybackSpeeds",value:function(){var t=this.player.playbackRate();return this.player.options_.playbackRates.map((function(e){return{id:e,name:e+"x"+(1===e?" (Normal)":""),selected:t===e}}))}}])&&Hi(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));u.Z.registerPlugin("deferMenusPlugin",Yi);var $i="PreventScrubbingTooltip";function Xi(t){return Xi="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},Xi(t)}function Ji(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ta(n.key),n)}}function ta(t){var e=function(t){if("object"!=Xi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Xi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xi(e)?e:e+""}function ea(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ea=function(){return!!t})()}function ra(t,e,r,n){var o=na(oa(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function na(){return na="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=oa(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},na.apply(null,arguments)}function oa(t){return oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oa(t)}function ia(t,e){return ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ia(t,e)}var aa=u.Z.getComponent("Component"),ua="cv-prevent-scrubbing-tooltip-show",ca="cv-prevent-scrubbing-tooltip-remove-transition",la=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=oa(e),function(t,e){if(e&&("object"==Xi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ea()?Reflect.construct(e,r||[],oa(t).constructor):e.apply(t,r))}(this,e,arguments)).isShowing=!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ia(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-prevent-scrubbing-tooltip ".concat(ra(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return ra(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass(),innerText:"No skipping ahead!"}),n])}},{key:"show",value:function(){this.isShowing||(this.player_.userActive(!0),this.addClass(ua),this.isShowing=!0)}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isShowing&&(e&&(this.addClass(ca),window.requestAnimationFrame((function(){t.removeClass(ca)}))),this.player_.userActive(!1),this.removeClass(ua),this.isShowing=!1)}}],n&&Ji(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(aa);function sa(t){return sa="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},sa(t)}function fa(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,pa(n.key),n)}}function pa(t){var e=function(t){if("object"!=sa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=sa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sa(e)?e:e+""}function ya(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ya=function(){return!!t})()}function ha(){return ha="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=va(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ha.apply(null,arguments)}function va(t){return va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},va(t)}function da(t,e){return da=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},da(t,e)}u.Z.registerComponent($i,la);var ba=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=va(e),function(t,e){if(e&&("object"==sa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ya()?Reflect.construct(e,r||[],va(t).constructor):e.apply(t,r))}(this,e,[t])).isEnabled=!1,n.isPreviewing=!1;var o=null!=r?r:{},i=o.furthestVisitedTime,a=void 0===i?0:i,u=o.isEnabled,c=void 0!==u&&u;return n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.player.currentTime=n.currentTime.bind(n),n.onTimeUpdate=n.onTimeUpdate.bind(n),n.furthestVisitedTime=a,n.isEnabled=c,c&&n.enable(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&da(t,e)}(e,t),r=e,n=[{key:"dispose",value:function(){var t,r,n;this.player.currentTime=this.playerCurrentTimeFn,this.isEnabled&&(this.disable(),(t=e,r=this,"function"==typeof(n=ha(va(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([]))}},{key:"togglePreview",value:function(t){if(t){if(this.configurePreview(),this.isEnabled)return;this.enable(),this.isPreviewing=!0}else this.disable(),this.isPreviewing=!1}},{key:"configurePreview",value:function(){this.player.currentTime(0),this.furthestVisitedTime=0}},{key:"enable",value:function(){this.player.on("timeupdate",this.onTimeUpdate),this.getProgressControl().addChild($i),this.isEnabled=!0}},{key:"disable",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.getProgressControl().removeChild(this.getPreventScrubbingTooltip()),this.isEnabled=!1}},{key:"getProgressControl",value:function(){return this.player.controlBar.getChild("progressControl")}},{key:"onTimeUpdate",value:function(){var t=this.playerCurrentTimeFn();t>this.furthestVisitedTime&&(this.furthestVisitedTime=t)}},{key:"currentTime",value:function(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];if("number"!=typeof t)return this.playerCurrentTimeFn.apply(this,[t].concat(n));if(this.isEnabled){var i=this.getPreventScrubbingTooltip(),a=null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay");if(t>this.furthestVisitedTime)return i.show(),$(i.hide,1e3,!1,i)(),null==a||a.hide(),void this.playerCurrentTimeFn(this.furthestVisitedTime,n);null==a||a.show(),i.hide(!0),this.playerCurrentTimeFn(t,n)}else this.playerCurrentTimeFn.apply(this,[t].concat(n))}},{key:"getPreventScrubbingTooltip",value:function(){return this.getProgressControl().getChild($i)}},{key:"getSeekBar",value:function(){var t;return null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar")}}],n&&fa(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function ma(t){return ma="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},ma(t)}function ga(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wa(n.key),n)}}function wa(t){var e=function(t){if("object"!=ma(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ma(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ma(e)?e:e+""}function Oa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Oa=function(){return!!t})()}function ja(t){return ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ja(t)}function Pa(t,e){return Pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pa(t,e)}u.Z.registerPlugin("preventScrubbingPlugin",ba);var Sa=u.Z.getComponent("Button"),_a="cv-muted",ka=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=ja(e),function(t,e){if(e&&("object"==ma(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oa()?Reflect.construct(e,r||[],ja(t).constructor):e.apply(t,r))}(this,e,[t])).update(),r.update=r.update.bind(r),t.on("volumechange",r.update),t.on("dispose",(function(){return t.off("volumechange",r.update)})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pa(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(){this.player_.muted(!this.player_.muted()),this.update()}},{key:"update",value:function(){this.player_.muted()?this.addClass(_a):this.removeClass(_a)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])&&ga(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Sa);function Ea(t){return Ea="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},Ea(t)}function Ca(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ta(n.key),n)}}function Ta(t){var e=function(t){if("object"!=Ea(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ea(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ea(e)?e:e+""}function xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xa=function(){return!!t})()}function La(){return La="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ra(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},La.apply(null,arguments)}function Ra(t){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ra(t)}function Ba(t,e){return Ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ba(t,e)}u.Z.registerComponent("muteButton",ka),ka.prototype.controlText_="Mute";var Ia,Da=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ra(e),function(t,e){if(e&&("object"==Ea(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xa()?Reflect.construct(e,r||[],Ra(t).constructor):e.apply(t,r))}(this,e,[t,r]))._onClickHandler=r.onClickHandler,n.bindEventListeners(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ba(t,e)}(e,t),r=e,n=[{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"cv-player-overlay"})}},{key:"handleClick",value:function(t){"function"==typeof this._onClickHandler&&(t.stopImmediatePropagation(),this._onClickHandler())}},{key:"dispose",value:function(){var t,r,n;this.off("click",this.handleClick),(t=e,r=this,"function"==typeof(n=La(Ra(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"bindEventListeners",value:function(){this.on("click",this.handleClick)}}],n&&Ca(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function Ma(t){return Ma="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},Ma(t)}function Na(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Aa(n.key),n)}}function Aa(t){var e=function(t){if("object"!=Ma(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ma(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ma(e)?e:e+""}function Za(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Za=function(){return!!t})()}function Fa(t){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fa(t)}function za(t,e){return za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},za(t,e)}u.Z.registerComponent("playerOverlay",Da),function(t){t.Default="play",t.Hover="hover"}(Ia||(Ia={}));var Ga=u.Z.getPlugin("plugin"),Va="cv-preview-mode",Ua=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=Fa(e),function(t,e){if(e&&("object"==Ma(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Za()?Reflect.construct(e,r||[],Fa(t).constructor):e.apply(t,r))}(this,e,[t])).buttonAdded=!1,r.mode=null,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&za(t,e)}(e,t),r=e,(n=[{key:"getMode",value:function(){return this.mode}},{key:"setPlayerMode",value:function(t,e){var r=this.mode;if(this.mode=t,t===Ia.Hover)return this.buttonAdded||this.addButtons(e),this.player.addClass(Va),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");r===Ia.Hover&&(this.player.removeClass(Va),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(t){var e=new ka(this.player),r=new Da(this.player,{onClickHandler:t});this.player.addChild(e),this.player.addChild(r),this.buttonAdded=!0}},{key:"enableSubtites",value:function(){var t=this;this.player.dataLoaded((function(){return t.player.persistSubtitleSettingsPlugin().previewModeSubtitles()}))}},{key:"disableSubtitles",value:function(){var t=this;this.player.dataLoaded((function(){return t.player.persistSubtitleSettingsPlugin().applyUserPreferences()}))}},{key:"mute",value:function(){var t=this;this.player.ready((function(){t.player.persistVolumePlugin().disable(),t.player.muted(!0)}))}},{key:"unmute",value:function(){var t=this;this.player.ready((function(){t.player.persistVolumePlugin().applyUserPreferences(),t.player.persistVolumePlugin().enable()}))}},{key:"removeActivityTimeout",value:function(){this.player.cache_.inactivityTimeout=this.player.options_.inactivityTimeout,this.player.options_.inactivityTimeout=0}},{key:"restoreActivityTimeout",value:function(){this.player.options_.inactivityTimeout=this.player.cache_.inactivityTimeout}}])&&Na(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Ga);function Ha(t){return Ha="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},Ha(t)}function qa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wa(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ka(n.key),n)}}function Qa(t,e,r){return e&&Wa(t.prototype,e),r&&Wa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ka(t){var e=function(t){if("object"!=Ha(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ha(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ha(e)?e:e+""}function Ya(t,e,r){return e=Xa(e),function(t,e){if(e&&("object"==Ha(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$a()?Reflect.construct(e,r||[],Xa(t).constructor):e.apply(t,r))}function $a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($a=function(){return!!t})()}function Xa(t){return Xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xa(t)}function Ja(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tu(t,e)}function tu(t,e){return tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tu(t,e)}u.Z.registerPlugin("playerModePlugin",Ua);var eu=u.Z.getComponent("Component"),ru=u.Z.getComponent("ClickableComponent"),nu=function(t){function e(){return qa(this,e),Ya(this,e,arguments)}return Ja(e,t),Qa(e,[{key:"createEl",value:function(){return eu.prototype.createEl.call(this,"span",{className:"cv-favourite-button-svg",innerHTML:"<span class='cv-favourite-heart'>".concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Heart-Filled" d="m18.833 5.9735c-0.78916-0.95022-1.8839-1.4735-3.0826-1.4735-1.6859 0-2.7532 1.0685-3.3517 1.9648-0.15528 0.2326-0.28738 0.46582-0.39828 0.68529-0.11091-0.21946-0.24297-0.45269-0.39828-0.68529-0.5985-0.89636-1.6658-1.9648-3.3517-1.9648-1.1987 0-2.2935 0.52333-3.0827 1.4735-0.75275 0.90644-1.1673 2.1204-1.1673 3.4183 0 1.4128 0.51978 2.7268 1.6358 4.1353 0.99741 1.2588 2.4323 2.5564 4.0939 4.0589 0.61916 0.5599 1.2594 1.1389 1.9411 1.7718l0.02047 0.01903c0.08837 0.08211 0.19856 0.12313 0.30875 0.12313s0.22038-0.04105 0.30875-0.12313l0.02047-0.01903c0.68166-0.63289 1.3219-1.2119 1.9412-1.7719 1.6615-1.5024 3.0964-2.8 4.0938-4.0588 1.116-1.4085 1.6358-2.7225 1.6358-4.1353 0-1.2979-0.41459-2.5119-1.1674-3.4183z"/>\n </svg>\n',"</span><span class='cv-favourite-outline'>").concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Shape" d="m18.959 5.9741c-0.76992-0.92705-1.9357-1.5351-3.1052-1.5351-1.6448 0-2.8808 0.74937-3.4647 1.6238-0.15149 0.22693-0.28074 0.55125-0.38894 0.76537-0.10821-0.21411-0.23718-0.53844-0.38871-0.76537-0.58391-0.87451-1.8205-1.6238-3.4653-1.6238-1.1695 0-2.2376 0.60808-3.0075 1.5351-0.7344 0.88434-1.1388 1.9712-1.1388 3.2374 0 1.3784 0.50711 3.0509 1.5959 4.4251 0.97309 1.2281 2.373 2.4941 3.9941 3.9599 0.60406 0.54625 1.2285 1.1104 1.8936 1.7278l0.01997 0.01934c0.08622 0.08011 0.38931 0.21727 0.49681 0.21727 0.1075 0 0.40992-0.13796 0.49614-0.21804l0.0201-0.0178c0.66504-0.61746 1.2897-1.1824 1.8939-1.7287 1.621-1.4658 3.0209-2.7317 3.994-3.9598 1.0888-1.3742 1.5955-3.0467 1.5955-4.4251 0-1.2663-0.30646-2.3531-1.0409-3.2374zm-5.337 10.688c-0.51948 0.47226-1.0567 0.95549-1.6218 1.4768-0.56507-0.52124-1.101-1.0059-1.6219-1.4769-3.1725-2.8689-5.2684-4.7641-5.2684-7.2556 0-1.0298 0.32333-1.9863 0.91044-2.6933 0.59385-0.71497 1.4183-1.1088 2.3213-1.1088 1.254 0 2.0645 0.81976 2.5237 1.5074 0.41187 0.61679 0.62678 1.2385 0.70006 1.4772 0.06131 0.19978 0.23683 0.33499 0.43482 0.33499s0.37351-0.1352 0.43482-0.33499c0.07329-0.23867 0.28821-0.86044 0.70006-1.4773 0.45914-0.68766 1.2698-1.5074 2.5237-1.5074 0.90309 0 1.7274 0.39377 2.3213 1.1088 0.58714 0.70695 0.91047 1.6634 0.91047 2.6933 0 2.4914-2.1035 4.3783-5.2685 7.2557z" stroke-width=".97562"/>\n </svg>\n',"</span>")})}}])}(eu),ou=function(t){function e(t,r){var n;return qa(this,e),(n=Ya(this,e,[t,r])).isFavourited=r.isFavourited,n.renderIcon(),n.update(),n}return Ja(e,t),Qa(e,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new nu(this.player_),this.addChild(this.icon)}},{key:"update",value:function(){this.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"createEl",value:function(t,e,r){e=Object.assign({innerHTML:"",className:"cv-favourite-button"},e),r=Object.assign({type:"button"},r);var n=eu.prototype.createEl.call(this,"button",e,r);return this.createControlTextEl(n),n}},{key:"handleClick",value:function(){this.isFavourited=!this.isFavourited,this.update(),this.options_.onClick&&this.options_.onClick(this.isFavourited)}}])}(ru);function iu(t){return iu="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},iu(t)}function au(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uu(n.key),n)}}function uu(t){var e=function(t){if("object"!=iu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=iu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==iu(e)?e:e+""}function cu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(cu=function(){return!!t})()}function lu(t){return lu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lu(t)}function su(t,e){return su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},su(t,e)}ou.prototype.controlText_="Favourite";var fu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=lu(e),function(t,e){if(e&&("object"==iu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,cu()?Reflect.construct(e,r||[],lu(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&su(t,e)}(e,t),r=e,(n=[{key:"setFavourite",value:function(t,e){if(!this.initialized){var r=new ou(this.player,{isFavourited:t,onClick:e});this.player.addChild(r),this.initialized=!0}}}])&&au(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));u.Z.registerPlugin("favouritePlugin",fu);var pu=r(86777),yu=u.Z.getComponent("Menu"),hu=yu.prototype.createEl;yu.prototype.createEl=function(){var t=hu.call(this);return this.simpleBar=new pu.Z(this.contentEl(),{autoHide:!1}),t};var vu=yu.prototype.contentEl;yu.prototype.contentEl=function(){return this.simpleBar?this.simpleBar.getContentElement():vu.call(this)};var du=yu.prototype.dispose;yu.prototype.dispose=function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),du.call(this)};var bu=yu.prototype.addItem;yu.prototype.addItem=function(t){bu.call(this,t),this.simpleBar.recalculate()};var mu=yu.prototype.lockShowing;yu.prototype.lockShowing=function(){mu.call(this),this.simpleBar.recalculate()},yu.prototype.recalculateScrollBar=function(){this.simpleBar.recalculate()};var gu=yu.prototype.handleBlur;function wu(t){return wu="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},wu(t)}function Ou(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ju(n.key),n)}}function ju(t){var e=function(t){if("object"!=wu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=wu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wu(e)?e:e+""}function Pu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pu=function(){return!!t})()}function Su(t){return Su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Su(t)}function _u(t,e){return _u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_u(t,e)}yu.prototype.handleBlur=function(t){var e=t.relatedTarget||document.activeElement;this.el().contains(e)||gu.call(this,t)};var ku=u.Z.getComponent("Menu"),Eu=u.Z.getComponent("Component"),Cu=u.Z.getComponent("MenuButton"),Tu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Su(e),function(t,e){if(e&&("object"==wu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Pu()?Reflect.construct(e,r||[],Su(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_u(t,e)}(e,t),r=e,(n=[{key:"createMenu",value:function(){var t,e=new ku(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var r=u.Z.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(t=this.options_.title,"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var n=new Eu(this.player_,{el:r});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var o=0;o<this.items.length;o++)e.addItem(this.items[o]);return e}}])&&Ou(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Cu),xu=Cu.prototype.pressButton;Cu.prototype.pressButton=function(){xu.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var Lu=Cu.prototype.unpressButton;function Ru(t){return Ru="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},Ru(t)}function Bu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Iu(n.key),n)}}function Iu(t){var e=function(t){if("object"!=Ru(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ru(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ru(e)?e:e+""}function Du(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Du=function(){return!!t})()}function Mu(t,e,r,n){var o=Nu(Au(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Nu(){return Nu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Au(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Nu.apply(null,arguments)}function Au(t){return Au=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Au(t)}function Zu(t,e){return Zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zu(t,e)}Cu.prototype.unpressButton=function(){Lu.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},u.Z.registerComponent("MenuButton",Tu);var Fu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Au(e),function(t,e){if(e&&("object"==Ru(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Du()?Reflect.construct(e,r||[],Au(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zu(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(Mu(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Mu(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}}])&&Bu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function zu(t){return zu="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},zu(t)}function Gu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Vu(n.key),n)}}function Vu(t){var e=function(t){if("object"!=zu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=zu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zu(e)?e:e+""}function Uu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Uu=function(){return!!t})()}function Hu(t){return Hu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hu(t)}function qu(t,e){return qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qu(t,e)}Fu.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},u.Z.registerComponent("TimeWrapper",Fu);var Wu=u.Z.getComponent("SeekBar"),Qu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Hu(e),function(t,e){if(e&&("object"==zu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Uu()?Reflect.construct(e,r||[],Hu(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qu(t,e)}(e,t),r=e,(n=[{key:"handleMouseDown",value:function(t){var e=this.player_.preventScrubbingPlugin();e.isEnabled&&this.getMouseTime(t)>e.furthestVisitedTime||(Wu.prototype.handleMouseDown.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(t){Wu.prototype.handleMouseMove.call(this,t),this.update()}},{key:"getPercent",value:function(){var t=this.player_.currentTime()/this.player_.duration();return t>=1?1:t}},{key:"handleMouseUp",value:function(t){var e=this;Wu.prototype.handleMouseUp.call(this,t),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"clamp",value:function(t,e,r){return Math.min(Math.max(t,e),r)}},{key:"getMouseTime",value:function(t){return this.clamp(Wu.prototype.calculateDistance.call(this,t).x,0,1)*this.player_.duration()}}])&&Gu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Wu);function Ku(t){return Ku="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},Ku(t)}function Yu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$u(n.key),n)}}function $u(t){var e=function(t){if("object"!=Ku(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ku(e)?e:e+""}function Xu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xu=function(){return!!t})()}function Ju(t,e,r,n){var o=tc(ec(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function tc(){return tc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ec(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},tc.apply(null,arguments)}function ec(t){return ec=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ec(t)}function rc(t,e){return rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},rc(t,e)}u.Z.registerComponent("SeekBar",Qu);var nc=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ec(e),function(t,e){if(e&&("object"==Ku(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xu()?Reflect.construct(e,r||[],ec(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rc(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Ju(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Ju(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(t){this.el_.style.width=100*t+"%"}}])&&Yu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function oc(t){return oc="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},oc(t)}function ic(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ac(n.key),n)}}function ac(t){var e=function(t){if("object"!=oc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=oc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oc(e)?e:e+""}function uc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(uc=function(){return!!t})()}function cc(t,e,r,n){var o=lc(sc(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function lc(){return lc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=sc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},lc.apply(null,arguments)}function sc(t){return sc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sc(t)}function fc(t,e){return fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fc(t,e)}var pc=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=sc(e),function(t,e){if(e&&("object"==oc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,uc()?Reflect.construct(e,r||[],sc(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fc(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(cc(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return cc(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(t){t>0&&t<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*t+"%"}}])&&ic(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function yc(t){return yc="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},yc(t)}function hc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vc(n.key),n)}}function vc(t){var e=function(t){if("object"!=yc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=yc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yc(e)?e:e+""}function dc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dc=function(){return!!t})()}function bc(t,e,r,n){var o=mc(gc(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function mc(){return mc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=gc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},mc.apply(null,arguments)}function gc(t){return gc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gc(t)}function wc(t,e){return wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wc(t,e)}var Oc=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=gc(e),function(t,e){if(e&&("object"==yc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,dc()?Reflect.construct(e,r||[],gc(t).constructor):e.apply(t,r))}(this,e,[t,r])).playProgress=new pc(n.player_),n.addChild(n.playProgress),n.loadProgress=new nc(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wc(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(bc(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return bc(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var t=this.player_.duration()||3600,e=this.options_.endTime-this.options_.startTime;if(t!==this.duration_){var r=e/t;this.el_.style.width=100*r+"%";var n=this.options_.startTime/t;this.el_.style.left=100*n+"%",this.duration_=t}var o=this.getCurrentTime();o<this.options_.startTime?this.playProgress.update(0):o>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((o-this.options_.startTime)/e)}},{key:"updateBuffered",value:function(t){var e=this.options_.endTime-this.options_.startTime;t<this.options_.startTime?this.loadProgress.update(0):t>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((t-this.options_.startTime)/e)}}])&&hc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function jc(t){return jc="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},jc(t)}function Pc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Sc(n.key),n)}}function Sc(t){var e=function(t){if("object"!=jc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jc(e)?e:e+""}function _c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_c=function(){return!!t})()}function kc(t,e,r,n){var o=Ec(Cc(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Ec(){return Ec="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Cc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ec.apply(null,arguments)}function Cc(t){return Cc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cc(t)}function Tc(t,e){return Tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Tc(t,e)}var xc=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Cc(e),function(t,e){if(e&&("object"==jc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_c()?Reflect.construct(e,r||[],Cc(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tc(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(kc(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return kc(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"updateBuffered",value:function(){var t=this;this.children_.forEach((function(e){e.updateBuffered(function(t){for(var e=t.buffered(),r=t.currentTime(),n=0,o=0;o<e.length;o++){var i=e.start(o),a=e.end(o);if(i<=r&&a>=r){n=a;break}}return n}(t.player_))}))}}])&&Pc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function Lc(t){return Lc="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},Lc(t)}function Rc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Bc(n.key),n)}}function Bc(t){var e=function(t){if("object"!=Lc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lc(e)?e:e+""}function Ic(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ic=function(){return!!t})()}function Dc(t,e,r,n){var o=Mc(Nc(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Mc(){return Mc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Nc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Mc.apply(null,arguments)}function Nc(t){return Nc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nc(t)}function Ac(t,e){return Ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ac(t,e)}var Zc=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Nc(e),function(t,e){if(e&&("object"==Lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ic()?Reflect.construct(e,r||[],Nc(t).constructor):e.apply(t,r))}(this,e,[t,r])).onDurationChange=n.onDurationChange.bind(n),n.createChapterItems=n.createChapterItems.bind(n),n.updateBuffered=n.updateBuffered.bind(n),Y.useTrack(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ac(t,e)}(e,t),r=e,(n=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),Dc(e,"dispose",this,3)([])}},{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar"),role:"progressbar"})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var t=Dc(e,"update",this,3)([]);return this.chapterBarItems&&this.chapterBarItems.update(),t}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"bindUpdateListener",value:function(t){var e=this,r=function(){e.createChapterItems(),e.updateBuffered()};t.addEventListener("cv:cuechange",r),this.player_.one("dispose",(function(){return t.removeEventListener("cv:cuechange",r)}))}},{key:"createChapterItems",value:function(t){var e,r;t&&(this.track_||this.bindUpdateListener(t),this.track_=t);var n=new xc(this.player_);if((null===(r=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===r?void 0:r.length)&&!this.options_.ignoreChapters)for(var o=0;o<this.track_.cues.length;o++){var i=this.track_.cues[o],a=i.startTime,u=i.endTime,c=this.player_.duration();c&&(o===this.track_.cues.length-1&&i.endTime<this.player_.duration()&&(u=this.player_.duration()),u>c&&(u=c));var l=new Oc(this.player_,{startTime:a,endTime:u});if(n.addChild(l),c&&u===c)break}else n.addChild(new Oc(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=n,this.addChild(this.chapterBarItems)}}])&&Rc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("SeekBar"));function Fc(t){return Fc="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},Fc(t)}function zc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gc(n.key),n)}}function Gc(t){var e=function(t){if("object"!=Fc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Fc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fc(e)?e:e+""}function Vc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vc=function(){return!!t})()}function Uc(){return Uc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Hc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Uc.apply(null,arguments)}function Hc(t){return Hc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hc(t)}function qc(t,e){return qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qc(t,e)}Zc.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},u.Z.browser.IS_IOS||u.Z.browser.IS_ANDROID||Zc.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),u.Z.registerComponent("ChapterSeekBar",Zc);var Wc=u.Z.getComponent("ProgressControl"),Qc="seekBar",Kc=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=Hc(e),function(t,e){if(e&&("object"==Fc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vc()?Reflect.construct(e,r||[],Hc(t).constructor):e.apply(t,r))}(this,e,arguments)).seekBarName_=Qc,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qc(t,e)}(e,t),r=e,n=[{key:"setSeekBarName",value:function(t){this.seekBarName_=t}},{key:"getChild",value:function(t){return(null==t?void 0:t.toLowerCase())===Qc.toLowerCase()&&(t=this.seekBarName_),(r=e,n=this,"function"==typeof(o=Uc(Hc(1&3?r.prototype:r),"getChild",n))?function(t){return o.apply(n,t)}:o)([t]);var r,n,o}}],n&&zc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Wc);function Yc(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;t=t<0?0:t;var r=Math.floor(t%60),n=Math.floor(t/60%60),o=Math.floor(t/3600),i=Math.floor(e/60%60),a=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(o=n=r="-"),(o=o>0||a>0?o+":":"")+(n=((o||i>=10)&&n<10?"0"+n:n)+":")+(r<10?"0"+r:r)}function $c(t){return $c="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},$c(t)}function Xc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Jc(n.key),n)}}function Jc(t){var e=function(t){if("object"!=$c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=$c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$c(e)?e:e+""}function tl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(tl=function(){return!!t})()}function el(){return el="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=rl(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},el.apply(null,arguments)}function rl(t){return rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rl(t)}function nl(t,e){return nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},nl(t,e)}Kc.prototype.options_={children:[]},u.Z.registerComponent("ProgressControl",Kc);var ol=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=rl(e),function(t,e){if(e&&("object"==$c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,tl()?Reflect.construct(e,r||[],rl(t).constructor):e.apply(t,r))}(this,e,[t,r])).hasCustomChapterText=!1,Y.useTrack(n.player_,"chapters",!1,(function(t){n.track_=t})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nl(t,e)}(e,t),r=e,n=[{key:"createEl",value:function(){var t,r,n,o=(t=e,r=this,"function"==typeof(n=el(rl(1&3?t.prototype:t),"createEl",r))?function(t){return n.apply(r,t)}:n)([]);return this.chapter_=u.Z.dom.createEl("div"),o.appendChild(this.chapter_),this.time_=u.Z.dom.createEl("div"),o.appendChild(this.time_),o}},{key:"updateTime",value:function(t){var e=this.player_.duration();if(u.Z.dom.textContent(this.time_,Yc(t,e)),this.track_&&!this.hasCustomChapterText){for(var r=0;r<this.track_.cues.length;r++){var n=this.track_.cues[r],o=n.endTime||e;if(n.startTime<=t&&o>=t)return void u.Z.dom.textContent(this.chapter_,n.text)}u.Z.dom.textContent(this.chapter_,"")}}},{key:"clearChapterContent",value:function(){u.Z.dom.textContent(this.chapter_,"")}},{key:"updateText",value:function(t){u.Z.dom.textContent(this.time_,t)}},{key:"setCustomChapterText",value:function(t){this.hasCustomChapterText=!!t,u.Z.dom.textContent(this.chapter_,null!=t?t:"")}}],n&&Xc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("TimeTooltip"));function il(t){return il="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},il(t)}function al(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ul(n.key),n)}}function ul(t){var e=function(t){if("object"!=il(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=il(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==il(e)?e:e+""}function cl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(cl=function(){return!!t})()}function ll(){return ll="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=sl(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ll.apply(null,arguments)}function sl(t){return sl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sl(t)}function fl(t,e){return fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fl(t,e)}u.Z.registerComponent("TimeTooltip",ol);var pl=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=sl(e),function(t,e){if(e&&("object"==il(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,cl()?Reflect.construct(e,r||[],sl(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fl(t,e)}(e,t),r=e,n=[{key:"setTrack",value:function(t){this.track_=t}},{key:"createEl",value:function(){var t,r,n,o=(t=e,r=this,"function"==typeof(n=ll(sl(1&3?t.prototype:t),"createEl",r))?function(t){return n.apply(r,t)}:n)(["div",{className:"cv-thumbnail-display"}]);return this.img_=u.Z.dom.createEl("img"),o.appendChild(this.img_),o}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(t){var e=t.indexOf("#");if(-1===e)return{src:t,w:0,h:0,x:0,y:0};var r=t.substr(0,e),n=t.substr(e+1);if("xywh="!==n.substr(0,5))return{src:t,w:0,h:0,x:0,y:0};var o=this.getScale(),i=n.substr(5).split(",");return{src:r,w:parseInt(i[2])*o,h:parseInt(i[3])*o,x:parseInt(i[0])*o,y:parseInt(i[1])*o}}},{key:"getScale",value:function(){var t=this.options_.scaleFactor,e=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==e&&(t*=2),t}},{key:"update",value:function(t){var e,r;if(null===(r=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===r?void 0:r.length){for(var n,o=t,i=0;i<this.track_.cues.length;){var a=this.track_.cues[i];if(a.startTime<=o&&a.endTime>=o){n=this.parseImageLink(a.text);break}i++}if(null==n?void 0:n.src){this.enable();var u=n,c=u.src,l=u.w,s=u.h,f=u.x,p=u.y,y=this.getScale();this.img_.src=c,this.img_.style.left=-f+"px",this.img_.style.top=-p+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(y,")"),this.el_.style.width=l+"px",this.el_.style.height=s+"px"}else this.disable()}}}],n&&al(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function yl(t){return yl="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},yl(t)}function hl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vl(n.key),n)}}function vl(t){var e=function(t){if("object"!=yl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=yl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yl(e)?e:e+""}function dl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dl=function(){return!!t})()}function bl(t){return bl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bl(t)}function ml(t,e){return ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ml(t,e)}pl.prototype.options_={scaleFactor:1},u.Z.registerComponent("ThumbnailDisplay",pl);var gl=u.Z.getComponent("MouseTimeDisplay"),wl="cv-mouse-time-display-force-show",Ol=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e,r){return e=bl(e),function(t,e){if(e&&("object"==yl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,dl()?Reflect.construct(e,r||[],bl(t).constructor):e.apply(t,r))}(this,e,[t,r]),Y.useTrack(n.player_,"metadata","thumbnails",(function(t){n.getChild("ThumbnailDisplay").setTrack(t)})),n.update=n.update.bind(n),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ml(t,e)}(e,t),r=e,(n=[{key:"update",value:function(t,e){var r=this;this.requestAnimationFrame((function(){var n=r.getChild("TimeTooltip"),o=r.getChild("ThumbnailDisplay"),i=e*r.player_.duration(),a=r.player_.preventScrubbingPlugin(),u=r.player_.controlBar.getChild("progressControl").getChild($i),c=!1;a.isEnabled&&(c=i>a.furthestVisitedTime),c?(r.hide(),u.show(),$(u.hide,1e3,!1,u)()):(r.show(),u&&u.hide(!0),o.update(i),n.updateTime(i));var l=r.el_.getBoundingClientRect();r.el_.style.marginLeft=-l.width/2+"px";var s=t.width*e;s<l.width/2?r.el_.style.left=l.width/2+"px":s>t.width-l.width/2?r.el_.style.left=t.width-l.width/2+"px":r.el_.style.left=t.width*e+"px"}))}},{key:"forceShow",value:function(){this.addClass(wl)}},{key:"removeForceShow",value:function(){this.removeClass(wl)}}])&&hl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(gl);function jl(t){return jl="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},jl(t)}function Pl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Sl(n.key),n)}}function Sl(t){var e=function(t){if("object"!=jl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jl(e)?e:e+""}function _l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_l=function(){return!!t})()}function kl(){return kl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=El(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},kl.apply(null,arguments)}function El(t){return El=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},El(t)}function Cl(t,e){return Cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Cl(t,e)}Ol.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},u.Z.registerComponent("MouseTimeDisplay",Ol);var Tl=u.Z.getComponent("ChaptersTrackMenuItem"),xl=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=El(e),function(t,e){if(e&&("object"==jl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_l()?Reflect.construct(e,r||[],El(t).constructor):e.apply(t,r))}(this,e,[t,r])).nonIconControl=!1,n.thumbnailDisplay=new pl(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),Y.useTrack(n.player_,"metadata","thumbnails",(function(t){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(t),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cl(t,e)}(e,t),r=e,n=[{key:"update",value:function(){this.player_&&Tl.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(t,r,n){return this.nonIconControl=!0,(o=e,i=this,"function"==typeof(a=kl(El(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)(["li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},r),n]);var o,i,a}},{key:"getInnerHTML",value:function(){var t=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(Yc(this.options_.cue.startTime,t),")</p>")+"</span>"}}],n&&Pl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Tl);function Ll(t){return Ll="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},Ll(t)}function Rl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Bl(n.key),n)}}function Bl(t){var e=function(t){if("object"!=Ll(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ll(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ll(e)?e:e+""}function Il(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Il=function(){return!!t})()}function Dl(t,e,r,n){var o=Ml(Nl(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Ml(){return Ml="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Nl(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ml.apply(null,arguments)}function Nl(t){return Nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nl(t)}function Al(t,e){return Al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Al(t,e)}var Zl=function(t){function e(t,r,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,r){return e=Nl(e),function(t,e){if(e&&("object"==Ll(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Il()?Reflect.construct(e,r||[],Nl(t).constructor):e.apply(t,r))}(this,e,[t,r,n])).alwaysCollapsed=!1,o.isCollapsed=!1,o.isCollabsible=!0,o.update=o.update.bind(o),o.player_.on("cv-whiteboard-change",o.update),o.player_.on("fullscreenchange",o.update),o.player_.on("dispose",(function(){o.player_.off("cv-whiteboard-change",o.update),o.player_.off("fullscreenchange",o.update)})),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Al(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Dl(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Dl(e,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var r=0,n=e.length;r<n;r++){var o=e[r],i=new xl(this.player_,{track:this.track_,cue:o});t.push(i)}return t}},{key:"setTrack",value:function(t){var r=this;if(Dl(e,"setTrack",this,3)([t]),this.track_&&"chapters"===this.track_.kind){t.one("loadeddata",this.update);var n=function(){r.update(),r.player_.trigger("resizemenus")};t.on("cv:cuechange",n),this.player_.one("dispose",(function(){return t.off("cv:cueupdate",n)}))}}},{key:"update",value:function(t){Dl(e,"update",this,3)([t])}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var t=this.track_.activeCues[0];return(null==t?void 0:t.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var t=this.track_.cues;return!(!t||!t.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&Rl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("ChaptersButton"));function Fl(t){return Fl="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},Fl(t)}function zl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gl(n.key),n)}}function Gl(t){var e=function(t){if("object"!=Fl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Fl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fl(e)?e:e+""}function Vl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vl=function(){return!!t})()}function Ul(){return Ul="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Hl(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ul.apply(null,arguments)}function Hl(t){return Hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hl(t)}function ql(t,e){return ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ql(t,e)}u.Z.registerComponent("ChaptersButton",Zl);var Wl=u.Z.getComponent("OffTextTrackMenuItem"),Ql=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Hl(e),function(t,e){if(e&&("object"==Fl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vl()?Reflect.construct(e,r||[],Hl(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ql(t,e)}(e,t),r=e,n=[{key:"handleClick",value:function(t){Wl.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(t,r,n){return(o=e,i=this,"function"==typeof(a=Ul(Hl(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)(["li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},r),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n]);var o,i,a}}],n&&zl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Wl);function Kl(t){return Kl="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},Kl(t)}function Yl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$l(n.key),n)}}function $l(t){var e=function(t){if("object"!=Kl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Kl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kl(e)?e:e+""}function Xl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xl=function(){return!!t})()}function Jl(t){return Jl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jl(t)}function ts(t,e){return ts=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ts(t,e)}u.Z.registerComponent("OffTextTrackMenuItem",Ql);var es=u.Z.getComponent("TextTrackButton"),rs=u.Z.getComponent("TextTrackMenuItem"),ns=u.Z.getComponent("OffTextTrackMenuItem"),os=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Jl(e),function(t,e){if(e&&("object"==Kl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xl()?Reflect.construct(e,r||[],Jl(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ts(t,e)}(e,t),r=e,n=[{key:"createItems",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rs;this.label_&&(t="".concat(this.label_," off")),e.push(new ns(this.player_,{kinds:this.kinds_,kind:this.kind_,label:t})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o<n.length;o++){var i=n[o];if(this.kinds_.indexOf(i.kind)>-1){var a=new r(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(i.kind,"-menu-item")),e.push(a)}}return this.player().trigger("resizemenus"),e}}],n&&Yl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(es);function is(t){return is="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},is(t)}function as(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,us(n.key),n)}}function us(t){var e=function(t){if("object"!=is(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=is(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==is(e)?e:e+""}function cs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(cs=function(){return!!t})()}function ls(t){return ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ls(t)}function ss(t,e){return ss=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ss(t,e)}u.Z.registerComponent("TextTrackButton",os);var fs=u.Z.getComponent("SubsCapsMenuItem"),ps=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ls(e),function(t,e){if(e&&("object"==is(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,cs()?Reflect.construct(e,r||[],ls(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ss(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(t){fs.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}}])&&as(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(fs);function ys(t){return ys="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},ys(t)}function hs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vs(n.key),n)}}function vs(t){var e=function(t){if("object"!=ys(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ys(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ys(e)?e:e+""}function ds(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ds=function(){return!!t})()}function bs(t){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bs(t)}function ms(t,e){return ms=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ms(t,e)}var gs=function(t){function e(t){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n={};n.track={player:t,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(r=function(t,e,r){return e=bs(e),function(t,e){if(e&&("object"==ys(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ds()?Reflect.construct(e,r||[],bs(t).constructor):e.apply(t,r))}(this,e,[t,n])).addClass("vjs-texttrack-settings"),r.addClass("cv-subtitle-search-menu-item"),r.controlText(", opens subtitle search"),r.toggleEnabled=r.toggleEnabled.bind(r);var o=r.player_.textTracks();return o.addEventListener("selectedlanguagechange",r.toggleEnabled),r.player_.one("dispose",(function(){o.removeEventListener("selectedlanguagechange",r.toggleEnabled)})),r.toggleEnabled(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ms(t,e)}(e,t),r=e,(n=[{key:"toggleEnabled",value:function(){var t;if(this.player_){var e=Y.getCurrentTextTrack(this.player_);e?(null===(t=e.cues)||void 0===t?void 0:t.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(e),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.toggleEnabled),t.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.toggleEnabled)}))}},{key:"handleClick",value:function(){var t,e=this,r=Y.getCurrentTextTrack(this.player_);(null===(t=null==r?void 0:r.cues)||void 0===t?void 0:t.length)&&this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&hs(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("TextTrackMenuItem"));function ws(t){return ws="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},ws(t)}function Os(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,js(n.key),n)}}function js(t){var e=function(t){if("object"!=ws(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ws(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ws(e)?e:e+""}function Ps(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ps=function(){return!!t})()}function Ss(t){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ss(t)}function _s(t,e){return _s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_s(t,e)}var ks=function(t){function e(t){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n={};return n.track={player:t,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(r=function(t,e,r){return e=Ss(e),function(t,e){if(e&&("object"==ws(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ps()?Reflect.construct(e,r||[],Ss(t).constructor):e.apply(t,r))}(this,e,[t,n])).addClass("vjs-texttrack-settings"),r.addClass("cv-divider-after-menu-item"),r.addClass("cv-subtitle-size-menu-item"),r.controlText(", opens subtitle size settings"),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_s(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(){var t=this;this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&Os(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("TextTrackMenuItem"));function Es(t){return Es="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},Es(t)}function Cs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ts(n.key),n)}}function Ts(t){var e=function(t){if("object"!=Es(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Es(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Es(e)?e:e+""}function xs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xs=function(){return!!t})()}function Ls(){return Ls="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Rs(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ls.apply(null,arguments)}function Rs(t){return Rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rs(t)}function Bs(t,e){return Bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bs(t,e)}var Is=u.Z.getComponent("TextTrackButton"),Ds=u.Z.getComponent("SubsCapsButton"),Ms=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=Rs(e),function(t,e){if(e&&("object"==Es(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xs()?Reflect.construct(e,r||[],Rs(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t.className="cv-subs-caps-menu-button",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bs(t,e)}(e,t),r=e,n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=Ls(Rs(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"createItems",value:function(){var t=[];return this.player_.options_.mobile||(t.push(new gs(this.player_)),t.push(new ks(this.player_)),this.hideThreshold_=this.hideThreshold_+2),Is.prototype.createItems.call(this,t,ps)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var r=t[e];if(this.kinds_.indexOf(r.kind)>-1&&"showing"===r.mode)return r.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var r=t[e];if(this.kinds_.indexOf(r.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Ds.prototype.handleClick.apply(this)}}],n&&Cs(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Ds);function Ns(t){return Ns="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},Ns(t)}function As(){As=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Ns(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ns(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Zs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Fs(n.key),n)}}function Fs(t){var e=function(t){if("object"!=Ns(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ns(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ns(e)?e:e+""}function zs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zs=function(){return!!t})()}function Gs(t){return Gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gs(t)}function Vs(t,e){return Vs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vs(t,e)}u.Z.registerComponent("SubsCapsButton",Ms);var Us="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Bn,"</span>"),Hs=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Gs(e),function(t,e){if(e&&("object"==Ns(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,zs()?Reflect.construct(e,r||[],Gs(t).constructor):e.apply(t,r))}(this,e,[t,r])).qualityId=r.qualityId;var o=t.qualityLevels(),i=n.handleQualityChange.bind(n);return o.on("change",i),t.one("dispose",(function(){o.off("change",i)})),n.handleLocalCacheChange=n.handleLocalCacheChange.bind(n),n.player_.ready((function(){n.player_&&(n.player_.on("localcachechanged",n.handleLocalCacheChange),n.player_.one("dispose",(function(){var t;null===(t=n.player_)||void 0===t||t.off("localcachechanged",n.handleLocalCacheChange)})),n.handleLocalCacheChange())})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vs(t,e)}(e,t),r=e,(n=[{key:"handleLocalCacheChange",value:function(){return t=this,e=void 0,r=void 0,n=As().mark((function t(){var e,r;return As().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player_.localCache(),t.next=3,e.getActiveLocalCache();case 3:if(null==(r=t.sent)?void 0:r.playbackProfile){t.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),t.abrupt("return");case 9:r.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Us);case 10:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var t=this.player_.qualityLevels(),e=0;e<t.length;e++){var r=t[e];r.enabled=r.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var t=this.player_.qualityLevels(),e=t[t.selectedIndex],r=e&&e.id===this.qualityId;r!==this.isSelected_&&this.selected(r)}}}])&&Zs(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("MenuItem"));function qs(t){return qs="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},qs(t)}function Ws(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qs(n.key),n)}}function Qs(t){var e=function(t){if("object"!=qs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=qs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qs(e)?e:e+""}function Ks(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ks=function(){return!!t})()}function Ys(t,e,r,n){var o=$s(Xs(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function $s(){return $s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Xs(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},$s.apply(null,arguments)}function Xs(t){return Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xs(t)}function Js(t,e){return Js=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Js(t,e)}var tf={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},ef=u.Z.getComponent("MenuButton"),rf=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Xs(e),function(t,e){if(e&&("object"==qs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ks()?Reflect.construct(e,r||[],Xs(t).constructor):e.apply(t,r))}(this,e,[t,r])).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0,n.className="cv-quality-menu-button";var o=n.player_.qualityLevels(),i=n.update.bind(n);return o.on("addqualitylevel",i),o.on("removequalitylevel",i),t.one("dispose",(function(){o.removeEventListener("addqualitylevel",i),o.removeEventListener("removequalitylevel",i)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Js(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Ys(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Ys(e,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var t=[],e=this.player_.qualityLevels();t.push(new T(this.player_,{label:"Quality"}));for(var r=0;r<e.length;r++){var n=e[r];if(n){var o=tf[n.id];o&&t.push(new Hs(this.player_,{qualityId:n.id,label:o,selectable:!0,multiSelectable:!1}))}}return t}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.qualityLevels(),e=t[t.selectedIndex];return e?tf[e.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){ef.prototype.handleClick.apply(this)}}])&&Ws(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(ef);function nf(t){return nf="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},nf(t)}function of(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,af(n.key),n)}}function af(t){var e=function(t){if("object"!=nf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=nf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==nf(e)?e:e+""}function uf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(uf=function(){return!!t})()}function cf(){return cf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=lf(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},cf.apply(null,arguments)}function lf(t){return lf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lf(t)}function sf(t,e){return sf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},sf(t,e)}u.Z.registerComponent("QualityButton",rf);var ff=u.Z.getComponent("Menu"),pf=u.Z.getComponent("MenuButton"),yf=u.Z.getComponent("PlaybackRateMenuItem"),hf=u.Z.getComponent("PlaybackRateMenuButton"),vf=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=lf(e),function(t,e){if(e&&("object"==nf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,uf()?Reflect.construct(e,r||[],lf(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t.className="cv-playback-rate-menu-button",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sf(t,e)}(e,t),r=e,n=[{key:"createEl",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=pf.prototype.createEl).apply.apply(t,[this].concat(r))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=cf(lf(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"createMenu",value:function(){var t=new ff(this.player(),{menuButton:this});t.addItem(new T(this.player_,{label:"Playback Speed"}));var e=this.playbackRates();if(e)for(var r=0;r<e.length;r++){var n=e[r]+"x";1===e[r]&&(n+=" (Normal)"),t.addItem(new yf(this.player(),{rate:n}))}return t}},{key:"handleClick",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=pf.prototype.handleClick).apply.apply(t,[this].concat(r))}},{key:"updateLabel",value:function(){var t;this.setupLabelEl();for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=hf.prototype.updateLabel).apply.apply(t,[this].concat(r))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var t=this.$("button");t&&(this.labelEl_=u.Z.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}],n&&of(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(hf);function df(t){return df="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},df(t)}function bf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mf(n.key),n)}}function mf(t){var e=function(t){if("object"!=df(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=df(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==df(e)?e:e+""}function gf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gf=function(){return!!t})()}function wf(t){return wf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wf(t)}function Of(t,e){return Of=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Of(t,e)}u.Z.registerComponent("PlaybackRateMenuButton",vf);var jf=u.Z.getComponent("TextTrackSettings"),Pf={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Sf={small:Pf,medium:Object.assign(Object.assign({},Pf),{fontPercent:1.5}),large:Object.assign(Object.assign({},Pf),{fontPercent:2})},_f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=wf(e),function(t,e){if(e&&("object"==df(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gf()?Reflect.construct(e,r||[],wf(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Of(t,e)}(e,t),r=e,(n=[{key:"setSizeSetting",value:function(t){var e=this;this.size_=t,this.player_.getChild("textTrackDisplay").updateDisplay();var r=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame((function(){r.update(),e.player_.trigger("resizemenus")}))}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return Sf[this.size_]?Sf[this.size_]:Pf}}])&&bf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(jf);function kf(t){return kf="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},kf(t)}function Ef(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Cf(n.key),n)}}function Cf(t){var e=function(t){if("object"!=kf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=kf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kf(e)?e:e+""}function Tf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tf=function(){return!!t})()}function xf(t,e,r,n){var o=Lf(Rf(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Lf(){return Lf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Rf(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Lf.apply(null,arguments)}function Rf(t){return Rf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rf(t)}function Bf(t,e){return Bf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bf(t,e)}u.Z.registerComponent("TextTrackSettings",_f);var If=window.navigator&&window.navigator.userAgent||"",Df=(/iPod/i.test(If),/Android/i.test(If),u.Z.getComponent("Player")),Mf=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Rf(e),function(t,e){if(e&&("object"==kf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Tf()?Reflect.construct(e,r||[],Rf(t).constructor):e.apply(t,r))}(this,e,[t,r]))._dataLoaded=!1,r.mobile&&n.addClass("cv-mobile-player");var o=function(){return n._dataLoaded=!0};return n.on("cv-playback-data-loaded",o),n.on("dispose",(function(){return n.off("cv-playback-data-loaded",o)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bf(t,e)}(e,t),r=e,(n=[{key:"dataLoaded",value:function(t){var e=this;this._dataLoaded?t():(this.one("cv-playback-data-loaded",t),this.one("dispose",(function(){e.off("cv-playback-data-loaded",t)})))}},{key:"lock",value:function(t){this.callback_=t}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(t,r){var n=this;if("number"!=typeof t||!this.callback_||r)return xf(e,"currentTime",this,3)([t]);this.callback_((function(){n.unlock(),n.currentTime(t)}))}},{key:"play",value:function(){var t=this;if(!this.callback_)return xf(e,"play",this,3)([]);this.callback_((function(){t.unlock(),t.play()}))}},{key:"updateStyleEl_",value:function(){if(Df.prototype.updateStyleEl_.call(this),this.options_.fluid){var t=this.el_.parentNode;if(t&&this.options_.setMaxHeight){var e=this.aspectRatio();if(void 0!==e&&"auto"!==e||(e=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9"),this.player_.playerModePlugin().getMode()===Ia.Hover)return t.style.removeProperty("maxWidth"),void t.style.removeProperty("margin");var r=e.split(":"),n=+r[1]/+r[0];t.style.maxWidth=85/n+"vh",t.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var t=this;Df.prototype.listenForUserActivity_.call(this);var e=this.getChild("collapserator");e.on("mouseenter",(function(){t.player().cache_.inactivityTimeout=t.player().options_.inactivityTimeout,t.player().options_.inactivityTimeout=0})),e.on("mouseleave",(function(){t.player().options_.inactivityTimeout=t.player().cache_.inactivityTimeout}))}}])&&Ef(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Df);function Nf(t){return Nf="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},Nf(t)}function Af(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zf(n.key),n)}}function Zf(t){var e=function(t){if("object"!=Nf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Nf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Nf(e)?e:e+""}function Ff(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ff=function(){return!!t})()}function zf(t){return zf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zf(t)}function Gf(t,e){return Gf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gf(t,e)}Mf.prototype.options_=Object.assign(Object.assign({},Df.prototype.options_),{setMaxHeight:!0}),u.Z.registerComponent("player",Mf);var Vf=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=zf(e),function(t,e){if(e&&("object"==Nf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ff()?Reflect.construct(e,r||[],zf(t).constructor):e.apply(t,r))}(this,e,[t,r])).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(n),n.player_.one("play",n.onFirstPlay),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gf(t,e)}(e,t),r=e,(n=[{key:"dispose",value:function(){this.player_.off("play",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var t=this;window.setTimeout((function(){t.player_.isDisposed()||t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Af(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function Uf(t){return Uf="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},Uf(t)}function Hf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qf(n.key),n)}}function qf(t){var e=function(t){if("object"!=Uf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Uf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Uf(e)?e:e+""}function Wf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wf=function(){return!!t})()}function Qf(t){return Qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qf(t)}function Kf(t,e){return Kf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kf(t,e)}u.Z.registerComponent("PlayPauseFeedback",Vf);var Yf=u.Z.getComponent("PlayToggle"),$f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Qf(e),function(t,e){if(e&&("object"==Uf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wf()?Reflect.construct(e,r||[],Qf(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kf(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(t){var e=this;Yf.prototype.handleClick.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&Hf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Yf);function Xf(t){return Xf="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},Xf(t)}function Jf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,tp(n.key),n)}}function tp(t){var e=function(t){if("object"!=Xf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Xf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xf(e)?e:e+""}function ep(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ep=function(){return!!t})()}function rp(t){return rp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rp(t)}function np(t,e){return np=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},np(t,e)}u.Z.registerComponent("PlayToggle",$f);var op=u.Z.getComponent("TextTrackDisplay"),ip=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=rp(e),function(t,e){if(e&&("object"==Xf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ep()?Reflect.construct(e,r||[],rp(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&np(t,e)}(e,t),r=e,(n=[{key:"updateDisplayState",value:function(t){op.prototype.updateDisplayState.call(this,t);for(var e=this.player_.textTrackSettings.getValues(),r=t.activeCues,n=r.length;n--;){var o=r[n];if(o){var i=o.displayState;if(e.fontPercent&&1!==e.fontPercent){var a=.025*this.el().getBoundingClientRect().width*100/100;i.style.fontSize=a*e.fontPercent+"px"}}}}}])&&Jf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(op);function ap(t){return ap="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},ap(t)}function up(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,cp(n.key),n)}}function cp(t){var e=function(t){if("object"!=ap(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ap(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ap(e)?e:e+""}function lp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(lp=function(){return!!t})()}function sp(t){return sp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sp(t)}function fp(t,e){return fp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fp(t,e)}u.Z.registerComponent("TextTrackDisplay",ip);var pp=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=sp(e),function(t,e){if(e&&("object"==ap(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,lp()?Reflect.construct(e,r||[],sp(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fp(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"cv-control-bar-gradient-container",innerHTML:'<div class="cv-control-bar-gradient"></div>'})}}])&&up(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function yp(t){return yp="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},yp(t)}function hp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vp(n.key),n)}}function vp(t){var e=function(t){if("object"!=yp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=yp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yp(e)?e:e+""}function dp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dp=function(){return!!t})()}function bp(t,e,r,n){var o=mp(gp(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function mp(){return mp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=gp(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},mp.apply(null,arguments)}function gp(t){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gp(t)}function wp(t,e){return wp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wp(t,e)}u.Z.registerComponent("ControlBarGradient",pp);var Op=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=gp(e),function(t,e){if(e&&("object"==yp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,dp()?Reflect.construct(e,r||[],gp(t).constructor):e.apply(t,r))}(this,e,[t,r])).options_=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wp(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){var t=this.options_.title;if(!this.options_.seriesName)return bp(e,"createEl",this,3)(["h1",{innerHTML:t}]);var r=this.buildSeasonEpisodeString();return r?(t="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase()," ").concat(r,"</div>")+t,bp(e,"createEl",this,3)(["h1",{innerHTML:t}])):(t="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+t,bp(e,"createEl",this,3)(["h1",{innerHTML:t}]))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var t=this.padNumber(this.options_.seasonNumber,2),e=this.padNumber(this.options_.episodeNumber,2);return"S".concat(t," • E").concat(e)}},{key:"padNumber",value:function(t,e){var r=t.toString();if(r.length>=e)return r;for(e-=r.length;e>0;)r="0"+r,e--;return r}}])&&hp(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function jp(t){return jp="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},jp(t)}function Pp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Sp(n.key),n)}}function Sp(t){var e=function(t){if("object"!=jp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jp(e)?e:e+""}function _p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_p=function(){return!!t})()}function kp(){return kp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ep(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},kp.apply(null,arguments)}function Ep(t){return Ep=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ep(t)}function Cp(t,e){return Cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Cp(t,e)}var Tp=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ep(e),function(t,e){if(e&&("object"==jp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_p()?Reflect.construct(e,r||[],Ep(t).constructor):e.apply(t,r))}(this,e,[t,r])).options_=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cp(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-splash-rating ".concat((t=this.options_.ratingValue)?function(t){switch(!0){case t<32:return"cv-rating-purple";case t<48:return"cv-rating-green";case t<80:return"cv-rating-blue";case t<96:return"cv-rating-red";case t<128:return"cv-rating-pink";case t>=128:return"cv-rating-yellow";default:return""}}(t):"");var t}},{key:"createEl",value:function(t,r,n){return this.options_.ratingCode?(o=e,i=this,"function"==typeof(a=kp(Ep(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass(),innerHTML:this.options_.ratingCode}),n]):null;var o,i,a}}],n&&Pp(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function xp(t){return xp="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},xp(t)}function Lp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Rp(n.key),n)}}function Rp(t){var e=function(t){if("object"!=xp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=xp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xp(e)?e:e+""}function Bp(t,e){if(e&&("object"==xp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ip(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ip=function(){return!!t})()}function Dp(t){return Dp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Dp(t)}function Mp(t,e){return Mp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Mp(t,e)}var Np=function(t){function e(t,r){var n,o,i,a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o=this,a=[t,r],i=Dp(i=e),n=Bp(o,Ip()?Reflect.construct(i,a||[],Dp(o).constructor):i.apply(o,a)),r.embed?(n.addChild(new Op(t,r)),n.addChild(new Tp(t,r)),n):Bp(n,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mp(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"cv-splash-metadata"})}}])&&Lp(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function Ap(t){return Ap="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},Ap(t)}function Zp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Fp(n.key),n)}}function Fp(t){var e=function(t){if("object"!=Ap(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ap(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ap(e)?e:e+""}function zp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zp=function(){return!!t})()}function Gp(t){return Gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gp(t)}function Vp(t,e){return Vp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vp(t,e)}var Up=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Gp(e),function(t,e){if(e&&("object"==Ap(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,zp()?Reflect.construct(e,r||[],Gp(t).constructor):e.apply(t,r))}(this,e,[t,r])).addChild(new Np(t,r)),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vp(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){var t="<div class='cv-splash-mask'></div>";return this.options_.embed&&(t+="<div class='cv-splash-logo'>".concat(wr,"</div>")),u.Z.dom.createEl("div",{className:"vjs-poster cv-embed-splash cv-embed-splash-black",tabIndex:-1,innerHTML:t})}},{key:"setSrc",value:function(t){var e="";t&&(e='url("'.concat(t,'")')),this.el_.style.backgroundImage=e}}])&&Zp(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("posterImage"));function Hp(t){return Hp="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},Hp(t)}function qp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Wp(n.key),n)}}function Wp(t){var e=function(t){if("object"!=Hp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Hp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hp(e)?e:e+""}function Qp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Qp=function(){return!!t})()}function Kp(t){return Kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kp(t)}function Yp(t,e){return Yp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yp(t,e)}u.Z.registerComponent("posterImage",Up);var $p=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Kp(e),function(t,e){if(e&&("object"==Hp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Qp()?Reflect.construct(e,r||[],Kp(t).constructor):e.apply(t,r))}(this,e,[t,r])).el().prepend(n.getErrorImage()),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yp(t,e)}(e,t),r=e,(n=[{key:"getErrorImage",value:function(){return u.Z.dom.createEl("div",{className:"cv-error-image",innerHTML:'\n <svg viewBox="0 0 301 185" xmlns="http://www.w3.org/2000/svg">\n <path d="M267.393 36.6514V167.906C267.393 168.182 267.169 168.406 266.893 168.406H32C31.7239 168.406 31.5 168.182 31.5 167.906V36.6514C31.5 36.3752 31.7239 36.1514 32 36.1514H80.5C80.7761 36.1514 81 36.3752 81 36.6514V57.7196C81 58.7622 82.0375 59.4868 83.0164 59.1279L95.7377 54.4634C95.9961 54.3687 96.2825 54.5006 96.3785 54.7585L102.094 70.1194C102.677 71.6866 105 71.2685 105 69.5964V48.4925C105 47.7632 104.475 47.1396 103.757 47.0146L94.2479 45.3609C93.9436 45.308 93.7596 44.9946 93.8616 44.7031L96.7376 36.4862C96.8077 36.2856 96.997 36.1514 97.2095 36.1514H266.893C267.169 36.1514 267.393 36.3752 267.393 36.6514Z" stroke="white"/>\n <path d="M163.296 101.777L149.437 90.1217C148.275 89.1441 146.5 89.9705 146.5 91.4894V113.664C146.5 115.141 148.191 115.98 149.367 115.087L163.226 104.569C164.139 103.876 164.173 102.515 163.296 101.777Z" stroke="white" stroke-linecap="round"/>\n <path d="M295.53 23.0783L277.524 26.2801L283.252 32.7192L274.855 38.9079L292.861 35.7061L287.133 29.2671L295.53 23.0783Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M268.06 2.91764L254.192 14.8403L262.401 17.4661L258.324 27.0679L272.192 15.1453L263.983 12.5194L268.06 2.91764Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n '})}}])&&qp(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("ErrorDisplay"));u.Z.registerComponent("ErrorDisplay",$p);var Xp=r(67453),Jp=r(54610);function ty(t){return ty="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},ty(t)}function ey(){ey=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==ty(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ty(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function ry(t){return function(t){if(Array.isArray(t))return ny(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ny(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ny(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ny(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function oy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,iy(n.key),n)}}function iy(t){var e=function(t){if("object"!=ty(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ty(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ty(e)?e:e+""}var ay,uy=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},cy=u.Z.getComponent("Player"),ly=function(){return t=function t(e,r){var n=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.streamLogged=!1,this.options=u.Z.obj.merge({},t.options_,r),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(e),this.buildVideoJs(),this.options.splash&&this.setupSplash(this.options.splash),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready((function(){n._configurePlugins(),n.options.setup&&n.options.setup(n.options,n.player),n.fetch().catch((function(t){return n.handleFetchError(t)}))}))},(e=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.configureMenuDimensionsPlugin({mobile:this.options.mobile,overflowControls:this.options.overflowControls,seekBarName:this.getSeekBarName()}),this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),!this.options.mobile&&this.options.allowFullscreen&&this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(t){var e;null===(e=this.analyticsService)||void 0===e||e.logVideoProgress(t)}},{key:"buildVideoJs",value:function(){return this.player=(0,u.Z)(this.el,this.getPlayerOptions())}},{key:"getInactivityTimeout",value:function(){if("number"==typeof this.options.inactivityTimeout)return this.options.inactivityTimeout;var t=500;return(this.options.mobile||u.Z.browser.IS_IOS||u.Z.browser.IS_ANDROID)&&(t=3e3),t}},{key:"getPlayerOptions",value:function(){var t=this,e=cy.prototype.options_.children;return e=e.filter((function(t){return"bigPlayButton"!==t&&"posterImage"!==t})),{controls:this.options.controls,fluid:!this.options.embed&&!this.options.mobile,fill:this.options.embed||this.options.mobile,inactivityTimeout:this.getInactivityTimeout(),controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(ry(e),[{name:"collapserator",children:re.filter((function(e){return!("fullscreenToggle"===e&&!t.options.allowFullscreen)}))},"playPauseFeedback","controlBarGradient"]),userActions:{hotkeys:function(e){return function(t,e,r){var n=_e()(t);("f"!==n||r.allowFullscreen)&&Re[n]&&(["space"].includes(n)&&(t.preventDefault(),t.stopPropagation()),Re[n](e,t))}(e,t.player,t.options)}},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,deferMenus:this.options.deferMenus,muted:this.options.muted,devicesConfig:this.options.devicesConfig}}},{key:"getPlaybackObject",value:function(){return uy(this,void 0,void 0,ey().mark((function t(){var e,r,n=this;return ey().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.offlinePlaybackObject){t.next=2;break}return t.abrupt("return",this.options.offlinePlaybackObject);case 2:if(e=this.options.fetch,void 0===this.options.fetch&&(e=function(t){var e="".concat(n.options.playerApi.origin,"/api/playback?viewKey=").concat(t);return Pe.get(e)}),this.options.viewKey){t.next=6;break}throw new Error("Please specify a viewKey or a fetch function");case 6:return t.next=8,e(this.options.viewKey);case 8:if(r=t.sent){t.next=11;break}throw new Error("Error fetching playback object");case 11:return t.abrupt("return",r);case 12:case"end":return t.stop()}}),t,this)})))}},{key:"setChaptersInternal",value:function(t,e){var r=Y.getTrack(this.player,"chapters",null);r||(r=this.player.addTextTrack("chapters")),ry(r.cues.cues_).forEach((function(t){return r.removeCue(t)})),t.forEach((function(t){r.addCue({startTime:t.timestamp,endTime:t.endTimestamp,text:t.name})})),e&&r.trigger({type:"cv:cuechange",target:r}),r.trigger({type:"loadeddata",target:r})}},{key:"setChapters",value:function(t){this.setChaptersInternal(t,!0)}},{key:"setPlayerMode",value:function(t,e){this.player.playerModePlugin().setPlayerMode(t,e)}},{key:"setFavourite",value:function(t,e){this.player.favouritePlugin().setFavourite(t,e)}},{key:"fetch",value:function(){var t,e,r,n,o;return uy(this,void 0,void 0,ey().mark((function i(){var a,u,c,l=this;return ey().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.getPlaybackObject();case 2:if(a=i.sent,!this.isDisposed()){i.next=5;break}return i.abrupt("return");case 5:u="MasterClip"===a.mediaType,c=null===(t=a.additionalData)||void 0===t?void 0:t.clipData,(null===(r=null===(e=a.chapters)||void 0===e?void 0:e.list)||void 0===r?void 0:r.length)>0&&!u&&!c&&this.setChaptersInternal(a.chapters.list,!1),this.player.localCache({localCacheAddresses:null!==(n=a.localCacheAddresses)&&void 0!==n?n:[],enabled:null===(o=this.options.enableLocalCache)||void 0===o||o}),this.player.progressiveFiles({sources:a.files.progressive.map((function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}}))}),this.player.handleNetworkErrors({playerApi:this.options.playerApi,fileToken:a.files.fileToken}),a.subtitles.list.length>0&&a.subtitles.list.forEach((function(t){if("text/vtt"===t.mimeType){var e=l.player.addRemoteTextTrack({kind:"subtitles",src:t.url,language:t.language,label:t.label},!0);Y.sanitizeTrack(e.track,l.player)}})),a.posterUrl&&this.player.poster(Xp.j.createUrl(a.posterUrl,{size:Jp.h2.Large})),this.setupSplash({title:a.title,posterUrl:a.posterUrl,episodeNumber:a.episodeNumber,ratingCode:a.ratingCode,seasonNumber:a.seasonNumber,seriesName:a.seriesName}),this.additionalSetup(a),this.handleAutoplay(a),this.options.startTime&&(this.player.currentTime(this.options.startTime),this.player.one("canplay",(function(){l.player.currentTime(l.options.startTime)}))),this.player.trigger("cv-playback-data-loaded",a);case 18:case"end":return i.stop()}}),i,this)})))}},{key:"handleFetchError",value:function(t){var e,r=t.message;t instanceof be&&(null===(e=t.response)||void 0===e?void 0:e.type)===Le.PhysicallyChapteredVideo&&(r="Video cannot be played because it is either corrupt or damaged."),this.player.error(r),this.options.onError&&this.options.onError(t)}},{key:"fetchConfig",value:function(){return uy(this,void 0,void 0,ey().mark((function t(){var e;return ey().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(ay||this.options.fetch||this.options.offlinePlaybackObject)){t.next=2;break}return t.abrupt("return");case 2:return e="".concat(this.options.playerApi.origin,"/api/config"),t.next=5,Pe.get(e);case 5:if(ay=t.sent,!this.isDisposed()){t.next=8;break}return t.abrupt("return");case 8:this.trigger("config:loaded");case 9:case"end":return t.stop()}}),t,this)})))}},{key:"additionalSetup",value:function(t){var e,r=this;this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var n=this.options.enableLocalCache&&!!(null===(e=t.localCacheAddresses)||void 0===e?void 0:e.length);ay?this.setupAnalyticsService(t,n):this.one("config:loaded",(function(){return r.setupAnalyticsService(t,n)})),this.analyticsService||!this.isAnalyticsEnabled()?this.setupAnalyticsDependentPlugins(t):this.one("analytics:loaded",(function(){return r.setupAnalyticsDependentPlugins(t)}))}},{key:"setupAnalyticsService",value:function(t,e){this.options.eventLogging&&(this.analyticsService=new fe({collectionApiUrls:ay.collectionApi.urls,collectionApiClientId:ay.collectionApi.clientId,productVersion:"1.30.0-rc.0",videoId:t.videoId,mediaId:t.mediaId,userId:t.viewerId,shareId:t.shareId,customerId:t.viewerCustomerId,mediaType:t.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:e,additionalAnalyticsData:this.getAdditionalAnalyticsData(t),regionName:t.instanceRegion||this.options.sharerInstanceRegion||Be.M.CvApSoutheast1}),this.on("timeupdate",this.logStream),this.trigger("analytics:loaded"))}},{key:"setupAnalyticsDependentPlugins",value:function(t){var e,r,n,o;this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(e=t.settings)||void 0===e?void 0:e.showSubtitles,subtitleSize:null===(r=t.settings)||void 0===r?void 0:r.playbackSubtitleSizeDefault,analyticsService:this.analyticsService}),this.player.persistQualitySettingsPlugin({playbackProfile:null===(n=t.settings)||void 0===n?void 0:n.playbackProfile,playbackProfileLocalCache:null===(o=t.settings)||void 0===o?void 0:o.playbackProfileLocalCache,analyticsService:this.analyticsService}),this.player.persistPlaybackRatePlugin({analyticsService:this.analyticsService})}},{key:"getAdditionalAnalyticsData",value:function(t){return{}}},{key:"isAnalyticsEnabled",value:function(){return!this.options.fetch&&!this.options.offlinePlaybackObject&&this.options.eventLogging}},{key:"handleAutoplay",value:function(t){var e=this;this.options.autoplay&&this.player.ready((function(){e.player.play().catch((function(){e.isDisposed()||e.showSplash()}))}))}},{key:"logStream",value:function(){this.analyticsService&&(this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream)))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(t){var e;"string"==typeof t?(t=function(t){return 0===t.indexOf("#")?t.slice(1):t}(t),e=u.Z.dom.$("#"+t)):e=t;var r="video-js";return this.getPlayerClassName()&&(r+=" ".concat(this.getPlayerClassName())),this.el=u.Z.dom.createEl("video",{},{class:r}),e.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(t,e){this.player.on(t,e)}},{key:"one",value:function(t,e){this.player.one(t,e)}},{key:"off",value:function(t,e){this.player.off(t,e)}},{key:"trigger",value:function(t,e){return this.player.trigger(t,e)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(t){this.player.ready(t)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(t){return this.player.currentTime(t)}},{key:"muted",value:function(t){return this.player.muted(t)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(t){return this.player.playbackRate(t)}},{key:"quality",value:function(t){for(var e=this.player.qualityLevels(),r=0;r<e.length;r++){var n=e[r];if(t)n.enabled=n.id===t.toString();else if(n.enabled)return n.id}}},{key:"subtitles",value:function(t){for(var e=this.player.textTracks(),r=0;r<e.length;r++){var n=e[r];if(void 0===t){if("showing"===n.mode)return n.label}else n.label===t?n.mode="showing":n.mode="disabled"}}},{key:"bindEventListeners",value:function(){var t=this,e=function(t){return t.preventDefault()};if(this.showSplash=this.showSplash.bind(this),this.hideSplash=this.hideSplash.bind(this),this.player.on("ended",this.showSplash),this.player.on("play",this.hideSplash),this.player.tech(!0).on("contextmenu",e),this.player.one("dispose",(function(){t.off("ended",t.showSplash),t.off("play",t.hideSplash),t.player.tech(!0).off("contextmenu",e)})),this.options.hotkeyElQuerySelector){var r=u.Z.dom.$(this.options.hotkeyElQuerySelector);r&&(this.player.on(r,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){t.player.off(r,"keydown",t.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var t=this.getSeekBarName(),e=this.player.controlBar.getChild("progressControl");e.addChild(t,this.getSeekBarOptions()),e.setSeekBarName(t)}},{key:"setupSplash",value:function(t){this._splashAdded||(this._splashAdded=!0,this.player.addChild("posterImage",Object.assign({embed:this.options.embed},t)),this.player.addChild("bigPlayButton"),this.options.autoplay?this.hideSplash():this.showSplash())}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show(),this.player.getChild("bigPlayButton").show()}},{key:"hideSplash",value:function(){this.player.getChild("posterImage").hide(),this.player.getChild("bigPlayButton").hide()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}}])&&oy(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();ly.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0,eventLogging:!0,allowFullscreen:!0};function sy(t){return sy="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},sy(t)}function fy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,py(n.key),n)}}function py(t){var e=function(t){if("object"!=sy(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=sy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sy(e)?e:e+""}function yy(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yy=function(){return!!t})()}function hy(){return hy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=vy(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},hy.apply(null,arguments)}function vy(t){return vy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vy(t)}function dy(t,e){return dy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dy(t,e)}var by=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=vy(e),function(t,e){if(e&&("object"==sy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,yy()?Reflect.construct(e,r||[],vy(t).constructor):e.apply(t,r))}(this,e,[t,r])).overlayVisible=r.overlayVisible,n.toggle(n.overlayVisible),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dy(t,e)}(e,t),r=e,n=[{key:"handleToggle",value:function(){this.toggle(!this.overlayVisible)}},{key:"toggle",value:function(t){t?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){u.Z.dom.addClass(this.toggleEl,"on"),this.overlayVisible=!0,this.player().engagementOverlayPlugin().toggleOverlay(this.overlayVisible),this.player().addClass("cv-reports-player-overlay-visible")}},{key:"toggleOff",value:function(){u.Z.dom.removeClass(this.toggleEl,"on"),this.overlayVisible=!1,this.player().engagementOverlayPlugin().toggleOverlay(this.overlayVisible),this.player().removeClass("cv-reports-player-overlay-visible")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation()}},{key:"createEl",value:function(t,r,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=u.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var o,i,a,c=(o=e,i=this,"function"==typeof(a=hy(vy(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)([t,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Heat Map</span>\n <span class="cv-toggle-container"></span>'},n]);return c.children[1].appendChild(this.toggleEl),c}}],n&&fy(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("MenuItem"));u.Z.registerComponent("EngagementOverlayMenuItem",by);var my=r(72306),gy=r.n(my),wy=r(74161),Oy=r(86572);function jy(t){var e,r=t.interactive.timepoints.find((function(e){var r=e.visibleAt/1e3;return Math.floor(t.time)===Math.floor(r)||Math.ceil(t.time)===Math.ceil(r)}));if(!(null===(e=null==r?void 0:r.interactions)||void 0===e?void 0:e.length))return n.createElement(n.Fragment,null);var o=r.interactions.length>3?r.interactions.slice(0,2):r.interactions,i=r.interactions.length-o.length;return n.createElement("div",{className:"d-flex justify-content-end ms-2"},o.map((function(t,e){return n.createElement(Oy.y,{key:e,interaction:t,showQuestion:!1,iconClassName:"ms-1"})})),!!i&&n.createElement("div",{className:"interaction-type-icon d-flex justify-content-center align-items-center border border-dark text-body ms-1"},"+".concat(i)))}function Py(t){return function(t){if(Array.isArray(t))return Sy(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Sy(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sy(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sy(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var _y={title:{text:null},xAxis:{visible:!1,minPadding:0,maxPadding:0},legend:{enabled:!1},credits:{enabled:!1},defs:{gradient:{tagName:"linearGradient",id:"area-gradient",x1:0,y1:1,x2:0,y2:0,children:[{tagName:"stop",offset:0},{tagName:"stop",offset:1}]}}};function ky(t,e){return{styledMode:!0,spacing:[15,0,0,0],width:t,height:e}}function Ey(t){return Ey="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},Ey(t)}function Cy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ty(n.key),n)}}function Ty(t){var e=function(t){if("object"!=Ey(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ey(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ey(e)?e:e+""}function xy(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xy=function(){return!!t})()}function Ly(){return Ly="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ry(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ly.apply(null,arguments)}function Ry(t){return Ry=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ry(t)}function By(t,e){return By=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},By(t,e)}var Iy=u.Z.getComponent("Component");gy().AST.allowedTags.push("g"),gy().AST.allowedAttributes.push("viewBox","transform");var Dy=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ry(e),function(t,e){if(e&&("object"==Ey(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xy()?Reflect.construct(e,r||[],Ry(t).constructor):e.apply(t,r))}(this,e,[t,r])).initialize(),n.bindListeners(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&By(t,e)}(e,t),r=e,o=[{key:"initialize",value:function(){var t=this;this.player().ready((function(){return t.buildChart()}))}},{key:"buildCSSClass",value:function(){return"cv-engagement-overlay"}},{key:"createEl",value:function(t,r,n){var o,i,a;return(o=e,i=this,"function"==typeof(a=Ly(Ry(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass(),innerHTML:'<div class="cv-engagement-chart"></div><div class="cv-engagement-timepoint-indicator"></div>'}),n])}},{key:"toggleChart",value:function(t){t?this.buildChart():this.destroyChart()}},{key:"bindListeners",value:function(){var t=this;this.handleClick=this.handleClick.bind(this),this.resizeChart=this.resizeChart.bind(this),this.player().on("playerresize",this.resizeChart),this.on(this.el(),"mouseup",this.handleClick),this.player().on("dispose",(function(){t.player().off("playerresize",t.resizeChart),t.off(t.el(),"mouseup",t.handleClick)}))}},{key:"handleClick",value:function(t){u.Z.dom.isSingleLeftClick(t)&&(this.player().paused()?this.player().play():this.player().pause())}},{key:"buildChart",value:function(){var t=this;if(!this.chart){var e=this.getChartDimensions();if(e){var r=this.el().querySelector(".cv-engagement-chart");this.chart=gy().chart(r,this.getHighchartOptions(e))}else this.player().one("play",(function(){return t.buildChart()}))}}},{key:"resizeChart",value:function(){var t=this.getChartDimensions();this.chart&&t&&this.chart.setSize(t.width,t.height)}},{key:"destroyChart",value:function(){var t;null===(t=this.chart)||void 0===t||t.destroy(),this.chart=null}},{key:"getChartDimensions",value:function(){var t=this.player().getChild("collapserator"),e=null==t?void 0:t.currentHeight(),r=this.el().clientWidth;return e&&r?{width:r,height:this.player().currentDimensions().height-e}:null}},{key:"getHighchartOptions",value:function(t){var e,r,o,i=t.width,a=t.height;return Object.assign(Object.assign({},_y),{chart:ky(i,a),yAxis:(r=this.options_.heatMap,{max:1.05*Math.max.apply(Math,Py(r)),min:0,minPadding:0,maxPadding:0,allowDecimals:!0,startOnTick:!1,endOnTick:!1,visible:!1}),tooltip:(o=this.options_.interactive,{formatter:function(){var t=o?function(t,e){return(0,wy.uS)(n.createElement(jy,{time:e,interactive:t}))}(o,this.x):"";return'<div class="cv-engagement-tooltip bg-white rounded"><div class="d-flex justify-content-between">'+"<strong>".concat(Yc(this.x),"</strong>")+"".concat(t)+'</div><div class="d-flex justify-content-between rounded bg-light cv-view-count-container">'+'<strong>Views</strong> <span class="cv-view-count">'.concat(this.y,"</span>")+"</div></div>"},positioner:function(t,e,r){var n=this.chart.plotWidth-t,o=r.plotX-t/2;return{x:Math.min(Math.max(o,0),n),y:this.chart.plotTop}},useHTML:!0,padding:0}),plotOptions:(e=this.moveTimepointIndicator.bind(this),{area:{point:{events:{mouseOver:function(){e(this.x)},mouseOut:function(){e(null)}}}},series:{marker:{enabled:!1}}}),series:[{type:"area",data:this.options_.heatMap}]})}},{key:"moveTimepointIndicator",value:function(t){this.options_.onTimepointHover&&this.options_.onTimepointHover(t);var e=this.el().querySelector(".cv-engagement-timepoint-indicator");null!==t?(u.Z.dom.addClass(e,"cv-engagement-timepoint-indicator-visible"),e.style.left="".concat(t/this.options_.heatMap.length*100,"%")):u.Z.dom.removeClass(e,"cv-engagement-timepoint-indicator-visible")}}],o&&Cy(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(Iy);function My(t){return My="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},My(t)}function Ny(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ay(n.key),n)}}function Ay(t){var e=function(t){if("object"!=My(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=My(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==My(e)?e:e+""}function Zy(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zy=function(){return!!t})()}function Fy(t){return Fy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fy(t)}function zy(t,e){return zy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zy(t,e)}u.Z.registerComponent("EngagementOverlay",Dy);var Gy=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Fy(e),function(t,e){if(e&&("object"==My(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zy()?Reflect.construct(e,r||[],Fy(t).constructor):e.apply(t,r))}(this,e,[t,r])).options=r,t.ready((function(){n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zy(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){var t;this.hasHeatMapData()&&(this.player.addChild("engagementOverlay",{heatMap:this.options.heatMap,interactive:this.options.interactive,onTimepointHover:this.options.onTimepointHover}),(null===(t=this.player.getChild("collapserator"))||void 0===t?void 0:t.getChild("cogButton")).addItem({index:0,ctor:by,name:"EngagementOverlayMenuItem",options:{overlayVisible:!0}}))}},{key:"toggleOverlay",value:function(t){var e=this.player.getChild("engagementOverlay");null==e||e.toggleChart(t)}},{key:"hasHeatMapData",value:function(){var t;return(null===(t=this.options.heatMap)||void 0===t?void 0:t.reduce((function(t,e){return t+e}),0))>0}}])&&Ny(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function Vy(t){return Vy="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},Vy(t)}function Uy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Hy(n.key),n)}}function Hy(t){var e=function(t){if("object"!=Vy(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Vy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vy(e)?e:e+""}function qy(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qy=function(){return!!t})()}function Wy(){return Wy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Qy(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Wy.apply(null,arguments)}function Qy(t){return Qy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qy(t)}function Ky(t,e){return Ky=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ky(t,e)}u.Z.registerPlugin("engagementOverlayPlugin",Gy);var Yy=function(t){function e(t,r){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e,r){return e=Qy(e),function(t,e){if(e&&("object"==Vy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qy()?Reflect.construct(e,r||[],Qy(t).constructor):e.apply(t,r))}(this,e,[t]),void 0===r.startTime)throw Error("Invalid clip start");if(void 0===r.endTime)throw Error("Invalid clip end");if(r.startTime>r.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=parseFloat(r.startTime.toPrecision(4)),n._clipEnd=parseFloat(r.endTime.toPrecision(4)),n.playerEndedFn=n.player.ended.bind(t),n.playerDurationFn=n.player.duration.bind(t),n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.playerbufferedFn=n.player.buffered.bind(t),n.player.ended=n.ended.bind(n),n.player.duration=n.duration.bind(n),n.player.currentTime=n.currentTime.bind(n),n.player.buffered=n.buffered.bind(n),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ky(t,e)}(e,t),r=e,n=[{key:"clipStart",get:function(){var t=this.playerDurationFn();return this._clipStart>t?t:this._clipStart}},{key:"clipEnd",get:function(){var t=this.playerDurationFn();return t<=0?this._clipEnd:this._clipEnd>t?t:this._clipEnd}},{key:"dispose",value:function(){var t,r,n;this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange"),(t=e,r=this,"function"==typeof(n=Wy(Qy(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var t=this.getCurrentTime(!1);t>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,t<this.clipStart-10&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(t){return t&&t>0&&(this.playerDurationFn()?console.info("The duration of the player has already been set. This is a no-op."):this.playerDurationFn(t)),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(t){if("number"!=typeof t)return this.getCurrentTime(!0);for(var e=t+this.clipStart,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this.playerCurrentTimeFn(e,n)}},{key:"getCurrentTime",value:function(t){var e=this.playerCurrentTimeFn(),r=0;return e>=this.clipStart&&(r=e-this.clipStart),this.player.getCache().currentTime=r,t?r:e}},{key:"buffered",value:function(){for(var t=this.playerbufferedFn(),e=[],r=0;r<t.length;r++)e[r]=[Math.max(0,t.start(r)-this.clipStart),Math.min(Math.max(0,t.end(r)-this.clipStart),this.player.duration())];return u.Z.createTimeRanges(e)}}],n&&Uy(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));u.Z.registerPlugin("clipPlugin",Yy);var $y=r(84120);function Xy(t){return Xy="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},Xy(t)}function Jy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,th(n.key),n)}}function th(t){var e=function(t){if("object"!=Xy(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Xy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xy(e)?e:e+""}function eh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(eh=function(){return!!t})()}function rh(t,e,r,n){var o=nh(oh(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function nh(){return nh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=oh(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},nh.apply(null,arguments)}function oh(t){return oh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oh(t)}function ih(t,e){return ih=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ih(t,e)}var ah=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=oh(e),function(t,e){if(e&&("object"==Xy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,eh()?Reflect.construct(e,r||[],oh(t).constructor):e.apply(t,r))}(this,e,[t,r])).timepoint_=r.timepoint,n.time_=r.timepoint.visibleAt/1e3;var o=r.timepoint.interactions[0];o||n.hide();var i=$y.w.getTypeInfo(o.typeId).bgClassName;return n.$(".vjs-icon-placeholder").classList.add(i),n.controlText(o.name),n.update(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ih(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-item ".concat(rh(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return rh(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),Object.assign(Object.assign({},n),{tabindex:0})])}},{key:"update",value:function(){var t=this.player_.duration(),e=this.time_/t;this.el().style.left=100*e+"%",e>100||e<0?this.hide():this.show()}},{key:"handleClick",value:function(t){t.stopPropagation(),this.player_.currentTime(this.time_)}}],n&&Jy(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Button"));function uh(t){return uh="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},uh(t)}function ch(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function lh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,sh(n.key),n)}}function sh(t){var e=function(t){if("object"!=uh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=uh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==uh(e)?e:e+""}function fh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fh=function(){return!!t})()}function ph(t,e,r,n){var o=yh(hh(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function yh(){return yh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=hh(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},yh.apply(null,arguments)}function hh(t){return hh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hh(t)}function vh(t,e){return vh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vh(t,e)}var dh=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=hh(e),function(t,e){if(e&&("object"==uh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,fh()?Reflect.construct(e,r||[],hh(t).constructor):e.apply(t,r))}(this,e,[t,r])).track_=r.track,n.interactive_=r.interactive,n.onDurationChange=n.onDurationChange.bind(n),n.createInteractionItems=n.createInteractionItems.bind(n),n.createInteractionItems(),n.track_.on("cv:cuechange",n.createInteractionItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("dispose",(function(){n.track_.off("cv:cuechange"),n.player_.off("durationchange",n.onDurationChange)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vh(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-items ".concat(ph(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return ph(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"createInteractionItems",value:function(){var t,e=this;if(this.track_){(function(t){return function(t){if(Array.isArray(t))return ch(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ch(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ch(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()})(this.children_).forEach((function(t){e.removeChild(t)}));for(var r=0;r<this.track_.cues.length;r++){var n=this.track_.cues[r],o=this.getTimepointById(n.text);o&&(null===(t=o.interactions)||void 0===t?void 0:t.length)&&this.addChild(new ah(this.player_,{timepoint:o}))}}}},{key:"onDurationChange",value:function(){this.update()}},{key:"getTimepointById",value:function(t){var e;return null===(e=this.interactive_.timepoints)||void 0===e?void 0:e.find((function(e){return e.id.toString()===t.toString()}))}}],n&&lh(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function bh(t){return bh="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},bh(t)}function mh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gh(n.key),n)}}function gh(t){var e=function(t){if("object"!=bh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=bh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bh(e)?e:e+""}function wh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wh=function(){return!!t})()}function Oh(t){return Oh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Oh(t)}function jh(t,e){return jh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jh(t,e)}var Ph=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Oh(e),function(t,e){if(e&&("object"==bh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wh()?Reflect.construct(e,r||[],Oh(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize.bind(n))})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jh(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){Y.useTrack(this.player,"metadata","interactive",this.onTrackLoaded.bind(this)),this.player.addClass("cv-interactive-plugin")}},{key:"onTrackLoaded",value:function(t){this.addChildren(t)}},{key:"addChildren",value:function(t){this.player.controlBar.getChild("progressControl").getChild("SeekBar").addChild(new dh(this.player,{interactive:this.options.interactive,track:t}))}}])&&mh(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function Sh(t){return Sh="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},Sh(t)}function _h(){_h=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Sh(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Sh(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function kh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Eh(n.key),n)}}function Eh(t){var e=function(t){if("object"!=Sh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Sh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Sh(e)?e:e+""}function Ch(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ch=function(){return!!t})()}function Th(){return Th="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=xh(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Th.apply(null,arguments)}function xh(t){return xh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xh(t)}function Lh(t,e){return Lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lh(t,e)}u.Z.registerPlugin("interactiveSeekBarPlugin",Ph);var Rh=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=xh(e),function(t,e){if(e&&("object"==Sh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ch()?Reflect.construct(e,r||[],xh(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lh(t,e)}(e,t),r=e,n=[{key:"getPlayerClassName",value:function(){return"cv-reports-player"}},{key:"getAnalyticsPlayerType",value:function(){return"reports-player"}},{key:"additionalSetup",value:function(t){var r,n,o,i,a=this,u=Object.create(null,{additionalSetup:{get:function(){return t=e,r=a,Th(xh(1&1?t.prototype:t),"additionalSetup",r);var t,r}}});return r=this,n=void 0,o=void 0,i=_h().mark((function e(){return _h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u.additionalSetup.call(this,t),this.setupEngagementOverlayPlugin(t),this.setupUpClipPlugin(t),this.setupInteractiveSeekBarPlugin(t);case 4:case"end":return e.stop()}}),e,this)})),new(o||(o=Promise))((function(t,e){function a(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(a,u)}c((i=i.apply(r,n||[])).next())}))}},{key:"setupEngagementOverlayPlugin",value:function(t){var e;this.player.engagementOverlayPlugin({heatMap:this.options.heatMap,interactive:null===(e=t.additionalData)||void 0===e?void 0:e.interactive,onTimepointHover:this.options.onTimepointHover})}},{key:"setupUpClipPlugin",value:function(t){var e,r,n="MasterClip"===t.mediaType,o="MasterInteractive"===t.mediaType;if((n||o)&&(n&&(r=t.additionalData),!o||(r=null===(e=t.additionalData)||void 0===e?void 0:e.clipData))){if(!r)throw Error("Invalid clip data");this.player.clipPlugin({startTime:r.startTime,endTime:r.endTime})}}},{key:"setupInteractiveSeekBarPlugin",value:function(t){var e,r,n=null===(e=t.additionalData)||void 0===e?void 0:e.interactive;(null===(r=t.additionalData)||void 0===r?void 0:r.interactive)&&(this.track=function(t,e){var r,n=t.addTextTrack("metadata","interactive"),o=e.additionalData.interactive,i=null===(r=e.additionalData.clipData)||void 0===r?void 0:r.startTime;return o.timepoints.forEach((function(t){var e,r=t.visibleAt/1e3,o=t.visibleFor?r+t.visibleFor/1e3:r+1;i&&(r+=i,o+=i),(null===(e=t.interactions)||void 0===e?void 0:e.length)&&n.addCue({startTime:Math.max(.001,r-.001),endTime:o,text:t.id})})),n}(this.player,t),this.player.interactiveSeekBarPlugin({interactive:n}))}},{key:"getSeekBarOptions",value:function(){return{ignoreChapters:!0}}}],n&&kh(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(ly);function Bh(t){var e=n.useRef(null),r=n.useRef(null);return n.useEffect((function(){r.current=new Rh(e.current,t)}),[]),n.createElement("div",{ref:e})}var Ih=r(73013),Dh=o.T.encloseNamespace("shared.videoEngagementOverlay");function Mh(t){var e=n.useRef(null),r=(0,a.O)(t.engagement);return n.createElement("div",{className:"bg-white rounded p-2 h-100 ".concat(t.className)},t.heading&&n.createElement("h2",{className:"h6 mb-3"},t.heading),n.createElement("div",{className:"mb-2 position-relative"},n.createElement("div",{className:Ih.Z.playerPlaceholder}),n.createElement("div",{className:Ih.Z.playerContainer},n.createElement(Bh,{viewKey:t.viewKey,playerApi:new URL(t.playerApiUrl),hotkeyElQuerySelector:"body",heatMap:r,onTimepointHover:function(t){var n=e.current;n&&(null!==t?(n.classList.add(Ih.Z.heatMapTimepointIndicatorVisible),n.style.left="".concat(t/r.length*100,"%")):n.classList.remove(Ih.Z.heatMapTimepointIndicatorVisible))},aspectRatio:"16:9"}))),n.createElement("div",{className:"position-relative"},n.createElement(i.c,{engagement:t.engagement,className:Ih.Z.heatMap}),n.createElement("div",{ref:e,className:Ih.Z.heatMapTimepointIndicator})),n.createElement("div",{className:"d-flex justify-content-between mt-2"},n.createElement("div",null,!t.heading&&n.createElement("strong",null,Dh("engagement"))),n.createElement("div",{className:"w-33"},n.createElement(i.l,null))))}},73013:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n={playerContainer:"xyGJW",playerPlaceholder:"OH_lp",heatMap:"La3Rg",heatMapTimepointIndicator:"rUIki",heatMapTimepointIndicatorVisible:"hSWNO"}},58421:()=>{}}]);
|
|
1
|
+
/*! For license information please see 8398-40659ed9bc-reports.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_clickview_reports=self.webpackChunk_clickview_reports||[]).push([[8398],{62700:(t,e,r)=>{"use strict";r.d(e,{c:()=>b,l:()=>d});var n=r(32735),o=r(232),i=r.n(o),a=r(8604),u=r(83345);const c={heatMap:"epapa",legend:"uhH4p"};function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var s="shared.engagementHeatMap",f="#f1f1f1",p=i().scale(["#daf07d","#08bd1a"]),y=[0,.01,.25,.5,.75,1];function h(t,e){return t?p(t/e).hex():f}function v(t,e){for(var r=[],n=0;n<t.length;n++){var o=n>0&&t[n-1],i=t[n],a=n<t.length-1&&t[n+1];i===o&&i===a||r.push("".concat(h(i,e)," ").concat(100/t.length*n,"%"))}return"linear-gradient(to right, ".concat(r.join(","),")")}function d(){var t=Math.max.apply(Math,y),e=100/y.length;return n.createElement("div",{className:"d-flex justify-content-between w-100"},n.createElement(u.x,{namespace:s,phrase:"less"}),n.createElement("div",{className:"d-flex mx-1 flex-grow-1 ".concat(c.legend)},y.map((function(r,o){return n.createElement("div",{key:o,style:{width:"".concat(e,"%"),backgroundColor:h(r,t)}})}))),n.createElement(u.x,{namespace:s,phrase:"more"}))}function b(t){var e,r,o,i=(0,a.O)(t.engagement),u=null!==(e=t.max)&&void 0!==e?e:Math.max.apply(Math,function(t){if(Array.isArray(t))return l(t)}(o=i)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||function(t,e){if(t){if("string"==typeof t)return l(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return n.createElement("div",{className:"border rounded ".concat(c.heatMap," ").concat(null!==(r=t.className)&&void 0!==r?r:""),style:{background:v(i,u)}})}},54316:(t,e,r)=>{"use strict";r.d(e,{z:()=>m});var n=r(32735),o=r(56081),i=r(23481),a=r(62700),u=r(26136),c=r(29427),l=r(40782),s=r(64818);const f={heatMap:"rwDjh",avatarContainer:"kW4ZM"};function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var y=i.T.encloseNamespace("shared.engagementTable");function h(t){var e;return n.createElement("div",{className:"".concat(null!==(e=t.className)&&void 0!==e?e:"")},t.children)}function v(t){return n.createElement(h,{className:"d-inline-block ".concat(t.column.isSorted?"fw-bold":"")},y(t.phraseKey))}function d(t){return n.useMemo((function(){var e,r,o=(e=t.engagement,r=0,e.forEach((function(t){var e,n=Math.max.apply(Math,function(t){if(Array.isArray(t))return p(t)}(e=t.heatMap)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());n>r&&(r=n)})),r);return[{Header:function(t){var e=t.column;return n.createElement(v,{column:e,phraseKey:"name"})},width:22,accessor:"user",sortType:function(e,r){return(0,u.B)(e.values.user,t.anonymiseUsers)>(0,u.B)(r.values.user,t.anonymiseUsers)?1:-1},Cell:function(e){var r,o,i,a,l=e.value,p=(o=l,i=t.anonymiseUsers,{name:(a=(0,u.B)(o,i).split(" ").filter((function(t){return!!t})))[0],surname:a.slice(1).join(" ")}),y=p.name,v=p.surname;return n.createElement(h,{className:"d-flex align-items-center h-100"},n.createElement("span",{className:f.avatarContainer},n.createElement(c.q,{imageCdnUrl:t.imageCdnUrl,initials:s.l.getInitials(y,v),imageUrl:!t.anonymiseUsers&&"avatar"in l?null===(r=l.avatar)||void 0===r?void 0:r.url:null,showAnonymousUser:"profileId"in l})),n.createElement("span",{className:"ms-2 clamp-1"},y," ",v))}},{Header:function(t){var e=t.column;return n.createElement(v,{column:e,phraseKey:"views"})},accessor:"viewCount",width:15,sortType:"basic",sortDescFirst:!0,Cell:function(t){var e=t.value;return n.createElement(h,{className:"d-flex align-items-center h-100"},n.createElement("div",null,e))}},{Header:function(t){var e=t.column;return n.createElement(v,{column:e,phraseKey:"engagement"})},accessor:"engagementRate",width:20,sortType:"basic",sortDescFirst:!0,Cell:function(t){var e=t.value;return n.createElement(h,{className:"w-33"},n.createElement(l.O,{percentage:e,layout:l.I.LabelBefore}))}},{Header:function(t){var e=t.column;return n.createElement(v,{column:e,phraseKey:"heatMap"})},accessor:"heatMap",width:48,disableSortBy:!0,Cell:function(t){var e=t.row.original;return n.createElement(h,{className:"d-flex align-items-center h-100"},n.createElement(a.c,{engagement:e,max:o,className:"".concat(f.heatMap," flex-grow-1")}))}}]}),[t.anonymiseUsers])}var b={table:"bg-white rounded px-0",header:"border-bottom",headerCell:"m-3",cell:"mx-3 my-2"};function m(t){var e,r,i,a=d({engagement:t.engagement,imageCdnUrl:t.imageCdnUrl,anonymiseUsers:t.anonymiseUsers}),u=(e=t.engagement,r=t.users,i=t.interactiveResults,n.useMemo((function(){var t=[];return e.forEach((function(e){var n,o=null==r?void 0:r.find((function(t){return t.id===e.userId})),a=null===(n=null==i?void 0:i.find((function(t){var r;return(null===(r=t.publicUser)||void 0===r?void 0:r.profileId)===e.profileId})))||void 0===n?void 0:n.publicUser;o?t.push(Object.assign(Object.assign({},e),{user:o})):a&&t.push(Object.assign(Object.assign({},e),{user:a}))})),t}),[null==r?void 0:r.length]));return u.length?n.createElement(o.i,{columns:a,data:u,theme:Object.assign(Object.assign({},b),{table:t.border?"".concat(b.table," border"):b.table}),enableSort:!0}):n.createElement(n.Fragment,null)}},8604:(t,e,r)=>{"use strict";function n(t){return new Array(Math.ceil(t.videoDuration)).fill(null).map((function(e,r){return t.heatMap[r]||0}))}r.d(e,{O:()=>n})},49475:(t,e,r)=>{"use strict";function n(t){var e=[];return Object.keys(t).forEach((function(r){var n=t[r];n&&e.push("".concat(r,":").concat(Array.isArray(n)?n.join(","):n))})),e.join(":")}r.d(e,{u:()=>n})},60051:(t,e,r)=>{"use strict";var n;r.d(e,{f:()=>n}),function(t){t.Share="share",t.MasterObject="masterobject"}(n||(n={}))},47812:(t,e,r)=>{"use strict";r.d(e,{k:()=>o});var n=r(99940),o={createViewKey:function(t,e,r,o,i){var a={mediaId:t.toString(),mediaIdType:e};return r&&(a.shareContextId=r),{url:"/api/player/create-view-key",key:"view:key:".concat(t,":").concat(e),type:n.k.POST,data:a,cacheDuration:28800,success:o,error:i}}}},17285:(t,e,r)=>{"use strict";r.d(e,{O:()=>c});var n=r(32735),o=r(23481),i=r(62700),a=r(73013),u=o.T.encloseNamespace("shared.videoEngagementOverlay");function c(t){return n.createElement("div",{className:"bg-white rounded p-2 ".concat(a.Z.partialLoadingContainer)},t.hasHeading&&n.createElement("div",{className:"partial-loading-background w-25 mb-3"}," "),n.createElement("div",{className:"ratio ratio-16x9 partial-loading-background mb-2"}),n.createElement("div",{className:"d-flex flex-column justify-content-end"},n.createElement("div",{className:a.Z.heatMapContainer},n.createElement("div",{className:"position-relative"},n.createElement(i.c,{engagement:{heatMap:[],videoDuration:0},className:a.Z.heatMap}))),n.createElement("div",{className:"d-flex justify-content-between mt-2"},n.createElement("strong",null,!t.hasHeading&&u("engagement")),n.createElement("div",{className:"w-33"},n.createElement(i.l,null)))))}},44311:(t,e,r)=>{"use strict";r.d(e,{p:()=>Mh});var n=r(32735),o=r(23481),i=r(62700),a=r(8604),u=(r(39682),r(76032));function c(t){return c="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},c(t)}function l(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function f(t,e,r){return e&&s(t.prototype,e),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function y(t,e,r){return e=b(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,r||[],b(t).constructor):e.apply(t,r))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(h=function(){return!!t})()}function v(t,e,r,n){var o=d(b(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=b(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},d.apply(null,arguments)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}var w=function(t){function e(t,r){return l(this,e),y(this,e,[t,r])}return m(e,t),f(e,[{key:"handleClick",value:function(t){var r=this;v(e,"handleClick",this,3)([t]),this.requestAnimationFrame((function(){r.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(t,r,n){if(!this.options_.item)return v(e,"createEl",this,3)([t,r,n]);var o=this.options_.item.getCollabsibleName(),i=this.options_.item.getCollabsibleValue(),a=this.options_.item.className,c='<span class="vjs-menu-item-text">'.concat(o,"</span>");this.valueHolder_=u.Z.dom.createEl("span",{innerHTML:i});var l=v(e,"createEl",this,3)([t,{className:"vjs-menu-item cv-cog-menu-item ".concat(i?"cv-has-cog-value":""," ").concat(a||"").trim(),innerHTML:c},n]);return l.appendChild(this.valueHolder_),l}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}])}(u.Z.getComponent("MenuItem")),O=function(t){function e(t,r){var n;return l(this,e),(n=y(this,e,[t,r])).controlText("Settings"),n}return m(e,t),f(e,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(v(e,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(v(e,"buildCSSClass",this,3)([]))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach((function(t){t.updateCollapsibleValue&&t.updateCollapsibleValue()})),v(e,"pressButton",this,3)([]))}},{key:"createItems",value:function(){for(var t,e=this,r=[],n=0;n<this.options_.items.length;n++){var o=this.options_.items[n];o.isCollabsible&&o.showInCollabsibleMenu()&&o.isCollapsed&&r.push(new w(this.player_,{item:o}))}return(null===(t=this.additionalItems)||void 0===t?void 0:t.length)&&this.additionalItems.forEach((function(t){var n,o=new t.ctor(e.player_,Object.assign(Object.assign({},e.options_),null!==(n=t.options)&&void 0!==n?n:{}));r.splice(t.index,0,o)})),r}},{key:"update",value:function(){v(e,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(t){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(e){return e.name===t.name}))||(this.additionalItems.push(t),this.update())}}])}(u.Z.getComponent("MenuButton"));function j(t){return j="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},j(t)}function P(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,S(n.key),n)}}function S(t){var e=function(t){if("object"!=j(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==j(e)?e:e+""}function _(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_=function(){return!!t})()}function k(){return k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=E(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},k.apply(null,arguments)}function E(t){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},E(t)}function C(t,e){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},C(t,e)}u.Z.registerComponent("cogButton",O);var T=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=E(e),function(t,e){if(e&&("object"==j(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_()?Reflect.construct(e,r||[],E(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&C(t,e)}(e,t),r=e,n=[{key:"createEl",value:function(){return u.Z.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(t){var r,n,o,i=this;(r=e,n=this,"function"==typeof(o=k(E(1&3?r.prototype:r),"handleClick",n))?function(t){return o.apply(n,t)}:o)([t]),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){i.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}],n&&P(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("MenuItem"));function x(t){return x="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},x(t)}function L(){return L="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=A(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},L.apply(null,arguments)}function R(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function B(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,D(n.key),n)}}function I(t,e,r){return e&&B(t.prototype,e),r&&B(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function D(t){var e=function(t){if("object"!=x(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==x(e)?e:e+""}function M(t,e,r){return e=A(e),function(t,e){if(e&&("object"==x(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,N()?Reflect.construct(e,r||[],A(t).constructor):e.apply(t,r))}function N(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(N=function(){return!!t})()}function A(t){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},A(t)}function Z(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&F(t,e)}function F(t,e){return F=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},F(t,e)}var z=u.Z.getComponent("MenuItem"),G=u.Z.getComponent("MenuButton"),V=["large","medium","small"],U=function(t){function e(t,r){return R(this,e),M(this,e,[t,r])}return Z(e,t),I(e,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(z),H=function(t){function e(t,r){var n;return R(this,e),(n=M(this,e,[t,r])).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0,n.player_.ready((function(){n.update()})),n}return Z(e,t),I(e,[{key:"createItems",value:function(){var t=this,e=this.player_.textTrackSettings;if(e){var r=e.getSizeSetting(),n=[new T(this.player_,{label:"Caption Text Size",onClickBack:function(){t.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return V.map((function(e){n.push(new U(t.player_,{label:e.charAt(0).toUpperCase()+e.substring(1),selectable:!0,multiSelectable:!1,selected:e===r,value:e}))})),n}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=L(A(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){G.prototype.handleClick.apply(this)}}])}(G);u.Z.registerComponent("SubtitleSizeButton",H);var q=r(28400);function W(t,e,r,n){if(t.length)for(var o=t.length-1;o>=0;o--){var i=t[o];if(i.kind===e){if(r&&i.label!==r)continue;if(n&&i.language!==n)continue;return i}}}function Q(t,e,r,n){t.kind===e&&(r&&t.label!==r||(t.loaded_?n(t):t.one("loadeddata",(function(){n(t)}))))}function K(t){if(null==t?void 0:t.cues.length)for(var e=0;e<t.cues.length;e++){var r=t.cues[e];(null==r?void 0:r.text)&&(r.text=q.m.sanitize(r.text))}}var Y={getTrack:function(t,e,r,n){return W(t.textTracks(),e,r,n)},useTrack:function(t,e,r,n,o){var i=t.textTracks(),a=W(i,e,r,o);if(a)Q(a,e,r,n);else{var u=function(t){Q(t.track,e,r,n)};i.addEventListener("addtrack",u),t.one("dispose",(function(){i.removeEventListener("addtrack",u)}))}},getCurrentTextTrack:function(t){return this.findTrackByPredicate(t,(function(t){return"showing"===t.mode}))},findTrackByPredicate:function(t,e){if(!t)return null;for(var r=t.textTracks(),n=0;n<r.length;n++){var o=r[n];if(e(o))return o}return null},forEachTrack:function(t,e){if(t)for(var r=t.textTracks(),n=0;n<r.length;n++)e(r[n])},sanitizeTrack:function(t,e){if(t&&e)if(t.loaded)K(t);else{var r=function(){return K(t)};t.addEventListener("loadeddata",r),e.one("dispose",(function(){t.removeEventListener("loadeddata",r)}))}}},$=function(t,e,r){var n,o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){for(var a=arguments.length,u=new Array(a),c=0;c<a;c++)u[c]=arguments[c];var l=!1,s=function(){n=null,s=null,t.apply(this,u)};return!n&&r&&(t.apply(o,u),l=!0),i.clearTimeout(n),n=i.setTimeout(s,e),l};return a.cancel=function(){i.clearTimeout(n),n=null},a};function X(t){return X="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},X(t)}function J(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function tt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,rt(n.key),n)}}function et(t,e,r){return e&&tt(t.prototype,e),r&&tt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function rt(t){var e=function(t){if("object"!=X(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==X(e)?e:e+""}function nt(t,e,r){return e=ut(e),function(t,e){if(e&&("object"==X(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ot()?Reflect.construct(e,r||[],ut(t).constructor):e.apply(t,r))}function ot(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ot=function(){return!!t})()}function it(t,e,r,n){var o=at(ut(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function at(){return at="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ut(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},at.apply(null,arguments)}function ut(t){return ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ut(t)}function ct(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&<(t,e)}function lt(t,e){return lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},lt(t,e)}var st=u.Z.getComponent("MenuItem"),ft=function(t){function e(t,r){var n;return J(this,e),(n=nt(this,e,[t,r])).onChange=$(n.onChange,100,!1,n),n.bindEventListeners(),n}return ct(e,t),et(e,[{key:"createEl",value:function(){var t=this.localize("Search");return it(e,"createEl",this,3)(["li",{className:"vjs-menu-item cv-search-input-menu-item-container ".concat(this.options_.className||"").trim(),innerHTML:'\n <div class="cv-search-input-menu-item">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="'.concat(t,'" type="text" autocomplete="off" spellcheck="false" aria-label="').concat(t,'" />\n </div>\n ')}])}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var t=this,e=this.$("input");this.onChange=this.onChange.bind(this),e.addEventListener("keyup",this.onChange),e.addEventListener("blur",(function(e){t.options_.menuButton.menu.handleBlur(e)}))}},{key:"onChange",value:function(t){var e=t.target;this.options_.search(e.value)}}])}(st);u.Z.registerComponent("SearchInputMenuItem",ft);var pt=function(t){function e(){return J(this,e),nt(this,e,arguments)}return ct(e,t),et(e,[{key:"createEl",value:function(t,r,n){return it(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:"vjs-menu-item cv-no-results"}),n])}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}}])}(st);function yt(t){return yt="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},yt(t)}function ht(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vt(n.key),n)}}function vt(t){var e=function(t){if("object"!=yt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=yt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yt(e)?e:e+""}function dt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dt=function(){return!!t})()}function bt(t){return bt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bt(t)}function mt(t,e){return mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mt(t,e)}u.Z.registerComponent("NoMatchingResultsMenuItem",pt);var gt=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=bt(e),function(t,e){if(e&&("object"==yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,dt()?Reflect.construct(e,r||[],bt(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mt(t,e)}(e,t),r=e,(n=[{key:"update",value:function(t,e){var r=this;if(null==t?void 0:t.length){var n=[],o=0;t.forEach((function(t){var i=r.options_.label.substr(o,t);i&&n.push(i),n.push('<span class="cv-highlight">'),n.push(r.options_.label.substr(t,e)),n.push("</span>"),o=t+e})),n.push(this.options_.label.substring(o,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(n.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&ht(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("MenuItem"));function wt(t){return wt="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},wt(t)}function Ot(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,jt(n.key),n)}}function jt(t){var e=function(t){if("object"!=wt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=wt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wt(e)?e:e+""}function Pt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pt=function(){return!!t})()}function St(t,e,r,n){var o=_t(kt(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function _t(){return _t="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=kt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},_t.apply(null,arguments)}function kt(t){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},kt(t)}function Et(t,e){return Et=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Et(t,e)}var Ct=u.Z.getComponent("MenuButton"),Tt=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=kt(e),function(t,e){if(e&&("object"==wt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Pt()?Reflect.construct(e,r||[],kt(t).constructor):e.apply(t,r))}(this,e,[t,r])).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0,n.update=n.update.bind(n),n.search=n.search.bind(n),n.player_.textTracks().addEventListener("selectedlanguagechange",n.update),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Et(t,e)}(e,t),r=e,(n=[{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.update),t.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.update)}))}},{key:"createItems",value:function(){var t,e=Y.getCurrentTextTrack(this.player_);if(e){if(null===(t=e.cues)||void 0===t?void 0:t.length){for(var r=[new ft(this.player_,{menuButton:this,search:this.search})],n=0;n<e.cues.length;n++){var o=e.cues[n];r.push(new gt(this.player_,{cue:o,label:o.text,selected:!1,multiSelectable:!1}))}var i=new pt(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return i.hide(),r.push(i),r}this.bindTrackEvents(e)}}},{key:"search",value:function(t){var e;t=t.trim();var r=Y.getCurrentTextTrack(this.player_);if(null===(e=null==r?void 0:r.cues)||void 0===e?void 0:e.length){var n=this.findMatches(t,r);this.toggleItemVisibility(t,n),this.toggleNoResults(t,n)}}},{key:"findMatches",value:function(t,e){var r={};if(!t)return r;for(var n=new RegExp(t,"gi"),o=0;o<e.cues.length;o++){for(var i=e.cues[o].text,a=[],u=void 0;u=n.exec(i);)a.push(u.index);a.length&&(r[o]=a)}return r}},{key:"toggleItemVisibility",value:function(t,e){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(r,n){!t||e[n]?r.show():r.hide(),r.update(e[n],t.length)}))}},{key:"toggleNoResults",value:function(t,e){var r=this.menu.children_[this.menu.children_.length-1];!t||Object.keys(e).length?r.hide():r.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(St(e,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){St(e,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){St(e,"pressButton",this,3)([]);var t=this.menu.children_[0];(null==t?void 0:t.focus)&&(null==t||t.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){Ct.prototype.handleClick.apply(this)}}])&&Ot(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Ct);function xt(t){return xt="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},xt(t)}function Lt(){return Lt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=At(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Lt.apply(null,arguments)}function Rt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Dt(n.key),n)}}function It(t,e,r){return e&&Bt(t.prototype,e),r&&Bt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Dt(t){var e=function(t){if("object"!=xt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=xt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xt(e)?e:e+""}function Mt(t,e,r){return e=At(e),function(t,e){if(e&&("object"==xt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Nt()?Reflect.construct(e,r||[],At(t).constructor):e.apply(t,r))}function Nt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nt=function(){return!!t})()}function At(t){return At=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},At(t)}function Zt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ft(t,e)}function Ft(t,e){return Ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ft(t,e)}u.Z.registerComponent("subtitleSearchButton",Tt);var zt=u.Z.getComponent("MenuItem"),Gt=u.Z.getComponent("MenuButton"),Vt=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"}],Ut=function(t){function e(t,r){return Rt(this,e),Mt(this,e,[t,r])}return Zt(e,t),It(e,[{key:"createEl",value:function(){return u.Z.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(t){switch(t){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">⇑</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">⇓</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>'}return""}}])}(zt),Ht=function(t){function e(){var t;return Rt(this,e),(t=Mt(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return Zt(e,t),It(e,[{key:"createItems",value:function(){var t=this,e=[];return e.push(new T(this.player_,{label:"Keyboard Shortcuts"})),Vt.forEach((function(r){e.push(new Ut(t.player_,r))})),e}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat((t=e,r=this,"function"==typeof(n=Lt(At(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!this.player_.options_.mobile}},{key:"showCollapsibleMenu",value:function(){Gt.prototype.handleClick.apply(this)}}])}(Gt);function qt(t){return qt="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},qt(t)}function Wt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qt(n.key),n)}}function Qt(t){var e=function(t){if("object"!=qt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qt(e)?e:e+""}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kt=function(){return!!t})()}function Yt(t,e,r,n){var o=$t(Xt(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function $t(){return $t="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Xt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},$t.apply(null,arguments)}function Xt(t){return Xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xt(t)}function Jt(t,e){return Jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jt(t,e)}u.Z.registerComponent("KeyboardShortcutsButton",Ht);var te="cv-collapsed",ee=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Xt(e),function(t,e){if(e&&("object"==qt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kt()?Reflect.construct(e,r||[],Xt(t).constructor):e.apply(t,r))}(this,e,[t,r])).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(n),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.one("play",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update),n.player_.off("play",n.update)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jt(t,e)}(e,t),r=e,(n=[{key:"toggleHidden",value:function(t){for(var e=0;e<this.children_.length;e++){var r=this.children_[e];r.isCollabsible&&(r.alwaysCollapsed||t?(r.isCollapsed=!0,r.addClass(te)):(r.isCollapsed=!1,r.removeClass(te)))}this.getChild("cogButton").update()}},{key:"update",value:function(){var t=this.player_.isFullscreen(),e=this.player_.whiteboardModePlugin().side,r=this.player_.el().getBoundingClientRect(),n=!t||"left"!==e&&"right"!==e?r.width:r.height;if(n){this.addClass("cv-collapsorator-ready");var o=n<(!t||"left"!==e&&"right"!==e&&"top"!==e?600:1200);this.player_.options_.deferMenus&&(o=!0),this.toggleHidden(o)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(Yt(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Yt(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}}])&&Wt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));u.Z.registerComponent("collapserator",ee);var re=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"],ne=r(57900),oe=r(52881),ie=r(65858),ae=r(50873);function ue(t){return ue="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},ue(t)}function ce(){ce=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==ue(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ue(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function le(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,se(n.key),n)}}function se(t){var e=function(t){if("object"!=ue(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ue(e)?e:e+""}var fe=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()},(e=[{key:"logStream",value:function(){var t="v:".concat(this.options.videoId);ne.SG.cacheExists(t)||(this.collectionApiClient.log({type:ie.Vw.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:ie.eq.V3}),ne.SG&&ne.SG.cacheSet(t,null,300))}},{key:"logVideoProgress",value:function(t){var e=this,r=this.getAnalyticsData();this.collectionApiClient.log(t.map((function(t){return{type:ie.Vw.StreamProgress,actionContext:e.getActionContext(),data:Object.assign(Object.assign({},r),{progress:t}),eventVersion:ie.eq.V2}})))}},{key:"logUserAction",value:function(t,e){var r=Object.assign(Object.assign({},this.getAnalyticsData()),t),n=Object.assign(Object.assign({},this.getActionContext()),e);this.collectionApiClient.log({type:e.actionType,data:r,actionContext:n,eventVersion:e.eventVersion||ie.eq.V2})}},{key:"getAnalyticsData",value:function(){var t=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(t.video.shareId=this.options.shareId);var e=this.getEntityType();return e===ie.py.Interactive?t.interactive={id:+this.options.mediaId}:e===ie.py.Clip&&(t.clip={id:+this.options.mediaId}),t}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var t=this;this.collectionApiClient=new oe.q({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return t.getCurrentUser()},shouldLog:ae.k.shouldLog,formatData:ae.k.formatData})}},{key:"getCurrentUser",value:function(){return t=this,e=void 0,r=void 0,n=ce().mark((function t(){return ce().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?ie.MC.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return ie.py.Video;case"MasterInteractive":return ie.py.Interactive;case"MasterClip":return ie.py.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return ie.LZ.Player;case"interactive-player":return ie.LZ.InteractivePlayer;case"create-clip-player":return ie.LZ.CreateClipPlayer}}}])&&le(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function pe(t){return pe="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},pe(t)}function ye(t){var e="function"==typeof Map?new Map:void 0;return ye=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(he())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&ve(o,r.prototype),o}(t,arguments,de(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ve(r,t)},ye(t)}function he(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(he=function(){return!!t})()}function ve(t,e){return ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ve(t,e)}function de(t){return de=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},de(t)}var be=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=de(e),function(t,e){if(e&&("object"==pe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,he()?Reflect.construct(e,r||[],de(t).constructor):e.apply(t,r))}(this,e,[(null==r?void 0:r.title)||"Ajax error"])).url=t,n.response=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ve(t,e)}(e,t),r=e,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(ye(Error));function me(t){return me="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},me(t)}function ge(){ge=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==me(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(me(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function we(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Oe(n.key),n)}}function Oe(t){var e=function(t){if("object"!=me(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=me(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==me(e)?e:e+""}var je=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},Pe=new(function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tokens={gateway:null}},e=[{key:"get",value:function(t,e){return je(this,void 0,void 0,ge().mark((function r(){return ge().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(t,{method:"GET",mode:"cors",headers:this.getHeaders(e)});case 3:return r.t1=r.sent,r.next=6,r.t0.parseResponse.call(r.t0,r.t1);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"delete",value:function(t,e){return je(this,void 0,void 0,ge().mark((function r(){return ge().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,fetch(t,{method:"DELETE",headers:this.getHeaders(e)});case 2:case"end":return r.stop()}}),r,this)})))}},{key:"post",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return je(this,void 0,void 0,ge().mark((function o(){var i;return ge().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,fetch(t,{method:"POST",headers:this.getHeaders(r),body:e,mode:"cors"});case 2:if(i=o.sent,!n){o.next=7;break}return o.next=6,this.parseResponse(i);case 6:return o.abrupt("return",o.sent);case 7:case"end":return o.stop()}}),o,this)})))}},{key:"put",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return je(this,void 0,void 0,ge().mark((function o(){var i;return ge().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,fetch(t,{method:"PUT",headers:this.getHeaders(r),body:e,mode:"cors"});case 2:if(i=o.sent,!n){o.next=7;break}return o.next=6,this.parseResponse(i);case 6:return o.abrupt("return",o.sent);case 7:case"end":return o.stop()}}),o,this)})))}},{key:"setToken",value:function(t,e){this.tokens[t]=e}},{key:"getHeaders",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={"Content-Type":"application/json"};return this.tokens[t.tokenName]&&(e.authorization="Bearer ".concat(this.tokens[t.tokenName])),e}},{key:"parseResponse",value:function(t){return je(this,void 0,void 0,ge().mark((function e(){var r,n;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(404!==t.status){e.next=2;break}return e.abrupt("return",null);case 2:if(t.ok){e.next=15;break}return e.prev=3,e.next=6,t.json();case 6:r=e.sent,e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(3),new be(t.url);case 12:throw e.prev=12,new be(t.url,r);case 15:return e.next=17,t.json();case 17:return n=e.sent,e.abrupt("return",n);case 19:case"end":return e.stop()}}),e,null,[[3,9,12,15]])})))}}],e&&we(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()),Se=r(19389),_e=r.n(Se);function ke(t){return ke="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},ke(t)}function Ee(t,e,r){return(e=function(t){var e=function(t){if("object"!=ke(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ke(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ke(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ce(t){t.paused()?t.play():t.pause()}function Te(t,e){t.currentTime(t.currentTime()+e)}function xe(t,e){t.volume(t.volume()+e)}var Le,Re=Ee(Ee(Ee(Ee(Ee(Ee(Ee(Ee(Ee(Ee({},"f",(function(t){document[t.fsApi_.fullscreenEnabled]&&(t.isFullscreen()?t.exitFullscreen():t.requestFullscreen())})),"m",(function(t){var e=t.volume(),r=t.lastVolume_();if(0===e){var n=r<.1?.1:r;t.volume(n),t.muted(!1)}else t.muted(!t.muted())})),"k",Ce),"space",Ce),"left",(function(t){return Te(t,-5)})),"right",(function(t){return Te(t,5)})),"j",(function(t){return Te(t,-10)})),"l",(function(t){return Te(t,10)})),"up",(function(t){return xe(t,.05)})),"down",(function(t){return xe(t,-.05)}));!function(t){t.PhysicallyChapteredVideo="physically-chaptered-video"}(Le||(Le={}));var Be=r(83765);function Ie(t){return Ie="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},Ie(t)}function De(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Me(n.key),n)}}function Me(t){var e=function(t){if("object"!=Ie(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ie(e)?e:e+""}function Ne(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ne=function(){return!!t})()}function Ae(){return Ae="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ze(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ae.apply(null,arguments)}function Ze(t){return Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ze(t)}function Fe(t,e){return Fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fe(t,e)}r(35571);var ze=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ze(e),function(t,e){if(e&&("object"==Ie(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ne()?Reflect.construct(e,r||[],Ze(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.configureMenuDimensions=n.configureMenuDimensions.bind(n),n.initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fe(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){this.player.ready(this.configureMenuDimensions),this.player.one("play",this.configureMenuDimensions),this.player.on("resize",this.configureMenuDimensions),this.player.on("fullscreenchange",this.configureMenuDimensions),this.player.on("resizemenus",this.configureMenuDimensions),this.player.on("ready",this.configureMenuDimensions)}},{key:"dispose",value:function(){var t,r,n;this.player.off("resize",this.configureMenuDimensions),this.player.off("fullscreenchange",this.configureMenuDimensions),this.player.off("resizemenus",this.configureMenuDimensions),this.player.off("ready",this.configureMenuDimensions),(t=e,r=this,"function"==typeof(n=Ae(Ze(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"configureMenuDimensions",value:function(){var t=this,e=function(e){if(!t.options.mobile){var r=t.player.getChild("collapserator"),n=r.getChild("volumePanel"),o=r.children_.indexOf(n);r.removeChild(n),r.addChild("volumePanel",{inline:e},o),t.player.trigger("volumechange")}},r=this.player.isFullscreen();if(r&&!this.options.mobile){var n=this.player.whiteboardModePlugin().side;if(e("top"!==n),"left"===n||"right"===n||"top"===n){var o=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(t){t.style.paddingTop=null,t.style.marginBottom=null,t.style.width="calc(".concat(o,"px - 4em)")}))}}r||e(!0);var i=this.player.currentWidth(),a=this.player.currentHeight()/i*100,u=this.player.el().querySelector(".cv-collapsorator"),c=this.player.el().querySelectorAll(".vjs-menu"),l=u&&u.offsetHeight;l?("CreateClipSeekBar"===this.options.seekBarName&&(l+=22),c&&c.length&&c.forEach((function(e){!r&&t.options.overflowControls?e.style.paddingTop="80%":e.style.paddingTop="calc(".concat(a,"% - ").concat(l,"px)"),e.style.marginBottom="".concat(l,"px"),e.style.width=null,e.querySelector(".vjs-menu-content")&&(i<=450?t.player.addClass("cv-player-small"):t.player.removeClass("cv-player-small"))}))):this.player.one("play",this.configureMenuDimensions)}}],n&&De(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));u.Z.registerPlugin("configureMenuDimensionsPlugin",ze);var Ge="cv-persisttest",Ve=function(){try{return window.localStorage.setItem(Ge,"cv-player-storage-test"),window.localStorage.removeItem(Ge),!0}catch(t){return!1}},Ue=function(t){return window.localStorage.getItem(t)},He=function(t,e){window.localStorage.setItem(t,e)};function qe(t){return qe="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},qe(t)}function We(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qe(n.key),n)}}function Qe(t){var e=function(t){if("object"!=qe(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=qe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qe(e)?e:e+""}function Ke(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ke=function(){return!!t})()}function Ye(){return Ye="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=$e(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ye.apply(null,arguments)}function $e(t){return $e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$e(t)}function Xe(t,e){return Xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xe(t,e)}var Je=u.Z.getPlugin("plugin"),tr="cvplayer-volume",er="cvplayer-mute",rr=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=$e(e),function(t,e){if(e&&("object"==qe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ke()?Reflect.construct(e,r||[],$e(t).constructor):e.apply(t,r))}(this,e,[t])).enabled=!0,r.player.ready((function(){return r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xe(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){this.player.options_.mobile?this.removeVolumeControl():Ve()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var t=Ue(tr),e=Ue(er);t&&this.player.volume(+t),e&&this.player.muted("true"===e)}},{key:"saveVolumeState",value:function(){this.enabled&&(He(tr,this.player.volume().toString()),He(er,this.player.muted().toString()))}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var t=this.player.getChild("collapserator"),e=t.getChild("volumePanel");t.removeChild(e)}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"dispose",value:function(){var t,r,n;this.player.off("volumechange",this.saveVolumeState),(t=e,r=this,"function"==typeof(n=Ye($e(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}}],n&&We(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Je);function nr(t){return nr="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},nr(t)}function or(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ir(n.key),n)}}function ir(t){var e=function(t){if("object"!=nr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=nr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==nr(e)?e:e+""}function ar(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ar=function(){return!!t})()}function ur(t){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ur(t)}function cr(t,e){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cr(t,e)}u.Z.registerPlugin("persistVolumePlugin",rr);var lr=u.Z.getPlugin("plugin"),sr="cvplayer-playback-rate",fr=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=ur(e),function(t,e){if(e&&("object"==nr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ar()?Reflect.construct(e,r||[],ur(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.player.dataLoaded((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cr(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){var t,e=this;if(Ve()){this.savePlaybackRate=this.savePlaybackRate.bind(this),this.player.on("ratechange",this.savePlaybackRate),this.one("dispose",(function(){e.player.off("ratechange",e.savePlaybackRate)}));var r=+Ue(sr);(null===(t=this.player.options_.playbackRates)||void 0===t?void 0:t.some((function(t){return t===r})))&&this.player.playbackRate(r)}}},{key:"savePlaybackRate",value:function(){var t,e=this.player.playbackRate().toString();He(sr,e),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({rate:e},{actionType:ie.Vw.Select,workflowPhase:ie.eu.Complete,descriptor:ie.UX.ChangeSpeed,entity:ie.py.PlaybackSpeed,eventVersion:ie.eq.V3})}}])&&or(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(lr);function pr(t){return pr="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},pr(t)}function yr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,hr(n.key),n)}}function hr(t){var e=function(t){if("object"!=pr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=pr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pr(e)?e:e+""}function vr(t,e){if(e&&("object"==pr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function dr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dr=function(){return!!t})()}function br(t){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},br(t)}function mr(t,e){return mr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mr(t,e)}u.Z.registerPlugin("persistPlaybackRatePlugin",fr);var gr=function(t){function e(t){var r,n,o,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,i=[t],o=br(o=e),(r=vr(n,dr()?Reflect.construct(o,i||[],br(n).constructor):o.apply(n,i))).fullscreenBecauseOfRotate=!1,r.player.supportsFullScreen()?(r.onRotate=r.onRotate.bind(r),r.onFullscreenChange=r.onFullscreenChange.bind(r),r.player.ready((function(){return r.initialize()})),r):vr(r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mr(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.player.on("fullscreenchange",this.onFullscreenChange),window.addEventListener("orientationchange",this.onRotate)}},{key:"dispose",value:function(){this.player.off("fullscreenchange",this.onFullscreenChange),window.removeEventListener("orientationchange",this.onRotate)}},{key:"onFullscreenChange",value:function(){this.player.isFullscreen()||(this.fullscreenBecauseOfRotate=!1)}},{key:"onRotate",value:function(){var t=this.getAngle();90===t||-90===t||270===t?(this.player.requestFullscreen(),this.fullscreenBecauseOfRotate=!0):this.fullscreenBecauseOfRotate&&this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"getAngle",value:function(){var t,e;return"number"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.angle)?window.screen.orientation.angle:0}}])&&yr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));u.Z.registerPlugin("fullscreenOnRotatePlugin",gr);var wr="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n";function Or(t){return Or="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},Or(t)}function jr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Pr(n.key),n)}}function Pr(t){var e=function(t){if("object"!=Or(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Or(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Or(e)?e:e+""}function Sr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Sr=function(){return!!t})()}function _r(t){return _r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_r(t)}function kr(t,e){return kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kr(t,e)}var Er=function(t){function e(t,r){var n,o,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=_r(e),function(t,e){if(e&&("object"==Or(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Sr()?Reflect.construct(e,r||[],_r(t).constructor):e.apply(t,r))}(this,e,[t,r])).update=(o=n.update.bind(n),i=window.performance.now(),function(){var t=window.performance.now();t-i>=1e3&&(o.apply(void 0,arguments),i=t)}),t.on("timeupdate",n.update),t.one("dispose",(function(){t.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kr(t,e)}(e,t),r=e,(n=[{key:"update",value:function(){var t=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(t)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var t={innerHTML:wr,className:this.buildCSSClass()},e={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},r=u.Z.dom.createEl("a",t,e);return this.createControlTextEl(r),r.addEventListener("click",this.pause.bind(this)),r}},{key:"pause",value:function(){this.player_.pause()}}])&&jr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Button"));function Cr(t){return Cr="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},Cr(t)}function Tr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xr(n.key),n)}}function xr(t){var e=function(t){if("object"!=Cr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Cr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Cr(e)?e:e+""}function Lr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Lr=function(){return!!t})()}function Rr(t){return Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rr(t)}function Br(t,e){return Br=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Br(t,e)}Er.prototype.controlText_="Open in ClickView",u.Z.registerComponent("OpenExternallyButton",Er);var Ir=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Rr(e),function(t,e){if(e&&("object"==Cr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Lr()?Reflect.construct(e,r||[],Rr(t).constructor):e.apply(t,r))}(this,e,[t,r])).options=r,t.ready((function(){return n.onReady()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Br(t,e)}(e,t),r=e,(n=[{key:"onReady",value:function(){var t=this.player.getChild("collapserator"),e=t.getChild("customControlSpacer"),r=t.children_.indexOf(e);t.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},r+1)}}])&&Tr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function Dr(t){return Dr="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},Dr(t)}function Mr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Nr(n.key),n)}}function Nr(t){var e=function(t){if("object"!=Dr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Dr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dr(e)?e:e+""}function Ar(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ar=function(){return!!t})()}function Zr(t,e,r,n){var o=Fr(zr(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Fr(){return Fr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=zr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Fr.apply(null,arguments)}function zr(t){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zr(t)}function Gr(t,e){return Gr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gr(t,e)}u.Z.registerPlugin("openExternallyPlugin",Ir);var Vr=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=zr(e),function(t,e){if(e&&("object"==Dr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ar()?Reflect.construct(e,r||[],zr(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gr(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(Zr(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Zr(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"setUi",value:function(t,e){var r=this,n=t>0,o=n?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(o,"'>\n <div class='cv-touch-text'>\n ").concat(n?"+":"").concat(10*t,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){r.removeText()}),e)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Mr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("component"));function Ur(t){return Ur="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},Ur(t)}function Hr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qr(n.key),n)}}function qr(t){var e=function(t){if("object"!=Ur(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ur(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ur(e)?e:e+""}function Wr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wr=function(){return!!t})()}function Qr(){return Qr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Kr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Qr.apply(null,arguments)}function Kr(t){return Kr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kr(t)}function Yr(t,e){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yr(t,e)}u.Z.registerComponent("TouchControls",Vr);var $r=u.Z.getPlugin("plugin"),Xr=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=Kr(e),function(t,e){if(e&&("object"==Ur(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wr()?Reflect.construct(e,r||[],Kr(t).constructor):e.apply(t,r))}(this,e,[t])).doubleTouchCount=0,r.seekStartTime=0,r.directionModifier=0,r.bindFunctions(),r.player.ready((function(){return r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yr(t,e)}(e,t),r=e,n=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this),this.unBindEventListeners=this.unBindEventListeners.bind(this)}},{key:"initialize",value:function(){var t=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){t.player.off("ready",t.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.tech.on("touchstart",this.onTouchStart),this.tech.on("touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&"Html5"===this.tech.name()&&(this.tech.off("touchstart",this.onTouchStart),this.tech.off("touchend",this.onTouchEnd))}},{key:"dispose",value:function(){var t,r,n;(t=e,r=this,"function"==typeof(n=Qr(Kr(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([]),this.unBindEventListeners()}},{key:"onTouchStart",value:function(t){this.touchStartTime=t.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(t){var e=this;if(t.changedTouches.length){if(t.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(t),void(this.lastTouchTime=t.timeStamp);this.resetProperties(),this.lastTouchTime=t.timeStamp,t.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){e.doubleTouchCount||(e.player.paused()?e.player.play():e.userActive&&e.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(t){var e=this.player.el().getBoundingClientRect(),r=e.left+e.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),t.changedTouches[0].pageX<r?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var n=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>n+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}],n&&Hr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}($r);function Jr(t){return Jr="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},Jr(t)}function tn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,en(n.key),n)}}function en(t){var e=function(t){if("object"!=Jr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Jr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jr(e)?e:e+""}u.Z.registerPlugin("touchControls",Xr);var rn=function(){return t=function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=r.id,this.plugin=e,this.source=r,this.enabled=this.enabled.bind(this)},(e=[{key:"enabled",value:function(t){return void 0===t?this.plugin.currentSource===this.source:(t&&this.plugin.setSource(this.source.id),t)}}])&&tn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function nn(t){return nn="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},nn(t)}function on(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,an(n.key),n)}}function an(t){var e=function(t){if("object"!=nn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=nn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==nn(e)?e:e+""}function un(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(un=function(){return!!t})()}function cn(t){return cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},cn(t)}function ln(t,e){return ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ln(t,e)}var sn=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=cn(e),function(t,e){if(e&&("object"==nn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,un()?Reflect.construct(e,r||[],cn(t).constructor):e.apply(t,r))}(this,e,[t])).options_=r,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ln(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){var t=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",(function(){t.qualityLevels.off("change",t.onQualityChange)}))}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var t=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",t.id)}},{key:"setSource",value:function(t){var e=this,r=this.getSourceById(t);if(null===r)return this.currentSource;var n=this.player.currentTime(),o=!this.player.paused();this._currentSource=r;var i=this.player.playbackRate();return this.player.src({src:r.url,type:r.mimeType}),this.player.one("loadedmetadata",(function(){e.player.playbackRate(i),e.player.currentTime()!==n&&e.player.currentTime(n),o&&e.player.play()})),this.trigger({event:"sourcechange",source:r}),this.sourceChangeUpdateQualityLevels(r),r}},{key:"getSourceById",value:function(t){return this.sources.find((function(e){return e.id===t}))}},{key:"repopulateSources",value:function(t){for(var e=null;this.qualityLevels.length;)this.qualityLevels[0].enabled&&(e=this.qualityLevels[0].id),this.qualityLevels.removeQualityLevel(this.qualityLevels[0]);this.sources=[],this.populateSources(t,e)}},{key:"sortSources",value:function(t){return t.sort((function(t,e){return t.id===e.id?0:+t.id>+e.id?-1:1}))}},{key:"populateSources",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null;(t=this.sortSources(t)).forEach((function(t){e.qualityLevels.addQualityLevel(new rn(e,t)),e.sources.push(t),e.trigger({event:"addsource",source:t}),null===r?t.default&&(n=t):t.id===r&&(n=t)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(t){for(var e=this.qualityLevels,r=-1,n=0;n<e.length;n++)if(e[n].id===t.id){r=n;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})}}],n&&on(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function fn(t){return fn="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},fn(t)}function pn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,yn(n.key),n)}}function yn(t){var e=function(t){if("object"!=fn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=fn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fn(e)?e:e+""}u.Z.registerPlugin("progressiveFiles",sn);var hn=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(t,e){var r=t.getQualityLevelById(e);if(r||(r=this.getNextBestQuality(t,e)),!r)return null;for(var n=0;n<t.length;n++){var o=t[n];o.enabled=r.id===o.id}return r}},{key:"getNextBestQuality",value:function(t,e){var r=this.getKnownProfiles(),n=r.indexOf(e);if(n>=0){for(var o=n+1;o<r.length;o++){var i=r[o],a=t.getQualityLevelById(i);if(a)return a}for(var u=n-1;u>0;u--){var c=r[u],l=t.getQualityLevelById(c);if(l)return l}}return null}}],null&&pn(t.prototype,null),e&&pn(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function vn(t){return vn="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},vn(t)}function dn(){dn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==vn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(vn(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function bn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mn(n.key),n)}}function mn(t){var e=function(t){if("object"!=vn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=vn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vn(e)?e:e+""}var gn=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e.name,this.playbackProfile=e.playbackProfile,this.address=new URL(e.httpsAddress)},(e=[{key:"getUrl",value:function(t){return t?this.address+"cache?file="+encodeURIComponent(t):null}},{key:"ping",value:function(){return t=this,e=void 0,r=void 0,n=dn().mark((function t(){var e,r,n,o;return dn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new AbortController,r=setTimeout((function(){return e.abort()}),1e3),t.prev=3,t.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:e.signal});case 6:return n=t.sent,t.next=9,n.text();case 9:return o=t.sent,clearTimeout(r),t.abrupt("return","PONG"===o);case 14:return t.prev=14,t.t0=t.catch(3),t.abrupt("return",!1);case 17:case"end":return t.stop()}}),t,this,[[3,14]])})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}}])&&bn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function wn(t){return wn="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},wn(t)}function On(){On=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==wn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(wn(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function jn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Pn(n.key),n)}}function Pn(t){var e=function(t){if("object"!=wn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=wn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wn(e)?e:e+""}var Sn=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.player=e,this.logger=u.Z.log.createLogger("localcache")},(e=[{key:"setSource",value:function(t,e){return r=this,n=void 0,o=void 0,i=On().mark((function r(){var n;return On().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.player.localCache||void 0===(null==t?void 0:t.src)){r.next=5;break}return r.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(n=r.sent)&&(this.logger.debug("Using Local Cache",n),t.src=n.getUrl(t.src));case 5:e(null,t);case 6:case"end":return r.stop()}}),r,this)})),new(o||(o=Promise))((function(t,e){function a(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(a,u)}c((i=i.apply(r,n||[])).next())}));var r,n,o,i}}])&&jn(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function _n(t){return _n="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},_n(t)}function kn(){kn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==_n(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(_n(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function En(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Cn(n.key),n)}}function Cn(t){var e=function(t){if("object"!=_n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=_n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_n(e)?e:e+""}function Tn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tn=function(){return!!t})()}function xn(){return xn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ln(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},xn.apply(null,arguments)}function Ln(t){return Ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ln(t)}function Rn(t,e){return Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Rn(t,e)}u.Z.use("*",(function(t){return new Sn(t)}));var Bn='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',In=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ln(e),function(t,e){if(e&&("object"==_n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Tn()?Reflect.construct(e,r||[],Ln(t).constructor):e.apply(t,r))}(this,e,[t,r])).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(n),t.ready((function(){n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rn(t,e)}(e,t),r=e,n=[{key:"createEl",value:function(){return(t=e,r=this,"function"==typeof(n=xn(Ln(1&3?t.prototype:t),"createEl",r))?function(t){return n.apply(r,t)}:n)(["div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Bn,"</div>")},{title:"Streaming from ClickView Local Cache"}]);var t,r,n}},{key:"initialize",value:function(){var t=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){t.localCachePlugin.off("localcachechanged",t.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return t=this,e=void 0,r=void 0,n=kn().mark((function t(){return kn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.localCachePlugin.getActiveLocalCache();case 2:t.sent?this.show():this.hide();case 4:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}}],n&&En(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function Dn(t){return Dn="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},Dn(t)}function Mn(){Mn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Dn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Dn(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Nn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,An(n.key),n)}}function An(t){var e=function(t){if("object"!=Dn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Dn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dn(e)?e:e+""}function Zn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zn=function(){return!!t})()}function Fn(){return Fn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=zn(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Fn.apply(null,arguments)}function zn(t){return zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zn(t)}function Gn(t,e){return Gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gn(t,e)}u.Z.registerComponent("localCacheIndicator",In);var Vn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},Un=function(t){function e(t,r){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=zn(e),function(t,e){if(e&&("object"==Dn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zn()?Reflect.construct(e,r||[],zn(t).constructor):e.apply(t,r))}(this,e,[t])).logger_=u.Z.log.createLogger("localcache"),void 0===r)throw Error("no options defined");return n.localCaches_=r.localCacheAddresses.map((function(t){return new gn(t)})),n.player.ready((function(){n.initialize(),r.enabled&&n.enable()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gn(t,e)}(e,t),r=e,n=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"removeLocalCache",value:function(t){this.localCaches_=this.localCaches_.filter((function(e){return e!==t}))}},{key:"dispose",value:function(){var t,r,n;(t=e,r=this,"function"==typeof(n=Fn(zn(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"initialize",value:function(){this.player.controlBar.addChild("localCacheIndicator")}},{key:"handleNetworkError",value:function(){return Vn(this,void 0,void 0,Mn().mark((function t(){var e;return Mn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getActiveLocalCache();case 2:if(!(e=t.sent)){t.next=8;break}return t.next=6,e.ping();case 6:t.sent&&this.removeLocalCache(e);case 8:return this.resetActiveLocalCache(),t.next=11,this.getActiveLocalCache();case 11:return this.resetSource(),t.abrupt("return",!0);case 13:case"end":return t.stop()}}),t,this)})))}},{key:"resetSource",value:function(){for(var t=this.player.qualityLevels(),e=0;e<t.length;e++)t[e].enabled&&(t[e].enabled=!0)}},{key:"getActiveLocalCacheInternal",value:function(){return Vn(this,void 0,void 0,Mn().mark((function t(){var e,r,n,o=this;return Mn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[],r=function(t){return Vn(o,void 0,void 0,Mn().mark((function r(){return Mn().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.ping();case 2:if(!r.sent){r.next=4;break}e.push(t);case 4:case"end":return r.stop()}}),r)})))},t.next=4,Promise.all(this.localCaches_.map((function(t){return r(t)})));case 4:if(!(e.length>0)){t.next=8;break}return n=e[0],this.onLocalCacheChange(n),t.abrupt("return",n);case 8:return t.abrupt("return",null);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"onLocalCacheChange",value:function(t){this.logger_.debug("Local Cache changed",t),this.trigger("localcachechanged",{localCache:t});var e=!1;t&&t.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",t.playbackProfile),hn.enableProfileOrNextBest(this.player.qualityLevels(),t.playbackProfile),e=!0),e||this.player.src(this.player.src())}}],n&&Nn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function Hn(t){return Hn="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},Hn(t)}function qn(){qn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Hn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Hn(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Wn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qn(n.key),n)}}function Qn(t){var e=function(t){if("object"!=Hn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Hn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hn(e)?e:e+""}function Kn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kn=function(){return!!t})()}function Yn(){return Yn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=$n(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Yn.apply(null,arguments)}function $n(t){return $n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$n(t)}function Xn(t,e){return Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xn(t,e)}u.Z.registerPlugin("localCache",Un);var Jn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},to=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=$n(e),function(t,e){if(e&&("object"==Hn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kn()?Reflect.construct(e,r||[],$n(t).constructor):e.apply(t,r))}(this,e,[t])).playerApi=r.playerApi,n.fileToken=r.fileToken,n.logger=u.Z.log.createLogger("video-signature-expiry-plugin"),n.bindErrorHandlers(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xn(t,e)}(e,t),r=e,n=[{key:"bindErrorHandlers",value:function(){this.onError=this.onError.bind(this),this.player.on("error",this.onError)}},{key:"dispose",value:function(){var t,r,n;this.player.off("error",this.onError),(t=e,r=this,"function"==typeof(n=Yn($n(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"onError",value:function(){return Jn(this,void 0,void 0,qn().mark((function t(){var e,r=this;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=this.player.error().code)===MediaError.MEDIA_ERR_NETWORK||e===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this.player.localCache().getActiveLocalCache();case 5:if(!t.sent){t.next=8;break}return this.callErrorHandler((function(){return r.player.localCache().handleNetworkError()})),t.abrupt("return");case 8:this.callErrorHandler((function(){return r.handleVideoSignatureExpiry()}));case 9:case"end":return t.stop()}}),t,this)})))}},{key:"handleVideoSignatureExpiry",value:function(){return Jn(this,void 0,void 0,qn().mark((function t(){var e,r;return qn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.playerApi&&this.fileToken){t.next=2;break}return t.abrupt("return",!1);case 2:if(!(this.refetchedSourcesTimestamp+9e5>Date.now())){t.next=4;break}return t.abrupt("return",!1);case 4:return this.refetchedSourcesTimestamp=Date.now(),e=null,t.prev=6,this.logger.debug("Detected expired mp4 urls, attempting to refetch"),r="".concat(this.playerApi.origin,"/api/files?fileToken=").concat(this.fileToken),t.next=11,Pe.get(r);case 11:e=t.sent,t.next=18;break;case 14:return t.prev=14,t.t0=t.catch(6),this.logger.error("Failed to refetch expired mp4 urls"),t.abrupt("return",!1);case 18:return this.logger.debug("Mp4 urls successfully refetched"),this.player.progressiveFiles().repopulateSources(e.progressive.map((function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}}))),this.fileToken=e.fileToken,t.abrupt("return",!0);case 22:case"end":return t.stop()}}),t,this,[[6,14]])})))}},{key:"callErrorHandler",value:function(t){return Jn(this,void 0,void 0,qn().mark((function e(){var r,n,o,i,a=this;return qn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.player.currentTime(),n=!this.player.paused(),o=this.player.playbackRate(),i=function(){a.player.playbackRate(o),a.player.currentTime(r),n&&a.player.play(),a.player.error(null)},this.player.one("loadedmetadata",i),e.next=7,t();case 7:if(!e.sent){e.next=9;break}return e.abrupt("return");case 9:this.player.off("loadedmetadata",i);case 10:case"end":return e.stop()}}),e,this)})))}}],n&&Wn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function eo(t){return eo="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},eo(t)}function ro(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,no(n.key),n)}}function no(t){var e=function(t){if("object"!=eo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=eo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==eo(e)?e:e+""}function oo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(oo=function(){return!!t})()}function io(t){return io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},io(t)}function ao(t,e){return ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ao(t,e)}u.Z.registerPlugin("handleNetworkErrors",to);var uo=u.Z.getPlugin("plugin"),co="cvplayer-show-subtitles",lo="cvplayer-selected-language",so="cvplayer-subtitle-size",fo=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=io(e),function(t,e){if(e&&("object"==eo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,oo()?Reflect.construct(e,r||[],io(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ao(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.applyUserPreferences=this.applyUserPreferences.bind(this),this.player.textTracks().length&&(this.bindEventListeners(),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var t=!!this.options.showSubtitles,e=this.safeGet(co);if("true"===e&&(t=!0),"false"===e&&(t=!1),t){var r=this.guessWhichTrack();r&&(r.mode="showing")}else this.disableSubtitles();var n=this.safeGet(so);n||(n=this.options.subtitleSize),this.player.options_.mobile&&(n="medium"),n&&this.player.textTrackSettings.setSizeSetting(n)}},{key:"safeGet",value:function(t){if(Ve())return Ue(t)}},{key:"onSelectedLanguageChange",value:function(){for(var t,e,r=this.player.textTracks(),n=0;n<r.length;n++){var o=r[n];if("showing"===o.mode)return He(co,"true"),He(lo,o.language),void(null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:o.language},{actionType:ie.Vw.Select,entity:ie.py.Subtitle,workflowPhase:ie.eu.Complete,descriptor:ie.DL.On}))}var i;He(co,"false"),i=lo,window.localStorage.removeItem(i),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:""},{actionType:ie.Vw.Select,entity:ie.py.Subtitle,workflowPhase:ie.eu.Complete,descriptor:ie.DL.Off,eventVersion:ie.eq.V3})}},{key:"bindEventListeners",value:function(){var t=this;Ve()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){t.player.off("cv:languageselected",t.onSelectedLanguageChange),t.player.off("changesubtitlesize",t.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var t=this.player.textTrackSettings.getSizeSetting();He(so,t)}},{key:"guessWhichTrack",value:function(){for(var t,e,r=this.safeGet(lo)||window.navigator.language,n=this.getLanguageParts(r),o=n.language,i=n.country,a=this.player.textTracks(),u=0;u<a.length;u++){var c=a[u],l=this.getLanguageParts(c.language),s=l.language,f=l.country;if(s===o&&(t=c,f||(e=c),f===i))return t}return e||t||null}},{key:"getLanguageParts",value:function(t){var e=t.toLowerCase().split("-");return{language:e[0],country:e[1]}}},{key:"disableSubtitles",value:function(){for(var t=this.player.textTracks(),e=0;e<t.length;e++)t[e].mode="disabled"}},{key:"previewModeSubtitles",value:function(){var t=this.guessWhichTrack();t&&(t.mode="showing"),this.player.off("changesubtitlesize",this.onChangeSubtitleSize),this.player.textTrackSettings.setSizeSetting("large"),this.player.on("changesubtitlesize",this.onChangeSubtitleSize)}}])&&ro(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(uo);function po(t){return po="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},po(t)}function yo(){yo=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==po(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(po(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function ho(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vo(n.key),n)}}function vo(t){var e=function(t){if("object"!=po(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=po(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==po(e)?e:e+""}function bo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(bo=function(){return!!t})()}function mo(t){return mo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mo(t)}function go(t,e){return go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},go(t,e)}u.Z.registerPlugin("persistSubtitleSettingsPlugin",fo);var wo=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},Oo=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=mo(e),function(t,e){if(e&&("object"==po(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,bo()?Reflect.construct(e,r||[],mo(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&go(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){return wo(this,void 0,void 0,yo().mark((function t(){var e,r,n,o,i=this;return yo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getActiveLocalCache();case 2:if(e=t.sent,(r=e?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(r="1080"),Ve()&&(n=Ue(this.getStorageKey(!!e)))&&(r=n),o=this.player.qualityLevels(),(null==e?void 0:e.playbackProfile)||hn.enableProfileOrNextBest(o,r),Ve()){t.next=10;break}return t.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),o.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){o.off("change",i.onQualityLevelsChange)}));case 13:case"end":return t.stop()}}),t,this)})))}},{key:"onQualityLevelsChange",value:function(){var t;return wo(this,void 0,void 0,yo().mark((function e(){var r,n,o;return yo().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:r=e.sent,n=this.player.qualityLevels(),o=n[n.selectedIndex],He(this.getStorageKey(r),o.id),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({quality:o.id},{actionType:ie.Vw.Select,workflowPhase:ie.eu.Complete,descriptor:ie.UX.ChangeResolution,entity:ie.py.Resolution,eventVersion:ie.eq.V3});case 7:case"end":return e.stop()}}),e,this)})))}},{key:"isLocalCacheActive",value:function(){return wo(this,void 0,void 0,yo().mark((function t(){return yo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.localCache().getActiveLocalCache();case 2:return t.abrupt("return",!!t.sent);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(t){return t?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&ho(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function jo(t){return jo="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},jo(t)}function Po(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function So(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Eo(n.key),n)}}function ko(t,e,r){return e&&_o(t.prototype,e),r&&_o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Eo(t){var e=function(t){if("object"!=jo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jo(e)?e:e+""}function Co(t,e,r){return e=xo(e),function(t,e){if(e&&("object"==jo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,To()?Reflect.construct(e,r||[],xo(t).constructor):e.apply(t,r))}function To(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(To=function(){return!!t})()}function xo(t){return xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xo(t)}function Lo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ro(t,e)}function Ro(t,e){return Ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ro(t,e)}u.Z.registerPlugin("persistQualitySettingsPlugin",Oo);var Bo=u.Z.getComponent("Component"),Io=function(t){function e(t,r){return So(this,e),Co(this,e,[t,r])}return Lo(e,t),ko(e,[{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var t=this.options_.event,e=this.player_.duration(),r=(t.end.time-t.start.time)/e;this.el_.style.width=100*r+"%";var n=t.start.time/e;this.el_.style.left=100*n+"%"}}])}(Bo),Do=function(t){function e(){var t;return So(this,e),(t=Co(this,e,arguments)).events_=[],t}return Lo(e,t),ko(e,[{key:"update",value:function(){for(var t=this,e=this.children(),r=e.length;r>0;r--)this.removeChild(e[r]);this.events_.forEach((function(e){var r=new Io(t.player(),{event:e});t.addChild(r),r.update()}))}},{key:"addEvents",value:function(t){var e,r;(e=this.events_).push.apply(e,function(t){if(Array.isArray(t))return Po(t)}(r=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return Po(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Po(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),this.update()}},{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"cv-progress-reporter-display"})}}])}(Bo);function Mo(t){return Mo="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},Mo(t)}function No(t,e,r){return(e=Zo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ao(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zo(n.key),n)}}function Zo(t){var e=function(t){if("object"!=Mo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Mo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mo(e)?e:e+""}function Fo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fo=function(){return!!t})()}function zo(t){return zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zo(t)}function Go(t,e){return Go=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Go(t,e)}var Vo=u.Z.getPlugin("plugin"),Uo="play",Ho="playing",qo="pause",Wo="seekstart",Qo="ended",Ko="pausedseek",Yo=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=zo(e),function(t,e){if(e&&("object"==Mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Fo()?Reflect.construct(e,r||[],zo(t).constructor):e.apply(t,r))}(this,e,[t,r])).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=r,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Go(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var t=this,e=No(No(No(No(No(No({},Uo,(function(){return t.onPlay()})),qo,(function(){return t.onPause()})),"timeupdate",(function(){return t.onTimeUpdate()})),"seeking",(function(){return t.onSeeking()})),Qo,(function(){return t.onEnded()})),Ho,(function(){return t.onPlaying()})),r=Object.keys(e);r.forEach((function(r){return t.player.on(r,e[r])})),this.one("dispose",(function(){r.forEach((function(r){return t.player.off(r,e[r])}))}))}},{key:"startInterval",value:function(){var t=this,e=this.options.interval||5e3;this.interval=window.setInterval((function(){return t.flushBuffer()}),e),this.player.one("dispose",(function(){return window.clearInterval(t.interval)}))}},{key:"addEasterEgg",value:function(){var t,e,r=this,n="",o=function(e){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(n+=e.key)&&r.addDisplay(),window.clearTimeout(t),t=window.setTimeout((function(){n=""}),500)},i=!1,a=function(){i=!0,e=window.setTimeout((function(){i&&r.addDisplay()}),1e4)};function u(){i=!1,window.clearTimeout(e)}this.player.el().addEventListener("keyup",o);var c=this.player.getChild("Collapserator").getChild("PlayToggle");c.on("touchstart",a),c.on("touchend",u),this.player.one("dispose",(function(){var t,e;null===(e=null===(t=r.player)||void 0===t?void 0:t.el())||void 0===e||e.removeEventListener("keyup",o),c.off("touchstart",a),c.off("touchend",u)}))}},{key:"addDisplay",value:function(){var t=this;this.progressReporterDisplay||(this.progressReporterDisplay=new Do(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){t.progressReporterDisplay=void 0})))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent("seekend"),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(Uo)}},{key:"onPause",value:function(){var t=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){t.isPlaying=!1,t.logEvent(qo),delete t.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(Uo)),this.isPlaying&&!this.isSeeking&&this.logEvent(Ho)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(Ko),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(Wo))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(Qo)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(t){if(this.player){var e=this.player.currentTime();t===Wo&&(e=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:e,type:t})}}},{key:"shouldUseCarriedOverTime",value:function(t){return this.lastPlayingTime&&(t===Ho||t===Uo)}},{key:"shouldSaveCarriedOverTime",value:function(t){return t===Ho||t===qo}},{key:"shouldClearCarriedOverTime",value:function(t){return t===Qo||t===Ko}},{key:"flushBuffer",value:function(){for(var t,e,r=[],n={};this.eventBuffer.length;){var o=this.eventBuffer.shift();this.shouldClearCarriedOverTime(o.type)?delete this.lastPlayingTime:n.start?o.type===Ho&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(o.type)&&(this.lastPlayingTime=o.time),n.end=o,r.push(n),n={}):(this.shouldUseCarriedOverTime(o.type)&&(o.time=this.lastPlayingTime,delete this.lastPlayingTime),n.start=o)}this.eventBuffer=[],r.length&&this.validateEvents(r)&&(this.options.onFlush(r),null===(t=this.player)||void 0===t||t.trigger("progressflush"),null===(e=this.progressReporterDisplay)||void 0===e||e.addEvents(r))}},{key:"validateEvents",value:function(t){var e=0;t.forEach((function(t){e+=t.end.time-t.start.time}));var r=this.options.interval||5e3;return r/=1e3,r+=.5,r*=this.player.playbackRate(),e<r}}],n&&Ao(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Vo);function $o(t){return $o="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},$o(t)}function Xo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Jo(n.key),n)}}function Jo(t){var e=function(t){if("object"!=$o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=$o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$o(e)?e:e+""}function ti(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ti=function(){return!!t})()}function ei(t){return ei=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ei(t)}function ri(t,e){return ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ri(t,e)}u.Z.registerPlugin("progressReporterPlugin",Yo);var ni=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ei(e),function(t,e){if(e&&("object"==$o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ti()?Reflect.construct(e,r||[],ei(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ri(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){return u.Z.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&Xo(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component")),oi=["top","left","right","bottom"],ii={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};function ai(t){return ai="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},ai(t)}function ui(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ci(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,si(n.key),n)}}function li(t,e,r){return e&&ci(t.prototype,e),r&&ci(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function si(t){var e=function(t){if("object"!=ai(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ai(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ai(e)?e:e+""}function fi(t,e,r){return e=hi(e),function(t,e){if(e&&("object"==ai(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pi()?Reflect.construct(e,r||[],hi(t).constructor):e.apply(t,r))}function pi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pi=function(){return!!t})()}function yi(){return yi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=hi(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},yi.apply(null,arguments)}function hi(t){return hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hi(t)}function vi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&di(t,e)}function di(t,e){return di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},di(t,e)}var bi=u.Z.getComponent("Component"),mi=function(t){function e(t,r){var n;return ui(this,e),(n=fi(this,e,[t,r])).bindEventListeners(),n}return vi(e,t),li(e,[{key:"createEl",value:function(){return(t=e,r=this,"function"==typeof(n=yi(hi(1&3?t.prototype:t),"createEl",r))?function(t){return n.apply(r,t)}:n)(["div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)}]);var t,r,n}},{key:"bindEventListeners",value:function(){var t=this,e=this.el(),r=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move",t.addClass("cv-drag-over")},n=function(e){e.preventDefault(),t.removeClass("cv-drag-over"),t.player_.whiteboardModePlugin().setWhiteboardMode(t.options_.side)},o=function(){t.removeClass("cv-drag-over")};e.addEventListener("dragover",r),e.addEventListener("drop",n),e.addEventListener("dragleave",o),this.on("dispose",(function(){e.removeEventListener("dragover",r),e.removeEventListener("drop",n),e.removeEventListener("dragleave",o)}))}}])}(bi),gi=function(t){function e(t,r){var n;return ui(this,e),(n=fi(this,e,[t,r])).addChildren(),n}return vi(e,t),li(e,[{key:"addChildren",value:function(){var t=this;oi.forEach((function(e){t.addChild(new mi(t.player_,{side:e}))}))}}])}(bi);function wi(t){return wi="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},wi(t)}function Oi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ji(n.key),n)}}function ji(t){var e=function(t){if("object"!=wi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=wi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wi(e)?e:e+""}function Pi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pi=function(){return!!t})()}function Si(t){return Si=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Si(t)}function _i(t,e){return _i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_i(t,e)}var ki=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Si(e),function(t,e){if(e&&("object"==wi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Pi()?Reflect.construct(e,r||[],Si(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_i(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Oi(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("MenuItem"));function Ei(t){return Ei="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},Ei(t)}function Ci(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ti(n.key),n)}}function Ti(t){var e=function(t){if("object"!=Ei(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ei(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ei(e)?e:e+""}function xi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xi=function(){return!!t})()}function Li(){return Li="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ri(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Li.apply(null,arguments)}function Ri(t){return Ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ri(t)}function Bi(t,e){return Bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bi(t,e)}var Ii=u.Z.getComponent("MenuButton"),Di=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=Ri(e),function(t,e){if(e&&("object"==Ei(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xi()?Reflect.construct(e,r||[],Ri(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bi(t,e)}(e,t),r=e,n=[{key:"createItems",value:function(){var t=this,e=this.player_.whiteboardModePlugin().side,r=[new T(this.player_,{label:"Video Controls"})];return oi.forEach((function(n){r.push(new ki(t.player_,{side:n,label:ii[n],selectable:!0,multiSelectable:!1,selected:n===e}))})),r}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=Li(Ri(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.whiteboardModePlugin().side;return ii[t]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Ii.prototype.handleClick.apply(this)}}],n&&Ci(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Ii);function Mi(t){return Mi="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},Mi(t)}function Ni(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ai(n.key),n)}}function Ai(t){var e=function(t){if("object"!=Mi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Mi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mi(e)?e:e+""}function Zi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zi=function(){return!!t})()}function Fi(t){return Fi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fi(t)}function zi(t,e){return zi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zi(t,e)}var Gi="cv-whiteboard-side",Vi=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=Fi(e),function(t,e){if(e&&("object"==Mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zi()?Reflect.construct(e,r||[],Fi(t).constructor):e.apply(t,r))}(this,e,[t])).side="bottom",r.player.ready((function(){r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zi(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(Ve()){var t=Ue(Gi);t&&(this.side=t)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var t=this,e=this.player.getChild("collapserator"),r=new ni(this.player);this.button=new Di(this.player),e.addChild(r),e.addChild(this.button),this.player.trigger("cv-updatecog");var n=function(){t.player.isFullscreen()&&e.el().setAttribute("draggable","true")},o=function(){t.player.isFullscreen()&&e.el().setAttribute("draggable","false")},i=function(e){t.player.isFullscreen()&&(t.player.addClass("cv-dragging"),e.dataTransfer.setData("text/plain","handle"))},a=function(){t.player.isFullscreen()&&(t.player.removeClass("cv-dragging"),e.el().setAttribute("draggable","false"))};r.el().addEventListener("mousedown",n),r.el().addEventListener("mouseup",o),e.el().addEventListener("dragstart",i),e.el().addEventListener("dragend",a),this.on("dispose",(function(){r.el().removeEventListener("mousedown",n),r.el().removeEventListener("mouseup",o),e.el().removeEventListener("dragstart",i),e.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new gi(this.player))}},{key:"initFullscreenListener",value:function(){var t=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){t.player.off("fullscreenchange",t.update)}))}},{key:"setWhiteboardMode",value:function(t){this.side=t,this.button.update(),Ve()&&He(Gi,t),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"update",value:function(){this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),u.Z.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.trigger("cv-updatecog"),this.player.isFullscreen()&&"bottom"!==this.side&&(this.player.addClass("cv-whiteboard-".concat(this.side)),u.Z.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}}],n&&Ni(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function Ui(t){return Ui="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},Ui(t)}function Hi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qi(n.key),n)}}function qi(t){var e=function(t){if("object"!=Ui(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ui(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ui(e)?e:e+""}function Wi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wi=function(){return!!t})()}function Qi(t){return Qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qi(t)}function Ki(t,e){return Ki=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ki(t,e)}u.Z.registerPlugin("whiteboardModePlugin",Vi);var Yi=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Qi(e),function(t,e){if(e&&("object"==Ui(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wi()?Reflect.construct(e,r||[],Qi(t).constructor):e.apply(t,r))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ki(t,e)}(e,t),r=e,(n=[{key:"deferMenu",value:function(){var t={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",t)}},{key:"buildSubtitles",value:function(){for(var t=[],e=!1,r=this.player.textTracks(),n=0;n<r.length;n++){var o=r[n],i="showing"===o.mode;t.unshift({id:o.label,name:o.label,selected:i}),i&&(e=!0)}return t.push({id:null,name:"Off",selected:!e}),t}},{key:"buildQualities",value:function(){for(var t=[],e=this.player.qualityLevels(),r=0;r<e.length;r++){var n=e[r];t.push({id:n.id,name:n.id+"p",selected:n.enabled})}return t}},{key:"buildPlaybackSpeeds",value:function(){var t=this.player.playbackRate();return this.player.options_.playbackRates.map((function(e){return{id:e,name:e+"x"+(1===e?" (Normal)":""),selected:t===e}}))}}])&&Hi(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));u.Z.registerPlugin("deferMenusPlugin",Yi);var $i="PreventScrubbingTooltip";function Xi(t){return Xi="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},Xi(t)}function Ji(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ta(n.key),n)}}function ta(t){var e=function(t){if("object"!=Xi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Xi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xi(e)?e:e+""}function ea(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ea=function(){return!!t})()}function ra(t,e,r,n){var o=na(oa(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function na(){return na="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=oa(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},na.apply(null,arguments)}function oa(t){return oa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oa(t)}function ia(t,e){return ia=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ia(t,e)}var aa=u.Z.getComponent("Component"),ua="cv-prevent-scrubbing-tooltip-show",ca="cv-prevent-scrubbing-tooltip-remove-transition",la=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=oa(e),function(t,e){if(e&&("object"==Xi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ea()?Reflect.construct(e,r||[],oa(t).constructor):e.apply(t,r))}(this,e,arguments)).isShowing=!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ia(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-prevent-scrubbing-tooltip ".concat(ra(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return ra(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass(),innerText:"No skipping ahead!"}),n])}},{key:"show",value:function(){this.isShowing||(this.player_.userActive(!0),this.addClass(ua),this.isShowing=!0)}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isShowing&&(e&&(this.addClass(ca),window.requestAnimationFrame((function(){t.removeClass(ca)}))),this.player_.userActive(!1),this.removeClass(ua),this.isShowing=!1)}}],n&&Ji(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(aa);function sa(t){return sa="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},sa(t)}function fa(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,pa(n.key),n)}}function pa(t){var e=function(t){if("object"!=sa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=sa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sa(e)?e:e+""}function ya(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ya=function(){return!!t})()}function ha(){return ha="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=va(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ha.apply(null,arguments)}function va(t){return va=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},va(t)}function da(t,e){return da=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},da(t,e)}u.Z.registerComponent($i,la);var ba=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=va(e),function(t,e){if(e&&("object"==sa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ya()?Reflect.construct(e,r||[],va(t).constructor):e.apply(t,r))}(this,e,[t])).isEnabled=!1,n.isPreviewing=!1;var o=null!=r?r:{},i=o.furthestVisitedTime,a=void 0===i?0:i,u=o.isEnabled,c=void 0!==u&&u;return n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.player.currentTime=n.currentTime.bind(n),n.onTimeUpdate=n.onTimeUpdate.bind(n),n.furthestVisitedTime=a,n.isEnabled=c,c&&n.enable(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&da(t,e)}(e,t),r=e,n=[{key:"dispose",value:function(){var t,r,n;this.player.currentTime=this.playerCurrentTimeFn,this.isEnabled&&(this.disable(),(t=e,r=this,"function"==typeof(n=ha(va(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([]))}},{key:"togglePreview",value:function(t){if(t){if(this.configurePreview(),this.isEnabled)return;this.enable(),this.isPreviewing=!0}else this.disable(),this.isPreviewing=!1}},{key:"configurePreview",value:function(){this.player.currentTime(0),this.furthestVisitedTime=0}},{key:"enable",value:function(){this.player.on("timeupdate",this.onTimeUpdate),this.getProgressControl().addChild($i),this.isEnabled=!0}},{key:"disable",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.getProgressControl().removeChild(this.getPreventScrubbingTooltip()),this.isEnabled=!1}},{key:"getProgressControl",value:function(){return this.player.controlBar.getChild("progressControl")}},{key:"onTimeUpdate",value:function(){var t=this.playerCurrentTimeFn();t>this.furthestVisitedTime&&(this.furthestVisitedTime=t)}},{key:"currentTime",value:function(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];if("number"!=typeof t)return this.playerCurrentTimeFn.apply(this,[t].concat(n));if(this.isEnabled){var i=this.getPreventScrubbingTooltip(),a=null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay");if(t>this.furthestVisitedTime)return i.show(),$(i.hide,1e3,!1,i)(),null==a||a.hide(),void this.playerCurrentTimeFn(this.furthestVisitedTime,n);null==a||a.show(),i.hide(!0),this.playerCurrentTimeFn(t,n)}else this.playerCurrentTimeFn.apply(this,[t].concat(n))}},{key:"getPreventScrubbingTooltip",value:function(){return this.getProgressControl().getChild($i)}},{key:"getSeekBar",value:function(){var t;return null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar")}}],n&&fa(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function ma(t){return ma="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},ma(t)}function ga(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wa(n.key),n)}}function wa(t){var e=function(t){if("object"!=ma(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ma(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ma(e)?e:e+""}function Oa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Oa=function(){return!!t})()}function ja(t){return ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ja(t)}function Pa(t,e){return Pa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pa(t,e)}u.Z.registerPlugin("preventScrubbingPlugin",ba);var Sa=u.Z.getComponent("Button"),_a="cv-muted",ka=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=ja(e),function(t,e){if(e&&("object"==ma(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oa()?Reflect.construct(e,r||[],ja(t).constructor):e.apply(t,r))}(this,e,[t])).update(),r.update=r.update.bind(r),t.on("volumechange",r.update),t.on("dispose",(function(){return t.off("volumechange",r.update)})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pa(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(){this.player_.muted(!this.player_.muted()),this.update()}},{key:"update",value:function(){this.player_.muted()?this.addClass(_a):this.removeClass(_a)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])&&ga(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Sa);function Ea(t){return Ea="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},Ea(t)}function Ca(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ta(n.key),n)}}function Ta(t){var e=function(t){if("object"!=Ea(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ea(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ea(e)?e:e+""}function xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xa=function(){return!!t})()}function La(){return La="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ra(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},La.apply(null,arguments)}function Ra(t){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ra(t)}function Ba(t,e){return Ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ba(t,e)}u.Z.registerComponent("muteButton",ka),ka.prototype.controlText_="Mute";var Ia,Da=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ra(e),function(t,e){if(e&&("object"==Ea(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xa()?Reflect.construct(e,r||[],Ra(t).constructor):e.apply(t,r))}(this,e,[t,r]))._onClickHandler=r.onClickHandler,n.bindEventListeners(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ba(t,e)}(e,t),r=e,n=[{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"cv-player-overlay"})}},{key:"handleClick",value:function(t){"function"==typeof this._onClickHandler&&(t.stopImmediatePropagation(),this._onClickHandler())}},{key:"dispose",value:function(){var t,r,n;this.off("click",this.handleClick),(t=e,r=this,"function"==typeof(n=La(Ra(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"bindEventListeners",value:function(){this.on("click",this.handleClick)}}],n&&Ca(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function Ma(t){return Ma="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},Ma(t)}function Na(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Aa(n.key),n)}}function Aa(t){var e=function(t){if("object"!=Ma(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ma(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ma(e)?e:e+""}function Za(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Za=function(){return!!t})()}function Fa(t){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fa(t)}function za(t,e){return za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},za(t,e)}u.Z.registerComponent("playerOverlay",Da),function(t){t.Default="play",t.Hover="hover"}(Ia||(Ia={}));var Ga=u.Z.getPlugin("plugin"),Va="cv-preview-mode",Ua=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=Fa(e),function(t,e){if(e&&("object"==Ma(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Za()?Reflect.construct(e,r||[],Fa(t).constructor):e.apply(t,r))}(this,e,[t])).buttonAdded=!1,r.mode=null,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&za(t,e)}(e,t),r=e,(n=[{key:"getMode",value:function(){return this.mode}},{key:"setPlayerMode",value:function(t,e){var r=this.mode;if(this.mode=t,t===Ia.Hover)return this.buttonAdded||this.addButtons(e),this.player.addClass(Va),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");r===Ia.Hover&&(this.player.removeClass(Va),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(t){var e=new ka(this.player),r=new Da(this.player,{onClickHandler:t});this.player.addChild(e),this.player.addChild(r),this.buttonAdded=!0}},{key:"enableSubtites",value:function(){var t=this;this.player.dataLoaded((function(){return t.player.persistSubtitleSettingsPlugin().previewModeSubtitles()}))}},{key:"disableSubtitles",value:function(){var t=this;this.player.dataLoaded((function(){return t.player.persistSubtitleSettingsPlugin().applyUserPreferences()}))}},{key:"mute",value:function(){var t=this;this.player.ready((function(){t.player.persistVolumePlugin().disable(),t.player.muted(!0)}))}},{key:"unmute",value:function(){var t=this;this.player.ready((function(){t.player.persistVolumePlugin().applyUserPreferences(),t.player.persistVolumePlugin().enable()}))}},{key:"removeActivityTimeout",value:function(){this.player.cache_.inactivityTimeout=this.player.options_.inactivityTimeout,this.player.options_.inactivityTimeout=0}},{key:"restoreActivityTimeout",value:function(){this.player.options_.inactivityTimeout=this.player.cache_.inactivityTimeout}}])&&Na(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Ga);function Ha(t){return Ha="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},Ha(t)}function qa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Wa(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ka(n.key),n)}}function Qa(t,e,r){return e&&Wa(t.prototype,e),r&&Wa(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ka(t){var e=function(t){if("object"!=Ha(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ha(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ha(e)?e:e+""}function Ya(t,e,r){return e=Xa(e),function(t,e){if(e&&("object"==Ha(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$a()?Reflect.construct(e,r||[],Xa(t).constructor):e.apply(t,r))}function $a(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($a=function(){return!!t})()}function Xa(t){return Xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xa(t)}function Ja(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tu(t,e)}function tu(t,e){return tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tu(t,e)}u.Z.registerPlugin("playerModePlugin",Ua);var eu=u.Z.getComponent("Component"),ru=u.Z.getComponent("ClickableComponent"),nu=function(t){function e(){return qa(this,e),Ya(this,e,arguments)}return Ja(e,t),Qa(e,[{key:"createEl",value:function(){return eu.prototype.createEl.call(this,"span",{className:"cv-favourite-button-svg",innerHTML:"<span class='cv-favourite-heart'>".concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Heart-Filled" d="m18.833 5.9735c-0.78916-0.95022-1.8839-1.4735-3.0826-1.4735-1.6859 0-2.7532 1.0685-3.3517 1.9648-0.15528 0.2326-0.28738 0.46582-0.39828 0.68529-0.11091-0.21946-0.24297-0.45269-0.39828-0.68529-0.5985-0.89636-1.6658-1.9648-3.3517-1.9648-1.1987 0-2.2935 0.52333-3.0827 1.4735-0.75275 0.90644-1.1673 2.1204-1.1673 3.4183 0 1.4128 0.51978 2.7268 1.6358 4.1353 0.99741 1.2588 2.4323 2.5564 4.0939 4.0589 0.61916 0.5599 1.2594 1.1389 1.9411 1.7718l0.02047 0.01903c0.08837 0.08211 0.19856 0.12313 0.30875 0.12313s0.22038-0.04105 0.30875-0.12313l0.02047-0.01903c0.68166-0.63289 1.3219-1.2119 1.9412-1.7719 1.6615-1.5024 3.0964-2.8 4.0938-4.0588 1.116-1.4085 1.6358-2.7225 1.6358-4.1353 0-1.2979-0.41459-2.5119-1.1674-3.4183z"/>\n </svg>\n',"</span><span class='cv-favourite-outline'>").concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Shape" d="m18.959 5.9741c-0.76992-0.92705-1.9357-1.5351-3.1052-1.5351-1.6448 0-2.8808 0.74937-3.4647 1.6238-0.15149 0.22693-0.28074 0.55125-0.38894 0.76537-0.10821-0.21411-0.23718-0.53844-0.38871-0.76537-0.58391-0.87451-1.8205-1.6238-3.4653-1.6238-1.1695 0-2.2376 0.60808-3.0075 1.5351-0.7344 0.88434-1.1388 1.9712-1.1388 3.2374 0 1.3784 0.50711 3.0509 1.5959 4.4251 0.97309 1.2281 2.373 2.4941 3.9941 3.9599 0.60406 0.54625 1.2285 1.1104 1.8936 1.7278l0.01997 0.01934c0.08622 0.08011 0.38931 0.21727 0.49681 0.21727 0.1075 0 0.40992-0.13796 0.49614-0.21804l0.0201-0.0178c0.66504-0.61746 1.2897-1.1824 1.8939-1.7287 1.621-1.4658 3.0209-2.7317 3.994-3.9598 1.0888-1.3742 1.5955-3.0467 1.5955-4.4251 0-1.2663-0.30646-2.3531-1.0409-3.2374zm-5.337 10.688c-0.51948 0.47226-1.0567 0.95549-1.6218 1.4768-0.56507-0.52124-1.101-1.0059-1.6219-1.4769-3.1725-2.8689-5.2684-4.7641-5.2684-7.2556 0-1.0298 0.32333-1.9863 0.91044-2.6933 0.59385-0.71497 1.4183-1.1088 2.3213-1.1088 1.254 0 2.0645 0.81976 2.5237 1.5074 0.41187 0.61679 0.62678 1.2385 0.70006 1.4772 0.06131 0.19978 0.23683 0.33499 0.43482 0.33499s0.37351-0.1352 0.43482-0.33499c0.07329-0.23867 0.28821-0.86044 0.70006-1.4773 0.45914-0.68766 1.2698-1.5074 2.5237-1.5074 0.90309 0 1.7274 0.39377 2.3213 1.1088 0.58714 0.70695 0.91047 1.6634 0.91047 2.6933 0 2.4914-2.1035 4.3783-5.2685 7.2557z" stroke-width=".97562"/>\n </svg>\n',"</span>")})}}])}(eu),ou=function(t){function e(t,r){var n;return qa(this,e),(n=Ya(this,e,[t,r])).isFavourited=r.isFavourited,n.renderIcon(),n.update(),n}return Ja(e,t),Qa(e,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new nu(this.player_),this.addChild(this.icon)}},{key:"update",value:function(){this.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"createEl",value:function(t,e,r){e=Object.assign({innerHTML:"",className:"cv-favourite-button"},e),r=Object.assign({type:"button"},r);var n=eu.prototype.createEl.call(this,"button",e,r);return this.createControlTextEl(n),n}},{key:"handleClick",value:function(){this.isFavourited=!this.isFavourited,this.update(),this.options_.onClick&&this.options_.onClick(this.isFavourited)}}])}(ru);function iu(t){return iu="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},iu(t)}function au(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,uu(n.key),n)}}function uu(t){var e=function(t){if("object"!=iu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=iu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==iu(e)?e:e+""}function cu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(cu=function(){return!!t})()}function lu(t){return lu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lu(t)}function su(t,e){return su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},su(t,e)}ou.prototype.controlText_="Favourite";var fu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=lu(e),function(t,e){if(e&&("object"==iu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,cu()?Reflect.construct(e,r||[],lu(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&su(t,e)}(e,t),r=e,(n=[{key:"setFavourite",value:function(t,e){if(!this.initialized){var r=new ou(this.player,{isFavourited:t,onClick:e});this.player.addChild(r),this.initialized=!0}}}])&&au(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));u.Z.registerPlugin("favouritePlugin",fu);var pu=r(86777),yu=u.Z.getComponent("Menu"),hu=yu.prototype.createEl;yu.prototype.createEl=function(){var t=hu.call(this);return this.simpleBar=new pu.Z(this.contentEl(),{autoHide:!1}),t};var vu=yu.prototype.contentEl;yu.prototype.contentEl=function(){return this.simpleBar?this.simpleBar.getContentElement():vu.call(this)};var du=yu.prototype.dispose;yu.prototype.dispose=function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),du.call(this)};var bu=yu.prototype.addItem;yu.prototype.addItem=function(t){bu.call(this,t),this.simpleBar.recalculate()};var mu=yu.prototype.lockShowing;yu.prototype.lockShowing=function(){mu.call(this),this.simpleBar.recalculate()},yu.prototype.recalculateScrollBar=function(){this.simpleBar.recalculate()};var gu=yu.prototype.handleBlur;function wu(t){return wu="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},wu(t)}function Ou(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ju(n.key),n)}}function ju(t){var e=function(t){if("object"!=wu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=wu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==wu(e)?e:e+""}function Pu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pu=function(){return!!t})()}function Su(t){return Su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Su(t)}function _u(t,e){return _u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_u(t,e)}yu.prototype.handleBlur=function(t){var e=t.relatedTarget||document.activeElement;this.el().contains(e)||gu.call(this,t)};var ku=u.Z.getComponent("Menu"),Eu=u.Z.getComponent("Component"),Cu=u.Z.getComponent("MenuButton"),Tu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Su(e),function(t,e){if(e&&("object"==wu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Pu()?Reflect.construct(e,r||[],Su(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_u(t,e)}(e,t),r=e,(n=[{key:"createMenu",value:function(){var t,e=new ku(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var r=u.Z.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(t=this.options_.title,"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var n=new Eu(this.player_,{el:r});e.addItem(n)}if(this.items=this.createItems(),this.items)for(var o=0;o<this.items.length;o++)e.addItem(this.items[o]);return e}}])&&Ou(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Cu),xu=Cu.prototype.pressButton;Cu.prototype.pressButton=function(){xu.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var Lu=Cu.prototype.unpressButton;function Ru(t){return Ru="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},Ru(t)}function Bu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Iu(n.key),n)}}function Iu(t){var e=function(t){if("object"!=Ru(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ru(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ru(e)?e:e+""}function Du(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Du=function(){return!!t})()}function Mu(t,e,r,n){var o=Nu(Au(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Nu(){return Nu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Au(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Nu.apply(null,arguments)}function Au(t){return Au=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Au(t)}function Zu(t,e){return Zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zu(t,e)}Cu.prototype.unpressButton=function(){Lu.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},u.Z.registerComponent("MenuButton",Tu);var Fu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Au(e),function(t,e){if(e&&("object"==Ru(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Du()?Reflect.construct(e,r||[],Au(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zu(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(Mu(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Mu(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}}])&&Bu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function zu(t){return zu="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},zu(t)}function Gu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Vu(n.key),n)}}function Vu(t){var e=function(t){if("object"!=zu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=zu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zu(e)?e:e+""}function Uu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Uu=function(){return!!t})()}function Hu(t){return Hu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hu(t)}function qu(t,e){return qu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qu(t,e)}Fu.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},u.Z.registerComponent("TimeWrapper",Fu);var Wu=u.Z.getComponent("SeekBar"),Qu=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Hu(e),function(t,e){if(e&&("object"==zu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Uu()?Reflect.construct(e,r||[],Hu(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qu(t,e)}(e,t),r=e,(n=[{key:"handleMouseDown",value:function(t){var e=this.player_.preventScrubbingPlugin();e.isEnabled&&this.getMouseTime(t)>e.furthestVisitedTime||(Wu.prototype.handleMouseDown.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(t){Wu.prototype.handleMouseMove.call(this,t),this.update()}},{key:"getPercent",value:function(){var t=this.player_.currentTime()/this.player_.duration();return t>=1?1:t}},{key:"handleMouseUp",value:function(t){var e=this;Wu.prototype.handleMouseUp.call(this,t),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"clamp",value:function(t,e,r){return Math.min(Math.max(t,e),r)}},{key:"getMouseTime",value:function(t){return this.clamp(Wu.prototype.calculateDistance.call(this,t).x,0,1)*this.player_.duration()}}])&&Gu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Wu);function Ku(t){return Ku="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},Ku(t)}function Yu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$u(n.key),n)}}function $u(t){var e=function(t){if("object"!=Ku(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ku(e)?e:e+""}function Xu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xu=function(){return!!t})()}function Ju(t,e,r,n){var o=tc(ec(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function tc(){return tc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ec(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},tc.apply(null,arguments)}function ec(t){return ec=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ec(t)}function rc(t,e){return rc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},rc(t,e)}u.Z.registerComponent("SeekBar",Qu);var nc=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ec(e),function(t,e){if(e&&("object"==Ku(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xu()?Reflect.construct(e,r||[],ec(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&rc(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Ju(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Ju(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(t){this.el_.style.width=100*t+"%"}}])&&Yu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function oc(t){return oc="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},oc(t)}function ic(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ac(n.key),n)}}function ac(t){var e=function(t){if("object"!=oc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=oc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oc(e)?e:e+""}function uc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(uc=function(){return!!t})()}function cc(t,e,r,n){var o=lc(sc(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function lc(){return lc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=sc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},lc.apply(null,arguments)}function sc(t){return sc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sc(t)}function fc(t,e){return fc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fc(t,e)}var pc=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=sc(e),function(t,e){if(e&&("object"==oc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,uc()?Reflect.construct(e,r||[],sc(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fc(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(cc(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return cc(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(t){t>0&&t<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*t+"%"}}])&&ic(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function yc(t){return yc="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},yc(t)}function hc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vc(n.key),n)}}function vc(t){var e=function(t){if("object"!=yc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=yc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yc(e)?e:e+""}function dc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dc=function(){return!!t})()}function bc(t,e,r,n){var o=mc(gc(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function mc(){return mc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=gc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},mc.apply(null,arguments)}function gc(t){return gc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gc(t)}function wc(t,e){return wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wc(t,e)}var Oc=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=gc(e),function(t,e){if(e&&("object"==yc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,dc()?Reflect.construct(e,r||[],gc(t).constructor):e.apply(t,r))}(this,e,[t,r])).playProgress=new pc(n.player_),n.addChild(n.playProgress),n.loadProgress=new nc(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wc(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(bc(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return bc(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var t=this.player_.duration()||3600,e=this.options_.endTime-this.options_.startTime;if(t!==this.duration_){var r=e/t;this.el_.style.width=100*r+"%";var n=this.options_.startTime/t;this.el_.style.left=100*n+"%",this.duration_=t}var o=this.getCurrentTime();o<this.options_.startTime?this.playProgress.update(0):o>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((o-this.options_.startTime)/e)}},{key:"updateBuffered",value:function(t){var e=this.options_.endTime-this.options_.startTime;t<this.options_.startTime?this.loadProgress.update(0):t>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((t-this.options_.startTime)/e)}}])&&hc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function jc(t){return jc="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},jc(t)}function Pc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Sc(n.key),n)}}function Sc(t){var e=function(t){if("object"!=jc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jc(e)?e:e+""}function _c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_c=function(){return!!t})()}function kc(t,e,r,n){var o=Ec(Cc(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Ec(){return Ec="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Cc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ec.apply(null,arguments)}function Cc(t){return Cc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cc(t)}function Tc(t,e){return Tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Tc(t,e)}var xc=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Cc(e),function(t,e){if(e&&("object"==jc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_c()?Reflect.construct(e,r||[],Cc(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tc(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(kc(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return kc(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"updateBuffered",value:function(){var t=this;this.children_.forEach((function(e){e.updateBuffered(function(t){for(var e=t.buffered(),r=t.currentTime(),n=0,o=0;o<e.length;o++){var i=e.start(o),a=e.end(o);if(i<=r&&a>=r){n=a;break}}return n}(t.player_))}))}}])&&Pc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function Lc(t){return Lc="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},Lc(t)}function Rc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Bc(n.key),n)}}function Bc(t){var e=function(t){if("object"!=Lc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lc(e)?e:e+""}function Ic(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ic=function(){return!!t})()}function Dc(t,e,r,n){var o=Mc(Nc(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Mc(){return Mc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Nc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Mc.apply(null,arguments)}function Nc(t){return Nc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nc(t)}function Ac(t,e){return Ac=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ac(t,e)}var Zc=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Nc(e),function(t,e){if(e&&("object"==Lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ic()?Reflect.construct(e,r||[],Nc(t).constructor):e.apply(t,r))}(this,e,[t,r])).onDurationChange=n.onDurationChange.bind(n),n.createChapterItems=n.createChapterItems.bind(n),n.updateBuffered=n.updateBuffered.bind(n),Y.useTrack(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ac(t,e)}(e,t),r=e,(n=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),Dc(e,"dispose",this,3)([])}},{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar"),role:"progressbar"})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var t=Dc(e,"update",this,3)([]);return this.chapterBarItems&&this.chapterBarItems.update(),t}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"bindUpdateListener",value:function(t){var e=this,r=function(){e.createChapterItems(),e.updateBuffered()};t.addEventListener("cv:cuechange",r),this.player_.one("dispose",(function(){return t.removeEventListener("cv:cuechange",r)}))}},{key:"createChapterItems",value:function(t){var e,r;t&&(this.track_||this.bindUpdateListener(t),this.track_=t);var n=new xc(this.player_);if((null===(r=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===r?void 0:r.length)&&!this.options_.ignoreChapters)for(var o=0;o<this.track_.cues.length;o++){var i=this.track_.cues[o],a=i.startTime,u=i.endTime,c=this.player_.duration();c&&(o===this.track_.cues.length-1&&i.endTime<this.player_.duration()&&(u=this.player_.duration()),u>c&&(u=c));var l=new Oc(this.player_,{startTime:a,endTime:u});if(n.addChild(l),c&&u===c)break}else n.addChild(new Oc(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=n,this.addChild(this.chapterBarItems)}}])&&Rc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("SeekBar"));function Fc(t){return Fc="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},Fc(t)}function zc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gc(n.key),n)}}function Gc(t){var e=function(t){if("object"!=Fc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Fc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fc(e)?e:e+""}function Vc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vc=function(){return!!t})()}function Uc(){return Uc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Hc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Uc.apply(null,arguments)}function Hc(t){return Hc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hc(t)}function qc(t,e){return qc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qc(t,e)}Zc.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},u.Z.browser.IS_IOS||u.Z.browser.IS_ANDROID||Zc.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),u.Z.registerComponent("ChapterSeekBar",Zc);var Wc=u.Z.getComponent("ProgressControl"),Qc="seekBar",Kc=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=Hc(e),function(t,e){if(e&&("object"==Fc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vc()?Reflect.construct(e,r||[],Hc(t).constructor):e.apply(t,r))}(this,e,arguments)).seekBarName_=Qc,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qc(t,e)}(e,t),r=e,n=[{key:"setSeekBarName",value:function(t){this.seekBarName_=t}},{key:"getChild",value:function(t){return(null==t?void 0:t.toLowerCase())===Qc.toLowerCase()&&(t=this.seekBarName_),(r=e,n=this,"function"==typeof(o=Uc(Hc(1&3?r.prototype:r),"getChild",n))?function(t){return o.apply(n,t)}:o)([t]);var r,n,o}}],n&&zc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Wc);function Yc(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;t=t<0?0:t;var r=Math.floor(t%60),n=Math.floor(t/60%60),o=Math.floor(t/3600),i=Math.floor(e/60%60),a=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(o=n=r="-"),(o=o>0||a>0?o+":":"")+(n=((o||i>=10)&&n<10?"0"+n:n)+":")+(r<10?"0"+r:r)}function $c(t){return $c="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},$c(t)}function Xc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Jc(n.key),n)}}function Jc(t){var e=function(t){if("object"!=$c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=$c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$c(e)?e:e+""}function tl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(tl=function(){return!!t})()}function el(){return el="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=rl(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},el.apply(null,arguments)}function rl(t){return rl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rl(t)}function nl(t,e){return nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},nl(t,e)}Kc.prototype.options_={children:[]},u.Z.registerComponent("ProgressControl",Kc);var ol=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=rl(e),function(t,e){if(e&&("object"==$c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,tl()?Reflect.construct(e,r||[],rl(t).constructor):e.apply(t,r))}(this,e,[t,r])).hasCustomChapterText=!1,Y.useTrack(n.player_,"chapters",!1,(function(t){n.track_=t})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nl(t,e)}(e,t),r=e,n=[{key:"createEl",value:function(){var t,r,n,o=(t=e,r=this,"function"==typeof(n=el(rl(1&3?t.prototype:t),"createEl",r))?function(t){return n.apply(r,t)}:n)([]);return this.chapter_=u.Z.dom.createEl("div"),o.appendChild(this.chapter_),this.time_=u.Z.dom.createEl("div"),o.appendChild(this.time_),o}},{key:"updateTime",value:function(t){var e=this.player_.duration();if(u.Z.dom.textContent(this.time_,Yc(t,e)),this.track_&&!this.hasCustomChapterText){for(var r=0;r<this.track_.cues.length;r++){var n=this.track_.cues[r],o=n.endTime||e;if(n.startTime<=t&&o>=t)return void u.Z.dom.textContent(this.chapter_,n.text)}u.Z.dom.textContent(this.chapter_,"")}}},{key:"clearChapterContent",value:function(){u.Z.dom.textContent(this.chapter_,"")}},{key:"updateText",value:function(t){u.Z.dom.textContent(this.time_,t)}},{key:"setCustomChapterText",value:function(t){this.hasCustomChapterText=!!t,u.Z.dom.textContent(this.chapter_,null!=t?t:"")}}],n&&Xc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("TimeTooltip"));function il(t){return il="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},il(t)}function al(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ul(n.key),n)}}function ul(t){var e=function(t){if("object"!=il(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=il(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==il(e)?e:e+""}function cl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(cl=function(){return!!t})()}function ll(){return ll="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=sl(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ll.apply(null,arguments)}function sl(t){return sl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sl(t)}function fl(t,e){return fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fl(t,e)}u.Z.registerComponent("TimeTooltip",ol);var pl=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=sl(e),function(t,e){if(e&&("object"==il(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,cl()?Reflect.construct(e,r||[],sl(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fl(t,e)}(e,t),r=e,n=[{key:"setTrack",value:function(t){this.track_=t}},{key:"createEl",value:function(){var t,r,n,o=(t=e,r=this,"function"==typeof(n=ll(sl(1&3?t.prototype:t),"createEl",r))?function(t){return n.apply(r,t)}:n)(["div",{className:"cv-thumbnail-display"}]);return this.img_=u.Z.dom.createEl("img"),o.appendChild(this.img_),o}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(t){var e=t.indexOf("#");if(-1===e)return{src:t,w:0,h:0,x:0,y:0};var r=t.substr(0,e),n=t.substr(e+1);if("xywh="!==n.substr(0,5))return{src:t,w:0,h:0,x:0,y:0};var o=this.getScale(),i=n.substr(5).split(",");return{src:r,w:parseInt(i[2])*o,h:parseInt(i[3])*o,x:parseInt(i[0])*o,y:parseInt(i[1])*o}}},{key:"getScale",value:function(){var t=this.options_.scaleFactor,e=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==e&&(t*=2),t}},{key:"update",value:function(t){var e,r;if(null===(r=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===r?void 0:r.length){for(var n,o=t,i=0;i<this.track_.cues.length;){var a=this.track_.cues[i];if(a.startTime<=o&&a.endTime>=o){n=this.parseImageLink(a.text);break}i++}if(null==n?void 0:n.src){this.enable();var u=n,c=u.src,l=u.w,s=u.h,f=u.x,p=u.y,y=this.getScale();this.img_.src=c,this.img_.style.left=-f+"px",this.img_.style.top=-p+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(y,")"),this.el_.style.width=l+"px",this.el_.style.height=s+"px"}else this.disable()}}}],n&&al(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function yl(t){return yl="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},yl(t)}function hl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vl(n.key),n)}}function vl(t){var e=function(t){if("object"!=yl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=yl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yl(e)?e:e+""}function dl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dl=function(){return!!t})()}function bl(t){return bl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bl(t)}function ml(t,e){return ml=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ml(t,e)}pl.prototype.options_={scaleFactor:1},u.Z.registerComponent("ThumbnailDisplay",pl);var gl=u.Z.getComponent("MouseTimeDisplay"),wl="cv-mouse-time-display-force-show",Ol=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e,r){return e=bl(e),function(t,e){if(e&&("object"==yl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,dl()?Reflect.construct(e,r||[],bl(t).constructor):e.apply(t,r))}(this,e,[t,r]),Y.useTrack(n.player_,"metadata","thumbnails",(function(t){n.getChild("ThumbnailDisplay").setTrack(t)})),n.update=n.update.bind(n),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ml(t,e)}(e,t),r=e,(n=[{key:"update",value:function(t,e){var r=this;this.requestAnimationFrame((function(){var n=r.getChild("TimeTooltip"),o=r.getChild("ThumbnailDisplay"),i=e*r.player_.duration(),a=r.player_.preventScrubbingPlugin(),u=r.player_.controlBar.getChild("progressControl").getChild($i),c=!1;a.isEnabled&&(c=i>a.furthestVisitedTime),c?(r.hide(),u.show(),$(u.hide,1e3,!1,u)()):(r.show(),u&&u.hide(!0),o.update(i),n.updateTime(i));var l=r.el_.getBoundingClientRect();r.el_.style.marginLeft=-l.width/2+"px";var s=t.width*e;s<l.width/2?r.el_.style.left=l.width/2+"px":s>t.width-l.width/2?r.el_.style.left=t.width-l.width/2+"px":r.el_.style.left=t.width*e+"px"}))}},{key:"forceShow",value:function(){this.addClass(wl)}},{key:"removeForceShow",value:function(){this.removeClass(wl)}}])&&hl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(gl);function jl(t){return jl="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},jl(t)}function Pl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Sl(n.key),n)}}function Sl(t){var e=function(t){if("object"!=jl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jl(e)?e:e+""}function _l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_l=function(){return!!t})()}function kl(){return kl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=El(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},kl.apply(null,arguments)}function El(t){return El=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},El(t)}function Cl(t,e){return Cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Cl(t,e)}Ol.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},u.Z.registerComponent("MouseTimeDisplay",Ol);var Tl=u.Z.getComponent("ChaptersTrackMenuItem"),xl=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=El(e),function(t,e){if(e&&("object"==jl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_l()?Reflect.construct(e,r||[],El(t).constructor):e.apply(t,r))}(this,e,[t,r])).nonIconControl=!1,n.thumbnailDisplay=new pl(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),Y.useTrack(n.player_,"metadata","thumbnails",(function(t){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(t),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cl(t,e)}(e,t),r=e,n=[{key:"update",value:function(){this.player_&&Tl.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(t,r,n){return this.nonIconControl=!0,(o=e,i=this,"function"==typeof(a=kl(El(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)(["li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},r),n]);var o,i,a}},{key:"getInnerHTML",value:function(){var t=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat(Yc(this.options_.cue.startTime,t),")</p>")+"</span>"}}],n&&Pl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Tl);function Ll(t){return Ll="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},Ll(t)}function Rl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Bl(n.key),n)}}function Bl(t){var e=function(t){if("object"!=Ll(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ll(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ll(e)?e:e+""}function Il(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Il=function(){return!!t})()}function Dl(t,e,r,n){var o=Ml(Nl(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Ml(){return Ml="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Nl(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ml.apply(null,arguments)}function Nl(t){return Nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nl(t)}function Al(t,e){return Al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Al(t,e)}var Zl=function(t){function e(t,r,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,r){return e=Nl(e),function(t,e){if(e&&("object"==Ll(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Il()?Reflect.construct(e,r||[],Nl(t).constructor):e.apply(t,r))}(this,e,[t,r,n])).alwaysCollapsed=!1,o.isCollapsed=!1,o.isCollabsible=!0,o.update=o.update.bind(o),o.player_.on("cv-whiteboard-change",o.update),o.player_.on("fullscreenchange",o.update),o.player_.on("dispose",(function(){o.player_.off("cv-whiteboard-change",o.update),o.player_.off("fullscreenchange",o.update)})),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Al(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Dl(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Dl(e,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var r=0,n=e.length;r<n;r++){var o=e[r],i=new xl(this.player_,{track:this.track_,cue:o});t.push(i)}return t}},{key:"setTrack",value:function(t){var r=this;if(Dl(e,"setTrack",this,3)([t]),this.track_&&"chapters"===this.track_.kind){t.one("loadeddata",this.update);var n=function(){r.update(),r.player_.trigger("resizemenus")};t.on("cv:cuechange",n),this.player_.one("dispose",(function(){return t.off("cv:cueupdate",n)}))}}},{key:"update",value:function(t){Dl(e,"update",this,3)([t])}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var t=this.track_.activeCues[0];return(null==t?void 0:t.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var t=this.track_.cues;return!(!t||!t.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&Rl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("ChaptersButton"));function Fl(t){return Fl="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},Fl(t)}function zl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gl(n.key),n)}}function Gl(t){var e=function(t){if("object"!=Fl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Fl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fl(e)?e:e+""}function Vl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vl=function(){return!!t})()}function Ul(){return Ul="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Hl(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ul.apply(null,arguments)}function Hl(t){return Hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hl(t)}function ql(t,e){return ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ql(t,e)}u.Z.registerComponent("ChaptersButton",Zl);var Wl=u.Z.getComponent("OffTextTrackMenuItem"),Ql=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Hl(e),function(t,e){if(e&&("object"==Fl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vl()?Reflect.construct(e,r||[],Hl(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ql(t,e)}(e,t),r=e,n=[{key:"handleClick",value:function(t){Wl.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(t,r,n){return(o=e,i=this,"function"==typeof(a=Ul(Hl(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)(["li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},r),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n]);var o,i,a}}],n&&zl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Wl);function Kl(t){return Kl="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},Kl(t)}function Yl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$l(n.key),n)}}function $l(t){var e=function(t){if("object"!=Kl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Kl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kl(e)?e:e+""}function Xl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xl=function(){return!!t})()}function Jl(t){return Jl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jl(t)}function ts(t,e){return ts=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ts(t,e)}u.Z.registerComponent("OffTextTrackMenuItem",Ql);var es=u.Z.getComponent("TextTrackButton"),rs=u.Z.getComponent("TextTrackMenuItem"),ns=u.Z.getComponent("OffTextTrackMenuItem"),os=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Jl(e),function(t,e){if(e&&("object"==Kl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Xl()?Reflect.construct(e,r||[],Jl(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ts(t,e)}(e,t),r=e,n=[{key:"createItems",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:rs;this.label_&&(t="".concat(this.label_," off")),e.push(new ns(this.player_,{kinds:this.kinds_,kind:this.kind_,label:t})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o<n.length;o++){var i=n[o];if(this.kinds_.indexOf(i.kind)>-1){var a=new r(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(i.kind,"-menu-item")),e.push(a)}}return this.player().trigger("resizemenus"),e}}],n&&Yl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(es);function is(t){return is="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},is(t)}function as(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,us(n.key),n)}}function us(t){var e=function(t){if("object"!=is(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=is(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==is(e)?e:e+""}function cs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(cs=function(){return!!t})()}function ls(t){return ls=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ls(t)}function ss(t,e){return ss=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ss(t,e)}u.Z.registerComponent("TextTrackButton",os);var fs=u.Z.getComponent("SubsCapsMenuItem"),ps=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ls(e),function(t,e){if(e&&("object"==is(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,cs()?Reflect.construct(e,r||[],ls(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ss(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(t){fs.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}}])&&as(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(fs);function ys(t){return ys="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},ys(t)}function hs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vs(n.key),n)}}function vs(t){var e=function(t){if("object"!=ys(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ys(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ys(e)?e:e+""}function ds(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ds=function(){return!!t})()}function bs(t){return bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bs(t)}function ms(t,e){return ms=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ms(t,e)}var gs=function(t){function e(t){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n={};n.track={player:t,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(r=function(t,e,r){return e=bs(e),function(t,e){if(e&&("object"==ys(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ds()?Reflect.construct(e,r||[],bs(t).constructor):e.apply(t,r))}(this,e,[t,n])).addClass("vjs-texttrack-settings"),r.addClass("cv-subtitle-search-menu-item"),r.controlText(", opens subtitle search"),r.toggleEnabled=r.toggleEnabled.bind(r);var o=r.player_.textTracks();return o.addEventListener("selectedlanguagechange",r.toggleEnabled),r.player_.one("dispose",(function(){o.removeEventListener("selectedlanguagechange",r.toggleEnabled)})),r.toggleEnabled(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ms(t,e)}(e,t),r=e,(n=[{key:"toggleEnabled",value:function(){var t;if(this.player_){var e=Y.getCurrentTextTrack(this.player_);e?(null===(t=e.cues)||void 0===t?void 0:t.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(e),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.toggleEnabled),t.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.toggleEnabled)}))}},{key:"handleClick",value:function(){var t,e=this,r=Y.getCurrentTextTrack(this.player_);(null===(t=null==r?void 0:r.cues)||void 0===t?void 0:t.length)&&this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&hs(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("TextTrackMenuItem"));function ws(t){return ws="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},ws(t)}function Os(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,js(n.key),n)}}function js(t){var e=function(t){if("object"!=ws(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ws(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ws(e)?e:e+""}function Ps(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ps=function(){return!!t})()}function Ss(t){return Ss=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ss(t)}function _s(t,e){return _s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_s(t,e)}var ks=function(t){function e(t){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n={};return n.track={player:t,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(r=function(t,e,r){return e=Ss(e),function(t,e){if(e&&("object"==ws(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ps()?Reflect.construct(e,r||[],Ss(t).constructor):e.apply(t,r))}(this,e,[t,n])).addClass("vjs-texttrack-settings"),r.addClass("cv-divider-after-menu-item"),r.addClass("cv-subtitle-size-menu-item"),r.controlText(", opens subtitle size settings"),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_s(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(){var t=this;this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&Os(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("TextTrackMenuItem"));function Es(t){return Es="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},Es(t)}function Cs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ts(n.key),n)}}function Ts(t){var e=function(t){if("object"!=Es(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Es(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Es(e)?e:e+""}function xs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xs=function(){return!!t})()}function Ls(){return Ls="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Rs(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ls.apply(null,arguments)}function Rs(t){return Rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rs(t)}function Bs(t,e){return Bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bs(t,e)}var Is=u.Z.getComponent("TextTrackButton"),Ds=u.Z.getComponent("SubsCapsButton"),Ms=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=Rs(e),function(t,e){if(e&&("object"==Es(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xs()?Reflect.construct(e,r||[],Rs(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t.className="cv-subs-caps-menu-button",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bs(t,e)}(e,t),r=e,n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=Ls(Rs(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"createItems",value:function(){var t=[];return this.player_.options_.mobile||(t.push(new gs(this.player_)),t.push(new ks(this.player_)),this.hideThreshold_=this.hideThreshold_+2),Is.prototype.createItems.call(this,t,ps)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var r=t[e];if(this.kinds_.indexOf(r.kind)>-1&&"showing"===r.mode)return r.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var r=t[e];if(this.kinds_.indexOf(r.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Ds.prototype.handleClick.apply(this)}}],n&&Cs(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Ds);function Ns(t){return Ns="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},Ns(t)}function As(){As=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Ns(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ns(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Zs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Fs(n.key),n)}}function Fs(t){var e=function(t){if("object"!=Ns(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ns(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ns(e)?e:e+""}function zs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zs=function(){return!!t})()}function Gs(t){return Gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gs(t)}function Vs(t,e){return Vs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vs(t,e)}u.Z.registerComponent("SubsCapsButton",Ms);var Us="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Bn,"</span>"),Hs=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Gs(e),function(t,e){if(e&&("object"==Ns(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,zs()?Reflect.construct(e,r||[],Gs(t).constructor):e.apply(t,r))}(this,e,[t,r])).qualityId=r.qualityId;var o=t.qualityLevels(),i=n.handleQualityChange.bind(n);return o.on("change",i),t.one("dispose",(function(){o.off("change",i)})),n.handleLocalCacheChange=n.handleLocalCacheChange.bind(n),n.player_.ready((function(){n.player_&&(n.player_.on("localcachechanged",n.handleLocalCacheChange),n.player_.one("dispose",(function(){var t;null===(t=n.player_)||void 0===t||t.off("localcachechanged",n.handleLocalCacheChange)})),n.handleLocalCacheChange())})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vs(t,e)}(e,t),r=e,(n=[{key:"handleLocalCacheChange",value:function(){return t=this,e=void 0,r=void 0,n=As().mark((function t(){var e,r;return As().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player_.localCache(),t.next=3,e.getActiveLocalCache();case 3:if(null==(r=t.sent)?void 0:r.playbackProfile){t.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),t.abrupt("return");case 9:r.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Us);case 10:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var t=this.player_.qualityLevels(),e=0;e<t.length;e++){var r=t[e];r.enabled=r.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var t=this.player_.qualityLevels(),e=t[t.selectedIndex],r=e&&e.id===this.qualityId;r!==this.isSelected_&&this.selected(r)}}}])&&Zs(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("MenuItem"));function qs(t){return qs="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},qs(t)}function Ws(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Qs(n.key),n)}}function Qs(t){var e=function(t){if("object"!=qs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=qs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qs(e)?e:e+""}function Ks(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ks=function(){return!!t})()}function Ys(t,e,r,n){var o=$s(Xs(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function $s(){return $s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Xs(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},$s.apply(null,arguments)}function Xs(t){return Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xs(t)}function Js(t,e){return Js=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Js(t,e)}var tf={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},ef=u.Z.getComponent("MenuButton"),rf=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Xs(e),function(t,e){if(e&&("object"==qs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ks()?Reflect.construct(e,r||[],Xs(t).constructor):e.apply(t,r))}(this,e,[t,r])).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0,n.className="cv-quality-menu-button";var o=n.player_.qualityLevels(),i=n.update.bind(n);return o.on("addqualitylevel",i),o.on("removequalitylevel",i),t.one("dispose",(function(){o.removeEventListener("addqualitylevel",i),o.removeEventListener("removequalitylevel",i)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Js(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Ys(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Ys(e,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var t=[],e=this.player_.qualityLevels();t.push(new T(this.player_,{label:"Quality"}));for(var r=0;r<e.length;r++){var n=e[r];if(n){var o=tf[n.id];o&&t.push(new Hs(this.player_,{qualityId:n.id,label:o,selectable:!0,multiSelectable:!1}))}}return t}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.qualityLevels(),e=t[t.selectedIndex];return e?tf[e.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){ef.prototype.handleClick.apply(this)}}])&&Ws(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(ef);function nf(t){return nf="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},nf(t)}function of(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,af(n.key),n)}}function af(t){var e=function(t){if("object"!=nf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=nf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==nf(e)?e:e+""}function uf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(uf=function(){return!!t})()}function cf(){return cf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=lf(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},cf.apply(null,arguments)}function lf(t){return lf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lf(t)}function sf(t,e){return sf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},sf(t,e)}u.Z.registerComponent("QualityButton",rf);var ff=u.Z.getComponent("Menu"),pf=u.Z.getComponent("MenuButton"),yf=u.Z.getComponent("PlaybackRateMenuItem"),hf=u.Z.getComponent("PlaybackRateMenuButton"),vf=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=lf(e),function(t,e){if(e&&("object"==nf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,uf()?Reflect.construct(e,r||[],lf(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t.className="cv-playback-rate-menu-button",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sf(t,e)}(e,t),r=e,n=[{key:"createEl",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=pf.prototype.createEl).apply.apply(t,[this].concat(r))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=cf(lf(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"createMenu",value:function(){var t=new ff(this.player(),{menuButton:this});t.addItem(new T(this.player_,{label:"Playback Speed"}));var e=this.playbackRates();if(e)for(var r=0;r<e.length;r++){var n=e[r]+"x";1===e[r]&&(n+=" (Normal)"),t.addItem(new yf(this.player(),{rate:n}))}return t}},{key:"handleClick",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=pf.prototype.handleClick).apply.apply(t,[this].concat(r))}},{key:"updateLabel",value:function(){var t;this.setupLabelEl();for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=hf.prototype.updateLabel).apply.apply(t,[this].concat(r))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var t=this.$("button");t&&(this.labelEl_=u.Z.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}],n&&of(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(hf);function df(t){return df="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},df(t)}function bf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mf(n.key),n)}}function mf(t){var e=function(t){if("object"!=df(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=df(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==df(e)?e:e+""}function gf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gf=function(){return!!t})()}function wf(t){return wf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wf(t)}function Of(t,e){return Of=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Of(t,e)}u.Z.registerComponent("PlaybackRateMenuButton",vf);var jf=u.Z.getComponent("TextTrackSettings"),Pf={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Sf={small:Pf,medium:Object.assign(Object.assign({},Pf),{fontPercent:1.5}),large:Object.assign(Object.assign({},Pf),{fontPercent:2})},_f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=wf(e),function(t,e){if(e&&("object"==df(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gf()?Reflect.construct(e,r||[],wf(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Of(t,e)}(e,t),r=e,(n=[{key:"setSizeSetting",value:function(t){var e=this;this.size_=t,this.player_.getChild("textTrackDisplay").updateDisplay();var r=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame((function(){r.update(),e.player_.trigger("resizemenus")}))}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return Sf[this.size_]?Sf[this.size_]:Pf}}])&&bf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(jf);function kf(t){return kf="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},kf(t)}function Ef(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Cf(n.key),n)}}function Cf(t){var e=function(t){if("object"!=kf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=kf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kf(e)?e:e+""}function Tf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tf=function(){return!!t})()}function xf(t,e,r,n){var o=Lf(Rf(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Lf(){return Lf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Rf(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Lf.apply(null,arguments)}function Rf(t){return Rf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rf(t)}function Bf(t,e){return Bf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bf(t,e)}u.Z.registerComponent("TextTrackSettings",_f);var If=window.navigator&&window.navigator.userAgent||"",Df=(/iPod/i.test(If),/Android/i.test(If),u.Z.getComponent("Player")),Mf=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Rf(e),function(t,e){if(e&&("object"==kf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Tf()?Reflect.construct(e,r||[],Rf(t).constructor):e.apply(t,r))}(this,e,[t,r]))._dataLoaded=!1,r.mobile&&n.addClass("cv-mobile-player");var o=function(){return n._dataLoaded=!0};return n.on("cv-playback-data-loaded",o),n.on("dispose",(function(){return n.off("cv-playback-data-loaded",o)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bf(t,e)}(e,t),r=e,(n=[{key:"dataLoaded",value:function(t){var e=this;this._dataLoaded?t():(this.one("cv-playback-data-loaded",t),this.one("dispose",(function(){e.off("cv-playback-data-loaded",t)})))}},{key:"lock",value:function(t){this.callback_=t}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(t,r){var n=this;if("number"!=typeof t||!this.callback_||r)return xf(e,"currentTime",this,3)([t]);this.callback_((function(){n.unlock(),n.currentTime(t)}))}},{key:"play",value:function(){var t=this;if(!this.callback_)return xf(e,"play",this,3)([]);this.callback_((function(){t.unlock(),t.play()}))}},{key:"updateStyleEl_",value:function(){if(Df.prototype.updateStyleEl_.call(this),this.options_.fluid){var t=this.el_.parentNode;if(t&&this.options_.setMaxHeight){var e=this.aspectRatio();if(void 0!==e&&"auto"!==e||(e=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9"),this.player_.playerModePlugin().getMode()===Ia.Hover)return t.style.removeProperty("maxWidth"),void t.style.removeProperty("margin");var r=e.split(":"),n=+r[1]/+r[0];t.style.maxWidth=85/n+"vh",t.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var t=this;Df.prototype.listenForUserActivity_.call(this);var e=this.getChild("collapserator");e.on("mouseenter",(function(){t.player().cache_.inactivityTimeout=t.player().options_.inactivityTimeout,t.player().options_.inactivityTimeout=0})),e.on("mouseleave",(function(){t.player().options_.inactivityTimeout=t.player().cache_.inactivityTimeout}))}}])&&Ef(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Df);function Nf(t){return Nf="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},Nf(t)}function Af(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zf(n.key),n)}}function Zf(t){var e=function(t){if("object"!=Nf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Nf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Nf(e)?e:e+""}function Ff(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ff=function(){return!!t})()}function zf(t){return zf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zf(t)}function Gf(t,e){return Gf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gf(t,e)}Mf.prototype.options_=Object.assign(Object.assign({},Df.prototype.options_),{setMaxHeight:!0}),u.Z.registerComponent("player",Mf);var Vf=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=zf(e),function(t,e){if(e&&("object"==Nf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ff()?Reflect.construct(e,r||[],zf(t).constructor):e.apply(t,r))}(this,e,[t,r])).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(n),n.player_.one("play",n.onFirstPlay),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gf(t,e)}(e,t),r=e,(n=[{key:"dispose",value:function(){this.player_.off("play",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var t=this;window.setTimeout((function(){t.player_.isDisposed()||t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Af(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function Uf(t){return Uf="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},Uf(t)}function Hf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qf(n.key),n)}}function qf(t){var e=function(t){if("object"!=Uf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Uf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Uf(e)?e:e+""}function Wf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Wf=function(){return!!t})()}function Qf(t){return Qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qf(t)}function Kf(t,e){return Kf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kf(t,e)}u.Z.registerComponent("PlayPauseFeedback",Vf);var Yf=u.Z.getComponent("PlayToggle"),$f=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Qf(e),function(t,e){if(e&&("object"==Uf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Wf()?Reflect.construct(e,r||[],Qf(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kf(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(t){var e=this;Yf.prototype.handleClick.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&Hf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Yf);function Xf(t){return Xf="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},Xf(t)}function Jf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,tp(n.key),n)}}function tp(t){var e=function(t){if("object"!=Xf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Xf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xf(e)?e:e+""}function ep(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ep=function(){return!!t})()}function rp(t){return rp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rp(t)}function np(t,e){return np=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},np(t,e)}u.Z.registerComponent("PlayToggle",$f);var op=u.Z.getComponent("TextTrackDisplay"),ip=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=rp(e),function(t,e){if(e&&("object"==Xf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ep()?Reflect.construct(e,r||[],rp(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&np(t,e)}(e,t),r=e,(n=[{key:"updateDisplayState",value:function(t){op.prototype.updateDisplayState.call(this,t);for(var e=this.player_.textTrackSettings.getValues(),r=t.activeCues,n=r.length;n--;){var o=r[n];if(o){var i=o.displayState;if(e.fontPercent&&1!==e.fontPercent){var a=.025*this.el().getBoundingClientRect().width*100/100;i.style.fontSize=a*e.fontPercent+"px"}}}}}])&&Jf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(op);function ap(t){return ap="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},ap(t)}function up(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,cp(n.key),n)}}function cp(t){var e=function(t){if("object"!=ap(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ap(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ap(e)?e:e+""}function lp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(lp=function(){return!!t})()}function sp(t){return sp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sp(t)}function fp(t,e){return fp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fp(t,e)}u.Z.registerComponent("TextTrackDisplay",ip);var pp=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=sp(e),function(t,e){if(e&&("object"==ap(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,lp()?Reflect.construct(e,r||[],sp(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fp(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"cv-control-bar-gradient-container",innerHTML:'<div class="cv-control-bar-gradient"></div>'})}}])&&up(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function yp(t){return yp="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},yp(t)}function hp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vp(n.key),n)}}function vp(t){var e=function(t){if("object"!=yp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=yp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yp(e)?e:e+""}function dp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dp=function(){return!!t})()}function bp(t,e,r,n){var o=mp(gp(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function mp(){return mp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=gp(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},mp.apply(null,arguments)}function gp(t){return gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gp(t)}function wp(t,e){return wp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wp(t,e)}u.Z.registerComponent("ControlBarGradient",pp);var Op=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=gp(e),function(t,e){if(e&&("object"==yp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,dp()?Reflect.construct(e,r||[],gp(t).constructor):e.apply(t,r))}(this,e,[t,r])).options_=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wp(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){var t=this.options_.title;if(!this.options_.seriesName)return bp(e,"createEl",this,3)(["h1",{innerHTML:t}]);var r=this.buildSeasonEpisodeString();return r?(t="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase()," ").concat(r,"</div>")+t,bp(e,"createEl",this,3)(["h1",{innerHTML:t}])):(t="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+t,bp(e,"createEl",this,3)(["h1",{innerHTML:t}]))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var t=this.padNumber(this.options_.seasonNumber,2),e=this.padNumber(this.options_.episodeNumber,2);return"S".concat(t," • E").concat(e)}},{key:"padNumber",value:function(t,e){var r=t.toString();if(r.length>=e)return r;for(e-=r.length;e>0;)r="0"+r,e--;return r}}])&&hp(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function jp(t){return jp="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},jp(t)}function Pp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Sp(n.key),n)}}function Sp(t){var e=function(t){if("object"!=jp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jp(e)?e:e+""}function _p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_p=function(){return!!t})()}function kp(){return kp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ep(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},kp.apply(null,arguments)}function Ep(t){return Ep=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ep(t)}function Cp(t,e){return Cp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Cp(t,e)}var Tp=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ep(e),function(t,e){if(e&&("object"==jp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_p()?Reflect.construct(e,r||[],Ep(t).constructor):e.apply(t,r))}(this,e,[t,r])).options_=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cp(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-splash-rating ".concat((t=this.options_.ratingValue)?function(t){switch(!0){case t<32:return"cv-rating-purple";case t<48:return"cv-rating-green";case t<80:return"cv-rating-blue";case t<96:return"cv-rating-red";case t<128:return"cv-rating-pink";case t>=128:return"cv-rating-yellow";default:return""}}(t):"");var t}},{key:"createEl",value:function(t,r,n){return this.options_.ratingCode?(o=e,i=this,"function"==typeof(a=kp(Ep(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass(),innerHTML:this.options_.ratingCode}),n]):null;var o,i,a}}],n&&Pp(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function xp(t){return xp="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},xp(t)}function Lp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Rp(n.key),n)}}function Rp(t){var e=function(t){if("object"!=xp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=xp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xp(e)?e:e+""}function Bp(t,e){if(e&&("object"==xp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ip(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ip=function(){return!!t})()}function Dp(t){return Dp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Dp(t)}function Mp(t,e){return Mp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Mp(t,e)}var Np=function(t){function e(t,r){var n,o,i,a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o=this,a=[t,r],i=Dp(i=e),n=Bp(o,Ip()?Reflect.construct(i,a||[],Dp(o).constructor):i.apply(o,a)),r.embed?(n.addChild(new Op(t,r)),n.addChild(new Tp(t,r)),n):Bp(n,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mp(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){return u.Z.dom.createEl("div",{className:"cv-splash-metadata"})}}])&&Lp(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function Ap(t){return Ap="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},Ap(t)}function Zp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Fp(n.key),n)}}function Fp(t){var e=function(t){if("object"!=Ap(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ap(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ap(e)?e:e+""}function zp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(zp=function(){return!!t})()}function Gp(t){return Gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gp(t)}function Vp(t,e){return Vp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vp(t,e)}var Up=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Gp(e),function(t,e){if(e&&("object"==Ap(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,zp()?Reflect.construct(e,r||[],Gp(t).constructor):e.apply(t,r))}(this,e,[t,r])).addChild(new Np(t,r)),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vp(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){var t="<div class='cv-splash-mask'></div>";return this.options_.embed&&(t+="<div class='cv-splash-logo'>".concat(wr,"</div>")),u.Z.dom.createEl("div",{className:"vjs-poster cv-embed-splash cv-embed-splash-black",tabIndex:-1,innerHTML:t})}},{key:"setSrc",value:function(t){var e="";t&&(e='url("'.concat(t,'")')),this.el_.style.backgroundImage=e}}])&&Zp(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("posterImage"));function Hp(t){return Hp="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},Hp(t)}function qp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Wp(n.key),n)}}function Wp(t){var e=function(t){if("object"!=Hp(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Hp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hp(e)?e:e+""}function Qp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Qp=function(){return!!t})()}function Kp(t){return Kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kp(t)}function Yp(t,e){return Yp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yp(t,e)}u.Z.registerComponent("posterImage",Up);var $p=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Kp(e),function(t,e){if(e&&("object"==Hp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Qp()?Reflect.construct(e,r||[],Kp(t).constructor):e.apply(t,r))}(this,e,[t,r])).el().prepend(n.getErrorImage()),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yp(t,e)}(e,t),r=e,(n=[{key:"getErrorImage",value:function(){return u.Z.dom.createEl("div",{className:"cv-error-image",innerHTML:'\n <svg viewBox="0 0 301 185" xmlns="http://www.w3.org/2000/svg">\n <path d="M267.393 36.6514V167.906C267.393 168.182 267.169 168.406 266.893 168.406H32C31.7239 168.406 31.5 168.182 31.5 167.906V36.6514C31.5 36.3752 31.7239 36.1514 32 36.1514H80.5C80.7761 36.1514 81 36.3752 81 36.6514V57.7196C81 58.7622 82.0375 59.4868 83.0164 59.1279L95.7377 54.4634C95.9961 54.3687 96.2825 54.5006 96.3785 54.7585L102.094 70.1194C102.677 71.6866 105 71.2685 105 69.5964V48.4925C105 47.7632 104.475 47.1396 103.757 47.0146L94.2479 45.3609C93.9436 45.308 93.7596 44.9946 93.8616 44.7031L96.7376 36.4862C96.8077 36.2856 96.997 36.1514 97.2095 36.1514H266.893C267.169 36.1514 267.393 36.3752 267.393 36.6514Z" stroke="white"/>\n <path d="M163.296 101.777L149.437 90.1217C148.275 89.1441 146.5 89.9705 146.5 91.4894V113.664C146.5 115.141 148.191 115.98 149.367 115.087L163.226 104.569C164.139 103.876 164.173 102.515 163.296 101.777Z" stroke="white" stroke-linecap="round"/>\n <path d="M295.53 23.0783L277.524 26.2801L283.252 32.7192L274.855 38.9079L292.861 35.7061L287.133 29.2671L295.53 23.0783Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M268.06 2.91764L254.192 14.8403L262.401 17.4661L258.324 27.0679L272.192 15.1453L263.983 12.5194L268.06 2.91764Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n '})}}])&&qp(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("ErrorDisplay"));u.Z.registerComponent("ErrorDisplay",$p);var Xp=r(67453),Jp=r(54610);function ty(t){return ty="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},ty(t)}function ey(){ey=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==ty(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ty(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function ry(t){return function(t){if(Array.isArray(t))return ny(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ny(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ny(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ny(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function oy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,iy(n.key),n)}}function iy(t){var e=function(t){if("object"!=ty(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ty(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ty(e)?e:e+""}var ay,uy=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},cy=u.Z.getComponent("Player"),ly=function(){return t=function t(e,r){var n=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.streamLogged=!1,this.options=u.Z.obj.merge({},t.options_,r),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(e),this.buildVideoJs(),this.options.splash&&this.setupSplash(this.options.splash),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready((function(){n._configurePlugins(),n.options.setup&&n.options.setup(n.options,n.player),n.fetch().catch((function(t){return n.handleFetchError(t)}))}))},(e=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.configureMenuDimensionsPlugin({mobile:this.options.mobile,overflowControls:this.options.overflowControls,seekBarName:this.getSeekBarName()}),this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),!this.options.mobile&&this.options.allowFullscreen&&this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(t){var e;null===(e=this.analyticsService)||void 0===e||e.logVideoProgress(t)}},{key:"buildVideoJs",value:function(){return this.player=(0,u.Z)(this.el,this.getPlayerOptions())}},{key:"getInactivityTimeout",value:function(){if("number"==typeof this.options.inactivityTimeout)return this.options.inactivityTimeout;var t=500;return(this.options.mobile||u.Z.browser.IS_IOS||u.Z.browser.IS_ANDROID)&&(t=3e3),t}},{key:"getPlayerOptions",value:function(){var t=this,e=cy.prototype.options_.children;return e=e.filter((function(t){return"bigPlayButton"!==t&&"posterImage"!==t})),{controls:this.options.controls,fluid:!this.options.embed&&!this.options.mobile,fill:this.options.embed||this.options.mobile,inactivityTimeout:this.getInactivityTimeout(),controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(ry(e),[{name:"collapserator",children:re.filter((function(e){return!("fullscreenToggle"===e&&!t.options.allowFullscreen)}))},"playPauseFeedback","controlBarGradient"]),userActions:{hotkeys:function(e){return function(t,e,r){var n=_e()(t);("f"!==n||r.allowFullscreen)&&Re[n]&&(["space"].includes(n)&&(t.preventDefault(),t.stopPropagation()),Re[n](e,t))}(e,t.player,t.options)}},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,deferMenus:this.options.deferMenus,muted:this.options.muted,devicesConfig:this.options.devicesConfig}}},{key:"getPlaybackObject",value:function(){return uy(this,void 0,void 0,ey().mark((function t(){var e,r,n=this;return ey().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.offlinePlaybackObject){t.next=2;break}return t.abrupt("return",this.options.offlinePlaybackObject);case 2:if(e=this.options.fetch,void 0===this.options.fetch&&(e=function(t){var e="".concat(n.options.playerApi.origin,"/api/playback?viewKey=").concat(t);return Pe.get(e)}),this.options.viewKey){t.next=6;break}throw new Error("Please specify a viewKey or a fetch function");case 6:return t.next=8,e(this.options.viewKey);case 8:if(r=t.sent){t.next=11;break}throw new Error("Error fetching playback object");case 11:return t.abrupt("return",r);case 12:case"end":return t.stop()}}),t,this)})))}},{key:"setChaptersInternal",value:function(t,e){var r=Y.getTrack(this.player,"chapters",null);r||(r=this.player.addTextTrack("chapters")),ry(r.cues.cues_).forEach((function(t){return r.removeCue(t)})),t.forEach((function(t){r.addCue({startTime:t.timestamp,endTime:t.endTimestamp,text:t.name})})),e&&r.trigger({type:"cv:cuechange",target:r}),r.trigger({type:"loadeddata",target:r})}},{key:"setChapters",value:function(t){this.setChaptersInternal(t,!0)}},{key:"setPlayerMode",value:function(t,e){this.player.playerModePlugin().setPlayerMode(t,e)}},{key:"setFavourite",value:function(t,e){this.player.favouritePlugin().setFavourite(t,e)}},{key:"fetch",value:function(){var t,e,r,n,o;return uy(this,void 0,void 0,ey().mark((function i(){var a,u,c,l=this;return ey().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.getPlaybackObject();case 2:if(a=i.sent,!this.isDisposed()){i.next=5;break}return i.abrupt("return");case 5:u="MasterClip"===a.mediaType,c=null===(t=a.additionalData)||void 0===t?void 0:t.clipData,(null===(r=null===(e=a.chapters)||void 0===e?void 0:e.list)||void 0===r?void 0:r.length)>0&&!u&&!c&&this.setChaptersInternal(a.chapters.list,!1),this.player.localCache({localCacheAddresses:null!==(n=a.localCacheAddresses)&&void 0!==n?n:[],enabled:null===(o=this.options.enableLocalCache)||void 0===o||o}),this.player.progressiveFiles({sources:a.files.progressive.map((function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}}))}),this.player.handleNetworkErrors({playerApi:this.options.playerApi,fileToken:a.files.fileToken}),a.subtitles.list.length>0&&a.subtitles.list.forEach((function(t){if("text/vtt"===t.mimeType){var e=l.player.addRemoteTextTrack({kind:"subtitles",src:t.url,language:t.language,label:t.label},!0);Y.sanitizeTrack(e.track,l.player)}})),a.posterUrl&&this.player.poster(Xp.j.createUrl(a.posterUrl,{size:Jp.h2.Large})),this.setupSplash({title:a.title,posterUrl:a.posterUrl,episodeNumber:a.episodeNumber,ratingCode:a.ratingCode,seasonNumber:a.seasonNumber,seriesName:a.seriesName}),this.additionalSetup(a),this.handleAutoplay(a),this.options.startTime&&(this.player.currentTime(this.options.startTime),this.player.one("canplay",(function(){l.player.currentTime(l.options.startTime)}))),this.player.trigger("cv-playback-data-loaded",a);case 18:case"end":return i.stop()}}),i,this)})))}},{key:"handleFetchError",value:function(t){var e,r=t.message;t instanceof be&&(null===(e=t.response)||void 0===e?void 0:e.type)===Le.PhysicallyChapteredVideo&&(r="Video cannot be played because it is either corrupt or damaged."),this.player.error(r),this.options.onError&&this.options.onError(t)}},{key:"fetchConfig",value:function(){return uy(this,void 0,void 0,ey().mark((function t(){var e;return ey().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(ay||this.options.fetch||this.options.offlinePlaybackObject)){t.next=2;break}return t.abrupt("return");case 2:return e="".concat(this.options.playerApi.origin,"/api/config"),t.next=5,Pe.get(e);case 5:if(ay=t.sent,!this.isDisposed()){t.next=8;break}return t.abrupt("return");case 8:this.trigger("config:loaded");case 9:case"end":return t.stop()}}),t,this)})))}},{key:"additionalSetup",value:function(t){var e,r=this;this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var n=this.options.enableLocalCache&&!!(null===(e=t.localCacheAddresses)||void 0===e?void 0:e.length);ay?this.setupAnalyticsService(t,n):this.one("config:loaded",(function(){return r.setupAnalyticsService(t,n)})),this.analyticsService||!this.isAnalyticsEnabled()?this.setupAnalyticsDependentPlugins(t):this.one("analytics:loaded",(function(){return r.setupAnalyticsDependentPlugins(t)}))}},{key:"setupAnalyticsService",value:function(t,e){this.options.eventLogging&&(this.analyticsService=new fe({collectionApiUrls:ay.collectionApi.urls,collectionApiClientId:ay.collectionApi.clientId,productVersion:"1.30.0-rc.2",videoId:t.videoId,mediaId:t.mediaId,userId:t.viewerId,shareId:t.shareId,customerId:t.viewerCustomerId,mediaType:t.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:e,additionalAnalyticsData:this.getAdditionalAnalyticsData(t),regionName:t.instanceRegion||this.options.sharerInstanceRegion||Be.M.CvApSoutheast1}),this.on("timeupdate",this.logStream),this.trigger("analytics:loaded"))}},{key:"setupAnalyticsDependentPlugins",value:function(t){var e,r,n,o;this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(e=t.settings)||void 0===e?void 0:e.showSubtitles,subtitleSize:null===(r=t.settings)||void 0===r?void 0:r.playbackSubtitleSizeDefault,analyticsService:this.analyticsService}),this.player.persistQualitySettingsPlugin({playbackProfile:null===(n=t.settings)||void 0===n?void 0:n.playbackProfile,playbackProfileLocalCache:null===(o=t.settings)||void 0===o?void 0:o.playbackProfileLocalCache,analyticsService:this.analyticsService}),this.player.persistPlaybackRatePlugin({analyticsService:this.analyticsService})}},{key:"getAdditionalAnalyticsData",value:function(t){return{}}},{key:"isAnalyticsEnabled",value:function(){return!this.options.fetch&&!this.options.offlinePlaybackObject&&this.options.eventLogging}},{key:"handleAutoplay",value:function(t){var e=this;this.options.autoplay&&this.player.ready((function(){e.player.play().catch((function(){e.isDisposed()||e.showSplash()}))}))}},{key:"logStream",value:function(){this.analyticsService&&(this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream)))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(t){var e;"string"==typeof t?(t=function(t){return 0===t.indexOf("#")?t.slice(1):t}(t),e=u.Z.dom.$("#"+t)):e=t;var r="video-js";return this.getPlayerClassName()&&(r+=" ".concat(this.getPlayerClassName())),this.el=u.Z.dom.createEl("video",{},{class:r}),e.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(t,e){this.player.on(t,e)}},{key:"one",value:function(t,e){this.player.one(t,e)}},{key:"off",value:function(t,e){this.player.off(t,e)}},{key:"trigger",value:function(t,e){return this.player.trigger(t,e)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(t){this.player.ready(t)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(t){return this.player.currentTime(t)}},{key:"muted",value:function(t){return this.player.muted(t)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(t){return this.player.playbackRate(t)}},{key:"quality",value:function(t){for(var e=this.player.qualityLevels(),r=0;r<e.length;r++){var n=e[r];if(t)n.enabled=n.id===t.toString();else if(n.enabled)return n.id}}},{key:"subtitles",value:function(t){for(var e=this.player.textTracks(),r=0;r<e.length;r++){var n=e[r];if(void 0===t){if("showing"===n.mode)return n.label}else n.label===t?n.mode="showing":n.mode="disabled"}}},{key:"bindEventListeners",value:function(){var t=this,e=function(t){return t.preventDefault()};if(this.showSplash=this.showSplash.bind(this),this.hideSplash=this.hideSplash.bind(this),this.player.on("ended",this.showSplash),this.player.on("play",this.hideSplash),this.player.tech(!0).on("contextmenu",e),this.player.one("dispose",(function(){t.off("ended",t.showSplash),t.off("play",t.hideSplash),t.player.tech(!0).off("contextmenu",e)})),this.options.hotkeyElQuerySelector){var r=u.Z.dom.$(this.options.hotkeyElQuerySelector);r&&(this.player.on(r,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){t.player.off(r,"keydown",t.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var t=this.getSeekBarName(),e=this.player.controlBar.getChild("progressControl");e.addChild(t,this.getSeekBarOptions()),e.setSeekBarName(t)}},{key:"setupSplash",value:function(t){this._splashAdded||(this._splashAdded=!0,this.player.addChild("posterImage",Object.assign({embed:this.options.embed},t)),this.player.addChild("bigPlayButton"),this.options.autoplay?this.hideSplash():this.showSplash())}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show(),this.player.getChild("bigPlayButton").show()}},{key:"hideSplash",value:function(){this.player.getChild("posterImage").hide(),this.player.getChild("bigPlayButton").hide()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}}])&&oy(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();ly.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0,eventLogging:!0,allowFullscreen:!0};function sy(t){return sy="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},sy(t)}function fy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,py(n.key),n)}}function py(t){var e=function(t){if("object"!=sy(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=sy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==sy(e)?e:e+""}function yy(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yy=function(){return!!t})()}function hy(){return hy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=vy(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},hy.apply(null,arguments)}function vy(t){return vy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vy(t)}function dy(t,e){return dy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dy(t,e)}var by=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=vy(e),function(t,e){if(e&&("object"==sy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,yy()?Reflect.construct(e,r||[],vy(t).constructor):e.apply(t,r))}(this,e,[t,r])).overlayVisible=r.overlayVisible,n.toggle(n.overlayVisible),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dy(t,e)}(e,t),r=e,n=[{key:"handleToggle",value:function(){this.toggle(!this.overlayVisible)}},{key:"toggle",value:function(t){t?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){u.Z.dom.addClass(this.toggleEl,"on"),this.overlayVisible=!0,this.player().engagementOverlayPlugin().toggleOverlay(this.overlayVisible),this.player().addClass("cv-reports-player-overlay-visible")}},{key:"toggleOff",value:function(){u.Z.dom.removeClass(this.toggleEl,"on"),this.overlayVisible=!1,this.player().engagementOverlayPlugin().toggleOverlay(this.overlayVisible),this.player().removeClass("cv-reports-player-overlay-visible")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation()}},{key:"createEl",value:function(t,r,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=u.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var o,i,a,c=(o=e,i=this,"function"==typeof(a=hy(vy(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)([t,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">Heat Map</span>\n <span class="cv-toggle-container"></span>'},n]);return c.children[1].appendChild(this.toggleEl),c}}],n&&fy(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("MenuItem"));u.Z.registerComponent("EngagementOverlayMenuItem",by);var my=r(72306),gy=r.n(my),wy=r(74161),Oy=r(86572);function jy(t){var e,r=t.interactive.timepoints.find((function(e){var r=e.visibleAt/1e3;return Math.floor(t.time)===Math.floor(r)||Math.ceil(t.time)===Math.ceil(r)}));if(!(null===(e=null==r?void 0:r.interactions)||void 0===e?void 0:e.length))return n.createElement(n.Fragment,null);var o=r.interactions.length>3?r.interactions.slice(0,2):r.interactions,i=r.interactions.length-o.length;return n.createElement("div",{className:"d-flex justify-content-end ms-2"},o.map((function(t,e){return n.createElement(Oy.y,{key:e,interaction:t,showQuestion:!1,iconClassName:"ms-1"})})),!!i&&n.createElement("div",{className:"interaction-type-icon d-flex justify-content-center align-items-center border border-dark text-body ms-1"},"+".concat(i)))}function Py(t){return function(t){if(Array.isArray(t))return Sy(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Sy(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Sy(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Sy(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var _y={title:{text:null},xAxis:{visible:!1,minPadding:0,maxPadding:0},legend:{enabled:!1},credits:{enabled:!1},defs:{gradient:{tagName:"linearGradient",id:"area-gradient",x1:0,y1:1,x2:0,y2:0,children:[{tagName:"stop",offset:0},{tagName:"stop",offset:1}]}}};function ky(t,e){return{styledMode:!0,spacing:[15,0,0,0],width:t,height:e}}function Ey(t){return Ey="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},Ey(t)}function Cy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ty(n.key),n)}}function Ty(t){var e=function(t){if("object"!=Ey(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ey(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ey(e)?e:e+""}function xy(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xy=function(){return!!t})()}function Ly(){return Ly="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ry(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ly.apply(null,arguments)}function Ry(t){return Ry=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ry(t)}function By(t,e){return By=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},By(t,e)}var Iy=u.Z.getComponent("Component");gy().AST.allowedTags.push("g"),gy().AST.allowedAttributes.push("viewBox","transform");var Dy=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ry(e),function(t,e){if(e&&("object"==Ey(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xy()?Reflect.construct(e,r||[],Ry(t).constructor):e.apply(t,r))}(this,e,[t,r])).initialize(),n.bindListeners(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&By(t,e)}(e,t),r=e,o=[{key:"initialize",value:function(){var t=this;this.player().ready((function(){return t.buildChart()}))}},{key:"buildCSSClass",value:function(){return"cv-engagement-overlay"}},{key:"createEl",value:function(t,r,n){var o,i,a;return(o=e,i=this,"function"==typeof(a=Ly(Ry(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass(),innerHTML:'<div class="cv-engagement-chart"></div><div class="cv-engagement-timepoint-indicator"></div>'}),n])}},{key:"toggleChart",value:function(t){t?this.buildChart():this.destroyChart()}},{key:"bindListeners",value:function(){var t=this;this.handleClick=this.handleClick.bind(this),this.resizeChart=this.resizeChart.bind(this),this.player().on("playerresize",this.resizeChart),this.on(this.el(),"mouseup",this.handleClick),this.player().on("dispose",(function(){t.player().off("playerresize",t.resizeChart),t.off(t.el(),"mouseup",t.handleClick)}))}},{key:"handleClick",value:function(t){u.Z.dom.isSingleLeftClick(t)&&(this.player().paused()?this.player().play():this.player().pause())}},{key:"buildChart",value:function(){var t=this;if(!this.chart){var e=this.getChartDimensions();if(e){var r=this.el().querySelector(".cv-engagement-chart");this.chart=gy().chart(r,this.getHighchartOptions(e))}else this.player().one("play",(function(){return t.buildChart()}))}}},{key:"resizeChart",value:function(){var t=this.getChartDimensions();this.chart&&t&&this.chart.setSize(t.width,t.height)}},{key:"destroyChart",value:function(){var t;null===(t=this.chart)||void 0===t||t.destroy(),this.chart=null}},{key:"getChartDimensions",value:function(){var t=this.player().getChild("collapserator"),e=null==t?void 0:t.currentHeight(),r=this.el().clientWidth;return e&&r?{width:r,height:this.player().currentDimensions().height-e}:null}},{key:"getHighchartOptions",value:function(t){var e,r,o,i=t.width,a=t.height;return Object.assign(Object.assign({},_y),{chart:ky(i,a),yAxis:(r=this.options_.heatMap,{max:1.05*Math.max.apply(Math,Py(r)),min:0,minPadding:0,maxPadding:0,allowDecimals:!0,startOnTick:!1,endOnTick:!1,visible:!1}),tooltip:(o=this.options_.interactive,{formatter:function(){var t=o?function(t,e){return(0,wy.uS)(n.createElement(jy,{time:e,interactive:t}))}(o,this.x):"";return'<div class="cv-engagement-tooltip bg-white rounded"><div class="d-flex justify-content-between">'+"<strong>".concat(Yc(this.x),"</strong>")+"".concat(t)+'</div><div class="d-flex justify-content-between rounded bg-light cv-view-count-container">'+'<strong>Views</strong> <span class="cv-view-count">'.concat(this.y,"</span>")+"</div></div>"},positioner:function(t,e,r){var n=this.chart.plotWidth-t,o=r.plotX-t/2;return{x:Math.min(Math.max(o,0),n),y:this.chart.plotTop}},useHTML:!0,padding:0}),plotOptions:(e=this.moveTimepointIndicator.bind(this),{area:{point:{events:{mouseOver:function(){e(this.x)},mouseOut:function(){e(null)}}}},series:{marker:{enabled:!1}}}),series:[{type:"area",data:this.options_.heatMap}]})}},{key:"moveTimepointIndicator",value:function(t){this.options_.onTimepointHover&&this.options_.onTimepointHover(t);var e=this.el().querySelector(".cv-engagement-timepoint-indicator");null!==t?(u.Z.dom.addClass(e,"cv-engagement-timepoint-indicator-visible"),e.style.left="".concat(t/this.options_.heatMap.length*100,"%")):u.Z.dom.removeClass(e,"cv-engagement-timepoint-indicator-visible")}}],o&&Cy(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(Iy);function My(t){return My="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},My(t)}function Ny(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ay(n.key),n)}}function Ay(t){var e=function(t){if("object"!=My(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=My(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==My(e)?e:e+""}function Zy(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zy=function(){return!!t})()}function Fy(t){return Fy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fy(t)}function zy(t,e){return zy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zy(t,e)}u.Z.registerComponent("EngagementOverlay",Dy);var Gy=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Fy(e),function(t,e){if(e&&("object"==My(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zy()?Reflect.construct(e,r||[],Fy(t).constructor):e.apply(t,r))}(this,e,[t,r])).options=r,t.ready((function(){n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zy(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){var t;this.hasHeatMapData()&&(this.player.addChild("engagementOverlay",{heatMap:this.options.heatMap,interactive:this.options.interactive,onTimepointHover:this.options.onTimepointHover}),(null===(t=this.player.getChild("collapserator"))||void 0===t?void 0:t.getChild("cogButton")).addItem({index:0,ctor:by,name:"EngagementOverlayMenuItem",options:{overlayVisible:!0}}))}},{key:"toggleOverlay",value:function(t){var e=this.player.getChild("engagementOverlay");null==e||e.toggleChart(t)}},{key:"hasHeatMapData",value:function(){var t;return(null===(t=this.options.heatMap)||void 0===t?void 0:t.reduce((function(t,e){return t+e}),0))>0}}])&&Ny(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function Vy(t){return Vy="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},Vy(t)}function Uy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Hy(n.key),n)}}function Hy(t){var e=function(t){if("object"!=Vy(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Vy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vy(e)?e:e+""}function qy(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qy=function(){return!!t})()}function Wy(){return Wy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Qy(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Wy.apply(null,arguments)}function Qy(t){return Qy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qy(t)}function Ky(t,e){return Ky=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ky(t,e)}u.Z.registerPlugin("engagementOverlayPlugin",Gy);var Yy=function(t){function e(t,r){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e,r){return e=Qy(e),function(t,e){if(e&&("object"==Vy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qy()?Reflect.construct(e,r||[],Qy(t).constructor):e.apply(t,r))}(this,e,[t]),void 0===r.startTime)throw Error("Invalid clip start");if(void 0===r.endTime)throw Error("Invalid clip end");if(r.startTime>r.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=parseFloat(r.startTime.toPrecision(4)),n._clipEnd=parseFloat(r.endTime.toPrecision(4)),n.playerEndedFn=n.player.ended.bind(t),n.playerDurationFn=n.player.duration.bind(t),n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.playerbufferedFn=n.player.buffered.bind(t),n.player.ended=n.ended.bind(n),n.player.duration=n.duration.bind(n),n.player.currentTime=n.currentTime.bind(n),n.player.buffered=n.buffered.bind(n),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ky(t,e)}(e,t),r=e,n=[{key:"clipStart",get:function(){var t=this.playerDurationFn();return this._clipStart>t?t:this._clipStart}},{key:"clipEnd",get:function(){var t=this.playerDurationFn();return t<=0?this._clipEnd:this._clipEnd>t?t:this._clipEnd}},{key:"dispose",value:function(){var t,r,n;this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange"),(t=e,r=this,"function"==typeof(n=Wy(Qy(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var t=this.getCurrentTime(!1);t>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,t<this.clipStart-10&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(t){return t&&t>0&&(this.playerDurationFn()?console.info("The duration of the player has already been set. This is a no-op."):this.playerDurationFn(t)),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(t){if("number"!=typeof t)return this.getCurrentTime(!0);for(var e=t+this.clipStart,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this.playerCurrentTimeFn(e,n)}},{key:"getCurrentTime",value:function(t){var e=this.playerCurrentTimeFn(),r=0;return e>=this.clipStart&&(r=e-this.clipStart),this.player.getCache().currentTime=r,t?r:e}},{key:"buffered",value:function(){for(var t=this.playerbufferedFn(),e=[],r=0;r<t.length;r++)e[r]=[Math.max(0,t.start(r)-this.clipStart),Math.min(Math.max(0,t.end(r)-this.clipStart),this.player.duration())];return u.Z.createTimeRanges(e)}}],n&&Uy(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));u.Z.registerPlugin("clipPlugin",Yy);var $y=r(84120);function Xy(t){return Xy="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},Xy(t)}function Jy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,th(n.key),n)}}function th(t){var e=function(t){if("object"!=Xy(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Xy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xy(e)?e:e+""}function eh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(eh=function(){return!!t})()}function rh(t,e,r,n){var o=nh(oh(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function nh(){return nh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=oh(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},nh.apply(null,arguments)}function oh(t){return oh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oh(t)}function ih(t,e){return ih=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ih(t,e)}var ah=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=oh(e),function(t,e){if(e&&("object"==Xy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,eh()?Reflect.construct(e,r||[],oh(t).constructor):e.apply(t,r))}(this,e,[t,r])).timepoint_=r.timepoint,n.time_=r.timepoint.visibleAt/1e3;var o=r.timepoint.interactions[0];o||n.hide();var i=$y.w.getTypeInfo(o.typeId).bgClassName;return n.$(".vjs-icon-placeholder").classList.add(i),n.controlText(o.name),n.update(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ih(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-item ".concat(rh(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return rh(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),Object.assign(Object.assign({},n),{tabindex:0})])}},{key:"update",value:function(){var t=this.player_.duration(),e=this.time_/t;this.el().style.left=100*e+"%",e>100||e<0?this.hide():this.show()}},{key:"handleClick",value:function(t){t.stopPropagation(),this.player_.currentTime(this.time_)}}],n&&Jy(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Button"));function uh(t){return uh="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},uh(t)}function ch(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function lh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,sh(n.key),n)}}function sh(t){var e=function(t){if("object"!=uh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=uh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==uh(e)?e:e+""}function fh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fh=function(){return!!t})()}function ph(t,e,r,n){var o=yh(hh(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function yh(){return yh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=hh(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},yh.apply(null,arguments)}function hh(t){return hh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hh(t)}function vh(t,e){return vh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vh(t,e)}var dh=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=hh(e),function(t,e){if(e&&("object"==uh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,fh()?Reflect.construct(e,r||[],hh(t).constructor):e.apply(t,r))}(this,e,[t,r])).track_=r.track,n.interactive_=r.interactive,n.onDurationChange=n.onDurationChange.bind(n),n.createInteractionItems=n.createInteractionItems.bind(n),n.createInteractionItems(),n.track_.on("cv:cuechange",n.createInteractionItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("dispose",(function(){n.track_.off("cv:cuechange"),n.player_.off("durationchange",n.onDurationChange)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vh(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-interactive-bar-items ".concat(ph(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return ph(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"createInteractionItems",value:function(){var t,e=this;if(this.track_){(function(t){return function(t){if(Array.isArray(t))return ch(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ch(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ch(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()})(this.children_).forEach((function(t){e.removeChild(t)}));for(var r=0;r<this.track_.cues.length;r++){var n=this.track_.cues[r],o=this.getTimepointById(n.text);o&&(null===(t=o.interactions)||void 0===t?void 0:t.length)&&this.addChild(new ah(this.player_,{timepoint:o}))}}}},{key:"onDurationChange",value:function(){this.update()}},{key:"getTimepointById",value:function(t){var e;return null===(e=this.interactive_.timepoints)||void 0===e?void 0:e.find((function(e){return e.id.toString()===t.toString()}))}}],n&&lh(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getComponent("Component"));function bh(t){return bh="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},bh(t)}function mh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gh(n.key),n)}}function gh(t){var e=function(t){if("object"!=bh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=bh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bh(e)?e:e+""}function wh(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wh=function(){return!!t})()}function Oh(t){return Oh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Oh(t)}function jh(t,e){return jh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jh(t,e)}var Ph=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Oh(e),function(t,e){if(e&&("object"==bh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wh()?Reflect.construct(e,r||[],Oh(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize.bind(n))})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jh(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){Y.useTrack(this.player,"metadata","interactive",this.onTrackLoaded.bind(this)),this.player.addClass("cv-interactive-plugin")}},{key:"onTrackLoaded",value:function(t){this.addChildren(t)}},{key:"addChildren",value:function(t){this.player.controlBar.getChild("progressControl").getChild("SeekBar").addChild(new dh(this.player,{interactive:this.options.interactive,track:t}))}}])&&mh(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(u.Z.getPlugin("plugin"));function Sh(t){return Sh="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},Sh(t)}function _h(){_h=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,j=O&&O(O(L([])));j&&j!==r&&n.call(j,a)&&(w=j);var P=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Sh(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function E(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Sh(e)+" is not iterable")}return m.prototype=g,o(P,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(P),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(P),l(P,c,"Generator"),l(P,a,(function(){return this})),l(P,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function kh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Eh(n.key),n)}}function Eh(t){var e=function(t){if("object"!=Sh(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Sh(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Sh(e)?e:e+""}function Ch(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ch=function(){return!!t})()}function Th(){return Th="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=xh(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Th.apply(null,arguments)}function xh(t){return xh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xh(t)}function Lh(t,e){return Lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lh(t,e)}u.Z.registerPlugin("interactiveSeekBarPlugin",Ph);var Rh=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=xh(e),function(t,e){if(e&&("object"==Sh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ch()?Reflect.construct(e,r||[],xh(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lh(t,e)}(e,t),r=e,n=[{key:"getPlayerClassName",value:function(){return"cv-reports-player"}},{key:"getAnalyticsPlayerType",value:function(){return"reports-player"}},{key:"additionalSetup",value:function(t){var r,n,o,i,a=this,u=Object.create(null,{additionalSetup:{get:function(){return t=e,r=a,Th(xh(1&1?t.prototype:t),"additionalSetup",r);var t,r}}});return r=this,n=void 0,o=void 0,i=_h().mark((function e(){return _h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u.additionalSetup.call(this,t),this.setupEngagementOverlayPlugin(t),this.setupUpClipPlugin(t),this.setupInteractiveSeekBarPlugin(t);case 4:case"end":return e.stop()}}),e,this)})),new(o||(o=Promise))((function(t,e){function a(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(a,u)}c((i=i.apply(r,n||[])).next())}))}},{key:"setupEngagementOverlayPlugin",value:function(t){var e;this.player.engagementOverlayPlugin({heatMap:this.options.heatMap,interactive:null===(e=t.additionalData)||void 0===e?void 0:e.interactive,onTimepointHover:this.options.onTimepointHover})}},{key:"setupUpClipPlugin",value:function(t){var e,r,n="MasterClip"===t.mediaType,o="MasterInteractive"===t.mediaType;if((n||o)&&(n&&(r=t.additionalData),!o||(r=null===(e=t.additionalData)||void 0===e?void 0:e.clipData))){if(!r)throw Error("Invalid clip data");this.player.clipPlugin({startTime:r.startTime,endTime:r.endTime})}}},{key:"setupInteractiveSeekBarPlugin",value:function(t){var e,r,n=null===(e=t.additionalData)||void 0===e?void 0:e.interactive;(null===(r=t.additionalData)||void 0===r?void 0:r.interactive)&&(this.track=function(t,e){var r,n=t.addTextTrack("metadata","interactive"),o=e.additionalData.interactive,i=null===(r=e.additionalData.clipData)||void 0===r?void 0:r.startTime;return o.timepoints.forEach((function(t){var e,r=t.visibleAt/1e3,o=t.visibleFor?r+t.visibleFor/1e3:r+1;i&&(r+=i,o+=i),(null===(e=t.interactions)||void 0===e?void 0:e.length)&&n.addCue({startTime:Math.max(.001,r-.001),endTime:o,text:t.id})})),n}(this.player,t),this.player.interactiveSeekBarPlugin({interactive:n}))}},{key:"getSeekBarOptions",value:function(){return{ignoreChapters:!0}}}],n&&kh(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(ly);function Bh(t){var e=n.useRef(null),r=n.useRef(null);return n.useEffect((function(){r.current=new Rh(e.current,t)}),[]),n.createElement("div",{ref:e})}var Ih=r(73013),Dh=o.T.encloseNamespace("shared.videoEngagementOverlay");function Mh(t){var e=n.useRef(null),r=(0,a.O)(t.engagement);return n.createElement("div",{className:"bg-white rounded p-2 h-100 ".concat(t.className)},t.heading&&n.createElement("h2",{className:"h6 mb-3"},t.heading),n.createElement("div",{className:"mb-2 position-relative"},n.createElement("div",{className:Ih.Z.playerPlaceholder}),n.createElement("div",{className:Ih.Z.playerContainer},n.createElement(Bh,{viewKey:t.viewKey,playerApi:new URL(t.playerApiUrl),hotkeyElQuerySelector:"body",heatMap:r,onTimepointHover:function(t){var n=e.current;n&&(null!==t?(n.classList.add(Ih.Z.heatMapTimepointIndicatorVisible),n.style.left="".concat(t/r.length*100,"%")):n.classList.remove(Ih.Z.heatMapTimepointIndicatorVisible))},aspectRatio:"16:9"}))),n.createElement("div",{className:"position-relative"},n.createElement(i.c,{engagement:t.engagement,className:Ih.Z.heatMap}),n.createElement("div",{ref:e,className:Ih.Z.heatMapTimepointIndicator})),n.createElement("div",{className:"d-flex justify-content-between mt-2"},n.createElement("div",null,!t.heading&&n.createElement("strong",null,Dh("engagement"))),n.createElement("div",{className:"w-33"},n.createElement(i.l,null))))}},73013:(t,e,r)=>{"use strict";r.d(e,{Z:()=>n});const n={playerContainer:"xyGJW",playerPlaceholder:"OH_lp",heatMap:"La3Rg",heatMapTimepointIndicator:"rUIki",heatMapTimepointIndicatorVisible:"hSWNO"}},58421:()=>{}}]);
|