import{a as B}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-Y625Z7UC.js";function V(y,m){function E(t){C.put.call(this,t)}function S(t){this.parent=t,this.byStart=[{start:-1,end:-1}],this.byEnd=[{start:-1,end:-1}],this.animating=[],this.endIndex=this.startIndex=0,this.previousUpdateTime=-1,this.count=1}function P(t,e){return function(){if(n.plugin.debug)return t.apply(this,arguments);try{return t.apply(this,arguments)}catch(r){n.plugin.errors.push({plugin:e,thrown:r,source:t.toString()}),this.emit("pluginerror",n.plugin.errors)}}}if(m.addEventListener){var x=Array.prototype,I=Object.prototype,L=x.forEach,O=x.slice,_=I.hasOwnProperty,U=I.toString,A=y.Popcorn,w=[],N=!1,T={events:{hash:{},apis:{}}},j=function(){return y.requestAnimationFrame||y.webkitRequestAnimationFrame||y.mozRequestAnimationFrame||y.oRequestAnimationFrame||y.msRequestAnimationFrame||function(t){y.setTimeout(t,16)}}(),C={put:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])}},n=function(t,e){return new n.p.init(t,e||null)};n.version="1.5.6",n.isSupported=!0,n.instances=[],n.p=n.prototype={init:function(t,e){var r,i=this;if(typeof t=="function"){if(m.readyState==="complete")t(m,n);else if(w.push(t),!N){N=!0;var s=function(){m.removeEventListener("DOMContentLoaded",s,!1);for(var u=0,p=w.length;u0;f--)v[f].end>a&&i.removeTrackEvent(v[f]._id);for(v=0;va&&i.removeTrackEvent(g[v]._id);i.data.trackEvents.byEnd.push({start:o,end:o}),i.data.trackEvents.byStart.push({start:o,end:o})},i.media.addEventListener("durationchange",i.data.durationChange,!1)),i.options.frameAnimation?(i.data.timeUpdate=function(){n.timeUpdate(i,{}),n.forEach(n.manifest,function(a,o){if(p=i.data.running[o]){h=p.length;for(var g=0;g=1?d():i.media.addEventListener("loadedmetadata",d,!1),this}}},n.p.init.prototype=n.p,n.byId=function(t){for(var e=n.instances,r=e.length,i=0;i=0;r--)i=t.data.running[e][r],i._natives.end.call(t,null,i),t.emit("trackend",n.extend({},i,{plugin:i.type,type:"trackend"}));return t}},enable:function(t,e){if(t.data.disabled[e]){if(t.data.disabled[e]=!1,e in n.registryByName&&t.data.running[e])for(var r=t.data.running[e].length-1,i;r>=0;r--)i=t.data.running[e][r],i._natives.start.call(t,null,i),t.emit("trackstart",n.extend({},i,{plugin:i.type,type:"trackstart",track:i}));return t}},destroy:function(t){var e=t.data.events,r=t.data.trackEvents,i,s,d,u;for(s in e){i=e[s];for(d in i)delete i[d];e[s]=null}for(u in n.registryByName)n.removePlugin(t,u);r.byStart.length=0,r.byEnd.length=0,t.isDestroyed||(t.data.timeUpdate&&t.media.removeEventListener("timeupdate",t.data.timeUpdate,!1),t.isDestroyed=!0),n.instances.splice(n.instances.indexOf(t),1)}}),n.guid.counter=1,n.extend(n.p,function(){var t={};return n.forEach("load play pause currentTime playbackRate volume duration preload playbackRate autoplay loop controls muted buffered readyState seeking paused played seekable ended".split(/\s+/g),function(e){t[e]=function(r){var i;return typeof this.media[e]=="function"?(r!=null&&/play|pause/.test(e)&&(this.media.currentTime=n.util.toSeconds(r)),this.media[e](),this):r!=null?(i=this.media[e],this.media[e]=r,i!==r&&this.emit("attrchange",{attribute:e,previousValue:i,currentValue:r}),this):this.media[e]}}),t}()),n.forEach("enable disable".split(" "),function(t){n.p[t]=function(e){return n[t](this,e)}}),n.extend(n.p,{roundTime:function(){return Math.round(this.media.currentTime)},exec:function(t,e,r){var i=arguments.length,s="trackadded",d,u;try{u=n.util.toSeconds(t)}catch{}if(typeof u=="number"&&(t=u),typeof t=="number"&&i===2)r=e,e=t,t=n.guid("cue");else if(i===1)e=-1;else if(d=this.getTrackEvent(t))this.data.trackEvents.remove(t),E.end(this,d),n.removeTrackEvent.ref(this,t),s="cuechange",typeof t=="string"&&i===2&&(typeof e=="number"&&(r=d._natives.start),typeof e=="function"&&(r=e,e=d.start));else if(i>=2){if(typeof e=="string"){try{u=n.util.toSeconds(e)}catch{}e=u}typeof e=="number"&&(r=r||n.nop()),typeof e=="function"&&(r=e,e=-1)}return i={id:t,start:e,end:e+1,_running:!1,_natives:{start:r||n.nop,end:n.nop,type:"cue"}},d&&(i=n.extend(d,i)),s==="cuechange"?(i._id=i.id||i._id||n.guid(i._natives.type),this.data.trackEvents.add(i),E.start(this,i),this.timeUpdate(this,null,!0),n.addTrackEvent.ref(this,i),this.emit(s,n.extend({},i,{id:t,type:s,previousValue:{time:d.start,fn:d._natives.start},currentValue:{time:e,fn:r||n.nop},track:d}))):n.addTrackEvent(this,i),this},mute:function(t){return t=t==null||t===!0?"muted":"unmuted",t==="unmuted"&&(this.media.muted=!1,this.media.volume=this.data.state.volume),t==="muted"&&(this.data.state.volume=this.media.volume,this.media.muted=!0),this.emit(t),this},unmute:function(t){return this.mute(t==null?!1:!t)},position:function(){return n.position(this.media)},toggle:function(t){return n[this.data.disabled[t]?"enable":"disable"](this,t)},defaults:function(t,e){return n.isArray(t)?(n.forEach(t,function(r){for(var i in r)this.defaults(i,r[i])},this),this):(this.options.defaults||(this.options.defaults={}),this.options.defaults[t]||(this.options.defaults[t]={}),n.extend(this.options.defaults[t],e),this)}}),n.Events={UIEvents:"blur focus focusin focusout load resize scroll unload",MouseEvents:"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave click dblclick",Events:"loadstart progress suspend emptied stalled play pause error loadedmetadata loadeddata waiting playing canplay canplaythrough seeking seeked timeupdate ended ratechange durationchange volumechange"},n.Events.Natives=n.Events.UIEvents+" "+n.Events.MouseEvents+" "+n.Events.Events,T.events.apiTypes=["UIEvents","MouseEvents","Events"],function(t,e){for(var r=T.events.apiTypes,i=t.Natives.split(/\s+/g),s=0,d=i.length;s-1&&this.media.addEventListener(t,function(p){if(r.data.events[t])for(d=r.data.events[t].slice();d.length;)d.shift().call(r,p)},!1),this},unlisten:function(t,e){var r,i=this.data.events[t];if(i){if(typeof e=="string"){for(r=0;rt.media.currentTime&&e.start<=t.media.currentTime&&!e._running&&(e._running=!0,t.data.running[e._natives.type].push(e),t.data.disabled[e._natives.type]||(e._natives.start.call(t,null,e),t.emit("trackstart",n.extend({},e,{plugin:e._natives.type,type:"trackstart",track:e}))))},E.end=function(t,e){var r;(e.end<=t.media.currentTime||e.start>t.media.currentTime)&&e._running&&(r=t.data.running[e._natives.type],e._running=!1,r.splice(r.indexOf(e),1),t.data.disabled[e._natives.type]||(e._natives.end.call(t,null,e),t.emit("trackend",n.extend({},e,{plugin:e._natives.type,type:"trackend",track:e}))))},S.prototype.where=function(t){return(this.parent.getTrackEvents()||[]).filter(function(e){var r,i;if(!t)return!0;for(r in t)if(i=t[r],e[r]&&e[r]===i||e._natives[r]&&e._natives[r]===i)return!0;return!1})},S.prototype.add=function(t){var e=this.byStart,r=this.byEnd,i;for(t&&t._id&&this.parent.data.history.push(t._id),t.start=n.util.toSeconds(t.start,this.parent.options.framerate),t.end=n.util.toSeconds(t.end,this.parent.options.framerate),i=e.length-1;i>=0;i--)if(t.start>=e[i].start){e.splice(i+1,0,t);break}for(e=r.length-1;e>=0;e--)if(t.end>r[e].end){r.splice(e+1,0,t);break}i<=this.parent.data.trackEvents.startIndex&&t.start<=this.parent.data.trackEvents.previousUpdateTime&&this.parent.data.trackEvents.startIndex++,e<=this.parent.data.trackEvents.endIndex&&t.end-1;)e=this.byStart[s],r=this.byEnd[s],e._id||(u.push(e),p.push(r)),e._id&&(e._id!==t&&u.push(e),r._id!==t&&p.push(r),e._id===t&&(d=s)),s++;if(i=this.animating.length,s=0,i)for(;--i>-1;)e=this.animating[s],e._id||c.push(e),e._id&&e._id!==t&&c.push(e),s++;for(d<=this.startIndex&&this.startIndex--,d<=this.endIndex&&this.endIndex--,this.byStart=u,this.byEnd=p,this.animating=c,this.count--,i=this.parent.data.history.length,s=0;sr&&l._running===!1&&(l._running=!0,t.data.running[a].push(l),t.data.disabled[a]||(i.start.call(t,e,l),t.emit("trackstart",n.extend({},l,{plugin:a,type:"trackstart",track:l})))),u++;else{n.removeTrackEvent(t,l._id);return}}else if(i>r){for(;s.byStart[u]&&s.byStart[u].start>r;)if(l=s.byStart[u],a=(i=l._natives)&&i.type,!i||h[a]||t[a])l._running===!0&&(l._running=!1,o=t.data.running[a],o.splice(o.indexOf(l),1),t.data.disabled[a]||(i.end.call(t,e,l),t.emit("trackend",n.extend({},l,{plugin:a,type:"trackend",track:l})))),u--;else{n.removeTrackEvent(t,l._id);return}for(;s.byEnd[d]&&s.byEnd[d].end>r;)if(l=s.byEnd[d],a=(i=l._natives)&&i.type,!i||h[a]||t[a])l.start<=r&&l._running===!1&&(l._running=!0,t.data.running[a].push(l),t.data.disabled[a]||(i.start.call(t,e,l),t.emit("trackstart",n.extend({},l,{plugin:a,type:"trackstart",track:l})))),d--;else{n.removeTrackEvent(t,l._id);return}}s.endIndex=d,s.startIndex=u,s.previousUpdateTime=r,s.byStart.length=0)n.error("'"+t+"' is a protected function name");else{var i=typeof e=="function",s=["start","end","type","manifest"],d=["_setup","_teardown","start","end","frame"],u={},p=function(l,a){return l=l||n.nop,a=a||n.nop,function(){l.apply(this,arguments),a.apply(this,arguments)}};n.manifest[t]=r=r||e.manifest||{},d.forEach(function(l){e[l]=P(e[l]||n.nop,t)});var c=function(l,a){if(!a)return this;if(a.ranges&&n.isArray(a.ranges))return n.forEach(a.ranges,function(f){f=n.extend({},a,f),delete f.ranges,this[t](f)},this),this;var o=a._natives={},g="",v;return n.extend(o,l),a._natives.type=a._natives.plugin=t,a._running=!1,o.start=o.start||o.in,o.end=o.end||o.out,a.once&&(o.end=p(o.end,function(){this.removeTrackEvent(a._id)})),o._teardown=p(function(){var f=O.call(arguments),k=this.data.running[o.type];f.unshift(null),f[1]._running&&k.splice(k.indexOf(a),1)&&o.end.apply(this,f),f[1]._running=!1,this.emit("trackend",n.extend({},a,{plugin:o.type,type:"trackend",track:n.getTrackEvent(this,a.id||a._id)}))},o._teardown),o._teardown=p(o._teardown,function(){this.emit("trackteardown",n.extend({},a,{plugin:t,type:"trackteardown",track:n.getTrackEvent(this,a.id||a._id)}))}),a.compose=a.compose||[],typeof a.compose=="string"&&(a.compose=a.compose.split(" ")),a.effect=a.effect||[],typeof a.effect=="string"&&(a.effect=a.effect.split(" ")),a.compose=a.compose.concat(a.effect),a.compose.forEach(function(f){g=n.compositions[f]||{},d.forEach(function(k){o[k]=p(o[k],g[k])})}),a._natives.manifest=r,"start"in a||(a.start=a.in||0),!a.end&&a.end!==0&&(a.end=a.out||Number.MAX_VALUE),_.call(a,"toString")||(a.toString=function(){var f=["start: "+a.start,"end: "+a.end,"id: "+(a.id||a._id)];return a.target!=null&&f.push("target: "+a.target),t+" ( "+f.join(", ")+" )"}),a.target||(v="options"in r&&r.options,a.target=v&&"target"in v&&v.target),!a._id&&a._natives&&(a._id=n.guid(a._natives.type)),a instanceof E?(a._natives&&(a._id=a.id||a._id||n.guid(a._natives.type),a._natives._setup&&(a._natives._setup.call(this,a),this.emit("tracksetup",n.extend({},a,{plugin:a._natives.type,type:"tracksetup",track:a})))),this.data.trackEvents.add(a),E.start(this,a),this.timeUpdate(this,null,!0),a._id&&n.addTrackEvent.ref(this,a)):n.addTrackEvent(this,a),n.forEach(l,function(f,k){s.indexOf(k)===-1&&this.on(k,f)},this),this};n.p[t]=u[t]=function(l,a){var o,g;if(l&&!a)a=l;else if(o=this.getTrackEvent(l)){g=a;var v={},f;for(f in o)_.call(g,f)&&_.call(o,f)&&(v[f]=o[f]);if(o._natives._update)this.data.trackEvents.remove(o),_.call(a,"start")&&(o.start=a.start),_.call(a,"end")&&(o.end=a.end),E.end(this,o),i&&e.call(this,o),o._natives._update.call(this,o,a),this.data.trackEvents.add(o),E.start(this,o);else return n.extend(o,a),this.data.trackEvents.remove(l),o._natives._teardown&&o._natives._teardown.call(this,o),n.removeTrackEvent.ref(this,l),i?c.call(this,e.call(this,o),o):(o._id=o.id||o._id||n.guid(o._natives.type),o._natives&&o._natives._setup&&(o._natives._setup.call(this,o),this.emit("tracksetup",n.extend({},o,{plugin:o._natives.type,type:"tracksetup",track:o}))),this.data.trackEvents.add(o),E.start(this,o),this.timeUpdate(this,null,!0),n.addTrackEvent.ref(this,o)),this.emit("trackchange",{id:o.id,type:"trackchange",previousValue:v,currentValue:o,track:o}),this;return o._natives.type!=="cue"&&this.emit("trackchange",{id:o.id,type:"trackchange",previousValue:v,currentValue:g,track:o}),this}else a.id=l;return this.data.running[t]=this.data.running[t]||[],o=n.extend({},this.options.defaults&&this.options.defaults[t]||{},a),c.call(this,i?e.call(this,o):e,o),this},r&&n.extend(e,{manifest:r});var h={fn:u[t],definition:e,base:e,parents:[],name:t};return n.registry.push(n.extend(u,h,{type:t})),n.registryByName[t]=h,u}},n.plugin.errors=[],n.plugin.debug=n.version==="1.5.6",n.removePlugin=function(t,e){if(!e){if(e=t,t=n.p,n.protect.natives.indexOf(e.toLowerCase())>=0){n.error("'"+e+"' is a protected function name");return}var r=n.registry.length,i;for(i=0;i-1&&(s=s.split(";"),d=0,e&&typeof e=="number"&&(d=parseFloat(s[1],10)/e),r[i]=parseInt(s[0],10)+d),i=r[0],{1:parseFloat(i,10),2:parseInt(i,10)*60+parseFloat(r[1],10),3:parseInt(i,10)*3600+parseInt(r[1],10)*60+parseFloat(r[2],10)}[r.length||1])}},n.p.cue=n.p.exec,n.protect={natives:function(t){return Object.keys?Object.keys(t):function(e){var r,i=[];for(r in e)_.call(e,r)&&i.push(r);return i}(t)}(n.p).map(function(t){return t.toLowerCase()})},n.forEach({listen:"on",unlisten:"off",trigger:"emit",exec:"cue"},function(t,e){var r=n.p[e];n.p[e]=function(){return typeof console<"u"&&console.warn&&(console.warn("Deprecated method '"+e+"', "+(t==null?"do not use.":"use '"+t+"' instead.")),n.p[e]=r),n.p[t].apply(this,[].slice.call(arguments))}}),y.Popcorn=n}else for(y.Popcorn={isSupported:!1},x="byId forEach extend effects error guid sizeOf isArray nop position disable enable destroyaddTrackEvent removeTrackEvent getTrackEvents getTrackEvent getLastTrackEventId timeUpdate plugin removePlugin compose effect xhr getJSONP getScript".split(/\s+/);x.length;)y.Popcorn[x.shift()]=function(){}}var F=B(()=>{});F();export{V as default};