@clickview/player 0.0.4-rc.2 → 0.0.4-rc.3

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.
@@ -3,7 +3,7 @@
3
3
  * Programatically add the following
4
4
  */
5
5
  for(o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)r[o-48]=o;for(o=1;o<13;o++)r["f"+o]=o+111;for(o=0;o<10;o++)r["numpad "+o]=o+96;var a=t.names=t.title={};for(o in r)a[r[o]]=o;for(var s in i)r[s]=i[s]},function(e,t,n){(function(r){var i,o,a;a="object"==typeof self&&self.self===self&&self||"object"==typeof r&&r.global===r&&r,i=[n(4),n(423),t],void 0===(o=function(e,t,n){a.Backbone=function(e,t,n,r){var i=e.Backbone,o=Array.prototype.slice;t.VERSION="1.3.3",t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var a=function(e,t,r){n.each(t,(function(t,i){n[i]&&(e.prototype[i]=function(e,t,r){switch(e){case 1:return function(){return n[t](this[r])};case 2:return function(e){return n[t](this[r],e)};case 3:return function(e,i){return n[t](this[r],s(e,this),i)};case 4:return function(e,i,o){return n[t](this[r],s(e,this),i,o)};default:return function(){var e=o.call(arguments);return e.unshift(this[r]),n[t].apply(n,e)}}}(t,i,r))}))},s=function(e,t){return n.isFunction(e)?e:n.isObject(e)&&!t._isModel(e)?u(e):n.isString(e)?function(t){return t.get(e)}:e},u=function(e){var t=n.matches(e);return function(e){return t(e.attributes)}},l=t.Events={},c=/\s+/,f=function(e,t,r,i,o){var a,s=0;if(r&&"object"==typeof r){void 0!==i&&"context"in o&&void 0===o.context&&(o.context=i);for(a=n.keys(r);s<a.length;s++)t=f(e,t,a[s],r[a[s]],o)}else if(r&&c.test(r))for(a=r.split(c);s<a.length;s++)t=e(t,a[s],i,o);else t=e(t,r,i,o);return t};l.on=function(e,t,n){return h(this,e,t,n)};var h=function(e,t,n,r,i){return e._events=f(d,e._events||{},t,n,{context:r,ctx:e,listening:i}),i&&((e._listeners||(e._listeners={}))[i.id]=i),e};l.listenTo=function(e,t,r){if(!e)return this;var i=e._listenId||(e._listenId=n.uniqueId("l")),o=this._listeningTo||(this._listeningTo={}),a=o[i];if(!a){var s=this._listenId||(this._listenId=n.uniqueId("l"));a=o[i]={obj:e,objId:i,id:s,listeningTo:o,count:0}}return h(e,t,r,this,a),this};var d=function(e,t,n,r){if(n){var i=e[t]||(e[t]=[]),o=r.context,a=r.ctx,s=r.listening;s&&s.count++,i.push({callback:n,context:o,ctx:o||a,listening:s})}return e};l.off=function(e,t,n){return this._events?(this._events=f(p,this._events,e,t,{context:n,listeners:this._listeners}),this):this},l.stopListening=function(e,t,r){var i=this._listeningTo;if(!i)return this;for(var o=e?[e._listenId]:n.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(t,r,this)}return this};var p=function(e,t,r,i){if(e){var o,a=0,s=i.context,u=i.listeners;if(t||r||s){for(var l=t?[t]:n.keys(e);a<l.length;a++){var c=e[t=l[a]];if(!c)break;for(var f=[],h=0;h<c.length;h++){var d=c[h];r&&r!==d.callback&&r!==d.callback._callback||s&&s!==d.context?f.push(d):(o=d.listening)&&0==--o.count&&(delete u[o.id],delete o.listeningTo[o.objId])}f.length?e[t]=f:delete e[t]}return e}for(var p=n.keys(u);a<p.length;a++)delete u[(o=u[p[a]]).id],delete o.listeningTo[o.objId]}};l.once=function(e,t,r){var i=f(y,{},e,t,n.bind(this.off,this));return"string"==typeof e&&null==r&&(t=void 0),this.on(i,t,r)},l.listenToOnce=function(e,t,r){var i=f(y,{},t,r,n.bind(this.stopListening,this,e));return this.listenTo(e,i)};var y=function(e,t,r,i){if(r){var o=e[t]=n.once((function(){i(t,o),r.apply(this,arguments)}));o._callback=r}return e};l.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),n=Array(t),r=0;r<t;r++)n[r]=arguments[r+1];return f(m,this._events,e,void 0,n),this};var m=function(e,t,n,r){if(e){var i=e[t],o=e.all;i&&o&&(o=o.slice()),i&&g(i,r),o&&g(o,[t].concat(r))}return e},g=function(e,t){var n,r=-1,i=e.length,o=t[0],a=t[1],s=t[2];switch(t.length){case 0:for(;++r<i;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=e[r]).callback.apply(n.ctx,t);return}};l.bind=l.on,l.unbind=l.off,n.extend(t,l);var v=t.Model=function(e,t){var r=e||{};t||(t={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{});var i=n.result(this,"defaults");r=n.defaults(n.extend({},i,r),i),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(v.prototype,l,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!n.iteratee(e,this)(this.attributes)},set:function(e,t,r){if(null==e)return this;var i;if("object"==typeof e?(i=e,r=t):(i={})[e]=t,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,a=r.silent,s=[],u=this._changing;this._changing=!0,u||(this._previousAttributes=n.clone(this.attributes),this.changed={});var l=this.attributes,c=this.changed,f=this._previousAttributes;for(var h in i)t=i[h],n.isEqual(l[h],t)||s.push(h),n.isEqual(f[h],t)?delete c[h]:c[h]=t,o?delete l[h]:l[h]=t;if(this.idAttribute in i&&(this.id=this.get(this.idAttribute)),!a){s.length&&(this._pending=r);for(var d=0;d<s.length;d++)this.trigger("change:"+s[d],this,l[s[d]],r)}if(u)return this;if(!a)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&n.clone(this.changed);var t=this._changing?this._previousAttributes:this.attributes,r={};for(var i in e){var o=e[i];n.isEqual(t[i],o)||(r[i]=o)}return!!n.size(r)&&r},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=n.extend({parse:!0},e);var t=this,r=e.success;return e.success=function(n){var i=e.parse?t.parse(n,e):n;if(!t.set(i,e))return!1;r&&r.call(e.context,t,n,e),t.trigger("sync",t,n,e)},M(this,e),this.sync("read",this,e)},save:function(e,t,r){var i;null==e||"object"==typeof e?(i=e,r=t):(i={})[e]=t;var o=(r=n.extend({validate:!0,parse:!0},r)).wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var a=this,s=r.success,u=this.attributes;r.success=function(e){a.attributes=u;var t=r.parse?a.parse(e,r):e;if(o&&(t=n.extend({},i,t)),t&&!a.set(t,r))return!1;s&&s.call(r.context,a,e,r),a.trigger("sync",a,e,r)},M(this,r),i&&o&&(this.attributes=n.extend({},u,i));var l=this.isNew()?"create":r.patch?"patch":"update";"patch"!==l||r.attrs||(r.attrs=i);var c=this.sync(l,this,r);return this.attributes=u,c},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=e.wait,o=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(n){i&&o(),r&&r.call(e.context,t,n,e),t.isNew()||t.trigger("sync",t,n,e)};var a=!1;return this.isNew()?n.defer(e.success):(M(this,e),a=this.sync("delete",this,e)),i||o(),a},url:function(){var e=n.result(this,"urlRoot")||n.result(this.collection,"url")||N();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return!r||(this.trigger("invalid",this,r,n.extend(t,{validationError:r})),!1)}}),a(v,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes");var b=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},_={add:!0,remove:!0,merge:!0},w={add:!0,remove:!1},T=function(e,t,n){n=Math.min(Math.max(n,0),e.length);var r,i=Array(e.length-n),o=t.length;for(r=0;r<i.length;r++)i[r]=e[r+n];for(r=0;r<o;r++)e[r+n]=t[r];for(r=0;r<i.length;r++)e[r+o+n]=i[r]};n.extend(b.prototype,l,{model:v,initialize:function(){},toJSON:function(e){return this.map((function(t){return t.toJSON(e)}))},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,w))},remove:function(e,t){t=n.extend({},t);var r=!n.isArray(e);e=r?[e]:e.slice();var i=this._removeModels(e,t);return!t.silent&&i.length&&(t.changes={added:[],merged:[],removed:i},this.trigger("update",this,t)),r?i[0]:i},set:function(e,t){if(null!=e){(t=n.extend({},_,t)).parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var r=!n.isArray(e);e=r?[e]:e.slice();var i=t.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],u=[],l=[],c=[],f={},h=t.add,d=t.merge,p=t.remove,y=!1,m=this.comparator&&null==i&&!1!==t.sort,g=n.isString(this.comparator)?this.comparator:null;for(a=0;a<e.length;a++){o=e[a];var v=this.get(o);if(v){if(d&&o!==v){var b=this._isModel(o)?o.attributes:o;t.parse&&(b=v.parse(b,t)),v.set(b,t),l.push(v),m&&!y&&(y=v.hasChanged(g))}f[v.cid]||(f[v.cid]=!0,s.push(v)),e[a]=v}else h&&(o=e[a]=this._prepareModel(o,t))&&(u.push(o),this._addReference(o,t),f[o.cid]=!0,s.push(o))}if(p){for(a=0;a<this.length;a++)f[(o=this.models[a]).cid]||c.push(o);c.length&&this._removeModels(c,t)}var w=!1,S=!m&&h&&p;if(s.length&&S?(w=this.length!==s.length||n.some(this.models,(function(e,t){return e!==s[t]})),this.models.length=0,T(this.models,s,0),this.length=this.models.length):u.length&&(m&&(y=!0),T(this.models,u,null==i?this.length:i),this.length=this.models.length),y&&this.sort({silent:!0}),!t.silent){for(a=0;a<u.length;a++)null!=i&&(t.index=i+a),(o=u[a]).trigger("add",o,this,t);(y||w)&&this.trigger("sort",this,t),(u.length||c.length||l.length)&&(t.changes={added:u,removed:c,merged:l},this.trigger("update",this,t))}return r?e[0]:e}},reset:function(e,t){t=t?n.clone(t):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return o.apply(this.models,arguments)},get:function(e){if(null!=e)return this._byId[e]||this._byId[this.modelId(e.attributes||e)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return e<0&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});var r=t.length;return n.isFunction(t)&&(t=n.bind(t,this)),1===r||n.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return this.map(e+"")},fetch:function(e){var t=(e=n.extend({parse:!0},e)).success,r=this;return e.success=function(n){var i=e.reset?"reset":"set";r[i](n,e),t&&t.call(e.context,r,n,e),r.trigger("sync",r,n,e)},M(this,e),this.sync("read",this,e)},create:function(e,t){var r=(t=t?n.clone(t):{}).wait;if(!(e=this._prepareModel(e,t)))return!1;r||this.add(e,t);var i=this,o=t.success;return t.success=function(e,t,n){r&&i.add(e,n),o&&o.call(n.context,e,t,n)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(this._isModel(e))return e.collection||(e.collection=this),e;(t=t?n.clone(t):{}).collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger("invalid",this,r.validationError,t),!1):r},_removeModels:function(e,t){for(var n=[],r=0;r<e.length;r++){var i=this.get(e[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];var a=this.modelId(i.attributes);null!=a&&delete this._byId[a],t.silent||(t.index=o,i.trigger("remove",i,this,t)),n.push(i),this._removeReference(i,t)}}return n},_isModel:function(e){return e instanceof v},_addReference:function(e,t){this._byId[e.cid]=e;var n=this.modelId(e.attributes);null!=n&&(this._byId[n]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var n=this.modelId(e.attributes);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if(t){if(("add"===e||"remove"===e)&&n!==this)return;if("destroy"===e&&this.remove(t,r),"change"===e){var i=this.modelId(t.previousAttributes()),o=this.modelId(t.attributes);i!==o&&(null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=t))}}this.trigger.apply(this,arguments)}}),a(b,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},"models");var S=t.View=function(e){this.cid=n.uniqueId("view"),n.extend(this,n.pick(e,C)),this._ensureElement(),this.initialize.apply(this,arguments)},E=/^(\S+)\s*(.*)$/,C=["model","collection","el","id","attributes","className","tagName","events"];n.extend(S.prototype,l,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=n.result(this,"events")),!e)return this;for(var t in this.undelegateEvents(),e){var r=e[t];if(n.isFunction(r)||(r=this[r]),r){var i=t.match(E);this.delegate(i[1],i[2],n.bind(r,this))}}return this},delegate:function(e,t,n){return this.$el.on(e+".delegateEvents"+this.cid,t,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(e,t,n){return this.$el.off(e+".delegateEvents"+this.cid,t,n),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var e=n.extend({},n.result(this,"attributes"));this.id&&(e.id=n.result(this,"id")),this.className&&(e.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(e)}},_setAttributes:function(e){this.$el.attr(e)}}),t.sync=function(e,r,i){var o=k[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var a={type:o,dataType:"json"};if(i.url||(a.url=n.result(r,"url")||N()),null!=i.data||!r||"create"!==e&&"update"!==e&&"patch"!==e||(a.contentType="application/json",a.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),i.emulateHTTP&&("PUT"===o||"DELETE"===o||"PATCH"===o)){a.type="POST",i.emulateJSON&&(a.data._method=o);var s=i.beforeSend;i.beforeSend=function(e){if(e.setRequestHeader("X-HTTP-Method-Override",o),s)return s.apply(this,arguments)}}"GET"===a.type||i.emulateJSON||(a.processData=!1);var u=i.error;i.error=function(e,t,n){i.textStatus=t,i.errorThrown=n,u&&u.call(i.context,e,t,n)};var l=i.xhr=t.ajax(n.extend(a,i));return r.trigger("request",r,l,i),l};var k={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var x=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},O=/\((.*?)\)/g,P=/(\(\?)?:\w+/g,R=/\*\w+/g,A=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(x.prototype,l,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=""),i||(i=this[r]);var o=this;return t.history.route(e,(function(n){var a=o._extractParameters(e,n);!1!==o.execute(i,a,r)&&(o.trigger.apply(o,["route:"+r].concat(a)),o.trigger("route",r,a),t.history.trigger("route",o,r,a))})),this},execute:function(e,t,n){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(A,"\\$&").replace(O,"(?:$1)?").replace(P,(function(e,t){return t?e:"([^/?]+)"})).replace(R,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,(function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null}))}});var I=t.History=function(){this.handlers=[],this.checkUrl=n.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},L=/^[#\/]|\s+$/g,j=/^\/+|\/+$/g,D=/#.*$/;I.started=!1,n.extend(I.prototype,l,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){var e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(L,"")},start:function(e){if(I.started)throw new Error("Backbone.history has already been started");if(I.started=!0,this.options=n.extend({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(j,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||"/";return this.location.replace(t+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash="#"+this.fragment}var o=window.addEventListener||function(e,t){return attachEvent("on"+e,t)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent("on"+e,t)};this._usePushState?e("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&e("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),I.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),n.some(this.handlers,(function(t){if(t.route.test(e))return t.callback(e),!0})))},navigate:function(e,t){if(!I.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");var n=this.root;""!==e&&"?"!==e.charAt(0)||(n=n.slice(0,-1)||"/");var r=n+e;if(e=this.decodeFragment(e.replace(D,"")),this.fragment!==e){if(this.fragment=e,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;t.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,"");e.replace(r+"#"+t)}else e.hash="#"+t}}),t.history=new I,v.extend=b.extend=x.extend=S.extend=I.extend=function(e,t){var r,i=this;return r=e&&n.has(e,"constructor")?e.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,t),r.prototype=n.create(i.prototype,e),r.prototype.constructor=r,r.__super__=i.prototype,r};var N=function(){throw new Error('A "url" property or function must be specified')},M=function(e,t){var n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger("error",e,r,t)}};return t}(a,n,e,t)}.apply(t,i))||(e.exports=o)}).call(this,n(30))},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={SHELL:"global:shell",ALERT:"global:alert",POPUP:"global:popup"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={SHOW_POPUP:"show:popup",ROUTE:"route",LOCK_NAV:"lock:nav",UNLOCK_NAV:"unlock:nav",NAV_IS_LOCKED:"navigation:islocked",NAV_UNLOCKED_BY_USER:"navigation:unlocked:by:user",ROUTING_START:"routing:start",ROUTING_END:"routing:end",HAS_ACTIVE_ROUTE:"has:active:route",ROUTE_LOOKUP:"route:look:up",URL_CHANGE:"url:change",ERROR:"error",CURRENT_ROUTE:"route:current"}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||Function("return this")()}).call(this,n(30))},function(e,t,n){var r=n(52),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(14),i=n(74),o=n(87),a=n(153),s=r.Symbol,u=i("wks");e.exports=function(e){return u[e]||(u[e]=a&&s[e]||(a?s:o)("Symbol."+e))}},function(e,t,n){var r=n(11);e.exports=!r((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";
6
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(58))&&"object"==typeof r&&"default"in r?r.default:r,o={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},a=["video","audio","text"],s=["Video","Audio","Text"],u=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},l=function(e){return e.map(u)},c=function(e){void 0===e&&(e="");var t=e.split(","),n={},r=[];return t.forEach((function(e){var t;e=e.trim(),a.forEach((function(r){var i=o[r].exec(e.toLowerCase());if(i&&!(i.length<=1)){t=r;var a=e.substring(0,i[1].length),s=e.replace(a,"");n[r]={type:a,details:s}}})),t||r.push(e)})),r.length&&(n.unknown=r),n},f=function(e){return void 0===e&&(e=""),o.audio.test(e.trim().toLowerCase())},h=function(e){return void 0===e&&(e=""),o.text.test(e.trim().toLowerCase())},d=function(e){if(e&&"string"==typeof e){var t=e.toLowerCase().split(",").map((function(e){return u(e.trim())})),n="video";1===t.length&&f(t[0])?n="audio":1===t.length&&h(t[0])&&(n="application");var r="mp4";return t.every((function(e){return o.mp4.test(e)}))?r="mp4":t.every((function(e){return o.webm.test(e)}))?r="webm":t.every((function(e){return o.ogg.test(e)}))&&(r="ogg"),n+"/"+r+';codecs="'+e+'"'}};t.DEFAULT_AUDIO_CODEC="mp4a.40.2",t.DEFAULT_VIDEO_CODEC="avc1.4d400d",t.browserSupportsCodec=function(e){return void 0===e&&(e=""),i.MediaSource&&i.MediaSource.isTypeSupported&&i.MediaSource.isTypeSupported(d(e))||!1},t.codecsFromDefault=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var r in n){var i=n[r];if(i.default&&i.playlists)return c(i.playlists[0].attributes.CODECS)}return null},t.getMimeForCodec=d,t.isAudioCodec=f,t.isTextCodec=h,t.isVideoCodec=function(e){return void 0===e&&(e=""),o.video.test(e.trim().toLowerCase())},t.mapLegacyAvcCodecs=function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e){return l([e])[0]}))},t.muxerSupportsCodec=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<s.length;t++){if(o["muxer"+s[t]].test(e))return!0}return!1}))},t.parseCodecs=c,t.translateLegacyCodec=u,t.translateLegacyCodecs=l},function(e,t,n){var r=n(26);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10);function i(e,t,n,i){var o=e;return"string"==typeof e&&(o=r.Radio.channel(e)),i.call(this,o,t,n)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return p}));var r=n(4),i=n(10),o=n(39),a=n(12),s=n(13),u=/((\(\?)?:\w+)|(\*\w+)/,l=/[\(\)]/g,c=/\(\/\)/g,f=/\/$/,h={routingStarted:function(){i.Radio.channel(a.a.SHELL).trigger(s.a.ROUTING_START)},routingEnded:function(){h.hasActiveRoute()&&i.Radio.channel(a.a.SHELL).trigger(s.a.ROUTING_END)},hasActiveRoute:function(){return i.Radio.channel(a.a.SHELL).request(s.a.HAS_ACTIVE_ROUTE)}},d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.usedHelper=!0;var n=e.application,r=e.action;i.Radio.channel(n).trigger(r,e,t)},p={getHref:function(e){if(!e)return"";var t=e.application,n=e.action,r=e.args,o=e.params,u=i.Radio.channel(a.a.SHELL).request(s.a.ROUTE_LOOKUP,"".concat(t,":").concat(n),r,o);return!1===u?"":"/".concat(u)},buildRoute:function(e,t){if(!t)return e;var n=t.args,i=t.params;if(r.each(n,(function(t){e=e.replace(u,t||"")})),e=(e=(e=e.replace(c,"")).replace(l,"")).replace(f,""),!i)return e;var a=o.a.SerializeQueryParams(i);return a.length?"".concat(e,"?").concat(a):e},trigger:function(e,t){e&&(h.hasActiveRoute()?i.Radio.channel(a.a.SHELL).once("routing:end",(function(){d(e,t)})):d(e,t))},updateParams:function(e,t){var n=p.getCurrentAppLink(),r=Object.assign(Object.assign({},n),{params:e});p.trigger(r,t)},getCurrentAppLink:function(){return i.Radio.channel(a.a.SHELL).request(s.a.CURRENT_ROUTE)}}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(18);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(17),i=n(147),o=n(25),a=n(62),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(415)},function(e,t,n){e.exports=function(e,t,n){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t,n=n&&n.hasOwnProperty("default")?n.default:n;var r=function(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return e.apply(t,r)}},i=e.Model.extend,o=function e(n,r){t.isObject(n)&&(n=n.prev+" is going to be removed in the future. Please use "+n.next+" instead."+(n.url?" See: "+n.url:"")),Ie.DEV_MODE&&(void 0!==r&&r||e._cache[n]||(e._warn("Deprecation warning: "+n),e._cache[n]=!0))};o._console="undefined"!=typeof console?console:{},o._warn=function(){var e=o._console.warn||o._console.log||t.noop;return e.apply(o._console,arguments)},o._cache={};var a=function(e){return document.documentElement.contains(e&&e.parentNode)},s=function(e,n){var r=this;e&&t.each(n,(function(t){var n=e[t];void 0!==n&&(r[t]=n)}))},u=function(e){if(e)return this.options&&void 0!==this.options[e]?this.options[e]:this[e]},l=function(e){var n=this;return t.reduce(e,(function(e,r,i){return t.isFunction(r)||(r=n[r]),r&&(e[i]=r),e}),{})},c=/(^|:)(\w)/gi;function f(e,t,n){return n.toUpperCase()}var h=t.memoize((function(e){return"on"+e.replace(c,f)}));function d(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=h(e),a=u.call(this,o),s=void 0;return t.isFunction(a)&&(s=a.apply(this,r)),this.trigger.apply(this,arguments),s}function p(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.isFunction(e.triggerMethod)?e.triggerMethod.apply(e,r):d.apply(e,r)}function y(e,n,r){e._getImmediateChildren&&t.each(e._getImmediateChildren(),(function(e){r(e)&&p(e,n,e)}))}function m(e){return!e._isAttached}function g(e){return!!m(e)&&(e._isAttached=!0,!0)}function v(e){return e._isAttached}function b(e){return!!v(e)&&(e._isAttached=!1,!0)}function _(e){e._isAttached&&e._isRendered&&p(e,"dom:refresh",e)}function w(e){e._isAttached&&e._isRendered&&p(e,"dom:remove",e)}function T(){y(this,"before:attach",m)}function S(){y(this,"attach",g),_(this)}function E(){y(this,"before:detach",v),w(this)}function C(){y(this,"detach",b)}function k(){w(this)}function x(){_(this)}function O(e){e._areViewEventsMonitored||!1===e.monitorViewEvents||(e._areViewEventsMonitored=!0,e.on({"before:attach":T,attach:S,"before:detach":E,detach:C,"before:render":k,render:x}))}var P=["description","fileName","lineNumber","name","message","number"],R=i.call(Error,{urlRoot:"http://marionettejs.com/docs/v3.5.1/",constructor:function(e,n){t.isObject(e)?e=(n=e).message:n||(n={});var r=Error.call(this,e);t.extend(this,t.pick(r,P),t.pick(n,P)),this.captureStackTrace(),n.url&&(this.url=this.urlRoot+n.url)},captureStackTrace:function(){Error.captureStackTrace&&Error.captureStackTrace(this,R)},toString:function(){return this.name+": "+this.message+(this.url?" See: "+this.url:"")}});function A(e,n,r,i){if(!t.isObject(r))throw new R({message:"Bindings must be an object.",url:"marionette.functions.html#marionettebindevents"});t.each(r,(function(r,a){t.isString(r)?function(e,n,r,i,a){var s=i.split(/\s+/);s.length>1&&o("Multiple handlers for a single event are deprecated. If needed, use a single handler to call multiple methods."),t.each(s,(function(t){var i=e[t];if(!i)throw new R('Method "'+t+'" was configured as an event handler, but does not exist.');e[a](n,r,i)}))}(e,n,a,r,i):e[i](n,a,r)}))}function I(e,t){return e&&t?(A(this,e,t,"listenTo"),this):this}function L(e,t){return e?t?(A(this,e,t,"stopListening"),this):(this.stopListening(e),this):this}function j(e,n,r,i){if(!t.isObject(r))throw new R({message:"Bindings must be an object.",url:"marionette.functions.html#marionettebindrequests"});var o=l.call(e,r);n[i](o,e)}function D(e,t){return e&&t?(j(this,e,t,"reply"),this):this}function N(e,t){return e?t?(j(this,e,t,"stopReplying"),this):(e.stopReplying(null,null,this),this):this}R.extend=i;var M={normalizeMethods:l,_setOptions:function(e){this.options=t.extend({},t.result(this,"options"),e)},mergeOptions:s,getOption:u,bindEvents:I,unbindEvents:L},U={_initRadio:function(){var e=t.result(this,"channelName");if(e){if(!n)throw new R({name:"BackboneRadioMissing",message:'The dependency "backbone.radio" is missing.'});var r=this._channel=n.channel(e),i=t.result(this,"radioEvents");this.bindEvents(r,i);var o=t.result(this,"radioRequests");this.bindRequests(r,o),this.on("destroy",this._destroyRadio)}},_destroyRadio:function(){this._channel.stopReplying(null,null,this)},getChannel:function(){return this._channel},bindEvents:I,unbindEvents:L,bindRequests:D,unbindRequests:N},B=["channelName","radioEvents","radioRequests"],F=function(e){this.hasOwnProperty("options")||this._setOptions(e),this.mergeOptions(e,B),this._setCid(),this._initRadio(),this.initialize.apply(this,arguments)};F.extend=i,t.extend(F.prototype,e.Events,M,U,{cidPrefix:"mno",_isDestroyed:!1,isDestroyed:function(){return this._isDestroyed},initialize:function(){},_setCid:function(){this.cid||(this.cid=t.uniqueId(this.cidPrefix))},destroy:function(){if(this._isDestroyed)return this;for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.triggerMethod.apply(this,["before:destroy",this].concat(t)),this._isDestroyed=!0,this.triggerMethod.apply(this,["destroy",this].concat(t)),this.stopListening(),this},triggerMethod:d});var V=function(e){this.templateId=e};t.extend(V,{templateCaches:{},get:function(e,t){var n=this.templateCaches[e];return n||(n=new V(e),this.templateCaches[e]=n),n.load(t)},clear:function(){for(var e=void 0,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.length;if(i>0)for(e=0;e<i;e++)delete this.templateCaches[n[e]];else this.templateCaches={}}}),t.extend(V.prototype,{load:function(e){if(this.compiledTemplate)return this.compiledTemplate;var t=this.loadTemplate(this.templateId,e);return this.compiledTemplate=this.compileTemplate(t,e),this.compiledTemplate},loadTemplate:function(t,n){var r=e.$(t);if(!r.length)throw new R({name:"NoTemplateError",message:'Could not find template: "'+t+'"'});return r.html()},compileTemplate:function(e,n){return t.template(e,n)}});var H=t.invokeMap||t.invoke;function z(e,n){return t.chain(n).map((function(n,r){var i=function(e,n){return e.behaviorClass?e.behaviorClass:t.isFunction(e)?e:t.isFunction(Ie.Behaviors.behaviorsLookup)?Ie.Behaviors.behaviorsLookup(e,n)[n]:Ie.Behaviors.behaviorsLookup[n]}(n,r),o=new i(n===i?{}:n,e),a=z(e,t.result(o,"behaviors"));return[o].concat(a)})).flatten().value()}var q={_initBehaviors:function(){this._behaviors=this._getBehaviors()},_getBehaviors:function(){var e=t.result(this,"behaviors");return t.isObject(e)?z(this,e):{}},_getBehaviorTriggers:function(){var e=H(this._behaviors,"getTriggers");return t.reduce(e,(function(e,n){return t.extend(e,n)}),{})},_getBehaviorEvents:function(){var e=H(this._behaviors,"getEvents");return t.reduce(e,(function(e,n){return t.extend(e,n)}),{})},_proxyBehaviorViewProperties:function(){H(this._behaviors,"proxyViewProperties")},_delegateBehaviorEntityEvents:function(){H(this._behaviors,"delegateEntityEvents")},_undelegateBehaviorEntityEvents:function(){H(this._behaviors,"undelegateEntityEvents")},_destroyBehaviors:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];H.apply(void 0,[this._behaviors,"destroy"].concat(t))},_removeBehavior:function(e){this._isDestroyed||(this.undelegate(".trig"+e.cid+" ."+e.cid),this._behaviors=t.without(this._behaviors,e))},_bindBehaviorUIElements:function(){H(this._behaviors,"bindUIElements")},_unbindBehaviorUIElements:function(){H(this._behaviors,"unbindUIElements")},_triggerEventOnBehaviors:function(){for(var e=this._behaviors,t=0,n=e&&e.length;t<n;t++)d.apply(e[t],arguments)}},W={_delegateEntityEvents:function(e,n){var r=t.result(this,"modelEvents");r&&(L.call(this,e,r),I.call(this,e,r));var i=t.result(this,"collectionEvents");i&&(L.call(this,n,i),I.call(this,n,i))},_undelegateEntityEvents:function(e,n){var r=t.result(this,"modelEvents");L.call(this,e,r);var i=t.result(this,"collectionEvents");L.call(this,n,i)}},$=/^(\S+)\s*(.*)$/,G=function(e,t){var n=e.match($);return n[1]+"."+t+" "+n[2]},Y={childViewEventPrefix:!0,triggersStopPropagation:!0,triggersPreventDefault:!0};function K(e){return!!Y[e]}var X={_getViewTriggers:function(e,n){var r=this;return t.reduce(n,(function(n,i,o){return n[o=G(o,"trig"+r.cid)]=function(e,n){t.isString(n)&&(n={event:n});var r=n.event,i=!!n.preventDefault;K("triggersPreventDefault")&&(i=!1!==n.preventDefault);var o=!!n.stopPropagation;return K("triggersStopPropagation")&&(o=!1!==n.stopPropagation),function(t){i&&t.preventDefault(),o&&t.stopPropagation(),e.triggerMethod(r,e,t)}}(e,i),n}),{})}},Q=function(e,t){return e.replace(/@ui\.[a-zA-Z-_$0-9]*/g,(function(e){return t[e.slice(4)]}))},J={normalizeUIKeys:function(e){return function(e,n){return t.reduce(e,(function(e,t,r){return e[Q(r,n)]=t,e}),{})}(e,this._getUIBindings())},normalizeUIString:function(e){var t=this._getUIBindings();return Q(e,t)},normalizeUIValues:function(e,n){return function e(n,r,i){return t.each(n,(function(o,a){t.isString(o)?n[a]=Q(o,r):t.isObject(o)&&t.isArray(i)&&(t.extend(o,e(t.pick(o,i),r)),t.each(i,(function(e){var n=o[e];t.isString(n)&&(o[e]=Q(n,r))})))})),n}(e,this._getUIBindings(),n)},_getUIBindings:function(){var e=t.result(this,"_uiBindings"),n=t.result(this,"ui");return e||n},_bindUIElements:function(){var e=this;if(this.ui){this._uiBindings||(this._uiBindings=this.ui);var n=t.result(this,"_uiBindings");this._ui={},t.each(n,(function(t,n){e._ui[n]=e.$(t)})),this.ui=this._ui}},_unbindUIElements:function(){var e=this;this.ui&&this._uiBindings&&(t.each(this.ui,(function(t,n){delete e.ui[n]})),this.ui=this._uiBindings,delete this._uiBindings,delete this._ui)},_getUI:function(e){return this._ui[e]}};function Z(t){return t instanceof e.$?t:e.$(t)}function ee(e){return this.prototype.Dom=t.extend({},this.prototype.Dom,e),this}var te={createBuffer:function(){return document.createDocumentFragment()},getEl:function(e){return Z(e)},findEl:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Z(e);return n.find(t)},hasEl:function(e,t){return e.contains(t&&t.parentNode)},detachEl:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z(e);t.detach()},replaceEl:function(e,t){if(e!==t){var n=t.parentNode;n&&n.replaceChild(e,t)}},swapEl:function(e,t){if(e!==t){var n=e.parentNode,r=t.parentNode;if(n&&r){var i=e.nextSibling,o=t.nextSibling;n.insertBefore(t,i),r.insertBefore(e,o)}}},setContents:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Z(e);n.html(t)},appendContents:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n._$el,i=void 0===r?Z(e):r,o=n._$contents,a=void 0===o?Z(t):o;i.append(a)},hasContents:function(e){return!!e&&e.hasChildNodes()},detachContents:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z(e);t.contents().detach()}},ne={Dom:te,supportsRenderLifecycle:!0,supportsDestroyLifecycle:!0,_isDestroyed:!1,isDestroyed:function(){return!!this._isDestroyed},_isRendered:!1,isRendered:function(){return!!this._isRendered},_isAttached:!1,isAttached:function(){return!!this._isAttached},delegateEvents:function(n){this._proxyBehaviorViewProperties(),this._buildEventProxies();var r=this._getEvents(n);void 0===n&&(this.events=r);var i=t.extend({},this._getBehaviorEvents(),r,this._getBehaviorTriggers(),this.getTriggers());return e.View.prototype.delegateEvents.call(this,i),this},_getEvents:function(e){var n=e||this.events;return t.isFunction(n)?this.normalizeUIKeys(n.call(this)):this.normalizeUIKeys(n)},getTriggers:function(){if(this.triggers){var e=this.normalizeUIKeys(t.result(this,"triggers"));return this._getViewTriggers(this,e)}},delegateEntityEvents:function(){return this._delegateEntityEvents(this.model,this.collection),this._delegateBehaviorEntityEvents(),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.model,this.collection),this._undelegateBehaviorEntityEvents(),this},destroy:function(){if(this._isDestroyed)return this;for(var e=this._isAttached&&!this._shouldDisableEvents,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.triggerMethod.apply(this,["before:destroy",this].concat(n)),e&&this.triggerMethod("before:detach",this),this.unbindUIElements(),this._removeElement(),e&&(this._isAttached=!1,this.triggerMethod("detach",this)),this._removeChildren(),this._isDestroyed=!0,this._isRendered=!1,this._destroyBehaviors.apply(this,n),this.triggerMethod.apply(this,["destroy",this].concat(n)),this.stopListening(),this},_removeElement:function(){this.$el.off().removeData(),this.Dom.detachEl(this.el,this.$el)},bindUIElements:function(){return this._bindUIElements(),this._bindBehaviorUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this._unbindBehaviorUIElements(),this},getUI:function(e){return this._getUI(e)},childViewEventPrefix:function(){return!!K("childViewEventPrefix")&&"childview"},triggerMethod:function(){var e=d.apply(this,arguments);return this._triggerEventOnBehaviors.apply(this,arguments),e},_buildEventProxies:function(){this._childViewEvents=t.result(this,"childViewEvents"),this._childViewTriggers=t.result(this,"childViewTriggers")},_proxyChildViewEvents:function(e){this.listenTo(e,"all",this._childViewEventHandler)},_childViewEventHandler:function(e){for(var n=this.normalizeMethods(this._childViewEvents),r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];void 0!==n&&t.isFunction(n[e])&&n[e].apply(this,i);var a=this._childViewTriggers;a&&t.isString(a[e])&&this.triggerMethod.apply(this,[a[e]].concat(i));var s=t.result(this,"childViewEventPrefix");if(!1!==s){var u=s+":"+e;this.triggerMethod.apply(this,[u].concat(i))}}};function re(e){e._isRendered||(e.supportsRenderLifecycle||p(e,"before:render",e),e.render(),e.supportsRenderLifecycle||(e._isRendered=!0,p(e,"render",e)))}function ie(e){if(e.destroy)e.destroy();else{e.supportsDestroyLifecycle||p(e,"before:destroy",e);var t=e._isAttached&&!e._shouldDisableEvents;t&&p(e,"before:detach",e),e.remove(),t&&(e._isAttached=!1,p(e,"detach",e)),e._isDestroyed=!0,e.supportsDestroyLifecycle||p(e,"destroy",e)}}t.extend(ne,q,M,W,X,J);var oe=["allowMissingEl","parentEl","replaceElement"],ae=F.extend({Dom:te,cidPrefix:"mnr",replaceElement:!1,_isReplaced:!1,_isSwappingView:!1,constructor:function(t){if(this._setOptions(t),this.mergeOptions(t,oe),this._initEl=this.el=this.getOption("el"),this.el=this.el instanceof e.$?this.el[0]:this.el,!this.el)throw new R({name:"NoElError",message:'An "el" must be specified for a region.'});this.$el=this.getEl(this.el),F.call(this,t)},show:function(e,t){if(this._ensureElement(t))return(e=this._getView(e,t))===this.currentView||(this._isSwappingView=!!this.currentView,this.triggerMethod("before:show",this,e,t),e._isAttached||this.empty(t),this._setupChildView(e),this.currentView=e,re(e),this._attachView(e,t),this.triggerMethod("show",this,e,t),this._isSwappingView=!1),this},_setupChildView:function(e){O(e),this._proxyChildViewEvents(e),e.on("destroy",this._empty,this)},_proxyChildViewEvents:function(e){var t=this._parentView;t&&t._proxyChildViewEvents(e)},_shouldDisableMonitoring:function(){return this._parentView&&!1===this._parentView.monitorViewEvents},_attachView:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!e._isAttached&&a(this.el)&&!this._shouldDisableMonitoring(),i=void 0===n.replaceElement?!!t.result(this,"replaceElement"):!!n.replaceElement;r&&p(e,"before:attach",e),i?this._replaceEl(e):this.attachHtml(e),r&&(e._isAttached=!0,p(e,"attach",e))},_ensureElement:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isObject(this.el)||(this.$el=this.getEl(this.el),this.el=this.$el[0],this.$el=this.Dom.getEl(this.el)),!this.$el||0===this.$el.length){var n=void 0===e.allowMissingEl?!!t.result(this,"allowMissingEl"):!!e.allowMissingEl;if(n)return!1;throw new R('An "el" must exist in DOM for this region '+this.cid)}return!0},_getView:function(t){if(!t)throw new R({name:"ViewNotValid",message:"The view passed is undefined and therefore invalid. You must pass a view instance to show."});if(t._isDestroyed)throw new R({name:"ViewDestroyedError",message:'View (cid: "'+t.cid+'") has already been destroyed and cannot be used.'});if(t instanceof e.View)return t;var n=this._getViewOptions(t);return new he(n)},_getViewOptions:function(e){return t.isFunction(e)?{template:e}:t.isObject(e)?e:{template:function(){return e}}},getEl:function(e){var n=t.result(this,"parentEl");return n&&t.isString(e)?this.Dom.findEl(n,e):this.Dom.getEl(e)},_replaceEl:function(e){this._restoreEl(),e.on("before:destroy",this._restoreEl,this),this.Dom.replaceEl(e.el,this.el),this._isReplaced=!0},_restoreEl:function(){if(this._isReplaced){var e=this.currentView;e&&(this._detachView(e),this._isReplaced=!1)}},isReplaced:function(){return!!this._isReplaced},isSwappingView:function(){return!!this._isSwappingView},attachHtml:function(e){this.Dom.appendContents(this.el,e.el,{_$el:this.$el,_$contents:e.$el})},empty:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{allowMissingEl:!0},t=this.currentView;if(!t)return this._ensureElement(e)&&this.detachHtml(),this;var n=!e.preventDestroy;return n||o("The preventDestroy option is deprecated. Use Region#detachView"),this._empty(t,n),this},_empty:function(e,t){e.off("destroy",this._empty,this),this.triggerMethod("before:empty",this,e),this._restoreEl(),delete this.currentView,e._isDestroyed||(t?this.removeView(e):this._detachView(e),this._stopChildViewEvents(e)),this.triggerMethod("empty",this,e)},_stopChildViewEvents:function(e){this._parentView&&this._parentView.stopListening(e)},destroyView:function(e){return e._isDestroyed||(e._shouldDisableEvents=this._shouldDisableMonitoring(),ie(e)),e},removeView:function(e){this.destroyView(e)},detachView:function(){var e=this.currentView;if(e)return this._empty(e),e},_detachView:function(e){var t=e._isAttached&&!this._shouldDisableMonitoring(),n=this._isReplaced;t&&p(e,"before:detach",e),n?this.Dom.replaceEl(this.el,e.el):this.detachHtml(),t&&(e._isAttached=!1,p(e,"detach",e))},detachHtml:function(){this.Dom.detachContents(this.el,this.$el)},hasView:function(){return!!this.currentView},reset:function(e){return this.empty(e),this.$el&&(this.el=this._initEl),delete this.$el,this},destroy:function(e){return this._isDestroyed?this:(this.reset(e),this._name&&this._parentView._removeReferences(this._name),delete this._parentView,delete this._name,F.prototype.destroy.apply(this,arguments))}},{setDomApi:ee}),se=function(e,n){return e instanceof ae?e:function(e,n){var r=t.extend({},n);if(t.isString(e))return t.extend(r,{el:e}),ue(r);if(t.isFunction(e))return t.extend(r,{regionClass:e}),ue(r);if(t.isObject(e))return e.selector&&o("The selector option on a Region definition object is deprecated. Use el to pass a selector string"),t.extend(r,{el:e.selector},e),ue(r);throw new R({message:"Improper region configuration type.",url:"marionette.region.html#region-configuration-types"})}(e,n)};function ue(e){return new(0,e.regionClass)(t.omit(e,"regionClass"))}var le={regionClass:ae,_initRegions:function(){this.regions=this.regions||{},this._regions={},this.addRegions(t.result(this,"regions"))},_reInitRegions:function(){H(this._regions,"reset")},addRegion:function(e,t){var n={};return n[e]=t,this.addRegions(n)[e]},addRegions:function(e){if(!t.isEmpty(e))return e=this.normalizeUIValues(e,["selector","el"]),this.regions=t.extend({},this.regions,e),this._addRegions(e)},_addRegions:function(e){var n=this,r={regionClass:this.regionClass,parentEl:t.partial(t.result,this,"el")};return t.reduce(e,(function(e,t,i){return e[i]=se(t,r),n._addRegion(e[i],i),e}),{})},_addRegion:function(e,t){this.triggerMethod("before:add:region",this,t,e),e._parentView=this,e._name=t,this._regions[t]=e,this.triggerMethod("add:region",this,t,e)},removeRegion:function(e){var t=this._regions[e];return this._removeRegion(t,e),t},removeRegions:function(){var e=this._getRegions();return t.each(this._regions,t.bind(this._removeRegion,this)),e},_removeRegion:function(e,t){this.triggerMethod("before:remove:region",this,t,e),e.destroy(),this.triggerMethod("remove:region",this,t,e)},_removeReferences:function(e){delete this.regions[e],delete this._regions[e]},emptyRegions:function(){var e=this.getRegions();return H(e,"empty"),e},hasRegion:function(e){return!!this.getRegion(e)},getRegion:function(e){return this._isRendered||this.render(),this._regions[e]},_getRegions:function(){return t.clone(this._regions)},getRegions:function(){return this._isRendered||this.render(),this._getRegions()},showChildView:function(e,t){for(var n=this.getRegion(e),r=arguments.length,i=Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return n.show.apply(n,[t].concat(i))},detachChildView:function(e){return this.getRegion(e).detachView()},getChildView:function(e){return this.getRegion(e).currentView}},ce={render:function(e,n){if(!e)throw new R({name:"TemplateNotFoundError",message:"Cannot render the template since its false, null or undefined."});return(t.isFunction(e)?e:V.get(e))(n)}},fe=["behaviors","childViewEventPrefix","childViewEvents","childViewTriggers","collectionEvents","events","modelEvents","regionClass","regions","template","templateContext","triggers","ui"],he=e.View.extend({constructor:function(n){this.render=t.bind(this.render,this),this._setOptions(n),this.mergeOptions(n,fe),O(this),this._initBehaviors(),this._initRegions();var r=Array.prototype.slice.call(arguments);r[0]=this.options,e.View.prototype.constructor.apply(this,r),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this)},serializeData:function(){return this.model||this.collection?this.model?this.serializeModel():{items:this.serializeCollection()}:{}},serializeModel:function(){return this.model?t.clone(this.model.attributes):{}},serializeCollection:function(){return this.collection?this.collection.map((function(e){return t.clone(e.attributes)})):{}},setElement:function(){return e.View.prototype.setElement.apply(this,arguments),this._isRendered=this.Dom.hasContents(this.el),this._isAttached=a(this.el),this._isRendered&&this.bindUIElements(),this},render:function(){return this._isDestroyed||(this.triggerMethod("before:render",this),this._isRendered&&this._reInitRegions(),this._renderTemplate(),this.bindUIElements(),this._isRendered=!0,this.triggerMethod("render",this)),this},_renderTemplate:function(){var e=this.getTemplate();if(!1!==e){var t=this.mixinTemplateContext(this.serializeData()),n=this._renderHtml(e,t);this.attachElContent(n)}else o("template:false is deprecated. Use _.noop.")},_renderHtml:function(e,t){return ce.render(e,t,this)},getTemplate:function(){return this.template},mixinTemplateContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.result(this,"templateContext");return t.extend(e,n)},attachElContent:function(e){return this.Dom.setContents(this.el,e,this.$el),this},_removeChildren:function(){this.removeRegions()},_getImmediateChildren:function(){return t.chain(this._getRegions()).map("currentView").compact().value()}},{setRenderer:function(e){return this.prototype._renderHtml=e,this},setDomApi:ee});t.extend(he.prototype,ne,le);var de=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce","partition"],pe=function(e,n){t.each(de,(function(r){e[r]=function(){var e=t.result(this,n),i=Array.prototype.slice.call(arguments);return t[r].apply(t,[e].concat(i))}}))},ye=function(e){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),t.each(e,t.bind(this.add,this))};pe(ye.prototype,"_getViews"),t.extend(ye.prototype,{_getViews:function(){return t.values(this._views)},add:function(e,t){return this._add(e,t)._updateLength()},_add:function(e,t){var n=e.cid;return this._views[n]=e,e.model&&(this._indexByModel[e.model.cid]=n),t&&(this._indexByCustom[t]=n),this},findByModel:function(e){return this.findByModelCid(e.cid)},findByModelCid:function(e){var t=this._indexByModel[e];return this.findByCid(t)},findByCustom:function(e){var t=this._indexByCustom[e];return this.findByCid(t)},findByIndex:function(e){return t.values(this._views)[e]},findByCid:function(e){return this._views[e]},remove:function(e){return this._remove(e)._updateLength()},_remove:function(e){var n=e.cid;return e.model&&delete this._indexByModel[e.model.cid],t.some(this._indexByCustom,t.bind((function(e,t){if(e===n)return delete this._indexByCustom[t],!0}),this)),delete this._views[n],this},_updateLength:function(){return this.length=t.size(this._views),this}});var me=["behaviors","childView","childViewEventPrefix","childViewEvents","childViewOptions","childViewTriggers","collectionEvents","events","filter","emptyView","emptyViewOptions","modelEvents","reorderOnSort","sort","triggers","ui","viewComparator"],ge=e.View.extend({sort:!0,constructor:function(n){this.render=t.bind(this.render,this),this._setOptions(n),this.mergeOptions(n,me),O(this),this._initBehaviors(),this.once("render",this._initialEvents),this._initChildViewStorage(),this._bufferedChildren=[];var r=Array.prototype.slice.call(arguments);r[0]=this.options,e.View.prototype.constructor.apply(this,r),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this)},_startBuffering:function(){this._isBuffering=!0},_endBuffering:function(){var e=this._isAttached&&!1!==this.monitorViewEvents?this._getImmediateChildren():[];this._isBuffering=!1,t.each(e,(function(e){p(e,"before:attach",e)})),this.attachBuffer(this,this._createBuffer()),t.each(e,(function(e){e._isAttached=!0,p(e,"attach",e)})),this._bufferedChildren=[]},_getImmediateChildren:function(){return t.values(this.children._views)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"update",this._onCollectionUpdate),this.listenTo(this.collection,"reset",this.render),this.sort&&this.listenTo(this.collection,"sort",this._sortViews))},_onCollectionAdd:function(e,n,r){var i=void 0!==r.at&&(r.index||n.indexOf(e));(this.filter||!1===i)&&(i=t.indexOf(this._filteredSortedModels(i),e)),this._shouldAddChild(e,i)&&(this._destroyEmptyView(),this._addChild(e,i))},_onCollectionUpdate:function(e,t){var n=t.changes;this._removeChildModels(n.removed)},_removeChildModels:function(e){var t=this._getRemovedViews(e);t.length&&(this.children._updateLength(),this._updateIndices(t,!1),this.isEmpty()&&this._showEmptyView())},_getRemovedViews:function(e){var n=this;return t.reduce(e,(function(e,t){var r=t&&n.children.findByModel(t);return!r||r._isDestroyed||(n._removeChildView(r),e.push(r)),e}),[])},_removeChildView:function(e){this.triggerMethod("before:remove:child",this,e),this.children._remove(e),e._shouldDisableEvents=!1===this.monitorViewEvents,ie(e),this.stopListening(e),this.triggerMethod("remove:child",this,e)},setElement:function(){return e.View.prototype.setElement.apply(this,arguments),this._isAttached=a(this.el),this},render:function(){return this._isDestroyed||(this.triggerMethod("before:render",this),this._renderChildren(),this._isRendered=!0,this.triggerMethod("render",this)),this},setFilter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preventRender,r=this._isRendered&&!this._isDestroyed,i=this.filter!==e,o=r&&i&&!n;if(o){var a=this._filteredSortedModels();this.filter=e;var s=this._filteredSortedModels();this._applyModelDeltas(s,a)}else this.filter=e;return this},removeFilter:function(e){return this.setFilter(null,e)},_applyModelDeltas:function(e,n){var r=this,i={};t.each(e,(function(e,t){!r.children.findByModel(e)&&r._onCollectionAdd(e,r.collection,{at:t}),i[e.cid]=!0}));var o=t.filter(n,(function(e){return!i[e.cid]&&r.children.findByModel(e)}));this._removeChildModels(o)},reorder:function(){var e=this,n=this.children,r=this._filteredSortedModels();if(!r.length&&this._showingEmptyView)return this;if(t.some(r,(function(e){return!n.findByModel(e)})))this.render();else{var i=[],o=t.reduce(this.children._views,(function(e,n){var o=t.indexOf(r,n.model);return-1===o?(i.push(n.model),e):(n._index=o,e[o]=n.el,e)}),new Array(r.length));this.triggerMethod("before:reorder",this);var a=this.Dom.createBuffer();t.each(o,(function(t){e.Dom.appendContents(a,t)})),this._appendReorderedChildren(a),this._removeChildModels(i),this.triggerMethod("reorder",this)}return this},resortView:function(){return this.reorderOnSort?this.reorder():this._renderChildren(),this},_sortViews:function(){var e=this,n=this._filteredSortedModels();t.find(n,(function(t,n){var r=e.children.findByModel(t);return!r||r._index!==n}))&&this.resortView()},_emptyViewIndex:-1,_appendReorderedChildren:function(e){this.Dom.appendContents(this.el,e,{_$el:this.$el})},_renderChildren:function(){this._isRendered&&(this._destroyEmptyView(),this._destroyChildren());var e=this._filteredSortedModels();this.isEmpty({processedModels:e})?this._showEmptyView():(this.triggerMethod("before:render:children",this),this._startBuffering(),this._showCollection(e),this._endBuffering(),this.triggerMethod("render:children",this))},_createView:function(e,t){var n=this._getChildView(e),r=this._getChildViewOptions(e,t);return this.buildChildView(e,n,r)},_setupChildView:function(e,t){O(e),this._proxyChildViewEvents(e),this.sort&&(e._index=t)},_showCollection:function(e){t.each(e,t.bind(this._addChild,this)),this.children._updateLength()},_filteredSortedModels:function(e){if(!this.collection||!this.collection.length)return[];var t=this.getViewComparator(),n=this.collection.models;if(e=Math.min(Math.max(e,0),n.length-1),t){var r=void 0;e&&(r=n[e],n=n.slice(0,e).concat(n.slice(e+1))),n=this._sortModelsBy(n,t),r&&n.splice(e,0,r)}return n=this._filterModels(n)},getViewComparator:function(){return this.viewComparator},_filterModels:function(e){var n=this;return this.filter&&(e=t.filter(e,(function(e,t){return n._shouldAddChild(e,t)}))),e},_sortModelsBy:function(e,n){return"string"==typeof n?t.sortBy(e,(function(e){return e.get(n)})):1===n.length?t.sortBy(e,t.bind(n,this)):t.clone(e).sort(t.bind(n,this))},_showEmptyView:function(){var n=this._getEmptyView();if(n&&!this._showingEmptyView){this._showingEmptyView=!0;var r=new e.Model,i=this.emptyViewOptions||this.childViewOptions;t.isFunction(i)&&(i=i.call(this,r,this._emptyViewIndex));var o=this.buildChildView(r,n,i);this.triggerMethod("before:render:empty",this,o),this.addChildView(o,0),this.triggerMethod("render:empty",this,o)}},_destroyEmptyView:function(){this._showingEmptyView&&(this.triggerMethod("before:remove:empty",this),this._destroyChildren(),delete this._showingEmptyView,this.triggerMethod("remove:empty",this))},_getEmptyView:function(){var e=this.emptyView;if(e)return this._getView(e)},_getChildView:function(e){var t=this.childView;if(!t)throw new R({name:"NoChildViewError",message:'A "childView" must be specified'});if(!(t=this._getView(t,e)))throw new R({name:"InvalidChildViewError",message:'"childView" must be a view class or a function that returns a view class'});return t},_getView:function(n,r){return n.prototype instanceof e.View||n===e.View?n:t.isFunction(n)?n.call(this,r):void 0},_addChild:function(e,t){var n=this._createView(e,t);return this.addChildView(n,t),n},_getChildViewOptions:function(e,n){return t.isFunction(this.childViewOptions)?this.childViewOptions(e,n):this.childViewOptions},addChildView:function(e,t){return this.triggerMethod("before:add:child",this,e),this._setupChildView(e,t),this._isBuffering?this.children._add(e):(this._updateIndices(e,!0),this.children.add(e)),re(e),this._attachView(e,t),this.triggerMethod("add:child",this,e),e},_updateIndices:function(e,n){if(this.sort)if(n){var r=t.isArray(e)?t.max(e,"_index"):e;t.isObject(r)&&t.each(this.children._views,(function(e){e._index>=r._index&&(e._index+=1)}))}else t.each(t.sortBy(this.children._views,"_index"),(function(e,t){e._index=t}))},_attachView:function(e,t){var n=!e._isAttached&&!this._isBuffering&&this._isAttached&&!1!==this.monitorViewEvents;n&&p(e,"before:attach",e),this.attachHtml(this,e,t),n&&(e._isAttached=!0,p(e,"attach",e))},buildChildView:function(e,n,r){return new n(t.extend({model:e},r))},removeChildView:function(e){return!e||e._isDestroyed||(this._removeChildView(e),this.children._updateLength(),this._updateIndices(e,!1)),e},isEmpty:function(e){var n=void 0;return t.result(e,"processedModels")?n=e.processedModels:(n=this.collection?this.collection.models:[],n=this._filterModels(n)),0===n.length},attachBuffer:function(e,t){this.Dom.appendContents(e.el,t,{_$el:e.$el})},_createBuffer:function(){var e=this,n=this.Dom.createBuffer();return t.each(this._bufferedChildren,(function(t){e.Dom.appendContents(n,t.el,{_$contents:t.$el})})),n},attachHtml:function(e,t,n){e._isBuffering?e._bufferedChildren.splice(n,0,t):e._insertBefore(t,n)||e._insertAfter(t)},_insertBefore:function(e,n){var r=void 0;return this.sort&&n<this.children.length-1&&(r=t.find(this.children._views,(function(e){return e._index===n+1}))),!!r&&(this.beforeEl(r.el,e.el),!0)},beforeEl:function(e,t){this.$(e).before(t)},_insertAfter:function(e){this.Dom.appendContents(this.el,e.el,{_$el:this.$el,_$contents:e.$el})},_initChildViewStorage:function(){this.children=new ye},_removeChildren:function(){this._destroyChildren()},_destroyChildren:function(e){this.children.length&&(this.triggerMethod("before:destroy:children",this),t.each(this.children._views,t.bind(this._removeChildView,this)),this.children._updateLength(),this.triggerMethod("destroy:children",this))},_shouldAddChild:function(e,n){var r=this.filter;return!t.isFunction(r)||r.call(this,e,n,this.collection)}},{setDomApi:ee});t.extend(ge.prototype,ne);var ve=function(){this._init()};function be(e,t){return t.model&&t.model.get(e)}pe(ve.prototype,"_views"),t.extend(ve.prototype,{_init:function(){this._views=[],this._viewsByCid={},this._indexByModel={},this._updateLength()},_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._views.length,n=e.cid;this._viewsByCid[n]=e,e.model&&(this._indexByModel[e.model.cid]=n),this._views.splice(t,0,e),this._updateLength()},_sort:function(e,n){return"string"==typeof e?(e=t.partial(be,e),this._sortBy(e)):1===e.length?this._sortBy(t.bind(e,n)):this._views.sort(t.bind(e,n))},_sortBy:function(e){var n=t.sortBy(this._views,e);return this._set(n),n},_set:function(e){this._views.length=0,this._views.push.apply(this._views,e.slice(0)),this._updateLength()},_swap:function(e,t){var n=this.findIndexByView(e),r=this.findIndexByView(t);if(-1!==n&&-1!==r){var i=this._views[n];this._views[n]=this._views[r],this._views[r]=i}},findByModel:function(e){return this.findByModelCid(e.cid)},findByModelCid:function(e){var t=this._indexByModel[e];return this.findByCid(t)},findByIndex:function(e){return this._views[e]},findIndexByView:function(e){return this._views.indexOf(e)},findByCid:function(e){return this._viewsByCid[e]},hasView:function(e){return!!this.findByCid(e.cid)},_remove:function(e){if(this._viewsByCid[e.cid]){e.model&&delete this._indexByModel[e.model.cid],delete this._viewsByCid[e.cid];var t=this.findIndexByView(e);this._views.splice(t,1),this._updateLength()}},_updateLength:function(){this.length=this._views.length}});var _e=["behaviors","childView","childViewEventPrefix","childViewEvents","childViewOptions","childViewTriggers","collectionEvents","emptyView","emptyViewOptions","events","modelEvents","sortWithCollection","triggers","ui","viewComparator","viewFilter"],we=e.View.extend({sortWithCollection:!0,constructor:function(t){this._setOptions(t),this.mergeOptions(t,_e),O(this),this.once("render",this._initialEvents),this._initChildViewStorage(),this._initBehaviors();var n=Array.prototype.slice.call(arguments);n[0]=this.options,e.View.prototype.constructor.apply(this,n),this.getEmptyRegion(),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this)},_initChildViewStorage:function(){this.children=new ve},getEmptyRegion:function(){return this._emptyRegion&&!this._emptyRegion.isDestroyed()||(this._emptyRegion=new ae({el:this.el,replaceElement:!1}),this._emptyRegion._parentView=this),this._emptyRegion},_initialEvents:function(){this.listenTo(this.collection,{sort:this._onCollectionSort,reset:this._onCollectionReset,update:this._onCollectionUpdate})},_onCollectionSort:function(e,t){var n=t.add,r=t.merge,i=t.remove;this.sortWithCollection&&!1!==this.viewComparator&&(n||i||r||this.sort())},_onCollectionReset:function(){this.render()},_onCollectionUpdate:function(e,t){var n=t.changes,r=n.removed.length&&this._removeChildModels(n.removed);this._addedViews=n.added.length&&this._addChildModels(n.added),this._detachChildren(r),this._showChildren(),this._removeChildViews(r)},_removeChildModels:function(e){var n=this;return t.reduce(e,(function(e,t){var r=n._removeChildModel(t);return r&&e.push(r),e}),[])},_removeChildModel:function(e){var t=this.children.findByModel(e);return t&&this._removeChild(t),t},_removeChild:function(e){this.triggerMethod("before:remove:child",this,e),this.children._remove(e),this.triggerMethod("remove:child",this,e)},_addChildModels:function(e){return t.map(e,t.bind(this._addChildModel,this))},_addChildModel:function(e){var t=this._createChildView(e);return this._addChild(t),t},_createChildView:function(e){var t=this._getChildView(e),n=this._getChildViewOptions(e);return this.buildChildView(e,t,n)},_addChild:function(e,t){this.triggerMethod("before:add:child",this,e),this._setupChildView(e),this.children._add(e,t),this.triggerMethod("add:child",this,e)},_getChildView:function(e){var t=this.childView;if(!t)throw new R({name:"NoChildViewError",message:'A "childView" must be specified'});if(!(t=this._getView(t,e)))throw new R({name:"InvalidChildViewError",message:'"childView" must be a view class or a function that returns a view class'});return t},_getView:function(n,r){return n.prototype instanceof e.View||n===e.View?n:t.isFunction(n)?n.call(this,r):void 0},_getChildViewOptions:function(e){return t.isFunction(this.childViewOptions)?this.childViewOptions(e):this.childViewOptions},buildChildView:function(e,n,r){return new n(t.extend({model:e},r))},_setupChildView:function(e){O(e),e.on("destroy",this.removeChildView,this),this._proxyChildViewEvents(e)},_getImmediateChildren:function(){return this.children._views},setElement:function(){return e.View.prototype.setElement.apply(this,arguments),this._isAttached=a(this.el),this},render:function(){return this._isDestroyed||(this.triggerMethod("before:render",this),this._destroyChildren(),this.children._init(),this.collection&&this._addChildModels(this.collection.models),this._showChildren(),this._isRendered=!0,this.triggerMethod("render",this)),this},sort:function(){return this._isDestroyed?this:this.children.length?(this._showChildren(),this):this},_showChildren:function(){this.isEmpty()?this._showEmptyView():(this._sortChildren(),this.filter())},isEmpty:function(e){return e||!this.children.length},_showEmptyView:function(){var e=this._getEmptyView();if(e){var t=this._getEmptyViewOptions();this.getEmptyRegion().show(new e(t))}},_getEmptyView:function(){var e=this.emptyView;if(e)return this._getView(e)},_destroyEmptyView:function(){var e=this.getEmptyRegion();e.hasView()&&e.empty()},_getEmptyViewOptions:function(){var e=this.emptyViewOptions||this.childViewOptions;return t.isFunction(e)?e.call(this):e},_sortChildren:function(){var e=this.getComparator();e&&(delete this._addedViews,this.triggerMethod("before:sort",this),this.children._sort(e,this),this.triggerMethod("sort",this))},setComparator:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preventRender,r=this.viewComparator!==e,i=r&&!n;return this.viewComparator=e,i&&this.sort(),this},removeComparator:function(e){return this.setComparator(null,e)},getComparator:function(){return this.viewComparator?this.viewComparator:!(!this.sortWithCollection||!1===this.viewComparator||!this.collection)&&this._viewComparator},_viewComparator:function(e){return this.collection.indexOf(e.model)},filter:function(){if(this._isDestroyed)return this;if(!this.children.length)return this;var e=this._filterChildren();return this._renderChildren(e),this},_filterChildren:function(){var e=this,n=this._getFilter(),r=this._addedViews;if(delete this._addedViews,!n)return r||this.children._views;this.triggerMethod("before:filter",this);var i=[],o=[];return t.each(this.children._views,(function(t,r,a){(n.call(e,t,r,a)?i:o).push(t)})),this._detachChildren(o),this.triggerMethod("filter",this,i,o),i},_getFilter:function(){var e=this.getFilter();if(!e)return!1;if(t.isFunction(e))return e;if(t.isObject(e)){var n=t.matches(e);return function(e){return n(e.model&&e.model.attributes)}}if(t.isString(e))return function(t){return t.model&&t.model.get(e)};throw new R({name:"InvalidViewFilterError",message:'"viewFilter" must be a function, predicate object literal, a string indicating a model attribute, or falsy'})},getFilter:function(){return this.viewFilter},setFilter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preventRender,r=this.viewFilter!==e,i=r&&!n;return this.viewFilter=e,i&&this.filter(),this},removeFilter:function(e){return this.setFilter(null,e)},_detachChildren:function(e){t.each(e,t.bind(this._detachChildView,this))},_detachChildView:function(e){var t=e._isAttached&&!1!==this.monitorViewEvents;t&&p(e,"before:detach",e),this.detachHtml(e),t&&(e._isAttached=!1,p(e,"detach",e))},detachHtml:function(e){this.Dom.detachEl(e.el,e.$el)},_renderChildren:function(e){if(this.isEmpty(!e.length))this._showEmptyView();else{this._destroyEmptyView(),this.triggerMethod("before:render:children",this,e);var t=this._getBuffer(e);this._attachChildren(t,e),this.triggerMethod("render:children",this,e)}},_attachChildren:function(e,n){n=this._isAttached&&!1!==this.monitorViewEvents?n:[],t.each(n,(function(e){e._isAttached||p(e,"before:attach",e)})),this.attachHtml(e),t.each(n,(function(e){e._isAttached||(e._isAttached=!0,p(e,"attach",e))}))},_getBuffer:function(e){var n=this,r=this.Dom.createBuffer();return t.each(e,(function(e){re(e),n.Dom.appendContents(r,e.el,{_$contents:e.$el})})),r},attachHtml:function(e){this.Dom.appendContents(this.el,e,{_$el:this.$el})},swapChildViews:function(e,t){if(!this.children.hasView(e)||!this.children.hasView(t))throw new R({name:"ChildSwapError",message:"Both views must be children of the collection view"});return this.children._swap(e,t),this.Dom.swapEl(e.el,t.el),this.Dom.hasEl(this.el,e.el)!==this.Dom.hasEl(this.el,t.el)&&this.filter(),this},addChildView:function(e,t){return!e||e._isDestroyed||((!t||t>=this.children.length)&&(this._addedViews=[e]),this._addChild(e,t),this._showChildren()),e},detachChildView:function(e){return this.removeChildView(e,{shouldDetach:!0}),e},removeChildView:function(e,t){return e?(this._removeChildView(e,t),this._removeChild(e),this.isEmpty()&&this._showEmptyView(),e):e},_removeChildViews:function(e){t.each(e,t.bind(this._removeChildView,this))},_removeChildView:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.shouldDetach;e.off("destroy",this.removeChildView,this),n?this._detachChildView(e):this._destroyChildView(e),this.stopListening(e)},_destroyChildView:function(e){e._isDestroyed||(e._shouldDisableEvents=!1===this.monitorViewEvents,ie(e))},_removeChildren:function(){this._destroyChildren(),this.getEmptyRegion().destroy(),delete this._addedViews},_destroyChildren:function(){this.children&&this.children.length&&(this.triggerMethod("before:destroy:children",this),!1===this.monitorViewEvents&&this.Dom.detachContents(this.el,this.$el),t.each(this.children._views,t.bind(this._removeChildView,this)),this.triggerMethod("destroy:children",this))}},{setDomApi:ee});t.extend(we.prototype,ne);var Te=["childViewContainer","template","templateContext"],Se=ge.extend({constructor:function(e){o("CompositeView is deprecated. Convert to View at your earliest convenience"),this.mergeOptions(e,Te),ge.prototype.constructor.apply(this,arguments)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"update",this._onCollectionUpdate),this.listenTo(this.collection,"reset",this.renderChildren),this.sort&&this.listenTo(this.collection,"sort",this._sortViews))},_getChildView:function(e){var t=this.childView;if(!t)return this.constructor;if(!(t=this._getView(t,e)))throw new R({name:"InvalidChildViewError",message:'"childView" must be a view class or a function that returns a view class'});return t},serializeData:function(){return this.serializeModel()},render:function(){return this._isDestroyed||(this._isRendering=!0,this.resetChildViewContainer(),this.triggerMethod("before:render",this),this._renderTemplate(),this.bindUIElements(),this.renderChildren(),this._isRendering=!1,this._isRendered=!0,this.triggerMethod("render",this)),this},renderChildren:function(){(this._isRendered||this._isRendering)&&ge.prototype._renderChildren.call(this)},attachBuffer:function(e,t){var n=this.getChildViewContainer(e);this.Dom.appendContents(n[0],t,{_$el:n})},_insertAfter:function(e){var t=this.getChildViewContainer(this,e);this.Dom.appendContents(t[0],e.el,{_$el:t,_$contents:e.$el})},_appendReorderedChildren:function(e){var t=this.getChildViewContainer(this);this.Dom.appendContents(t[0],e,{_$el:t})},getChildViewContainer:function(e,n){if(e.$childViewContainer)return e.$childViewContainer;var r=void 0;if(e.childViewContainer){var i=t.result(e,"childViewContainer");if((r="@"===i.charAt(0)&&e.ui?e.ui[i.substr(4)]:this.$(i)).length<=0)throw new R({name:"ChildViewContainerMissingError",message:'The specified "childViewContainer" was not found: '+e.childViewContainer})}else r=e.$el;return e.$childViewContainer=r,r},resetChildViewContainer:function(){this.$childViewContainer&&(this.$childViewContainer=void 0)}}),Ee=t.pick(he.prototype,"serializeModel","getTemplate","_renderTemplate","_renderHtml","mixinTemplateContext","attachElContent");t.extend(Se.prototype,Ee);var Ce=["collectionEvents","events","modelEvents","triggers","ui"],ke=F.extend({cidPrefix:"mnb",constructor:function(e,n){this.view=n,this.defaults&&o("Behavior defaults are deprecated. For similar functionality set options on the Behavior class."),this.defaults=t.clone(t.result(this,"defaults",{})),this._setOptions(t.extend({},this.defaults,e)),this.mergeOptions(this.options,Ce),this.ui=t.extend({},t.result(this,"ui"),t.result(n,"ui")),F.apply(this,arguments)},$:function(){return this.view.$.apply(this.view,arguments)},destroy:function(){return this.stopListening(),this.view._removeBehavior(this),this},proxyViewProperties:function(){return this.$el=this.view.$el,this.el=this.view.el,this},bindUIElements:function(){return this._bindUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this},getUI:function(e){return this._getUI(e)},delegateEntityEvents:function(){return this._delegateEntityEvents(this.view.model,this.view.collection),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.view.model,this.view.collection),this},getEvents:function(){var e=this,n=this.normalizeUIKeys(t.result(this,"events"));return t.reduce(n,(function(n,r,i){return t.isFunction(r)||(r=e[r]),r?(n[i=G(i,e.cid)]=t.bind(r,e),n):n}),{})},getTriggers:function(){if(this.triggers){var e=this.normalizeUIKeys(t.result(this,"triggers"));return this._getViewTriggers(this.view,e)}}});t.extend(ke.prototype,W,X,J);var xe=["region","regionClass"],Oe=F.extend({cidPrefix:"mna",constructor:function(e){this._setOptions(e),this.mergeOptions(e,xe),this._initRegion(),F.prototype.constructor.apply(this,arguments)},regionClass:ae,_initRegion:function(){var e=this.region;if(e){var t={regionClass:this.regionClass};this._region=se(e,t)}},getRegion:function(){return this._region},showView:function(e){for(var t=this.getRegion(),n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.show.apply(t,[e].concat(r))},getView:function(){return this.getRegion().currentView},start:function(e){return this.triggerMethod("before:start",this,e),this.triggerMethod("start",this,e),this}}),Pe=["appRoutes","controller"],Re=e.Router.extend({constructor:function(t){this._setOptions(t),this.mergeOptions(t,Pe),e.Router.apply(this,arguments);var n=this.appRoutes,r=this._getController();this.processAppRoutes(r,n),this.on("route",this._processOnRoute,this)},appRoute:function(e,t){var n=this._getController();return this._addAppRoute(n,e,t),this},_processOnRoute:function(e,n){if(t.isFunction(this.onRoute)){var r=t.invert(this.appRoutes)[e];this.onRoute(e,r,n)}},processAppRoutes:function(e,n){var r=this;if(!n)return this;var i=t.keys(n).reverse();return t.each(i,(function(t){r._addAppRoute(e,t,n[t])})),this},_getController:function(){return this.controller},_addAppRoute:function(e,n,r){var i=e[r];if(!i)throw new R('Method "'+r+'" was not found on the controller');this.route(n,r,t.bind(i,e))},triggerMethod:d});t.extend(Re.prototype,M);var Ae=e.Marionette,Ie=e.Marionette={};return Ie.noConflict=function(){return e.Marionette=Ae,this},Ie.bindEvents=r(I),Ie.unbindEvents=r(L),Ie.bindRequests=r(D),Ie.unbindRequests=r(N),Ie.mergeOptions=r(s),Ie.getOption=r(u),Ie.normalizeMethods=r(l),Ie.extend=i,Ie.isNodeAttached=a,Ie.deprecate=o,Ie.triggerMethod=r(d),Ie.triggerMethodOn=p,Ie.isEnabled=K,Ie.setEnabled=function(e,t){return Y[e]=t},Ie.monitorViewEvents=O,Ie.Behaviors={},Ie.Behaviors.behaviorsLookup=function(){throw new R({message:"You must define where your behaviors are stored.",url:"marionette.behaviors.md#behaviorslookup"})},Ie.Application=Oe,Ie.AppRouter=Re,Ie.Renderer=ce,Ie.TemplateCache=V,Ie.View=he,Ie.CollectionView=ge,Ie.NextCollectionView=we,Ie.CompositeView=Se,Ie.Behavior=ke,Ie.Region=ae,Ie.Error=R,Ie.Object=F,Ie.DEV_MODE=!1,Ie.FEATURES=Y,Ie.VERSION="3.5.1",Ie.DomApi=te,Ie.setDomApi=function(e){ge.setDomApi(e),Se.setDomApi(e),we.setDomApi(e),ae.setDomApi(e),he.setDomApi(e)},Ie}(n(10),n(4),n(424)),this&&this.Marionette&&(this.Mn=this.Marionette)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(73),i=n(26);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(17),i=n(27),o=n(61);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(26),i=/"/g;e.exports=function(e,t,n,o){var a=String(r(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(o).replace(i,"&quot;")+'"'),s+">"+a+"</"+t+">"}},function(e,t,n){var r=n(11);e.exports=function(e){return r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){var r,i,o,a=n(149),s=n(14),u=n(18),l=n(33),c=n(36),f=n(86),h=n(75),d=s.WeakMap;if(a){var p=new d,y=p.get,m=p.has,g=p.set;r=function(e,t){return g.call(p,e,t),t},i=function(e){return y.call(p,e)||{}},o=function(e){return m.call(p,e)}}else{var v=f("state");h[v]=!0,r=function(e,t){return l(e,v,t),t},i=function(e){return c(e,v)?e[v]:{}},o=function(e){return c(e,v)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(4),i=n(10),o=n(23),a=n(13),s=n(12),u={GetQuery:function(){return u.DeserializeQueryParams(window.location.search.substring(1))},UpdateQuery:function(e){if(e){var t=u.GetQuery(),n=u.SerializeQueryParams(r.extend(t,e));n&&(n="?".concat(n)),u.UpdateUrl("".concat(u.GetCurrentPath()).concat(n),null,{replace:!0,trigger:!1})}},UpdateUrl:function(e,t,n){var r=o.a.buildRoute(e,t);i.history.navigate(r,n),i.Radio.channel(s.a.SHELL).trigger(a.a.URL_CHANGE,t,n)},SerializeQueryParams:function(e){if(!e)return"";if("string"==typeof e)return e;var t=[],n=function(e,t){return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t))};return Object.keys(e).forEach((function(r){var i=e[r];null!=i&&(Array.isArray(i)?i.forEach((function(e){t.push(n(r,e))})):t.push(n(r,i)))})),t.join("&")},DeserializeQueryParams:function(e){return e?r.reduce(e.split("&"),(function(e,t){var n=t.split("="),r=n[0],i=n.length>0?decodeURIComponent(n[1]):"";return e[r]?e[r]instanceof Array?(e[r].push(i),e):(e[r]=[e[r],i],e):(e[r]=i,e)}),{}):{}},StartHistory:function(){i.History.started&&i.history.stop(),i.history.start({pushState:!0})},PageLoad:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t?window.open(e,"_blank"):window.location.href=e},Redirect:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=function(){return t?window.location.replace(e):window.location.href=e};o.b.hasActiveRoute()?i.Radio.channel(s.a.SHELL).once("routing:end",n):n()},Reload:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];window.location.reload(e)},GetCurrentPath:function(){return window.location.pathname},GetCurrentQueryString:function(){return window.location.search},GetCurrentUrl:function(){return window.location.href},GetCurrentReferrer:function(){return document.referrer},GetCurrentOrigin:function(){return window.location.origin},SetPageTitle:function(e){document.title=e}}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(l,e);var t,n,r,u=s(l);function l(){return i(this,l),u.apply(this,arguments)}return t=l,(n=[{key:"name",get:function(){return"DevError"}}])&&o(t.prototype,n),r&&o(t,r),l}(n(8).a)},function(e,t,n){var r=n(16),i=n(64),o=n(33),a=r("unscopables"),s=Array.prototype;null==s[a]&&o(s,a,i(null)),e.exports=function(e){s[a][e]=!0}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports={item:"yzAZk",background:"_2FYoc",thumbnailContainer:"_14YzS",teacherPack:"_1H-bZ",text:"fDGTW",atomGuide:"_2UrFB",studentActivity:"_3bk9l",additionalMaterials:"_3KgEr",userUploaded:"_21qiB"}},function(e,t,n){var r=n(14),i=n(74),o=n(33),a=n(36),s=n(114),u=n(148),l=n(38),c=l.get,f=l.enforce,h=String(u).split("toString");i("inspectSource",(function(e){return u.call(e)})),(e.exports=function(e,t,n,i){var u=!!i&&!!i.unsafe,l=!!i&&!!i.enumerable,c=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||o(n,"name",t),f(n).source=h.join("string"==typeof t?t:"")),e!==r?(u?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=n:o(e,t,n)):l?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||u.call(this)}))},function(e,t){e.exports=!1},function(e,t,n){var r=n(65),i=n(73),o=n(20),a=n(15),s=n(77),u=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,f=6==e,h=5==e||f;return function(d,p,y,m){for(var g,v,b=o(d),_=i(b),w=r(p,y,3),T=a(_.length),S=0,E=m||s,C=t?E(d,T):n?E(d,0):void 0;T>S;S++)if((h||S in _)&&(v=w(g=_[S],S,b),e))if(t)C[S]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return S;case 2:u.call(C,g)}else if(c)return!1;return f?-1:l||c?c:C}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t){var n=[][e];return!n||!r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){var r=n(17),i=n(85),o=n(61),a=n(32),s=n(62),u=n(36),l=n(147),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=s(t,!0),l)try{return c(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(151),i=n(14),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(25),i=n(163),o=n(15),a=n(65),s=n(164),u=n(162),l=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,f){var h,d,p,y,m,g,v,b=a(t,n,c?2:1);if(f)h=e;else{if("function"!=typeof(d=s(e)))throw TypeError("Target is not iterable");if(i(d)){for(p=0,y=o(e.length);y>p;p++)if((m=c?b(r(v=e[p])[0],v[1]):b(e[p]))&&m instanceof l)return m;return new l(!1)}h=d.call(e)}for(g=h.next;!(v=g.call(h)).done;)if("object"==typeof(m=u(h,b,v.value,c))&&m&&m instanceof l)return m;return new l(!1)}).stop=function(e){return new l(!0,e)}},function(e,t,n){var r=n(50);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(27).f,i=n(36),o=n(16)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(62),i=n(27),o=n(61);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},function(e,t,n){var r=n(75),i=n(18),o=n(36),a=n(27).f,s=n(87),u=n(90),l=s("meta"),c=0,f=Object.isExtensible||function(){return!0},h=function(e){a(e,l,{value:{objectID:"O"+ ++c,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,l)){if(!f(e))return"F";if(!t)return"E";h(e)}return e[l].objectID},getWeakData:function(e,t){if(!o(e,l)){if(!f(e))return!0;if(!t)return!1;h(e)}return e[l].weakData},onFreeze:function(e){return u&&d.REQUIRED&&f(e)&&!o(e,l)&&h(e),e}};r[l]=!0},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(30))},function(e,t){var n,r,i,o,a,s,u;n=function(e){return 9e4*e},r=function(e,t){return e*t},i=function(e){return e/9e4},o=function(e,t){return e/t},a=function(e,t){return n(o(e,t))},s=function(e,t){return r(i(e),t)},u=function(e,t,n){return i(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:n,secondsToAudioTs:r,videoTsToSeconds:i,audioTsToSeconds:o,audioTsToVideoTs:a,videoTsToAudioTs:s,metadataTsToSeconds:u}},function(e,t,n){"use strict";
6
+ /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r,i=(r=n(58))&&"object"==typeof r&&"default"in r?r.default:r,o={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},a=["video","audio","text"],s=["Video","Audio","Text"],u=function(e){return e?e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})):e},l=function(e){return e.map(u)},c=function(e){void 0===e&&(e="");var t=e.split(","),n={},r=[];return t.forEach((function(e){var t;e=e.trim(),a.forEach((function(r){var i=o[r].exec(e.toLowerCase());if(i&&!(i.length<=1)){t=r;var a=e.substring(0,i[1].length),s=e.replace(a,"");n[r]={type:a,details:s}}})),t||r.push(e)})),r.length&&(n.unknown=r),n},f=function(e){return void 0===e&&(e=""),o.audio.test(e.trim().toLowerCase())},h=function(e){return void 0===e&&(e=""),o.text.test(e.trim().toLowerCase())},d=function(e){if(e&&"string"==typeof e){var t=e.toLowerCase().split(",").map((function(e){return u(e.trim())})),n="video";1===t.length&&f(t[0])?n="audio":1===t.length&&h(t[0])&&(n="application");var r="mp4";return t.every((function(e){return o.mp4.test(e)}))?r="mp4":t.every((function(e){return o.webm.test(e)}))?r="webm":t.every((function(e){return o.ogg.test(e)}))&&(r="ogg"),n+"/"+r+';codecs="'+e+'"'}};t.DEFAULT_AUDIO_CODEC="mp4a.40.2",t.DEFAULT_VIDEO_CODEC="avc1.4d400d",t.browserSupportsCodec=function(e){return void 0===e&&(e=""),i.MediaSource&&i.MediaSource.isTypeSupported&&i.MediaSource.isTypeSupported(d(e))||!1},t.codecsFromDefault=function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n=e.mediaGroups.AUDIO[t];if(!n)return null;for(var r in n){var i=n[r];if(i.default&&i.playlists)return c(i.playlists[0].attributes.CODECS)}return null},t.getMimeForCodec=d,t.isAudioCodec=f,t.isTextCodec=h,t.isVideoCodec=function(e){return void 0===e&&(e=""),o.video.test(e.trim().toLowerCase())},t.mapLegacyAvcCodecs=function(e){return e.replace(/avc1\.(\d+)\.(\d+)/i,(function(e){return l([e])[0]}))},t.muxerSupportsCodec=function(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every((function(e){e=e.trim();for(var t=0;t<s.length;t++){if(o["muxer"+s[t]].test(e))return!0}return!1}))},t.parseCodecs=c,t.translateLegacyCodec=u,t.translateLegacyCodecs=l},function(e,t,n){var r=n(26);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(10);function i(e,t,n,i){var o=e;return"string"==typeof e&&(o=r.Radio.channel(e)),i.call(this,o,t,n)}},function(e,t,n){"use strict";n.d(t,"b",(function(){return d})),n.d(t,"a",(function(){return y}));var r=n(4),i=n(10),o=n(38),a=n(12),s=n(13),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},l=/((\(\?)?:\w+)|(\*\w+)/,c=/[\(\)]/g,f=/\(\/\)/g,h=/\/$/,d={routingStarted:function(){i.Radio.channel(a.a.SHELL).trigger(s.a.ROUTING_START)},routingEnded:function(){d.hasActiveRoute()&&i.Radio.channel(a.a.SHELL).trigger(s.a.ROUTING_END)},hasActiveRoute:function(){return i.Radio.channel(a.a.SHELL).request(s.a.HAS_ACTIVE_ROUTE)}},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.usedHelper=!0;var n=e.application,r=e.action;i.Radio.channel(n).trigger(r,e,t)},y={getHref:function(e){if(!e)return"";var t=e.application,n=e.action,r=e.args,o=e.params,u=i.Radio.channel(a.a.SHELL).request(s.a.ROUTE_LOOKUP,"".concat(t,":").concat(n),r,o);return!1===u?"":"/".concat(u)},buildRoute:function(e,t){if(!t)return e;var n=t.args,i=t.params;if(r.each(n,(function(t){e=e.replace(l,t||"")})),e=(e=(e=e.replace(f,"")).replace(c,"")).replace(h,""),!i)return e;var a=o.a.SerializeQueryParams(i);return a.length?"".concat(e,"?").concat(a):e},trigger:function(e,t){e&&(d.hasActiveRoute()?i.Radio.channel(a.a.SHELL).once("routing:end",(function(){p(e,t)})):p(e,t))},updateParams:function(e,t){var n=t.merge,r=u(t,["merge"]),i=y.getCurrentAppLink(),a="string"==typeof i.params?o.a.DeserializeQueryParams(i.params):i.params,s=n?Object.assign(Object.assign({},a),e):e,l=Object.assign(Object.assign({},i),{params:s});y.trigger(l,r)},getCurrentAppLink:function(){return i.Radio.channel(a.a.SHELL).request(s.a.CURRENT_ROUTE)}}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(18);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(17),i=n(147),o=n(25),a=n(62),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(415)},function(e,t,n){e.exports=function(e,t,n){"use strict";e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t,n=n&&n.hasOwnProperty("default")?n.default:n;var r=function(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return e.apply(t,r)}},i=e.Model.extend,o=function e(n,r){t.isObject(n)&&(n=n.prev+" is going to be removed in the future. Please use "+n.next+" instead."+(n.url?" See: "+n.url:"")),Ie.DEV_MODE&&(void 0!==r&&r||e._cache[n]||(e._warn("Deprecation warning: "+n),e._cache[n]=!0))};o._console="undefined"!=typeof console?console:{},o._warn=function(){var e=o._console.warn||o._console.log||t.noop;return e.apply(o._console,arguments)},o._cache={};var a=function(e){return document.documentElement.contains(e&&e.parentNode)},s=function(e,n){var r=this;e&&t.each(n,(function(t){var n=e[t];void 0!==n&&(r[t]=n)}))},u=function(e){if(e)return this.options&&void 0!==this.options[e]?this.options[e]:this[e]},l=function(e){var n=this;return t.reduce(e,(function(e,r,i){return t.isFunction(r)||(r=n[r]),r&&(e[i]=r),e}),{})},c=/(^|:)(\w)/gi;function f(e,t,n){return n.toUpperCase()}var h=t.memoize((function(e){return"on"+e.replace(c,f)}));function d(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=h(e),a=u.call(this,o),s=void 0;return t.isFunction(a)&&(s=a.apply(this,r)),this.trigger.apply(this,arguments),s}function p(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.isFunction(e.triggerMethod)?e.triggerMethod.apply(e,r):d.apply(e,r)}function y(e,n,r){e._getImmediateChildren&&t.each(e._getImmediateChildren(),(function(e){r(e)&&p(e,n,e)}))}function m(e){return!e._isAttached}function g(e){return!!m(e)&&(e._isAttached=!0,!0)}function v(e){return e._isAttached}function b(e){return!!v(e)&&(e._isAttached=!1,!0)}function _(e){e._isAttached&&e._isRendered&&p(e,"dom:refresh",e)}function w(e){e._isAttached&&e._isRendered&&p(e,"dom:remove",e)}function T(){y(this,"before:attach",m)}function S(){y(this,"attach",g),_(this)}function E(){y(this,"before:detach",v),w(this)}function C(){y(this,"detach",b)}function k(){w(this)}function x(){_(this)}function O(e){e._areViewEventsMonitored||!1===e.monitorViewEvents||(e._areViewEventsMonitored=!0,e.on({"before:attach":T,attach:S,"before:detach":E,detach:C,"before:render":k,render:x}))}var P=["description","fileName","lineNumber","name","message","number"],R=i.call(Error,{urlRoot:"http://marionettejs.com/docs/v3.5.1/",constructor:function(e,n){t.isObject(e)?e=(n=e).message:n||(n={});var r=Error.call(this,e);t.extend(this,t.pick(r,P),t.pick(n,P)),this.captureStackTrace(),n.url&&(this.url=this.urlRoot+n.url)},captureStackTrace:function(){Error.captureStackTrace&&Error.captureStackTrace(this,R)},toString:function(){return this.name+": "+this.message+(this.url?" See: "+this.url:"")}});function A(e,n,r,i){if(!t.isObject(r))throw new R({message:"Bindings must be an object.",url:"marionette.functions.html#marionettebindevents"});t.each(r,(function(r,a){t.isString(r)?function(e,n,r,i,a){var s=i.split(/\s+/);s.length>1&&o("Multiple handlers for a single event are deprecated. If needed, use a single handler to call multiple methods."),t.each(s,(function(t){var i=e[t];if(!i)throw new R('Method "'+t+'" was configured as an event handler, but does not exist.');e[a](n,r,i)}))}(e,n,a,r,i):e[i](n,a,r)}))}function I(e,t){return e&&t?(A(this,e,t,"listenTo"),this):this}function L(e,t){return e?t?(A(this,e,t,"stopListening"),this):(this.stopListening(e),this):this}function j(e,n,r,i){if(!t.isObject(r))throw new R({message:"Bindings must be an object.",url:"marionette.functions.html#marionettebindrequests"});var o=l.call(e,r);n[i](o,e)}function D(e,t){return e&&t?(j(this,e,t,"reply"),this):this}function N(e,t){return e?t?(j(this,e,t,"stopReplying"),this):(e.stopReplying(null,null,this),this):this}R.extend=i;var M={normalizeMethods:l,_setOptions:function(e){this.options=t.extend({},t.result(this,"options"),e)},mergeOptions:s,getOption:u,bindEvents:I,unbindEvents:L},U={_initRadio:function(){var e=t.result(this,"channelName");if(e){if(!n)throw new R({name:"BackboneRadioMissing",message:'The dependency "backbone.radio" is missing.'});var r=this._channel=n.channel(e),i=t.result(this,"radioEvents");this.bindEvents(r,i);var o=t.result(this,"radioRequests");this.bindRequests(r,o),this.on("destroy",this._destroyRadio)}},_destroyRadio:function(){this._channel.stopReplying(null,null,this)},getChannel:function(){return this._channel},bindEvents:I,unbindEvents:L,bindRequests:D,unbindRequests:N},B=["channelName","radioEvents","radioRequests"],F=function(e){this.hasOwnProperty("options")||this._setOptions(e),this.mergeOptions(e,B),this._setCid(),this._initRadio(),this.initialize.apply(this,arguments)};F.extend=i,t.extend(F.prototype,e.Events,M,U,{cidPrefix:"mno",_isDestroyed:!1,isDestroyed:function(){return this._isDestroyed},initialize:function(){},_setCid:function(){this.cid||(this.cid=t.uniqueId(this.cidPrefix))},destroy:function(){if(this._isDestroyed)return this;for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.triggerMethod.apply(this,["before:destroy",this].concat(t)),this._isDestroyed=!0,this.triggerMethod.apply(this,["destroy",this].concat(t)),this.stopListening(),this},triggerMethod:d});var V=function(e){this.templateId=e};t.extend(V,{templateCaches:{},get:function(e,t){var n=this.templateCaches[e];return n||(n=new V(e),this.templateCaches[e]=n),n.load(t)},clear:function(){for(var e=void 0,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.length;if(i>0)for(e=0;e<i;e++)delete this.templateCaches[n[e]];else this.templateCaches={}}}),t.extend(V.prototype,{load:function(e){if(this.compiledTemplate)return this.compiledTemplate;var t=this.loadTemplate(this.templateId,e);return this.compiledTemplate=this.compileTemplate(t,e),this.compiledTemplate},loadTemplate:function(t,n){var r=e.$(t);if(!r.length)throw new R({name:"NoTemplateError",message:'Could not find template: "'+t+'"'});return r.html()},compileTemplate:function(e,n){return t.template(e,n)}});var H=t.invokeMap||t.invoke;function z(e,n){return t.chain(n).map((function(n,r){var i=function(e,n){return e.behaviorClass?e.behaviorClass:t.isFunction(e)?e:t.isFunction(Ie.Behaviors.behaviorsLookup)?Ie.Behaviors.behaviorsLookup(e,n)[n]:Ie.Behaviors.behaviorsLookup[n]}(n,r),o=new i(n===i?{}:n,e),a=z(e,t.result(o,"behaviors"));return[o].concat(a)})).flatten().value()}var q={_initBehaviors:function(){this._behaviors=this._getBehaviors()},_getBehaviors:function(){var e=t.result(this,"behaviors");return t.isObject(e)?z(this,e):{}},_getBehaviorTriggers:function(){var e=H(this._behaviors,"getTriggers");return t.reduce(e,(function(e,n){return t.extend(e,n)}),{})},_getBehaviorEvents:function(){var e=H(this._behaviors,"getEvents");return t.reduce(e,(function(e,n){return t.extend(e,n)}),{})},_proxyBehaviorViewProperties:function(){H(this._behaviors,"proxyViewProperties")},_delegateBehaviorEntityEvents:function(){H(this._behaviors,"delegateEntityEvents")},_undelegateBehaviorEntityEvents:function(){H(this._behaviors,"undelegateEntityEvents")},_destroyBehaviors:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];H.apply(void 0,[this._behaviors,"destroy"].concat(t))},_removeBehavior:function(e){this._isDestroyed||(this.undelegate(".trig"+e.cid+" ."+e.cid),this._behaviors=t.without(this._behaviors,e))},_bindBehaviorUIElements:function(){H(this._behaviors,"bindUIElements")},_unbindBehaviorUIElements:function(){H(this._behaviors,"unbindUIElements")},_triggerEventOnBehaviors:function(){for(var e=this._behaviors,t=0,n=e&&e.length;t<n;t++)d.apply(e[t],arguments)}},W={_delegateEntityEvents:function(e,n){var r=t.result(this,"modelEvents");r&&(L.call(this,e,r),I.call(this,e,r));var i=t.result(this,"collectionEvents");i&&(L.call(this,n,i),I.call(this,n,i))},_undelegateEntityEvents:function(e,n){var r=t.result(this,"modelEvents");L.call(this,e,r);var i=t.result(this,"collectionEvents");L.call(this,n,i)}},$=/^(\S+)\s*(.*)$/,G=function(e,t){var n=e.match($);return n[1]+"."+t+" "+n[2]},Y={childViewEventPrefix:!0,triggersStopPropagation:!0,triggersPreventDefault:!0};function K(e){return!!Y[e]}var X={_getViewTriggers:function(e,n){var r=this;return t.reduce(n,(function(n,i,o){return n[o=G(o,"trig"+r.cid)]=function(e,n){t.isString(n)&&(n={event:n});var r=n.event,i=!!n.preventDefault;K("triggersPreventDefault")&&(i=!1!==n.preventDefault);var o=!!n.stopPropagation;return K("triggersStopPropagation")&&(o=!1!==n.stopPropagation),function(t){i&&t.preventDefault(),o&&t.stopPropagation(),e.triggerMethod(r,e,t)}}(e,i),n}),{})}},Q=function(e,t){return e.replace(/@ui\.[a-zA-Z-_$0-9]*/g,(function(e){return t[e.slice(4)]}))},J={normalizeUIKeys:function(e){return function(e,n){return t.reduce(e,(function(e,t,r){return e[Q(r,n)]=t,e}),{})}(e,this._getUIBindings())},normalizeUIString:function(e){var t=this._getUIBindings();return Q(e,t)},normalizeUIValues:function(e,n){return function e(n,r,i){return t.each(n,(function(o,a){t.isString(o)?n[a]=Q(o,r):t.isObject(o)&&t.isArray(i)&&(t.extend(o,e(t.pick(o,i),r)),t.each(i,(function(e){var n=o[e];t.isString(n)&&(o[e]=Q(n,r))})))})),n}(e,this._getUIBindings(),n)},_getUIBindings:function(){var e=t.result(this,"_uiBindings"),n=t.result(this,"ui");return e||n},_bindUIElements:function(){var e=this;if(this.ui){this._uiBindings||(this._uiBindings=this.ui);var n=t.result(this,"_uiBindings");this._ui={},t.each(n,(function(t,n){e._ui[n]=e.$(t)})),this.ui=this._ui}},_unbindUIElements:function(){var e=this;this.ui&&this._uiBindings&&(t.each(this.ui,(function(t,n){delete e.ui[n]})),this.ui=this._uiBindings,delete this._uiBindings,delete this._ui)},_getUI:function(e){return this._ui[e]}};function Z(t){return t instanceof e.$?t:e.$(t)}function ee(e){return this.prototype.Dom=t.extend({},this.prototype.Dom,e),this}var te={createBuffer:function(){return document.createDocumentFragment()},getEl:function(e){return Z(e)},findEl:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Z(e);return n.find(t)},hasEl:function(e,t){return e.contains(t&&t.parentNode)},detachEl:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z(e);t.detach()},replaceEl:function(e,t){if(e!==t){var n=t.parentNode;n&&n.replaceChild(e,t)}},swapEl:function(e,t){if(e!==t){var n=e.parentNode,r=t.parentNode;if(n&&r){var i=e.nextSibling,o=t.nextSibling;n.insertBefore(t,i),r.insertBefore(e,o)}}},setContents:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Z(e);n.html(t)},appendContents:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n._$el,i=void 0===r?Z(e):r,o=n._$contents,a=void 0===o?Z(t):o;i.append(a)},hasContents:function(e){return!!e&&e.hasChildNodes()},detachContents:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z(e);t.contents().detach()}},ne={Dom:te,supportsRenderLifecycle:!0,supportsDestroyLifecycle:!0,_isDestroyed:!1,isDestroyed:function(){return!!this._isDestroyed},_isRendered:!1,isRendered:function(){return!!this._isRendered},_isAttached:!1,isAttached:function(){return!!this._isAttached},delegateEvents:function(n){this._proxyBehaviorViewProperties(),this._buildEventProxies();var r=this._getEvents(n);void 0===n&&(this.events=r);var i=t.extend({},this._getBehaviorEvents(),r,this._getBehaviorTriggers(),this.getTriggers());return e.View.prototype.delegateEvents.call(this,i),this},_getEvents:function(e){var n=e||this.events;return t.isFunction(n)?this.normalizeUIKeys(n.call(this)):this.normalizeUIKeys(n)},getTriggers:function(){if(this.triggers){var e=this.normalizeUIKeys(t.result(this,"triggers"));return this._getViewTriggers(this,e)}},delegateEntityEvents:function(){return this._delegateEntityEvents(this.model,this.collection),this._delegateBehaviorEntityEvents(),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.model,this.collection),this._undelegateBehaviorEntityEvents(),this},destroy:function(){if(this._isDestroyed)return this;for(var e=this._isAttached&&!this._shouldDisableEvents,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.triggerMethod.apply(this,["before:destroy",this].concat(n)),e&&this.triggerMethod("before:detach",this),this.unbindUIElements(),this._removeElement(),e&&(this._isAttached=!1,this.triggerMethod("detach",this)),this._removeChildren(),this._isDestroyed=!0,this._isRendered=!1,this._destroyBehaviors.apply(this,n),this.triggerMethod.apply(this,["destroy",this].concat(n)),this.stopListening(),this},_removeElement:function(){this.$el.off().removeData(),this.Dom.detachEl(this.el,this.$el)},bindUIElements:function(){return this._bindUIElements(),this._bindBehaviorUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this._unbindBehaviorUIElements(),this},getUI:function(e){return this._getUI(e)},childViewEventPrefix:function(){return!!K("childViewEventPrefix")&&"childview"},triggerMethod:function(){var e=d.apply(this,arguments);return this._triggerEventOnBehaviors.apply(this,arguments),e},_buildEventProxies:function(){this._childViewEvents=t.result(this,"childViewEvents"),this._childViewTriggers=t.result(this,"childViewTriggers")},_proxyChildViewEvents:function(e){this.listenTo(e,"all",this._childViewEventHandler)},_childViewEventHandler:function(e){for(var n=this.normalizeMethods(this._childViewEvents),r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];void 0!==n&&t.isFunction(n[e])&&n[e].apply(this,i);var a=this._childViewTriggers;a&&t.isString(a[e])&&this.triggerMethod.apply(this,[a[e]].concat(i));var s=t.result(this,"childViewEventPrefix");if(!1!==s){var u=s+":"+e;this.triggerMethod.apply(this,[u].concat(i))}}};function re(e){e._isRendered||(e.supportsRenderLifecycle||p(e,"before:render",e),e.render(),e.supportsRenderLifecycle||(e._isRendered=!0,p(e,"render",e)))}function ie(e){if(e.destroy)e.destroy();else{e.supportsDestroyLifecycle||p(e,"before:destroy",e);var t=e._isAttached&&!e._shouldDisableEvents;t&&p(e,"before:detach",e),e.remove(),t&&(e._isAttached=!1,p(e,"detach",e)),e._isDestroyed=!0,e.supportsDestroyLifecycle||p(e,"destroy",e)}}t.extend(ne,q,M,W,X,J);var oe=["allowMissingEl","parentEl","replaceElement"],ae=F.extend({Dom:te,cidPrefix:"mnr",replaceElement:!1,_isReplaced:!1,_isSwappingView:!1,constructor:function(t){if(this._setOptions(t),this.mergeOptions(t,oe),this._initEl=this.el=this.getOption("el"),this.el=this.el instanceof e.$?this.el[0]:this.el,!this.el)throw new R({name:"NoElError",message:'An "el" must be specified for a region.'});this.$el=this.getEl(this.el),F.call(this,t)},show:function(e,t){if(this._ensureElement(t))return(e=this._getView(e,t))===this.currentView||(this._isSwappingView=!!this.currentView,this.triggerMethod("before:show",this,e,t),e._isAttached||this.empty(t),this._setupChildView(e),this.currentView=e,re(e),this._attachView(e,t),this.triggerMethod("show",this,e,t),this._isSwappingView=!1),this},_setupChildView:function(e){O(e),this._proxyChildViewEvents(e),e.on("destroy",this._empty,this)},_proxyChildViewEvents:function(e){var t=this._parentView;t&&t._proxyChildViewEvents(e)},_shouldDisableMonitoring:function(){return this._parentView&&!1===this._parentView.monitorViewEvents},_attachView:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=!e._isAttached&&a(this.el)&&!this._shouldDisableMonitoring(),i=void 0===n.replaceElement?!!t.result(this,"replaceElement"):!!n.replaceElement;r&&p(e,"before:attach",e),i?this._replaceEl(e):this.attachHtml(e),r&&(e._isAttached=!0,p(e,"attach",e))},_ensureElement:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t.isObject(this.el)||(this.$el=this.getEl(this.el),this.el=this.$el[0],this.$el=this.Dom.getEl(this.el)),!this.$el||0===this.$el.length){var n=void 0===e.allowMissingEl?!!t.result(this,"allowMissingEl"):!!e.allowMissingEl;if(n)return!1;throw new R('An "el" must exist in DOM for this region '+this.cid)}return!0},_getView:function(t){if(!t)throw new R({name:"ViewNotValid",message:"The view passed is undefined and therefore invalid. You must pass a view instance to show."});if(t._isDestroyed)throw new R({name:"ViewDestroyedError",message:'View (cid: "'+t.cid+'") has already been destroyed and cannot be used.'});if(t instanceof e.View)return t;var n=this._getViewOptions(t);return new he(n)},_getViewOptions:function(e){return t.isFunction(e)?{template:e}:t.isObject(e)?e:{template:function(){return e}}},getEl:function(e){var n=t.result(this,"parentEl");return n&&t.isString(e)?this.Dom.findEl(n,e):this.Dom.getEl(e)},_replaceEl:function(e){this._restoreEl(),e.on("before:destroy",this._restoreEl,this),this.Dom.replaceEl(e.el,this.el),this._isReplaced=!0},_restoreEl:function(){if(this._isReplaced){var e=this.currentView;e&&(this._detachView(e),this._isReplaced=!1)}},isReplaced:function(){return!!this._isReplaced},isSwappingView:function(){return!!this._isSwappingView},attachHtml:function(e){this.Dom.appendContents(this.el,e.el,{_$el:this.$el,_$contents:e.$el})},empty:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{allowMissingEl:!0},t=this.currentView;if(!t)return this._ensureElement(e)&&this.detachHtml(),this;var n=!e.preventDestroy;return n||o("The preventDestroy option is deprecated. Use Region#detachView"),this._empty(t,n),this},_empty:function(e,t){e.off("destroy",this._empty,this),this.triggerMethod("before:empty",this,e),this._restoreEl(),delete this.currentView,e._isDestroyed||(t?this.removeView(e):this._detachView(e),this._stopChildViewEvents(e)),this.triggerMethod("empty",this,e)},_stopChildViewEvents:function(e){this._parentView&&this._parentView.stopListening(e)},destroyView:function(e){return e._isDestroyed||(e._shouldDisableEvents=this._shouldDisableMonitoring(),ie(e)),e},removeView:function(e){this.destroyView(e)},detachView:function(){var e=this.currentView;if(e)return this._empty(e),e},_detachView:function(e){var t=e._isAttached&&!this._shouldDisableMonitoring(),n=this._isReplaced;t&&p(e,"before:detach",e),n?this.Dom.replaceEl(this.el,e.el):this.detachHtml(),t&&(e._isAttached=!1,p(e,"detach",e))},detachHtml:function(){this.Dom.detachContents(this.el,this.$el)},hasView:function(){return!!this.currentView},reset:function(e){return this.empty(e),this.$el&&(this.el=this._initEl),delete this.$el,this},destroy:function(e){return this._isDestroyed?this:(this.reset(e),this._name&&this._parentView._removeReferences(this._name),delete this._parentView,delete this._name,F.prototype.destroy.apply(this,arguments))}},{setDomApi:ee}),se=function(e,n){return e instanceof ae?e:function(e,n){var r=t.extend({},n);if(t.isString(e))return t.extend(r,{el:e}),ue(r);if(t.isFunction(e))return t.extend(r,{regionClass:e}),ue(r);if(t.isObject(e))return e.selector&&o("The selector option on a Region definition object is deprecated. Use el to pass a selector string"),t.extend(r,{el:e.selector},e),ue(r);throw new R({message:"Improper region configuration type.",url:"marionette.region.html#region-configuration-types"})}(e,n)};function ue(e){return new(0,e.regionClass)(t.omit(e,"regionClass"))}var le={regionClass:ae,_initRegions:function(){this.regions=this.regions||{},this._regions={},this.addRegions(t.result(this,"regions"))},_reInitRegions:function(){H(this._regions,"reset")},addRegion:function(e,t){var n={};return n[e]=t,this.addRegions(n)[e]},addRegions:function(e){if(!t.isEmpty(e))return e=this.normalizeUIValues(e,["selector","el"]),this.regions=t.extend({},this.regions,e),this._addRegions(e)},_addRegions:function(e){var n=this,r={regionClass:this.regionClass,parentEl:t.partial(t.result,this,"el")};return t.reduce(e,(function(e,t,i){return e[i]=se(t,r),n._addRegion(e[i],i),e}),{})},_addRegion:function(e,t){this.triggerMethod("before:add:region",this,t,e),e._parentView=this,e._name=t,this._regions[t]=e,this.triggerMethod("add:region",this,t,e)},removeRegion:function(e){var t=this._regions[e];return this._removeRegion(t,e),t},removeRegions:function(){var e=this._getRegions();return t.each(this._regions,t.bind(this._removeRegion,this)),e},_removeRegion:function(e,t){this.triggerMethod("before:remove:region",this,t,e),e.destroy(),this.triggerMethod("remove:region",this,t,e)},_removeReferences:function(e){delete this.regions[e],delete this._regions[e]},emptyRegions:function(){var e=this.getRegions();return H(e,"empty"),e},hasRegion:function(e){return!!this.getRegion(e)},getRegion:function(e){return this._isRendered||this.render(),this._regions[e]},_getRegions:function(){return t.clone(this._regions)},getRegions:function(){return this._isRendered||this.render(),this._getRegions()},showChildView:function(e,t){for(var n=this.getRegion(e),r=arguments.length,i=Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];return n.show.apply(n,[t].concat(i))},detachChildView:function(e){return this.getRegion(e).detachView()},getChildView:function(e){return this.getRegion(e).currentView}},ce={render:function(e,n){if(!e)throw new R({name:"TemplateNotFoundError",message:"Cannot render the template since its false, null or undefined."});return(t.isFunction(e)?e:V.get(e))(n)}},fe=["behaviors","childViewEventPrefix","childViewEvents","childViewTriggers","collectionEvents","events","modelEvents","regionClass","regions","template","templateContext","triggers","ui"],he=e.View.extend({constructor:function(n){this.render=t.bind(this.render,this),this._setOptions(n),this.mergeOptions(n,fe),O(this),this._initBehaviors(),this._initRegions();var r=Array.prototype.slice.call(arguments);r[0]=this.options,e.View.prototype.constructor.apply(this,r),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this)},serializeData:function(){return this.model||this.collection?this.model?this.serializeModel():{items:this.serializeCollection()}:{}},serializeModel:function(){return this.model?t.clone(this.model.attributes):{}},serializeCollection:function(){return this.collection?this.collection.map((function(e){return t.clone(e.attributes)})):{}},setElement:function(){return e.View.prototype.setElement.apply(this,arguments),this._isRendered=this.Dom.hasContents(this.el),this._isAttached=a(this.el),this._isRendered&&this.bindUIElements(),this},render:function(){return this._isDestroyed||(this.triggerMethod("before:render",this),this._isRendered&&this._reInitRegions(),this._renderTemplate(),this.bindUIElements(),this._isRendered=!0,this.triggerMethod("render",this)),this},_renderTemplate:function(){var e=this.getTemplate();if(!1!==e){var t=this.mixinTemplateContext(this.serializeData()),n=this._renderHtml(e,t);this.attachElContent(n)}else o("template:false is deprecated. Use _.noop.")},_renderHtml:function(e,t){return ce.render(e,t,this)},getTemplate:function(){return this.template},mixinTemplateContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.result(this,"templateContext");return t.extend(e,n)},attachElContent:function(e){return this.Dom.setContents(this.el,e,this.$el),this},_removeChildren:function(){this.removeRegions()},_getImmediateChildren:function(){return t.chain(this._getRegions()).map("currentView").compact().value()}},{setRenderer:function(e){return this.prototype._renderHtml=e,this},setDomApi:ee});t.extend(he.prototype,ne,le);var de=["forEach","each","map","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","toArray","first","initial","rest","last","without","isEmpty","pluck","reduce","partition"],pe=function(e,n){t.each(de,(function(r){e[r]=function(){var e=t.result(this,n),i=Array.prototype.slice.call(arguments);return t[r].apply(t,[e].concat(i))}}))},ye=function(e){this._views={},this._indexByModel={},this._indexByCustom={},this._updateLength(),t.each(e,t.bind(this.add,this))};pe(ye.prototype,"_getViews"),t.extend(ye.prototype,{_getViews:function(){return t.values(this._views)},add:function(e,t){return this._add(e,t)._updateLength()},_add:function(e,t){var n=e.cid;return this._views[n]=e,e.model&&(this._indexByModel[e.model.cid]=n),t&&(this._indexByCustom[t]=n),this},findByModel:function(e){return this.findByModelCid(e.cid)},findByModelCid:function(e){var t=this._indexByModel[e];return this.findByCid(t)},findByCustom:function(e){var t=this._indexByCustom[e];return this.findByCid(t)},findByIndex:function(e){return t.values(this._views)[e]},findByCid:function(e){return this._views[e]},remove:function(e){return this._remove(e)._updateLength()},_remove:function(e){var n=e.cid;return e.model&&delete this._indexByModel[e.model.cid],t.some(this._indexByCustom,t.bind((function(e,t){if(e===n)return delete this._indexByCustom[t],!0}),this)),delete this._views[n],this},_updateLength:function(){return this.length=t.size(this._views),this}});var me=["behaviors","childView","childViewEventPrefix","childViewEvents","childViewOptions","childViewTriggers","collectionEvents","events","filter","emptyView","emptyViewOptions","modelEvents","reorderOnSort","sort","triggers","ui","viewComparator"],ge=e.View.extend({sort:!0,constructor:function(n){this.render=t.bind(this.render,this),this._setOptions(n),this.mergeOptions(n,me),O(this),this._initBehaviors(),this.once("render",this._initialEvents),this._initChildViewStorage(),this._bufferedChildren=[];var r=Array.prototype.slice.call(arguments);r[0]=this.options,e.View.prototype.constructor.apply(this,r),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this)},_startBuffering:function(){this._isBuffering=!0},_endBuffering:function(){var e=this._isAttached&&!1!==this.monitorViewEvents?this._getImmediateChildren():[];this._isBuffering=!1,t.each(e,(function(e){p(e,"before:attach",e)})),this.attachBuffer(this,this._createBuffer()),t.each(e,(function(e){e._isAttached=!0,p(e,"attach",e)})),this._bufferedChildren=[]},_getImmediateChildren:function(){return t.values(this.children._views)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"update",this._onCollectionUpdate),this.listenTo(this.collection,"reset",this.render),this.sort&&this.listenTo(this.collection,"sort",this._sortViews))},_onCollectionAdd:function(e,n,r){var i=void 0!==r.at&&(r.index||n.indexOf(e));(this.filter||!1===i)&&(i=t.indexOf(this._filteredSortedModels(i),e)),this._shouldAddChild(e,i)&&(this._destroyEmptyView(),this._addChild(e,i))},_onCollectionUpdate:function(e,t){var n=t.changes;this._removeChildModels(n.removed)},_removeChildModels:function(e){var t=this._getRemovedViews(e);t.length&&(this.children._updateLength(),this._updateIndices(t,!1),this.isEmpty()&&this._showEmptyView())},_getRemovedViews:function(e){var n=this;return t.reduce(e,(function(e,t){var r=t&&n.children.findByModel(t);return!r||r._isDestroyed||(n._removeChildView(r),e.push(r)),e}),[])},_removeChildView:function(e){this.triggerMethod("before:remove:child",this,e),this.children._remove(e),e._shouldDisableEvents=!1===this.monitorViewEvents,ie(e),this.stopListening(e),this.triggerMethod("remove:child",this,e)},setElement:function(){return e.View.prototype.setElement.apply(this,arguments),this._isAttached=a(this.el),this},render:function(){return this._isDestroyed||(this.triggerMethod("before:render",this),this._renderChildren(),this._isRendered=!0,this.triggerMethod("render",this)),this},setFilter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preventRender,r=this._isRendered&&!this._isDestroyed,i=this.filter!==e,o=r&&i&&!n;if(o){var a=this._filteredSortedModels();this.filter=e;var s=this._filteredSortedModels();this._applyModelDeltas(s,a)}else this.filter=e;return this},removeFilter:function(e){return this.setFilter(null,e)},_applyModelDeltas:function(e,n){var r=this,i={};t.each(e,(function(e,t){!r.children.findByModel(e)&&r._onCollectionAdd(e,r.collection,{at:t}),i[e.cid]=!0}));var o=t.filter(n,(function(e){return!i[e.cid]&&r.children.findByModel(e)}));this._removeChildModels(o)},reorder:function(){var e=this,n=this.children,r=this._filteredSortedModels();if(!r.length&&this._showingEmptyView)return this;if(t.some(r,(function(e){return!n.findByModel(e)})))this.render();else{var i=[],o=t.reduce(this.children._views,(function(e,n){var o=t.indexOf(r,n.model);return-1===o?(i.push(n.model),e):(n._index=o,e[o]=n.el,e)}),new Array(r.length));this.triggerMethod("before:reorder",this);var a=this.Dom.createBuffer();t.each(o,(function(t){e.Dom.appendContents(a,t)})),this._appendReorderedChildren(a),this._removeChildModels(i),this.triggerMethod("reorder",this)}return this},resortView:function(){return this.reorderOnSort?this.reorder():this._renderChildren(),this},_sortViews:function(){var e=this,n=this._filteredSortedModels();t.find(n,(function(t,n){var r=e.children.findByModel(t);return!r||r._index!==n}))&&this.resortView()},_emptyViewIndex:-1,_appendReorderedChildren:function(e){this.Dom.appendContents(this.el,e,{_$el:this.$el})},_renderChildren:function(){this._isRendered&&(this._destroyEmptyView(),this._destroyChildren());var e=this._filteredSortedModels();this.isEmpty({processedModels:e})?this._showEmptyView():(this.triggerMethod("before:render:children",this),this._startBuffering(),this._showCollection(e),this._endBuffering(),this.triggerMethod("render:children",this))},_createView:function(e,t){var n=this._getChildView(e),r=this._getChildViewOptions(e,t);return this.buildChildView(e,n,r)},_setupChildView:function(e,t){O(e),this._proxyChildViewEvents(e),this.sort&&(e._index=t)},_showCollection:function(e){t.each(e,t.bind(this._addChild,this)),this.children._updateLength()},_filteredSortedModels:function(e){if(!this.collection||!this.collection.length)return[];var t=this.getViewComparator(),n=this.collection.models;if(e=Math.min(Math.max(e,0),n.length-1),t){var r=void 0;e&&(r=n[e],n=n.slice(0,e).concat(n.slice(e+1))),n=this._sortModelsBy(n,t),r&&n.splice(e,0,r)}return n=this._filterModels(n)},getViewComparator:function(){return this.viewComparator},_filterModels:function(e){var n=this;return this.filter&&(e=t.filter(e,(function(e,t){return n._shouldAddChild(e,t)}))),e},_sortModelsBy:function(e,n){return"string"==typeof n?t.sortBy(e,(function(e){return e.get(n)})):1===n.length?t.sortBy(e,t.bind(n,this)):t.clone(e).sort(t.bind(n,this))},_showEmptyView:function(){var n=this._getEmptyView();if(n&&!this._showingEmptyView){this._showingEmptyView=!0;var r=new e.Model,i=this.emptyViewOptions||this.childViewOptions;t.isFunction(i)&&(i=i.call(this,r,this._emptyViewIndex));var o=this.buildChildView(r,n,i);this.triggerMethod("before:render:empty",this,o),this.addChildView(o,0),this.triggerMethod("render:empty",this,o)}},_destroyEmptyView:function(){this._showingEmptyView&&(this.triggerMethod("before:remove:empty",this),this._destroyChildren(),delete this._showingEmptyView,this.triggerMethod("remove:empty",this))},_getEmptyView:function(){var e=this.emptyView;if(e)return this._getView(e)},_getChildView:function(e){var t=this.childView;if(!t)throw new R({name:"NoChildViewError",message:'A "childView" must be specified'});if(!(t=this._getView(t,e)))throw new R({name:"InvalidChildViewError",message:'"childView" must be a view class or a function that returns a view class'});return t},_getView:function(n,r){return n.prototype instanceof e.View||n===e.View?n:t.isFunction(n)?n.call(this,r):void 0},_addChild:function(e,t){var n=this._createView(e,t);return this.addChildView(n,t),n},_getChildViewOptions:function(e,n){return t.isFunction(this.childViewOptions)?this.childViewOptions(e,n):this.childViewOptions},addChildView:function(e,t){return this.triggerMethod("before:add:child",this,e),this._setupChildView(e,t),this._isBuffering?this.children._add(e):(this._updateIndices(e,!0),this.children.add(e)),re(e),this._attachView(e,t),this.triggerMethod("add:child",this,e),e},_updateIndices:function(e,n){if(this.sort)if(n){var r=t.isArray(e)?t.max(e,"_index"):e;t.isObject(r)&&t.each(this.children._views,(function(e){e._index>=r._index&&(e._index+=1)}))}else t.each(t.sortBy(this.children._views,"_index"),(function(e,t){e._index=t}))},_attachView:function(e,t){var n=!e._isAttached&&!this._isBuffering&&this._isAttached&&!1!==this.monitorViewEvents;n&&p(e,"before:attach",e),this.attachHtml(this,e,t),n&&(e._isAttached=!0,p(e,"attach",e))},buildChildView:function(e,n,r){return new n(t.extend({model:e},r))},removeChildView:function(e){return!e||e._isDestroyed||(this._removeChildView(e),this.children._updateLength(),this._updateIndices(e,!1)),e},isEmpty:function(e){var n=void 0;return t.result(e,"processedModels")?n=e.processedModels:(n=this.collection?this.collection.models:[],n=this._filterModels(n)),0===n.length},attachBuffer:function(e,t){this.Dom.appendContents(e.el,t,{_$el:e.$el})},_createBuffer:function(){var e=this,n=this.Dom.createBuffer();return t.each(this._bufferedChildren,(function(t){e.Dom.appendContents(n,t.el,{_$contents:t.$el})})),n},attachHtml:function(e,t,n){e._isBuffering?e._bufferedChildren.splice(n,0,t):e._insertBefore(t,n)||e._insertAfter(t)},_insertBefore:function(e,n){var r=void 0;return this.sort&&n<this.children.length-1&&(r=t.find(this.children._views,(function(e){return e._index===n+1}))),!!r&&(this.beforeEl(r.el,e.el),!0)},beforeEl:function(e,t){this.$(e).before(t)},_insertAfter:function(e){this.Dom.appendContents(this.el,e.el,{_$el:this.$el,_$contents:e.$el})},_initChildViewStorage:function(){this.children=new ye},_removeChildren:function(){this._destroyChildren()},_destroyChildren:function(e){this.children.length&&(this.triggerMethod("before:destroy:children",this),t.each(this.children._views,t.bind(this._removeChildView,this)),this.children._updateLength(),this.triggerMethod("destroy:children",this))},_shouldAddChild:function(e,n){var r=this.filter;return!t.isFunction(r)||r.call(this,e,n,this.collection)}},{setDomApi:ee});t.extend(ge.prototype,ne);var ve=function(){this._init()};function be(e,t){return t.model&&t.model.get(e)}pe(ve.prototype,"_views"),t.extend(ve.prototype,{_init:function(){this._views=[],this._viewsByCid={},this._indexByModel={},this._updateLength()},_add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._views.length,n=e.cid;this._viewsByCid[n]=e,e.model&&(this._indexByModel[e.model.cid]=n),this._views.splice(t,0,e),this._updateLength()},_sort:function(e,n){return"string"==typeof e?(e=t.partial(be,e),this._sortBy(e)):1===e.length?this._sortBy(t.bind(e,n)):this._views.sort(t.bind(e,n))},_sortBy:function(e){var n=t.sortBy(this._views,e);return this._set(n),n},_set:function(e){this._views.length=0,this._views.push.apply(this._views,e.slice(0)),this._updateLength()},_swap:function(e,t){var n=this.findIndexByView(e),r=this.findIndexByView(t);if(-1!==n&&-1!==r){var i=this._views[n];this._views[n]=this._views[r],this._views[r]=i}},findByModel:function(e){return this.findByModelCid(e.cid)},findByModelCid:function(e){var t=this._indexByModel[e];return this.findByCid(t)},findByIndex:function(e){return this._views[e]},findIndexByView:function(e){return this._views.indexOf(e)},findByCid:function(e){return this._viewsByCid[e]},hasView:function(e){return!!this.findByCid(e.cid)},_remove:function(e){if(this._viewsByCid[e.cid]){e.model&&delete this._indexByModel[e.model.cid],delete this._viewsByCid[e.cid];var t=this.findIndexByView(e);this._views.splice(t,1),this._updateLength()}},_updateLength:function(){this.length=this._views.length}});var _e=["behaviors","childView","childViewEventPrefix","childViewEvents","childViewOptions","childViewTriggers","collectionEvents","emptyView","emptyViewOptions","events","modelEvents","sortWithCollection","triggers","ui","viewComparator","viewFilter"],we=e.View.extend({sortWithCollection:!0,constructor:function(t){this._setOptions(t),this.mergeOptions(t,_e),O(this),this.once("render",this._initialEvents),this._initChildViewStorage(),this._initBehaviors();var n=Array.prototype.slice.call(arguments);n[0]=this.options,e.View.prototype.constructor.apply(this,n),this.getEmptyRegion(),this.delegateEntityEvents(),this._triggerEventOnBehaviors("initialize",this)},_initChildViewStorage:function(){this.children=new ve},getEmptyRegion:function(){return this._emptyRegion&&!this._emptyRegion.isDestroyed()||(this._emptyRegion=new ae({el:this.el,replaceElement:!1}),this._emptyRegion._parentView=this),this._emptyRegion},_initialEvents:function(){this.listenTo(this.collection,{sort:this._onCollectionSort,reset:this._onCollectionReset,update:this._onCollectionUpdate})},_onCollectionSort:function(e,t){var n=t.add,r=t.merge,i=t.remove;this.sortWithCollection&&!1!==this.viewComparator&&(n||i||r||this.sort())},_onCollectionReset:function(){this.render()},_onCollectionUpdate:function(e,t){var n=t.changes,r=n.removed.length&&this._removeChildModels(n.removed);this._addedViews=n.added.length&&this._addChildModels(n.added),this._detachChildren(r),this._showChildren(),this._removeChildViews(r)},_removeChildModels:function(e){var n=this;return t.reduce(e,(function(e,t){var r=n._removeChildModel(t);return r&&e.push(r),e}),[])},_removeChildModel:function(e){var t=this.children.findByModel(e);return t&&this._removeChild(t),t},_removeChild:function(e){this.triggerMethod("before:remove:child",this,e),this.children._remove(e),this.triggerMethod("remove:child",this,e)},_addChildModels:function(e){return t.map(e,t.bind(this._addChildModel,this))},_addChildModel:function(e){var t=this._createChildView(e);return this._addChild(t),t},_createChildView:function(e){var t=this._getChildView(e),n=this._getChildViewOptions(e);return this.buildChildView(e,t,n)},_addChild:function(e,t){this.triggerMethod("before:add:child",this,e),this._setupChildView(e),this.children._add(e,t),this.triggerMethod("add:child",this,e)},_getChildView:function(e){var t=this.childView;if(!t)throw new R({name:"NoChildViewError",message:'A "childView" must be specified'});if(!(t=this._getView(t,e)))throw new R({name:"InvalidChildViewError",message:'"childView" must be a view class or a function that returns a view class'});return t},_getView:function(n,r){return n.prototype instanceof e.View||n===e.View?n:t.isFunction(n)?n.call(this,r):void 0},_getChildViewOptions:function(e){return t.isFunction(this.childViewOptions)?this.childViewOptions(e):this.childViewOptions},buildChildView:function(e,n,r){return new n(t.extend({model:e},r))},_setupChildView:function(e){O(e),e.on("destroy",this.removeChildView,this),this._proxyChildViewEvents(e)},_getImmediateChildren:function(){return this.children._views},setElement:function(){return e.View.prototype.setElement.apply(this,arguments),this._isAttached=a(this.el),this},render:function(){return this._isDestroyed||(this.triggerMethod("before:render",this),this._destroyChildren(),this.children._init(),this.collection&&this._addChildModels(this.collection.models),this._showChildren(),this._isRendered=!0,this.triggerMethod("render",this)),this},sort:function(){return this._isDestroyed?this:this.children.length?(this._showChildren(),this):this},_showChildren:function(){this.isEmpty()?this._showEmptyView():(this._sortChildren(),this.filter())},isEmpty:function(e){return e||!this.children.length},_showEmptyView:function(){var e=this._getEmptyView();if(e){var t=this._getEmptyViewOptions();this.getEmptyRegion().show(new e(t))}},_getEmptyView:function(){var e=this.emptyView;if(e)return this._getView(e)},_destroyEmptyView:function(){var e=this.getEmptyRegion();e.hasView()&&e.empty()},_getEmptyViewOptions:function(){var e=this.emptyViewOptions||this.childViewOptions;return t.isFunction(e)?e.call(this):e},_sortChildren:function(){var e=this.getComparator();e&&(delete this._addedViews,this.triggerMethod("before:sort",this),this.children._sort(e,this),this.triggerMethod("sort",this))},setComparator:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preventRender,r=this.viewComparator!==e,i=r&&!n;return this.viewComparator=e,i&&this.sort(),this},removeComparator:function(e){return this.setComparator(null,e)},getComparator:function(){return this.viewComparator?this.viewComparator:!(!this.sortWithCollection||!1===this.viewComparator||!this.collection)&&this._viewComparator},_viewComparator:function(e){return this.collection.indexOf(e.model)},filter:function(){if(this._isDestroyed)return this;if(!this.children.length)return this;var e=this._filterChildren();return this._renderChildren(e),this},_filterChildren:function(){var e=this,n=this._getFilter(),r=this._addedViews;if(delete this._addedViews,!n)return r||this.children._views;this.triggerMethod("before:filter",this);var i=[],o=[];return t.each(this.children._views,(function(t,r,a){(n.call(e,t,r,a)?i:o).push(t)})),this._detachChildren(o),this.triggerMethod("filter",this,i,o),i},_getFilter:function(){var e=this.getFilter();if(!e)return!1;if(t.isFunction(e))return e;if(t.isObject(e)){var n=t.matches(e);return function(e){return n(e.model&&e.model.attributes)}}if(t.isString(e))return function(t){return t.model&&t.model.get(e)};throw new R({name:"InvalidViewFilterError",message:'"viewFilter" must be a function, predicate object literal, a string indicating a model attribute, or falsy'})},getFilter:function(){return this.viewFilter},setFilter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.preventRender,r=this.viewFilter!==e,i=r&&!n;return this.viewFilter=e,i&&this.filter(),this},removeFilter:function(e){return this.setFilter(null,e)},_detachChildren:function(e){t.each(e,t.bind(this._detachChildView,this))},_detachChildView:function(e){var t=e._isAttached&&!1!==this.monitorViewEvents;t&&p(e,"before:detach",e),this.detachHtml(e),t&&(e._isAttached=!1,p(e,"detach",e))},detachHtml:function(e){this.Dom.detachEl(e.el,e.$el)},_renderChildren:function(e){if(this.isEmpty(!e.length))this._showEmptyView();else{this._destroyEmptyView(),this.triggerMethod("before:render:children",this,e);var t=this._getBuffer(e);this._attachChildren(t,e),this.triggerMethod("render:children",this,e)}},_attachChildren:function(e,n){n=this._isAttached&&!1!==this.monitorViewEvents?n:[],t.each(n,(function(e){e._isAttached||p(e,"before:attach",e)})),this.attachHtml(e),t.each(n,(function(e){e._isAttached||(e._isAttached=!0,p(e,"attach",e))}))},_getBuffer:function(e){var n=this,r=this.Dom.createBuffer();return t.each(e,(function(e){re(e),n.Dom.appendContents(r,e.el,{_$contents:e.$el})})),r},attachHtml:function(e){this.Dom.appendContents(this.el,e,{_$el:this.$el})},swapChildViews:function(e,t){if(!this.children.hasView(e)||!this.children.hasView(t))throw new R({name:"ChildSwapError",message:"Both views must be children of the collection view"});return this.children._swap(e,t),this.Dom.swapEl(e.el,t.el),this.Dom.hasEl(this.el,e.el)!==this.Dom.hasEl(this.el,t.el)&&this.filter(),this},addChildView:function(e,t){return!e||e._isDestroyed||((!t||t>=this.children.length)&&(this._addedViews=[e]),this._addChild(e,t),this._showChildren()),e},detachChildView:function(e){return this.removeChildView(e,{shouldDetach:!0}),e},removeChildView:function(e,t){return e?(this._removeChildView(e,t),this._removeChild(e),this.isEmpty()&&this._showEmptyView(),e):e},_removeChildViews:function(e){t.each(e,t.bind(this._removeChildView,this))},_removeChildView:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.shouldDetach;e.off("destroy",this.removeChildView,this),n?this._detachChildView(e):this._destroyChildView(e),this.stopListening(e)},_destroyChildView:function(e){e._isDestroyed||(e._shouldDisableEvents=!1===this.monitorViewEvents,ie(e))},_removeChildren:function(){this._destroyChildren(),this.getEmptyRegion().destroy(),delete this._addedViews},_destroyChildren:function(){this.children&&this.children.length&&(this.triggerMethod("before:destroy:children",this),!1===this.monitorViewEvents&&this.Dom.detachContents(this.el,this.$el),t.each(this.children._views,t.bind(this._removeChildView,this)),this.triggerMethod("destroy:children",this))}},{setDomApi:ee});t.extend(we.prototype,ne);var Te=["childViewContainer","template","templateContext"],Se=ge.extend({constructor:function(e){o("CompositeView is deprecated. Convert to View at your earliest convenience"),this.mergeOptions(e,Te),ge.prototype.constructor.apply(this,arguments)},_initialEvents:function(){this.collection&&(this.listenTo(this.collection,"add",this._onCollectionAdd),this.listenTo(this.collection,"update",this._onCollectionUpdate),this.listenTo(this.collection,"reset",this.renderChildren),this.sort&&this.listenTo(this.collection,"sort",this._sortViews))},_getChildView:function(e){var t=this.childView;if(!t)return this.constructor;if(!(t=this._getView(t,e)))throw new R({name:"InvalidChildViewError",message:'"childView" must be a view class or a function that returns a view class'});return t},serializeData:function(){return this.serializeModel()},render:function(){return this._isDestroyed||(this._isRendering=!0,this.resetChildViewContainer(),this.triggerMethod("before:render",this),this._renderTemplate(),this.bindUIElements(),this.renderChildren(),this._isRendering=!1,this._isRendered=!0,this.triggerMethod("render",this)),this},renderChildren:function(){(this._isRendered||this._isRendering)&&ge.prototype._renderChildren.call(this)},attachBuffer:function(e,t){var n=this.getChildViewContainer(e);this.Dom.appendContents(n[0],t,{_$el:n})},_insertAfter:function(e){var t=this.getChildViewContainer(this,e);this.Dom.appendContents(t[0],e.el,{_$el:t,_$contents:e.$el})},_appendReorderedChildren:function(e){var t=this.getChildViewContainer(this);this.Dom.appendContents(t[0],e,{_$el:t})},getChildViewContainer:function(e,n){if(e.$childViewContainer)return e.$childViewContainer;var r=void 0;if(e.childViewContainer){var i=t.result(e,"childViewContainer");if((r="@"===i.charAt(0)&&e.ui?e.ui[i.substr(4)]:this.$(i)).length<=0)throw new R({name:"ChildViewContainerMissingError",message:'The specified "childViewContainer" was not found: '+e.childViewContainer})}else r=e.$el;return e.$childViewContainer=r,r},resetChildViewContainer:function(){this.$childViewContainer&&(this.$childViewContainer=void 0)}}),Ee=t.pick(he.prototype,"serializeModel","getTemplate","_renderTemplate","_renderHtml","mixinTemplateContext","attachElContent");t.extend(Se.prototype,Ee);var Ce=["collectionEvents","events","modelEvents","triggers","ui"],ke=F.extend({cidPrefix:"mnb",constructor:function(e,n){this.view=n,this.defaults&&o("Behavior defaults are deprecated. For similar functionality set options on the Behavior class."),this.defaults=t.clone(t.result(this,"defaults",{})),this._setOptions(t.extend({},this.defaults,e)),this.mergeOptions(this.options,Ce),this.ui=t.extend({},t.result(this,"ui"),t.result(n,"ui")),F.apply(this,arguments)},$:function(){return this.view.$.apply(this.view,arguments)},destroy:function(){return this.stopListening(),this.view._removeBehavior(this),this},proxyViewProperties:function(){return this.$el=this.view.$el,this.el=this.view.el,this},bindUIElements:function(){return this._bindUIElements(),this},unbindUIElements:function(){return this._unbindUIElements(),this},getUI:function(e){return this._getUI(e)},delegateEntityEvents:function(){return this._delegateEntityEvents(this.view.model,this.view.collection),this},undelegateEntityEvents:function(){return this._undelegateEntityEvents(this.view.model,this.view.collection),this},getEvents:function(){var e=this,n=this.normalizeUIKeys(t.result(this,"events"));return t.reduce(n,(function(n,r,i){return t.isFunction(r)||(r=e[r]),r?(n[i=G(i,e.cid)]=t.bind(r,e),n):n}),{})},getTriggers:function(){if(this.triggers){var e=this.normalizeUIKeys(t.result(this,"triggers"));return this._getViewTriggers(this.view,e)}}});t.extend(ke.prototype,W,X,J);var xe=["region","regionClass"],Oe=F.extend({cidPrefix:"mna",constructor:function(e){this._setOptions(e),this.mergeOptions(e,xe),this._initRegion(),F.prototype.constructor.apply(this,arguments)},regionClass:ae,_initRegion:function(){var e=this.region;if(e){var t={regionClass:this.regionClass};this._region=se(e,t)}},getRegion:function(){return this._region},showView:function(e){for(var t=this.getRegion(),n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.show.apply(t,[e].concat(r))},getView:function(){return this.getRegion().currentView},start:function(e){return this.triggerMethod("before:start",this,e),this.triggerMethod("start",this,e),this}}),Pe=["appRoutes","controller"],Re=e.Router.extend({constructor:function(t){this._setOptions(t),this.mergeOptions(t,Pe),e.Router.apply(this,arguments);var n=this.appRoutes,r=this._getController();this.processAppRoutes(r,n),this.on("route",this._processOnRoute,this)},appRoute:function(e,t){var n=this._getController();return this._addAppRoute(n,e,t),this},_processOnRoute:function(e,n){if(t.isFunction(this.onRoute)){var r=t.invert(this.appRoutes)[e];this.onRoute(e,r,n)}},processAppRoutes:function(e,n){var r=this;if(!n)return this;var i=t.keys(n).reverse();return t.each(i,(function(t){r._addAppRoute(e,t,n[t])})),this},_getController:function(){return this.controller},_addAppRoute:function(e,n,r){var i=e[r];if(!i)throw new R('Method "'+r+'" was not found on the controller');this.route(n,r,t.bind(i,e))},triggerMethod:d});t.extend(Re.prototype,M);var Ae=e.Marionette,Ie=e.Marionette={};return Ie.noConflict=function(){return e.Marionette=Ae,this},Ie.bindEvents=r(I),Ie.unbindEvents=r(L),Ie.bindRequests=r(D),Ie.unbindRequests=r(N),Ie.mergeOptions=r(s),Ie.getOption=r(u),Ie.normalizeMethods=r(l),Ie.extend=i,Ie.isNodeAttached=a,Ie.deprecate=o,Ie.triggerMethod=r(d),Ie.triggerMethodOn=p,Ie.isEnabled=K,Ie.setEnabled=function(e,t){return Y[e]=t},Ie.monitorViewEvents=O,Ie.Behaviors={},Ie.Behaviors.behaviorsLookup=function(){throw new R({message:"You must define where your behaviors are stored.",url:"marionette.behaviors.md#behaviorslookup"})},Ie.Application=Oe,Ie.AppRouter=Re,Ie.Renderer=ce,Ie.TemplateCache=V,Ie.View=he,Ie.CollectionView=ge,Ie.NextCollectionView=we,Ie.CompositeView=Se,Ie.Behavior=ke,Ie.Region=ae,Ie.Error=R,Ie.Object=F,Ie.DEV_MODE=!1,Ie.FEATURES=Y,Ie.VERSION="3.5.1",Ie.DomApi=te,Ie.setDomApi=function(e){ge.setDomApi(e),Se.setDomApi(e),we.setDomApi(e),ae.setDomApi(e),he.setDomApi(e)},Ie}(n(10),n(4),n(424)),this&&this.Marionette&&(this.Mn=this.Marionette)},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(73),i=n(26);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(17),i=n(27),o=n(61);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(26),i=/"/g;e.exports=function(e,t,n,o){var a=String(r(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(o).replace(i,"&quot;")+'"'),s+">"+a+"</"+t+">"}},function(e,t,n){var r=n(11);e.exports=function(e){return r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(4),i=n(10),o=n(23),a=n(13),s=n(12),u={GetQuery:function(){return u.DeserializeQueryParams(window.location.search.substring(1))},UpdateQuery:function(e){if(e){var t=u.GetQuery(),n=u.SerializeQueryParams(r.extend(t,e));n&&(n="?".concat(n)),u.UpdateUrl("".concat(u.GetCurrentPath()).concat(n),null,{replace:!0,trigger:!1})}},UpdateUrl:function(e,t,n){var r=o.a.buildRoute(e,t);i.history.navigate(r,n),i.Radio.channel(s.a.SHELL).trigger(a.a.URL_CHANGE,t,n)},SerializeQueryParams:function(e){if(!e)return"";if("string"==typeof e)return e;var t=[],n=function(e,t){return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t))};return Object.keys(e).forEach((function(r){var i=e[r];null!=i&&(Array.isArray(i)?i.forEach((function(e){t.push(n(r,e))})):t.push(n(r,i)))})),t.join("&")},DeserializeQueryParams:function(e){return e?r.reduce(e.split("&"),(function(e,t){var n=t.split("="),r=n[0],i=n.length>0?decodeURIComponent(n[1]):"";return e[r]?e[r]instanceof Array?(e[r].push(i),e):(e[r]=[e[r],i],e):(e[r]=i,e)}),{}):{}},StartHistory:function(){i.History.started&&i.history.stop(),i.history.start({pushState:!0})},PageLoad:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t?window.open(e,"_blank"):window.location.href=e},Redirect:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=function(){return t?window.location.replace(e):window.location.href=e};o.b.hasActiveRoute()?i.Radio.channel(s.a.SHELL).once("routing:end",n):n()},Reload:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];window.location.reload(e)},GetCurrentPath:function(){return window.location.pathname},GetCurrentQueryString:function(){return window.location.search},GetCurrentUrl:function(){return window.location.href},GetCurrentReferrer:function(){return document.referrer},GetCurrentOrigin:function(){return window.location.origin},SetPageTitle:function(e){document.title=e}}},function(e,t,n){var r,i,o,a=n(149),s=n(14),u=n(18),l=n(33),c=n(36),f=n(86),h=n(75),d=s.WeakMap;if(a){var p=new d,y=p.get,m=p.has,g=p.set;r=function(e,t){return g.call(p,e,t),t},i=function(e){return y.call(p,e)||{}},o=function(e){return m.call(p,e)}}else{var v=f("state");h[v]=!0,r=function(e,t){return l(e,v,t),t},i=function(e){return c(e,v)?e[v]:{}},o=function(e){return c(e,v)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(l,e);var t,n,r,u=s(l);function l(){return i(this,l),u.apply(this,arguments)}return t=l,(n=[{key:"name",get:function(){return"DevError"}}])&&o(t.prototype,n),r&&o(t,r),l}(n(8).a)},function(e,t,n){var r=n(16),i=n(64),o=n(33),a=r("unscopables"),s=Array.prototype;null==s[a]&&o(s,a,i(null)),e.exports=function(e){s[a][e]=!0}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports={item:"yzAZk",background:"_2FYoc",thumbnailContainer:"_14YzS",teacherPack:"_1H-bZ",text:"fDGTW",atomGuide:"_2UrFB",studentActivity:"_3bk9l",additionalMaterials:"_3KgEr",userUploaded:"_21qiB"}},function(e,t,n){var r=n(14),i=n(74),o=n(33),a=n(36),s=n(114),u=n(148),l=n(39),c=l.get,f=l.enforce,h=String(u).split("toString");i("inspectSource",(function(e){return u.call(e)})),(e.exports=function(e,t,n,i){var u=!!i&&!!i.unsafe,l=!!i&&!!i.enumerable,c=!!i&&!!i.noTargetGet;"function"==typeof n&&("string"!=typeof t||a(n,"name")||o(n,"name",t),f(n).source=h.join("string"==typeof t?t:"")),e!==r?(u?!c&&e[t]&&(l=!0):delete e[t],l?e[t]=n:o(e,t,n)):l?e[t]=n:s(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||u.call(this)}))},function(e,t){e.exports=!1},function(e,t,n){var r=n(65),i=n(73),o=n(20),a=n(15),s=n(77),u=[].push,l=function(e){var t=1==e,n=2==e,l=3==e,c=4==e,f=6==e,h=5==e||f;return function(d,p,y,m){for(var g,v,b=o(d),_=i(b),w=r(p,y,3),T=a(_.length),S=0,E=m||s,C=t?E(d,T):n?E(d,0):void 0;T>S;S++)if((h||S in _)&&(v=w(g=_[S],S,b),e))if(t)C[S]=v;else if(v)switch(e){case 3:return!0;case 5:return g;case 6:return S;case 2:u.call(C,g)}else if(c)return!1;return f?-1:l||c?c:C}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6)}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e,t){var n=[][e];return!n||!r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){var r=n(17),i=n(85),o=n(61),a=n(32),s=n(62),u=n(36),l=n(147),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=s(t,!0),l)try{return c(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(151),i=n(14),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(25),i=n(163),o=n(15),a=n(65),s=n(164),u=n(162),l=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,c,f){var h,d,p,y,m,g,v,b=a(t,n,c?2:1);if(f)h=e;else{if("function"!=typeof(d=s(e)))throw TypeError("Target is not iterable");if(i(d)){for(p=0,y=o(e.length);y>p;p++)if((m=c?b(r(v=e[p])[0],v[1]):b(e[p]))&&m instanceof l)return m;return new l(!1)}h=d.call(e)}for(g=h.next;!(v=g.call(h)).done;)if("object"==typeof(m=u(h,b,v.value,c))&&m&&m instanceof l)return m;return new l(!1)}).stop=function(e){return new l(!0,e)}},function(e,t,n){var r=n(50);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(27).f,i=n(36),o=n(16)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(62),i=n(27),o=n(61);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},function(e,t,n){var r=n(75),i=n(18),o=n(36),a=n(27).f,s=n(87),u=n(90),l=s("meta"),c=0,f=Object.isExtensible||function(){return!0},h=function(e){a(e,l,{value:{objectID:"O"+ ++c,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,l)){if(!f(e))return"F";if(!t)return"E";h(e)}return e[l].objectID},getWeakData:function(e,t){if(!o(e,l)){if(!f(e))return!0;if(!t)return!1;h(e)}return e[l].weakData},onFreeze:function(e){return u&&d.REQUIRED&&f(e)&&!o(e,l)&&h(e),e}};r[l]=!0},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(this,n(30))},function(e,t){var n,r,i,o,a,s,u;n=function(e){return 9e4*e},r=function(e,t){return e*t},i=function(e){return e/9e4},o=function(e,t){return e/t},a=function(e,t){return n(o(e,t))},s=function(e,t){return r(i(e),t)},u=function(e,t,n){return i(n?e:e-t)},e.exports={ONE_SECOND_IN_TS:9e4,secondsToVideoTs:n,secondsToAudioTs:r,videoTsToSeconds:i,audioTsToSeconds:o,audioTsToVideoTs:a,videoTsToAudioTs:s,metadataTsToSeconds:u}},function(e,t,n){"use strict";
7
7
  /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e instanceof Uint8Array?e:new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0)},i=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,r(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},o=function(e,t){void 0===t&&(t=0);var n=(e=r(e))[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&e[t+5])>>4?n+20:n+10},a=function e(t,n){return void 0===n&&(n=0),(t=r(t)).length-n<10||"ID3"!==i(t.subarray(n,n+3))?n:e(t,n+=o(t,n))},s={aac:function(e){var t=a(e);return e.length>=t+2&&255==(255&e[t])&&224==(224&e[t+1])&&16==(22&e[t+1])},mp3:function(e){var t=a(e);return e.length>=t+2&&255==(255&e[t])&&224==(224&e[t+1])&&2==(6&e[t+1])},webm:function(e){return e.length>=4&&26==(255&e[0])&&69==(255&e[1])&&223==(255&e[2])&&163==(255&e[3])},mp4:function(e){return e.length>=8&&/^(f|s)typ$/.test(i(e.subarray(4,8)))&&!/^ftyp3g$/.test(i(e.subarray(4,10)))},"3gp":function(e){return e.length>=10&&/^ftyp3g$/.test(i(e.subarray(4,10)))},ts:function(e){if(e.length<189&&e.length>=1)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){return e.length>=4&&/^fLaC$/.test(i(e.subarray(0,4)))},ogg:function(e){return e.length>=4&&/^OggS$/.test(i(e.subarray(0,4)))}},u=Object.keys(s).filter((function(e){return"ts"!==e})).concat("ts");u.forEach((function(e){var t=s[e];s[e]=function(e){return t(r(e))}}));t.detectContainerForBytes=function(e){e=r(e);for(var t=0;t<u.length;t++){var n=u[t];if(s[n](e))return n}return""},t.getId3Offset=a,t.id3Size=o,t.isLikely=s,t.isLikelyFmp4MediaSegment=function(e){e=r(e);for(var t=0;t<e.length;){var n=(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0;if("moof"===i(e.subarray(t+4,t+8)))return!0;0===n||n+t>e.length?t=e.length:t+=n}return!1}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(18);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(52),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},function(e,t,n){var r=n(25),i=n(154),o=n(117),a=n(75),s=n(155),u=n(113),l=n(86)("IE_PROTO"),c=function(){},f=function(){var e,t=u("iframe"),n=o.length;for(t.style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),f=e.F;n--;)delete f.prototype[o[n]];return f()};e.exports=Object.create||function(e,t){var n;return null!==e?(c.prototype=r(e),n=new c,c.prototype=null,n[l]=e):n=f(),void 0===t?n:i(n,t)},a[l]=!0},function(e,t,n){var r=n(37);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(36),i=n(20),o=n(86),a=n(166),s=o("IE_PROTO"),u=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?u:null}},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=!("undefined"==typeof window||!window.document||!window.document.createElement);t.default=r,e.exports=t.default},function(e,t,n){e.exports=n(425)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(4),i=n(10),o=n(22);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,i,a=f(h);function h(){return s(this,h),a.apply(this,arguments)}return t=h,(n=[{key:"mixin",value:function(e){for(var t in e){if(this.hasOwnProperty(t)){var n=this[t];return void(this[t]=r.extend({},n,e[t]))}this[t]=e[t]}}},{key:"addValidation",value:function(e){this.mixin({validation:e})}},{key:"validate",value:function(e,t){l(d(h.prototype),"validate",this).call(this,e,t)}},{key:"listenTo",value:function(){return o.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],l(d(h.prototype),"listenTo",this))}}])&&u(t.prototype,n),i&&u(t,i),h}(i.Model)},function(e,t,n){var r;
8
8
  /*!
9
9
  Copyright (c) 2017 Jed Watson.
@@ -12,7 +12,7 @@ for(o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)r[o-48]=
12
12
  */!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if("string"===o||"number"===o)e.push(r);else if(Array.isArray(r)&&r.length){var a=i.apply(null,r);a&&e.push(a)}else if("object"===o)for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}return e.join(" ")}e.exports?(i.default=i,e.exports=i):void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)}()},function(e,t,n){"use strict";
13
13
  /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var i=r(n(364)),o=r(n(58));e.exports=function(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=i.buildAbsoluteURL(o.location&&o.location.href||"",e)),i.buildAbsoluteURL(e,t))}},function(e,t,n){e.exports={thumbnail:"_3lfBf",sixteenByNine:"_2LqZ8",nineBySixteen:"_136ry",oneByOne:"_2wYLa",twoByThree:"_1eC6Q"}},function(e,t,n){var r=n(11),i=n(50),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},function(e,t,n){var r=n(46),i=n(245);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.4.0",mode:r?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports={}},function(e,t,n){var r=n(152),i=n(117);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(18),i=n(54),o=n(16)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t,n){var r=n(11),i=n(16),o=n(120),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(37),i=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(52),i=n(26),o=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),l=s.length;return u<0||u>=l?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===l||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},function(e,t,n){"use strict";var r=n(217),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,u=s&&function(){var e={};try{for(var t in s(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(e){return!1}}(),l=function(e,t,n,r){var i;(!(t in e)||"function"==typeof(i=r)&&"[object Function]"===o.call(i)&&r())&&(u?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},c=function(e,t){var n=arguments.length>2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;s<o.length;s+=1)l(e,o[s],t[o[s]],n[o[s]])};c.supportsDescriptors=!!u,e.exports=c},function(e,t,n){"use strict";n.d(t,"b",(function(){return k})),n.d(t,"a",(function(){return x}));var r=n(4),i=n(10),o=n(29),a=n(22),s=n(41),u=n(12),l=n(109),c=n(8),f=n(23);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p(e,t)}(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.")}()}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),e}function v(e,t,n){return(v="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=E(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_(e,t)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var i=E(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return T(this,n)}}function T(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?S(e):t}function S(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){b(n,e);var t=w(n);function n(e){var i;y(this,n),i=t.call(this,e);var o=[].concat(d(i.defaultProps),d(i.props||[]));return i.mergeOptions(e,o),r.result(S(i),"name")||c.c.throw(new c.b("Error: View with cid:".concat(i.cid," requires a name."))),i}return g(n,[{key:"defaultProps",get:function(){return["shell","layoutService"]}},{key:"_setOptions",value:function(e){this.options=r.extend({},r.result(this,"defaults"),e)}},{key:"_setAttributes",value:function(e){var t,n,i;l.a.isDevelopment&&r.extend(e,(t={},n="cv-classname",i=this.name,n in t?Object.defineProperty(t,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[n]=i,t)),this.$el.attr(e)}},{key:"ui",get:function(){return this.uiStorage||(this.uiStorage=this.elements),this.uiStorage},set:function(e){this.uiStorage=e}},{key:"elements",get:function(){return null}},{key:"serializeModel",value:function(){return this.model?this.model.toJSON():{}}},{key:"serializeCollection",value:function(){return this.collection?this.collection.toJSON():[]}},{key:"resetClassName",value:function(){this.$el.attr("class",r.result(this,"className"))}},{key:"serializeData",value:function(){var e=this,t=v(E(n.prototype),"serializeData",this).call(this),i=r.result(this,"viewOptions"),o=r.extend({},t,{options:i});return n.ViewDataExtensions.length?r.extend.apply(r,[o].concat(d(r.map(n.ViewDataExtensions,(function(t){return t instanceof Function?t(e):t}))))):o}},{key:"viewOptions",value:function(){return this.options}},{key:"undelegateAppLinks",value:function(){this.$el&&this.$el.off(".appLinks".concat(this.cid))}},{key:"renderAppLinks",value:function(){var e=this,t=this.appLinks;t&&(t=this.normalizeUIKeys(t),this.undelegateAppLinks(),r.each(r.keys(t),(function(n){var r=n,i=t[n],o=f.a.getHref(i);"[this]"===r&&(r=null);var a=r?e.$el.find(n):e.$el;(a.is("a")||a.is("button"))&&(o&&"/"!==o&&a.attr("href",o),e.delegate("click.appLinks".concat(e.cid),r,(function(e){e.preventDefault(),f.a.trigger(i)})))})))}},{key:"hasPartialLoadingRegions",value:function(){return void 0!==this._hasPartialLoadingRegions||(this._hasPartialLoadingRegions=r.some(this.regions,(function(e){return r.has(e,"partialLoading")}))),this._hasPartialLoadingRegions}},{key:"renderPartialLoading",value:function(e){i.Radio.channel(u.a.SHELL).trigger("render:partial:loading",this,e)}},{key:"listenTo",value:function(){return a.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],v(E(n.prototype),"listenTo",this))}},{key:"render",value:function(){if(this._isDestroyed)return this;var e=this.processRequriedResources(!0);return e&&(e=this.triggerMethod("before:render",this)),!1!==e&&(e=!0),!1===(e=e&&this.processRequriedResources(!1))?(this._partialLoadingRendered||!this.hasPartialLoadingRegions()||(this._partialLoadingRendered=!0,this._reInitRegions(),this._renderTemplate(),this.renderPartialLoading()),this):((this._isRendered||this._partialLoadingRendered)&&this._reInitRegions(),this.setTitle(),this._renderTemplate(),this.bindUIElements(),this.renderAppLinks(),this._partialLoadingRendered=!1,this._isRendered=!0,this.triggerMethod("render",this),this)}},{key:"processRequriedResources",value:function(e){return!0}},{key:"setTitle",value:function(){}}],[{key:"AddViewDataExtension",value:function(e){n.ViewDataExtensions.push(e)}}]),n}(o.View);C.ViewDataExtensions=[];var k=function(e){b(n,e);var t=w(n);function n(e){var r;return y(this,n),(r=t.call(this,e)).boundListeners={},r.resourceInstances={},r}return g(n,[{key:"processRequriedResources",value:function(e){var t=this,n=r.keys(this.requiredResources);if(!n.length)return!0;var i=this,o=!0;return r.each(n,(function(n){var r=t.requiredResources[n];if(r.beforeOnBeforeRender===e){var a=r.dataServiceName;t.resourceInstances[a]||(t.resourceInstances[a]=r.getInstance(t)),t.boundListeners["".concat(a,":").concat(r.eventName)]||(t.listenTo(t.resourceInstances[a].channelName,r.eventName,t.render),t.boundListeners["".concat(a,":").concat(r.eventName)]=!0),i[n]=r.getData(t.resourceInstances[a]),o=o&&!!i[n]}})),o}},{key:"setTitle",value:function(){r.isString(this.title)||!1===this.title||c.c.throw(new s.a("Must define a title for ".concat(this.name,"."))),i.Radio.channel(u.a.SHELL).trigger("set:page:title",this.title)}}]),n}(C),x=function(e){b(n,e);var t=w(n);function n(){return y(this,n),t.apply(this,arguments)}return n}(C)},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);t.f=o?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},function(e,t,n){var r=n(74),i=n(87),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(51);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(25),i=n(263);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},function(e,t,n){var r=n(11);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var r=n(45);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";var r=n(46),i=n(14),o=n(11);e.exports=r||!o((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete i[e]}))},function(e,t,n){var r=n(25),i=n(37),o=n(16)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,n){"use strict";var r,i,o=n(127),a=RegExp.prototype.exec,s=String.prototype.replace,u=a,l=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),c=void 0!==/()??/.exec("")[1];(l||c)&&(u=function(e){var t,n,r,i,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",o.call(u))),l&&(t=u.lastIndex),r=a.call(u,e),l&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),c&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=u},function(e,t,n){var r=n(18),i=n(50),o=n(16)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},function(e,t,n){"use strict";var r=n(33),i=n(45),o=n(11),a=n(16),s=n(96),u=a("species"),l=!o((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),c=!o((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var h=a(e),d=!o((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),p=d&&!o((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!d||!p||"replace"===e&&!l||"split"===e&&!c){var y=/./[h],m=n(h,""[e],(function(e,t,n,r,i){return t.exec===s?d&&!i?{done:!0,value:y.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),g=m[0],v=m[1];i(String.prototype,e,g),i(RegExp.prototype,h,2==t?function(e,t){return v.call(e,this,t)}:function(e){return v.call(e,this)}),f&&r(RegExp.prototype[h],"sham",!0)}}},function(e,t,n){"use strict";var r=n(81).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r=n(50),i=n(96);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){var r=n(26),i="["+n(130)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},function(e,t){e.exports={toUnsigned:function(e){return e>>>0},toHexString:function(e){return("00"+e.toString(16)).slice(-2)}}},function(e,t,n){"use strict";var r;n.d(t,"a",(function(){return r})),function(e){e.Staff="staff",e.Learner="learner",e.Unknown="unknown"}(r||(r={}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,"a",(function(){return i}));var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"use",value:function(e){var t;this.go=(t=this.go,function(n,r){return t(n,(function(){return e(n,r)}))})}},{key:"go",value:function(e,t){t(e)}}])&&r(t.prototype,n),i&&r(t,i),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(10),i=n(22);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,r,o=c(f);function f(){return a(this,f),o.apply(this,arguments)}return t=f,(n=[{key:"listenTo",value:function(){return i.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],u(h(f.prototype),"listenTo",this))}}])&&s(t.prototype,n),r&&s(t,r),f}(r.Collection)},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){(function(t){var r,i=void 0!==t?t:"undefined"!=typeof window?window:{},o=n(360);"undefined"!=typeof document?r=document:(r=i["__GLOBAL_DOCUMENT_CACHE@4"])||(r=i["__GLOBAL_DOCUMENT_CACHE@4"]=o),e.exports=r}).call(this,n(30))},function(e,t,n){"use strict";(function(t){var r,i=(r=n(58))&&"object"==typeof r&&"default"in r?r.default:r;e.exports=function(e){for(var n,r=(n=e,i.atob?i.atob(n):t.from(n,"base64").toString("binary")),o=new Uint8Array(r.length),a=0;a<r.length;a++)o[a]=r.charCodeAt(a);return o}}).call(this,n(365).Buffer)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,"a",(function(){return i}));var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.variables={}}var t,n,i;return t=e,i=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"name",get:function(){return"EnvironmentVariables"}},{key:"isDevelopment",get:function(){return this.variables.isDevelopment}},{key:"get",value:function(e){return this.variables[e]}},{key:"setUpVariables",value:function(e){this.variables=e}}])&&r(t.prototype,n),i&&r(t,i),e}().Instance},function(e,t,n){"use strict";
14
14
  /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */var r=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),n>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var n=t.length,r=0;r<n;++r)t[r].call(this,arguments[1]);else for(var i=Array.prototype.slice.call(arguments,1),o=t.length,a=0;a<o;++a)t[a].apply(this,i)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();e.exports=r},function(e,t,n){"use strict";
15
- /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e instanceof Uint8Array?e:new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0)};t.bytesToString=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,r(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},t.concatTypedArrays=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce((function(e,t){return e+=t&&(t.byteLength||t.length)||0}),0),o=new Uint8Array(i),a=0;return t.forEach((function(e){e=r(e),o.set(e,a),a+=e.byteLength})),o},t.isTypedArray=function(e){return ArrayBuffer.isView(e)},t.stringToBytes=function(e,t){void 0===t&&(t=!1);return"string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e?[]:(t||(e=unescape(encodeURIComponent(e))),e.split("").map((function(e){return 255&e.charCodeAt(0)})))},t.toUint8=r},function(e,t){var n=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=n},function(e,t,n){var r=n(14),i=n(18),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(14),i=n(33);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(152),i=n(117).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(32),i=n(15),o=n(63),a=function(e){return function(t,n,a){var s,u=r(t),l=i(u.length),c=o(a,l);if(e&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(11),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==l||n!=u&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",l=o.POLYFILL="P";e.exports=o},function(e,t,n){var r,i,o=n(14),a=n(88),s=o.process,u=s&&s.versions,l=u&&u.v8;l?i=(r=l.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},function(e,t,n){var r=n(50),i=n(16)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(16)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(32),i=n(42),o=n(79),a=n(38),s=n(124),u=a.set,l=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){"use strict";var r=n(6),i=n(125),o=n(66),a=n(89),s=n(55),u=n(33),l=n(45),c=n(16),f=n(46),h=n(79),d=n(165),p=d.IteratorPrototype,y=d.BUGGY_SAFARI_ITERATORS,m=c("iterator"),g=function(){return this};e.exports=function(e,t,n,c,d,v,b){i(n,t,c);var _,w,T,S=function(e){if(e===d&&O)return O;if(!y&&e in k)return k[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},E=t+" Iterator",C=!1,k=e.prototype,x=k[m]||k["@@iterator"]||d&&k[d],O=!y&&x||S(d),P="Array"==t&&k.entries||x;if(P&&(_=o(P.call(new e)),p!==Object.prototype&&_.next&&(f||o(_)===p||(a?a(_,p):"function"!=typeof _[m]&&u(_,m,g)),s(_,E,!0,!0),f&&(h[E]=g))),"values"==d&&x&&"values"!==x.name&&(C=!0,O=function(){return x.call(this)}),f&&!b||k[m]===O||u(k,m,O),h[t]=O,d)if(w={values:S("values"),keys:v?O:S("keys"),entries:S("entries")},b)for(T in w)(y||C||!(T in k))&&l(k,T,w[T]);else r({target:t,proto:!0,forced:y||C},w);return w}},function(e,t,n){"use strict";var r=n(165).IteratorPrototype,i=n(64),o=n(61),a=n(55),s=n(79),u=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,l,!1,!0),s[l]=u,e}},function(e,t,n){"use strict";var r=n(51),i=n(27),o=n(16),a=n(17),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(25);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(97);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(16)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(e,t,n){var r=n(11),i=n(130);e.exports=function(e){return r((function(){return!!i[e]()||"​…᠎"!="​…᠎"[e]()||i[e].name!==e}))}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(4),i=n(29),o=n(22),a=n(8);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?d(e):t}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,i,s=f(h);function h(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),t=s.call(this,e),r.result(d(t),"name")||a.c.throw(new a.b("Error: View with cid:".concat(t.cid," requires a name."))),t}return t=h,(n=[{key:"serializeModel",value:function(){return this.model?this.model.toJSON():{}}},{key:"serializeCollection",value:function(){return this.collection?this.collection.toJSON():[]}},{key:"listenTo",value:function(){return o.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],l(p(h.prototype),"listenTo",this))}}])&&u(t.prototype,n),i&&u(t,i),h}(i.CollectionView)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=a(n(1)),o=a(n(214));function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,o.default)((function(e,t,n,o,a){var s=e[t],u=void 0===s?"undefined":r(s);return i.default.isValidElement(s)?new Error("Invalid "+o+" `"+a+"` of type ReactElement supplied to `"+n+"`, expected a ReactComponent or a DOMElement. You can usually obtain a ReactComponent or DOMElement from a ReactElement by attaching a ref to it."):"object"===u&&"function"==typeof s.render||1===s.nodeType?null:new Error("Invalid "+o+" `"+a+"` of value `"+s+"` supplied to `"+n+"`, expected a ReactComponent or a DOMElement.")})),e.exports=t.default},function(e,t,n){"use strict";var r=n(440);e.exports=Function.prototype.bind||r},function(e,t,n){"use strict";var r=n(135),i=n(220),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||r.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),l=i("%Object.defineProperty%",!0),c=i("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=s(r,a,arguments);if(u&&l){var n=u(t,"length");n.configurable&&l(t,"length",{value:1+c(0,e.length-(arguments.length-1))})}return t};var f=function(){return s(r,o,arguments)};l?l(e.exports,"apply",{value:f}):e.exports.apply=f},function(e,t,n){"use strict";var r=n(43);t.__esModule=!0,t.default=void 0;var i=r(n(67)).default?function(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):o(e,t)}:o;function o(e,t){if(t)do{if(t===e)return!0}while(t=t.parentNode);return!1}t.default=i,e.exports=t.default},function(e,t,n){"use strict";var r=n(58),i=n(31),o=n(358);function a(e,t,n){var r=e;return o(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function s(e,t,n){return u(t=a(e,t,n))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=l.response?l.response:l.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(l),m)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,g)}function o(){if(!u){var t;clearTimeout(c),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var i=g,o=null;return 0!==t?(i={body:r(),statusCode:t,method:h,headers:{},url:f,rawRequest:l},l.getAllResponseHeaders&&(i.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t}(l.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),n(o,i,i.body)}}var a,u,l=e.xhr||null;l||(l=e.cors||e.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var c,f=l.url=e.uri||e.url,h=l.method=e.method||"GET",d=e.body||e.data,p=l.headers=e.headers||{},y=!!e.sync,m=!1,g={body:void 0,headers:{},statusCode:0,method:h,url:f,rawRequest:l};if("json"in e&&!1!==e.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),d=JSON.stringify(!0===e.json?d:e.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(o,0)},l.onload=o,l.onerror=i,l.onprogress=function(){},l.onabort=function(){u=!0},l.ontimeout=i,l.open(h,f,!y,e.username,e.password),y||(l.withCredentials=!!e.withCredentials),!y&&e.timeout>0&&(c=setTimeout((function(){if(!u){u=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),l.setRequestHeader)for(a in p)p.hasOwnProperty(a)&&l.setRequestHeader(a,p[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(l.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(l),l.send(d||null),l}e.exports=s,e.exports.default=s,s.XMLHttpRequest=r.XMLHttpRequest||function(){},s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){s["delete"===e?"del":e]=function(t,n,r){return(n=a(t,n,r)).method=e.toUpperCase(),u(n)}}))},function(e,t,n){var r=n(58),i=e.exports={WebVTT:n(359),VTTCue:n(361),VTTRegion:n(362)};r.vttjs=i,r.WebVTT=i.WebVTT;var o=i.VTTCue,a=i.VTTRegion,s=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=o,r.VTTRegion=a},i.restore=function(){r.VTTCue=s,r.VTTRegion=u},r.VTTCue||i.shim()},function(e,t,n){"use strict";
15
+ /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){return e instanceof Uint8Array?e:new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0)};t.bytesToString=function(e){if(!e)return"";e=Array.prototype.slice.call(e);var t=String.fromCharCode.apply(null,r(e));try{return decodeURIComponent(escape(t))}catch(e){}return t},t.concatTypedArrays=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.reduce((function(e,t){return e+=t&&(t.byteLength||t.length)||0}),0),o=new Uint8Array(i),a=0;return t.forEach((function(e){e=r(e),o.set(e,a),a+=e.byteLength})),o},t.isTypedArray=function(e){return ArrayBuffer.isView(e)},t.stringToBytes=function(e,t){void 0===t&&(t=!1);return"string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e?[]:(t||(e=unescape(encodeURIComponent(e))),e.split("").map((function(e){return 255&e.charCodeAt(0)})))},t.toUint8=r},function(e,t){var n=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=n},function(e,t,n){var r=n(14),i=n(18),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},function(e,t,n){var r=n(14),i=n(33);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(152),i=n(117).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(32),i=n(15),o=n(63),a=function(e){return function(t,n,a){var s,u=r(t),l=i(u.length),c=o(a,l);if(e&&n!=n){for(;l>c;)if((s=u[c++])!=s)return!0}else for(;l>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(11),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==l||n!=u&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",l=o.POLYFILL="P";e.exports=o},function(e,t,n){var r,i,o=n(14),a=n(88),s=o.process,u=s&&s.versions,l=u&&u.v8;l?i=(r=l.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},function(e,t,n){var r=n(50),i=n(16)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var r=n(16)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(32),i=n(42),o=n(79),a=n(39),s=n(124),u=a.set,l=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){u(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(e,t,n){"use strict";var r=n(6),i=n(125),o=n(66),a=n(89),s=n(55),u=n(33),l=n(45),c=n(16),f=n(46),h=n(79),d=n(165),p=d.IteratorPrototype,y=d.BUGGY_SAFARI_ITERATORS,m=c("iterator"),g=function(){return this};e.exports=function(e,t,n,c,d,v,b){i(n,t,c);var _,w,T,S=function(e){if(e===d&&O)return O;if(!y&&e in k)return k[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},E=t+" Iterator",C=!1,k=e.prototype,x=k[m]||k["@@iterator"]||d&&k[d],O=!y&&x||S(d),P="Array"==t&&k.entries||x;if(P&&(_=o(P.call(new e)),p!==Object.prototype&&_.next&&(f||o(_)===p||(a?a(_,p):"function"!=typeof _[m]&&u(_,m,g)),s(_,E,!0,!0),f&&(h[E]=g))),"values"==d&&x&&"values"!==x.name&&(C=!0,O=function(){return x.call(this)}),f&&!b||k[m]===O||u(k,m,O),h[t]=O,d)if(w={values:S("values"),keys:v?O:S("keys"),entries:S("entries")},b)for(T in w)(y||C||!(T in k))&&l(k,T,w[T]);else r({target:t,proto:!0,forced:y||C},w);return w}},function(e,t,n){"use strict";var r=n(165).IteratorPrototype,i=n(64),o=n(61),a=n(55),s=n(79),u=function(){return this};e.exports=function(e,t,n){var l=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,l,!1,!0),s[l]=u,e}},function(e,t,n){"use strict";var r=n(51),i=n(27),o=n(16),a=n(17),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(25);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){var r=n(97);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(16)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t){e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(e,t,n){var r=n(11),i=n(130);e.exports=function(e){return r((function(){return!!i[e]()||"​…᠎"!="​…᠎"[e]()||i[e].name!==e}))}},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,n(t,r)}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(4),i=n(29),o=n(22),a=n(8);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=p(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?d(e):t}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,i,s=f(h);function h(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),t=s.call(this,e),r.result(d(t),"name")||a.c.throw(new a.b("Error: View with cid:".concat(t.cid," requires a name."))),t}return t=h,(n=[{key:"serializeModel",value:function(){return this.model?this.model.toJSON():{}}},{key:"serializeCollection",value:function(){return this.collection?this.collection.toJSON():[]}},{key:"listenTo",value:function(){return o.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],l(p(h.prototype),"listenTo",this))}}])&&u(t.prototype,n),i&&u(t,i),h}(i.CollectionView)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=a(n(1)),o=a(n(214));function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,o.default)((function(e,t,n,o,a){var s=e[t],u=void 0===s?"undefined":r(s);return i.default.isValidElement(s)?new Error("Invalid "+o+" `"+a+"` of type ReactElement supplied to `"+n+"`, expected a ReactComponent or a DOMElement. You can usually obtain a ReactComponent or DOMElement from a ReactElement by attaching a ref to it."):"object"===u&&"function"==typeof s.render||1===s.nodeType?null:new Error("Invalid "+o+" `"+a+"` of value `"+s+"` supplied to `"+n+"`, expected a ReactComponent or a DOMElement.")})),e.exports=t.default},function(e,t,n){"use strict";var r=n(440);e.exports=Function.prototype.bind||r},function(e,t,n){"use strict";var r=n(135),i=n(220),o=i("%Function.prototype.apply%"),a=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||r.call(a,o),u=i("%Object.getOwnPropertyDescriptor%",!0),l=i("%Object.defineProperty%",!0),c=i("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=s(r,a,arguments);if(u&&l){var n=u(t,"length");n.configurable&&l(t,"length",{value:1+c(0,e.length-(arguments.length-1))})}return t};var f=function(){return s(r,o,arguments)};l?l(e.exports,"apply",{value:f}):e.exports.apply=f},function(e,t,n){"use strict";var r=n(43);t.__esModule=!0,t.default=void 0;var i=r(n(67)).default?function(e,t){return e.contains?e.contains(t):e.compareDocumentPosition?e===t||!!(16&e.compareDocumentPosition(t)):o(e,t)}:o;function o(e,t){if(t)do{if(t===e)return!0}while(t=t.parentNode);return!1}t.default=i,e.exports=t.default},function(e,t,n){"use strict";var r=n(58),i=n(31),o=n(358);function a(e,t,n){var r=e;return o(t)?(n=t,"string"==typeof e&&(r={uri:e})):r=i({},t,{uri:e}),r.callback=n,r}function s(e,t,n){return u(t=a(e,t,n))}function u(e){if(void 0===e.callback)throw new Error("callback argument missing");var t=!1,n=function(n,r,i){t||(t=!0,e.callback(n,r,i))};function r(){var e=void 0;if(e=l.response?l.response:l.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch(e){}return null}(l),m)try{e=JSON.parse(e)}catch(e){}return e}function i(e){return clearTimeout(c),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,n(e,g)}function o(){if(!u){var t;clearTimeout(c),t=e.useXDR&&void 0===l.status?200:1223===l.status?204:l.status;var i=g,o=null;return 0!==t?(i={body:r(),statusCode:t,method:h,headers:{},url:f,rawRequest:l},l.getAllResponseHeaders&&(i.headers=function(e){var t={};return e?(e.trim().split("\n").forEach((function(e){var n=e.indexOf(":"),r=e.slice(0,n).trim().toLowerCase(),i=e.slice(n+1).trim();void 0===t[r]?t[r]=i:Array.isArray(t[r])?t[r].push(i):t[r]=[t[r],i]})),t):t}(l.getAllResponseHeaders()))):o=new Error("Internal XMLHttpRequest Error"),n(o,i,i.body)}}var a,u,l=e.xhr||null;l||(l=e.cors||e.useXDR?new s.XDomainRequest:new s.XMLHttpRequest);var c,f=l.url=e.uri||e.url,h=l.method=e.method||"GET",d=e.body||e.data,p=l.headers=e.headers||{},y=!!e.sync,m=!1,g={body:void 0,headers:{},statusCode:0,method:h,url:f,rawRequest:l};if("json"in e&&!1!==e.json&&(m=!0,p.accept||p.Accept||(p.Accept="application/json"),"GET"!==h&&"HEAD"!==h&&(p["content-type"]||p["Content-Type"]||(p["Content-Type"]="application/json"),d=JSON.stringify(!0===e.json?d:e.json))),l.onreadystatechange=function(){4===l.readyState&&setTimeout(o,0)},l.onload=o,l.onerror=i,l.onprogress=function(){},l.onabort=function(){u=!0},l.ontimeout=i,l.open(h,f,!y,e.username,e.password),y||(l.withCredentials=!!e.withCredentials),!y&&e.timeout>0&&(c=setTimeout((function(){if(!u){u=!0,l.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",i(e)}}),e.timeout)),l.setRequestHeader)for(a in p)p.hasOwnProperty(a)&&l.setRequestHeader(a,p[a]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(l.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(l),l.send(d||null),l}e.exports=s,e.exports.default=s,s.XMLHttpRequest=r.XMLHttpRequest||function(){},s.XDomainRequest="withCredentials"in new s.XMLHttpRequest?s.XMLHttpRequest:r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],(function(e){s["delete"===e?"del":e]=function(t,n,r){return(n=a(t,n,r)).method=e.toUpperCase(),u(n)}}))},function(e,t,n){var r=n(58),i=e.exports={WebVTT:n(359),VTTCue:n(361),VTTRegion:n(362)};r.vttjs=i,r.WebVTT=i.WebVTT;var o=i.VTTCue,a=i.VTTRegion,s=r.VTTCue,u=r.VTTRegion;i.shim=function(){r.VTTCue=o,r.VTTRegion=a},i.restore=function(){r.VTTCue=s,r.VTTRegion=u},r.VTTCue||i.shim()},function(e,t,n){"use strict";
16
16
  /*! @name @videojs/vhs-utils @version 2.3.0 @license MIT */Object.defineProperty(t,"__esModule",{value:!0});var r=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,i=/^application\/dash\+xml/i;t.simpleTypeFromSourceType=function(e){return r.test(e)?"hls":i.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}},function(e,t,n){"use strict";var r,i,o,a,s,u,l=n(102).toUnsigned,c=n(102).toHexString,f=n(374),h=n(189),d=n(375),p=n(376),y=n(378);r=function(e){return f(e,["moov","trak"]).reduce((function(e,t){var n,r,i,o,a;return(n=f(t,["tkhd"])[0])?(r=n[0],o=l(n[i=0===r?12:20]<<24|n[i+1]<<16|n[i+2]<<8|n[i+3]),(a=f(t,["mdia","mdhd"])[0])?(i=0===(r=a[0])?12:20,e[o]=l(a[i]<<24|a[i+1]<<16|a[i+2]<<8|a[i+3]),e):null):null}),{})},i=function(e,t){var n,r,i;return n=f(t,["moof","traf"]),r=[].concat.apply([],n.map((function(t){return f(t,["tfhd"]).map((function(n){var r,i,o;return r=l(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=e[r]||9e4,(o="number"!=typeof(o=f(t,["tfdt"]).map((function(e){var t,n;return t=e[0],n=l(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===t&&(n*=Math.pow(2,32),n+=l(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),n}))[0])||isNaN(o)?1/0:o)/i}))}))),i=Math.min.apply(null,r),isFinite(i)?i:0},o=function(e,t){var n,r=f(t,["moof","traf"]),i=0,o=0;if(r&&r.length){var a=f(r[0],["tfhd"])[0],s=f(r[0],["trun"])[0],u=f(r[0],["tfdt"])[0];if(a)n=d(a).trackId;if(u)i=y(u).baseMediaDecodeTime;if(s){var l=p(s);l.samples&&l.samples.length&&(o=l.samples[0].compositionTimeOffset||0)}}return(i+o)/(e[n]||9e4)},a=function(e){var t=f(e,["moov","trak"]),n=[];return t.forEach((function(e){var t=f(e,["mdia","hdlr"]),r=f(e,["tkhd"]);t.forEach((function(e,t){var i,o,a=h(e.subarray(8,12)),s=r[t];"vide"===a&&(o=0===(i=new DataView(s.buffer,s.byteOffset,s.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),n.push(o))}))})),n},u=function(e){var t=0===e[0]?12:20;return l(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},s=function(e){var t=f(e,["moov","trak"]),n=[];return t.forEach((function(e){var t,r,i={},o=f(e,["tkhd"])[0];o&&(r=(t=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0),i.id=0===r?t.getUint32(12):t.getUint32(20));var a=f(e,["mdia","hdlr"])[0];if(a){var s=h(a.subarray(8,12));i.type="vide"===s?"video":"soun"===s?"audio":s}var l=f(e,["mdia","minf","stbl","stsd"])[0];if(l){var d=l.subarray(8);i.codec=h(d.subarray(4,8));var p,y=f(d,[i.codec])[0];y&&(/^[a-z]vc[1-9]$/i.test(i.codec)?(p=y.subarray(78),"avcC"===h(p.subarray(4,8))&&p.length>11?(i.codec+=".",i.codec+=c(p[9]),i.codec+=c(p[10]),i.codec+=c(p[11])):i.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(i.codec)?(p=y.subarray(28),"esds"===h(p.subarray(4,8))&&p.length>20&&0!==p[19]?(i.codec+="."+c(p[19]),i.codec+="."+c(p[20]>>>2&63).replace(/^0/,"")):i.codec="mp4a.40.2"):i.codec=i.codec.toLowerCase())}var m=f(e,["mdia","mdhd"])[0];m&&(i.timescale=u(m)),n.push(i)})),n},e.exports={findBox:f,parseType:h,timescale:r,startTime:i,compositionStartTime:o,videoTrackIds:a,tracks:s,getTimescaleFromMediaHeader:u}},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,f=Math.max,h=Math.min,d=function(){return l.Date.now()};function p(e,t,n){var r,i,o,a,s,u,l=0,c=!1,p=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,l=t,a=e.apply(o,n)}function b(e){return l=e,s=setTimeout(w,t),c?v(e):a}function _(e){var n=e-u;return void 0===u||n>=t||n<0||p&&e-l>=o}function w(){var e=d();if(_(e))return T(e);s=setTimeout(w,function(e){var n=t-(e-u);return p?h(n,o-(e-l)):n}(e))}function T(e){return s=void 0,g&&r?v(e):(r=i=void 0,a)}function S(){var e=d(),n=_(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return b(u);if(p)return s=setTimeout(w,t),v(u)}return void 0===s&&(s=setTimeout(w,t)),a}return t=m(t)||0,y(n)&&(c=!!n.leading,o=(p="maxWait"in n)?f(m(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),S.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},S.flush=function(){return void 0===s?a:T(d())},S}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(y(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=y(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return y(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),p(e,t,{leading:r,maxWait:t,trailing:i})}}).call(this,n(30))},function(e,t,n){(function(t){var n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof t&&t&&t.Object===Object&&t,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,f=Math.max,h=Math.min,d=function(){return l.Date.now()};function p(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(e))return NaN;if(p(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=p(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var s=i.test(e);return s||o.test(e)?a(e.slice(2),s?2:8):r.test(e)?NaN:+e}e.exports=function(e,t,n){var r,i,o,a,s,u,l=0,c=!1,m=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var n=r,o=i;return r=i=void 0,l=t,a=e.apply(o,n)}function b(e){return l=e,s=setTimeout(w,t),c?v(e):a}function _(e){var n=e-u;return void 0===u||n>=t||n<0||m&&e-l>=o}function w(){var e=d();if(_(e))return T(e);s=setTimeout(w,function(e){var n=t-(e-u);return m?h(n,o-(e-l)):n}(e))}function T(e){return s=void 0,g&&r?v(e):(r=i=void 0,a)}function S(){var e=d(),n=_(e);if(r=arguments,i=this,u=e,n){if(void 0===s)return b(u);if(m)return s=setTimeout(w,t),v(u)}return void 0===s&&(s=setTimeout(w,t)),a}return t=y(t)||0,p(n)&&(c=!!n.leading,o=(m="maxWait"in n)?f(y(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g),S.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=i=s=void 0},S.flush=function(){return void 0===s?a:T(d())},S}}).call(this,n(30))},function(e,t,n){e.exports={image:"_1YW-E"}},function(e,t,n){"use strict";(function(e){
17
17
  /**!
18
18
  * @fileOverview Kickass library to create and place poppers near their reference elements.
@@ -38,12 +38,12 @@ for(o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(var o=48;o<58;o++)r[o-48]=
38
38
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
39
39
  * SOFTWARE.
40
40
  */
41
- var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,r=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(n&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var i=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function o(e){return e&&"[object Function]"==={}.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function u(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=a(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:u(s(e))}function l(e){return e&&e.referenceNode?e.referenceNode:e}var c=n&&!(!window.MSInputMethodContext||!document.documentMode),f=n&&/MSIE 10/.test(navigator.userAgent);function h(e){return 11===e?c:10===e?f:c||f}function d(e){if(!e)return document.documentElement;for(var t=h(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?d(n):n:e?e.ownerDocument.documentElement:document.documentElement}function p(e){return null!==e.parentNode?p(e.parentNode):e}function y(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,u=o.commonAncestorContainer;if(e!==u&&t!==u||r.contains(i))return"BODY"===(s=(a=u).nodeName)||"HTML"!==s&&d(a.firstElementChild)!==a?d(u):u;var l=p(e);return l.host?y(l.host,t):y(e,p(t).host)}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=m(t,"top"),i=m(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function v(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function b(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],h(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function _(e){var t=e.body,n=e.documentElement,r=h(10)&&getComputedStyle(n);return{height:b("Height",t,n,r),width:b("Width",t,n,r)}}var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},T=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),S=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function C(e){return E({},e,{right:e.left+e.width,bottom:e.top+e.height})}function k(e){var t={};try{if(h(10)){t=e.getBoundingClientRect();var n=m(e,"top"),r=m(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?_(e.ownerDocument):{},s=o.width||e.clientWidth||i.width,u=o.height||e.clientHeight||i.height,l=e.offsetWidth-s,c=e.offsetHeight-u;if(l||c){var f=a(e);l-=v(f,"x"),c-=v(f,"y"),i.width-=l,i.height-=c}return C(i)}function x(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=h(10),i="HTML"===t.nodeName,o=k(e),s=k(t),l=u(e),c=a(t),f=parseFloat(c.borderTopWidth),d=parseFloat(c.borderLeftWidth);n&&i&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var p=C({top:o.top-s.top-f,left:o.left-s.left-d,width:o.width,height:o.height});if(p.marginTop=0,p.marginLeft=0,!r&&i){var y=parseFloat(c.marginTop),m=parseFloat(c.marginLeft);p.top-=f-y,p.bottom-=f-y,p.left-=d-m,p.right-=d-m,p.marginTop=y,p.marginLeft=m}return(r&&!n?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(p=g(p,t)),p}function O(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=x(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:m(n),s=t?0:m(n,"left"),u={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o};return C(u)}function P(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===a(e,"position"))return!0;var n=s(e);return!!n&&P(n)}function R(e){if(!e||!e.parentElement||h())return document.documentElement;for(var t=e.parentElement;t&&"none"===a(t,"transform");)t=t.parentElement;return t||document.documentElement}function A(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?R(e):y(e,l(t));if("viewport"===r)o=O(a,i);else{var c=void 0;"scrollParent"===r?"BODY"===(c=u(s(t))).nodeName&&(c=e.ownerDocument.documentElement):c="window"===r?e.ownerDocument.documentElement:r;var f=x(c,a,i);if("HTML"!==c.nodeName||P(a))o=f;else{var h=_(e.ownerDocument),d=h.height,p=h.width;o.top+=f.top-f.marginTop,o.bottom=d+f.top,o.left+=f.left-f.marginLeft,o.right=p+f.left}}var m="number"==typeof(n=n||0);return o.left+=m?n:n.left||0,o.top+=m?n:n.top||0,o.right-=m?n:n.right||0,o.bottom-=m?n:n.bottom||0,o}function I(e){return e.width*e.height}function L(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=A(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},u=Object.keys(s).map((function(e){return E({key:e},s[e],{area:I(s[e])})})).sort((function(e,t){return t.area-e.area})),l=u.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),c=l.length>0?l[0].key:u[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function j(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?R(t):y(t,l(n));return x(n,i,r)}function D(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function N(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function M(e,t,n){n=n.split("-")[0];var r=D(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",u=o?"height":"width",l=o?"width":"height";return i[a]=t[a]+t[u]/2-r[u]/2,i[s]=n===s?t[s]-r[l]:t[N(s)],i}function U(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function B(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=U(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t.offsets.popper=C(t.offsets.popper),t.offsets.reference=C(t.offsets.reference),t=n(t,e))})),t}function F(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=j(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=L(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=M(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=B(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function V(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function H(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if(void 0!==document.body.style[o])return o}return null}function z(){return this.state.isDestroyed=!0,V(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[H("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function q(e){var t=e.ownerDocument;return t?t.defaultView:window}function W(e,t,n,r){n.updateBound=r,q(e).addEventListener("resize",n.updateBound,{passive:!0});var i=u(e);return function e(t,n,r,i){var o="BODY"===t.nodeName,a=o?t.ownerDocument.defaultView:t;a.addEventListener(n,r,{passive:!0}),o||e(u(a.parentNode),n,r,i),i.push(a)}(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function $(){this.state.eventsEnabled||(this.state=W(this.reference,this.options,this.state,this.scheduleUpdate))}function G(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,q(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function Y(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function K(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&Y(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var X=n&&/Firefox/i.test(navigator.userAgent);function Q(e,t,n){var r=U(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i){var o="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var J=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Z=J.slice(3);function ee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Z.indexOf(e),r=Z.slice(n+1).concat(Z.slice(0,n));return t?r.reverse():r}var te="flip",ne="clockwise",re="counterclockwise";function ie(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(U(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,l=-1!==s?[a.slice(0,s).concat([a[s].split(u)[0]]),[a[s].split(u)[1]].concat(a.slice(s+1))]:[a];return(l=l.map((function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return C(s)[t]/100*o}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}(e,i,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){Y(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var oe={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),u=s?"left":"top",l=s?"width":"height",c={start:S({},u,o[u]),end:S({},u,o[u]+o[l]-a[l])};e.offsets.popper=E({},a,c[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],u=void 0;return u=Y(+n)?[+n,0]:ie(n,o,a,s),"left"===s?(o.top+=u[0],o.left-=u[1]):"right"===s?(o.top+=u[0],o.left+=u[1]):"top"===s?(o.left+=u[0],o.top-=u[1]):"bottom"===s&&(o.left+=u[0],o.top+=u[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||d(e.instance.popper);e.instance.reference===n&&(n=d(n));var r=H("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var u=A(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=u;var l=t.priority,c=e.offsets.popper,f={primary:function(e){var n=c[e];return c[e]<u[e]&&!t.escapeWithReference&&(n=Math.max(c[e],u[e])),S({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=c[n];return c[e]>u[e]&&!t.escapeWithReference&&(r=Math.min(c[n],u[e]-("right"===e?c.width:c.height))),S({},n,r)}};return l.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=E({},c,f[t](e))})),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",u=a?"left":"top",l=a?"width":"height";return n[s]<o(r[u])&&(e.offsets.popper[u]=o(r[u])-n[l]),n[u]>o(r[s])&&(e.offsets.popper[u]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!Q(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,s=o.popper,u=o.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",f=l?"Top":"Left",h=f.toLowerCase(),d=l?"left":"top",p=l?"bottom":"right",y=D(r)[c];u[p]-y<s[h]&&(e.offsets.popper[h]-=s[h]-(u[p]-y)),u[h]+y>s[p]&&(e.offsets.popper[h]+=u[h]+y-s[p]),e.offsets.popper=C(e.offsets.popper);var m=u[h]+u[c]/2-y/2,g=a(e.instance.popper),v=parseFloat(g["margin"+f]),b=parseFloat(g["border"+f+"Width"]),_=m-e.offsets.popper[h]-v-b;return _=Math.max(Math.min(s[c]-y,_),0),e.arrowElement=r,e.offsets.arrow=(S(n={},h,Math.round(_)),S(n,d,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(V(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=A(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=N(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case te:a=[r,i];break;case ne:a=ee(r);break;case re:a=ee(r,!0);break;default:a=t.behavior}return a.forEach((function(s,u){if(r!==s||a.length===u+1)return e;r=e.placement.split("-")[0],i=N(r);var l=e.offsets.popper,c=e.offsets.reference,f=Math.floor,h="left"===r&&f(l.right)>f(c.left)||"right"===r&&f(l.left)<f(c.right)||"top"===r&&f(l.bottom)>f(c.top)||"bottom"===r&&f(l.top)<f(c.bottom),d=f(l.left)<f(n.left),p=f(l.right)>f(n.right),y=f(l.top)<f(n.top),m=f(l.bottom)>f(n.bottom),g="left"===r&&d||"right"===r&&p||"top"===r&&y||"bottom"===r&&m,v=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(v&&"start"===o&&d||v&&"end"===o&&p||!v&&"start"===o&&y||!v&&"end"===o&&m),_=!!t.flipVariationsByContent&&(v&&"start"===o&&p||v&&"end"===o&&d||!v&&"start"===o&&m||!v&&"end"===o&&y),w=b||_;(h||g||w)&&(e.flipped=!0,(h||g)&&(r=a[u+1]),w&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=E({},e.offsets.popper,M(e.instance.popper,e.offsets.reference,e.placement)),e=B(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=N(t),e.offsets.popper=C(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Q(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=U(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,o=U(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:t.gpuAcceleration,s=d(e.instance.popper),u=k(s),l={position:i.position},c=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(e){return e},u=o(i.width),l=o(r.width),c=-1!==["left","right"].indexOf(e.placement),f=-1!==e.placement.indexOf("-"),h=t?c||f||u%2==l%2?o:a:s,d=t?o:s;return{left:h(u%2==1&&l%2==1&&!f&&t?r.left-1:r.left),top:d(r.top),bottom:d(r.bottom),right:h(r.right)}}(e,window.devicePixelRatio<2||!X),f="bottom"===n?"top":"bottom",h="right"===r?"left":"right",p=H("transform"),y=void 0,m=void 0;if(m="bottom"===f?"HTML"===s.nodeName?-s.clientHeight+c.bottom:-u.height+c.bottom:c.top,y="right"===h?"HTML"===s.nodeName?-s.clientWidth+c.right:-u.width+c.right:c.left,a&&p)l[p]="translate3d("+y+"px, "+m+"px, 0)",l[f]=0,l[h]=0,l.willChange="transform";else{var g="bottom"===f?-1:1,v="right"===h?-1:1;l[f]=m*g,l[h]=y*v,l.willChange=f+", "+h}var b={"x-placement":e.placement};return e.attributes=E({},b,e.attributes),e.styles=E({},l,e.styles),e.arrowStyles=E({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return K(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&K(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=j(i,t,e,n.positionFixed),a=L(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),K(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},ae=function(){function e(t,n){var r=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};w(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=i(this.update.bind(this)),this.options=E({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(E({},e.Defaults.modifiers,a.modifiers)).forEach((function(t){r.options.modifiers[t]=E({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return E({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&o(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return T(e,[{key:"update",value:function(){return F.call(this)}},{key:"destroy",value:function(){return z.call(this)}},{key:"enableEventListeners",value:function(){return $.call(this)}},{key:"disableEventListeners",value:function(){return G.call(this)}}]),e}();ae.Utils=("undefined"!=typeof window?window:e).PopperUtils,ae.placements=J,ae.Defaults=oe,t.a=ae}).call(this,n(30))},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(1)),i=o(n(448));function o(e){return e&&e.__esModule?e:{default:e}}t.default=r.default.createContext||i.default,e.exports=t.default},function(e,t,n){var r=n(17),i=n(11),o=n(113);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(74);e.exports=r("native-function-to-string",Function.toString)},function(e,t,n){var r=n(14),i=n(148),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i.call(o))},function(e,t,n){var r=n(51),i=n(115),o=n(118),a=n(25);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){e.exports=n(14)},function(e,t,n){var r=n(36),i=n(32),o=n(116).indexOf,a=n(75);e.exports=function(e,t){var n,s=i(e),u=0,l=[];for(n in s)!r(a,n)&&r(s,n)&&l.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(l,n)||l.push(n));return l}},function(e,t,n){var r=n(11);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){var r=n(17),i=n(27),o=n(25),a=n(76);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;s>u;)i.f(e,n=r[u++],t[n]);return e}},function(e,t,n){var r=n(51);e.exports=r("document","documentElement")},function(e,t,n){var r=n(32),i=n(115).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t,n){t.f=n(16)},function(e,t,n){"use strict";var r=n(6),i=n(47).filter;r({target:"Array",proto:!0,forced:!n(78)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(54),i=n(15),o=n(65),a=function(e,t,n,s,u,l,c,f){for(var h,d=u,p=0,y=!!c&&o(c,f,3);p<s;){if(p in n){if(h=y?y(n[p],p,t):n[p],l>0&&r(h))d=a(e,t,h,i(h.length),d,l-1)-1;else{if(d>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[d]=h}d++}p++}return d};e.exports=a},function(e,t,n){"use strict";var r=n(6),i=n(161);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(e,t,n){"use strict";var r=n(47).forEach,i=n(48);e.exports=i("forEach")?function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}:[].forEach},function(e,t,n){var r=n(25);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(16),i=n(79),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,n){var r=n(121),i=n(79),o=n(16)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){"use strict";var r,i,o,a=n(66),s=n(33),u=n(36),l=n(16),c=n(46),f=l("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),c||u(r,f)||s(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(e,t,n){var r=n(11);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var r=n(6),i=n(168).left;r({target:"Array",proto:!0,forced:n(48)("reduce")},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(37),i=n(20),o=n(73),a=n(15),s=function(e){return function(t,n,s,u){r(n);var l=i(t),c=o(l),f=a(l.length),h=e?f-1:0,d=e?-1:1;if(s<2)for(;;){if(h in c){u=c[h],h+=d;break}if(h+=d,e?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:f>h;h+=d)h in c&&(u=n(u,c[h],h,l));return u}};e.exports={left:s(!1),right:s(!0)}},function(e,t,n){"use strict";var r=n(6),i=n(14),o=n(119),a=n(45),s=n(57),u=n(53),l=n(91),c=n(18),f=n(11),h=n(122),d=n(55),p=n(280);e.exports=function(e,t,n,y,m){var g=i[e],v=g&&g.prototype,b=g,_=y?"set":"add",w={},T=function(e){var t=v[e];a(v,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(m&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(o(e,"function"!=typeof g||!(m||v.forEach&&!f((function(){(new g).entries().next()})))))b=n.getConstructor(t,e,y,_),s.REQUIRED=!0;else if(o(e,!0)){var S=new b,E=S[_](m?{}:-0,1)!=S,C=f((function(){S.has(1)})),k=h((function(e){new g(e)})),x=!m&&f((function(){for(var e=new g,t=5;t--;)e[_](t,t);return!e.has(-0)}));k||((b=t((function(t,n){l(t,b,e);var r=p(new g,t,b);return null!=n&&u(n,r[_],r,y),r}))).prototype=v,v.constructor=b),(C||x)&&(T("delete"),T("has"),y&&T("get")),(x||E)&&T(_),m&&v.clear&&delete v.clear}return w[e]=b,r({global:!0,forced:b!=g},w),d(b,e),m||n.setStrong(b,e,y),b}},function(e,t,n){var r=n(6),i=n(283);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,n){var r=n(17),i=n(76),o=n(32),a=n(85).f,s=function(e){return function(t){for(var n,s=o(t),u=i(s),l=u.length,c=0,f=[];l>c;)n=u[c++],r&&!a.call(s,n)||f.push(e?[n,s[n]]:s[n]);return f}};e.exports={entries:s(!0),values:s(!1)}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){var r=n(45),i=n(306),o=Object.prototype;i!==o.toString&&r(o,"toString",i,{unsafe:!0})},function(e,t,n){var r=n(14);e.exports=r.Promise},function(e,t,n){var r,i,o,a=n(14),s=n(11),u=n(50),l=n(65),c=n(155),f=n(113),h=n(88),d=a.location,p=a.setImmediate,y=a.clearImmediate,m=a.process,g=a.MessageChannel,v=a.Dispatch,b=0,_={},w=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},T=function(e){return function(){w(e)}},S=function(e){w(e.data)},E=function(e){a.postMessage(e+"",d.protocol+"//"+d.host)};p&&y||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return _[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(b),b},y=function(e){delete _[e]},"process"==u(m)?r=function(e){m.nextTick(T(e))}:v&&v.now?r=function(e){v.now(T(e))}:g&&!/(iphone|ipod|ipad).*applewebkit/i.test(h)?(o=(i=new g).port2,i.port1.onmessage=S,r=l(o.postMessage,o,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||s(E)?r="onreadystatechange"in f("script")?function(e){c.appendChild(f("script")).onreadystatechange=function(){c.removeChild(this),w(e)}}:function(e){setTimeout(T(e),0)}:(r=E,a.addEventListener("message",S,!1))),e.exports={set:p,clear:y}},function(e,t,n){var r=n(25),i=n(18),o=n(80);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(6),i=n(96);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){"use strict";var r=n(81).charAt,i=n(38),o=n(124),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(98),i=n(25),o=n(15),a=n(26),s=n(99),u=n(100);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=i(e),l=String(this);if(!a.global)return u(a,l);var c=a.unicode;a.lastIndex=0;for(var f,h=[],d=0;null!==(f=u(a,l));){var p=String(f[0]);h[d]=p,""===p&&(a.lastIndex=s(l,o(a.lastIndex),c)),d++}return 0===d?null:h}]}))},function(e,t,n){var r=n(15),i=n(181),o=n(26),a=Math.ceil,s=function(e){return function(t,n,s){var u,l,c=String(o(t)),f=c.length,h=void 0===s?" ":String(s),d=r(n);return d<=f||""==h?c:(u=d-f,(l=i.call(h,a(u/h.length))).length>u&&(l=l.slice(0,u)),e?c+l:l+c)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,n){"use strict";var r=n(52),i=n(26);e.exports="".repeat||function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){var r=n(88);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},function(e,t,n){"use strict";var r=n(98),i=n(25),o=n(20),a=n(15),s=n(52),u=n(26),l=n(99),c=n(100),f=Math.max,h=Math.min,d=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,y=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n){return[function(n,r){var i=u(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,o){var u=n(t,e,this,o);if(u.done)return u.value;var d=i(e),p=String(this),y="function"==typeof o;y||(o=String(o));var m=d.global;if(m){var g=d.unicode;d.lastIndex=0}for(var v=[];;){var b=c(d,p);if(null===b)break;if(v.push(b),!m)break;""===String(b[0])&&(d.lastIndex=l(p,a(d.lastIndex),g))}for(var _,w="",T=0,S=0;S<v.length;S++){b=v[S];for(var E=String(b[0]),C=f(h(s(b.index),p.length),0),k=[],x=1;x<b.length;x++)k.push(void 0===(_=b[x])?_:String(_));var O=b.groups;if(y){var P=[E].concat(k,C,p);void 0!==O&&P.push(O);var R=String(o.apply(void 0,P))}else R=r(E,p,C,k,O,o);C>=T&&(w+=p.slice(T,C)+R,T=C+E.length)}return w+p.slice(T)}];function r(e,n,r,i,a,s){var u=r+e.length,l=i.length,c=y;return void 0!==a&&(a=o(a),c=p),t.call(s,c,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":s=a[o.slice(1,-1)];break;default:var c=+o;if(0===c)return t;if(c>l){var f=d(c/10);return 0===f?t:f<=l?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):t}s=i[c-1]}return void 0===s?"":s}))}}))},function(e,t,n){var r=n(14),i=n(185),o=n(123),a=n(33),s=n(16),u=s("iterator"),l=s("toStringTag"),c=o.values;for(var f in i){var h=r[f],d=h&&h.prototype;if(d){if(d[u]!==c)try{a(d,u,c)}catch(e){d[u]=c}if(d[l]||a(d,l,f),i[f])for(var p in o)if(d[p]!==o[p])try{a(d,p,o[p])}catch(e){d[p]=o[p]}}}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){"use strict";
41
+ var n="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,r=function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(n&&navigator.userAgent.indexOf(e[t])>=0)return 1;return 0}();var i=n&&window.Promise?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then((function(){t=!1,e()})))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout((function(){t=!1,e()}),r))}};function o(e){return e&&"[object Function]"==={}.toString.call(e)}function a(e,t){if(1!==e.nodeType)return[];var n=e.ownerDocument.defaultView.getComputedStyle(e,null);return t?n[t]:n}function s(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function u(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=a(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/(auto|scroll|overlay)/.test(n+i+r)?e:u(s(e))}function l(e){return e&&e.referenceNode?e.referenceNode:e}var c=n&&!(!window.MSInputMethodContext||!document.documentMode),f=n&&/MSIE 10/.test(navigator.userAgent);function h(e){return 11===e?c:10===e?f:c||f}function d(e){if(!e)return document.documentElement;for(var t=h(10)?document.body:null,n=e.offsetParent||null;n===t&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var r=n&&n.nodeName;return r&&"BODY"!==r&&"HTML"!==r?-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===a(n,"position")?d(n):n:e?e.ownerDocument.documentElement:document.documentElement}function p(e){return null!==e.parentNode?p(e.parentNode):e}function y(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var n=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,r=n?e:t,i=n?t:e,o=document.createRange();o.setStart(r,0),o.setEnd(i,0);var a,s,u=o.commonAncestorContainer;if(e!==u&&t!==u||r.contains(i))return"BODY"===(s=(a=u).nodeName)||"HTML"!==s&&d(a.firstElementChild)!==a?d(u):u;var l=p(e);return l.host?y(l.host,t):y(e,p(t).host)}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",n="top"===t?"scrollTop":"scrollLeft",r=e.nodeName;if("BODY"===r||"HTML"===r){var i=e.ownerDocument.documentElement,o=e.ownerDocument.scrollingElement||i;return o[n]}return e[n]}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=m(t,"top"),i=m(t,"left"),o=n?-1:1;return e.top+=r*o,e.bottom+=r*o,e.left+=i*o,e.right+=i*o,e}function v(e,t){var n="x"===t?"Left":"Top",r="Left"===n?"Right":"Bottom";return parseFloat(e["border"+n+"Width"])+parseFloat(e["border"+r+"Width"])}function b(e,t,n,r){return Math.max(t["offset"+e],t["scroll"+e],n["client"+e],n["offset"+e],n["scroll"+e],h(10)?parseInt(n["offset"+e])+parseInt(r["margin"+("Height"===e?"Top":"Left")])+parseInt(r["margin"+("Height"===e?"Bottom":"Right")]):0)}function _(e){var t=e.body,n=e.documentElement,r=h(10)&&getComputedStyle(n);return{height:b("Height",t,n,r),width:b("Width",t,n,r)}}var w=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},T=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),S=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},E=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};function C(e){return E({},e,{right:e.left+e.width,bottom:e.top+e.height})}function k(e){var t={};try{if(h(10)){t=e.getBoundingClientRect();var n=m(e,"top"),r=m(e,"left");t.top+=n,t.left+=r,t.bottom+=n,t.right+=r}else t=e.getBoundingClientRect()}catch(e){}var i={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},o="HTML"===e.nodeName?_(e.ownerDocument):{},s=o.width||e.clientWidth||i.width,u=o.height||e.clientHeight||i.height,l=e.offsetWidth-s,c=e.offsetHeight-u;if(l||c){var f=a(e);l-=v(f,"x"),c-=v(f,"y"),i.width-=l,i.height-=c}return C(i)}function x(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=h(10),i="HTML"===t.nodeName,o=k(e),s=k(t),l=u(e),c=a(t),f=parseFloat(c.borderTopWidth),d=parseFloat(c.borderLeftWidth);n&&i&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var p=C({top:o.top-s.top-f,left:o.left-s.left-d,width:o.width,height:o.height});if(p.marginTop=0,p.marginLeft=0,!r&&i){var y=parseFloat(c.marginTop),m=parseFloat(c.marginLeft);p.top-=f-y,p.bottom-=f-y,p.left-=d-m,p.right-=d-m,p.marginTop=y,p.marginLeft=m}return(r&&!n?t.contains(l):t===l&&"BODY"!==l.nodeName)&&(p=g(p,t)),p}function O(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.ownerDocument.documentElement,r=x(e,n),i=Math.max(n.clientWidth,window.innerWidth||0),o=Math.max(n.clientHeight,window.innerHeight||0),a=t?0:m(n),s=t?0:m(n,"left"),u={top:a-r.top+r.marginTop,left:s-r.left+r.marginLeft,width:i,height:o};return C(u)}function P(e){var t=e.nodeName;if("BODY"===t||"HTML"===t)return!1;if("fixed"===a(e,"position"))return!0;var n=s(e);return!!n&&P(n)}function R(e){if(!e||!e.parentElement||h())return document.documentElement;for(var t=e.parentElement;t&&"none"===a(t,"transform");)t=t.parentElement;return t||document.documentElement}function A(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o={top:0,left:0},a=i?R(e):y(e,l(t));if("viewport"===r)o=O(a,i);else{var c=void 0;"scrollParent"===r?"BODY"===(c=u(s(t))).nodeName&&(c=e.ownerDocument.documentElement):c="window"===r?e.ownerDocument.documentElement:r;var f=x(c,a,i);if("HTML"!==c.nodeName||P(a))o=f;else{var h=_(e.ownerDocument),d=h.height,p=h.width;o.top+=f.top-f.marginTop,o.bottom=d+f.top,o.left+=f.left-f.marginLeft,o.right=p+f.left}}var m="number"==typeof(n=n||0);return o.left+=m?n:n.left||0,o.top+=m?n:n.top||0,o.right-=m?n:n.right||0,o.bottom-=m?n:n.bottom||0,o}function I(e){return e.width*e.height}function L(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=A(n,r,o,i),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},u=Object.keys(s).map((function(e){return E({key:e},s[e],{area:I(s[e])})})).sort((function(e,t){return t.area-e.area})),l=u.filter((function(e){var t=e.width,r=e.height;return t>=n.clientWidth&&r>=n.clientHeight})),c=l.length>0?l[0].key:u[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function j(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=r?R(t):y(t,l(n));return x(n,i,r)}function D(e){var t=e.ownerDocument.defaultView.getComputedStyle(e),n=parseFloat(t.marginTop||0)+parseFloat(t.marginBottom||0),r=parseFloat(t.marginLeft||0)+parseFloat(t.marginRight||0);return{width:e.offsetWidth+r,height:e.offsetHeight+n}}function N(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,(function(e){return t[e]}))}function M(e,t,n){n=n.split("-")[0];var r=D(e),i={width:r.width,height:r.height},o=-1!==["right","left"].indexOf(n),a=o?"top":"left",s=o?"left":"top",u=o?"height":"width",l=o?"width":"height";return i[a]=t[a]+t[u]/2-r[u]/2,i[s]=n===s?t[s]-r[l]:t[N(s)],i}function U(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function B(e,t,n){return(void 0===n?e:e.slice(0,function(e,t,n){if(Array.prototype.findIndex)return e.findIndex((function(e){return e[t]===n}));var r=U(e,(function(e){return e[t]===n}));return e.indexOf(r)}(e,"name",n))).forEach((function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=e.function||e.fn;e.enabled&&o(n)&&(t.offsets.popper=C(t.offsets.popper),t.offsets.reference=C(t.offsets.reference),t=n(t,e))})),t}function F(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=j(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=L(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=M(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=B(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function V(e,t){return e.some((function(e){var n=e.name;return e.enabled&&n===t}))}function H(e){for(var t=[!1,"ms","Webkit","Moz","O"],n=e.charAt(0).toUpperCase()+e.slice(1),r=0;r<t.length;r++){var i=t[r],o=i?""+i+n:e;if(void 0!==document.body.style[o])return o}return null}function z(){return this.state.isDestroyed=!0,V(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[H("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function q(e){var t=e.ownerDocument;return t?t.defaultView:window}function W(e,t,n,r){n.updateBound=r,q(e).addEventListener("resize",n.updateBound,{passive:!0});var i=u(e);return function e(t,n,r,i){var o="BODY"===t.nodeName,a=o?t.ownerDocument.defaultView:t;a.addEventListener(n,r,{passive:!0}),o||e(u(a.parentNode),n,r,i),i.push(a)}(i,"scroll",n.updateBound,n.scrollParents),n.scrollElement=i,n.eventsEnabled=!0,n}function $(){this.state.eventsEnabled||(this.state=W(this.reference,this.options,this.state,this.scheduleUpdate))}function G(){var e,t;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(e=this.reference,t=this.state,q(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach((function(e){e.removeEventListener("scroll",t.updateBound)})),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t))}function Y(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function K(e,t){Object.keys(t).forEach((function(n){var r="";-1!==["width","height","top","right","bottom","left"].indexOf(n)&&Y(t[n])&&(r="px"),e.style[n]=t[n]+r}))}var X=n&&/Firefox/i.test(navigator.userAgent);function Q(e,t,n){var r=U(e,(function(e){return e.name===t})),i=!!r&&e.some((function(e){return e.name===n&&e.enabled&&e.order<r.order}));if(!i){var o="`"+t+"`",a="`"+n+"`";console.warn(a+" modifier is required by "+o+" modifier in order to work, be sure to include it before "+o+"!")}return i}var J=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Z=J.slice(3);function ee(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Z.indexOf(e),r=Z.slice(n+1).concat(Z.slice(0,n));return t?r.reverse():r}var te="flip",ne="clockwise",re="counterclockwise";function ie(e,t,n,r){var i=[0,0],o=-1!==["right","left"].indexOf(r),a=e.split(/(\+|\-)/).map((function(e){return e.trim()})),s=a.indexOf(U(a,(function(e){return-1!==e.search(/,|\s/)})));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var u=/\s*,\s*|\s+/,l=-1!==s?[a.slice(0,s).concat([a[s].split(u)[0]]),[a[s].split(u)[1]].concat(a.slice(s+1))]:[a];return(l=l.map((function(e,r){var i=(1===r?!o:o)?"height":"width",a=!1;return e.reduce((function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)}),[]).map((function(e){return function(e,t,n,r){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),o=+i[1],a=i[2];if(!o)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=n;break;case"%":case"%r":default:s=r}return C(s)[t]/100*o}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*o}return o}(e,i,t,n)}))}))).forEach((function(e,t){e.forEach((function(n,r){Y(n)&&(i[t]+=n*("-"===e[r-1]?-1:1))}))})),i}var oe={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,n=t.split("-")[0],r=t.split("-")[1];if(r){var i=e.offsets,o=i.reference,a=i.popper,s=-1!==["bottom","top"].indexOf(n),u=s?"left":"top",l=s?"width":"height",c={start:S({},u,o[u]),end:S({},u,o[u]+o[l]-a[l])};e.offsets.popper=E({},a,c[r])}return e}},offset:{order:200,enabled:!0,fn:function(e,t){var n=t.offset,r=e.placement,i=e.offsets,o=i.popper,a=i.reference,s=r.split("-")[0],u=void 0;return u=Y(+n)?[+n,0]:ie(n,o,a,s),"left"===s?(o.top+=u[0],o.left-=u[1]):"right"===s?(o.top+=u[0],o.left+=u[1]):"top"===s?(o.left+=u[0],o.top-=u[1]):"bottom"===s&&(o.left+=u[0],o.top+=u[1]),e.popper=o,e},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var n=t.boundariesElement||d(e.instance.popper);e.instance.reference===n&&(n=d(n));var r=H("transform"),i=e.instance.popper.style,o=i.top,a=i.left,s=i[r];i.top="",i.left="",i[r]="";var u=A(e.instance.popper,e.instance.reference,t.padding,n,e.positionFixed);i.top=o,i.left=a,i[r]=s,t.boundaries=u;var l=t.priority,c=e.offsets.popper,f={primary:function(e){var n=c[e];return c[e]<u[e]&&!t.escapeWithReference&&(n=Math.max(c[e],u[e])),S({},e,n)},secondary:function(e){var n="right"===e?"left":"top",r=c[n];return c[e]>u[e]&&!t.escapeWithReference&&(r=Math.min(c[n],u[e]-("right"===e?c.width:c.height))),S({},n,r)}};return l.forEach((function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";c=E({},c,f[t](e))})),e.offsets.popper=c,e},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,n=t.popper,r=t.reference,i=e.placement.split("-")[0],o=Math.floor,a=-1!==["top","bottom"].indexOf(i),s=a?"right":"bottom",u=a?"left":"top",l=a?"width":"height";return n[s]<o(r[u])&&(e.offsets.popper[u]=o(r[u])-n[l]),n[u]>o(r[s])&&(e.offsets.popper[u]=o(r[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,t){var n;if(!Q(e.instance.modifiers,"arrow","keepTogether"))return e;var r=t.element;if("string"==typeof r){if(!(r=e.instance.popper.querySelector(r)))return e}else if(!e.instance.popper.contains(r))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var i=e.placement.split("-")[0],o=e.offsets,s=o.popper,u=o.reference,l=-1!==["left","right"].indexOf(i),c=l?"height":"width",f=l?"Top":"Left",h=f.toLowerCase(),d=l?"left":"top",p=l?"bottom":"right",y=D(r)[c];u[p]-y<s[h]&&(e.offsets.popper[h]-=s[h]-(u[p]-y)),u[h]+y>s[p]&&(e.offsets.popper[h]+=u[h]+y-s[p]),e.offsets.popper=C(e.offsets.popper);var m=u[h]+u[c]/2-y/2,g=a(e.instance.popper),v=parseFloat(g["margin"+f]),b=parseFloat(g["border"+f+"Width"]),_=m-e.offsets.popper[h]-v-b;return _=Math.max(Math.min(s[c]-y,_),0),e.arrowElement=r,e.offsets.arrow=(S(n={},h,Math.round(_)),S(n,d,""),n),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(V(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var n=A(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),r=e.placement.split("-")[0],i=N(r),o=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case te:a=[r,i];break;case ne:a=ee(r);break;case re:a=ee(r,!0);break;default:a=t.behavior}return a.forEach((function(s,u){if(r!==s||a.length===u+1)return e;r=e.placement.split("-")[0],i=N(r);var l=e.offsets.popper,c=e.offsets.reference,f=Math.floor,h="left"===r&&f(l.right)>f(c.left)||"right"===r&&f(l.left)<f(c.right)||"top"===r&&f(l.bottom)>f(c.top)||"bottom"===r&&f(l.top)<f(c.bottom),d=f(l.left)<f(n.left),p=f(l.right)>f(n.right),y=f(l.top)<f(n.top),m=f(l.bottom)>f(n.bottom),g="left"===r&&d||"right"===r&&p||"top"===r&&y||"bottom"===r&&m,v=-1!==["top","bottom"].indexOf(r),b=!!t.flipVariations&&(v&&"start"===o&&d||v&&"end"===o&&p||!v&&"start"===o&&y||!v&&"end"===o&&m),_=!!t.flipVariationsByContent&&(v&&"start"===o&&p||v&&"end"===o&&d||!v&&"start"===o&&m||!v&&"end"===o&&y),w=b||_;(h||g||w)&&(e.flipped=!0,(h||g)&&(r=a[u+1]),w&&(o=function(e){return"end"===e?"start":"start"===e?"end":e}(o)),e.placement=r+(o?"-"+o:""),e.offsets.popper=E({},e.offsets.popper,M(e.instance.popper,e.offsets.reference,e.placement)),e=B(e.instance.modifiers,e,"flip"))})),e},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,n=t.split("-")[0],r=e.offsets,i=r.popper,o=r.reference,a=-1!==["left","right"].indexOf(n),s=-1===["top","left"].indexOf(n);return i[a?"left":"top"]=o[n]-(s?i[a?"width":"height"]:0),e.placement=N(t),e.offsets.popper=C(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!Q(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,n=U(e.instance.modifiers,(function(e){return"preventOverflow"===e.name})).boundaries;if(t.bottom<n.top||t.left>n.right||t.top>n.bottom||t.right<n.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var n=t.x,r=t.y,i=e.offsets.popper,o=U(e.instance.modifiers,(function(e){return"applyStyle"===e.name})).gpuAcceleration;void 0!==o&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==o?o:t.gpuAcceleration,s=d(e.instance.popper),u=k(s),l={position:i.position},c=function(e,t){var n=e.offsets,r=n.popper,i=n.reference,o=Math.round,a=Math.floor,s=function(e){return e},u=o(i.width),l=o(r.width),c=-1!==["left","right"].indexOf(e.placement),f=-1!==e.placement.indexOf("-"),h=t?c||f||u%2==l%2?o:a:s,d=t?o:s;return{left:h(u%2==1&&l%2==1&&!f&&t?r.left-1:r.left),top:d(r.top),bottom:d(r.bottom),right:h(r.right)}}(e,window.devicePixelRatio<2||!X),f="bottom"===n?"top":"bottom",h="right"===r?"left":"right",p=H("transform"),y=void 0,m=void 0;if(m="bottom"===f?"HTML"===s.nodeName?-s.clientHeight+c.bottom:-u.height+c.bottom:c.top,y="right"===h?"HTML"===s.nodeName?-s.clientWidth+c.right:-u.width+c.right:c.left,a&&p)l[p]="translate3d("+y+"px, "+m+"px, 0)",l[f]=0,l[h]=0,l.willChange="transform";else{var g="bottom"===f?-1:1,v="right"===h?-1:1;l[f]=m*g,l[h]=y*v,l.willChange=f+", "+h}var b={"x-placement":e.placement};return e.attributes=E({},b,e.attributes),e.styles=E({},l,e.styles),e.arrowStyles=E({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){var t,n;return K(e.instance.popper,e.styles),t=e.instance.popper,n=e.attributes,Object.keys(n).forEach((function(e){!1!==n[e]?t.setAttribute(e,n[e]):t.removeAttribute(e)})),e.arrowElement&&Object.keys(e.arrowStyles).length&&K(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,n,r,i){var o=j(i,t,e,n.positionFixed),a=L(n.placement,o,t,e,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding);return t.setAttribute("x-placement",a),K(t,{position:n.positionFixed?"fixed":"absolute"}),n},gpuAcceleration:void 0}}},ae=function(){function e(t,n){var r=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};w(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(r.update)},this.update=i(this.update.bind(this)),this.options=E({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(E({},e.Defaults.modifiers,a.modifiers)).forEach((function(t){r.options.modifiers[t]=E({},e.Defaults.modifiers[t]||{},a.modifiers?a.modifiers[t]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(e){return E({name:e},r.options.modifiers[e])})).sort((function(e,t){return e.order-t.order})),this.modifiers.forEach((function(e){e.enabled&&o(e.onLoad)&&e.onLoad(r.reference,r.popper,r.options,e,r.state)})),this.update();var s=this.options.eventsEnabled;s&&this.enableEventListeners(),this.state.eventsEnabled=s}return T(e,[{key:"update",value:function(){return F.call(this)}},{key:"destroy",value:function(){return z.call(this)}},{key:"enableEventListeners",value:function(){return $.call(this)}},{key:"disableEventListeners",value:function(){return G.call(this)}}]),e}();ae.Utils=("undefined"!=typeof window?window:e).PopperUtils,ae.placements=J,ae.Defaults=oe,t.a=ae}).call(this,n(30))},function(e,t,n){"use strict";t.__esModule=!0;var r=o(n(1)),i=o(n(448));function o(e){return e&&e.__esModule?e:{default:e}}t.default=r.default.createContext||i.default,e.exports=t.default},function(e,t,n){var r=n(17),i=n(11),o=n(113);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(74);e.exports=r("native-function-to-string",Function.toString)},function(e,t,n){var r=n(14),i=n(148),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i.call(o))},function(e,t,n){var r=n(51),i=n(115),o=n(118),a=n(25);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},function(e,t,n){e.exports=n(14)},function(e,t,n){var r=n(36),i=n(32),o=n(116).indexOf,a=n(75);e.exports=function(e,t){var n,s=i(e),u=0,l=[];for(n in s)!r(a,n)&&r(s,n)&&l.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(l,n)||l.push(n));return l}},function(e,t,n){var r=n(11);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(e,t,n){var r=n(17),i=n(27),o=n(25),a=n(76);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;s>u;)i.f(e,n=r[u++],t[n]);return e}},function(e,t,n){var r=n(51);e.exports=r("document","documentElement")},function(e,t,n){var r=n(32),i=n(115).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==o.call(e)?function(e){try{return i(e)}catch(e){return a.slice()}}(e):i(r(e))}},function(e,t,n){t.f=n(16)},function(e,t,n){"use strict";var r=n(6),i=n(47).filter;r({target:"Array",proto:!0,forced:!n(78)("filter")},{filter:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(54),i=n(15),o=n(65),a=function(e,t,n,s,u,l,c,f){for(var h,d=u,p=0,y=!!c&&o(c,f,3);p<s;){if(p in n){if(h=y?y(n[p],p,t):n[p],l>0&&r(h))d=a(e,t,h,i(h.length),d,l-1)-1;else{if(d>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[d]=h}d++}p++}return d};e.exports=a},function(e,t,n){"use strict";var r=n(6),i=n(161);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(e,t,n){"use strict";var r=n(47).forEach,i=n(48);e.exports=i("forEach")?function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}:[].forEach},function(e,t,n){var r=n(25);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(16),i=n(79),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},function(e,t,n){var r=n(121),i=n(79),o=n(16)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t,n){"use strict";var r,i,o,a=n(66),s=n(33),u=n(36),l=n(16),c=n(46),f=l("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),c||u(r,f)||s(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},function(e,t,n){var r=n(11);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var r=n(6),i=n(168).left;r({target:"Array",proto:!0,forced:n(48)("reduce")},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(37),i=n(20),o=n(73),a=n(15),s=function(e){return function(t,n,s,u){r(n);var l=i(t),c=o(l),f=a(l.length),h=e?f-1:0,d=e?-1:1;if(s<2)for(;;){if(h in c){u=c[h],h+=d;break}if(h+=d,e?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:f>h;h+=d)h in c&&(u=n(u,c[h],h,l));return u}};e.exports={left:s(!1),right:s(!0)}},function(e,t,n){"use strict";var r=n(6),i=n(14),o=n(119),a=n(45),s=n(57),u=n(53),l=n(91),c=n(18),f=n(11),h=n(122),d=n(55),p=n(280);e.exports=function(e,t,n,y,m){var g=i[e],v=g&&g.prototype,b=g,_=y?"set":"add",w={},T=function(e){var t=v[e];a(v,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(m&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return m&&!c(e)?void 0:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(m&&!c(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(o(e,"function"!=typeof g||!(m||v.forEach&&!f((function(){(new g).entries().next()})))))b=n.getConstructor(t,e,y,_),s.REQUIRED=!0;else if(o(e,!0)){var S=new b,E=S[_](m?{}:-0,1)!=S,C=f((function(){S.has(1)})),k=h((function(e){new g(e)})),x=!m&&f((function(){for(var e=new g,t=5;t--;)e[_](t,t);return!e.has(-0)}));k||((b=t((function(t,n){l(t,b,e);var r=p(new g,t,b);return null!=n&&u(n,r[_],r,y),r}))).prototype=v,v.constructor=b),(C||x)&&(T("delete"),T("has"),y&&T("get")),(x||E)&&T(_),m&&v.clear&&delete v.clear}return w[e]=b,r({global:!0,forced:b!=g},w),d(b,e),m||n.setStrong(b,e,y),b}},function(e,t,n){var r=n(6),i=n(283);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(e,t,n){var r=n(17),i=n(76),o=n(32),a=n(85).f,s=function(e){return function(t){for(var n,s=o(t),u=i(s),l=u.length,c=0,f=[];l>c;)n=u[c++],r&&!a.call(s,n)||f.push(e?[n,s[n]]:s[n]);return f}};e.exports={entries:s(!0),values:s(!1)}},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){var r=n(45),i=n(306),o=Object.prototype;i!==o.toString&&r(o,"toString",i,{unsafe:!0})},function(e,t,n){var r=n(14);e.exports=r.Promise},function(e,t,n){var r,i,o,a=n(14),s=n(11),u=n(50),l=n(65),c=n(155),f=n(113),h=n(88),d=a.location,p=a.setImmediate,y=a.clearImmediate,m=a.process,g=a.MessageChannel,v=a.Dispatch,b=0,_={},w=function(e){if(_.hasOwnProperty(e)){var t=_[e];delete _[e],t()}},T=function(e){return function(){w(e)}},S=function(e){w(e.data)},E=function(e){a.postMessage(e+"",d.protocol+"//"+d.host)};p&&y||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return _[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(b),b},y=function(e){delete _[e]},"process"==u(m)?r=function(e){m.nextTick(T(e))}:v&&v.now?r=function(e){v.now(T(e))}:g&&!/(iphone|ipod|ipad).*applewebkit/i.test(h)?(o=(i=new g).port2,i.port1.onmessage=S,r=l(o.postMessage,o,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||s(E)?r="onreadystatechange"in f("script")?function(e){c.appendChild(f("script")).onreadystatechange=function(){c.removeChild(this),w(e)}}:function(e){setTimeout(T(e),0)}:(r=E,a.addEventListener("message",S,!1))),e.exports={set:p,clear:y}},function(e,t,n){var r=n(25),i=n(18),o=n(80);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(6),i=n(96);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,n){"use strict";var r=n(81).charAt,i=n(39),o=n(124),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(98),i=n(25),o=n(15),a=n(26),s=n(99),u=n(100);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=i(e),l=String(this);if(!a.global)return u(a,l);var c=a.unicode;a.lastIndex=0;for(var f,h=[],d=0;null!==(f=u(a,l));){var p=String(f[0]);h[d]=p,""===p&&(a.lastIndex=s(l,o(a.lastIndex),c)),d++}return 0===d?null:h}]}))},function(e,t,n){var r=n(15),i=n(181),o=n(26),a=Math.ceil,s=function(e){return function(t,n,s){var u,l,c=String(o(t)),f=c.length,h=void 0===s?" ":String(s),d=r(n);return d<=f||""==h?c:(u=d-f,(l=i.call(h,a(u/h.length))).length>u&&(l=l.slice(0,u)),e?c+l:l+c)}};e.exports={start:s(!1),end:s(!0)}},function(e,t,n){"use strict";var r=n(52),i=n(26);e.exports="".repeat||function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},function(e,t,n){var r=n(88);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},function(e,t,n){"use strict";var r=n(98),i=n(25),o=n(20),a=n(15),s=n(52),u=n(26),l=n(99),c=n(100),f=Math.max,h=Math.min,d=Math.floor,p=/\$([$&'`]|\d\d?|<[^>]*>)/g,y=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(e,t,n){return[function(n,r){var i=u(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,i,r):t.call(String(i),n,r)},function(e,o){var u=n(t,e,this,o);if(u.done)return u.value;var d=i(e),p=String(this),y="function"==typeof o;y||(o=String(o));var m=d.global;if(m){var g=d.unicode;d.lastIndex=0}for(var v=[];;){var b=c(d,p);if(null===b)break;if(v.push(b),!m)break;""===String(b[0])&&(d.lastIndex=l(p,a(d.lastIndex),g))}for(var _,w="",T=0,S=0;S<v.length;S++){b=v[S];for(var E=String(b[0]),C=f(h(s(b.index),p.length),0),k=[],x=1;x<b.length;x++)k.push(void 0===(_=b[x])?_:String(_));var O=b.groups;if(y){var P=[E].concat(k,C,p);void 0!==O&&P.push(O);var R=String(o.apply(void 0,P))}else R=r(E,p,C,k,O,o);C>=T&&(w+=p.slice(T,C)+R,T=C+E.length)}return w+p.slice(T)}];function r(e,n,r,i,a,s){var u=r+e.length,l=i.length,c=y;return void 0!==a&&(a=o(a),c=p),t.call(s,c,(function(t,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(u);case"<":s=a[o.slice(1,-1)];break;default:var c=+o;if(0===c)return t;if(c>l){var f=d(c/10);return 0===f?t:f<=l?void 0===i[f-1]?o.charAt(1):i[f-1]+o.charAt(1):t}s=i[c-1]}return void 0===s?"":s}))}}))},function(e,t,n){var r=n(14),i=n(185),o=n(123),a=n(33),s=n(16),u=s("iterator"),l=s("toStringTag"),c=o.values;for(var f in i){var h=r[f],d=h&&h.prototype;if(d){if(d[u]!==c)try{a(d,u,c)}catch(e){d[u]=c}if(d[l]||a(d,l,f),i[f])for(var p in o)if(d[p]!==o[p])try{a(d,p,o[p])}catch(e){d[p]=o[p]}}}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){"use strict";
42
42
  /*
43
43
  object-assign
44
44
  (c) Sindre Sorhus
45
45
  @license MIT
46
- */var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){var r=e.prototype;if(Object.create){var i=Object.create(t.prototype);r.__proto__=i}if(!(r instanceof t)){function o(){}o.prototype=t.prototype,n(r,o=new o),e.prototype=r=o}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var i={},o=i.ELEMENT_NODE=1,a=i.ATTRIBUTE_NODE=2,s=i.TEXT_NODE=3,u=i.CDATA_SECTION_NODE=4,l=i.ENTITY_REFERENCE_NODE=5,c=i.ENTITY_NODE=6,f=i.PROCESSING_INSTRUCTION_NODE=7,h=i.COMMENT_NODE=8,d=i.DOCUMENT_NODE=9,p=i.DOCUMENT_TYPE_NODE=10,y=i.DOCUMENT_FRAGMENT_NODE=11,m=i.NOTATION_NODE=12,g={},v={},b=(g.INDEX_SIZE_ERR=(v[1]="Index size error",1),g.DOMSTRING_SIZE_ERR=(v[2]="DOMString size error",2),g.HIERARCHY_REQUEST_ERR=(v[3]="Hierarchy request error",3)),_=(g.WRONG_DOCUMENT_ERR=(v[4]="Wrong document",4),g.INVALID_CHARACTER_ERR=(v[5]="Invalid character",5),g.NO_DATA_ALLOWED_ERR=(v[6]="No data allowed",6),g.NO_MODIFICATION_ALLOWED_ERR=(v[7]="No modification allowed",7),g.NOT_FOUND_ERR=(v[8]="Not found",8)),w=(g.NOT_SUPPORTED_ERR=(v[9]="Not supported",9),g.INUSE_ATTRIBUTE_ERR=(v[10]="Attribute in use",10));g.INVALID_STATE_ERR=(v[11]="Invalid state",11),g.SYNTAX_ERR=(v[12]="Syntax error",12),g.INVALID_MODIFICATION_ERR=(v[13]="Invalid modification",13),g.NAMESPACE_ERR=(v[14]="Invalid namespace",14),g.INVALID_ACCESS_ERR=(v[15]="Invalid access",15);function T(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,v[e]),this.message=v[e],Error.captureStackTrace&&Error.captureStackTrace(this,T);return n.code=e,t&&(this.message=this.message+": "+t),n}function S(){}function E(e,t){this._node=e,this._refresh=t,C(this)}function C(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);te(e,"length",r.length),n(r,e),e._inc=t}}function k(){}function x(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function O(e,t,n,r){if(r?t[x(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&D(i,e,r),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function P(e,t,n){var r=x(t,n);if(!(r>=0))throw T(_,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var o=e.ownerDocument;o&&(D(o,e,n),n.ownerElement=null)}}function R(e){if(this._features={},e)for(var t in e)this._features=e[t]}function A(){}function I(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function L(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(L(e,t))return!0}while(e=e.nextSibling)}function j(){}function D(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function N(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function M(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,N(e.ownerDocument,e),t}function U(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===y){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return N(e.ownerDocument||e,e),t.nodeType==y&&(t.firstChild=t.lastChild=null),t}function B(){this._nsMap={}}function F(){}function V(){}function H(){}function z(){}function q(){}function W(){}function $(){}function G(){}function Y(){}function K(){}function X(){}function Q(){}function J(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return ee(this,n,e,t,a),n.join("")}function Z(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function ee(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case o:i||(i=[]);i.length;var c=e.attributes,m=c.length,g=e.firstChild,v=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",v);for(var b=0;b<m;b++){"xmlns"==(_=c.item(b)).prefix?i.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&i.push({prefix:"",namespace:_.value})}for(b=0;b<m;b++){var _;if(Z(_=c.item(b),0,i)){var w=_.prefix||"",T=_.namespaceURI,S=w?" xmlns:"+w:" xmlns";t.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}ee(_,t,n,r,i)}if(Z(e,0,i)){w=e.prefix||"",T=e.namespaceURI,S=w?" xmlns:"+w:" xmlns";t.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}if(g||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(v)){if(t.push(">"),n&&/^script$/i.test(v))for(;g;)g.data?t.push(g.data):ee(g,t,n,r,i),g=g.nextSibling;else for(;g;)ee(g,t,n,r,i),g=g.nextSibling;t.push("</",v,">")}else t.push("/>");return;case d:case y:for(g=e.firstChild;g;)ee(g,t,n,r,i),g=g.nextSibling;return;case a:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,I),'"');case s:return t.push(e.data.replace(/[<&]/g,I));case u:return t.push("<![CDATA[",e.data,"]]>");case h:return t.push("\x3c!--",e.data,"--\x3e");case p:var E=e.publicId,C=e.systemId;if(t.push("<!DOCTYPE ",e.name),E)t.push(' PUBLIC "',E),C&&"."!=C&&t.push('" "',C),t.push('">');else if(C&&"."!=C)t.push(' SYSTEM "',C,'">');else{var k=e.internalSubset;k&&t.push(" [",k,"]"),t.push(">")}return;case f:return t.push("<?",e.target," ",e.data,"?>");case l:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){e[t]=n}T.prototype=Error.prototype,n(g,T),S.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ee(this[r],n,e,t);return n.join("")}},E.prototype.item=function(e){return C(this),this[e]},r(E,S),k.prototype={length:0,item:S.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new T(w);var n=this.getNamedItem(e.nodeName);return O(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new T(w);return t=this.getNamedItemNS(e.namespaceURI,e.localName),O(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return P(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return P(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},R.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new j;if(r.implementation=this,r.childNodes=new S,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new W;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},A.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return U(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return M(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,r){var i=new n.constructor;for(var s in n){var u=n[s];"object"!=typeof u&&u!=i[s]&&(i[s]=u)}n.childNodes&&(i.childNodes=new S);switch(i.ownerDocument=t,i.nodeType){case o:var l=n.attributes,c=i.attributes=new k,f=l.length;c._ownerElement=i;for(var h=0;h<f;h++)i.setAttributeNode(e(t,l.item(h),!0));break;case a:r=!0}if(r)for(var d=n.firstChild;d;)i.appendChild(e(t,d,r)),d=d.nextSibling;return i}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==s&&e.nodeType==s?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(i,A),n(i,A.prototype),j.prototype={nodeName:"#document",nodeType:d,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==y){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==o&&(this.documentElement=e),U(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),M(this,e)},importNode:function(e,t){return function e(t,n,r){var i;switch(n.nodeType){case o:(i=n.cloneNode(!1)).ownerDocument=t;case y:break;case a:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=t,i.parentNode=null,r)for(var s=n.firstChild;s;)i.appendChild(e(t,s,r)),s=s.nextSibling;return i}(this,e,t)},getElementById:function(e){var t=null;return L(this.documentElement,(function(n){if(n.nodeType==o&&n.getAttribute("id")==e)return t=n,!0})),t},createElement:function(e){var t=new B;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new S,(t.attributes=new k)._ownerElement=t,t},createDocumentFragment:function(){var e=new K;return e.ownerDocument=this,e.childNodes=new S,e},createTextNode:function(e){var t=new H;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new z;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new q;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new X;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new F;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Y;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new B,r=t.split(":"),i=n.attributes=new k;return n.childNodes=new S,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new F,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(j,A),B.prototype={nodeType:o,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===y?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);r=e.lastChild}return r=e.lastChild,t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,N(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new E(this,(function(t){var n=[];return L(t,(function(r){r===t||r.nodeType!=o||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new E(this,(function(n){var r=[];return L(n,(function(i){i===n||i.nodeType!==o||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},j.prototype.getElementsByTagName=B.prototype.getElementsByTagName,j.prototype.getElementsByTagNameNS=B.prototype.getElementsByTagNameNS,r(B,A),F.prototype.nodeType=a,r(F,A),V.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(v[b])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(V,A),H.prototype={nodeName:"#text",nodeType:s,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(H,V),z.prototype={nodeName:"#comment",nodeType:h},r(z,V),q.prototype={nodeName:"#cdata-section",nodeType:u},r(q,V),W.prototype.nodeType=p,r(W,A),$.prototype.nodeType=m,r($,A),G.prototype.nodeType=c,r(G,A),Y.prototype.nodeType=l,r(Y,A),K.prototype.nodeName="#document-fragment",K.prototype.nodeType=y,r(K,A),X.prototype.nodeType=f,r(X,A),Q.prototype.serializeToString=function(e,t,n){return J.call(e,t,n)},A.prototype.toString=J;try{if(Object.defineProperty){Object.defineProperty(E.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(A.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case o:case y:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case o:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),te=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DOMImplementation=R,t.XMLSerializer=Q},function(e,t,n){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(e,t){e.exports=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])}},function(e,t,n){"use strict";var r,i,o,a,s,u,l,c,f,h,d,p,y,m,g,v,b,_,w,T,S,E;n.d(t,"i",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"j",(function(){return a})),n.d(t,"g",(function(){return d})),n.d(t,"e",(function(){return g})),n.d(t,"b",(function(){return w})),n.d(t,"d",(function(){return T})),n.d(t,"h",(function(){return S})),n.d(t,"c",(function(){return E})),function(e){e.Stream="cv_product_stream",e.StreamRaw="cv_product_stream_raw",e.WebPlayerStream="cv_product_webplayer_stream",e.StreamProgress="cv_product_stream_progress",e.Login="cv_product_login",e.LoginSsoRedirect="cv_product_login_sso_redirect",e.LoginFailed="cv_product_login_failed",e.Search="cv_product_search",e.InstantSearch="cv_product_search",e.SearchEmptyResult="cv_product_search_empty_result",e.Filter="cv_product_search_filter",e.SearchLanding="cv_product_search_landing",e.Share="cv_product_share",e.WorkspaceAdd="cv_product_tv_add",e.Rename="cv_product_rename",e.Move="cv_product_move",e.Sort="cv_product_sort",e.Create="cv_product_create",e.Delete="cv_product_delete",e.Associate="cv_product_associate",e.Dissociate="cv_product_dissociate",e.Edit="cv_product_edit",e.Approve="cv_product_approve",e.Reject="cv_product_reject",e.Disable="cv_product_disable",e.Upload="cv_product_upload",e.Download="cv_product_download",e.Navigate="cv_product_navigate",e.Click="cv_product_click",e.Suggest="cv_product_suggest",e.EditAssoc="cv_product_edit_assoc",e.Play="cv_product_play",e.Favourite="cv_product_favourite",e.Follow="cv_product_follow",e.Prefer="cv_product_prefer",e.Print="cv_product_print",e.Copy="cv_product_copy",e.Activate="cv_product_activate",e.VerifyEmail="cv_product_verify_email",e.ChangePassword="cv_product_change_password",e.Export="cv_product_export",e.SetAccess="cv_product_set_access",e.AddToLocalCache="cv_product_add_to_lc",e.ResolveWarning="cv_product_resolve_warning",e.DismissWarning="cv_product_dismiss_warning"}(r||(r={})),function(e){e.Folder="folder",e.Video="video",e.Rating="rating",e.Series="series",e.Library="library",e.Resource="resource",e.Tag="tag",e.Subtitle="subtitle",e.Chapter="chapter",e.Restriction="restriction",e.Interactive="interactive",e.PDF="pdf",e.CustomerSetting="customer_setting",e.UserSetting="user_setting",e.StaffRequest="staff_request",e.Logo="logo",e.Pagination="pagination",e.Thumbnail="thumbnail",e.Banner="banner",e.Link="link",e.Playlist="playlist",e.Playlists="playlists",e.Person="person",e.Company="company",e.Classroom="classroom",e.ClassroomGroup="classroom_group",e.Classification="classification",e.ShareLink="share_link",e.Upload="upload",e.SearchResults="search_results",e.Audience="audience",e.User="user",e.Clip="clip",e.UserChannel="user_channel",e.Widget="widget",e.Url="url",e.SocialShare="social_share"}(i||(i={})),function(e){e.TopNav="top_nav",e.LeftNav="left_nav",e.Popup="popup",e.Banner="banner",e.VideoList="video_list",e.VideoListItem="video_list_item",e.VideoListHeader="video_header",e.VideoThumbnail="video_thumbnail",e.ExpandableVideoThumbnail="expandable_video_thumbnail",e.VideoItemPreview="video_item_preview",e.VideoDetails="video_details",e.VideoDetailsHeader="video_details_header",e.EditVideoDetails="edit_video_details",e.EditVideoChapters="edit_video_chapters",e.EditVideoResources="edit_video_resources",e.VideoUpload="video_upload",e.VideoRequest="video_request",e.Pagination="pagination",e.LibraryHeader="library_header",e.LibraryTiles="library_tiles",e.StaffRequestDetails="staff_request_details",e.SubFolderList="sub_folder_list",e.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",e.AwaitingReviewVideoItem="awaiting_review_video_item",e.PastReleasesHeader="past_releases_header",e.MigrationWarnings="migration_warnings",e.PlaylistListHeader="playlist_list_header",e.PlaylistListItem="playlist_list_item",e.SeriesListItem="series_list_item",e.SearchBar="search_bar",e.InstantSearch="instant_search",e.SearchFilters="search_filters",e.FeaturedSeriesSearchResult="featured_series_search_result",e.StaffManager="staff_manager",e.StaffManagerListItem="staff_manager_list_item",e.StudentManager="student_manager",e.StudentManagerListItem="student_manager_list_item",e.ClassroomsList="classrooms_list",e.ClassroomsListItem="classrooms_list_item",e.ClassroomOverview="classroom_overview",e.ClassroomOverviewStudentListItem="classroom_overview_student_list_item",e.ManageClassroomStudents="manage_classroom_students",e.ManageClassroomStudentListItem="manage_classroom_student_list_item",e.ManageClassroomGroups="manage_classroom_groups",e.ManageClassroomGroupListItem="manage_classroom_group_list_item",e.PreviewInteractive="preview_interactive",e.PreviewInteractiveQuestions="preview_interactive_questions",e.EditInteractive="edit_interactive",e.PlaySharedInteractive="play_shared_interactive",e.InteractiveListItem="interactive_list_item",e.DeleteInteractive="delete_interactive",e.PlayPage="play_page",e.Player="player",e.FloatingPlayer="floating_player",e.InteractivePlayer="interactive_player",e.EmbeddedPlayer="embedded_player",e.CreateClipPlayer="create_clip_player",e.PlaySharedClip="play_shared_clip",e.ClipListItem="clip_list_item",e.ContentUpdatesClassificationBanner="content_updates_classification_banner",e.PreferencesSettings="preferences_settings",e.MyUploads="my_uploads",e.SlidingList="sliding_list",e.HeroBannerItem="hero_banner_item",e.SlidingListItem="sliding_list_item",e.ClassificationListItem="classification_list_item",e.ClassificationComingSoon="classification_coming_soon",e.ClassificationHero="classification_hero",e.Dashboard="dashboard",e.ProductBanner="product_banner",e.Settings="settings"}(o||(o={})),function(e){e.Start="start",e.Complete="complete",e.Save="save",e.Discard="discard"}(a||(a={})),function(e){e.PageLoad="page_load"}(s||(s={})),function(e){e.Single="single",e.Bulk="bulk",e.All="all"}(u||(u={})),function(e){e.ProductionYear="production_year",e.Alphabetical="alphabetical"}(l||(l={})),function(e){e.Content="content",e.Quality="quality",e.Duration="duration",e.Reset="reset"}(c||(c={})),function(e){e.Submit="submit",e.ShowAll="show_all",e.Recent="recent",e.SearchIcon="search_icon"}(f||(f={})),function(e){e.Start="start",e.Finish="finish",e.Terminate="terminate",e.Play="play",e.Pause="pause",e.Playback="playback",e.NextChapter="next_chapter",e.PreviousChapter="previous_chapter",e.FullScreenEnter="full_screen_enter",e.FullScreenExit="full_screen_exit"}(h||(h={})),function(e){e.Embedded="embedded"}(d||(d={})),function(e){e.TogglePreview="toggle_preview",e.NavigateHome="navigate_home",e.OpenInStaffView="open_in_staff_view",e.Title="title",e.ToggleHideValidListings="toggle_hide_valid_listings",e.LaunchImmersiveReader="launch_immersive_reader",e.CopyEmbedHtml="copy_embed_html",e.Close="close",e.Open="open",e.Button="button",e.Link="link",e.Tile="tile",e.Thumbnail="thumbnail",e.Cover="cover",e.TallPoster="tall_poster",e.Slide="slide",e.ExternalLink="external_link",e.ViewStudentWorkspace="view_student_workspace"}(p||(p={})),function(e){e.FeatureUserChannelVideo="feature_user_channel_video",e.RemoveFromUserChannelPlaylist="remove_from_user_channel_playlist",e.ShareClip="share_clip",e.ViewOriginalVideo="view_original_video",e.ShareInteractive="share_interactive",e.DeleteInteractiveVideo="delete_interactive_video",e.CopyInteractiveVideo="copy_interactive_video",e.EditInteractiveVideo="edit_interactive_video",e.PrintAsWorksheet="print_as_worksheet",e.PreviewInteractiveVideo="preview_interactive_video",e.ViewResults="view_results",e.MoveToAnotherFolder="move_to_another_folder",e.CreateInteractiveVideo="create_interactive_video",e.ShareVideo="share_video",e.EditVideo="edit_video",e.DownloadVideo="download_video",e.AddToExchange="add_to_exchange",e.AddToUserChannel="add_to_user_channel",e.CreateClip="create_clip",e.FlagVideo="flag_video",e.AddToLibrary="add_to_library",e.AddToWorkspace="add_to_workspace",e.AddToPlaylist="add_to_playlist",e.RemoveFromPlaylist="remove_from_playlist",e.AddCurriculumLink="add_curriculum_link",e.ViewCurriculumLinks="view_curriculum_links",e.OpenInCurator="open_in_curator",e.ManageVideoAccess="manage_video_access",e.Approve="approve",e.AddToLocalCache="add_to_local_cache",e.OpenInLibraryEditor="open_in_library_editor",e.PlayClip="play_clip",e.EditClip="edit_clip",e.DeleteClip="delete_clip",e.EditVideoDetails="edit_video_details",e.DeleteVideo="delete_video"}(y||(y={})),function(e){e.LibraryReview="library_review"}(m||(m={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(g||(g={})),function(e){e.Edit="edit"}(v||(v={})),function(e){e.Image="image",e.User="user",e.Playlist="playlist",e.Link="link",e.Avatar="avatar"}(b||(b={})),function(e){e.On="on",e.Off="off"}(_||(_={})),function(e){e.EntityRemoved="cv_entity_removed",e.ValueUpdated="cv_value_updated"}(w||(w={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(T||(T={})),function(e){e.Video="videos",e.Folder="categories",e.Series="series",e.Tags="tags",e.Subjects="subjects"}(S||(S={})),function(e){e[e.V1=1]="V1",e[e.V2=2]="V2"}(E||(E={}))},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.r(t);var r=n(23);n.d(t,"AppLinkHelper",(function(){return r.a})),n.d(t,"AppLinkUtility",(function(){return r.b}));var i=n(205);n.d(t,"Application",(function(){return i.a}));var o=n(206);n.d(t,"AppRouter",(function(){return o.a}));var a=n(207);n.d(t,"Behavior",(function(){return a.a}));var s=n(105);n.d(t,"Collection",(function(){return s.a}));var u=n(133);n.d(t,"CollectionView",(function(){return u.a})),n.d(t,"ComponentCollection",(function(){return u.a}));var l=n(8);n.d(t,"Error",(function(){return l.a})),n.d(t,"ErrorHelper",(function(){return l.c})),n.d(t,"SilentError",(function(){return l.d}));var c=n(208);n.d(t,"LayoutView",(function(){return c.a}));var f=n(209);n.d(t,"NestedModel",(function(){return f.a}));var h=n(210);n.d(t,"Service",(function(){return h.a}));var d=n(69);n.d(t,"Model",(function(){return d.a}));var p=n(83);n.d(t,"View",(function(){return p.b})),n.d(t,"Component",(function(){return p.a}));var y=n(13);n.d(t,"EventNames",(function(){return y.a}));var m=n(211);n.d(t,"LayoutService",(function(){return m.a}));var g=n(104);n.d(t,"Middleware",(function(){return g.a}));var v=n(39);n.d(t,"LocationUtils",(function(){return v.a}));var b=n(212);n.d(t,"Shell",(function(){return b.a}));var _=n(213);for(var w in _)["AppLinkHelper","AppLinkUtility","Application","AppRouter","Behavior","Collection","CollectionView","ComponentCollection","Error","ErrorHelper","SilentError","LayoutView","NestedModel","Service","Model","View","Component","EventNames","LayoutService","Middleware","LocationUtils","Shell","default"].indexOf(w)<0&&function(e){n.d(t,e,(function(){return _[e]}))}(w)},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(4),i=n(10),o=n(29),a=n(13),s=n(22),u=n(8);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(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.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(f,e);var t,n,o,l=y(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(t=l.call(this,e)).mergeOptions(e,[].concat(c(t.defaultProps),c(t.props||[]))),r.result(g(t),"name")||u.c.throw(new u.b("BaseApplication must define a name")),r.result(g(t),"channelName")||u.c.throw(new u.b("BaseApplication must define a channelName")),t.listenTo(t.getGlobalRadioChannel("popup"),a.a.SHOW_POPUP,t.onShowPopup),t.listenTo(t.getGlobalRadioChannel("alert"),"show:alert",t.onShowAlert),t}return t=f,(n=[{key:"defaultProps",get:function(){return["shell","layoutService"]}},{key:"getGlobalRadioChannel",value:function(e){var t=this.shell.getGlobalRadioChannels()[e.toUpperCase()];return t||u.c.throw(new u.b("Global channel ".concat(t," does not exist"))),i.Radio.channel(t)}},{key:"onLoadLayout",value:function(){if(this.layoutOptions&&this.layoutOptions.name){var e=r.extend({},this.layoutOptions.options||{},{store:this.shell.store});this.layout=this.layoutService.getLayout(r.extend(this.layoutOptions,{options:e})),this.layout||u.c.throw(new u.b("Layout: ".concat(this.layoutOptions.name," does not exist or was not registered"))),this.shell.showView(this.layout),this.triggerMethod("layout:loaded")}}},{key:"onShowPopup",value:function(e){this.layout.getRegion("popup")||u.c.throw(new u.b("Your application layout must define a popup region")),this.layout.showChildView("popup",e)}},{key:"onShowAlert",value:function(e){var t=e.ctor,n=e.collection,r=this.layout.getRegion("alert");r?r.hasView()||this.layout.showChildView("alert",new t({collection:n})):u.c.throw(new u.b("Your application layout must define an alert region"))}},{key:"setDefaultQueryParams",value:function(e){this.defaultQueryParams&&(e=r.extend(this.defaultQueryParams,e)),this.defaultQueryParams=e}},{key:"getAndClearDefaultQueryParams",value:function(){var e=this.defaultQueryParams;return delete this.defaultQueryParams,e||{}}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],d(v(f.prototype),"listenTo",this))}}])&&h(t.prototype,n),o&&h(t,o),f}(o.Application)},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(4),i=n(10),o=n(29),a=n(23),s=n(22),u=n(104),l=n(13),c=n(8),f=n(39),h=n(12);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(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.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t,n){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=w(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var i=w(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=/([A-Z])/g,S=/(^|:)(\w)/gi,E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(y,e);var t,n,o,d=b(y);function y(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),(t=d.call(this,e)).bindDisposal(),t.processInternalRoutes(),t.processExternalRoutes(),t.processAppLinks(),t}return t=y,(n=[{key:"bindDisposal",value:function(){var e=this;this.listenTo(h.a.SHELL,l.a.ROUTE,(function(t){t.application!==e.channelName&&e.destroyApp()}))}},{key:"addRouteLookup",value:function(e,t){var n=this;this.options.shell.addRouteLookup("".concat(this.channelName,":").concat(e),(function(r,i){return a.a.buildRoute(t,{application:n.channelName,action:e,args:r,params:i})}))}},{key:"processInternalRoutes",value:function(){var e=this;r.each(r.keys(this.appRoutes),(function(t){var n=e.appRoutes[t],i=e.toEventName(n);e.addRouteLookup(i,t),e.listenTo(e.channelName,i,(function(n,i){i&&i.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),e.executeRoute(n,{isAppRoute:!0},(function(){var o=r.extend({},e.controller.getAndClearDefaultQueryParams(),n.params);n.params=o,f.a.UpdateUrl(t,n,i)}))}))}))}},{key:"processExternalRoutes",value:function(){var e=this;this.externalRoutes&&r.each(r.keys(this.externalRoutes),(function(t){var n=e.externalRoutes[t],r=e.toEventName(n);e.addRouteLookup(r,t),e.listenTo(e.channelName,r,(function(e,t){t&&t.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),f.a.PageLoad(a.a.getHref(e))}))}))}},{key:"processAppLinks",value:function(){var e=this;this.appLinks&&r.each(this.appLinks,(function(t){var n=e.toEventName(t);e.listenTo(e.channelName,n,(function(t,n){n&&n.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),e.executeRoute(t,{isAppRoute:!1})}))}))}},{key:"executeRoute",value:function(e,t,n){var o=this;this.validateAppLink(e);var s=this.toMethodName(e.action);a.b.routingStarted();var f=i.Radio.channel(h.a.SHELL);if(this.options.shell.isNavLocked())return f.trigger(l.a.NAV_IS_LOCKED,e),void a.b.routingEnded();var d=new u.a;r.each(this.filters,(function(e){return d.use(e)})),d.go({appLink:e,shell:this.options.shell},(function(){f.trigger(l.a.ROUTE,e,t),o.createApp();var i=o.controller;if(r.isFunction(i[s])||(a.b.routingEnded(),c.c.throw(new c.b("".concat(s," does not exist on the ").concat(r.result(i,"name"),".")))),!1===i.triggerMethod("before:action"))return i.triggerMethod("action:cancelled"),void a.b.routingEnded();i.triggerMethod("load:layout"),i[s].apply(i,[].concat(p(e.args||[]),[e.params||{}])),r.isFunction(n)&&n(),a.b.routingEnded()}))}},{key:"createApp",value:function(){this.controller||(this.controller=new this.options.appConstructor(this.options.appOptions),this.controller.start())}},{key:"destroyApp",value:function(){this.controller&&(this.controller.destroy(),delete this.controller)}},{key:"_addAppRoute",value:function(e,t,n){var i=this;this.route(t,n,(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var a={application:i.channelName,action:i.toEventName(n),args:t.slice(0,t.length-1),params:f.a.DeserializeQueryParams(t[t.length-1])};i.executeRoute(a,{isAppRoute:!0},(function(){f.a.UpdateQuery(r.extend(i.controller.getAndClearDefaultQueryParams(),a.params))}))}))}},{key:"toEventName",value:function(e){return e.replace(T,":$1").toLowerCase()}},{key:"toMethodName",value:function(e){var t=e.replace(S,(function(e,t,n){return n.toUpperCase()}));return t[0].toLowerCase()+t.slice(1,t.length)}},{key:"validateAppLink",value:function(e){e.application&&e.action||(a.b.routingEnded(),c.c.throw(new c.b("Invalid AppLink")))}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],g(w(y.prototype),"listenTo",this))}}])&&m(t.prototype,n),o&&m(t,o),y}(o.AppRouter)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(29),i=n(22);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,r,o=c(f);function f(){return a(this,f),o.apply(this,arguments)}return t=f,(n=[{key:"listenTo",value:function(){return i.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],u(h(f.prototype),"listenTo",this))}}])&&s(t.prototype,n),r&&s(t,r),f}(r.Behavior)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(83),i=n(41),o=n(8);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,r,a=l(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,r=[{key:"getCacheKey",value:function(e){o.c.throw(new i.a("Must define getCacheKey for ".concat(this.name,".")))}}],(n=[{key:"unmountRegion",value:function(e){this.trigger("unmount:".concat(e))}}])&&s(t.prototype,n),r&&s(t,r),c}(r.b)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(4),i=n(69),o=n(105);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(y,e);var t,n,h,p=f(y);function y(){return s(this,y),p.apply(this,arguments)}return t=y,(n=[{key:"set",value:function(e,t,n){var i,o;if(null===e)return this;for(i in"object"===a(e)?(o=e,n=t):(o={})[e]=t,n||(n={}),o)r.has(this.associations,i)&&(o[i]=this.setAssociation(i,o[i],n));return l(d(y.prototype),"set",this).call(this,o,n)}},{key:"get",value:function(e){var t=e.indexOf(".");if(-1===t)return l(d(y.prototype),"get",this).call(this,e);var n=e.substr(0,t),i=this.attributes[n];if(!i||!r.isFunction(i.get))return l(d(y.prototype),"get",this).call(this,e);var o=e.substr(t+1);return i.get(o)}},{key:"setAssociation",value:function(e,t,n){var a=this.associations[e],s=this.attributes[e];if(!r.isFunction(a))return t;if(n.unset)return s&&delete s.parent,delete this[e],s;if(s)return s instanceof i.a&&s.set(t,n),s instanceof o.a&&s.set(t,n),n.silent||this.trigger("change:".concat(e),this,t,n),s;var u=t instanceof i.a?t:new a(t,{parse:!0});return u.parent=this,this[e]=u,u}},{key:"toJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=l(d(y.prototype),"toJSON",this).apply(this,t);return r.each(this.associations,(function(e,t){r.has(i,t)&&r.isFunction(i[t].toJSON)?i[t]=i[t].toJSON():i[t]=(new e).toJSON()})),i}},{key:"toFlatJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.omit(l(d(y.prototype),"toJSON",this).apply(this,t),r.keys(this.associations))}}])&&u(t.prototype,n),h&&u(t,h),y}(i.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(29),i=n(22),o=n(8);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,r,a=c(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(t=a.call(this,e)).name||o.c.throw(new o.b("Your service must be named.")),t}return t=f,(n=[{key:"listenTo",value:function(){return i.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],u(h(f.prototype),"listenTo",this))}}])&&s(t.prototype,n),r&&s(t,r),f}(r.Object)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(4),i=n(29),o=n(22),a=n(8);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,i,s=f(h);function h(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(t=s.call(this,e)).layouts={},t.requiredRegions=e.requiredRegions,t}return t=h,(n=[{key:"clearLayout",value:function(){this.currentLayout&&(this.currentLayout.destroy(),delete this.currentLayout,delete this.currentLayoutCacheKey)}},{key:"registerLayout",value:function(e,t){return this.checkRequiredRegions(t),this.layouts[e]=t,this}},{key:"getLayout",value:function(e){var t=e.name,n=e.options,r=void 0===n?{}:n;this.layouts[t]||a.c.throw(new a.b("".concat(t," was not registered as a template.")));var i=this.layouts[t].getCacheKey(r);return this.currentLayoutCacheKey===i&&this.currentLayout?(this.currentLayout.triggerMethod("layout:requested",r),this.currentLayout):(this.clearLayout(),this.currentLayoutCacheKey=i,this.currentLayout=new this.layouts[t](r),this.listenToOnce(this.currentLayout,"destroy",this.clearLayout),this.currentLayout)}},{key:"checkRequiredRegions",value:function(e){r.each(this.requiredRegions,(function(t){r.has(r.result(e.prototype,"regions"),t)||a.c.throw(new a.b("Layout: ".concat(e.prototype.name," must define an ").concat(t," region.")))}))}},{key:"listenTo",value:function(){return o.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],l(d(h.prototype),"listenTo",this))}}])&&u(t.prototype,n),i&&u(t,i),h}(i.Object)},function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r=n(4),i=n(10),o=n(29),a=n(23),s=n(22),u=n(12),l=n(8),c=n(13),f=n(39);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t,n){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t,n){return t&&b(e.prototype,t),n&&b(e,n),e}var w=function(){function e(t,n){v(this,e),this.application=t,this.options=n||{}}return _(e,[{key:"Application",get:function(){return this.application}},{key:"Options",get:function(){return this.options}}]),e}(),T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(n,e);var t=y(n);function n(){return v(this,n),t.apply(this,arguments)}return _(n,[{key:"initialize",value:function(e){this.mergeOptions(e,["layoutService"]),this.applications=[],this.routeLookup={},this.shellState={navLock:!1,activeRoute:!1,currentAppLink:null},this.errorHandlers=[]}},{key:"bindListeners",value:function(){this.bindRouteLookup(),this.bindNavLockListeners(),this.bindAppLinkListeners(),this.bindErrorHandlers(),this.bindErrorListener()}},{key:"bindNavLockListeners",value:function(){var e=this;this.listenTo(u.a.SHELL,c.a.LOCK_NAV,(function(){return e.shellState.navLock=!0})),this.listenTo(u.a.SHELL,c.a.UNLOCK_NAV,(function(){return e.shellState.navLock=!1}))}},{key:"bindAppLinkListeners",value:function(){var e=this;this.listenTo(u.a.SHELL,c.a.ROUTING_START,(function(){return e.shellState.activeRoute=!0})),this.listenTo(u.a.SHELL,c.a.ROUTING_END,(function(){return e.shellState.activeRoute=!1})),this.listenTo(u.a.SHELL,c.a.ROUTE,(function(t){return e.shellState.currentAppLink=t}));var t=i.Radio.channel(u.a.SHELL);t.reply(c.a.HAS_ACTIVE_ROUTE,r.bind(this.hasActiveRoute,this)),t.reply(c.a.CURRENT_ROUTE,(function(){return e.shellState.currentAppLink}))}},{key:"bindErrorHandlers",value:function(){window.addEventListener("error",(function(){a.b.routingEnded()}))}},{key:"bindErrorListener",value:function(){var e=i.Radio.channel(u.a.SHELL);this.listenTo(e,c.a.ERROR,this.handleError)}},{key:"bindRouteLookup",value:function(){var e=this;i.Radio.channel(u.a.SHELL).reply(c.a.ROUTE_LOOKUP,(function(t,n,r){return!!e.routeLookup[t]&&e.routeLookup[t](n,r)}),this)}},{key:"addRouteLookup",value:function(e,t){this.routeLookup[e]=t}},{key:"registerApplication",value:function(e,t){return this.applications.push(new w(e,t)),this}},{key:"getGlobalRadioChannels",value:function(){return u.a}},{key:"isNavLocked",value:function(){return this.shellState.navLock}},{key:"start",value:function(e){var t=this;e||(e={}),this.runInitializationSteps(this,(function(){t.runStartUpSteps(t,e,(function(){d(g(n.prototype),"start",t).call(t,e)}))}))}},{key:"hasActiveRoute",value:function(){return this.shellState.activeRoute}},{key:"onStart",value:function(){var e=this;r.each(this.applications,(function(t){var n={appConstructor:t.Application,shell:e,appOptions:Object.assign({region:"",shell:e,layoutService:e.layoutService},t.Options)};new t.Application.router(n)})),this.bindListeners(),f.a.StartHistory()}},{key:"addInitializationStep",value:function(e){var t;return this.runInitializationSteps=(t=this.runInitializationSteps,function(n,r){return t(n,(function(){return e(n,r)}))}),this}},{key:"runInitializationSteps",value:function(e,t){t(e)}},{key:"addStartUpStep",value:function(e){var t;return this.runStartUpSteps=(t=this.runStartUpSteps,function(n,r,i){return t(n,r,(function(){return e(n,r,i)}))}),this}},{key:"runStartUpSteps",value:function(e,t,n){n(e,t)}},{key:"registerLayout",value:function(e,t){return this.layoutService.registerLayout(e,t),this}},{key:"registerErrorHandler",value:function(e,t){return e||l.c.throw(new l.b("An error must have a name in order to register a handler for it.")),r.any(this.errorHandlers,(function(t){return t.errorType===e}))&&l.c.throw(new l.b("An error handler for ".concat(e.prototype.name," has already been defined."))),this.errorHandlers.push({errorType:e,handler:t}),this}},{key:"handleError",value:function(e){var t=r.find(this.errorHandlers,(function(t){return e instanceof t.errorType}));t&&t.handler&&t.handler(e)}},{key:"registerStore",value:function(e){this.store=e}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],d(g(n.prototype),"listenTo",this))}}]),n}(o.Application)},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t,n,r,i,o,a){var s=i||"<<anonymous>>",u=a||r;if(null==n[r])return t?new Error("Required "+o+" `"+u+"` was not specified in `"+s+"`."):null;for(var l=arguments.length,c=Array(l>6?l-6:0),f=6;f<l;f++)c[f-6]=arguments[f];return e.apply(void 0,[n,r,s,o,u].concat(c))}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(68)),i=c(n(134)),o=c(n(67)),a=c(n(216)),s=c(n(1)),u=c(n(28)),l=c(n(431));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var h={container:r.default.oneOfType([i.default,r.default.func]),onContainerResolved:r.default.func},d=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];if(t=e.call.apply(e,[this].concat(r))||this,!o.default)return f(t);var a=t.props.container;return"function"==typeof a&&(a=a()),a&&!u.default.findDOMNode(a)?f(t):(t.setContainer(a),t)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(e){e.container!==this.props.container&&this.setContainer(e.container)},i.componentDidMount=function(){this._container?this.props.onContainerResolved&&this.props.onContainerResolved():(this.setContainer(this.props.container),this.forceUpdate(this.props.onContainerResolved))},i.componentWillUnmount=function(){this._container=null},i.setContainer=function(e){this._container=(0,l.default)(e,(0,a.default)().body)},i.render=function(){return this._container?this.props.children(this._container):null},r}(s.default.Component);d.propTypes=h;var p=d;t.default=p,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return e&&e.ownerDocument||document},e.exports=t.default},function(e,t,n){"use strict";var r=Array.prototype.slice,i=n(218),o=Object.keys,a=o?function(e){return o(e)}:n(437),s=Object.keys;a.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return i(e)?s(r.call(e)):s(e)}):Object.keys=a;return Object.keys||a},e.exports=a},function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";var r=n(220),i=n(136),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i(n):n}},function(e,t,n){"use strict";var r=SyntaxError,i=Function,o=TypeError,a=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(e){s=null}var u=function(){throw new o},l=s?function(){try{return u}catch(e){try{return s(arguments,"callee").get}catch(e){return u}}}():u,c=n(221)(),f=Object.getPrototypeOf||function(e){return e.__proto__},h={},d="undefined"==typeof Uint8Array?void 0:f(Uint8Array),p={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":c?f([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c?f(f([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c?f((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c?f((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c?f(""[Symbol.iterator]()):void 0,"%Symbol%":c?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":l,"%TypedArray%":d,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},m=n(135),g=n(441),v=m.call(Function.call,Array.prototype.concat),b=m.call(Function.apply,Array.prototype.splice),_=m.call(Function.call,String.prototype.replace),w=m.call(Function.call,String.prototype.slice),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,E=function(e){var t=w(e,0,1),n=w(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return _(e,T,(function(e,t,n,r){i[i.length]=n?_(r,S,"$1"):t||e})),i},C=function(e,t){var n,i=e;if(g(y,i)&&(i="%"+(n=y[i])[0]+"%"),g(p,i)){var s=p[i];if(s===h&&(s=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(n=f(i.prototype))}return p[t]=n,n}(i)),void 0===s&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');var n=E(e),i=n.length>0?n[0]:"",a=C("%"+i+"%",t),u=a.name,l=a.value,c=!1,f=a.alias;f&&(i=f[0],b(n,v([0,1],f)));for(var h=1,d=!0;h<n.length;h+=1){var y=n[h],m=w(y,0,1),_=w(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===_||"'"===_||"`"===_)&&m!==_)throw new r("property names with quotes must have matching quotes");if("constructor"!==y&&d||(c=!0),g(p,u="%"+(i+="."+y)+"%"))l=p[u];else if(null!=l){if(!(y in l)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(s&&h+1>=n.length){var T=s(l,y);l=(d=!!T)&&"get"in T&&!("originalValue"in T.get)?T.get:l[y]}else d=g(l,y),l=l[y];d&&!c&&(p[u]=l)}}return l}},function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(439);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},function(e,t,n){"use strict";var r=function(e){return e!=e};e.exports=function(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!r(e)||!r(t))}},function(e,t,n){"use strict";var r=n(222);e.exports=function(){return"function"==typeof Object.is?Object.is:r}},function(e,t,n){"use strict";var r=Object,i=TypeError;e.exports=function(){if(null!=this&&this!==r(this))throw new i("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e}},function(e,t,n){"use strict";var r=n(224),i=n(82).supportsDescriptors,o=Object.getOwnPropertyDescriptor,a=TypeError;e.exports=function(){if(!i)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=o(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return r}},function(e,t,n){"use strict";var r=n(43);t.__esModule=!0,t.default=t.animationEnd=t.animationDelay=t.animationTiming=t.animationDuration=t.animationName=t.transitionEnd=t.transitionDuration=t.transitionDelay=t.transitionTiming=t.transitionProperty=t.transform=void 0;var i,o,a,s,u,l,c,f,h,d,p,y=r(n(67)),m="transform";if(t.transform=m,t.animationEnd=a,t.transitionEnd=o,t.transitionDelay=c,t.transitionTiming=l,t.transitionDuration=u,t.transitionProperty=s,t.animationDelay=p,t.animationTiming=d,t.animationDuration=h,t.animationName=f,y.default){var g=function(){for(var e,t,n=document.createElement("div").style,r={O:function(e){return"o"+e.toLowerCase()},Moz:function(e){return e.toLowerCase()},Webkit:function(e){return"webkit"+e},ms:function(e){return"MS"+e}},i=Object.keys(r),o="",a=0;a<i.length;a++){var s=i[a];if(s+"TransitionProperty"in n){o="-"+s.toLowerCase(),e=r[s]("TransitionEnd"),t=r[s]("AnimationEnd");break}}!e&&"transitionProperty"in n&&(e="transitionend");!t&&"animationName"in n&&(t="animationend");return n=null,{animationEnd:t,transitionEnd:e,prefix:o}}();i=g.prefix,t.transitionEnd=o=g.transitionEnd,t.animationEnd=a=g.animationEnd,t.transform=m=i+"-"+m,t.transitionProperty=s=i+"-transition-property",t.transitionDuration=u=i+"-transition-duration",t.transitionDelay=c=i+"-transition-delay",t.transitionTiming=l=i+"-transition-timing-function",t.animationName=f=i+"-animation-name",t.animationDuration=h=i+"-animation-duration",t.animationTiming=d=i+"-animation-delay",t.animationDelay=p=i+"-animation-timing-function"}var v={transform:m,end:o,property:s,timing:l,delay:c,duration:u};t.default=v},function(e,t,n){"use strict";var r=n(43);t.__esModule=!0,t.default=function(e){return(0,i.default)(e.replace(o,"ms-"))};var i=r(n(452)),o=/^-ms-/;e.exports=t.default},function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},function(e,t,n){var r=n(132),i=n(363);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(132);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new l,o=n.domBuilder||new i,s=n.errorHandler,u=n.locator,c=n.xmlns||{},f={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},o=e instanceof Function;function s(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(f.nbsp=" ",f.copy="©",c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,c,f):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var l=0;l<s;l++){e=r.getURI(l);var c=r.getValue(l),f=(n=r.getQName(l),i.createAttributeNS(e,n));this.locator&&o(r.getLocator(l),f),f.value=f.nodeValue=c,a.setAttributeNode(f)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),u(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=s.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),u(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),u(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,a(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,a(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,a(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var l=n(369).XMLReader,c=t.DOMImplementation=n(187).DOMImplementation;t.XMLSerializer=n(187).XMLSerializer,t.DOMParser=r},function(e,t){var n=Math.pow(2,32);e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=t.getUint32(i),r.firstOffset=t.getUint32(i+4),i+=8):(r.earliestPresentationTime=t.getUint32(i)*n+t.getUint32(i+4),r.firstOffset=t.getUint32(i+8)*n+t.getUint32(i+12),i+=16),i+=2;var o=t.getUint16(i);for(i+=2;o>0;i+=12,o--)r.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return r}},function(e,t,n){"use strict";var r=n(188),i=n(370).handleRollover,o={};o.ts=n(372),o.aac=n(373);var a=n(59).ONE_SECOND_IN_TS,s=function(e,t,n){for(var r,i,a,s,u=0,l=188,c=!1;l<=e.byteLength;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u++,l++;else{switch(r=e.subarray(u,l),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),c=!0)}if(c)break;u+=188,l+=188}for(u=(l=e.byteLength)-188,c=!1;u>=0;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u--,l--;else{switch(r=e.subarray(u,l),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),c=!0)}if(c)break;u-=188,l-=188}},u=function(e,t,n){for(var r,i,a,s,u,l,c,f=0,h=188,d=!1,p={data:[],size:0};h<e.byteLength;)if(71!==e[f]||71!==e[h])f++,h++;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":if(i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!d&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0),!n.firstKeyFrame)){if(a&&0!==p.size){for(u=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),u.set(c,l),l+=c.byteLength;if(o.ts.videoPacketContainsKeyFrame(u)){var y=o.ts.parsePesTime(u);y?(n.firstKeyFrame=y,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(r),p.size+=r.byteLength}}if(d&&n.firstKeyFrame)break;f+=188,h+=188}for(f=(h=e.byteLength)-188,d=!1;f>=0;)if(71!==e[f]||71!==e[h])f--,h--;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0)}if(d)break;f-=188,h-=188}},l=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),o.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=o.ts.parsePat(n));break;case"pmt":t.table||(t.table=o.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=188,i+=188}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case r.H264_STREAM_TYPE:n.video=[],u(e,t,n),0===n.video.length&&delete n.video;break;case r.ADTS_STREAM_TYPE:n.audio=[],s(e,t,n),0===n.audio.length&&delete n.audio}}return n};e.exports={inspect:function(e,t){var n;return(n=o.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,s=null,u=0,l=0;e.length-l>=3;){switch(o.aac.parseType(e,l)){case"timed-metadata":if(e.length-l<10){n=!0;break}if((u=o.aac.parseId3TagSize(e,l))>e.length){n=!0;break}null===s&&(t=e.subarray(l,l+u),s=o.aac.parseAacTimestamp(t)),l+=u;break;case"audio":if(e.length-l<7){n=!0;break}if((u=o.aac.parseAdtsSize(e,l))>e.length){n=!0;break}null===i&&(t=e.subarray(l,l+u),i=o.aac.parseSampleRate(t)),r++,l+=u;break;default:l++}if(n)return null}if(null===i||null===s)return null;var c=a/i;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*r*c,pts:s+1024*r*c}]}}(e):l(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=i(e.dts,n),e.pts=i(e.pts,n),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a}))}if(e.video&&e.video.length){var r=t;if(void 0===r&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=i(e.dts,r),e.pts=i(e.pts,r),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a})),e.firstKeyFrame){var o=e.firstKeyFrame;o.dts=i(o.dts,r),o.pts=i(o.pts,r),o.dtsTime=o.dts/a,o.ptsTime=o.dts/a}}}(n,t),n):null},parseAudioPes_:s}},function(e){e.exports=JSON.parse('{"a":"0.0.4-rc.2"}')},function(e,t,n){(function(t){var n=/^\[object .+?Constructor\]$/,r="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();var a,s=Array.prototype,u=Function.prototype,l=Object.prototype,c=o["__core-js_shared__"],f=(a=/[^.]+$/.exec(c&&c.keys&&c.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",h=u.toString,d=l.hasOwnProperty,p=l.toString,y=RegExp("^"+h.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=s.splice,g=C(o,"Map"),v=C(Object,"create");function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function T(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function S(e){return!(!x(e)||(t=e,f&&f in t))&&(function(e){var t=x(e)?p.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?y:n).test(function(e){if(null!=e){try{return h.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function E(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function C(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return S(n)?n:void 0}function k(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(k.Cache||w),n}function x(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}b.prototype.clear=function(){this.__data__=v?v(null):{}},b.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},b.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return d.call(t,e)?t[e]:void 0},b.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:d.call(t,e)},b.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?"__lodash_hash_undefined__":t,this},_.prototype.clear=function(){this.__data__=[]},_.prototype.delete=function(e){var t=this.__data__,n=T(t,e);return!(n<0)&&(n==t.length-1?t.pop():m.call(t,n,1),!0)},_.prototype.get=function(e){var t=this.__data__,n=T(t,e);return n<0?void 0:t[n][1]},_.prototype.has=function(e){return T(this.__data__,e)>-1},_.prototype.set=function(e,t){var n=this.__data__,r=T(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},w.prototype.clear=function(){this.__data__={hash:new b,map:new(g||_),string:new b}},w.prototype.delete=function(e){return E(this,e).delete(e)},w.prototype.get=function(e){return E(this,e).get(e)},w.prototype.has=function(e){return E(this,e).has(e)},w.prototype.set=function(e,t){return E(this,e).set(e,t),this},k.Cache=w,e.exports=k}).call(this,n(30))},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&u()}function s(){o(a)}function u(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),l=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},f=g(0,0,0,0);function h(e){return parseFloat(e)||0}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function p(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=c(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),u=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=d(r,"left","right")+o),Math.round(u+a)!==n&&(u-=d(r,"top","bottom")+a)),!function(e){return e===c(e).document.documentElement}(e)){var l=Math.round(s+o)-t,p=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(p)&&(u-=p)}return g(i.left,i.top,s,u)}var y="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"==typeof e.getBBox};function m(e){return r?y(e)?function(e){var t=e.getBBox();return g(0,0,t.width,t.height)}(e):p(e):f}function g(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=g(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),b=function(e,t){var n,r,i,o,a,s,u,c=(r=(n=t).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),l(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);l(this,{target:e,contentRect:c})},_=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new b(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new n,T=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new _(t,n,this);w.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){T.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}));var S=void 0!==i.ResizeObserver?i.ResizeObserver:T;t.a=S}).call(this,n(30))},function(e,t,n){e.exports=function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,a,s=t||[0],u=(n=n||0)>>>3,l=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(a=i+u)>>>2,s.length<=o&&s.push(0),s[o]|=e[i]<<8*(l+r*(a%4));return{value:s,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,a,s;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var u=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(a=(s=(i>>>1)+l)>>>2;u.length<=a;)u.push(0);u[a]|=o<<8*(c+r*(s%4))}return{value:u,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,a,s,u,l,c,f,h,d=0,p=n||[0],y=(r=r||0)>>>3;if("UTF8"===t)for(f=-1===i?3:0,s=0;s<e.length;s+=1)for(a=[],128>(o=e.charCodeAt(s))?a.push(o):2048>o?(a.push(192|o>>>6),a.push(128|63&o)):55296>o||57344<=o?a.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(s)),a.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),u=0;u<a.length;u+=1){for(l=(c=d+y)>>>2;p.length<=l;)p.push(0);p[l]|=a[u]<<8*(f+i*(c%4)),d+=1}else for(f=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,s=0;s<e.length;s+=1){for(o=e.charCodeAt(s),!0===h&&(o=(u=255&o)<<8|o>>>8),l=(c=d+y)>>>2;p.length<=l;)p.push(0);p[l]|=o<<8*(f+i*(c%4)),d+=2}return{value:p,binLen:8*d+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,a,s,u,l,c,f=0,h=n||[0],d=(r=r||0)>>>3,p=-1===i?3:0,y=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==y&&y<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(u=e.substr(o,4),s=0,a=0;a<u.length;a+=1)s|=t.indexOf(u.charAt(a))<<18-6*a;for(a=0;a<u.length-1;a+=1){for(l=(c=f+d)>>>2;h.length<=l;)h.push(0);h[l]|=(s>>>16-8*a&255)<<8*(p+i*(c%4)),f+=1}}return{value:h,binLen:8*f+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,a,s,u=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),a=(s=o+l)>>>2,u.length<=a&&u.push(0),u[a]|=i<<8*(c+r*(s%4));return{value:u,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,a="",s=t/8,u=-1===n?3:0;for(i=0;i<s;i+=1)o=e[i>>>2]>>>8*(u+n*(i%4)),a+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?a.toUpperCase():a}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,a,s,u,l,c="",f=n/8,h=-1===r?3:0;for(o=0;o<f;o+=3)for(u=o+1<f?e[o+1>>>2]:0,l=o+2<f?e[o+2>>>2]:0,s=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(u>>>8*(h+r*((o+1)%4))&255)<<8|l>>>8*(h+r*((o+2)%4))&255,a=0;a<4;a+=1)c+=8*o+6*a<=n?t.charAt(s>>>6*(3-a)&63):i.b64Pad;return c}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",a=t/8,s=-1===n?3:0;for(r=0;r<a;r+=1)i=e[r>>>2]>>>8*(s+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),a=new Uint8Array(o),s=-1===n?3:0;for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(s+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,a=new Uint8Array(i);for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return a}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function a(e,t){return e<<t|e>>>32-t}function s(e,t,n){return e^t^n}function u(e,t,n){return e&t^e&n^t&n}function l(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function c(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function f(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function h(e,t){var n,r,i,o,f,h,d,p,y=[];for(n=t[0],r=t[1],i=t[2],o=t[3],f=t[4],d=0;d<80;d+=1)y[d]=d<16?e[d]:a(y[d-3]^y[d-8]^y[d-14]^y[d-16],1),h=d<20?c(a(n,5),(p=r)&i^~p&o,f,1518500249,y[d]):d<40?c(a(n,5),s(r,i,o),f,1859775393,y[d]):d<60?c(a(n,5),u(r,i,o),f,2400959708,y[d]):c(a(n,5),s(r,i,o),f,3395469782,y[d]),f=o,o=i,i=a(r,30),r=n,n=h;return t[0]=l(n,t[0]),t[1]=l(r,t[1]),t[2]=l(i,t[2]),t[3]=l(o,t[3]),t[4]=l(f,t[4]),t}function d(e,t,n,r){for(var i,o=15+(t+65>>>9<<4),a=t+n;e.length<=o;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[o]=4294967295&a,e[o-1]=a/4294967296|0,i=0;i<e.length;i+=16)r=h(e.slice(i,i+16),r);return r}return function(t){function n(e,n,i){var o=this;if("SHA-1"!==e)throw new Error("Chosen SHA variant is not supported");var a=i||{};return(o=t.call(this,e,n,i)||this).t=!0,o.i=o.o,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=h,o.p=function(e){return e.slice()},o.l=f,o.R=d,o.U=[1732584193,4023233417,2562383102,271733878,3285377520],o.T=512,o.m=160,o.F=!1,a.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,a.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.I=0,this.C=!1,this.H=0,this.L=!1,this.N=[],this.S=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.I),o=i.binLen,a=i.value,s=o>>>5;for(t=0;t<s;t+=r)n+this.T<=o&&(this.U=this.A(a.slice(t,t+r),this.U),n+=this.T);this.H+=n,this.Y=a.slice(n>>>5),this.I=o%this.T,this.C=!0},e.prototype.getHash=function(e,t){var n,r,a=this.m,s=o(t);if(!0===this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");a=s.outputLen}var u=i(e,a,this.u,s);if(!0===this.L&&this.i)return u(this.i(s));for(r=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),a),n=1;n<this.numRounds;n+=1)!0===this.F&&a%32!=0&&(r[r.length-1]&=16777215>>>24-a%32),r=this.R(r,a,0,this.l(this.g),a);return u(r)},e.prototype.setHMACKey=function(e,t,n){if(!0!==this.t)throw new Error("Variant does not support HMAC");if(!0===this.C)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(!0===this.L)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.N[t]=909522486^e.value[t],this.S[t]=1549556828^e.value[t];this.U=this.A(this.N,this.U),this.H=this.T,this.L=!0},e.prototype.getHMAC=function(e,t){var n=o(t);return i(e,this.m,this.u,n)(this.o())},e.prototype.o=function(){var e;if(!1===this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),this.m);return e=this.A(this.S,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())}()},function(e){e.exports=JSON.parse('{"a":"1.0.22-rc.2"}')},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=d(n(68)),i=d(n(427)),o=d(n(134)),a=d(n(1)),s=d(n(28)),u=d(n(430)),l=d(n(432)),c=n(466),f=d(n(450)),h=d(n(215));function d(e){return e&&e.__esModule?e:{default:e}}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function y(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var g=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,t,n)||this).handleHidden=function(){var e;(r.setState({exited:!0}),r.props.onExited)&&(e=r.props).onExited.apply(e,arguments)},r.state={exited:!t.show},r.onHiddenListener=r.handleHidden.bind(m(m(r))),r._lastTarget=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.getDerivedStateFromProps=function(e){return e.show?{exited:!1}:e.transition?null:{exited:!0}};var i=r.prototype;return i.componentDidMount=function(){this.setState({target:this.getTarget()})},i.componentDidUpdate=function(e){if(this.props!==e){var t=this.getTarget();t!==this.state.target&&this.setState({target:t})}},i.getTarget=function(){var e=this.props.target;return(e="function"==typeof e?e():e)&&s.default.findDOMNode(e)||null},i.render=function(){var e=this,t=this.props,n=(t.target,t.container),r=t.containerPadding,i=t.placement,o=t.rootClose,s=t.children,f=t.flip,h=t.popperConfig,d=void 0===h?{}:h,m=t.transition,g=y(t,["target","container","containerPadding","placement","rootClose","children","flip","popperConfig","transition"]),v=this.state.target;if(!(g.show||m&&!this.state.exited))return null;var b=s,_=d.modifiers,w=void 0===_?{}:_,T=p({},d,{placement:i,referenceElement:v,enableEvents:g.show,modifiers:p({},w,{preventOverflow:p({padding:r||5},w.preventOverflow),flip:p({enabled:!!f},w.preventOverflow)})});return b=a.default.createElement(c.Popper,T,(function(t){var n=t.arrowProps,r=t.style,o=t.ref,s=y(t,["arrowProps","style","ref"]);e.popper=s;var u=e.props.children(p({},s,{placement:s.placement||i,show:g.show,arrowProps:n,props:{ref:o,style:r}}));if(m){var l=g.onExit,c=g.onExiting,f=g.onEnter,h=g.onEntering,d=g.onEntered;u=a.default.createElement(m,{in:g.show,appear:!0,onExit:l,onExiting:c,onExited:e.onHiddenListener,onEnter:f,onEntering:h,onEntered:d},u)}return u})),o&&(b=a.default.createElement(l.default,{onRootClose:g.onHide,event:g.rootCloseEvent,disabled:g.rootCloseDisabled},b)),a.default.createElement(u.default,{container:n},b)},r}(a.default.Component);g.propTypes=p({},u.default.propTypes,{show:r.default.bool,placement:r.default.oneOf(c.placements),container:r.default.oneOfType([o.default,r.default.func]),flip:r.default.bool,children:r.default.func.isRequired,popperConfig:r.default.object,rootClose:r.default.bool,rootCloseEvent:l.default.propTypes.event,rootCloseDisabled:l.default.propTypes.disabled,onHide:function(e){var t=r.default.func;e.rootClose&&(t=t.isRequired);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return t.apply(void 0,[e].concat(i))},transition:i.default,onEnter:r.default.func,onEntering:r.default.func,onEntered:r.default.func,onExit:r.default.func,onExiting:r.default.func,onExited:r.default.func});var v=(0,f.default)((function(e,t){return a.default.createElement(h.default,{container:e.container},(function(n){return a.default.createElement(g,p({},e,{ref:t,container:n}))}))}),{displayName:"withContainer(Overlay)"});t.default=v,e.exports=t.default},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(217),i=n(438),o=n(442),a=n(444),s=n(445),u=n(447),l=Date.prototype.getTime;function c(e,t,n){var d=n||{};return!!(d.strict?o(e,t):e===t)||(!e||!t||"object"!=typeof e&&"object"!=typeof t?d.strict?o(e,t):e==t:function(e,t,n){var o,d;if(typeof e!=typeof t)return!1;if(f(e)||f(t))return!1;if(e.prototype!==t.prototype)return!1;if(i(e)!==i(t))return!1;var p=a(e),y=a(t);if(p!==y)return!1;if(p||y)return e.source===t.source&&s(e)===s(t);if(u(e)&&u(t))return l.call(e)===l.call(t);var m=h(e),g=h(t);if(m!==g)return!1;if(m||g){if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}if(typeof e!=typeof t)return!1;try{var v=r(e),b=r(t)}catch(e){return!1}if(v.length!==b.length)return!1;for(v.sort(),b.sort(),o=v.length-1;o>=0;o--)if(v[o]!=b[o])return!1;for(o=v.length-1;o>=0;o--)if(d=v[o],!c(e[d],t[d],n))return!1;return!0}(e,t,d))}function f(e){return null==e}function h(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}e.exports=c},function(e,t,n){"use strict";var r=n(43);t.__esModule=!0,t.default=void 0;var i=r(n(226)),o=r(n(451));function a(e,t,n){var r,o={target:e,currentTarget:e};function a(e){e.target===e.currentTarget&&(clearTimeout(r),e.target.removeEventListener(i.default.end,a),t.call(this))}i.default.end?null==n&&(n=u(e)||0):n=0,i.default.end?(e.addEventListener(i.default.end,a,!1),r=setTimeout((function(){return a(o)}),1.5*(n||100))):setTimeout(a.bind(null,o),0)}a._parseDuration=u;var s=a;function u(e){var t=(0,o.default)(e,i.default.duration),n=-1===t.indexOf("ms")?1e3:1;return parseFloat(t)*n}t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=void 0===t?{}:t,r=n.propTypes,o=n.defaultProps,a=n.allowFallback,s=void 0!==a&&a,u=n.displayName,l=void 0===u?e.name||e.displayName:u,c=function(t,n){return e(t,n)};return Object.assign(i.default.forwardRef||!s?i.default.forwardRef(c):function(e){return c(e,null)},{displayName:l,propTypes:r,defaultProps:o})};var r,i=(r=n(1))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";var r=n(6),i=n(14),o=n(51),a=n(46),s=n(17),u=n(153),l=n(11),c=n(36),f=n(54),h=n(18),d=n(25),p=n(20),y=n(32),m=n(62),g=n(61),v=n(64),b=n(76),_=n(115),w=n(156),T=n(118),S=n(49),E=n(27),C=n(85),k=n(33),x=n(45),O=n(74),P=n(86),R=n(75),A=n(87),I=n(16),L=n(157),j=n(247),D=n(55),N=n(38),M=n(47).forEach,U=P("hidden"),B=I("toPrimitive"),F=N.set,V=N.getterFor("Symbol"),H=Object.prototype,z=i.Symbol,q=o("JSON","stringify"),W=S.f,$=E.f,G=w.f,Y=C.f,K=O("symbols"),X=O("op-symbols"),Q=O("string-to-symbol-registry"),J=O("symbol-to-string-registry"),Z=O("wks"),ee=i.QObject,te=!ee||!ee.prototype||!ee.prototype.findChild,ne=s&&l((function(){return 7!=v($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=W(H,t);r&&delete H[t],$(e,t,n),r&&e!==H&&$(H,t,r)}:$,re=function(e,t){var n=K[e]=v(z.prototype);return F(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},ie=u&&"symbol"==typeof z.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof z},oe=function(e,t,n){e===H&&oe(X,t,n),d(e);var r=m(t,!0);return d(n),c(K,r)?(n.enumerable?(c(e,U)&&e[U][r]&&(e[U][r]=!1),n=v(n,{enumerable:g(0,!1)})):(c(e,U)||$(e,U,g(1,{})),e[U][r]=!0),ne(e,r,n)):$(e,r,n)},ae=function(e,t){d(e);var n=y(t),r=b(n).concat(ce(n));return M(r,(function(t){s&&!se.call(n,t)||oe(e,t,n[t])})),e},se=function(e){var t=m(e,!0),n=Y.call(this,t);return!(this===H&&c(K,t)&&!c(X,t))&&(!(n||!c(this,t)||!c(K,t)||c(this,U)&&this[U][t])||n)},ue=function(e,t){var n=y(e),r=m(t,!0);if(n!==H||!c(K,r)||c(X,r)){var i=W(n,r);return!i||!c(K,r)||c(n,U)&&n[U][r]||(i.enumerable=!0),i}},le=function(e){var t=G(y(e)),n=[];return M(t,(function(e){c(K,e)||c(R,e)||n.push(e)})),n},ce=function(e){var t=e===H,n=G(t?X:y(e)),r=[];return M(n,(function(e){!c(K,e)||t&&!c(H,e)||r.push(K[e])})),r};(u||(x((z=function(){if(this instanceof z)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=A(e),n=function(e){this===H&&n.call(X,e),c(this,U)&&c(this[U],t)&&(this[U][t]=!1),ne(this,t,g(1,e))};return s&&te&&ne(H,t,{configurable:!0,set:n}),re(t,e)}).prototype,"toString",(function(){return V(this).tag})),C.f=se,E.f=oe,S.f=ue,_.f=w.f=le,T.f=ce,s&&($(z.prototype,"description",{configurable:!0,get:function(){return V(this).description}}),a||x(H,"propertyIsEnumerable",se,{unsafe:!0})),L.f=function(e){return re(I(e),e)}),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:z}),M(b(Z),(function(e){j(e)})),r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=String(e);if(c(Q,t))return Q[t];var n=z(t);return Q[t]=n,J[n]=t,n},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(c(J,e))return J[e]},useSetter:function(){te=!0},useSimple:function(){te=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!s},{create:function(e,t){return void 0===t?v(e):ae(v(e),t)},defineProperty:oe,defineProperties:ae,getOwnPropertyDescriptor:ue}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:le,getOwnPropertySymbols:ce}),r({target:"Object",stat:!0,forced:l((function(){T.f(1)}))},{getOwnPropertySymbols:function(e){return T.f(p(e))}}),q)&&r({target:"JSON",stat:!0,forced:!u||l((function(){var e=z();return"[null]"!=q([e])||"{}"!=q({a:e})||"{}"!=q(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=t,(h(t)||void 0!==e)&&!ie(e))return f(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),i[1]=t,q.apply(null,i)}});z.prototype[B]||k(z.prototype,B,z.prototype.valueOf),D(z,"Symbol"),R[U]=!0},function(e,t,n){var r=n(14),i=n(114),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(36),i=n(150),o=n(49),a=n(27);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,l=0;l<n.length;l++){var c=n[l];r(e,c)||s(e,c,u(t,c))}}},function(e,t,n){var r=n(151),i=n(36),o=n(157),a=n(27).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,n){"use strict";var r=n(6),i=n(11),o=n(54),a=n(18),s=n(20),u=n(15),l=n(56),c=n(77),f=n(78),h=n(16),d=n(120),p=h("isConcatSpreadable"),y=d>=51||!i((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),m=f("concat"),g=function(e){if(!a(e))return!1;var t=e[p];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(e){var t,n,r,i,o,a=s(this),f=c(a,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(g(o=-1===t?a:arguments[t])){if(h+(i=u(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,h++)n in o&&l(f,h,o[n])}else{if(h>=9007199254740991)throw TypeError("Maximum allowed index exceeded");l(f,h++,o)}return f.length=h,f}})},function(e,t,n){var r=n(6),i=n(250),o=n(42);r({target:"Array",proto:!0},{copyWithin:i}),o("copyWithin")},function(e,t,n){"use strict";var r=n(20),i=n(63),o=n(15),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),s=o(n.length),u=i(e,s),l=i(t,s),c=arguments.length>2?arguments[2]:void 0,f=a((void 0===c?s:i(c,s))-l,s-u),h=1;for(l<u&&u<l+f&&(h=-1,l+=f-1,u+=f-1);f-- >0;)l in n?n[u]=n[l]:delete n[u],u+=h,l+=h;return n}},function(e,t,n){"use strict";var r=n(6),i=n(47).every;r({target:"Array",proto:!0,forced:n(48)("every")},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(6),i=n(253),o=n(42);r({target:"Array",proto:!0},{fill:i}),o("fill")},function(e,t,n){"use strict";var r=n(20),i=n(63),o=n(15);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(6),i=n(47).find,o=n(42),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(e,t,n){"use strict";var r=n(6),i=n(47).findIndex,o=n(42),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findIndex")},function(e,t,n){"use strict";var r=n(6),i=n(159),o=n(20),a=n(15),s=n(52),u=n(77);r({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=o(this),n=a(t.length),r=u(t,0);return r.length=i(r,t,t,n,0,void 0===e?1:s(e)),r}})},function(e,t,n){"use strict";var r=n(6),i=n(159),o=n(20),a=n(15),s=n(37),u=n(77);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=o(this),r=a(n.length);return s(e),(t=u(n,0)).length=i(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},function(e,t,n){var r=n(6),i=n(259);r({target:"Array",stat:!0,forced:!n(122)((function(e){Array.from(e)}))},{from:i})},function(e,t,n){"use strict";var r=n(65),i=n(20),o=n(162),a=n(163),s=n(15),u=n(56),l=n(164);e.exports=function(e){var t,n,c,f,h,d=i(e),p="function"==typeof this?this:Array,y=arguments.length,m=y>1?arguments[1]:void 0,g=void 0!==m,v=0,b=l(d);if(g&&(m=r(m,y>2?arguments[2]:void 0,2)),null==b||p==Array&&a(b))for(n=new p(t=s(d.length));t>v;v++)u(n,v,g?m(d[v],v):d[v]);else for(h=(f=b.call(d)).next,n=new p;!(c=h.call(f)).done;v++)u(n,v,g?o(f,m,[c.value,v],!0):c.value);return n.length=v,n}},function(e,t,n){"use strict";var r=n(6),i=n(116).includes,o=n(42);r({target:"Array",proto:!0},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(e,t,n){"use strict";var r=n(6),i=n(116).indexOf,o=n(48),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,u=o("indexOf");r({target:"Array",proto:!0,forced:s||u},{indexOf:function(e){return s?a.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(6)({target:"Array",stat:!0},{isArray:n(54)})},function(e,t,n){var r=n(18);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(6),i=n(73),o=n(32),a=n(48),s=[].join,u=i!=Object,l=a("join",",");r({target:"Array",proto:!0,forced:u||l},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},function(e,t,n){var r=n(6),i=n(266);r({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},function(e,t,n){"use strict";var r=n(32),i=n(52),o=n(15),a=n(48),s=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf");e.exports=l||c?function(e){if(l)return u.apply(this,arguments)||0;var t=r(this),n=o(t.length),a=n-1;for(arguments.length>1&&(a=s(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:u},function(e,t,n){"use strict";var r=n(6),i=n(47).map;r({target:"Array",proto:!0,forced:!n(78)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(6),i=n(11),o=n(56);r({target:"Array",stat:!0,forced:i((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)o(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(6),i=n(168).right;r({target:"Array",proto:!0,forced:n(48)("reduceRight")},{reduceRight:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(6),i=n(54),o=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o.call(this)}})},function(e,t,n){"use strict";var r=n(6),i=n(18),o=n(54),a=n(63),s=n(15),u=n(32),l=n(56),c=n(78),f=n(16)("species"),h=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!c("slice")},{slice:function(e,t){var n,r,c,p=u(this),y=s(p.length),m=a(e,y),g=a(void 0===t?y:t,y);if(o(p)&&("function"!=typeof(n=p.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[f])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(p,m,g);for(r=new(void 0===n?Array:n)(d(g-m,0)),c=0;m<g;m++,c++)m in p&&l(r,c,p[m]);return r.length=c,r}})},function(e,t,n){"use strict";var r=n(6),i=n(47).some;r({target:"Array",proto:!0,forced:n(48)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(6),i=n(37),o=n(20),a=n(11),s=n(48),u=[].sort,l=[1,2,3],c=a((function(){l.sort(void 0)})),f=a((function(){l.sort(null)})),h=s("sort");r({target:"Array",proto:!0,forced:c||!f||h},{sort:function(e){return void 0===e?u.call(o(this)):u.call(o(this),i(e))}})},function(e,t,n){n(126)("Array")},function(e,t,n){"use strict";var r=n(6),i=n(63),o=n(52),a=n(15),s=n(20),u=n(77),l=n(56),c=n(78),f=Math.max,h=Math.min;r({target:"Array",proto:!0,forced:!c("splice")},{splice:function(e,t){var n,r,c,d,p,y,m=s(this),g=a(m.length),v=i(e,g),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=g-v):(n=b-2,r=h(f(o(t),0),g-v)),g+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=u(m,r),d=0;d<r;d++)(p=v+d)in m&&l(c,d,m[p]);if(c.length=r,n<r){for(d=v;d<g-r;d++)y=d+n,(p=d+r)in m?m[y]=m[p]:delete m[y];for(d=g;d>g-r+n;d--)delete m[d-1]}else if(n>r)for(d=g-r;d>v;d--)y=d+n-1,(p=d+r-1)in m?m[y]=m[p]:delete m[y];for(d=0;d<n;d++)m[d+v]=arguments[d+2];return m.length=g-r+n,c}})},function(e,t,n){n(42)("flat")},function(e,t,n){n(42)("flatMap")},function(e,t,n){var r=n(14);n(55)(r.JSON,"JSON",!0)},function(e,t,n){"use strict";var r=n(169),i=n(281);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i,!0)},function(e,t,n){var r=n(18),i=n(89);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},function(e,t,n){"use strict";var r=n(27).f,i=n(64),o=n(92),a=n(65),s=n(91),u=n(53),l=n(124),c=n(126),f=n(17),h=n(57).fastKey,d=n(38),p=d.set,y=d.getterFor;e.exports={getConstructor:function(e,t,n,l){var c=e((function(e,r){s(e,c,t),p(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),f||(e.size=0),null!=r&&u(r,e[l],e,n)})),d=y(t),m=function(e,t,n){var r,i,o=d(e),a=g(e,t);return a?a.value=n:(o.last=a={index:i=h(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),f?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},g=function(e,t){var n,r=d(e),i=h(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(c.prototype,{clear:function(){for(var e=d(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=d(this),n=g(this,e);if(n){var r=n.next,i=n.previous;delete t.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),t.first==n&&(t.first=r),t.last==n&&(t.last=i),f?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=d(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!g(this,e)}}),o(c.prototype,n?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),f&&r(c.prototype,"size",{get:function(){return d(this).size}}),c},setStrong:function(e,t,n){var r=t+" Iterator",i=y(t),o=y(r);l(e,t,(function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(t)}}},function(e,t,n){n(55)(Math,"Math",!0)},function(e,t,n){"use strict";var r=n(17),i=n(11),o=n(76),a=n(118),s=n(85),u=n(20),l=n(73),c=Object.assign;e.exports=!c||i((function(){var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=o(c({},t)).join("")}))?function(e,t){for(var n=u(e),i=arguments.length,c=1,f=a.f,h=s.f;i>c;)for(var d,p=l(arguments[c++]),y=f?o(p).concat(f(p)):o(p),m=y.length,g=0;m>g;)d=y[g++],r&&!h.call(p,d)||(n[d]=p[d]);return n}:c},function(e,t,n){n(6)({target:"Object",stat:!0,sham:!n(17)},{create:n(64)})},function(e,t,n){"use strict";var r=n(6),i=n(17),o=n(93),a=n(20),s=n(37),u=n(27);i&&r({target:"Object",proto:!0,forced:o},{__defineGetter__:function(e,t){u.f(a(this),e,{get:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(6),i=n(17);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:n(154)})},function(e,t,n){var r=n(6),i=n(17);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(27).f})},function(e,t,n){"use strict";var r=n(6),i=n(17),o=n(93),a=n(20),s=n(37),u=n(27);i&&r({target:"Object",proto:!0,forced:o},{__defineSetter__:function(e,t){u.f(a(this),e,{set:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(6),i=n(171).entries;r({target:"Object",stat:!0},{entries:function(e){return i(e)}})},function(e,t,n){var r=n(6),i=n(90),o=n(11),a=n(18),s=n(57).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!i},{freeze:function(e){return u&&a(e)?u(s(e)):e}})},function(e,t,n){var r=n(6),i=n(53),o=n(56);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,n){o(t,e,n)}),void 0,!0),t}})},function(e,t,n){var r=n(6),i=n(11),o=n(32),a=n(49).f,s=n(17),u=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},function(e,t,n){var r=n(6),i=n(17),o=n(150),a=n(32),s=n(49),u=n(56);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),i=s.f,l=o(r),c={},f=0;l.length>f;)void 0!==(n=i(r,t=l[f++]))&&u(c,t,n);return c}})},function(e,t,n){var r=n(6),i=n(11),o=n(156).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},function(e,t,n){var r=n(6),i=n(11),o=n(20),a=n(66),s=n(166);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},function(e,t,n){n(6)({target:"Object",stat:!0},{is:n(172)})},function(e,t,n){var r=n(6),i=n(11),o=n(18),a=Object.isExtensible;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isExtensible:function(e){return!!o(e)&&(!a||a(e))}})},function(e,t,n){var r=n(6),i=n(11),o=n(18),a=Object.isFrozen;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isFrozen:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(6),i=n(11),o=n(18),a=Object.isSealed;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isSealed:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(6),i=n(20),o=n(76);r({target:"Object",stat:!0,forced:n(11)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},function(e,t,n){"use strict";var r=n(6),i=n(17),o=n(93),a=n(20),s=n(62),u=n(66),l=n(49).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupGetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=l(n,r))return t.get}while(n=u(n))}})},function(e,t,n){"use strict";var r=n(6),i=n(17),o=n(93),a=n(20),s=n(62),u=n(66),l=n(49).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupSetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=l(n,r))return t.set}while(n=u(n))}})},function(e,t,n){var r=n(6),i=n(18),o=n(57).onFreeze,a=n(90),s=n(11),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{preventExtensions:function(e){return u&&i(e)?u(o(e)):e}})},function(e,t,n){var r=n(6),i=n(18),o=n(57).onFreeze,a=n(90),s=n(11),u=Object.seal;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{seal:function(e){return u&&i(e)?u(o(e)):e}})},function(e,t,n){n(6)({target:"Object",stat:!0},{setPrototypeOf:n(89)})},function(e,t,n){"use strict";var r=n(121),i={};i[n(16)("toStringTag")]="z",e.exports="[object z]"!==String(i)?function(){return"[object "+r(this)+"]"}:i.toString},function(e,t,n){var r=n(6),i=n(171).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},function(e,t,n){"use strict";var r,i,o,a,s=n(6),u=n(46),l=n(14),c=n(51),f=n(174),h=n(45),d=n(92),p=n(55),y=n(126),m=n(18),g=n(37),v=n(91),b=n(50),_=n(53),w=n(122),T=n(94),S=n(175).set,E=n(309),C=n(176),k=n(310),x=n(80),O=n(95),P=n(38),R=n(119),A=n(16),I=n(120),L=A("species"),j="Promise",D=P.get,N=P.set,M=P.getterFor(j),U=f,B=l.TypeError,F=l.document,V=l.process,H=c("fetch"),z=x.f,q=z,W="process"==b(V),$=!!(F&&F.createEvent&&l.dispatchEvent),G=R(j,(function(){if(66===I)return!0;if(!W&&"function"!=typeof PromiseRejectionEvent)return!0;if(u&&!U.prototype.finally)return!0;if(I>=51&&/native code/.test(U))return!1;var e=U.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[L]=t,!(e.then((function(){}))instanceof t)})),Y=G||!w((function(e){U.all(e).catch((function(){}))})),K=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},X=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;E((function(){for(var i=t.value,o=1==t.state,a=0;r.length>a;){var s,u,l,c=r[a++],f=o?c.ok:c.fail,h=c.resolve,d=c.reject,p=c.domain;try{f?(o||(2===t.rejection&&ee(e,t),t.rejection=1),!0===f?s=i:(p&&p.enter(),s=f(i),p&&(p.exit(),l=!0)),s===c.promise?d(B("Promise-chain cycle")):(u=K(s))?u.call(s,h,d):h(s)):d(i)}catch(e){p&&!l&&p.exit(),d(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&J(e,t)}))}},Q=function(e,t,n){var r,i;$?((r=F.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),l.dispatchEvent(r)):r={promise:t,reason:n},(i=l["on"+e])?i(r):"unhandledrejection"===e&&k("Unhandled promise rejection",n)},J=function(e,t){S.call(l,(function(){var n,r=t.value;if(Z(t)&&(n=O((function(){W?V.emit("unhandledRejection",r,e):Q("unhandledrejection",e,r)})),t.rejection=W||Z(t)?2:1,n.error))throw n.value}))},Z=function(e){return 1!==e.rejection&&!e.parent},ee=function(e,t){S.call(l,(function(){W?V.emit("rejectionHandled",e):Q("rejectionhandled",e,t.value)}))},te=function(e,t,n,r){return function(i){e(t,n,i,r)}},ne=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,X(e,t,!0))},re=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw B("Promise can't be resolved itself");var i=K(n);i?E((function(){var r={done:!1};try{i.call(n,te(re,e,r,t),te(ne,e,r,t))}catch(n){ne(e,r,n,t)}})):(t.value=n,t.state=1,X(e,t,!1))}catch(n){ne(e,{done:!1},n,t)}}};G&&(U=function(e){v(this,U,j),g(e),r.call(this);var t=D(this);try{e(te(re,this,t),te(ne,this,t))}catch(e){ne(this,t,e)}},(r=function(e){N(this,{type:j,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(U.prototype,{then:function(e,t){var n=M(this),r=z(T(this,U));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=W?V.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&X(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=D(e);this.promise=e,this.resolve=te(re,e,t),this.reject=te(ne,e,t)},x.f=z=function(e){return e===U||e===o?new i(e):q(e)},u||"function"!=typeof f||(a=f.prototype.then,h(f.prototype,"then",(function(e,t){var n=this;return new U((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof H&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(U,H.apply(l,arguments))}}))),s({global:!0,wrap:!0,forced:G},{Promise:U}),p(U,j,!1,!0),y(j),o=c(j),s({target:j,stat:!0,forced:G},{reject:function(e){var t=z(this);return t.reject.call(void 0,e),t.promise}}),s({target:j,stat:!0,forced:u||G},{resolve:function(e){return C(u&&this===o?U:this,e)}}),s({target:j,stat:!0,forced:Y},{all:function(e){var t=this,n=z(t),r=n.resolve,i=n.reject,o=O((function(){var n=g(t.resolve),o=[],a=0,s=1;_(e,(function(e){var u=a++,l=!1;o.push(void 0),s++,n.call(t,e).then((function(e){l||(l=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=z(t),r=n.reject,i=O((function(){var i=g(t.resolve);_(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(e,t,n){var r,i,o,a,s,u,l,c,f=n(14),h=n(49).f,d=n(50),p=n(175).set,y=n(88),m=f.MutationObserver||f.WebKitMutationObserver,g=f.process,v=f.Promise,b="process"==d(g),_=h(f,"queueMicrotask"),w=_&&_.value;w||(r=function(){var e,t;for(b&&(e=g.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},b?a=function(){g.nextTick(r)}:m&&!/(iphone|ipod|ipad).*applewebkit/i.test(y)?(s=!0,u=document.createTextNode(""),new m(r).observe(u,{characterData:!0}),a=function(){u.data=s=!s}):v&&v.resolve?(l=v.resolve(void 0),c=l.then,a=function(){c.call(l,r)}):a=function(){p.call(f,r)}),e.exports=w||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},function(e,t,n){var r=n(14);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";var r=n(6),i=n(46),o=n(174),a=n(51),s=n(94),u=n(176),l=n(45);r({target:"Promise",proto:!0,real:!0},{finally:function(e){var t=s(this,a("Promise")),n="function"==typeof e;return this.then(n?function(n){return u(t,e()).then((function(){return n}))}:e,n?function(n){return u(t,e()).then((function(){throw n}))}:e)}}),i||"function"!=typeof o||o.prototype.finally||l(o.prototype,"finally",a("Promise").prototype.finally)},function(e,t,n){"use strict";var r=n(6),i=n(81).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(6),i=n(15),o=n(128),a=n(26),s=n(129),u="".endsWith,l=Math.min;r({target:"String",proto:!0,forced:!s("endsWith")},{endsWith:function(e){var t=String(a(this));o(e);var n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:l(i(n),r),c=String(e);return u?u.call(t,c,s):t.slice(s-c.length,s)===c}})},function(e,t,n){var r=n(6),i=n(63),o=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=n(6),i=n(128),o=n(26);r({target:"String",proto:!0,forced:!n(129)("includes")},{includes:function(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(6),i=n(180).end;r({target:"String",proto:!0,forced:n(182)},{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(6),i=n(180).start;r({target:"String",proto:!0,forced:n(182)},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(6),i=n(32),o=n(15);r({target:"String",stat:!0},{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){n(6)({target:"String",proto:!0},{repeat:n(181)})},function(e,t,n){"use strict";var r=n(98),i=n(25),o=n(26),a=n(172),s=n(100);r("search",1,(function(e,t,n){return[function(t){var n=o(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=i(e),u=String(this),l=o.lastIndex;a(l,0)||(o.lastIndex=0);var c=s(o,u);return a(o.lastIndex,l)||(o.lastIndex=l),null===c?-1:c.index}]}))},function(e,t,n){"use strict";var r=n(98),i=n(97),o=n(25),a=n(26),s=n(94),u=n(99),l=n(15),c=n(100),f=n(96),h=n(11),d=[].push,p=Math.min,y=!h((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var s,u,l,c=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,y=new RegExp(e.source,h+"g");(s=f.call(y,r))&&!((u=y.lastIndex)>p&&(c.push(r.slice(p,s.index)),s.length>1&&s.index<r.length&&d.apply(c,s.slice(1)),l=s[0].length,p=u,c.length>=o));)y.lastIndex===s.index&&y.lastIndex++;return p===r.length?!l&&y.test("")||c.push(""):c.push(r.slice(p)),c.length>o?c.slice(0,o):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var f=o(e),h=String(this),d=s(f,RegExp),m=f.unicode,g=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(y?"y":"g"),v=new d(y?f:"^(?:"+f.source+")",g),b=void 0===i?4294967295:i>>>0;if(0===b)return[];if(0===h.length)return null===c(v,h)?[h]:[];for(var _=0,w=0,T=[];w<h.length;){v.lastIndex=y?w:0;var S,E=c(v,y?h:h.slice(w));if(null===E||(S=p(l(v.lastIndex+(y?0:w)),h.length))===_)w=u(h,w,m);else{if(T.push(h.slice(_,w)),T.length===b)return T;for(var C=1;C<=E.length-1;C++)if(T.push(E[C]),T.length===b)return T;w=_=S}}return T.push(h.slice(_)),T}]}),!y)},function(e,t,n){"use strict";var r=n(6),i=n(15),o=n(128),a=n(26),s=n(129),u="".startsWith,l=Math.min;r({target:"String",proto:!0,forced:!s("startsWith")},{startsWith:function(e){var t=String(a(this));o(e);var n=i(l(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return u?u.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(6),i=n(101).trim;r({target:"String",proto:!0,forced:n(131)("trim")},{trim:function(){return i(this)}})},function(e,t,n){"use strict";var r=n(6),i=n(101).end,o=n(131)("trimEnd"),a=o?function(){return i(this)}:"".trimEnd;r({target:"String",proto:!0,forced:o},{trimEnd:a,trimRight:a})},function(e,t,n){"use strict";var r=n(6),i=n(101).start,o=n(131)("trimStart"),a=o?function(){return i(this)}:"".trimStart;r({target:"String",proto:!0,forced:o},{trimStart:a,trimLeft:a})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("anchor")},{anchor:function(e){return i(this,"a","name",e)}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("big")},{big:function(){return i(this,"big","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("blink")},{blink:function(){return i(this,"blink","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("bold")},{bold:function(){return i(this,"b","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("fixed")},{fixed:function(){return i(this,"tt","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("fontcolor")},{fontcolor:function(e){return i(this,"font","color",e)}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("fontsize")},{fontsize:function(e){return i(this,"font","size",e)}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("italics")},{italics:function(){return i(this,"i","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("link")},{link:function(e){return i(this,"a","href",e)}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("small")},{small:function(){return i(this,"small","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("strike")},{strike:function(){return i(this,"strike","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("sub")},{sub:function(){return i(this,"sub","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("sup")},{sup:function(){return i(this,"sup","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(17),o=n(66),a=n(89),s=n(64),u=n(27),l=n(61),c=n(53),f=n(33),h=n(25),d=n(38),p=d.set,y=d.getterFor("AggregateError"),m=function(e,t){var n=this;if(!(n instanceof m))return new m(e,t);a&&(n=a(new Error(t),o(n)));var r=[];return c(e,r.push,r),i?p(n,{errors:r,type:"AggregateError"}):n.errors=r,void 0!==t&&f(n,"message",String(t)),n};m.prototype=s(Error.prototype,{constructor:l(5,m),message:l(5,""),name:l(5,"AggregateError"),toString:l(5,(function(){var e=h(this).name;e=void 0===e?"AggregateError":String(e);var t=this.message;return e+": "+(t=void 0===t?"":String(t))}))}),i&&u.f(m.prototype,"errors",{get:function(){return y(this).errors},configurable:!0}),r({global:!0},{AggregateError:m})},function(e,t,n){"use strict";var r=n(17),i=n(42),o=n(20),a=n(15),s=n(27).f;r&&!("lastIndex"in[])&&(s(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=o(this),t=a(e.length);return 0==t?0:t-1}}),i("lastIndex"))},function(e,t,n){"use strict";var r=n(17),i=n(42),o=n(20),a=n(15),s=n(27).f;r&&!("lastItem"in[])&&(s(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=o(this),t=a(e.length);return 0==t?void 0:e[t-1]},set:function(e){var t=o(this),n=a(t.length);return t[0==n?0:n-1]=e}}),i("lastItem"))},function(e,t,n){n(343)},function(e,t,n){"use strict";var r=n(6),i=n(37),o=n(80),a=n(95),s=n(53);r({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=o.f(t),r=n.resolve,u=n.reject,l=a((function(){var n=i(t.resolve),o=[],a=0,u=1;s(e,(function(e){var i=a++,s=!1;o.push(void 0),u++,n.call(t,e).then((function(e){s||(s=!0,o[i]={status:"fulfilled",value:e},--u||r(o))}),(function(e){s||(s=!0,o[i]={status:"rejected",reason:e},--u||r(o))}))})),--u||r(o)}));return l.error&&u(l.value),n.promise}})},function(e,t,n){"use strict";var r=n(6),i=n(37),o=n(51),a=n(80),s=n(95),u=n(53);r({target:"Promise",stat:!0},{any:function(e){var t=this,n=a.f(t),r=n.resolve,l=n.reject,c=s((function(){var n=i(t.resolve),a=[],s=0,c=1,f=!1;u(e,(function(e){var i=s++,u=!1;a.push(void 0),c++,n.call(t,e).then((function(e){u||f||(f=!0,r(e))}),(function(e){u||f||(u=!0,a[i]=e,--c||l(new(o("AggregateError"))(a,"No one promise resolved")))}))})),--c||l(new(o("AggregateError"))(a,"No one promise resolved"))}));return c.error&&l(c.value),n.promise}})},function(e,t,n){"use strict";var r=n(6),i=n(80),o=n(95);r({target:"Promise",stat:!0},{try:function(e){var t=i.f(this),n=o(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}})},function(e,t,n){"use strict";var r=n(6),i=n(81).charAt;r({target:"String",proto:!0},{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(6),i=n(125),o=n(26),a=n(38),s=n(81),u=s.codeAt,l=s.charAt,c=a.set,f=a.getterFor("String Iterator"),h=i((function(e){c(this,{type:"String Iterator",string:e,index:0})}),"String",(function(){var e,t=f(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=l(n,r),t.index+=e.length,{value:{codePoint:u(e,0),position:r},done:!1})}));r({target:"String",proto:!0},{codePoints:function(){return new h(String(o(this)))}})},function(e,t,n){n(349)},function(e,t,n){"use strict";var r=n(6),i=n(125),o=n(26),a=n(15),s=n(37),u=n(25),l=n(121),c=n(97),f=n(127),h=n(33),d=n(11),p=n(16),y=n(94),m=n(99),g=n(38),v=n(46),b=p("matchAll"),_=g.set,w=g.getterFor("RegExp String Iterator"),T=RegExp.prototype,S=T.exec,E="".matchAll,C=!!E&&!d((function(){"a".matchAll(/./)})),k=i((function(e,t,n,r){_(this,{type:"RegExp String Iterator",regexp:e,string:t,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var e=w(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=function(e,t){var n,r=e.exec;if("function"==typeof r){if("object"!=typeof(n=r.call(e,t)))throw TypeError("Incorrect exec result");return n}return S.call(e,t)}(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""==String(r[0])&&(t.lastIndex=m(n,a(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),x=function(e){var t,n,r,i,o,s,l=u(this),c=String(e);return t=y(l,RegExp),void 0===(n=l.flags)&&l instanceof RegExp&&!("flags"in T)&&(n=f.call(l)),r=void 0===n?"":String(n),i=new t(t===RegExp?l.source:l,r),o=!!~r.indexOf("g"),s=!!~r.indexOf("u"),i.lastIndex=a(l.lastIndex),new k(i,c,o,s)};r({target:"String",proto:!0,forced:C},{matchAll:function(e){var t,n,r,i=o(this);if(null!=e){if(c(e)&&!~String(o("flags"in T?e.flags:f.call(e))).indexOf("g"))throw TypeError("`.matchAll` does not allow non-global regexes");if(C)return E.apply(i,arguments);if(void 0===(n=e[b])&&v&&"RegExp"==l(e)&&(n=x),null!=n)return s(n).call(e,i)}else if(C)return E.apply(i,arguments);return t=String(i),r=new RegExp(e,"g"),v?x.call(r,t):r[b](t)}}),v||b in T||h(T,b,x)},function(e,t,n){"use strict";var r=n(6),i=n(26),o=n(97),a=n(127),s=n(16),u=n(46),l=s("replace"),c=RegExp.prototype;r({target:"String",proto:!0},{replaceAll:function e(t,n){var r,s,f,h,d,p,y,m=i(this);if(null!=t){if((r=o(t))&&!~String(i("flags"in c?t.flags:a.call(t))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(void 0!==(s=t[l]))return s.call(t,m,n);if(u&&r)return String(m).replace(t,n)}if(f=String(m),""===(h=String(t)))return e.call(f,/(?:)/g,n);if(d=f.split(h),"function"!=typeof n)return d.join(String(n));for(p=d[0],y=1;y<d.length;y++)p+=String(n(h,y-1,f)),p+=d[y];return p}})},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c={};function f(){}function h(){}function d(){}var p={};p[i]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==t&&n.call(m,i)&&(p=m);var g=d.prototype=f.prototype=Object.create(p);function v(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=g.constructor=d,d.constructor=h,h.displayName=s(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},v(b.prototype),b.prototype[o]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(g),s(g,a,"Generator"),g[i]=function(){return this},g.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){},function(e,t,n){"use strict";
46
+ */var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=a(e),l=1;l<arguments.length;l++){for(var c in n=Object(arguments[l]))i.call(n,c)&&(u[c]=n[c]);if(r){s=r(n);for(var f=0;f<s.length;f++)o.call(n,s[f])&&(u[s[f]]=n[s[f]])}}return u}},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){var r=e.prototype;if(Object.create){var i=Object.create(t.prototype);r.__proto__=i}if(!(r instanceof t)){function o(){}o.prototype=t.prototype,n(r,o=new o),e.prototype=r=o}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var i={},o=i.ELEMENT_NODE=1,a=i.ATTRIBUTE_NODE=2,s=i.TEXT_NODE=3,u=i.CDATA_SECTION_NODE=4,l=i.ENTITY_REFERENCE_NODE=5,c=i.ENTITY_NODE=6,f=i.PROCESSING_INSTRUCTION_NODE=7,h=i.COMMENT_NODE=8,d=i.DOCUMENT_NODE=9,p=i.DOCUMENT_TYPE_NODE=10,y=i.DOCUMENT_FRAGMENT_NODE=11,m=i.NOTATION_NODE=12,g={},v={},b=(g.INDEX_SIZE_ERR=(v[1]="Index size error",1),g.DOMSTRING_SIZE_ERR=(v[2]="DOMString size error",2),g.HIERARCHY_REQUEST_ERR=(v[3]="Hierarchy request error",3)),_=(g.WRONG_DOCUMENT_ERR=(v[4]="Wrong document",4),g.INVALID_CHARACTER_ERR=(v[5]="Invalid character",5),g.NO_DATA_ALLOWED_ERR=(v[6]="No data allowed",6),g.NO_MODIFICATION_ALLOWED_ERR=(v[7]="No modification allowed",7),g.NOT_FOUND_ERR=(v[8]="Not found",8)),w=(g.NOT_SUPPORTED_ERR=(v[9]="Not supported",9),g.INUSE_ATTRIBUTE_ERR=(v[10]="Attribute in use",10));g.INVALID_STATE_ERR=(v[11]="Invalid state",11),g.SYNTAX_ERR=(v[12]="Syntax error",12),g.INVALID_MODIFICATION_ERR=(v[13]="Invalid modification",13),g.NAMESPACE_ERR=(v[14]="Invalid namespace",14),g.INVALID_ACCESS_ERR=(v[15]="Invalid access",15);function T(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,v[e]),this.message=v[e],Error.captureStackTrace&&Error.captureStackTrace(this,T);return n.code=e,t&&(this.message=this.message+": "+t),n}function S(){}function E(e,t){this._node=e,this._refresh=t,C(this)}function C(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);te(e,"length",r.length),n(r,e),e._inc=t}}function k(){}function x(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function O(e,t,n,r){if(r?t[x(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&D(i,e,r),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function P(e,t,n){var r=x(t,n);if(!(r>=0))throw T(_,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var o=e.ownerDocument;o&&(D(o,e,n),n.ownerElement=null)}}function R(e){if(this._features={},e)for(var t in e)this._features=e[t]}function A(){}function I(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function L(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(L(e,t))return!0}while(e=e.nextSibling)}function j(){}function D(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function N(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function M(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,N(e.ownerDocument,e),t}function U(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===y){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var a=n?n.previousSibling:e.lastChild;i.previousSibling=a,o.nextSibling=n,a?a.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return N(e.ownerDocument||e,e),t.nodeType==y&&(t.firstChild=t.lastChild=null),t}function B(){this._nsMap={}}function F(){}function V(){}function H(){}function z(){}function q(){}function W(){}function $(){}function G(){}function Y(){}function K(){}function X(){}function Q(){}function J(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return ee(this,n,e,t,a),n.join("")}function Z(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var a=n[o];if(a.prefix==r)return a.namespace!=i}return!0}function ee(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case o:i||(i=[]);i.length;var c=e.attributes,m=c.length,g=e.firstChild,v=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",v);for(var b=0;b<m;b++){"xmlns"==(_=c.item(b)).prefix?i.push({prefix:_.localName,namespace:_.value}):"xmlns"==_.nodeName&&i.push({prefix:"",namespace:_.value})}for(b=0;b<m;b++){var _;if(Z(_=c.item(b),0,i)){var w=_.prefix||"",T=_.namespaceURI,S=w?" xmlns:"+w:" xmlns";t.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}ee(_,t,n,r,i)}if(Z(e,0,i)){w=e.prefix||"",T=e.namespaceURI,S=w?" xmlns:"+w:" xmlns";t.push(S,'="',T,'"'),i.push({prefix:w,namespace:T})}if(g||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(v)){if(t.push(">"),n&&/^script$/i.test(v))for(;g;)g.data?t.push(g.data):ee(g,t,n,r,i),g=g.nextSibling;else for(;g;)ee(g,t,n,r,i),g=g.nextSibling;t.push("</",v,">")}else t.push("/>");return;case d:case y:for(g=e.firstChild;g;)ee(g,t,n,r,i),g=g.nextSibling;return;case a:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,I),'"');case s:return t.push(e.data.replace(/[<&]/g,I));case u:return t.push("<![CDATA[",e.data,"]]>");case h:return t.push("\x3c!--",e.data,"--\x3e");case p:var E=e.publicId,C=e.systemId;if(t.push("<!DOCTYPE ",e.name),E)t.push(' PUBLIC "',E),C&&"."!=C&&t.push('" "',C),t.push('">');else if(C&&"."!=C)t.push(' SYSTEM "',C,'">');else{var k=e.internalSubset;k&&t.push(" [",k,"]"),t.push(">")}return;case f:return t.push("<?",e.target," ",e.data,"?>");case l:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){e[t]=n}T.prototype=Error.prototype,n(g,T),S.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ee(this[r],n,e,t);return n.join("")}},E.prototype.item=function(e){return C(this),this[e]},r(E,S),k.prototype={length:0,item:S.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new T(w);var n=this.getNamedItem(e.nodeName);return O(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new T(w);return t=this.getNamedItemNS(e.namespaceURI,e.localName),O(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return P(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return P(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},R.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new j;if(r.implementation=this,r.childNodes=new S,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new W;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},A.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return U(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return M(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,r){var i=new n.constructor;for(var s in n){var u=n[s];"object"!=typeof u&&u!=i[s]&&(i[s]=u)}n.childNodes&&(i.childNodes=new S);switch(i.ownerDocument=t,i.nodeType){case o:var l=n.attributes,c=i.attributes=new k,f=l.length;c._ownerElement=i;for(var h=0;h<f;h++)i.setAttributeNode(e(t,l.item(h),!0));break;case a:r=!0}if(r)for(var d=n.firstChild;d;)i.appendChild(e(t,d,r)),d=d.nextSibling;return i}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==s&&e.nodeType==s?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==a?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(i,A),n(i,A.prototype),j.prototype={nodeName:"#document",nodeType:d,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==y){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==o&&(this.documentElement=e),U(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),M(this,e)},importNode:function(e,t){return function e(t,n,r){var i;switch(n.nodeType){case o:(i=n.cloneNode(!1)).ownerDocument=t;case y:break;case a:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=t,i.parentNode=null,r)for(var s=n.firstChild;s;)i.appendChild(e(t,s,r)),s=s.nextSibling;return i}(this,e,t)},getElementById:function(e){var t=null;return L(this.documentElement,(function(n){if(n.nodeType==o&&n.getAttribute("id")==e)return t=n,!0})),t},createElement:function(e){var t=new B;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new S,(t.attributes=new k)._ownerElement=t,t},createDocumentFragment:function(){var e=new K;return e.ownerDocument=this,e.childNodes=new S,e},createTextNode:function(e){var t=new H;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new z;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new q;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new X;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new F;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Y;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new B,r=t.split(":"),i=n.attributes=new k;return n.childNodes=new S,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new F,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(j,A),B.prototype={nodeType:o,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===y?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);r=e.lastChild}return r=e.lastChild,t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,N(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new E(this,(function(t){var n=[];return L(t,(function(r){r===t||r.nodeType!=o||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new E(this,(function(n){var r=[];return L(n,(function(i){i===n||i.nodeType!==o||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},j.prototype.getElementsByTagName=B.prototype.getElementsByTagName,j.prototype.getElementsByTagNameNS=B.prototype.getElementsByTagNameNS,r(B,A),F.prototype.nodeType=a,r(F,A),V.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(v[b])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(V,A),H.prototype={nodeName:"#text",nodeType:s,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(H,V),z.prototype={nodeName:"#comment",nodeType:h},r(z,V),q.prototype={nodeName:"#cdata-section",nodeType:u},r(q,V),W.prototype.nodeType=p,r(W,A),$.prototype.nodeType=m,r($,A),G.prototype.nodeType=c,r(G,A),Y.prototype.nodeType=l,r(Y,A),K.prototype.nodeName="#document-fragment",K.prototype.nodeType=y,r(K,A),X.prototype.nodeType=f,r(X,A),Q.prototype.serializeToString=function(e,t,n){return J.call(e,t,n)},A.prototype.toString=J;try{if(Object.defineProperty){Object.defineProperty(E.prototype,"length",{get:function(){return C(this),this.$$length}}),Object.defineProperty(A.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case o:case y:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case o:case y:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),te=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DOMImplementation=R,t.XMLSerializer=Q},function(e,t,n){"use strict";e.exports={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21}},function(e,t){e.exports=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])}},function(e,t,n){"use strict";var r,i,o,a,s,u,l,c,f,h,d,p,y,m,g,v,b,_,w,T,S,E,C;n.d(t,"i",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"j",(function(){return a})),n.d(t,"g",(function(){return p})),n.d(t,"e",(function(){return v})),n.d(t,"b",(function(){return T})),n.d(t,"d",(function(){return S})),n.d(t,"h",(function(){return E})),n.d(t,"c",(function(){return C})),function(e){e.Stream="cv_product_stream",e.StreamRaw="cv_product_stream_raw",e.WebPlayerStream="cv_product_webplayer_stream",e.StreamProgress="cv_product_stream_progress",e.Login="cv_product_login",e.LoginSsoRedirect="cv_product_login_sso_redirect",e.LoginFailed="cv_product_login_failed",e.Search="cv_product_search",e.InstantSearch="cv_product_search",e.SearchEmptyResult="cv_product_search_empty_result",e.Filter="cv_product_search_filter",e.SearchLanding="cv_product_search_landing",e.Share="cv_product_share",e.WorkspaceAdd="cv_product_tv_add",e.Rename="cv_product_rename",e.Move="cv_product_move",e.Sort="cv_product_sort",e.Create="cv_product_create",e.Delete="cv_product_delete",e.Associate="cv_product_associate",e.Dissociate="cv_product_dissociate",e.Edit="cv_product_edit",e.Approve="cv_product_approve",e.Reject="cv_product_reject",e.Disable="cv_product_disable",e.Upload="cv_product_upload",e.Download="cv_product_download",e.Navigate="cv_product_navigate",e.Click="cv_product_click",e.Suggest="cv_product_suggest",e.EditAssoc="cv_product_edit_assoc",e.Play="cv_product_play",e.Favourite="cv_product_favourite",e.Follow="cv_product_follow",e.Prefer="cv_product_prefer",e.Print="cv_product_print",e.Copy="cv_product_copy",e.Activate="cv_product_activate",e.VerifyEmail="cv_product_verify_email",e.ChangePassword="cv_product_change_password",e.Export="cv_product_export",e.SendEmail="cv_product_send_email",e.SetAccess="cv_product_set_access",e.AddToLocalCache="cv_product_add_to_lc",e.ResolveWarning="cv_product_resolve_warning",e.DismissWarning="cv_product_dismiss_warning"}(r||(r={})),function(e){e.Folder="folder",e.Video="video",e.Rating="rating",e.Series="series",e.Library="library",e.Resource="resource",e.Tag="tag",e.Subtitle="subtitle",e.Chapter="chapter",e.Restriction="restriction",e.Interactive="interactive",e.PDF="pdf",e.CustomerSetting="customer_setting",e.UserSetting="user_setting",e.StaffRequest="staff_request",e.Logo="logo",e.Pagination="pagination",e.Thumbnail="thumbnail",e.Banner="banner",e.Link="link",e.Playlist="playlist",e.Playlists="playlists",e.Person="person",e.Company="company",e.Classroom="classroom",e.ClassroomGroup="classroom_group",e.Classification="classification",e.ShareLink="share_link",e.Upload="upload",e.SearchResults="search_results",e.Audience="audience",e.User="user",e.Clip="clip",e.UserChannel="user_channel",e.Widget="widget",e.Url="url",e.SocialShare="social_share"}(i||(i={})),function(e){e.TopNav="top_nav",e.LeftNav="left_nav",e.Popup="popup",e.Banner="banner",e.VideoList="video_list",e.VideoListItem="video_list_item",e.VideoListHeader="video_header",e.VideoThumbnail="video_thumbnail",e.ExpandableVideoThumbnail="expandable_video_thumbnail",e.VideoItemPreview="video_item_preview",e.VideoDetails="video_details",e.VideoDetailsHeader="video_details_header",e.EditVideoDetails="edit_video_details",e.EditVideoChapters="edit_video_chapters",e.EditVideoResources="edit_video_resources",e.VideoUpload="video_upload",e.VideoRequest="video_request",e.Pagination="pagination",e.LibraryHeader="library_header",e.LibraryTiles="library_tiles",e.StaffRequestDetails="staff_request_details",e.SubFolderList="sub_folder_list",e.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",e.AwaitingReviewVideoItem="awaiting_review_video_item",e.PastReleasesHeader="past_releases_header",e.MigrationWarnings="migration_warnings",e.PlaylistListHeader="playlist_list_header",e.PlaylistListItem="playlist_list_item",e.SeriesListItem="series_list_item",e.SearchBar="search_bar",e.InstantSearch="instant_search",e.SearchFilters="search_filters",e.FeaturedSeriesSearchResult="featured_series_search_result",e.StaffManager="staff_manager",e.StaffManagerListItem="staff_manager_list_item",e.StudentManager="student_manager",e.StudentManagerListItem="student_manager_list_item",e.ClassroomsList="classrooms_list",e.ClassroomsListItem="classrooms_list_item",e.ClassroomOverview="classroom_overview",e.ClassroomOverviewStudentListItem="classroom_overview_student_list_item",e.ManageClassroomStudents="manage_classroom_students",e.ManageClassroomStudentListItem="manage_classroom_student_list_item",e.ManageClassroomGroups="manage_classroom_groups",e.ManageClassroomGroupListItem="manage_classroom_group_list_item",e.PreviewInteractive="preview_interactive",e.PreviewInteractiveQuestions="preview_interactive_questions",e.EditInteractive="edit_interactive",e.PlaySharedInteractive="play_shared_interactive",e.InteractiveListItem="interactive_list_item",e.DeleteInteractive="delete_interactive",e.PlayPage="play_page",e.Player="player",e.FloatingPlayer="floating_player",e.InteractivePlayer="interactive_player",e.EmbeddedPlayer="embedded_player",e.CreateClipPlayer="create_clip_player",e.PlaySharedClip="play_shared_clip",e.ClipListItem="clip_list_item",e.ContentUpdatesClassificationBanner="content_updates_classification_banner",e.PreferencesSettings="preferences_settings",e.MyUploads="my_uploads",e.SlidingList="sliding_list",e.HeroBannerItem="hero_banner_item",e.SlidingListItem="sliding_list_item",e.ClassificationListItem="classification_list_item",e.ClassificationComingSoon="classification_coming_soon",e.ClassificationHero="classification_hero",e.Dashboard="dashboard",e.ProductBanner="product_banner",e.Settings="settings"}(o||(o={})),function(e){e.Start="start",e.Complete="complete",e.Save="save",e.Discard="discard"}(a||(a={})),function(e){e.PageLoad="page_load"}(s||(s={})),function(e){e.Single="single",e.Bulk="bulk",e.All="all"}(u||(u={})),function(e){e.ActivateUser="activate_user"}(l||(l={})),function(e){e.ProductionYear="production_year",e.Alphabetical="alphabetical"}(c||(c={})),function(e){e.Content="content",e.Quality="quality",e.Duration="duration",e.Reset="reset"}(f||(f={})),function(e){e.Submit="submit",e.ShowAll="show_all",e.Recent="recent",e.SearchIcon="search_icon"}(h||(h={})),function(e){e.Start="start",e.Finish="finish",e.Terminate="terminate",e.Play="play",e.Pause="pause",e.Playback="playback",e.NextChapter="next_chapter",e.PreviousChapter="previous_chapter",e.FullScreenEnter="full_screen_enter",e.FullScreenExit="full_screen_exit"}(d||(d={})),function(e){e.Embedded="embedded"}(p||(p={})),function(e){e.TogglePreview="toggle_preview",e.NavigateHome="navigate_home",e.OpenInStaffView="open_in_staff_view",e.Title="title",e.ToggleHideValidListings="toggle_hide_valid_listings",e.LaunchImmersiveReader="launch_immersive_reader",e.CopyEmbedHtml="copy_embed_html",e.Close="close",e.Open="open",e.Button="button",e.Link="link",e.Tile="tile",e.Thumbnail="thumbnail",e.Cover="cover",e.TallPoster="tall_poster",e.Slide="slide",e.ExternalLink="external_link",e.ViewStudentWorkspace="view_student_workspace"}(y||(y={})),function(e){e.FeatureUserChannelVideo="feature_user_channel_video",e.RemoveFromUserChannelPlaylist="remove_from_user_channel_playlist",e.ShareClip="share_clip",e.ViewOriginalVideo="view_original_video",e.ShareInteractive="share_interactive",e.DeleteInteractiveVideo="delete_interactive_video",e.CopyInteractiveVideo="copy_interactive_video",e.EditInteractiveVideo="edit_interactive_video",e.PrintAsWorksheet="print_as_worksheet",e.PreviewInteractiveVideo="preview_interactive_video",e.ViewResults="view_results",e.MoveToAnotherFolder="move_to_another_folder",e.CreateInteractiveVideo="create_interactive_video",e.ShareVideo="share_video",e.EditVideo="edit_video",e.DownloadVideo="download_video",e.AddToExchange="add_to_exchange",e.AddToUserChannel="add_to_user_channel",e.CreateClip="create_clip",e.FlagVideo="flag_video",e.AddToLibrary="add_to_library",e.AddToWorkspace="add_to_workspace",e.AddToPlaylist="add_to_playlist",e.RemoveFromPlaylist="remove_from_playlist",e.AddCurriculumLink="add_curriculum_link",e.ViewCurriculumLinks="view_curriculum_links",e.OpenInCurator="open_in_curator",e.ManageVideoAccess="manage_video_access",e.Approve="approve",e.AddToLocalCache="add_to_local_cache",e.OpenInLibraryEditor="open_in_library_editor",e.PlayClip="play_clip",e.EditClip="edit_clip",e.DeleteClip="delete_clip",e.EditVideoDetails="edit_video_details",e.DeleteVideo="delete_video"}(m||(m={})),function(e){e.LibraryReview="library_review"}(g||(g={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(v||(v={})),function(e){e.Edit="edit"}(b||(b={})),function(e){e.Image="image",e.User="user",e.Playlist="playlist",e.Link="link",e.Avatar="avatar"}(_||(_={})),function(e){e.On="on",e.Off="off"}(w||(w={})),function(e){e.EntityRemoved="cv_entity_removed",e.ValueUpdated="cv_value_updated"}(T||(T={})),function(e){e.FileSelect="file_select",e.DragDrop="drag_drop"}(S||(S={})),function(e){e.Video="videos",e.Folder="categories",e.Series="series",e.Tags="tags",e.Subjects="subjects"}(E||(E={})),function(e){e[e.V1=1]="V1",e[e.V2=2]="V2"}(C||(C={}))},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){"use strict";n.r(t);var r=n(23);n.d(t,"AppLinkHelper",(function(){return r.a})),n.d(t,"AppLinkUtility",(function(){return r.b}));var i=n(205);n.d(t,"Application",(function(){return i.a}));var o=n(206);n.d(t,"AppRouter",(function(){return o.a}));var a=n(207);n.d(t,"Behavior",(function(){return a.a}));var s=n(105);n.d(t,"Collection",(function(){return s.a}));var u=n(133);n.d(t,"CollectionView",(function(){return u.a})),n.d(t,"ComponentCollection",(function(){return u.a}));var l=n(8);n.d(t,"Error",(function(){return l.a})),n.d(t,"ErrorHelper",(function(){return l.c})),n.d(t,"SilentError",(function(){return l.d}));var c=n(208);n.d(t,"LayoutView",(function(){return c.a}));var f=n(209);n.d(t,"NestedModel",(function(){return f.a}));var h=n(210);n.d(t,"Service",(function(){return h.a}));var d=n(69);n.d(t,"Model",(function(){return d.a}));var p=n(83);n.d(t,"View",(function(){return p.b})),n.d(t,"Component",(function(){return p.a}));var y=n(13);n.d(t,"EventNames",(function(){return y.a}));var m=n(211);n.d(t,"LayoutService",(function(){return m.a}));var g=n(104);n.d(t,"Middleware",(function(){return g.a}));var v=n(38);n.d(t,"LocationUtils",(function(){return v.a}));var b=n(212);n.d(t,"Shell",(function(){return b.a}));var _=n(213);for(var w in _)["AppLinkHelper","AppLinkUtility","Application","AppRouter","Behavior","Collection","CollectionView","ComponentCollection","Error","ErrorHelper","SilentError","LayoutView","NestedModel","Service","Model","View","Component","EventNames","LayoutService","Middleware","LocationUtils","Shell","default"].indexOf(w)<0&&function(e){n.d(t,e,(function(){return _[e]}))}(w)},function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(4),i=n(10),o=n(29),a=n(13),s=n(22),u=n(8);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(e,t)}(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.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t,n){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(f,e);var t,n,o,l=y(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(t=l.call(this,e)).mergeOptions(e,[].concat(c(t.defaultProps),c(t.props||[]))),r.result(g(t),"name")||u.c.throw(new u.b("BaseApplication must define a name")),r.result(g(t),"channelName")||u.c.throw(new u.b("BaseApplication must define a channelName")),t.listenTo(t.getGlobalRadioChannel("popup"),a.a.SHOW_POPUP,t.onShowPopup),t.listenTo(t.getGlobalRadioChannel("alert"),"show:alert",t.onShowAlert),t}return t=f,(n=[{key:"defaultProps",get:function(){return["shell","layoutService"]}},{key:"getGlobalRadioChannel",value:function(e){var t=this.shell.getGlobalRadioChannels()[e.toUpperCase()];return t||u.c.throw(new u.b("Global channel ".concat(t," does not exist"))),i.Radio.channel(t)}},{key:"onLoadLayout",value:function(){if(this.layoutOptions&&this.layoutOptions.name){var e=r.extend({},this.layoutOptions.options||{},{store:this.shell.store});this.layout=this.layoutService.getLayout(r.extend(this.layoutOptions,{options:e})),this.layout||u.c.throw(new u.b("Layout: ".concat(this.layoutOptions.name," does not exist or was not registered"))),this.shell.showView(this.layout),this.triggerMethod("layout:loaded")}}},{key:"onShowPopup",value:function(e){this.layout.getRegion("popup")||u.c.throw(new u.b("Your application layout must define a popup region")),this.layout.showChildView("popup",e)}},{key:"onShowAlert",value:function(e){var t=e.ctor,n=e.collection,r=this.layout.getRegion("alert");r?r.hasView()||this.layout.showChildView("alert",new t({collection:n})):u.c.throw(new u.b("Your application layout must define an alert region"))}},{key:"setDefaultQueryParams",value:function(e){this.defaultQueryParams&&(e=r.extend(this.defaultQueryParams,e)),this.defaultQueryParams=e}},{key:"getAndClearDefaultQueryParams",value:function(){var e=this.defaultQueryParams;return delete this.defaultQueryParams,e||{}}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],d(v(f.prototype),"listenTo",this))}}])&&h(t.prototype,n),o&&h(t,o),f}(o.Application)},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(4),i=n(10),o=n(29),a=n(23),s=n(22),u=n(104),l=n(13),c=n(8),f=n(38),h=n(12);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(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.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t,n){return(g="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=w(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w(e);if(t){var i=w(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=/([A-Z])/g,S=/(^|:)(\w)/gi,E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}(y,e);var t,n,o,d=b(y);function y(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),(t=d.call(this,e)).bindDisposal(),t.processInternalRoutes(),t.processExternalRoutes(),t.processAppLinks(),t}return t=y,(n=[{key:"bindDisposal",value:function(){var e=this;this.listenTo(h.a.SHELL,l.a.ROUTE,(function(t){t.application!==e.channelName&&e.destroyApp()}))}},{key:"addRouteLookup",value:function(e,t){var n=this;this.options.shell.addRouteLookup("".concat(this.channelName,":").concat(e),(function(r,i){return a.a.buildRoute(t,{application:n.channelName,action:e,args:r,params:i})}))}},{key:"processInternalRoutes",value:function(){var e=this;r.each(r.keys(this.appRoutes),(function(t){var n=e.appRoutes[t],i=e.toEventName(n);e.addRouteLookup(i,t),e.listenTo(e.channelName,i,(function(n,i){i&&i.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),e.executeRoute(n,{isAppRoute:!0},(function(){var o=r.extend({},e.controller.getAndClearDefaultQueryParams(),n.params);n.params=o,f.a.UpdateUrl(t,n,i)}))}))}))}},{key:"processExternalRoutes",value:function(){var e=this;this.externalRoutes&&r.each(r.keys(this.externalRoutes),(function(t){var n=e.externalRoutes[t],r=e.toEventName(n);e.addRouteLookup(r,t),e.listenTo(e.channelName,r,(function(e,t){t&&t.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),f.a.PageLoad(a.a.getHref(e))}))}))}},{key:"processAppLinks",value:function(){var e=this;this.appLinks&&r.each(this.appLinks,(function(t){var n=e.toEventName(t);e.listenTo(e.channelName,n,(function(t,n){n&&n.usedHelper||c.c.throw(new c.b("Please use Core.AppLinkHelper.trigger({}) to trigger appLinks.")),e.executeRoute(t,{isAppRoute:!1})}))}))}},{key:"executeRoute",value:function(e,t,n){var o=this;this.validateAppLink(e);var s=this.toMethodName(e.action);a.b.routingStarted();var f=i.Radio.channel(h.a.SHELL);if(this.options.shell.isNavLocked())return f.trigger(l.a.NAV_IS_LOCKED,e),void a.b.routingEnded();var d=new u.a;r.each(this.filters,(function(e){return d.use(e)})),d.go({appLink:e,shell:this.options.shell},(function(){f.trigger(l.a.ROUTE,e,t),o.createApp();var i=o.controller;if(r.isFunction(i[s])||(a.b.routingEnded(),c.c.throw(new c.b("".concat(s," does not exist on the ").concat(r.result(i,"name"),".")))),!1===i.triggerMethod("before:action"))return i.triggerMethod("action:cancelled"),void a.b.routingEnded();i.triggerMethod("load:layout"),i[s].apply(i,[].concat(p(e.args||[]),[e.params||{}])),r.isFunction(n)&&n(),a.b.routingEnded()}))}},{key:"createApp",value:function(){this.controller||(this.controller=new this.options.appConstructor(this.options.appOptions),this.controller.start())}},{key:"destroyApp",value:function(){this.controller&&(this.controller.destroy(),delete this.controller)}},{key:"_addAppRoute",value:function(e,t,n){var i=this;this.route(t,n,(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];var a={application:i.channelName,action:i.toEventName(n),args:t.slice(0,t.length-1),params:f.a.DeserializeQueryParams(t[t.length-1])};i.executeRoute(a,{isAppRoute:!0},(function(){f.a.UpdateQuery(r.extend(i.controller.getAndClearDefaultQueryParams(),a.params))}))}))}},{key:"toEventName",value:function(e){return e.replace(T,":$1").toLowerCase()}},{key:"toMethodName",value:function(e){var t=e.replace(S,(function(e,t,n){return n.toUpperCase()}));return t[0].toLowerCase()+t.slice(1,t.length)}},{key:"validateAppLink",value:function(e){e.application&&e.action||(a.b.routingEnded(),c.c.throw(new c.b("Invalid AppLink")))}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],g(w(y.prototype),"listenTo",this))}}])&&m(t.prototype,n),o&&m(t,o),y}(o.AppRouter)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(29),i=n(22);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,r,o=c(f);function f(){return a(this,f),o.apply(this,arguments)}return t=f,(n=[{key:"listenTo",value:function(){return i.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],u(h(f.prototype),"listenTo",this))}}])&&s(t.prototype,n),r&&s(t,r),f}(r.Behavior)},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(83),i=n(41),o=n(8);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var i=f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(c,e);var t,n,r,a=l(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,r=[{key:"getCacheKey",value:function(e){o.c.throw(new i.a("Must define getCacheKey for ".concat(this.name,".")))}}],(n=[{key:"unmountRegion",value:function(e){this.trigger("unmount:".concat(e))}}])&&s(t.prototype,n),r&&s(t,r),c}(r.b)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(4),i=n(69),o=n(105);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(y,e);var t,n,h,p=f(y);function y(){return s(this,y),p.apply(this,arguments)}return t=y,(n=[{key:"set",value:function(e,t,n){var i,o;if(null===e)return this;for(i in"object"===a(e)?(o=e,n=t):(o={})[e]=t,n||(n={}),o)r.has(this.associations,i)&&(o[i]=this.setAssociation(i,o[i],n));return l(d(y.prototype),"set",this).call(this,o,n)}},{key:"get",value:function(e){var t=e.indexOf(".");if(-1===t)return l(d(y.prototype),"get",this).call(this,e);var n=e.substr(0,t),i=this.attributes[n];if(!i||!r.isFunction(i.get))return l(d(y.prototype),"get",this).call(this,e);var o=e.substr(t+1);return i.get(o)}},{key:"setAssociation",value:function(e,t,n){var a=this.associations[e],s=this.attributes[e];if(!r.isFunction(a))return t;if(n.unset)return s&&delete s.parent,delete this[e],s;if(s)return s instanceof i.a&&s.set(t,n),s instanceof o.a&&s.set(t,n),n.silent||this.trigger("change:".concat(e),this,t,n),s;var u=t instanceof i.a?t:new a(t,{parse:!0});return u.parent=this,this[e]=u,u}},{key:"toJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=l(d(y.prototype),"toJSON",this).apply(this,t);return r.each(this.associations,(function(e,t){r.has(i,t)&&r.isFunction(i[t].toJSON)?i[t]=i[t].toJSON():i[t]=(new e).toJSON()})),i}},{key:"toFlatJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.omit(l(d(y.prototype),"toJSON",this).apply(this,t),r.keys(this.associations))}}])&&u(t.prototype,n),h&&u(t,h),y}(i.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(29),i=n(22),o=n(8);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){return(u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var t,n,r,a=c(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(t=a.call(this,e)).name||o.c.throw(new o.b("Your service must be named.")),t}return t=f,(n=[{key:"listenTo",value:function(){return i.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],u(h(f.prototype),"listenTo",this))}}])&&s(t.prototype,n),r&&s(t,r),f}(r.Object)},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(4),i=n(29),o=n(22),a=n(8);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=d(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(h,e);var t,n,i,s=f(h);function h(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),(t=s.call(this,e)).layouts={},t.requiredRegions=e.requiredRegions,t}return t=h,(n=[{key:"clearLayout",value:function(){this.currentLayout&&(this.currentLayout.destroy(),delete this.currentLayout,delete this.currentLayoutCacheKey)}},{key:"registerLayout",value:function(e,t){return this.checkRequiredRegions(t),this.layouts[e]=t,this}},{key:"getLayout",value:function(e){var t=e.name,n=e.options,r=void 0===n?{}:n;this.layouts[t]||a.c.throw(new a.b("".concat(t," was not registered as a template.")));var i=this.layouts[t].getCacheKey(r);return this.currentLayoutCacheKey===i&&this.currentLayout?(this.currentLayout.triggerMethod("layout:requested",r),this.currentLayout):(this.clearLayout(),this.currentLayoutCacheKey=i,this.currentLayout=new this.layouts[t](r),this.listenToOnce(this.currentLayout,"destroy",this.clearLayout),this.currentLayout)}},{key:"checkRequiredRegions",value:function(e){r.each(this.requiredRegions,(function(t){r.has(r.result(e.prototype,"regions"),t)||a.c.throw(new a.b("Layout: ".concat(e.prototype.name," must define an ").concat(t," region.")))}))}},{key:"listenTo",value:function(){return o.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],l(d(h.prototype),"listenTo",this))}}])&&u(t.prototype,n),i&&u(t,i),h}(i.Object)},function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r=n(4),i=n(10),o=n(29),a=n(23),s=n(22),u=n(12),l=n(8),c=n(13),f=n(38);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d(e,t,n){return(d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _(e,t,n){return t&&b(e.prototype,t),n&&b(e,n),e}var w=function(){function e(t,n){v(this,e),this.application=t,this.options=n||{}}return _(e,[{key:"Application",get:function(){return this.application}},{key:"Options",get:function(){return this.options}}]),e}(),T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(n,e);var t=y(n);function n(){return v(this,n),t.apply(this,arguments)}return _(n,[{key:"initialize",value:function(e){this.mergeOptions(e,["layoutService"]),this.applications=[],this.routeLookup={},this.shellState={navLock:!1,activeRoute:!1,currentAppLink:null},this.errorHandlers=[]}},{key:"bindListeners",value:function(){this.bindRouteLookup(),this.bindNavLockListeners(),this.bindAppLinkListeners(),this.bindErrorHandlers(),this.bindErrorListener()}},{key:"bindNavLockListeners",value:function(){var e=this;this.listenTo(u.a.SHELL,c.a.LOCK_NAV,(function(){return e.shellState.navLock=!0})),this.listenTo(u.a.SHELL,c.a.UNLOCK_NAV,(function(){return e.shellState.navLock=!1}))}},{key:"bindAppLinkListeners",value:function(){var e=this;this.listenTo(u.a.SHELL,c.a.ROUTING_START,(function(){return e.shellState.activeRoute=!0})),this.listenTo(u.a.SHELL,c.a.ROUTING_END,(function(){return e.shellState.activeRoute=!1})),this.listenTo(u.a.SHELL,c.a.ROUTE,(function(t){return e.shellState.currentAppLink=t}));var t=i.Radio.channel(u.a.SHELL);t.reply(c.a.HAS_ACTIVE_ROUTE,r.bind(this.hasActiveRoute,this)),t.reply(c.a.CURRENT_ROUTE,(function(){return e.shellState.currentAppLink}))}},{key:"bindErrorHandlers",value:function(){window.addEventListener("error",(function(){a.b.routingEnded()}))}},{key:"bindErrorListener",value:function(){var e=i.Radio.channel(u.a.SHELL);this.listenTo(e,c.a.ERROR,this.handleError)}},{key:"bindRouteLookup",value:function(){var e=this;i.Radio.channel(u.a.SHELL).reply(c.a.ROUTE_LOOKUP,(function(t,n,r){return!!e.routeLookup[t]&&e.routeLookup[t](n,r)}),this)}},{key:"addRouteLookup",value:function(e,t){this.routeLookup[e]=t}},{key:"registerApplication",value:function(e,t){return this.applications.push(new w(e,t)),this}},{key:"getGlobalRadioChannels",value:function(){return u.a}},{key:"isNavLocked",value:function(){return this.shellState.navLock}},{key:"start",value:function(e){var t=this;e||(e={}),this.runInitializationSteps(this,(function(){t.runStartUpSteps(t,e,(function(){d(g(n.prototype),"start",t).call(t,e)}))}))}},{key:"hasActiveRoute",value:function(){return this.shellState.activeRoute}},{key:"onStart",value:function(){var e=this;r.each(this.applications,(function(t){var n={appConstructor:t.Application,shell:e,appOptions:Object.assign({region:"",shell:e,layoutService:e.layoutService},t.Options)};new t.Application.router(n)})),this.bindListeners(),f.a.StartHistory()}},{key:"addInitializationStep",value:function(e){var t;return this.runInitializationSteps=(t=this.runInitializationSteps,function(n,r){return t(n,(function(){return e(n,r)}))}),this}},{key:"runInitializationSteps",value:function(e,t){t(e)}},{key:"addStartUpStep",value:function(e){var t;return this.runStartUpSteps=(t=this.runStartUpSteps,function(n,r,i){return t(n,r,(function(){return e(n,r,i)}))}),this}},{key:"runStartUpSteps",value:function(e,t,n){n(e,t)}},{key:"registerLayout",value:function(e,t){return this.layoutService.registerLayout(e,t),this}},{key:"registerErrorHandler",value:function(e,t){return e||l.c.throw(new l.b("An error must have a name in order to register a handler for it.")),r.any(this.errorHandlers,(function(t){return t.errorType===e}))&&l.c.throw(new l.b("An error handler for ".concat(e.prototype.name," has already been defined."))),this.errorHandlers.push({errorType:e,handler:t}),this}},{key:"handleError",value:function(e){var t=r.find(this.errorHandlers,(function(t){return e instanceof t.errorType}));t&&t.handler&&t.handler(e)}},{key:"registerStore",value:function(e){this.store=e}},{key:"listenTo",value:function(){return s.a.call(this,arguments.length<=0?void 0:arguments[0],arguments.length<=1?void 0:arguments[1],arguments.length<=2?void 0:arguments[2],d(g(n.prototype),"listenTo",this))}}]),n}(o.Application)},function(e,t){},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(t,n,r,i,o,a){var s=i||"<<anonymous>>",u=a||r;if(null==n[r])return t?new Error("Required "+o+" `"+u+"` was not specified in `"+s+"`."):null;for(var l=arguments.length,c=Array(l>6?l-6:0),f=6;f<l;f++)c[f-6]=arguments[f];return e.apply(void 0,[n,r,s,o,u].concat(c))}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n},e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=c(n(68)),i=c(n(134)),o=c(n(67)),a=c(n(216)),s=c(n(1)),u=c(n(28)),l=c(n(431));function c(e){return e&&e.__esModule?e:{default:e}}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var h={container:r.default.oneOfType([i.default,r.default.func]),onContainerResolved:r.default.func},d=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];if(t=e.call.apply(e,[this].concat(r))||this,!o.default)return f(t);var a=t.props.container;return"function"==typeof a&&(a=a()),a&&!u.default.findDOMNode(a)?f(t):(t.setContainer(a),t)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.UNSAFE_componentWillReceiveProps=function(e){e.container!==this.props.container&&this.setContainer(e.container)},i.componentDidMount=function(){this._container?this.props.onContainerResolved&&this.props.onContainerResolved():(this.setContainer(this.props.container),this.forceUpdate(this.props.onContainerResolved))},i.componentWillUnmount=function(){this._container=null},i.setContainer=function(e){this._container=(0,l.default)(e,(0,a.default)().body)},i.render=function(){return this._container?this.props.children(this._container):null},r}(s.default.Component);d.propTypes=h;var p=d;t.default=p,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e){return e&&e.ownerDocument||document},e.exports=t.default},function(e,t,n){"use strict";var r=Array.prototype.slice,i=n(218),o=Object.keys,a=o?function(e){return o(e)}:n(437),s=Object.keys;a.shim=function(){Object.keys?function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2)||(Object.keys=function(e){return i(e)?s(r.call(e)):s(e)}):Object.keys=a;return Object.keys||a},e.exports=a},function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){"use strict";var r=n(220),i=n(136),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i(n):n}},function(e,t,n){"use strict";var r=SyntaxError,i=Function,o=TypeError,a=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(e){s=null}var u=function(){throw new o},l=s?function(){try{return u}catch(e){try{return s(arguments,"callee").get}catch(e){return u}}}():u,c=n(221)(),f=Object.getPrototypeOf||function(e){return e.__proto__},h={},d="undefined"==typeof Uint8Array?void 0:f(Uint8Array),p={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":c?f([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c?f(f([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c?f((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c?f((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c?f(""[Symbol.iterator]()):void 0,"%Symbol%":c?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":l,"%TypedArray%":d,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},m=n(135),g=n(441),v=m.call(Function.call,Array.prototype.concat),b=m.call(Function.apply,Array.prototype.splice),_=m.call(Function.call,String.prototype.replace),w=m.call(Function.call,String.prototype.slice),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,E=function(e){var t=w(e,0,1),n=w(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return _(e,T,(function(e,t,n,r){i[i.length]=n?_(r,S,"$1"):t||e})),i},C=function(e,t){var n,i=e;if(g(y,i)&&(i="%"+(n=y[i])[0]+"%"),g(p,i)){var s=p[i];if(s===h&&(s=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(n=f(i.prototype))}return p[t]=n,n}(i)),void 0===s&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');var n=E(e),i=n.length>0?n[0]:"",a=C("%"+i+"%",t),u=a.name,l=a.value,c=!1,f=a.alias;f&&(i=f[0],b(n,v([0,1],f)));for(var h=1,d=!0;h<n.length;h+=1){var y=n[h],m=w(y,0,1),_=w(y,-1);if(('"'===m||"'"===m||"`"===m||'"'===_||"'"===_||"`"===_)&&m!==_)throw new r("property names with quotes must have matching quotes");if("constructor"!==y&&d||(c=!0),g(p,u="%"+(i+="."+y)+"%"))l=p[u];else if(null!=l){if(!(y in l)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(s&&h+1>=n.length){var T=s(l,y);l=(d=!!T)&&"get"in T&&!("originalValue"in T.get)?T.get:l[y]}else d=g(l,y),l=l[y];d&&!c&&(p[u]=l)}}return l}},function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(439);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},function(e,t,n){"use strict";var r=function(e){return e!=e};e.exports=function(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!r(e)||!r(t))}},function(e,t,n){"use strict";var r=n(222);e.exports=function(){return"function"==typeof Object.is?Object.is:r}},function(e,t,n){"use strict";var r=Object,i=TypeError;e.exports=function(){if(null!=this&&this!==r(this))throw new i("RegExp.prototype.flags getter called on non-object");var e="";return this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.sticky&&(e+="y"),e}},function(e,t,n){"use strict";var r=n(224),i=n(82).supportsDescriptors,o=Object.getOwnPropertyDescriptor,a=TypeError;e.exports=function(){if(!i)throw new a("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");if("gim"===/a/gim.flags){var e=o(RegExp.prototype,"flags");if(e&&"function"==typeof e.get&&"boolean"==typeof/a/.dotAll)return e.get}return r}},function(e,t,n){"use strict";var r=n(43);t.__esModule=!0,t.default=t.animationEnd=t.animationDelay=t.animationTiming=t.animationDuration=t.animationName=t.transitionEnd=t.transitionDuration=t.transitionDelay=t.transitionTiming=t.transitionProperty=t.transform=void 0;var i,o,a,s,u,l,c,f,h,d,p,y=r(n(67)),m="transform";if(t.transform=m,t.animationEnd=a,t.transitionEnd=o,t.transitionDelay=c,t.transitionTiming=l,t.transitionDuration=u,t.transitionProperty=s,t.animationDelay=p,t.animationTiming=d,t.animationDuration=h,t.animationName=f,y.default){var g=function(){for(var e,t,n=document.createElement("div").style,r={O:function(e){return"o"+e.toLowerCase()},Moz:function(e){return e.toLowerCase()},Webkit:function(e){return"webkit"+e},ms:function(e){return"MS"+e}},i=Object.keys(r),o="",a=0;a<i.length;a++){var s=i[a];if(s+"TransitionProperty"in n){o="-"+s.toLowerCase(),e=r[s]("TransitionEnd"),t=r[s]("AnimationEnd");break}}!e&&"transitionProperty"in n&&(e="transitionend");!t&&"animationName"in n&&(t="animationend");return n=null,{animationEnd:t,transitionEnd:e,prefix:o}}();i=g.prefix,t.transitionEnd=o=g.transitionEnd,t.animationEnd=a=g.animationEnd,t.transform=m=i+"-"+m,t.transitionProperty=s=i+"-transition-property",t.transitionDuration=u=i+"-transition-duration",t.transitionDelay=c=i+"-transition-delay",t.transitionTiming=l=i+"-transition-timing-function",t.animationName=f=i+"-animation-name",t.animationDuration=h=i+"-animation-duration",t.animationTiming=d=i+"-animation-delay",t.animationDelay=p=i+"-animation-timing-function"}var v={transform:m,end:o,property:s,timing:l,delay:c,duration:u};t.default=v},function(e,t,n){"use strict";var r=n(43);t.__esModule=!0,t.default=function(e){return(0,i.default)(e.replace(o,"ms-"))};var i=r(n(452)),o=/^-ms-/;e.exports=t.default},function(e,t){e.exports=function(e,t){var n,r=null;try{n=JSON.parse(e,t)}catch(e){r=e}return[r,n]}},function(e,t,n){var r=n(132),i=n(363);function o(t,n,a){return i()?(e.exports=o=Reflect.construct,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=o=function(e,t,n){var i=[null];i.push.apply(i,t);var o=new(Function.bind.apply(e,i));return n&&r(o,n.prototype),o},e.exports.default=e.exports,e.exports.__esModule=!0),o.apply(null,arguments)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(132);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function a(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function s(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function u(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new l,o=n.domBuilder||new i,s=n.errorHandler,u=n.locator,c=n.xmlns||{},f={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},o=e instanceof Function;function s(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+a(n))}||function(){}}return n=n||{},s("warning"),s("error"),s("fatalError"),r}(s,o,u),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(f.nbsp=" ",f.copy="©",c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,c,f):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new c).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var l=0;l<s;l++){e=r.getURI(l);var c=r.getValue(l),f=(n=r.getQName(l),i.createAttributeNS(e,n));this.locator&&o(r.getLocator(l),f),f.value=f.nodeValue=c,a.setAttributeNode(f)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),u(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=s.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=s.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),u(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),u(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,a(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,a(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,a(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var l=n(369).XMLReader,c=t.DOMImplementation=n(187).DOMImplementation;t.XMLSerializer=n(187).XMLSerializer,t.DOMParser=r},function(e,t){var n=Math.pow(2,32);e.exports=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},i=12;0===r.version?(r.earliestPresentationTime=t.getUint32(i),r.firstOffset=t.getUint32(i+4),i+=8):(r.earliestPresentationTime=t.getUint32(i)*n+t.getUint32(i+4),r.firstOffset=t.getUint32(i+8)*n+t.getUint32(i+12),i+=16),i+=2;var o=t.getUint16(i);for(i+=2;o>0;i+=12,o--)r.references.push({referenceType:(128&e[i])>>>7,referencedSize:2147483647&t.getUint32(i),subsegmentDuration:t.getUint32(i+4),startsWithSap:!!(128&e[i+8]),sapType:(112&e[i+8])>>>4,sapDeltaTime:268435455&t.getUint32(i+8)});return r}},function(e,t,n){"use strict";var r=n(188),i=n(370).handleRollover,o={};o.ts=n(372),o.aac=n(373);var a=n(59).ONE_SECOND_IN_TS,s=function(e,t,n){for(var r,i,a,s,u=0,l=188,c=!1;l<=e.byteLength;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u++,l++;else{switch(r=e.subarray(u,l),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),c=!0)}if(c)break;u+=188,l+=188}for(u=(l=e.byteLength)-188,c=!1;u>=0;)if(71!==e[u]||71!==e[l]&&l!==e.byteLength)u--,l--;else{switch(r=e.subarray(u,l),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"audio"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="audio",n.audio.push(s),c=!0)}if(c)break;u-=188,l-=188}},u=function(e,t,n){for(var r,i,a,s,u,l,c,f=0,h=188,d=!1,p={data:[],size:0};h<e.byteLength;)if(71!==e[f]||71!==e[h])f++,h++;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":if(i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&(a&&!d&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0),!n.firstKeyFrame)){if(a&&0!==p.size){for(u=new Uint8Array(p.size),l=0;p.data.length;)c=p.data.shift(),u.set(c,l),l+=c.byteLength;if(o.ts.videoPacketContainsKeyFrame(u)){var y=o.ts.parsePesTime(u);y?(n.firstKeyFrame=y,n.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(r),p.size+=r.byteLength}}if(d&&n.firstKeyFrame)break;f+=188,h+=188}for(f=(h=e.byteLength)-188,d=!1;f>=0;)if(71!==e[f]||71!==e[h])f--,h--;else{switch(r=e.subarray(f,h),o.ts.parseType(r,t.pid)){case"pes":i=o.ts.parsePesType(r,t.table),a=o.ts.parsePayloadUnitStartIndicator(r),"video"===i&&a&&(s=o.ts.parsePesTime(r))&&(s.type="video",n.video.push(s),d=!0)}if(d)break;f-=188,h-=188}},l=function(e){var t={pid:null,table:null},n={};for(var i in function(e,t){for(var n,r=0,i=188;i<e.byteLength;)if(71!==e[r]||71!==e[i])r++,i++;else{switch(n=e.subarray(r,i),o.ts.parseType(n,t.pid)){case"pat":t.pid||(t.pid=o.ts.parsePat(n));break;case"pmt":t.table||(t.table=o.ts.parsePmt(n))}if(t.pid&&t.table)return;r+=188,i+=188}}(e,t),t.table){if(t.table.hasOwnProperty(i))switch(t.table[i]){case r.H264_STREAM_TYPE:n.video=[],u(e,t,n),0===n.video.length&&delete n.video;break;case r.ADTS_STREAM_TYPE:n.audio=[],s(e,t,n),0===n.audio.length&&delete n.audio}}return n};e.exports={inspect:function(e,t){var n;return(n=o.aac.isLikelyAacData(e)?function(e){for(var t,n=!1,r=0,i=null,s=null,u=0,l=0;e.length-l>=3;){switch(o.aac.parseType(e,l)){case"timed-metadata":if(e.length-l<10){n=!0;break}if((u=o.aac.parseId3TagSize(e,l))>e.length){n=!0;break}null===s&&(t=e.subarray(l,l+u),s=o.aac.parseAacTimestamp(t)),l+=u;break;case"audio":if(e.length-l<7){n=!0;break}if((u=o.aac.parseAdtsSize(e,l))>e.length){n=!0;break}null===i&&(t=e.subarray(l,l+u),i=o.aac.parseSampleRate(t)),r++,l+=u;break;default:l++}if(n)return null}if(null===i||null===s)return null;var c=a/i;return{audio:[{type:"audio",dts:s,pts:s},{type:"audio",dts:s+1024*r*c,pts:s+1024*r*c}]}}(e):l(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n=t;void 0===n&&(n=e.audio[0].dts),e.audio.forEach((function(e){e.dts=i(e.dts,n),e.pts=i(e.pts,n),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a}))}if(e.video&&e.video.length){var r=t;if(void 0===r&&(r=e.video[0].dts),e.video.forEach((function(e){e.dts=i(e.dts,r),e.pts=i(e.pts,r),e.dtsTime=e.dts/a,e.ptsTime=e.pts/a})),e.firstKeyFrame){var o=e.firstKeyFrame;o.dts=i(o.dts,r),o.pts=i(o.pts,r),o.dtsTime=o.dts/a,o.ptsTime=o.dts/a}}}(n,t),n):null},parseAudioPes_:s}},function(e){e.exports=JSON.parse('{"a":"0.0.4-rc.3"}')},function(e,t,n){(function(t){var n=/^\[object .+?Constructor\]$/,r="object"==typeof t&&t&&t.Object===Object&&t,i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();var a,s=Array.prototype,u=Function.prototype,l=Object.prototype,c=o["__core-js_shared__"],f=(a=/[^.]+$/.exec(c&&c.keys&&c.keys.IE_PROTO||""))?"Symbol(src)_1."+a:"",h=u.toString,d=l.hasOwnProperty,p=l.toString,y=RegExp("^"+h.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=s.splice,g=C(o,"Map"),v=C(Object,"create");function b(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function T(e,t){for(var n,r,i=e.length;i--;)if((n=e[i][0])===(r=t)||n!=n&&r!=r)return i;return-1}function S(e){return!(!x(e)||(t=e,f&&f in t))&&(function(e){var t=x(e)?p.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?y:n).test(function(e){if(null!=e){try{return h.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e));var t}function E(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function C(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return S(n)?n:void 0}function k(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a),a};return n.cache=new(k.Cache||w),n}function x(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}b.prototype.clear=function(){this.__data__=v?v(null):{}},b.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},b.prototype.get=function(e){var t=this.__data__;if(v){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return d.call(t,e)?t[e]:void 0},b.prototype.has=function(e){var t=this.__data__;return v?void 0!==t[e]:d.call(t,e)},b.prototype.set=function(e,t){return this.__data__[e]=v&&void 0===t?"__lodash_hash_undefined__":t,this},_.prototype.clear=function(){this.__data__=[]},_.prototype.delete=function(e){var t=this.__data__,n=T(t,e);return!(n<0)&&(n==t.length-1?t.pop():m.call(t,n,1),!0)},_.prototype.get=function(e){var t=this.__data__,n=T(t,e);return n<0?void 0:t[n][1]},_.prototype.has=function(e){return T(this.__data__,e)>-1},_.prototype.set=function(e,t){var n=this.__data__,r=T(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},w.prototype.clear=function(){this.__data__={hash:new b,map:new(g||_),string:new b}},w.prototype.delete=function(e){return E(this,e).delete(e)},w.prototype.get=function(e){return E(this,e).get(e)},w.prototype.has=function(e){return E(this,e).has(e)},w.prototype.set=function(e,t){return E(this,e).set(e,t),this},k.Cache=w,e.exports=k}).call(this,n(30))},function(e,t,n){"use strict";(function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];e.call(t,i[1],i[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,i=void 0!==e&&e.Math===Math?e:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),o="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(i):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],s="undefined"!=typeof MutationObserver,u=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,i=0;function a(){n&&(n=!1,e()),r&&u()}function s(){o(a)}function u(){var e=Date.now();if(n){if(e-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,t);i=e}return u}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),l=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];Object.defineProperty(e,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return e},c=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||i},f=g(0,0,0,0);function h(e){return parseFloat(e)||0}function d(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){return t+h(e["border-"+n+"-width"])}),0)}function p(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return f;var r=c(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=e["padding-"+i];t[i]=h(o)}return t}(r),o=i.left+i.right,a=i.top+i.bottom,s=h(r.width),u=h(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==t&&(s-=d(r,"left","right")+o),Math.round(u+a)!==n&&(u-=d(r,"top","bottom")+a)),!function(e){return e===c(e).document.documentElement}(e)){var l=Math.round(s+o)-t,p=Math.round(u+a)-n;1!==Math.abs(l)&&(s-=l),1!==Math.abs(p)&&(u-=p)}return g(i.left,i.top,s,u)}var y="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof c(e).SVGGraphicsElement}:function(e){return e instanceof c(e).SVGElement&&"function"==typeof e.getBBox};function m(e){return r?y(e)?function(e){var t=e.getBBox();return g(0,0,t.width,t.height)}(e):p(e):f}function g(e,t,n,r){return{x:e,y:t,width:n,height:r}}var v=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=g(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=m(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),b=function(e,t){var n,r,i,o,a,s,u,c=(r=(n=t).x,i=n.y,o=n.width,a=n.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,u=Object.create(s.prototype),l(u,{x:r,y:i,width:o,height:a,top:i,right:r+o,bottom:a+i,left:r}),u);l(this,{target:e,contentRect:c})},_=function(){function e(e,t,r){if(this.activeObservations_=[],this.observations_=new n,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=r}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new v(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof c(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new b(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),w="undefined"!=typeof WeakMap?new WeakMap:new n,T=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=u.getInstance(),r=new _(t,n,this);w.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){T.prototype[e]=function(){var t;return(t=w.get(this))[e].apply(t,arguments)}}));var S=void 0!==i.ResizeObserver?i.ResizeObserver:T;t.a=S}).call(this,n(30))},function(e,t,n){e.exports=function(){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)},t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function n(e,t,n,r){var i,o,a,s=t||[0],u=(n=n||0)>>>3,l=-1===r?3:0;for(i=0;i<e.length;i+=1)o=(a=i+u)>>>2,s.length<=o&&s.push(0),s[o]|=e[i]<<8*(l+r*(a%4));return{value:s,binLen:8*e.length+n}}function r(e,r,i){switch(r){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(e){case"HEX":return function(e,t,n){return function(e,t,n,r){var i,o,a,s;if(0!=e.length%2)throw new Error("String of HEX type must be in byte increments");var u=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(i=0;i<e.length;i+=2){if(o=parseInt(e.substr(i,2),16),isNaN(o))throw new Error("String of HEX type contains invalid characters");for(a=(s=(i>>>1)+l)>>>2;u.length<=a;)u.push(0);u[a]|=o<<8*(c+r*(s%4))}return{value:u,binLen:4*e.length+n}}(e,t,n,i)};case"TEXT":return function(e,t,n){return function(e,t,n,r,i){var o,a,s,u,l,c,f,h,d=0,p=n||[0],y=(r=r||0)>>>3;if("UTF8"===t)for(f=-1===i?3:0,s=0;s<e.length;s+=1)for(a=[],128>(o=e.charCodeAt(s))?a.push(o):2048>o?(a.push(192|o>>>6),a.push(128|63&o)):55296>o||57344<=o?a.push(224|o>>>12,128|o>>>6&63,128|63&o):(s+=1,o=65536+((1023&o)<<10|1023&e.charCodeAt(s)),a.push(240|o>>>18,128|o>>>12&63,128|o>>>6&63,128|63&o)),u=0;u<a.length;u+=1){for(l=(c=d+y)>>>2;p.length<=l;)p.push(0);p[l]|=a[u]<<8*(f+i*(c%4)),d+=1}else for(f=-1===i?2:0,h="UTF16LE"===t&&1!==i||"UTF16LE"!==t&&1===i,s=0;s<e.length;s+=1){for(o=e.charCodeAt(s),!0===h&&(o=(u=255&o)<<8|o>>>8),l=(c=d+y)>>>2;p.length<=l;)p.push(0);p[l]|=o<<8*(f+i*(c%4)),d+=2}return{value:p,binLen:8*d+r}}(e,r,t,n,i)};case"B64":return function(e,n,r){return function(e,n,r,i){var o,a,s,u,l,c,f=0,h=n||[0],d=(r=r||0)>>>3,p=-1===i?3:0,y=e.indexOf("=");if(-1===e.search(/^[a-zA-Z0-9=+/]+$/))throw new Error("Invalid character in base-64 string");if(e=e.replace(/=/g,""),-1!==y&&y<e.length)throw new Error("Invalid '=' found in base-64 string");for(o=0;o<e.length;o+=4){for(u=e.substr(o,4),s=0,a=0;a<u.length;a+=1)s|=t.indexOf(u.charAt(a))<<18-6*a;for(a=0;a<u.length-1;a+=1){for(l=(c=f+d)>>>2;h.length<=l;)h.push(0);h[l]|=(s>>>16-8*a&255)<<8*(p+i*(c%4)),f+=1}}return{value:h,binLen:8*f+r}}(e,n,r,i)};case"BYTES":return function(e,t,n){return function(e,t,n,r){var i,o,a,s,u=t||[0],l=(n=n||0)>>>3,c=-1===r?3:0;for(o=0;o<e.length;o+=1)i=e.charCodeAt(o),a=(s=o+l)>>>2,u.length<=a&&u.push(0),u[a]|=i<<8*(c+r*(s%4));return{value:u,binLen:8*e.length+n}}(e,t,n,i)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e,t,r){return function(e,t,r,i){return n(new Uint8Array(e),t,r,i)}(e,t,r,i)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e,t,r){return n(e,t,r,i)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function i(e,n,r,i){switch(e){case"HEX":return function(e){return function(e,t,n,r){var i,o,a="",s=t/8,u=-1===n?3:0;for(i=0;i<s;i+=1)o=e[i>>>2]>>>8*(u+n*(i%4)),a+="0123456789abcdef".charAt(o>>>4&15)+"0123456789abcdef".charAt(15&o);return r.outputUpper?a.toUpperCase():a}(e,n,r,i)};case"B64":return function(e){return function(e,n,r,i){var o,a,s,u,l,c="",f=n/8,h=-1===r?3:0;for(o=0;o<f;o+=3)for(u=o+1<f?e[o+1>>>2]:0,l=o+2<f?e[o+2>>>2]:0,s=(e[o>>>2]>>>8*(h+r*(o%4))&255)<<16|(u>>>8*(h+r*((o+1)%4))&255)<<8|l>>>8*(h+r*((o+2)%4))&255,a=0;a<4;a+=1)c+=8*o+6*a<=n?t.charAt(s>>>6*(3-a)&63):i.b64Pad;return c}(e,n,r,i)};case"BYTES":return function(e){return function(e,t,n){var r,i,o="",a=t/8,s=-1===n?3:0;for(r=0;r<a;r+=1)i=e[r>>>2]>>>8*(s+n*(r%4))&255,o+=String.fromCharCode(i);return o}(e,n,r)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch(e){throw new Error("ARRAYBUFFER not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=new ArrayBuffer(i),a=new Uint8Array(o),s=-1===n?3:0;for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(s+n*(r%4))&255;return o}(e,n,r)};case"UINT8ARRAY":try{new Uint8Array(0)}catch(e){throw new Error("UINT8ARRAY not supported by this environment")}return function(e){return function(e,t,n){var r,i=t/8,o=-1===n?3:0,a=new Uint8Array(i);for(r=0;r<i;r+=1)a[r]=e[r>>>2]>>>8*(o+n*(r%4))&255;return a}(e,n,r)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function o(e){var t={outputUpper:!1,b64Pad:"=",outputLen:-1},n=e||{},r="Output length must be a multiple of 8";if(t.outputUpper=n.outputUpper||!1,n.b64Pad&&(t.b64Pad=n.b64Pad),n.outputLen){if(n.outputLen%8!=0)throw new Error(r);t.outputLen=n.outputLen}else if(n.shakeLen){if(n.shakeLen%8!=0)throw new Error(r);t.outputLen=n.shakeLen}if("boolean"!=typeof t.outputUpper)throw new Error("Invalid outputUpper formatting option");if("string"!=typeof t.b64Pad)throw new Error("Invalid b64Pad formatting option");return t}function a(e,t){return e<<t|e>>>32-t}function s(e,t,n){return e^t^n}function u(e,t,n){return e&t^e&n^t&n}function l(e,t){var n=(65535&e)+(65535&t);return(65535&(e>>>16)+(t>>>16)+(n>>>16))<<16|65535&n}function c(e,t,n,r,i){var o=(65535&e)+(65535&t)+(65535&n)+(65535&r)+(65535&i);return(65535&(e>>>16)+(t>>>16)+(n>>>16)+(r>>>16)+(i>>>16)+(o>>>16))<<16|65535&o}function f(e){return[1732584193,4023233417,2562383102,271733878,3285377520]}function h(e,t){var n,r,i,o,f,h,d,p,y=[];for(n=t[0],r=t[1],i=t[2],o=t[3],f=t[4],d=0;d<80;d+=1)y[d]=d<16?e[d]:a(y[d-3]^y[d-8]^y[d-14]^y[d-16],1),h=d<20?c(a(n,5),(p=r)&i^~p&o,f,1518500249,y[d]):d<40?c(a(n,5),s(r,i,o),f,1859775393,y[d]):d<60?c(a(n,5),u(r,i,o),f,2400959708,y[d]):c(a(n,5),s(r,i,o),f,3395469782,y[d]),f=o,o=i,i=a(r,30),r=n,n=h;return t[0]=l(n,t[0]),t[1]=l(r,t[1]),t[2]=l(i,t[2]),t[3]=l(o,t[3]),t[4]=l(f,t[4]),t}function d(e,t,n,r){for(var i,o=15+(t+65>>>9<<4),a=t+n;e.length<=o;)e.push(0);for(e[t>>>5]|=128<<24-t%32,e[o]=4294967295&a,e[o-1]=a/4294967296|0,i=0;i<e.length;i+=16)r=h(e.slice(i,i+16),r);return r}return function(t){function n(e,n,i){var o=this;if("SHA-1"!==e)throw new Error("Chosen SHA variant is not supported");var a=i||{};return(o=t.call(this,e,n,i)||this).t=!0,o.i=o.o,o.u=-1,o.s=r(o.h,o.v,o.u),o.A=h,o.p=function(e){return e.slice()},o.l=f,o.R=d,o.U=[1732584193,4023233417,2562383102,271733878,3285377520],o.T=512,o.m=160,o.F=!1,a.hmacKey&&o.B(function(e,t,n,i){var o="hmacKey must include a value and format";if(!t)throw new Error(o);if(void 0===t.value||!t.format)throw new Error(o);return r(t.format,t.encoding||"UTF8",n)(t.value)}(0,a.hmacKey,o.u)),o}return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,t),n}(function(){function e(e,t,n){var r=n||{};if(this.h=t,this.v=r.encoding||"UTF8",this.numRounds=r.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.g=e,this.Y=[],this.I=0,this.C=!1,this.H=0,this.L=!1,this.N=[],this.S=[]}return e.prototype.update=function(e){var t,n=0,r=this.T>>>5,i=this.s(e,this.Y,this.I),o=i.binLen,a=i.value,s=o>>>5;for(t=0;t<s;t+=r)n+this.T<=o&&(this.U=this.A(a.slice(t,t+r),this.U),n+=this.T);this.H+=n,this.Y=a.slice(n>>>5),this.I=o%this.T,this.C=!0},e.prototype.getHash=function(e,t){var n,r,a=this.m,s=o(t);if(!0===this.F){if(-1===s.outputLen)throw new Error("Output length must be specified in options");a=s.outputLen}var u=i(e,a,this.u,s);if(!0===this.L&&this.i)return u(this.i(s));for(r=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),a),n=1;n<this.numRounds;n+=1)!0===this.F&&a%32!=0&&(r[r.length-1]&=16777215>>>24-a%32),r=this.R(r,a,0,this.l(this.g),a);return u(r)},e.prototype.setHMACKey=function(e,t,n){if(!0!==this.t)throw new Error("Variant does not support HMAC");if(!0===this.C)throw new Error("Cannot set MAC key after calling update");var i=r(t,(n||{}).encoding||"UTF8",this.u);this.B(i(e))},e.prototype.B=function(e){var t,n=this.T>>>3,r=n/4-1;if(1!==this.numRounds)throw new Error("Cannot set numRounds with MAC");if(!0===this.L)throw new Error("MAC key already set");for(n<e.binLen/8&&(e.value=this.R(e.value,e.binLen,0,this.l(this.g),this.m));e.value.length<=r;)e.value.push(0);for(t=0;t<=r;t+=1)this.N[t]=909522486^e.value[t],this.S[t]=1549556828^e.value[t];this.U=this.A(this.N,this.U),this.H=this.T,this.L=!0},e.prototype.getHMAC=function(e,t){var n=o(t);return i(e,this.m,this.u,n)(this.o())},e.prototype.o=function(){var e;if(!1===this.L)throw new Error("Cannot call getHMAC without first setting MAC key");var t=this.R(this.Y.slice(),this.I,this.H,this.p(this.U),this.m);return e=this.A(this.S,this.l(this.g)),this.R(t,this.m,this.T,e,this.m)},e}())}()},function(e){e.exports=JSON.parse('{"a":"1.0.22-rc.3"}')},function(e,t,n){"use strict";t.__esModule=!0,t.default=void 0;var r=d(n(68)),i=d(n(427)),o=d(n(134)),a=d(n(1)),s=d(n(28)),u=d(n(430)),l=d(n(432)),c=n(466),f=d(n(450)),h=d(n(215));function d(e){return e&&e.__esModule?e:{default:e}}function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function y(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var g=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,t,n)||this).handleHidden=function(){var e;(r.setState({exited:!0}),r.props.onExited)&&(e=r.props).onExited.apply(e,arguments)},r.state={exited:!t.show},r.onHiddenListener=r.handleHidden.bind(m(m(r))),r._lastTarget=null,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.getDerivedStateFromProps=function(e){return e.show?{exited:!1}:e.transition?null:{exited:!0}};var i=r.prototype;return i.componentDidMount=function(){this.setState({target:this.getTarget()})},i.componentDidUpdate=function(e){if(this.props!==e){var t=this.getTarget();t!==this.state.target&&this.setState({target:t})}},i.getTarget=function(){var e=this.props.target;return(e="function"==typeof e?e():e)&&s.default.findDOMNode(e)||null},i.render=function(){var e=this,t=this.props,n=(t.target,t.container),r=t.containerPadding,i=t.placement,o=t.rootClose,s=t.children,f=t.flip,h=t.popperConfig,d=void 0===h?{}:h,m=t.transition,g=y(t,["target","container","containerPadding","placement","rootClose","children","flip","popperConfig","transition"]),v=this.state.target;if(!(g.show||m&&!this.state.exited))return null;var b=s,_=d.modifiers,w=void 0===_?{}:_,T=p({},d,{placement:i,referenceElement:v,enableEvents:g.show,modifiers:p({},w,{preventOverflow:p({padding:r||5},w.preventOverflow),flip:p({enabled:!!f},w.preventOverflow)})});return b=a.default.createElement(c.Popper,T,(function(t){var n=t.arrowProps,r=t.style,o=t.ref,s=y(t,["arrowProps","style","ref"]);e.popper=s;var u=e.props.children(p({},s,{placement:s.placement||i,show:g.show,arrowProps:n,props:{ref:o,style:r}}));if(m){var l=g.onExit,c=g.onExiting,f=g.onEnter,h=g.onEntering,d=g.onEntered;u=a.default.createElement(m,{in:g.show,appear:!0,onExit:l,onExiting:c,onExited:e.onHiddenListener,onEnter:f,onEntering:h,onEntered:d},u)}return u})),o&&(b=a.default.createElement(l.default,{onRootClose:g.onHide,event:g.rootCloseEvent,disabled:g.rootCloseDisabled},b)),a.default.createElement(u.default,{container:n},b)},r}(a.default.Component);g.propTypes=p({},u.default.propTypes,{show:r.default.bool,placement:r.default.oneOf(c.placements),container:r.default.oneOfType([o.default,r.default.func]),flip:r.default.bool,children:r.default.func.isRequired,popperConfig:r.default.object,rootClose:r.default.bool,rootCloseEvent:l.default.propTypes.event,rootCloseDisabled:l.default.propTypes.disabled,onHide:function(e){var t=r.default.func;e.rootClose&&(t=t.isRequired);for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];return t.apply(void 0,[e].concat(i))},transition:i.default,onEnter:r.default.func,onEntering:r.default.func,onEntered:r.default.func,onExit:r.default.func,onExiting:r.default.func,onExited:r.default.func});var v=(0,f.default)((function(e,t){return a.default.createElement(h.default,{container:e.container},(function(n){return a.default.createElement(g,p({},e,{ref:t,container:n}))}))}),{displayName:"withContainer(Overlay)"});t.default=v,e.exports=t.default},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(217),i=n(438),o=n(442),a=n(444),s=n(445),u=n(447),l=Date.prototype.getTime;function c(e,t,n){var d=n||{};return!!(d.strict?o(e,t):e===t)||(!e||!t||"object"!=typeof e&&"object"!=typeof t?d.strict?o(e,t):e==t:function(e,t,n){var o,d;if(typeof e!=typeof t)return!1;if(f(e)||f(t))return!1;if(e.prototype!==t.prototype)return!1;if(i(e)!==i(t))return!1;var p=a(e),y=a(t);if(p!==y)return!1;if(p||y)return e.source===t.source&&s(e)===s(t);if(u(e)&&u(t))return l.call(e)===l.call(t);var m=h(e),g=h(t);if(m!==g)return!1;if(m||g){if(e.length!==t.length)return!1;for(o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}if(typeof e!=typeof t)return!1;try{var v=r(e),b=r(t)}catch(e){return!1}if(v.length!==b.length)return!1;for(v.sort(),b.sort(),o=v.length-1;o>=0;o--)if(v[o]!=b[o])return!1;for(o=v.length-1;o>=0;o--)if(d=v[o],!c(e[d],t[d],n))return!1;return!0}(e,t,d))}function f(e){return null==e}function h(e){return!(!e||"object"!=typeof e||"number"!=typeof e.length)&&("function"==typeof e.copy&&"function"==typeof e.slice&&!(e.length>0&&"number"!=typeof e[0]))}e.exports=c},function(e,t,n){"use strict";var r=n(43);t.__esModule=!0,t.default=void 0;var i=r(n(226)),o=r(n(451));function a(e,t,n){var r,o={target:e,currentTarget:e};function a(e){e.target===e.currentTarget&&(clearTimeout(r),e.target.removeEventListener(i.default.end,a),t.call(this))}i.default.end?null==n&&(n=u(e)||0):n=0,i.default.end?(e.addEventListener(i.default.end,a,!1),r=setTimeout((function(){return a(o)}),1.5*(n||100))):setTimeout(a.bind(null,o),0)}a._parseDuration=u;var s=a;function u(e){var t=(0,o.default)(e,i.default.duration),n=-1===t.indexOf("ms")?1e3:1;return parseFloat(t)*n}t.default=s,e.exports=t.default},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n=void 0===t?{}:t,r=n.propTypes,o=n.defaultProps,a=n.allowFallback,s=void 0!==a&&a,u=n.displayName,l=void 0===u?e.name||e.displayName:u,c=function(t,n){return e(t,n)};return Object.assign(i.default.forwardRef||!s?i.default.forwardRef(c):function(e){return c(e,null)},{displayName:l,propTypes:r,defaultProps:o})};var r,i=(r=n(1))&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";var r=n(6),i=n(14),o=n(51),a=n(46),s=n(17),u=n(153),l=n(11),c=n(36),f=n(54),h=n(18),d=n(25),p=n(20),y=n(32),m=n(62),g=n(61),v=n(64),b=n(76),_=n(115),w=n(156),T=n(118),S=n(49),E=n(27),C=n(85),k=n(33),x=n(45),O=n(74),P=n(86),R=n(75),A=n(87),I=n(16),L=n(157),j=n(247),D=n(55),N=n(39),M=n(47).forEach,U=P("hidden"),B=I("toPrimitive"),F=N.set,V=N.getterFor("Symbol"),H=Object.prototype,z=i.Symbol,q=o("JSON","stringify"),W=S.f,$=E.f,G=w.f,Y=C.f,K=O("symbols"),X=O("op-symbols"),Q=O("string-to-symbol-registry"),J=O("symbol-to-string-registry"),Z=O("wks"),ee=i.QObject,te=!ee||!ee.prototype||!ee.prototype.findChild,ne=s&&l((function(){return 7!=v($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=W(H,t);r&&delete H[t],$(e,t,n),r&&e!==H&&$(H,t,r)}:$,re=function(e,t){var n=K[e]=v(z.prototype);return F(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},ie=u&&"symbol"==typeof z.iterator?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof z},oe=function(e,t,n){e===H&&oe(X,t,n),d(e);var r=m(t,!0);return d(n),c(K,r)?(n.enumerable?(c(e,U)&&e[U][r]&&(e[U][r]=!1),n=v(n,{enumerable:g(0,!1)})):(c(e,U)||$(e,U,g(1,{})),e[U][r]=!0),ne(e,r,n)):$(e,r,n)},ae=function(e,t){d(e);var n=y(t),r=b(n).concat(ce(n));return M(r,(function(t){s&&!se.call(n,t)||oe(e,t,n[t])})),e},se=function(e){var t=m(e,!0),n=Y.call(this,t);return!(this===H&&c(K,t)&&!c(X,t))&&(!(n||!c(this,t)||!c(K,t)||c(this,U)&&this[U][t])||n)},ue=function(e,t){var n=y(e),r=m(t,!0);if(n!==H||!c(K,r)||c(X,r)){var i=W(n,r);return!i||!c(K,r)||c(n,U)&&n[U][r]||(i.enumerable=!0),i}},le=function(e){var t=G(y(e)),n=[];return M(t,(function(e){c(K,e)||c(R,e)||n.push(e)})),n},ce=function(e){var t=e===H,n=G(t?X:y(e)),r=[];return M(n,(function(e){!c(K,e)||t&&!c(H,e)||r.push(K[e])})),r};(u||(x((z=function(){if(this instanceof z)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=A(e),n=function(e){this===H&&n.call(X,e),c(this,U)&&c(this[U],t)&&(this[U][t]=!1),ne(this,t,g(1,e))};return s&&te&&ne(H,t,{configurable:!0,set:n}),re(t,e)}).prototype,"toString",(function(){return V(this).tag})),C.f=se,E.f=oe,S.f=ue,_.f=w.f=le,T.f=ce,s&&($(z.prototype,"description",{configurable:!0,get:function(){return V(this).description}}),a||x(H,"propertyIsEnumerable",se,{unsafe:!0})),L.f=function(e){return re(I(e),e)}),r({global:!0,wrap:!0,forced:!u,sham:!u},{Symbol:z}),M(b(Z),(function(e){j(e)})),r({target:"Symbol",stat:!0,forced:!u},{for:function(e){var t=String(e);if(c(Q,t))return Q[t];var n=z(t);return Q[t]=n,J[n]=t,n},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(c(J,e))return J[e]},useSetter:function(){te=!0},useSimple:function(){te=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!s},{create:function(e,t){return void 0===t?v(e):ae(v(e),t)},defineProperty:oe,defineProperties:ae,getOwnPropertyDescriptor:ue}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:le,getOwnPropertySymbols:ce}),r({target:"Object",stat:!0,forced:l((function(){T.f(1)}))},{getOwnPropertySymbols:function(e){return T.f(p(e))}}),q)&&r({target:"JSON",stat:!0,forced:!u||l((function(){var e=z();return"[null]"!=q([e])||"{}"!=q({a:e})||"{}"!=q(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=t,(h(t)||void 0!==e)&&!ie(e))return f(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),i[1]=t,q.apply(null,i)}});z.prototype[B]||k(z.prototype,B,z.prototype.valueOf),D(z,"Symbol"),R[U]=!0},function(e,t,n){var r=n(14),i=n(114),o=r["__core-js_shared__"]||i("__core-js_shared__",{});e.exports=o},function(e,t,n){var r=n(36),i=n(150),o=n(49),a=n(27);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,l=0;l<n.length;l++){var c=n[l];r(e,c)||s(e,c,u(t,c))}}},function(e,t,n){var r=n(151),i=n(36),o=n(157),a=n(27).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},function(e,t,n){"use strict";var r=n(6),i=n(11),o=n(54),a=n(18),s=n(20),u=n(15),l=n(56),c=n(77),f=n(78),h=n(16),d=n(120),p=h("isConcatSpreadable"),y=d>=51||!i((function(){var e=[];return e[p]=!1,e.concat()[0]!==e})),m=f("concat"),g=function(e){if(!a(e))return!1;var t=e[p];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(e){var t,n,r,i,o,a=s(this),f=c(a,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(g(o=-1===t?a:arguments[t])){if(h+(i=u(o.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<i;n++,h++)n in o&&l(f,h,o[n])}else{if(h>=9007199254740991)throw TypeError("Maximum allowed index exceeded");l(f,h++,o)}return f.length=h,f}})},function(e,t,n){var r=n(6),i=n(250),o=n(42);r({target:"Array",proto:!0},{copyWithin:i}),o("copyWithin")},function(e,t,n){"use strict";var r=n(20),i=n(63),o=n(15),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=r(this),s=o(n.length),u=i(e,s),l=i(t,s),c=arguments.length>2?arguments[2]:void 0,f=a((void 0===c?s:i(c,s))-l,s-u),h=1;for(l<u&&u<l+f&&(h=-1,l+=f-1,u+=f-1);f-- >0;)l in n?n[u]=n[l]:delete n[u],u+=h,l+=h;return n}},function(e,t,n){"use strict";var r=n(6),i=n(47).every;r({target:"Array",proto:!0,forced:n(48)("every")},{every:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(6),i=n(253),o=n(42);r({target:"Array",proto:!0},{fill:i}),o("fill")},function(e,t,n){"use strict";var r=n(20),i=n(63),o=n(15);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,l=void 0===u?n:i(u,n);l>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(6),i=n(47).find,o=n(42),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(e,t,n){"use strict";var r=n(6),i=n(47).findIndex,o=n(42),a=!0;"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("findIndex")},function(e,t,n){"use strict";var r=n(6),i=n(159),o=n(20),a=n(15),s=n(52),u=n(77);r({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=o(this),n=a(t.length),r=u(t,0);return r.length=i(r,t,t,n,0,void 0===e?1:s(e)),r}})},function(e,t,n){"use strict";var r=n(6),i=n(159),o=n(20),a=n(15),s=n(37),u=n(77);r({target:"Array",proto:!0},{flatMap:function(e){var t,n=o(this),r=a(n.length);return s(e),(t=u(n,0)).length=i(t,n,n,r,0,1,e,arguments.length>1?arguments[1]:void 0),t}})},function(e,t,n){var r=n(6),i=n(259);r({target:"Array",stat:!0,forced:!n(122)((function(e){Array.from(e)}))},{from:i})},function(e,t,n){"use strict";var r=n(65),i=n(20),o=n(162),a=n(163),s=n(15),u=n(56),l=n(164);e.exports=function(e){var t,n,c,f,h,d=i(e),p="function"==typeof this?this:Array,y=arguments.length,m=y>1?arguments[1]:void 0,g=void 0!==m,v=0,b=l(d);if(g&&(m=r(m,y>2?arguments[2]:void 0,2)),null==b||p==Array&&a(b))for(n=new p(t=s(d.length));t>v;v++)u(n,v,g?m(d[v],v):d[v]);else for(h=(f=b.call(d)).next,n=new p;!(c=h.call(f)).done;v++)u(n,v,g?o(f,m,[c.value,v],!0):c.value);return n.length=v,n}},function(e,t,n){"use strict";var r=n(6),i=n(116).includes,o=n(42);r({target:"Array",proto:!0},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(e,t,n){"use strict";var r=n(6),i=n(116).indexOf,o=n(48),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,u=o("indexOf");r({target:"Array",proto:!0,forced:s||u},{indexOf:function(e){return s?a.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){n(6)({target:"Array",stat:!0},{isArray:n(54)})},function(e,t,n){var r=n(18);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var r=n(6),i=n(73),o=n(32),a=n(48),s=[].join,u=i!=Object,l=a("join",",");r({target:"Array",proto:!0,forced:u||l},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},function(e,t,n){var r=n(6),i=n(266);r({target:"Array",proto:!0,forced:i!==[].lastIndexOf},{lastIndexOf:i})},function(e,t,n){"use strict";var r=n(32),i=n(52),o=n(15),a=n(48),s=Math.min,u=[].lastIndexOf,l=!!u&&1/[1].lastIndexOf(1,-0)<0,c=a("lastIndexOf");e.exports=l||c?function(e){if(l)return u.apply(this,arguments)||0;var t=r(this),n=o(t.length),a=n-1;for(arguments.length>1&&(a=s(a,i(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:u},function(e,t,n){"use strict";var r=n(6),i=n(47).map;r({target:"Array",proto:!0,forced:!n(78)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(6),i=n(11),o=n(56);r({target:"Array",stat:!0,forced:i((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)o(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(6),i=n(168).right;r({target:"Array",proto:!0,forced:n(48)("reduceRight")},{reduceRight:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(6),i=n(54),o=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),o.call(this)}})},function(e,t,n){"use strict";var r=n(6),i=n(18),o=n(54),a=n(63),s=n(15),u=n(32),l=n(56),c=n(78),f=n(16)("species"),h=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!c("slice")},{slice:function(e,t){var n,r,c,p=u(this),y=s(p.length),m=a(e,y),g=a(void 0===t?y:t,y);if(o(p)&&("function"!=typeof(n=p.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[f])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(p,m,g);for(r=new(void 0===n?Array:n)(d(g-m,0)),c=0;m<g;m++,c++)m in p&&l(r,c,p[m]);return r.length=c,r}})},function(e,t,n){"use strict";var r=n(6),i=n(47).some;r({target:"Array",proto:!0,forced:n(48)("some")},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(6),i=n(37),o=n(20),a=n(11),s=n(48),u=[].sort,l=[1,2,3],c=a((function(){l.sort(void 0)})),f=a((function(){l.sort(null)})),h=s("sort");r({target:"Array",proto:!0,forced:c||!f||h},{sort:function(e){return void 0===e?u.call(o(this)):u.call(o(this),i(e))}})},function(e,t,n){n(126)("Array")},function(e,t,n){"use strict";var r=n(6),i=n(63),o=n(52),a=n(15),s=n(20),u=n(77),l=n(56),c=n(78),f=Math.max,h=Math.min;r({target:"Array",proto:!0,forced:!c("splice")},{splice:function(e,t){var n,r,c,d,p,y,m=s(this),g=a(m.length),v=i(e,g),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=g-v):(n=b-2,r=h(f(o(t),0),g-v)),g+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(c=u(m,r),d=0;d<r;d++)(p=v+d)in m&&l(c,d,m[p]);if(c.length=r,n<r){for(d=v;d<g-r;d++)y=d+n,(p=d+r)in m?m[y]=m[p]:delete m[y];for(d=g;d>g-r+n;d--)delete m[d-1]}else if(n>r)for(d=g-r;d>v;d--)y=d+n-1,(p=d+r-1)in m?m[y]=m[p]:delete m[y];for(d=0;d<n;d++)m[d+v]=arguments[d+2];return m.length=g-r+n,c}})},function(e,t,n){n(42)("flat")},function(e,t,n){n(42)("flatMap")},function(e,t,n){var r=n(14);n(55)(r.JSON,"JSON",!0)},function(e,t,n){"use strict";var r=n(169),i=n(281);e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i,!0)},function(e,t,n){var r=n(18),i=n(89);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},function(e,t,n){"use strict";var r=n(27).f,i=n(64),o=n(92),a=n(65),s=n(91),u=n(53),l=n(124),c=n(126),f=n(17),h=n(57).fastKey,d=n(39),p=d.set,y=d.getterFor;e.exports={getConstructor:function(e,t,n,l){var c=e((function(e,r){s(e,c,t),p(e,{type:t,index:i(null),first:void 0,last:void 0,size:0}),f||(e.size=0),null!=r&&u(r,e[l],e,n)})),d=y(t),m=function(e,t,n){var r,i,o=d(e),a=g(e,t);return a?a.value=n:(o.last=a={index:i=h(t,!0),key:t,value:n,previous:r=o.last,next:void 0,removed:!1},o.first||(o.first=a),r&&(r.next=a),f?o.size++:e.size++,"F"!==i&&(o.index[i]=a)),e},g=function(e,t){var n,r=d(e),i=h(t);if("F"!==i)return r.index[i];for(n=r.first;n;n=n.next)if(n.key==t)return n};return o(c.prototype,{clear:function(){for(var e=d(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,f?e.size=0:this.size=0},delete:function(e){var t=d(this),n=g(this,e);if(n){var r=n.next,i=n.previous;delete t.index[n.index],n.removed=!0,i&&(i.next=r),r&&(r.previous=i),t.first==n&&(t.first=r),t.last==n&&(t.last=i),f?t.size--:this.size--}return!!n},forEach:function(e){for(var t,n=d(this),r=a(e,arguments.length>1?arguments[1]:void 0,3);t=t?t.next:n.first;)for(r(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!g(this,e)}}),o(c.prototype,n?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return m(this,0===e?0:e,t)}}:{add:function(e){return m(this,e=0===e?0:e,e)}}),f&&r(c.prototype,"size",{get:function(){return d(this).size}}),c},setStrong:function(e,t,n){var r=t+" Iterator",i=y(t),o=y(r);l(e,t,(function(e,t){p(this,{type:r,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),c(t)}}},function(e,t,n){n(55)(Math,"Math",!0)},function(e,t,n){"use strict";var r=n(17),i=n(11),o=n(76),a=n(118),s=n(85),u=n(20),l=n(73),c=Object.assign;e.exports=!c||i((function(){var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||"abcdefghijklmnopqrst"!=o(c({},t)).join("")}))?function(e,t){for(var n=u(e),i=arguments.length,c=1,f=a.f,h=s.f;i>c;)for(var d,p=l(arguments[c++]),y=f?o(p).concat(f(p)):o(p),m=y.length,g=0;m>g;)d=y[g++],r&&!h.call(p,d)||(n[d]=p[d]);return n}:c},function(e,t,n){n(6)({target:"Object",stat:!0,sham:!n(17)},{create:n(64)})},function(e,t,n){"use strict";var r=n(6),i=n(17),o=n(93),a=n(20),s=n(37),u=n(27);i&&r({target:"Object",proto:!0,forced:o},{__defineGetter__:function(e,t){u.f(a(this),e,{get:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(6),i=n(17);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:n(154)})},function(e,t,n){var r=n(6),i=n(17);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(27).f})},function(e,t,n){"use strict";var r=n(6),i=n(17),o=n(93),a=n(20),s=n(37),u=n(27);i&&r({target:"Object",proto:!0,forced:o},{__defineSetter__:function(e,t){u.f(a(this),e,{set:s(t),enumerable:!0,configurable:!0})}})},function(e,t,n){var r=n(6),i=n(171).entries;r({target:"Object",stat:!0},{entries:function(e){return i(e)}})},function(e,t,n){var r=n(6),i=n(90),o=n(11),a=n(18),s=n(57).onFreeze,u=Object.freeze;r({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!i},{freeze:function(e){return u&&a(e)?u(s(e)):e}})},function(e,t,n){var r=n(6),i=n(53),o=n(56);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,n){o(t,e,n)}),void 0,!0),t}})},function(e,t,n){var r=n(6),i=n(11),o=n(32),a=n(49).f,s=n(17),u=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||u,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(o(e),t)}})},function(e,t,n){var r=n(6),i=n(17),o=n(150),a=n(32),s=n(49),u=n(56);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),i=s.f,l=o(r),c={},f=0;l.length>f;)void 0!==(n=i(r,t=l[f++]))&&u(c,t,n);return c}})},function(e,t,n){var r=n(6),i=n(11),o=n(156).f;r({target:"Object",stat:!0,forced:i((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:o})},function(e,t,n){var r=n(6),i=n(11),o=n(20),a=n(66),s=n(166);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(o(e))}})},function(e,t,n){n(6)({target:"Object",stat:!0},{is:n(172)})},function(e,t,n){var r=n(6),i=n(11),o=n(18),a=Object.isExtensible;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isExtensible:function(e){return!!o(e)&&(!a||a(e))}})},function(e,t,n){var r=n(6),i=n(11),o=n(18),a=Object.isFrozen;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isFrozen:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(6),i=n(11),o=n(18),a=Object.isSealed;r({target:"Object",stat:!0,forced:i((function(){a(1)}))},{isSealed:function(e){return!o(e)||!!a&&a(e)}})},function(e,t,n){var r=n(6),i=n(20),o=n(76);r({target:"Object",stat:!0,forced:n(11)((function(){o(1)}))},{keys:function(e){return o(i(e))}})},function(e,t,n){"use strict";var r=n(6),i=n(17),o=n(93),a=n(20),s=n(62),u=n(66),l=n(49).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupGetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=l(n,r))return t.get}while(n=u(n))}})},function(e,t,n){"use strict";var r=n(6),i=n(17),o=n(93),a=n(20),s=n(62),u=n(66),l=n(49).f;i&&r({target:"Object",proto:!0,forced:o},{__lookupSetter__:function(e){var t,n=a(this),r=s(e,!0);do{if(t=l(n,r))return t.set}while(n=u(n))}})},function(e,t,n){var r=n(6),i=n(18),o=n(57).onFreeze,a=n(90),s=n(11),u=Object.preventExtensions;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{preventExtensions:function(e){return u&&i(e)?u(o(e)):e}})},function(e,t,n){var r=n(6),i=n(18),o=n(57).onFreeze,a=n(90),s=n(11),u=Object.seal;r({target:"Object",stat:!0,forced:s((function(){u(1)})),sham:!a},{seal:function(e){return u&&i(e)?u(o(e)):e}})},function(e,t,n){n(6)({target:"Object",stat:!0},{setPrototypeOf:n(89)})},function(e,t,n){"use strict";var r=n(121),i={};i[n(16)("toStringTag")]="z",e.exports="[object z]"!==String(i)?function(){return"[object "+r(this)+"]"}:i.toString},function(e,t,n){var r=n(6),i=n(171).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},function(e,t,n){"use strict";var r,i,o,a,s=n(6),u=n(46),l=n(14),c=n(51),f=n(174),h=n(45),d=n(92),p=n(55),y=n(126),m=n(18),g=n(37),v=n(91),b=n(50),_=n(53),w=n(122),T=n(94),S=n(175).set,E=n(309),C=n(176),k=n(310),x=n(80),O=n(95),P=n(39),R=n(119),A=n(16),I=n(120),L=A("species"),j="Promise",D=P.get,N=P.set,M=P.getterFor(j),U=f,B=l.TypeError,F=l.document,V=l.process,H=c("fetch"),z=x.f,q=z,W="process"==b(V),$=!!(F&&F.createEvent&&l.dispatchEvent),G=R(j,(function(){if(66===I)return!0;if(!W&&"function"!=typeof PromiseRejectionEvent)return!0;if(u&&!U.prototype.finally)return!0;if(I>=51&&/native code/.test(U))return!1;var e=U.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[L]=t,!(e.then((function(){}))instanceof t)})),Y=G||!w((function(e){U.all(e).catch((function(){}))})),K=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},X=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;E((function(){for(var i=t.value,o=1==t.state,a=0;r.length>a;){var s,u,l,c=r[a++],f=o?c.ok:c.fail,h=c.resolve,d=c.reject,p=c.domain;try{f?(o||(2===t.rejection&&ee(e,t),t.rejection=1),!0===f?s=i:(p&&p.enter(),s=f(i),p&&(p.exit(),l=!0)),s===c.promise?d(B("Promise-chain cycle")):(u=K(s))?u.call(s,h,d):h(s)):d(i)}catch(e){p&&!l&&p.exit(),d(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&J(e,t)}))}},Q=function(e,t,n){var r,i;$?((r=F.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),l.dispatchEvent(r)):r={promise:t,reason:n},(i=l["on"+e])?i(r):"unhandledrejection"===e&&k("Unhandled promise rejection",n)},J=function(e,t){S.call(l,(function(){var n,r=t.value;if(Z(t)&&(n=O((function(){W?V.emit("unhandledRejection",r,e):Q("unhandledrejection",e,r)})),t.rejection=W||Z(t)?2:1,n.error))throw n.value}))},Z=function(e){return 1!==e.rejection&&!e.parent},ee=function(e,t){S.call(l,(function(){W?V.emit("rejectionHandled",e):Q("rejectionhandled",e,t.value)}))},te=function(e,t,n,r){return function(i){e(t,n,i,r)}},ne=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,X(e,t,!0))},re=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw B("Promise can't be resolved itself");var i=K(n);i?E((function(){var r={done:!1};try{i.call(n,te(re,e,r,t),te(ne,e,r,t))}catch(n){ne(e,r,n,t)}})):(t.value=n,t.state=1,X(e,t,!1))}catch(n){ne(e,{done:!1},n,t)}}};G&&(U=function(e){v(this,U,j),g(e),r.call(this);var t=D(this);try{e(te(re,this,t),te(ne,this,t))}catch(e){ne(this,t,e)}},(r=function(e){N(this,{type:j,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(U.prototype,{then:function(e,t){var n=M(this),r=z(T(this,U));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=W?V.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&X(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=D(e);this.promise=e,this.resolve=te(re,e,t),this.reject=te(ne,e,t)},x.f=z=function(e){return e===U||e===o?new i(e):q(e)},u||"function"!=typeof f||(a=f.prototype.then,h(f.prototype,"then",(function(e,t){var n=this;return new U((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof H&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return C(U,H.apply(l,arguments))}}))),s({global:!0,wrap:!0,forced:G},{Promise:U}),p(U,j,!1,!0),y(j),o=c(j),s({target:j,stat:!0,forced:G},{reject:function(e){var t=z(this);return t.reject.call(void 0,e),t.promise}}),s({target:j,stat:!0,forced:u||G},{resolve:function(e){return C(u&&this===o?U:this,e)}}),s({target:j,stat:!0,forced:Y},{all:function(e){var t=this,n=z(t),r=n.resolve,i=n.reject,o=O((function(){var n=g(t.resolve),o=[],a=0,s=1;_(e,(function(e){var u=a++,l=!1;o.push(void 0),s++,n.call(t,e).then((function(e){l||(l=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=z(t),r=n.reject,i=O((function(){var i=g(t.resolve);_(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},function(e,t,n){var r,i,o,a,s,u,l,c,f=n(14),h=n(49).f,d=n(50),p=n(175).set,y=n(88),m=f.MutationObserver||f.WebKitMutationObserver,g=f.process,v=f.Promise,b="process"==d(g),_=h(f,"queueMicrotask"),w=_&&_.value;w||(r=function(){var e,t;for(b&&(e=g.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},b?a=function(){g.nextTick(r)}:m&&!/(iphone|ipod|ipad).*applewebkit/i.test(y)?(s=!0,u=document.createTextNode(""),new m(r).observe(u,{characterData:!0}),a=function(){u.data=s=!s}):v&&v.resolve?(l=v.resolve(void 0),c=l.then,a=function(){c.call(l,r)}):a=function(){p.call(f,r)}),e.exports=w||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},function(e,t,n){var r=n(14);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";var r=n(6),i=n(46),o=n(174),a=n(51),s=n(94),u=n(176),l=n(45);r({target:"Promise",proto:!0,real:!0},{finally:function(e){var t=s(this,a("Promise")),n="function"==typeof e;return this.then(n?function(n){return u(t,e()).then((function(){return n}))}:e,n?function(n){return u(t,e()).then((function(){throw n}))}:e)}}),i||"function"!=typeof o||o.prototype.finally||l(o.prototype,"finally",a("Promise").prototype.finally)},function(e,t,n){"use strict";var r=n(6),i=n(81).codeAt;r({target:"String",proto:!0},{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(6),i=n(15),o=n(128),a=n(26),s=n(129),u="".endsWith,l=Math.min;r({target:"String",proto:!0,forced:!s("endsWith")},{endsWith:function(e){var t=String(a(this));o(e);var n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:l(i(n),r),c=String(e);return u?u.call(t,c,s):t.slice(s-c.length,s)===c}})},function(e,t,n){var r=n(6),i=n(63),o=String.fromCharCode,a=String.fromCodePoint;r({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;r>a;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var r=n(6),i=n(128),o=n(26);r({target:"String",proto:!0,forced:!n(129)("includes")},{includes:function(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(6),i=n(180).end;r({target:"String",proto:!0,forced:n(182)},{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){"use strict";var r=n(6),i=n(180).start;r({target:"String",proto:!0,forced:n(182)},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(6),i=n(32),o=n(15);r({target:"String",stat:!0},{raw:function(e){for(var t=i(e.raw),n=o(t.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s<r&&a.push(String(arguments[s]));return a.join("")}})},function(e,t,n){n(6)({target:"String",proto:!0},{repeat:n(181)})},function(e,t,n){"use strict";var r=n(98),i=n(25),o=n(26),a=n(172),s=n(100);r("search",1,(function(e,t,n){return[function(t){var n=o(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=i(e),u=String(this),l=o.lastIndex;a(l,0)||(o.lastIndex=0);var c=s(o,u);return a(o.lastIndex,l)||(o.lastIndex=l),null===c?-1:c.index}]}))},function(e,t,n){"use strict";var r=n(98),i=n(97),o=n(25),a=n(26),s=n(94),u=n(99),l=n(15),c=n(100),f=n(96),h=n(11),d=[].push,p=Math.min,y=!h((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var s,u,l,c=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,y=new RegExp(e.source,h+"g");(s=f.call(y,r))&&!((u=y.lastIndex)>p&&(c.push(r.slice(p,s.index)),s.length>1&&s.index<r.length&&d.apply(c,s.slice(1)),l=s[0].length,p=u,c.length>=o));)y.lastIndex===s.index&&y.lastIndex++;return p===r.length?!l&&y.test("")||c.push(""):c.push(r.slice(p)),c.length>o?c.slice(0,o):c}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var f=o(e),h=String(this),d=s(f,RegExp),m=f.unicode,g=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(y?"y":"g"),v=new d(y?f:"^(?:"+f.source+")",g),b=void 0===i?4294967295:i>>>0;if(0===b)return[];if(0===h.length)return null===c(v,h)?[h]:[];for(var _=0,w=0,T=[];w<h.length;){v.lastIndex=y?w:0;var S,E=c(v,y?h:h.slice(w));if(null===E||(S=p(l(v.lastIndex+(y?0:w)),h.length))===_)w=u(h,w,m);else{if(T.push(h.slice(_,w)),T.length===b)return T;for(var C=1;C<=E.length-1;C++)if(T.push(E[C]),T.length===b)return T;w=_=S}}return T.push(h.slice(_)),T}]}),!y)},function(e,t,n){"use strict";var r=n(6),i=n(15),o=n(128),a=n(26),s=n(129),u="".startsWith,l=Math.min;r({target:"String",proto:!0,forced:!s("startsWith")},{startsWith:function(e){var t=String(a(this));o(e);var n=i(l(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return u?u.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";var r=n(6),i=n(101).trim;r({target:"String",proto:!0,forced:n(131)("trim")},{trim:function(){return i(this)}})},function(e,t,n){"use strict";var r=n(6),i=n(101).end,o=n(131)("trimEnd"),a=o?function(){return i(this)}:"".trimEnd;r({target:"String",proto:!0,forced:o},{trimEnd:a,trimRight:a})},function(e,t,n){"use strict";var r=n(6),i=n(101).start,o=n(131)("trimStart"),a=o?function(){return i(this)}:"".trimStart;r({target:"String",proto:!0,forced:o},{trimStart:a,trimLeft:a})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("anchor")},{anchor:function(e){return i(this,"a","name",e)}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("big")},{big:function(){return i(this,"big","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("blink")},{blink:function(){return i(this,"blink","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("bold")},{bold:function(){return i(this,"b","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("fixed")},{fixed:function(){return i(this,"tt","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("fontcolor")},{fontcolor:function(e){return i(this,"font","color",e)}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("fontsize")},{fontsize:function(e){return i(this,"font","size",e)}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("italics")},{italics:function(){return i(this,"i","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("link")},{link:function(e){return i(this,"a","href",e)}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("small")},{small:function(){return i(this,"small","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("strike")},{strike:function(){return i(this,"strike","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("sub")},{sub:function(){return i(this,"sub","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(34);r({target:"String",proto:!0,forced:n(35)("sup")},{sup:function(){return i(this,"sup","","")}})},function(e,t,n){"use strict";var r=n(6),i=n(17),o=n(66),a=n(89),s=n(64),u=n(27),l=n(61),c=n(53),f=n(33),h=n(25),d=n(39),p=d.set,y=d.getterFor("AggregateError"),m=function(e,t){var n=this;if(!(n instanceof m))return new m(e,t);a&&(n=a(new Error(t),o(n)));var r=[];return c(e,r.push,r),i?p(n,{errors:r,type:"AggregateError"}):n.errors=r,void 0!==t&&f(n,"message",String(t)),n};m.prototype=s(Error.prototype,{constructor:l(5,m),message:l(5,""),name:l(5,"AggregateError"),toString:l(5,(function(){var e=h(this).name;e=void 0===e?"AggregateError":String(e);var t=this.message;return e+": "+(t=void 0===t?"":String(t))}))}),i&&u.f(m.prototype,"errors",{get:function(){return y(this).errors},configurable:!0}),r({global:!0},{AggregateError:m})},function(e,t,n){"use strict";var r=n(17),i=n(42),o=n(20),a=n(15),s=n(27).f;r&&!("lastIndex"in[])&&(s(Array.prototype,"lastIndex",{configurable:!0,get:function(){var e=o(this),t=a(e.length);return 0==t?0:t-1}}),i("lastIndex"))},function(e,t,n){"use strict";var r=n(17),i=n(42),o=n(20),a=n(15),s=n(27).f;r&&!("lastItem"in[])&&(s(Array.prototype,"lastItem",{configurable:!0,get:function(){var e=o(this),t=a(e.length);return 0==t?void 0:e[t-1]},set:function(e){var t=o(this),n=a(t.length);return t[0==n?0:n-1]=e}}),i("lastItem"))},function(e,t,n){n(343)},function(e,t,n){"use strict";var r=n(6),i=n(37),o=n(80),a=n(95),s=n(53);r({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=o.f(t),r=n.resolve,u=n.reject,l=a((function(){var n=i(t.resolve),o=[],a=0,u=1;s(e,(function(e){var i=a++,s=!1;o.push(void 0),u++,n.call(t,e).then((function(e){s||(s=!0,o[i]={status:"fulfilled",value:e},--u||r(o))}),(function(e){s||(s=!0,o[i]={status:"rejected",reason:e},--u||r(o))}))})),--u||r(o)}));return l.error&&u(l.value),n.promise}})},function(e,t,n){"use strict";var r=n(6),i=n(37),o=n(51),a=n(80),s=n(95),u=n(53);r({target:"Promise",stat:!0},{any:function(e){var t=this,n=a.f(t),r=n.resolve,l=n.reject,c=s((function(){var n=i(t.resolve),a=[],s=0,c=1,f=!1;u(e,(function(e){var i=s++,u=!1;a.push(void 0),c++,n.call(t,e).then((function(e){u||f||(f=!0,r(e))}),(function(e){u||f||(u=!0,a[i]=e,--c||l(new(o("AggregateError"))(a,"No one promise resolved")))}))})),--c||l(new(o("AggregateError"))(a,"No one promise resolved"))}));return c.error&&l(c.value),n.promise}})},function(e,t,n){"use strict";var r=n(6),i=n(80),o=n(95);r({target:"Promise",stat:!0},{try:function(e){var t=i.f(this),n=o(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}})},function(e,t,n){"use strict";var r=n(6),i=n(81).charAt;r({target:"String",proto:!0},{at:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(6),i=n(125),o=n(26),a=n(39),s=n(81),u=s.codeAt,l=s.charAt,c=a.set,f=a.getterFor("String Iterator"),h=i((function(e){c(this,{type:"String Iterator",string:e,index:0})}),"String",(function(){var e,t=f(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=l(n,r),t.index+=e.length,{value:{codePoint:u(e,0),position:r},done:!1})}));r({target:"String",proto:!0},{codePoints:function(){return new h(String(o(this)))}})},function(e,t,n){n(349)},function(e,t,n){"use strict";var r=n(6),i=n(125),o=n(26),a=n(15),s=n(37),u=n(25),l=n(121),c=n(97),f=n(127),h=n(33),d=n(11),p=n(16),y=n(94),m=n(99),g=n(39),v=n(46),b=p("matchAll"),_=g.set,w=g.getterFor("RegExp String Iterator"),T=RegExp.prototype,S=T.exec,E="".matchAll,C=!!E&&!d((function(){"a".matchAll(/./)})),k=i((function(e,t,n,r){_(this,{type:"RegExp String Iterator",regexp:e,string:t,global:n,unicode:r,done:!1})}),"RegExp String",(function(){var e=w(this);if(e.done)return{value:void 0,done:!0};var t=e.regexp,n=e.string,r=function(e,t){var n,r=e.exec;if("function"==typeof r){if("object"!=typeof(n=r.call(e,t)))throw TypeError("Incorrect exec result");return n}return S.call(e,t)}(t,n);return null===r?{value:void 0,done:e.done=!0}:e.global?(""==String(r[0])&&(t.lastIndex=m(n,a(t.lastIndex),e.unicode)),{value:r,done:!1}):(e.done=!0,{value:r,done:!1})})),x=function(e){var t,n,r,i,o,s,l=u(this),c=String(e);return t=y(l,RegExp),void 0===(n=l.flags)&&l instanceof RegExp&&!("flags"in T)&&(n=f.call(l)),r=void 0===n?"":String(n),i=new t(t===RegExp?l.source:l,r),o=!!~r.indexOf("g"),s=!!~r.indexOf("u"),i.lastIndex=a(l.lastIndex),new k(i,c,o,s)};r({target:"String",proto:!0,forced:C},{matchAll:function(e){var t,n,r,i=o(this);if(null!=e){if(c(e)&&!~String(o("flags"in T?e.flags:f.call(e))).indexOf("g"))throw TypeError("`.matchAll` does not allow non-global regexes");if(C)return E.apply(i,arguments);if(void 0===(n=e[b])&&v&&"RegExp"==l(e)&&(n=x),null!=n)return s(n).call(e,i)}else if(C)return E.apply(i,arguments);return t=String(i),r=new RegExp(e,"g"),v?x.call(r,t):r[b](t)}}),v||b in T||h(T,b,x)},function(e,t,n){"use strict";var r=n(6),i=n(26),o=n(97),a=n(127),s=n(16),u=n(46),l=s("replace"),c=RegExp.prototype;r({target:"String",proto:!0},{replaceAll:function e(t,n){var r,s,f,h,d,p,y,m=i(this);if(null!=t){if((r=o(t))&&!~String(i("flags"in c?t.flags:a.call(t))).indexOf("g"))throw TypeError("`.replaceAll` does not allow non-global regexes");if(void 0!==(s=t[l]))return s.call(t,m,n);if(u&&r)return String(m).replace(t,n)}if(f=String(m),""===(h=String(t)))return e.call(f,/(?:)/g,n);if(d=f.split(h),"function"!=typeof n)return d.join(String(n));for(p=d[0],y=1;y<d.length;y++)p+=String(n(h,y-1,f)),p+=d[y];return p}})},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",o=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof f?t:f,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return C()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=_(a,n);if(s){if(s===c)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===c)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var c={};function f(){}function h(){}function d(){}var p={};p[i]=function(){return this};var y=Object.getPrototypeOf,m=y&&y(y(E([])));m&&m!==t&&n.call(m,i)&&(p=m);var g=d.prototype=f.prototype=Object.create(p);function v(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}))}s(u.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:C}}function C(){return{value:void 0,done:!0}}return h.prototype=g.constructor=d,d.constructor=h,h.displayName=s(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},v(b.prototype),b.prototype[o]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new b(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},v(g),s(g,a,"Generator"),g[i]=function(){return this},g.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=E,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;T(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){},function(e,t,n){"use strict";
47
47
  /** @license React v16.11.0
48
48
  * react.production.min.js
49
49
  *
@@ -60,7 +60,7 @@ object-assign
60
60
  */
61
61
  var r=n(366),i=n(367),o=n(368);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return f(this,e)}return l(this,e,t,n)}function l(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=h(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|d(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?s(e,0):h(e,t);if("Buffer"===t.type&&o(t.data))return h(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(c(t),e=s(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function h(e,t){var n=t.length<0?0:0|d(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return x(this,t,n);case"latin1":case"binary":return O(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function m(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function g(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var c=-1;for(o=n;o<s;o++)if(l(e,o)===l(t,-1===c?0:o-c)){if(-1===c&&(c=o),o-c+1===u)return c*a}else-1!==c&&(o-=o-c),c=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){for(var f=!0,h=0;h<u;h++)if(l(e,o+h)!==l(t,h)){f=!1;break}if(f)return o}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function _(e,t,n,r){return H(F(t,e.length-n),e,n,r)}function w(e,t,n,r){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function T(e,t,n,r){return w(e,t,n,r)}function S(e,t,n,r){return H(V(t),e,n,r)}function E(e,t,n,r){return H(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,l=e[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&l)<<6|63&o)>127&&(c=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&l)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return l(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return c(t),t<=0?s(e,t):void 0!==n?"string"==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return f(null,e)},u.allocUnsafeSlow=function(e){return f(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?k(this,0,e):y.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),l=this.slice(r,i),c=e.slice(t,n),f=0;f<s;++f)if(l[f]!==c[f]){o=l[f],a=c[f];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return g(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return g(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return w(this,e,t,n);case"latin1":case"binary":return T(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function O(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function P(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=B(e[o]);return i}function R(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function A(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function j(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,o){return o||D(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function M(e,t,n,r,o){return o||D(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||A(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||A(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||A(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||A(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||A(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||A(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||A(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||A(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||A(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||A(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||A(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||A(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||A(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return M(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return M(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=u.isBuffer(e)?e:F(new u(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function B(e){return e<16?"0"+e.toString(16):e.toString(16)}function F(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function V(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(30))},function(e,t,n){"use strict";t.byteLength=function(e){var t=l(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=l(e),a=r[0],s=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),c=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[c++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(c(e,a,a+16383>s?s:a+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){
62
62
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
63
- t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=l}return(d?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[n+d]=255&a,d+=p,a/=256,l-=8);e[n+d-p]|=128*y}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function o(){}function a(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function s(e,t,n,r,i,o){for(var a,s=++t,u=0;;){var l=e.charAt(s);switch(l){case"=":if(1===u)a=e.slice(t,s),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(o.warning('attribute value must after "="'),a=e.slice(t,s)),t=s+1,!((s=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");c=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,c,t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');c=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,c,t),o.warning('attribute "'+a+'" missed start quot('+l+")!!"),t=s+1,u=5}break;case"/":switch(u){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:u=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==u&&n.setTagName(e.slice(t,s)),s;case">":switch(u){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:break;case 4:case 1:"/"===(c=e.slice(t,s)).slice(-1)&&(n.closed=!0,c=c.slice(0,-1));case 2:2===u&&(c=a),4==u?(o.warning('attribute "'+c+'" missed quot(")!!'),n.add(a,c.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&c.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),n.add(c,c,t));break;case 3:throw new Error("attribute value missed!!")}return s;case"€":l=" ";default:if(l<=" ")switch(u){case 0:n.setTagName(e.slice(t,s)),u=6;break;case 1:a=e.slice(t,s),u=2;break;case 4:var c=e.slice(t,s).replace(/&#?\w+;/g,i);o.warning('attribute "'+c+'" missed quot(")!!'),n.add(a,c,t);case 5:u=6}else switch(u){case 2:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&a.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),n.add(a,a,t),t=s,u=1;break;case 5:o.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=s;break;case 3:u=4,t=s;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}s++}}function u(e,t,n){for(var r=e.tagName,i=null,o=e.length;o--;){var a=e[o],s=a.qName,u=a.value;if((d=s.indexOf(":"))>0)var l=a.prefix=s.slice(0,d),c=s.slice(d+1),h="xmlns"===l&&c;else c=s,l=null,h="xmlns"===s&&"";a.localName=c,!1!==h&&(null==i&&(i={},f(n,n={})),n[h]=i[h]=u,a.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,u))}for(o=e.length;o--;){(l=(a=e[o]).prefix)&&("xml"===l&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(a.uri=n[l||""]))}var d;(d=r.indexOf(":"))>0?(l=e.prefix=r.slice(0,d),c=e.localName=r.slice(d+1)):(l=null,c=e.localName=r);var p=e.uri=n[l||""];if(t.startElement(p,c,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(p,c,r),i)for(l in i)t.endPrefixMapping(l)}function l(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("</"+n+">",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return t+1}function c(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function f(e,t){for(var n in e)t[n]=e[n]}function h(e,t,n,r){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var o=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],u=a>3&&/^public$/i.test(o[2][0])&&o[3][0],l=a>4&&o[4][0],c=o[a-1];return n.startDTD(s,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),l&&l.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}function d(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function p(e){}function y(e,t){return e.__proto__=t,e}o.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,n,r,i){function o(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function f(t){if(t>T){var n=e.substring(T,t).replace(/&#?\w+;/g,o);b&&y(T),r.characters(n,0,t-T),T=t}}function y(t,n){for(;t>=g&&(n=v.exec(e));)m=n.index,g=m+n[0].length,b.lineNumber++;b.columnNumber=t-m+1}var m=0,g=0,v=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,_=[{currentNSMap:t}],w={},T=0;for(;;){try{var S=e.indexOf("<",T);if(S<0){if(!e.substr(T).match(/^\s*$/)){var E=r.doc,C=E.createTextNode(e.substr(T));E.appendChild(C),r.currentElement=C}return}switch(S>T&&f(S),e.charAt(S+1)){case"/":var k=e.indexOf(">",S+3),x=e.substring(S+2,k),O=_.pop();k<0?(x=e.substring(S+2).replace(/[\s<].*/,""),i.error("end tag name: "+x+" is not complete:"+O.tagName),k=S+1+x.length):x.match(/\s</)&&(x=x.replace(/[\s<].*/,""),i.error("end tag name: "+x+" maybe not complete"),k=S+1+x.length);var P=O.localNSMap,R=O.tagName==x;if(R||O.tagName&&O.tagName.toLowerCase()==x.toLowerCase()){if(r.endElement(O.uri,O.localName,x),P)for(var A in P)r.endPrefixMapping(A);R||i.fatalError("end tag name: "+x+" is not match the current start tagName:"+O.tagName)}else _.push(O);k++;break;case"?":b&&y(S),k=d(e,S,r);break;case"!":b&&y(S),k=h(e,S,r,i);break;default:b&&y(S);var I=new p,L=_[_.length-1].currentNSMap,j=(k=s(e,S,I,L,o,i),I.length);if(!I.closed&&c(e,k,I.tagName,w)&&(I.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),b&&j){for(var D=a(b,{}),N=0;N<j;N++){var M=I[N];y(M.offset),M.locator=a(b,{})}r.locator=D,u(I,r,L)&&_.push(I),r.locator=b}else u(I,r,L)&&_.push(I);"http://www.w3.org/1999/xhtml"!==I.uri||I.closed?k++:k=l(e,k,I.tagName,o,r)}}catch(e){i.error("element parse error: "+e),k=-1}k>T?T=k:f(Math.max(S,T)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},p.prototype={setTagName:function(e){if(!i.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!i.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},y({},y.prototype)instanceof y||(y=function(e,t){function n(){}for(t in n.prototype=t,n=new n,e)n[t]=e[t];return n}),t.XMLReader=o},function(e,t,n){"use strict";var r=n(371),i=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},o=function(e){var t,n;o.prototype.init.call(this),this.type_=e||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=i(e.dts,n),e.pts=i(e.pts,n),t=e.dts,this.trigger("data",e))},this.flush=function(){n=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};o.prototype=new r,e.exports={TimestampRolloverStream:o,handleRollover:i}},function(e,t,n){"use strict";var r=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,o;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){e={}}}};r.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},r.prototype.push=function(e){this.trigger("data",e)},r.prototype.flush=function(e){this.trigger("done",e)},r.prototype.partialFlush=function(e){this.trigger("partialdone",e)},r.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},r.prototype.reset=function(e){this.trigger("reset",e)},e.exports=r},function(e,t,n){"use strict";var r=n(188),i=function(e){var t=31&e[1];return t<<=8,t|=e[2]},o=function(e){return!!(64&e[1])},a=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},s=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};e.exports={parseType:function(e,t){var n=i(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=o(e),n=4+a(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=o(e),r=4+a(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var s=12+((15&e[r+10])<<8|e[r+11]);s<i;){var u=r+s;t[(31&e[u+1])<<8|e[u+2]]=e[u],s+=5+((15&e[u+3])<<8|e[u+4])}return t}},parsePayloadUnitStartIndicator:o,parsePesType:function(e,t){switch(t[i(e)]){case r.H264_STREAM_TYPE:return"video";case r.ADTS_STREAM_TYPE:return"audio";case r.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!o(e))return null;var t=4+a(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+a(e),n=e.subarray(t),r=0,i=0,o=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),o}}},function(e,t,n){"use strict";var r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},o=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=i(e,t),o(e,t))},a=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]};e.exports={isLikelyAacData:function(e){var t=o(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:i,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return r[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=a(e.subarray(10,14)));do{if((n=a(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,i))){var o=r.subarray(i+1),s=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return s*=4,s+=3&o[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}}},function(e,t,n){var r=n(102).toUnsigned,i=n(189),o=function(e,t){var n,a,s,u,l,c=[];if(!t.length)return null;for(n=0;n<e.byteLength;)a=r(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),s=i(e.subarray(n+4,n+8)),u=a>1?n+a:e.byteLength,s===t[0]&&(1===t.length?c.push(e.subarray(n+8,u)):(l=o(e.subarray(n+8,u),t.slice(1))).length&&(c=c.concat(l))),n=u;return c};e.exports=o},function(e,t){e.exports=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),o&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r}},function(e,t,n){var r=n(377);e.exports=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),o=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],u=2&n.flags[1],l=4&n.flags[1],c=8&n.flags[1],f=i.getUint32(4),h=8;for(o&&(n.dataOffset=i.getInt32(h),h+=4),a&&f&&(t={flags:r(e.subarray(h,h+4))},h+=4,s&&(t.duration=i.getUint32(h),h+=4),u&&(t.size=i.getUint32(h),h+=4),c&&(1===n.version?t.compositionTimeOffset=i.getInt32(h):t.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(t),f--);f--;)t={},s&&(t.duration=i.getUint32(h),h+=4),u&&(t.size=i.getUint32(h),h+=4),l&&(t.flags=r(e.subarray(h,h+4)),h+=4),c&&(1===n.version?t.compositionTimeOffset=i.getInt32(h):t.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(t);return n}},function(e,t){e.exports=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}},function(e,t,n){var r=n(102).toUnsigned;e.exports=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:r(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=r(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r=n(14),i=n(185),o=n(161),a=n(33);for(var s in i){var u=r[s],l=u&&u.prototype;if(l&&l.forEach!==o)try{a(l,"forEach",o)}catch(e){l.forEach=o}}},function(e,t,n){var r=n(6),i=n(389);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(e,t,n){var r=n(14),i=n(101).trim,o=n(130),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");e.exports=u?function(e,t){var n=i(String(e));return a(n,t>>>0||(s.test(n)?16:10))}:a},function(e,t,n){"use strict";var r,i=n(14),o=n(92),a=n(57),s=n(169),u=n(391),l=n(18),c=n(38).enforce,f=n(149),h=!i.ActiveXObject&&"ActiveXObject"in i,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},y=e.exports=s("WeakMap",p,u,!0,!0);if(f&&h){r=u.getConstructor(p,"WeakMap",!0),a.REQUIRED=!0;var m=y.prototype,g=m.delete,v=m.has,b=m.get,_=m.set;o(m,{delete:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),g.call(this,e)||t.frozen.delete(e)}return g.call(this,e)},has:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),v.call(this,e)||t.frozen.has(e)}return v.call(this,e)},get:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),v.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(l(e)&&!d(e)){var n=c(this);n.frozen||(n.frozen=new r),v.call(this,e)?_.call(this,e,t):n.frozen.set(e,t)}else _.call(this,e,t);return this}})}},function(e,t,n){"use strict";var r=n(92),i=n(57).getWeakData,o=n(25),a=n(18),s=n(91),u=n(53),l=n(47),c=n(36),f=n(38),h=f.set,d=f.getterFor,p=l.find,y=l.findIndex,m=0,g=function(e){return e.frozen||(e.frozen=new v)},v=function(){this.entries=[]},b=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};v.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=y(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,l){var f=e((function(e,r){s(e,f,t),h(e,{type:t,id:m++,frozen:void 0}),null!=r&&u(r,e[l],e,n)})),p=d(t),y=function(e,t,n){var r=p(e),a=i(o(t),!0);return!0===a?g(r).set(t,n):a[r.id]=n,e};return r(f.prototype,{delete:function(e){var t=p(this);if(!a(e))return!1;var n=i(e);return!0===n?g(t).delete(e):n&&c(n,t.id)&&delete n[t.id]},has:function(e){var t=p(this);if(!a(e))return!1;var n=i(e);return!0===n?g(t).has(e):n&&c(n,t.id)}}),r(f.prototype,n?{get:function(e){var t=p(this);if(a(e)){var n=i(e);return!0===n?g(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return y(this,e,t)}}:{add:function(e){return y(this,e,!0)}}),f}}},function(e,t,n){var r=n(17),i=n(27).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/;r&&!("name"in o)&&i(o,"name",{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";
63
+ t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+e[t+f],f+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=h,c-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=l}return(d?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u,l=8*o-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[n+d]=255&a,d+=p,a/=256,l-=8);e[n+d-p]|=128*y}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){var n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function o(){}function a(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function s(e,t,n,r,i,o){for(var a,s=++t,u=0;;){var l=e.charAt(s);switch(l){case"=":if(1===u)a=e.slice(t,s),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(o.warning('attribute value must after "="'),a=e.slice(t,s)),t=s+1,!((s=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");c=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,c,t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');c=e.slice(t,s).replace(/&#?\w+;/g,i),n.add(a,c,t),o.warning('attribute "'+a+'" missed start quot('+l+")!!"),t=s+1,u=5}break;case"/":switch(u){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:u=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==u&&n.setTagName(e.slice(t,s)),s;case">":switch(u){case 0:n.setTagName(e.slice(t,s));case 5:case 6:case 7:break;case 4:case 1:"/"===(c=e.slice(t,s)).slice(-1)&&(n.closed=!0,c=c.slice(0,-1));case 2:2===u&&(c=a),4==u?(o.warning('attribute "'+c+'" missed quot(")!!'),n.add(a,c.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&c.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),n.add(c,c,t));break;case 3:throw new Error("attribute value missed!!")}return s;case"€":l=" ";default:if(l<=" ")switch(u){case 0:n.setTagName(e.slice(t,s)),u=6;break;case 1:a=e.slice(t,s),u=2;break;case 4:var c=e.slice(t,s).replace(/&#?\w+;/g,i);o.warning('attribute "'+c+'" missed quot(")!!'),n.add(a,c,t);case 5:u=6}else switch(u){case 2:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&a.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),n.add(a,a,t),t=s,u=1;break;case 5:o.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=s;break;case 3:u=4,t=s;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}s++}}function u(e,t,n){for(var r=e.tagName,i=null,o=e.length;o--;){var a=e[o],s=a.qName,u=a.value;if((d=s.indexOf(":"))>0)var l=a.prefix=s.slice(0,d),c=s.slice(d+1),h="xmlns"===l&&c;else c=s,l=null,h="xmlns"===s&&"";a.localName=c,!1!==h&&(null==i&&(i={},f(n,n={})),n[h]=i[h]=u,a.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,u))}for(o=e.length;o--;){(l=(a=e[o]).prefix)&&("xml"===l&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(a.uri=n[l||""]))}var d;(d=r.indexOf(":"))>0?(l=e.prefix=r.slice(0,d),c=e.localName=r.slice(d+1)):(l=null,c=e.localName=r);var p=e.uri=n[l||""];if(t.startElement(p,c,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(p,c,r),i)for(l in i)t.endPrefixMapping(l)}function l(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("</"+n+">",t),a=e.substring(t+1,o);if(/[&<]/.test(a))return/^script$/i.test(n)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,r),i.characters(a,0,a.length),o)}return t+1}function c(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function f(e,t){for(var n in e)t[n]=e[n]}function h(e,t,n,r){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var o=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],u=a>3&&/^public$/i.test(o[2][0])&&o[3][0],l=a>4&&o[4][0],c=o[a-1];return n.startDTD(s,u&&u.replace(/^(['"])(.*?)\1$/,"$2"),l&&l.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}function d(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function p(e){}function y(e,t){return e.__proto__=t,e}o.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),f(t,t={}),function(e,t,n,r,i){function o(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function f(t){if(t>T){var n=e.substring(T,t).replace(/&#?\w+;/g,o);b&&y(T),r.characters(n,0,t-T),T=t}}function y(t,n){for(;t>=g&&(n=v.exec(e));)m=n.index,g=m+n[0].length,b.lineNumber++;b.columnNumber=t-m+1}var m=0,g=0,v=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,_=[{currentNSMap:t}],w={},T=0;for(;;){try{var S=e.indexOf("<",T);if(S<0){if(!e.substr(T).match(/^\s*$/)){var E=r.doc,C=E.createTextNode(e.substr(T));E.appendChild(C),r.currentElement=C}return}switch(S>T&&f(S),e.charAt(S+1)){case"/":var k=e.indexOf(">",S+3),x=e.substring(S+2,k),O=_.pop();k<0?(x=e.substring(S+2).replace(/[\s<].*/,""),i.error("end tag name: "+x+" is not complete:"+O.tagName),k=S+1+x.length):x.match(/\s</)&&(x=x.replace(/[\s<].*/,""),i.error("end tag name: "+x+" maybe not complete"),k=S+1+x.length);var P=O.localNSMap,R=O.tagName==x;if(R||O.tagName&&O.tagName.toLowerCase()==x.toLowerCase()){if(r.endElement(O.uri,O.localName,x),P)for(var A in P)r.endPrefixMapping(A);R||i.fatalError("end tag name: "+x+" is not match the current start tagName:"+O.tagName)}else _.push(O);k++;break;case"?":b&&y(S),k=d(e,S,r);break;case"!":b&&y(S),k=h(e,S,r,i);break;default:b&&y(S);var I=new p,L=_[_.length-1].currentNSMap,j=(k=s(e,S,I,L,o,i),I.length);if(!I.closed&&c(e,k,I.tagName,w)&&(I.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),b&&j){for(var D=a(b,{}),N=0;N<j;N++){var M=I[N];y(M.offset),M.locator=a(b,{})}r.locator=D,u(I,r,L)&&_.push(I),r.locator=b}else u(I,r,L)&&_.push(I);"http://www.w3.org/1999/xhtml"!==I.uri||I.closed?k++:k=l(e,k,I.tagName,o,r)}}catch(e){i.error("element parse error: "+e),k=-1}k>T?T=k:f(Math.max(S,T)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},p.prototype={setTagName:function(e){if(!i.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!i.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},y({},y.prototype)instanceof y||(y=function(e,t){function n(){}for(t in n.prototype=t,n=new n,e)n[t]=e[t];return n}),t.XMLReader=o},function(e,t,n){"use strict";var r=n(371),i=function(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=8589934592*n;return e},o=function(e){var t,n;o.prototype.init.call(this),this.type_=e||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===n&&(n=e.dts),e.dts=i(e.dts,n),e.pts=i(e.pts,n),t=e.dts,this.trigger("data",e))},this.flush=function(){n=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};o.prototype=new r,e.exports={TimestampRolloverStream:o,handleRollover:i}},function(e,t,n){"use strict";var r=function(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var r;return!!e[t]&&(r=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(r,1),r>-1)},this.trigger=function(t){var n,r,i,o;if(n=e[t])if(2===arguments.length)for(i=n.length,r=0;r<i;++r)n[r].call(this,arguments[1]);else{for(o=[],r=arguments.length,r=1;r<arguments.length;++r)o.push(arguments[r]);for(i=n.length,r=0;r<i;++r)n[r].apply(this,o)}},this.dispose=function(){e={}}}};r.prototype.pipe=function(e){return this.on("data",(function(t){e.push(t)})),this.on("done",(function(t){e.flush(t)})),this.on("partialdone",(function(t){e.partialFlush(t)})),this.on("endedtimeline",(function(t){e.endTimeline(t)})),this.on("reset",(function(t){e.reset(t)})),e},r.prototype.push=function(e){this.trigger("data",e)},r.prototype.flush=function(e){this.trigger("done",e)},r.prototype.partialFlush=function(e){this.trigger("partialdone",e)},r.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},r.prototype.reset=function(e){this.trigger("reset",e)},e.exports=r},function(e,t,n){"use strict";var r=n(188),i=function(e){var t=31&e[1];return t<<=8,t|=e[2]},o=function(e){return!!(64&e[1])},a=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},s=function(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}};e.exports={parseType:function(e,t){var n=i(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var t=o(e),n=4+a(e);return t&&(n+=e[n]+1),(31&e[n+10])<<8|e[n+11]},parsePmt:function(e){var t={},n=o(e),r=4+a(e);if(n&&(r+=e[r]+1),1&e[r+5]){var i;i=3+((15&e[r+1])<<8|e[r+2])-4;for(var s=12+((15&e[r+10])<<8|e[r+11]);s<i;){var u=r+s;t[(31&e[u+1])<<8|e[u+2]]=e[u],s+=5+((15&e[u+3])<<8|e[u+4])}return t}},parsePayloadUnitStartIndicator:o,parsePesType:function(e,t){switch(t[i(e)]){case r.H264_STREAM_TYPE:return"video";case r.ADTS_STREAM_TYPE:return"audio";case r.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!o(e))return null;var t=4+a(e);if(t>=e.byteLength)return null;var n,r=null;return 192&(n=e[t+7])&&((r={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,r.pts*=4,r.pts+=(6&e[t+13])>>>1,r.dts=r.pts,64&n&&(r.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,r.dts*=4,r.dts+=(6&e[t+18])>>>1)),r},videoPacketContainsKeyFrame:function(e){for(var t=4+a(e),n=e.subarray(t),r=0,i=0,o=!1;i<n.byteLength-3;i++)if(1===n[i+2]){r=i+5;break}for(;r<n.byteLength;)switch(n[r]){case 0:if(0!==n[r-1]){r+=2;break}if(0!==n[r-2]){r++;break}i+3!==r-2&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0);do{r++}while(1!==n[r]&&r<n.length);i=r-2,r+=3;break;case 1:if(0!==n[r-1]||0!==n[r-2]){r+=3;break}"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),i=r-2,r+=3;break;default:r+=3}return n=n.subarray(i),r-=i,i=0,n&&n.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===s(31&n[i+3])&&(o=!0),o}}},function(e,t,n){"use strict";var r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=function(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=n>=0?n:0,(16&e[t+5])>>4?n+20:n+10},o=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=i(e,t),o(e,t))},a=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]};e.exports={isLikelyAacData:function(e){var t=o(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:i,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,r=e[t+4]<<3;return 6144&e[t+3]|r|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return r[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,n,r;t=10,64&e[5]&&(t+=4,t+=a(e.subarray(10,14)));do{if((n=a(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){r=e.subarray(t+10,t+n+10);for(var i=0;i<r.byteLength;i++)if(0===r[i]){if("com.apple.streaming.transportStreamTimestamp"===unescape(function(e,t,n){var r,i="";for(r=t;r<n;r++)i+="%"+("00"+e[r].toString(16)).slice(-2);return i}(r,0,i))){var o=r.subarray(i+1),s=(1&o[3])<<30|o[4]<<22|o[5]<<14|o[6]<<6|o[7]>>>2;return s*=4,s+=3&o[7]}break}}t+=10,t+=n}while(t<e.byteLength);return null}}},function(e,t,n){var r=n(102).toUnsigned,i=n(189),o=function(e,t){var n,a,s,u,l,c=[];if(!t.length)return null;for(n=0;n<e.byteLength;)a=r(e[n]<<24|e[n+1]<<16|e[n+2]<<8|e[n+3]),s=i(e.subarray(n+4,n+8)),u=a>1?n+a:e.byteLength,s===t[0]&&(1===t.length?c.push(e.subarray(n+8,u)):(l=o(e.subarray(n+8,u),t.slice(1))).length&&(c=c.concat(l))),n=u;return c};e.exports=o},function(e,t){e.exports=function(e){var t,n=new DataView(e.buffer,e.byteOffset,e.byteLength),r={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:n.getUint32(4)},i=1&r.flags[2],o=2&r.flags[2],a=8&r.flags[2],s=16&r.flags[2],u=32&r.flags[2],l=65536&r.flags[0],c=131072&r.flags[0];return t=8,i&&(t+=4,r.baseDataOffset=n.getUint32(12),t+=4),o&&(r.sampleDescriptionIndex=n.getUint32(t),t+=4),a&&(r.defaultSampleDuration=n.getUint32(t),t+=4),s&&(r.defaultSampleSize=n.getUint32(t),t+=4),u&&(r.defaultSampleFlags=n.getUint32(t)),l&&(r.durationIsEmpty=!0),!i&&c&&(r.baseDataOffsetIsMoof=!0),r}},function(e,t,n){var r=n(377);e.exports=function(e){var t,n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},i=new DataView(e.buffer,e.byteOffset,e.byteLength),o=1&n.flags[2],a=4&n.flags[2],s=1&n.flags[1],u=2&n.flags[1],l=4&n.flags[1],c=8&n.flags[1],f=i.getUint32(4),h=8;for(o&&(n.dataOffset=i.getInt32(h),h+=4),a&&f&&(t={flags:r(e.subarray(h,h+4))},h+=4,s&&(t.duration=i.getUint32(h),h+=4),u&&(t.size=i.getUint32(h),h+=4),c&&(1===n.version?t.compositionTimeOffset=i.getInt32(h):t.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(t),f--);f--;)t={},s&&(t.duration=i.getUint32(h),h+=4),u&&(t.size=i.getUint32(h),h+=4),l&&(t.flags=r(e.subarray(h,h+4)),h+=4),c&&(1===n.version?t.compositionTimeOffset=i.getInt32(h):t.compositionTimeOffset=i.getUint32(h),h+=4),n.samples.push(t);return n}},function(e,t){e.exports=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}}},function(e,t,n){var r=n(102).toUnsigned;e.exports=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:r(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=r(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t}},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r=n(14),i=n(185),o=n(161),a=n(33);for(var s in i){var u=r[s],l=u&&u.prototype;if(l&&l.forEach!==o)try{a(l,"forEach",o)}catch(e){l.forEach=o}}},function(e,t,n){var r=n(6),i=n(389);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(e,t,n){var r=n(14),i=n(101).trim,o=n(130),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");e.exports=u?function(e,t){var n=i(String(e));return a(n,t>>>0||(s.test(n)?16:10))}:a},function(e,t,n){"use strict";var r,i=n(14),o=n(92),a=n(57),s=n(169),u=n(391),l=n(18),c=n(39).enforce,f=n(149),h=!i.ActiveXObject&&"ActiveXObject"in i,d=Object.isExtensible,p=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},y=e.exports=s("WeakMap",p,u,!0,!0);if(f&&h){r=u.getConstructor(p,"WeakMap",!0),a.REQUIRED=!0;var m=y.prototype,g=m.delete,v=m.has,b=m.get,_=m.set;o(m,{delete:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),g.call(this,e)||t.frozen.delete(e)}return g.call(this,e)},has:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),v.call(this,e)||t.frozen.has(e)}return v.call(this,e)},get:function(e){if(l(e)&&!d(e)){var t=c(this);return t.frozen||(t.frozen=new r),v.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(l(e)&&!d(e)){var n=c(this);n.frozen||(n.frozen=new r),v.call(this,e)?_.call(this,e,t):n.frozen.set(e,t)}else _.call(this,e,t);return this}})}},function(e,t,n){"use strict";var r=n(92),i=n(57).getWeakData,o=n(25),a=n(18),s=n(91),u=n(53),l=n(47),c=n(36),f=n(39),h=f.set,d=f.getterFor,p=l.find,y=l.findIndex,m=0,g=function(e){return e.frozen||(e.frozen=new v)},v=function(){this.entries=[]},b=function(e,t){return p(e.entries,(function(e){return e[0]===t}))};v.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=y(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,l){var f=e((function(e,r){s(e,f,t),h(e,{type:t,id:m++,frozen:void 0}),null!=r&&u(r,e[l],e,n)})),p=d(t),y=function(e,t,n){var r=p(e),a=i(o(t),!0);return!0===a?g(r).set(t,n):a[r.id]=n,e};return r(f.prototype,{delete:function(e){var t=p(this);if(!a(e))return!1;var n=i(e);return!0===n?g(t).delete(e):n&&c(n,t.id)&&delete n[t.id]},has:function(e){var t=p(this);if(!a(e))return!1;var n=i(e);return!0===n?g(t).has(e):n&&c(n,t.id)}}),r(f.prototype,n?{get:function(e){var t=p(this);if(a(e)){var n=i(e);return!0===n?g(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return y(this,e,t)}}:{add:function(e){return y(this,e,!0)}}),f}}},function(e,t,n){var r=n(17),i=n(27).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/;r&&!("name"in o)&&i(o,"name",{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";
64
64
  /** @license React v16.11.0
65
65
  * react-dom.production.min.js
66
66
  *
@@ -119,4 +119,4 @@ var o=null,a=function(){function e(e){var t,n,r;o||(o=function(){var e,t,n,r,i,o
119
119
  /*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */
120
120
  var e;i(null,(e=l).subarray(0,e.byteLength-e[e.byteLength-1]))}))}return e.prototype.decryptChunk_=function(e,t,n,r){return function(){var i=function(e,t,n){var r,i,o,s,l,c,f,h,d,p=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),y=new a(Array.prototype.slice.call(t)),m=new Uint8Array(e.byteLength),g=new Int32Array(m.buffer);for(r=n[0],i=n[1],o=n[2],s=n[3],d=0;d<p.length;d+=4)l=u(p[d]),c=u(p[d+1]),f=u(p[d+2]),h=u(p[d+3]),y.decrypt(l,c,f,h,g,d),g[d]=u(g[d]^r),g[d+1]=u(g[d+1]^i),g[d+2]=u(g[d+2]^o),g[d+3]=u(g[d+3]^s),r=l,i=c,o=f,s=h;return m}(e,t,n);r.set(i,e.byteOffset)}},t(e,null,[{key:"STEP",get:function(){return 32e3}}]),e}();new function(e){e.onmessage=function(t){var n=t.data,r=new Uint8Array(n.encrypted.bytes,n.encrypted.byteOffset,n.encrypted.byteLength),i=new Uint32Array(n.key.bytes,n.key.byteOffset,n.key.byteLength/4),o=new Uint32Array(n.iv.bytes,n.iv.byteOffset,n.iv.byteLength/4);new l(r,i,o,(function(t,r){var i,o;e.postMessage((i={source:n.source,decrypted:r},o={},Object.keys(i).forEach((function(e){var t=i[e];ArrayBuffer.isView(t)?o[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:o[e]=t})),o),[r.buffer])}))}}(n)}()})),gu=function(e){var t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},vu=function(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},bu=function(e,t){t.activePlaylistLoader=e,e.load()},_u={AUDIO:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e],i=t.blacklistCurrentPlaylist;vu(n,r);var o=r.activeTrack(),a=r.activeGroup(),s=(a.filter((function(e){return e.default}))[0]||a[0]).id,u=r.tracks[s];if(o!==u){for(var l in zo.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),r.tracks)r.tracks[l].enabled=r.tracks[l]===u;r.onTrackChanged()}else i({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(e,t){return function(){var n=t.segmentLoaders[e],r=t.mediaTypes[e];zo.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),vu(n,r);var i=r.activeTrack();i&&(i.mode="disabled"),r.onTrackChanged()}}},wu={AUDIO:function(e,t,n){if(t){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",_u[e](e,n))}},SUBTITLES:function(e,t,n){var r=n.tech,i=n.requestOptions,o=n.segmentLoaders[e],a=n.mediaTypes[e];t.on("loadedmetadata",(function(){var e=t.media();o.playlist(e,i),o.track(a.activeTrack()),(!r.paused()||e.endList&&"none"!==r.preload())&&o.load()})),t.on("loadedplaylist",(function(){o.playlist(t.media(),i),r.paused()||o.load()})),t.on("error",_u[e](e,n))}},Tu={AUDIO:function(e,t){var n=t.vhs,r=t.sourceType,i=t.segmentLoaders[e],o=t.requestOptions,a=t.master,s=a.mediaGroups,u=a.playlists,l=t.mediaTypes[e],c=l.groups,f=l.tracks,h=t.masterPlaylistLoader;s[e]&&0!==Object.keys(s[e]).length||(s[e]={main:{default:{default:!0}}});var d=function(i){c[i]||(c[i]=[]);var a=u.filter((function(t){return t.attributes[e]===i})),l=function(u){var l=s[e][i][u];!a.filter((function(e){return e.resolvedUri!==l.resolvedUri})).length&&a.length&&delete l.resolvedUri;var d=void 0;if(d="vhs-json"===r&&l.playlists?new aa(l.playlists[0],n,o):l.resolvedUri?new aa(l.resolvedUri,n,o):l.playlists&&"dash"===r?new qa(l.playlists[0],n,o,h):null,l=zo.mergeOptions({id:u,playlistLoader:d},l),wu[e](e,l.playlistLoader,t),c[i].push(l),void 0===f[u]){var p=new zo.AudioTrack({id:u,kind:gu(l),enabled:!1,language:l.language,default:l.default,label:u});f[u]=p}};for(var d in s[e][i])l(d)};for(var p in s[e])d(p);i.on("error",_u[e](e,t))},SUBTITLES:function(e,t){var n=t.tech,r=t.vhs,i=t.sourceType,o=t.segmentLoaders[e],a=t.requestOptions,s=t.master.mediaGroups,u=t.mediaTypes[e],l=u.groups,c=u.tracks,f=t.masterPlaylistLoader;for(var h in s[e])for(var d in l[h]||(l[h]=[]),s[e][h])if(!s[e][h][d].forced){var p=s[e][h][d],y=void 0;if("hls"===i)y=new aa(p.resolvedUri,r,a);else if("dash"===i){if(!p.playlists.filter((function(e){return e.excludeUntil!==1/0})).length)return;y=new qa(p.playlists[0],r,a,f)}else"vhs-json"===i&&(y=new aa(p.playlists?p.playlists[0]:p.resolvedUri,r,a));if(p=zo.mergeOptions({id:d,playlistLoader:y},p),wu[e](e,p.playlistLoader,t),l[h].push(p),void 0===c[d]){var m=n.addRemoteTextTrack({id:d,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:d},!1).track;c[d]=m}}o.on("error",_u[e](e,t))},"CLOSED-CAPTIONS":function(e,t){var n=t.tech,r=t.master.mediaGroups,i=t.mediaTypes[e],o=i.groups,a=i.tracks;for(var s in r[e])for(var u in o[s]||(o[s]=[]),r[e][s]){var l=r[e][s][u];if(l.instreamId.match(/CC\d/)&&(o[s].push(zo.mergeOptions({id:u},l)),void 0===a[u])){var c=n.addRemoteTextTrack({id:l.instreamId,kind:"captions",default:l.default&&l.autoselect,language:l.language,label:u},!1).track;a[u]=c}}}},Su={AUDIO:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if(n[r].enabled)return n[r];return null}},SUBTITLES:function(e,t){return function(){var n=t.mediaTypes[e].tracks;for(var r in n)if("showing"===n[r].mode||"hidden"===n[r].mode)return n[r];return null}}},Eu=function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(t){Tu[t](t,e)}));var t=e.mediaTypes,n=e.masterPlaylistLoader,r=e.tech,i=e.vhs;["AUDIO","SUBTITLES"].forEach((function(n){t[n].activeGroup=function(e,t){return function(n){var r=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,o=r.media();if(!o)return null;var a=null;return o.attributes[e]&&(a=i[o.attributes[e]]),a=a||i.main,void 0===n?a:null===n?null:a.filter((function(e){return e.id===n.id}))[0]||null}}(n,e),t[n].activeTrack=Su[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;vu(r,o),s&&(s.playlistLoader?(r.resyncLoader(),bu(s.playlistLoader,o)):u&&i.resetEverything())}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var n=t.segmentLoaders,r=n[e],i=n.main,o=t.mediaTypes[e],a=o.activeTrack(),s=o.activeGroup(a),u=o.activePlaylistLoader;if(vu(r,o),s){if("AUDIO"===e){if(!s.playlistLoader)return i.setAudio(!0),void i.resetEverything();r.setAudio(!0),i.setAudio(!1)}u!==s.playlistLoader?(r.track&&r.track(a),r.resetEverything(),bu(s.playlistLoader,o)):bu(s.playlistLoader,o)}}}(n,e)}));var o=t.AUDIO.activeGroup();if(o){var a=(o.filter((function(e){return e.default}))[0]||o[0]).id;t.AUDIO.tracks[a].enabled=!0,t.AUDIO.onTrackChanged()}n.on("mediachange",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanged()}))})),n.on("mediachanging",(function(){["AUDIO","SUBTITLES"].forEach((function(e){return t[e].onGroupChanging()}))}));var s=function(){t.AUDIO.onTrackChanged(),r.trigger({type:"usage",name:"vhs-audio-change"}),r.trigger({type:"usage",name:"hls-audio-change"})};for(var u in r.audioTracks().addEventListener("change",s),r.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),i.on("dispose",(function(){r.audioTracks().removeEventListener("change",s),r.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),r.clearTracks("audio"),t.AUDIO.tracks)r.audioTracks().addTrack(t.AUDIO.tracks[u])},Cu=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],ku=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]},xu=function(e){function t(t){var n;n=e.call(this)||this;var r,i=t.src,o=t.handleManifestRedirects,s=t.withCredentials,u=t.tech,l=t.bandwidth,c=t.externVhs,f=t.useCueTags,d=t.blacklistDuration,p=t.enableLowInitialPlaylist,y=t.sourceType,m=t.cacheEncryptionKeys,g=t.handlePartialData,v=t.experimentalBufferBasedABR;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");zs=c,n.experimentalBufferBasedABR=Boolean(v),n.withCredentials=s,n.tech_=u,n.vhs_=u.vhs,n.sourceType_=y,n.useCueTags_=f,n.blacklistDuration=d,n.enableLowInitialPlaylist=p,n.useCueTags_&&(n.cueTagsTrack_=n.tech_.addTextTrack("metadata","ad-cues"),n.cueTagsTrack_.inBandMetadataTrackDispatchType=""),n.requestOptions_={withCredentials:s,handleManifestRedirects:o,timeout:null},n.on("error",n.pauseLoading),n.mediaTypes_=(r={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((function(e){r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Hs,activeTrack:Hs,onGroupChanged:Hs,onTrackChanged:Hs}})),r),n.mediaSource=new a.a.MediaSource,n.handleDurationChange_=n.handleDurationChange_.bind(h()(n)),n.handleSourceOpen_=n.handleSourceOpen_.bind(h()(n)),n.handleSourceEnded_=n.handleSourceEnded_.bind(h()(n)),n.mediaSource.addEventListener("durationchange",n.handleDurationChange_),n.mediaSource.addEventListener("sourceopen",n.handleSourceOpen_),n.mediaSource.addEventListener("sourceended",n.handleSourceEnded_),n.seekable_=zo.createTimeRanges(),n.hasPlayed_=!1,n.syncController_=new pu(t),n.segmentMetadataTrack_=u.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,n.decrypter_=new mu,n.sourceUpdater_=new uu(n.mediaSource),n.inbandTextTracks_={},n.timelineChangeController_=new yu;var b={vhs:n.vhs_,mediaSource:n.mediaSource,currentTime:n.tech_.currentTime.bind(n.tech_),seekable:function(){return n.seekable()},seeking:function(){return n.tech_.seeking()},duration:function(){return n.duration()},hasPlayed:function(){return n.hasPlayed_},goalBufferLength:function(){return n.goalBufferLength()},bandwidth:l,syncController:n.syncController_,decrypter:n.decrypter_,sourceType:n.sourceType_,inbandTextTracks:n.inbandTextTracks_,cacheEncryptionKeys:m,handlePartialData:g,sourceUpdater:n.sourceUpdater_,timelineChangeController:n.timelineChangeController_};return n.masterPlaylistLoader_="dash"===n.sourceType_?new qa(i,n.vhs_,n.requestOptions_):new aa(i,n.vhs_,n.requestOptions_),n.setupMasterPlaylistLoaderListeners_(),n.mainSegmentLoader_=new Vs(zo.mergeOptions(b,{segmentMetadataTrack:n.segmentMetadataTrack_,loaderType:"main"}),t),n.audioSegmentLoader_=new Vs(zo.mergeOptions(b,{loaderType:"audio"}),t),n.subtitleSegmentLoader_=new fu(zo.mergeOptions(b,{loaderType:"vtt",featuresNativeTextTracks:n.tech_.featuresNativeTextTracks}),t),n.setupSegmentLoaderListeners_(),n.experimentalBufferBasedABR&&(n.masterPlaylistLoader_.one("loadedplaylist",(function(){return n.startABRTimer_()})),n.tech_.on("pause",(function(){return n.stopABRTimer_()})),n.tech_.on("play",(function(){return n.startABRTimer_()}))),Cu.forEach((function(e){n[e+"_"]=ku.bind(h()(n),e)})),n.logger_=Cs("MPC"),n.triggeredFmp4Usage=!1,n.masterPlaylistLoader_.load(),n}p()(t,e);var n=t.prototype;return n.checkABR_=function(){var e=this.selectPlaylist();this.shouldSwitchToMedia_(e)&&this.masterPlaylistLoader_.media(e)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=a.a.setInterval((function(){return e.checkABR_()}),250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(a.a.clearInterval(this.abrTimer_),this.abrTimer_=null)},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Ta(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),Eu({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(function(){e.trigger("selectedinitialmedia")}))})),this.masterPlaylistLoader_.on("loadedplaylist",(function(){var t=e.masterPlaylistLoader_.media();if(!t){var n;if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(n=e.selectInitialPlaylist()),n||(n=e.selectPlaylist()),!n||!e.shouldSwitchToMedia_(n))return;if(e.initialMedia_=n,e.masterPlaylistLoader_.media(e.initialMedia_),!("vhs-json"===e.sourceType_&&e.initialMedia_.segments))return;t=e.initialMedia_}e.handleUpdatedMediaPlaylist(t)})),this.masterPlaylistLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)})),this.masterPlaylistLoader_.on("mediachanging",(function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()})),this.masterPlaylistLoader_.on("mediachange",(function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;Ta(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})})),this.masterPlaylistLoader_.on("playlistunchanged",(function(){var t=e.masterPlaylistLoader_.media();e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating."}),e.tech_.trigger("playliststuck"))})),this.masterPlaylistLoader_.on("renditiondisabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})})),this.masterPlaylistLoader_.on("renditionenabled",(function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})}))},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var n=e.mediaGroups||{},r=!0,i=Object.keys(n.AUDIO);for(var o in n.AUDIO)for(var a in n.AUDIO[o]){n.AUDIO[o][a].uri||(r=!1)}r&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),zs.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),i.length&&Object.keys(n.AUDIO[i[0]]).length>1&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(e){var t=this.masterPlaylistLoader_.media(),n=this.tech_.buffered();return function(e){var t=e.currentPlaylist,n=e.nextPlaylist,r=e.forwardBuffer,i=e.bufferLowWaterLine,o=e.bufferHighWaterLine,a=e.duration,s=e.experimentalBufferBasedABR,u=e.log;if(!n)return zo.log.warn("We received no playlist to switch to. Please check your stream."),!1;var l="allowing switch "+(t&&t.id||"null")+" -> "+n.id;if(!t||!t.endList)return u(l+" as current playlist "+(t?"is live":"is not set")),!0;if(n.id===t.id)return!1;var c=s?Wa.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Wa.MAX_BUFFER_LOW_WATER_LINE;if(a<c)return u(l+" as duration < max low water line ("+a+" < "+c+")"),!0;var f=n.attributes.BANDWIDTH,h=t.attributes.BANDWIDTH;if(f<h&&(!s||r<o)){var d=l+" as next bandwidth < current bandwidth ("+f+" < "+h+")";return s&&(d+=" and forwardBuffer < bufferHighWaterLine ("+r+" < "+o+")"),u(d),!0}if((!s||f>h)&&r>=i){var p=l+" as forwardBuffer >= bufferLowWaterLine ("+r+" >= "+i+")";return s&&(p+=" and next bandwidth > current bandwidth ("+f+" > "+h+")"),u(p),!0}return u("not "+l+" as no switching criteria met"),!1}({currentPlaylist:t,nextPlaylist:e,forwardBuffer:n.length?n.end(n.length-1)-this.tech_.currentTime():0,bufferLowWaterLine:this.bufferLowWaterLine(),bufferHighWaterLine:this.bufferHighWaterLine(),duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",(function(){var t=e.selectPlaylist();e.shouldSwitchToMedia_(t)&&e.masterPlaylistLoader_.media(t),e.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("progress",(function(){e.trigger("progress")}))),this.mainSegmentLoader_.on("error",(function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())})),this.mainSegmentLoader_.on("appenderror",(function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(function(){e.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")})),this.mainSegmentLoader_.on("ended",(function(){e.logger_("main segment loader ended"),e.onEndOfStream()})),this.mainSegmentLoader_.on("earlyabort",(function(t){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))}));var t=function(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)};this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()}))},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())},n.fastQualityChange_=function(e){var t=this;void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetEverything((function(){zo.browser.IE_VERSION||zo.browser.IS_EDGE?t.tech_.setCurrentTime(t.tech_.currentTime()+.04):t.tech_.setCurrentTime(t.tech_.currentTime())})))},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var e=this,t=this.masterPlaylistLoader_.media();if(!t||this.tech_.paused()||this.hasPlayed_)return!1;if(!t.endList){var n=this.seekable();if(!n.length)return!1;if(zo.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",(function(){e.trigger("firstplay"),e.tech_.setCurrentTime(n.end(0)),e.hasPlayed_=!0})),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(n.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var e=this.inbandTextTracks_.metadataTrack_.cues;if(e&&e.length){var t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")},n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.currentMediaInfo_||this.mainSegmentLoader_.currentMediaInfo_.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;var t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;var n=zs.Playlist.playlistEnd(e,t),r=this.tech_.currentTime(),i=this.tech_.buffered();if(!i.length)return n-r<=.1;var o=i.end(i.length-1);return o-r<=.1&&n-o<=.1},n.blacklistCurrentPlaylist=function(e,t){void 0===e&&(e={});var n=e.playlist||this.masterPlaylistLoader_.media();if(t=t||e.blacklistDuration||this.blacklistDuration,!n)return this.error=e,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));var r=this.masterPlaylistLoader_.master.playlists,i=r.filter(_a),o=1===i.length&&i[0]===n;if(1===r.length&&t!==1/0)return zo.log.warn("Problem encountered with playlist "+n.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(o);if(o){var a=!1;r.forEach((function(e){if(e!==n){var t=e.excludeUntil;void 0!==t&&t!==1/0&&(a=!0,delete e.excludeUntil)}})),a&&(zo.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}n.excludeUntil=Date.now()+1e3*t,this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"});var s=this.selectPlaylist();if(!s)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");var u=e.internal?this.logger_:zo.log.warn,l=e.message?" "+e.message:"";u((e.internal?"Internal problem":"Problem")+" encountered with playlist "+n.id+"."+l+" Switching to playlist "+s.id+"."),s.attributes.AUDIO!==n.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),s.attributes.SUBTITLES!==n.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);var c=s.targetDuration/2*1e3||5e3,f="number"==typeof s.lastRequest&&Date.now()-s.lastRequest<=c;return this.masterPlaylistLoader_.media(s,o||f)},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n=this,r=[],i="all"===e;(i||"main"===e)&&r.push(this.masterPlaylistLoader_);var o=[];(i||"audio"===e)&&o.push("AUDIO"),(i||"subtitle"===e)&&(o.push("CLOSED-CAPTIONS"),o.push("SUBTITLES")),o.forEach((function(e){var t=n.mediaTypes_[e]&&n.mediaTypes_[e].activePlaylistLoader;t&&r.push(t)})),["main","audio","subtitle"].forEach((function(t){var i=n[t+"SegmentLoader_"];!i||e!==t&&"all"!==e||r.push(i)})),r.forEach((function(e){return t.forEach((function(t){"function"==typeof e[t]&&e[t]()}))}))},n.setCurrentTime=function(e){var t=ua(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:zs.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){var e;if(this.masterPlaylistLoader_){var t=this.masterPlaylistLoader_.media();if(t){var n=this.syncController_.getExpiredTime(t,this.duration());if(null!==n){var r=this.masterPlaylistLoader_.master.suggestedPresentationDelay,i=zs.Playlist.seekable(t,n,r);if(0!==i.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(t=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(n=this.syncController_.getExpiredTime(t,this.duration())))return;if(0===(e=zs.Playlist.seekable(t,n,r)).length)return}var o,a;this.seekable_&&this.seekable_.length&&(o=this.seekable_.end(0),a=this.seekable_.start(0)),e?e.start(0)>i.end(0)||i.start(0)>e.end(0)?this.seekable_=i:this.seekable_=zo.createTimeRanges([[e.start(0)>i.start(0)?e.start(0):i.start(0),e.end(0)<i.end(0)?e.end(0):i.end(0)]]):this.seekable_=i,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===o&&this.seekable_.start(0)===a||(this.logger_("seekable updated ["+ca(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){var t=this.seekable();if(!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var n=this.tech_.buffered(),r=zs.Playlist.duration(this.masterPlaylistLoader_.media());n.length>0&&(r=Math.max(r,n.end(n.length-1))),this.mediaSource.duration!==r&&this.sourceUpdater_.setDuration(r)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),["AUDIO","SUBTITLES"].forEach((function(t){var n=e.mediaTypes_[t].groups;for(var r in n)n[r].forEach((function(e){e.playlistLoader&&e.playlistLoader.dispose()}))})),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||e&&!this.audioSegmentLoader_.currentMediaInfo_)},n.getCodecsOrExclude_=function(){var e=this,t={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}};t.video=t.main;var n=Es(this.master(),this.media()),r={},i=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(t.main.hasVideo&&(r.video=n.video||t.main.videoCodec||Be.DEFAULT_VIDEO_CODEC),t.main.isMuxed&&(r.video+=","+(n.audio||t.main.audioCodec||Be.DEFAULT_AUDIO_CODEC)),(t.main.hasAudio&&!t.main.isMuxed||t.audio.hasAudio||i)&&(r.audio=n.audio||t.main.audioCodec||t.audio.audioCodec||Be.DEFAULT_AUDIO_CODEC,t.audio.isFmp4=t.main.hasAudio&&!t.main.isMuxed?t.main.isFmp4:t.audio.isFmp4),r.audio||r.video){var o,a={};if(["video","audio"].forEach((function(e){if(r.hasOwnProperty(e)&&(i=t[e].isFmp4,s=r[e],!(i?Object(Be.browserSupportsCodec)(s):Object(Be.muxerSupportsCodec)(s)))){var n=t[e].isFmp4?"browser":"muxer";a[n]=a[n]||[],a[n].push(r[e]),"audio"===e&&(o=n)}var i,s})),i&&o&&this.media().attributes.AUDIO){var s=this.media().attributes.AUDIO;this.master().playlists.forEach((function(t){(t.attributes&&t.attributes.AUDIO)===s&&t!==e.media()&&(t.excludeUntil=1/0)})),this.logger_("excluding audio group "+s+" as "+o+' does not support codec(s): "'+r.audio+'"')}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var u=[];if(["video","audio"].forEach((function(t){var n=(Object(Be.parseCodecs)(e.sourceUpdater_.codecs[t]||"")[t]||{}).type,i=(Object(Be.parseCodecs)(r[t]||"")[t]||{}).type;n&&i&&n.toLowerCase()!==i.toLowerCase()&&u.push('"'+e.sourceUpdater_.codecs[t]+'" -> "'+r[t]+'"')})),u.length)return void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+u.join(", ")+".",blacklistDuration:1/0,internal:!0})}return r}var l=Object.keys(a).reduce((function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+a[t].join(",")+'"'}),"")+".";this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:l,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var e=this.getCodecsOrExclude_();if(e){this.sourceUpdater_.createSourceBuffers(e);var t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach((function(r){var i=t[r];if(-1===n.indexOf(i.id)){n.push(i.id);var o=Es(e.master,i),a=[];!o.audio||Object(Be.muxerSupportsCodec)(o.audio)||Object(Be.browserSupportsCodec)(o.audio)||(i.excludeUntil=1/0,a.push("audio codec "+o.audio)),!o.video||Object(Be.muxerSupportsCodec)(o.video)||Object(Be.browserSupportsCodec)(o.video)||(i.excludeUntil=1/0,a.push("video codec "+o.video)),o.text&&"stpp.ttml.im1t"===o.text&&(i.excludeUntil=1/0,a.push("text codec "+o.text)),a.length&&e.logger_("excluding "+i.id+" as codecs "+a.join(", ")+" are unsupported")}}))},n.excludeIncompatibleVariants_=function(e){var t=this,n=Object(Be.parseCodecs)(e),r=Object.keys(n).length;this.master().playlists.forEach((function(e){if(e.excludeUntil!==1/0){var i={},o=2,a=[],s=Es(t.masterPlaylistLoader_.master,e);if(s.audio||s.video){var u=[s.video,s.audio].filter(Boolean).join(",");i=Object(Be.parseCodecs)(u),o=Object.keys(i).length}o!==r&&(a.push('codec count "'+o+'" !== "'+r+'"'),e.excludeUntil=1/0),t.sourceUpdater_.canChangeType()||(i.video&&n.video&&i.video.type.toLowerCase()!==n.video.type.toLowerCase()&&(a.push('video codec "'+i.video.type+'" !== "'+n.video.type+'"'),e.excludeUntil=1/0),i.audio&&n.audio&&i.audio.type.toLowerCase()!==n.audio.type.toLowerCase()&&(e.excludeUntil=1/0,a.push('audio codec "'+i.audio.type+'" !== "'+n.audio.type+'"'))),a.length&&t.logger_("blacklisting "+e.id+": "+a.join(" && "))}}))},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(var r,i=n,o=0;o<e.segments.length;o++){var s=e.segments[o];if(r||(r=hu(t,i+s.duration/2)),r){if("cueIn"in s){r.endTime=i,r.adEndTime=i,i+=s.duration,r=null;continue}if(i<r.endTime){i+=s.duration;continue}r.endTime+=s.duration}else if("cueOut"in s&&((r=new a.a.VTTCue(i,i+s.duration,s.cueOut)).adStartTime=i,r.adEndTime=i+parseFloat(s.cueOut),t.addCue(r)),"cueOutCont"in s){var u=s.cueOutCont.split("/").map(parseFloat),l=u[0],c=u[1];(r=new a.a.VTTCue(i,i+s.duration,"")).adStartTime=i-l,r.adEndTime=r.adStartTime+c,t.addCue(r)}i+=s.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var e=this.tech_.currentTime(),t=Wa.GOAL_BUFFER_LENGTH,n=Wa.GOAL_BUFFER_LENGTH_RATE,r=Math.max(t,Wa.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*n,r)},n.bufferLowWaterLine=function(){var e=this.tech_.currentTime(),t=Wa.BUFFER_LOW_WATER_LINE,n=Wa.BUFFER_LOW_WATER_LINE_RATE,r=Math.max(t,Wa.MAX_BUFFER_LOW_WATER_LINE),i=Math.max(t,Wa.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*n,this.experimentalBufferBasedABR?i:r)},n.bufferHighWaterLine=function(){return Wa.BUFFER_HIGH_WATER_LINE},t}(zo.EventTarget),Ou=function(e,t,n){var r,i,o,a=e.masterPlaylistController_,s=a[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(a);if(t.attributes.RESOLUTION){var u=t.attributes.RESOLUTION;this.width=u.width,this.height=u.height}this.bandwidth=t.attributes.BANDWIDTH,this.codecs=Es(a.master(),t),this.playlist=t,this.id=n,this.enabled=(r=e.playlists,i=t.id,o=s,function(e){var t=r.master.playlists[i],n=ba(t),a=_a(t);return void 0===e?a:(e?delete t.disabled:t.disabled=!0,e===a||n||(o(),e?r.trigger("renditionenabled"):r.trigger("renditiondisabled")),e)})},Pu=["seeking","seeked","pause","playing","error"],Ru=function(){function e(e){var t=this;this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=Cs("PlaybackWatcher"),this.logger_("initialize");var n=function(){return t.monitorCurrentTime_()},r=function(){return t.techWaiting_()},i=function(){return t.cancelTimer_()},o=function(){return t.fixesBadSeeks_()},s=this.masterPlaylistController_,u=["main","subtitle","audio"],l={};u.forEach((function(e){l[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},s[e+"SegmentLoader_"].on("appendsdone",l[e].updateend),s[e+"SegmentLoader_"].on("playlistupdate",l[e].reset),t.tech_.on(["seeked","seeking"],l[e].reset)})),this.tech_.on("seekablechanged",o),this.tech_.on("waiting",r),this.tech_.on(Pu,i),this.tech_.on("canplay",n),this.dispose=function(){t.logger_("dispose"),t.tech_.off("seekablechanged",o),t.tech_.off("waiting",r),t.tech_.off(Pu,i),t.tech_.off("canplay",n),u.forEach((function(e){s[e+"SegmentLoader_"].off("appendsdone",l[e].updateend),s[e+"SegmentLoader_"].off("playlistupdate",l[e].reset),t.tech_.off(["seeked","seeking"],l[e].reset)})),t.checkCurrentTimeTimeout_&&a.a.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=e.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&a.a.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=a.a.setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];this[e+"StalledDownloads_"]>0&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var t=this.masterPlaylistController_,n=t[e+"SegmentLoader_"],r=n.buffered_(),i=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],r);this[e+"Buffered_"]=r,i?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:n.playlist_&&n.playlist_.id,buffered:fa(r)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&t.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();this.consecutiveUpdates>=5&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,t=this.seekable(),n=this.tech_.currentTime();this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1));if(this.beforeSeekableWindow_(t,n)){var r=t.start(0);e=r+(r===t.end(0)?0:.1)}if(void 0!==e)return this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+ca(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0;var i=this.tech_.buffered();return!!function(e){var t=e.buffered,n=e.targetDuration,r=e.currentTime;return!!t.length&&(!(t.end(0)-t.start(0)<2*n)&&(!(r>t.start(0))&&t.start(0)-r<n))}({buffered:i,targetDuration:this.media().targetDuration,currentTime:n})&&(e=i.start(0)+.1,this.logger_("Buffered region starts ("+i.start(0)+") just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0)},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),t=this.tech_.buffered(),n=ua(t,e);return n.length&&e+3<=n.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+n.start(0)+" -> "+n.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(e,t)){var n=e.end(e.length-1);return this.logger_("Fell out of live window at time "+t+". Seeking to live point (seekable end) "+n),this.cancelTimer_(),this.tech_.setCurrentTime(n),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var r=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,i=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:r.audioBuffered(),videoBuffered:r.videoBuffered(),currentTime:t}))return this.cancelTimer_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;var o=la(i,t);if(o.length>0){var a=o.start(0)-t;return this.logger_("Stopped at "+t+", setting timer for "+a+", seeking to "+o.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*a,t),!0}return!1},t.afterSeekableWindow_=function(e,t,n,r){if(void 0===r&&(r=!1),!e.length)return!1;var i=e.end(e.length-1)+.1;return!n.endList&&r&&(i=e.end(e.length-1)+3*n.targetDuration),t>i},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var t=e.videoBuffered,n=e.audioBuffered,r=e.currentTime;if(t){var i;if(t.length&&n.length){var o=ua(t,r-3),a=ua(t,r),s=ua(n,r);s.length&&!a.length&&o.length&&(i={start:o.end(0),end:s.end(0)})}else{la(t,r).length||(i=this.gapFromVideoUnderflow_(t,r))}return!!i&&(this.logger_("Encountered a gap in video from "+i.start+" to "+i.end+". Seeking to current time "+r),!0)}},t.skipTheGap_=function(e){var t=this.tech_.buffered(),n=this.tech_.currentTime(),r=la(t,n);this.cancelTimer_(),0!==r.length&&n===e&&(this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",r.start(0)),this.tech_.setCurrentTime(r.start(0)+1/30),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(e,t){for(var n=function(e){if(e.length<2)return zo.createTimeRanges();for(var t=[],n=1;n<e.length;n++){var r=e.end(n-1),i=e.start(n);t.push([r,i])}return zo.createTimeRanges(t)}(e),r=0;r<n.length;r++){var i=n.start(r),o=n.end(r);if(t-i<4&&t-i>2)return{start:i,end:o}}return null},e}(),Au={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Iu=function(e){!function e(t,n){var r=0,i=0,o=zo.mergeOptions(Au,n);t.ready((function(){t.trigger({type:"usage",name:"vhs-error-reload-initialized"}),t.trigger({type:"usage",name:"hls-error-reload-initialized"})}));var a=function(){i&&t.currentTime(i)},s=function(e){null!=e&&(i=t.duration()!==1/0&&t.currentTime()||0,t.one("loadedmetadata",a),t.src(e),t.trigger({type:"usage",name:"vhs-error-reload"}),t.trigger({type:"usage",name:"hls-error-reload"}),t.play())},u=function(){return Date.now()-r<1e3*o.errorInterval?(t.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void t.trigger({type:"usage",name:"hls-error-reload-canceled"})):o.getSource&&"function"==typeof o.getSource?(r=Date.now(),o.getSource.call(t,s)):void zo.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")},l=function e(){t.off("loadedmetadata",a),t.off("error",u),t.off("dispose",e)};t.on("error",u),t.on("dispose",l),t.reloadSourceOnError=function(n){l(),e(t,n)}}(this,e)},Lu={PlaylistLoader:aa,Playlist:Sa,utils:Na,STANDARD_PLAYLIST_SELECTOR:Is,INITIAL_PLAYLIST_SELECTOR:function(){var e=this,t=this.playlists.master.playlists.filter(Sa.isEnabled);return Ps(t,(function(e,t){return Rs(e,t)})),t.filter((function(t){return!!Es(e.playlists.master,t).video}))[0]||null},lastBandwidthSelector:Is,movingAverageBandwidthSelector:function(e){var t=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var n=this.useDevicePixelRatio&&a.a.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth),t=e*this.systemBandwidth+(1-e)*t,As(this.playlists.master,t,parseInt(Os(this.tech_.el(),"width"),10)*n,parseInt(Os(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions)}},comparePlaylistBandwidth:Rs,comparePlaylistResolution:function(e,t){var n,r;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||a.a.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(r=t.attributes.RESOLUTION.width),n===(r=r||a.a.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-r},xhr:xa()};Object.keys(Wa).forEach((function(e){Object.defineProperty(Lu,e,{get:function(){return zo.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),Wa[e]},set:function(t){zo.log.warn("using Vhs."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?zo.log.warn("value of Vhs."+e+" must be greater than or equal to 0"):Wa[e]=t}})}));var ju=function(e,t){for(var n=t.media(),r=-1,i=0;i<e.length;i++)if(e[i].id===n.id){r=i;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})};Lu.canPlaySource=function(){return zo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Du=function(e){var t=e.player,n=e.sourceKeySystems,r=e.audioMedia,i=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var o=function(e,t){return e.reduce((function(e,n){if(!n.contentProtection)return e;var r=t.reduce((function(e,t){var r=n.contentProtection[t];return r&&r.pssh&&(e[t]={pssh:r.pssh}),e}),{});return Object.keys(r).length&&e.push(r),e}),[])}(r?i.concat([r]):i,Object.keys(n)),a=[],s=[];return o.forEach((function(e){s.push(new Promise((function(e,n){t.tech_.one("keysessioncreated",e)}))),a.push(new Promise((function(n,r){t.eme.initializeMediaKeys({keySystems:e},(function(e){e?r(e):n()}))})))})),Promise.race([Promise.all(a),Promise.race(s)])},Nu=function(e){var t=e.player,n=function(e,t,n){if(!e)return e;var r={video:t&&t.attributes&&t.attributes.CODECS,audio:n&&n.attributes&&n.attributes.CODECS};!r.audio&&r.video&&r.video.split(",").length>1&&r.video.split(",").forEach((function(e){e=e.trim(),Object(Be.isAudioCodec)(e)?r.audio=e:Object(Be.isVideoCodec)(e)&&(r.video=e)}));var i=r.video?'video/mp4;codecs="'+r.video+'"':null,o=r.audio?'audio/mp4;codecs="'+r.audio+'"':null,a={};for(var s in e)a[s]={audioContentType:o,videoContentType:i},t.contentProtection&&t.contentProtection[s]&&t.contentProtection[s].pssh&&(a[s].pssh=t.contentProtection[s].pssh),"string"==typeof e[s]&&(a[s].url=e[s]);return zo.mergeOptions(e,a)}(e.sourceKeySystems,e.media,e.audioMedia);return!!n&&(t.currentSource().keySystems=n,!(n&&!t.eme)||(zo.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))},Mu=function(){if(!a.a.localStorage)return null;var e=a.a.localStorage.getItem("videojs-vhs");if(!e)return null;try{return JSON.parse(e)}catch(e){return null}};Lu.supportsNativeHls=function(){if(!u.a||!u.a.createElement)return!1;var e=u.a.createElement("video");if(!zo.getTech("Html5").isSupported())return!1;return["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Lu.supportsNativeDash=!!(u.a&&u.a.createElement&&zo.getTech("Html5").isSupported())&&/maybe|probably/i.test(u.a.createElement("video").canPlayType("application/dash+xml")),Lu.supportsTypeNatively=function(e){return"hls"===e?Lu.supportsNativeHls:"dash"===e&&Lu.supportsNativeDash},Lu.isSupported=function(){return zo.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};var Uu=function(e){function t(t,n,r){var i;if(i=e.call(this,n,zo.mergeOptions(r.hls,r.vhs))||this,r.hls&&Object.keys(r.hls).length&&zo.log.warn("Using hls options is deprecated. Use vhs instead."),i.logger_=Cs("VhsHandler"),n.options_&&n.options_.playerId){var o=zo(n.options_.playerId);o.hasOwnProperty("hls")||Object.defineProperty(o,"hls",{get:function(){return zo.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"hls-player-access"}),h()(i)},configurable:!0}),o.hasOwnProperty("vhs")||Object.defineProperty(o,"vhs",{get:function(){return zo.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),n.trigger({type:"usage",name:"vhs-player-access"}),h()(i)},configurable:!0}),o.hasOwnProperty("dash")||Object.defineProperty(o,"dash",{get:function(){return zo.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),h()(i)},configurable:!0}),i.player_=o}if(i.tech_=n,i.source_=t,i.stats={},i.ignoreNextSeekingEvent_=!1,i.setOptions_(),i.options_.overrideNative&&n.overrideNativeAudioTracks&&n.overrideNativeVideoTracks)n.overrideNativeAudioTracks(!0),n.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(n.featuresNativeVideoTracks||n.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(u.a,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(function(e){var t=u.a.fullscreenElement||u.a.webkitFullscreenElement||u.a.mozFullScreenElement||u.a.msFullscreenElement;t&&t.contains(i.tech_.el())&&i.masterPlaylistController_.smoothQualityChange_()})),i.on(i.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),i.on(i.tech_,"error",(function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()})),i.on(i.tech_,"play",i.play),i}p()(t,e);var n=t.prototype;return n.setOptions_=function(){var e=this;if(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.handlePartialData=this.options_.handlePartialData||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){var t=Mu();t&&t.bandwidth&&(this.options_.bandwidth=t.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),t&&t.throughput&&(this.options_.throughput=t.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=Wa.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Wa.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","handlePartialData","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta"].forEach((function(t){void 0!==e.source_[t]&&(e.options_[t]=e.source_[t])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(e,t){var n=this;if(e){var r;this.setOptions_(),this.options_.src=0===(r=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(r.substring(r.indexOf(",")+1)):r,this.options_.tech=this.tech_,this.options_.externVhs=Lu,this.options_.sourceType=Object(M.simpleTypeFromSourceType)(t),this.options_.seekTo=function(e){n.tech_.setCurrentTime(e)},this.masterPlaylistController_=new xu(this.options_);var i=zo.mergeOptions({liveRangeSafeTimeDelta:.1},this.options_,{seekable:function(){return n.seekable()},media:function(){return n.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_});this.playbackWatcher_=new Ru(i),this.masterPlaylistController_.on("error",(function(){var e=zo.players[n.tech_.options_.playerId],t=n.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));var o=this.options_.experimentalBufferBasedABR?Lu.movingAverageBandwidthSelector(.55):Lu.STANDARD_PLAYLIST_SELECTOR;this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):o.bind(this),this.masterPlaylistController_.selectInitialPlaylist=Lu.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=this.throughput>0?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){zo.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return n.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return n.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return n.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return n.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return n.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return n.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return n.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return n.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return fa(n.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return n.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return n.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return n.tech_.name_},enumerable:!0},duration:{get:function(){return n.tech_.duration()},enumerable:!0},master:{get:function(){return n.playlists.master},enumerable:!0},playerDimensions:{get:function(){return n.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return fa(n.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return n.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",(function(){n.options_.useBandwidthFromLocalStorage&&function(e){if(!a.a.localStorage)return!1;var t=Mu();t=t?zo.mergeOptions(t,e):e;try{a.a.localStorage.setItem("videojs-vhs",JSON.stringify(t))}catch(e){return!1}}({bandwidth:n.bandwidth,throughput:Math.round(n.throughput)})})),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var e,t;t=(e=n).playlists,e.representations=function(){return t&&t.master&&t.master.playlists?t.master.playlists.filter((function(e){return!ba(e)})).map((function(t,n){return new Ou(e,t,t.id)})):[]}})),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",(function(){n.setupEme_()})),this.on(this.masterPlaylistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.masterPlaylistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=a.a.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_))}},n.setupEme_=function(){var e=this,t=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,n=Nu({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:t&&t.media()});11!==zo.browser.IE_VERSION&&n?(this.logger_("waiting for EME key session creation"),Du({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:t&&t.media(),mainPlaylists:this.playlists.master.playlists}).then((function(){e.logger_("created EME key session"),e.masterPlaylistController_.sourceUpdater_.initializedEme()})).catch((function(t){e.logger_("error while creating EME key session",t),e.player_.error({message:"Failed to initialize media keys for EME",code:3})}))):this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var e=this,t=zo.players[this.tech_.options_.playerId];t&&t.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=t.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",(function(){var t,n;t=e.qualityLevels_,(n=e).representations().forEach((function(e){t.addQualityLevel(e)})),ju(t,n.playlists)})),this.playlists.on("mediachange",(function(){ju(e.qualityLevels_,e.playlists)})))},t.version=function(){return{"@videojs/http-streaming":"2.4.2","mux.js":"5.8.0","mpd-parser":"0.15.0","m3u8-parser":"4.5.0","aes-decrypter":"3.1.0"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return uu.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&a.a.URL.revokeObjectURL&&(a.a.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),e.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return Ma({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=2),Ua({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:r,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},t}(zo.getComponent("Component")),Bu={name:"videojs-http-streaming",VERSION:"2.4.2",canHandleSource:function(e,t){void 0===t&&(t={});var n=zo.mergeOptions(zo.options,t);return Bu.canPlayType(e.type,n)},handleSource:function(e,t,n){void 0===n&&(n={});var r=zo.mergeOptions(zo.options,n);return t.vhs=new Uu(e,t,r),zo.hasOwnProperty("hls")||Object.defineProperty(t,"hls",{get:function(){return zo.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),t.vhs},configurable:!0}),t.vhs.xhr=xa(),t.vhs.src(e.src,e.type),t.vhs},canPlayType:function(e,t){void 0===t&&(t={});var n=zo.mergeOptions(zo.options,t).vhs.overrideNative,r=void 0===n?!zo.browser.IS_ANY_SAFARI:n,i=Object(M.simpleTypeFromSourceType)(e);return i&&(!Lu.supportsTypeNatively(i)||r)?"maybe":""}};Object(Be.browserSupportsCodec)("avc1.4d400d,mp4a.40.2")&&zo.getTech("Html5").registerSourceHandler(Bu,0),zo.VhsHandler=Uu,Object.defineProperty(zo,"HlsHandler",{get:function(){return zo.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Uu},configurable:!0}),zo.VhsSourceHandler=Bu,Object.defineProperty(zo,"HlsSourceHandler",{get:function(){return zo.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Bu},configurable:!0}),zo.Vhs=Lu,Object.defineProperty(zo,"Hls",{get:function(){return zo.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),Lu},configurable:!0}),zo.use||(zo.registerComponent("Hls",Lu),zo.registerComponent("Vhs",Lu)),zo.options.vhs=zo.options.vhs||{},zo.options.hls=zo.options.hls||{},zo.registerPlugin?zo.registerPlugin("reloadSourceOnError",Iu):zo.plugin("reloadSourceOnError",Iu);var Fu=zo,Vu=n(107),Hu=n.n(Vu);function zu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var qu=function e(t){var n=this;if(Fu.browser.IS_IE8)for(var r in n=Hu.a.createElement("custom"),e.prototype)"constructor"!==r&&(n[r]=e.prototype[r]);return n.id=t.id,n.label=n.id,n.width=t.width,n.height=t.height,n.bitrate=t.bandwidth,n.enabled_=t.enabled,Object.defineProperty(n,"enabled",{get:function(){return n.enabled_()},set:function(e){n.enabled_(e)}}),n},Wu=function(e){
121
121
  /*! @name videojs-contrib-quality-levels @version 2.0.9 @license Apache-2.0 */
122
- var t,n;function r(){var t,n=zu(zu(t=e.call(this)||this));if(Fu.browser.IS_IE8)for(var i in n=Hu.a.createElement("custom"),r.prototype)"constructor"!==i&&(n[i]=r.prototype[i]);return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),n||zu(t)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new qu(e),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},i.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},i.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},i.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},r}(Fu.EventTarget);for(var $u in Wu.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},Wu.prototype.allowedEvents_)Wu.prototype["on"+$u]=null;var Gu=Fu.registerPlugin||Fu.plugin,Yu=function(e){return t=this,Fu.mergeOptions({},e),n=t.qualityLevels,r=new Wu,t.on("dispose",(function e(){r.dispose(),t.qualityLevels=n,t.off("dispose",e)})),t.qualityLevels=function(){return r},t.qualityLevels.VERSION="2.0.9",r;var t,n,r};Gu("qualityLevels",Yu),Yu.VERSION="2.0.9";var Ku=n(234);function Xu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Qu=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)}var t,n,r;return t=e,(n=[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])&&Xu(t.prototype,n),r&&Xu(t,r),e}();function Ju(e){return(Ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function el(e,t){return(el=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rl(e);if(t){var i=rl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nl(this,n)}}function nl(e,t){return!t||"object"!==Ju(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rl(e){return(rl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var il=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&el(e,t)}(o,e);var t,n,r,i=tl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).sources=[],n.qualityLevels=e.qualityLevels(),n.populateSources(t.sources),n}return t=o,(n=[{key:"currentSource",get:function(){return this._currentSource}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();return this._currentSource=n,this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){t.player.currentTime()!==r&&t.player.currentTime(r),i&&t.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find((function(t){return t.id===e}))}},{key:"populateSources",value:function(e){var t=this,n=null;e.forEach((function(e){t.qualityLevels.addQualityLevel(new Qu(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),e.default&&(n=e)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}}])&&Zu(t.prototype,n),r&&Zu(t,r),o}(Fu.getPlugin("plugin"));function ol(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Fu.registerPlugin("progressiveFiles",il);var al=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},sl=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.playbackProfile=t.playbackProfile,this.address=new URL(t.httpsAddress)}var t,n,r;return t=e,(n=[{key:"getUrl",value:function(e){return e?this.address+"cache?file="+encodeURIComponent(e):null}},{key:"ping",value:function(){return al(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new AbortController,n=setTimeout((function(){return t.abort()}),1e3),e.prev=3,e.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:t.signal});case 6:return r=e.sent,e.next=9,r.text();case 9:return i=e.sent,clearTimeout(n),e.abrupt("return","PONG"===i);case 14:return e.prev=14,e.t0=e.catch(3),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,this,[[3,14]])})))}}])&&ol(t.prototype,n),r&&ol(t,r),e}();function ul(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ll=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(e,t){var n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(var r=0;r<e.length;r++){var i=e[r];i.enabled=n.id===i.id}return n}},{key:"getNextBestQuality",value:function(e,t){var n=this.getKnownProfiles(),r=n.indexOf(t);if(r>=0){for(var i=r+1;i<n.length;i++){var o=n[i],a=e.getQualityLevelById(o);if(a)return a}for(var s=r-1;s>0;s--){var u=n[s],l=e.getQualityLevelById(u);if(l)return l}}return null}}],(n=null)&&ul(t.prototype,n),r&&ul(t,r),e}();function cl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var fl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},hl=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.logger=Fu.log.createLogger("localcache")}var t,n,r;return t=e,(n=[{key:"setSource",value:function(e,t){return fl(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t(null,e),n.abrupt("return");case 5:null!==(r=n.sent)&&(this.logger.debug("Using Local Cache",r),e.src=r.getUrl(e.src));case 7:t(null,e);case 8:case"end":return n.stop()}}),n,this)})))}}])&&cl(t.prototype,n),r&&cl(t,r),e}();Fu.use("*",(function(e){return new hl(e)}));n(379);function dl(e){return(dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yl(e,t,n){return(yl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_l(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ml(e,t){return(ml=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_l(e);if(t){var i=_l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vl(this,n)}}function vl(e,t){return!t||"object"!==dl(t)&&"function"!=typeof t?bl(e):t}function bl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _l(e){return(_l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Tl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ml(e,t)}(o,e);var t,n,r,i=gl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(bl(n)),e.ready((function(){n.initialize()})),n}return t=o,(n=[{key:"createEl",value:function(){return yl(_l(o.prototype),"createEl",this).call(this,"div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat('<?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>',"</div>"),title:"Streaming from ClickView Local Cache"})}},{key:"initialize",value:function(){var e=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){e.localCachePlugin.off("localcachechanged",e.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return wl(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.localCachePlugin.getActiveLocalCache();case 2:e.sent?this.show():this.hide();case 4:case"end":return e.stop()}}),e,this)})))}}])&&pl(t.prototype,n),r&&pl(t,r),o}(Fu.getComponent("Component"));function Sl(e){return(Sl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function El(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cl(e,t){return(Cl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pl(e);if(t){var i=Pl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xl(this,n)}}function xl(e,t){return!t||"object"!==Sl(t)&&"function"!=typeof t?Ol(e):t}function Ol(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pl(e){return(Pl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("localCacheIndicator",Tl);var Rl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Al=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cl(e,t)}(o,e);var t,n,r,i=kl(o);function o(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).logger_=Fu.log.createLogger("localcache"),void 0===t)throw Error("no options defined");return n.onPlayerError=n.onPlayerError.bind(Ol(n)),n.dispose=n.dispose.bind(Ol(n)),n.localCaches_=t.localCacheAddresses.map((function(e){return new sl(e)})),n.player.ready((function(){n.initialize(),t.enabled&&n.enable()})),n}return t=o,(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:"dispose",value:function(){this.player.off("error",this.onPlayerError)}},{key:"initialize",value:function(){this.player.on("error",this.onPlayerError),this.player.on("dispose",this.dispose),this.player.controlBar.addChild("localCacheIndicator")}},{key:"onPlayerError",value:function(){var e;(null===(e=this.player.error())||void 0===e?void 0:e.code)===MediaError.MEDIA_ERR_NETWORK&&this.resetActiveLocalCache()}},{key:"getActiveLocalCacheInternal",value:function(){return Rl(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],n=function(e){return Rl(i,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.ping();case 2:if(!n.sent){n.next=4;break}t.push(e);case 4:case"end":return n.stop()}}),n)})))},e.next=4,Promise.all(this.localCaches_.map((function(e){return n(e)})));case 4:if(!(t.length>0)){e.next=8;break}return r=t[0],this.onLocalCacheChange(r),e.abrupt("return",r);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"onLocalCacheChange",value:function(e){this.logger_.debug("Local Cache changed",e),this.trigger("localcachechanged",{localCache:e});var t=!1;e&&e.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",e.playbackProfile),ll.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}])&&El(t.prototype,n),r&&El(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("localCache",Al);var Il="cv-persisttest",Ll=function(){try{return window.localStorage.setItem(Il,"cv-player-storage-test"),window.localStorage.removeItem(Il),!0}catch(e){return!1}},jl=function(e){return window.localStorage.getItem(e)},Dl=function(e,t){window.localStorage.setItem(e,t)},Nl=function(e){window.localStorage.removeItem(e)};function Ml(e){return(Ml="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ul(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bl(e,t){return(Bl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hl(e);if(t){var i=Hl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Vl(this,n)}}function Vl(e,t){return!t||"object"!==Ml(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Hl(e){return(Hl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zl=Fu.getPlugin("plugin"),ql=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bl(e,t)}(o,e);var t,n,r,i=Fl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){if(this.player.textTracks().length){this.bindEventListeners();var e=!!this.options.showSubtitles,t=this.safeGet("cvplayer-show-subtitles");if("true"===t&&(e=!0),"false"===t&&(e=!1),e){var n=this.guessWhichTrack();n&&(n.mode="showing")}var r=this.safeGet("cvplayer-subtitle-size");r||(r=this.options.subtitleSize),r&&this.player.textTrackSettings.setSizeSetting(r)}}},{key:"safeGet",value:function(e){if(Ll())return jl(e)}},{key:"onSelectedLanguageChange",value:function(){for(var e=this.player.textTracks(),t=0;t<e.length;t++){var n=e[t];if("showing"===n.mode)return Dl("cvplayer-show-subtitles","true"),void Dl("cvplayer-selected-language",n.language)}Dl("cvplayer-show-subtitles","false"),Nl("cvplayer-selected-language")}},{key:"bindEventListeners",value:function(){var e=this;Ll()&&(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.player.one("dispose",(function(){var t,n;null===(t=e.player)||void 0===t||t.off("cv:languageselected",e.onSelectedLanguageChange),null===(n=e.player)||void 0===n||n.off("changesubtitlesize",e.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var e=this.player.textTrackSettings.getSizeSetting();Dl("cvplayer-subtitle-size",e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet("cvplayer-selected-language")||window.navigator.language,r=this.getLanguageParts(n),i=r.language,o=r.country,a=this.player.textTracks(),s=0;s<a.length;s++){var u=a[s],l=this.getLanguageParts(u.language),c=l.language,f=l.country;if(c===i&&(e=u,f||(t=u),f===o))return e}return t||e||null}},{key:"getLanguageParts",value:function(e){var t=e.toLowerCase().split("-");return{language:t[0],country:t[1]}}}])&&Ul(t.prototype,n),r&&Ul(t,r),o}(zl);function Wl(e){return(Wl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gl(e,t){return(Gl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xl(e);if(t){var i=Xl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Kl(this,n)}}function Kl(e,t){return!t||"object"!==Wl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xl(e){return(Xl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistSubtitleSettingsPlugin",ql);var Ql=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Jl=Fu.getPlugin("plugin"),Zl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gl(e,t)}(o,e);var t,n,r,i=Yl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){return Ql(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:if(t=e.sent,n=t?this.options.playbackProfileLocalCache:this.options.playbackProfile,Ll()&&(r=jl(this.getStorageKey(t)))&&(n=r),i=this.player.qualityLevels(),ll.enableProfileOrNextBest(i,n),Ll()){e.next=9;break}return e.abrupt("return");case 9:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),i.on("change",this.onQualityLevelsChange),this.player.on("dispose",(function(){i.off("change",o.onQualityLevelsChange)}));case 12:case"end":return e.stop()}}),e,this)})))}},{key:"onQualityLevelsChange",value:function(){return Ql(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:t=e.sent,n=this.player.qualityLevels(),r=n[n.selectedIndex],Dl(this.getStorageKey(t),r.id);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"isLocalCacheActive",value:function(){return Ql(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.player.localCache().getActiveLocalCache();case 2:return e.abrupt("return",!!e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getStorageKey",value:function(e){return e?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&$l(t.prototype,n),r&&$l(t,r),o}(Jl);function ec(e){return(ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rc(e,t){return(rc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ic(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ac(e);if(t){var i=ac(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oc(this,n)}}function oc(e,t){return!t||"object"!==ec(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ac(e){return(ac=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistQualitySettingsPlugin",Zl);var sc=Fu.getPlugin("plugin"),uc="play",lc="playing",cc="pause",fc="seeking",hc="seekstart",dc="seekend",pc="ended",yc="pausedseek",mc="timeupdate",gc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rc(e,t)}(o,e);var t,n,r,i=ic(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=t,n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var e,t=this,n=(tc(e={},uc,(function(){return t.onPlay()})),tc(e,cc,(function(){return t.onPause()})),tc(e,mc,(function(){return t.onTimeUpdate()})),tc(e,fc,(function(){return t.onSeeking()})),tc(e,pc,(function(){return t.onEnded()})),e);for(var r in n)n.hasOwnProperty(r)&&this.player.on(r,n[r])}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;setInterval((function(){return e.flushBuffer()}),t)}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent(dc),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(uc)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){e.isPlaying=!1,e.logEvent(cc),delete e.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(uc)),this.isPlaying&&!this.isSeeking&&this.logEvent(lc)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(yc),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(hc))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(pc)}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===hc&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===lc||e===uc)}},{key:"shouldClearCarriedOverTime",value:function(e){return e===pc||e===yc}},{key:"flushBuffer",value:function(){for(var e,t=[],n={};this.eventBuffer.length;){var r=this.eventBuffer.shift();this.shouldClearCarriedOverTime(r.type)?delete this.lastPlayingTime:n.start?r.type===lc&&this.eventBuffer.length>0||(this.shouldUseCarriedOverTime(r.type)&&(this.lastPlayingTime=r.time),n.end=r,t.push(n),n={}):(this.shouldUseCarriedOverTime(r.type)&&(r.time=this.lastPlayingTime,delete this.lastPlayingTime),n.start=r)}this.eventBuffer=[],t.length&&(this.options.onFlush(t),null===(e=this.player)||void 0===e||e.trigger("progressflush"))}}])&&nc(t.prototype,n),r&&nc(t,r),o}(sc);Fu.registerPlugin("progressReporterPlugin",gc);n(380);function vc(e){return(vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wc(e,t){return(wc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ec(e);if(t){var i=Ec(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sc(this,n)}}function Sc(e,t){return!t||"object"!==vc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ec(e){return(Ec=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wc(e,t)}(o,e);var t,n,r,i=Tc(o);function o(){return bc(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&_c(t.prototype,n),r&&_c(t,r),o}(Fu.getComponent("Component")),kc=["top","left","right","bottom"],xc={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};n(381);function Oc(e){return(Oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ac(e,t,n){return t&&Rc(e.prototype,t),n&&Rc(e,n),e}function Ic(e,t,n){return(Ic="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Mc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Lc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jc(e,t)}function jc(e,t){return(jc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mc(e);if(t){var i=Mc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Nc(this,n)}}function Nc(e,t){return!t||"object"!==Oc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mc(e){return(Mc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Uc=Fu.getComponent("Component"),Bc=function(e){Lc(n,e);var t=Dc(n);function n(e,r){var i;return Pc(this,n),(i=t.call(this,e,r)).bindEventListeners(),i}return Ac(n,[{key:"createEl",value:function(){return Ic(Mc(n.prototype),"createEl",this).call(this,"div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)})}},{key:"bindEventListeners",value:function(){var e=this,t=this.el(),n=function(t){t.preventDefault(),t.dataTransfer.dropEffect="move",e.addClass("cv-drag-over")},r=function(t){t.preventDefault(),e.removeClass("cv-drag-over"),e.player_.whiteboardModePlugin().setWhiteboardMode(e.options_.side)},i=function(){e.removeClass("cv-drag-over")};t.addEventListener("dragover",n),t.addEventListener("drop",r),t.addEventListener("dragleave",i),this.on("dispose",(function(){t.removeEventListener("dragover",n),t.removeEventListener("drop",r),t.removeEventListener("dragleave",i)}))}}]),n}(Uc),Fc=function(e){Lc(n,e);var t=Dc(n);function n(e,r){var i;return Pc(this,n),(i=t.call(this,e,r)).addChildren(),i}return Ac(n,[{key:"addChildren",value:function(){var e=this;kc.forEach((function(t){e.addChild(new Bc(e.player_,{side:t}))}))}}]),n}(Uc);function Vc(e){return(Vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zc(e,t){return(zc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$c(e);if(t){var i=$c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wc(this,n)}}function Wc(e,t){return!t||"object"!==Vc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $c(e){return($c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zc(e,t)}(o,e);var t,n,r,i=qc(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Hc(t.prototype,n),r&&Hc(t,r),o}(Fu.getComponent("MenuItem"));function Yc(e){return(Yc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qc(e,t,n){return(Qc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=tf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Jc(e,t){return(Jc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tf(e);if(t){var i=tf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ef(this,n)}}function ef(e,t){return!t||"object"!==Yc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tf(e){return(tf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nf=Fu.getComponent("MenuButton"),rf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jc(e,t)}(o,e);var t,n,r,i=Zc(o);function o(){var e;return Kc(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[];return kc.forEach((function(r){n.push(new Gc(e.player_,{side:r,label:xc[r],selectable:!0,multiSelectable:!1,selected:r===t}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Qc(tf(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Video controls"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.whiteboardModePlugin().side;return xc[e]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){nf.prototype.handleClick.apply(this)}}])&&Xc(t.prototype,n),r&&Xc(t,r),o}(nf);n(382);function of(e){return(of="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function af(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sf(e,t){return(sf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cf(e);if(t){var i=cf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lf(this,n)}}function lf(e,t){return!t||"object"!==of(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cf(e){return(cf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ff="cv-whiteboard-side",hf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sf(e,t)}(o,e);var t,n,r,i=uf(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).side="bottom",t.player.ready((function(){t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){if(Ll()){var e=jl(ff);e&&(this.side=e)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}},{key:"initCollapserator",value:function(){var e=this,t=this.player.getChild("collapserator"),n=new Cc(this.player);this.button=new rf(this.player),t.addChild(n),t.addChild(this.button),this.player.trigger("cv-updatecog");var r=function(){t.el().setAttribute("draggable","true")},i=function(){t.el().setAttribute("draggable","false")},o=function(t){e.player.addClass("cv-dragging"),t.dataTransfer.setData("text/plain","handle")},a=function(){e.player.removeClass("cv-dragging"),t.el().setAttribute("draggable","false")};n.el().addEventListener("mousedown",r),n.el().addEventListener("mouseup",i),t.el().addEventListener("dragstart",o),t.el().addEventListener("dragend",a),this.player.on("dispoe",(function(){n.el().removeEventListener("mousedown",r),n.el().removeEventListener("mouseup",i),t.el().removeEventListener("dragstart",o),t.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new Fc(this.player))}},{key:"initFullscreenListener",value:function(){var e=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.player.on("dispose",(function(){var t;null===(t=e.player)||void 0===t||t.off("fullscreenchange",e.update)}))}},{key:"setWhiteboardMode",value:function(e){this.side=e,this.button.update(),Ll()&&Dl(ff,e),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"),this.player.trigger("resizemenus"),this.player.isFullscreen()&&"bottom"!==this.side&&this.player.addClass("cv-whiteboard-".concat(this.side))}}])&&af(t.prototype,n),r&&af(t,r),o}(Fu.getPlugin("plugin"));function df(e){return(df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yf(e,t){return(yf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vf(e);if(t){var i=vf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gf(this,n)}}function gf(e,t){return!t||"object"!==df(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vf(e){return(vf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("whiteboardModePlugin",hf),window.__onGCastApiAvailable=function(e){e&&(bf=new _f)},window.videojs=Fu;var bf,_f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yf(e,t)}(o,e);var t,n,r,i=mf(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,null)).setOptions(),e.remotePlayer=new cast.framework.RemotePlayer,e.remotePlayerController=new cast.framework.RemotePlayerController(e.remotePlayer),e.bindListeners(),e}return t=o,(n=[{key:"play",value:function(){}},{key:"castConext",get:function(){return cast.framework.CastContext.getInstance()}},{key:"setOptions",value:function(){this.castConext.setOptions({receiverApplicationId:chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED})}},{key:"castState",get:function(){return this.castConext.getCastState()}},{key:"castSession",get:function(){return bf.castConext.getCurrentSession()}},{key:"isConnected",value:function(){return this.castState===cast.framework.CastState.CONNECTED&&this.remotePlayer.isConnected}},{key:"bindListeners",value:function(){this.onCastStateChange=this.onCastStateChange.bind(this),this.onIsConnectedChanged=this.onIsConnectedChanged.bind(this),this.castConext.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.onCastStateChange),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.onIsConnectedChanged)}},{key:"onIsConnectedChanged",value:function(){try{this.trigger("isconnectedchanged",this.remotePlayer.isConnected)}catch(e){console.log(e)}console.log(this.remotePlayer.isConnected)}},{key:"dispose",value:function(){this.castConext.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.onCastStateChange),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.onIsConnectedChanged)}},{key:"onCastStateChange",value:function(e){this.hasAvailableDevices(e.castState)?this.trigger("devicesAvailable"):this.trigger("devicesUnabailable")}},{key:"stopCasting",value:function(){this.castConext.getCurrentSession().endSession(!0)}},{key:"getDeviceName",value:function(){var e,t;return null===(t=null===(e=this.castConext.getCurrentSession())||void 0===e?void 0:e.getCastDevice())||void 0===t?void 0:t.friendlyName}},{key:"hasAvailableDevices",value:function(e){return e||(e=this.castConext.getCastState()),e===cast.framework.CastState.NOT_CONNECTED||e===cast.framework.CastState.CONNECTING||e===cast.framework.CastState.CONNECTED}}])&&pf(t.prototype,n),r&&pf(t,r),o}(Fu.getComponent("Component"));n(383);function wf(e){return(wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Tf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sf(e,t,n){return(Sf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=xf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ef(e,t){return(Ef=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xf(e);if(t){var i=xf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return kf(this,n)}}function kf(e,t){return!t||"object"!==wf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xf(e){return(xf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Of=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ef(e,t)}(o,e);var t,n,r,i=Cf(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,null)).update(),e}return t=o,(n=[{key:"play",value:function(){}},{key:"createEl",value:function(){return Sf(xf(o.prototype),"createEl",this).call(this,"div",{className:"cv-chromecast-tech"})}},{key:"setTitle",value:function(e){this.title=e,this.update()}},{key:"setPoster",value:function(e){this.poster=e,this.update()}},{key:"disconnect",value:function(e){e.stopPropagation(),bf.stopCasting()}},{key:"update",value:function(){this.el_.innerHTML='\n <div class="cv-chromecast-content">\n '.concat(this.title?"<h1>".concat(this.title,"</h1>"):"","\n <p>Currently playing on: ").concat(bf.getDeviceName(),'</p>\n </div>\n <div class="cv-chromecast-background" style="background-image: url(').concat(this.poster,')"></div>\n ');var e=document.createElement("div");e.className="btn btn-primary cursor-pointer",e.onclick=this.disconnect.bind(this),e.innerHTML="Stop casting",this.el_.querySelector(".cv-chromecast-content").appendChild(e)}}])&&Tf(t.prototype,n),r&&Tf(t,r),o}(Fu.getComponent("Component"));function Pf(e){return(Pf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Af(e,t,n){return(Af="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Df(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function If(e,t){return(If=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Df(e);if(t){var i=Df(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jf(this,n)}}function jf(e,t){return!t||"object"!==Pf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Df(e){return(Df=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nf=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Mf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&If(e,t)}(o,e);var t,n,r,i=Lf(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),bf.isConnected()&&e.source&&n.setSource(e.source),n.bindEventListeners(),e.poster&&n.setPoster(e.poster),n.triggerReady(),n}return t=o,r=[{key:"canPlaySource",value:function(){return bf.isConnected()}},{key:"isSupported",value:function(){return!!bf&&bf.isConnected()}}],(n=[{key:"createEl",value:function(){return this.ui=new Of,this.ui.el()}},{key:"bindEventListeners",value:function(){this.onPlayerStateChanged=this.onPlayerStateChanged.bind(this),this.onVolumeLevelChanged=this.onVolumeLevelChanged.bind(this),this.onCurrentTimeChanged=this.onCurrentTimeChanged.bind(this),this.onDurationChanged=this.onDurationChanged.bind(this);var e=cast.framework.RemotePlayerEventType,t=bf.remotePlayerController;t.addEventListener(e.PLAYER_STATE_CHANGED,this.onPlayerStateChanged),t.addEventListener(e.VOLUME_LEVEL_CHANGED,this.onVolumeLevelChanged),t.addEventListener(e.IS_MUTED_CHANGED,this.onVolumeLevelChanged),t.addEventListener(e.CURRENT_TIME_CHANGED,this.onCurrentTimeChanged),t.addEventListener(e.DURATION_CHANGED,this.onDurationChanged)}},{key:"dispose",value:function(){var e=cast.framework.RemotePlayerEventType,t=bf.remotePlayerController;t.removeEventListener(e.PLAYER_STATE_CHANGED,this.onPlayerStateChanged),t.removeEventListener(e.VOLUME_LEVEL_CHANGED,this.onVolumeLevelChanged),t.removeEventListener(e.IS_MUTED_CHANGED,this.onVolumeLevelChanged),t.removeEventListener(e.CURRENT_TIME_CHANGED,this.onCurrentTimeChanged),t.removeEventListener(e.DURATION_CHANGED,this.onDurationChanged),Af(Df(o.prototype),"dispose",this).call(this)}},{key:"onPlayerStateChanged",value:function(){var e=bf.remotePlayer.playerState;e===chrome.cast.media.PlayerState.PLAYING?(this.trigger("play"),this.trigger("playing")):e===chrome.cast.media.PlayerState.PAUSED?this.trigger("pause"):e===chrome.cast.media.PlayerState.BUFFERING?this.trigger("waiting"):e===chrome.cast.media.PlayerState.IDLE&&this.ended()&&this.trigger("ended")}},{key:"stopCasting",value:function(){var e=window.setTimeout((function(){bf.stopCasting()}),1e4);this.on("dispose",(function(){window.clearTimeout(e)}))}},{key:"setPoster",value:function(e){this.poster_=e,this.ui.setPoster(e)}},{key:"poster",value:function(){return this.poster_}},{key:"setTitle",value:function(e){this.ui.setTitle(e)}},{key:"onVolumeLevelChanged",value:function(){this.trigger("volumechange")}},{key:"onCurrentTimeChanged",value:function(){this.trigger("timeupdate")}},{key:"onDurationChanged",value:function(){this.trigger("durationchange")}},{key:"setSource",value:function(e){var t,n;return Nf(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=bf.castSession.getMediaSession(),this.trigger("waiting"),(null===(t=null==i?void 0:i.media)||void 0===t?void 0:t.contentId)!==e.src||(null===(n=null==i?void 0:i.media)||void 0===n?void 0:n.contentType)!==e.type){r.next=5;break}return this.triggerLoaded(),r.abrupt("return");case 5:return o=new chrome.cast.media.MediaInfo(e.src,e.type),(a=new chrome.cast.media.LoadRequest(o)).autoplay=!0,a.currentTime=this.currentTime()||this.options_.startTime||0,r.prev=9,r.next=12,bf.castSession.loadMedia(a);case 12:r.next=17;break;case 14:r.prev=14,r.t0=r.catch(9),this.trigger("error");case 17:this.triggerLoaded();case 18:case"end":return r.stop()}}),r,this,[[9,14]])})))}},{key:"triggerLoaded",value:function(){var e=this,t=function(){e.trigger("loadstart"),e.trigger("loadeddata"),e.trigger("play"),e.trigger("playing")};if(this.duration())t();else{var n=bf.remotePlayerController,r=cast.framework.RemotePlayerEventType,i=function e(){t(),n.removeEventListener(r.DURATION_CHANGED,e),n.removeEventListener(r.CURRENT_TIME_CHANGED,e)};n.addEventListener(r.DURATION_CHANGED,i),n.addEventListener(r.CURRENT_TIME_CHANGED,i)}}},{key:"play",value:function(){this.paused()&&bf.remotePlayerController.playOrPause()}},{key:"pause",value:function(){!this.paused()&&bf.remotePlayer.canPause&&bf.remotePlayerController.playOrPause()}},{key:"paused",value:function(){return bf.remotePlayer.isPaused||this.ended()||null===bf.remotePlayer.playerState}},{key:"ended",value:function(){var e,t=null===(e=bf.castSession)||void 0===e?void 0:e.getMediaSession();return!t||t.idleReason===chrome.cast.media.IdleReason.FINISHED}},{key:"setCurrentTime",value:function(e){var t=this.duration();e>t||!bf.remotePlayer.canSeek||(bf.remotePlayer.currentTime=Math.min(t-1,e),bf.remotePlayerController.seek(),this.trigger("timeupdate"))}},{key:"currentTime",value:function(){return bf.remotePlayer.currentTime}},{key:"duration",value:function(){return this.durationCache_=bf.remotePlayer.duration,this.durationCache_}},{key:"volume",value:function(){return bf.remotePlayer.volumeLevel}},{key:"setVolume",value:function(e){bf.remotePlayer.volumeLevel=e,bf.remotePlayerController.setVolumeLevel(),this.trigger("volumechange")}},{key:"muted",value:function(){return bf.remotePlayer.isMuted}},{key:"setMuted",value:function(e){this.muted()===e&&bf.remotePlayerController.muteOrUnmute()}},{key:"buffered",value:function(){}},{key:"seekable",value:function(){return Fu.createTimeRanges(0,this.duration())}},{key:"controls",value:function(){return!1}},{key:"playsinline",value:function(){return!0}},{key:"supportsFullScreen",value:function(){return!0}},{key:"setAutoplay",value:function(){}},{key:"preload",value:function(){}},{key:"load",value:function(){}},{key:"setPlaybackRate",value:function(){}},{key:"playbackRate",value:function(){var e=bf.castSession.getMediaSession();return e?e.playbackRate:1}},{key:"readyState",value:function(){return bf.remotePlayer.playerState===chrome.cast.media.PlayerState.IDLE||bf.remotePlayer.playerState===chrome.cast.media.PlayerState.BUFFERING?0:4}}])&&Rf(t.prototype,n),r&&Rf(t,r),o}(Fu.getComponent("Tech")),Uf=Mf.prototype;Uf.featuresVolumeControl=!0,Uf.featuresPlaybackRate=!1,Uf.movingMediaElementInDOM=!1,Uf.featuresFullscreenResize=!0,Uf.featuresTimeupdateEvents=!0,Uf.featuresProgressEvents=!1,Uf.featuresNativeTextTracks=!1,Uf.featuresNativeAudioTracks=!1,Uf.featuresNativeVideoTracks=!1,Fu.registerTech("chromecast",Mf);n(384);function Bf(e){return(Bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ff(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vf(e,t,n){return(Vf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=$f(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Hf(e,t){return(Hf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$f(e);if(t){var i=$f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qf(this,n)}}function qf(e,t){return!t||"object"!==Bf(t)&&"function"!=typeof t?Wf(e):t}function Wf(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $f(e){return($f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hf(e,t)}(o,e);var t,n,r,i=zf(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t.onDevicesAvailable=t.onDevicesAvailable.bind(Wf(t)),t.onDevicesUnavailable=t.onDevicesUnavailable.bind(Wf(t)),bf.on("devicesAvailable",t.onDevicesAvailable),bf.on("devicesUnabailable",t.onDevicesUnavailable),t.player_.one("dispose",(function(){bf.off("devicesAvailable",t.onDevicesAvailable),bf.off("devicesUnabailable",t.onDevicesUnavailable)})),bf.hasAvailableDevices()||t.hide(),t}return t=o,(n=[{key:"onDevicesAvailable",value:function(){this.show()}},{key:"onDevicesUnavailable",value:function(){this.hide()}},{key:"buildCSSClass",value:function(){return"cv-chromecast-button"}},{key:"createEl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Vf($f(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:'\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <google-cast-launcher></google-cast-launcher>\n '}),n)}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){Vf($f(o.prototype),"handleClick",this).call(this,null)}}])&&Ff(t.prototype,n),r&&Ff(t,r),o}(Fu.getComponent("Button"));function Yf(e){return(Yf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xf(e,t){return(Xf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zf(e);if(t){var i=Zf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Jf(this,n)}}function Jf(e,t){return!t||"object"!==Yf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zf(e){return(Zf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Gf.prototype.controlText_="Chromecast",Fu.registerComponent("ChromecastButton",Gf);var eh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xf(e,t)}(o,e);var t,n,r,i=Qf(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,bf?(e.ready((function(){return n.onReady()})),n):Jf(n)}return t=o,(n=[{key:"onReady",value:function(){var e,t=this,n=this.player.getChild("collapserator"),r=null===(e=null==n?void 0:n.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));r&&-1!==r&&(n.addChild("ChromecastButton",{},r+1),this.onIsConnectedChanged=this.onIsConnectedChanged.bind(this),bf.on("isconnectedchanged",this.onIsConnectedChanged),this.player.one("dispose",(function(){bf.off("isconnectedchanged",t.onIsConnectedChanged)})),this.setTechTitle())}},{key:"setTechTitle",value:function(){var e=this.player.tech();"ChromecastTech"===e.name()&&e.setTitle(this.options.title)}},{key:"onIsConnectedChanged",value:function(){var e=this,t=this.player.currentTime(),n=this.player.paused();this.player.src(this.player.currentSources()),this.player.ready((function(){e.player.currentTime(t),n?e.player.pause():e.player.play(),e.setTechTitle()}))}}])&&Kf(t.prototype,n),r&&Kf(t,r),o}(Fu.getPlugin("plugin"));function th(e){return(th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ih(e,t){return(ih=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function oh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sh(e);if(t){var i=sh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ah(this,n)}}function ah(e,t){return!t||"object"!==th(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sh(e){return(sh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("chromecast",eh);var uh=Fu.getComponent("Menu"),lh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ih(e,t)}(o,e);var t,n,r,i=oh(o);function o(){return nh(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleBlur",value:function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||uh.prototype.handleBlur.call(this,e)}}])&&rh(t.prototype,n),r&&rh(t,r),o}(uh);function ch(e){return(ch="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dh(e,t){return(dh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ph(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mh(e);if(t){var i=mh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yh(this,n)}}function yh(e,t){return!t||"object"!==ch(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mh(e){return(mh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("Menu",lh);var gh=Fu.getComponent("Component"),vh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dh(e,t)}(o,e);var t,n,r,i=ph(o);function o(){return fh(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createMenu",value:function(){var e,t=new lh(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=Fu.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(e=this.options_.title,"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var r=new gh(this.player_,{el:n});t.addItem(r)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t}}])&&hh(t.prototype,n),r&&hh(t,r),o}(Fu.getComponent("MenuButton"));Fu.registerComponent("MenuButton",vh);n(385);function bh(e){return(bh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Th(e,t,n){return(Th="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=kh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Sh(e,t){return(Sh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Eh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kh(e);if(t){var i=kh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ch(this,n)}}function Ch(e,t){return!t||"object"!==bh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kh(e){return(kh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sh(e,t)}(o,e);var t,n,r,i=Eh(o);function o(){return _h(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(Th(kh(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Th(kh(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&wh(t.prototype,n),r&&wh(t,r),o}(Fu.getComponent("Component"));function Oh(e){return(Oh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ph(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rh(e,t,n){return(Rh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ah(e,t){return(Ah=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ih(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jh(e);if(t){var i=jh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Lh(this,n)}}function Lh(e,t){return!t||"object"!==Oh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jh(e){return(jh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xh.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},Fu.registerComponent("TimeWrapper",xh);var Dh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ah(e,t)}(o,e);var t,n,r,i=Ih(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).playNext=e.nextVideoPlugin().getShouldPlayNext(),n.toggle(n.playNext),n}return t=o,(n=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,Fu.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext)}},{key:"toggleOff",value:function(){this.playNext=!1,Fu.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=Fu.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=Rh(jh(o.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">autoplay</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&Ph(t.prototype,n),r&&Ph(t,r),o}(Fu.getComponent("MenuItem"));Fu.registerComponent("NextVideoMenuItem",Dh);n(386);function Nh(e){return(Nh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bh(e,t,n){return t&&Uh(e.prototype,t),n&&Uh(e,n),e}function Fh(e,t,n){return(Fh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Wh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Vh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hh(e,t)}function Hh(e,t){return(Hh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wh(e);if(t){var i=Wh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qh(this,n)}}function qh(e,t){return!t||"object"!==Nh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wh(e){return(Wh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $h=Fu.getComponent("MenuItem"),Gh=Fu.getComponent("NextVideoMenuItem"),Yh=function(e){Vh(n,e);var t=zh(n);function n(e,r){return Mh(this,n),t.call(this,e,r)}return Bh(n,[{key:"handleClick",value:function(e){var t=this;Fh(Wh(n.prototype),"handleClick",this).call(this,e),this.requestAnimationFrame((function(){t.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(e,t,r){if(!this.options_.item)return Fh(Wh(n.prototype),"createEl",this).call(this,e,t,r);var i=this.options_.item.getCollabsibleName(),o=this.options_.item.getCollabsibleValue(),a='\n <span class="vjs-menu-item-text">'.concat(i,"</span>\n <span>").concat(o,"</span>");return Fh(Wh(n.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:a},r)}}]),n}($h),Kh=Fu.getComponent("MenuButton"),Xh=function(e){Vh(n,e);var t=zh(n);function n(e,r){return Mh(this,n),t.call(this,e,r)}return Bh(n,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Fh(Wh(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(Fh(Wh(n.prototype),"buildCSSClass",this).call(this))}},{key:"pressButton",value:function(){this.update(),Kh.prototype.pressButton.apply(this)}},{key:"createItems",value:function(){var e=[];this.renderPlayNext&&e.push(new Gh(this.player_,this.options_));for(var t=0;t<this.options_.items.length;t++){var n=this.options_.items[t];n.isCollabsible&&(n.showInCollabsibleMenu()&&n.isCollapsed&&e.push(new Yh(this.player_,{item:n})))}return e}},{key:"update",value:function(){Fh(Wh(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"showPlayNext",value:function(){this.renderPlayNext=!0,this.update()}}]),n}(Kh);function Qh(e){return(Qh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jh(e,t,n){return(Jh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ad(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Zh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ed(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function td(e,t,n){return t&&ed(e.prototype,t),n&&ed(e,n),e}function nd(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rd(e,t)}function rd(e,t){return(rd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function id(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ad(e);if(t){var i=ad(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return od(this,n)}}function od(e,t){return!t||"object"!==Qh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ad(e){return(ad=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("cogButton",Xh);var sd=Fu.getComponent("MenuItem"),ud=Fu.getComponent("MenuButton"),ld=["small","medium","large"],cd=function(e){nd(n,e);var t=id(n);function n(e,r){return Zh(this,n),t.call(this,e,r)}return td(n,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}]),n}(sd),fd=function(e){nd(n,e);var t=id(n);function n(e,r){var i;return Zh(this,n),(i=t.call(this,e,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.player_.ready((function(){i.update()})),i}return td(n,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting();return ld.map((function(t){return new cd(e.player_,{label:t,selectable:!0,multiSelectable:!1,selected:t===n,value:t})}))}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Jh(ad(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){ud.prototype.handleClick.apply(this)}}]),n}(ud);Fu.registerComponent("SubtitleSizeButton",fd);n(387);var hd=n(112),dd=n.n(hd),pd=(n(388),n(390),n(142)),yd=n.n(pd),md=n(143),gd=n.n(md),vd=n(235),bd=n.n(vd),_d=n(236),wd=(n(392),null),Td=null;function Sd(){if(null===wd){if("undefined"==typeof document)return wd=0;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),wd=n}return wd}dd.a&&window.addEventListener("resize",(function(){Td!==window.devicePixelRatio&&(Td=window.devicePixelRatio,wd=null)}));var Ed=function(e){return Array.prototype.reduce.call(e,(function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}));switch(t.value){case"true":e[r]=!0;break;case"false":e[r]=!1;break;case void 0:e[r]=!0;break;default:e[r]=t.value}}return e}),{})};function Cd(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function kd(e){return e&&e.ownerDocument?e.ownerDocument:document}var xd=function(){function e(t,n){var r=this;this.onScroll=function(){var e=Cd(r.el);r.scrollXTicking||(e.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(e.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(e){r.mouseX=e.clientX,r.mouseY=e.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(e,"x"):r.onTrackClick(e,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(e,"y"):r.onTrackClick(e,"y"))))},this.drag=function(t){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,a=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],s=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var u=(("y"===r.draggedAxis?t.pageY:t.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-o.size)*(a-s);"x"===r.draggedAxis&&(u=r.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u-(i+o.size):u,u=r.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(e){var t=kd(r.el),n=Cd(r.el);e.preventDefault(),e.stopPropagation(),r.el.classList.remove(r.classNames.dragging),t.removeEventListener("mousemove",r.drag,!0),t.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",r.preventClick,!0),t.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=yd()(this.recalculate.bind(this),64),this.onMouseMove=yd()(this.onMouseMove.bind(this),64),this.hideScrollbars=gd()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=gd()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=bd()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=e.getOffset(n),o=e.getOffset(r);n.scrollLeft=999;var a=e.getOffset(r);return{isRtlScrollingInverted:i.left!==o.left&&o.left-a.left!=0,isRtlScrollbarInverted:i.left!==o.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=kd(e),r=Cd(e);return{top:t.top+(r.pageYOffset||n.documentElement.scrollTop),left:t.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),dd.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=Cd(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1,r=t.ResizeObserver||_d.a;this.resizeObserver=new r((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=Cd(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=s+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=s>l,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==a&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var c=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>l-c,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing)return 0;var t,n=this.contentEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=r/n;return t=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[t].sizeAttr],10),o=this.axis[t].scrollbar,a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=(a="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-a:a)/(n-i),u=~~((r-o.size)*s);u="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(r-o.size):u,o.el.style.transform="x"===t?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y");var t=this.axis[e].scrollbar.el;this.axis[e].isVisible||(t.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=kd(this.el),r=Cd(this.el),i=this.axis[t].scrollbar,o="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=o-i.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var r=Cd(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var i=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],o=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=("y"===t?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===s?a-o:a+o;!function e(){var i,o;-1===s?a>u&&(a-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[t].offsetAttr]=a,i)),r.requestAnimationFrame(e)):a<u&&(a+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((o={})[n.axis[t].offsetAttr]=a,o)),r.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Sd()}catch(e){return Sd()}},t.removeListeners=function(){var e=this,t=Cd(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.findChild=function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,(function(e){return n.call(e,t)}))[0]},e}();xd.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},xd.instances=new WeakMap,xd.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||xd.instances.has(e)||new xd(e,Ed(e.attributes))}))},xd.removeObserver=function(){this.globalObserver.disconnect()},xd.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(xd.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},xd.handleMutations=function(e){e.forEach((function(e){Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!xd.instances.has(e)&&new xd(e,Ed(e.attributes)):Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||xd.instances.has(e)||new xd(e,Ed(e.attributes))})))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&(e.hasAttribute('[data-simplebar="init"]')?xd.instances.has(e)&&xd.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),(function(e){xd.instances.has(e)&&xd.instances.get(e).unMount()})))}))}))},xd.getOptions=Ed,dd.a&&xd.initHtmlApi();var Od=xd,Pd={initMenuScrollbar:function(e){Pd.unMountScrollbar(e);var t=Pd.getMenuEl(e);t&&(e.simpleBar_=new Od(t,{autoHide:!1}),e.one("dispose",(function(){return Pd.unMountScrollbar(e)})))},unMountScrollbar:function(e){e.simpleBar_&&e.simpleBar_.unMount()},getMenuEl:function(e){return e.el().querySelector(".vjs-menu-content")}};function Rd(e,t,n,r){e.kind===t&&(n&&e.label!==n||(e.loaded_?r(e):e.one("loadeddata",(function(){r(e)}))))}var Ad=function(e,t,n,r){var i=function(e){Rd(e.track,t,n,r)},o=e.textTracks(),a=function(e,t,n){if(e.length)for(var r=e.length-1;r>=0;r--){var i=e[r];if(i.kind===t){if(n&&i.label!==n)continue;return i}}}(o,t,n);a?Rd(a,t,n,r):(o.addEventListener("addtrack",i),e.on("dispose",(function(){o.removeEventListener("addtrack",i)})))},Id=function(e){if(!e)return null;for(var t=e.textTracks(),n=0;n<t.length;n++){var r=t[n];if("showing"===r.mode)return r}return null};function Ld(e){return(Ld="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dd(e,t){return(Dd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ud(e);if(t){var i=Ud(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Md(this,n)}}function Md(e,t){return!t||"object"!==Ld(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ud(e){return(Ud=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dd(e,t)}(o,e);var t,n,r,i=Nd(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"update",value:function(e,t){var n=this;if(null==e?void 0:e.length){var r=[],i=0;e.forEach((function(e){var o=n.options_.label.substr(i,e);o&&r.push(o),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(e,t)),r.push("</span>"),i=e+t})),r.push(this.options_.label.substring(i,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&jd(t.prototype,n),r&&jd(t,r),o}(Fu.getComponent("MenuItem"));function Fd(e){return(Fd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hd(e,t,n){return(Hd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Gd(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function zd(e,t){return(zd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gd(e);if(t){var i=Gd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wd(this,n)}}function Wd(e,t){return!t||"object"!==Fd(t)&&"function"!=typeof t?$d(e):t}function $d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gd(e){return(Gd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zd(e,t)}(o,e);var t,n,r,i=qd(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onChange=function(e,t,n){var r,i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){o.clearTimeout(r),r=null},s=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var l=function(){r=null,l=null,n||e.apply(this,s)};!r&&n&&e.apply(i,s),o.clearTimeout(r),r=o.setTimeout(l,t)};return s.cancel=a,s}(n.onChange,100,!1,$d(n)),n.bindEventListeners(),n}return t=o,(n=[{key:"createEl",value:function(){return Hd(Gd(o.prototype),"createEl",this).call(this,"li",{innerHTML:'\n <div class="cv-subtitle-search-input">\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="Search" type="text" autocomplete="off" spellcheck="false" aria-label="Search" />\n </div>\n '})}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("input");this.onChange=this.onChange.bind(this),t.addEventListener("keyup",this.onChange),t.addEventListener("blur",(function(t){e.options_.menuButton.menu.handleBlur(t)}))}},{key:"onChange",value:function(e){var t=e.target;this.options_.menuButton.search(t.value)}}])&&Vd(t.prototype,n),r&&Vd(t,r),o}(Fu.getComponent("MenuItem"));n(393);function Kd(e){return(Kd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jd(e,t,n){return t&&Qd(e.prototype,t),n&&Qd(e,n),e}function Zd(e,t,n){return(Zd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=op(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ep(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tp(e,t)}function tp(e,t){return(tp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function np(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=op(e);if(t){var i=op(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rp(this,n)}}function rp(e,t){return!t||"object"!==Kd(t)&&"function"!=typeof t?ip(e):t}function ip(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function op(e){return(op=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ap=Fu.getComponent("MenuItem"),sp=Fu.getComponent("MenuButton"),up=function(e){ep(n,e);var t=np(n);function n(){return Xd(this,n),t.apply(this,arguments)}return Jd(n,[{key:"createEl",value:function(e,t,r){return Zd(op(n.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:"vjs-menu-item cv-no-results"}),r)}}]),n}(ap),lp=function(e){ep(n,e);var t=np(n);function n(e,r){var i;return Xd(this,n),(i=t.call(this,e,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.update=i.update.bind(ip(i)),i.player_.textTracks().addEventListener("selectedlanguagechange",i.update),i}return Jd(n,[{key:"createItems",value:function(){var e,t=Id(this.player_);if(null===(e=null==t?void 0:t.cues)||void 0===e?void 0:e.length){for(var n=[new Yd(this.player_,{menuButton:this})],r=0;r<t.cues.length;r++){var i=t.cues[r];n.push(new Bd(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new up(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return o.hide(),n.push(o),n}}},{key:"search",value:function(e){var t;e=e.trim();var n=Id(this.player_);if(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length){var r=this.findMatches(e,n);this.toggleItemVisibility(e,r),this.toggleNoResults(e,r)}}},{key:"findMatches",value:function(e,t){var n={};if(!e)return n;for(var r=new RegExp(e,"gi"),i=0;i<t.cues.length;i++){for(var o=t.cues[i].text,a=[],s=void 0;s=r.exec(o);)a.push(s.index);a.length&&(n[i]=a)}return n}},{key:"toggleItemVisibility",value:function(e,t){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!e||t[r]?n.show():n.hide(),n.update(t[r],e.length)}))}},{key:"toggleNoResults",value:function(e,t){var n=this.menu.children_[this.menu.children_.length-1];!e||Object.keys(t).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Zd(op(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){Zd(op(n.prototype),"update",this).call(this),Pd.initMenuScrollbar(this),this.player_.trigger("resizemenus")}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){sp.prototype.handleClick.apply(this)}}]),n}(sp);Fu.registerComponent("subtitleSearchButton",lp);n(394),n(395),n(396);function cp(e){return(cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hp(e,t,n){return(hp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=gp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function dp(e,t){return(dp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gp(e);if(t){var i=gp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yp(this,n)}}function yp(e,t){return!t||"object"!==cp(t)&&"function"!=typeof t?mp(e):t}function mp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gp(e){return(gp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dp(e,t)}(o,e);var t,n,r,i=pp(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(mp(n)),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update)})),n}return t=o,(n=[{key:"togglehidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass("cv-collapsed")):(n.isCollapsed=!1,n.removeClass("cv-collapsed")))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.el().getBoundingClientRect();0!==e.width&&this.togglehidden(e.width<600)}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(hp(gp(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return hp(gp(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&fp(t.prototype,n),r&&fp(t,r),o}(Fu.getComponent("Component"));vp.prototype.options_={children:["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"]},Fu.registerComponent("collapserator",vp);n(397);function bp(e){return(bp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tp(e,t,n){return(Tp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=kp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Sp(e,t){return(Sp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ep(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kp(e);if(t){var i=kp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cp(this,n)}}function Cp(e,t){return!t||"object"!==bp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kp(e){return(kp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sp(e,t)}(o,e);var t,n,r,i=Ep(o);function o(){return _p(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Tp(kp(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Tp(kp(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}}])&&wp(t.prototype,n),r&&wp(t,r),o}(Fu.getComponent("Component"));function Op(e){return(Op="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ap(e,t,n){return(Ap="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Dp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ip(e,t){return(Ip=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Dp(e);if(t){var i=Dp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jp(this,n)}}function jp(e,t){return!t||"object"!==Op(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dp(e){return(Dp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Np=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ip(e,t)}(o,e);var t,n,r,i=Lp(o);function o(){return Pp(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Ap(Dp(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Ap(Dp(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&Rp(t.prototype,n),r&&Rp(t,r),o}(Fu.getComponent("Component"));function Mp(e){return(Mp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Up(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fp(e,t,n){return(Fp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=qp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Vp(e,t){return(Vp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qp(e);if(t){var i=qp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zp(this,n)}}function zp(e,t){return!t||"object"!==Mp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qp(e){return(qp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vp(e,t)}(o,e);var t,n,r,i=Hp(o);function o(){return Up(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Fp(qp(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Fp(qp(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])&&Bp(t.prototype,n),r&&Bp(t,r),o}(Fu.getComponent("Component"));function $p(e){return($p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yp(e,t,n){return(Yp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Jp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Kp(e,t){return(Kp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jp(e);if(t){var i=Jp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qp(this,n)}}function Qp(e,t){return!t||"object"!==$p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jp(e){return(Jp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kp(e,t)}(o,e);var t,n,r,i=Xp(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).playProgress=new Wp(n.player_),n.addChild(n.playProgress),n.loadProgress=new Np(n.player_),n.addChild(n.loadProgress),n.update(),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(Yp(Jp(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Yp(Jp(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration(),t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/t);var o=this.player_.bufferedEnd();o<this.options_.startTime?this.loadProgress.update(0):o>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((o-this.options_.startTime)/t)}}])&&Gp(t.prototype,n),r&&Gp(t,r),o}(Fu.getComponent("Component"));function ey(e){return(ey="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ty(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ny(e,t,n){return(ny="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=sy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ry(e,t){return(ry=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sy(e);if(t){var i=sy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oy(this,n)}}function oy(e,t){return!t||"object"!==ey(t)&&"function"!=typeof t?ay(e):t}function ay(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sy(e){return(sy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var uy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ry(e,t)}(o,e);var t,n,r,i=iy(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onDurationChange=n.onDurationChange.bind(ay(n)),n.createChapterItems=n.createChapterItems.bind(ay(n)),Ad(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("dispose",(function(){n.player_.off("durationchange",n.onDurationChange)})),n}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar")})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var e=ny(sy(o.prototype),"update",this).call(this);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"createChapterItems",value:function(e){e&&(this.track_=e);var t=new xp(this.player_);if(this.track_&&!this.options_.ignoreChapters)for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],i=r.startTime,o=r.endTime,a=this.player_.duration();a&&(n===this.track_.cues.length-1&&r.endTime<this.player_.duration()&&(o=this.player_.duration()),o>a&&(o=a));var s=new Zp(this.player_,{startTime:i,endTime:o});if(t.addChild(s),a&&o===a)break}else t.addChild(new Zp(this.player_,{startTime:0,endTime:this.player_.duration()}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=t,this.addChild(this.chapterBarItems)}}])&&ty(t.prototype,n),r&&ty(t,r),o}(Fu.getComponent("SeekBar"));uy.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Fu.browser.IS_IOS||Fu.browser.IS_ANDROID||uy.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Fu.registerComponent("ChapterSeekBar",uy);n(398);function ly(e){return(ly="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hy(e,t,n){return(hy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=my(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function dy(e,t){return(dy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function py(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=my(e);if(t){var i=my(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yy(this,n)}}function yy(e,t){return!t||"object"!==ly(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function my(e){return(my=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gy=Fu.getComponent("ProgressControl"),vy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dy(e,t)}(o,e);var t,n,r,i=py(o);function o(){var e;return cy(this,o),(e=i.apply(this,arguments)).seekBarName_="seekBar",e}return t=o,(n=[{key:"setSeekBarName",value:function(e){this.seekBarName_=e}},{key:"getChild",value:function(e){return(null==e?void 0:e.toLowerCase())==="seekBar".toLowerCase()&&(e=this.seekBarName_),hy(my(o.prototype),"getChild",this).call(this,e)}}])&&fy(t.prototype,n),r&&fy(t,r),o}(gy);function by(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)}vy.prototype.options_={children:[]},Fu.registerComponent("ProgressControl",vy);n(399);function _y(e){return(_y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ty(e,t,n){return(Ty="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ky(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Sy(e,t){return(Sy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ey(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ky(e);if(t){var i=ky(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cy(this,n)}}function Cy(e,t){return!t||"object"!==_y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ky(e){return(ky=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sy(e,t)}(o,e);var t,n,r,i=Ey(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),Ad(n.player_,"chapters",!1,(function(e){n.track_=e})),n}return t=o,(n=[{key:"createEl",value:function(){var e=Ty(ky(o.prototype),"createEl",this).call(this);return this.chapter_=Fu.dom.createEl("div"),e.appendChild(this.chapter_),this.time_=Fu.dom.createEl("div"),e.appendChild(this.time_),e}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(Fu.dom.textContent(this.time_,by(e,t)),this.track_){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n];if(r.startTime<=e&&r.endTime>=e)return void Fu.dom.textContent(this.chapter_,r.text)}Fu.dom.textContent(this.chapter_,"")}}}])&&wy(t.prototype,n),r&&wy(t,r),o}(Fu.getComponent("TimeTooltip"));Fu.registerComponent("TimeTooltip",xy);n(400);function Oy(e){return(Oy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Py(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ry(e,t,n){return(Ry="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ay(e,t){return(Ay=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Iy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jy(e);if(t){var i=jy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ly(this,n)}}function Ly(e,t){return!t||"object"!==Oy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jy(e){return(jy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ay(e,t)}(o,e);var t,n,r,i=Iy(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e=Ry(jy(o.prototype),"createEl",this).call(this,"div",{className:"cv-thumbnail-display"});return this.img_=Fu.dom.createEl("img"),e.appendChild(this.img_),e}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,w:0,h:0,x:0,y:0};var i=this.getScale(),o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"getScale",value:function(){var e=this.options_.scaleFactor,t=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==t&&(e*=2),e}},{key:"update",value:function(e){var t,n;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var r,i=e,o=0;o<this.track_.cues.length;){var a=this.track_.cues[o];if(a.startTime<=i&&a.endTime>=i){r=this.parseImageLink(a.text);break}o++}if(null==r?void 0:r.src){this.enable();var s=r,u=s.src,l=s.w,c=s.h,f=s.x,h=s.y,d=this.getScale();this.img_.src=u,this.img_.style.left=-f+"px",this.img_.style.top=-h+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(d,")"),this.el_.style.width=l+"px",this.el_.style.height=c+"px"}else this.disable()}}}])&&Py(t.prototype,n),r&&Py(t,r),o}(Fu.getComponent("Component"));Dy.prototype.options_={scaleFactor:1},Fu.registerComponent("ThumbnailDisplay",Dy);n(401);function Ny(e){return(Ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function My(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Uy(e,t){return(Uy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function By(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hy(e);if(t){var i=Hy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fy(this,n)}}function Fy(e,t){return!t||"object"!==Ny(t)&&"function"!=typeof t?Vy(e):t}function Vy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hy(e){return(Hy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Uy(e,t)}(o,e);var t,n,r,i=By(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),Ad(n.player_,"metadata","thumbnails",(function(e){n.getChild("ThumbnailDisplay").setTrack(e)})),n.update=n.update.bind(Vy(n)),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return t=o,(n=[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame((function(){var r=t*n.player_.duration();n.getChild("ThumbnailDisplay").update(r),n.getChild("TimeTooltip").updateTime(r);var i=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-i.width/2+"px";var o=e.width*t;o<i.width/2?n.el_.style.left=i.width/2+"px":o>e.width-i.width/2?n.el_.style.left=e.width-i.width/2+"px":n.el_.style.left=e.width*t+"px"}))}}])&&My(t.prototype,n),r&&My(t,r),o}(Fu.getComponent("MouseTimeDisplay"));zy.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},Fu.registerComponent("MouseTimeDisplay",zy);n(402);function qy(e){return(qy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $y(e,t,n){return($y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Gy(e,t){return(Gy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xy(e);if(t){var i=Xy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ky(this,n)}}function Ky(e,t){return!t||"object"!==qy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xy(e){return(Xy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qy=Fu.getComponent("ChaptersTrackMenuItem"),Jy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gy(e,t)}(o,e);var t,n,r,i=Yy(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).nonIconControl=!1,n.thumbnailDisplay=new Dy(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),Ad(n.player_,"metadata","thumbnails",(function(e){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(e),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return t=o,(n=[{key:"update",value:function(){this.player_&&Qy.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(e,t,n){return this.nonIconControl=!0,$y(Xy(o.prototype),"createEl",this).call(this,"li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},t),n)}},{key:"getInnerHTML",value:function(){var e=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(by(this.options_.cue.startTime,e),")</p>")+"</span>"}}])&&Wy(t.prototype,n),r&&Wy(t,r),o}(Qy);n(403);function Zy(e){return(Zy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function em(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tm(e,t,n){return(tm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=am(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function nm(e,t){return(nm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=am(e);if(t){var i=am(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return im(this,n)}}function im(e,t){return!t||"object"!==Zy(t)&&"function"!=typeof t?om(e):t}function om(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function am(e){return(am=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nm(e,t)}(o,e);var t,n,r,i=rm(o);function o(e,t,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e,t,n)).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(om(r)),r.player_.on("cv-whiteboard-change",r.update),r.player_.on("fullscreenchange",r.update),r.player_.on("dispose",(function(){r.player_.off("cv-whiteboard-change",r.update),r.player_.off("fullscreenchange",r.update)})),r}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(tm(am(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(tm(am(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new Jy(this.player_,{track:this.track_,cue:i});e.push(o)}return e}},{key:"setTrack",value:function(e){var t=this;tm(am(o.prototype),"setTrack",this).call(this,e),this.track_&&"chapters"===this.track_.kind&&e.one("loadeddata",(function(){t.update()}))}},{key:"update",value:function(e){tm(am(o.prototype),"update",this).call(this,e),Pd.initMenuScrollbar(this)}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e=this.track_.activeCues[0];return(null==e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&em(t.prototype,n),r&&em(t,r),o}(Fu.getComponent("ChaptersButton"));function um(e){return(um="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fm(e,t){return(fm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pm(e);if(t){var i=pm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dm(this,n)}}function dm(e,t){return!t||"object"!==um(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pm(e){return(pm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("ChaptersButton",sm);var ym=Fu.getComponent("SubsCapsMenuItem"),mm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fm(e,t)}(o,e);var t,n,r,i=hm(o);function o(){return lm(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){ym.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}}])&&cm(t.prototype,n),r&&cm(t,r),o}(ym);function gm(e){return(gm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bm(e,t){return(bm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Tm(e);if(t){var i=Tm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return wm(this,n)}}function wm(e,t){return!t||"object"!==gm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tm(e){return(Tm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Sm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bm(e,t)}(o,e);var t,n,r,i=_m(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};return n.track={player:e,kind:"subtitle",label:"Subtitle size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(t=i.call(this,e,n)).addClass("vjs-texttrack-settings"),t.controlText(", opens subtitle size settings"),t}return t=o,(n=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&vm(t.prototype,n),r&&vm(t,r),o}(Fu.getComponent("TextTrackMenuItem"));n(404);function Em(e){return(Em="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function km(e,t){return(km=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rm(e);if(t){var i=Rm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Om(this,n)}}function Om(e,t){return!t||"object"!==Em(t)&&"function"!=typeof t?Pm(e):t}function Pm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rm(e){return(Rm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Am=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&km(e,t)}(o,e);var t,n,r,i=xm(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};n.track={player:e,kind:"subtitle",label:"Search subtitles",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(t=i.call(this,e,n)).addClass("vjs-texttrack-settings"),t.controlText(", opens subtitle search"),t.toggleHidden=t.toggleHidden.bind(Pm(t));var r=t.player_.textTracks();return r.addEventListener("selectedlanguagechange",t.toggleHidden),t.player_.one("dispose",(function(){r.removeEventListener("selectedlanguagechange",t.toggleHidden)})),t.toggleHidden(),t}return t=o,(n=[{key:"toggleHidden",value:function(){var e;if(this.player_){var t=Id(this.player_);(null===(e=null==t?void 0:t.cues)||void 0===e?void 0:e.length)?this.show():this.hide()}}},{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&Cm(t.prototype,n),r&&Cm(t,r),o}(Fu.getComponent("TextTrackMenuItem"));function Im(e){return(Im="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dm(e,t,n){return(Dm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Nm(e,t){return(Nm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bm(e);if(t){var i=Bm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Um(this,n)}}function Um(e,t){return!t||"object"!==Im(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bm(e){return(Bm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fm=Fu.getComponent("TextTrackButton"),Vm=Fu.getComponent("SubsCapsButton"),Hm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nm(e,t)}(o,e);var t,n,r,i=Mm(o);function o(){var e;return Lm(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Dm(Bm(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){Dm(Bm(o.prototype),"update",this).call(this),Pd.initMenuScrollbar(this)}},{key:"createItems",value:function(){var e=[new Am(this.player_),new Sm(this.player_)];return this.hideThreshold_++,Fm.prototype.createItems.call(this,e,mm)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Vm.prototype.handleClick.apply(this)}}])&&jm(t.prototype,n),r&&jm(t,r),o}(Vm);function zm(e){return(zm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wm(e,t){return(Wm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Km(e);if(t){var i=Km(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gm(this,n)}}function Gm(e,t){return!t||"object"!==zm(t)&&"function"!=typeof t?Ym(e):t}function Ym(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Km(e){return(Km=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("SubsCapsButton",Hm);var Xm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wm(e,t)}(o,e);var t,n,r,i=$m(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).qualityId=t.qualityId;var r=e.qualityLevels(),a=n.handleQualityChange.bind(Ym(n));return r.on("change",a),e.on("dispose",(function(){r.off("change",a)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&qm(t.prototype,n),r&&qm(t,r),o}(Fu.getComponent("MenuItem"));n(405);function Qm(e){return(Qm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zm(e,t,n){return(Zm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ig(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function eg(e,t){return(eg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ig(e);if(t){var i=ig(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ng(this,n)}}function ng(e,t){return!t||"object"!==Qm(t)&&"function"!=typeof t?rg(e):t}function rg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ig(e){return(ig=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var og={240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},ag=Fu.getComponent("MenuButton"),sg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eg(e,t)}(o,e);var t,n,r,i=tg(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0;var r=n.player_.qualityLevels(),a=n.update.bind(rg(n));return r.on("addqualitylevel",a),r.on("removequalitylevel",a),e.on("dispose",(function(){r.removeEventListener("addqualitylevel",a),r.removeEventListener("removequalitylevel",a)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Zm(ig(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button ".concat(Zm(ig(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){for(var e=[],t=this.player_.qualityLevels(),n=0;n<t.length;n++){var r=t[n];if(r){var i=og[r.id];i&&e.push(new Xm(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return e}},{key:"update",value:function(){Zm(ig(o.prototype),"update",this).call(this),Pd.initMenuScrollbar(this)}},{key:"getCollabsibleName",value:function(){return"Playback Quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?og[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){ag.prototype.handleClick.apply(this)}}])&&Jm(t.prototype,n),r&&Jm(t,r),o}(ag);Fu.registerComponent("QualityButton",sg);n(406);function ug(e){return(ug="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fg(e,t,n){return(fg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=yg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function hg(e,t){return(hg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yg(e);if(t){var i=yg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pg(this,n)}}function pg(e,t){return!t||"object"!==ug(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yg(e){return(yg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mg=Fu.getComponent("Menu"),gg=Fu.getComponent("MenuButton"),vg=Fu.getComponent("PlaybackRateMenuItem"),bg=Fu.getComponent("PlaybackRateMenuButton"),_g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hg(e,t)}(o,e);var t,n,r,i=dg(o);function o(){var e;return lg(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=gg.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(fg(yg(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var e=new mg(this.player(),{menuButton:this}),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addItem(new vg(this.player(),{rate:t[n]+"x"}));return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=gg.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=bg.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=Fu.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Rate"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&cg(t.prototype,n),r&&cg(t,r),o}(bg);function wg(e){return(wg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Tg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Eg(e,t){return(Eg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xg(e);if(t){var i=xg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return kg(this,n)}}function kg(e,t){return!t||"object"!==wg(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xg(e){return(xg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("PlaybackRateMenuButton",_g);var Og=Fu.getComponent("TextTrackSettings"),Pg={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Rg={small:Pg,medium:Object.assign(Object.assign({},Pg),{fontPercent:1.5}),large:Object.assign(Object.assign({},Pg),{fontPercent:2})},Ag=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Eg(e,t)}(o,e);var t,n,r,i=Cg(o);function o(){return Tg(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setSizeSetting",value:function(e){this.size_=e,this.player_.getChild("textTrackDisplay").updateDisplay(),this.player_.getChild("collapserator").getChild("subtitleSizeButton").update(),this.player_.trigger("resizemenus"),this.player_.trigger("changesubtitlesize",this.size_)}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return Rg[this.size_]?Rg[this.size_]:Pg}}])&&Sg(t.prototype,n),r&&Sg(t,r),o}(Og);Fu.registerComponent("TextTrackSettings",Ag);n(407);function Ig(e){return(Ig="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dg(e,t,n){return(Dg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ng(e,t){return(Ng=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bg(e);if(t){var i=Bg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ug(this,n)}}function Ug(e,t){return!t||"object"!==Ig(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bg(e){return(Bg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fg=window.navigator&&window.navigator.userAgent||"",Vg=(/iPod/i.test(Fg),/Android/i.test(Fg),Fu.getComponent("Player")),Hg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ng(e,t)}(o,e);var t,n,r,i=Mg(o);function o(){return Lg(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"lock",value:function(e){this.callback_=e}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(e,t){var n=this;if("number"!=typeof e||!this.callback_||t)return Dg(Bg(o.prototype),"currentTime",this).call(this,e);this.callback_((function(){n.unlock(),n.currentTime(e)}))}},{key:"play",value:function(){var e=this;if(!this.callback_)return Dg(Bg(o.prototype),"play",this).call(this);this.callback_((function(){e.unlock(),e.play()}))}},{key:"updateStyleEl_",value:function(){if(Vg.prototype.updateStyleEl_.call(this),this.options_.fluid){var e=this.el_.parentNode;if(e){var t=this.aspectRatio();void 0!==t&&"auto"!==t||(t=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9");var n=t.split(":"),r=+n[1]/+n[0];e.style.maxWidth=65/r+"vh",e.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var e=this;Vg.prototype.listenForUserActivity_.call(this);var t=this.getChild("collapserator");t.on("mouseenter",(function(){e.player().cache_.inactivityTimeout=e.player().options_.inactivityTimeout,e.player().options_.inactivityTimeout=0})),t.on("mouseleave",(function(){e.player().options_.inactivityTimeout=e.player().cache_.inactivityTimeout}))}}])&&jg(t.prototype,n),r&&jg(t,r),o}(Vg);Fu.registerComponent("player",Hg);var zg;n(408),n(409),n(410),n(411),n(412);function qg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wg(e){e.paused()?e.play():e.pause()}function $g(e,t){e.currentTime(e.currentTime()+t)}function Gg(e,t){e.volume(e.volume()+t)}var Yg=(qg(zg={},"f",(function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())})),qg(zg,"m",(function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())})),qg(zg,"k",Wg),qg(zg,"space",Wg),qg(zg,"left",(function(e){return $g(e,-5)})),qg(zg,"right",(function(e){return $g(e,5)})),qg(zg,"j",(function(e){return $g(e,-10)})),qg(zg,"l",(function(e){return $g(e,10)})),qg(zg,"up",(function(e){return Gg(e,.05)})),qg(zg,"down",(function(e){return Gg(e,-.05)})),zg);function Kg(e){var t=v()(e);Yg[t]&&Yg[t](this,e)}function Xg(e){return(Xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qg(e,t){return!t||"object"!==Xg(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jg(e){var t="function"==typeof Map?new Map:void 0;return(Jg=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Zg(e,arguments,nv(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),tv(r,e)})(e)}function Zg(e,t,n){return(Zg=ev()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&tv(i,n.prototype),i}).apply(null,arguments)}function ev(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function tv(e,t){return(tv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nv(e){return(nv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tv(e,t)}(i,e);var t,n,r=(t=i,n=ev(),function(){var e,r=nv(t);if(n){var i=nv(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return Qg(this,e)});function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=r.call(this,e)).url=t,n}return i}(Jg(Error));function iv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ov,av=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},sv=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tokens={gateway:null}}var t,n,r;return t=e,(n=[{key:"get",value:function(e,t){return av(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=this,n.next=3,fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)});case 3:return n.t1=n.sent,n.next=6,n.t0.parseResponse.call(n.t0,n.t1);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n,this)})))}},{key:"delete",value:function(e,t){return av(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(e,{method:"DELETE",headers:this.getHeaders(t)});case 2:case"end":return n.stop()}}),n,this)})))}},{key:"post",value:function(e,t,n){return av(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,mode:"cors"});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:"put",value:function(e,t,n){return av(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,mode:"cors"});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:"setToken",value:function(e,t){this.tokens[e]=t}},{key:"getHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization="Bearer ".concat(this.tokens[e.tokenName])),t}},{key:"parseResponse",value:function(e){return av(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(404!==e.status){t.next=2;break}return t.abrupt("return",null);case 2:if(e.ok){t.next=4;break}throw new rv("Ajax error",e.url);case 4:return t.next=6,e.json();case 6:return n=t.sent,t.abrupt("return",n);case 8:case"end":return t.stop()}}),t)})))}}])&&iv(t.prototype,n),r&&iv(t,r),e}());function uv(e){return(uv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lv(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cv(e,t)}function cv(e,t){return(cv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dv(e);if(t){var i=dv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hv(this,n)}}function hv(e,t){return!t||"object"!==uv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dv(e){return(dv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mv(e,t,n){return t&&yv(e.prototype,t),n&&yv(e,n),e}!function(e){e.LocalStorage="localStorage",e.SessionStorage="sessionStorage"}(ov||(ov={}));var gv=function(){function e(t){pv(this,e),this.cachePrefix="_cv:",this.expireTime=3600,this.hasSupport=this.hasBrowserSupport(),this.type=t.type,this.hasSupport&&(this.storage=window[this.type])}return mv(e,[{key:"get",value:function(e){if(this.hasSupport){var t=this.storage.getItem(e);try{return JSON.parse(t)}catch(e){return t}}}},{key:"set",value:function(e,t){if(this.hasSupport)try{return this.storage.removeItem(e),"string"!=typeof t?(this.storage.setItem(e,JSON.stringify(t)),!0):(this.storage.setItem(e,t),!0)}catch(e){return!1}}},{key:"remove",value:function(e){if(this.hasSupport)return this.storage.removeItem(e)}},{key:"length",value:function(){if(this.hasSupport)return this.storage.length}},{key:"clear",value:function(){if(this.hasSupport)return this.storage.clear()}},{key:"cacheSet",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.expireTime;this.cacheClean();var r={time:this.getCurrentTime()+1e3*n,data:null!=t&&t};return this.set("".concat(this.cachePrefix).concat(e),r)}},{key:"cacheGet",value:function(e){var t="".concat(this.cachePrefix).concat(e),n=this.get(t);return n?this.isExpired(n)?(this.remove(t),null):n.data:null}},{key:"cacheExists",value:function(e){var t="".concat(this.cachePrefix).concat(e),n=this.get(t);return!!n&&(!this.isExpired(n)||(this.remove(t),!1))}},{key:"cacheRemove",value:function(e){return this.remove("".concat(this.cachePrefix).concat(e))}},{key:"cacheFlush",value:function(){this.cacheClean()}},{key:"cacheClean",value:function(){if(this.hasSupport)for(var e=0;e<this.storage.length;e++){var t=this.storage.key(e);if(0===t.indexOf(this.cachePrefix)){var n=this.get(t);n&&n.time&&this.isExpired(n)&&this.remove(t)}}}},{key:"isExpired",value:function(e){return e.time<this.getCurrentTime()}},{key:"getCurrentTime",value:function(){return(new Date).getTime()}},{key:"hasBrowserSupport",value:function(){try{return this.type in window&&null!==window[this.type]}catch(e){return!1}}}]),e}(),vv=function(e){lv(n,e);var t=fv(n);function n(){return pv(this,n),t.apply(this,arguments)}return mv(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:ov.LocalStorage}))}}]),n}(gv),bv=function(e){lv(n,e);var t=fv(n);function n(){return pv(this,n),t.apply(this,arguments)}return mv(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:ov.SessionStorage}))}}]),n}(gv),_v=vv.Instance,wv=(bv.Instance,"URLSearchParams"in self),Tv="Symbol"in self&&"iterator"in Symbol,Sv="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),Ev="FormData"in self,Cv="ArrayBuffer"in self;if(Cv)var kv=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],xv=ArrayBuffer.isView||function(e){return e&&kv.indexOf(Object.prototype.toString.call(e))>-1};function Ov(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function Pv(e){return"string"!=typeof e&&(e=String(e)),e}function Rv(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Tv&&(t[Symbol.iterator]=function(){return t}),t}function Av(e){this.map={},e instanceof Av?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Iv(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Lv(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function jv(e){var t=new FileReader,n=Lv(t);return t.readAsArrayBuffer(e),n}function Dv(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Nv(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Sv&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Ev&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:wv&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Cv&&Sv&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Dv(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Cv&&(ArrayBuffer.prototype.isPrototypeOf(e)||xv(e))?this._bodyArrayBuffer=Dv(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):wv&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Sv&&(this.blob=function(){var e=Iv(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?Iv(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(jv)}),this.text=function(){var e,t,n,r=Iv(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=Lv(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Ev&&(this.formData=function(){return this.text().then(Bv)}),this.json=function(){return this.text().then(JSON.parse)},this}Av.prototype.append=function(e,t){e=Ov(e),t=Pv(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Av.prototype.delete=function(e){delete this.map[Ov(e)]},Av.prototype.get=function(e){return e=Ov(e),this.has(e)?this.map[e]:null},Av.prototype.has=function(e){return this.map.hasOwnProperty(Ov(e))},Av.prototype.set=function(e,t){this.map[Ov(e)]=Pv(t)},Av.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Av.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Rv(e)},Av.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Rv(e)},Av.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Rv(e)},Tv&&(Av.prototype[Symbol.iterator]=Av.prototype.entries);var Mv=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Uv(e,t){var n,r,i=(t=t||{}).body;if(e instanceof Uv){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Av(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Av(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),Mv.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function Bv(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function Fv(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new Av(t.headers),this.url=t.url||"",this._initBody(e)}Uv.prototype.clone=function(){return new Uv(this,{body:this._bodyInit})},Nv.call(Uv.prototype),Nv.call(Fv.prototype),Fv.prototype.clone=function(){return new Fv(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Av(this.headers),url:this.url})},Fv.error=function(){var e=new Fv(null,{status:0,statusText:""});return e.type="error",e};var Vv=[301,302,303,307,308];Fv.redirect=function(e,t){if(-1===Vv.indexOf(t))throw new RangeError("Invalid status code");return new Fv(null,{status:t,headers:{location:e}})};var Hv=self.DOMException;try{new Hv}catch(e){(Hv=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),Hv.prototype.constructor=Hv}function zv(e,t){return new Promise((function(n,r){var i=new Uv(e,t);if(i.signal&&i.signal.aborted)return r(new Hv("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new Av,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){n(new Fv(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new Hv("Aborted","AbortError"))}),0)},o.open(i.method,function(e){try{return""===e&&self.location.href?self.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(Sv?o.responseType="blob":Cv&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}zv.polyfill=!0,self.fetch||(self.fetch=zv,self.Headers=Av,self.Request=Uv,self.Response=Fv);var qv=n(237),Wv=n.n(qv),$v=n(238);function Gv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Yv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Kv={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i};function Xv(e,t,n){var r=Gv(t.exec(n)||[],1)[0];return r||(r="Unknown"),{name:e,version:r}}function Qv(e,t,n){if(!t)return{name:e,version:"Unknown"};var r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():"Unknown"}}var Jv=function(){var e=window.navigator.userAgent;return Kv.android.test(e)?Qv("Android",Kv.androidVersion,e):Kv.iphone.test(e)||Kv.ipad.test(e)?Qv("iOS",Kv.iosVersion,e):Kv.linux.test(e)?Qv("Linux",null,e):Kv.unix.test(e)?Qv("Unix",null,e):Kv.mac.test(e)?Qv("Macintosh",Kv.osxVersion,e):Kv.windows.test(e)?function(e,t){var n={name:e,version:null};return Kv.win2000.test(t)&&(n.version="2000"),Kv.winXP.test(t)&&(n.version="XP"),Kv.winVista.test(t)&&(n.version="Vista"),Kv.win7.test(t)&&(n.version="7"),Kv.win8.test(t)&&(n.version="8"),Kv.win81.test(t)&&(n.version="8.1"),Kv.win10.test(t)&&(n.version="10"),n.version||(n.version="Unknown"),n}("Windows",e):Kv.blackberry.test(e)?Qv("BlackBerry",Kv.blackberryVersion,e):Kv.windowsPhone.test(e)?Qv("Windows Phone",Kv.windowsPhoneVersion,e):{name:"Unknown",version:"Unknown"}},Zv=function(){var e=window.navigator.userAgent;return Kv.chrome.test(e)?Xv("Chrome",Kv.generalVersion,e):Kv.firefox.test(e)?Xv("Firefox",Kv.generalVersion,e):Kv.safari.test(e)?Xv("Safari",Kv.generalVersion,e):Kv.ie.test(e)?Xv("Internet Explorer",Kv.ieVersion,e):Kv.edge.test(e)?Xv("Edge",Kv.edgeVersion,e):Kv.opera.test(e)?Xv("Opera",Kv.operaVersion,e):{name:"Unknown",version:"Unknown"}};function eb(e){return(eb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var tb,nb=function(e){var t=eb(e);return"function"===t||"object"===t&&!!e},rb=function(e){return"function"==typeof e},ib=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}},ob=n(103);!function(e){e.CvApSoutheast1="cv-ap-southeast-1",e.CvApSoutheast2="cv-ap-southeast-2",e.CvEuWest1="cv-eu-west-1",e.CvNaWest1="cv-na-west-1"}(tb||(tb={}));var ab={CvApSoutheast1:{systemName:tb.CvApSoutheast1},CvApSoutheast2:{systemName:tb.CvApSoutheast2},CvEuWest1:{systemName:tb.CvEuWest1},CvNaWest1:{systemName:tb.CvNaWest1}};function sb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ub=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},lb=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){this.validateOptions()}},{key:"name",get:function(){return"CollectionApiClient"}},{key:"log",value:function(e){return ub(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Array.isArray(e)){t.next=2;break}return t.abrupt("return",this.logBulk(e));case 2:if(this.shouldLog(e)){t.next=4;break}return t.abrupt("return");case 4:return this.validateEvent(e),t.t0=this,t.next=8,this.formatData(e);case 8:return t.t1=t.sent,t.next=11,t.t0.postData.call(t.t0,t.t1);case 11:case"end":return t.stop()}}),t,this)})))}},{key:"logBulk",value:function(e){return ub(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.filter((function(e){return i.shouldLog(e)}))).length){t.next=3;break}return t.abrupt("return");case 3:return n.forEach((function(e){return i.validateEvent(e)})),t.next=6,Promise.all(n.map((function(e){return i.formatData(e)})));case 6:return r=t.sent,t.next=9,this.postData(r);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"validateOptions",value:function(){if(!rb(this.options.getUser))throw new Error("getUser option is required.")}},{key:"shouldLog",value:function(e){return!rb(this.options.shouldLog)||this.options.shouldLog(e)}},{key:"postData",value:function(e){return ub(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegionalUrl(this.options.collectionApiUrls);case 2:return n=t.sent,r=JSON.stringify(e),i=Object.assign({"Content-Type":"application/json"},this.getSignatureHeader(r)),o=ib(n,"/v1/ingest"),Array.isArray(e)&&(o=ib(o,"/bulk")),t.next=9,fetch(o,{method:"POST",mode:"cors",headers:i,body:r});case 9:case"end":return t.stop()}}),t,this)})))}},{key:"getSignatureHeader",value:function(e){var t=new Wv.a("SHA-1","TEXT",{hmacKey:{value:"zXJL9nOHxzDlMUDjiP41",format:"TEXT",encoding:"UTF8"}});return t.update(e),{"cv-analytics-signature":"".concat(this.options.collectionApiClientId,".").concat(t.getHash("B64"))}}},{key:"getRegionalUrl",value:function(e){return ub(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegion();case 2:n=t.sent,t.t0=n.systemName,t.next=t.t0===tb.CvEuWest1?6:t.t0===tb.CvApSoutheast2?7:t.t0===tb.CvNaWest1?8:(t.t0,tb.CvApSoutheast1,9);break;case 6:return t.abrupt("return",e.cvEuWest1);case 7:return t.abrupt("return",e.cvApSoutheast2);case 8:return t.abrupt("return",e.cvNaWest1);case 9:return t.abrupt("return",e.cvApSoutheast1);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"validateEvent",value:function(e){if("string"!=typeof e.type)throw new Error("Event type is required.");if(!nb(e.actionContext))throw new Error("Event actionContext is required.");if(!e.actionContext.entity)throw new Error("Event actionContext entity is required.")}},{key:"formatData",value:function(e){return ub(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e.type,t.next=3,this.getEventData(e);case 3:return t.t1=t.sent,t.t2=this.getEventMetadata(e),t.abrupt("return",{type:t.t0,data:t.t1,metadata:t.t2});case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getEventData",value:function(e){return ub(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.actionContext,t.next=3,this.getUserData();case 3:return r=t.sent,i={user:r,action:n,platform:this.getPlatformMetadata(),product:{name:this.options.productName,version:this.options.productVersion}},o=this.extractData(e),a=Object.keys(i).map((function(e){return e.toLowerCase()})),s=Object.keys(o).map((function(e){return e.toLowerCase()})),a.forEach((function(e){if(s.includes(e))throw Error("".concat(e," is a reserved key."))})),t.abrupt("return",Object.assign(Object.assign({},i),o));case 10:case"end":return t.stop()}}),t,this)})))}},{key:"extractData",value:function(e){return rb(this.options.formatData)?this.options.formatData(e):(t={},n=e.actionContext.entity,r=e.data,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);var t,n,r}},{key:"getUserData",value:function(){var e,t;return ub(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.options.getUser();case 2:if(null==(r=n.sent)?void 0:r.id){n.next=5;break}return n.abrupt("return");case 5:return n.t0=r.id,n.t1=(null===(e=r.role)||void 0===e?void 0:e.toLowerCase())||"unknown",n.t2=(null===(t=r.userGroup)||void 0===t?void 0:t.toLowerCase())||ob.a.Unknown,n.t3=this.normalizeYearGroup(r.yearGroup),n.t4=r.customerId,n.t5=r.customerName,n.t6=r.customerGuid,n.t7=r.crmId,n.t8=r.countryCode,n.next=16,this.getRegion();case 16:return n.t9=n.sent,n.t10=r.isOpenCustomer,n.t11={id:n.t4,name:n.t5,customerGuid:n.t6,crmId:n.t7,country:n.t8,region:n.t9,openCustomer:n.t10},n.abrupt("return",{id:n.t0,role:n.t1,userGroup:n.t2,yearGroup:n.t3,customer:n.t11});case 20:case"end":return n.stop()}}),n,this)})))}},{key:"getRegion",value:function(){return ub(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.options.getUser();case 2:if(t=e.sent,n=(null==t?void 0:t.instanceRegion)||this.options.regionName){e.next=6;break}throw Error("RegionName is not set.");case 6:return e.abrupt("return",this.getRegionByName(n.toLowerCase()));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"getPlatformMetadata",value:function(){return{browser:Zv(),os:Jv(),request:{url:window.location.href,referrer:document.referrer},screenResolution:"".concat(window.screen.width,"x").concat(window.screen.height)}}},{key:"getEventMetadata",value:function(e){return{client:{name:"".concat(this.name,".ts"),version:$v.a,region:this.getRegionByName(this.options.regionName)},timestamp:(new Date).toISOString(),eventVersion:e.eventVersion}}},{key:"getRegionByName",value:function(e){var t;return Object.values(ab).forEach((function(n){n.systemName===e&&(t=n)})),t}},{key:"normalizeYearGroup",value:function(e){return e?e.toLowerCase().split(" ").join("_"):"unknown"}}])&&sb(t.prototype,n),r&&sb(t,r),e}(),cb=n(2),fb=function(){return!0},hb=function(){return!1};var db=function(e){return e};function pb(e){if(e&&e.code)return e.code}function yb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.id){var n={id:e.id};return e.name&&!t.ignoreTitle&&(n.title=e.name),n}}function mb(e){if(e&&e.length){var t=e[0];return{id:t.id,title:t.name}}}var gb,vb,bb,_b,wb=function(e){var t=e.model,n={id:t.id.toString(),year:t.productionYear,title:t.name,trackingCode:t.trackingCode},r=pb(t.rating),i=yb(t.series),o=mb(t.categories),a=yb(t.owner,{ignoreTitle:!0}),s=yb(t.playlist);return r&&(n.rating=r),a&&(n.ownerId=a.id),i&&(n.seriesId=i.id,n.series=i.title),o&&(n.category=o.title),s&&(n.playlist=s),n},Tb={getUploadData:function(e,t){var n=t.actionContext.entity;if(n===cb.EntityType.Video)return Tb.formatVideoUpload(e,t);if(n===cb.EntityType.Resource||n===cb.EntityType.Subtitle)return Tb.formatResourceUpload(e);if(n===cb.EntityType.Banner||n===cb.EntityType.Thumbnail)return e;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload:function(e,t){var n=t.actionContext.workflowPhase;return n===cb.WorkflowPhase.Start?Tb.getStartVideoUploadData(e):n===cb.WorkflowPhase.Discard?Tb.getDiscardVideoUploadData(e):n===cb.WorkflowPhase.Complete?Tb.getCompleteUploadData(e):void 0},getStartVideoUploadData:function(e){return e&&e.length?(e instanceof FileList&&(e=Array.from(e)),e.map((function(t){return{fileName:t.name,size:t.size,type:t.type,count:e.length}}))):[]},getDiscardVideoUploadData:function(e){var t=function(t){var n=t.file,r=n.type,i=n.name,o=n.status,a=n.cvUpload,s={fileName:i,count:Array.isArray(e)?e.length:1,type:r,status:o};return t.progress&&(s.progress=t.progress.toFixed(2)),a&&(s.uploadId=a.uploadId),s};return Array.isArray(e)?e.map((function(e){return t(e)})):[t(e)]},getCompleteUploadData:function(e){return e&&e.length?e.map((function(t){return{fileName:t.fileName,libraryId:t.libraryId,folderId:t.folderId,autoCaption:t.autoCaption,count:e.length}})):[]},formatResourceUpload:function(e){var t={id:e.id,name:e.name};return nb(e.metadata)&&(t.type=e.metadata.type),t}};function Sb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Eb=(Sb(gb={},cb.UserAction.Navigate,hb),Sb(gb,cb.UserAction.Click,fb),Sb(gb,cb.UserAction.Search,fb),Sb(gb,cb.UserAction.InstantSearch,fb),Sb(gb,cb.UserAction.Play,fb),Sb(gb,cb.UserAction.Stream,fb),Sb(gb,cb.UserAction.WebPlayerStream,fb),Sb(gb,cb.UserAction.StreamRaw,fb),Sb(gb,cb.UserAction.StreamProgress,fb),Sb(gb,cb.UserAction.Rename,fb),Sb(gb,cb.UserAction.Move,fb),Sb(gb,cb.UserAction.Create,fb),Sb(gb,cb.UserAction.Delete,fb),Sb(gb,cb.UserAction.Associate,fb),Sb(gb,cb.UserAction.Dissociate,fb),Sb(gb,cb.UserAction.Filter,fb),Sb(gb,cb.UserAction.Sort,fb),Sb(gb,cb.UserAction.Approve,fb),Sb(gb,cb.UserAction.Reject,fb),Sb(gb,cb.UserAction.Disable,fb),Sb(gb,cb.UserAction.Upload,fb),Sb(gb,cb.UserAction.Download,hb),Sb(gb,cb.UserAction.SetAccess,fb),Sb(gb,cb.UserAction.AddToLocalCache,hb),Sb(gb,cb.UserAction.Share,fb),Sb(gb,cb.UserAction.Edit,fb),Sb(gb,cb.UserAction.Suggest,fb),Sb(gb,cb.UserAction.Favourite,fb),Sb(gb,cb.UserAction.ResolveWarning,fb),Sb(gb,cb.UserAction.DismissWarning,fb),Sb(gb,cb.UserAction.EditAssoc,fb),Sb(gb,cb.UserAction.Follow,fb),Sb(gb,cb.UserAction.Print,fb),Sb(gb,cb.UserAction.Copy,fb),Sb(gb,cb.UserAction.Activate,fb),Sb(gb,cb.UserAction.VerifyEmail,fb),Sb(gb,cb.UserAction.ChangePassword,fb),Sb(gb,cb.UserAction.Export,fb),gb),Cb=(Sb(vb={},cb.UserAction.Search,db),Sb(vb,cb.UserAction.InstantSearch,db),Sb(vb,cb.UserAction.Play,db),Sb(vb,cb.UserAction.Stream,wb),Sb(vb,cb.UserAction.StreamRaw,db),Sb(vb,cb.UserAction.StreamProgress,db),Sb(vb,cb.UserAction.Click,db),Sb(vb,cb.UserAction.Filter,db),Sb(vb,cb.UserAction.Sort,db),Sb(vb,cb.UserAction.SetAccess,db),Sb(vb,cb.UserAction.Approve,db),Sb(vb,cb.UserAction.Reject,db),Sb(vb,cb.UserAction.Create,db),Sb(vb,cb.UserAction.Delete,db),Sb(vb,cb.UserAction.Rename,db),Sb(vb,cb.UserAction.Move,db),Sb(vb,cb.UserAction.Edit,db),Sb(vb,cb.UserAction.Share,db),Sb(vb,cb.UserAction.Disable,db),Sb(vb,cb.UserAction.Suggest,db),Sb(vb,cb.UserAction.Upload,Tb.getUploadData),Sb(vb,cb.UserAction.ResolveWarning,db),Sb(vb,cb.UserAction.DismissWarning,db),Sb(vb,cb.UserAction.Follow,db),Sb(vb,cb.UserAction.Print,db),Sb(vb,cb.UserAction.Copy,db),vb),kb=(Sb(bb={},cb.UserAction.Search,(function(){return"search"})),Sb(bb,cb.UserAction.InstantSearch,(function(){return"search"})),Sb(bb,cb.UserAction.Filter,(function(){return"filter"})),Sb(bb,cb.UserAction.StreamRaw,(function(){return cb.EntityType.Video})),bb),xb={user:"target_user"},Ob=(Sb(_b={},cb.UserAction.StreamProgress,!0),Sb(_b,cb.UserAction.WebPlayerStream,!0),_b),Pb={shouldLog:function(e){return!!Eb[e.type](e)},formatData:function(e){var t=Cb[e.type],n=rb(t)?t(e.data,e):e.data;if(Ob[e.type])return n;var r=e.actionContext.entity;return rb(kb[e.type])&&(r=kb[e.type](e)),xb[r]&&(r=xb[r]),Sb({},r,n)}};function Rb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ab=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"logStream",value:function(){var e="v:".concat(this.options.videoId);_v.cacheExists(e)||(this.collectionApiClient.log({type:cb.UserAction.WebPlayerStream,actionContext:this.getActionContext(),data:{video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},eventVersion:cb.EventVersion.V2}),_v&&_v.cacheSet(e,null,300))}},{key:"logVideoProgress",value:function(e){var t=this;this.collectionApiClient.log(e.map((function(e){return{type:cb.UserAction.StreamProgress,actionContext:t.getActionContext(),data:{progress:e,video:{id:t.options.videoId}},eventVersion:cb.EventVersion.V1}})))}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new lb({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return e.getCurrentUser()},shouldLog:Pb.shouldLog,formatData:Pb.formatData})}},{key:"getCurrentUser",value:function(){var e=this;return new Promise((function(t){t({id:e.options.userId,customerId:e.options.customerId})}))}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?cb.PlayerDescriptor.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return cb.EntityType.Video;case"MasterInteractive":return cb.EntityType.Interactive;case"MasterClip":return cb.EntityType.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return cb.LocationContext.Player;case"interactive-player":return cb.LocationContext.InteractivePlayer;case"create-clip-player":return cb.LocationContext.CreateClipPlayer}}}])&&Rb(t.prototype,n),r&&Rb(t,r),e}(),Ib="\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 Lb(e){return(Lb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Db(e,t,n){return(Db="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bb(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Nb(e,t){return(Nb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bb(e);if(t){var i=Bb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ub(this,n)}}function Ub(e,t){return!t||"object"!==Lb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bb(e){return(Bb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nb(e,t)}(o,e);var t,n,r,i=Mb(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n}return t=o,(n=[{key:"createEl",value:function(e,t,n){var r="<h1>".concat(this.options_.title,"</h1>");if(!this.options_.seriesName)return Db(Bb(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n);var i=this.buildSeasonEpisodeString();return i?(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase()," ").concat(i,"</div>")+r,Db(Bb(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n)):(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+r,Db(Bb(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var e=this.padNumber(this.options_.seasonNumber,2),t=this.padNumber(this.options_.episodeNumber,2);return"S".concat(e," • E").concat(t)}},{key:"padNumber",value:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}}])&&jb(t.prototype,n),r&&jb(t,r),o}(Fu.getComponent("Component"));function Vb(e){return(Vb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zb(e,t,n){return(zb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Gb(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function qb(e,t){return(qb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gb(e);if(t){var i=Gb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $b(this,n)}}function $b(e,t){return!t||"object"!==Vb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gb(e){return(Gb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qb(e,t)}(o,e);var t,n,r,i=Wb(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-splash-warning-container ".concat(zb(Gb(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){var r=zb(Gb(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n);if(!this.options_.ratingCode)return r;var i=this.mapCodeToColourClass(this.options_.ratingCode);return r.appendChild(Fu.dom.createEl("div",{className:"cv-splash-rating badge rating-badge ".concat(i),innerHTML:this.options_.ratingCode})),this.options_.warning&&r.appendChild(Fu.dom.createEl("div",{className:"cv-splash-warning",innerHTML:this.options_.warning})),r}},{key:"mapCodeToColourClass",value:function(e){switch(e){case"E":return"bg-purple";case"G":return"bg-green";case"PG":return"bg-info";case"M":return"bg-red";case"MA15+":return"bg-pink";case"R18+":return"bg-yellow"}}}])&&Hb(t.prototype,n),r&&Hb(t,r),o}(Fu.getComponent("Component"));function Kb(e){return(Kb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qb(e,t){return(Qb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=e_(e);if(t){var i=e_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zb(this,n)}}function Zb(e,t){return!t||"object"!==Kb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function e_(e){return(e_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var t_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qb(e,t)}(o,e);var t,n,r,i=Jb(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"createEl",value:function(){var e=Fu.dom.createEl("div",{className:"cv-splash-metadata ".concat(this.options_.embed?"cv-embed-splash-metadata":"")});return this.options_.embed&&e.appendChild(new Fb(this.player_,{title:this.options_.title,seriesName:this.options_.seriesName,seasonNumber:this.options_.seasonNumber,episodeNumber:this.options_.episodeNumber}).el()),e.appendChild(new Yb(this.player_,{warning:this.options_.warning,ratingCode:this.options_.ratingCode}).el()),e}}])&&Xb(t.prototype,n),r&&Xb(t,r),o}(Fu.getComponent("Component"));n(413);function n_(e){return(n_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i_(e,t,n){return(i_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u_(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function o_(e,t){return(o_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u_(e);if(t){var i=u_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s_(this,n)}}function s_(e,t){return!t||"object"!==n_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u_(e){return(u_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o_(e,t)}(o,e);var t,n,r,i=a_(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild(new t_(n.player_,n.options_)),n}return t=o,(n=[{key:"createEl",value:function(e,t,n){var r="<div class='cv-player-mask'></div>";return this.options_.embed&&(r+="<div class='cv-embed-logo'>".concat(Ib,"</div>")),i_(u_(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:r}),n)}}])&&r_(t.prototype,n),r&&r_(t,r),o}(Fu.getComponent("Component"));function c_(e){return function(e){if(Array.isArray(e))return f_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f_(e,t)}(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.")}()}function f_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d_,p_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},y_=Fu.getComponent("Player"),m_=450,g_=function(){function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamLogged=!1,this.options=Fu.mergeOptions({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),this.buildVideoJs(),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready((function(){r._configurePlugins(),r.options.setup&&r.options.setup(r.options,r.player),r.options.startTime&&r.player.currentTime(r.options.startTime),r.fetch().catch((function(e){r.player.error(e.message),r.options.onError&&r.options.onError(e)}))}))}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(e){var t;null===(t=this.analyticsService)||void 0===t||t.logVideoProgress(e)}},{key:"buildVideoJs",value:function(){return this.player=Fu(this.el,this.getPlayerOptions())}},{key:"getPlayerOptions",value:function(){return{controls:this.options.controls,autoplay:this.options.autoplay,fluid:!this.options.embed,fill:!!this.options.embed,inactivityTimeout:500,controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(c_(y_.prototype.options_.children),["collapserator"]),userActions:{hotkeys:Kg},playbackRates:this.options.playbackRates,techOrder:["chromecast","html5"]}}},{key:"fetch",value:function(){return p_(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.options.fetch,void 0===this.options.fetch&&(t=function(e){var t="".concat(i.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return sv.get(t)}),this.options.viewKey){e.next=4;break}throw new Error("Please specify a viewKey or a fetch function");case 4:return e.next=6,t(this.options.viewKey);case 6:if(n=e.sent){e.next=9;break}throw new Error("Error fetching playback object");case 9:n.chapters.list.length>0&&(r=this.player.addTextTrack("chapters"),n.chapters.list.forEach((function(e){r.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})})),r.trigger({type:"loadeddata",target:r})),this.player.progressiveFiles({sources:n.files.progressive.map((function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}}))}),n.subtitles.list.length>0&&(n.subtitles.list.forEach((function(e){"text/vtt"===e.mimeType&&i.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label},!0)})),this.player.persistSubtitleSettingsPlugin({showSubtitles:n.settings.showSubtitles,subtitleSize:n.settings.playbackSubtitleSizeDefault})),n.posterUrl&&this.player.poster(n.posterUrl),this.setupSplash(n),this.options.showResources&&n.resources&&this.player.resourcesPlugin({resources:n.resources.list,imageCdnUrl:this.options.imageCdnUrl}),this.additionalSetup(n);case 16:case"end":return e.stop()}}),e,this)})))}},{key:"fetchConfig",value:function(){var e=this;if(!d_&&!this.options.fetch){var t="".concat(this.options.playerApi.origin,"/api/config");sv.get(t).then((function(t){d_=t,e.trigger("config:loaded")}))}}},{key:"additionalSetup",value:function(e){var t,n,r=this;this.player.localCache({localCacheAddresses:e.localCacheAddresses,enabled:null===(t=this.options.enableLocalCache)||void 0===t||t}),this.player.persistQualitySettingsPlugin({playbackProfile:e.settings.playbackProfile,playbackProfileLocalCache:e.settings.playbackProfileLocalCache}),this.player.whiteboardModePlugin(),this.player.chromecast({title:e.title});var i=this.options.enableLocalCache&&!!(null===(n=e.localCacheAddresses)||void 0===n?void 0:n.length);d_?this.setupAnalyticsService(e,i):this.one("config:loaded",(function(){return r.setupAnalyticsService(e,i)}))}},{key:"setupAnalyticsService",value:function(e,t){this.analyticsService=new Ab({collectionApiUrls:d_.collectionApi.urls,collectionApiClientId:d_.collectionApi.clientId,productVersion:Ku.a,regionName:"cv-ap-southeast-1",videoId:e.videoId,userId:e.viewerId,customerId:e.viewerCustomerId,mediaType:e.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:!!this.options.embed,isUsingLocalCache:t}),this.on("timeupdate",this.logStream)}},{key:"logStream",value:function(){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(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=Fu.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=Fu.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{key:"play",value:function(){this.player.play()}},{key:"currentTime",value:function(e){return this.player.currentTime(e)}},{key:"bindEventListeners",value:function(){var e=this,t=function(){return e.configureMenuDimensions()};if(this.on("resize",t),this.on("fullscreenchange",t),this.one("play",t),this.on("resizemenus",t),this.player.on("dispose",(function(){e.off("resize",t),e.off("fullscreenchange",t),e.off("resizemenus",t)})),this.options.hotkeyElQuerySelector){var n=Fu.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.on("dispose",(function(){e.player.off(n,"keydown",e.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var e=this.getSeekBarName(),t=this.player.controlBar.getChild("progressControl");t.addChild(e,this.getSeekBarOptions()),t.setSeekBarName(e)}},{key:"setupSplash",value:function(e){var t=this.player.getChild("posterImage"),n=new l_(this.player,{embed:this.options.embed,posterUrl:e.posterUrl,title:e.title,ratingCode:e.ratingCode,seriesName:e.seriesName,seasonNumber:e.seasonNumber,episodeNumber:e.episodeNumber});t.addChild(n)}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}},{key:"configureMenuDimensions",value:function(){var e=this;if(this.player.isFullscreen()){var t=this.player.whiteboardModePlugin().side;if("top"===t){var n=this.player.getChild("collapserator"),r=n.getChild("volumePanel"),i=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:!1},i)}else{var o=this.player.getChild("collapserator"),a=o.getChild("volumePanel"),s=o.children_.indexOf(a);o.removeChild(a),o.addChild("volumePanel",{inline:!0},s)}if("left"===t||"right"===t||"top"===t){var u=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(e){e.style.paddingTop=null,e.style.marginBottom=null,e.style.width="calc(".concat(u,"px - 4em)")}))}}var l=this.player.currentWidth(),c=this.player.currentHeight()/l*100,f=this.player.el().querySelector(".cv-collapsorator"),h=this.player.el().querySelectorAll(".vjs-menu"),d=f&&f.offsetHeight;d?h&&h.length&&h.forEach((function(t){t.style.paddingTop="calc(".concat(c,"% - ").concat(d,"px)"),t.style.marginBottom="".concat(d,"px"),t.style.width=null,t.querySelector(".vjs-menu-content")&&(l<=m_?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))})):this.one("play",(function(){return e.configureMenuDimensions()}))}}])&&h_(t.prototype,n),r&&h_(t,r),e}();g_.options_={viewKey:null,controls:!0,playbackRates:[.5,1,1.5,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0};n(414);function v_(e){return(v_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function __(e,t,n){return(__="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=E_(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function w_(e,t){return(w_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E_(e);if(t){var i=E_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return S_(this,n)}}function S_(e,t){return!t||"object"!==v_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E_(e){return(E_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w_(e,t)}(o,e);var t,n,r,i=T_(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"vjs-example-button ".concat(__(E_(o.prototype),"buildCSSClass",this).call(this))}}])&&b_(t.prototype,n),r&&b_(t,r),o}(Fu.getComponent("Button"));C_.prototype.controlText_="Example Button",Fu.registerComponent("ExampleButton",C_);var k_=n(28),x_=n.n(k_);function O_(e){return(O_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function A_(e,t,n){return t&&R_(e.prototype,t),n&&R_(e,n),e}function I_(e,t,n){return(I_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=M_(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function L_(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&j_(e,t)}function j_(e,t){return(j_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function D_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=M_(e);if(t){var i=M_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return N_(this,n)}}function N_(e,t){return!t||"object"!==O_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function M_(e){return(M_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var U_=function(e){L_(n,e);var t=D_(n);function n(e,r){return P_(this,n),t.call(this,e,r)}return A_(n,[{key:"dispose",value:function(){x_.a.unmountComponentAtNode(this.el()),I_(M_(n.prototype),"dispose",this).call(this)}}]),n}(Fu.getComponent("Component")),B_={tagName:"div"};function F_(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:B_;if(!e)throw new Error("componentCtor is required");var n=function(n){L_(i,n);var r=D_(i);function i(){return P_(this,i),r.apply(this,arguments)}return A_(i,[{key:"createEl",value:function(){var n=Fu.dom.createEl(t.tagName,t.properties,t.attributes);return x_.a.render(e(this.player_,this.options_),n),n}}]),i}(U_);return n}function V_(){return i.a.createElement("button",{style:{height:"100%",cursor:"pointer"},onClick:function(){return console.log("Clicked React Button")}},"React Button")}function H_(e){return(H_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function q_(e,t){return(q_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=G_(e);if(t){var i=G_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $_(this,n)}}function $_(e,t){return!t||"object"!==H_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function G_(e){return(G_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("ExampleReactButton",F_((function(){return i.a.createElement(V_,null)})));var Y_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&q_(e,t)}(o,e);var t,n,r,i=W_(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){this.player.getChild("collapserator").addChild("exampleReactButton")}}])&&z_(t.prototype,n),r&&z_(t,r),o}(Fu.getPlugin("plugin"));function K_(e){return(K_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Q_(e,t){return(Q_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ew(e);if(t){var i=ew(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Z_(this,n)}}function Z_(e,t){return!t||"object"!==K_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ew(e){return(ew=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("examplePlugin",Y_);var tw=Fu.getPlugin("plugin"),nw="cvplayer-mute",rw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q_(e,t)}(o,e);var t,n,r,i=J_(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).initialize(),t}return t=o,(n=[{key:"initialize",value:function(){var e=this;if(Ll()){this.player.on("volumechange",(function(){Dl("cvplayer-volume",e.player.volume().toString()),Dl(nw,e.player.muted().toString())}));var t=jl("cvplayer-volume"),n=jl(nw);t&&this.player.volume(+t),n&&this.player.muted("true"===n)}}}])&&X_(t.prototype,n),r&&X_(t,r),o}(tw);function iw(e){return(iw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ow(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aw(e,t){return(aw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cw(e);if(t){var i=cw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return uw(this,n)}}function uw(e,t){return!t||"object"!==iw(t)&&"function"!=typeof t?lw(e):t}function lw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cw(e){return(cw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistVolumePlugin",rw);var fw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aw(e,t)}(o,e);var t,n,r,i=sw(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).hasScreenOrientation()&&t.player.supportsFullScreen()?(t.onRotate=t.onRotate.bind(lw(t)),t.onFullscreenChange=t.onFullscreenChange.bind(lw(t)),t.initialize(),t):uw(t)}return t=o,(n=[{key:"initialize",value:function(){var e=this;window.addEventListener("orientationchange",this.onRotate),this.hasScreenLock()&&this.player.on("fullscreenchange",this.onFullscreenChange),this.player.one("dispose",(function(){var t;window.removeEventListener("orientationchange",e.onRotate),e.hasScreenLock()&&(null===(t=e.player)||void 0===t||t.off("fullscreenchange",e.onFullscreenChange))}))}},{key:"onFullscreenChange",value:function(){!this.getAngle()&&this.player.isFullscreen()?window.screen.orientation.lock("portrait-primary"):window.screen.orientation.unlock()}},{key:"onRotate",value:function(){var e=this.getAngle();90===e||-90===e||270===e?this.player.requestFullscreen():this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"hasScreenOrientation",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"hasScreenLock",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])&&ow(t.prototype,n),r&&ow(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("fullscreenOnRotatePlugin",fw);n(418);function hw(e){return(hw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pw(e,t){return(pw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vw(e);if(t){var i=vw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mw(this,n)}}function mw(e,t){return!t||"object"!==hw(t)&&"function"!=typeof t?gw(e):t}function gw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vw(e){return(vw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pw(e,t)}(o,e);var t,n,r,i=yw(o);function o(e,t){var n,r,a,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update=(r=n.update.bind(gw(n)),a=1e3,s=window.performance.now(),function(){var e=window.performance.now();e-s>=a&&(r.apply(void 0,arguments),s=e)}),e.on("timeupdate",n.update),e.on("dispose",(function(){e.off("timeupdate",n.update)})),n}return t=o,(n=[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:Ib,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=Fu.dom.createEl("a",e,t);return this.createControlTextEl(n),n}}])&&dw(t.prototype,n),r&&dw(t,r),o}(Fu.getComponent("Button"));function _w(e){return(_w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ww(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tw(e,t){return(Tw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Cw(e);if(t){var i=Cw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ew(this,n)}}function Ew(e,t){return!t||"object"!==_w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cw(e){return(Cw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}bw.prototype.controlText_="Open in ClickView",Fu.registerComponent("OpenExternallyButton",bw);var kw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tw(e,t)}(o,e);var t,n,r,i=Sw(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){var e=this.player.getChild("collapserator"),t=e.getChild("customControlSpacer"),n=e.children_.indexOf(t);e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&ww(t.prototype,n),r&&ww(t,r),o}(Fu.getPlugin("plugin"));function xw(e){return(xw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ow(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pw(e,t){return(Pw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Lw(e);if(t){var i=Lw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Aw(this,n)}}function Aw(e,t){return!t||"object"!==xw(t)&&"function"!=typeof t?Iw(e):t}function Iw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lw(e){return(Lw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("openExternallyPlugin",kw);var jw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pw(e,t)}(o,e);var t,n,r,i=Rw(o);function o(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e),void 0===t.startTime)throw Error("Invalid clip start");if(void 0===t.endTime)throw Error("Invalid clip end");if(t.startTime>t.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=t.startTime,n._clipEnd=t.endTime,n.playerEndedFn=n.player.ended.bind(e),n.playerDurationFn=n.player.duration.bind(e),n.playerCurrentTimeFn=n.player.currentTime.bind(e),n.playerbufferedFn=n.player.buffered.bind(e),n.player.ended=n.ended.bind(Iw(n)),n.player.duration=n.duration.bind(Iw(n)),n.player.currentTime=n.currentTime.bind(Iw(n)),n.player.buffered=n.buffered.bind(Iw(n)),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return t=o,(n=[{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return this._clipEnd>e?e:this._clipEnd}},{key:"dispose",value:function(){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")}},{key:"initialize",value:function(){var e=this;this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay),this.player.on("dispose",(function(){e.dispose()}))}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart&&this.playerCurrentTimeFn(this.clipStart))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return void 0!==e&&this.playerDurationFn(e),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if(void 0===e)return this.getCurrentTime(!0);for(var t=e+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.playerCurrentTimeFn.apply(this,[t].concat(r))}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return Fu.createTimeRanges(t)}}])&&Ow(t.prototype,n),r&&Ow(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("clipPlugin",jw);n(419);function Dw(e){return(Dw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mw(e,t,n){return(Mw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Uw(e,t){return(Uw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vw(e);if(t){var i=Vw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fw(this,n)}}function Fw(e,t){return!t||"object"!==Dw(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vw(e){return(Vw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Uw(e,t)}(o,e);var t,n,r,i=Bw(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(Mw(Vw(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Mw(Vw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"setUi",value:function(e,t){var n=this,r=e>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Nw(t.prototype,n),r&&Nw(t,r),o}(Fu.getComponent("component"));function zw(e){return(zw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ww(e,t){return(Ww=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yw(e);if(t){var i=Yw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gw(this,n)}}function Gw(e,t){return!t||"object"!==zw(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yw(e){return(Yw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("TouchControls",Hw);var Kw=Fu.getPlugin("plugin"),Xw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ww(e,t)}(o,e);var t,n,r,i=$w(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).doubleTouchCount=0,t.seekStartTime=0,t.directionModifier=0,t.bindFunctions(),t.initialize(),t}return t=o,(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(){this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.player.on("dispose",this.unBindEventListeners),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.on(this.tech,"touchstart",this.onTouchStart),this.on(this.tech,"touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&(this.off(this.tech,"touchstart",this.onTouchStart),this.off(this.tech,"touchend",this.onTouchEnd))}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.changedTouches[0].pageX<n?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 r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}])&&qw(t.prototype,n),r&&qw(t,r),o}(Kw);Fu.registerPlugin("touchControls",Xw);n(420);function Qw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zw(e){var t,n=Qw(r.useState(105),2),i=n[0],o=n[1],a=r.useRef(e.player.duration()-e.player.currentTime()),s=Qw(r.useState(a.current),2),u=s[0],l=s[1];function c(){var t=e.player.el().querySelector(".vjs-control-bar"),n=null==t?void 0:t.offsetHeight;isNaN(n)||o(n+15)}function f(){var t=e.player.duration()-e.player.currentTime();l(t),t>a.current&&(a.current=t)}if(r.useEffect((function(){return c(),e.player.on("resize",c),e.player.on("fullscreenchange",c),e.player.on("timeupdate",f),function(){e.player.off("resize",c),e.player.off("fullscreenchange",c),e.player.off("timeupdate",f)}}),[]),!e.nextVideo||!e.onPlayNext)return r.createElement(r.Fragment,null);var h=(a.current-u)/a.current*100,d=Math.ceil(u),p=1===d?"second":"seconds";return r.createElement("div",{className:"cv-up-next-container rounded",style:{bottom:"".concat(i,"px")}},r.createElement("div",{className:"cv-up-next-progress-bar rounded",style:{width:"".concat(h,"%")}}),r.createElement("div",{className:"row no-gutters"},r.createElement("div",{className:"col-6"},r.createElement("div",{className:"cv-up-next-thumbnail-container",onClick:e.onPlayNext},r.createElement("div",{className:"cv-up-next-thumbnail-mask"},r.createElement("div",{className:"position-relative w-100 h-100"},r.createElement("div",{className:"cv-up-next-play-icon-container"},r.createElement("div",{className:"position-relative w-100 h-100"},r.createElement("span",{className:"cv-up-next-play-icon"}))))),r.createElement("img",{className:"img-fluid",src:null===(t=e.nextVideo)||void 0===t?void 0:t.thumbnailUrl}))),r.createElement("div",{className:"col-5 pl-2 pt-2"},r.createElement("p",null,"Up next in ",d," ",p),r.createElement("p",null,e.nextVideo.name)),r.createElement("div",{className:"col-1 pr-1"},r.createElement("div",{className:"close cv-cancel-up-next cursor-pointer",role:"button",onClick:e.onCancel},"×"))))}function eT(e){return(eT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nT(e,t){return(nT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=aT(e);if(t){var i=aT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return iT(this,n)}}function iT(e,t){return!t||"object"!==eT(t)&&"function"!=typeof t?oT(e):t}function oT(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aT(e){return(aT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("UpNext",F_((function(e,t){return r.createElement(Zw,Object.assign({player:e},t))})));var sT=Fu.getPlugin("plugin"),uT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nT(e,t)}(o,e);var t,n,r,i=rT(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).setShouldPlayNext=t.setShouldPlayNext.bind(oT(t)),t.getShouldPlayNext=t.getShouldPlayNext.bind(oT(t)),t.setChapterTrack=t.setChapterTrack.bind(oT(t)),t.onTimeUpdate=t.onTimeUpdate.bind(oT(t)),e.ready((function(){t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){this.player.isDisposed()||(this.hasLocalStorage=this.testHasLocalStorage(),Ad(this.player,"chapters",null,this.setChapterTrack),this.bindListeners())}},{key:"setNextVideo",value:function(e,t){var n;this.player.isDisposed()||(this.nextVideo=e,this.callback=t,(null===(n=this.player.getChild("collapserator"))||void 0===n?void 0:n.getChild("cogButton")).showPlayNext())}},{key:"getShouldPlayNext",value:function(){if(!this.hasLocalStorage)return void 0===this.shouldPlayNextVideo&&(this.shouldPlayNextVideo=!0),this.shouldPlayNextVideo;var e=window.localStorage.getItem("cv-play-next-video");return null===e||"true"===e}},{key:"setShouldPlayNext",value:function(e){this.hasLocalStorage?window.localStorage.setItem("cv-play-next-video",e.toString()):this.shouldPlayNextVideo=e}},{key:"setChapterTrack",value:function(e){this.chapterTrack=e}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"unbindListeners",value:function(){this.player.off("timeupdate",this.onTimeUpdate)}},{key:"onTimeUpdate",value:function(){var e,t,n,r;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint||("credits"===(null===(r=null===(n=(null===(t=null===(e=this.chapterTrack)||void 0===e?void 0:e.activeCues)||void 0===t?void 0:t.length)&&this.chapterTrack.activeCues[0])||void 0===n?void 0:n.text)||void 0===r?void 0:r.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext())}else this.hideUpNext()}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1,this.upNextTimepoint=null;var e=this.player.getChild("UpNext");e&&this.player.removeChild(e)}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem("cv-persisttest","persistVolume"),window.localStorage.removeItem("cv-persisttest"),!0}catch(e){return!1}}}])&&tT(t.prototype,n),r&&tT(t,r),o}(sT);Fu.registerPlugin("nextVideoPlugin",uT);n(421);function lT(e){return(lT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hT(e,t,n){return(hT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=mT(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function dT(e,t){return(dT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mT(e);if(t){var i=mT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yT(this,n)}}function yT(e,t){return!t||"object"!==lT(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mT(e){return(mT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dT(e,t)}(o,e);var t,n,r,i=pT(o);function o(){var e;return cT(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){hT(mT(o.prototype),"handleClick",this).call(this,null)}}])&&fT(t.prototype,n),r&&fT(t,r),o}(Fu.getComponent("Button"));function vT(e){return(vT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _T(e,t){return(_T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ST(e);if(t){var i=ST(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return TT(this,n)}}function TT(e,t){return!t||"object"!==vT(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ST(e){return(ST=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}gT.prototype.controlText_="Create Clip",Fu.registerComponent("CreateClipButton",gT);var ET=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_T(e,t)}(o,e);var t,n,r,i=wT(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&bT(t.prototype,n),r&&bT(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("createClipButtonPlugin",ET);var CT,kT=n(4),xT=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}},OT=n(204),PT=n(41),RT=n(12);function AT(e){return(AT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function IT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jT(e,t){return(jT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function DT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=MT(e);if(t){var i=MT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NT(this,n)}}function NT(e,t){return!t||"object"!==AT(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function MT(e){return(MT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.Analytics="AnalyticsService",e.Context="ContextService"}(CT||(CT={}));var UT,BT=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jT(e,t)}(o,e);var t,n,r,i=DT(o);function o(){var e;return IT(this,o),(e=i.apply(this,arguments)).contextHistory=[],e}return t=o,r=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"name",get:function(){return CT.Context}},{key:"initialize",value:function(){this.listenTo(RT.a.SHELL,OT.EventNames.ROUTE,this.setContext)}},{key:"setContext",value:function(e){this.contextHistory.length>=5&&this.contextHistory.unshift(),this.contextHistory.push({pageLoad:!this.contextHistory.length,appLink:e})}},{key:"getCurrentContext",value:function(){if(this.contextHistory.length)return this.contextHistory[this.contextHistory.length-1]}},{key:"fromPageLoad",value:function(){return 1===this.contextHistory.length}}])&&LT(t.prototype,n),r&&LT(t,r),o}(OT.Service)),FT=n(10);!function(e){e.Inlet="event:inlet",e.Outlet="event:outlet"}(UT||(UT={}));var VT="global:analytics";function HT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var zT=cb.EventVersion.V1,qT=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=t,this.data=n,this.actionContext=r,this.eventVersion=i||zT}var t,n,r;return t=e,(n=[{key:"isType",value:function(e){return e===this.type}},{key:"enrich",value:function(e,t){this.validateKey(e),this[e]=t}},{key:"get",value:function(e){if(e&&this[e])return this[e]}},{key:"validateKey",value:function(e){"type"!==e&&"data"!==e||OT.ErrorHelper.throw(new PT.a("".concat(e," is not a valid key"))),this[e]&&OT.ErrorHelper.throw(new PT.a("Event already contains an enrichment named ".concat(e)))}}])&&HT(t.prototype,n),r&&HT(t,r),e}(),WT=function(e,t,n,r){FT.Radio.channel(VT).trigger(UT.Inlet,new qT(e,t,n,r))};function $T(){var e=BT.getCurrentContext().appLink;return kT.isObject(e)||OT.ErrorHelper.throw(new PT.a("Applink does not exist. Check current context.")),e.application.replace(":","-")}function GT(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.location,n=e.entity,r=e.workflowPhase,i=void 0===r?null:r,o=e.descriptor,a=void 0===o?null:o;return t||OT.ErrorHelper.throw(new PT.a("location must be set.")),n||OT.ErrorHelper.throw(new PT.a("entity must be set.")),{productArea:$T(),location:t,entity:n,descriptor:a,workflowPhase:i}}function YT(){return OT.LocationUtils.GetCurrentPath()+OT.LocationUtils.GetCurrentQueryString()}var KT={logUserAction:function(e,t){if(function(e){return!(!kT.isArray(e)||!kT.every(e,(function(e){return kT.isObject(e)})))||!!kT.isObject(e)}(e)&&kT.isObject(t)){var n=KT.buildUserActionEvent(t),r=n.userAction,i=n.action,o=n.eventVersion;WT(r,e,i,o)}},logNavigate:function(e,t){var n=Object.assign({currentLocation:YT(),appLink:e},t);WT(cb.UserAction.Navigate,n)},mergeOptions:function(e,t){return kT.extend({},e,t)},buildActionContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return GT(e)},buildUserActionEvent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.actionType,n=e.eventVersion,r=t,i=GT(e);return{userAction:r,action:i,eventVersion:n}},buildCurrentLocation:function(){return YT()},buildSearchEvent:function(e,t){return{data:{query:e},action:GT({entity:cb.EntityType.Video,location:cb.LocationContext.SearchBar,descriptor:t})}},buildInstantSearchEvent:function(e,t,n){var r;n===cb.SearchQueryType.Series&&(r=cb.EntityType.Series),n===cb.SearchQueryType.Folder&&(r=cb.EntityType.Folder),n===cb.SearchQueryType.Tags&&(r=cb.EntityType.Tag),n===cb.SearchQueryType.Video&&(r=cb.EntityType.Video),n===cb.SearchQueryType.Subjects&&(r=cb.EntityType.Classification);var i={instant:{},query:e};return t.id&&(i.instant.selectedId=t.id),t.name&&(i.instant.selectedName=t.name),{data:i,action:GT({entity:r,location:cb.LocationContext.SearchBar})}},mapInteractionType:function(e){switch(e){case cb.InteractionType.DragDrop:return cb.InteractionTypeDescriptor.DragDrop;case cb.InteractionType.FileSelect:return cb.InteractionTypeDescriptor.FileSelect;default:return}}};function XT(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return QT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QT(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function QT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var JT={isEmpty:function(e){return kT.isEmpty(e)},values:function(e){return kT.values(e)},keys:function(e){return kT.keys(e)},deepClone:function(e){return(kT.isArray(e)?kT.map:kT.mapObject)(e,(function(e){return kT.isObject(e)||kT.isArray(e)?JT.deepClone(e):e}))},getEnumKeys:function(e){return Object.keys(e).filter((function(e){return!(parseInt(e)>=0)}))},isObject:function(e){return kT.isObject(e)},isEqual:function(e,t){return kT.isEqual(e,t)},omit:function(e,t){return kT.omit(e,t)},removeEmptyKeys:function(e){return Object.entries(e).filter((function(e){return null!==XT(e,2)[1]})).reduce((function(e,t){var n=XT(t,2),r=n[0],i=n[1];return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},r,i))}),{})}};var ZT=function(e,t){if(!e)throw new Error("Invariant failed")};function eS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tS(){return(tS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function nS(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var rS=new Map,iS=new Map,oS=new Map,aS=0;function sS(e,t,n){void 0===n&&(n={}),n.threshold||(n.threshold=0);var r=n,i=r.root,o=r.rootMargin,a=r.threshold;if(rS.has(e)&&ZT(!1),e){var s=function(e){return e?oS.has(e)?oS.get(e):(aS+=1,oS.set(e,aS.toString()),oS.get(e)+"_"):""}(i)+(o?a.toString()+"_"+o:a.toString()),u=iS.get(s);u||(u=new IntersectionObserver(lS,n),s&&iS.set(s,u));var l={callback:t,element:e,inView:!1,observerId:s,observer:u,thresholds:u.thresholds||(Array.isArray(a)?a:[a])};return rS.set(e,l),u.observe(e),l}}function uS(e){if(e){var t=rS.get(e);if(t){var n=t.observerId,r=t.observer,i=r.root;r.unobserve(e);var o=!1,a=!1;n&&rS.forEach((function(t,r){r!==e&&(t.observerId===n&&(o=!0,a=!0),t.observer.root===i&&(a=!0))})),!a&&i&&oS.delete(i),r&&!o&&r.disconnect(),rS.delete(e)}}}function lS(e){e.forEach((function(e){var t=e.isIntersecting,n=e.intersectionRatio,r=e.target,i=rS.get(r);if(i&&n>=0){var o=i.thresholds.some((function(e){return i.inView?n>e:n>=e}));void 0!==t&&(o=o&&t),i.inView=o,i.callback(o,e)}}))}var cS=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eS(nS(t=e.call.apply(e,[this].concat(r))||this),"state",{inView:!1,entry:void 0}),eS(nS(t),"node",null),eS(nS(t),"handleNode",(function(e){t.node&&uS(t.node),t.node=e||null,t.observeNode()})),eS(nS(t),"handleChange",(function(e,n){(e!==t.state.inView||e)&&t.setState({inView:e,entry:n}),t.props.onChange&&t.props.onChange(e,n)})),t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=i.prototype;return o.componentDidMount=function(){this.node||ZT(!1)},o.componentDidUpdate=function(e,t){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold||(uS(this.node),this.observeNode()),t.inView!==this.state.inView&&this.state.inView&&this.props.triggerOnce&&(uS(this.node),this.node=null)},o.componentWillUnmount=function(){this.node&&(uS(this.node),this.node=null)},o.observeNode=function(){if(this.node){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin;sS(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r})}},o.render=function(){var e=this.state,t=e.inView,n=e.entry;if(!function(e){return"function"!=typeof e.children}(this.props))return this.props.children({inView:t,entry:n,ref:this.handleNode});var i=this.props,o=i.children,a=i.as,s=i.tag,u=(i.triggerOnce,i.threshold,i.root,i.rootMargin,i.onChange,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(i,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange"]));return Object(r.createElement)(a||s||"div",tS({ref:this.handleNode},u),o)},i}(r.Component);eS(cS,"displayName","InView"),eS(cS,"defaultProps",{threshold:0,triggerOnce:!1});function fS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return hS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dS(e){var t=fS(function(e){void 0===e&&(e={});var t=Object(r.useRef)(),n=Object(r.useState)({inView:!1,entry:void 0}),i=n[0],o=n[1],a=Object(r.useCallback)((function(n){t.current&&uS(t.current),n&&sS(n,(function(t,r){o({inView:t,entry:r}),t&&e.triggerOnce&&uS(n)}),e),t.current=n}),[e.threshold,e.root,e.rootMargin,e.triggerOnce]);return Object(r.useDebugValue)(i.inView),[a,i.inView,i.entry]}({triggerOnce:!0}),2),n=t[0],i=t[1];return!0!==e&&void 0!==window.IntersectionObserver||(i=!0,n=null),{ref:n,inView:i}}var pS,yS,mS,gS,vS,bS,_S=n(144),wS=n.n(_S),TS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},SS=r.memo((function(e){var t=e.forceLoad,n=e.extraClasses,i=void 0===n?"":n,o=TS(e,["forceLoad","extraClasses"]),a=dS(),s=a.ref,u=a.inView;if(!s)return r.createElement("img",Object.assign({className:"".concat(wS.a.image," ").concat(i),alt:""},o));var l=o.src,c=TS(o,["src"]),f=Object.assign(Object.assign({alt:""},c),u||t?{src:l}:{});return t||(f.ref=s),r.createElement("img",Object.assign({className:"".concat(wS.a.image," ").concat(i)},f))}));function ES(e){var t=e.appLink,n=e.appLinkOptions,i=e.className,o=e.style,a=e.children,s=e.tag,u=void 0===s?"a":s;if(!t)return r.createElement("span",{className:i||""},a);var l=OT.AppLinkHelper.getHref(t),c={onClick:function(r){var i;r.preventDefault(),null===(i=e.onClick)||void 0===i||i.call(e,r),e.analyticsData&&e.analyticsOptions&&KT.logUserAction(Object.assign({href:l},e.analyticsData),e.analyticsOptions),OT.AppLinkHelper.trigger(t,n)},href:l,className:i,style:o};return e.title&&(c.title=e.title),r.createElement(u,Object.assign({},c),a)}function CS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ES.defaultProps={appLinkOptions:{}},function(e){e.Small="small",e.Medium="medium",e.Large="large"}(pS||(pS={})),function(e){e[e.Thumbnails=0]="Thumbnails",e[e.Banners=1]="Banners",e[e.Avatars=2]="Avatars",e[e.Logos=3]="Logos",e[e.Covers=4]="Covers",e[e.Posters=5]="Posters",e[e.TallPosters=6]="TallPosters",e[e.HeroBanners=7]="HeroBanners",e[e.None=99999]="None"}(yS||(yS={})),function(e){e[e.Crop=0]="Crop",e[e.Stretched=1]="Stretched",e[e.Cover=2]="Cover"}(mS||(mS={})),function(e){e[e.None=0]="None",e[e.ImageAPIv1=1]="ImageAPIv1",e[e.FileAPIv1=2]="FileAPIv1",e[e.ImageAPIv2=3]="ImageAPIv2"}(gS||(gS={})),function(e){e.Banner="banner",e.Thumbnail="thumbnail"}(bS||(bS={}));var kS,xS,OS=(CS(vS={},yS.Banners,bS.Banner),CS(vS,yS.Thumbnails,bS.Thumbnail),vS),PS=function(e){return"/v1/category-map/".concat(e)},RS={createUrl:function(e,t){return RS._createUrl(e,t)},createBannerUrl:function(e,t,n){return e&&e.url?RS._createUrl(e.url,n):RS._createCategoryMappedUrl(t,n)},createResourceImage:function(e,t,n){return RS._createUrl(e,Object.assign({url:t},n))},Rfc3986EncodeURIComponent:function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape)},_createCategoryMappedUrl:function(e,t){var n=e.fallbackBaseUrl,r=e.fallbackCategoryName,i=e.type,o=xT(n,"".concat(PS(OS[i]))),a=Object.assign({name:RS.Rfc3986EncodeURIComponent(r)},t);return RS._createUrl(o,a)},_createUrl:function(e,t){if(e){if(JT.isEmpty(t))return e;var n=$.param(t),r=-1===e.indexOf("?")?"?":"&",i=e;return i.endsWith("/")&&(i=i.slice(0,-1)),i+"".concat(r).concat(n)}},legacyCreateThumbnailUrl:function(e,t){if(!e)return"";var n;if(e&&(n=e instanceof OT.Model?e.get("url"):"string"==typeof e?e:e.url)){var r=Object.assign({size:pS.Small,bgColor:"000"},t);return RS._createUrl(n,r)}}},AS=n(72),IS=n.n(AS);function LS(e){var t="thumbnail ".concat(IS.a.thumbnail),n="";return e.aspectRatio===kS.SixteenByNine&&(n=IS.a.sixteenByNine),e.aspectRatio===kS.NineBySixteen&&(n=IS.a.nineBySixteen),e.aspectRatio===kS.OneByOne&&(n=IS.a.oneByOne),e.aspectRatio===kS.TwoByThree&&(n=IS.a.twoByThree),n&&(t+=" ".concat(n)),e.className&&(t+=" ".concat(e.className)),t}function jS(e){var t=e.data,n=e.imageOptions,i=e.appLink,o=e.preload,a=e.analyticsOptions,s=e.analyticsData,u=e.imageClassName,l="";"string"==typeof t?l=t:JT.isObject(t)&&(l=t.url);var c=l&&n?RS.createUrl(l,n):l;return r.createElement("div",{className:LS(e),style:e.imageStyle},i?r.createElement(ES,{appLink:i,analyticsData:s,analyticsOptions:a},e.children,c&&r.createElement(SS,{src:c,forceLoad:o,extraClasses:u,onError:e.onImageLoadError||function(){}})):r.createElement(r.Fragment,null,e.children,c&&r.createElement(SS,{src:c,forceLoad:o,extraClasses:u,onError:e.onImageLoadError||function(){}})))}function DS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return NS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MS(e){var t=DS(Object(r.useState)(window.matchMedia(e).matches),2),n=t[0],i=t[1];return Object(r.useEffect)((function(){var t=window.matchMedia(e);t.matches!==n&&i(t.matches);var r=function(){return i(t.matches)};return t.addListener(r),function(){return t.removeListener(r)}}),[e]),n}!function(e){e[e.SixteenByNine=0]="SixteenByNine",e[e.OneByOne=1]="OneByOne",e[e.TwoByThree=2]="TwoByThree",e[e.NineBySixteen=3]="NineBySixteen"}(kS||(kS={})),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(xS||(xS={}));var US=n(24),BS=n(40),FS=n(84),VS=n(137),HS=n.n(VS),zS=(n(106),n(70)),qS=n.n(zS),WS=n(239),$S=n.n(WS),GS=(n(68),!1),YS=i.a.createContext(null),KS=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i="exited",r.appearStatus="entering"):i="entered":i=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:i},r.nextCallback=null,r}Object(FS.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=x_.a.findDOMNode(this);"entering"===t?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e,t){var n=this,r=this.props.enter,i=this.context?this.context.isMounting:t,o=this.getTimeouts(),a=i?o.appear:o.enter;!t&&!r||GS?this.safeSetState({status:"entered"},(function(){n.props.onEntered(e)})):(this.props.onEnter(e,i),this.safeSetState({status:"entering"},(function(){n.props.onEntering(e,i),n.onTransitionEnd(e,a,(function(){n.safeSetState({status:"entered"},(function(){n.props.onEntered(e,i)}))}))})))},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n&&!GS?(this.props.onExit(e),this.safeSetState({status:"exiting"},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=Object(BS.a)(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return i.a.createElement(YS.Provider,{value:null},n(e,r));var o=i.a.Children.only(n);return i.a.createElement(YS.Provider,{value:null},i.a.cloneElement(o,r))},t}(i.a.Component);function XS(){}KS.contextType=YS,KS.propTypes={},KS.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:XS,onEntering:XS,onEntered:XS,onExit:XS,onExiting:XS,onExited:XS},KS.UNMOUNTED=0,KS.EXITED=1,KS.ENTERING=2,KS.ENTERED=3,KS.EXITING=4;var QS,JS=KS,ZS=n(242),eE=n.n(ZS);var tE=((QS={}).entering="show",QS.entered="show",QS),nE=i.a.forwardRef((function(e,t){var n=e.className,o=e.children,a=Object(BS.a)(e,["className","children"]),s=Object(r.useCallback)((function(e){!function(e){e.offsetHeight}(e),a.onEnter&&a.onEnter(e)}),[a]);return i.a.createElement(JS,Object(US.a)({ref:t,addEndListener:eE.a},a,{onEnter:s}),(function(e,t){return i.a.cloneElement(o,Object(US.a)({},t,{className:qS()("fade",n,o.props.className,tE[e])}))}))}));nE.defaultProps={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},nE.displayName="Fade";var rE=nE,iE={transition:rE,rootClose:!1,show:!1,placement:"top"};function oE(e){var t=e.children,n=e.transition,r=Object(BS.a)(e,["children","transition"]);return n=!0===n?rE:n||null,i.a.createElement($S.a,Object(US.a)({},r,{transition:n}),(function(e){var r=e.props,o=e.arrowProps,a=e.show,s=Object(BS.a)(e,["props","arrowProps","show"]);return function(e,t){var n=e.ref,r=t.ref;e.ref=n.__wrapped||(n.__wrapped=function(e){return n(Object(k_.findDOMNode)(e))}),t.ref=r.__wrapped||(r.__wrapped=function(e){return r(Object(k_.findDOMNode)(e))})}(r,o),"function"==typeof t?t(Object(US.a)({},s,{},r,{show:a,arrowProps:o})):i.a.cloneElement(t,Object(US.a)({},s,{},r,{arrowProps:o,className:qS()(t.props.className,!n&&a&&"show"),style:Object(US.a)({},t.props.style,{},r.style)}))}))}oE.defaultProps=iE;var aE=oE,sE=function(e){function t(){return e.apply(this,arguments)||this}return Object(FS.a)(t,e),t.prototype.render=function(){return this.props.children},t}(i.a.Component),uE=function(e){return e&&"object"==typeof e?e:{show:e,hide:e}},lE=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).getTarget=function(){return x_.a.findDOMNode(r.trigger.current)},r.handleShow=function(){clearTimeout(r._timeout),r._hoverState="show";var e=uE(r.props.delay);e.show?r._timeout=setTimeout((function(){"show"===r._hoverState&&r.show()}),e.show):r.show()},r.handleHide=function(){clearTimeout(r._timeout),r._hoverState="hide";var e=uE(r.props.delay);e.hide?r._timeout=setTimeout((function(){"hide"===r._hoverState&&r.hide()}),e.hide):r.hide()},r.handleFocus=function(e){var t=r.getChildProps().onFocus;r.handleShow(e),t&&t(e)},r.handleBlur=function(e){var t=r.getChildProps().onBlur;r.handleHide(e),t&&t(e)},r.handleClick=function(e){var t=r.getChildProps().onClick;r.state.show?r.hide():r.show(),t&&t(e)},r.handleMouseOver=function(e){r.handleMouseOverOut(r.handleShow,e,"fromElement")},r.handleMouseOut=function(e){return r.handleMouseOverOut(r.handleHide,e,"toElement")},r.trigger=i.a.createRef(),r.state={show:!!t.defaultShow},r.ariaModifier={enabled:!0,order:900,fn:function(e){var t=e.instance.popper,n=r.getTarget();if(!r.state.show||!n)return e;var i=t.getAttribute("role")||"";return t.id&&"tooltip"===i.toLowerCase()&&n.setAttribute("aria-describedby",t.id),e}},r}Object(FS.a)(t,e);var n=t.prototype;return n.componentWillUnmount=function(){clearTimeout(this._timeout)},n.getChildProps=function(){return i.a.Children.only(this.props.children).props},n.handleMouseOverOut=function(e,t,n){var r=t.currentTarget,i=t.relatedTarget||t.nativeEvent[n];i&&i===r||HS()(r,i)||e(t)},n.hide=function(){this.setState({show:!1})},n.show=function(){this.setState({show:!0})},n.render=function(){var e=this.props,t=e.trigger,n=e.overlay,o=e.children,a=e.popperConfig,s=void 0===a?{}:a,u=Object(BS.a)(e,["trigger","overlay","children","popperConfig"]);delete u.delay,delete u.defaultShow;var l=i.a.Children.only(o),c={},f=null==t?[]:[].concat(t);return-1!==f.indexOf("click")&&(c.onClick=this.handleClick),-1!==f.indexOf("focus")&&(c.onFocus=this.handleShow,c.onBlur=this.handleHide),-1!==f.indexOf("hover")&&(c.onMouseOver=this.handleMouseOver,c.onMouseOut=this.handleMouseOut),i.a.createElement(i.a.Fragment,null,i.a.createElement(sE,{ref:this.trigger},Object(r.cloneElement)(l,c)),i.a.createElement(aE,Object(US.a)({},u,{popperConfig:Object(US.a)({},s,{modifiers:Object(US.a)({},s.modifiers,{ariaModifier:this.ariaModifier})}),show:this.state.show,onHide:this.handleHide,target:this.getTarget}),n))},t}(i.a.Component);lE.defaultProps={defaultOverlayShown:!1,trigger:["hover","focus"]};var cE=lE,fE=(n(458),n(243),i.a.createContext({}));fE.Consumer,fE.Provider;function hE(e,t){var n=Object(r.useContext)(fE);return e||n[t]||t}var dE=i.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.placement,o=e.className,a=e.style,s=e.children,u=e.arrowProps,l=(e.scheduleUpdate,e.outOfBoundaries,Object(BS.a)(e,["bsPrefix","placement","className","style","children","arrowProps","scheduleUpdate","outOfBoundaries"]));return n=hE(n,"tooltip"),i.a.createElement("div",Object(US.a)({ref:t,style:a,role:"tooltip","x-placement":r,className:qS()(o,n,"bs-tooltip-"+r)},l),i.a.createElement("div",Object(US.a)({className:"arrow"},u)),i.a.createElement("div",{className:n+"-inner"},s))}));dE.defaultProps={placement:"right"},dE.displayName="Tooltip";var pE,yE,mE=dE,gE=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;return Math.floor(Math.random()*Math.floor(e))};function vE(e){var t=e.title,n=e.placement,i=e.trigger,o=e.spanHack,a=e.children;return o?r.createElement(cE,{placement:n,overlay:r.createElement(mE,{id:"".concat(t,"-").concat(gE())},t),trigger:i},r.createElement("span",{className:"d-flex justify-content-center align-items-center"},a)):r.createElement(cE,{placement:n,overlay:r.createElement(mE,{id:"".concat(t,"-").concat(gE())},t),trigger:i},a)}vE.defaultProps={trigger:["hover","click","focus"],placement:"top"},function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(pE||(pE={})),function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience",e[e.Classroom=67]="Classroom",e[e.ClassroomGroup=68]="ClassroomGroup"}(yE||(yE={}));var bE=n(44),_E=n.n(bE),wE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},TE={width:1920,height:1080,format:"jpg"};function SE(e,t){var n,r=xT(e,"/v1/previews");return"metadata"in t?t.metadata.type===pE.Pdf?RS.createResourceImage(r,t.url,TE):t.metadata.type===pE.Image?RS.createUrl(t.url,{size:pS.Medium,resizeType:mS.Cover}):(null===(n=t.pdf)||void 0===n?void 0:n.url)?RS.createResourceImage(r,t.pdf.url,TE):t.metadata.type===pE.Zip?RS.createUrl(xT(e,"/v2/thumbnails/BKnxEm"),{size:pS.Large,format:"png"}):RS.createUrl("".concat(e,"v2/thumbnails/BKnxEm"),{size:pS.Large,format:"png"}):RS.createResourceImage(r,t.url,Object.assign(Object.assign({},TE),{resizeType:mS.Cover}))}function EE(e){var t,n,r,o=null,a=0;"metadata"in e.data&&(o=e.data.metadata,a=null!==(r=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==r?r:0);var s="pt-3 px-3 rounded-lg d-flex flex-column align-items-center"+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return _E.a.atomGuide;case"student-activity":return _E.a.studentActivity;case"teacher-pack":return _E.a.teacherPack;case"additional-materials":return _E.a.additionalMaterials;default:return _E.a.userUploaded}}(null==o?void 0:o.resourceType)," ").concat(_E.a.background);return i.a.createElement("div",{className:s},i.a.createElement(vE,{title:e.data.name},i.a.createElement("h3",{className:"text-center clamp-1 text-break h5 mb-3 ".concat(_E.a.text)},e.data.name)),i.a.createElement("div",{className:"w-75 overflow-hidden ".concat(_E.a.thumbnailContainer)},i.a.createElement(jS,{data:SE(e.imageCdnUrl,e.data),aspectRatio:kS.SixteenByNine,imageStyle:{transform:"rotate(".concat(a,"deg)")},analyticsOptions:{location:cb.LocationContext.SlidingListItem},onImageLoadError:function(t){t.target.src=e.imageErrorFallbackUrl},preload:!0})))}i.a.memo((function(e){var t,n,r,o,a,s,u,l=e.appLink,c=wE(e,["appLink"]),f=(t=MS(xS.XS),n=MS(xS.SM),r=MS(xS.MD),o=MS(xS.LG),a=MS(xS.XL),s=MS(xS.XXL),u=xS.LG,t&&(u=xS.XS),n&&(u=xS.SM),r&&(u=xS.MD),o&&(u=xS.LG),a&&(u=xS.XL),s&&(u=xS.XXL),u),h=f===xS.SM||f===xS.XS,d=null;"metadata"in e.data&&(d=e.data.metadata.type);var p=Object.assign(Object.assign({},e.analyticsData),e.data),y=Object.assign(Object.assign({},e.analyticsOptions),{actionType:cb.UserAction.Click,entity:e.data.typeId===yE.Resource?cb.EntityType.Resource:cb.EntityType.Link});function m(){KT.logUserAction(p,y)}return i.a.createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat(_E.a.item)},function(){if(!d)return i.a.createElement("a",{href:e.data.url,target:"_blank",className:"d-block",onClick:m},i.a.createElement(EE,Object.assign({},c)));var t=!!e.data.pdf||d===pE.Pdf||d===pE.Image;return h||!t||d===pE.Zip?i.a.createElement("a",{href:e.data.url,className:"d-block",onClick:m},i.a.createElement(EE,Object.assign({},c))):i.a.createElement(ES,{appLink:Object.assign(Object.assign({},l),{args:[e.data.id]}),className:"d-block no-decoration",analyticsData:p,analyticsOptions:y},i.a.createElement(EE,Object.assign({},c)))}())})),n(459);function CE(e){return(CE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xE(e,t){return(xE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function OE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=RE(e);if(t){var i=RE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return PE(this,n)}}function PE(e,t){return!t||"object"!==CE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function RE(e){return(RE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function AE(e){return i.a.createElement("div",{className:"cv-resource-item"},i.a.createElement(EE,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var IE=F_((function(e,t){return i.a.createElement(AE,Object.assign({},t))})),LE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xE(e,t)}(o,e);var t,n,r,i=OE(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t);var r=new IE(e,{resource:t.resource,imageCdnUrl:t.imageCdnUrl});return n.addChild(r),n}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&kE(t.prototype,n),r&&kE(t,r),o}(Fu.getComponent("ClickableComponent"));n(460);function jE(e){return(jE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ME(e,t,n){return(ME="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=VE(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function UE(e,t){return(UE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function BE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=VE(e);if(t){var i=VE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return FE(this,n)}}function FE(e,t){return!t||"object"!==jE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function VE(e){return(VE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var HE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&UE(e,t)}(o,e);var t,n,r,i=BE(o);function o(){var e;return DE(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(ME(VE(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(ME(VE(o.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){ME(VE(o.prototype),"update",this).call(this),Pd.initMenuScrollbar(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",ME(VE(o.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new LE(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)}});t.push(r)})),t}},{key:"downloadResource",value:function(e){this.getDownloadIframe().src=e.url}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=Fu.dom.createEl("iframe"),this.downloadIframe.style.display="none",Fu.dom.appendContent(Fu.dom.$("body"),this.downloadIframe)),this.downloadIframe}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){ME(VE(o.prototype),"handleClick",this).call(this,null)}}])&&NE(t.prototype,n),r&&NE(t,r),o}(Fu.getComponent("MenuButton"));function zE(e){return(zE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function WE(e,t){return(WE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=YE(e);if(t){var i=YE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return GE(this,n)}}function GE(e,t){return!t||"object"!==zE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function YE(e){return(YE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}HE.prototype.controlText_="Resources",Fu.registerComponent("ResourcesButton",HE);var KE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&WE(e,t)}(o,e);var t,n,r,i=$E(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-3)}}}])&&qE(t.prototype,n),r&&qE(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("resourcesPlugin",KE);n(461);function XE(e){return(XE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function QE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function JE(e,t){return(JE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ZE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tC(e);if(t){var i=tC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return eC(this,n)}}function eC(e,t){return!t||"object"!==XE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tC(e){return(tC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nC=Fu.getComponent("PlayToggle"),rC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&JE(e,t)}(o,e);var t,n,r,i=ZE(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).pictureInPictureEnabled=!0,n.options=t,n.bindFunctions(),n.player.ready((function(){n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){var e=this;this.enablePictureInPicture(),this.player.on("dispose",(function(){e.dispose()}))}},{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){if(this.player.options_.fluid){this.pictureInPictureEnabled=!0;var e=this.getToggleParentComponent();null==e||e.addChild("pictureInPictureToggle",{},e.children().length-1)}}},{key:"disablePictureInPicture",value:function(){this.pictureInPictureEnabled=!1;var e=this.getToggleParentComponent(),t=null==e?void 0:e.getChild("pictureInPictureToggle");t&&e.removeChild(t)}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new nC(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn}}])&&QE(t.prototype,n),r&&QE(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("pictureInPicture",rC);n(462);function iC(e){return(iC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aC(e,t){return(aC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lC(e);if(t){var i=lC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return uC(this,n)}}function uC(e,t){return!t||"object"!==iC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lC(e){return(lC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aC(e,t)}(o,e);var t,n,r,i=sC(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update(),n}return t=o,(n=[{key:"update",value:function(){this.options_.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"handleClick",value:function(){if(this.options_.isFavourited=!this.options_.isFavourited,this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-favourite-button"}}])&&oC(t.prototype,n),r&&oC(t,r),o}(Fu.getComponent("Button"));function fC(e){return(fC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pC(e,t){return(pC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gC(e);if(t){var i=gC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mC(this,n)}}function mC(e,t){return!t||"object"!==fC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gC(e){return(gC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}cC.prototype.controlText_="Favourite";var vC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pC(e,t)}(o,e);var t,n,r,i=yC(o);function o(){return hC(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setFavourite",value:function(e,t){e!==this.isFavourite&&(this.isFavourite=e,this.onClickFavourite=t,this.renderFavouriteButton())}},{key:"renderFavouriteButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new cC(this.player,{isFavourited:this.isFavourite,clickHandler:this.onClickFavourite}),this.player.addChild(this.button))}}])&&dC(t.prototype,n),r&&dC(t,r),o}(Fu.getPlugin("plugin"));function bC(e){return(bC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wC(e,t,n){return(wC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=CC(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function TC(e,t){return(TC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function SC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CC(e);if(t){var i=CC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return EC(this,n)}}function EC(e,t){return!t||"object"!==bC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function CC(e){return(CC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("favouritePlugin",vC);var kC=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},xC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&TC(e,t)}(o,e);var t,n,r,i=SC(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"configurePlugins",value:function(){try{var e=this.player;e.persistVolumePlugin(),e.fullscreenOnRotatePlugin(),e.touchControls(),this.options.getExternalLink&&e.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.options.onClickCreateClip&&e.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&e.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture})}catch(e){console.log("failed to register plugins",e)}}},{key:"setFavourite",value:function(e,t){this.player.favouritePlugin().setFavourite(e,t)}},{key:"setNextVideo",value:function(e,t){this.player.nextVideoPlugin().setNextVideo(e,t)}},{key:"enablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"additionalSetup",value:function(e){var t=this,n=Object.create(null,{additionalSetup:{get:function(){return wC(CC(o.prototype),"additionalSetup",t)}}});return kC(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.additionalSetup.call(this,e),"MasterClip"!==e.mediaType){t.next=6;break}if(null!==(r=e.additionalData)){t.next=5;break}throw Error("Invalid clip data");case 5:this.player.clipPlugin({startTime:r.startTime,endTime:r.endTime});case 6:case"end":return t.stop()}}),t,this)})))}}])&&_C(t.prototype,n),r&&_C(t,r),o}(g_),OC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function PC(e){var t=e.className,n=void 0===t?"":t,r=e.playerApi,o=e.onReady,a=e.onDispose,s=OC(e,["className","playerApi","onReady","onDispose"]),u=i.a.useRef(),l=i.a.useRef();return i.a.useEffect((function(){var e;if(null===(e=l.current)||void 0===e||e.dispose(),u)return l.current=new xC(u.current,Object.assign(Object.assign({},s),{playerApi:r})),o&&l.current.ready((function(){o(l.current)})),a&&l.current.one("dispose",a),function(){var e;null===(e=l.current)||void 0===e||e.dispose()}}),[e.viewKey]),i.a.createElement("div",{ref:u,className:n})}function RC(e){return(RC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function LC(e,t,n){return(LC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=MC(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function jC(e,t){return(jC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function DC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=MC(e);if(t){var i=MC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NC(this,n)}}function NC(e,t){return!t||"object"!==RC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function MC(e){return(MC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var UC=Fu.getComponent("Component"),BC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jC(e,t)}(o,e);var t,n,r,i=DC(o);function o(){return AC(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-clip-timepoint-handle ".concat(LC(MC(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return LC(MC(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:'<svg viewBox="0 0 5 14"><g id="Clips" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Clip-2" transform="translate(-835.000000, -632.000000)" fill="#FFFFFF"><g id="Video-Copy" transform="translate(275.000000, 96.000000)"><g id="Handles" transform="translate(560.000000, 536.000000)"><circle id="Oval" cx="1" cy="1" r="1"></circle><circle id="Oval-Copy-2" cx="1" cy="5" r="1"></circle><circle id="Oval-Copy-4" cx="1" cy="9" r="1"></circle><circle id="Oval-Copy-8" cx="1" cy="13" r="1"></circle><circle id="Oval-Copy" cx="4" cy="1" r="1"></circle><circle id="Oval-Copy-3" cx="4" cy="5" r="1"></circle><circle id="Oval-Copy-5" cx="4" cy="9" r="1"></circle><circle id="Oval-Copy-9" cx="4" cy="13" r="1"></circle></g></g></g></g></svg>'}),n)}},{key:"isEventTarget",value:function(e){return this.el().contains(e.target)}}])&&IC(t.prototype,n),r&&IC(t,r),o}(UC);n(463);function FC(e){return(FC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function HC(e,t,n){return(HC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=$C(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function zC(e,t){return(zC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$C(e);if(t){var i=$C(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return WC(this,n)}}function WC(e,t){return!t||"object"!==FC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $C(e){return($C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var GC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zC(e,t)}(o,e);var t,n,r,i=qC(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).dragStartActive=!1,n.dragEndActive=!1,n.dragSliderActive=!1,n.dragSliderCurrentPosition=null,n.minDuration=Math.min(e.duration(),n.options_.minDuration),n.setStartTime(t.startTime,!1),n.setEndTime(t.endTime,!1),n.startHandle=new BC(n.player(),t),n.startHandle.addClass("cv-clip-start-handle"),n.addChild(n.startHandle),n.endHandle=new BC(n.player(),t),n.endHandle.addClass("cv-clip-end-handle"),n.addChild(n.endHandle),n.on(n.player(),"update:clip:start:time",(function(e){var t=e.time;return n.setStartTime(t)})),n.on(n.player(),"update:clip:end:time",(function(e){var t=e.time;return n.setEndTime(t)})),n.bindListeners(),n.update(),n}return t=o,(n=[{key:"createEl",value:function(){return HC($C(o.prototype),"createEl",this).call(this,"div",{className:"cv-clip-timepoint-selector"},{})}},{key:"update",value:function(){var e=this;this.options_.onChangeStartTime(this.startTime),this.options_.onChangeEndTime(this.endTime),this.requestAnimationFrame((function(){e.setStartOffset(),e.setWidth()}))}},{key:"setStartTime",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!isNaN(e)){var n=this.endTime||this.player().duration(),r=n-this.minDuration;e>r&&(e=r),e<0&&(e=0),this.startTime=e,this.endTime&&this.endTime-this.startTime<this.minDuration&&this.setEndTime(this.startTime+this.minDuration),this.player().currentTime(this.startTime),t&&this.update()}}},{key:"setEndTime",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!isNaN(e)){var n=this.startTime||0,r=n+this.minDuration;e<r&&(e=r),e>this.player().duration()&&(e=this.player().duration()),this.endTime=e,this.startTime&&this.endTime-this.startTime<this.minDuration&&this.setStartTime(this.endTime-this.minDuration),t&&this.update()}}},{key:"bindListeners",value:function(){var e=this;this.on("mousedown",this.dragStart),this.on("touchstart",this.dragStart),this.player().on("dispose",(function(){e.off("mousedown",e.dragStart),e.off("touchstart",e.dragStart)}))}},{key:"dragStart",value:function(e){this.startHandle.isEventTarget(e)&&(e.stopImmediatePropagation(),this.dragStartActive=!0),this.endHandle.isEventTarget(e)&&(e.stopImmediatePropagation(),this.dragEndActive=!0),e.target===this.el()&&(e.stopImmediatePropagation(),this.dragSliderActive=!0,this.dragSliderCurrentPosition=this.getPosition(e));var t=this.el().ownerDocument;this.on(t,"mousemove",this.drag),this.on(t,"mouseup",this.dragEnd),this.on(t,"touchmove",this.drag),this.on(t,"touchend",this.dragEnd),this.drag(e)}},{key:"dragEnd",value:function(){this.dragStartActive=!1,this.dragEndActive=!1,this.dragSliderActive=!1,this.dragSliderCurrentPosition=null;var e=this.el().ownerDocument;this.off(e,"mousemove",this.drag),this.off(e,"mouseup",this.dragEnd),this.off(e,"touchmove",this.drag),this.off(e,"touchend",this.dragEnd)}},{key:"drag",value:function(e){if((this.dragStartActive||this.dragEndActive||this.dragSliderActive)&&Fu.dom.isSingleLeftClick(e)){var t=this.getPosition(e),n=t*this.player().duration();this.dragStartActive&&this.handleStartHandleDrag(n),this.dragEndActive&&this.handleEndHandleDrag(n),this.dragSliderActive&&this.handleSliderDrag(t)}}},{key:"handleStartHandleDrag",value:function(e){this.setStartTime(e)}},{key:"handleEndHandleDrag",value:function(e){this.setEndTime(e)}},{key:"handleSliderDrag",value:function(e){var t=(e-this.dragSliderCurrentPosition)*this.player().duration(),n=this.startTime+t,r=this.endTime+t;n<=0||r>=this.player().duration()||(this.dragSliderCurrentPosition=e,this.setStartTime(n),this.setEndTime(r))}},{key:"getPosition",value:function(e){return Fu.dom.getPointerPosition(this.el_.parentNode,e).x}},{key:"setStartOffset",value:function(){this.el_.style.marginLeft="".concat(this.getPercentage(this.startTime),"%")}},{key:"setWidth",value:function(){this.el_.style.width="".concat(this.getPercentage(this.endTime-this.startTime),"%")}},{key:"getPercentage",value:function(e){return+(e/this.player().duration()*100).toFixed(4)}}])&&VC(t.prototype,n),r&&VC(t,r),o}(Fu.getComponent("Component"));n(464);function YC(e){return(YC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function KC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function XC(e,t){return(XC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ZC(e);if(t){var i=ZC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return JC(this,n)}}function JC(e,t){return!t||"object"!==YC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ZC(e){return(ZC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ek=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&XC(e,t)}(o,e);var t,n,r,i=QC(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addClass("cv-create-clip-seek-bar"),n}return t=o,(n=[{key:"initialize",value:function(e){var t=new GC(this.player(),e);this.addChild(t)}}])&&KC(t.prototype,n),r&&KC(t,r),o}(Fu.getComponent("SeekBar"));function tk(e){return(tk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rk(e,t){return(rk=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ik(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sk(e);if(t){var i=sk(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ok(this,n)}}function ok(e,t){return!t||"object"!==tk(t)&&"function"!=typeof t?ak(e):t}function ak(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sk(e){return(sk=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ek.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Fu.browser.IS_IOS||Fu.browser.IS_ANDROID||ek.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Fu.registerComponent("CreateClipSeekBar",ek);var uk=Fu.getPlugin("plugin"),lk=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rk(e,t)}(o,e);var t,n,r,i=ik(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,n.initCreateClipSeekBar=n.initCreateClipSeekBar.bind(ak(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initCreateClipSeekBar)})),n}return t=o,(n=[{key:"initCreateClipSeekBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");if(t){var n=!isNaN(this.options.startTime)&&this.options.startTime>=0?this.options.startTime:0,r=!isNaN(this.options.endTime)&&this.options.endTime<=this.player.duration()?this.options.endTime:this.player.duration(),i=Math.min(this.options.minDuration||5,this.player.duration());t.initialize({startTime:n,endTime:r,minDuration:i,onChangeStartTime:this.options.onChangeStartTime,onChangeEndTime:this.options.onChangeEndTime})}}},{key:"dispose",value:function(){this.player.off("loadedmetadata",this.initCreateClipSeekBar)}}])&&nk(t.prototype,n),r&&nk(t,r),o}(uk);function ck(e){return(ck="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hk(e,t){return(hk=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dk(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yk(e);if(t){var i=yk(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pk(this,n)}}function pk(e,t){return!t||"object"!==ck(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yk(e){return(yk=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("createClipPlugin",lk);var mk=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hk(e,t)}(o,e);var t,n,r,i=dk(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,Object.assign(Object.assign({},t),{playbackRates:null,enableLocalCache:!1}))}return t=o,(n=[{key:"getPlayerClassName",value:function(){return"cv-create-clip-player"}},{key:"configurePlugins",value:function(){var e=this.options,t=e.startTime,n=e.endTime,r=e.minDuration,i=e.onChangeStartTime,o=e.onChangeEndTime;this.player.createClipPlugin({startTime:t,endTime:n,minDuration:r,onChangeStartTime:i,onChangeEndTime:o})}},{key:"getSeekBarName",value:function(){return"CreateClipSeekBar"}},{key:"getAnalyticsPlayerType",value:function(){return"create-clip-player"}}])&&fk(t.prototype,n),r&&fk(t,r),o}(g_);function gk(e){var t=i.a.useRef(),n=i.a.useRef();return i.a.useEffect((function(){n.current=new mk(t.current,e)}),[]),i.a.useEffect((function(){var t;null===(t=n.current)||void 0===t||t.trigger({type:"update:clip:start:time",time:e.startTime})}),[e.startTime]),i.a.useEffect((function(){var t;null===(t=n.current)||void 0===t||t.trigger({type:"update:clip:end:time",time:e.endTime})}),[e.endTime]),i.a.createElement("div",{ref:t})}n.d(t,"ClickViewPlayer",(function(){return PC})),n.d(t,"ClickViewCreateClipPlayer",(function(){return gk})),n.d(t,"Player",(function(){return xC}))},function(e,t,n){"use strict";n.r(t);var r=n(240),i=n.n(r),o=n(31),a=n.n(o),s=n(7),u=n.n(s),l=n(3),c=n.n(l),f=n(21),h=n.n(f),d=n(241),p=n.n(d),y=n(1),m=n(145),g=n(146),v=n.n(g),b=v()(),_=v()(),w=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,h()(c()(c()(t)),"referenceNode",void 0),h()(c()(c()(t)),"setReferenceNode",(function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())})),t}u()(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.referenceNode=null},n.render=function(){return y.createElement(b.Provider,{value:this.referenceNode},y.createElement(_.Provider,{value:this.setReferenceNode},this.props.children))},t}(y.Component),T=function(e){return Array.isArray(e)?e[0]:e},S=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},E=function(e,t){if("function"==typeof e)return S(e,t);null!=e&&(e.current=t)},C={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},k={},x=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,h()(c()(c()(t)),"state",{data:void 0,placement:void 0}),h()(c()(c()(t)),"popperInstance",void 0),h()(c()(c()(t)),"popperNode",null),h()(c()(c()(t)),"arrowNode",null),h()(c()(c()(t)),"setPopperNode",(function(e){e&&t.popperNode!==e&&(E(t.props.innerRef,e),t.popperNode=e,t.updatePopperInstance())})),h()(c()(c()(t)),"setArrowNode",(function(e){t.arrowNode=e})),h()(c()(c()(t)),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var n=e.placement;return t.setState({data:e,placement:n}),e}}),h()(c()(c()(t)),"getOptions",(function(){return{placement:t.props.placement,eventsEnabled:t.props.eventsEnabled,positionFixed:t.props.positionFixed,modifiers:a()({},t.props.modifiers,{arrow:a()({},t.props.modifiers&&t.props.modifiers.arrow,{enabled:!!t.arrowNode,element:t.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:t.updateStateModifier})}})),h()(c()(c()(t)),"getPopperStyle",(function(){return t.popperNode&&t.state.data?a()({position:t.state.data.offsets.popper.position},t.state.data.styles):C})),h()(c()(c()(t)),"getPopperPlacement",(function(){return t.state.data?t.state.placement:void 0})),h()(c()(c()(t)),"getArrowStyle",(function(){return t.arrowNode&&t.state.data?t.state.data.arrowStyles:k})),h()(c()(c()(t)),"getOutOfBoundariesState",(function(){return t.state.data?t.state.data.hide:void 0})),h()(c()(c()(t)),"destroyPopperInstance",(function(){t.popperInstance&&(t.popperInstance.destroy(),t.popperInstance=null)})),h()(c()(c()(t)),"updatePopperInstance",(function(){t.destroyPopperInstance();var e=c()(c()(t)).popperNode,n=t.props.referenceElement;n&&e&&(t.popperInstance=new m.a(n,e,t.getOptions()))})),h()(c()(c()(t)),"scheduleUpdate",(function(){t.popperInstance&&t.popperInstance.scheduleUpdate()})),t}u()(t,e);var n=t.prototype;return n.componentDidUpdate=function(e,t){this.props.placement===e.placement&&this.props.referenceElement===e.referenceElement&&this.props.positionFixed===e.positionFixed&&p()(this.props.modifiers,e.modifiers,{strict:!0})?this.props.eventsEnabled!==e.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()):this.updatePopperInstance(),t.placement!==this.state.placement&&this.scheduleUpdate()},n.componentWillUnmount=function(){E(this.props.innerRef,null),this.destroyPopperInstance()},n.render=function(){return T(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},t}(y.Component);h()(x,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1});var O=m.a.placements;function P(e){var t=e.referenceElement,n=i()(e,["referenceElement"]);return y.createElement(b.Consumer,null,(function(e){return y.createElement(x,a()({referenceElement:void 0!==t?t:e},n))}))}var R=n(106),A=n.n(R),I=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,h()(c()(c()(t)),"refHandler",(function(e){E(t.props.innerRef,e),S(t.props.setReferenceNode,e)})),t}u()(t,e);var n=t.prototype;return n.componentWillUnmount=function(){E(this.props.innerRef,null)},n.render=function(){return A()(Boolean(this.props.setReferenceNode),"`Reference` should not be used outside of a `Manager` component."),T(this.props.children)({ref:this.refHandler})},t}(y.Component);function L(e){return y.createElement(_.Consumer,null,(function(t){return y.createElement(I,a()({setReferenceNode:t},e))}))}n.d(t,"Popper",(function(){return P})),n.d(t,"placements",(function(){return O})),n.d(t,"Manager",(function(){return w})),n.d(t,"Reference",(function(){return L}))}])}));
122
+ var t,n;function r(){var t,n=zu(zu(t=e.call(this)||this));if(Fu.browser.IS_IE8)for(var i in n=Hu.a.createElement("custom"),r.prototype)"constructor"!==i&&(n[i]=r.prototype[i]);return n.levels_=[],n.selectedIndex_=-1,Object.defineProperty(n,"selectedIndex",{get:function(){return n.selectedIndex_}}),Object.defineProperty(n,"length",{get:function(){return n.levels_.length}}),n||zu(t)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.addQualityLevel=function(e){var t=this.getQualityLevelById(e.id);if(t)return t;var n=this.levels_.length;return t=new qu(e),""+n in this||Object.defineProperty(this,n,{get:function(){return this.levels_[n]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t},i.removeQualityLevel=function(e){for(var t=null,n=0,r=this.length;n<r;n++)if(this[n]===e){t=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t},i.getQualityLevelById=function(e){for(var t=0,n=this.length;t<n;t++){var r=this[t];if(r.id===e)return r}return null},i.dispose=function(){this.selectedIndex_=-1,this.levels_.length=0},r}(Fu.EventTarget);for(var $u in Wu.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"},Wu.prototype.allowedEvents_)Wu.prototype["on"+$u]=null;var Gu=Fu.registerPlugin||Fu.plugin,Yu=function(e){return t=this,Fu.mergeOptions({},e),n=t.qualityLevels,r=new Wu,t.on("dispose",(function e(){r.dispose(),t.qualityLevels=n,t.off("dispose",e)})),t.qualityLevels=function(){return r},t.qualityLevels.VERSION="2.0.9",r;var t,n,r};Gu("qualityLevels",Yu),Yu.VERSION="2.0.9";var Ku=n(234);function Xu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Qu=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.id=n.id,this.plugin=t,this.source=n,this.enabled=this.enabled.bind(this)}var t,n,r;return t=e,(n=[{key:"enabled",value:function(e){return void 0===e?this.plugin.currentSource===this.source:(e&&this.plugin.setSource(this.source.id),e)}}])&&Xu(t.prototype,n),r&&Xu(t,r),e}();function Ju(e){return(Ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function el(e,t){return(el=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rl(e);if(t){var i=rl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return nl(this,n)}}function nl(e,t){return!t||"object"!==Ju(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function rl(e){return(rl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var il=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&el(e,t)}(o,e);var t,n,r,i=tl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).sources=[],n.qualityLevels=e.qualityLevels(),n.populateSources(t.sources),n}return t=o,(n=[{key:"currentSource",get:function(){return this._currentSource}},{key:"setSource",value:function(e){var t=this,n=this.getSourceById(e);if(null===n)return this.currentSource;var r=this.player.currentTime(),i=!this.player.paused();return this._currentSource=n,this.player.src({src:n.url,type:n.mimeType}),this.player.one("loadedmetadata",(function(){t.player.currentTime()!==r&&t.player.currentTime(r),i&&t.player.play()})),this.trigger({event:"sourcechange",source:n}),this.sourceChangeUpdateQualityLevels(n),n}},{key:"getSourceById",value:function(e){return this.sources.find((function(t){return t.id===e}))}},{key:"populateSources",value:function(e){var t=this,n=null;e.forEach((function(e){t.qualityLevels.addQualityLevel(new Qu(t,e)),t.sources.push(e),t.trigger({event:"addsource",source:e}),e.default&&(n=e)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(e){for(var t=this.qualityLevels,n=-1,r=0;r<t.length;r++)if(t[r].id===e.id){n=r;break}t.selectedIndex_=n,t.trigger({selectedIndex:n,type:"change"})}}])&&Zu(t.prototype,n),r&&Zu(t,r),o}(Fu.getPlugin("plugin"));function ol(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Fu.registerPlugin("progressiveFiles",il);var al=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},sl=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=t.name,this.playbackProfile=t.playbackProfile,this.address=new URL(t.httpsAddress)}var t,n,r;return t=e,(n=[{key:"getUrl",value:function(e){return e?this.address+"cache?file="+encodeURIComponent(e):null}},{key:"ping",value:function(){return al(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=new AbortController,n=setTimeout((function(){return t.abort()}),1e3),e.prev=3,e.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:t.signal});case 6:return r=e.sent,e.next=9,r.text();case 9:return i=e.sent,clearTimeout(n),e.abrupt("return","PONG"===i);case 14:return e.prev=14,e.t0=e.catch(3),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,this,[[3,14]])})))}}])&&ol(t.prototype,n),r&&ol(t,r),e}();function ul(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ll=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(e,t){var n=e.getQualityLevelById(t);if(n||(n=this.getNextBestQuality(e,t)),!n)return null;for(var r=0;r<e.length;r++){var i=e[r];i.enabled=n.id===i.id}return n}},{key:"getNextBestQuality",value:function(e,t){var n=this.getKnownProfiles(),r=n.indexOf(t);if(r>=0){for(var i=r+1;i<n.length;i++){var o=n[i],a=e.getQualityLevelById(o);if(a)return a}for(var s=r-1;s>0;s--){var u=n[s],l=e.getQualityLevelById(u);if(l)return l}}return null}}],(n=null)&&ul(t.prototype,n),r&&ul(t,r),e}();function cl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var fl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},hl=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.player=t,this.logger=Fu.log.createLogger("localcache")}var t,n,r;return t=e,(n=[{key:"setSource",value:function(e,t){return fl(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t(null,e),n.abrupt("return");case 5:null!==(r=n.sent)&&(this.logger.debug("Using Local Cache",r),e.src=r.getUrl(e.src));case 7:t(null,e);case 8:case"end":return n.stop()}}),n,this)})))}}])&&cl(t.prototype,n),r&&cl(t,r),e}();Fu.use("*",(function(e){return new hl(e)}));n(379);function dl(e){return(dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yl(e,t,n){return(yl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_l(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ml(e,t){return(ml=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function gl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_l(e);if(t){var i=_l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return vl(this,n)}}function vl(e,t){return!t||"object"!==dl(t)&&"function"!=typeof t?bl(e):t}function bl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _l(e){return(_l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var wl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Tl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ml(e,t)}(o,e);var t,n,r,i=gl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(bl(n)),e.ready((function(){n.initialize()})),n}return t=o,(n=[{key:"createEl",value:function(){return yl(_l(o.prototype),"createEl",this).call(this,"div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat('<?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>',"</div>"),title:"Streaming from ClickView Local Cache"})}},{key:"initialize",value:function(){var e=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){e.localCachePlugin.off("localcachechanged",e.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return wl(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.localCachePlugin.getActiveLocalCache();case 2:e.sent?this.show():this.hide();case 4:case"end":return e.stop()}}),e,this)})))}}])&&pl(t.prototype,n),r&&pl(t,r),o}(Fu.getComponent("Component"));function Sl(e){return(Sl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function El(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cl(e,t){return(Cl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function kl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pl(e);if(t){var i=Pl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xl(this,n)}}function xl(e,t){return!t||"object"!==Sl(t)&&"function"!=typeof t?Ol(e):t}function Ol(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pl(e){return(Pl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("localCacheIndicator",Tl);var Rl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Al=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Cl(e,t)}(o,e);var t,n,r,i=kl(o);function o(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).logger_=Fu.log.createLogger("localcache"),void 0===t)throw Error("no options defined");return n.onPlayerError=n.onPlayerError.bind(Ol(n)),n.dispose=n.dispose.bind(Ol(n)),n.localCaches_=t.localCacheAddresses.map((function(e){return new sl(e)})),n.player.ready((function(){n.initialize(),t.enabled&&n.enable()})),n}return t=o,(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:"dispose",value:function(){this.player.off("error",this.onPlayerError)}},{key:"initialize",value:function(){this.player.on("error",this.onPlayerError),this.player.on("dispose",this.dispose),this.player.controlBar.addChild("localCacheIndicator")}},{key:"onPlayerError",value:function(){var e;(null===(e=this.player.error())||void 0===e?void 0:e.code)===MediaError.MEDIA_ERR_NETWORK&&this.resetActiveLocalCache()}},{key:"getActiveLocalCacheInternal",value:function(){return Rl(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],n=function(e){return Rl(i,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.ping();case 2:if(!n.sent){n.next=4;break}t.push(e);case 4:case"end":return n.stop()}}),n)})))},e.next=4,Promise.all(this.localCaches_.map((function(e){return n(e)})));case 4:if(!(t.length>0)){e.next=8;break}return r=t[0],this.onLocalCacheChange(r),e.abrupt("return",r);case 8:return e.abrupt("return",null);case 9:case"end":return e.stop()}}),e,this)})))}},{key:"onLocalCacheChange",value:function(e){this.logger_.debug("Local Cache changed",e),this.trigger("localcachechanged",{localCache:e});var t=!1;e&&e.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",e.playbackProfile),ll.enableProfileOrNextBest(this.player.qualityLevels(),e.playbackProfile),t=!0),t||this.player.src(this.player.src())}}])&&El(t.prototype,n),r&&El(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("localCache",Al);var Il="cv-persisttest",Ll=function(){try{return window.localStorage.setItem(Il,"cv-player-storage-test"),window.localStorage.removeItem(Il),!0}catch(e){return!1}},jl=function(e){return window.localStorage.getItem(e)},Dl=function(e,t){window.localStorage.setItem(e,t)},Nl=function(e){window.localStorage.removeItem(e)};function Ml(e){return(Ml="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ul(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bl(e,t){return(Bl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Fl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hl(e);if(t){var i=Hl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Vl(this,n)}}function Vl(e,t){return!t||"object"!==Ml(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Hl(e){return(Hl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zl=Fu.getPlugin("plugin"),ql=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bl(e,t)}(o,e);var t,n,r,i=Fl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){if(this.player.textTracks().length){this.bindEventListeners();var e=!!this.options.showSubtitles,t=this.safeGet("cvplayer-show-subtitles");if("true"===t&&(e=!0),"false"===t&&(e=!1),e){var n=this.guessWhichTrack();n&&(n.mode="showing")}var r=this.safeGet("cvplayer-subtitle-size");r||(r=this.options.subtitleSize),r&&this.player.textTrackSettings.setSizeSetting(r)}}},{key:"safeGet",value:function(e){if(Ll())return jl(e)}},{key:"onSelectedLanguageChange",value:function(){for(var e=this.player.textTracks(),t=0;t<e.length;t++){var n=e[t];if("showing"===n.mode)return Dl("cvplayer-show-subtitles","true"),void Dl("cvplayer-selected-language",n.language)}Dl("cvplayer-show-subtitles","false"),Nl("cvplayer-selected-language")}},{key:"bindEventListeners",value:function(){var e=this;Ll()&&(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.player.one("dispose",(function(){var t,n;null===(t=e.player)||void 0===t||t.off("cv:languageselected",e.onSelectedLanguageChange),null===(n=e.player)||void 0===n||n.off("changesubtitlesize",e.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var e=this.player.textTrackSettings.getSizeSetting();Dl("cvplayer-subtitle-size",e)}},{key:"guessWhichTrack",value:function(){for(var e,t,n=this.safeGet("cvplayer-selected-language")||window.navigator.language,r=this.getLanguageParts(n),i=r.language,o=r.country,a=this.player.textTracks(),s=0;s<a.length;s++){var u=a[s],l=this.getLanguageParts(u.language),c=l.language,f=l.country;if(c===i&&(e=u,f||(t=u),f===o))return e}return t||e||null}},{key:"getLanguageParts",value:function(e){var t=e.toLowerCase().split("-");return{language:t[0],country:t[1]}}}])&&Ul(t.prototype,n),r&&Ul(t,r),o}(zl);function Wl(e){return(Wl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gl(e,t){return(Gl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xl(e);if(t){var i=Xl(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Kl(this,n)}}function Kl(e,t){return!t||"object"!==Wl(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xl(e){return(Xl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistSubtitleSettingsPlugin",ql);var Ql=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Jl=Fu.getPlugin("plugin"),Zl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gl(e,t)}(o,e);var t,n,r,i=Yl(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e)).options=t,n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){return Ql(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:if(t=e.sent,n=t?this.options.playbackProfileLocalCache:this.options.playbackProfile,Ll()&&(r=jl(this.getStorageKey(t)))&&(n=r),i=this.player.qualityLevels(),ll.enableProfileOrNextBest(i,n),Ll()){e.next=9;break}return e.abrupt("return");case 9:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),i.on("change",this.onQualityLevelsChange),this.player.on("dispose",(function(){i.off("change",o.onQualityLevelsChange)}));case 12:case"end":return e.stop()}}),e,this)})))}},{key:"onQualityLevelsChange",value:function(){return Ql(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:t=e.sent,n=this.player.qualityLevels(),r=n[n.selectedIndex],Dl(this.getStorageKey(t),r.id);case 6:case"end":return e.stop()}}),e,this)})))}},{key:"isLocalCacheActive",value:function(){return Ql(this,void 0,void 0,regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.player.localCache().getActiveLocalCache();case 2:return e.abrupt("return",!!e.sent);case 3:case"end":return e.stop()}}),e,this)})))}},{key:"getStorageKey",value:function(e){return e?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&$l(t.prototype,n),r&&$l(t,r),o}(Jl);function ec(e){return(ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rc(e,t){return(rc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ic(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ac(e);if(t){var i=ac(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oc(this,n)}}function oc(e,t){return!t||"object"!==ec(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ac(e){return(ac=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistQualitySettingsPlugin",Zl);var sc=Fu.getPlugin("plugin"),uc="play",lc="playing",cc="pause",fc="seeking",hc="seekstart",dc="seekend",pc="ended",yc="pausedseek",mc="timeupdate",gc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rc(e,t)}(o,e);var t,n,r,i=ic(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=t,n.initialize(),n}return t=o,(n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var e,t=this,n=(tc(e={},uc,(function(){return t.onPlay()})),tc(e,cc,(function(){return t.onPause()})),tc(e,mc,(function(){return t.onTimeUpdate()})),tc(e,fc,(function(){return t.onSeeking()})),tc(e,pc,(function(){return t.onEnded()})),e);for(var r in n)n.hasOwnProperty(r)&&this.player.on(r,n[r])}},{key:"startInterval",value:function(){var e=this,t=this.options.interval||5e3;setInterval((function(){return e.flushBuffer()}),t)}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent(dc),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(uc)}},{key:"onPause",value:function(){var e=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){e.isPlaying=!1,e.logEvent(cc),delete e.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(uc)),this.isPlaying&&!this.isSeeking&&this.logEvent(lc)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(yc),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(hc))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(pc)}},{key:"logEvent",value:function(e){if(this.player){var t=this.player.currentTime();e===hc&&(t=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:t,type:e})}}},{key:"shouldUseCarriedOverTime",value:function(e){return this.lastPlayingTime&&(e===lc||e===uc)}},{key:"shouldClearCarriedOverTime",value:function(e){return e===pc||e===yc}},{key:"flushBuffer",value:function(){for(var e,t=[],n={};this.eventBuffer.length;){var r=this.eventBuffer.shift();this.shouldClearCarriedOverTime(r.type)?delete this.lastPlayingTime:n.start?r.type===lc&&this.eventBuffer.length>0||(this.shouldUseCarriedOverTime(r.type)&&(this.lastPlayingTime=r.time),n.end=r,t.push(n),n={}):(this.shouldUseCarriedOverTime(r.type)&&(r.time=this.lastPlayingTime,delete this.lastPlayingTime),n.start=r)}this.eventBuffer=[],t.length&&(this.options.onFlush(t),null===(e=this.player)||void 0===e||e.trigger("progressflush"))}}])&&nc(t.prototype,n),r&&nc(t,r),o}(sc);Fu.registerPlugin("progressReporterPlugin",gc);n(380);function vc(e){return(vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wc(e,t){return(wc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ec(e);if(t){var i=Ec(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Sc(this,n)}}function Sc(e,t){return!t||"object"!==vc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ec(e){return(Ec=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wc(e,t)}(o,e);var t,n,r,i=Tc(o);function o(){return bc(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&_c(t.prototype,n),r&&_c(t,r),o}(Fu.getComponent("Component")),kc=["top","left","right","bottom"],xc={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};n(381);function Oc(e){return(Oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ac(e,t,n){return t&&Rc(e.prototype,t),n&&Rc(e,n),e}function Ic(e,t,n){return(Ic="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Mc(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Lc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jc(e,t)}function jc(e,t){return(jc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Dc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mc(e);if(t){var i=Mc(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Nc(this,n)}}function Nc(e,t){return!t||"object"!==Oc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Mc(e){return(Mc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Uc=Fu.getComponent("Component"),Bc=function(e){Lc(n,e);var t=Dc(n);function n(e,r){var i;return Pc(this,n),(i=t.call(this,e,r)).bindEventListeners(),i}return Ac(n,[{key:"createEl",value:function(){return Ic(Mc(n.prototype),"createEl",this).call(this,"div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)})}},{key:"bindEventListeners",value:function(){var e=this,t=this.el(),n=function(t){t.preventDefault(),t.dataTransfer.dropEffect="move",e.addClass("cv-drag-over")},r=function(t){t.preventDefault(),e.removeClass("cv-drag-over"),e.player_.whiteboardModePlugin().setWhiteboardMode(e.options_.side)},i=function(){e.removeClass("cv-drag-over")};t.addEventListener("dragover",n),t.addEventListener("drop",r),t.addEventListener("dragleave",i),this.on("dispose",(function(){t.removeEventListener("dragover",n),t.removeEventListener("drop",r),t.removeEventListener("dragleave",i)}))}}]),n}(Uc),Fc=function(e){Lc(n,e);var t=Dc(n);function n(e,r){var i;return Pc(this,n),(i=t.call(this,e,r)).addChildren(),i}return Ac(n,[{key:"addChildren",value:function(){var e=this;kc.forEach((function(t){e.addChild(new Bc(e.player_,{side:t}))}))}}]),n}(Uc);function Vc(e){return(Vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zc(e,t){return(zc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$c(e);if(t){var i=$c(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wc(this,n)}}function Wc(e,t){return!t||"object"!==Vc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $c(e){return($c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gc=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zc(e,t)}(o,e);var t,n,r,i=qc(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Hc(t.prototype,n),r&&Hc(t,r),o}(Fu.getComponent("MenuItem"));function Yc(e){return(Yc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kc(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qc(e,t,n){return(Qc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=tf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Jc(e,t){return(Jc=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Zc(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tf(e);if(t){var i=tf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ef(this,n)}}function ef(e,t){return!t||"object"!==Yc(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tf(e){return(tf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nf=Fu.getComponent("MenuButton"),rf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Jc(e,t)}(o,e);var t,n,r,i=Zc(o);function o(){var e;return Kc(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createItems",value:function(){var e=this,t=this.player_.whiteboardModePlugin().side,n=[];return kc.forEach((function(r){n.push(new Gc(e.player_,{side:r,label:xc[r],selectable:!0,multiSelectable:!1,selected:r===t}))})),n}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Qc(tf(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Video controls"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.whiteboardModePlugin().side;return xc[e]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){nf.prototype.handleClick.apply(this)}}])&&Xc(t.prototype,n),r&&Xc(t,r),o}(nf);n(382);function of(e){return(of="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function af(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sf(e,t){return(sf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function uf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cf(e);if(t){var i=cf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lf(this,n)}}function lf(e,t){return!t||"object"!==of(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function cf(e){return(cf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ff="cv-whiteboard-side",hf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sf(e,t)}(o,e);var t,n,r,i=uf(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).side="bottom",t.player.ready((function(){t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){if(Ll()){var e=jl(ff);e&&(this.side=e)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}},{key:"initCollapserator",value:function(){var e=this,t=this.player.getChild("collapserator"),n=new Cc(this.player);this.button=new rf(this.player),t.addChild(n),t.addChild(this.button),this.player.trigger("cv-updatecog");var r=function(){t.el().setAttribute("draggable","true")},i=function(){t.el().setAttribute("draggable","false")},o=function(t){e.player.addClass("cv-dragging"),t.dataTransfer.setData("text/plain","handle")},a=function(){e.player.removeClass("cv-dragging"),t.el().setAttribute("draggable","false")};n.el().addEventListener("mousedown",r),n.el().addEventListener("mouseup",i),t.el().addEventListener("dragstart",o),t.el().addEventListener("dragend",a),this.player.on("dispoe",(function(){n.el().removeEventListener("mousedown",r),n.el().removeEventListener("mouseup",i),t.el().removeEventListener("dragstart",o),t.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new Fc(this.player))}},{key:"initFullscreenListener",value:function(){var e=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.player.on("dispose",(function(){var t;null===(t=e.player)||void 0===t||t.off("fullscreenchange",e.update)}))}},{key:"setWhiteboardMode",value:function(e){this.side=e,this.button.update(),Ll()&&Dl(ff,e),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"),this.player.trigger("resizemenus"),this.player.isFullscreen()&&"bottom"!==this.side&&this.player.addClass("cv-whiteboard-".concat(this.side))}}])&&af(t.prototype,n),r&&af(t,r),o}(Fu.getPlugin("plugin"));function df(e){return(df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function pf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yf(e,t){return(yf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function mf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vf(e);if(t){var i=vf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gf(this,n)}}function gf(e,t){return!t||"object"!==df(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function vf(e){return(vf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("whiteboardModePlugin",hf),window.__onGCastApiAvailable=function(e){e&&(bf=new _f)},window.videojs=Fu;var bf,_f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yf(e,t)}(o,e);var t,n,r,i=mf(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,null)).setOptions(),e.remotePlayer=new cast.framework.RemotePlayer,e.remotePlayerController=new cast.framework.RemotePlayerController(e.remotePlayer),e.bindListeners(),e}return t=o,(n=[{key:"play",value:function(){}},{key:"castConext",get:function(){return cast.framework.CastContext.getInstance()}},{key:"setOptions",value:function(){this.castConext.setOptions({receiverApplicationId:chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED})}},{key:"castState",get:function(){return this.castConext.getCastState()}},{key:"castSession",get:function(){return bf.castConext.getCurrentSession()}},{key:"isConnected",value:function(){return this.castState===cast.framework.CastState.CONNECTED&&this.remotePlayer.isConnected}},{key:"bindListeners",value:function(){this.onCastStateChange=this.onCastStateChange.bind(this),this.onIsConnectedChanged=this.onIsConnectedChanged.bind(this),this.castConext.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.onCastStateChange),this.remotePlayerController.addEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.onIsConnectedChanged)}},{key:"onIsConnectedChanged",value:function(){try{this.trigger("isconnectedchanged",this.remotePlayer.isConnected)}catch(e){console.log(e)}console.log(this.remotePlayer.isConnected)}},{key:"dispose",value:function(){this.castConext.removeEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,this.onCastStateChange),this.remotePlayerController.removeEventListener(cast.framework.RemotePlayerEventType.IS_CONNECTED_CHANGED,this.onIsConnectedChanged)}},{key:"onCastStateChange",value:function(e){this.hasAvailableDevices(e.castState)?this.trigger("devicesAvailable"):this.trigger("devicesUnabailable")}},{key:"stopCasting",value:function(){this.castConext.getCurrentSession().endSession(!0)}},{key:"getDeviceName",value:function(){var e,t;return null===(t=null===(e=this.castConext.getCurrentSession())||void 0===e?void 0:e.getCastDevice())||void 0===t?void 0:t.friendlyName}},{key:"hasAvailableDevices",value:function(e){return e||(e=this.castConext.getCastState()),e===cast.framework.CastState.NOT_CONNECTED||e===cast.framework.CastState.CONNECTING||e===cast.framework.CastState.CONNECTED}}])&&pf(t.prototype,n),r&&pf(t,r),o}(Fu.getComponent("Component"));n(383);function wf(e){return(wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Tf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sf(e,t,n){return(Sf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=xf(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ef(e,t){return(Ef=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xf(e);if(t){var i=xf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return kf(this,n)}}function kf(e,t){return!t||"object"!==wf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xf(e){return(xf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Of=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ef(e,t)}(o,e);var t,n,r,i=Cf(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,null)).update(),e}return t=o,(n=[{key:"play",value:function(){}},{key:"createEl",value:function(){return Sf(xf(o.prototype),"createEl",this).call(this,"div",{className:"cv-chromecast-tech"})}},{key:"setTitle",value:function(e){this.title=e,this.update()}},{key:"setPoster",value:function(e){this.poster=e,this.update()}},{key:"disconnect",value:function(e){e.stopPropagation(),bf.stopCasting()}},{key:"update",value:function(){this.el_.innerHTML='\n <div class="cv-chromecast-content">\n '.concat(this.title?"<h1>".concat(this.title,"</h1>"):"","\n <p>Currently playing on: ").concat(bf.getDeviceName(),'</p>\n </div>\n <div class="cv-chromecast-background" style="background-image: url(').concat(this.poster,')"></div>\n ');var e=document.createElement("div");e.className="btn btn-primary cursor-pointer",e.onclick=this.disconnect.bind(this),e.innerHTML="Stop casting",this.el_.querySelector(".cv-chromecast-content").appendChild(e)}}])&&Tf(t.prototype,n),r&&Tf(t,r),o}(Fu.getComponent("Component"));function Pf(e){return(Pf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Af(e,t,n){return(Af="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Df(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function If(e,t){return(If=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Df(e);if(t){var i=Df(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jf(this,n)}}function jf(e,t){return!t||"object"!==Pf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Df(e){return(Df=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nf=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},Mf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&If(e,t)}(o,e);var t,n,r,i=Lf(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),bf.isConnected()&&e.source&&n.setSource(e.source),n.bindEventListeners(),e.poster&&n.setPoster(e.poster),n.triggerReady(),n}return t=o,r=[{key:"canPlaySource",value:function(){return bf.isConnected()}},{key:"isSupported",value:function(){return!!bf&&bf.isConnected()}}],(n=[{key:"createEl",value:function(){return this.ui=new Of,this.ui.el()}},{key:"bindEventListeners",value:function(){this.onPlayerStateChanged=this.onPlayerStateChanged.bind(this),this.onVolumeLevelChanged=this.onVolumeLevelChanged.bind(this),this.onCurrentTimeChanged=this.onCurrentTimeChanged.bind(this),this.onDurationChanged=this.onDurationChanged.bind(this);var e=cast.framework.RemotePlayerEventType,t=bf.remotePlayerController;t.addEventListener(e.PLAYER_STATE_CHANGED,this.onPlayerStateChanged),t.addEventListener(e.VOLUME_LEVEL_CHANGED,this.onVolumeLevelChanged),t.addEventListener(e.IS_MUTED_CHANGED,this.onVolumeLevelChanged),t.addEventListener(e.CURRENT_TIME_CHANGED,this.onCurrentTimeChanged),t.addEventListener(e.DURATION_CHANGED,this.onDurationChanged)}},{key:"dispose",value:function(){var e=cast.framework.RemotePlayerEventType,t=bf.remotePlayerController;t.removeEventListener(e.PLAYER_STATE_CHANGED,this.onPlayerStateChanged),t.removeEventListener(e.VOLUME_LEVEL_CHANGED,this.onVolumeLevelChanged),t.removeEventListener(e.IS_MUTED_CHANGED,this.onVolumeLevelChanged),t.removeEventListener(e.CURRENT_TIME_CHANGED,this.onCurrentTimeChanged),t.removeEventListener(e.DURATION_CHANGED,this.onDurationChanged),Af(Df(o.prototype),"dispose",this).call(this)}},{key:"onPlayerStateChanged",value:function(){var e=bf.remotePlayer.playerState;e===chrome.cast.media.PlayerState.PLAYING?(this.trigger("play"),this.trigger("playing")):e===chrome.cast.media.PlayerState.PAUSED?this.trigger("pause"):e===chrome.cast.media.PlayerState.BUFFERING?this.trigger("waiting"):e===chrome.cast.media.PlayerState.IDLE&&this.ended()&&this.trigger("ended")}},{key:"stopCasting",value:function(){var e=window.setTimeout((function(){bf.stopCasting()}),1e4);this.on("dispose",(function(){window.clearTimeout(e)}))}},{key:"setPoster",value:function(e){this.poster_=e,this.ui.setPoster(e)}},{key:"poster",value:function(){return this.poster_}},{key:"setTitle",value:function(e){this.ui.setTitle(e)}},{key:"onVolumeLevelChanged",value:function(){this.trigger("volumechange")}},{key:"onCurrentTimeChanged",value:function(){this.trigger("timeupdate")}},{key:"onDurationChanged",value:function(){this.trigger("durationchange")}},{key:"setSource",value:function(e){var t,n;return Nf(this,void 0,void 0,regeneratorRuntime.mark((function r(){var i,o,a;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(i=bf.castSession.getMediaSession(),this.trigger("waiting"),(null===(t=null==i?void 0:i.media)||void 0===t?void 0:t.contentId)!==e.src||(null===(n=null==i?void 0:i.media)||void 0===n?void 0:n.contentType)!==e.type){r.next=5;break}return this.triggerLoaded(),r.abrupt("return");case 5:return o=new chrome.cast.media.MediaInfo(e.src,e.type),(a=new chrome.cast.media.LoadRequest(o)).autoplay=!0,a.currentTime=this.currentTime()||this.options_.startTime||0,r.prev=9,r.next=12,bf.castSession.loadMedia(a);case 12:r.next=17;break;case 14:r.prev=14,r.t0=r.catch(9),this.trigger("error");case 17:this.triggerLoaded();case 18:case"end":return r.stop()}}),r,this,[[9,14]])})))}},{key:"triggerLoaded",value:function(){var e=this,t=function(){e.trigger("loadstart"),e.trigger("loadeddata"),e.trigger("play"),e.trigger("playing")};if(this.duration())t();else{var n=bf.remotePlayerController,r=cast.framework.RemotePlayerEventType,i=function e(){t(),n.removeEventListener(r.DURATION_CHANGED,e),n.removeEventListener(r.CURRENT_TIME_CHANGED,e)};n.addEventListener(r.DURATION_CHANGED,i),n.addEventListener(r.CURRENT_TIME_CHANGED,i)}}},{key:"play",value:function(){this.paused()&&bf.remotePlayerController.playOrPause()}},{key:"pause",value:function(){!this.paused()&&bf.remotePlayer.canPause&&bf.remotePlayerController.playOrPause()}},{key:"paused",value:function(){return bf.remotePlayer.isPaused||this.ended()||null===bf.remotePlayer.playerState}},{key:"ended",value:function(){var e,t=null===(e=bf.castSession)||void 0===e?void 0:e.getMediaSession();return!t||t.idleReason===chrome.cast.media.IdleReason.FINISHED}},{key:"setCurrentTime",value:function(e){var t=this.duration();e>t||!bf.remotePlayer.canSeek||(bf.remotePlayer.currentTime=Math.min(t-1,e),bf.remotePlayerController.seek(),this.trigger("timeupdate"))}},{key:"currentTime",value:function(){return bf.remotePlayer.currentTime}},{key:"duration",value:function(){return this.durationCache_=bf.remotePlayer.duration,this.durationCache_}},{key:"volume",value:function(){return bf.remotePlayer.volumeLevel}},{key:"setVolume",value:function(e){bf.remotePlayer.volumeLevel=e,bf.remotePlayerController.setVolumeLevel(),this.trigger("volumechange")}},{key:"muted",value:function(){return bf.remotePlayer.isMuted}},{key:"setMuted",value:function(e){this.muted()===e&&bf.remotePlayerController.muteOrUnmute()}},{key:"buffered",value:function(){}},{key:"seekable",value:function(){return Fu.createTimeRanges(0,this.duration())}},{key:"controls",value:function(){return!1}},{key:"playsinline",value:function(){return!0}},{key:"supportsFullScreen",value:function(){return!0}},{key:"setAutoplay",value:function(){}},{key:"preload",value:function(){}},{key:"load",value:function(){}},{key:"setPlaybackRate",value:function(){}},{key:"playbackRate",value:function(){var e=bf.castSession.getMediaSession();return e?e.playbackRate:1}},{key:"readyState",value:function(){return bf.remotePlayer.playerState===chrome.cast.media.PlayerState.IDLE||bf.remotePlayer.playerState===chrome.cast.media.PlayerState.BUFFERING?0:4}}])&&Rf(t.prototype,n),r&&Rf(t,r),o}(Fu.getComponent("Tech")),Uf=Mf.prototype;Uf.featuresVolumeControl=!0,Uf.featuresPlaybackRate=!1,Uf.movingMediaElementInDOM=!1,Uf.featuresFullscreenResize=!0,Uf.featuresTimeupdateEvents=!0,Uf.featuresProgressEvents=!1,Uf.featuresNativeTextTracks=!1,Uf.featuresNativeAudioTracks=!1,Uf.featuresNativeVideoTracks=!1,Fu.registerTech("chromecast",Mf);n(384);function Bf(e){return(Bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ff(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vf(e,t,n){return(Vf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=$f(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Hf(e,t){return(Hf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$f(e);if(t){var i=$f(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qf(this,n)}}function qf(e,t){return!t||"object"!==Bf(t)&&"function"!=typeof t?Wf(e):t}function Wf(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $f(e){return($f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gf=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hf(e,t)}(o,e);var t,n,r,i=zf(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t.onDevicesAvailable=t.onDevicesAvailable.bind(Wf(t)),t.onDevicesUnavailable=t.onDevicesUnavailable.bind(Wf(t)),bf.on("devicesAvailable",t.onDevicesAvailable),bf.on("devicesUnabailable",t.onDevicesUnavailable),t.player_.one("dispose",(function(){bf.off("devicesAvailable",t.onDevicesAvailable),bf.off("devicesUnabailable",t.onDevicesUnavailable)})),bf.hasAvailableDevices()||t.hide(),t}return t=o,(n=[{key:"onDevicesAvailable",value:function(){this.show()}},{key:"onDevicesUnavailable",value:function(){this.hide()}},{key:"buildCSSClass",value:function(){return"cv-chromecast-button"}},{key:"createEl",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Vf($f(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:'\n <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n <google-cast-launcher></google-cast-launcher>\n '}),n)}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){Vf($f(o.prototype),"handleClick",this).call(this,null)}}])&&Ff(t.prototype,n),r&&Ff(t,r),o}(Fu.getComponent("Button"));function Yf(e){return(Yf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xf(e,t){return(Xf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qf(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zf(e);if(t){var i=Zf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Jf(this,n)}}function Jf(e,t){return!t||"object"!==Yf(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Zf(e){return(Zf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Gf.prototype.controlText_="Chromecast",Fu.registerComponent("ChromecastButton",Gf);var eh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Xf(e,t)}(o,e);var t,n,r,i=Qf(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,bf?(e.ready((function(){return n.onReady()})),n):Jf(n)}return t=o,(n=[{key:"onReady",value:function(){var e,t=this,n=this.player.getChild("collapserator"),r=null===(e=null==n?void 0:n.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));r&&-1!==r&&(n.addChild("ChromecastButton",{},r+1),this.onIsConnectedChanged=this.onIsConnectedChanged.bind(this),bf.on("isconnectedchanged",this.onIsConnectedChanged),this.player.one("dispose",(function(){bf.off("isconnectedchanged",t.onIsConnectedChanged)})),this.setTechTitle())}},{key:"setTechTitle",value:function(){var e=this.player.tech();"ChromecastTech"===e.name()&&e.setTitle(this.options.title)}},{key:"onIsConnectedChanged",value:function(){var e=this,t=this.player.currentTime(),n=this.player.paused();this.player.src(this.player.currentSources()),this.player.ready((function(){e.player.currentTime(t),n?e.player.pause():e.player.play(),e.setTechTitle()}))}}])&&Kf(t.prototype,n),r&&Kf(t,r),o}(Fu.getPlugin("plugin"));function th(e){return(th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ih(e,t){return(ih=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function oh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sh(e);if(t){var i=sh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ah(this,n)}}function ah(e,t){return!t||"object"!==th(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function sh(e){return(sh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("chromecast",eh);var uh=Fu.getComponent("Menu"),lh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ih(e,t)}(o,e);var t,n,r,i=oh(o);function o(){return nh(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleBlur",value:function(e){var t=e.relatedTarget||document.activeElement;this.el().contains(t)||uh.prototype.handleBlur.call(this,e)}}])&&rh(t.prototype,n),r&&rh(t,r),o}(uh);function ch(e){return(ch="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dh(e,t){return(dh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ph(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mh(e);if(t){var i=mh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yh(this,n)}}function yh(e,t){return!t||"object"!==ch(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mh(e){return(mh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("Menu",lh);var gh=Fu.getComponent("Component"),vh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dh(e,t)}(o,e);var t,n,r,i=ph(o);function o(){return fh(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"createMenu",value:function(){var e,t=new lh(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var n=Fu.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(e=this.options_.title,"string"!=typeof e?e:e.replace(/./,(function(e){return e.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var r=new gh(this.player_,{el:n});t.addItem(r)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)t.addItem(this.items[i]);return t}}])&&hh(t.prototype,n),r&&hh(t,r),o}(Fu.getComponent("MenuButton"));Fu.registerComponent("MenuButton",vh);n(385);function bh(e){return(bh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _h(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Th(e,t,n){return(Th="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=kh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Sh(e,t){return(Sh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Eh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kh(e);if(t){var i=kh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ch(this,n)}}function Ch(e,t){return!t||"object"!==bh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kh(e){return(kh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sh(e,t)}(o,e);var t,n,r,i=Eh(o);function o(){return _h(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(Th(kh(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Th(kh(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&wh(t.prototype,n),r&&wh(t,r),o}(Fu.getComponent("Component"));function Oh(e){return(Oh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ph(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rh(e,t,n){return(Rh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ah(e,t){return(Ah=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ih(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jh(e);if(t){var i=jh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Lh(this,n)}}function Lh(e,t){return!t||"object"!==Oh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jh(e){return(jh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}xh.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},Fu.registerComponent("TimeWrapper",xh);var Dh=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ah(e,t)}(o,e);var t,n,r,i=Ih(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).playNext=e.nextVideoPlugin().getShouldPlayNext(),n.toggle(n.playNext),n}return t=o,(n=[{key:"handleToggle",value:function(){this.toggle(!this.playNext)}},{key:"toggle",value:function(e){e?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){this.playNext=!0,Fu.dom.addClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext)}},{key:"toggleOff",value:function(){this.playNext=!1,Fu.dom.removeClass(this.toggleEl,"on"),this.player_.nextVideoPlugin().setShouldPlayNext(this.playNext)}},{key:"handleClick",value:function(e){e.stopImmediatePropagation()}},{key:"createEl",value:function(e,t,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=Fu.dom.createEl("div",{className:"custom-toggle toggle-option float-right",innerHTML:'<span class="handle"></span></div>'}),this.toggleEl.addEventListener("click",this.handleToggle);var r=Rh(jh(o.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:'\n <span class="vjs-menu-item-text">autoplay</span>\n <span class="cv-toggle-container"></span>'},n);return r.children[1].appendChild(this.toggleEl),r}}])&&Ph(t.prototype,n),r&&Ph(t,r),o}(Fu.getComponent("MenuItem"));Fu.registerComponent("NextVideoMenuItem",Dh);n(386);function Nh(e){return(Nh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Mh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bh(e,t,n){return t&&Uh(e.prototype,t),n&&Uh(e,n),e}function Fh(e,t,n){return(Fh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Wh(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Vh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hh(e,t)}function Hh(e,t){return(Hh=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zh(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wh(e);if(t){var i=Wh(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qh(this,n)}}function qh(e,t){return!t||"object"!==Nh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Wh(e){return(Wh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $h=Fu.getComponent("MenuItem"),Gh=Fu.getComponent("NextVideoMenuItem"),Yh=function(e){Vh(n,e);var t=zh(n);function n(e,r){return Mh(this,n),t.call(this,e,r)}return Bh(n,[{key:"handleClick",value:function(e){var t=this;Fh(Wh(n.prototype),"handleClick",this).call(this,e),this.requestAnimationFrame((function(){t.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(e,t,r){if(!this.options_.item)return Fh(Wh(n.prototype),"createEl",this).call(this,e,t,r);var i=this.options_.item.getCollabsibleName(),o=this.options_.item.getCollabsibleValue(),a='\n <span class="vjs-menu-item-text">'.concat(i,"</span>\n <span>").concat(o,"</span>");return Fh(Wh(n.prototype),"createEl",this).call(this,e,{className:"vjs-menu-item cv-cog-menu-item",innerHTML:a},r)}}]),n}($h),Kh=Fu.getComponent("MenuButton"),Xh=function(e){Vh(n,e);var t=zh(n);function n(e,r){return Mh(this,n),t.call(this,e,r)}return Bh(n,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Fh(Wh(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(Fh(Wh(n.prototype),"buildCSSClass",this).call(this))}},{key:"pressButton",value:function(){this.update(),Kh.prototype.pressButton.apply(this)}},{key:"createItems",value:function(){var e=[];this.renderPlayNext&&e.push(new Gh(this.player_,this.options_));for(var t=0;t<this.options_.items.length;t++){var n=this.options_.items[t];n.isCollabsible&&(n.showInCollabsibleMenu()&&n.isCollapsed&&e.push(new Yh(this.player_,{item:n})))}return e}},{key:"update",value:function(){Fh(Wh(n.prototype),"update",this).call(this),this.player_.trigger("resizemenus")}},{key:"showPlayNext",value:function(){this.renderPlayNext=!0,this.update()}}]),n}(Kh);function Qh(e){return(Qh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jh(e,t,n){return(Jh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ad(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Zh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ed(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function td(e,t,n){return t&&ed(e.prototype,t),n&&ed(e,n),e}function nd(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rd(e,t)}function rd(e,t){return(rd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function id(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ad(e);if(t){var i=ad(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return od(this,n)}}function od(e,t){return!t||"object"!==Qh(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ad(e){return(ad=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("cogButton",Xh);var sd=Fu.getComponent("MenuItem"),ud=Fu.getComponent("MenuButton"),ld=["small","medium","large"],cd=function(e){nd(n,e);var t=id(n);function n(e,r){return Zh(this,n),t.call(this,e,r)}return td(n,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}]),n}(sd),fd=function(e){nd(n,e);var t=id(n);function n(e,r){var i;return Zh(this,n),(i=t.call(this,e,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.player_.ready((function(){i.update()})),i}return td(n,[{key:"createItems",value:function(){var e=this,t=this.player_.textTrackSettings;if(t){var n=t.getSizeSetting();return ld.map((function(t){return new cd(e.player_,{label:t,selectable:!0,multiSelectable:!1,selected:t===n,value:t})}))}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Jh(ad(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){ud.prototype.handleClick.apply(this)}}]),n}(ud);Fu.registerComponent("SubtitleSizeButton",fd);n(387);var hd=n(112),dd=n.n(hd),pd=(n(388),n(390),n(142)),yd=n.n(pd),md=n(143),gd=n.n(md),vd=n(235),bd=n.n(vd),_d=n(236),wd=(n(392),null),Td=null;function Sd(){if(null===wd){if("undefined"==typeof document)return wd=0;var e=document.body,t=document.createElement("div");t.classList.add("simplebar-hide-scrollbar"),e.appendChild(t);var n=t.getBoundingClientRect().right;e.removeChild(t),wd=n}return wd}dd.a&&window.addEventListener("resize",(function(){Td!==window.devicePixelRatio&&(Td=window.devicePixelRatio,wd=null)}));var Ed=function(e){return Array.prototype.reduce.call(e,(function(e,t){var n=t.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(e,t){return t.toUpperCase()}));switch(t.value){case"true":e[r]=!0;break;case"false":e[r]=!1;break;case void 0:e[r]=!0;break;default:e[r]=t.value}}return e}),{})};function Cd(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window}function kd(e){return e&&e.ownerDocument?e.ownerDocument:document}var xd=function(){function e(t,n){var r=this;this.onScroll=function(){var e=Cd(r.el);r.scrollXTicking||(e.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(e.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0)},this.scrollX=function(){r.axis.x.isOverflowing&&(r.showScrollbar("x"),r.positionScrollbar("x")),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&(r.showScrollbar("y"),r.positionScrollbar("y")),r.scrollYTicking=!1},this.onMouseEnter=function(){r.showScrollbar("x"),r.showScrollbar("y")},this.onMouseMove=function(e){r.mouseX=e.clientX,r.mouseY=e.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this.onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.hideScrollbars=function(){r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.track.rect)||(r.axis.y.scrollbar.el.classList.remove(r.classNames.visible),r.axis.y.isVisible=!1),r.isWithinBounds(r.axis.x.track.rect)||(r.axis.x.scrollbar.el.classList.remove(r.classNames.visible),r.axis.x.isVisible=!1)},this.onPointerEvent=function(e){var t,n;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(t=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(n=r.isWithinBounds(r.axis.y.track.rect)),(t||n)&&(e.preventDefault(),e.stopPropagation(),"mousedown"===e.type&&(t&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(e,"x"):r.onTrackClick(e,"x")),n&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(e,"y"):r.onTrackClick(e,"y"))))},this.drag=function(t){var n=r.axis[r.draggedAxis].track,i=n.rect[r.axis[r.draggedAxis].sizeAttr],o=r.axis[r.draggedAxis].scrollbar,a=r.contentWrapperEl[r.axis[r.draggedAxis].scrollSizeAttr],s=parseInt(r.elStyles[r.axis[r.draggedAxis].sizeAttr],10);t.preventDefault(),t.stopPropagation();var u=(("y"===r.draggedAxis?t.pageY:t.pageX)-n.rect[r.axis[r.draggedAxis].offsetAttr]-r.axis[r.draggedAxis].dragOffset)/(i-o.size)*(a-s);"x"===r.draggedAxis&&(u=r.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u-(i+o.size):u,u=r.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-u:u),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=u},this.onEndDrag=function(e){var t=kd(r.el),n=Cd(r.el);e.preventDefault(),e.stopPropagation(),r.el.classList.remove(r.classNames.dragging),t.removeEventListener("mousemove",r.drag,!0),t.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=n.setTimeout((function(){t.removeEventListener("click",r.preventClick,!0),t.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null}))},this.preventClick=function(e){e.preventDefault(),e.stopPropagation()},this.el=t,this.minScrollbarWidth=20,this.options=Object.assign({},e.defaultOptions,{},n),this.classNames=Object.assign({},e.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,e.instances.has(this.el)||(this.recalculate=yd()(this.recalculate.bind(this),64),this.onMouseMove=yd()(this.onMouseMove.bind(this),64),this.hideScrollbars=gd()(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=gd()(this.onWindowResize.bind(this),64,{leading:!0}),e.getRtlHelpers=bd()(e.getRtlHelpers),this.init())}e.getRtlHelpers=function(){var t=document.createElement("div");t.innerHTML='<div class="hs-dummy-scrollbar-size"><div style="height: 200%; width: 200%; margin: 10px 0;"></div></div>';var n=t.firstElementChild;document.body.appendChild(n);var r=n.firstElementChild;n.scrollLeft=0;var i=e.getOffset(n),o=e.getOffset(r);n.scrollLeft=999;var a=e.getOffset(r);return{isRtlScrollingInverted:i.left!==o.left&&o.left-a.left!=0,isRtlScrollbarInverted:i.left!==o.left}},e.getOffset=function(e){var t=e.getBoundingClientRect(),n=kd(e),r=Cd(e);return{top:t.top+(r.pageYOffset||n.documentElement.scrollTop),left:t.left+(r.pageXOffset||n.documentElement.scrollLeft)}};var t=e.prototype;return t.init=function(){e.instances.set(this.el,this),dd.a&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.initDOM=function(){var e=this;if(Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(e.classNames.wrapper)})).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var t=document.createElement("div"),n=document.createElement("div");t.classList.add(this.classNames.track),n.classList.add(this.classNames.scrollbar),t.appendChild(n),this.axis.x.track.el=t.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=t.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},t.initListeners=function(){var e=this,t=Cd(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.addEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),t.addEventListener("resize",this.onWindowResize);var n=!1,r=t.ResizeObserver||_d.a;this.resizeObserver=new r((function(){n&&e.recalculate()})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),t.requestAnimationFrame((function(){n=!0})),this.mutationObserver=new t.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},t.recalculate=function(){var e=Cd(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var t=this.heightAutoObserverEl.offsetHeight<=1,n=this.heightAutoObserverEl.offsetWidth<=1,r=this.contentEl.offsetWidth,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var s=this.contentEl.scrollHeight,u=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=t?"auto":"100%",this.placeholderEl.style.width=n?r+"px":"auto",this.placeholderEl.style.height=s+"px";var l=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=u>r,this.axis.y.isOverflowing=s>l,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==a&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var c=this.axis.x.isOverflowing?this.scrollbarWidth:0,f=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&u>i-f,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&s>l-c,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},t.getScrollbarSize=function(e){if(void 0===e&&(e="y"),!this.axis[e].isOverflowing)return 0;var t,n=this.contentEl[this.axis[e].scrollSizeAttr],r=this.axis[e].track.el[this.axis[e].offsetSizeAttr],i=r/n;return t=Math.max(~~(i*r),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(t=Math.min(t,this.options.scrollbarMaxSize)),t},t.positionScrollbar=function(t){if(void 0===t&&(t="y"),this.axis[t].isOverflowing){var n=this.contentWrapperEl[this.axis[t].scrollSizeAttr],r=this.axis[t].track.el[this.axis[t].offsetSizeAttr],i=parseInt(this.elStyles[this.axis[t].sizeAttr],10),o=this.axis[t].scrollbar,a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=(a="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollingInverted?-a:a)/(n-i),u=~~((r-o.size)*s);u="x"===t&&this.isRtl&&e.getRtlHelpers().isRtlScrollbarInverted?u+(r-o.size):u,o.el.style.transform="x"===t?"translate3d("+u+"px, 0, 0)":"translate3d(0, "+u+"px, 0)"}},t.toggleTrackVisibility=function(e){void 0===e&&(e="y");var t=this.axis[e].track.el,n=this.axis[e].scrollbar.el;this.axis[e].isOverflowing||this.axis[e].forceVisible?(t.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll"):(t.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden"),this.axis[e].isOverflowing?n.style.display="block":n.style.display="none"},t.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},t.onMouseMoveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.rect=this.axis[e].track.el.getBoundingClientRect(),this.axis[e].scrollbar.rect=this.axis[e].scrollbar.el.getBoundingClientRect(),this.isWithinBounds(this.axis[e].scrollbar.rect)?this.axis[e].scrollbar.el.classList.add(this.classNames.hover):this.axis[e].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[e].track.rect)?(this.showScrollbar(e),this.axis[e].track.el.classList.add(this.classNames.hover)):this.axis[e].track.el.classList.remove(this.classNames.hover)},t.onMouseLeaveForAxis=function(e){void 0===e&&(e="y"),this.axis[e].track.el.classList.remove(this.classNames.hover),this.axis[e].scrollbar.el.classList.remove(this.classNames.hover)},t.showScrollbar=function(e){void 0===e&&(e="y");var t=this.axis[e].scrollbar.el;this.axis[e].isVisible||(t.classList.add(this.classNames.visible),this.axis[e].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},t.onDragStart=function(e,t){void 0===t&&(t="y");var n=kd(this.el),r=Cd(this.el),i=this.axis[t].scrollbar,o="y"===t?e.pageY:e.pageX;this.axis[t].dragOffset=o-i.rect[this.axis[t].offsetAttr],this.draggedAxis=t,this.el.classList.add(this.classNames.dragging),n.addEventListener("mousemove",this.drag,!0),n.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(n.addEventListener("click",this.preventClick,!0),n.addEventListener("dblclick",this.preventClick,!0)):(r.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.onTrackClick=function(e,t){var n=this;if(void 0===t&&(t="y"),this.options.clickOnTrack){var r=Cd(this.el);this.axis[t].scrollbar.rect=this.axis[t].scrollbar.el.getBoundingClientRect();var i=this.axis[t].scrollbar.rect[this.axis[t].offsetAttr],o=parseInt(this.elStyles[this.axis[t].sizeAttr],10),a=this.contentWrapperEl[this.axis[t].scrollOffsetAttr],s=("y"===t?this.mouseY-i:this.mouseX-i)<0?-1:1,u=-1===s?a-o:a+o;!function e(){var i,o;-1===s?a>u&&(a-=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((i={})[n.axis[t].offsetAttr]=a,i)),r.requestAnimationFrame(e)):a<u&&(a+=n.options.clickOnTrackSpeed,n.contentWrapperEl.scrollTo(((o={})[n.axis[t].offsetAttr]=a,o)),r.requestAnimationFrame(e))}()}},t.getContentElement=function(){return this.contentEl},t.getScrollElement=function(){return this.contentWrapperEl},t.getScrollbarWidth=function(){try{return"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:Sd()}catch(e){return Sd()}},t.removeListeners=function(){var e=this,t=Cd(this.el);this.options.autoHide&&this.el.removeEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,!0)})),["touchstart","touchend","touchmove"].forEach((function(t){e.el.removeEventListener(t,e.onPointerEvent,{capture:!0,passive:!0})})),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.recalculate.cancel(),this.onMouseMove.cancel(),this.hideScrollbars.cancel(),this.onWindowResize.cancel()},t.unMount=function(){this.removeListeners(),e.instances.delete(this.el)},t.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.findChild=function(e,t){var n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,(function(e){return n.call(e,t)}))[0]},e}();xd.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3},xd.instances=new WeakMap,xd.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||xd.instances.has(e)||new xd(e,Ed(e.attributes))}))},xd.removeObserver=function(){this.globalObserver.disconnect()},xd.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(xd.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},xd.handleMutations=function(e){e.forEach((function(e){Array.prototype.forEach.call(e.addedNodes,(function(e){1===e.nodeType&&(e.hasAttribute("data-simplebar")?!xd.instances.has(e)&&new xd(e,Ed(e.attributes)):Array.prototype.forEach.call(e.querySelectorAll("[data-simplebar]"),(function(e){"init"===e.getAttribute("data-simplebar")||xd.instances.has(e)||new xd(e,Ed(e.attributes))})))})),Array.prototype.forEach.call(e.removedNodes,(function(e){1===e.nodeType&&(e.hasAttribute('[data-simplebar="init"]')?xd.instances.has(e)&&xd.instances.get(e).unMount():Array.prototype.forEach.call(e.querySelectorAll('[data-simplebar="init"]'),(function(e){xd.instances.has(e)&&xd.instances.get(e).unMount()})))}))}))},xd.getOptions=Ed,dd.a&&xd.initHtmlApi();var Od=xd,Pd={initMenuScrollbar:function(e){Pd.unMountScrollbar(e);var t=Pd.getMenuEl(e);t&&(e.simpleBar_=new Od(t,{autoHide:!1}),e.one("dispose",(function(){return Pd.unMountScrollbar(e)})))},unMountScrollbar:function(e){e.simpleBar_&&e.simpleBar_.unMount()},getMenuEl:function(e){return e.el().querySelector(".vjs-menu-content")}};function Rd(e,t,n,r){e.kind===t&&(n&&e.label!==n||(e.loaded_?r(e):e.one("loadeddata",(function(){r(e)}))))}var Ad=function(e,t,n,r){var i=function(e){Rd(e.track,t,n,r)},o=e.textTracks(),a=function(e,t,n){if(e.length)for(var r=e.length-1;r>=0;r--){var i=e[r];if(i.kind===t){if(n&&i.label!==n)continue;return i}}}(o,t,n);a?Rd(a,t,n,r):(o.addEventListener("addtrack",i),e.on("dispose",(function(){o.removeEventListener("addtrack",i)})))},Id=function(e){if(!e)return null;for(var t=e.textTracks(),n=0;n<t.length;n++){var r=t[n];if("showing"===r.mode)return r}return null};function Ld(e){return(Ld="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dd(e,t){return(Dd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Nd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ud(e);if(t){var i=Ud(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Md(this,n)}}function Md(e,t){return!t||"object"!==Ld(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ud(e){return(Ud=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Bd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dd(e,t)}(o,e);var t,n,r,i=Nd(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"update",value:function(e,t){var n=this;if(null==e?void 0:e.length){var r=[],i=0;e.forEach((function(e){var o=n.options_.label.substr(i,e);o&&r.push(o),r.push('<span class="cv-highlight">'),r.push(n.options_.label.substr(e,t)),r.push("</span>"),i=e+t})),r.push(this.options_.label.substring(i,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(r.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&jd(t.prototype,n),r&&jd(t,r),o}(Fu.getComponent("MenuItem"));function Fd(e){return(Fd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hd(e,t,n){return(Hd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Gd(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function zd(e,t){return(zd=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qd(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gd(e);if(t){var i=Gd(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Wd(this,n)}}function Wd(e,t){return!t||"object"!==Fd(t)&&"function"!=typeof t?$d(e):t}function $d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gd(e){return(Gd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yd=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zd(e,t)}(o,e);var t,n,r,i=qd(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onChange=function(e,t,n){var r,i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){o.clearTimeout(r),r=null},s=function(){for(var a=arguments.length,s=new Array(a),u=0;u<a;u++)s[u]=arguments[u];var l=function(){r=null,l=null,n||e.apply(this,s)};!r&&n&&e.apply(i,s),o.clearTimeout(r),r=o.setTimeout(l,t)};return s.cancel=a,s}(n.onChange,100,!1,$d(n)),n.bindEventListeners(),n}return t=o,(n=[{key:"createEl",value:function(){return Hd(Gd(o.prototype),"createEl",this).call(this,"li",{innerHTML:'\n <div class="cv-subtitle-search-input">\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="Search" type="text" autocomplete="off" spellcheck="false" aria-label="Search" />\n </div>\n '})}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){}},{key:"bindEventListeners",value:function(){var e=this,t=this.$("input");this.onChange=this.onChange.bind(this),t.addEventListener("keyup",this.onChange),t.addEventListener("blur",(function(t){e.options_.menuButton.menu.handleBlur(t)}))}},{key:"onChange",value:function(e){var t=e.target;this.options_.menuButton.search(t.value)}}])&&Vd(t.prototype,n),r&&Vd(t,r),o}(Fu.getComponent("MenuItem"));n(393);function Kd(e){return(Kd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jd(e,t,n){return t&&Qd(e.prototype,t),n&&Qd(e,n),e}function Zd(e,t,n){return(Zd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=op(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ep(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tp(e,t)}function tp(e,t){return(tp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function np(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=op(e);if(t){var i=op(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rp(this,n)}}function rp(e,t){return!t||"object"!==Kd(t)&&"function"!=typeof t?ip(e):t}function ip(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function op(e){return(op=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ap=Fu.getComponent("MenuItem"),sp=Fu.getComponent("MenuButton"),up=function(e){ep(n,e);var t=np(n);function n(){return Xd(this,n),t.apply(this,arguments)}return Jd(n,[{key:"createEl",value:function(e,t,r){return Zd(op(n.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:"vjs-menu-item cv-no-results"}),r)}}]),n}(ap),lp=function(e){ep(n,e);var t=np(n);function n(e,r){var i;return Xd(this,n),(i=t.call(this,e,r)).alwaysCollapsed=!0,i.isCollapsed=!1,i.isCollabsible=!0,i.update=i.update.bind(ip(i)),i.player_.textTracks().addEventListener("selectedlanguagechange",i.update),i}return Jd(n,[{key:"createItems",value:function(){var e,t=Id(this.player_);if(null===(e=null==t?void 0:t.cues)||void 0===e?void 0:e.length){for(var n=[new Yd(this.player_,{menuButton:this})],r=0;r<t.cues.length;r++){var i=t.cues[r];n.push(new Bd(this.player_,{cue:i,label:i.text,selected:!1,multiSelectable:!1}))}var o=new up(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return o.hide(),n.push(o),n}}},{key:"search",value:function(e){var t;e=e.trim();var n=Id(this.player_);if(null===(t=null==n?void 0:n.cues)||void 0===t?void 0:t.length){var r=this.findMatches(e,n);this.toggleItemVisibility(e,r),this.toggleNoResults(e,r)}}},{key:"findMatches",value:function(e,t){var n={};if(!e)return n;for(var r=new RegExp(e,"gi"),i=0;i<t.cues.length;i++){for(var o=t.cues[i].text,a=[],s=void 0;s=r.exec(o);)a.push(s.index);a.length&&(n[i]=a)}return n}},{key:"toggleItemVisibility",value:function(e,t){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(n,r){!e||t[r]?n.show():n.hide(),n.update(t[r],e.length)}))}},{key:"toggleNoResults",value:function(e,t){var n=this.menu.children_[this.menu.children_.length-1];!e||Object.keys(t).length?n.hide():n.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Zd(op(n.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){Zd(op(n.prototype),"update",this).call(this),Pd.initMenuScrollbar(this),this.player_.trigger("resizemenus")}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){sp.prototype.handleClick.apply(this)}}]),n}(sp);Fu.registerComponent("subtitleSearchButton",lp);n(394),n(395),n(396);function cp(e){return(cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hp(e,t,n){return(hp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=gp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function dp(e,t){return(dp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gp(e);if(t){var i=gp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yp(this,n)}}function yp(e,t){return!t||"object"!==cp(t)&&"function"!=typeof t?mp(e):t}function mp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gp(e){return(gp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dp(e,t)}(o,e);var t,n,r,i=pp(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(mp(n)),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update)})),n}return t=o,(n=[{key:"togglehidden",value:function(e){for(var t=0;t<this.children_.length;t++){var n=this.children_[t];n.isCollabsible&&(n.alwaysCollapsed||e?(n.isCollapsed=!0,n.addClass("cv-collapsed")):(n.isCollapsed=!1,n.removeClass("cv-collapsed")))}this.getChild("cogButton").update()}},{key:"update",value:function(){var e=this.player_.el().getBoundingClientRect();0!==e.width&&this.togglehidden(e.width<600)}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(hp(gp(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return hp(gp(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}}])&&fp(t.prototype,n),r&&fp(t,r),o}(Fu.getComponent("Component"));vp.prototype.options_={children:["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"]},Fu.registerComponent("collapserator",vp);n(397);function bp(e){return(bp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tp(e,t,n){return(Tp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=kp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Sp(e,t){return(Sp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ep(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kp(e);if(t){var i=kp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cp(this,n)}}function Cp(e,t){return!t||"object"!==bp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function kp(e){return(kp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sp(e,t)}(o,e);var t,n,r,i=Ep(o);function o(){return _p(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Tp(kp(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Tp(kp(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(){this.children_.forEach((function(e){e.update()}))}}])&&wp(t.prototype,n),r&&wp(t,r),o}(Fu.getComponent("Component"));function Op(e){return(Op="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Pp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Rp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ap(e,t,n){return(Ap="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Dp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ip(e,t){return(Ip=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Lp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Dp(e);if(t){var i=Dp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jp(this,n)}}function jp(e,t){return!t||"object"!==Op(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Dp(e){return(Dp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Np=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ip(e,t)}(o,e);var t,n,r,i=Lp(o);function o(){return Pp(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Ap(Dp(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Ap(Dp(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){this.el_.style.width=100*e+"%"}}])&&Rp(t.prototype,n),r&&Rp(t,r),o}(Fu.getComponent("Component"));function Mp(e){return(Mp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Up(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fp(e,t,n){return(Fp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=qp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Vp(e,t){return(Vp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Hp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qp(e);if(t){var i=qp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zp(this,n)}}function zp(e,t){return!t||"object"!==Mp(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function qp(e){return(qp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Wp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Vp(e,t)}(o,e);var t,n,r,i=Hp(o);function o(){return Up(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(Fp(qp(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Fp(qp(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"update",value:function(e){e>0&&e<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*e+"%"}}])&&Bp(t.prototype,n),r&&Bp(t,r),o}(Fu.getComponent("Component"));function $p(e){return($p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gp(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yp(e,t,n){return(Yp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Jp(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Kp(e,t){return(Kp=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xp(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jp(e);if(t){var i=Jp(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Qp(this,n)}}function Qp(e,t){return!t||"object"!==$p(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jp(e){return(Jp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Zp=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kp(e,t)}(o,e);var t,n,r,i=Xp(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).playProgress=new Wp(n.player_),n.addChild(n.playProgress),n.loadProgress=new Np(n.player_),n.addChild(n.loadProgress),n.update(),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(Yp(Jp(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Yp(Jp(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var e=this.player_.duration(),t=this.options_.endTime-this.options_.startTime;if(e!==this.duration_){var n=t/e;this.el_.style.width=100*n+"%";var r=this.options_.startTime/e;this.el_.style.left=100*r+"%",this.duration_=e}var i=this.getCurrentTime();i<this.options_.startTime?this.playProgress.update(0):i>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((i-this.options_.startTime)/t);var o=this.player_.bufferedEnd();o<this.options_.startTime?this.loadProgress.update(0):o>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((o-this.options_.startTime)/t)}}])&&Gp(t.prototype,n),r&&Gp(t,r),o}(Fu.getComponent("Component"));function ey(e){return(ey="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ty(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ny(e,t,n){return(ny="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=sy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function ry(e,t){return(ry=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function iy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sy(e);if(t){var i=sy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oy(this,n)}}function oy(e,t){return!t||"object"!==ey(t)&&"function"!=typeof t?ay(e):t}function ay(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sy(e){return(sy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var uy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ry(e,t)}(o,e);var t,n,r,i=iy(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).onDurationChange=n.onDurationChange.bind(ay(n)),n.createChapterItems=n.createChapterItems.bind(ay(n)),Ad(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("dispose",(function(){n.player_.off("durationchange",n.onDurationChange)})),n}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar")})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var e=ny(sy(o.prototype),"update",this).call(this);return this.chapterBarItems&&this.chapterBarItems.update(),e}},{key:"createChapterItems",value:function(e){e&&(this.track_=e);var t=new xp(this.player_);if(this.track_&&!this.options_.ignoreChapters)for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n],i=r.startTime,o=r.endTime,a=this.player_.duration();a&&(n===this.track_.cues.length-1&&r.endTime<this.player_.duration()&&(o=this.player_.duration()),o>a&&(o=a));var s=new Zp(this.player_,{startTime:i,endTime:o});if(t.addChild(s),a&&o===a)break}else t.addChild(new Zp(this.player_,{startTime:0,endTime:this.player_.duration()}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=t,this.addChild(this.chapterBarItems)}}])&&ty(t.prototype,n),r&&ty(t,r),o}(Fu.getComponent("SeekBar"));uy.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Fu.browser.IS_IOS||Fu.browser.IS_ANDROID||uy.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Fu.registerComponent("ChapterSeekBar",uy);n(398);function ly(e){return(ly="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cy(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hy(e,t,n){return(hy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=my(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function dy(e,t){return(dy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function py(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=my(e);if(t){var i=my(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yy(this,n)}}function yy(e,t){return!t||"object"!==ly(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function my(e){return(my=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gy=Fu.getComponent("ProgressControl"),vy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dy(e,t)}(o,e);var t,n,r,i=py(o);function o(){var e;return cy(this,o),(e=i.apply(this,arguments)).seekBarName_="seekBar",e}return t=o,(n=[{key:"setSeekBarName",value:function(e){this.seekBarName_=e}},{key:"getChild",value:function(e){return(null==e?void 0:e.toLowerCase())==="seekBar".toLowerCase()&&(e=this.seekBarName_),hy(my(o.prototype),"getChild",this).call(this,e)}}])&&fy(t.prototype,n),r&&fy(t,r),o}(gy);function by(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var n=Math.floor(e%60),r=Math.floor(e/60%60),i=Math.floor(e/3600),o=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(i=r=n="-"),(i=i>0||a>0?i+":":"")+(r=((i||o>=10)&&r<10?"0"+r:r)+":")+(n=n<10?"0"+n:n)}vy.prototype.options_={children:[]},Fu.registerComponent("ProgressControl",vy);n(399);function _y(e){return(_y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ty(e,t,n){return(Ty="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ky(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Sy(e,t){return(Sy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ey(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ky(e);if(t){var i=ky(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Cy(this,n)}}function Cy(e,t){return!t||"object"!==_y(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ky(e){return(ky=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sy(e,t)}(o,e);var t,n,r,i=Ey(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),Ad(n.player_,"chapters",!1,(function(e){n.track_=e})),n}return t=o,(n=[{key:"createEl",value:function(){var e=Ty(ky(o.prototype),"createEl",this).call(this);return this.chapter_=Fu.dom.createEl("div"),e.appendChild(this.chapter_),this.time_=Fu.dom.createEl("div"),e.appendChild(this.time_),e}},{key:"updateTime",value:function(e){var t=this.player_.duration();if(Fu.dom.textContent(this.time_,by(e,t)),this.track_){for(var n=0;n<this.track_.cues.length;n++){var r=this.track_.cues[n];if(r.startTime<=e&&r.endTime>=e)return void Fu.dom.textContent(this.chapter_,r.text)}Fu.dom.textContent(this.chapter_,"")}}}])&&wy(t.prototype,n),r&&wy(t,r),o}(Fu.getComponent("TimeTooltip"));Fu.registerComponent("TimeTooltip",xy);n(400);function Oy(e){return(Oy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Py(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ry(e,t,n){return(Ry="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=jy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ay(e,t){return(Ay=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Iy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jy(e);if(t){var i=jy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ly(this,n)}}function Ly(e,t){return!t||"object"!==Oy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function jy(e){return(jy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Dy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ay(e,t)}(o,e);var t,n,r,i=Iy(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"setTrack",value:function(e){this.track_=e}},{key:"createEl",value:function(){var e=Ry(jy(o.prototype),"createEl",this).call(this,"div",{className:"cv-thumbnail-display"});return this.img_=Fu.dom.createEl("img"),e.appendChild(this.img_),e}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(e){var t=e.indexOf("#");if(-1===t)return{src:e,w:0,h:0,x:0,y:0};var n=e.substr(0,t),r=e.substr(t+1);if("xywh="!==r.substr(0,5))return{src:e,w:0,h:0,x:0,y:0};var i=this.getScale(),o=r.substr(5).split(",");return{src:n,w:parseInt(o[2])*i,h:parseInt(o[3])*i,x:parseInt(o[0])*i,y:parseInt(o[1])*i}}},{key:"getScale",value:function(){var e=this.options_.scaleFactor,t=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==t&&(e*=2),e}},{key:"update",value:function(e){var t,n;if(null===(n=null===(t=this.track_)||void 0===t?void 0:t.cues)||void 0===n?void 0:n.length){for(var r,i=e,o=0;o<this.track_.cues.length;){var a=this.track_.cues[o];if(a.startTime<=i&&a.endTime>=i){r=this.parseImageLink(a.text);break}o++}if(null==r?void 0:r.src){this.enable();var s=r,u=s.src,l=s.w,c=s.h,f=s.x,h=s.y,d=this.getScale();this.img_.src=u,this.img_.style.left=-f+"px",this.img_.style.top=-h+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(d,")"),this.el_.style.width=l+"px",this.el_.style.height=c+"px"}else this.disable()}}}])&&Py(t.prototype,n),r&&Py(t,r),o}(Fu.getComponent("Component"));Dy.prototype.options_={scaleFactor:1},Fu.registerComponent("ThumbnailDisplay",Dy);n(401);function Ny(e){return(Ny="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function My(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Uy(e,t){return(Uy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function By(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hy(e);if(t){var i=Hy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fy(this,n)}}function Fy(e,t){return!t||"object"!==Ny(t)&&"function"!=typeof t?Vy(e):t}function Vy(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hy(e){return(Hy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Uy(e,t)}(o,e);var t,n,r,i=By(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),Ad(n.player_,"metadata","thumbnails",(function(e){n.getChild("ThumbnailDisplay").setTrack(e)})),n.update=n.update.bind(Vy(n)),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return t=o,(n=[{key:"update",value:function(e,t){var n=this;this.requestAnimationFrame((function(){var r=t*n.player_.duration();n.getChild("ThumbnailDisplay").update(r),n.getChild("TimeTooltip").updateTime(r);var i=n.el_.getBoundingClientRect();n.el_.style.marginLeft=-i.width/2+"px";var o=e.width*t;o<i.width/2?n.el_.style.left=i.width/2+"px":o>e.width-i.width/2?n.el_.style.left=e.width-i.width/2+"px":n.el_.style.left=e.width*t+"px"}))}}])&&My(t.prototype,n),r&&My(t,r),o}(Fu.getComponent("MouseTimeDisplay"));zy.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},Fu.registerComponent("MouseTimeDisplay",zy);n(402);function qy(e){return(qy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Wy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $y(e,t,n){return($y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Xy(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Gy(e,t){return(Gy=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Yy(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Xy(e);if(t){var i=Xy(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ky(this,n)}}function Ky(e,t){return!t||"object"!==qy(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Xy(e){return(Xy=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Qy=Fu.getComponent("ChaptersTrackMenuItem"),Jy=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gy(e,t)}(o,e);var t,n,r,i=Yy(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).nonIconControl=!1,n.thumbnailDisplay=new Dy(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),Ad(n.player_,"metadata","thumbnails",(function(e){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(e),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return t=o,(n=[{key:"update",value:function(){this.player_&&Qy.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(e,t,n){return this.nonIconControl=!0,$y(Xy(o.prototype),"createEl",this).call(this,"li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},t),n)}},{key:"getInnerHTML",value:function(){var e=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(by(this.options_.cue.startTime,e),")</p>")+"</span>"}}])&&Wy(t.prototype,n),r&&Wy(t,r),o}(Qy);n(403);function Zy(e){return(Zy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function em(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tm(e,t,n){return(tm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=am(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function nm(e,t){return(nm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=am(e);if(t){var i=am(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return im(this,n)}}function im(e,t){return!t||"object"!==Zy(t)&&"function"!=typeof t?om(e):t}function om(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function am(e){return(am=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nm(e,t)}(o,e);var t,n,r,i=rm(o);function o(e,t,n){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(r=i.call(this,e,t,n)).alwaysCollapsed=!1,r.isCollapsed=!1,r.isCollabsible=!0,r.update=r.update.bind(om(r)),r.player_.on("cv-whiteboard-change",r.update),r.player_.on("fullscreenchange",r.update),r.player_.on("dispose",(function(){r.player_.off("cv-whiteboard-change",r.update),r.player_.off("fullscreenchange",r.update)})),r}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(tm(am(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(tm(am(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var n=0,r=t.length;n<r;n++){var i=t[n],o=new Jy(this.player_,{track:this.track_,cue:i});e.push(o)}return e}},{key:"setTrack",value:function(e){var t=this;tm(am(o.prototype),"setTrack",this).call(this,e),this.track_&&"chapters"===this.track_.kind&&e.one("loadeddata",(function(){t.update()}))}},{key:"update",value:function(e){tm(am(o.prototype),"update",this).call(this,e),Pd.initMenuScrollbar(this)}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var e=this.track_.activeCues[0];return(null==e?void 0:e.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var e=this.track_.cues;return!(!e||!e.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&em(t.prototype,n),r&&em(t,r),o}(Fu.getComponent("ChaptersButton"));function um(e){return(um="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fm(e,t){return(fm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function hm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pm(e);if(t){var i=pm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dm(this,n)}}function dm(e,t){return!t||"object"!==um(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function pm(e){return(pm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("ChaptersButton",sm);var ym=Fu.getComponent("SubsCapsMenuItem"),mm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fm(e,t)}(o,e);var t,n,r,i=hm(o);function o(){return lm(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"handleClick",value:function(e){ym.prototype.handleClick.call(this,e),this.player_.trigger("cv:languageselected")}}])&&cm(t.prototype,n),r&&cm(t,r),o}(ym);function gm(e){return(gm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bm(e,t){return(bm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Tm(e);if(t){var i=Tm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return wm(this,n)}}function wm(e,t){return!t||"object"!==gm(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Tm(e){return(Tm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Sm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&bm(e,t)}(o,e);var t,n,r,i=_m(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};return n.track={player:e,kind:"subtitle",label:"Subtitle size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(t=i.call(this,e,n)).addClass("vjs-texttrack-settings"),t.controlText(", opens subtitle size settings"),t}return t=o,(n=[{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&vm(t.prototype,n),r&&vm(t,r),o}(Fu.getComponent("TextTrackMenuItem"));n(404);function Em(e){return(Em="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Cm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function km(e,t){return(km=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rm(e);if(t){var i=Rm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Om(this,n)}}function Om(e,t){return!t||"object"!==Em(t)&&"function"!=typeof t?Pm(e):t}function Pm(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rm(e){return(Rm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Am=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&km(e,t)}(o,e);var t,n,r,i=xm(o);function o(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var n={};n.track={player:e,kind:"subtitle",label:"Search subtitles",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(t=i.call(this,e,n)).addClass("vjs-texttrack-settings"),t.controlText(", opens subtitle search"),t.toggleHidden=t.toggleHidden.bind(Pm(t));var r=t.player_.textTracks();return r.addEventListener("selectedlanguagechange",t.toggleHidden),t.player_.one("dispose",(function(){r.removeEventListener("selectedlanguagechange",t.toggleHidden)})),t.toggleHidden(),t}return t=o,(n=[{key:"toggleHidden",value:function(){var e;if(this.player_){var t=Id(this.player_);(null===(e=null==t?void 0:t.cues)||void 0===e?void 0:e.length)?this.show():this.hide()}}},{key:"handleClick",value:function(){var e=this;this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&Cm(t.prototype,n),r&&Cm(t,r),o}(Fu.getComponent("TextTrackMenuItem"));function Im(e){return(Im="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dm(e,t,n){return(Dm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bm(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Nm(e,t){return(Nm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mm(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bm(e);if(t){var i=Bm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Um(this,n)}}function Um(e,t){return!t||"object"!==Im(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bm(e){return(Bm=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fm=Fu.getComponent("TextTrackButton"),Vm=Fu.getComponent("SubsCapsButton"),Hm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nm(e,t)}(o,e);var t,n,r,i=Mm(o);function o(){var e;return Lm(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(Dm(Bm(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"update",value:function(){Dm(Bm(o.prototype),"update",this).call(this),Pd.initMenuScrollbar(this)}},{key:"createItems",value:function(){var e=[new Am(this.player_),new Sm(this.player_)];return this.hideThreshold_++,Fm.prototype.createItems.call(this,e,mm)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1&&"showing"===n.mode)return n.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var e=this.player_.textTracks(),t=0;t<e.length;t++){var n=e[t];if(this.kinds_.indexOf(n.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Vm.prototype.handleClick.apply(this)}}])&&jm(t.prototype,n),r&&jm(t,r),o}(Vm);function zm(e){return(zm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wm(e,t){return(Wm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $m(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Km(e);if(t){var i=Km(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gm(this,n)}}function Gm(e,t){return!t||"object"!==zm(t)&&"function"!=typeof t?Ym(e):t}function Ym(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Km(e){return(Km=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("SubsCapsButton",Hm);var Xm=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wm(e,t)}(o,e);var t,n,r,i=$m(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).qualityId=t.qualityId;var r=e.qualityLevels(),a=n.handleQualityChange.bind(Ym(n));return r.on("change",a),e.on("dispose",(function(){r.off("change",a)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var e=this.player_.qualityLevels(),t=0;t<e.length;t++){var n=e[t];n.enabled=n.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var e=this.player_.qualityLevels(),t=e[e.selectedIndex],n=t&&t.id===this.qualityId;n!==this.isSelected_&&this.selected(n)}}}])&&qm(t.prototype,n),r&&qm(t,r),o}(Fu.getComponent("MenuItem"));n(405);function Qm(e){return(Qm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Jm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zm(e,t,n){return(Zm="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ig(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function eg(e,t){return(eg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function tg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ig(e);if(t){var i=ig(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ng(this,n)}}function ng(e,t){return!t||"object"!==Qm(t)&&"function"!=typeof t?rg(e):t}function rg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ig(e){return(ig=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var og={240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},ag=Fu.getComponent("MenuButton"),sg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&eg(e,t)}(o,e);var t,n,r,i=tg(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0;var r=n.player_.qualityLevels(),a=n.update.bind(rg(n));return r.on("addqualitylevel",a),r.on("removequalitylevel",a),e.on("dispose",(function(){r.removeEventListener("addqualitylevel",a),r.removeEventListener("removequalitylevel",a)})),n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Zm(ig(o.prototype),"buildCSSClass",this).call(this))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button ".concat(Zm(ig(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createItems",value:function(){for(var e=[],t=this.player_.qualityLevels(),n=0;n<t.length;n++){var r=t[n];if(r){var i=og[r.id];i&&e.push(new Xm(this.player_,{qualityId:r.id,label:i,selectable:!0,multiSelectable:!1}))}}return e}},{key:"update",value:function(){Zm(ig(o.prototype),"update",this).call(this),Pd.initMenuScrollbar(this)}},{key:"getCollabsibleName",value:function(){return"Playback Quality"}},{key:"getCollabsibleValue",value:function(){var e=this.player_.qualityLevels(),t=e[e.selectedIndex];return t?og[t.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){ag.prototype.handleClick.apply(this)}}])&&Jm(t.prototype,n),r&&Jm(t,r),o}(ag);Fu.registerComponent("QualityButton",sg);n(406);function ug(e){return(ug="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fg(e,t,n){return(fg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=yg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function hg(e,t){return(hg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yg(e);if(t){var i=yg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pg(this,n)}}function pg(e,t){return!t||"object"!==ug(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yg(e){return(yg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mg=Fu.getComponent("Menu"),gg=Fu.getComponent("MenuButton"),vg=Fu.getComponent("PlaybackRateMenuItem"),bg=Fu.getComponent("PlaybackRateMenuButton"),_g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hg(e,t)}(o,e);var t,n,r,i=dg(o);function o(){var e;return lg(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!0,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"createEl",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=gg.prototype.createEl).apply.apply(e,[this].concat(n))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(fg(yg(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"createMenu",value:function(){var e=new mg(this.player(),{menuButton:this}),t=this.playbackRates();if(t)for(var n=t.length-1;n>=0;n--)e.addItem(new vg(this.player(),{rate:t[n]+"x"}));return e}},{key:"handleClick",value:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=gg.prototype.handleClick).apply.apply(e,[this].concat(n))}},{key:"updateLabel",value:function(){var e;this.setupLabelEl();for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=bg.prototype.updateLabel).apply.apply(e,[this].concat(n))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var e=this.$("button");e&&(this.labelEl_=Fu.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Rate"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&cg(t.prototype,n),r&&cg(t,r),o}(bg);function wg(e){return(wg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Tg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Eg(e,t){return(Eg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Cg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xg(e);if(t){var i=xg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return kg(this,n)}}function kg(e,t){return!t||"object"!==wg(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function xg(e){return(xg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("PlaybackRateMenuButton",_g);var Og=Fu.getComponent("TextTrackSettings"),Pg={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},Rg={small:Pg,medium:Object.assign(Object.assign({},Pg),{fontPercent:1.5}),large:Object.assign(Object.assign({},Pg),{fontPercent:2})},Ag=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Eg(e,t)}(o,e);var t,n,r,i=Cg(o);function o(){return Tg(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setSizeSetting",value:function(e){this.size_=e,this.player_.getChild("textTrackDisplay").updateDisplay(),this.player_.getChild("collapserator").getChild("subtitleSizeButton").update(),this.player_.trigger("resizemenus"),this.player_.trigger("changesubtitlesize",this.size_)}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return Rg[this.size_]?Rg[this.size_]:Pg}}])&&Sg(t.prototype,n),r&&Sg(t,r),o}(Og);Fu.registerComponent("TextTrackSettings",Ag);n(407);function Ig(e){return(Ig="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dg(e,t,n){return(Dg="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bg(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Ng(e,t){return(Ng=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bg(e);if(t){var i=Bg(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ug(this,n)}}function Ug(e,t){return!t||"object"!==Ig(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bg(e){return(Bg=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fg=window.navigator&&window.navigator.userAgent||"",Vg=(/iPod/i.test(Fg),/Android/i.test(Fg),Fu.getComponent("Player")),Hg=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ng(e,t)}(o,e);var t,n,r,i=Mg(o);function o(){return Lg(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"lock",value:function(e){this.callback_=e}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(e,t){var n=this;if("number"!=typeof e||!this.callback_||t)return Dg(Bg(o.prototype),"currentTime",this).call(this,e);this.callback_((function(){n.unlock(),n.currentTime(e)}))}},{key:"play",value:function(){var e=this;if(!this.callback_)return Dg(Bg(o.prototype),"play",this).call(this);this.callback_((function(){e.unlock(),e.play()}))}},{key:"updateStyleEl_",value:function(){if(Vg.prototype.updateStyleEl_.call(this),this.options_.fluid){var e=this.el_.parentNode;if(e){var t=this.aspectRatio();void 0!==t&&"auto"!==t||(t=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9");var n=t.split(":"),r=+n[1]/+n[0];e.style.maxWidth=65/r+"vh",e.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var e=this;Vg.prototype.listenForUserActivity_.call(this);var t=this.getChild("collapserator");t.on("mouseenter",(function(){e.player().cache_.inactivityTimeout=e.player().options_.inactivityTimeout,e.player().options_.inactivityTimeout=0})),t.on("mouseleave",(function(){e.player().options_.inactivityTimeout=e.player().cache_.inactivityTimeout}))}}])&&jg(t.prototype,n),r&&jg(t,r),o}(Vg);Fu.registerComponent("player",Hg);var zg;n(408),n(409),n(410),n(411),n(412);function qg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wg(e){e.paused()?e.play():e.pause()}function $g(e,t){e.currentTime(e.currentTime()+t)}function Gg(e,t){e.volume(e.volume()+t)}var Yg=(qg(zg={},"f",(function(e){document[e.fsApi_.fullscreenEnabled]&&(e.isFullscreen()?e.exitFullscreen():e.requestFullscreen())})),qg(zg,"m",(function(e){var t=e.volume(),n=e.lastVolume_();if(0===t){var r=n<.1?.1:n;e.volume(r),e.muted(!1)}else e.muted(!e.muted())})),qg(zg,"k",Wg),qg(zg,"space",Wg),qg(zg,"left",(function(e){return $g(e,-5)})),qg(zg,"right",(function(e){return $g(e,5)})),qg(zg,"j",(function(e){return $g(e,-10)})),qg(zg,"l",(function(e){return $g(e,10)})),qg(zg,"up",(function(e){return Gg(e,.05)})),qg(zg,"down",(function(e){return Gg(e,-.05)})),zg);function Kg(e){var t=v()(e);Yg[t]&&Yg[t](this,e)}function Xg(e){return(Xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qg(e,t){return!t||"object"!==Xg(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Jg(e){var t="function"==typeof Map?new Map:void 0;return(Jg=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Zg(e,arguments,nv(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),tv(r,e)})(e)}function Zg(e,t,n){return(Zg=ev()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&tv(i,n.prototype),i}).apply(null,arguments)}function ev(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function tv(e,t){return(tv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nv(e){return(nv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var rv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tv(e,t)}(i,e);var t,n,r=(t=i,n=ev(),function(){var e,r=nv(t);if(n){var i=nv(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return Qg(this,e)});function i(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(n=r.call(this,e)).url=t,n}return i}(Jg(Error));function iv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ov,av=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},sv=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tokens={gateway:null}}var t,n,r;return t=e,(n=[{key:"get",value:function(e,t){return av(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=this,n.next=3,fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)});case 3:return n.t1=n.sent,n.next=6,n.t0.parseResponse.call(n.t0,n.t1);case 6:return n.abrupt("return",n.sent);case 7:case"end":return n.stop()}}),n,this)})))}},{key:"delete",value:function(e,t){return av(this,void 0,void 0,regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,fetch(e,{method:"DELETE",headers:this.getHeaders(t)});case 2:case"end":return n.stop()}}),n,this)})))}},{key:"post",value:function(e,t,n){return av(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"POST",headers:this.getHeaders(n),body:t,mode:"cors"});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:"put",value:function(e,t,n){return av(this,void 0,void 0,regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(e,{method:"PUT",headers:this.getHeaders(n),body:t,mode:"cors"});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:"setToken",value:function(e,t){this.tokens[e]=t}},{key:"getHeaders",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization="Bearer ".concat(this.tokens[e.tokenName])),t}},{key:"parseResponse",value:function(e){return av(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(404!==e.status){t.next=2;break}return t.abrupt("return",null);case 2:if(e.ok){t.next=4;break}throw new rv("Ajax error",e.url);case 4:return t.next=6,e.json();case 6:return n=t.sent,t.abrupt("return",n);case 8:case"end":return t.stop()}}),t)})))}}])&&iv(t.prototype,n),r&&iv(t,r),e}());function uv(e){return(uv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lv(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&cv(e,t)}function cv(e,t){return(cv=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function fv(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dv(e);if(t){var i=dv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return hv(this,n)}}function hv(e,t){return!t||"object"!==uv(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function dv(e){return(dv=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mv(e,t,n){return t&&yv(e.prototype,t),n&&yv(e,n),e}!function(e){e.LocalStorage="localStorage",e.SessionStorage="sessionStorage"}(ov||(ov={}));var gv=function(){function e(t){pv(this,e),this.cachePrefix="_cv:",this.expireTime=3600,this.hasSupport=this.hasBrowserSupport(),this.type=t.type,this.hasSupport&&(this.storage=window[this.type])}return mv(e,[{key:"get",value:function(e){if(this.hasSupport){var t=this.storage.getItem(e);try{return JSON.parse(t)}catch(e){return t}}}},{key:"set",value:function(e,t){if(this.hasSupport)try{return this.storage.removeItem(e),"string"!=typeof t?(this.storage.setItem(e,JSON.stringify(t)),!0):(this.storage.setItem(e,t),!0)}catch(e){return!1}}},{key:"remove",value:function(e){if(this.hasSupport)return this.storage.removeItem(e)}},{key:"length",value:function(){if(this.hasSupport)return this.storage.length}},{key:"clear",value:function(){if(this.hasSupport)return this.storage.clear()}},{key:"cacheSet",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.expireTime;this.cacheClean();var r={time:this.getCurrentTime()+1e3*n,data:null!=t&&t};return this.set("".concat(this.cachePrefix).concat(e),r)}},{key:"cacheGet",value:function(e){var t="".concat(this.cachePrefix).concat(e),n=this.get(t);return n?this.isExpired(n)?(this.remove(t),null):n.data:null}},{key:"cacheExists",value:function(e){var t="".concat(this.cachePrefix).concat(e),n=this.get(t);return!!n&&(!this.isExpired(n)||(this.remove(t),!1))}},{key:"cacheRemove",value:function(e){return this.remove("".concat(this.cachePrefix).concat(e))}},{key:"cacheFlush",value:function(){this.cacheClean()}},{key:"cacheClean",value:function(){if(this.hasSupport)for(var e=0;e<this.storage.length;e++){var t=this.storage.key(e);if(0===t.indexOf(this.cachePrefix)){var n=this.get(t);n&&n.time&&this.isExpired(n)&&this.remove(t)}}}},{key:"isExpired",value:function(e){return e.time<this.getCurrentTime()}},{key:"getCurrentTime",value:function(){return(new Date).getTime()}},{key:"hasBrowserSupport",value:function(){try{return this.type in window&&null!==window[this.type]}catch(e){return!1}}}]),e}(),vv=function(e){lv(n,e);var t=fv(n);function n(){return pv(this,n),t.apply(this,arguments)}return mv(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:ov.LocalStorage}))}}]),n}(gv),bv=function(e){lv(n,e);var t=fv(n);function n(){return pv(this,n),t.apply(this,arguments)}return mv(n,null,[{key:"Instance",get:function(){return this.instance||(this.instance=new this({type:ov.SessionStorage}))}}]),n}(gv),_v=vv.Instance,wv=(bv.Instance,"URLSearchParams"in self),Tv="Symbol"in self&&"iterator"in Symbol,Sv="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(e){return!1}}(),Ev="FormData"in self,Cv="ArrayBuffer"in self;if(Cv)var kv=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],xv=ArrayBuffer.isView||function(e){return e&&kv.indexOf(Object.prototype.toString.call(e))>-1};function Ov(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function Pv(e){return"string"!=typeof e&&(e=String(e)),e}function Rv(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return Tv&&(t[Symbol.iterator]=function(){return t}),t}function Av(e){this.map={},e instanceof Av?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function Iv(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function Lv(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function jv(e){var t=new FileReader,n=Lv(t);return t.readAsArrayBuffer(e),n}function Dv(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function Nv(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:Sv&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:Ev&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:wv&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():Cv&&Sv&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=Dv(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Cv&&(ArrayBuffer.prototype.isPrototypeOf(e)||xv(e))?this._bodyArrayBuffer=Dv(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):wv&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Sv&&(this.blob=function(){var e=Iv(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?Iv(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(jv)}),this.text=function(){var e,t,n,r=Iv(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=Lv(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},Ev&&(this.formData=function(){return this.text().then(Bv)}),this.json=function(){return this.text().then(JSON.parse)},this}Av.prototype.append=function(e,t){e=Ov(e),t=Pv(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},Av.prototype.delete=function(e){delete this.map[Ov(e)]},Av.prototype.get=function(e){return e=Ov(e),this.has(e)?this.map[e]:null},Av.prototype.has=function(e){return this.map.hasOwnProperty(Ov(e))},Av.prototype.set=function(e,t){this.map[Ov(e)]=Pv(t)},Av.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},Av.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),Rv(e)},Av.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),Rv(e)},Av.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),Rv(e)},Tv&&(Av.prototype[Symbol.iterator]=Av.prototype.entries);var Mv=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Uv(e,t){var n,r,i=(t=t||{}).body;if(e instanceof Uv){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new Av(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new Av(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),Mv.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function Bv(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}})),t}function Fv(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"",this.headers=new Av(t.headers),this.url=t.url||"",this._initBody(e)}Uv.prototype.clone=function(){return new Uv(this,{body:this._bodyInit})},Nv.call(Uv.prototype),Nv.call(Fv.prototype),Fv.prototype.clone=function(){return new Fv(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new Av(this.headers),url:this.url})},Fv.error=function(){var e=new Fv(null,{status:0,statusText:""});return e.type="error",e};var Vv=[301,302,303,307,308];Fv.redirect=function(e,t){if(-1===Vv.indexOf(t))throw new RangeError("Invalid status code");return new Fv(null,{status:t,headers:{location:e}})};var Hv=self.DOMException;try{new Hv}catch(e){(Hv=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack}).prototype=Object.create(Error.prototype),Hv.prototype.constructor=Hv}function zv(e,t){return new Promise((function(n,r){var i=new Uv(e,t);if(i.signal&&i.signal.aborted)return r(new Hv("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}o.onload=function(){var e,t,r={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new Av,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();t.append(r,i)}})),t)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){n(new Fv(i,r))}),0)},o.onerror=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){r(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){r(new Hv("Aborted","AbortError"))}),0)},o.open(i.method,function(e){try{return""===e&&self.location.href?self.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(Sv?o.responseType="blob":Cv&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})),i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}zv.polyfill=!0,self.fetch||(self.fetch=zv,self.Headers=Av,self.Request=Uv,self.Response=Fv);var qv=n(237),Wv=n.n(qv),$v=n(238);function Gv(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Yv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Yv(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Kv={mobileDevice:/Mobi/i,iphone:/iphone/i,ipad:/ipad/i,android:/android/i,blackberry:/blackberry/i,windowsPhone:/windows phone/i,iosVersion:/OS\s+([\d_.-:]+)\s/i,androidVersion:/android\s+([\d_.-\/]+)[\s;:,\)]/i,blackberryVersion:/(blackberry|version)\s?\d*\/([\d.]+)/i,windowsPhoneVersion:/windows\sphone.*?([\d_.-\/]+)[\s;:,\)]/i,mac:/Mac/i,unix:/X11/i,linux:/Linux/i,windows:/Win/i,win2000:/nt 5.0/i,winXP:/nt 5.1/i,winVista:/nt 6.0/i,win7:/nt 6.1/i,win8:/nt 6.2/i,win81:/nt 6.3/i,win10:/nt 10.0/i,osxVersion:/OS\sX\s([\d_.]+)/i,chrome:/^(?!.*Edge).*Chrome/i,safari:/^(?!.*(?:Chrome|Edge)).*Safari/i,edge:/edge/i,ie:/(msie|trident)/i,opera:/(opr|opera)/i,firefox:/firefox/i,generalVersion:/(chrome|firefox|version)\/(\d+.*?)(\s|$)/i,operaVersion:/(opr|opera)\/(\d+).*?(\s|$)/i,ieVersion:/MSIE\s+(\d+).*?/i,edgeVersion:/(edge)\/(\d+).*?(\s|$)/i};function Xv(e,t,n){var r=Gv(t.exec(n)||[],1)[0];return r||(r="Unknown"),{name:e,version:r}}function Qv(e,t,n){if(!t)return{name:e,version:"Unknown"};var r=t.exec(n);return{name:e,version:r&&r.length?r[0].trim():"Unknown"}}var Jv=function(){var e=window.navigator.userAgent;return Kv.android.test(e)?Qv("Android",Kv.androidVersion,e):Kv.iphone.test(e)||Kv.ipad.test(e)?Qv("iOS",Kv.iosVersion,e):Kv.linux.test(e)?Qv("Linux",null,e):Kv.unix.test(e)?Qv("Unix",null,e):Kv.mac.test(e)?Qv("Macintosh",Kv.osxVersion,e):Kv.windows.test(e)?function(e,t){var n={name:e,version:null};return Kv.win2000.test(t)&&(n.version="2000"),Kv.winXP.test(t)&&(n.version="XP"),Kv.winVista.test(t)&&(n.version="Vista"),Kv.win7.test(t)&&(n.version="7"),Kv.win8.test(t)&&(n.version="8"),Kv.win81.test(t)&&(n.version="8.1"),Kv.win10.test(t)&&(n.version="10"),n.version||(n.version="Unknown"),n}("Windows",e):Kv.blackberry.test(e)?Qv("BlackBerry",Kv.blackberryVersion,e):Kv.windowsPhone.test(e)?Qv("Windows Phone",Kv.windowsPhoneVersion,e):{name:"Unknown",version:"Unknown"}},Zv=function(){var e=window.navigator.userAgent;return Kv.chrome.test(e)?Xv("Chrome",Kv.generalVersion,e):Kv.firefox.test(e)?Xv("Firefox",Kv.generalVersion,e):Kv.safari.test(e)?Xv("Safari",Kv.generalVersion,e):Kv.ie.test(e)?Xv("Internet Explorer",Kv.ieVersion,e):Kv.edge.test(e)?Xv("Edge",Kv.edgeVersion,e):Kv.opera.test(e)?Xv("Opera",Kv.operaVersion,e):{name:"Unknown",version:"Unknown"}};function eb(e){return(eb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var tb,nb=function(e){var t=eb(e);return"function"===t||"object"===t&&!!e},rb=function(e){return"function"==typeof e},ib=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}},ob=n(103);!function(e){e.CvApSoutheast1="cv-ap-southeast-1",e.CvApSoutheast2="cv-ap-southeast-2",e.CvEuWest1="cv-eu-west-1",e.CvNaWest1="cv-na-west-1"}(tb||(tb={}));var ab={CvApSoutheast1:{systemName:tb.CvApSoutheast1},CvApSoutheast2:{systemName:tb.CvApSoutheast2},CvEuWest1:{systemName:tb.CvEuWest1},CvNaWest1:{systemName:tb.CvNaWest1}};function sb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ub=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},lb=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){this.validateOptions()}},{key:"name",get:function(){return"CollectionApiClient"}},{key:"log",value:function(e){return ub(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!Array.isArray(e)){t.next=2;break}return t.abrupt("return",this.logBulk(e));case 2:if(this.shouldLog(e)){t.next=4;break}return t.abrupt("return");case 4:return this.validateEvent(e),t.t0=this,t.next=8,this.formatData(e);case 8:return t.t1=t.sent,t.next=11,t.t0.postData.call(t.t0,t.t1);case 11:case"end":return t.stop()}}),t,this)})))}},{key:"logBulk",value:function(e){return ub(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i=this;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=e.filter((function(e){return i.shouldLog(e)}))).length){t.next=3;break}return t.abrupt("return");case 3:return n.forEach((function(e){return i.validateEvent(e)})),t.next=6,Promise.all(n.map((function(e){return i.formatData(e)})));case 6:return r=t.sent,t.next=9,this.postData(r);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"validateOptions",value:function(){if(!rb(this.options.getUser))throw new Error("getUser option is required.")}},{key:"shouldLog",value:function(e){return!rb(this.options.shouldLog)||this.options.shouldLog(e)}},{key:"postData",value:function(e){return ub(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegionalUrl(this.options.collectionApiUrls);case 2:return n=t.sent,r=JSON.stringify(e),i=Object.assign({"Content-Type":"application/json"},this.getSignatureHeader(r)),o=ib(n,"/v1/ingest"),Array.isArray(e)&&(o=ib(o,"/bulk")),t.next=9,fetch(o,{method:"POST",mode:"cors",headers:i,body:r});case 9:case"end":return t.stop()}}),t,this)})))}},{key:"getSignatureHeader",value:function(e){var t=new Wv.a("SHA-1","TEXT",{hmacKey:{value:"zXJL9nOHxzDlMUDjiP41",format:"TEXT",encoding:"UTF8"}});return t.update(e),{"cv-analytics-signature":"".concat(this.options.collectionApiClientId,".").concat(t.getHash("B64"))}}},{key:"getRegionalUrl",value:function(e){return ub(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getRegion();case 2:n=t.sent,t.t0=n.systemName,t.next=t.t0===tb.CvEuWest1?6:t.t0===tb.CvApSoutheast2?7:t.t0===tb.CvNaWest1?8:(t.t0,tb.CvApSoutheast1,9);break;case 6:return t.abrupt("return",e.cvEuWest1);case 7:return t.abrupt("return",e.cvApSoutheast2);case 8:return t.abrupt("return",e.cvNaWest1);case 9:return t.abrupt("return",e.cvApSoutheast1);case 10:case"end":return t.stop()}}),t,this)})))}},{key:"validateEvent",value:function(e){if("string"!=typeof e.type)throw new Error("Event type is required.");if(!nb(e.actionContext))throw new Error("Event actionContext is required.");if(!e.actionContext.entity)throw new Error("Event actionContext entity is required.")}},{key:"formatData",value:function(e){return ub(this,void 0,void 0,regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=e.type,t.next=3,this.getEventData(e);case 3:return t.t1=t.sent,t.t2=this.getEventMetadata(e),t.abrupt("return",{type:t.t0,data:t.t1,metadata:t.t2});case 6:case"end":return t.stop()}}),t,this)})))}},{key:"getEventData",value:function(e){return ub(this,void 0,void 0,regeneratorRuntime.mark((function t(){var n,r,i,o,a,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.actionContext,t.next=3,this.getUserData();case 3:return r=t.sent,i={user:r,action:n,platform:this.getPlatformMetadata(),product:{name:this.options.productName,version:this.options.productVersion}},o=this.extractData(e),a=Object.keys(i).map((function(e){return e.toLowerCase()})),s=Object.keys(o).map((function(e){return e.toLowerCase()})),a.forEach((function(e){if(s.includes(e))throw Error("".concat(e," is a reserved key."))})),t.abrupt("return",Object.assign(Object.assign({},i),o));case 10:case"end":return t.stop()}}),t,this)})))}},{key:"extractData",value:function(e){return rb(this.options.formatData)?this.options.formatData(e):(t={},n=e.actionContext.entity,r=e.data,n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);var t,n,r}},{key:"getUserData",value:function(){var e,t;return ub(this,void 0,void 0,regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.options.getUser();case 2:if(null==(r=n.sent)?void 0:r.id){n.next=5;break}return n.abrupt("return");case 5:return n.t0=r.id,n.t1=(null===(e=r.role)||void 0===e?void 0:e.toLowerCase())||"unknown",n.t2=(null===(t=r.userGroup)||void 0===t?void 0:t.toLowerCase())||ob.a.Unknown,n.t3=this.normalizeYearGroup(r.yearGroup),n.t4=r.customerId,n.t5=r.customerName,n.t6=r.customerGuid,n.t7=r.crmId,n.t8=r.countryCode,n.next=16,this.getRegion();case 16:return n.t9=n.sent,n.t10=r.isOpenCustomer,n.t11={id:n.t4,name:n.t5,customerGuid:n.t6,crmId:n.t7,country:n.t8,region:n.t9,openCustomer:n.t10},n.abrupt("return",{id:n.t0,role:n.t1,userGroup:n.t2,yearGroup:n.t3,customer:n.t11});case 20:case"end":return n.stop()}}),n,this)})))}},{key:"getRegion",value:function(){return ub(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.options.getUser();case 2:if(t=e.sent,n=(null==t?void 0:t.instanceRegion)||this.options.regionName){e.next=6;break}throw Error("RegionName is not set.");case 6:return e.abrupt("return",this.getRegionByName(n.toLowerCase()));case 7:case"end":return e.stop()}}),e,this)})))}},{key:"getPlatformMetadata",value:function(){return{browser:Zv(),os:Jv(),request:{url:window.location.href,referrer:document.referrer},screenResolution:"".concat(window.screen.width,"x").concat(window.screen.height)}}},{key:"getEventMetadata",value:function(e){return{client:{name:"".concat(this.name,".ts"),version:$v.a,region:this.getRegionByName(this.options.regionName)},timestamp:(new Date).toISOString(),eventVersion:e.eventVersion}}},{key:"getRegionByName",value:function(e){var t;return Object.values(ab).forEach((function(n){n.systemName===e&&(t=n)})),t}},{key:"normalizeYearGroup",value:function(e){return e?e.toLowerCase().split(" ").join("_"):"unknown"}}])&&sb(t.prototype,n),r&&sb(t,r),e}(),cb=n(2),fb=function(){return!0},hb=function(){return!1};var db=function(e){return e};function pb(e){if(e&&e.code)return e.code}function yb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.id){var n={id:e.id};return e.name&&!t.ignoreTitle&&(n.title=e.name),n}}function mb(e){if(e&&e.length){var t=e[0];return{id:t.id,title:t.name}}}var gb,vb,bb,_b,wb=function(e){var t=e.model,n={id:t.id.toString(),year:t.productionYear,title:t.name,trackingCode:t.trackingCode},r=pb(t.rating),i=yb(t.series),o=mb(t.categories),a=yb(t.owner,{ignoreTitle:!0}),s=yb(t.playlist);return r&&(n.rating=r),a&&(n.ownerId=a.id),i&&(n.seriesId=i.id,n.series=i.title),o&&(n.category=o.title),s&&(n.playlist=s),n},Tb={getUploadData:function(e,t){var n=t.actionContext.entity;if(n===cb.EntityType.Video)return Tb.formatVideoUpload(e,t);if(n===cb.EntityType.Resource||n===cb.EntityType.Subtitle)return Tb.formatResourceUpload(e);if(n===cb.EntityType.Banner||n===cb.EntityType.Thumbnail)return e;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload:function(e,t){var n=t.actionContext.workflowPhase;return n===cb.WorkflowPhase.Start?Tb.getStartVideoUploadData(e):n===cb.WorkflowPhase.Discard?Tb.getDiscardVideoUploadData(e):n===cb.WorkflowPhase.Complete?Tb.getCompleteUploadData(e):void 0},getStartVideoUploadData:function(e){return e&&e.length?(e instanceof FileList&&(e=Array.from(e)),e.map((function(t){return{fileName:t.name,size:t.size,type:t.type,count:e.length}}))):[]},getDiscardVideoUploadData:function(e){var t=function(t){var n=t.file,r=n.type,i=n.name,o=n.status,a=n.cvUpload,s={fileName:i,count:Array.isArray(e)?e.length:1,type:r,status:o};return t.progress&&(s.progress=t.progress.toFixed(2)),a&&(s.uploadId=a.uploadId),s};return Array.isArray(e)?e.map((function(e){return t(e)})):[t(e)]},getCompleteUploadData:function(e){return e&&e.length?e.map((function(t){return{fileName:t.fileName,libraryId:t.libraryId,folderId:t.folderId,autoCaption:t.autoCaption,count:e.length}})):[]},formatResourceUpload:function(e){var t={id:e.id,name:e.name};return nb(e.metadata)&&(t.type=e.metadata.type),t}};function Sb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Eb=(Sb(gb={},cb.UserAction.Navigate,hb),Sb(gb,cb.UserAction.Click,fb),Sb(gb,cb.UserAction.Search,fb),Sb(gb,cb.UserAction.InstantSearch,fb),Sb(gb,cb.UserAction.Play,fb),Sb(gb,cb.UserAction.Stream,fb),Sb(gb,cb.UserAction.WebPlayerStream,fb),Sb(gb,cb.UserAction.StreamRaw,fb),Sb(gb,cb.UserAction.StreamProgress,fb),Sb(gb,cb.UserAction.Rename,fb),Sb(gb,cb.UserAction.Move,fb),Sb(gb,cb.UserAction.Create,fb),Sb(gb,cb.UserAction.Delete,fb),Sb(gb,cb.UserAction.Associate,fb),Sb(gb,cb.UserAction.Dissociate,fb),Sb(gb,cb.UserAction.Filter,fb),Sb(gb,cb.UserAction.Sort,fb),Sb(gb,cb.UserAction.Approve,fb),Sb(gb,cb.UserAction.Reject,fb),Sb(gb,cb.UserAction.Disable,fb),Sb(gb,cb.UserAction.Upload,fb),Sb(gb,cb.UserAction.Download,hb),Sb(gb,cb.UserAction.SetAccess,fb),Sb(gb,cb.UserAction.AddToLocalCache,hb),Sb(gb,cb.UserAction.Share,fb),Sb(gb,cb.UserAction.Edit,fb),Sb(gb,cb.UserAction.Suggest,fb),Sb(gb,cb.UserAction.Favourite,fb),Sb(gb,cb.UserAction.ResolveWarning,fb),Sb(gb,cb.UserAction.DismissWarning,fb),Sb(gb,cb.UserAction.EditAssoc,fb),Sb(gb,cb.UserAction.Follow,fb),Sb(gb,cb.UserAction.Print,fb),Sb(gb,cb.UserAction.Copy,fb),Sb(gb,cb.UserAction.Activate,fb),Sb(gb,cb.UserAction.VerifyEmail,fb),Sb(gb,cb.UserAction.ChangePassword,fb),Sb(gb,cb.UserAction.Export,fb),Sb(gb,cb.UserAction.SendEmail,fb),gb),Cb=(Sb(vb={},cb.UserAction.Search,db),Sb(vb,cb.UserAction.InstantSearch,db),Sb(vb,cb.UserAction.Play,db),Sb(vb,cb.UserAction.Stream,wb),Sb(vb,cb.UserAction.StreamRaw,db),Sb(vb,cb.UserAction.StreamProgress,db),Sb(vb,cb.UserAction.Click,db),Sb(vb,cb.UserAction.Filter,db),Sb(vb,cb.UserAction.Sort,db),Sb(vb,cb.UserAction.SetAccess,db),Sb(vb,cb.UserAction.Approve,db),Sb(vb,cb.UserAction.Reject,db),Sb(vb,cb.UserAction.Create,db),Sb(vb,cb.UserAction.Delete,db),Sb(vb,cb.UserAction.Rename,db),Sb(vb,cb.UserAction.Move,db),Sb(vb,cb.UserAction.Edit,db),Sb(vb,cb.UserAction.Share,db),Sb(vb,cb.UserAction.Disable,db),Sb(vb,cb.UserAction.Suggest,db),Sb(vb,cb.UserAction.Upload,Tb.getUploadData),Sb(vb,cb.UserAction.ResolveWarning,db),Sb(vb,cb.UserAction.DismissWarning,db),Sb(vb,cb.UserAction.Follow,db),Sb(vb,cb.UserAction.Print,db),Sb(vb,cb.UserAction.Copy,db),vb),kb=(Sb(bb={},cb.UserAction.Search,(function(){return"search"})),Sb(bb,cb.UserAction.InstantSearch,(function(){return"search"})),Sb(bb,cb.UserAction.Filter,(function(){return"filter"})),Sb(bb,cb.UserAction.StreamRaw,(function(){return cb.EntityType.Video})),bb),xb={user:"target_user"},Ob=(Sb(_b={},cb.UserAction.StreamProgress,!0),Sb(_b,cb.UserAction.WebPlayerStream,!0),_b),Pb={shouldLog:function(e){return!!Eb[e.type](e)},formatData:function(e){var t=Cb[e.type],n=rb(t)?t(e.data,e):e.data;if(Ob[e.type])return n;var r=e.actionContext.entity;return rb(kb[e.type])&&(r=kb[e.type](e)),xb[r]&&(r=xb[r]),Sb({},r,n)}};function Rb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ab=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t,this.initialize()}var t,n,r;return t=e,(n=[{key:"logStream",value:function(){var e="v:".concat(this.options.videoId);_v.cacheExists(e)||(this.collectionApiClient.log({type:cb.UserAction.WebPlayerStream,actionContext:this.getActionContext(),data:{video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},eventVersion:cb.EventVersion.V2}),_v&&_v.cacheSet(e,null,300))}},{key:"logVideoProgress",value:function(e){var t=this;this.collectionApiClient.log(e.map((function(e){return{type:cb.UserAction.StreamProgress,actionContext:t.getActionContext(),data:{progress:e,video:{id:t.options.videoId}},eventVersion:cb.EventVersion.V1}})))}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var e=this;this.collectionApiClient=new lb({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return e.getCurrentUser()},shouldLog:Pb.shouldLog,formatData:Pb.formatData})}},{key:"getCurrentUser",value:function(){var e=this;return new Promise((function(t){t({id:e.options.userId,customerId:e.options.customerId})}))}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?cb.PlayerDescriptor.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return cb.EntityType.Video;case"MasterInteractive":return cb.EntityType.Interactive;case"MasterClip":return cb.EntityType.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return cb.LocationContext.Player;case"interactive-player":return cb.LocationContext.InteractivePlayer;case"create-clip-player":return cb.LocationContext.CreateClipPlayer}}}])&&Rb(t.prototype,n),r&&Rb(t,r),e}(),Ib="\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 Lb(e){return(Lb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Db(e,t,n){return(Db="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bb(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Nb(e,t){return(Nb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Mb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bb(e);if(t){var i=Bb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ub(this,n)}}function Ub(e,t){return!t||"object"!==Lb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Bb(e){return(Bb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Fb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nb(e,t)}(o,e);var t,n,r,i=Mb(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n}return t=o,(n=[{key:"createEl",value:function(e,t,n){var r="<h1>".concat(this.options_.title,"</h1>");if(!this.options_.seriesName)return Db(Bb(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n);var i=this.buildSeasonEpisodeString();return i?(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase()," ").concat(i,"</div>")+r,Db(Bb(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n)):(r="<div class='cv-series-text'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+r,Db(Bb(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{innerHTML:r}),n))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var e=this.padNumber(this.options_.seasonNumber,2),t=this.padNumber(this.options_.episodeNumber,2);return"S".concat(e," • E").concat(t)}},{key:"padNumber",value:function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n}}])&&jb(t.prototype,n),r&&jb(t,r),o}(Fu.getComponent("Component"));function Vb(e){return(Vb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zb(e,t,n){return(zb="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Gb(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function qb(e,t){return(qb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gb(e);if(t){var i=Gb(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $b(this,n)}}function $b(e,t){return!t||"object"!==Vb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Gb(e){return(Gb=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Yb=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&qb(e,t)}(o,e);var t,n,r,i=Wb(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options_=t,n}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-splash-warning-container ".concat(zb(Gb(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){var r=zb(Gb(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n);if(!this.options_.ratingCode)return r;var i=this.mapCodeToColourClass(this.options_.ratingCode);return r.appendChild(Fu.dom.createEl("div",{className:"cv-splash-rating badge rating-badge ".concat(i),innerHTML:this.options_.ratingCode})),this.options_.warning&&r.appendChild(Fu.dom.createEl("div",{className:"cv-splash-warning",innerHTML:this.options_.warning})),r}},{key:"mapCodeToColourClass",value:function(e){switch(e){case"E":return"bg-purple";case"G":return"bg-green";case"PG":return"bg-info";case"M":return"bg-red";case"MA15+":return"bg-pink";case"R18+":return"bg-yellow"}}}])&&Hb(t.prototype,n),r&&Hb(t,r),o}(Fu.getComponent("Component"));function Kb(e){return(Kb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Xb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qb(e,t){return(Qb=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Jb(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=e_(e);if(t){var i=e_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Zb(this,n)}}function Zb(e,t){return!t||"object"!==Kb(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function e_(e){return(e_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var t_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qb(e,t)}(o,e);var t,n,r,i=Jb(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"createEl",value:function(){var e=Fu.dom.createEl("div",{className:"cv-splash-metadata ".concat(this.options_.embed?"cv-embed-splash-metadata":"")});return this.options_.embed&&e.appendChild(new Fb(this.player_,{title:this.options_.title,seriesName:this.options_.seriesName,seasonNumber:this.options_.seasonNumber,episodeNumber:this.options_.episodeNumber}).el()),e.appendChild(new Yb(this.player_,{warning:this.options_.warning,ratingCode:this.options_.ratingCode}).el()),e}}])&&Xb(t.prototype,n),r&&Xb(t,r),o}(Fu.getComponent("Component"));n(413);function n_(e){return(n_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i_(e,t,n){return(i_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u_(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function o_(e,t){return(o_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u_(e);if(t){var i=u_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s_(this,n)}}function s_(e,t){return!t||"object"!==n_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u_(e){return(u_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o_(e,t)}(o,e);var t,n,r,i=a_(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addChild(new t_(n.player_,n.options_)),n}return t=o,(n=[{key:"createEl",value:function(e,t,n){var r="<div class='cv-player-mask'></div>";return this.options_.embed&&(r+="<div class='cv-embed-logo'>".concat(Ib,"</div>")),i_(u_(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:r}),n)}}])&&r_(t.prototype,n),r&&r_(t,r),o}(Fu.getComponent("Component"));function c_(e){return function(e){if(Array.isArray(e))return f_(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return f_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f_(e,t)}(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.")}()}function f_(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var d_,p_=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},y_=Fu.getComponent("Player"),m_=450,g_=function(){function e(t,n){var r=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.streamLogged=!1,this.options=Fu.mergeOptions({},e.options_,n),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(t),this.buildVideoJs(),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready((function(){r._configurePlugins(),r.options.setup&&r.options.setup(r.options,r.player),r.options.startTime&&r.player.currentTime(r.options.startTime),r.fetch().catch((function(e){r.player.error(e.message),r.options.onError&&r.options.onError(e)}))}))}var t,n,r;return t=e,(n=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(e){var t;null===(t=this.analyticsService)||void 0===t||t.logVideoProgress(e)}},{key:"buildVideoJs",value:function(){return this.player=Fu(this.el,this.getPlayerOptions())}},{key:"getPlayerOptions",value:function(){return{controls:this.options.controls,autoplay:this.options.autoplay,fluid:!this.options.embed,fill:!!this.options.embed,inactivityTimeout:500,controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(c_(y_.prototype.options_.children),["collapserator"]),userActions:{hotkeys:Kg},playbackRates:this.options.playbackRates,techOrder:["chromecast","html5"]}}},{key:"fetch",value:function(){return p_(this,void 0,void 0,regeneratorRuntime.mark((function e(){var t,n,r,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.options.fetch,void 0===this.options.fetch&&(t=function(e){var t="".concat(i.options.playerApi.origin,"/api/playback?viewKey=").concat(e);return sv.get(t)}),this.options.viewKey){e.next=4;break}throw new Error("Please specify a viewKey or a fetch function");case 4:return e.next=6,t(this.options.viewKey);case 6:if(n=e.sent){e.next=9;break}throw new Error("Error fetching playback object");case 9:n.chapters.list.length>0&&(r=this.player.addTextTrack("chapters"),n.chapters.list.forEach((function(e){r.addCue({startTime:e.timestamp,endTime:e.endTimestamp,text:e.name})})),r.trigger({type:"loadeddata",target:r})),this.player.progressiveFiles({sources:n.files.progressive.map((function(e){return{id:e.profile,mimeType:e.mimeType,url:e.url}}))}),n.subtitles.list.length>0&&(n.subtitles.list.forEach((function(e){"text/vtt"===e.mimeType&&i.player.addRemoteTextTrack({kind:"subtitles",src:e.url,language:e.language,label:e.label},!0)})),this.player.persistSubtitleSettingsPlugin({showSubtitles:n.settings.showSubtitles,subtitleSize:n.settings.playbackSubtitleSizeDefault})),n.posterUrl&&this.player.poster(n.posterUrl),this.setupSplash(n),this.options.showResources&&n.resources&&this.player.resourcesPlugin({resources:n.resources.list,imageCdnUrl:this.options.imageCdnUrl}),this.additionalSetup(n);case 16:case"end":return e.stop()}}),e,this)})))}},{key:"fetchConfig",value:function(){var e=this;if(!d_&&!this.options.fetch){var t="".concat(this.options.playerApi.origin,"/api/config");sv.get(t).then((function(t){d_=t,e.trigger("config:loaded")}))}}},{key:"additionalSetup",value:function(e){var t,n,r=this;this.player.localCache({localCacheAddresses:e.localCacheAddresses,enabled:null===(t=this.options.enableLocalCache)||void 0===t||t}),this.player.persistQualitySettingsPlugin({playbackProfile:e.settings.playbackProfile,playbackProfileLocalCache:e.settings.playbackProfileLocalCache}),this.player.whiteboardModePlugin(),this.player.chromecast({title:e.title});var i=this.options.enableLocalCache&&!!(null===(n=e.localCacheAddresses)||void 0===n?void 0:n.length);d_?this.setupAnalyticsService(e,i):this.one("config:loaded",(function(){return r.setupAnalyticsService(e,i)}))}},{key:"setupAnalyticsService",value:function(e,t){this.analyticsService=new Ab({collectionApiUrls:d_.collectionApi.urls,collectionApiClientId:d_.collectionApi.clientId,productVersion:Ku.a,regionName:"cv-ap-southeast-1",videoId:e.videoId,userId:e.viewerId,customerId:e.viewerCustomerId,mediaType:e.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:!!this.options.embed,isUsingLocalCache:t}),this.on("timeupdate",this.logStream)}},{key:"logStream",value:function(){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(e){var t;"string"==typeof e?(e=function(e){return 0===e.indexOf("#")?e.slice(1):e}(e),t=Fu.dom.$("#"+e)):t=e;var n="video-js";return this.getPlayerClassName()&&(n+=" ".concat(this.getPlayerClassName())),this.el=Fu.dom.createEl("video",{},{class:n}),t.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(e,t){this.player.on(e,t)}},{key:"one",value:function(e,t){this.player.one(e,t)}},{key:"off",value:function(e,t){this.player.off(e,t)}},{key:"trigger",value:function(e,t){return this.player.trigger(e,t)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(e){this.player.ready(e)}},{key:"play",value:function(){this.player.play()}},{key:"currentTime",value:function(e){return this.player.currentTime(e)}},{key:"bindEventListeners",value:function(){var e=this,t=function(){return e.configureMenuDimensions()};if(this.on("resize",t),this.on("fullscreenchange",t),this.one("play",t),this.on("resizemenus",t),this.player.on("dispose",(function(){e.off("resize",t),e.off("fullscreenchange",t),e.off("resizemenus",t)})),this.options.hotkeyElQuerySelector){var n=Fu.dom.$(this.options.hotkeyElQuerySelector);n&&(this.player.on(n,"keydown",this.player.handleKeyDown),this.player.on("dispose",(function(){e.player.off(n,"keydown",e.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var e=this.getSeekBarName(),t=this.player.controlBar.getChild("progressControl");t.addChild(e,this.getSeekBarOptions()),t.setSeekBarName(e)}},{key:"setupSplash",value:function(e){var t=this.player.getChild("posterImage"),n=new l_(this.player,{embed:this.options.embed,posterUrl:e.posterUrl,title:e.title,ratingCode:e.ratingCode,seriesName:e.seriesName,seasonNumber:e.seasonNumber,episodeNumber:e.episodeNumber});t.addChild(n)}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}},{key:"configureMenuDimensions",value:function(){var e=this;if(this.player.isFullscreen()){var t=this.player.whiteboardModePlugin().side;if("top"===t){var n=this.player.getChild("collapserator"),r=n.getChild("volumePanel"),i=n.children_.indexOf(r);n.removeChild(r),n.addChild("volumePanel",{inline:!1},i)}else{var o=this.player.getChild("collapserator"),a=o.getChild("volumePanel"),s=o.children_.indexOf(a);o.removeChild(a),o.addChild("volumePanel",{inline:!0},s)}if("left"===t||"right"===t||"top"===t){var u=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(e){e.style.paddingTop=null,e.style.marginBottom=null,e.style.width="calc(".concat(u,"px - 4em)")}))}}var l=this.player.currentWidth(),c=this.player.currentHeight()/l*100,f=this.player.el().querySelector(".cv-collapsorator"),h=this.player.el().querySelectorAll(".vjs-menu"),d=f&&f.offsetHeight;d?h&&h.length&&h.forEach((function(t){t.style.paddingTop="calc(".concat(c,"% - ").concat(d,"px)"),t.style.marginBottom="".concat(d,"px"),t.style.width=null,t.querySelector(".vjs-menu-content")&&(l<=m_?e.player.addClass("cv-player-small"):e.player.removeClass("cv-player-small"))})):this.one("play",(function(){return e.configureMenuDimensions()}))}}])&&h_(t.prototype,n),r&&h_(t,r),e}();g_.options_={viewKey:null,controls:!0,playbackRates:[.5,1,1.5,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0};n(414);function v_(e){return(v_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function __(e,t,n){return(__="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=E_(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function w_(e,t){return(w_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E_(e);if(t){var i=E_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return S_(this,n)}}function S_(e,t){return!t||"object"!==v_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E_(e){return(E_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&w_(e,t)}(o,e);var t,n,r,i=T_(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"vjs-example-button ".concat(__(E_(o.prototype),"buildCSSClass",this).call(this))}}])&&b_(t.prototype,n),r&&b_(t,r),o}(Fu.getComponent("Button"));C_.prototype.controlText_="Example Button",Fu.registerComponent("ExampleButton",C_);var k_=n(28),x_=n.n(k_);function O_(e){return(O_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function A_(e,t,n){return t&&R_(e.prototype,t),n&&R_(e,n),e}function I_(e,t,n){return(I_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=M_(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function L_(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&j_(e,t)}function j_(e,t){return(j_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function D_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=M_(e);if(t){var i=M_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return N_(this,n)}}function N_(e,t){return!t||"object"!==O_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function M_(e){return(M_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var U_=function(e){L_(n,e);var t=D_(n);function n(e,r){return P_(this,n),t.call(this,e,r)}return A_(n,[{key:"dispose",value:function(){x_.a.unmountComponentAtNode(this.el()),I_(M_(n.prototype),"dispose",this).call(this)}}]),n}(Fu.getComponent("Component")),B_={tagName:"div"};function F_(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:B_;if(!e)throw new Error("componentCtor is required");var n=function(n){L_(i,n);var r=D_(i);function i(){return P_(this,i),r.apply(this,arguments)}return A_(i,[{key:"createEl",value:function(){var n=Fu.dom.createEl(t.tagName,t.properties,t.attributes);return x_.a.render(e(this.player_,this.options_),n),n}}]),i}(U_);return n}function V_(){return i.a.createElement("button",{style:{height:"100%",cursor:"pointer"},onClick:function(){return console.log("Clicked React Button")}},"React Button")}function H_(e){return(H_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function q_(e,t){return(q_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=G_(e);if(t){var i=G_(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return $_(this,n)}}function $_(e,t){return!t||"object"!==H_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function G_(e){return(G_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("ExampleReactButton",F_((function(){return i.a.createElement(V_,null)})));var Y_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&q_(e,t)}(o,e);var t,n,r,i=W_(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t),e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){this.player.getChild("collapserator").addChild("exampleReactButton")}}])&&z_(t.prototype,n),r&&z_(t,r),o}(Fu.getPlugin("plugin"));function K_(e){return(K_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function X_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Q_(e,t){return(Q_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J_(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ew(e);if(t){var i=ew(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Z_(this,n)}}function Z_(e,t){return!t||"object"!==K_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ew(e){return(ew=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("examplePlugin",Y_);var tw=Fu.getPlugin("plugin"),nw="cvplayer-mute",rw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Q_(e,t)}(o,e);var t,n,r,i=J_(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).initialize(),t}return t=o,(n=[{key:"initialize",value:function(){var e=this;if(Ll()){this.player.on("volumechange",(function(){Dl("cvplayer-volume",e.player.volume().toString()),Dl(nw,e.player.muted().toString())}));var t=jl("cvplayer-volume"),n=jl(nw);t&&this.player.volume(+t),n&&this.player.muted("true"===n)}}}])&&X_(t.prototype,n),r&&X_(t,r),o}(tw);function iw(e){return(iw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ow(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aw(e,t){return(aw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cw(e);if(t){var i=cw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return uw(this,n)}}function uw(e,t){return!t||"object"!==iw(t)&&"function"!=typeof t?lw(e):t}function lw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cw(e){return(cw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("persistVolumePlugin",rw);var fw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aw(e,t)}(o,e);var t,n,r,i=sw(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).hasScreenOrientation()&&t.player.supportsFullScreen()?(t.onRotate=t.onRotate.bind(lw(t)),t.onFullscreenChange=t.onFullscreenChange.bind(lw(t)),t.initialize(),t):uw(t)}return t=o,(n=[{key:"initialize",value:function(){var e=this;window.addEventListener("orientationchange",this.onRotate),this.hasScreenLock()&&this.player.on("fullscreenchange",this.onFullscreenChange),this.player.one("dispose",(function(){var t;window.removeEventListener("orientationchange",e.onRotate),e.hasScreenLock()&&(null===(t=e.player)||void 0===t||t.off("fullscreenchange",e.onFullscreenChange))}))}},{key:"onFullscreenChange",value:function(){!this.getAngle()&&this.player.isFullscreen()?window.screen.orientation.lock("portrait-primary"):window.screen.orientation.unlock()}},{key:"onRotate",value:function(){var e=this.getAngle();90===e||-90===e||270===e?this.player.requestFullscreen():this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"hasScreenOrientation",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"hasScreenLock",value:function(){var e,t;return"function"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.lock)}},{key:"getAngle",value:function(){var e,t;return"number"==typeof(null===(t=null===(e=window.screen)||void 0===e?void 0:e.orientation)||void 0===t?void 0:t.angle)?window.screen.orientation.angle:0}}])&&ow(t.prototype,n),r&&ow(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("fullscreenOnRotatePlugin",fw);n(418);function hw(e){return(hw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function dw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pw(e,t){return(pw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vw(e);if(t){var i=vw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mw(this,n)}}function mw(e,t){return!t||"object"!==hw(t)&&"function"!=typeof t?gw(e):t}function gw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vw(e){return(vw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pw(e,t)}(o,e);var t,n,r,i=yw(o);function o(e,t){var n,r,a,s;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update=(r=n.update.bind(gw(n)),a=1e3,s=window.performance.now(),function(){var e=window.performance.now();e-s>=a&&(r.apply(void 0,arguments),s=e)}),e.on("timeupdate",n.update),e.on("dispose",(function(){e.off("timeupdate",n.update)})),n}return t=o,(n=[{key:"update",value:function(){var e=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(e)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var e={innerHTML:Ib,className:this.buildCSSClass()},t={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},n=Fu.dom.createEl("a",e,t);return this.createControlTextEl(n),n}}])&&dw(t.prototype,n),r&&dw(t,r),o}(Fu.getComponent("Button"));function _w(e){return(_w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ww(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tw(e,t){return(Tw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Sw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Cw(e);if(t){var i=Cw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ew(this,n)}}function Ew(e,t){return!t||"object"!==_w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Cw(e){return(Cw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}bw.prototype.controlText_="Open in ClickView",Fu.registerComponent("OpenExternallyButton",bw);var kw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tw(e,t)}(o,e);var t,n,r,i=Sw(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){var e=this.player.getChild("collapserator"),t=e.getChild("customControlSpacer"),n=e.children_.indexOf(t);e.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},n+1)}}])&&ww(t.prototype,n),r&&ww(t,r),o}(Fu.getPlugin("plugin"));function xw(e){return(xw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ow(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pw(e,t){return(Pw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Lw(e);if(t){var i=Lw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Aw(this,n)}}function Aw(e,t){return!t||"object"!==xw(t)&&"function"!=typeof t?Iw(e):t}function Iw(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lw(e){return(Lw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("openExternallyPlugin",kw);var jw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Pw(e,t)}(o,e);var t,n,r,i=Rw(o);function o(e,t){var n;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e),void 0===t.startTime)throw Error("Invalid clip start");if(void 0===t.endTime)throw Error("Invalid clip end");if(t.startTime>t.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=t.startTime,n._clipEnd=t.endTime,n.playerEndedFn=n.player.ended.bind(e),n.playerDurationFn=n.player.duration.bind(e),n.playerCurrentTimeFn=n.player.currentTime.bind(e),n.playerbufferedFn=n.player.buffered.bind(e),n.player.ended=n.ended.bind(Iw(n)),n.player.duration=n.duration.bind(Iw(n)),n.player.currentTime=n.currentTime.bind(Iw(n)),n.player.buffered=n.buffered.bind(Iw(n)),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return t=o,(n=[{key:"clipStart",get:function(){var e=this.playerDurationFn();return this._clipStart>e?e:this._clipStart}},{key:"clipEnd",get:function(){var e=this.playerDurationFn();return this._clipEnd>e?e:this._clipEnd}},{key:"dispose",value:function(){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")}},{key:"initialize",value:function(){var e=this;this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay),this.player.on("dispose",(function(){e.dispose()}))}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var e=this.getCurrentTime(!1);e>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,e<this.clipStart&&this.playerCurrentTimeFn(this.clipStart))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(e){return void 0!==e&&this.playerDurationFn(e),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(e){if(void 0===e)return this.getCurrentTime(!0);for(var t=e+this.clipStart,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.playerCurrentTimeFn.apply(this,[t].concat(r))}},{key:"getCurrentTime",value:function(e){var t=this.playerCurrentTimeFn(),n=0;return t>=this.clipStart&&(n=t-this.clipStart),this.player.getCache().currentTime=n,e?n:t}},{key:"buffered",value:function(){for(var e=this.playerbufferedFn(),t=[],n=0;n<e.length;n++)t[n]=[Math.max(0,e.start(n)-this.clipStart),Math.min(Math.max(0,e.end(n)-this.clipStart),this.player.duration())];return Fu.createTimeRanges(t)}}])&&Ow(t.prototype,n),r&&Ow(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("clipPlugin",jw);n(419);function Dw(e){return(Dw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mw(e,t,n){return(Mw="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Vw(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function Uw(e,t){return(Uw=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Bw(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Vw(e);if(t){var i=Vw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Fw(this,n)}}function Fw(e,t){return!t||"object"!==Dw(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Vw(e){return(Vw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Uw(e,t)}(o,e);var t,n,r,i=Bw(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat(Mw(Vw(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return Mw(Vw(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass()}),n)}},{key:"setUi",value:function(e,t){var n=this,r=e>0,i=r?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(i,"'>\n <div class='cv-touch-text'>\n ").concat(r?"+":"").concat(10*e,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){n.removeText()}),t)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Nw(t.prototype,n),r&&Nw(t,r),o}(Fu.getComponent("component"));function zw(e){return(zw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ww(e,t){return(Ww=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yw(e);if(t){var i=Yw(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gw(this,n)}}function Gw(e,t){return!t||"object"!==zw(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Yw(e){return(Yw=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("TouchControls",Hw);var Kw=Fu.getPlugin("plugin"),Xw=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ww(e,t)}(o,e);var t,n,r,i=$w(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).doubleTouchCount=0,t.seekStartTime=0,t.directionModifier=0,t.bindFunctions(),t.initialize(),t}return t=o,(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(){this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.player.on("dispose",this.unBindEventListeners),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.on(this.tech,"touchstart",this.onTouchStart),this.on(this.tech,"touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&(this.off(this.tech,"touchstart",this.onTouchStart),this.off(this.tech,"touchend",this.onTouchEnd))}},{key:"onTouchStart",value:function(e){this.touchStartTime=e.timeStamp}},{key:"onTouchEnd",value:function(e){var t=this;if(e.changedTouches.length){if(e.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(e),void(this.lastTouchTime=e.timeStamp);this.resetProperties(),this.lastTouchTime=e.timeStamp,e.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){t.doubleTouchCount||(t.player.paused()?t.player.play():t.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(e){var t=this.player.el().getBoundingClientRect(),n=t.left+t.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),e.changedTouches[0].pageX<n?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 r=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>r+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}])&&qw(t.prototype,n),r&&qw(t,r),o}(Kw);Fu.registerPlugin("touchControls",Xw);n(420);function Qw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Jw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Jw(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zw(e){var t,n=Qw(r.useState(105),2),i=n[0],o=n[1],a=r.useRef(e.player.duration()-e.player.currentTime()),s=Qw(r.useState(a.current),2),u=s[0],l=s[1];function c(){var t=e.player.el().querySelector(".vjs-control-bar"),n=null==t?void 0:t.offsetHeight;isNaN(n)||o(n+15)}function f(){var t=e.player.duration()-e.player.currentTime();l(t),t>a.current&&(a.current=t)}if(r.useEffect((function(){return c(),e.player.on("resize",c),e.player.on("fullscreenchange",c),e.player.on("timeupdate",f),function(){e.player.off("resize",c),e.player.off("fullscreenchange",c),e.player.off("timeupdate",f)}}),[]),!e.nextVideo||!e.onPlayNext)return r.createElement(r.Fragment,null);var h=(a.current-u)/a.current*100,d=Math.ceil(u),p=1===d?"second":"seconds";return r.createElement("div",{className:"cv-up-next-container rounded",style:{bottom:"".concat(i,"px")}},r.createElement("div",{className:"cv-up-next-progress-bar rounded",style:{width:"".concat(h,"%")}}),r.createElement("div",{className:"row no-gutters"},r.createElement("div",{className:"col-6"},r.createElement("div",{className:"cv-up-next-thumbnail-container",onClick:e.onPlayNext},r.createElement("div",{className:"cv-up-next-thumbnail-mask"},r.createElement("div",{className:"position-relative w-100 h-100"},r.createElement("div",{className:"cv-up-next-play-icon-container"},r.createElement("div",{className:"position-relative w-100 h-100"},r.createElement("span",{className:"cv-up-next-play-icon"}))))),r.createElement("img",{className:"img-fluid",src:null===(t=e.nextVideo)||void 0===t?void 0:t.thumbnailUrl}))),r.createElement("div",{className:"col-5 pl-2 pt-2"},r.createElement("p",null,"Up next in ",d," ",p),r.createElement("p",null,e.nextVideo.name)),r.createElement("div",{className:"col-1 pr-1"},r.createElement("div",{className:"close cv-cancel-up-next cursor-pointer",role:"button",onClick:e.onCancel},"×"))))}function eT(e){return(eT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function tT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nT(e,t){return(nT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function rT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=aT(e);if(t){var i=aT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return iT(this,n)}}function iT(e,t){return!t||"object"!==eT(t)&&"function"!=typeof t?oT(e):t}function oT(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aT(e){return(aT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerComponent("UpNext",F_((function(e,t){return r.createElement(Zw,Object.assign({player:e},t))})));var sT=Fu.getPlugin("plugin"),uT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nT(e,t)}(o,e);var t,n,r,i=rT(o);function o(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=i.call(this,e)).setShouldPlayNext=t.setShouldPlayNext.bind(oT(t)),t.getShouldPlayNext=t.getShouldPlayNext.bind(oT(t)),t.setChapterTrack=t.setChapterTrack.bind(oT(t)),t.onTimeUpdate=t.onTimeUpdate.bind(oT(t)),e.ready((function(){t.initialize()})),t}return t=o,(n=[{key:"initialize",value:function(){this.player.isDisposed()||(this.hasLocalStorage=this.testHasLocalStorage(),Ad(this.player,"chapters",null,this.setChapterTrack),this.bindListeners())}},{key:"setNextVideo",value:function(e,t){var n;this.player.isDisposed()||(this.nextVideo=e,this.callback=t,(null===(n=this.player.getChild("collapserator"))||void 0===n?void 0:n.getChild("cogButton")).showPlayNext())}},{key:"getShouldPlayNext",value:function(){if(!this.hasLocalStorage)return void 0===this.shouldPlayNextVideo&&(this.shouldPlayNextVideo=!0),this.shouldPlayNextVideo;var e=window.localStorage.getItem("cv-play-next-video");return null===e||"true"===e}},{key:"setShouldPlayNext",value:function(e){this.hasLocalStorage?window.localStorage.setItem("cv-play-next-video",e.toString()):this.shouldPlayNextVideo=e}},{key:"setChapterTrack",value:function(e){this.chapterTrack=e}},{key:"bindListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"unbindListeners",value:function(){this.player.off("timeupdate",this.onTimeUpdate)}},{key:"onTimeUpdate",value:function(){var e,t,n,r;if(!this.player.pictureInPicture||!this.player.isInPictureInPicture())if(this.getShouldPlayNext()){if(this.player.ended())return this.callback(),void this.hideUpNext();this.upNextRendered&&this.player.currentTime()>this.upNextTimepoint||("credits"===(null===(r=null===(n=(null===(t=null===(e=this.chapterTrack)||void 0===e?void 0:e.activeCues)||void 0===t?void 0:t.length)&&this.chapterTrack.activeCues[0])||void 0===n?void 0:n.text)||void 0===r?void 0:r.toLowerCase())||this.player.currentTime()>=this.player.duration()-5?this.showUpNext():this.hideUpNext())}else this.hideUpNext()}},{key:"showUpNext",value:function(){var e=this;this.upNextRendered||(this.upNextRendered=!0,this.upNextTimepoint=this.player.currentTime(),this.player.addChild("UpNext",{nextVideo:this.nextVideo,onPlayNext:this.callback,onCancel:function(){e.hideUpNext(),e.setShouldPlayNext(!1)}}))}},{key:"hideUpNext",value:function(){if(this.upNextRendered){this.upNextRendered=!1,this.upNextTimepoint=null;var e=this.player.getChild("UpNext");e&&this.player.removeChild(e)}}},{key:"testHasLocalStorage",value:function(){try{return window.localStorage.setItem("cv-persisttest","persistVolume"),window.localStorage.removeItem("cv-persisttest"),!0}catch(e){return!1}}}])&&tT(t.prototype,n),r&&tT(t,r),o}(sT);Fu.registerPlugin("nextVideoPlugin",uT);n(421);function lT(e){return(lT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hT(e,t,n){return(hT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=mT(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function dT(e,t){return(dT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=mT(e);if(t){var i=mT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return yT(this,n)}}function yT(e,t){return!t||"object"!==lT(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function mT(e){return(mT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gT=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dT(e,t)}(o,e);var t,n,r,i=pT(o);function o(){var e;return cT(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){hT(mT(o.prototype),"handleClick",this).call(this,null)}}])&&fT(t.prototype,n),r&&fT(t,r),o}(Fu.getComponent("Button"));function vT(e){return(vT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _T(e,t){return(_T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function wT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ST(e);if(t){var i=ST(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return TT(this,n)}}function TT(e,t){return!t||"object"!==vT(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ST(e){return(ST=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}gT.prototype.controlText_="Create Clip",Fu.registerComponent("CreateClipButton",gT);var ET=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_T(e,t)}(o,e);var t,n,r,i=wT(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){var e,t=this.player.getChild("collapserator"),n=null===(e=null==t?void 0:t.children())||void 0===e?void 0:e.findIndex((function(e){return"CustomControlSpacer"===e.name()}));n&&-1!==n&&t.addChild("CreateClipButton",{clickHandler:this.options.onClick},n+1)}}])&&bT(t.prototype,n),r&&bT(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("createClipButtonPlugin",ET);var CT,kT=n(4),xT=function(e,t){if(e){var n=e;return e.endsWith("/")||(n+="/"),t?n+=t.startsWith("/")?t.slice(1):t:n}},OT=n(204),PT=n(41),RT=n(12);function AT(e){return(AT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function IT(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jT(e,t){return(jT=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function DT(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=MT(e);if(t){var i=MT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NT(this,n)}}function NT(e,t){return!t||"object"!==AT(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function MT(e){return(MT=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.Analytics="AnalyticsService",e.Context="ContextService"}(CT||(CT={}));var UT,BT=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jT(e,t)}(o,e);var t,n,r,i=DT(o);function o(){var e;return IT(this,o),(e=i.apply(this,arguments)).contextHistory=[],e}return t=o,r=[{key:"Instance",get:function(){return this.instance||(this.instance=new this)}}],(n=[{key:"name",get:function(){return CT.Context}},{key:"initialize",value:function(){this.listenTo(RT.a.SHELL,OT.EventNames.ROUTE,this.setContext)}},{key:"setContext",value:function(e){this.contextHistory.length>=5&&this.contextHistory.unshift(),this.contextHistory.push({pageLoad:!this.contextHistory.length,appLink:e})}},{key:"getCurrentContext",value:function(){if(this.contextHistory.length)return this.contextHistory[this.contextHistory.length-1]}},{key:"fromPageLoad",value:function(){return 1===this.contextHistory.length}}])&&LT(t.prototype,n),r&&LT(t,r),o}(OT.Service)),FT=n(10);!function(e){e.Inlet="event:inlet",e.Outlet="event:outlet"}(UT||(UT={}));var VT="global:analytics";function HT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var zT=cb.EventVersion.V1,qT=function(){function e(t,n,r,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=t,this.data=n,this.actionContext=r,this.eventVersion=i||zT}var t,n,r;return t=e,(n=[{key:"isType",value:function(e){return e===this.type}},{key:"enrich",value:function(e,t){this.validateKey(e),this[e]=t}},{key:"get",value:function(e){if(e&&this[e])return this[e]}},{key:"validateKey",value:function(e){"type"!==e&&"data"!==e||OT.ErrorHelper.throw(new PT.a("".concat(e," is not a valid key"))),this[e]&&OT.ErrorHelper.throw(new PT.a("Event already contains an enrichment named ".concat(e)))}}])&&HT(t.prototype,n),r&&HT(t,r),e}(),WT=function(e,t,n,r){FT.Radio.channel(VT).trigger(UT.Inlet,new qT(e,t,n,r))};function $T(){var e=BT.getCurrentContext().appLink;return kT.isObject(e)||OT.ErrorHelper.throw(new PT.a("Applink does not exist. Check current context.")),e.application.replace(":","-")}function GT(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.location,n=e.entity,r=e.workflowPhase,i=void 0===r?null:r,o=e.descriptor,a=void 0===o?null:o;return t||OT.ErrorHelper.throw(new PT.a("location must be set.")),n||OT.ErrorHelper.throw(new PT.a("entity must be set.")),{productArea:$T(),location:t,entity:n,descriptor:a,workflowPhase:i}}function YT(){return OT.LocationUtils.GetCurrentPath()+OT.LocationUtils.GetCurrentQueryString()}var KT={logUserAction:function(e,t){if(function(e){return!(!kT.isArray(e)||!kT.every(e,(function(e){return kT.isObject(e)})))||!!kT.isObject(e)}(e)&&kT.isObject(t)){var n=KT.buildUserActionEvent(t),r=n.userAction,i=n.action,o=n.eventVersion;WT(r,e,i,o)}},logNavigate:function(e,t){var n=Object.assign({currentLocation:YT(),appLink:e},t);WT(cb.UserAction.Navigate,n)},mergeOptions:function(e,t){return kT.extend({},e,t)},buildActionContext:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return GT(e)},buildUserActionEvent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.actionType,n=e.eventVersion,r=t,i=GT(e);return{userAction:r,action:i,eventVersion:n}},buildCurrentLocation:function(){return YT()},buildSearchEvent:function(e,t){return{data:{query:e},action:GT({entity:cb.EntityType.Video,location:cb.LocationContext.SearchBar,descriptor:t})}},buildInstantSearchEvent:function(e,t,n){var r;n===cb.SearchQueryType.Series&&(r=cb.EntityType.Series),n===cb.SearchQueryType.Folder&&(r=cb.EntityType.Folder),n===cb.SearchQueryType.Tags&&(r=cb.EntityType.Tag),n===cb.SearchQueryType.Video&&(r=cb.EntityType.Video),n===cb.SearchQueryType.Subjects&&(r=cb.EntityType.Classification);var i={instant:{},query:e};return t.id&&(i.instant.selectedId=t.id),t.name&&(i.instant.selectedName=t.name),{data:i,action:GT({entity:r,location:cb.LocationContext.SearchBar})}},mapInteractionType:function(e){switch(e){case cb.InteractionType.DragDrop:return cb.InteractionTypeDescriptor.DragDrop;case cb.InteractionType.FileSelect:return cb.InteractionTypeDescriptor.FileSelect;default:return}}};function XT(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return QT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QT(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function QT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var JT={isEmpty:function(e){return kT.isEmpty(e)},values:function(e){return kT.values(e)},keys:function(e){return kT.keys(e)},deepClone:function(e){return(kT.isArray(e)?kT.map:kT.mapObject)(e,(function(e){return kT.isObject(e)||kT.isArray(e)?JT.deepClone(e):e}))},getEnumKeys:function(e){return Object.keys(e).filter((function(e){return!(parseInt(e)>=0)}))},isObject:function(e){return kT.isObject(e)},isEqual:function(e,t){return kT.isEqual(e,t)},omit:function(e,t){return kT.omit(e,t)},removeEmptyKeys:function(e){return Object.entries(e).filter((function(e){return null!==XT(e,2)[1]})).reduce((function(e,t){var n=XT(t,2),r=n[0],i=n[1];return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},r,i))}),{})}};var ZT=function(e,t){if(!e)throw new Error("Invariant failed")};function eS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tS(){return(tS=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function nS(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var rS=new Map,iS=new Map,oS=new Map,aS=0;function sS(e,t,n){void 0===n&&(n={}),n.threshold||(n.threshold=0);var r=n,i=r.root,o=r.rootMargin,a=r.threshold;if(rS.has(e)&&ZT(!1),e){var s=function(e){return e?oS.has(e)?oS.get(e):(aS+=1,oS.set(e,aS.toString()),oS.get(e)+"_"):""}(i)+(o?a.toString()+"_"+o:a.toString()),u=iS.get(s);u||(u=new IntersectionObserver(lS,n),s&&iS.set(s,u));var l={callback:t,element:e,inView:!1,observerId:s,observer:u,thresholds:u.thresholds||(Array.isArray(a)?a:[a])};return rS.set(e,l),u.observe(e),l}}function uS(e){if(e){var t=rS.get(e);if(t){var n=t.observerId,r=t.observer,i=r.root;r.unobserve(e);var o=!1,a=!1;n&&rS.forEach((function(t,r){r!==e&&(t.observerId===n&&(o=!0,a=!0),t.observer.root===i&&(a=!0))})),!a&&i&&oS.delete(i),r&&!o&&r.disconnect(),rS.delete(e)}}}function lS(e){e.forEach((function(e){var t=e.isIntersecting,n=e.intersectionRatio,r=e.target,i=rS.get(r);if(i&&n>=0){var o=i.thresholds.some((function(e){return i.inView?n>e:n>=e}));void 0!==t&&(o=o&&t),i.inView=o,i.callback(o,e)}}))}var cS=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eS(nS(t=e.call.apply(e,[this].concat(r))||this),"state",{inView:!1,entry:void 0}),eS(nS(t),"node",null),eS(nS(t),"handleNode",(function(e){t.node&&uS(t.node),t.node=e||null,t.observeNode()})),eS(nS(t),"handleChange",(function(e,n){(e!==t.state.inView||e)&&t.setState({inView:e,entry:n}),t.props.onChange&&t.props.onChange(e,n)})),t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var o=i.prototype;return o.componentDidMount=function(){this.node||ZT(!1)},o.componentDidUpdate=function(e,t){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold||(uS(this.node),this.observeNode()),t.inView!==this.state.inView&&this.state.inView&&this.props.triggerOnce&&(uS(this.node),this.node=null)},o.componentWillUnmount=function(){this.node&&(uS(this.node),this.node=null)},o.observeNode=function(){if(this.node){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin;sS(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r})}},o.render=function(){var e=this.state,t=e.inView,n=e.entry;if(!function(e){return"function"!=typeof e.children}(this.props))return this.props.children({inView:t,entry:n,ref:this.handleNode});var i=this.props,o=i.children,a=i.as,s=i.tag,u=(i.triggerOnce,i.threshold,i.root,i.rootMargin,i.onChange,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(i,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange"]));return Object(r.createElement)(a||s||"div",tS({ref:this.handleNode},u),o)},i}(r.Component);eS(cS,"displayName","InView"),eS(cS,"defaultProps",{threshold:0,triggerOnce:!1});function fS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return hS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dS(e){var t=fS(function(e){void 0===e&&(e={});var t=Object(r.useRef)(),n=Object(r.useState)({inView:!1,entry:void 0}),i=n[0],o=n[1],a=Object(r.useCallback)((function(n){t.current&&uS(t.current),n&&sS(n,(function(t,r){o({inView:t,entry:r}),t&&e.triggerOnce&&uS(n)}),e),t.current=n}),[e.threshold,e.root,e.rootMargin,e.triggerOnce]);return Object(r.useDebugValue)(i.inView),[a,i.inView,i.entry]}({triggerOnce:!0}),2),n=t[0],i=t[1];return!0!==e&&void 0!==window.IntersectionObserver||(i=!0,n=null),{ref:n,inView:i}}var pS,yS,mS,gS,vS,bS,_S=n(144),wS=n.n(_S),TS=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},SS=r.memo((function(e){var t=e.forceLoad,n=e.extraClasses,i=void 0===n?"":n,o=TS(e,["forceLoad","extraClasses"]),a=dS(),s=a.ref,u=a.inView;if(!s)return r.createElement("img",Object.assign({className:"".concat(wS.a.image," ").concat(i),alt:""},o));var l=o.src,c=TS(o,["src"]),f=Object.assign(Object.assign({alt:""},c),u||t?{src:l}:{});return t||(f.ref=s),r.createElement("img",Object.assign({className:"".concat(wS.a.image," ").concat(i)},f))}));function ES(e){var t=e.appLink,n=e.appLinkOptions,i=e.className,o=e.style,a=e.children,s=e.tag,u=void 0===s?"a":s;if(!t)return r.createElement("span",{className:i||""},a);var l=OT.AppLinkHelper.getHref(t),c={onClick:function(r){var i;r.preventDefault(),null===(i=e.onClick)||void 0===i||i.call(e,r),e.analyticsData&&e.analyticsOptions&&KT.logUserAction(Object.assign({href:l},e.analyticsData),e.analyticsOptions),OT.AppLinkHelper.trigger(t,n)},href:l,className:i,style:o};return e.title&&(c.title=e.title),r.createElement(u,Object.assign({},c),a)}function CS(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ES.defaultProps={appLinkOptions:{}},function(e){e.Small="small",e.Medium="medium",e.Large="large"}(pS||(pS={})),function(e){e[e.Thumbnails=0]="Thumbnails",e[e.Banners=1]="Banners",e[e.Avatars=2]="Avatars",e[e.Logos=3]="Logos",e[e.Covers=4]="Covers",e[e.Posters=5]="Posters",e[e.TallPosters=6]="TallPosters",e[e.HeroBanners=7]="HeroBanners",e[e.None=99999]="None"}(yS||(yS={})),function(e){e[e.Crop=0]="Crop",e[e.Stretched=1]="Stretched",e[e.Cover=2]="Cover"}(mS||(mS={})),function(e){e[e.None=0]="None",e[e.ImageAPIv1=1]="ImageAPIv1",e[e.FileAPIv1=2]="FileAPIv1",e[e.ImageAPIv2=3]="ImageAPIv2"}(gS||(gS={})),function(e){e.Banner="banner",e.Thumbnail="thumbnail"}(bS||(bS={}));var kS,xS,OS=(CS(vS={},yS.Banners,bS.Banner),CS(vS,yS.Thumbnails,bS.Thumbnail),vS),PS=function(e){return"/v1/category-map/".concat(e)},RS={createUrl:function(e,t){return RS._createUrl(e,t)},createBannerUrl:function(e,t,n){return e&&e.url?RS._createUrl(e.url,n):RS._createCategoryMappedUrl(t,n)},createResourceImage:function(e,t,n){return RS._createUrl(e,Object.assign({url:t},n))},Rfc3986EncodeURIComponent:function(e){return encodeURIComponent(e).replace(/[!'()*]/g,escape)},_createCategoryMappedUrl:function(e,t){var n=e.fallbackBaseUrl,r=e.fallbackCategoryName,i=e.type,o=xT(n,"".concat(PS(OS[i]))),a=Object.assign({name:RS.Rfc3986EncodeURIComponent(r)},t);return RS._createUrl(o,a)},_createUrl:function(e,t){if(e){if(JT.isEmpty(t))return e;var n=$.param(t),r=-1===e.indexOf("?")?"?":"&",i=e;return i.endsWith("/")&&(i=i.slice(0,-1)),i+"".concat(r).concat(n)}},legacyCreateThumbnailUrl:function(e,t){if(!e)return"";var n;if(e&&(n=e instanceof OT.Model?e.get("url"):"string"==typeof e?e:e.url)){var r=Object.assign({size:pS.Small,bgColor:"000"},t);return RS._createUrl(n,r)}}},AS=n(72),IS=n.n(AS);function LS(e){var t="thumbnail ".concat(IS.a.thumbnail),n="";return e.aspectRatio===kS.SixteenByNine&&(n=IS.a.sixteenByNine),e.aspectRatio===kS.NineBySixteen&&(n=IS.a.nineBySixteen),e.aspectRatio===kS.OneByOne&&(n=IS.a.oneByOne),e.aspectRatio===kS.TwoByThree&&(n=IS.a.twoByThree),n&&(t+=" ".concat(n)),e.className&&(t+=" ".concat(e.className)),t}function jS(e){var t=e.data,n=e.imageOptions,i=e.appLink,o=e.preload,a=e.analyticsOptions,s=e.analyticsData,u=e.imageClassName,l="";"string"==typeof t?l=t:JT.isObject(t)&&(l=t.url);var c=l&&n?RS.createUrl(l,n):l;return r.createElement("div",{className:LS(e),style:e.imageStyle},i?r.createElement(ES,{appLink:i,analyticsData:s,analyticsOptions:a},e.children,c&&r.createElement(SS,{src:c,forceLoad:o,extraClasses:u,onError:e.onImageLoadError||function(){}})):r.createElement(r.Fragment,null,e.children,c&&r.createElement(SS,{src:c,forceLoad:o,extraClasses:u,onError:e.onImageLoadError||function(){}})))}function DS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return NS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return NS(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function NS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MS(e){var t=DS(Object(r.useState)(window.matchMedia(e).matches),2),n=t[0],i=t[1];return Object(r.useEffect)((function(){var t=window.matchMedia(e);t.matches!==n&&i(t.matches);var r=function(){return i(t.matches)};return t.addListener(r),function(){return t.removeListener(r)}}),[e]),n}!function(e){e[e.SixteenByNine=0]="SixteenByNine",e[e.OneByOne=1]="OneByOne",e[e.TwoByThree=2]="TwoByThree",e[e.NineBySixteen=3]="NineBySixteen"}(kS||(kS={})),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(xS||(xS={}));var US=n(24),BS=n(40),FS=n(84),VS=n(137),HS=n.n(VS),zS=(n(106),n(70)),qS=n.n(zS),WS=n(239),$S=n.n(WS),GS=(n(68),!1),YS=i.a.createContext(null),KS=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var i,o=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?o?(i="exited",r.appearStatus="entering"):i="entered":i=t.unmountOnExit||t.mountOnEnter?"unmounted":"exited",r.state={status:i},r.nextCallback=null,r}Object(FS.a)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:"exited"}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?"entering"!==n&&"entered"!==n&&(t="entering"):"entering"!==n&&"entered"!==n||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=x_.a.findDOMNode(this);"entering"===t?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:"unmounted"})},n.performEnter=function(e,t){var n=this,r=this.props.enter,i=this.context?this.context.isMounting:t,o=this.getTimeouts(),a=i?o.appear:o.enter;!t&&!r||GS?this.safeSetState({status:"entered"},(function(){n.props.onEntered(e)})):(this.props.onEnter(e,i),this.safeSetState({status:"entering"},(function(){n.props.onEntering(e,i),n.onTransitionEnd(e,a,(function(){n.safeSetState({status:"entered"},(function(){n.props.onEntered(e,i)}))}))})))},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();n&&!GS?(this.props.onExit(e),this.safeSetState({status:"exiting"},(function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,(function(){t.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))}))}))):this.safeSetState({status:"exited"},(function(){t.props.onExited(e)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;e&&!r?(this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)):setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if("unmounted"===e)return null;var t=this.props,n=t.children,r=Object(BS.a)(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return i.a.createElement(YS.Provider,{value:null},n(e,r));var o=i.a.Children.only(n);return i.a.createElement(YS.Provider,{value:null},i.a.cloneElement(o,r))},t}(i.a.Component);function XS(){}KS.contextType=YS,KS.propTypes={},KS.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:XS,onEntering:XS,onEntered:XS,onExit:XS,onExiting:XS,onExited:XS},KS.UNMOUNTED=0,KS.EXITED=1,KS.ENTERING=2,KS.ENTERED=3,KS.EXITING=4;var QS,JS=KS,ZS=n(242),eE=n.n(ZS);var tE=((QS={}).entering="show",QS.entered="show",QS),nE=i.a.forwardRef((function(e,t){var n=e.className,o=e.children,a=Object(BS.a)(e,["className","children"]),s=Object(r.useCallback)((function(e){!function(e){e.offsetHeight}(e),a.onEnter&&a.onEnter(e)}),[a]);return i.a.createElement(JS,Object(US.a)({ref:t,addEndListener:eE.a},a,{onEnter:s}),(function(e,t){return i.a.cloneElement(o,Object(US.a)({},t,{className:qS()("fade",n,o.props.className,tE[e])}))}))}));nE.defaultProps={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1},nE.displayName="Fade";var rE=nE,iE={transition:rE,rootClose:!1,show:!1,placement:"top"};function oE(e){var t=e.children,n=e.transition,r=Object(BS.a)(e,["children","transition"]);return n=!0===n?rE:n||null,i.a.createElement($S.a,Object(US.a)({},r,{transition:n}),(function(e){var r=e.props,o=e.arrowProps,a=e.show,s=Object(BS.a)(e,["props","arrowProps","show"]);return function(e,t){var n=e.ref,r=t.ref;e.ref=n.__wrapped||(n.__wrapped=function(e){return n(Object(k_.findDOMNode)(e))}),t.ref=r.__wrapped||(r.__wrapped=function(e){return r(Object(k_.findDOMNode)(e))})}(r,o),"function"==typeof t?t(Object(US.a)({},s,{},r,{show:a,arrowProps:o})):i.a.cloneElement(t,Object(US.a)({},s,{},r,{arrowProps:o,className:qS()(t.props.className,!n&&a&&"show"),style:Object(US.a)({},t.props.style,{},r.style)}))}))}oE.defaultProps=iE;var aE=oE,sE=function(e){function t(){return e.apply(this,arguments)||this}return Object(FS.a)(t,e),t.prototype.render=function(){return this.props.children},t}(i.a.Component),uE=function(e){return e&&"object"==typeof e?e:{show:e,hide:e}},lE=function(e){function t(t,n){var r;return(r=e.call(this,t,n)||this).getTarget=function(){return x_.a.findDOMNode(r.trigger.current)},r.handleShow=function(){clearTimeout(r._timeout),r._hoverState="show";var e=uE(r.props.delay);e.show?r._timeout=setTimeout((function(){"show"===r._hoverState&&r.show()}),e.show):r.show()},r.handleHide=function(){clearTimeout(r._timeout),r._hoverState="hide";var e=uE(r.props.delay);e.hide?r._timeout=setTimeout((function(){"hide"===r._hoverState&&r.hide()}),e.hide):r.hide()},r.handleFocus=function(e){var t=r.getChildProps().onFocus;r.handleShow(e),t&&t(e)},r.handleBlur=function(e){var t=r.getChildProps().onBlur;r.handleHide(e),t&&t(e)},r.handleClick=function(e){var t=r.getChildProps().onClick;r.state.show?r.hide():r.show(),t&&t(e)},r.handleMouseOver=function(e){r.handleMouseOverOut(r.handleShow,e,"fromElement")},r.handleMouseOut=function(e){return r.handleMouseOverOut(r.handleHide,e,"toElement")},r.trigger=i.a.createRef(),r.state={show:!!t.defaultShow},r.ariaModifier={enabled:!0,order:900,fn:function(e){var t=e.instance.popper,n=r.getTarget();if(!r.state.show||!n)return e;var i=t.getAttribute("role")||"";return t.id&&"tooltip"===i.toLowerCase()&&n.setAttribute("aria-describedby",t.id),e}},r}Object(FS.a)(t,e);var n=t.prototype;return n.componentWillUnmount=function(){clearTimeout(this._timeout)},n.getChildProps=function(){return i.a.Children.only(this.props.children).props},n.handleMouseOverOut=function(e,t,n){var r=t.currentTarget,i=t.relatedTarget||t.nativeEvent[n];i&&i===r||HS()(r,i)||e(t)},n.hide=function(){this.setState({show:!1})},n.show=function(){this.setState({show:!0})},n.render=function(){var e=this.props,t=e.trigger,n=e.overlay,o=e.children,a=e.popperConfig,s=void 0===a?{}:a,u=Object(BS.a)(e,["trigger","overlay","children","popperConfig"]);delete u.delay,delete u.defaultShow;var l=i.a.Children.only(o),c={},f=null==t?[]:[].concat(t);return-1!==f.indexOf("click")&&(c.onClick=this.handleClick),-1!==f.indexOf("focus")&&(c.onFocus=this.handleShow,c.onBlur=this.handleHide),-1!==f.indexOf("hover")&&(c.onMouseOver=this.handleMouseOver,c.onMouseOut=this.handleMouseOut),i.a.createElement(i.a.Fragment,null,i.a.createElement(sE,{ref:this.trigger},Object(r.cloneElement)(l,c)),i.a.createElement(aE,Object(US.a)({},u,{popperConfig:Object(US.a)({},s,{modifiers:Object(US.a)({},s.modifiers,{ariaModifier:this.ariaModifier})}),show:this.state.show,onHide:this.handleHide,target:this.getTarget}),n))},t}(i.a.Component);lE.defaultProps={defaultOverlayShown:!1,trigger:["hover","focus"]};var cE=lE,fE=(n(458),n(243),i.a.createContext({}));fE.Consumer,fE.Provider;function hE(e,t){var n=Object(r.useContext)(fE);return e||n[t]||t}var dE=i.a.forwardRef((function(e,t){var n=e.bsPrefix,r=e.placement,o=e.className,a=e.style,s=e.children,u=e.arrowProps,l=(e.scheduleUpdate,e.outOfBoundaries,Object(BS.a)(e,["bsPrefix","placement","className","style","children","arrowProps","scheduleUpdate","outOfBoundaries"]));return n=hE(n,"tooltip"),i.a.createElement("div",Object(US.a)({ref:t,style:a,role:"tooltip","x-placement":r,className:qS()(o,n,"bs-tooltip-"+r)},l),i.a.createElement("div",Object(US.a)({className:"arrow"},u)),i.a.createElement("div",{className:n+"-inner"},s))}));dE.defaultProps={placement:"right"},dE.displayName="Tooltip";var pE,yE,mE=dE,gE=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;return Math.floor(Math.random()*Math.floor(e))};function vE(e){var t=e.title,n=e.placement,i=e.trigger,o=e.spanHack,a=e.children;return o?r.createElement(cE,{placement:n,overlay:r.createElement(mE,{id:"".concat(t,"-").concat(gE())},t),trigger:i},r.createElement("span",{className:"d-flex justify-content-center align-items-center"},a)):r.createElement(cE,{placement:n,overlay:r.createElement(mE,{id:"".concat(t,"-").concat(gE())},t),trigger:i},a)}vE.defaultProps={trigger:["hover","click","focus"],placement:"top"},function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(pE||(pE={})),function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience",e[e.Classroom=67]="Classroom",e[e.ClassroomGroup=68]="ClassroomGroup"}(yE||(yE={}));var bE=n(44),_E=n.n(bE),wE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},TE={width:1920,height:1080,format:"jpg"};function SE(e,t){var n,r=xT(e,"/v1/previews");return"metadata"in t?t.metadata.type===pE.Pdf?RS.createResourceImage(r,t.url,TE):t.metadata.type===pE.Image?RS.createUrl(t.url,{size:pS.Medium,resizeType:mS.Cover}):(null===(n=t.pdf)||void 0===n?void 0:n.url)?RS.createResourceImage(r,t.pdf.url,TE):t.metadata.type===pE.Zip?RS.createUrl(xT(e,"/v2/thumbnails/BKnxEm"),{size:pS.Large,format:"png"}):RS.createUrl("".concat(e,"v2/thumbnails/BKnxEm"),{size:pS.Large,format:"png"}):RS.createResourceImage(r,t.url,Object.assign(Object.assign({},TE),{resizeType:mS.Cover}))}function EE(e){var t,n,r,o=null,a=0;"metadata"in e.data&&(o=e.data.metadata,a=null!==(r=null===(n=null===(t=e.data.thumbnail)||void 0===t?void 0:t.metadata)||void 0===n?void 0:n.rotation)&&void 0!==r?r:0);var s="pt-3 px-3 rounded-lg d-flex flex-column align-items-center"+" justify-content-end ".concat(function(e){switch(e){case"atom-guide":return _E.a.atomGuide;case"student-activity":return _E.a.studentActivity;case"teacher-pack":return _E.a.teacherPack;case"additional-materials":return _E.a.additionalMaterials;default:return _E.a.userUploaded}}(null==o?void 0:o.resourceType)," ").concat(_E.a.background);return i.a.createElement("div",{className:s},i.a.createElement(vE,{title:e.data.name},i.a.createElement("h3",{className:"text-center clamp-1 text-break h5 mb-3 ".concat(_E.a.text)},e.data.name)),i.a.createElement("div",{className:"w-75 overflow-hidden ".concat(_E.a.thumbnailContainer)},i.a.createElement(jS,{data:SE(e.imageCdnUrl,e.data),aspectRatio:kS.SixteenByNine,imageStyle:{transform:"rotate(".concat(a,"deg)")},analyticsOptions:{location:cb.LocationContext.SlidingListItem},onImageLoadError:function(t){t.target.src=e.imageErrorFallbackUrl},preload:!0})))}i.a.memo((function(e){var t,n,r,o,a,s,u,l=e.appLink,c=wE(e,["appLink"]),f=(t=MS(xS.XS),n=MS(xS.SM),r=MS(xS.MD),o=MS(xS.LG),a=MS(xS.XL),s=MS(xS.XXL),u=xS.LG,t&&(u=xS.XS),n&&(u=xS.SM),r&&(u=xS.MD),o&&(u=xS.LG),a&&(u=xS.XL),s&&(u=xS.XXL),u),h=f===xS.SM||f===xS.XS,d=null;"metadata"in e.data&&(d=e.data.metadata.type);var p=Object.assign(Object.assign({},e.analyticsData),e.data),y=Object.assign(Object.assign({},e.analyticsOptions),{actionType:cb.UserAction.Click,entity:e.data.typeId===yE.Resource?cb.EntityType.Resource:cb.EntityType.Link});function m(){KT.logUserAction(p,y)}return i.a.createElement("div",{className:"pt-1 px-1 flex-shrink-0 ".concat(_E.a.item)},function(){if(!d)return i.a.createElement("a",{href:e.data.url,target:"_blank",className:"d-block",onClick:m},i.a.createElement(EE,Object.assign({},c)));var t=!!e.data.pdf||d===pE.Pdf||d===pE.Image;return h||!t||d===pE.Zip?i.a.createElement("a",{href:e.data.url,className:"d-block",onClick:m},i.a.createElement(EE,Object.assign({},c))):i.a.createElement(ES,{appLink:Object.assign(Object.assign({},l),{args:[e.data.id]}),className:"d-block no-decoration",analyticsData:p,analyticsOptions:y},i.a.createElement(EE,Object.assign({},c)))}())})),n(459);function CE(e){return(CE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xE(e,t){return(xE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function OE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=RE(e);if(t){var i=RE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return PE(this,n)}}function PE(e,t){return!t||"object"!==CE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function RE(e){return(RE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function AE(e){return i.a.createElement("div",{className:"cv-resource-item"},i.a.createElement(EE,{data:e.resource,imageCdnUrl:e.imageCdnUrl}))}var IE=F_((function(e,t){return i.a.createElement(AE,Object.assign({},t))})),LE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&xE(e,t)}(o,e);var t,n,r,i=OE(o);function o(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),n=i.call(this,e,t);var r=new IE(e,{resource:t.resource,imageCdnUrl:t.imageCdnUrl});return n.addChild(r),n}return t=o,(n=[{key:"createEl",value:function(){return Fu.dom.createEl("div")}},{key:"handleClick",value:function(e){e.stopImmediatePropagation(),this.options_.downloadResource(this.options_.resource)}}])&&kE(t.prototype,n),r&&kE(t,r),o}(Fu.getComponent("ClickableComponent"));n(460);function jE(e){return(jE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function DE(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ME(e,t,n){return(ME="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=VE(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function UE(e,t){return(UE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function BE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=VE(e);if(t){var i=VE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return FE(this,n)}}function FE(e,t){return!t||"object"!==jE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function VE(e){return(VE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var HE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&UE(e,t)}(o,e);var t,n,r,i=BE(o);function o(){var e;return DE(this,o),(e=i.apply(this,arguments)).alwaysCollapsed=!1,e.isCollapsed=!1,e.isCollabsible=!0,e}return t=o,(n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small ".concat(ME(VE(o.prototype),"buildWrapperCSSClass",this).call(this))}},{key:"buildCSSClass",value:function(){return"cv-resources-button ".concat(ME(VE(o.prototype),"buildCSSClass",this).call(this))}},{key:"update",value:function(){ME(VE(o.prototype),"update",this).call(this),Pd.initMenuScrollbar(this)}},{key:"createMenu",value:function(){return this.options_.title="Resources",ME(VE(o.prototype),"createMenu",this).call(this)}},{key:"createItems",value:function(){var e=this,t=[];return this.options_.resources.forEach((function(n){var r=new LE(e.player(),{resource:n,imageCdnUrl:e.options_.imageCdnUrl,downloadResource:function(t){return e.downloadResource(t)}});t.push(r)})),t}},{key:"downloadResource",value:function(e){this.getDownloadIframe().src=e.url}},{key:"getDownloadIframe",value:function(){return this.downloadIframe||(this.downloadIframe=Fu.dom.createEl("iframe"),this.downloadIframe.style.display="none",Fu.dom.appendContent(Fu.dom.$("body"),this.downloadIframe)),this.downloadIframe}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){ME(VE(o.prototype),"handleClick",this).call(this,null)}}])&&NE(t.prototype,n),r&&NE(t,r),o}(Fu.getComponent("MenuButton"));function zE(e){return(zE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function WE(e,t){return(WE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function $E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=YE(e);if(t){var i=YE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return GE(this,n)}}function GE(e,t){return!t||"object"!==zE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function YE(e){return(YE=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}HE.prototype.controlText_="Resources",Fu.registerComponent("ResourcesButton",HE);var KE=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&WE(e,t)}(o,e);var t,n,r,i=$E(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,e.ready((function(){return n.onReady()})),n}return t=o,(n=[{key:"onReady",value:function(){if(this.options.resources.length){var e=this.player.getChild("collapserator");e.addChild("ResourcesButton",{resources:this.options.resources,imageCdnUrl:this.options.imageCdnUrl},e.children_.length-3)}}}])&&qE(t.prototype,n),r&&qE(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("resourcesPlugin",KE);n(461);function XE(e){return(XE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function QE(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function JE(e,t){return(JE=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ZE(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tC(e);if(t){var i=tC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return eC(this,n)}}function eC(e,t){return!t||"object"!==XE(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function tC(e){return(tC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nC=Fu.getComponent("PlayToggle"),rC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&JE(e,t)}(o,e);var t,n,r,i=ZE(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).pictureInPictureEnabled=!0,n.options=t,n.bindFunctions(),n.player.ready((function(){n.initialize()})),n}return t=o,(n=[{key:"initialize",value:function(){var e=this;this.enablePictureInPicture(),this.player.on("dispose",(function(){e.dispose()}))}},{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){if(this.player.options_.fluid){this.pictureInPictureEnabled=!0;var e=this.getToggleParentComponent();null==e||e.addChild("pictureInPictureToggle",{},e.children().length-1)}}},{key:"disablePictureInPicture",value:function(){this.pictureInPictureEnabled=!1;var e=this.getToggleParentComponent(),t=null==e?void 0:e.getChild("pictureInPictureToggle");t&&e.removeChild(t)}},{key:"togglePictureInPicture",value:function(e){if(e!==this.player.isInPictureInPicture()){var t=e?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(e),this.player.trigger(t),e?this.addPipStyles():this.removePipStyles()}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new nC(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn}}])&&QE(t.prototype,n),r&&QE(t,r),o}(Fu.getPlugin("plugin"));Fu.registerPlugin("pictureInPicture",rC);n(462);function iC(e){return(iC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aC(e,t){return(aC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function sC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lC(e);if(t){var i=lC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return uC(this,n)}}function uC(e,t){return!t||"object"!==iC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lC(e){return(lC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var cC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&aC(e,t)}(o,e);var t,n,r,i=sC(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).update(),n}return t=o,(n=[{key:"update",value:function(){this.options_.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"handleClick",value:function(){if(this.options_.isFavourited=!this.options_.isFavourited,this.update(),this.options_.clickHandler){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.options_.clickHandler.call(this,t)}}},{key:"buildCSSClass",value:function(){return"cv-favourite-button"}}])&&oC(t.prototype,n),r&&oC(t,r),o}(Fu.getComponent("Button"));function fC(e){return(fC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function hC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pC(e,t){return(pC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function yC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gC(e);if(t){var i=gC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return mC(this,n)}}function mC(e,t){return!t||"object"!==fC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function gC(e){return(gC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}cC.prototype.controlText_="Favourite";var vC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pC(e,t)}(o,e);var t,n,r,i=yC(o);function o(){return hC(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"setFavourite",value:function(e,t){e!==this.isFavourite&&(this.isFavourite=e,this.onClickFavourite=t,this.renderFavouriteButton())}},{key:"renderFavouriteButton",value:function(){this.player.isDisposed()||(this.button&&this.player.removeChild(this.button),this.button=new cC(this.player,{isFavourited:this.isFavourite,clickHandler:this.onClickFavourite}),this.player.addChild(this.button))}}])&&dC(t.prototype,n),r&&dC(t,r),o}(Fu.getPlugin("plugin"));function bC(e){return(bC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wC(e,t,n){return(wC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=CC(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function TC(e,t){return(TC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function SC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CC(e);if(t){var i=CC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return EC(this,n)}}function EC(e,t){return!t||"object"!==bC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function CC(e){return(CC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("favouritePlugin",vC);var kC=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},xC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&TC(e,t)}(o,e);var t,n,r,i=SC(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,t)}return t=o,(n=[{key:"configurePlugins",value:function(){try{var e=this.player;e.persistVolumePlugin(),e.fullscreenOnRotatePlugin(),e.touchControls(),this.options.getExternalLink&&e.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.options.onClickCreateClip&&e.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&e.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture})}catch(e){console.log("failed to register plugins",e)}}},{key:"setFavourite",value:function(e,t){this.player.favouritePlugin().setFavourite(e,t)}},{key:"setNextVideo",value:function(e,t){this.player.nextVideoPlugin().setNextVideo(e,t)}},{key:"enablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var e=this.player.pictureInPicture();e&&e.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(e){var t=this.player.pictureInPicture();t&&t.togglePictureInPicture(e)}},{key:"additionalSetup",value:function(e){var t=this,n=Object.create(null,{additionalSetup:{get:function(){return wC(CC(o.prototype),"additionalSetup",t)}}});return kC(this,void 0,void 0,regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n.additionalSetup.call(this,e),"MasterClip"!==e.mediaType){t.next=6;break}if(null!==(r=e.additionalData)){t.next=5;break}throw Error("Invalid clip data");case 5:this.player.clipPlugin({startTime:r.startTime,endTime:r.endTime});case 6:case"end":return t.stop()}}),t,this)})))}}])&&_C(t.prototype,n),r&&_C(t,r),o}(g_),OC=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function PC(e){var t=e.className,n=void 0===t?"":t,r=e.playerApi,o=e.onReady,a=e.onDispose,s=OC(e,["className","playerApi","onReady","onDispose"]),u=i.a.useRef(),l=i.a.useRef();return i.a.useEffect((function(){var e;if(null===(e=l.current)||void 0===e||e.dispose(),u)return l.current=new xC(u.current,Object.assign(Object.assign({},s),{playerApi:r})),o&&l.current.ready((function(){o(l.current)})),a&&l.current.one("dispose",a),function(){var e;null===(e=l.current)||void 0===e||e.dispose()}}),[e.viewKey]),i.a.createElement("div",{ref:u,className:n})}function RC(e){return(RC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AC(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function LC(e,t,n){return(LC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=MC(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function jC(e,t){return(jC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function DC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=MC(e);if(t){var i=MC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NC(this,n)}}function NC(e,t){return!t||"object"!==RC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function MC(e){return(MC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var UC=Fu.getComponent("Component"),BC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&jC(e,t)}(o,e);var t,n,r,i=DC(o);function o(){return AC(this,o),i.apply(this,arguments)}return t=o,(n=[{key:"buildCSSClass",value:function(){return"cv-clip-timepoint-handle ".concat(LC(MC(o.prototype),"buildCSSClass",this).call(this))}},{key:"createEl",value:function(e,t,n){return LC(MC(o.prototype),"createEl",this).call(this,e,Object.assign(Object.assign({},t),{className:this.buildCSSClass(),innerHTML:'<svg viewBox="0 0 5 14"><g id="Clips" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Clip-2" transform="translate(-835.000000, -632.000000)" fill="#FFFFFF"><g id="Video-Copy" transform="translate(275.000000, 96.000000)"><g id="Handles" transform="translate(560.000000, 536.000000)"><circle id="Oval" cx="1" cy="1" r="1"></circle><circle id="Oval-Copy-2" cx="1" cy="5" r="1"></circle><circle id="Oval-Copy-4" cx="1" cy="9" r="1"></circle><circle id="Oval-Copy-8" cx="1" cy="13" r="1"></circle><circle id="Oval-Copy" cx="4" cy="1" r="1"></circle><circle id="Oval-Copy-3" cx="4" cy="5" r="1"></circle><circle id="Oval-Copy-5" cx="4" cy="9" r="1"></circle><circle id="Oval-Copy-9" cx="4" cy="13" r="1"></circle></g></g></g></g></svg>'}),n)}},{key:"isEventTarget",value:function(e){return this.el().contains(e.target)}}])&&IC(t.prototype,n),r&&IC(t,r),o}(UC);n(463);function FC(e){return(FC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function VC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function HC(e,t,n){return(HC="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=$C(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function zC(e,t){return(zC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function qC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$C(e);if(t){var i=$C(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return WC(this,n)}}function WC(e,t){return!t||"object"!==FC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $C(e){return($C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var GC=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zC(e,t)}(o,e);var t,n,r,i=qC(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).dragStartActive=!1,n.dragEndActive=!1,n.dragSliderActive=!1,n.dragSliderCurrentPosition=null,n.minDuration=Math.min(e.duration(),n.options_.minDuration),n.setStartTime(t.startTime,!1),n.setEndTime(t.endTime,!1),n.startHandle=new BC(n.player(),t),n.startHandle.addClass("cv-clip-start-handle"),n.addChild(n.startHandle),n.endHandle=new BC(n.player(),t),n.endHandle.addClass("cv-clip-end-handle"),n.addChild(n.endHandle),n.on(n.player(),"update:clip:start:time",(function(e){var t=e.time;return n.setStartTime(t)})),n.on(n.player(),"update:clip:end:time",(function(e){var t=e.time;return n.setEndTime(t)})),n.bindListeners(),n.update(),n}return t=o,(n=[{key:"createEl",value:function(){return HC($C(o.prototype),"createEl",this).call(this,"div",{className:"cv-clip-timepoint-selector"},{})}},{key:"update",value:function(){var e=this;this.options_.onChangeStartTime(this.startTime),this.options_.onChangeEndTime(this.endTime),this.requestAnimationFrame((function(){e.setStartOffset(),e.setWidth()}))}},{key:"setStartTime",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!isNaN(e)){var n=this.endTime||this.player().duration(),r=n-this.minDuration;e>r&&(e=r),e<0&&(e=0),this.startTime=e,this.endTime&&this.endTime-this.startTime<this.minDuration&&this.setEndTime(this.startTime+this.minDuration),this.player().currentTime(this.startTime),t&&this.update()}}},{key:"setEndTime",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!isNaN(e)){var n=this.startTime||0,r=n+this.minDuration;e<r&&(e=r),e>this.player().duration()&&(e=this.player().duration()),this.endTime=e,this.startTime&&this.endTime-this.startTime<this.minDuration&&this.setStartTime(this.endTime-this.minDuration),t&&this.update()}}},{key:"bindListeners",value:function(){var e=this;this.on("mousedown",this.dragStart),this.on("touchstart",this.dragStart),this.player().on("dispose",(function(){e.off("mousedown",e.dragStart),e.off("touchstart",e.dragStart)}))}},{key:"dragStart",value:function(e){this.startHandle.isEventTarget(e)&&(e.stopImmediatePropagation(),this.dragStartActive=!0),this.endHandle.isEventTarget(e)&&(e.stopImmediatePropagation(),this.dragEndActive=!0),e.target===this.el()&&(e.stopImmediatePropagation(),this.dragSliderActive=!0,this.dragSliderCurrentPosition=this.getPosition(e));var t=this.el().ownerDocument;this.on(t,"mousemove",this.drag),this.on(t,"mouseup",this.dragEnd),this.on(t,"touchmove",this.drag),this.on(t,"touchend",this.dragEnd),this.drag(e)}},{key:"dragEnd",value:function(){this.dragStartActive=!1,this.dragEndActive=!1,this.dragSliderActive=!1,this.dragSliderCurrentPosition=null;var e=this.el().ownerDocument;this.off(e,"mousemove",this.drag),this.off(e,"mouseup",this.dragEnd),this.off(e,"touchmove",this.drag),this.off(e,"touchend",this.dragEnd)}},{key:"drag",value:function(e){if((this.dragStartActive||this.dragEndActive||this.dragSliderActive)&&Fu.dom.isSingleLeftClick(e)){var t=this.getPosition(e),n=t*this.player().duration();this.dragStartActive&&this.handleStartHandleDrag(n),this.dragEndActive&&this.handleEndHandleDrag(n),this.dragSliderActive&&this.handleSliderDrag(t)}}},{key:"handleStartHandleDrag",value:function(e){this.setStartTime(e)}},{key:"handleEndHandleDrag",value:function(e){this.setEndTime(e)}},{key:"handleSliderDrag",value:function(e){var t=(e-this.dragSliderCurrentPosition)*this.player().duration(),n=this.startTime+t,r=this.endTime+t;n<=0||r>=this.player().duration()||(this.dragSliderCurrentPosition=e,this.setStartTime(n),this.setEndTime(r))}},{key:"getPosition",value:function(e){return Fu.dom.getPointerPosition(this.el_.parentNode,e).x}},{key:"setStartOffset",value:function(){this.el_.style.marginLeft="".concat(this.getPercentage(this.startTime),"%")}},{key:"setWidth",value:function(){this.el_.style.width="".concat(this.getPercentage(this.endTime-this.startTime),"%")}},{key:"getPercentage",value:function(e){return+(e/this.player().duration()*100).toFixed(4)}}])&&VC(t.prototype,n),r&&VC(t,r),o}(Fu.getComponent("Component"));n(464);function YC(e){return(YC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function KC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function XC(e,t){return(XC=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function QC(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ZC(e);if(t){var i=ZC(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return JC(this,n)}}function JC(e,t){return!t||"object"!==YC(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function ZC(e){return(ZC=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ek=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&XC(e,t)}(o,e);var t,n,r,i=QC(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).addClass("cv-create-clip-seek-bar"),n}return t=o,(n=[{key:"initialize",value:function(e){var t=new GC(this.player(),e);this.addChild(t)}}])&&KC(t.prototype,n),r&&KC(t,r),o}(Fu.getComponent("SeekBar"));function tk(e){return(tk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rk(e,t){return(rk=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ik(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sk(e);if(t){var i=sk(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ok(this,n)}}function ok(e,t){return!t||"object"!==tk(t)&&"function"!=typeof t?ak(e):t}function ak(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sk(e){return(sk=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}ek.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},Fu.browser.IS_IOS||Fu.browser.IS_ANDROID||ek.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),Fu.registerComponent("CreateClipSeekBar",ek);var uk=Fu.getPlugin("plugin"),lk=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&rk(e,t)}(o,e);var t,n,r,i=ik(o);function o(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,e,t)).options=t,n.initCreateClipSeekBar=n.initCreateClipSeekBar.bind(ak(n)),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initCreateClipSeekBar)})),n}return t=o,(n=[{key:"initCreateClipSeekBar",value:function(){var e,t=null===(e=this.player.controlBar.getChild("ProgressControl"))||void 0===e?void 0:e.getChild("SeekBar");if(t){var n=!isNaN(this.options.startTime)&&this.options.startTime>=0?this.options.startTime:0,r=!isNaN(this.options.endTime)&&this.options.endTime<=this.player.duration()?this.options.endTime:this.player.duration(),i=Math.min(this.options.minDuration||5,this.player.duration());t.initialize({startTime:n,endTime:r,minDuration:i,onChangeStartTime:this.options.onChangeStartTime,onChangeEndTime:this.options.onChangeEndTime})}}},{key:"dispose",value:function(){this.player.off("loadedmetadata",this.initCreateClipSeekBar)}}])&&nk(t.prototype,n),r&&nk(t,r),o}(uk);function ck(e){return(ck="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hk(e,t){return(hk=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dk(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=yk(e);if(t){var i=yk(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return pk(this,n)}}function pk(e,t){return!t||"object"!==ck(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function yk(e){return(yk=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Fu.registerPlugin("createClipPlugin",lk);var mk=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&hk(e,t)}(o,e);var t,n,r,i=dk(o);function o(e,t){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),i.call(this,e,Object.assign(Object.assign({},t),{playbackRates:null,enableLocalCache:!1}))}return t=o,(n=[{key:"getPlayerClassName",value:function(){return"cv-create-clip-player"}},{key:"configurePlugins",value:function(){var e=this.options,t=e.startTime,n=e.endTime,r=e.minDuration,i=e.onChangeStartTime,o=e.onChangeEndTime;this.player.createClipPlugin({startTime:t,endTime:n,minDuration:r,onChangeStartTime:i,onChangeEndTime:o})}},{key:"getSeekBarName",value:function(){return"CreateClipSeekBar"}},{key:"getAnalyticsPlayerType",value:function(){return"create-clip-player"}}])&&fk(t.prototype,n),r&&fk(t,r),o}(g_);function gk(e){var t=i.a.useRef(),n=i.a.useRef();return i.a.useEffect((function(){n.current=new mk(t.current,e)}),[]),i.a.useEffect((function(){var t;null===(t=n.current)||void 0===t||t.trigger({type:"update:clip:start:time",time:e.startTime})}),[e.startTime]),i.a.useEffect((function(){var t;null===(t=n.current)||void 0===t||t.trigger({type:"update:clip:end:time",time:e.endTime})}),[e.endTime]),i.a.createElement("div",{ref:t})}n.d(t,"ClickViewPlayer",(function(){return PC})),n.d(t,"ClickViewCreateClipPlayer",(function(){return gk})),n.d(t,"Player",(function(){return xC}))},function(e,t,n){"use strict";n.r(t);var r=n(240),i=n.n(r),o=n(31),a=n.n(o),s=n(7),u=n.n(s),l=n(3),c=n.n(l),f=n(21),h=n.n(f),d=n(241),p=n.n(d),y=n(1),m=n(145),g=n(146),v=n.n(g),b=v()(),_=v()(),w=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,h()(c()(c()(t)),"referenceNode",void 0),h()(c()(c()(t)),"setReferenceNode",(function(e){e&&t.referenceNode!==e&&(t.referenceNode=e,t.forceUpdate())})),t}u()(t,e);var n=t.prototype;return n.componentWillUnmount=function(){this.referenceNode=null},n.render=function(){return y.createElement(b.Provider,{value:this.referenceNode},y.createElement(_.Provider,{value:this.setReferenceNode},this.props.children))},t}(y.Component),T=function(e){return Array.isArray(e)?e[0]:e},S=function(e){if("function"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return e.apply(void 0,n)}},E=function(e,t){if("function"==typeof e)return S(e,t);null!=e&&(e.current=t)},C={position:"absolute",top:0,left:0,opacity:0,pointerEvents:"none"},k={},x=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,h()(c()(c()(t)),"state",{data:void 0,placement:void 0}),h()(c()(c()(t)),"popperInstance",void 0),h()(c()(c()(t)),"popperNode",null),h()(c()(c()(t)),"arrowNode",null),h()(c()(c()(t)),"setPopperNode",(function(e){e&&t.popperNode!==e&&(E(t.props.innerRef,e),t.popperNode=e,t.updatePopperInstance())})),h()(c()(c()(t)),"setArrowNode",(function(e){t.arrowNode=e})),h()(c()(c()(t)),"updateStateModifier",{enabled:!0,order:900,fn:function(e){var n=e.placement;return t.setState({data:e,placement:n}),e}}),h()(c()(c()(t)),"getOptions",(function(){return{placement:t.props.placement,eventsEnabled:t.props.eventsEnabled,positionFixed:t.props.positionFixed,modifiers:a()({},t.props.modifiers,{arrow:a()({},t.props.modifiers&&t.props.modifiers.arrow,{enabled:!!t.arrowNode,element:t.arrowNode}),applyStyle:{enabled:!1},updateStateModifier:t.updateStateModifier})}})),h()(c()(c()(t)),"getPopperStyle",(function(){return t.popperNode&&t.state.data?a()({position:t.state.data.offsets.popper.position},t.state.data.styles):C})),h()(c()(c()(t)),"getPopperPlacement",(function(){return t.state.data?t.state.placement:void 0})),h()(c()(c()(t)),"getArrowStyle",(function(){return t.arrowNode&&t.state.data?t.state.data.arrowStyles:k})),h()(c()(c()(t)),"getOutOfBoundariesState",(function(){return t.state.data?t.state.data.hide:void 0})),h()(c()(c()(t)),"destroyPopperInstance",(function(){t.popperInstance&&(t.popperInstance.destroy(),t.popperInstance=null)})),h()(c()(c()(t)),"updatePopperInstance",(function(){t.destroyPopperInstance();var e=c()(c()(t)).popperNode,n=t.props.referenceElement;n&&e&&(t.popperInstance=new m.a(n,e,t.getOptions()))})),h()(c()(c()(t)),"scheduleUpdate",(function(){t.popperInstance&&t.popperInstance.scheduleUpdate()})),t}u()(t,e);var n=t.prototype;return n.componentDidUpdate=function(e,t){this.props.placement===e.placement&&this.props.referenceElement===e.referenceElement&&this.props.positionFixed===e.positionFixed&&p()(this.props.modifiers,e.modifiers,{strict:!0})?this.props.eventsEnabled!==e.eventsEnabled&&this.popperInstance&&(this.props.eventsEnabled?this.popperInstance.enableEventListeners():this.popperInstance.disableEventListeners()):this.updatePopperInstance(),t.placement!==this.state.placement&&this.scheduleUpdate()},n.componentWillUnmount=function(){E(this.props.innerRef,null),this.destroyPopperInstance()},n.render=function(){return T(this.props.children)({ref:this.setPopperNode,style:this.getPopperStyle(),placement:this.getPopperPlacement(),outOfBoundaries:this.getOutOfBoundariesState(),scheduleUpdate:this.scheduleUpdate,arrowProps:{ref:this.setArrowNode,style:this.getArrowStyle()}})},t}(y.Component);h()(x,"defaultProps",{placement:"bottom",eventsEnabled:!0,referenceElement:void 0,positionFixed:!1});var O=m.a.placements;function P(e){var t=e.referenceElement,n=i()(e,["referenceElement"]);return y.createElement(b.Consumer,null,(function(e){return y.createElement(x,a()({referenceElement:void 0!==t?t:e},n))}))}var R=n(106),A=n.n(R),I=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t=e.call.apply(e,[this].concat(r))||this,h()(c()(c()(t)),"refHandler",(function(e){E(t.props.innerRef,e),S(t.props.setReferenceNode,e)})),t}u()(t,e);var n=t.prototype;return n.componentWillUnmount=function(){E(this.props.innerRef,null)},n.render=function(){return A()(Boolean(this.props.setReferenceNode),"`Reference` should not be used outside of a `Manager` component."),T(this.props.children)({ref:this.refHandler})},t}(y.Component);function L(e){return y.createElement(_.Consumer,null,(function(t){return y.createElement(I,a()({setReferenceNode:t},e))}))}n.d(t,"Popper",(function(){return P})),n.d(t,"placements",(function(){return O})),n.d(t,"Manager",(function(){return w})),n.d(t,"Reference",(function(){return L}))}])}));