@clickview/player 1.48.0-rc.1 → 1.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -258,7 +258,7 @@ __p+='`),l}),a+=`';
258
258
  </svg>
259
259
  `;class Fx extends fxe{constructor(e,t){super(e,t)}createEl(){const e=pxe.prototype.createEl.call(this,"button",{className:this.buildCSSClass()},{type:"button",title:this.controlText_});return e.innerHTML=gxe,this.createControlTextEl(e),e}handleClick(e){var t;e.stopPropagation(),e.preventDefault(),(t=this.options_)!=null&&t.onClick&&this.options_.onClick()}buildCSSClass(){return"cv-remove-video-button"}}_e.registerComponent("removeVideoButton",Fx),Fx.prototype.controlText_="Remove from watch history";const Vee="cvplayer-playback-quality:v2",zee="cvplayer-localcache-playback-quality:v2";class Tl{static isQualityUserPreference(){const e=localStorage.getItem(Vee),t=localStorage.getItem(zee);return!!(e||t)}static getPlayerMode(e){var o,u,l,h,f,p,g;const t=((o=e.isFullscreen)==null?void 0:o.call(e))??!1,n=((u=e.usingPlugin)==null?void 0:u.call(e,"playerModePlugin"))?((h=(l=e.playerModePlugin())==null?void 0:l.isHovering)==null?void 0:h.call(l))??!1:!1,s=((f=e.usingPlugin)==null?void 0:f.call(e,"theatreModePlugin"))?((g=(p=e.theatreModePlugin())==null?void 0:p.getTheatreMode)==null?void 0:g.call(p))??!1:!1;return t?"fullscreen":n?"hover":s?"theatre":"default"}static findQualityLevel(e,t){for(let n=0;n<e.length;n++)if(e[n].quality<=t)return e[n];const i=e[e.length-1];if(!i)throw new Error("No quality levels available");return i}static enableQualityLevel(e,t){for(let i=0;i<e.length;i++){const n=e[i];n.enabled=n.id===t}}}var Ux=(r=>(r.Default="play",r.Hover="hover",r))(Ux||{});const vxe=_e.getPlugin("plugin"),Wee="cv-preview-mode",Gee="cv-force-16-9";class mxe extends vxe{constructor(e,t){super(e),this.hasSeeked=!1,this.buttonAdded=!1,this.mode=null,this.defaultDisplayMode="normal",this.onQualityReady=null,t!=null&&t.defaultDisplayMode&&(this.defaultDisplayMode=t.defaultDisplayMode),t!=null&&t.startTime&&(this.startTime=t.startTime),this.onSeek=this.onSeek.bind(this),this.player.one("seeking",this.onSeek)}onSeek(){this.hasSeeked=!0}dispose(){this.cleanupQualityListener(),this.player.off("seeking",this.onSeek),super.dispose()}getMode(){return this.mode}isHovering(){return this.mode==="hover"}setPlayerMode(e,t,i){this.player.trigger("flushprogress");const n=this.mode;if(this.mode=e,e==="hover"){this.buttonAdded||this.addButtons(t,i),this.player.addClass(Wee),this.applyAspectRatioFix(),this.enableSubtitles(),this.mute(),this.setLowQuality(),this.removeActivityTimeout(),this.player.trigger("resize");return}n==="hover"&&(this.applyDefaultModeLayout(),this.player.removeClass(Wee),this.player.removeClass(Gee),this.disableSubtitles(),this.unmute(),this.cleanupQualityListener(),this.restorePreviousQuality(),this.restoreActivityTimeout(),this.player.trigger("resize"),this.hasSeeked||(this.player.currentTime(this.startTime??0),this.hasSeeked=!1))}applyDefaultModeLayout(){var t,i,n,a;const e=(i=(t=this.player).usingPlugin)==null?void 0:i.call(t,"theatreModePlugin");this.defaultDisplayMode==="theatre"?(e&&((n=this.player.theatreModePlugin())==null||n.toggleTheatreMode(!0)),this.player.fill(!0)):(e&&((a=this.player.theatreModePlugin())==null||a.toggleTheatreMode(!1)),this.player.fluid(!0))}applyAspectRatioFix(){const e=()=>{const t=this.player.videoWidth(),i=this.player.videoHeight();if(t>0&&i>0){const n=t/i;Math.abs(n-16/9)<.01||this.player.addClass(Gee)}};this.player.readyState()>=1?e():this.player.one("loadedmetadata",e)}addButtons(e,t){const i=new Bx(this.player),n=new Hee(this.player,{onClickHandler:e}),a=new Fx(this.player,{onClick:t});t&&zh.isFunction(t)&&this.player.addChild(a),this.player.addChild(i),this.player.addChild(n),this.buttonAdded=!0}enableSubtitles(){this.player.dataLoaded(()=>this.player.persistSubtitleSettingsPlugin().previewModeSubtitles())}disableSubtitles(){this.player.dataLoaded(()=>this.player.persistSubtitleSettingsPlugin().applyUserPreferences())}mute(){this.player.ready(()=>{this.player.persistVolumePlugin().disable(),this.player.muted(!0)})}unmute(){this.player.ready(()=>{this.player.persistVolumePlugin().applyUserPreferences(),this.player.persistVolumePlugin().enable()})}setLowQuality(){this.player.dataLoaded(()=>{this.player.persistQualitySettingsPlugin().disable();const e=this.player.qualityLevels();if(e.length>0){this.switchToLowestQuality(e);return}this.cleanupQualityListener(),this.onQualityReady=()=>{this.onQualityReady=null,this.switchToLowestQuality(e)},e.one("change",this.onQualityReady)})}cleanupQualityListener(){this.onQualityReady&&(this.player.qualityLevels().off("change",this.onQualityReady),this.onQualityReady=null)}switchToLowestQuality(e){const t=e[e.length-1];t&&Tl.enableQualityLevel(e,t.id)}restorePreviousQuality(){this.player.dataLoaded(()=>{this.player.persistQualitySettingsPlugin().applyUserPreferences(),this.player.persistQualitySettingsPlugin().enable()})}removeActivityTimeout(){this.player.cache_.inactivityTimeout=this.player.options_.inactivityTimeout,this.player.options_.inactivityTimeout=0}restoreActivityTimeout(){this.player.options_.inactivityTimeout=this.player.cache_.inactivityTimeout}}_e.registerPlugin("playerModePlugin",mxe);const Kee={getStorage(){return window.localStorage?window.localStorage:window.sessionStorage?window.sessionStorage:Kee.getMemoryStorage()},getMemoryStorage(){const r=new Map;return{setItem(e,t){r.set(e,t)},getItem(e){return r.get(e)},removeItem(e){r.delete(e)},clear(){r.clear()},get length(){return r.size},key(e){return Array.from(r.values())[e]}}}};var Js=(r=>(r.LocalStorage="localStorage",r.SessionStorage="sessionStorage",r.MemoryStorage="memoryStorage",r))(Js||{});class $x{constructor(e){if(this.cachePrefix="_cv:",this.expireTime=3600,this.type=e.type,this.hasSupport=this.hasBrowserSupport(),!!this.hasSupport)try{this.type==="memoryStorage"?this.storage=Kee.getMemoryStorage():this.storage=window[this.type]}catch{}}isAvailable(){return this.hasSupport}get(e){if(!this.hasSupport)return;const t=this.storage.getItem(e);try{return JSON.parse(t)}catch{return t}}set(e,t){if(this.hasSupport)try{return this.storage.removeItem(e),typeof t!="string"?(this.storage.setItem(e,JSON.stringify(t)),!0):(this.storage.setItem(e,t),!0)}catch{return!1}}remove(e){if(this.hasSupport)return this.storage.removeItem(e)}length(){if(this.hasSupport)return this.storage.length}clear(){if(this.hasSupport)return this.storage.clear()}cacheSet(e,t,i=this.expireTime){this.cacheClean();const n={time:this.getCurrentTime()+i*1e3,data:typeof t<"u"&&t!==null&&t};return this.set(`${this.cachePrefix}${e}`,n)}cacheGet(e){const t=`${this.cachePrefix}${e}`,i=this.get(t);return i?this.isExpired(i)?(this.remove(t),null):i.data:null}cacheExists(e){const t=`${this.cachePrefix}${e}`,i=this.get(t);return i?this.isExpired(i)?(this.remove(t),!1):!0:!1}cacheRemove(e){return this.remove(`${this.cachePrefix}${e}`)}cacheFlush(){this.cacheClean()}cacheClean(){if(this.hasSupport)for(let e=0;e<this.storage.length;e++){const t=this.storage.key(e);if(t.indexOf(this.cachePrefix)===0){const i=this.get(t);i&&i.time&&this.isExpired(i)&&this.remove(t)}}}isExpired(e){return e.time<this.getCurrentTime()}getCurrentTime(){return new Date().getTime()}hasBrowserSupport(){if(this.type==="memoryStorage")return!0;try{return this.type in window&&window[this.type]!==null}catch{return!1}}}class yxe extends $x{static get Instance(){return this.instance||(this.instance=new this({type:"localStorage"}))}}class _xe extends $x{static get Instance(){return this.instance||(this.instance=new this({type:"sessionStorage"}))}}class Txe extends $x{static get Instance(){return this.instance||(this.instance=new this({type:"memoryStorage"}))}}const ms=yxe.Instance,Xee=_xe.Instance,Yee=Txe.Instance,Qee="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Jee(r,e,t,i){let n,a,s;const o=e||[0],u=(t=t||0)>>>3,l=i===-1?3:0;for(n=0;n<r.length;n+=1)s=n+u,a=s>>>2,o.length<=a&&o.push(0),o[a]|=r[n]<<8*(l+i*(s%4));return{value:o,binLen:8*r.length+t}}function qx(r,e,t){switch(e){case"UTF8":case"UTF16BE":case"UTF16LE":break;default:throw new Error("encoding must be UTF8, UTF16BE, or UTF16LE")}switch(r){case"HEX":return function(i,n,a){return(function(s,o,u,l){let h,f,p,g;if(s.length%2!=0)throw new Error("String of HEX type must be in byte increments");const _=o||[0],m=(u=u||0)>>>3,T=l===-1?3:0;for(h=0;h<s.length;h+=2){if(f=parseInt(s.substr(h,2),16),isNaN(f))throw new Error("String of HEX type contains invalid characters");for(g=(h>>>1)+m,p=g>>>2;_.length<=p;)_.push(0);_[p]|=f<<8*(T+l*(g%4))}return{value:_,binLen:4*s.length+u}})(i,n,a,t)};case"TEXT":return function(i,n,a){return(function(s,o,u,l,h){let f,p,g,_,m,T,S,w,R=0;const O=u||[0],C=(l=l||0)>>>3;if(o==="UTF8")for(S=h===-1?3:0,g=0;g<s.length;g+=1)for(f=s.charCodeAt(g),p=[],128>f?p.push(f):2048>f?(p.push(192|f>>>6),p.push(128|63&f)):55296>f||57344<=f?p.push(224|f>>>12,128|f>>>6&63,128|63&f):(g+=1,f=65536+((1023&f)<<10|1023&s.charCodeAt(g)),p.push(240|f>>>18,128|f>>>12&63,128|f>>>6&63,128|63&f)),_=0;_<p.length;_+=1){for(T=R+C,m=T>>>2;O.length<=m;)O.push(0);O[m]|=p[_]<<8*(S+h*(T%4)),R+=1}else for(S=h===-1?2:0,w=o==="UTF16LE"&&h!==1||o!=="UTF16LE"&&h===1,g=0;g<s.length;g+=1){for(f=s.charCodeAt(g),w===!0&&(_=255&f,f=_<<8|f>>>8),T=R+C,m=T>>>2;O.length<=m;)O.push(0);O[m]|=f<<8*(S+h*(T%4)),R+=2}return{value:O,binLen:8*R+l}})(i,e,n,a,t)};case"B64":return function(i,n,a){return(function(s,o,u,l){let h,f,p,g,_,m,T,S=0;const w=o||[0],R=(u=u||0)>>>3,O=l===-1?3:0,C=s.indexOf("=");if(s.search(/^[a-zA-Z0-9=+/]+$/)===-1)throw new Error("Invalid character in base-64 string");if(s=s.replace(/=/g,""),C!==-1&&C<s.length)throw new Error("Invalid '=' found in base-64 string");for(f=0;f<s.length;f+=4){for(_=s.substr(f,4),g=0,p=0;p<_.length;p+=1)h=Qee.indexOf(_.charAt(p)),g|=h<<18-6*p;for(p=0;p<_.length-1;p+=1){for(T=S+R,m=T>>>2;w.length<=m;)w.push(0);w[m]|=(g>>>16-8*p&255)<<8*(O+l*(T%4)),S+=1}}return{value:w,binLen:8*S+u}})(i,n,a,t)};case"BYTES":return function(i,n,a){return(function(s,o,u,l){let h,f,p,g;const _=o||[0],m=(u=u||0)>>>3,T=l===-1?3:0;for(f=0;f<s.length;f+=1)h=s.charCodeAt(f),g=f+m,p=g>>>2,_.length<=p&&_.push(0),_[p]|=h<<8*(T+l*(g%4));return{value:_,binLen:8*s.length+u}})(i,n,a,t)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch{throw new Error("ARRAYBUFFER not supported by this environment")}return function(i,n,a){return(function(s,o,u,l){return Jee(new Uint8Array(s),o,u,l)})(i,n,a,t)};case"UINT8ARRAY":try{new Uint8Array(0)}catch{throw new Error("UINT8ARRAY not supported by this environment")}return function(i,n,a){return Jee(i,n,a,t)};default:throw new Error("format must be HEX, TEXT, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function Zee(r,e,t,i){switch(r){case"HEX":return function(n){return(function(a,s,o,u){let l,h,f="";const p=s/8,g=o===-1?3:0;for(l=0;l<p;l+=1)h=a[l>>>2]>>>8*(g+o*(l%4)),f+="0123456789abcdef".charAt(h>>>4&15)+"0123456789abcdef".charAt(15&h);return u.outputUpper?f.toUpperCase():f})(n,e,t,i)};case"B64":return function(n){return(function(a,s,o,u){let l,h,f,p,g,_="";const m=s/8,T=o===-1?3:0;for(l=0;l<m;l+=3)for(p=l+1<m?a[l+1>>>2]:0,g=l+2<m?a[l+2>>>2]:0,f=(a[l>>>2]>>>8*(T+o*(l%4))&255)<<16|(p>>>8*(T+o*((l+1)%4))&255)<<8|g>>>8*(T+o*((l+2)%4))&255,h=0;h<4;h+=1)_+=8*l+6*h<=s?Qee.charAt(f>>>6*(3-h)&63):u.b64Pad;return _})(n,e,t,i)};case"BYTES":return function(n){return(function(a,s,o){let u,l,h="";const f=s/8,p=o===-1?3:0;for(u=0;u<f;u+=1)l=a[u>>>2]>>>8*(p+o*(u%4))&255,h+=String.fromCharCode(l);return h})(n,e,t)};case"ARRAYBUFFER":try{new ArrayBuffer(0)}catch{throw new Error("ARRAYBUFFER not supported by this environment")}return function(n){return(function(a,s,o){let u;const l=s/8,h=new ArrayBuffer(l),f=new Uint8Array(h),p=o===-1?3:0;for(u=0;u<l;u+=1)f[u]=a[u>>>2]>>>8*(p+o*(u%4))&255;return h})(n,e,t)};case"UINT8ARRAY":try{new Uint8Array(0)}catch{throw new Error("UINT8ARRAY not supported by this environment")}return function(n){return(function(a,s,o){let u;const l=s/8,h=o===-1?3:0,f=new Uint8Array(l);for(u=0;u<l;u+=1)f[u]=a[u>>>2]>>>8*(h+o*(u%4))&255;return f})(n,e,t)};default:throw new Error("format must be HEX, B64, BYTES, ARRAYBUFFER, or UINT8ARRAY")}}function ete(r){const e={outputUpper:!1,b64Pad:"=",outputLen:-1},t=r||{},i="Output length must be a multiple of 8";if(e.outputUpper=t.outputUpper||!1,t.b64Pad&&(e.b64Pad=t.b64Pad),t.outputLen){if(t.outputLen%8!=0)throw new Error(i);e.outputLen=t.outputLen}else if(t.shakeLen){if(t.shakeLen%8!=0)throw new Error(i);e.outputLen=t.shakeLen}if(typeof e.outputUpper!="boolean")throw new Error("Invalid outputUpper formatting option");if(typeof e.b64Pad!="string")throw new Error("Invalid b64Pad formatting option");return e}function Nf(r,e){return r<<e|r>>>32-e}function tte(r,e,t){return r^e^t}function bxe(r,e,t){return r&e^r&t^e&t}function Fg(r,e){const t=(65535&r)+(65535&e);return(65535&(r>>>16)+(e>>>16)+(t>>>16))<<16|65535&t}function n_(r,e,t,i,n){const a=(65535&r)+(65535&e)+(65535&t)+(65535&i)+(65535&n);return(65535&(r>>>16)+(e>>>16)+(t>>>16)+(i>>>16)+(n>>>16)+(a>>>16))<<16|65535&a}function Sxe(r){return[1732584193,4023233417,2562383102,271733878,3285377520]}function rte(r,e){let t,i,n,a,s,o,u;const l=[];for(t=e[0],i=e[1],n=e[2],a=e[3],s=e[4],u=0;u<80;u+=1)l[u]=u<16?r[u]:Nf(l[u-3]^l[u-8]^l[u-14]^l[u-16],1),o=u<20?n_(Nf(t,5),(h=i)&n^~h&a,s,1518500249,l[u]):u<40?n_(Nf(t,5),tte(i,n,a),s,1859775393,l[u]):u<60?n_(Nf(t,5),bxe(i,n,a),s,2400959708,l[u]):n_(Nf(t,5),tte(i,n,a),s,3395469782,l[u]),s=a,a=n,n=Nf(i,30),i=t,t=o;var h;return e[0]=Fg(t,e[0]),e[1]=Fg(i,e[1]),e[2]=Fg(n,e[2]),e[3]=Fg(a,e[3]),e[4]=Fg(s,e[4]),e}function Exe(r,e,t,i){let n;const a=15+(e+65>>>9<<4),s=e+t;for(;r.length<=a;)r.push(0);for(r[e>>>5]|=128<<24-e%32,r[a]=4294967295&s,r[a-1]=s/4294967296|0,n=0;n<r.length;n+=16)i=rte(r.slice(n,n+16),i);return i}class Cxe extends class{constructor(e,t,i){const n=i||{};if(this.t=t,this.i=n.encoding||"UTF8",this.numRounds=n.numRounds||1,isNaN(this.numRounds)||this.numRounds!==parseInt(this.numRounds,10)||1>this.numRounds)throw new Error("numRounds must a integer >= 1");this.s=e,this.o=[],this.h=0,this.u=!1,this.l=0,this.A=!1,this.p=[],this.R=[]}update(e){let t,i=0;const n=this.U>>>5,a=this.T(e,this.o,this.h),s=a.binLen,o=a.value,u=s>>>5;for(t=0;t<u;t+=n)i+this.U<=s&&(this.F=this.m(o.slice(t,t+n),this.F),i+=this.U);this.l+=i,this.o=o.slice(i>>>5),this.h=s%this.U,this.u=!0}getHash(e,t){let i,n,a=this.g;const s=ete(t);if(this.B){if(s.outputLen===-1)throw new Error("Output length must be specified in options");a=s.outputLen}const o=Zee(e,a,this.v,s);if(this.A&&this.Y)return o(this.Y(s));for(n=this.H(this.o.slice(),this.h,this.l,this.C(this.F),a),i=1;i<this.numRounds;i+=1)this.B&&a%32!=0&&(n[n.length-1]&=16777215>>>24-a%32),n=this.H(n,a,0,this.I(this.s),a);return o(n)}setHMACKey(e,t,i){if(!this.L)throw new Error("Variant does not support HMAC");if(this.u)throw new Error("Cannot set MAC key after calling update");const n=qx(t,(i||{}).encoding||"UTF8",this.v);this.M(n(e))}M(e){const t=this.U>>>3,i=t/4-1;let n;if(this.numRounds!==1)throw new Error("Cannot set numRounds with MAC");if(this.A)throw new Error("MAC key already set");for(t<e.binLen/8&&(e.value=this.H(e.value,e.binLen,0,this.I(this.s),this.g));e.value.length<=i;)e.value.push(0);for(n=0;n<=i;n+=1)this.p[n]=909522486^e.value[n],this.R[n]=1549556828^e.value[n];this.F=this.m(this.p,this.F),this.l=this.U,this.A=!0}getHMAC(e,t){const i=ete(t);return Zee(e,this.g,this.v,i)(this.N())}N(){let e;if(!this.A)throw new Error("Cannot call getHMAC without first setting MAC key");const t=this.H(this.o.slice(),this.h,this.l,this.C(this.F),this.g);return e=this.m(this.R,this.I(this.s)),e=this.H(t,this.g,this.U,e,this.g),e}}{constructor(e,t,i){if(e!=="SHA-1")throw new Error("Chosen SHA variant is not supported");super(e,t,i);const n=i||{};this.L=!0,this.Y=this.N,this.v=-1,this.T=qx(this.t,this.i,this.v),this.m=rte,this.C=function(a){return a.slice()},this.I=Sxe,this.H=Exe,this.F=[1732584193,4023233417,2562383102,271733878,3285377520],this.U=512,this.g=160,this.B=!1,n.hmacKey&&this.M((function(a,s,o,u){const l=a+" must include a value and format";if(!s)throw new Error(l);if(s.value===void 0||!s.format)throw new Error(l);return qx(s.format,s.encoding||"UTF8",o)(s.value)})("hmacKey",n.hmacKey,this.v))}}var bl=(r=>(r.CvApSoutheast1="cv-ap-southeast-1",r.CvApSoutheast2="cv-ap-southeast-2",r.CvEuWest1="cv-eu-west-1",r.CvNaWest1="cv-na-west-1",r))(bl||{});const wxe={systemName:bl.CvApSoutheast1},Axe={systemName:bl.CvApSoutheast2},xxe={systemName:bl.CvEuWest1},Ixe={systemName:bl.CvNaWest1},Pxe={CvApSoutheast1:wxe,CvApSoutheast2:Axe,CvEuWest1:xxe,CvNaWest1:Ixe};var ite=(r=>(r.Staff="Staff",r.Learner="Learner",r.Unknown="Unknown",r.System="System",r))(ite||{});const nte="r",a_="cv:r",s_="cv:r:e",o_="referrer",ate="cv:originalReferrer",jx=28800,ste=["internalReferrer"],Hx={getDecodedAttributionData(){const r=ms.cacheGet(a_);if(r&&Object.keys(r).length>0)return r;const e=ote();return e==null?void 0:e.decoded},getEncodedAttributionData(){const r=ms.cacheGet(s_);return r!=null&&r.length?r:ote().encoded},getProfileId(){const r=Hx.getDecodedAttributionData();return(r==null?void 0:r.profileId)??null},setAttributionData(r){if(!r)return;const e=ute(r);zx(e,r)},decodeRValue(r){if(r)try{const e=atob(r),t=JSON.parse(e);if(!Vx(t))throw Error(`Decoded R value is invalid: ${JSON.stringify(t)}`);return t}catch(e){const t=e instanceof Error?e.message:e==null?void 0:e.toString();console.error(t)}}};function ote(){const r=ms.cacheGet(a_),e=ms.cacheGet(s_);return Vx(r)?{encoded:e,decoded:r}:kxe()}function kxe(){ms.cacheRemove(a_),ms.cacheRemove(s_);const r=Oxe(),e=Hx.decodeRValue(r);if(e)return zx(r,e),{decoded:e,encoded:r};const t={internalReferrer:window.location.origin+window.location.pathname,originalReferrer:Rxe()},i=ute(t);return zx(i,t),{decoded:t,encoded:i}}function Vx(r){return!r||typeof r!="object"||Object.keys(r).length<ste.length?!1:ste.every(e=>typeof r[e]=="string")}function Rxe(){const r=ms.cacheGet(ate);if(r&&typeof r=="string")return r;let e=document.referrer??"";if(window.URLSearchParams){const t=new URLSearchParams(window.location.search),i=t.has(o_)&&t.get(o_);t.has(o_)&&t.get(o_)&&(e=i)}return e&&ms.cacheSet(ate,e,jx),e}function Oxe(){if(!window.URLSearchParams)return;const r=new URLSearchParams(window.location.search);if(r.has(nte))return r.get(nte)}function ute(r){if(Vx(r))try{return btoa(JSON.stringify(r))}catch{console.error(`R value could not be encoded: ${JSON.stringify(r)}`)}}function zx(r,e){try{ms.cacheSet(a_,e,jx),ms.cacheSet(s_,r,jx)}catch{console.error("Could not store attribution data in session storage")}}const lte=3,Dxe=5e3,Nxe=6,Wx={};class Mxe{constructor(e){this.key=e.toString()}getCount(){return Wx[this.key]||0}increment(){Wx[this.key]=this.getCount()+1}reset(){delete Wx[this.key]}shouldBreak(){return this.getCount()>=Nxe}}class Lxe{constructor(){this.attempt=0}async wait(){await new Promise(e=>setTimeout(e,Dxe*Math.pow(2,this.attempt))),this.attempt++}}async function Bxe(r,e){const t=new Lxe,i=new Mxe(r);async function n(){const a=await fetch(r,e);if(a.status>=500&&!i.shouldBreak())throw new Error(`Server error: ${a.status}`);return a.ok&&i.reset(),a}for(let a=1;a<=lte;a++)try{return await n()}catch(s){if(a>=lte||i.shouldBreak())throw s;i.increment(),await t.wait()}}var u_,Fxe=new Uint8Array(16);function Uxe(){if(!u_&&(u_=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!u_))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return u_(Fxe)}const $xe=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Gx(r){return typeof r=="string"&&$xe.test(r)}for(var ys=[],Kx=0;Kx<256;++Kx)ys.push((Kx+256).toString(16).substr(1));function qxe(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(ys[r[e+0]]+ys[r[e+1]]+ys[r[e+2]]+ys[r[e+3]]+"-"+ys[r[e+4]]+ys[r[e+5]]+"-"+ys[r[e+6]]+ys[r[e+7]]+"-"+ys[r[e+8]]+ys[r[e+9]]+"-"+ys[r[e+10]]+ys[r[e+11]]+ys[r[e+12]]+ys[r[e+13]]+ys[r[e+14]]+ys[r[e+15]]).toLowerCase();if(!Gx(t))throw TypeError("Stringified UUID is invalid");return t}function jxe(r,e,t){r=r||{};var i=r.random||(r.rng||Uxe)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,qxe(i)}function Hxe(r){if(!Gx(r))throw TypeError("Invalid UUID");return parseInt(r.substr(14,1),16)}const l_="cv:session:",Nc="cv:window:v2:",Ug=1e3*60*30,Vxe=4;function c_(r){if(r===Js.LocalStorage)return ms.isAvailable()?ms:Yee;if(r===Js.SessionStorage)return Xee.isAvailable()?Xee:Yee}function cte(r){return new Date().getTime()+r}function zxe(){return jxe()}function h_(r,e){return r+(e||"0")}function Wxe(r){return new Date().getTime()>r}function Gxe(r){return!(typeof r!="object"||typeof(r==null?void 0:r.id)!="string"||!Gx(r.id)||Hxe(r.id)!==Vxe||typeof(r==null?void 0:r.ttl)!="number"||(r==null?void 0:r.ttl)<=0||isNaN(r==null?void 0:r.ttl))}function d_(r,e,t){const i=c_(t),n=h_(r,e),a=i.get(n);return!Gxe(a)||Wxe(a==null?void 0:a.ttl)?null:a}function hte(r,e,t,i){const n=c_(t),a=h_(r,e),s={id:zxe(),ttl:cte(i)};return n.set(a,s),s}function f_(r,e,t,i,n){const a=c_(t),s=h_(r,e);a.set(s,{id:i.id,ttl:cte(n)})}function dte(r,e,t){const i=c_(t);if(!(i!=null&&i.isAvailable()))return;const n=h_(r,e);i.remove(n)}let p_=null;const g_={getClientSessionData(r){let e=d_(l_,r,Js.LocalStorage);e?f_(l_,r,Js.LocalStorage,e,Ug):e=hte(l_,r,Js.LocalStorage,Ug);let t=d_(Nc,r,Js.SessionStorage);return t?p_===null&&f_(Nc,r,Js.SessionStorage,t,Ug):t=hte(Nc,r,Js.SessionStorage,p_??Ug),{id:e.id,windowId:t.id}},resetClientSession(r){dte(l_,r,Js.LocalStorage),dte(Nc,r,Js.SessionStorage)},lockWindowSession(r,e){p_=e;const t=d_(Nc,r,Js.SessionStorage);t&&f_(Nc,r,Js.SessionStorage,t,e)},unlockWindowSession(r){p_=null;const e=d_(Nc,r,Js.SessionStorage);e&&f_(Nc,r,Js.SessionStorage,e,Ug)}},Wh={isObject(r){const e=typeof r;return e==="function"||e==="object"&&!!r},isFunction(r){return typeof r=="function"}},fte={safeUrlConcat(r,e){if(!r)return;let t=r;return r.endsWith("/")||(t+="/"),e&&(t+=e.startsWith("/")?e.slice(1):e),t}},Li={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},Yl="Unknown";function Mf(r,e,t){const i=e.exec(t)||[];let[n]=i;return n||(n=Yl),{name:r,version:n}}function Gh(r,e,t){if(!e)return{name:r,version:Yl};const i=e.exec(t),n=i&&i.length?i[0].trim():Yl;return{name:r,version:n}}function Kxe(r,e){const t={name:r,version:null};return Li.win2000.test(e)&&(t.version="2000"),Li.winXP.test(e)&&(t.version="XP"),Li.winVista.test(e)&&(t.version="Vista"),Li.win7.test(e)&&(t.version="7"),Li.win8.test(e)&&(t.version="8"),Li.win81.test(e)&&(t.version="8.1"),Li.win10.test(e)&&(t.version="10"),t.version||(t.version=Yl),t}const pte={getDeviceType(){const r=window.navigator.userAgent;return Li.mobileDevice.test(r)?Li.iphone.test(r)?"iPhone":Li.ipad.test(r)?"iPad":Li.android.test(r)?"Android":Li.blackberry.test(r)?"Blackberry":Li.windowsPhone.test(r)?"Windows Phone":Yl:"Desktop"},getOperatingSystem(){const r=window.navigator.userAgent;return Li.android.test(r)?Gh("Android",Li.androidVersion,r):Li.iphone.test(r)||Li.ipad.test(r)?Gh("iOS",Li.iosVersion,r):Li.linux.test(r)?Gh("Linux",null,r):Li.unix.test(r)?Gh("Unix",null,r):Li.mac.test(r)?Gh("Macintosh",Li.osxVersion,r):Li.windows.test(r)?Kxe("Windows",r):Li.blackberry.test(r)?Gh("BlackBerry",Li.blackberryVersion,r):Li.windowsPhone.test(r)?Gh("Windows Phone",Li.windowsPhoneVersion,r):{name:Yl,version:Yl}},getBrowser(){const r=window.navigator.userAgent;return Li.chrome.test(r)?Mf("Chrome",Li.generalVersion,r):Li.firefox.test(r)?Mf("Firefox",Li.generalVersion,r):Li.safari.test(r)?Mf("Safari",Li.generalVersion,r):Li.ie.test(r)?Mf("Internet Explorer",Li.ieVersion,r):Li.edge.test(r)?Mf("Edge",Li.edgeVersion,r):Li.opera.test(r)?Mf("Opera",Li.operaVersion,r):{name:Yl,version:Yl}},isTouchScreen(){return!!("ontouchstart"in window||navigator.maxTouchPoints)}},Xxe=28800,gte="cv:utmparams",Xx=[["source","utm_source"],["medium","utm_medium"],["campaign","utm_campaign"],["term","utm_term"],["content","utm_content"]],Yxe=Xx.reduce((r,[e])=>({...r,[e]:e}),{}),vte={getUtmParameters(){if(!window.URLSearchParams)return null;const r=new URLSearchParams(window.location.search),e={},t=([i,n])=>{r.has(n)&&(e[i]=r.get(n))};return Xx.forEach(t),mte(e)},setUtmParameters(r){if(!r)return;const e={},t=i=>{Yxe[i]&&(e[i]=r[i])};return Object.keys(r).forEach(t),mte(e)},getURLSearchParams(){if(!window.URLSearchParams)return null;const r=new URLSearchParams,e=vte.getUtmParameters();return e?(Xx.forEach(([t,i])=>{e[t]&&r.set(i,e[t])}),r):null}};function mte(r){if(Object.keys(r).length)return ms.cacheSet(gte,r,Xxe),r;const e=ms.cacheGet(gte);return e&&typeof e=="object"&&Object.keys(e).length?e:null}const Qxe={version:"2.3.0"},Jxe="zXJL9nOHxzDlMUDjiP41",yte="unknown";class Zxe{constructor(e){this.options=e,this.initialize()}initialize(){this.validateOptions(),this.options.logUtmParameters&&(this.utmParameters=vte.getUtmParameters()),this.options.logAttributionData&&(this.attributionData=Hx.getDecodedAttributionData())}get name(){return"CollectionApiClient"}async log(e){if(Array.isArray(e))return this.logBulk(e);this.shouldLog(e)&&(this.validateEvent(e),await this.postData(await this.formatData(e)))}async logBulk(e){const t=e.filter(n=>this.shouldLog(n));if(!t.length)return;t.forEach(n=>this.validateEvent(n));const i=await Promise.all(t.map(n=>this.formatData(n)));await this.postData(i)}validateOptions(){if(!Wh.isFunction(this.options.getUser))throw new Error("getUser option is required.")}shouldLog(e){return Wh.isFunction(this.options.shouldLog)?this.options.shouldLog(e):!0}async postData(e){const t=await this.getRegionalUrl(this.options.collectionApiUrls),i=JSON.stringify(e),n={"Content-Type":"application/json",...this.getSignatureHeader(i)};let a=fte.safeUrlConcat(t,"/v1/ingest");Array.isArray(e)&&(a=fte.safeUrlConcat(a,"/bulk"));try{const s=await Bxe(a,{method:"POST",mode:"cors",headers:n,body:i});s.ok||this.logError(new Error(`CollectionApiClient failed to log event. Status: ${s.status} ${s.statusText}`),!1,this.getResponseAsObject(s))}catch(s){this.logError(s)}}getResponseAsObject(e){return{headers:e.headers,ok:e.ok,redirected:e.redirected,status:e.status,statusText:e.statusText,type:e.type,url:e.url,body:e.text()}}getSignatureHeader(e){const t=new Cxe("SHA-1","TEXT",{hmacKey:{value:Jxe,format:"TEXT",encoding:"UTF8"}});return t.update(e),{"cv-analytics-signature":`${this.options.collectionApiClientId}.${t.getHash("B64")}`}}async getRegionalUrl(e){switch((await this.getRegion()).systemName){case bl.CvEuWest1:return e.cvEuWest1;case bl.CvApSoutheast2:return e.cvApSoutheast2;case bl.CvNaWest1:return e.cvNaWest1;case bl.CvApSoutheast1:default:return e.cvApSoutheast1}}validateEvent(e){typeof e.type!="string"&&this.logError(new Error("Event type is required."),!0),Wh.isObject(e.actionContext)||this.logError(new Error("Event actionContext is required."),!0),e.actionContext.entity||this.logError(new Error("Event actionContext entity is required."),!0)}async formatData(e){return{type:e.type,data:await this.getEventData(e),metadata:this.getEventMetadata(e)}}async getEventData(e){const t=e.actionContext,i=this.getPlatformMetadata(),n=await this.getUserData(),a=await this.getSessionData(),s={name:this.options.productName,version:this.options.productVersion};this.options.productVariant&&(s.variant=this.options.productVariant);const o={user:n,action:t,platform:i,product:s,session:a};this.utmParameters&&(o.utm=this.utmParameters);const u=this.extractData(e),l=Object.keys(o).map(f=>f.toLowerCase()),h=Object.keys(u).map(f=>f.toLowerCase());return l.forEach(f=>{h.includes(f)&&this.logError(new Error(`${f} is a reserved key.`),!0)}),{...o,...u}}extractData(e){return Wh.isFunction(this.options.formatData)?this.options.formatData(e):{[e.actionContext.entity]:e.data}}async getUserData(){var t,i,n;let e;try{e=await((i=(t=this.options).getProfileId)==null?void 0:i.call(t))}catch(a){this.logError(a)}try{const a=await this.options.getUser();return a!=null&&a.id?{id:a.id,role:((n=a.role)==null?void 0:n.toLowerCase())||yte,userGroup:(a.userGroup??ite.Unknown).toLowerCase(),yearGroup:this.normalizeYearGroup(a.yearGroup),profileId:e,customer:{id:a.customerId,name:a.customerName,customerGuid:a.customerGuid,crmId:a.crmId,country:a.countryCode,region:await this.getRegion(),openCustomer:!1,accessPolicy:a.accessPolicy}}:e?{profileId:e}:void 0}catch(a){this.logError(a)}}async getRegion(){let e=this.options.regionName;try{const t=await this.options.getUser();t!=null&&t.instanceRegion&&(e=t.instanceRegion)}catch(t){this.logError(t)}return e||this.logError(new Error("RegionName is not set."),!0),this.getRegionByName(e.toLowerCase())}async getSessionData(){try{const e=await this.options.getUser();return{...g_.getClientSessionData(e==null?void 0:e.id),authSessionId:e==null?void 0:e.sessionId}}catch(e){return console.error(e),g_.getClientSessionData(null)}}getPlatformMetadata(){var t,i;const e={url:window.location.href,referrer:document.referrer};return(t=this.attributionData)!=null&&t.internalReferrer&&(e.internalReferrer=this.attributionData.internalReferrer),(i=this.attributionData)!=null&&i.originalReferrer&&(e.originalReferrer=this.attributionData.originalReferrer),{browser:pte.getBrowser(),os:pte.getOperatingSystem(),request:e,screenResolution:`${window.screen.width}x${window.screen.height}`,viewportResolution:`${window.innerWidth}x${window.innerHeight}`}}getEventMetadata(e){return{client:{name:`${this.name}.ts`,version:Qxe.version,region:this.getRegionByName(this.options.regionName)},timestamp:new Date().toISOString(),eventVersion:e.eventVersion}}getRegionByName(e){let t;return Object.values(Pxe).forEach(i=>{i.systemName===e&&(t=i)}),t}normalizeYearGroup(e){return e?e.toLowerCase().split(" ").join("_"):yte}logError(e,t,...i){if(this.options.logError&&this.options.logError(e,...i),t)throw e}}var cr=(r=>(r.Stream="cv_product_stream",r.WebPlayerStream="cv_product_webplayer_stream",r.StreamProgress="cv_product_stream_progress",r.PreviewStreamProgress="cv_product_preview_stream_progress",r.StreamBuffering="cv_product_stream_buffering",r.Login="cv_product_login",r.LoginSsoRedirect="cv_product_login_sso_redirect",r.LoginFailed="cv_product_login_failed",r.Search="cv_product_search",r.InstantSearch="cv_product_instant_search",r.SearchEmptyResult="cv_product_search_empty_result",r.Filter="cv_product_search_filter",r.SearchLanding="cv_product_search_landing",r.Share="cv_product_share",r.Unshare="cv_product_unshare",r.WorkspaceAdd="cv_product_tv_add",r.Rename="cv_product_rename",r.Move="cv_product_move",r.Sort="cv_product_sort",r.Create="cv_product_create",r.Delete="cv_product_delete",r.Associate="cv_product_associate",r.Dissociate="cv_product_dissociate",r.Edit="cv_product_edit",r.Approve="cv_product_approve",r.Reject="cv_product_reject",r.Disable="cv_product_disable",r.Upload="cv_product_upload",r.Download="cv_product_download",r.Navigate="cv_product_navigate",r.Click="cv_product_click",r.Suggest="cv_product_suggest",r.EditAssoc="cv_product_edit_assoc",r.Play="cv_product_play",r.Favourite="cv_product_favourite",r.Follow="cv_product_follow",r.Prefer="cv_product_prefer",r.Print="cv_product_print",r.Copy="cv_product_copy",r.Activate="cv_product_activate",r.VerifyEmail="cv_product_verify_email",r.ChangePassword="cv_product_change_password",r.ManageGroup="cv_product_manage_group",r.Export="cv_product_export",r.SendEmail="cv_product_send_email",r.Publish="cv_product_publish",r.Submit="cv_product_submit",r.Complete="cv_product_complete",r.Archive="cv_product_archive",r.Promote="cv_product_promote",r.Demote="cv_product_demote",r.BulkAction="cv_product_bulk_action",r.Remove="cv_product_remove",r.Dismiss="cv_product_dismiss",r.Open="cv_product_open",r.Hide="cv_product_hide",r.PageView="cv_product_page_view",r.Select="cv_product_select",r.SwitchCustomer="cv_product_switch_customer",r.Focus="cv_product_focus",r.Blur="cv_product_blur",r.Hover="cv_product_hover",r.Unhover="cv_product_unhover",r.SetAccess="cv_product_set_access",r.AddToLocalCache="cv_product_add_to_lc",r.ResolveWarning="cv_product_resolve_warning",r.DismissWarning="cv_product_dismiss_warning",r))(cr||{}),Cn=(r=>(r.Folder="folder",r.Video="video",r.Rating="rating",r.Series="series",r.Library="library",r.Resource="resource",r.Tag="tag",r.Subtitle="subtitle",r.Chapter="chapter",r.Resolution="resolution",r.PlaybackSpeed="playback_speed",r.Device="device",r.Restriction="restriction",r.Interactive="interactive",r.Interaction="interaction",r.PDF="pdf",r.CustomerSetting="customer_setting",r.UserSetting="user_setting",r.LibraryRequest="staff_request",r.Logo="logo",r.Pagination="pagination",r.Thumbnail="thumbnail",r.Banner="banner",r.Link="link",r.Playlist="playlist",r.Playlists="playlists",r.Person="person",r.Company="company",r.Classroom="classroom",r.ClassroomGroup="classroom_group",r.Classification="classification",r.ShareLink="share_link",r.DirectShare="direct_share",r.Upload="upload",r.SearchResults="search_results",r.SearchSuggestion="search_suggestion",r.Audience="audience",r.User="user",r.Clip="clip",r.UserChannel="user_channel",r.Widget="widget",r.Url="url",r.SocialShare="social_share",r.Presentation="presentation",r.BatchJob="batch_job",r.DeepLink="deep_link",r.Feedback="feedback",r.AppLink="app_link",r.SignUp="sign_up",r.FileGeneratorJob="file_generator_job",r.ExportLibraries="export_libraries",r.Product="product",r.Customer="customer",r.SpecialEvent="special_event",r.Region="region",r.ProductTip="product_tip",r.Livestream="livestream",r.DevicesCta="devices_cta",r.Integration="integration",r.Faq="faq",r.MixedMedia="mixed_media",r.TableOfContents="table_of_contents",r.Author="author",r.Glance="glance",r.Filter="filter",r.NotificationSetting="notification_setting",r.Transcript="transcript",r.CurriculumCode="curriculum_code",r.Assign="assign",r.PartnerProfile="partner_profile",r))(Cn||{}),Kh=(r=>(r.TopNav="top_nav",r.LeftNav="left_nav",r.Footer="footer",r.Popup="popup",r.Banner="banner",r.VideoList="video_list",r.VideoListItem="video_list_item",r.VideoListHeader="video_header",r.VideoThumbnail="video_thumbnail",r.ExpandableVideoThumbnail="expandable_video_thumbnail",r.VideoItemPreview="video_item_preview",r.InteractiveItemPreview="interactive_item_preview",r.ClipItemPreview="clip_item_preview",r.VideoDetails="video_details",r.InteractiveDetails="interactive_details",r.ClipDetails="clip_details",r.VideoDetailsHeader="video_details_header",r.EditVideoDetails="edit_video_details",r.EditInteractiveVideoDetails="edit_interactive_video_details",r.EditClipDetails="edit_clip_details",r.EditVideoChapters="edit_video_chapters",r.EditVideoResources="edit_video_resources",r.PreviewVideoResources="preview_video_resources",r.VideoUpload="video_upload",r.VideoRequest="video_request",r.Pagination="pagination",r.LibraryHeader="library_header",r.LibraryTiles="library_tiles",r.LibraryRequestDetails="staff_request_details",r.Libraries="libraries",r.SubFolderList="sub_folder_list",r.AwaitingReviewVideoListHeader="awaiting_review_video_list_header",r.AwaitingReviewVideoItem="awaiting_review_video_item",r.PastReleasesHeader="past_releases_header",r.MigrationWarnings="migration_warnings",r.PlaylistListHeader="playlist_list_header",r.PlaylistListItem="playlist_list_item",r.SeriesListItem="series_list_item",r.SeriesWithVideos="series_with_videos",r.PlaylistWithVideos="playlist_with_videos",r.Dropdown="dropdown",r.ViewCurriculumLinks="view_curriculum_links",r.SearchBar="search_bar",r.InstantSearch="instant_search",r.SearchFilters="search_filters",r.FeaturedSeriesSearchResult="featured_series_search_result",r.ExchangeSearchGroupItem="exchange_search_group_item",r.StaffManager="staff_manager",r.StaffManagerListItem="staff_manager_list_item",r.StudentManager="student_manager",r.ViewStudentVideos="view_student_videos",r.StudentManagerListItem="student_manager_list_item",r.EditUser="edit_user",r.UserAuditLog="user_audit_log",r.BulkUserActionsWizard="bulk_user_actions_wizard",r.BulkUserUploadWizard="bulk_user_upload_wizard",r.Classroom="classroom",r.ClassroomsList="classrooms_list",r.ClassroomsListItem="classrooms_list_item",r.ManageClassroomStudents="manage_classroom_students",r.ManageClassroomStudentListItem="manage_classroom_student_list_item",r.ManageClassroomGroups="manage_classroom_groups",r.ManageClassroomGroupListItem="manage_classroom_group_list_item",r.ManageClassroomTeachers="manage_classroom_teachers",r.ManageClassroomTeacherListItem="manage_classroom_teachers_list_item",r.ArchivedClassrooms="archived_classrooms",r.PreviewInteractive="preview_interactive",r.PreviewSharedInteractive="preview_shared_interactive",r.PreviewInteractiveQuestions="preview_interactive_questions",r.EditInteractive="edit_interactive",r.EditInteractiveDetails="edit_interactive_details",r.PlaySharedInteractive="play_shared_interactive",r.PlayInteractive="play_interactive",r.InteractiveListItem="interactive_list_item",r.DeleteInteractive="delete_interactive",r.NewInteractive="new_interactive",r.CopyInteractive="copy_interactive",r.UnpublishInteractive="unpublish_interactive",r.ShareInteractive="share_interactive",r.PlayPage="play_page",r.Player="player",r.FloatingPlayer="floating_player",r.InteractivePlayer="interactive_player",r.EmbeddedPlayer="embedded_player",r.CreateClipPlayer="create_clip_player",r.PlayClip="play_clip",r.PlaySharedClip="play_shared_clip",r.ClipListItem="clip_list_item",r.ContentUpdatesBanner="content_updates_banner",r.ContentUpdatesClassificationBanner="content_updates_classification_banner",r.PreferencesSettings="preferences_settings",r.NotificationSettings="notification_settings",r.TopicsOnboarding="topics_onboarding",r.MyUploads="my_uploads",r.MyVideos="my_videos",r.Playlists="playlists",r.SlidingList="sliding_list",r.HeroBannerItem="hero_banner_item",r.SlidingListItem="sliding_list_item",r.ClassificationListItem="classification_list_item",r.ClassificationComingSoon="classification_coming_soon",r.ClassificationHero="classification_hero",r.ClassificationFooter="classification_footer",r.Classification="classification",r.PresentationClassifications="presentation_classifications",r.Dashboard="dashboard",r.TeachingLevelBanner="teaching_level_banner",r.DiscoverFooter="discover_footer",r.ProductBanner="product_banner",r.UserOptions="user_options",r.MagicTabs="magic_tabs",r.Settings="settings",r.StudentFeed="student_feed",r.MyShares="my_shares",r.SharedByMe="shared_by_me",r.SharedWithMe="shared_with_me",r.Insights="insights",r.Error="error_view",r.UpgradeForm="upgrade_form",r.ClassroomGuide="classroom_guide",r.TeachingResources="teaching_resources",r.ResourcesGuidancePopup="resources_guidance_popup",r.InteractivesGuidancePopup="interactives_guidance_popup",r.CurriculumGuidancePopup="curriculum_guidance_popup",r.TopVideos="top_videos",r.VideoViewsList="video_views_list",r.VideoOverview="video_overview",r.StudentReachPopup="student_reach_popup",r.VideoHighlight="video_highlight",r.ClassroomViewsPopup="classroom_views_popup",r.GiveFeedbackPopup="give_feedback_popup",r.LibraryRequestSettings="library_request_settings",r.OpenInAppPrompt="open_in_app_prompt",r.UseAppButton="use_app_button",r.Launchpad="launchpad",r.EditableSubjectPreferencesWidget="editable_subject_preferences_widget",r.ThumbnailHeroMediaWidget="thumbnail_hero_media_widget",r.ThumbnailFixedListMediaLargeWidget="thumbnail_fixed_list_media_large",r.FilterSlidingPillListSmallWidget="filter_sliding_pill_list_small",r.CircleLogoSlidingListWidget="circle_logo_sliding_list_widget",r.RectangularLogoSlidingListWidget="rectangular_logo_sliding_list_widget",r.HeroBannerSmallWidget="hero_banner_small",r.EventIconSlidingListWidget="event_icon_sliding_list_widget",r.FaqQuestionWidget="faq_question_widget",r.FaqQuestionAccordionWidget="faq_question_accordion_widget",r.SubjectStatsWidgetItem="subject_stats_widget_item",r.AuthorReviewerWidget="author_reviewer_widget",r.ThumbnailFixedListMediaSmallWidget="thumbnail_fixed_list_media_small_widget",r.ThumbnailFixedListFolderSmallWidget="thumbnail_fixed_list_folder_small_widget",r.ThumbnailVerticalListWidget="thumbnail_vertical_list_widget",r.ThumbnailFixedListSmallWidget="thumbnail_fixed_list_small_widget",r.PosterFixedListLargeWidget="poster_fixed_list_large_widget",r.CurriculumResourcesAccordionWidget="curriculum_resources_accordion_widget",r.SearchCurriculumCodeWidget="search_curriculum_code_widget",r.ExchangeLinksWidget="exchange_links_widget",r.TableOfContents="table_of_contents",r.SignUpPopup="sign_up_popup",r.SignUpPage="sign_up_page",r.TrialBanner="trial_banner",r.InviteColleaguePopup="invite_colleague_popup",r.AuthProspectSelect="auth_prospect_select",r.GatedBanner="gated_banner",r.GatedEmptyState="gated_empty_state",r.GatedPopup="gated_popup",r.WelcomePopup="welcome_popup",r.WatchHistoryLanding="watch_history_landing",r.MyFavouritesLanding="my_favourites_landing",r.MyVideoLanding="my_videos_landing",r.PlaylistsLanding="playlists_landing",r.MySharesLanding="myshares_landing",r.PremiumFeatures="premium_features",r.NotificationsDropdown="notifications_dropdown",r.CalendarNav="calendar_nav",r.CalendarDay="calendar_day",r.CalendarPopup="calendar_popup",r.RegionMap="region_map",r.OnboardingSelectRoleScreen="onboarding_select_role_screen",r.OnboardingSchoolLevelScreen="onboarding_school_level_screen",r.OnboardingAudiencePreferencesScreen="onboarding_audience_preferences_screen",r.OnboardingSelectCurriculumScreen="onboarding_select_curriculum_screen",r.OnboardingSubjectsScreen="onboarding_subjects_screen",r.ProductTips="product_tips",r.LivestreamBookingForm="booking_form",r.DateRangeFilter="date_range_selector",r.AudienceFilter="audience_filter",r.AssignFlowView="assign_flow_view",r.ContentPartnerDashboard="content_partner_dashboard",r.ContentPartnerDashboardVideoBanner="content_partner_dashboard_video_banner",r.Global="global",r))(Kh||{}),Ql=(r=>(r.Start="start",r.Complete="complete",r.Save="save",r.Discard="discard",r.Next="next",r.Back="back",r))(Ql||{}),Xh=(r=>(r.Start="start",r.Finish="finish",r.Terminate="terminate",r.Play="play",r.Pause="pause",r.Playback="playback",r.NextChapter="next_chapter",r.PreviousChapter="previous_chapter",r.FullScreenEnter="full_screen_enter",r.FullScreenExit="full_screen_exit",r.ChangeResolution="change_resolution",r.ChangeSpeed="change_speed",r.ChangeDevice="change_device",r.EnableTheatreMode="enable_theatre_mode",r.DisableTheatreMode="disable_theatre_mode",r.ShowTranscript="show_transcript",r.HideTranscript="hide_transcript",r))(Xh||{}),_te=(r=>(r.Embedded="embedded",r))(_te||{}),Tte=(r=>(r.FeatureUserChannelVideo="feature_user_channel_video",r.RemoveFromUserChannelPlaylist="remove_from_user_channel_playlist",r.ShareClip="share_clip",r.ViewOriginalVideo="view_original_video",r.ShareInteractive="share_interactive",r.DeleteInteractiveVideo="delete_interactive_video",r.CopyInteractiveVideo="copy_interactive_video",r.EditInteractiveVideo="edit_interactive_video",r.PrintAsWorksheet="print_as_worksheet",r.PreviewInteractiveVideo="preview_interactive_video",r.ViewResults="view_results",r.ViewInsights="view_insights",r.ViewUsage="view_usage",r.MoveToAnotherFolder="move_to_another_folder",r.CreateInteractiveVideo="create_interactive_video",r.ShareVideo="share_video",r.EditVideo="edit_video",r.DownloadVideo="download_video",r.AddToExchange="add_to_exchange",r.AddToUserChannel="add_to_user_channel",r.CreateClip="create_clip",r.FlagVideo="flag_video",r.AddToLibrary="add_to_library",r.AddToWorkspace="add_to_workspace",r.AddToPlaylist="add_to_playlist",r.RemoveFromPlaylist="remove_from_playlist",r.AddCurriculumLink="add_curriculum_link",r.ViewCurriculumLinks="view_curriculum_links",r.OpenInCurator="open_in_curator",r.ManageVideoAccess="manage_video_access",r.Approve="approve",r.AddToLocalCache="add_to_local_cache",r.OpenInLibraryEditor="open_in_library_editor",r.OpenInClickView="open_in_clickview",r.PlayClip="play_clip",r.EditClip="edit_clip",r.DeleteClip="delete_clip",r.EditVideoDetails="edit_video_details",r.DeleteVideo="delete_video",r.ManageAccess="manage_access",r.SuggestEdit="suggest_edit",r.RemoveFromWatchHistory="remove_from_watch_history",r.ShowTranscript="show_transcript",r.HideTranscript="hide_transcript",r.TranscriptTimepoint="transcript_timepoint",r))(Tte||{}),Yx=(r=>(r.FileSelect="file_select",r.DragDrop="drag_drop",r))(Yx||{}),Qx=(r=>(r.On="on",r.Off="off",r))(Qx||{}),$g=(r=>(r.SearchTranscript="search_transcript",r.NextResult="next_result",r.PreviousResult="previous_result",r.ResetResults="reset_results",r))($g||{}),Jx=(r=>(r.FileSelect="file-select",r.DragDrop="drag-drop",r))(Jx||{}),Mc=(r=>(r.Video="videos",r.Clip="clips",r.Interactive="interactives",r.Folder="categories",r.Series="series",r.Tags="tags",r.Subjects="subjects",r))(Mc||{}),Jl=(r=>(r[r.V1=1]="V1",r[r.V2=2]="V2",r[r.V3=3]="V3",r[r.V4=4]="V4",r[r.V5=5]="V5",r))(Jl||{});const Vn={passthrough(r){return r}},Qr={allow:()=>!0,restrict:()=>!1},eIe={getShareData(r){var o,u,l,h;const{id:e,search:t,pagePositionIndex:i,shareId:n,shareType:a}=r,s={id:e,search:t,pagePositionIndex:i,shareId:n,shareType:a};return(o=r.video)!=null&&o.id&&(s.video={id:r.video.id}),(u=r.clip)!=null&&u.id&&(s.clip={id:r.clip.id},(l=r.clip.video)!=null&&l.id&&(s.video={id:(h=r.clip.video)==null?void 0:h.id})),r.shareCount!==void 0&&(s.shareCount=r.shareCount),r.embedDetails&&(s.embedDetails=r.embedDetails),s}},Lf={getUploadData(r,e){const{entity:t}=e.actionContext;if(t===Cn.Video)return Lf.formatVideoUpload(r,e);if(t===Cn.Resource||t===Cn.Subtitle)return Lf.formatResourceUpload(r);if(t===Cn.Banner||t===Cn.Thumbnail||t===Cn.MixedMedia)return r;throw new Error("Upload data event not correctly formatted.")},formatVideoUpload(r,e){const{workflowPhase:t}=e.actionContext;if(t===Ql.Start)return Lf.getStartVideoUploadData(r);if(t===Ql.Discard)return Lf.getDiscardVideoUploadData(r);if(t===Ql.Complete)return Lf.getCompleteUploadData(r)},getStartVideoUploadData(r){return!r||!r.length?[]:(r instanceof FileList&&(r=Array.from(r)),r.map(e=>({fileName:e.name,size:e.size,type:e.type,count:r.length})))},getDiscardVideoUploadData(r){const e=t=>{const{type:i,name:n,status:a,cvUpload:s}=t.file,o={fileName:n,count:Array.isArray(r)?r.length:1,type:i,status:a};return t.progress&&(o.progress=t.progress.toFixed(2)),s&&(o.uploadId=s.uploadId),o};return Array.isArray(r)?r.map(t=>e(t)):[e(r)]},getCompleteUploadData(r){return!r||!r.length?[]:r.map(e=>{const{fileName:t,libraryId:i,folderId:n,autoCaption:a}=e;return{fileName:t,libraryId:i,folderId:n,autoCaption:a,count:r.length}})},formatResourceUpload(r){const{id:e,name:t}=r,i={id:e,name:t};return Wh.isObject(r.metadata)&&(i.type=r.metadata.type),i}},tIe={[cr.Navigate]:Qr.restrict,[cr.Click]:Qr.allow,[cr.Search]:Qr.allow,[cr.InstantSearch]:Qr.allow,[cr.Play]:Qr.allow,[cr.Stream]:Qr.allow,[cr.WebPlayerStream]:Qr.allow,[cr.StreamProgress]:Qr.allow,[cr.PreviewStreamProgress]:Qr.allow,[cr.StreamBuffering]:Qr.allow,[cr.Rename]:Qr.allow,[cr.Move]:Qr.allow,[cr.Create]:Qr.allow,[cr.Delete]:Qr.allow,[cr.Associate]:Qr.allow,[cr.Dissociate]:Qr.allow,[cr.Filter]:Qr.allow,[cr.Sort]:Qr.allow,[cr.Approve]:Qr.allow,[cr.Reject]:Qr.allow,[cr.Disable]:Qr.allow,[cr.Upload]:Qr.allow,[cr.Download]:Qr.allow,[cr.SetAccess]:Qr.allow,[cr.AddToLocalCache]:Qr.restrict,[cr.Share]:Qr.allow,[cr.Unshare]:Qr.allow,[cr.Edit]:Qr.allow,[cr.Suggest]:Qr.allow,[cr.Favourite]:Qr.allow,[cr.WorkspaceAdd]:Qr.allow,[cr.ResolveWarning]:Qr.allow,[cr.DismissWarning]:Qr.allow,[cr.EditAssoc]:Qr.allow,[cr.Follow]:Qr.allow,[cr.Print]:Qr.allow,[cr.Copy]:Qr.allow,[cr.Activate]:Qr.allow,[cr.VerifyEmail]:Qr.allow,[cr.ChangePassword]:Qr.allow,[cr.Export]:Qr.allow,[cr.SendEmail]:Qr.allow,[cr.Publish]:Qr.allow,[cr.Submit]:Qr.allow,[cr.Complete]:Qr.allow,[cr.Archive]:Qr.allow,[cr.Promote]:Qr.allow,[cr.Demote]:Qr.allow,[cr.BulkAction]:Qr.allow,[cr.Remove]:Qr.allow,[cr.Dismiss]:Qr.allow,[cr.Open]:Qr.allow,[cr.Hide]:Qr.allow,[cr.PageView]:Qr.allow,[cr.Select]:Qr.allow,[cr.SwitchCustomer]:Qr.allow,[cr.Focus]:Qr.allow,[cr.Blur]:Qr.allow,[cr.Hover]:Qr.allow,[cr.Unhover]:Qr.allow},rIe={[cr.Search]:Vn.passthrough,[cr.InstantSearch]:Vn.passthrough,[cr.Play]:Vn.passthrough,[cr.Stream]:Vn.passthrough,[cr.StreamProgress]:Vn.passthrough,[cr.PreviewStreamProgress]:Vn.passthrough,[cr.StreamBuffering]:Vn.passthrough,[cr.Click]:Vn.passthrough,[cr.Filter]:Vn.passthrough,[cr.Sort]:Vn.passthrough,[cr.SetAccess]:Vn.passthrough,[cr.Approve]:Vn.passthrough,[cr.Reject]:Vn.passthrough,[cr.Create]:Vn.passthrough,[cr.Delete]:Vn.passthrough,[cr.Rename]:Vn.passthrough,[cr.Move]:Vn.passthrough,[cr.Edit]:Vn.passthrough,[cr.Share]:eIe.getShareData,[cr.Disable]:Vn.passthrough,[cr.Suggest]:Vn.passthrough,[cr.Upload]:Lf.getUploadData,[cr.ResolveWarning]:Vn.passthrough,[cr.DismissWarning]:Vn.passthrough,[cr.Follow]:Vn.passthrough,[cr.Print]:Vn.passthrough,[cr.Copy]:Vn.passthrough},bte={[cr.Search]:()=>"search",[cr.InstantSearch]:()=>"search",[cr.Filter]:()=>"filter",[cr.Stream]:()=>Cn.Video},Ste={user:"target_user",product:"target_product"},iIe={[cr.StreamProgress]:!0,[cr.WebPlayerStream]:!0,[cr.PreviewStreamProgress]:!0,[cr.StreamBuffering]:!0},Ete={shouldLog(r){return!!tIe[r.type](r)},formatData(r){const e=rIe[r.type],t=Wh.isFunction(e)?e(r.data,r):r.data;if(iIe[r.type])return t;let i=r.actionContext.entity;return Wh.isFunction(bte[r.type])&&(i=bte[r.type](r)),Ste[i]&&(i=Ste[i]),{[i]:t}}},nIe=1e3*60*60*8;class aIe{constructor(e){this.options=e,this.initialize()}logStream(){const e=`v:${this.options.videoId}`,t=this.getPlayerMetrics();ms.cacheExists(e)||(this.collectionApiClient.log({type:cr.WebPlayerStream,actionContext:this.getActionContext(),data:{...this.getAnalyticsData(),player:t},eventVersion:Jl.V3}),ms&&ms.cacheSet(e,null,300))}logVideoProgress(e,t,i){const n=this.getAnalyticsData(),a=this.getPlayerMetrics(),s=i?cr.PreviewStreamProgress:cr.StreamProgress,o=e.map(u=>({type:s,actionContext:this.getActionContext(),data:{...n,player:a,progress:u},eventVersion:Jl.V2}));for(const u of t)o.push({type:cr.StreamBuffering,actionContext:this.getActionContext(),data:{...n,player:a,buffering:u},eventVersion:Jl.V2});this.collectionApiClient.log(o)}logUserAction(e,t){const i={...this.getAnalyticsData(),...e},n={...this.getActionContext(),...t};this.collectionApiClient.log({type:t.actionType,data:i,actionContext:n,eventVersion:t.eventVersion||Jl.V2})}getAnalyticsData(){const e={video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache,isQualityUserPreference:Tl.isQualityUserPreference()},...this.options.additionalAnalyticsData||{}};this.options.shareId&&(e.video.shareId=this.options.shareId);const t=this.getEntityType();return t===Cn.Interactive?e.interactive={id:+this.options.mediaId}:t===Cn.Clip&&(e.clip={id:+this.options.mediaId}),e}initialize(){this.setupCollectionApiClient(),g_.lockWindowSession(this.options.userId,nIe),this.options.player.one("dispose",()=>g_.unlockWindowSession(this.options.userId))}setupCollectionApiClient(){this.collectionApiClient=new Zxe({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:()=>this.getCurrentUser(),shouldLog:Ete.shouldLog,formatData:Ete.formatData})}async getCurrentUser(){return{id:this.options.userId,customerId:this.options.customerId,sessionId:this.options.authSessionId}}getActionContext(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?_te.Embedded:void 0,workflowPhase:void 0}}getEntityType(){switch(this.options.mediaType){case"MasterVideo":return Cn.Video;case"MasterInteractive":return Cn.Interactive;case"MasterClip":return Cn.Clip}}getLocationContext(){switch(this.options.playerType){case"player":return Kh.Player;case"interactive-player":return Kh.InteractivePlayer;case"create-clip-player":return Kh.CreateClipPlayer}}getPlayerMetrics(){var i,n;const e=this.options.player,t=(i=e.qualityLevels)==null?void 0:i.call(e);return{mode:Tl.getPlayerMode(e),width:e.currentWidth(),height:e.currentHeight(),quality:(n=t==null?void 0:t[t==null?void 0:t.selectedIndex])==null?void 0:n.id}}}class Zx extends Error{constructor(e,t){super((t==null?void 0:t.title)||"Ajax error"),this.url=e,this.response=t}}class sIe{constructor(){this.tokens={gateway:null}}async get(e,t){return await this.parseResponse(await fetch(e,{method:"GET",mode:"cors",headers:this.getHeaders(t)}))}async delete(e,t){await fetch(e,{method:"DELETE",headers:this.getHeaders(t)})}async post(e,t,i,n=!0){const a=await fetch(e,{method:"POST",headers:this.getHeaders(i),body:t,mode:"cors"});if(n)return await this.parseResponse(a)}async put(e,t,i,n=!0){const a=await fetch(e,{method:"PUT",headers:this.getHeaders(i),body:t,mode:"cors"});if(n)return await this.parseResponse(a)}setToken(e,t){this.tokens[e]=t}hasToken(e){return!!this.tokens[e]}getHeaders(e={}){const t={"Content-Type":"application/json"};return this.tokens[e.tokenName]&&(t.authorization=`Bearer ${this.tokens[e.tokenName]}`),t}async parseResponse(e){if(e.status===404)return null;if(!e.ok){let i;try{i=await e.json()}catch{throw new Zx(e.url)}finally{throw new Zx(e.url,i)}}return await e.json()}}const eI=new sIe;var v_={exports:{}},Cte;function oIe(){return Cte||(Cte=1,(function(r,e){function t(u){if(u&&typeof u=="object"){var l=u.which||u.keyCode||u.charCode;l&&(u=l)}if(typeof u=="number")return s[u];var h=String(u),f=i[h.toLowerCase()];if(f)return f;var f=n[h.toLowerCase()];if(f)return f;if(h.length===1)return h.charCodeAt(0)}t.isEventKey=function(l,h){if(l&&typeof l=="object"){var f=l.which||l.keyCode||l.charCode;if(f==null)return!1;if(typeof h=="string"){var p=i[h.toLowerCase()];if(p)return p===f;var p=n[h.toLowerCase()];if(p)return p===f}else if(typeof h=="number")return h===f;return!1}},e=r.exports=t;var i=e.code=e.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},n=e.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};/*!
260
260
  * Programatically add the following
261
- */for(a=97;a<123;a++)i[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)i[a-48]=a;for(a=1;a<13;a++)i["f"+a]=a+111;for(a=0;a<10;a++)i["numpad "+a]=a+96;var s=e.names=e.title={};for(a in i)s[i[a]]=a;for(var o in n)i[o]=n[o]})(v_,v_.exports)),v_.exports}var uIe=oIe();const Ei=wi(uIe);function lIe(r){document[r.fsApi_.fullscreenEnabled]&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen())}function cIe(r){const e=r.theatreModePlugin().getTheatreMode();r.theatreModePlugin().toggleTheatreMode(!e,{shouldLog:!0})}function hIe(r){const e=r.volume(),t=r.lastVolume_();if(e===0){const i=t<.1?.1:t;r.volume(i),r.muted(!1)}else r.muted(!r.muted())}function wte(r){r.paused()?r.play():r.pause()}function m_(r,e){r.currentTime(r.currentTime()+e)}function Ate(r,e){e>0&&r.muted()&&r.muted(!1),r.volume(r.volume()+e)}function dIe(r){const e=r.target,t=["video-js","vjs-tech"];return e.tagName.toLowerCase()==="video"||!!t.find(i=>e.classList.contains(i))}const xte={f:lIe,m:hIe,k:wte,space:wte,t:cIe,left:r=>m_(r,-5),right:r=>m_(r,5),j:r=>m_(r,-10),l:r=>m_(r,10),up:r=>Ate(r,.05),down:r=>Ate(r,-.05)};function fIe(r,e,t){if(r.ctrlKey||r.metaKey||r.altKey)return;const i=Ei(r),a=["up","down"].includes(i);if(a&&!r.shiftKey||!a&&r.shiftKey||i==="t"&&!t.allowTheatreMode||i==="f"&&!t.allowFullscreen||!xte[i])return;xte[i](e,r);const s=dIe(r),o=["space"].includes(i);(s||o)&&(r.preventDefault(),r.stopPropagation())}var Ite=(r=>(r.PhysicallyChapteredVideo="physically-chaptered-video",r))(Ite||{});const pIe={version:"1.48.0-rc.0"};function Ti(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Bf(r,e){return Bf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},Bf(r,e)}function Ar(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Bf(r,e)}var tI,Pte;function gIe(){if(Pte)return tI;Pte=1,tI=r;function r(e,t){var i,n=null;try{i=JSON.parse(e,t)}catch(a){n=a}return[n,i]}return tI}var vIe=gIe();const mIe=wi(vIe);var y_={exports:{}},rI,kte;function yIe(){if(kte)return rI;kte=1;var r=Yd(),e=function(n,a){return a===void 0&&(a=!1),function(s,o,u){if(s){n(s);return}if(o.statusCode>=400&&o.statusCode<=599){var l=u;if(a)if(r.TextDecoder){var h=t(o.headers&&o.headers["content-type"]);try{l=new TextDecoder(h).decode(u)}catch{}}else l=String.fromCharCode.apply(null,new Uint8Array(u));n({cause:l});return}n(null,u)}};function t(i){return i===void 0&&(i=""),i.toLowerCase().split(";").reduce(function(n,a){var s=a.split("="),o=s[0],u=s[1];return o.trim()==="charset"?u.trim():n},"utf-8")}return rI=e,rI}var Rte;function _Ie(){if(Rte)return y_.exports;Rte=1;var r=Yd(),e=KK(),t=YK();o.httpHandler=yIe();/**
261
+ */for(a=97;a<123;a++)i[String.fromCharCode(a)]=a-32;for(var a=48;a<58;a++)i[a-48]=a;for(a=1;a<13;a++)i["f"+a]=a+111;for(a=0;a<10;a++)i["numpad "+a]=a+96;var s=e.names=e.title={};for(a in i)s[i[a]]=a;for(var o in n)i[o]=n[o]})(v_,v_.exports)),v_.exports}var uIe=oIe();const Ei=wi(uIe);function lIe(r){document[r.fsApi_.fullscreenEnabled]&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen())}function cIe(r){const e=r.theatreModePlugin().getTheatreMode();r.theatreModePlugin().toggleTheatreMode(!e,{shouldLog:!0})}function hIe(r){const e=r.volume(),t=r.lastVolume_();if(e===0){const i=t<.1?.1:t;r.volume(i),r.muted(!1)}else r.muted(!r.muted())}function wte(r){r.paused()?r.play():r.pause()}function m_(r,e){r.currentTime(r.currentTime()+e)}function Ate(r,e){e>0&&r.muted()&&r.muted(!1),r.volume(r.volume()+e)}function dIe(r){const e=r.target,t=["video-js","vjs-tech"];return e.tagName.toLowerCase()==="video"||!!t.find(i=>e.classList.contains(i))}const xte={f:lIe,m:hIe,k:wte,space:wte,t:cIe,left:r=>m_(r,-5),right:r=>m_(r,5),j:r=>m_(r,-10),l:r=>m_(r,10),up:r=>Ate(r,.05),down:r=>Ate(r,-.05)};function fIe(r,e,t){if(r.ctrlKey||r.metaKey||r.altKey)return;const i=Ei(r),a=["up","down"].includes(i);if(a&&!r.shiftKey||!a&&r.shiftKey||i==="t"&&!t.allowTheatreMode||i==="f"&&!t.allowFullscreen||!xte[i])return;xte[i](e,r);const s=dIe(r),o=["space"].includes(i);(s||o)&&(r.preventDefault(),r.stopPropagation())}var Ite=(r=>(r.PhysicallyChapteredVideo="physically-chaptered-video",r))(Ite||{});const pIe={version:"1.48.0-rc.2"};function Ti(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Bf(r,e){return Bf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,i){return t.__proto__=i,t},Bf(r,e)}function Ar(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,Bf(r,e)}var tI,Pte;function gIe(){if(Pte)return tI;Pte=1,tI=r;function r(e,t){var i,n=null;try{i=JSON.parse(e,t)}catch(a){n=a}return[n,i]}return tI}var vIe=gIe();const mIe=wi(vIe);var y_={exports:{}},rI,kte;function yIe(){if(kte)return rI;kte=1;var r=Yd(),e=function(n,a){return a===void 0&&(a=!1),function(s,o,u){if(s){n(s);return}if(o.statusCode>=400&&o.statusCode<=599){var l=u;if(a)if(r.TextDecoder){var h=t(o.headers&&o.headers["content-type"]);try{l=new TextDecoder(h).decode(u)}catch{}}else l=String.fromCharCode.apply(null,new Uint8Array(u));n({cause:l});return}n(null,u)}};function t(i){return i===void 0&&(i=""),i.toLowerCase().split(";").reduce(function(n,a){var s=a.split("="),o=s[0],u=s[1];return o.trim()==="charset"?u.trim():n},"utf-8")}return rI=e,rI}var Rte;function _Ie(){if(Rte)return y_.exports;Rte=1;var r=Yd(),e=KK(),t=YK();o.httpHandler=yIe();/**
262
262
  * @license
263
263
  * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
264
264
  * Copyright (c) 2014 David Björklund
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickview/player",
3
- "version": "1.48.0-rc.1",
3
+ "version": "1.48.0",
4
4
  "description": "ClickView Player",
5
5
  "main": "dist/player-app.js",
6
6
  "type": "module",