@npo/player 2.0.0-beta.2 → 2.0.0-beta.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.
@@ -1,128 +0,0 @@
1
- (function(Or,Nr){typeof exports=="object"&&typeof module<"u"?Nr(exports):typeof define=="function"&&define.amd?define(["exports"],Nr):(Or=typeof globalThis<"u"?globalThis:Or||self,Nr(Or.NpoAudioPlayer={}))})(this,function(Or){"use strict";var Fb=Object.defineProperty;var Ub=(Or,Nr,Yi)=>Nr in Or?Fb(Or,Nr,{enumerable:!0,configurable:!0,writable:!0,value:Yi}):Or[Nr]=Yi;var De=(Or,Nr,Yi)=>Ub(Or,typeof Nr!="symbol"?Nr+"":Nr,Yi);const Nr=Object.freeze({VOD:"vod",LIVE:"live",LIVE_NO_DVR:"live-no-dvr",NONE:"none"}),Yi=Object.freeze({INLINE:"inline",FULLSCREEN:"fullscreen",PIP:"pip"}),bs=Object.freeze({VIDEO:"video",AUDIO:"audio"}),li=Object.freeze({PLAY:"play",PAUSE:"pause",BUFFERING:"buffering",READY:"ready",ERROR:"error",ENDED:"ended"}),wh=Object.freeze({ERROR:"logError",EVENT:"logEvent"}),xa=Object.freeze({CHAPTER:"chapter",MARKER:"marker",CALLBACK:"callback",PLAY_NEXT:"play-next"}),_x=Object.freeze({ACTION:"action",SEGMENT:"segment",HIDDEN:"hidden"}),jt=Object.freeze({MediaStateChanged:"mediaStateChanged",DisplayModeChanged:"displayModeChanged",CastStateChanged:"castStateChanged",AirPlayStateChanged:"airPlayStateChanged",AirPlayConnectionChanged:"webkitcurrentplaybacktargetiswirelesschanged",AirPlayAvailabilityChanged:"webkitplaybacktargetavailabilitychanged",AdComplete:"ad-complete",AdError:"ad-error",AdPaused:"ad-paused",AdResumed:"ad-resumed",AdSkipped:"ad-skipped",AdStarted:"ad-started",AdUiUpdate:"ad-ui-update",AllAdsCompleted:"all-ads-completed",CanPlay:"canplay",CanPlayThrough:"canplaythrough",DurationChange:"durationchange",Ended:"ended",Error:"error",LoadedData:"loadeddata",LoadedMetadata:"loadedmetadata",Pause:"pause",Play:"play",Playing:"playing",Progress:"progress",RateChange:"ratechange",Buffering:"buffering",Seeked:"seeked",Seeking:"seeking",Stalled:"stalled",TimeUpdate:"timeupdate",VolumeChange:"volumechange",Waiting:"waiting",TimeBoundActionTriggered:"time-bound-action-triggered",TimeBoundActionExited:"time-bound-action-exited",ChapterEntered:"chapter-entered",ChapterExited:"chapter-exited",StreamTrackChanged:"stream-track-changed"}),nv=[.8,1,1.2,1.5,2],rv=19999,Hx={PRODUCTION_V2:"123D5E9D"},iv="nl",Gx="https://cdn.npoplayer.nl/posters/default-npo-poster.png",Jc=Object.freeze({INITIAL_WIDTH_PERCENTAGE:0,DEFAULT_SECONDS_TO_SKIP:15,BUFFER_STATE_TRIGGER_DELAY_MS:400,CAST_CHECK_INTERVAL_MS:2e3}),Qc="error.stream-not-found",Nt="error.generic",pi="error.drm-error",Ws="error.cast-error",Kx="error.stream-expired",xr="error.stream-error",ov=Object.freeze({19999:Nt,19e3:Nt,19001:Nt,19002:Nt,19003:Nt,19004:"error.not-supported",19005:"error.19005",19006:"error.19006",19007:"error.19007",19008:"error.19008",19009:"error.19009",19010:"error.19010",19011:"error.19011",19012:"error.19012",19013:"error.19013",19014:"error.19014",19015:"error.19015",19016:"error.19016",19017:"error.19017",19018:"error.19018",19019:"error.19019",19020:"error.19020",19021:"error.19021",19022:"error.19022",19023:"error.19023",19024:"error.19024",19025:"error.19025",19100:Nt,19101:Nt,19102:Nt,19103:Nt,19104:Nt,19200:Ws,19201:Ws,19202:"error.19202",19203:"error.19203",19204:"error.19204",19205:"error.19205",19206:"error.19206",19207:"error.19207",19208:"error.19208",19209:"error.19209",19210:"error.19210",19211:"error.19211",19212:"error.19212",19213:"error.19213",19214:"error.19214",19215:"error.19215",19216:"error.19216",19300:"error.19300",19301:"error.19301",19302:"error.19302",19303:"error.19303",19304:"error.19304",19305:"error.19305",19306:"error.19306",19307:"error.19307",19308:"error.19308",19309:"error.19309",19310:"error.19310",19311:"error.19311",1001:Qc,1002:Kx,1003:Nt,400:Nt,401:Nt,402:"error.payment-required",403:Qc,404:Qc,408:Nt,410:Qc,412:Nt,422:"error.configuration-error",429:Nt,450:"error.age-restriction",451:"error.restricted",500:Nt,502:Nt,503:Nt,504:Nt,1e3:Nt,1004:Nt,1006:Nt,1007:Nt,1008:Nt,1009:Nt,1010:Nt,1011:Nt,1012:Nt,2e3:Nt,2001:Nt,2003:Nt,2004:Nt,2005:Nt,2007:Nt,2008:Nt,2009:Nt,2010:Nt,2011:Nt,2012:Nt,2013:Nt,3e3:Nt,3016:Nt,3001:Nt,3002:Nt,3003:Nt,3004:Nt,3005:Nt,3006:Nt,3007:Nt,3008:Nt,3009:Nt,3010:Nt,3011:Nt,3012:Nt,3013:Nt,3014:Nt,3015:Nt,3017:Nt,3018:Nt,3019:Nt,3020:Nt,3022:Nt,3023:Nt,4e3:xr,4001:xr,4002:xr,4003:xr,4004:xr,4005:xr,4006:xr,4007:xr,4008:xr,4009:xr,4010:xr,4015:xr,4016:xr,4017:xr,4020:xr,4023:xr,4024:xr,4025:xr,4026:xr,4027:xr,4028:xr,4032:xr,4033:xr,4036:xr,4037:xr,4038:xr,4039:xr,4040:xr,4041:xr,6e3:pi,6001:pi,6002:pi,6003:pi,6004:pi,6005:pi,6006:pi,6007:pi,6008:pi,6010:pi,6012:pi,6013:pi,6014:pi,6015:pi,6016:pi,6017:pi,6018:pi,6019:pi,6020:pi,7e3:Nt,7001:Nt,7002:Nt,7003:Nt,7004:Nt,7005:Nt,7006:Nt,7007:Nt,8e3:Ws,8001:Ws,8002:Ws,8003:Ws,8004:Ws,8005:Ws,8006:Ws}),Wx="widevine",zx="playready",$x="fairplay",Xx="dash",Yx="hls";var sv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jx(me){return me&&me.__esModule&&Object.prototype.hasOwnProperty.call(me,"default")?me.default:me}var av={};/*
2
- @license
3
- Shaka Player
4
- Copyright 2016 Google LLC
5
- SPDX-License-Identifier: Apache-2.0
6
- */(function(me){(function(){var p=typeof window<"u"?window:sv,T={};(function(R,de,E){var f,c=typeof Object.create=="function"?Object.create:function(e){function t(){}return t.prototype=e,new t},v=typeof Object.defineProperties=="function"?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};function I(e){e=[typeof globalThis=="object"&&globalThis,e,typeof R=="object"&&R,typeof self=="object"&&self,typeof de=="object"&&de];for(var t=0;t<e.length;++t){var n=e[t];if(n&&n.Math==Math)return n}throw Error("Cannot find global object")}var x=I(this);function C(e,t){if(t)e:{var n=x;e=e.split(".");for(var r=0;r<e.length-1;r++){var i=e[r];if(!(i in n))break e;n=n[i]}e=e[e.length-1],r=n[e],t=t(r),t!=r&&t!=null&&v(n,e,{configurable:!0,writable:!0,value:t})}}var j;if(typeof Object.setPrototypeOf=="function")j=Object.setPrototypeOf;else{var z;e:{var F={a:!0},K={};try{K.__proto__=F,z=K.a;break e}catch{}z=!1}j=z?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var N=j;function P(e,t){if(e.prototype=c(t.prototype),e.prototype.constructor=e,N)N(e,t);else for(var n in t)if(n!="prototype")if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.Gm=t.prototype}function $(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}function d(e){var t=typeof Symbol<"u"&&Symbol.iterator&&e[Symbol.iterator];if(t)return t.call(e);if(typeof e.length=="number")return{next:$(e)};throw Error(String(e)+" is not an iterable or ArrayLike")}function M(e){if(!(e instanceof Array)){e=d(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}function U(e){if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object")}function J(){this.J=!1,this.H=null,this.i=void 0,this.h=1,this.G=this.I=0,this.M=this.C=null}function H(e){if(e.J)throw new TypeError("Generator is already running");e.J=!0}J.prototype.K=function(e){this.i=e};function Y(e,t){e.C={Yh:t,ni:!0},e.h=e.I||e.G}J.prototype.getNextAddressJsc=function(){return this.h},J.prototype.getYieldResultJsc=function(){return this.i},J.prototype.return=function(e){this.C={return:e},this.h=this.G},J.prototype.return=J.prototype.return,J.prototype.O=function(e){this.C={A:e},this.h=this.G},J.prototype.jumpThroughFinallyBlocks=J.prototype.O,J.prototype.g=function(e,t){return this.h=t,{value:e}},J.prototype.yield=J.prototype.g,J.prototype.P=function(e,t){e=d(e);var n=e.next();if(U(n),n.done)this.i=n.value,this.h=t;else return this.H=e,this.g(n.value,t)},J.prototype.yieldAll=J.prototype.P,J.prototype.A=function(e){this.h=e},J.prototype.jumpTo=J.prototype.A,J.prototype.j=function(){this.h=0},J.prototype.jumpToEnd=J.prototype.j,J.prototype.m=function(e,t){this.I=e,t!=null&&(this.G=t)},J.prototype.setCatchFinallyBlocks=J.prototype.m,J.prototype.D=function(e){this.I=0,this.G=e||0},J.prototype.setFinallyBlock=J.prototype.D,J.prototype.o=function(e,t){this.h=e,this.I=t||0},J.prototype.leaveTryBlock=J.prototype.o,J.prototype.l=function(e){return this.I=e||0,e=this.C.Yh,this.C=null,e},J.prototype.enterCatchBlock=J.prototype.l,J.prototype.u=function(e,t,n){n?this.M[n]=this.C:this.M=[this.C],this.I=e||0,this.G=t||0},J.prototype.enterFinallyBlock=J.prototype.u,J.prototype.B=function(e,t){t=this.M.splice(t||0)[0],(t=this.C=this.C||t)?t.ni?this.h=this.I||this.G:t.A!=null&&this.G<t.A?(this.h=t.A,this.C=null):this.h=this.G:this.h=e},J.prototype.leaveFinallyBlock=J.prototype.B,J.prototype.N=function(e){return new ee(e)},J.prototype.forIn=J.prototype.N;function ee(e){this.i=e,this.g=[];for(var t in e)this.g.push(t);this.g.reverse()}ee.prototype.h=function(){for(;this.g.length>0;){var e=this.g.pop();if(e in this.i)return e}return null},ee.prototype.getNext=ee.prototype.h;function q(e){this.g=new J,this.h=e}function se(e,t){H(e.g);var n=e.g.H;return n?re(e,"return"in n?n.return:function(r){return{value:r,done:!0}},t,e.g.return):(e.g.return(t),ue(e))}function re(e,t,n,r){try{var i=t.call(e.g.H,n);if(U(i),!i.done)return e.g.J=!1,i;var o=i.value}catch(s){return e.g.H=null,Y(e.g,s),ue(e)}return e.g.H=null,r.call(e.g,o),ue(e)}function ue(e){for(;e.g.h;)try{var t=e.h(e.g);if(t)return e.g.J=!1,{value:t.value,done:!1}}catch(n){e.g.i=void 0,Y(e.g,n)}if(e.g.J=!1,e.g.C){if(t=e.g.C,e.g.C=null,t.ni)throw t.Yh;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function xe(e){this.next=function(t){return H(e.g),e.g.H?t=re(e,e.g.H.next,t,e.g.K):(e.g.K(t),t=ue(e)),t},this.throw=function(t){return H(e.g),e.g.H?t=re(e,e.g.H.throw,t,e.g.K):(Y(e.g,t),t=ue(e)),t},this.return=function(t){return se(e,t)},this[Symbol.iterator]=function(){return this}}function he(e){function t(r){return e.next(r)}function n(r){return e.throw(r)}return new Promise(function(r,i){function o(s){s.done?r(s.value):Promise.resolve(s.value).then(t,n).then(o,i)}o(e.next())})}function G(e){return he(new xe(new q(e)))}function we(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}C("Symbol",function(e){function t(o){if(this instanceof t)throw new TypeError("Symbol is not a constructor");return new n(r+(o||"")+"_"+i++,o)}function n(o,s){this.g=o,v(this,"description",{configurable:!0,writable:!0,value:s})}if(e)return e;n.prototype.toString=function(){return this.g};var r="jscomp_symbol_"+(Math.random()*1e9>>>0)+"_",i=0;return t}),C("Symbol.iterator",function(e){return e||(e=Symbol("Symbol.iterator"),v(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return Ae($(this))}}),e)});function Ae(e){return e={next:e},e[Symbol.iterator]=function(){return this},e}C("Promise",function(e){function t(s){this.h=0,this.i=void 0,this.g=[],this.o=!1;var a=this.j();try{s(a.resolve,a.reject)}catch(u){a.reject(u)}}function n(){this.g=null}function r(s){return s instanceof t?s:new t(function(a){a(s)})}if(e)return e;n.prototype.h=function(s){if(this.g==null){this.g=[];var a=this;this.i(function(){a.l()})}this.g.push(s)};var i=x.setTimeout;n.prototype.i=function(s){i(s,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var s=this.g;this.g=[];for(var a=0;a<s.length;++a){var u=s[a];s[a]=null;try{u()}catch(l){this.j(l)}}}this.g=null},n.prototype.j=function(s){this.i(function(){throw s})},t.prototype.j=function(){function s(l){return function(h){u||(u=!0,l.call(a,h))}}var a=this,u=!1;return{resolve:s(this.G),reject:s(this.l)}},t.prototype.G=function(s){if(s===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(s instanceof t)this.I(s);else{e:switch(typeof s){case"object":var a=s!=null;break e;case"function":a=!0;break e;default:a=!1}a?this.D(s):this.m(s)}},t.prototype.D=function(s){var a=void 0;try{a=s.then}catch(u){this.l(u);return}typeof a=="function"?this.J(a,s):this.m(s)},t.prototype.l=function(s){this.u(2,s)},t.prototype.m=function(s){this.u(1,s)},t.prototype.u=function(s,a){if(this.h!=0)throw Error("Cannot settle("+s+", "+a+"): Promise already settled in state"+this.h);this.h=s,this.i=a,this.h===2&&this.H(),this.B()},t.prototype.H=function(){var s=this;i(function(){if(s.C()){var a=x.console;typeof a<"u"&&a.error(s.i)}},1)},t.prototype.C=function(){if(this.o)return!1;var s=x.CustomEvent,a=x.Event,u=x.dispatchEvent;return typeof u>"u"?!0:(typeof s=="function"?s=new s("unhandledrejection",{cancelable:!0}):typeof a=="function"?s=new a("unhandledrejection",{cancelable:!0}):(s=x.document.createEvent("CustomEvent"),s.initCustomEvent("unhandledrejection",!1,!0,s)),s.promise=this,s.reason=this.i,u(s))},t.prototype.B=function(){if(this.g!=null){for(var s=0;s<this.g.length;++s)o.h(this.g[s]);this.g=null}};var o=new n;return t.prototype.I=function(s){var a=this.j();s.Me(a.resolve,a.reject)},t.prototype.J=function(s,a){var u=this.j();try{s.call(a,u.resolve,u.reject)}catch(l){u.reject(l)}},t.prototype.then=function(s,a){function u(m,S){return typeof m=="function"?function(A){try{l(m(A))}catch(k){h(k)}}:S}var l,h,g=new t(function(m,S){l=m,h=S});return this.Me(u(s,l),u(a,h)),g},t.prototype.catch=function(s){return this.then(void 0,s)},t.prototype.Me=function(s,a){function u(){switch(l.h){case 1:s(l.i);break;case 2:a(l.i);break;default:throw Error("Unexpected state: "+l.h)}}var l=this;this.g==null?o.h(u):this.g.push(u),this.o=!0},t.resolve=r,t.reject=function(s){return new t(function(a,u){u(s)})},t.race=function(s){return new t(function(a,u){for(var l=d(s),h=l.next();!h.done;h=l.next())r(h.value).Me(a,u)})},t.all=function(s){var a=d(s),u=a.next();return u.done?r([]):new t(function(l,h){function g(A){return function(k){m[A]=k,S--,S==0&&l(m)}}var m=[],S=0;do m.push(void 0),S++,r(u.value).Me(g(m.length-1),h),u=a.next();while(!u.done)})},t});function Ie(e,t){return Object.prototype.hasOwnProperty.call(e,t)}C("WeakMap",function(e){function t(u){if(this.g=(a+=Math.random()+1).toString(),u){u=d(u);for(var l;!(l=u.next()).done;)l=l.value,this.set(l[0],l[1])}}function n(){}function r(u){var l=typeof u;return l==="object"&&u!==null||l==="function"}function i(u){if(!Ie(u,s)){var l=new n;v(u,s,{value:l})}}function o(u){var l=Object[u];l&&(Object[u]=function(h){return h instanceof n?h:(Object.isExtensible(h)&&i(h),l(h))})}if(function(){if(!e||!Object.seal)return!1;try{var u=Object.seal({}),l=Object.seal({}),h=new e([[u,2],[l,3]]);return h.get(u)!=2||h.get(l)!=3?!1:(h.delete(u),h.set(l,4),!h.has(u)&&h.get(l)==4)}catch{return!1}}())return e;var s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var a=0;return t.prototype.set=function(u,l){if(!r(u))throw Error("Invalid WeakMap key");if(i(u),!Ie(u,s))throw Error("WeakMap key fail: "+u);return u[s][this.g]=l,this},t.prototype.get=function(u){return r(u)&&Ie(u,s)?u[s][this.g]:void 0},t.prototype.has=function(u){return r(u)&&Ie(u,s)&&Ie(u[s],this.g)},t.prototype.delete=function(u){return r(u)&&Ie(u,s)&&Ie(u[s],this.g)?delete u[s][this.g]:!1},t}),C("Map",function(e){function t(){var a={};return a.sc=a.next=a.head=a}function n(a,u){var l=a[1];return Ae(function(){if(l){for(;l.head!=a[1];)l=l.sc;for(;l.next!=l.head;)return l=l.next,{done:!1,value:u(l)};l=null}return{done:!0,value:void 0}})}function r(a,u){var l=u&&typeof u;l=="object"||l=="function"?o.has(u)?l=o.get(u):(l=""+ ++s,o.set(u,l)):l="p_"+u;var h=a[0][l];if(h&&Ie(a[0],l))for(a=0;a<h.length;a++){var g=h[a];if(u!==u&&g.key!==g.key||u===g.key)return{id:l,list:h,index:a,entry:g}}return{id:l,list:h,index:-1,entry:void 0}}function i(a){if(this[0]={},this[1]=t(),this.size=0,a){a=d(a);for(var u;!(u=a.next()).done;)u=u.value,this.set(u[0],u[1])}}if(function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var a=Object.seal({x:4}),u=new e(d([[a,"s"]]));if(u.get(a)!="s"||u.size!=1||u.get({x:4})||u.set({x:4},"t")!=u||u.size!=2)return!1;var l=u.entries(),h=l.next();return h.done||h.value[0]!=a||h.value[1]!="s"?!1:(h=l.next(),!(h.done||h.value[0].x!=4||h.value[1]!="t"||!l.next().done))}catch{return!1}}())return e;var o=new WeakMap;i.prototype.set=function(a,u){a=a===0?0:a;var l=r(this,a);return l.list||(l.list=this[0][l.id]=[]),l.entry?l.entry.value=u:(l.entry={next:this[1],sc:this[1].sc,head:this[1],key:a,value:u},l.list.push(l.entry),this[1].sc.next=l.entry,this[1].sc=l.entry,this.size++),this},i.prototype.delete=function(a){return a=r(this,a),a.entry&&a.list?(a.list.splice(a.index,1),a.list.length||delete this[0][a.id],a.entry.sc.next=a.entry.next,a.entry.next.sc=a.entry.sc,a.entry.head=null,this.size--,!0):!1},i.prototype.clear=function(){this[0]={},this[1]=this[1].sc=t(),this.size=0},i.prototype.has=function(a){return!!r(this,a).entry},i.prototype.get=function(a){return(a=r(this,a).entry)&&a.value},i.prototype.entries=function(){return n(this,function(a){return[a.key,a.value]})},i.prototype.keys=function(){return n(this,function(a){return a.key})},i.prototype.values=function(){return n(this,function(a){return a.value})},i.prototype.forEach=function(a,u){for(var l=this.entries(),h;!(h=l.next()).done;)h=h.value,a.call(u,h[1],h[0],this)},i.prototype[Symbol.iterator]=i.prototype.entries;var s=0;return i}),C("Set",function(e){function t(n){if(this.g=new Map,n){n=d(n);for(var r;!(r=n.next()).done;)this.add(r.value)}this.size=this.g.size}return function(){if(!e||typeof e!="function"||!e.prototype.entries||typeof Object.seal!="function")return!1;try{var n=Object.seal({x:4}),r=new e(d([n]));if(!r.has(n)||r.size!=1||r.add(n)!=r||r.size!=1||r.add({x:4})!=r||r.size!=2)return!1;var i=r.entries(),o=i.next();return o.done||o.value[0]!=n||o.value[1]!=n?!1:(o=i.next(),o.done||o.value[0]==n||o.value[0].x!=4||o.value[1]!=o.value[0]?!1:i.next().done)}catch{return!1}}()?e:(t.prototype.add=function(n){return n=n===0?0:n,this.g.set(n,n),this.size=this.g.size,this},t.prototype.delete=function(n){return n=this.g.delete(n),this.size=this.g.size,n},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(n){return this.g.has(n)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(n,r){var i=this;this.g.forEach(function(o){return n.call(r,o,o,i)})},t)});function He(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var o=e[i];if(t.call(n,o,i,e))return{ji:i,v:o}}return{ji:-1,v:void 0}}C("Array.prototype.findIndex",function(e){return e||function(t,n){return He(this,t,n).ji}});function nt(e,t){e instanceof String&&(e+="");var n=0,r=!1,i={next:function(){if(!r&&n<e.length){var o=n++;return{value:t(o,e[o]),done:!1}}return r=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}C("Array.prototype.values",function(e){return e||function(){return nt(this,function(t,n){return n})}}),C("Array.from",function(e){return e||function(t,n,r){n=n??function(a){return a};var i=[],o=typeof Symbol<"u"&&Symbol.iterator&&t[Symbol.iterator];if(typeof o=="function"){t=o.call(t);for(var s=0;!(o=t.next()).done;)i.push(n.call(r,o.value,s++))}else for(o=t.length,s=0;s<o;s++)i.push(n.call(r,t[s],s));return i}}),C("Array.prototype.keys",function(e){return e||function(){return nt(this,function(t){return t})}});function Xe(e,t,n){if(e==null)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}C("String.prototype.startsWith",function(e){return e||function(t,n){var r=Xe(this,t,"startsWith"),i=r.length,o=t.length;n=Math.max(0,Math.min(n|0,r.length));for(var s=0;s<o&&n<i;)if(r[n++]!=t[s++])return!1;return s>=o}}),C("Object.is",function(e){return e||function(t,n){return t===n?t!==0||1/t===1/n:t!==t&&n!==n}}),C("Array.prototype.includes",function(e){return e||function(t,n){var r=this;r instanceof String&&(r=String(r));var i=r.length;for(n=n||0,n<0&&(n=Math.max(n+i,0));n<i;n++){var o=r[n];if(o===t||Object.is(o,t))return!0}return!1}}),C("String.prototype.includes",function(e){return e||function(t,n){return Xe(this,t,"includes").indexOf(t,n||0)!==-1}}),C("String.fromCodePoint",function(e){return e||function(t){for(var n="",r=0;r<arguments.length;r++){var i=Number(arguments[r]);if(i<0||i>1114111||i!==Math.floor(i))throw new RangeError("invalid_code_point "+i);i<=65535?n+=String.fromCharCode(i):(i-=65536,n+=String.fromCharCode(i>>>10&1023|55296),n+=String.fromCharCode(i&1023|56320))}return n}}),C("WeakSet",function(e){function t(n){if(this.g=new WeakMap,n){n=d(n);for(var r;!(r=n.next()).done;)this.add(r.value)}}return function(){if(!e||!Object.seal)return!1;try{var n=Object.seal({}),r=Object.seal({}),i=new e([n]);return!i.has(n)||i.has(r)?!1:(i.delete(n),i.add(r),!i.has(n)&&i.has(r))}catch{return!1}}()?e:(t.prototype.add=function(n){return this.g.set(n,!0),this},t.prototype.has=function(n){return this.g.has(n)},t.prototype.delete=function(n){return this.g.delete(n)},t)}),C("Array.prototype.find",function(e){return e||function(t,n){return He(this,t,n).v}}),C("Object.entries",function(e){return e||function(t){var n=[],r;for(r in t)Ie(t,r)&&n.push([r,t[r]]);return n}});var it=typeof Object.assign=="function"?Object.assign:function(e,t){if(e==null)throw new TypeError("No nullish arg");e=Object(e);for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)Ie(r,i)&&(e[i]=r[i])}return e};C("Object.assign",function(e){return e||it}),C("Promise.prototype.finally",function(e){return e||function(t){return this.then(function(n){return Promise.resolve(t()).then(function(){return n})},function(n){return Promise.resolve(t()).then(function(){throw n})})}}),C("Array.prototype.entries",function(e){return e||function(){return nt(this,function(t,n){return[t,n]})}}),C("Number.EPSILON",function(){return 2220446049250313e-31}),C("Number.MAX_SAFE_INTEGER",function(){return 9007199254740991}),C("Math.clz32",function(e){return e||function(t){if(t=Number(t)>>>0,t===0)return 32;var n=0;return!(t&4294901760)&&(t<<=16,n+=16),!(t&4278190080)&&(t<<=8,n+=8),!(t&4026531840)&&(t<<=4,n+=4),!(t&3221225472)&&(t<<=2,n+=2),!(t&2147483648)&&n++,n}}),C("Number.isNaN",function(e){return e||function(t){return typeof t=="number"&&isNaN(t)}}),C("String.prototype.repeat",function(e){return e||function(t){var n=Xe(this,null,"repeat");if(t<0||t>1342177279)throw new RangeError("Invalid count value");t|=0;for(var r="";t;)t&1&&(r+=n),(t>>>=1)&&(n+=n);return r}}),C("Number.isFinite",function(e){return e||function(t){return typeof t!="number"?!1:!isNaN(t)&&t!==1/0&&t!==-1/0}}),C("Object.values",function(e){return e||function(t){var n=[],r;for(r in t)Ie(t,r)&&n.push(t[r]);return n}}),C("Math.log2",function(e){return e||function(t){return Math.log(t)/Math.LN2}}),C("String.prototype.endsWith",function(e){return e||function(t,n){var r=Xe(this,t,"endsWith");n===void 0&&(n=r.length),n=Math.max(0,Math.min(n|0,r.length));for(var i=t.length;i>0&&n>0;)if(r[--n]!=t[--i])return!1;return i<=0}}),C("Math.trunc",function(e){return e||function(t){if(t=Number(t),isNaN(t)||t===1/0||t===-1/0||t===0)return t;var n=Math.floor(Math.abs(t));return t<0?-n:n}});var ht=this||self;function be(e,t){e=e.split(".");var n=ht;e[0]in n||typeof n.execScript>"u"||n.execScript("var "+e[0]);for(var r;e.length&&(r=e.shift());)e.length||t===void 0?n[r]&&n[r]!==Object.prototype[r]?n=n[r]:n=n[r]={}:n[r]=t}function Qe(e){this.i=Math.log(.5),this.g=Math.exp(this.i/e),this.j=this.h=0}Qe.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.j+=e)};function st(e){return e.h/(1-Math.pow(e.g,e.j))}function Xt(){this.h=new Qe(2),this.j=new Qe(5),this.g=0,this.i=128e3,this.l=16e3}Xt.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes;var t=this.h;t.g=Math.exp(t.i/e.fastHalfLife),t=this.j,t.g=Math.exp(t.i/e.slowHalfLife)},Xt.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},Xt.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(st(this.h),st(this.j))};function Gt(){}function gn(){}function ut(){}function In(e){var t=we.apply(1,arguments);pr.has(e)||(pr.add(e),ut.apply(Gt,M(t)))}function Fn(){}function hr(){}function wr(){}var pr=new Set;R.console&&(new Map().set(1,function(){return console.error.apply(console,M(we.apply(0,arguments)))}).set(2,function(){return console.warn.apply(console,M(we.apply(0,arguments)))}).set(3,function(){return console.info.apply(console,M(we.apply(0,arguments)))}).set(4,function(){return console.log.apply(console,M(we.apply(0,arguments)))}).set(5,function(){return console.debug.apply(console,M(we.apply(0,arguments)))}).set(6,function(){return console.debug.apply(console,M(we.apply(0,arguments)))}),ut=function(){return console.warn.apply(console,M(we.apply(0,arguments)))},gn=function(){console.error.apply(console,M(we.apply(0,arguments)))});function Kn(e,t){return typeof e=="number"&&typeof t=="number"&&isNaN(e)&&isNaN(t)?!0:e===t}function $t(e,t){t=e.indexOf(t),t>-1&&e.splice(t,1)}function Sn(e,t,n){if(n||(n=Kn),e.length!=t.length)return!1;t=t.slice(),e=d(e);for(var r=e.next(),i={};!r.done;i={pi:void 0},r=e.next()){if(i.pi=r.value,r=t.findIndex(function(o){return function(s){return n(o.pi,s)}}(i)),r==-1)return!1;t[r]=t[t.length-1],t.pop()}return t.length==0}function bn(e,t){var n=[],r=[];e=d(e);for(var i=e.next();!i.done;i=e.next())i=i.value,t(i)?n.push(i):r.push(i);return[n,r]}function Ye(e,t,n){if(e===t)return!0;if(!e||!t)return e==t;if(n||(n=Kn),e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function Tt(){this.g=new Map}f=Tt.prototype,f.push=function(e,t){this.g.has(e)?this.g.get(e).push(t):this.g.set(e,[t])},f.get=function(e){return this.g.has(e)?this.g.get(e).slice():null},f.remove=function(e,t){if(this.g.has(e)){var n=this.g.get(e).filter(function(r){return r!=t});this.g.set(e,n),n.length||this.g.delete(e)}},f.forEach=function(e){this.g.forEach(function(t,n){e(n,t)})},f.size=function(){return this.g.size},f.keys=function(){return Array.from(this.g.keys())};function Et(){this.g=new Tt}f=Et.prototype,f.release=function(){this.Ra(),this.g=null},f.F=function(e,t,n,r){this.g&&(e=new On(e,t,n,r),this.g.push(t,e))},f.Aa=function(e,t,n,r){function i(s){o.Na(e,t,i),n(s)}var o=this;this.F(e,t,i,r)},f.Na=function(e,t,n){if(this.g){var r=this.g.get(t)||[];r=d(r);for(var i=r.next();!i.done;i=r.next())i=i.value,i.target!=e||n!=i.listener&&n||(i.Na(),this.g.remove(t,i))}},f.Ra=function(){if(this.g){for(var e=[],t=d(this.g.g.values()),n=t.next();!n.done;n=t.next())e.push.apply(e,M(n.value));for(e=d(e),t=e.next();!t.done;t=e.next())t.value.Na();this.g.g.clear()}},be("shaka.util.EventManager",Et),Et.prototype.removeAll=Et.prototype.Ra,Et.prototype.unlisten=Et.prototype.Na,Et.prototype.listenOnce=Et.prototype.Aa,Et.prototype.listen=Et.prototype.F,Et.prototype.release=Et.prototype.release;function On(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.g=nr(e,r),this.target.addEventListener(t,n,this.g)}On.prototype.Na=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};function nr(e,t){if(t==null)return!1;if(typeof t=="boolean")return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter(function(r){return!n.has(r)}),Lr(e)?t:t.capture||!1}function Lr(e){var t=qr;if(t==null){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch{t=!1}qr=t}return t||!1}var qr=void 0;be("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3});function Kt(e){this.h=e,this.g=void 0}Kt.prototype.value=function(){return this.g===void 0&&(this.g=this.h()),this.g};/*
7
- @license
8
- Shaka Player
9
- Copyright 2025 Google LLC
10
- SPDX-License-Identifier: Apache-2.0
11
- */function ct(){return Vt.value()}var Nn=null,at=null,Vt=new Kt(function(){var e=void 0;return Nn&&(e=Nn()),!e&&at&&(e=at()),e});function Dn(e,t){this.g=e,this.h=t}Dn.prototype.toString=function(){return"v"+this.g+"."+this.h};function lt(e,t){var n=new Dn(5,0),r=Cr,i=r.g,o=n.h-i.h;((n.g-i.g||o)>0?r.i:r.h)(r.g,n,e,t)}function un(e,t,n,r){ut([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function Ur(e,t,n,r){gn([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(" "))}var Cr=null;/*
12
- @license
13
- Copyright 2008 The Closure Library Authors
14
- SPDX-License-Identifier: Apache-2.0
15
- */var Br=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");/*
16
- @license
17
- Copyright 2006 The Closure Library Authors
18
- SPDX-License-Identifier: Apache-2.0
19
- */function It(e){var t;e instanceof It?(ln(this,e.bc),this.Zc=e.Zc,tn(this,e.Ab),cn(this,e.wd),this.$b=e.$b,Pe(this,e.g.clone()),this.Lc=e.Lc):e&&(t=String(e).match(Br))?(ln(this,t[1]||"",!0),this.Zc=Ne(t[2]||""),tn(this,t[3]||"",!0),cn(this,t[4]),this.$b=Ne(t[5]||"",!0),Pe(this,t[6]||"",!0),this.Lc=Ne(t[7]||"")):this.g=new Mr(null)}f=It.prototype,f.bc="",f.Zc="",f.Ab="",f.wd=null,f.$b="",f.Lc="",f.toString=function(){var e=[],t=this.bc;if(t&&e.push(Cn(t,Jn,!0),":"),t=this.Ab){e.push("//");var n=this.Zc;n&&e.push(Cn(n,Jn,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t=this.wd,t!=null&&e.push(":",String(t))}return(t=this.$b)&&(this.Ab&&t.charAt(0)!="/"&&e.push("/"),e.push(Cn(t,t.charAt(0)=="/"?io:mn,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.Lc)&&e.push("#",Cn(t,rr)),e.join("")},f.resolve=function(e){var t=this.clone();t.bc==="data"&&(t=new It);var n=!!e.bc;n?ln(t,e.bc):n=!!e.Zc,n?t.Zc=e.Zc:n=!!e.Ab,n?tn(t,e.Ab):n=e.wd!=null;var r=e.$b;if(n)cn(t,e.wd);else if(n=!!e.$b){if(r.charAt(0)!="/")if(this.Ab&&!this.$b)r="/"+r;else{var i=t.$b.lastIndexOf("/");i!=-1&&(r=t.$b.substr(0,i+1)+r)}if(r==".."||r==".")r="";else if(r.indexOf("./")!=-1||r.indexOf("/.")!=-1){i=r.lastIndexOf("/",0)==0,r=r.split("/");for(var o=[],s=0;s<r.length;){var a=r[s++];a=="."?i&&s==r.length&&o.push(""):a==".."?((o.length>1||o.length==1&&o[0]!="")&&o.pop(),i&&s==r.length&&o.push("")):(o.push(a),i=!0)}r=o.join("/")}}return n?t.$b=r:n=e.g.toString()!=="",n?Pe(t,e.g.clone()):n=!!e.Lc,n&&(t.Lc=e.Lc),t},f.clone=function(){return new It(this)};function ln(e,t,n){e.bc=n?Ne(t,!0):t,e.bc&&(e.bc=e.bc.replace(/:$/,""))}function tn(e,t,n){e.Ab=n?Ne(t,!0):t}function cn(e,t){if(t){if(t=Number(t),isNaN(t)||t<0)throw Error("Bad port number "+t);e.wd=t}else e.wd=null}function Pe(e,t,n){t instanceof Mr?e.g=t:(n||(t=Cn(t,yo)),e.g=new Mr(t))}function Ne(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Cn(e,t,n){return e!=null?(e=encodeURI(e).replace(t,Bn),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Bn(e){return e=e.charCodeAt(0),"%"+(e>>4&15).toString(16)+(e&15).toString(16)}var Jn=/[#\/\?@]/g,mn=/[#\?:]/g,io=/[#\?]/g,yo=/[#\?@]/g,rr=/#/g;function Mr(e){this.g=e||null}function So(e){if(!e.fb&&(e.fb=new Map,e.Pd=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(r>=0){var o=t[n].substring(0,r);i=t[n].substring(r+1)}else o=t[n];o=decodeURIComponent(o),i=i||"",e.add(o,decodeURIComponent(i))}}f=Mr.prototype,f.fb=null,f.Pd=null,f.add=function(e,t){So(this),this.g=null;var n=this.fb.has(e)?this.fb.get(e):null;return n||this.fb.set(e,n=[]),n.push(t),this.Pd++,this},f.set=function(e,t){return So(this),this.g=null,this.fb.has(e)?this.fb.set(e,[t]):this.add(e,t),this},f.get=function(e){return So(this),this.fb.get(e)||[]},f.toString=function(){if(this.g)return this.g;if(!this.fb||!this.fb.size)return"";for(var e=[],t=d(this.fb.keys()),n=t.next();!n.done;n=t.next()){var r=n.value;n=encodeURIComponent(r),r=this.fb.get(r);for(var i=0;i<r.length;i++){var o=n;r[i]!==""&&(o+="="+encodeURIComponent(r[i])),e.push(o)}}return this.g=e.join("&")},f.clone=function(){var e=new Mr;if(e.g=this.g,this.fb){for(var t=new Map,n=d(this.fb),r=n.next();!r.done;r=n.next()){var i=d(r.value);r=i.next().value,i=i.next().value,t.set(r,i.concat())}e.fb=t,e.Pd=this.Pd}return e};function ei(){}function Pr(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if((ArrayBuffer.isView(e)?e.buffer:e)==(ArrayBuffer.isView(t)?t.buffer:t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=xt(e);t=xt(t);for(var r=0;r<e.byteLength;r++)if(n[r]!=t[r])return!1;return!0}function Kr(e){return ArrayBuffer.isView(e)?e.byteOffset==0&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer:e}function xt(e,t,n){return n=n===void 0?1/0:n,ji(e,t===void 0?0:t,n,Uint8Array)}function Ji(e,t,n){return n=n===void 0?1/0:n,ji(e,t===void 0?0:t,n,Uint16Array)}function gr(e,t,n){return n=n===void 0?1/0:n,ji(e,t===void 0?0:t,n,DataView)}function ji(e,t,n,r){var i=ArrayBuffer.isView(e)?e.buffer:e,o=1;"BYTES_PER_ELEMENT"in r&&(o=r.BYTES_PER_ELEMENT);var s=((e.byteOffset||0)+e.byteLength)/o;return e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/o,s))),new r(i,e,Math.floor(Math.min(e+Math.max(n,0),s))-e)}be("shaka.util.BufferUtils",ei),ei.toDataView=gr,ei.toUint16=Ji,ei.toUint8=xt,ei.toArrayBuffer=Kr,ei.equal=Pr;function qo(e,t){if(e===t||!e.length||!t.length)return!0;e=d(e);for(var n=e.next();!n.done;n=e.next()){if(n=n.value,gs(n))return!0;for(var r=d(t),i=r.next();!i.done;i=r.next())if(i=i.value,n.keySystem===i.keySystem||gs(i))return!0}return!1}function oo(e,t){if(!e.length)return t;if(!t.length)return e;var n=[];e=d(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;for(var i=d(t),o=i.next();!o.done;o=i.next())if(o=o.value,r.keySystem==o.keySystem){i=new Map;for(var s=d((r.initData||[]).concat(o.initData||[])),a=s.next();!a.done;a=s.next())a=a.value,i.set(a.keyId,a);i=Array.from(i.values()),s=r.keyIds&&o.keyIds?new Set([].concat(M(r.keyIds),M(o.keyIds))):r.keyIds||o.keyIds,n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||o.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||o.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||o.persistentStateRequired,videoRobustness:r.videoRobustness||o.videoRobustness,audioRobustness:r.audioRobustness||o.audioRobustness,serverCertificate:r.serverCertificate||o.serverCertificate,serverCertificateUri:r.serverCertificateUri||o.serverCertificateUri,initData:i,keyIds:s});break}else gs(r)?n.push(r):gs(o)&&n.push(o)}return n}function Fi(e){return e==="org.w3.clearkey"}function Os(e){return e?!!e.match(/^com\.widevine\.alpha/):!1}function To(e){return e?!!e.match(/^com\.(microsoft|chromecast)\.playready/):!1}function Eo(e){return e?!!e.match(/^com\.apple\.fps/):!1}function gs(e){return(e=e.licenseServerUri)?e.startsWith("data:application/json;base64,"):!1}function es(e,t,n,r){return r=[].concat(M(new Set(r))).sort().join("#"),e+"#"+t+"#"+n+"#"+r}var so=new Kt(function(){return Kr(new Uint8Array([0]))}),xo=new Map;function fe(e,t,n){var r=we.apply(3,arguments);this.severity=e,this.category=t,this.code=n,this.data=r,this.handled=!1,this.message="Shaka Error "+this.code;try{throw Error(this.message||"Shaka Error")}catch(i){this.stack=i.stack}}fe.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},be("shaka.util.Error",fe),fe.Severity={RECOVERABLE:1,CRITICAL:2},fe.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},fe.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA:3023,STREAMING_NOT_ALLOWED:3024,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,RESTRICTIONS_CANNOT_BE_MET:4012,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,DASH_INVALID_PATCH:4052,HLS_EMPTY_MEDIA_PLAYLIST:4053,DASH_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4054,CANNOT_ADD_EXTERNAL_CHAPTERS_TO_LIVE_STREAM:4055,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,MISSING_EME_SUPPORT:6020,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,SRC_EQUALS_PRELOAD_NOT_SUPPORTED:7005,PRELOAD_DESTROYED:7006,QUEUE_INDEX_OUT_OF_BOUNDS:7007,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005,INTERSTITIAL_AD_MANAGER_NOT_INITIALIZED:10006,VAST_INVALID_XML:10007};function Mi(){}function Un(e){if(!e)return"";if(e=xt(e),e[0]==239&&e[1]==187&&e[2]==191&&(e=e.subarray(3)),R.TextDecoder&&!ct().sh())return e=new TextDecoder().decode(e),e.includes("�")&&gn('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),e;for(var t="",n=0;n<e.length;++n){var r=65533;if(e[n]&128?e.length>=n+2&&(e[n]&224)==192&&(e[n+1]&192)==128?(r=(e[n]&31)<<6|e[n+1]&63,n+=1):e.length>=n+3&&(e[n]&240)==224&&(e[n+1]&192)==128&&(e[n+2]&192)==128?(r=(e[n]&15)<<12|(e[n+1]&63)<<6|e[n+2]&63,n+=2):e.length>=n+4&&(e[n]&241)==240&&(e[n+1]&192)==128&&(e[n+2]&192)==128&&(e[n+3]&192)==128&&(r=(e[n]&7)<<18|(e[n+1]&63)<<12|(e[n+2]&63)<<6|e[n+3]&63,n+=3):r=e[n],r<=65535)t+=String.fromCharCode(r);else{r-=65536;var i=r&1023;t+=String.fromCharCode(55296+(r>>10)),t+=String.fromCharCode(56320+i)}}return t}function Qi(e,t,n){if(!e)return"";if(!n&&e.byteLength%2!=0)throw new fe(2,2,2004);n=Math.floor(e.byteLength/2);var r=new Uint16Array(n);e=gr(e);for(var i=0;i<n;i++)r[i]=e.getUint16(i*2,t);return zs.value()(r)}function ci(e){function t(r){return n.byteLength<=r||n[r]>=9&&n[r]<=126}if(!e)return"";var n=xt(e);if(n[0]==239&&n[1]==187&&n[2]==191)return Un(n);if(n[0]==254&&n[1]==255)return Qi(n.subarray(2),!1);if(n[0]==255&&n[1]==254)return Qi(n.subarray(2),!0);if(n[0]==0&&n[2]==0)return Qi(e,!1);if(n[1]==0&&n[3]==0)return Qi(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return Un(e);throw new fe(2,2,2003)}function Ui(e){if(R.TextEncoder&&!ct().sh()){var t=new TextEncoder;return Kr(t.encode(e))}e=encodeURIComponent(e),e=unescape(e),t=new Uint8Array(e.length);for(var n=0;n<e.length;n++)t[n]=e[n].charCodeAt(0);return Kr(t)}function Bi(e,t){for(var n=new ArrayBuffer(e.length*2),r=new DataView(n),i=0;i<e.length;++i)r.setUint16(i*2,e.charCodeAt(i),t);return n}function Wr(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&nbsp;":" ","&lrm;":"‎","&rlm;":"‏"},n=/&(?:amp|lt|gt|quot|apos|nbsp|lrm|rlm|#[xX]?[0-9a-fA-F]+);/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,function(i){return i[1]=="#"?(i=i[2]=="x"||i[2]=="X"?parseInt(i.substring(3),16):parseInt(i.substring(2),10),i>=0&&i<=1114111?String.fromCodePoint(i):""):t[i]||"'"}):e||""}be("shaka.util.StringUtils",Mi),Mi.resetFromCharCode=function(){zs.g=void 0},Mi.toUTF16=Bi,Mi.toUTF8=Ui,Mi.fromBytesAutoDetect=ci,Mi.fromUTF16=Qi,Mi.fromUTF8=Un;var zs=new Kt(function(){function e(n){try{var r=new Uint8Array(n);return String.fromCharCode.apply(null,r).length>0}catch{return!1}}for(var t={Jc:65536};t.Jc>0;t={Jc:t.Jc},t.Jc/=2)if(e(t.Jc))return function(n){return function(r){for(var i="",o=0;o<r.length;o+=n.Jc)i+=String.fromCharCode.apply(null,r.subarray(o,o+n.Jc));return i}}(t);return null});function Sr(){}function Fo(e){return e=xt(e),Uint8Array.prototype.toBase64?e.toBase64({alphabet:"base64",omitPadding:!1}):(e=zs.value()(e),btoa(e))}function Pi(e,t){return t=t??!0,Uint8Array.prototype.toBase64?xt(e).toBase64({alphabet:"base64url",omitPadding:!t}):(e=Fo(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,""))}function ki(e){if(!("fromBase64"in Uint8Array)){e=R.atob(e.replace(/-/g,"+").replace(/_/g,"/"));for(var t=new Uint8Array(e.length),n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}return e=e.replace(/\s+/g,""),Uint8Array.fromBase64(e,{alphabet:/[-_]/.test(e)?"base64url":"base64"})}function ts(e){if(!("fromHex"in Uint8Array)){for(var t=e.length/2,n=new Uint8Array(t),r=0;r<t;r++)n[r]=R.parseInt(e.substr(r*2,2),16);return n}return Uint8Array.fromHex(e)}function wo(e){var t=xt(e);if(!Uint8Array.prototype.toHex){e="",t=d(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n=n.toString(16),n.length==1&&(n="0"+n),e+=n;return e}return t.toHex()}function dr(){for(var e=we.apply(0,arguments),t=0,n=0;n<e.length;++n)t+=e[n].byteLength;t=new Uint8Array(t);for(var r=n=0;r<e.length;++r){var i=e[r];ArrayBuffer.isView(i)&&i.BYTES_PER_ELEMENT===1?t.set(i,n):t.set(xt(i),n),n+=i.byteLength}return t}be("shaka.util.Uint8ArrayUtils",Sr),Sr.concat=dr,Sr.toHex=wo,Sr.fromHex=ts,Sr.fromBase64=ki,Sr.toBase64=Pi,Sr.toStandardBase64=Fo;function kr(e,t,n){if(n=n===void 0?"":n,t.length==0)return e;if(e.length==1&&t.length==1){var r=new It(e[0]);return t=new It(t[0]),t=r.resolve(t),n&&Pe(t,n),[t.toString()]}t=t.map(function(a){return new It(a)}),r=[],e=d(e);for(var i=e.next();!i.done;i=e.next()){i=new It(i.value);for(var o=d(t),s=o.next();!s.done;s=o.next())s=i.resolve(s.value),n&&Pe(s,n),r.push(s.toString())}return r}function Ao(e,t,n,r,i){return t={keySystem:e,encryptionScheme:t,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:n||[],keyIds:new Set,mediaTypes:i},r&&(t.keySystemUris=new Set([r])),!n&&Eo(e)&&t.initData.push({initDataType:"sinf",initData:new Uint8Array(0),keyId:null}),t}function wa(e,t){t=t===void 0?"cenc":t;var n=[],r=[],i=[];e.forEach(function(s,a){var u=a;u.length!=22&&(u=Pi(ts(a),!1));var l=s;l.length!=22&&(l=Pi(ts(s),!1)),s={kty:"oct",kid:u,k:l},n.push(s),r.push(s.kid),i.push(a)}),e=JSON.stringify({keys:n});var o=JSON.stringify({kids:r});return o=[{initData:xt(Ui(o)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",encryptionScheme:t,licenseServerUri:"data:application/json;base64,"+R.btoa(e),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:o,keyIds:new Set(i)}}function ms(e,t){if(t.length==1)return t[0];if(e=ti(e,t),e!=null)return e;throw new fe(2,4,4025,t)}function ti(e,t){var n=Ys.get(e);n=d(n);for(var r=n.next();!r.done;r=n.next()){r=r.value;for(var i=d(t),o=i.next();!o.done;o=i.next())if(o=o.value,r.test(o.trim()))return o.trim()}return e==Bt?"":null}function $s(e,t){var n=[];e=Ys.get(e),e=d(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;for(var i=d(t),o=i.next();!o.done;o=i.next())o=o.value,r.test(o.trim())&&n.push(o.trim())}return n}var Bt="text",mr={wa:"video",aa:"audio",Oa:Bt,Tf:"image",ql:"application"},Xs=1/15,Ys=new Map().set("audio",[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cehx]?$/,/^iamf/,/^mhm[12]/,/^ac3$/,/^eac3$/,/^apac$/]).set("video",[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^mp2v/,/^dvh/,/^dva/,/^dav/]).set("text",[/^vtt$/,/^wvtt/,/^stpp/]);function vs(e,t,n,r){this.g=null,this.l=e,this.i=t,this.m=n,this.o=r,this.j=!1;e:{if(typeof libDPIModule>"u"&&ut("Could not find LCEVC Library dependencies on this page"),typeof LCEVCdec<"u")this.h=LCEVCdec;else if(typeof LcevcDil<"u")this.h=LcevcDil,this.j=!0,lt("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead");else{ut("Could not find LCEVC Library on this page"),e=!1;break e}typeof this.h.SupportObject>"u"?(ut("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||ut(this.h.SupportObject.SupportError),e=typeof this.h<"u"&&typeof libDPIModule<"u"&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Ds(e,t,n,r){r.type!=="video"||e.o&&!r.baseOriginalId||e.g&&e.g.appendBuffer(t,"video",r.id,-n,!e.o)}function Qa(e){e.g&&e.i.classList.add("shaka-hidden")}vs.prototype.release=function(){this.g&&(this.g.close(),this.g=null)};function Za(e){return e&&typeof LCEVCdec<"u"?e.codecs=="lvc1":!1}be("shaka.lcevc.Dec",vs),vs.prototype.release=vs.prototype.release;function Ns(){}function Vi(e,t){Uo.set(e,t)}function Js(){var e={};if(ct(),Hs())for(var t=d(Uo.keys()),n=t.next();!n.done;n=t.next())e[n.value]=!0;for(t=d(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"]),n=t.next();!n.done;n=t.next())n=n.value,e[n]=Hs()?Uo.has(n):yu().canPlayType(n)!="";return e}function Aa(e,t){if(t){var n=Uo.get(t.toLowerCase());if(n)return n}throw new fe(2,4,4e3,e,t)}be("shaka.media.ManifestParser",Ns),Ns.unregisterParserByMime=function(e){Uo.delete(e)},Ns.registerParserByMime=Vi,Ns.registerParserByExtension=function(){lt("ManifestParser.registerParserByExtension","Please use an ManifestParser with registerParserByMime function.")},Ns.AccessibilityPurpose={Am:"visually impaired",Ll:"hard of hearing",hm:"spoken subtitles"};var Uo=new Map;function bi(){}bi.prototype.extract=function(){},bi.prototype.decode=function(){return[]},bi.prototype.clear=function(){},bi.prototype.getStreams=function(){return[]};function qa(){}qa.prototype.init=function(){},qa.prototype.parse=function(){return[]};function gi(e){this.h=new Map,this.i=0,this.j=new qa,(e=tu(e.toLowerCase()))&&(this.j=e()),this.g=new bi,(e=Vn)&&(this.g=e(),this.h.set(this.i,this.g))}gi.prototype.init=function(e,t,n){if(t=t===void 0?!1:t,n=n===void 0?-1:n,n!=-1&&this.i!=n){t=n;var r=this.h.get(t);this.h.set(this.i,this.g),r?this.g=r:((r=Vn)&&(this.g=r()),this.h.set(t,this.g))}else t||this.g.clear();this.j.init(e),n!=-1&&(this.i=n)};function Qs(e,t){t=e.j.parse(t),t=d(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;var r=xt(n.packet);r.length>0&&e.g.extract(r,n.pts)}return e.g.decode()}gi.prototype.remove=function(e){e=e===void 0?[]:e,e=new Set(e);for(var t=d(this.h.keys()),n=t.next();!n.done;n=t.next())if(n=n.value,!e.has(n)){var r=this.h.get(n);r&&r.clear(),this.h.delete(n)}};function eu(e,t){_i.set(e,t)}function tu(e){return _i.get(e)}be("shaka.media.ClosedCaptionParser",gi),gi.findDecoder=function(){return Vn},gi.unregisterDecoder=function(){Vn=null},gi.registerDecoder=function(e){Vn=e},gi.findParser=tu,gi.unregisterParser=function(e){_i.delete(e)},gi.registerParser=eu;var _i=new Map,Vn=null;function ns(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Vr,this.scroll=Bo}be("shaka.text.CueRegion",ns);var Vr=1;ns.units={PX:0,PERCENTAGE:Vr,LINES:2};var Bo="";ns.scrollMode={NONE:Bo,UP:"up"};function ys(e){this.h=e||"",this.g=0}function Ls(e){js(e,/[ \t]+/gm)}function js(e,t){return t.lastIndex=e.g,t=t.exec(e.h),t=t==null?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||t==null||t.position!=e.g?null:(e.g+=t.length,t.results)}function rs(e){return e.g==e.h.length?null:(e=js(e,/[^ \t\n]*/gm))?e[0]:null}function Ss(e){if(e=js(e,Ia),e==null)return null;var t=Number(e[2]),n=Number(e[3]);return t>59||n>59?null:(Number(e[6])||0)/1e3+n+t*60+(Number(e[1])||0)*3600}function Ts(e){return e?Ss(new ys(e)):null}var Ia=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function Zs(){}function Hi(e){function t(r){switch(typeof r){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return r;default:if(!r||ArrayBuffer.isView(r))return r;if(n.has(r))return null;var i=Array.isArray(r);if(r.constructor!=Object&&!i)return null;n.add(r);var o=i?[]:{},s;for(s in r)o[s]=t(r[s]);return i&&(o.length=r.length),o}}var n=new WeakSet;return t(e)}function Vo(e){var t={},n;for(n in e)t[n]=e[n];return t}function qs(e){if(Array.isArray(e)){for(var t=[],n=0;n<e.length;n++){var r=n.toString(),i=e[n];i!==void 0&&(i=qs(i))&&t.push(r+":"+i)}e="["+t.join(",")+"]"}else if(typeof e=="function")e="";else if(e instanceof Object){for(n=Object.keys(e),n.sort(),t=[],n=d(n),r=n.next();!r.done;r=n.next())i=r.value,r=JSON.stringify(i),i=e[i],i!==void 0&&(i=qs(i))&&t.push(r+":"+i);e="{"+t.join(",")+"}"}else e=JSON.stringify(e);return e}be("shaka.util.ObjectUtils",Zs),Zs.alphabeticalKeyOrderStringify=qs,Zs.shallowCloneObject=Vo,Zs.cloneObject=Hi;/*
20
- @license
21
- tXml
22
- Copyright 2015 Tobias Nickel
23
- SPDX-License-Identifier: MIT
24
- */function ea(e,t){var n=n===void 0?!1:n;return e=ci(e),Es(e,t,n)}function Es(e,t,n){if(e=Nl(e,n===void 0?!1:n),!t&&e.length)return e[0];var r=t.split(",");return(t=e.find(function(i){return r.includes(i.tagName)}))?t:null}function ta(e){return qt.has(e)?qt.get(e):""}function Nl(e,t){function n(o,s){s=s===void 0?!1:s;for(var a=[];e[i];)if(e.charCodeAt(i)==60){if(e.charCodeAt(i+1)===47){s=i+2,i=e.indexOf(">",i),s=e.substring(s,i);var u=s.indexOf(o);if(u==-1){var l=o.indexOf(".");l>0&&(u=s.indexOf(o.substring(0,l)))}if(u==-1)throw o=e.substring(0,i).split(`
25
- `),Error(`Unexpected close tag
26
- Line: `+(o.length-1)+`
27
- Column: `+(o[o.length-1].length+1)+`
28
- Char: `+e[i]);i+1&&(i+=1);break}else if(e.charCodeAt(i+1)===33){if(e.charCodeAt(i+2)==45){for(;i!==-1&&(e.charCodeAt(i)!==62||e.charCodeAt(i-1)!=45||e.charCodeAt(i-2)!=45||i==-1);)i=e.indexOf(">",i+1);i===-1&&(i=e.length)}else if(e.charCodeAt(i+2)===91&&e.charCodeAt(i+8)===91&&e.substr(i+3,5).toLowerCase()==="cdata"){u=e.indexOf("]]>",i),u==-1?(a.push(e.substr(i+9)),i=e.length):(a.push(e.substring(i+9,u)),i=u+3);continue}i++;continue}e:{l=s,i++;var h=r(),g={};for(u=[];e.charCodeAt(i)!==62&&e[i];){var m=e.charCodeAt(i);if(m>64&&m<91||m>96&&m<123){m=r();for(var S=e.charCodeAt(i);S&&S!==39&&S!==34&&!(S>64&&S<91||S>96&&S<123)&&S!==62;)i++,S=e.charCodeAt(i);var A=i+1;if(i=e.indexOf(e[i],A),A=(" "+e.slice(A,i)).slice(1),S===39||S===34){if(i===-1){if(l={tagName:h,attributes:g,children:u,parent:null},t)for(h=0;h<u.length;h++)typeof u[h]!="string"&&(u[h].parent=l);u=l;break e}}else A=null,i--;if(m.startsWith("xmlns:")){S=A;var k=m.split(":")[1];qt.set(S,k),vn.set(k,S)}h==="tt"&&m==="xml:space"&&A==="preserve"&&(l=!0),g[m]=A}i++}for(e.charCodeAt(i-1)!==47?(i++,u=n(h,l)):i++,l={tagName:h,attributes:g,children:u,parent:null},h=u.length,g=0;g<h;g++)m=u[g],typeof m!="string"?t&&(m.parent=l):g==h-1&&m==`
29
- `&&u.pop();u=l}if(a.push(u),typeof u=="string")break;u.tagName[0]==="?"&&u.children&&(a.push.apply(a,M(u.children)),u.children=[])}else u=i,i=e.indexOf("<",i)-1,i===-2&&(i=e.length),u=(" "+e.slice(u,i+1)).slice(1),s?u.length>0&&a.push(u):(a.length&&u.length==1&&u[0]==`
30
- `||u.trim().length>0)&&a.push(u),i++;return a}function r(){for(var o=i;`\r
31
- >/= `.indexOf(e[i])===-1&&e[i];)i++;return(" "+e.slice(o,i)).slice(1)}var i=0;return n("")}function Fs(e){return typeof e=="string"}function ku(e){var t=[];if(!e.children)return[];e=d(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n!="string"&&t.push(n);return t}function Mn(e,t){var n=[];if(!e.children)return[];e=d(e.children);for(var r=e.next();!r.done;r=e.next())r=r.value,r.tagName===t&&n.push(r);return n}function vr(e){if(typeof e=="string")return Wr(e);var t=[];e=d(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"&&t.push(n);return t=t.join(""),t===""?null:Wr(t)}function _r(e){for(var t=d(e.children),n=t.next();!n.done;n=t.next())if(typeof n.value!="string")return null;return(e=vr(e))&&(e=e.trim()),e}function fi(e,t,n){if(n=n===void 0?[]:n,e.tagName===t&&n.push(e),e.children){e=d(e.children);for(var r=e.next();!r.done;r=e.next())fi(r.value,t,n)}return n}function Pn(e,t){return e=Mn(e,t),e.length!=1?null:e[0]}function Ri(e,t,n){return e=nu(e,t,n),e.length!=1?null:e[0]}function wt(e,t,n,r){r=r===void 0?null:r;var i=null;return e=e.attributes[t],e==null||e===""&&r!==null||(i=n(e)),i??r}function Io(e,t,n){return t=ta(t),e.attributes[t+":"+n]||null}function nu(e,t,n){var r=ta(t);if(t=[],e.children)for(n=r?r+":"+n:n,e=d(e.children),r=e.next();!r.done;r=e.next())(r=r.value)&&r.tagName===n&&t.push(r);return t}function ao(e,t,n){t=d(t);for(var r=t.next();!r.done;r=t.next())if(r=Io(e,r.value,n))return r;return null}function W(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}function Q(e){return!e||(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$","i").exec(e),!e)?null:(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null)}function O(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return!t||(e=Number(t[1]),!isFinite(e))?null:(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null)}function ne(e){return e=Number(e),e%1===0?e:null}function ge(e){return e=Number(e),e%1===0&&e>0?e:null}function je(e){return e=Number(e),e%1===0&&e>=0?e:null}function qe(e){return e=Number(e),isNaN(e)?null:e}function tt(e){return e?e.toLowerCase()==="true":!1}function rt(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function vt(e){var t=[];e=Wr(e).split(/\/+(?=(?:[^'"]*['"][^'"]*['"])*[^'"]*$)/),e=d(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=n.match(/^([\w]+)/);if(r){var i=n.match(/(@id='(.*?)')/),o=n.match(/(@t='(\d+)')/),s=n.match(/(@n='(\d+)')/),a=n.match(/\[(\d+)\]/);t.push({name:r[0],id:i?i[0].match(/'(.*?)'/)[0].replace(/'/gm,""):null,t:o?Number(o[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,n:s?Number(s[0].match(/'(.*?)'/)[0].replace(/'/gm,"")):null,position:a?Number(a[1])-1:null,yc:n.split("/@")[1]||null})}else n.startsWith("@")&&t.length&&(t[t.length-1].yc=n.slice(1))}return t}function En(e,t){var n=vt(t.attributes.sel||"");if(n.length){var r=n[n.length-1],i=t.attributes.pos||null;n=r.position,n==null&&(r.t!==null&&(n=or(e,"t",r.t)),r.n!==null&&(n=or(e,"n",r.n))),n===null?n=i==="prepend"?0:e.length:i==="prepend"?--n:i==="after"&&++n,i=t.tagName,(r=r.yc)&&e[n]?Qn(e[n],i,r,_r(t)||""):(i!=="remove"&&i!=="replace"||e.splice(n,1),i!=="add"&&i!=="replace"||e.splice.apply(e,[n,0].concat(M(t.children))))}}function or(e,t,n){var r=0;e=d(e);for(var i=e.next();!i.done;i=e.next()){if(Number(i.value.attributes[t])===n)return r;r++}return null}function Qn(e,t,n,r){t==="remove"?delete e.attributes[n]:(t==="add"||t==="replace")&&(e.attributes[n]=r)}function Xn(e){var t="",n=e.tagName.split(":");n.length>0&&(t=n[0],t=vn.has(t)?vn.get(t):""),t=document.createElementNS(t,e.tagName);for(var r in e.attributes)t.setAttribute(r,e.attributes[r]);for(e=d(e.children),r=e.next();!r.done;r=e.next())r=r.value,n=void 0,typeof r=="string"?n=new Text(r):n=Xn(r),t.appendChild(n);return t}function _t(e){if(!e)return null;var t={tagName:e.tagName,attributes:Vo(e.attributes),children:[],parent:null};e=d(e.children);for(var n=e.next();!n.done;n=e.next())n=n.value,typeof n=="string"||(n=_t(n),n.parent=t),t.children.push(n);return t}var qt=new Map,vn=new Map;function At(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new ns,this.position=null,this.positionAlign=ni,this.size=0,this.textAlign=Jt,this.direction=Zn,this.writingMode=sr,this.lineInterpretation=xn,this.line=null,this.lineHeight="",this.lineAlign=Ar,this.displayAlign=nn,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=Ru,this.fontStyle=ru,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={columns:32,rows:15}}function Tn(e,t){return e=new At(e,t,""),e.lineBreak=!0,e}At.prototype.clone=function(){var e=new At(0,0,""),t;for(t in this)e[t]=this[t],Array.isArray(e[t])&&(e[t]=e[t].slice());return e};function Wn(e,t){if(e.payload!=t.payload||!(Math.abs(e.startTime-t.startTime)<.001&&Math.abs(e.endTime-t.endTime)<.001))return!1;for(var n in e)if(n!="startTime"&&n!="endTime"&&n!="payload"){if(n=="nestedCues"){if(!Ye(e.nestedCues,t.nestedCues,Wn))return!1}else if(n=="region"||n=="cellResolution"){for(var r in e[n])if(e[n][r]!=t[n][r])return!1}else if(Array.isArray(e[n])){if(!Ye(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1}return!0}function zr(e,t){t=t===void 0?new Map:t;var n=e.payload;if(n.includes("<")){t.size===0&&uo(t);var r=n;n=[];for(var i=-1,o=0;o<r.length;o++)r[o]==="<"?i=o+1:r[o]===">"&&i>0&&(i=r.substr(i,o-i),i.match(rf)&&n.push(i),i=-1);for(n=d(n),o=n.next();!o.done;o=n.next())o=o.value,r=r.replace("<"+o+">",'<div time="'+o+'">'),r+="</div>";e:{o=r,i=[];var s=-1;n="",r=!1;for(var a=0;a<o.length;a++)if(o[a]==="/"){var u=o.indexOf(">",a);if(u===-1){n=o;break e}if((u=o.substring(a+1,u))&&u=="v"){r=!0;var l=null;if(i.length&&(l=i[i.length-1]),l){if(l===u)n+="/"+u+">";else{if(!l.startsWith("v")){n+=o[a];continue}n+="/"+l+">"}a+=u.length+1}else n+=o[a]}else n+=o[a]}else o[a]==="<"?(s=a+1,o[s]!="v"&&(s=-1)):o[a]===">"&&s>0&&(i.push(o.substr(s,a-s)),s=-1),n+=o[a];for(o=d(i),i=o.next();!i.done;i=o.next())i=i.value,s=i.replace(" ",".voice-"),n=n.replace("<"+i+">","<"+s+">"),n=n.replace("</"+i+">","</"+s+">"),r||(n+="</"+s+">")}n=is(n),e.payload="",r="<span>"+n.replace(/\n/g,"<br />")+"</span>";try{var h=Es(r,"span")}catch{}if(h)if(h=h.children,h.length!=1||h[0].tagName)for(h=d(h),n=h.next();!n.done;n=h.next())Oi(n.value,e,t);else e.payload=Wr(n);else e.payload=Wr(n)}else e.payload=Wr(n)}function uo(e){for(var t=d(Object.entries(Ir)),n=t.next();!n.done;n=t.next()){var r=d(n.value);n=r.next().value,r=r.next().value;var i=new At(0,0,"");i.color=r,e.set("."+n,i)}for(t=d(Object.entries(bu)),n=t.next();!n.done;n=t.next())r=d(n.value),n=r.next().value,r=r.next().value,i=new At(0,0,""),i.backgroundColor=r,e.set("."+n,i)}function is(e){var t={"< ":""," >":" &gt;"},n=/(< +>|<\s|\s>)/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,function(i){return t[i]||""}):e||""}function Oi(e,t,n){var r=t.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",r.line=null,r.region=new ns,r.position=null,r.size=0,r.textAlign=Jt,e.tagName)for(var i=d(e.tagName.split(/(?=[ .])+/g)),o=i.next();!o.done;o=i.next()){var s=o=o.value;if(s.startsWith(".voice-")){var a=s.split("-").pop();s='v[voice="'+a+'"]',n.has(s)||(s="v[voice="+a+"]")}switch(n.has(s)&&(a=r,s=n.get(s))&&(a.backgroundColor=mi(s.backgroundColor,a.backgroundColor),a.color=mi(s.color,a.color),a.fontFamily=mi(s.fontFamily,a.fontFamily),a.fontSize=mi(s.fontSize,a.fontSize),a.textShadow=mi(s.textShadow,a.textShadow),a.fontWeight=s.fontWeight,a.fontStyle=s.fontStyle,a.opacity=s.opacity,a.rubyTag=s.rubyTag,a.textCombineUpright=s.textCombineUpright,a.wrapLine=s.wrapLine),o){case"br":r=Tn(r.startTime,r.endTime),t.nestedCues.push(r);return;case"b":r.fontWeight=na;break;case"i":r.fontStyle=Ca;break;case"u":r.textDecoration.push(xs);break;case"font":(o=e.attributes.color)&&(r.color=o);break;case"div":if(o=e.attributes.time,!o)break;(o=Ts(o))&&(r.startTime=o);break;case"ruby":case"rp":case"rt":r.rubyTag=o}}if(i=e.children,Fs(e)||i.length==1&&Fs(i[0]))for(n=vr(e).split(`
32
- `),e=!0,n=d(n),i=n.next();!i.done;i=n.next())i=i.value,e||(e=Tn(r.startTime,r.endTime),t.nestedCues.push(e)),i.length>0&&(e=r.clone(),e.payload=Wr(i),t.nestedCues.push(e)),e=!1;else for(t.nestedCues.push(r),t=d(i),e=t.next();!e.done;e=t.next())Oi(e.value,r,n)}function mi(e,t){return e&&e.length>0?e:t}be("shaka.text.Cue",At),At.parseCuePayload=zr,At.equal=Wn,At.prototype.clone=At.prototype.clone;var ni="auto";At.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ni};var Jt="center",fn={LEFT:"left",RIGHT:"right",CENTER:Jt,START:"start",END:"end"};At.textAlign=fn;var nn="after",en={BEFORE:"before",CENTER:"center",AFTER:nn};At.displayAlign=en;var Zn="ltr";At.direction={HORIZONTAL_LEFT_TO_RIGHT:Zn,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var sr="horizontal-tb";At.writingMode={HORIZONTAL_TOP_TO_BOTTOM:sr,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var xn=0;At.lineInterpretation={LINE_NUMBER:xn,PERCENTAGE:1};var Ar="start",yn={CENTER:"center",START:Ar,END:"end"};At.lineAlign=yn;var Ir={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};At.defaultTextColor=Ir;var bu={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};At.defaultTextBackgroundColor=bu;var Ru=400,na=700;At.fontWeight={NORMAL:Ru,BOLD:na};var ru="normal",Ca="italic",iu={NORMAL:ru,ITALIC:Ca,OBLIQUE:"oblique"};At.fontStyle=iu;var xs="underline";At.textDecoration={UNDERLINE:xs,LINE_THROUGH:"lineThrough",OVERLINE:"overline"};var rf=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function _o(){}_o.prototype.destroy=function(){};function os(e,t,n){Ll.set(e.toLowerCase().split(";")[0]+"-"+n,{priority:n,wf:t})}function ra(e,t){for(var n=e.toLowerCase().split(";")[0],r=d([jl,Ou,Dr,ws]),i=r.next();!i.done;i=r.next())if(i=Ll.get(n+"-"+i.value)){var o=i.wf(),s=o.isSupported(e,t);if(o.destroy(),s)return i.wf}return null}be("shaka.transmuxer.TransmuxerEngine",_o),_o.findTransmuxer=ra,_o.unregisterTransmuxer=function(e,t){Ll.delete(e.toLowerCase().split(";")[0]+"-"+t)},_o.registerTransmuxer=os,_o.prototype.destroy=_o.prototype.destroy;var Ll=new Map,ws=1,Dr=2,Ou=3,jl=4;_o.PluginPriority={FALLBACK:ws,PREFERRED_SECONDARY:Dr,PREFERRED:Ou,APPLICATION:jl};function Fl(){}function ar(e,t){var n=e;return t&&!As.includes(e)&&(n+='; codecs="'+t+'"'),n}function ou(e,t){return t&&(e+='; codecs="'+t+'"'),e}function Du(e,t,n){var r=ar(e,t);return t=ou(e,t),ra(t)?(e=ra(t))?(e=e(),n=e.convertCodecs(n,t),e.destroy()):n=t:n=e!="video/mp2t"&&n=="audio"?r.replace("video","audio"):r,n}function Ma(e){return e.split(";")[0].split("/")[1]}function ri(e){var t=of(e);switch(e=t[0].toLowerCase(),t=t[1].toLowerCase(),!0){case(e==="mp4a"&&t==="69"):case(e==="mp4a"&&t==="6b"):case(e==="mp4a"&&t==="40.34"):return"mp3";case(e==="mp4a"&&t==="66"):case(e==="mp4a"&&t==="67"):case(e==="mp4a"&&t==="68"):case(e==="mp4a"&&t==="40.2"):case(e==="mp4a"&&t==="40.02"):case(e==="mp4a"&&t==="40.5"):case(e==="mp4a"&&t==="40.05"):case(e==="mp4a"&&t==="40.29"):case(e==="mp4a"&&t==="40.42"):return"aac";case(e==="mp4a"&&t==="a5"):case e==="ac3":case e==="ac-3":return"ac-3";case(e==="mp4a"&&t==="a6"):case e==="eac3":case e==="ec-3":return"ec-3";case e==="ac-4":return"ac-4";case(e==="mp4a"&&t==="b2"):return"dtsx";case(e==="mp4a"&&t==="a9"):return"dtsc";case e==="vp09":case e==="vp9":return"vp9";case e==="avc1":case e==="avc3":return"avc";case e==="hvc1":case e==="hev1":return"hevc";case e==="vvc1":case e==="vvi1":return"vvc";case e==="dvh1":case e==="dvhe":return t&&t.startsWith("05")?"dovi-p5":"dovi-hevc";case e==="dvav":case e==="dva1":return"dovi-avc";case e==="dav1":return"dovi-av1";case e==="dvc1":case e==="dvi1":return"dovi-vvc";case e==="lvc1":return"lcevc"}return e}function Us(e){var t=[];e=d(e.split(","));for(var n=e.next();!n.done;n=e.next())n=of(n.value),t.push(n[0]);return t.sort().join(",")}function vi(e){return e.split(";")[0]}function yi(e){return e=e.split(/ *; */),e.shift(),(e=e.find(function(t){return t.startsWith("codecs=")}))?e.split("=")[1].replace(/^"|"$/g,""):""}function su(e){return e==="application/x-mpegurl"||e==="application/vnd.apple.mpegurl"}function of(e){e=e.split(".");var t=e[0];return e.shift(),[t,e.join(".")]}be("shaka.util.MimeUtils",Fl),Fl.getFullTypeWithAllCodecs=ou,Fl.getFullType=ar,new Map().set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var As=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function Is(e){this.i=null,this.l=e,this.B=this.G=!1,this.m=this.u=0,this.o=1/0,this.h=this.g=null,this.D="",this.C=function(){},this.j=new Map}function ii(e,t){Pa.set(e,t)}function au(e){return Pa.get(e)}function uu(e){return Pa.has(e)?!0:e=="application/cea-608"||e=="application/cea-708"?!!Vn:!1}Is.prototype.destroy=function(){return this.l=this.i=null,this.j.clear(),Promise.resolve()};function Dh(e,t,n,r,i){var o,s,a,u,l,h,g,m;return G(function(S){if(S.h==1)return S.g(Promise.resolve(),2);if(!e.i||!e.l)return S.return();if(n==null||r==null)return e.i.parseInit(xt(t)),S.return();for(o=e.B?0:e.u,s=e.G||e.B?n:e.u,a={periodStart:o,segmentStart:n,segmentEnd:r,vttOffset:s},u=e.i.parseMedia(xt(t),a,i,[]),l=d(u),h=l.next();!h.done;h=l.next())g=h.value,e.C(g,i||null,a);m=u.filter(function(A){return A.startTime>=e.m&&A.startTime<e.o}),e.l.append(m),e.g==null&&(e.g=Math.max(n,e.m)),e.h=Math.min(r,e.o),S.j()})}Is.prototype.remove=function(e,t,n){n=n===void 0?!1:n;var r=this;return G(function(i){if(i.h==1)return i.g(Promise.resolve(),2);if(e>=t||n&&(Bl(r,e,t),r.D===""))return i.return();r.l&&r.l.remove(e,t)&&r.g!=null&&(t<=r.g||e>=r.h||(e<=r.g&&t>=r.h?r.g=r.h=null:e<=r.g&&t<r.h?r.g=t:e>r.g&&t>=r.h&&(r.h=e)),lu(r)),i.j()})};function sf(e,t,n){e.m=t,e.o=n}function Ul(e,t,n){e.D=t,(t=e.j.get(t))&&(t=t.filter(function(r){return r.endTime<=n}),t.length&&e.l.append(t))}function af(e,t,n){t.startTime+=n,t.endTime+=n,t=d(t.nestedCues);for(var r=t.next();!r.done;r=t.next())af(e,r.value,n)}function Nu(e,t,n){var r=new Map;t=d(t);for(var i=t.next();!i.done;i=t.next()){var o=i.value;i=o.stream,o=o.cue,r.has(i)||r.set(i,[]),af(e,o,n),o.startTime>=e.m&&o.startTime<e.o&&(r.get(i).push(o),i==e.D&&e.l.append([o]))}for(n=d(r.keys()),t=n.next();!t.done;t=n.next())for(t=t.value,e.j.has(t)||e.j.set(t,[]),i=d(r.get(t)),o=i.next();!o.done;o=i.next())o=o.value,e.j.get(t).push(o);lu(e)}function Bl(e,t,n){for(var r=d(e.j.keys()),i=r.next();!i.done;i=r.next()){i=i.value;var o=e.j.get(i);o=o.filter(function(s){return s.startTime<t||s.endTime>=n}),e.j.set(i,o)}}function lu(e){for(var t=1/0,n=-1/0,r=d(e.j.values()),i=r.next();!i.done;i=r.next()){i=d(i.value);for(var o=i.next();!o.done;o=i.next())o=o.value,t=Math.min(t,o.startTime),n=Math.max(n,o.endTime)}t!==1/0&&n!==-1/0&&(e.g=e.g==null?Math.max(t,e.m):Math.min(e.g,Math.max(t,e.m)),e.h=Math.max(e.h,Math.min(n,e.o)))}be("shaka.text.TextEngine",Is),Is.prototype.destroy=Is.prototype.destroy,Is.findParser=au,Is.unregisterParser=function(e){Pa.delete(e)},Is.registerParser=ii;var Pa=new Map;function ia(e){this.h=e,this.g=null}ia.prototype.ka=function(e){var t=this;this.stop();var n=!0,r=null;return this.g=function(){R.clearTimeout(r),n=!1},r=R.setTimeout(function(){n&&t.h()},e*1e3),this},ia.prototype.stop=function(){this.g&&(this.g(),this.g=null)};function Yt(e){this.h=e,this.g=null}Yt.prototype.xb=function(){return this.stop(),this.h(),this},Yt.prototype.ka=function(e){var t=this;return this.stop(),this.g=new ia(function(){t.h()}).ka(e),this},Yt.prototype.Ea=function(e){var t=this;return this.stop(),this.g=new ia(function(){t.g.ka(e),t.h()}).ka(e),this},Yt.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},be("shaka.util.Timer",Yt),Yt.prototype.stop=Yt.prototype.stop,Yt.prototype.tickEvery=Yt.prototype.Ea,Yt.prototype.tickAfter=Yt.prototype.ka,Yt.prototype.tickNow=Yt.prototype.xb;function Nh(e,t){return e.concat(t)}function Lh(){}function ss(e){return e!=null}function Lu(e,t){return Promise.race([t,new Promise(function(n,r){new Yt(r).ka(e)})])}function lo(){}function ka(e,t){return e=Rn(e),t=Rn(t),e.split("-")[0]==t.split("-")[0]}function cu(e,t){return e=Rn(e),t=Rn(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&e.length==1&&t.length==2}function Vl(e,t){return e=Rn(e),t=Rn(t),e=e.split("-"),t=t.split("-"),e.length==2&&t.length==2&&e[0]==t[0]}function Rn(e){e=d(e.split("-x-"));var t=e.next().value;t=t===void 0?"":t,e=e.next().value,e=e===void 0?"":e;var n=d(t.split("-"));return t=n.next().value,t=t===void 0?"":t,n=n.next().value,n=n===void 0?"":n,e=e?"x-"+e:"",t=t.toLowerCase(),t=D.get(t)||t,n=n.toUpperCase(),(n?t+"-"+n:t)+(e?"-"+e:"")}function $r(e,t){return e=Rn(e),t=Rn(t),t==e?4:cu(t,e)?3:Vl(t,e)?2:cu(e,t)?1:0}function fu(e){var t=e.indexOf("-");return e=t>=0?e.substring(0,t):e,e=e.toLowerCase(),e=D.get(e)||e}function y(e){return e.language?Rn(e.language):e.audio&&e.audio.language?Rn(e.audio.language):e.video&&e.video.language?Rn(e.video.language):"und"}function w(e,t){e=Rn(e);var n=new Set;t=d(t);for(var r=t.next();!r.done;r=t.next())n.add(Rn(r.value));for(t=d(n),r=t.next();!r.done;r=t.next())if(r=r.value,r==e)return r;for(t=d(n),r=t.next();!r.done;r=t.next())if(r=r.value,cu(r,e))return r;for(t=d(n),r=t.next();!r.done;r=t.next())if(r=r.value,Vl(r,e))return r;for(n=d(n),t=n.next();!t.done;t=n.next())if(t=t.value,cu(e,t))return t;return null}be("shaka.util.LanguageUtils",lo),lo.findClosestLocale=w,lo.getLocaleForVariant=y,lo.getLocaleForText=function(e){return Rn(e.language||"und")},lo.getBase=fu,lo.relatedness=$r,lo.areSiblings=function(e,t){var n=fu(e),r=fu(t);return e!=n&&t!=r&&n==r},lo.normalize=Rn,lo.isSiblingOf=Vl,lo.isParentOf=cu,lo.areLanguageCompatible=ka,lo.areLocaleCompatible=function(e,t){return e=Rn(e),t=Rn(t),e==t};var D=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function _(){}function X(e,t,n,r,i){if(i.length){var o=e.textStreams;i=d(i);for(var s=i.next(),a={};!s.done;a={Ch:void 0},s=i.next())if(a.Ch=s.value,s=o.filter(function(A){return function(k){return!!(k.codecs.startsWith(A.Ch)||k.mimeType.startsWith(A.Ch))}}(a)),s.length){o=s;break}e.textStreams=o}if(o=e.variants,(t.length||n.length)&&(o=oe(o,t,n)),r.length){for(t=new Tt,o=d(o),n=o.next();!n.done;n=o.next())n=n.value,t.push(String(n.video.width||0),n);var u=[];t.forEach(function(A,k){A=0;var b=[];k=d(k);for(var V=k.next(),B={};!V.done;B={Sf:void 0},V=k.next())B.Sf=V.value,V=r.filter(function(Z){return function(ae){return Z.Sf.decodingInfos[0][ae]}}(B)).length,V>A?(A=V,b=[B.Sf]):V==A&&b.push(B.Sf);u.push.apply(u,M(b))}),o=u}for(t=new Set,n=d(o),i=n.next();!i.done;i=n.next())i=i.value,i.video&&t.add(i.video);if(t.size){var l={vp8:1,avc:1,"dovi-avc":.95,vp9:.9,vp09:.9,hevc:.85,"dovi-hevc":.8,"dovi-p5":.75,av01:.7,"dovi-av1":.65,vvc:.6};i=Array.from(t).sort(function(A,k){return A.bandwidth&&k.bandwidth&&A.bandwidth!=k.bandwidth?A.bandwidth-k.bandwidth:A.width!=k.width?A.width-k.width:A.codecs&&k.codecs?(A=ri(A.codecs),k=ri(k.codecs),(l[A]||1)-(l[k]||1)):0});var h=[];for(t=new Map,n=function(A){var k=[String(A.width||""),String(A.height||""),String(Math.round(A.frameRate||0)),A.hdr||"",A.fastSwitching];return A.dependencyStream&&k.push(A.dependencyStream.baseOriginalId||""),A.roles&&k.push(A.roles.sort().join("_")),k.join(";")},i=d(i),s=i.next();!s.done;s=i.next()){s=s.value,a=n(s);var g=t.get(a)||[];if(g.length){var m=ri(g[g.length-1].codecs),S=ri(s.codecs);m==S&&(g.push(s),h.push(s.id))}else g.push(s),h.push(s.id);t.set(a,g)}e.variants=o.filter(function(A){return!((A=A.video)&&!h.includes(A.id))})}else e.variants=o}function oe(e,t,n){t=d(t);for(var r=t.next(),i={};!r.done;i={ij:void 0},r=t.next())if(i.ij=r.value,r=e.filter(function(o){return function(s){return s.video&&s.video.codecs.startsWith(o.ij)}}(i)),r.length){e=r;break}for(n=d(n),t=n.next(),r={};!t.done;r={Nh:void 0},t=n.next())if(r.Nh=t.value,t=e.filter(function(o){return function(s){return s.audio&&s.audio.codecs.startsWith(o.Nh)}}(r)),t.length){e=t;break}return e}function ve(e,t,n){e.variants=e.variants.filter(function(r){return Oe(r,t,n)})}function Oe(e,t,n){function r(s,a,u){return s>=a&&s<=u}if(e&&e.video&&e.video.width&&e.video.height){var i=e.video.width,o=e.video.height;if(o>i&&(o=d([o,i]),i=o.next().value,o=o.next().value),!r(i,t.minWidth,Math.min(t.maxWidth,n.width))||!r(o,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i*o,t.minPixels,t.maxPixels))return!1}return!(e&&e.video&&e.video.frameRate&&!r(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||e&&e.audio&&e.audio.channelsCount&&!r(e.audio.channelsCount,t.minChannelsCount,t.maxChannelsCount)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function Ue(e,t,n,r){return n=n===void 0?[]:n,r=r===void 0?{}:r,G(function(i){return i.h==1?i.g(Ke(e,t,t.offlineSessionIds.length>0,n,r),2):(ot(t),i.g(Ht(t),0))})}function Ke(e,t,n,r,i){var o,s;return G(function(a){if(a.h==1)return ct().Wi()&&Te(t.variants),a.g(Ze(t.variants,n,!1,r),2);o=null,e&&(s=e.g)&&(o=s.keySystem),t.variants=t.variants.filter(function(u){var l=Me(u,o,i);if(!l){var h=[];u.audio&&h.push(ir(u.audio)),u.video&&h.push(ir(u.video))}return l}),a.j()})}function Te(e){var t=new Map().set("dvav","avc3").set("dva1","avc1").set("dvhe","hev1").set("dvh1","hvc1").set("dvc1","vvc1").set("dvi1","vvi1"),n=new Set;e=d(e);for(var r=e.next();!r.done;r=e.next())r=r.value,r.video&&n.add(r.video);for(n=d(n),e=n.next();!e.done;e=n.next()){e=e.value,r=d(t);for(var i=r.next();!i.done;i=r.next()){var o=d(i.value);if(i=o.next().value,o=o.next().value,e.codecs.includes(i)){e.codecs=e.codecs.replace(i,o);break}}}}function Me(e,t,n){if(!e.decodingInfos.some(function(u){return!(!u.supported||t&&(u=u.keySystemAccess)&&(n[u.keySystem]||u.keySystem)!=t)}))return!1;var r=ct(),i=r.Hb()==="Xbox";r=r.Pa()==="MOBILE"&&r.Ia()==="GECKO";var o=e.video,s=o&&o.width||0,a=o&&o.height||0;return i&&o&&(s>1920||a>1080)&&(o.codecs.includes("avc1.")||o.codecs.includes("avc3."))||(i=o&&o.dependencyStream)&&!Za(i)?!1:(e=e.audio,!(r&&e&&e.encrypted&&e.codecs.toLowerCase().includes("opus")||e&&e.dependencyStream))}function Be(e,t){var n,r,i,o,s,a,u;return G(function(l){if(l.h==1){for(n=function(h,g){if(h){var m=Vo(h);return m.supported=h.supported&&g.supported,m.powerEfficient=h.powerEfficient&&g.powerEfficient,m.smooth=h.smooth&&g.smooth,g.keySystemAccess&&!m.keySystemAccess&&(m.keySystemAccess=g.keySystemAccess),m}return g},r=null,i=[],o=d(t),s=o.next(),a={};!s.done;a={cache:void 0,Le:void 0},s=o.next())u=s.value,a.Le=qs(u),a.cache=uf,a.cache.has(a.Le)?r=n(r,a.cache.get(a.Le)):i.push(Fe(u).then(function(h){return function(g){var m=null;g=d(g||[]);for(var S=g.next();!S.done;S=g.next())m=n(m,S.value);m&&(h.cache.set(h.Le,m),r=n(r,m))}}(a)));return l.g(Promise.all(i),2)}r&&e.decodingInfos.push(r),l.j()})}function Fe(e){var t=[""];e.video&&(t=yi(e.video.contentType).split(","));var n=[""];e.audio&&(n=yi(e.audio.contentType).split(","));var r=[];t=d(t);for(var i=t.next();!i.done;i=t.next()){i=i.value;for(var o=d(n),s=o.next(),a={};!s.done;a={Kc:void 0},s=o.next())s=s.value,a.Kc=Hi(e),e.video&&(a.Kc.video.contentType=ar(vi(a.Kc.video.contentType),i)),e.audio&&(a.Kc.audio.contentType=ar(vi(a.Kc.audio.contentType),s)),r.push(new Promise(function(u){return function(l,h){(ct().Pa()=="MOBILE"?Lu(5,navigator.mediaCapabilities.decodingInfo(u.Kc)):navigator.mediaCapabilities.decodingInfo(u.Kc)).then(function(g){l(g)}).catch(h)}}(a)))}return Promise.all(r).catch(function(){return JSON.stringify(e),null})}function Ze(e,t,n,r){var i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe;return G(function(te){switch(te.h){case 1:if(e.some(function(le){return le.decodingInfos.length}))return te.return();i=d(r),o=i.next(),s={};case 2:if(o.done){te.A(4);break}s.Ei=o.value,a=!1,u=d(e),l=u.next();case 5:if(l.done){te.A(7);break}h=l.value,g=$e(h,t,n).filter(function(le){return function(ie){return ie=ie[0],(ie.keySystemConfiguration&&ie.keySystemConfiguration.keySystem)===le.Ei}}(s)),m=d(g),S=m.next();case 8:if(S.done){te.A(10);break}return A=S.value,te.g(Be(h,A),9);case 9:S=m.next(),te.A(8);break;case 10:h.decodingInfos.some(function(le){return le.supported})&&(a=!0),l=u.next(),te.A(5);break;case 7:if(a)return te.return();s={Ei:void 0},o=i.next(),te.A(2);break;case 4:k=d(e),b=k.next();case 12:if(b.done){te.A(0);break}V=b.value,B=$e(V,t,n).filter(function(le){return le=le[0],le=le.keySystemConfiguration&&le.keySystemConfiguration.keySystem,!le||!r.includes(le)}),Z=d(B),ae=Z.next();case 15:if(ae.done){b=k.next(),te.A(12);break}return pe=ae.value,te.g(Be(V,pe),16);case 16:ae=Z.next(),te.A(15)}})}function $e(e,t,n){var r=e.audio,i=e.video,o=[],s=[];if(i)for(var a=d(i.fullMimeTypes),u=a.next();!u.done;u=a.next()){u=u.value;var l=yi(u);if(l.includes(",")&&!r){var h=l.split(","),g=vi(u);l=ms("video",h),h=ms("audio",h),h=ze(h,g),g=Du(g,h,"audio"),s.push({contentType:g,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1})}if(l=Pt(l),u={contentType:Du(vi(u),l,"video"),width:i.width||64,height:i.height||64,bitrate:i.bandwidth||e.bandwidth||1,framerate:i.frameRate||30},i.hdr)switch(i.hdr){case"PQ":u.transferFunction="pq";break;case"HLG":u.transferFunction="hlg"}i.colorGamut&&(u.colorGamut=i.colorGamut),o.push(u)}if(r)for(a=d(r.fullMimeTypes),u=a.next();!u.done;u=a.next())l=u.value,u=vi(l),l=ze(yi(l),u),u=Du(u,l,"audio"),s.push({contentType:u,channels:r.channelsCount||2,bitrate:r.bandwidth||e.bandwidth||1,samplerate:r.audioSamplingRate||1,spatialRendering:r.spatialAudio});for(a=[],o.length==0&&o.push(null),s.length==0&&s.push(null),o=d(o),u=o.next();!u.done;u=o.next())for(u=u.value,l=d(s),g=l.next();!g.done;g=l.next())g=g.value,h={type:n?"file":"media-source"},u&&(h.video=u),g&&(h.audio=g),a.push(h);if(s=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]),!s.length)return[a];for(e=[],n=new Map,s=d(s),o=s.next();!o.done;o=s.next())o=o.value,n.get(o.keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o);for(s=t?"required":"optional",t=t?["persistent-license"]:["temporary"],o=d(n.keys()),u=o.next();!u.done;u=o.next()){for(u=u.value,g=n.get(u),l=new Map,g=d(g),h=g.next();!h.done;h=g.next()){h=h.value;var m=h.videoRobustness+","+h.audioRobustness;l.get(m)||l.set(m,[]),l.get(m).push(h)}for(l=d(l.values()),g=l.next();!g.done;g=l.next()){g=g.value,h=[],m=d(a);for(var S=m.next();!S.done;S=m.next()){S=Object.assign({},S.value);for(var A={keySystem:u,initDataType:"cenc",persistentState:s,distinctiveIdentifier:"optional",sessionTypes:t},k=d(g),b=k.next();!b.done;b=k.next()){if(b=b.value,b.initData&&b.initData.length){for(var V=new Set,B=d(b.initData),Z=B.next();!Z.done;Z=B.next())V.add(Z.value.initDataType);A.initDataType=b.initData[0].initDataType}b.distinctiveIdentifierRequired&&(A.distinctiveIdentifier="required"),b.persistentStateRequired&&(A.persistentState="required"),b.sessionType&&(A.sessionTypes=[b.sessionType]),r&&(A.audio?(b.encryptionScheme&&(A.audio.encryptionScheme=A.audio.encryptionScheme||b.encryptionScheme),A.audio.robustness=A.audio.robustness||b.audioRobustness):(A.audio={robustness:b.audioRobustness},b.encryptionScheme&&(A.audio.encryptionScheme=b.encryptionScheme)),A.audio.robustness==""&&delete A.audio.robustness),i&&(A.video?(b.encryptionScheme&&(A.video.encryptionScheme=A.video.encryptionScheme||b.encryptionScheme),A.video.robustness=A.video.robustness||b.videoRobustness):(A.video={robustness:b.videoRobustness},b.encryptionScheme&&(A.video.encryptionScheme=b.encryptionScheme)),A.video.robustness==""&&delete A.video.robustness)}S.keySystemConfiguration=A,h.push(S)}e.push(h)}}return e}function ze(e,t){var n=ct();return e.toLowerCase()=="flac"?n.Ia()!="WEBKIT"?"flac":"fLaC":e.toLowerCase()==="opus"?n.Ia()!="WEBKIT"?"opus":Ma(t)=="mp4"?"Opus":"opus":e.toLowerCase()=="ac-3"&&n.ke()?"ec-3":e}function Pt(e){if(e.includes("avc1")){var t=e.split(".");if(t.length==3)return e=t.shift()+".",e+=parseInt(t.shift(),10).toString(16),e+=("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if(e=="vp9")return"vp09.00.41.08";return e}function ot(e){e.textStreams=e.textStreams.filter(function(t){return t=ar(t.mimeType,t.codecs),uu(t)})}function Ht(e){var t,n,r,i,o,s,a;return G(function(u){switch(u.h){case 1:t=[],n=d(e.imageStreams),r=n.next();case 2:if(r.done){u.A(4);break}if(i=r.value,o=i.mimeType,o=="application/mp4"&&i.codecs=="mjpg"&&(o="image/jpg"),lf.has(o)){u.A(5);break}if(s=cA.get(o),!s){lf.set(o,!1),u.A(5);break}return u.g(We(s),7);case 7:a=u.i,lf.set(o,a);case 5:lf.get(o)&&t.push(i),r=n.next(),u.A(2);break;case 4:e.imageStreams=t,u.j()}})}function We(e){return new Promise(function(t){var n=new Image;n.src=e,"decode"in n?n.decode().then(function(){t(!0)}).catch(function(){t(!1)}):n.onload=n.onerror=function(){t(n.height===2)}})}function mt(e){var t=e.audio,n=e.video,r=t?t.mimeType:null,i=n?n.mimeType:null,o=t?t.codecs:null,s=n?n.codecs:null,a=t?t.groupId:null,u=[];n&&u.push(n.mimeType),t&&u.push(t.mimeType),u=u[0]||null;var l=[];t&&l.push(t.kind),n&&l.push(n.kind),l=l[0]||null;var h=new Set;if(t)for(var g=d(t.roles),m=g.next();!m.done;m=g.next())h.add(m.value);if(n)for(g=d(n.roles),m=g.next();!m.done;m=g.next())h.add(m.value);if(e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,videoLabel:null,kind:l,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:u,audioMimeType:r,videoMimeType:i,codecs:"",audioCodec:o,videoCodec:s,primary:e.primary,roles:Array.from(h),audioRoles:null,videoRoles:null,forced:!1,videoId:null,audioId:null,audioGroupId:a,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.colorGamut=n.colorGamut||null,e.videoLayout=n.videoLayout||null,e.videoRoles=n.roles,e.videoLabel=n.label,(r=n.dependencyStream)&&(e.width=r.width||e.width,e.height=r.height||e.height,e.videoCodec=r.codecs||e.videoCodec,e.pixelAspectRatio=r.pixelAspectRatio||e.pixelAspectRatio,e.videoBandwidth&&r.bandwidth&&(e.videoBandwidth+=r.bandwidth)),s.includes(","))){e.channelsCount=n.channelsCount,e.audioSamplingRate=n.audioSamplingRate,e.spatialAudio=n.spatialAudio,e.originalLanguage=n.originalLanguage,e.audioMimeType=i,i=s.split(",");try{e.videoCodec=ms("video",i),e.audioCodec=ms("audio",i)}catch{}}return t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage,i=t.dependencyStream)&&(e.audioCodec=i.codecs||e.audioCodec,e.audioBandwidth&&i.bandwidth&&(e.audioBandwidth+=i.bandwidth)),n&&!e.videoBandwidth&&(t?e.audioBandwidth&&(e.videoBandwidth=e.bandwidth-e.audioBandwidth):e.videoBandwidth=e.bandwidth),t&&!e.audioBandwidth&&(n?e.videoBandwidth&&(e.audioBandwidth=e.bandwidth-e.videoBandwidth):e.audioBandwidth=e.bandwidth),t=[],e.videoCodec&&t.push(e.videoCodec),e.audioCodec&&t.push(e.audioCodec),e.codecs=t.join(", "),e}function ur(e){return{id:e.id,active:!1,type:Bt,bandwidth:e.bandwidth||0,language:e.language,label:e.label,kind:e.kind||null,mimeType:e.mimeType,codecs:e.codecs||null,primary:e.primary,roles:e.roles,accessibilityPurpose:e.accessibilityPurpose,forced:e.forced,originalTextId:e.originalId,originalLanguage:e.originalLanguage}}function oi(e){var t=e.width||null,n=e.height||null,r=null;e.segmentIndex&&(r=Cs(e.segmentIndex));var i=e.tilesLayout;return r&&(i=r.tilesLayout||i),i&&t!=null&&(t/=Number(i.split("x")[0])),i&&n!=null&&(n/=Number(i.split("x")[1])),{id:e.id,type:"image",bandwidth:e.bandwidth||0,width:t,height:n,mimeType:e.mimeType,codecs:e.codecs||null,tilesLayout:i||null,originalImageId:e.originalId}}function Si(e){return e.__shaka_id||(e.__shaka_id=lA++),e.__shaka_id}function du(e){var t={id:Si(e),active:e.mode!="disabled",type:Bt,bandwidth:0,language:Rn(e.language||"und"),label:e.label,kind:e.kind,mimeType:null,codecs:null,primary:!1,roles:[],accessibilityPurpose:null,forced:e.kind=="forced",originalTextId:e.id,originalLanguage:e.language};return e.kind=="captions"&&(t.mimeType="unknown"),e.kind=="subtitles"&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),t}function Bs(e,t){var n=e?e.language:null;if(n={id:Si(e||t),active:e?e.enabled:t.selected,type:"variant",bandwidth:0,language:Rn(n||"und"),label:e?e.label:null,videoLabel:null,kind:e?e.kind:null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,colorGamut:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:e?e.kind=="main":!1,roles:[],forced:!1,audioRoles:null,videoRoles:null,videoId:null,audioId:null,audioGroupId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:t?t.id:null,originalAudioId:e?e.id:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:n},e&&e.kind&&(n.roles=[e.kind],n.audioRoles=[e.kind]),e&&e.configuration&&(e.configuration.codec&&(n.audioCodec=e.configuration.codec,n.codecs=n.audioCodec),e.configuration.bitrate&&(n.audioBandwidth=e.configuration.bitrate,n.bandwidth+=n.audioBandwidth),e.configuration.sampleRate&&(n.audioSamplingRate=e.configuration.sampleRate),e.configuration.numberOfChannels&&(n.channelsCount=e.configuration.numberOfChannels)),t&&t.configuration&&(t.configuration.codec&&(n.videoCodec=t.configuration.codec,n.codecs=n.codecs?n.codecs+(","+n.videoCodec):n.videoCodec),t.configuration.bitrate&&(n.videoBandwidth=t.configuration.bitrate,n.bandwidth+=n.videoBandwidth),t.configuration.framerate&&(n.frameRate=t.configuration.framerate),t.configuration.width&&(n.width=t.configuration.width),t.configuration.height&&(n.height=t.configuration.height),t.configuration.colorSpace&&t.configuration.colorSpace.transfer))switch(t.configuration.colorSpace.transfer){case"pq":n.hdr="PQ";break;case"hlg":n.hdr="HLG";break;case"bt709":n.hdr="SDR"}return n}function oa(e){return e.allowedByApplication&&e.allowedByKeySystem&&e.disabledUntilTime==0}function ju(e){return e.filter(function(t){return oa(t)})}function _e(e,t,n,r){var i=e,o=e.filter(function(u){return u.primary});o.length&&(i=o);var s=i.length?i[0].language:"";if(i=i.filter(function(u){return u.language==s}),t){var a=w(Rn(t),e.map(function(u){return u.language}));a&&(i=e.filter(function(u){return Rn(u.language)==a}))}if(i=i.filter(function(u){return u.forced==r}),n){if(e=et(i,n),e.length)return e}else if(e=i.filter(function(u){return u.roles.length==0}),e.length)return e;return e=i.map(function(u){return u.roles}).reduce(Nh,[]),e.length?et(i,e[0]):i}function et(e,t){return e.filter(function(n){return n.roles.includes(t)})}function gt(e){var t=[];return e.audio&&t.push(e.audio),e.video&&t.push(e.video),t}function rn(e,t){t.length&&(t=t.filter(function(n){return ri(e.codecs)==ri(n.codecs)}).sort(function(n,r){return n.bandwidth&&r.bandwidth&&n.bandwidth!=r.bandwidth?n.bandwidth-r.bandwidth:(n.width||0)-(r.width||0)}),e.trickModeVideo=t[0],t.length>1&&(t=t.find(function(n){return e.width==n.width&&e.height==n.height})))&&(e.trickModeVideo=t)}function ir(e){return e.type=="audio"?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:e.type=="video"?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}function Di(e,t,n){if(n.autoShowText==0)return!1;if(n.autoShowText==1)return!0;var r=Rn(n.preferredTextLanguage);return t=Rn(t.language),n.autoShowText==2?ka(t,r):n.autoShowText==3?e?(e=Rn(e.language),ka(t,r)&&!ka(e,t)):!1:(ut("Invalid autoShowText setting!"),!1)}function Pv(e){var t={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]};e=d(e);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r={id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n?vi(n):"",codecs:n?yi(n):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"video",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};r.fullMimeTypes.add(ar(r.mimeType,r.codecs)),n.startsWith("audio/")?(r.type="audio",t.audio=r):t.video=r}return t}be("shaka.util.StreamUtils",_),_.meetsRestrictions=Oe;var uf=new Map,lA=0,lf=new Map().set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),cA=new Map().set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function Tr(){var e=this;this.G=null,this.H=!1,this.u=new Xt,this.j=new Et,navigator.connection&&navigator.connection.addEventListener&&this.j.F(navigator.connection,"change",function(){e.g.useNetworkInformation&&navigator.onLine&&(e.u=new Xt,e.g&&e.u.configure(e.g.advanced),e.trySuggestStreams())}),this.l=[],this.I=1,this.J=!1,this.h=this.o=this.g=this.B=null,this.m=new Yt(function(){if(e.H&&(e.g.restrictToElementSize||e.g.restrictToScreenSize)){var t=e.chooseVariant();t&&e.G&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}}),this.C=R,"documentPictureInPicture"in R&&this.j.F(R.documentPictureInPicture,"enter",function(){e.C=R.documentPictureInPicture.window,e.m&&e.m.xb(),e.j.Aa(e.C,"pagehide",function(){e.C=R,e.m&&e.m.xb()})}),this.D=this.i=null}f=Tr.prototype,f.stop=function(){this.G=null,this.H=!1,this.l=[],this.I=1,this.o=this.B=null,this.h&&(this.h.disconnect(),this.h=null),this.m&&this.m.stop(),this.D=this.i=null},f.release=function(){this.stop(),this.j.release(),this.m=null},f.init=function(e){this.G=e},f.chooseVariant=function(e){e=e===void 0?!1:e;var t=1/0,n=1/0;if(this.g.restrictToScreenSize&&(n=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio,t=this.C.screen.height*n,n*=this.C.screen.width),this.h&&this.g.restrictToElementSize){var r=this.g.ignoreDevicePixelRatio?1:this.C.devicePixelRatio,i=this.o.clientHeight,o=this.o.clientWidth;this.i&&document.pictureInPictureElement&&document.pictureInPictureElement==this.o&&(i=this.i.height,o=this.i.width),t=Math.min(t,i*r),n=Math.min(n,o*r)}if(i=this.l.filter(function(l){return l&&!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)}),i.length||(i=this.l),r=i,e&&i.length!=this.l.length&&(r=this.l.filter(function(l){return l&&!!(l.audio&&l.audio.fastSwitching||l.video&&l.video.fastSwitching)})),e=jh(this,this.g.restrictions,r,1/0,1/0),t!=1/0||n!=1/0){for(e=fA(e),e=d(e),i=e.next();!i.done;i=e.next())if(i=i.value,i.height>=t&&i.width>=n){t=i.height,n=i.width;break}e=jh(this,this.g.restrictions,r,t,n)}for(t=this.getBandwidthEstimate(),r.length&&!e.length&&(e=jh(this,null,r,1/0,1/0),e=[e[0]]),n=e[0]||null,r=0;r<e.length;r++){i=e[r];var s=isNaN(this.I)?1:Math.abs(this.I);o=s*i.bandwidth/this.g.bandwidthDowngradeTarget;for(var a={bandwidth:1/0},u=r+1;u<e.length;u++)if(i.bandwidth!=e[u].bandwidth){a=e[u];break}s=s*a.bandwidth/this.g.bandwidthUpgradeTarget,n&&i&&t>=o&&t<=s&&(n.bandwidth!=i.bandwidth||n.bandwidth==i.bandwidth&&n.video&&i.video&&(n.video.width<i.video.width||n.video.height<i.video.height))&&(n=i)}return this.B=Date.now(),n},f.enable=function(){this.H=!0,this.l.length&&this.trySuggestStreams()},f.disable=function(){this.H=!1},f.segmentDownloaded=function(e,t,n,r){var i=e;this.g.removeLatencyFromFirstPacketTime&&r&&r.packetNumber===1&&r.timeToFirstByte&&(i=e-r.timeToFirstByte),i>=this.g.cacheLoadThreshold&&this.u.sample(i,t),n&&this.B!=null&&this.H&&kv(this)},f.trySuggestStreams=function(){this.H&&(this.B=Date.now(),kv(this,!0))},f.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=navigator.connection.downlink*1e6),navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&this.g.preferNetworkInformationBandwidth?e:(e=this.u.getBandwidthEstimate(e),this.D?this.D.getBandwidthEstimate(e):e)},f.setVariants=function(e){return Sn(e,this.l)?!1:(this.l=e,!0)},f.playbackRateChanged=function(e){this.I=e},f.setMediaElement=function(e){function t(){n.m.ka(dA)}var n=this;this.o=e,this.h&&(this.h.disconnect(),this.h=null),this.o&&"ResizeObserver"in R&&(this.h=new ResizeObserver(t),this.h.observe(this.o)),this.j.F(e,"enterpictureinpicture",function(r){r.pictureInPictureWindow&&(n.i=r.pictureInPictureWindow,n.j.F(n.i,"resize",t))}),this.j.F(e,"leavepictureinpicture",function(){n.i&&n.j.Na(n.i,"resize",t),n.i=null})},f.setCmsdManager=function(e){this.D=e},f.configure=function(e){this.g=e,this.u&&this.g&&this.u.configure(this.g.advanced)};function kv(e,t){if(t===void 0||!t){if(!e.J){if(t=e.u,!(t.g>=t.i))return;e.J=!0,e.B-=(e.g.switchInterval-e.g.minTimeToSwitch)*1e3}if(Date.now()-e.B<e.g.switchInterval*1e3)return}t=e.chooseVariant(),e.getBandwidthEstimate(),t&&e.G&&e.G(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}function jh(e,t,n,r,i){if(e.D){var o=e.D.di();o&&(n=n.filter(function(s){return s.bandwidth&&o?s.bandwidth<=o:!0}))}return t&&(n=n.filter(function(s){return Oe(s,t,{width:i,height:r})})),n.sort(function(s,a){return s.bandwidth-a.bandwidth})}function fA(e){var t=[];e=d(e);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&(n=n.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort(function(r,i){return r.width-i.width})}be("shaka.abr.SimpleAbrManager",Tr),Tr.prototype.configure=Tr.prototype.configure,Tr.prototype.setCmsdManager=Tr.prototype.setCmsdManager,Tr.prototype.setMediaElement=Tr.prototype.setMediaElement,Tr.prototype.playbackRateChanged=Tr.prototype.playbackRateChanged,Tr.prototype.setVariants=Tr.prototype.setVariants,Tr.prototype.getBandwidthEstimate=Tr.prototype.getBandwidthEstimate,Tr.prototype.trySuggestStreams=Tr.prototype.trySuggestStreams,Tr.prototype.segmentDownloaded=Tr.prototype.segmentDownloaded,Tr.prototype.disable=Tr.prototype.disable,Tr.prototype.enable=Tr.prototype.enable,Tr.prototype.chooseVariant=Tr.prototype.chooseVariant,Tr.prototype.init=Tr.prototype.init,Tr.prototype.release=Tr.prototype.release,Tr.prototype.stop=Tr.prototype.stop;var dA=1;function bv(e,t){var n=as();this.l=e.maxAttempts==null?n.maxAttempts:e.maxAttempts,this.j=e.baseDelay==null?n.baseDelay:e.baseDelay,this.o=e.fuzzFactor==null?n.fuzzFactor:e.fuzzFactor,this.m=e.backoffFactor==null?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=t===void 0?!1:t)&&(this.g=1)}function Rv(e){var t,n;return G(function(r){if(r.h==1){if(e.g>=e.l)if(e.i)e.g=1,e.h=e.j;else throw new fe(2,7,1010);return t=e.g,e.g++,t==0?r.return():(n=e.h*(1+(Math.random()*2-1)*e.o),r.g(new Promise(function(i){new Yt(i).ka(n/1e3)}),2))}e.h*=e.m,r.j()})}function as(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}}function zn(){var e,t,n=new Promise(function(r,i){e=r,t=i});return n.resolve=e,n.reject=t,n}zn.prototype.resolve=function(){},zn.prototype.reject=function(){};function br(e,t){this.promise=e,this.i=t,this.g=null}function ba(e){return new br(Promise.reject(e),function(){return Promise.resolve()})}function Fh(){var e=Promise.reject(new fe(2,7,7001));return e.catch(function(){}),new br(e,function(){return Promise.resolve()})}function Fu(e){return new br(Promise.resolve(e),function(){return Promise.resolve()})}function Ov(e){return new br(e,function(){return e.catch(function(){})})}br.prototype.abort=function(){return this.g||(this.g=this.i()),this.g};function Dv(e){return new br(Promise.all(e.map(function(t){return t.promise})),function(){return Promise.all(e.map(function(t){return t.abort()}))})}br.prototype.finally=function(e){return this.promise.then(function(){return e(!0)},function(){return e(!1)}),this},br.prototype.Xa=function(e,t){function n(a){return function(u){if(i.g&&a)o.reject(s);else{var l=a?e:t;l?r=hA(l,u,o):(a?o.resolve:o.reject)(u)}}}function r(){return o.reject(s),i.abort()}var i=this,o=new zn;o.catch(function(){});var s=new fe(2,7,7001);return this.promise.then(n(!0),n(!1)),new br(o,function(){return r()})};function hA(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then(function(){},function(){})})}catch(i){return n.reject(i),function(){return Promise.resolve()}}}x.Object.defineProperties(br.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.g!==null}}}),be("shaka.util.AbortableOperation",br),br.prototype.chain=br.prototype.Xa,br.prototype.finally=br.prototype.finally,br.all=Dv,br.prototype.abort=br.prototype.abort,br.notAbortable=Ov,br.completed=Fu,br.aborted=Fh,br.failed=ba;function yt(e,t){if(t)if(t instanceof Map)for(var n=d(t.keys()),r=n.next();!r.done;r=n.next())r=r.value,Object.defineProperty(this,r,{value:t.get(r),writable:!0,enumerable:!0});else for(n in t)Object.defineProperty(this,n,{value:t[n],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=R.performance&&R.performance.now?R.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function Nv(e){var t=new yt(e.type),n;for(n in e)Object.defineProperty(t,n,{value:e[n],writable:!0,enumerable:!0});return t}yt.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},yt.prototype.stopImmediatePropagation=function(){this.g=!0},yt.prototype.stopPropagation=function(){},be("shaka.util.FakeEvent",yt);var cf={ul:"abrstatuschanged",vl:"adaptation",wl:"audiotrackchanged",xl:"audiotrackschanged",yl:"boundarycrossed",zl:"buffering",Al:"canupdatestarttime",Bl:"complete",Cl:"currentitemchanged",Dl:"downloadcompleted",El:"downloadfailed",Fl:"downloadheadersreceived",Gl:"drmsessionupdate",Hl:"emsg",Nl:"itemsinserted",Ol:"itemsremoved",dm:"prft",Error:"error",Il:"expirationupdated",Jl:"firstquartile",Kl:"gapjumped",Pl:"keystatuschanged",Sl:"loaded",Tl:"loading",Vl:"manifestparsed",Wl:"manifestupdated",Xl:"mediaqualitychanged",Yl:"mediasourcerecovered",Zl:"metadataadded",Metadata:"metadata",$l:"midpoint",am:"nospatialvideoinfo",bm:"onstatechange",fm:"ratechange",im:"segmentappended",jm:"sessiondata",lm:"spatialvideoinfo",nm:"stalldetected",om:"started",pm:"statechanged",qm:"streaming",rm:"textchanged",sm:"texttrackvisibility",tm:"thirdquartile",um:"timelineregionadded",vm:"timelineregionenter",wm:"timelineregionexit",xm:"trackschanged",zm:"unloading",Bm:"variantchanged"};function _n(){this.ab=new Tt,this.Ce=this}_n.prototype.addEventListener=function(e,t){this.ab&&this.ab.push(e,t)},_n.prototype.removeEventListener=function(e,t){this.ab&&this.ab.remove(e,t)},_n.prototype.dispatchEvent=function(e){if(!this.ab)return!0;var t=this.ab.get(e.type)||[],n=this.ab.get("All");for(n&&(t=t.concat(n)),t=d(t),n=t.next();!n.done;n=t.next()){n=n.value,e.target=this.Ce,e.currentTarget=this.Ce;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch{}if(e.g)break}return e.defaultPrevented},_n.prototype.release=function(){this.ab=null};function Uu(){this.g=[]}function hu(e,t){e.g.push(t.finally(function(){$t(e.g,t)}))}Uu.prototype.destroy=function(){for(var e=[],t=d(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.promise.catch(function(){}),e.push(n.abort());return this.g=[],Promise.all(e)};function lr(e,t,n,r,i,o,s){_n.call(this),this.i=null,this.j=!1,this.u=new Uu,this.g=new Set,this.h=new Set,this.o=e||null,this.m=t||null,this.B=n||null,this.C=r||null,this.D=i||null,this.H=o||null,this.G=s||null,this.l=new Map}P(lr,_n),f=lr.prototype,f.configure=function(e){this.i=e};function sa(e,t,n,r){r=r===void 0?!1:r,n=n||Bv;var i=df.get(e);(!i||n>=i.priority)&&df.set(e,{priority:n,wf:t,Gk:r})}function Lv(e,t){for(var n=d(e.g),r=n.next();!r.done;r=n.next())t.g.add(r.value);for(e=d(e.h),n=e.next();!n.done;n=e.next())t.h.add(n.value)}f.Jk=function(e){this.g.add(e)},f.il=function(e){this.g.delete(e)},f.sj=function(){this.g.clear()},f.Kk=function(e){this.h.add(e)},f.jl=function(e){this.h.delete(e)},f.tj=function(){this.h.clear()},f.Sh=function(){this.l.clear()};function jr(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:n===void 0?null:n}}f.destroy=function(){return this.j=!0,this.g.clear(),this.h.clear(),this.l.clear(),_n.prototype.release.call(this),this.u.destroy()},f.request=function(e,t,n){var r=this,i=new Uv;if(this.j){var o=Promise.reject(new fe(2,7,7001));return o.catch(function(){}),new ff(o,function(){return Promise.resolve()},i)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Hi(t.retryParameters):as(),t.uris=Hi(t.uris),o=pA(this,e,t,n);var s=o.Xa(function(){return jv(r,e,t,n,new bv(t.retryParameters,!1),0,null,i)}),a=s.Xa(function(m){return gA(r,e,m,n)}),u=Date.now(),l=0;o.promise.then(function(){l=Date.now()-u},function(){});var h=0;s.promise.then(function(){h=Date.now()},function(){});var g=a.Xa(function(m){var S=Date.now()-h,A=m.response;return A.timeMs+=l,A.timeMs+=S,m.gk||!r.o||A.fromCache||t.method=="HEAD"||e!=Ho||r.o(A.timeMs,A.data.byteLength,Fv(n),t,n),r.G&&r.G(e,A,n),A},function(m){throw m&&(m.severity=2),m});return o=new ff(g.promise,function(){return g.abort()},i),hu(this.u,o),o};function pA(e,t,n,r){function i(a){o=o.Xa(function(){return n.body&&(n.body=Kr(n.body)),a(t,n,r)})}var o=Fu(void 0);e.D&&i(e.D),e=d(e.g);for(var s=e.next();!s.done;s=e.next())i(s.value);return o.Xa(void 0,function(a){throw a instanceof fe&&a.code==7001?a:new fe(2,1,1006,a)})}function jv(e,t,n,r,i,o,s,a){e.i.forceHTTP&&(n.uris[o]=n.uris[o].replace("https://","http://")),e.i.forceHTTPS&&(n.uris[o]=n.uris[o].replace("http://","https://")),o>0&&e.H&&e.H(t,r,n.uris[o],n.uris[o-1]);var u=new It(n.uris[o]),l=u.bc,h=!1;l||(l=location.protocol,l=l.slice(0,-1),ln(u,l),n.uris[o]=u.toString()),l=l.toLowerCase();var g=(l=df.get(l))?l.wf:null;if(!g)return ba(new fe(2,1,1e3,u));var m=l.Gk;(u=e.l.get(u.Ab))&&(n.headers["common-access-token"]=u);var S=null,A=null,k=!1,b=!1,V;return Ov(Rv(i)).Xa(function(){if(e.j)return Fh();V=Date.now();var B=0;n.requestStartTime=Date.now();var Z=g(n.uris[o],n,t,function(te,le,ie){S&&S.stop(),A&&A.ka(pe/1e3),e.o&&t==Ho&&(B++,n.packetNumber=B,e.o(te,le,Fv(r),n,r),h=!0,a.g=ie)},function(te){b=!0,n.timeToFirstByte=Date.now()-n.requestStartTime,e.m&&e.m(te,n,t)},{minBytesForProgressEvents:e.i.minBytesForProgressEvents});if(!m)return Z;var ae=n.retryParameters.connectionTimeout;ae&&(S=new Yt(function(){k=!0,Z.abort()}),S.ka(ae/1e3));var pe=n.retryParameters.stallTimeout;return pe&&(A=new Yt(function(){k=!0,Z.abort()})),Z}).Xa(function(B){S&&S.stop(),A&&A.stop(),B.timeMs==null&&(B.timeMs=Date.now()-V);var Z=B.headers["common-access-token"];if(Z){var ae=new It(B.uri);e.l.set(ae.Ab,Z)}return Z={response:B,gk:h},!b&&e.m&&e.m(B.headers,n,t),e.B&&e.B(n,B),Z},function(B){if(S&&S.stop(),A&&A.stop(),e.C){var Z=null,ae=0;B instanceof fe&&(Z=B,B.code==1001&&(ae=B.data[1])),e.C(n,Z,ae,k)}if(e.j)return Fh();if(k&&(B=new fe(1,1,1003,n.uris[o],t)),B instanceof fe){if(B.code==7001)throw B;if(B.code==1010)throw s;if(B.severity==1){if(Z=new Map().set("error",B),Z=new yt("retry",Z),Z.cancelable=!0,e.dispatchEvent(Z),Z.defaultPrevented)throw B;return o=(o+1)%n.uris.length,jv(e,t,n,r,i,o,B,a)}}throw B})}function gA(e,t,n,r){var i=Fu(void 0);e=d(e.h);for(var o=e.next(),s={};!o.done;s={Ki:void 0},o=e.next())s.Ki=o.value,i=i.Xa(function(a){return function(){var u=n.response;return u.data&&(u.data=Kr(u.data)),(0,a.Ki)(t,u,r)}}(s));return i.Xa(function(){return n},function(a){var u=2;if(a instanceof fe){if(a.code==7001)throw a;u=a.severity}throw new fe(u,1,1007,a)})}function Fv(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.Qc)return!1}return!0}be("shaka.net.NetworkingEngine",lr),lr.prototype.request=lr.prototype.request,lr.prototype.destroy=lr.prototype.destroy,lr.makeRequest=jr,lr.defaultRetryParameters=function(){return as()},lr.prototype.clearCommonAccessTokenMap=lr.prototype.Sh,lr.prototype.clearAllResponseFilters=lr.prototype.tj,lr.prototype.unregisterResponseFilter=lr.prototype.jl,lr.prototype.registerResponseFilter=lr.prototype.Kk,lr.prototype.clearAllRequestFilters=lr.prototype.sj,lr.prototype.unregisterRequestFilter=lr.prototype.il,lr.prototype.registerRequestFilter=lr.prototype.Jk,lr.unregisterScheme=function(e){df.delete(e)},lr.registerScheme=sa,lr.prototype.configure=lr.prototype.configure;function Uv(){this.g=0}lr.NumBytesRemainingClass=Uv;function ff(e,t,n){br.call(this,e,t),this.h=n}P(ff,br),lr.PendingRequest=ff;var Ho=1;lr.RequestType={MANIFEST:0,SEGMENT:Ho,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8,CMCD:9},lr.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5,MPD_PATCH:6,MEDIATAILOR_SESSION_INFO:7,MEDIATAILOR_TRACKING_INFO:8,MEDIATAILOR_STATIC_RESOURCE:9,MEDIATAILOR_TRACKING_EVENT:10,INTERSTITIAL_ASSET_LIST:11,INTERSTITIAL_AD_URL:12};var Bv=3;lr.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Bv};var df=new Map;function Bu(e){this.g=!1,this.h=new zn,this.i=e}Bu.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then(function(){e.h.resolve()},function(){e.h.resolve()}))};function qn(e,t){if(e.g)throw t instanceof fe&&t.code==7003?t:new fe(2,7,7003,t)}function Uh(e,t){var n=[];e=d(e);for(var r=e.next();!r.done;r=e.next())n.push(t(r.value));return n}function mA(e,t){e=d(e);for(var n=e.next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}function Vu(e){for(var t=new Map,n=d(Object.keys(e)),r=n.next();!r.done;r=n.next())r=r.value,t.set(r,e[r]);return t}function Bh(e){var t={};return e.forEach(function(n,r){t[r]=n}),t}function cr(e,t){this.h=gr(e),this.i=t==Vv,this.g=0}f=cr.prototype,f.La=function(){return this.g<this.h.byteLength},f.Qa=function(){return this.g},f.getLength=function(){return this.h.byteLength},f.Z=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch{throw aa()}},f.Da=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch{throw aa()}},f.W=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch{throw aa()}},f.$g=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch{throw aa()}},f.yd=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch{throw aa()}if(t>2097151)throw new fe(2,3,3001);return this.g+=8,t*4294967296+e},f.Mb=function(e,t){if(this.g+e>this.h.byteLength)throw aa();var n=xt(this.h,this.g,e);return this.g+=e,t?new Uint8Array(n):n},f.skip=function(e){if(this.g+e>this.h.byteLength)throw aa();this.g+=e},f.Li=function(e){if(this.g<e)throw aa();this.g-=e},f.seek=function(e){if(e<0||e>this.h.byteLength)throw aa();this.g=e},f.xd=function(){for(var e=this.g;this.La()&&this.h.getUint8(this.g)!=0;)this.g+=1;return e=xt(this.h,e,this.g-e),this.g+=1,Un(e)};function aa(){return new fe(2,3,3e3)}be("shaka.util.DataViewReader",cr),cr.prototype.readTerminatedString=cr.prototype.xd,cr.prototype.seek=cr.prototype.seek,cr.prototype.rewind=cr.prototype.Li,cr.prototype.skip=cr.prototype.skip,cr.prototype.readBytes=cr.prototype.Mb,cr.prototype.readUint64=cr.prototype.yd,cr.prototype.readInt32=cr.prototype.$g,cr.prototype.readUint32=cr.prototype.W,cr.prototype.readUint16=cr.prototype.Da,cr.prototype.readUint8=cr.prototype.Z,cr.prototype.getLength=cr.prototype.getLength,cr.prototype.getPosition=cr.prototype.Qa,cr.prototype.hasMoreData=cr.prototype.La;var Vv=1;cr.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Vv};function Hn(){this.i=new Map,this.h=new Map,this.g=!1}f=Hn.prototype,f.box=function(e,t){return e=_v(e),this.i.set(e,vA),this.h.set(e,t),this},f.S=function(e,t){return e=_v(e),this.i.set(e,Hv),this.h.set(e,t),this},f.stop=function(){this.g=!0},f.parse=function(e,t,n){for(e=new cr(e,0),this.g=!1;e.La()&&!this.g;)this.ud(0,e,t,n)},f.ud=function(e,t,n,r){var i=t.Qa();if(r&&i+8>t.getLength())this.g=!0;else{var o=t.W(),s=t.W(),a=pf(s),u=!1;switch(o){case 0:o=t.getLength()-i;break;case 1:if(r&&t.Qa()+8>t.getLength()){this.g=!0;return}o=t.yd(),u=!0}var l=this.h.get(s);if(l){var h=null,g=null;if(this.i.get(s)==Hv){if(r&&t.Qa()+4>t.getLength()){this.g=!0;return}g=t.W(),h=g>>>24,g&=16777215}s=i+o,n&&s>t.getLength()&&(s=t.getLength()),r&&s>t.getLength()?this.g=!0:(s-=t.Qa(),t=s>0?t.Mb(s,!1):new Uint8Array(0),t=new cr(t,0),l({name:a,parser:this,partialOkay:n||!1,stopOnPartial:r||!1,version:h,flags:g,reader:t,size:o,start:i+e,has64BitSize:u}))}else t.skip(Math.min(i+o-t.Qa(),t.getLength()-t.Qa()))}};function Wt(e){for(var t=Ra(e);e.reader.La()&&!e.parser.g;)e.parser.ud(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function ua(e){for(var t=Ra(e),n=e.reader.W(),r=0;r<n&&(e.parser.ud(e.start+t,e.reader,e.partialOkay,e.stopOnPartial),!e.parser.g);r++);}function co(e){var t=Ra(e);for(e.reader.skip(78);e.reader.La()&&!e.parser.g;)e.parser.ud(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function hf(e){var t=Ra(e);e.reader.skip(8);var n=e.reader.Da();for(e.reader.skip(6),n==2?e.reader.skip(48):e.reader.skip(12),n==1&&e.reader.skip(16);e.reader.La()&&!e.parser.g;)e.parser.ud(e.start+t,e.reader,e.partialOkay,e.stopOnPartial)}function _u(e,t){return function(n){e(n.reader.Mb(n.reader.getLength()-n.reader.Qa(),t))}}function _v(e){var t=0;e=d(e);for(var n=e.next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function pf(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function Ra(e){return 8+(e.has64BitSize?8:0)+(e.flags!=null?4:0)}be("shaka.util.Mp4Parser",Hn),Hn.headerSize=Ra,Hn.typeToString=pf,Hn.allData=_u,Hn.audioSampleEntry=hf,Hn.visualSampleEntry=co,Hn.sampleDescription=ua,Hn.children=Wt,Hn.prototype.parseNext=Hn.prototype.ud,Hn.prototype.parse=Hn.prototype.parse,Hn.prototype.stop=Hn.prototype.stop,Hn.prototype.fullBox=Hn.prototype.S,Hn.prototype.box=Hn.prototype.box;var vA=0,Hv=1;function Vh(e){var t=this;this.g=[],this.data=[],new Hn().box("moov",Wt).box("moof",Wt).S("pssh",function(n){if(!(n.version>1)){var r=xt(n.reader.h,-12,n.size);t.data.push(r),n=n.reader.Mb(16,!1),t.g.push(wo(n))}}).parse(e)}function gf(e,t,n,r){var i=e.length,o=12+t.length+4+i;r>0&&(o+=4+16*n.size);var s=new Uint8Array(o),a=gr(s),u=0;if(a.setUint32(u,o),u+=4,a.setUint32(u,1886614376),u+=4,r<1?a.setUint32(u,0):a.setUint32(u,16777216),u+=4,s.set(t,u),u+=t.length,r>0)for(a.setUint32(u,n.size),u+=4,t=d(n),n=t.next();!n.done;n=t.next())n=ts(n.value),s.set(n,u),u+=n.length;return a.setUint32(u,i),s.set(e,u+4),s}function mf(e){var t=this;this.D=e,this.l=this.B=null,this.$=this.T=!1,this.J=0,this.g=null,this.o=new Et,this.i=new Map,this.X=[],this.C=new Map,this.K=!1,this.m=new zn,this.h=null,this.u=function(n){n.severity==2&&t.m.reject(n),e.onError(n)},this.ba=new Map,this.ma=new Map,this.M=new Yt(function(){return PA(t)}),this.P=!1,this.N=[],this.oa=!1,this.G=new Yt(function(){bA(t)}),this.m.catch(function(){}),this.j=new Bu(function(){return yA(t)}),this.O=!1,this.H=this.I=null,this.V=function(){return!1}}f=mf.prototype,f.destroy=function(){return this.j.destroy()};function yA(e){return G(function(t){switch(t.h){case 1:return e.o.release(),e.o=null,e.m.reject(),e.G.stop(),e.G=null,e.M.stop(),e.M=null,t.g(Hl(e),2);case 2:if(!e.l){t.A(3);break}return t.m(4),t.g(e.l.setMediaKeys(null),6);case 6:t.o(5);break;case 4:t.l();case 5:e.l=null;case 3:e.g=null,e.B=null,e.C=new Map,e.h=null,e.u=function(){},e.D=null,e.O=!1,e.I=null,t.j()}})}f.configure=function(e,t){this.h=e,t&&(this.V=t),this.G&&this.T&&this.g&&this.G.Ea(this.h.updateExpirationTime)};function SA(e,t,n){return e.$=!0,e.C=new Map,e.P=n,Kv(e,t,!1)}function Gv(e,t,n,r){r=r===void 0?!0:r,e.C=new Map,n=d(n);for(var i=n.next();!i.done;i=n.next())e.C.set(i.value,{initData:null,initDataType:null});for(n=d(e.h.persistentSessionsMetadata),i=n.next();!i.done;i=n.next())i=i.value,e.C.set(i.sessionId,{initData:i.initData,initDataType:i.initDataType});return e.P=e.C.size>0,Kv(e,t,r)}function TA(e,t,n,r,i,o){var s,a,u,l,h;return G(function(g){return g.h==1?(s=[],o.length&&s.push(o[0].contentType),i.length&&s.push(i[0].contentType),a=function(m){return m=Ao(t,m,null),m.licenseServerUri=n,m.serverCertificate=r,m.persistentStateRequired=!0,m.sessionType="persistent-license",m},u=Pv(s),u.video&&(l=a(o[0].encryptionScheme||""),u.video.drmInfos.push(l)),u.audio&&(h=a(i[0].encryptionScheme||""),u.audio.drmInfos.push(h)),g.g(Ze([u],!0,e.O,[]),2)):(qn(e.j),g.return(Xv(e,[u])))})}function Kv(e,t,n){var r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae;return G(function(pe){if(pe.h==1){for(ey(e.h.clearKeys,t),r=t.some(function(te){return!!(te.video&&te.video.drmInfos.length||te.audio&&te.audio.drmInfos.length)}),i=Vu(e.h.servers),o=Vu(e.h.advanced||{}),!r&&n&&OA(t,i),s=new WeakSet,a=d(t),u=a.next();!u.done;u=a.next())for(l=u.value,h=qv(l),g=d(h),m=g.next();!m.done;m=g.next())S=m.value,s.has(S)||(s.add(S),NA(S,i,o,e.h.keySystemsMapping));for(A=function(te,le){var ie=[];te=d(te);for(var ye=te.next();!ye.done;ye=te.next()){ye=ye.value;var ce=ye[le]||o.has(ye.keySystem)&&o.get(ye.keySystem)[le]||"";if(ce==""&&Os(ye.keySystem)&&(le=="audioRobustness"?ce=[e.h.defaultAudioRobustnessForWidevine]:le=="videoRobustness"&&(ce=[e.h.defaultVideoRobustnessForWidevine])),typeof ce=="string")ie.push(ye);else if(Array.isArray(ce)){ce.length===0&&(ce=[""]),ce=d(ce);for(var Ee=ce.next();!Ee.done;Ee=ce.next()){var Se={};ie.push(Object.assign({},ye,(Se[le]=Ee.value,Se)))}}}return ie},k=new WeakSet,b=d(t),V=b.next();!V.done;V=b.next())B=V.value,B.video&&!k.has(B.video)&&(B.video.drmInfos=A(B.video.drmInfos,"videoRobustness"),B.video.drmInfos=A(B.video.drmInfos,"audioRobustness"),k.add(B.video)),B.audio&&!k.has(B.audio)&&(B.audio.drmInfos=A(B.audio.drmInfos,"videoRobustness"),B.audio.drmInfos=A(B.audio.drmInfos,"audioRobustness"),k.add(B.audio));return pe.g(Ze(t,e.P,e.O,e.h.preferredKeySystems),2)}return qn(e.j),Z=r||i.size>0,Z?(ae=Xv(e,t),pe.return(r?ae:ae.catch(function(){}))):(e.T=!0,pe.return(Promise.resolve()))})}function Wv(e){var t;return G(function(n){switch(n.h){case 1:if(e.l.mediaKeys)return n.return();if(!e.I){n.A(2);break}return n.g(e.I,3);case 3:return qn(e.j),n.return();case 2:return n.m(4),e.I=e.l.setMediaKeys(e.B),n.g(e.I,6);case 6:n.o(5);break;case 4:t=n.l(),e.u(new fe(2,6,6003,t.message));case 5:qn(e.j),n.j()}})}function EA(e,t){return G(function(n){if(n.h==1)return n.g(Wv(e),2);_l(e,t.initDataType,xt(t.initData)),n.j()})}f.Ob=function(e){var t=this,n,r;return G(function(i){if(i.h==1)return t.l===e?i.return():t.B?(t.l=e,t.h.delayLicenseRequestUntilPlayed&&t.o.Aa(t.l,"play",function(){for(var o=d(t.N),s=o.next();!s.done;s=o.next())Gh(t,s.value);t.oa=!0,t.N=[]}),t.l.remote?(t.o.F(t.l.remote,"connect",function(){return Hl(t)}),t.o.F(t.l.remote,"connecting",function(){return Hl(t)}),t.o.F(t.l.remote,"disconnect",function(){return Hl(t)})):"webkitCurrentPlaybackTargetIsWireless"in t.l&&t.o.F(t.l,"webkitcurrentplaybacktargetiswirelesschanged",function(){return Hl(t)}),t.H=t.g&&t.g.initData.find(function(o){return o.initData.length>0})||null,n=t.g.keySystem,(r=ct().Sg(n))||!t.H&&t.g.keySystem==="com.apple.fps"&&!t.C.size?i.A(2):i.g(Wv(t),2)):(t.o.Aa(e,"encrypted",function(){t.u(new fe(2,6,6010))}),i.return());zv(t).catch(function(){}),!r&&(t.H||t.C.size||t.h.parseInbandPsshEnabled)||t.o.F(t.l,"encrypted",function(o){return EA(t,o)}),i.j()})};function xA(e){var t,n,r,i,o;return G(function(s){switch(s.h){case 1:if(!e.B||!e.g)return s.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){s.A(2);break}return t=jr([e.g.serverCertificateUri],e.h.retryParameters),s.m(3),n=e.D.nc.request(5,t,{isPreload:e.V()}),s.g(n.promise,5);case 5:r=s.i,e.g.serverCertificate=xt(r.data),s.o(4);break;case 3:throw i=s.l(),new fe(2,6,6017,i);case 4:if(e.j.g)return s.return();case 2:return!e.g.serverCertificate||!e.g.serverCertificate.length?s.return():(s.m(6),s.g(e.B.setServerCertificate(e.g.serverCertificate),8));case 8:s.o(0);break;case 6:throw o=s.l(),new fe(2,6,6004,o.message)}})}function wA(e,t){var n,r,i;return G(function(o){if(o.h==1)return o.g(Jv(e,t,{initData:null,initDataType:null}),2);if(o.h!=3)return n=o.i,n?(r=[],(i=e.i.get(n))&&(i.Eb=new zn,r.push(i.Eb)),r.push(n.remove()),o.g(Promise.all(r),3)):o.return();e.i.delete(n),o.j()})}function zv(e){var t,n,r,i,o;return G(function(s){if(s.h==1)return e.C.size?(e.C.forEach(function(a,u){Jv(e,u,a)}),s.g(e.m,3)):s.A(2);if(s.h!=2){if(t=e.g&&e.g.keyIds||new Set([]),t.size>0&&RA(e))return s.return(e.m);e.K=!1,e.m=new zn,e.m.catch(function(){})}for(n=(e.g?e.g.initData:[])||[],r=d(n),i=r.next();!i.done;i=r.next())o=i.value,_l(e,o.initDataType,o.initData);return Gl(e)&&e.m.resolve(),s.return(e.m)})}function _l(e,t,n){if(n.length){try{n=e.h.initDataTransform(n,t,e.g)}catch(s){t=s,s instanceof fe||(t=new fe(2,6,6016,s)),e.u(t);return}if(e.h.ignoreDuplicateInitData){var r=e.i.values();r=d(r);for(var i=r.next();!i.done;i=r.next())if(Pr(n,i.value.initData))return;var o=!1;if(e.C.forEach(function(s){!o&&Pr(n,s.initData)&&(o=!0)}),o)return}e.K=!0,e.i.size>0&&Gl(e)&&(e.m.resolve(),e.K=!1,e.m=new zn,e.m.catch(function(){})),CA(e,t,n,e.g.sessionType)}}function $v(e){return e=e.i.keys(),e=Uh(e,function(t){return t.sessionId}),Array.from(e)}f.Eg=function(){var e=this,t=this.i.keys();return t=Uh(t,function(n){var r=e.i.get(n);return{sessionId:n.sessionId,sessionType:r.type,initData:r.initData,initDataType:r.initDataType}}),Array.from(t)},f.Td=function(){var e=1/0,t=this.i.keys();t=d(t);for(var n=t.next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e};function AA(e){return e.J?e.J:NaN}f.Ve=function(){return Bh(this.ma)};function Xv(e,t){var n,r,i,o,s,a,u;return G(function(l){switch(l.h){case 1:if(n=new Map,r=IA(e,t,n),!r)throw navigator.requestMediaKeySystemAccess?new fe(2,6,6001):new fe(2,6,6020);qn(e.j),l.m(2),r.getConfiguration();var h=i=e.h.keySystemsMapping[r.keySystem]||r.keySystem,g=n.get(i),m=[],S=[],A=[],k=[],b=[],V=new Set,B=new Set;DA(g,m,S,k,A,b,V,B);var Z=e.P?"persistent-license":"temporary";for(h={keySystem:h,encryptionScheme:m[0],licenseServerUri:S[0],distinctiveIdentifierRequired:g[0].distinctiveIdentifierRequired,persistentStateRequired:g[0].persistentStateRequired,sessionType:g[0].sessionType||Z,audioRobustness:g[0].audioRobustness||"",videoRobustness:g[0].videoRobustness||"",serverCertificate:k[0],serverCertificateUri:A[0],initData:b,keyIds:V,mediaTypes:g[0].mediaTypes},B.size>0&&(h.keySystemUris=B),g=d(g),B=g.next();!B.done;B=g.next())B=B.value,B.distinctiveIdentifierRequired&&(h.distinctiveIdentifierRequired=B.distinctiveIdentifierRequired),B.persistentStateRequired&&(h.persistentStateRequired=B.persistentStateRequired);if(e.g=h,!e.g.licenseServerUri)throw new fe(2,6,6012,e.g.keySystem);return l.g(r.createMediaKeys(),4);case 4:if(o=l.i,qn(e.j),e.B=o,!(e.h.minHdcpVersion!=""&&"getStatusForPolicy"in e.B)){l.A(5);break}return l.m(6),l.g(e.B.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),8);case 8:if(s=l.i,s!="usable")throw new fe(2,6,6018);qn(e.j),l.o(5,2);break;case 6:throw a=l.l(2),a instanceof fe?a:new fe(2,6,6019,a.message);case 5:return e.T=!0,e.G.Ea(e.h.updateExpirationTime),l.g(xA(e),9);case 9:qn(e.j),l.o(0);break;case 2:throw u=l.l(),qn(e.j,u),e.g=null,u instanceof fe?u:new fe(2,6,6002,u.message)}})}function IA(e,t,n){for(var r=d(t),i=r.next();!i.done;i=r.next()){i=d(qv(i.value));for(var o=i.next();!o.done;o=i.next())o=o.value,n.has(o.keySystem)||n.set(o.keySystem,[]),n.get(o.keySystem).push(o)}if(n.size==1&&n.has(""))throw new fe(2,6,6e3);r=e.h.preferredKeySystems,r.length||(i=Vu(e.h.servers),i.size==1&&(r=Array.from(i.keys()))),i=d(r);var s=i.next();for(o={};!s.done;o={Fi:void 0},s=i.next()){o.Fi=s.value,s=d(t);for(var a=s.next();!a.done;a=s.next())if(a=a.value.decodingInfos.find(function(g){return function(m){return m.supported&&m.keySystemAccess!=null&&m.keySystemAccess.keySystem==g.Fi}}(o)))return a.keySystemAccess}for(i=d([!0,!1]),o=i.next();!o.done;o=i.next())for(o=o.value,s=d(t),a=s.next();!a.done;a=s.next()){a=d(a.value.decodingInfos);for(var u=a.next();!u.done;u=a.next())if(u=u.value,u.supported&&u.keySystemAccess){var l=u.keySystemAccess.keySystem;if(!r.includes(l)){var h=n.get(l);for(!h&&e.h.keySystemsMapping[l]&&(h=n.get(e.h.keySystemsMapping[l])),l=d(h),h=l.next();!h.done;h=l.next())if(!!h.value.licenseServerUri==o)return u.keySystemAccess}}}return null}function _h(e){Gl(e)&&e.m.resolve()}function Yv(e,t){new Yt(function(){t.loaded=!0,_h(e)}).ka(jA)}function Jv(e,t,n){var r,i,o,s,a,u,l;return G(function(h){switch(h.h){case 1:try{r=e.B.createSession("persistent-license")}catch(g){return i=new fe(2,6,6005,g.message),e.u(i),h.return(Promise.reject(i))}return e.o.F(r,"message",function(g){Hh(e)?e.N.push(g):Gh(e,g)}),e.o.F(r,"keystatuseschange",function(g){return Qv(e,g)}),o={initData:n.initData,initDataType:n.initDataType,loaded:!1,Vg:1/0,Eb:null,type:"persistent-license"},e.i.set(r,o),h.m(2),h.g(r.load(t),4);case 4:return s=h.i,qn(e.j),s||(e.i.delete(r),a=e.h.persistentSessionOnlinePlayback?1:2,e.u(new fe(a,6,6013)),o.loaded=!0),Yv(e,o),_h(e),h.return(r);case 2:u=h.l(),qn(e.j,u),e.i.delete(r),l=e.h.persistentSessionOnlinePlayback?1:2,e.u(new fe(l,6,6005,u.message)),o.loaded=!0,_h(e);case 3:return h.return(Promise.resolve())}})}function CA(e,t,n,r){try{var i=e.B.createSession(r)}catch(o){e.u(new fe(2,6,6005,o.message));return}e.o.F(i,"message",function(o){Hh(e)?e.N.push(o):Gh(e,o)}),e.o.F(i,"keystatuseschange",function(o){return Qv(e,o)}),e.i.set(i,{initData:n,initDataType:t,loaded:!1,Vg:1/0,Eb:null,type:r}),e.h.logLicenseExchange&&Pi(n),i.generateRequest(t,n).catch(function(o){if(!e.j.g){e.i.delete(i);var s=o.errorCode;if(s&&s.systemCode){var a=s.systemCode;a<0&&(a+=4294967296),a="0x"+a.toString(16)}e.u(new fe(2,6,6006,o.message,o,a))}})}function Hh(e){return e.l?e.h.delayLicenseRequestUntilPlayed&&e.l.paused&&!e.oa:!e.$&&e.h.delayLicenseRequestUntilPlayed}function MA(e){return G(function(t){return t.h==1?!e.K||Hh(e)?t.A(0):t.g(e.m,3):t.g(Promise.all(e.X.map(function(n){return n.promise})),0)})}function Gh(e,t){var n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V;G(function(B){switch(B.h){case 1:if(n=t.target,e.h.logLicenseExchange&&Pi(t.message),r=e.i.get(n),i=e.g.licenseServerUri,o=e.h.advanced[e.g.keySystem],t.messageType=="individualization-request"&&o&&o.individualizationServer&&(i=o.individualizationServer),s=jr([i],e.h.retryParameters),s.body=t.message,s.method="POST",s.licenseRequestType=t.messageType,s.sessionId=n.sessionId,s.drmInfo=e.g,r&&(s.initData=r.initData,s.initDataType=r.initDataType),o&&o.headers)for(a in o.headers)s.headers[a]=o.headers[a];if(Fi(e.g.keySystem)){var Z=s,ae=e.g;try{var pe=ci(Z.body);if(pe){var te=JSON.parse(pe);te.type||(te.type=ae.sessionType,Z.body=Ui(JSON.stringify(te)))}}catch{}}if(To(e.g.keySystem))if(Z=Qi(s.body,!0,!0),Z.includes("PlayReadyKeyMessage")){for(Z=Es(Z,"PlayReadyKeyMessage"),ae=fi(Z,"HttpHeader"),ae=d(ae),pe=ae.next();!pe.done;pe=ae.next())te=pe.value,pe=fi(te,"name")[0],te=fi(te,"value")[0],s.headers[vr(pe)]=vr(te);Z=fi(Z,"Challenge")[0],s.body=ki(vr(Z))}else s.headers["Content-Type"]="text/xml; charset=utf-8";return u=Date.now(),B.m(2),h=e.D.nc.request(2,s,{isPreload:e.V()}),e.X.push(h),B.g(h.promise,4);case 4:l=B.i,$t(e.X,h),B.o(3);break;case 2:return g=B.l(),e.j.g||(m={sessionId:n.sessionId,sessionType:r.type,initData:r.initData,initDataType:r.initDataType},S=new fe(2,6,6007,g,m),e.i.size==1?(e.u(S),r&&r.Eb&&r.Eb.reject(S)):(r&&r.Eb&&r.Eb.reject(S),e.i.delete(n),Gl(e)&&(e.m.resolve(),e.M.ka(.1)))),B.return();case 3:return e.j.g?B.return():(e.J+=(Date.now()-u)/1e3,e.h.logLicenseExchange&&Pi(l.data),B.m(5),B.g(n.update(l.data),7));case 7:B.o(6);break;case 5:return k=(A=B.l())&&A.message||String(A),b=new fe(2,6,6008,k),e.u(b),r&&r.Eb&&r.Eb.reject(b),B.return();case 6:if(e.j.g)return B.return();V=new yt("drmsessionupdate"),e.D.onEvent(V),r&&(r.Eb&&r.Eb.resolve(),Yv(e,r)),B.j()}})}function Qv(e,t){t=t.target;var n=e.i.get(t),r=!1;t.keyStatuses.forEach(function(o,s){if(typeof s=="string"){var a=s;s=o,o=a}if(a=ct(),To(e.g.keySystem)&&s.byteLength==16&&a.Af()){a=gr(s);var u=a.getUint32(0,!0),l=a.getUint16(4,!0),h=a.getUint16(6,!0);a.setUint32(0,u,!1),a.setUint16(4,l,!1),a.setUint16(6,h,!1)}o!="status-pending"&&(n.loaded=!0),o=="expired"&&(r=!0),s=wo(s).slice(0,32),e.ba.set(s,o)});var i=t.expiration-Date.now();(i<0||r&&i<1e3)&&n&&!n.Eb&&(e.i.delete(t),Zv(t)),Gl(e)&&(e.m.resolve(),e.M.ka(FA))}function PA(e){var t=e.ba,n=e.ma;n.clear(),t.forEach(function(r,i){return n.set(i,r)}),t=Array.from(n.values()),t.length&&t.every(function(r){return r=="expired"})&&e.u(new fe(2,6,6014)),e.D.vf(Bh(n))}function kA(){var e,t,n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se;return G(function(Ve){if(Ve.h==1){if(e="org.w3.clearkey com.widevine.alpha com.widevine.alpha.experiment com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.microsoft.playready.recommendation.3000 com.microsoft.playready.recommendation.3000.clearlead com.chromecast.playready com.apple.fps.1_0 com.apple.fps com.huawei.wiseplay".split(" "),!(R.MediaKeys&&R.navigator&&R.navigator.requestMediaKeySystemAccess&&R.MediaKeySystemAccess&&R.MediaKeySystemAccess.prototype.getConfiguration)){for(t={},n=d(e),r=n.next();!r.done;r=n.next())i=r.value,t[i]=null;return Ve.return(t)}for(o="1.0 1.1 1.2 1.3 1.4 2.0 2.1 2.2 2.3".split(" "),s=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"],a=["150","2000","3000"],u={"com.widevine.alpha":s,"com.widevine.alpha.experiment":s,"com.microsoft.playready.recommendation":a},l=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],h=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}],g={videoCapabilities:l,audioCapabilities:h,initDataTypes:["cenc","sinf","skd","keyids"]},m=[null,"cenc","cbcs"],S=new Map,A=ct(),k=function(Le,Ce,ke){var Ge,Je,Ft,dt,kn,Ut,Gn,sn,Qt,hn,An,pn,Zt;return G(function(an){switch(an.h){case 1:return an.m(2),an.g(Ce.createMediaKeys(),5);case 5:Ge=an.i;case 4:an.o(3);break;case 2:return an.l(),an.return();case 3:if(Ft=(Je=Ce.getConfiguration().sessionTypes)?Je.includes("persistent-license"):!1,A.xi()&&(Ft=!1),dt=Ce.getConfiguration().videoCapabilities,kn=Ce.getConfiguration().audioCapabilities,Ut={persistentState:Ft,encryptionSchemes:[],videoRobustnessLevels:[],audioRobustnessLevels:[],minHdcpVersions:[]},S.get(Le)?Ut=S.get(Le):S.set(Le,Ut),(Gn=dt[0].encryptionScheme)&&!Ut.encryptionSchemes.includes(Gn)&&Ut.encryptionSchemes.push(Gn),(sn=dt[0].robustness)&&!Ut.videoRobustnessLevels.includes(sn)&&Ut.videoRobustnessLevels.push(sn),(Qt=kn[0].robustness)&&!Ut.audioRobustnessLevels.includes(Qt)&&Ut.audioRobustnessLevels.push(Qt),!(ke&&"getStatusForPolicy"in Ge)){an.A(0);break}hn=d(o),An=hn.next();case 7:if(An.done){an.A(0);break}if(pn=An.value,Ut.minHdcpVersions.includes(pn)){an.A(8);break}return an.g(Ge.getStatusForPolicy({minHdcpVersion:pn}),10);case 10:if(Zt=an.i,Zt=="usable")Ut.minHdcpVersions.includes(pn)||Ut.minHdcpVersions.push(pn);else{an.A(0);break}case 8:An=hn.next(),an.A(7)}})},b=function(Le,Ce,ke,Ge,Je){Je=Je===void 0?!1:Je;var Ft,dt,kn,Ut,Gn,sn,Qt,hn,An,pn,Zt;return G(function(an){switch(an.h){case 1:for(an.m(2),Ft=Hi(g),dt=d(Ft.videoCapabilities),kn=dt.next();!kn.done;kn=dt.next())Ut=kn.value,Ut.encryptionScheme=Ce,Ut.robustness=ke;for(Gn=d(Ft.audioCapabilities),sn=Gn.next();!sn.done;sn=Gn.next())Qt=sn.value,Qt.encryptionScheme=Ce,Qt.robustness=Ge;return hn=Hi(Ft),hn.persistentState="required",hn.sessionTypes=["persistent-license"],An=[hn,Ft],Zt=ct(),Zt.Pa()=="MOBILE"?an.g(Lu(5,navigator.requestMediaKeySystemAccess(Le,An)),7):an.g(navigator.requestMediaKeySystemAccess(Le,An),6);case 6:pn=an.i,an.A(5);break;case 7:pn=an.i;case 5:return an.g(k(Le,pn,Je),8);case 8:an.o(0);break;case 2:an.l(),an.j()}})},V=function(Le){return!(ct().Ia()==="WEBKIT"&&Fi(Le))},B=[],Z=d(e),ae=Z.next();!ae.done;ae=Z.next())if(pe=ae.value,S.set(pe,null),V(pe)){for(te=!0,le=d(m),ie=le.next();!ie.done;ie=le.next())ye=ie.value,B.push(b(pe,ye,"","",te)),te=!1;for(ce=d(u[pe]||[]),Ee=ce.next();!Ee.done;Ee=ce.next())Se=Ee.value,B.push(b(pe,null,Se,"")),B.push(b(pe,null,"",Se))}return Ve.g(Promise.all(B),2)}return Ve.return(Bh(S))})}function Zv(e){return G(function(t){if(t.h==1)return t.m(2),t.g(Lu(LA,Promise.all([e.close().catch(function(){}),e.closed])),4);if(t.h!=2)return t.o(0);t.l(),t.j()})}function Hl(e){var t;return G(function(n){return t=Array.from(e.i.entries()),e.i.clear(),n.g(Promise.all(t.map(function(r){r=d(r);var i=r.next().value,o=r.next().value;return G(function(s){if(s.h==1)return s.m(2),e.$||e.C.has(i.sessionId)||o.type!=="persistent-license"||e.h.persistentSessionOnlinePlayback?s.g(Zv(i),5):s.g(i.remove(),5);if(s.h!=2)return s.o(0);s.l(),s.j()})})),0)})}function qv(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function bA(e){e.i.forEach(function(t,n){var r=t.Vg,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.D.onExpirationUpdated(n.sessionId,i),t.Vg=i)})}function Gl(e){return e=e.i.values(),mA(e,function(t){return t.loaded})}function RA(e){for(var t=d(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if(e.ba.get(n.value)!=="usable")return!1;return!0}function OA(e,t){var n=[];for(t.forEach(function(r,i){n.push({keySystem:i,licenseServerUri:r,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}),e=d(e),t=e.next();!t.done;t=e.next())t=t.value,t.video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}function DA(e,t,n,r,i,o,s,a){var u=[];e=d(e);for(var l=e.next(),h={};!l.done;h={Ma:void 0},l=e.next()){if(h.Ma=l.value,t.includes(h.Ma.encryptionScheme)||t.push(h.Ma.encryptionScheme),h.Ma.keySystem=="org.w3.clearkey"&&h.Ma.licenseServerUri.startsWith("data:application/json;base64,")?u.includes(h.Ma.licenseServerUri)||u.push(h.Ma.licenseServerUri):n.includes(h.Ma.licenseServerUri)||n.push(h.Ma.licenseServerUri),i.includes(h.Ma.serverCertificateUri)||i.push(h.Ma.serverCertificateUri),h.Ma.serverCertificate&&(r.some(function(S){return function(A){return Pr(A,S.Ma.serverCertificate)}}(h))||r.push(h.Ma.serverCertificate)),h.Ma.initData){l=d(h.Ma.initData);for(var g=l.next(),m={};!g.done;m={Kg:void 0},g=l.next())m.Kg=g.value,o.some(function(S){return function(A){var k=S.Kg;return A.keyId&&A.keyId==k.keyId?!0:A.initDataType==k.initDataType&&Pr(A.initData,k.initData)}}(m))||o.push(m.Kg)}if(h.Ma.keyIds)for(l=d(h.Ma.keyIds),g=l.next();!g.done;g=l.next())s.add(g.value);if(h.Ma.keySystemUris&&a)for(h=d(h.Ma.keySystemUris),l=h.next();!l.done;l=h.next())a.add(l.value)}if(u.length==1)n.push(u[0]);else if(u.length>0){for(t=[],u=d(u),r=u.next();!r.done;r=u.next())r=R.atob(r.value.split("data:application/json;base64,").pop()),r=JSON.parse(r),t.push.apply(t,M(r.keys));u=JSON.stringify({keys:t}),n.push("data:application/json;base64,"+R.btoa(u))}}function NA(e,t,n,r){var i=e.keySystem;i&&(i!="org.w3.clearkey"||!e.licenseServerUri)&&(t.size&&t.get(i)&&(t=t.get(i),e.licenseServerUri=t),e.keyIds||(e.keyIds=new Set),(n=n.get(i))&&(e.distinctiveIdentifierRequired||(e.distinctiveIdentifierRequired=n.distinctiveIdentifierRequired),e.persistentStateRequired||(e.persistentStateRequired=n.persistentStateRequired),e.serverCertificate||(e.serverCertificate=n.serverCertificate),n.sessionType&&(e.sessionType=n.sessionType),e.serverCertificateUri||(e.serverCertificateUri=n.serverCertificateUri)),r[i]&&(e.keySystem=r[i]),R.cast&&R.cast.__platform__&&i=="com.microsoft.playready"&&(e.keySystem="com.chromecast.playready"))}function ey(e,t){if(e=Vu(e),e.size!=0){e=wa(e),t=d(t);for(var n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.drmInfos=[e]),n.audio&&(n.audio.drmInfos=[e])}}var LA=1,jA=5,FA=.5;function UA(){this.g=gu,this.j=new Map().set(gu,2).set(pu,1),this.i=0,this.h=-1}function Kh(e,t){var n=e.g!==t;return e.g=t,n&&t===gu&&(e.i=Date.now()),n}var pu=0,gu=1;/*
33
- @license
34
- Shaka Player
35
- Copyright 2023 Google LLC
36
- SPDX-License-Identifier: Apache-2.0
37
- */function Wh(e,t,n){this.h=e,this.i=t,this.g=n}function ty(e,t){return G(function(n){if(n.h==1)return n.g(Ue(e.g,t,e.h.drm.preferredKeySystems,e.h.drm.keySystemsMapping),2);if(e.h.streaming.dontChooseCodecs||X(t,e.h.preferredVideoCodecs,e.h.preferredAudioCodecs,e.h.preferredDecodingAttributes,e.h.preferredTextFormats),!t.variants.some(oa))throw new fe(2,4,4032);return n.return(ry(e,t))})}function ny(e,t){var n=e.h.restrictions;e=e.i;var r=!1;t=d(t.variants);for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=i.allowedByApplication;i.allowedByApplication=Oe(i,n,e),o!=i.allowedByApplication&&(r=!0)}return r}function ry(e,t){var n=ny(e,t);if(t){var r=e.g?e.g.g:null;if(r&&e.g.B){for(var i=new Set,o=d(t.variants),s=o.next();!s.done;s=o.next())s=s.value,s.audio&&i.add(s.audio),s.video&&i.add(s.video);for(i=d(i),o=i.next();!o.done;o=i.next())iy(e,r.keySystem,o.value)}oy(e,t)}return n}function iy(e,t,n){n=d(n.drmInfos);for(var r=n.next();!r.done;r=n.next())if(r=r.value,r.keySystem==t){for(var i=d(r.initData||[]),o=i.next();!o.done;o=i.next())o=o.value,_l(e.g,o.initDataType,o.initData);i=e.g,i.g&&i.g.mediaTypes!==r.mediaTypes&&(i.g.mediaTypes=r.mediaTypes)}}function oy(e,t){function n(l){if(l&&!a.has(l)&&(a.add(l),l.keyIds.size)){l=d(l.keyIds);for(var h=l.next();!h.done;h=l.next()){h=h.value;var g=r[i?"00":h];g?sy.includes(g)&&s.add(g):o.add(h)}}}var r=e.g?e.g.Ve():{};e=Object.keys(r);var i=e.length&&e[0]=="00";e=!1;var o=new Set,s=new Set,a=new WeakSet;t=d(t.variants);for(var u=t.next();!u.done;u=t.next()){if(u=u.value,!u.allowedByApplication)e=!0;else if(u.allowedByKeySystem)return;n(u.audio),n(u.video)}throw e={hasAppRestrictions:e,missingKeys:Array.from(o),restrictedKeyStatuses:Array.from(s)},new fe(2,4,4012,e)}var sy=["output-restricted","internal-error"];be("shaka.config.CodecSwitchingStrategy",{RELOAD:"reload",SMOOTH:"smooth"});function Ni(e){if(zh.has(e))return zh.get(e);var t=R.ManagedMediaSource||R.MediaSource;return t?(t=t.isTypeSupported(e),zh.set(e,t),t):!1}function ay(){var e=R.ManagedMediaSource||R.MediaSource;return e&&e.prototype?!!e.prototype.setLiveSeekableRange&&!!e.prototype.clearLiveSeekableRange:!1}var zh=new Map;function vf(e,t){var n=null,r=null,i=null,o=null,s=e.W();return t&1&&(i=e.yd()),t&2&&(o=e.W()),t&8&&(n=e.W()),t&16&&(r=e.W()),{trackId:s,Qd:n,Rd:r,oj:i,Mi:o}}function yf(e,t){return t==1?(t=e.W(),e=e.W(),{baseMediaDecodeTime:t*4294967296+e}):{baseMediaDecodeTime:e.W()}}function Sf(e,t){return t==1?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.W(),e.skip(4),e=e.Da(),{timescale:t,language:String.fromCharCode((e>>10)+96)+String.fromCharCode(((e&960)>>5)+96)+String.fromCharCode((e&31)+96)}}function Tf(e,t,n){var r=e.W(),i=[],o=null;n&1&&(o=e.$g()),n&4&&e.skip(4);for(var s=0;s<r;s++){var a={kh:null,sampleSize:null,Bf:null};n&256&&(a.kh=e.W()),n&512&&(a.sampleSize=e.W()),n&1024&&e.skip(4),n&2048&&(a.Bf=t==0?e.W():e.$g()),i.push(a)}return{Fm:r,jh:i,kg:o}}function uy(e){e.skip(6),e.skip(2),e.skip(8);var t=e.Da();return e.skip(2),e.skip(2),e.skip(2),e=e.Da()+e.Da()/65536,{channelCount:t,sampleRate:e}}function $h(e){return e=e.W(),{codec:pf(e)}}function BA(e){var t=null,n=null,r=e.Mb(4,!1),i=String.fromCharCode(r[0]);if(i+=String.fromCharCode(r[1]),i+=String.fromCharCode(r[2]),i+=String.fromCharCode(r[3]),i==="nclx"){switch(e.Da()){case 1:case 5:case 6:case 7:t="srgb";break;case 9:t="rec2020";break;case 11:case 12:t="p3"}switch(r=e.Da(),e.Da(),r){case 1:case 6:case 13:case 14:case 15:n="SDR";break;case 16:n="PQ";break;case 18:n="HLG"}}return{colorGamut:t,re:n}}function Kl(e,t){return t=t===void 0?!1:t,e=e.toString(16).toUpperCase(),t?e:("0"+e).slice(-2)}function fo(e){return(e<10?"0":"")+e}function Hu(e){this.g=e=e===void 0?[]:e}function Gu(e){if(e.g.length===0)throw Error("StreamInfos must have elements");for(var t=[],n=d(e.g),r=n.next();!r.done;r=n.next()){var i=t,o=i.push,s=r.value;r=dn;var a=s.id+1,u=s.stream.width||0,l=s.stream.height||0;s.type=="audio"&&(l=u=0);var h=s.duration*s.timescale,g=Math.floor(h/(Oa+1));switch(h=Math.floor(h%(Oa+1)),a=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(M(yr(a,4)),[0,0,0,0],M(yr(g,4)),M(yr(h,4)),[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],M(yr(u,2)),[0,0],M(yr(l,2)),[0,0])),a=dn("tkhd",a),u=dn,g=s.duration*s.timescale,l=Math.floor(g/(Oa+1)),g=Math.floor(g%(Oa+1)),h=s.stream.language,h=h.charCodeAt(0)-96<<10|h.charCodeAt(1)-96<<5|h.charCodeAt(2)-96,l=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(M(yr(s.timescale,4)),M(yr(l,4)),M(yr(g,4)),M(yr(h,2)),[0,0])),l=dn("mdhd",l),g=s,h=new Uint8Array([]),g.type){case"video":h=_A.value();break;case"audio":h=HA.value()}g=dn("hdlr",h);e:{switch(s.type){case"video":s=dn("minf",dn("vmhd",$A.value()),gy.value(),ly(s));break e;case"audio":s=dn("minf",dn("smhd",XA.value()),gy.value(),ly(s));break e}s=new Uint8Array([])}s=u("mdia",l,g,s),r=r("trak",a,s),o.call(i,r)}for(t=dr.apply(Sr,M(t)),n=e.g[0],i=dn,r=n.duration*n.timescale,o=Math.floor(r/(Oa+1)),r=Math.floor(r%(Oa+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(M(yr(n.timescale,4)),M(yr(o,4)),M(yr(r,4)),[0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255])),o=dn("mvhd",o),r=[],e=d(e.g),u=e.next();!u.done;u=e.next())s=r,a=s.push,u=new Uint8Array([0,0,0,0].concat(M(yr(u.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),u=dn("trex",u),a.call(s,u);return e=dr.apply(Sr,M(r)),e=dn("mvex",e),e=i("moov",o,t,e,fy(n.stream)),t=JA.value(),n=new Uint8Array(t.byteLength+e.byteLength),n.set(t),n.set(e,t.byteLength),n}function ly(e){var t=dn,n="aac";e.codecs.includes("mp3")?n="mp3":e.codecs.includes("ac-3")?n=ct().ke()?"ec-3":"ac-3":e.codecs.includes("ec-3")?n="ec-3":e.codecs.includes("opus")&&(n="opus");var r=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){if(n=e.stream.width||0,r=e.stream.height||0,e.Ta.byteLength>0)var i=dn("avcC",e.Ta);else{i=dn;for(var o=7,s=[],a=[],u=0,l=0,h=0,g=0;g<e.yb.length;g++){var m=dy(e.yb[g]);switch(m[0]&31){case 7:s.push(m),o+=m.length+2;break;case 8:a.push(m),o+=m.length+2}}for(s.length>0&&(u=s[0][1],h=s[0][2],l=s[0][3]),o=new Uint8Array(o),g=0,o[g++]=1,o[g++]=u,o[g++]=h,o[g++]=l,o[g++]=255,o[g++]=224|s.length,u=0;u<s.length;u++)o[g++]=(s[u].length&65280)>>8,o[g++]=s[u].length&255,o.set(s[u],g),g+=s[u].length;for(o[g++]=a.length,s=0;s<a.length;s++)o[g++]=(a[s].length&65280)>>8,o[g++]=a[s].length&255,o.set(a[s],g),g+=a[s].length;i=i("avcC",o)}n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(M(yr(n,2)),M(yr(r,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),r="avc1",a=cy(e),s=new Uint8Array([]),vu(e.stream)&&(s=mu(e.stream,e.codecs),r="encv"),r=dn(r,n,i,a,s)}else e.codecs.includes("hvc1")&&(r=e.stream.width||0,i=e.stream.height||0,n=new Uint8Array([]),e.Ta.byteLength>0&&(n=dn("hvcC",e.Ta)),r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].concat(M(yr(r,2)),M(yr(i,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),i="hvc1",a=cy(e),s=new Uint8Array([]),vu(e.stream)&&(s=mu(e.stream,e.codecs),i="encv"),r=dn(i,r,n,a,s));break;case"audio":n=="mp3"?e=dn(".mp3",Wl(e)):n=="ac-3"?(n=dn("dac3",e.Ha),r="ac-3",i=new Uint8Array([]),vu(e.stream)&&(i=mu(e.stream,e.codecs),r="enca"),e=dn(r,Wl(e),n,i)):n=="ec-3"?(n=dn("dec3",e.Ha),r="ec-3",i=new Uint8Array([]),vu(e.stream)&&(i=mu(e.stream,e.codecs),r="enca"),e=dn(r,Wl(e),n,i)):n=="opus"?(n=dn("dOps",e.Ha),r="Opus",i=new Uint8Array([]),vu(e.stream)&&(i=mu(e.stream,e.codecs),r="enca"),e=dn(r,Wl(e),n,i)):(e.Ha.byteLength>0?n=dn("esds",e.Ha):(n=dn,r=e.id+1,i=e.stream.channelsCount||2,s=e.stream.audioSamplingRate||44100,u=ms("audio",e.codecs.split(",")),l={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12},a=l[s],(u==="mp4a.40.5"||u==="mp4a.40.29")&&(a=l[s*2]),s=parseInt(u.split(".").pop(),10),r=new Uint8Array([0,0,0,0,3,25].concat(M(yr(r,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,s<<3|a>>>1,a<<7|i<<3,6,1,2])),n=n("esds",r)),r="mp4a",i=new Uint8Array([]),vu(e.stream)&&(i=mu(e.stream,e.codecs),r="enca"),e=dn(r,Wl(e),n,i)),r=e}return e=dn("stsd",YA.value(),r),t("stbl",e,dn("stts",GA.value()),dn("stsc",KA.value()),dn("stsz",zA.value()),dn("stco",WA.value()))}function cy(e){if(!e.Za&&!e.$a)return new Uint8Array([]);var t=e.$a;return e=new Uint8Array([].concat(M(yr(e.Za,4)),M(yr(t,4)))),dn("pasp",e)}function Wl(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(M(yr(e.stream.audioSamplingRate||44100,2)),[0,0]))}function fy(e){var t=[];if(!vu(e))return new Uint8Array([]);e=d(e.drmInfos);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.initData){n=d(n.initData);for(var r=n.next();!r.done;r=n.next())t.push(r.value.initData)}return dr.apply(Sr,M(t))}function mu(e,t){var n=dn;t=new Uint8Array([].concat(M(yr(hy(t.split(".")[0]),4)))),t=dn("frma",t);var r="cenc",i=e.drmInfos[0];i&&i.encryptionScheme&&(r=i.encryptionScheme),r=new Uint8Array([0,0,0,0].concat(M(yr(hy(r),4)),[0,1,0,0])),r=dn("schm",r),i=dn;var o=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e=d(e.drmInfos);for(var s=e.next();!s.done;s=e.next())if((s=s.value)&&s.keyIds&&s.keyIds.size){s=d(s.keyIds);for(var a=s.next();!a.done;a=s.next())o=dy(a.value)}return e=new Uint8Array([0,0,0,0,0,0,1,8]),o=dn("tenc",e,o),n("sinf",t,r,i("schi",o))}function zl(e){var t=[];e=d(e.g);for(var n=e.next();!n.done;n=e.next()){n=n.value;var r=t.push,i=r.apply,o=dn,s=new Uint8Array([0,0,0,0].concat(M(yr(n.data?n.data.sequenceNumber:0,4))));s=dn("mfhd",s);var a,u=n.data?n.data.sb:[],l=new Uint8Array(4+u.length);for(a=0;a<u.length;a++){var h=u[a].flags;l[a+4]=h.Se<<4|h.df<<2|h.Ze}u=dn("sdtp",l);var g=u.length+32+20+8+16+8+8;l=dn,a=new Uint8Array([0,0,0,58].concat(M(yr(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=dn("tfhd",a),h=n.data?n.data.baseMediaDecodeTime:0;var m=Math.floor(h%(Oa+1));h=new Uint8Array([1,0,0,0].concat(M(yr(Math.floor(h/(Oa+1)),4)),M(yr(m,4)))),h=dn("tfdt",h);var S=g;g=n.data?n.data.sb:[],m=g.length;var A=12+16*m,k=new Uint8Array(A);for(S+=8+A,k.set([n.type==="video"?1:0,0,15,1].concat(M(yr(m,4)),M(yr(S,4))),0),S=0;S<m;S++){var b=g[S];A=yr(b.duration,4);var V=yr(b.size,4),B=b.flags;b=yr(b.ob,4),k.set([].concat(M(A),M(V),[B.Ng<<2|B.Se,B.df<<6|B.Ze<<4|B.Og,B.Re&61440,B.Re&15],M(b)),12+16*S)}g=dn("trun",k),u=l("traf",a,h,g,u),o=o("moof",s,u),i.call(r,t,[o,VA(n)])}return dr.apply(Sr,M(t))}function VA(e){return e=(e.data?e.data.sb:[]).map(function(t){return t.data}),e=dr.apply(Sr,M(e)),dn("mdat",e)}function yr(e,t){var n=[];for(--t;t>=0;t--)n.push(e>>8*t&255);return n}function dy(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[n*2]+e[n*2+1]),16);return t}function hy(e){for(var t=0,n=0;n<e.length;n+=1)t|=e.charCodeAt(n)<<(e.length-n-1)*8;return t}function dn(e){var t=we.apply(1,arguments),n=py.get(e);n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],py.set(e,n));for(var r=8,i=t.length-1;i>=0;i--)r+=t[i].byteLength;for(i=new Uint8Array(r),i[0]=r>>24&255,i[1]=r>>16&255,i[2]=r>>8&255,i[3]=r&255,i.set(n,4),n=0,r=8;n<t.length;n++)i.set(t[n],r),r+=t[n].byteLength;return i}function vu(e){return e.encrypted&&e.drmInfos.length>0}var Oa=4294967295,py=new Map,_A=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0])}),HA=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0])}),GA=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),KA=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),WA=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),zA=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0])}),$A=new Kt(function(){return new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}),XA=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,0])}),YA=new Kt(function(){return new Uint8Array([0,0,0,0,0,0,0,1])}),JA=new Kt(function(){var e=new Uint8Array([105,115,111,109]),t=new Uint8Array([97,118,99,49]),n=new Uint8Array([0,0,0,1]);return dn("ftyp",e,n,e,t)}),gy=new Kt(function(){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);return e=dn("dref",e),dn("dinf",e)});function QA(e){e=xt(e);var t=null;return new Hn().box("moov",Wt).box("trak",Wt).box("mdia",Wt).box("minf",Wt).box("stbl",Wt).S("stsd",ua).box("enca",function(n){return t=n.reader.h,hf(n)}).box("sinf",Wt).box("frma",function(n){n.parser.stop(),$h(n.reader).codec==="ec-3"&&t&&t.getUint16(16)!==2&&t.setUint16(16,2)}).parse(e),e}function ZA(e,t,n){function r(S){g.push({box:S,zi:1701733217})}function i(S){g.push({box:S,zi:1701733238})}function o(S){u=!0,S.parser.stop()}function s(S){h.push(S),Wt(S)}var a=t=xt(t),u=!1,l,h=[],g=[];if(new Hn().box("moov",s).box("trak",s).box("mdia",s).box("minf",s).box("stbl",s).S("stsd",function(S){l=S,h.push(S),ua(S)}).S("encv",o).S("enca",o).S("dvav",i).S("dva1",i).S("dvh1",i).S("dvhe",i).S("dvc1",i).S("dvi1",i).S("hev1",i).S("hvc1",i).S("avc1",i).S("avc3",i).S("ac-3",r).S("ec-3",r).S("ac-4",r).S("Opus",r).S("fLaC",r).S("mp4a",r).parse(t),u)return t;if(g.length==0||!l)throw wo(t),new fe(2,3,3019,n);g.reverse(),n=d(g);for(var m=n.next();!m.done;m=n.next())m=m.value,a=tI(e,a,l,m.box,h,m.zi);return a=nI(e,a),ct().gh()?(e=new Uint8Array(t.byteLength+a.byteLength),e.set(a),e.set(t,a.byteLength),e):a}function qA(e){e=xt(e);var t=[];new Hn().box("mdat",function(s){t.push(s)}).parse(e);for(var n=[],r=0;r<t.length;r++){var i=t[r-1],o=t[r];n.push(eI(e.subarray(i?i.start+i.size:0,o.start+o.size)))}return dr.apply(Sr,M(n))}function eI(e){function t(g){s.push(g),Wt(g)}var n,r,i,o,s=[];if(new Hn().box("moof",t).box("traf",t).S("tfhd",function(g){n=g,i=vf(g.reader,g.flags)}).S("trun",function(g){r=g,o=Tf(g.reader,g.version,g.flags)}).parse(e),i&&i.Mi!==2){var a=n.start+Ra(n)+4+(i.oj!==null?8:0),u=gr(e);if(i.Mi!==null)u.setUint32(a,2);else{$l(e,n.start,n.size+4);var l=u.getUint32(n.start+8);u.setUint32(n.start+8,l|2),o&&o.kg!==null&&u.setInt32(r.start+Ra(r)+4,o.kg+4),l=e.subarray(0,a),u=e.subarray(a),e=new Uint8Array(e.byteLength+4),e.set(l),l=[];for(var h=3;h>=0;h--)l.push(2>>8*h&255);for(e.set(new Uint8Array(l),a),e.set(u,a+4),a=d(s),u=a.next();!u.done;u=a.next())u=u.value,$l(e,u.start,u.size+4)}}return e}function tI(e,t,n,r,i,o){var s=mu(e,r.name),a=t.subarray(r.start,r.start+r.size);for(e=new Uint8Array(r.size+s.byteLength),e.set(a,0),gr(e).setUint32(4,o),e.set(s,r.size),$l(e,0,e.byteLength),o=new Uint8Array(t.byteLength+e.byteLength),r=ct().cf()?r.start:r.start+r.size,s=t.subarray(r),o.set(t.subarray(0,r)),o.set(e,r),o.set(s,r+e.byteLength),t=d(i),i=t.next();!i.done;i=t.next())i=i.value,$l(o,i.start,i.size+e.byteLength);return e=gr(o,n.start),n=Ra(n),t=e.getUint32(n),e.setUint32(n,t+1),o}function nI(e,t){if(e=fy(e),e.byteLength===0)return t;var n=0,r=0;new Hn().box("moov",function(a){n=a.start,r=a.size,a.parser.stop()}).parse(t);var i=n+r;$l(t,n,r+e.byteLength);var o=new Uint8Array(t.byteLength+e.byteLength),s=t.subarray(i);return o.set(t.subarray(0,i)),o.set(e,i),o.set(s,i+e.byteLength),o}function $l(e,t,n){e=gr(e,t),t=e.getUint32(0),t!=0&&(t==1?(e.setUint32(8,n>>32),e.setUint32(12,n&4294967295)):e.setUint32(0,n))}function rI(e){function t(i){r.push({start:i.start,size:i.size}),Wt(i)}var n=xt(e),r=[];return new Hn().box("moov",t).box("trak",t).box("mdia",t).box("minf",t).box("stbl",t).box("stsd",function(i){r.push({start:i.start,size:i.size});for(var o=gr(n,i.start),s=0;s<i.size-3;s++){var a=o.getUint32(s);a==1633889587?o.setUint32(s,1700998451):a==1684103987&&o.setUint32(s,1684366131)}}).parse(n),n}function Zi(e,t,n,r,i,o,s,a){this.R=e,this.startByte=t,this.endByte=n,this.rd=r===void 0?null:r,this.timescale=i===void 0?null:i,this.h=o===void 0?null:o,this.aesKey=s===void 0?null:s,this.g=this.mimeType=this.codecs=null,this.encrypted=a===void 0?!1:a}Zi.prototype.Ec=function(){return this.startByte},Zi.prototype.Cc=function(){return this.endByte},Zi.prototype.le=function(e){this.h=e},Zi.prototype.Ub=function(){return this.h};function Xl(e,t){return e===t?!0:e&&t?e.Ec()==t.Ec()&&e.Cc()==t.Cc()&&Ye(e.R().sort(),t.R().sort())&&Pr(e.Ub(),t.Ub()):e==t}be("shaka.media.InitSegmentReference",Zi),Zi.prototype.getEndByte=Zi.prototype.Cc,Zi.prototype.getStartByte=Zi.prototype.Ec;function kt(e,t,n,r,i,o,s,a,u,l,h,g,m,S,A,k){for(l=l===void 0?[]:l,S=S===void 0?la:S,this.startTime=e,this.j=this.endTime=t,this.C=n,this.startByte=r,this.endByte=i,this.ea=o,this.timestampOffset=s,this.appendWindowStart=a,this.appendWindowEnd=u,this.g=l,this.tilesLayout=h===void 0?"":h,this.B=g===void 0?null:g,this.h=m===void 0?null:m,this.status=S,this.preload=!1,this.l=!0,this.o=!1,this.aesKey=A===void 0?null:A,this.thumbnailSprite=null,this.i=-1,this.m=k===void 0?!1:k,this.ae=this.Qc=!1,e=d(this.g),t=e.next();!t.done;t=e.next())t.value.ui();this.m&&this.g.length&&this.g[this.g.length-1].ti(),this.u=this.bandwidth=this.mimeType=this.codecs=null,this.D=!1}f=kt.prototype,f.R=function(){return this.C()},f.getStartTime=function(){return this.startTime},f.Hj=function(){return this.endTime},f.Ec=function(){return this.startByte},f.Cc=function(){return this.endByte};function Xh(e){if(e.endByte)return e.endByte+1-e.startByte;if(e.bandwidth){var t=e.bandwidth*(e.endTime-e.startTime);if(!isNaN(t)&&t>0)return t}if(e.g.length>0&&e.m)for(e=d(e.g),e=e.next();!e.done;e=e.next()){Xh(e.value);break}return null}f.bk=function(){return this.tilesLayout},f.$j=function(){return this.B},f.Vb=function(){return this.status},f.xk=function(){this.status=vy},f.Rg=function(){this.preload=!0},f.isPreload=function(){return this.preload},f.qd=function(){this.l=!1},f.lk=function(){return this.l},f.ui=function(){this.Qc=!0},f.pk=function(){return this.Qc},f.ti=function(){this.ae=!0},f.nk=function(){return this.ae},f.si=function(){this.o=!0},f.hk=function(){return this.o},f.Hf=function(e){this.thumbnailSprite=e},f.Yj=function(){return this.thumbnailSprite},f.offset=function(e){this.startTime+=e,this.endTime+=e,this.j+=e;for(var t=d(this.g),n=t.next();!n.done;n=t.next())n=n.value,n.startTime+=e,n.endTime+=e,n.j+=e},f.Ah=function(e){this.h==null?gn("Sync attempted without sync time!"):(e=this.h-e-this.startTime,Math.abs(e)>=.001&&this.offset(e))},f.le=function(e,t){this.u=e,this.D=t===void 0?!1:t},f.Ub=function(e){var t=this.u;return(e===void 0||e)&&this.D&&(this.u=null),t};function my(e,t){e.ea=t,e=d(e.g);for(var n=e.next();!n.done;n=e.next())my(n.value,t)}be("shaka.media.SegmentReference",kt),kt.prototype.getSegmentData=kt.prototype.Ub,kt.prototype.setSegmentData=kt.prototype.le,kt.prototype.syncAgainst=kt.prototype.Ah,kt.prototype.offset=kt.prototype.offset,kt.prototype.getThumbnailSprite=kt.prototype.Yj,kt.prototype.setThumbnailSprite=kt.prototype.Hf,kt.prototype.hasByterangeOptimization=kt.prototype.hk,kt.prototype.markAsByterangeOptimization=kt.prototype.si,kt.prototype.isLastPartial=kt.prototype.nk,kt.prototype.markAsLastPartial=kt.prototype.ti,kt.prototype.isPartial=kt.prototype.pk,kt.prototype.markAsPartial=kt.prototype.ui,kt.prototype.isIndependent=kt.prototype.lk,kt.prototype.markAsNonIndependent=kt.prototype.qd,kt.prototype.isPreload=kt.prototype.isPreload,kt.prototype.markAsPreload=kt.prototype.Rg,kt.prototype.markAsUnavailable=kt.prototype.xk,kt.prototype.getStatus=kt.prototype.Vb,kt.prototype.getTileDuration=kt.prototype.$j,kt.prototype.getTilesLayout=kt.prototype.bk,kt.prototype.getEndByte=kt.prototype.Cc,kt.prototype.getStartByte=kt.prototype.Ec,kt.prototype.getEndTime=kt.prototype.Hj,kt.prototype.getStartTime=kt.prototype.getStartTime,kt.prototype.getUris=kt.prototype.R;var la=0,vy=1;kt.Status={rl:la,ym:vy,Ul:2};function Yl(e){return e.length==1&&e.end(0)-e.start(0)<1e-4}function yy(e){return!e||Yl(e)?null:e.length==1&&e.start(0)<0?0:e.length?e.start(0):null}function Ef(e){return!e||Yl(e)?null:e.length?e.end(e.length-1):null}function Yh(e,t){return!e||!e.length||Yl(e)||t>e.end(e.length-1)?!1:t>=e.start(0)}function Sy(e,t){if(!e||!e.length||Yl(e))return 0;var n=0;e=d(ca(e));for(var r=e.next();!r.done;r=e.next()){var i=r.value;r=i.start,i=i.end,i>t&&(n+=i-Math.max(r,t))}return n}function iI(e,t,n){return!e||!e.length||Yl(e)?null:(e=ca(e).findIndex(function(r,i,o){return r.start>t&&(i==0||o[i-1].end-t<=n)}),e>=0?e:null)}function ca(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}function Jh(){}function Ty(e,t){var n=document.createElement("source");return n.src=e,n.type=t===void 0?"":t,n}function xf(e){for(var t=!1,n=e.getElementsByTagName("source"),r=n.length-1;r>=0;--r)e.removeChild(n[r]),t=!0;return e.src&&(e.removeAttribute("src"),t=!0),t}function Jl(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function yu(){return Ku||(Qh||(Qh=new Yt(function(){Ku=null})),(Ku=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(Ku=document.createElement("video")),Qh.ka(1),Ku)}function oI(e,t){var n,r,i,o,s;return G(function(a){if(a.h==1)return"fonts"in document&&"FontFace"in R?a.g(document.fonts.ready,2):a.return();if(!("entries"in document.fonts))return a.return();for(n=function(u){u=u.entries();for(var l=[],h=u.next();h.done===!1;)l.push(h.value),h=u.next();return l},r=d(n(document.fonts)),i=r.next();!i.done;i=r.next())if(o=i.value,o.family===e&&o.display==="swap")return a.return();s=new FontFace(e,"url("+t+")",{display:"swap"}),document.fonts.add(s),a.j()})}be("shaka.util.Dom",Jh),Jh.removeAllChildren=Jl,Jh.clearSourceFromVideo=xf;var Qh=null,Ku=null;/*
38
- @license
39
- Shaka Player
40
- Copyright 2022 Google LLC
41
- SPDX-License-Identifier: Apache-2.0
42
- */function Zh(){}function Ey(e,t){return t+10<=e.length&&e[t]===73&&e[t+1]===68&&e[t+2]===51&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function xy(e,t){return t+10<=e.length&&e[t]===51&&e[t+1]===68&&e[t+2]===73&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128}function qh(e,t){var n=(e[t]&127)<<21;return n|=(e[t+1]&127)<<14,n|=(e[t+2]&127)<<7,n|=e[t+3]&127}function sI(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if(e.type==="APIC"){if(e.size<2||e.data[0]!==3)return null;var n=e.data.subarray(1).indexOf(0);if(n===-1)return null;var r=Un(xt(e.data,1,n)),i=e.data[2+n],o=e.data.subarray(3+n).indexOf(0);if(o===-1)return null;var s=Un(xt(e.data,3+n,o)),a;return r==="-->"?a=Un(xt(e.data,4+n+o)):a=Kr(e.data.subarray(4+n+o)),t.mimeType=r,t.pictureType=i,t.description=s,t.data=a,t}return e.type==="TXXX"?e.size<2||e.data[0]!==3||(r=e.data.subarray(1).indexOf(0),r===-1)?null:(n=Un(xt(e.data,1,r)),e=Un(xt(e.data,2+r)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="WXXX"?e.size<2||e.data[0]!==3||(r=e.data.subarray(1).indexOf(0),r===-1)?null:(n=Un(xt(e.data,1,r)),e=Un(xt(e.data,2+r)).replace(/\0*$/,""),t.description=n,t.data=e,t):e.type==="PRIV"?e.size<2||(n=e.data.indexOf(0),n===-1)?null:(n=Un(xt(e.data,0,n)),t.description=n,n=="com.apple.streaming.transportStreamTimestamp"?(n=e.data.subarray(n.length+1),e=n[3]&1,n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=4772185884e-2),t.data=n):(e=Kr(e.data.subarray(n.length+1)),t.data=e),t):e.type[0]==="T"?e.size<2||e.data[0]!==3?null:(e=Un(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):e.type[0]==="W"?(e=Un(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=Kr(e.data),t):null}function Su(e){for(var t=0,n=[];Ey(e,t);){var r=qh(e,t+6);for(e[t+5]>>6&1&&(t+=10),t+=10,r=t+r;t+10<r;){var i=e.subarray(t),o=qh(i,4);i={type:String.fromCharCode(i[0],i[1],i[2],i[3]),size:o,data:i.subarray(10,10+o)},(o=sI(i))&&n.push(o),t+=i.size+10}xy(e,t)&&(t+=10)}return n}function Wu(e,t){for(var n=t=t===void 0?0:t,r=0;Ey(e,t);)e[t+5]>>6&1&&(r+=10),r+=10,r+=qh(e,t+6),xy(e,t+10)&&(r+=10),t+=r;return r>0?e.subarray(n,n+r):new Uint8Array([])}be("shaka.util.Id3Utils",Zh),Zh.getID3Data=Wu,Zh.getID3Frames=Su;function zu(e,t,n){return n=n===void 0?Number.EPSILON:n,e===t?!0:(e=Math.abs(e-t),e<=n?!0:n!==Number.EPSILON?Math.abs(e-n)<=Number.EPSILON:!1)}function wy(e){return new Date(Date.UTC(1900,0,1,0,0,0,0)+e).getTime()}function fa(e,t){if(this.j=e,t!==void 0&&t){t=new Uint8Array(e.byteLength);for(var n=0,r=0;r<e.byteLength;r++)r>=2&&e[r]==3&&e[r-1]==0&&e[r-2]==0||(t[n]=e[r],n++);this.j=xt(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function wf(e){var t=e.j.byteLength-e.i,n=Math.min(4,e.i);if(n!==0){for(var r=0,i=0;i<n;i++)r=r<<8|e.j[t+i];e.h=r<<(4-n)*8,e.g=n*8,e.i-=n}}function ho(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=n*8,e.g-=n,wf(e)}e.h<<=t,e.g-=t}function on(e,t){var n=Math.min(e.g,t),r=e.h>>>32-n;return e.g-=n,e.g>0?e.h<<=n:e.i>0&&wf(e),n=t-n,n>0?r<<n|on(e,n):r}function Ay(e){for(var t=0;e.g===0;){if(e.i===0)return t;wf(e)}for(;;){var n=Math.clz32(e.h);if(n>e.g&&(n=e.g),t+=n,e.h<<=n,e.g-=n,e.g>0||e.i===0)break;wf(e)}return t}function di(e){ho(e,1+Ay(e))}function pt(e){var t=Ay(e);return on(e,t+1)-1}function $u(e){return e=pt(e),1&e?1+e>>>1:-1*(e>>>1)}function Ct(e){return on(e,1)===1}function Ln(e){return on(e,8)}function Af(e,t){for(var n=8,r=8,i=0;i<t;i++)r!==0&&(r=$u(e),r=(n+r+256)%256),n=r===0?n:r}function aI(e){return Ln(e),pt(e),pt(e)}be("shaka.util.ExpGolomb",fa);function er(){this.I=null,this.J=!1,this.u=this.K=null,this.j=[],this.g=[],this.C=this.D=null,this.i=[],this.h=[],this.G=null,this.l=[],this.B=this.H=this.m=this.o=null}f=er.prototype,f.clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},f.Ff=function(e){this.B!=null&&this.B!=e&&(this.m=this.o=null),this.B=e},f.parse=function(e){if(e.length<564)return this;for(var t=Math.max(0,tp(e)),n=e.length-(e.length+t)%188,r=!1,i=t;i<n;i+=188)if(e[i]==71){var o=!!(e[i+1]&64),s=((e[i+1]&31)<<8)+e[i+2];if((e[i+3]&48)>>4>1){var a=i+5+e[i+4];if(a==i+188)continue}else a=i+4;switch(s){case 0:o&&(a+=e[a]+1),this.I=(e[a+10]&31)<<8|e[a+11];break;case 17:case 8191:break;case this.I:o&&(a+=e[a]+1),o=e,s={audio:-1,video:-1,$e:-1,audioCodec:"",videoCodec:""};var u=a+3+((o[a+1]&15)<<8|o[a+2])-4;for(a+=12+((o[a+10]&15)<<8|o[a+11]);a<u;){var l=(o[a+1]&31)<<8|o[a+2],h=(o[a+3]&15)<<8|o[a+4];switch(o[a]){case 6:if(h>0)for(var g=a+5,m=h;m>2;){var S=o[g+1]+2;switch(o[g]){case 5:var A=g+2;A=o[A]<<24|o[A+1]<<16|o[A+2]<<8|o[A+3],s.audio==-1&&A===1332770163?(s.audio=l,s.audioCodec="opus"):s.video==-1&&A===1096167473&&(s.video=l,s.videoCodec="av1");break;case 106:s.audio==-1&&(s.audio=l,s.audioCodec="ac3");break;case 122:s.audio==-1&&(s.audio=l,s.audioCodec="ec3");break;case 124:s.audio==-1&&(s.audio=l,s.audioCodec="aac");break;case 127:s.audioCodec=="opus"&&(A=null,o[g+2]===128&&(A=o[g+3]),A!=null&&(this.H={channelCount:A&15?A&15:2,rj:A,sampleRate:48e3}))}g+=S,m-=S}break;case 15:s.audio==-1&&(s.audio=l,s.audioCodec="aac");break;case 17:s.audio==-1&&(s.audio=l,s.audioCodec="aac-loas");break;case 21:s.$e==-1&&(s.$e=l);break;case 27:s.video==-1&&(s.video=l,s.videoCodec="avc");break;case 3:case 4:s.audio==-1&&(s.audio=l,s.audioCodec="mp3");break;case 36:s.video==-1&&(s.video=l,s.videoCodec="hvc");break;case 129:s.audio==-1&&(s.audio=l,s.audioCodec="ac3");break;case 132:case 135:s.audio==-1&&(s.audio=l,s.audioCodec="ec3")}a+=h+5}o=s,o.video!=-1&&(this.K=o.video,this.u=o.videoCodec),o.audio!=-1&&(this.D=o.audio,this.C=o.audioCodec),o.$e!=-1&&(this.G=o.$e),r&&!this.J&&(r=!1,i=t-188),this.J=!0;break;case this.K:a=e.subarray(a,i+188),o?this.j.push([a]):this.j.length&&this.j[this.j.length-1]&&this.j[this.j.length-1].push(a);break;case this.D:a=e.subarray(a,i+188),o?this.i.push([a]):this.i.length&&this.i[this.i.length-1]&&this.i[this.i.length-1].push(a);break;case this.G:a=e.subarray(a,i+188),o?this.l.push([a]):this.l.length&&this.l[this.l.length-1]&&this.l[this.l.length-1].push(a);break;default:r=!0}}return this};function ep(e,t){if((t[0]<<16|t[1]<<8|t[2])!==1)return null;var n={data:new Uint8Array(0),packetLength:t[4]<<8|t[5],pts:null,dts:null,nalus:[]};if(n.packetLength&&n.packetLength>t.byteLength-6)return null;var r=t[7];if(r&192){var i=(t[9]&14)*536870912+(t[10]&255)*4194304+(t[11]&254)*16384+(t[12]&255)*128+(t[13]&254)/2;e.o==null&&(e.o=i),n.pts=Cy(i,e.o),e.o=n.pts,n.dts=n.pts,r&64&&(r=(t[14]&14)*536870912+(t[15]&255)*4194304+(t[16]&254)*16384+(t[17]&255)*128+(t[18]&254)/2,e.m==null&&(e.m=r),n.dts=n.pts!=i?Cy(r,e.m):r),e.m=n.dts}return e=t[8]+9,t.byteLength<=e?null:(n.data=t.subarray(e),n)}f.Fk=function(e){return lt("TsParser.parseAvcNalus","Please use parseNalus function instead."),this.Xg(e,{ce:null,state:null})},f.Xg=function(e,t){var n=e.pts?e.pts/9e4:null;e=e.data;var r=e.byteLength,i=1;this.u=="hvc"&&(i=2);var o=t.state||0,s=o,a=0,u=[],l=-1,h=0,g=this.u==="hvc";for(o==-1&&(l=0,h=g?e[0]>>1&63:e[0]&31,o=0,a=1);a<r;){var m=e[a++];o?o===1?o=m?0:2:m?m==1?(m=a-o-1,l>=0?u.push({data:e.subarray(l+i,m),fullData:e.subarray(l,m),type:h,time:n,state:null}):(o=u.length?u[u.length-1]:t.ce)&&(s&&a<=4-s&&o.state&&(o.data=o.data.subarray(0,o.data.byteLength-s),o.fullData=o.fullData.subarray(0,o.fullData.byteLength-s)),m>0&&(m=e.subarray(0,m),o.data=dr(o.data,m),o.fullData=dr(o.fullData,m),o.state=0)),a<r?(h=g?e[a]>>1&63:e[a]&31,l=a,o=0):o=-1):o=0:o=3:o=m?0:1}return l>=0&&o>=0&&u.push({data:e.subarray(l+i,r),fullData:e.subarray(l,r),type:h,time:n,state:o}),!u.length&&t.ce&&(n=u.length?u[u.length-1]:t.ce)&&(n.data=dr(n.data,e),n.fullData=dr(n.fullData,e)),t.state=o,u},f.getMetadata=function(){for(var e=[],t=d(this.l),n=t.next();!n.done;n=t.next())n=dr.apply(Sr,M(n.value)),(n=ep(this,n))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:Su(n.data),dts:n.dts,pts:n.pts});return e},f.qb=function(){if(this.i.length&&!this.h.length)for(var e=d(this.i),t=e.next();!t.done;t=e.next()){var n=dr.apply(Sr,M(t.value)),r=ep(this,n);t=this.h.length?this.h[this.h.length-1]:null,r&&r.pts!=null&&r.dts!=null&&(!t||t.pts!=r.pts&&t.dts!=r.dts)?this.h.push(r):this.h.length&&(n=r?r.data:n)&&(t=this.h.pop(),t.data=dr(t.data,n),this.h.push(t))}return this.h},f.nd=function(e){if(e=e===void 0?!0:e,this.j.length&&!this.g.length){for(var t=d(this.j),n=t.next();!n.done;n=t.next()){var r=dr.apply(Sr,M(n.value)),i=ep(this,r);n=this.g.length?this.g[this.g.length-1]:null,i&&i.pts!=null&&i.dts!=null&&(!n||n.pts!=i.pts&&n.dts!=i.dts)?this.g.push(i):this.g.length&&(r=i?i.data:r)&&(n=this.g.pop(),n.data=dr(n.data,r),this.g.push(n))}if(e){for(t={ce:null,state:null},n=[],r=d(this.g),i=r.next();!i.done;i=r.next())i=i.value,i.nalus=this.Xg(i,t),i.nalus.length&&(n.push(i),t.ce=i.nalus[i.nalus.length-1]);this.g=n}}return e?this.g:(e=this.g,this.g=[],e)},f.getStartTime=function(e){if(e=="audio"){e=null;var t=this.qb();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return e=="video"?(e=null,t=this.nd(!1),t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},f.Sd=function(){return{audio:this.C,video:this.u}},f.Ye=function(){for(var e=[],t=d(this.nd()),n=t.next();!n.done;n=t.next())e.push.apply(e,M(n.value.nalus));return e},f.ek=function(){lt("TsParser.getVideoResolution","Please use getVideoInfo function instead.");var e=this.Ig();return{height:e.height,width:e.width}},f.Ig=function(){return this.u=="hvc"?lI(this):uI(this)};function Iy(e){var t=e.nd();return t.length>1&&(e=t[0].pts,t=t[1].pts,!isNaN(t-e))?String(Math.abs(1/(t-e)*9e4)):null}function uI(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Ye();if(!n.length||(n=n.find(function(S){return S.type==7}),!n))return t;n=new fa(n.data);var r=Ln(n),i=Ln(n),o=Ln(n);if(di(n),cI.includes(r)){var s=pt(n);if(s===3&&ho(n,1),di(n),di(n),ho(n,1),Ct(n)){s=s!==3?8:12;for(var a=0;a<s;a++)Ct(n)&&(a<6?Af(n,16):Af(n,64))}}if(di(n),s=pt(n),s===0)pt(n);else if(s===1)for(ho(n,1),di(n),di(n),s=pt(n),a=0;a<s;a++)di(n);di(n),ho(n,1),s=pt(n),a=pt(n);var u=on(n,1);u===0&&ho(n,1),ho(n,1);var l=0,h=0,g=0,m=0;return Ct(n)&&(l=pt(n),h=pt(n),g=pt(n),m=pt(n)),t.height=String((2-u)*(a+1)*16-g*2-m*2),t.width=String((s+1)*16-l*2-h*2),t.codec="avc1."+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+i.toString(16).toUpperCase()).slice(-2)+("0"+o.toString(16).toUpperCase()).slice(-2),t.frameRate=Iy(e),t}function lI(e){var t={height:null,width:null,codec:null,frameRate:null},n=e.Ye();if(!n.length||(n=n.find(function(pe){return pe.type==33}),!n))return t;var r=new fa(n.fullData,!0);Ln(r),Ln(r),on(r,4);var i=on(r,3);Ct(r);var o=on(r,2),s=on(r,1),a=on(r,5),u=on(r,32);n=Ln(r);for(var l=Ln(r),h=Ln(r),g=Ln(r),m=Ln(r),S=Ln(r),A=Ln(r),k=[],b=[],V=0;V<i;V++)k.push(Ct(r)),b.push(Ct(r));if(i>0)for(V=i;V<8;V++)on(r,2);for(V=0;V<i;V++)k[V]&&on(r,88),b[V]&&Ln(r);pt(r),i=pt(r),i==3&&on(r,1),k=pt(r),b=pt(r);var B=V=0,Z=0,ae=0;return Ct(r)&&(V+=pt(r),B+=pt(r),Z+=pt(r),ae+=pt(r)),t.width=String(k-(V+B)*(i===1||i===2?2:1)),t.height=String(b-(Z+ae)*(i===1?2:1)),r=function(pe){for(var te=0,le=0;le<32;le++)te|=(pe>>le&1)<<31-le;return te>>>0}(u),s=s==1?"H":"L",o="hvc1"+("."+["","A","B","C"][o]+a),o+="."+r.toString(16).toUpperCase(),o+="."+s+A,S&&(o+="."+S.toString(16).toUpperCase()),m&&(o+="."+m.toString(16).toUpperCase()),g&&(o+="."+g.toString(16).toUpperCase()),h&&(o+="."+h.toString(16).toUpperCase()),l&&(o+="."+l.toString(16).toUpperCase()),n&&(o+="."+n.toString(16).toUpperCase()),t.codec=o,t.frameRate=Iy(e),t}function Cy(e,t){var n=1;for(e>t&&(n=-1);Math.abs(t-e)>4294967296;)e+=n*8589934592;return e}function Xu(e){return!(tp(e)<0)}function tp(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(e[n]==71&&e[n+188]==71&&e[n+376]==71)return n;var r=e.indexOf(71,n+1);n=r>=0&&r<t?r:n+1}return-1}be("shaka.util.TsParser",er),er.syncOffset=tp,er.probe=Xu,er.prototype.getVideoInfo=er.prototype.Ig,er.prototype.getVideoResolution=er.prototype.ek,er.prototype.getVideoNalus=er.prototype.Ye,er.prototype.getCodecs=er.prototype.Sd,er.prototype.getStartTime=er.prototype.getStartTime,er.prototype.getVideoData=er.prototype.nd,er.prototype.getAudioData=er.prototype.qb,er.prototype.getMetadata=er.prototype.getMetadata,er.prototype.parseNalus=er.prototype.Xg,er.prototype.parseAvcNalus=er.prototype.Fk,er.prototype.parse=er.prototype.parse,er.prototype.setDiscontinuitySequence=er.prototype.Ff,er.prototype.clearData=er.prototype.clearData,er.Timescale=9e4;var cI=[100,110,122,244,44,83,86,118,128,138,139,134];function My(e,t,n,r,i){var o=this;this.g=e,this.O=n,this.B=r,this.ba=t,this.l=new Map,this.G=new Map,this.Ka=new Map,this.h=null,this.Ga=!1,this.C=i||null,this.m=new Map,this.u=new Et,this.j=new Map,this.K=null,this.M=new zn,this.Ba="",this.ib=!1,this.za=!0,this.N=!1,this.D=this.P=null,this.i=np(this,this.M),this.Ua=this.I=!1,this.H=new Bu(function(){return hI(o)}),this.J=!1,this.T="UNKNOWN",this.eb=this.hb=!1,this.ab=new zn,this.o=!1,this.ya=null,this.$=new Map,this.oa=this.V=this.ua=this.X=null,this.ma=new zn,this.g.remote&&(this.N=this.g.remote.state!="disconnected",this.u.F(this.g.remote,"connect",function(){o.N=o.g.remote.state!="disconnected"}),this.u.F(this.g.remote,"connecting",function(){o.N=o.g.remote.state!="disconnected"}),this.u.F(this.g.remote,"disconnect",function(){o.N=o.g.remote.state!="disconnected"}))}function np(e,t){if(e.za=!0,R.ManagedMediaSource){e.D||(e.g.disableRemotePlayback=!0);var n=new ManagedMediaSource;e.u.F(n,"startstreaming",function(){e.za=!0}),e.u.F(n,"endstreaming",function(){e.za=!1})}else n=new MediaSource;if(e.u.Aa(n,"sourceopen",function(){URL.revokeObjectURL(e.Ba),t.resolve()}),e.u.Aa(e.g,"playing",function(){e.ib=!0}),e.Ba=sp(n),e.B.useSourceElements){e.g.removeAttribute("src");var r;((r=e.P)==null?void 0:r.parentElement)===e.g&&e.g.removeChild(e.P);var i;((i=e.D)==null?void 0:i.parentElement)===e.g&&e.g.removeChild(e.D),e.P=Ty(e.Ba),e.g.appendChild(e.P),e.D&&e.g.appendChild(e.D),e.g.load()}else e.g.src=e.Ba;return n}function fI(e,t,n){if(e.g&&R.ManagedMediaSource&&e.i&&e.B.useSourceElements){var r;((r=e.D)==null?void 0:r.parentElement)===e.g&&e.g.removeChild(e.D),e.D=Ty(t,n),e.g.appendChild(e.D),e.g.disableRemotePlayback=!1}}function dI(){var e='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.20000000.L153.B0",video/mp4; codecs="hvc1.2.4.L120.b0",video/mp4; codecs="hvc1.2.4.L123.b0",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="av01.0.31M.10.0.111.09.16.09.0",video/mp4; codecs="av01.0.31M.10.0.112.09.18.09.0",video/mp4; codecs="dvh1.05.01",video/mp4; codecs="dvh1.08.01",video/mp4; codecs="dav1.10.01",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4.02.01.03",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",audio/mp4; codecs="apac.31.00",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(M(As)),t={};ct(),e=d(e);for(var n=e.next();!n.done;n=e.next()){if(n=n.value,uu(n))t[n]=!0;else if(Hs()){var r=vi(n),i=ze(yi(n),r);r=ar(r,i),t[n]=Ni(r)||!!ra(r)}else t[n]=yu().canPlayType(n)!="";r=n.split(";")[0],t[r]=t[r]||t[n]}return t}f=My.prototype,f.destroy=function(){return this.H.destroy()};function hI(e){var t,n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V;return G(function(B){if(B.h==1){for(t=[],n=d(e.m),r=n.next();!r.done;r=n.next())for(i=r.value,o=d(i),s=o.next().value,a=o.next().value,u=a[0],l=s,e.m.set(l,a.slice(0,1)),u&&t.push(u.p.catch(Lh)),h=d(a.slice(1)),g=h.next();!g.done;g=h.next())m=g.value,m.p.reject(new fe(2,7,7003,void 0));return e.h&&t.push(e.h.destroy()),B.g(Promise.all(t),2)}for(S=d(e.j.values()),A=S.next();!A.done;A=S.next())k=A.value,k.destroy();e.u&&(e.u.release(),e.u=null),e.g&&((b=e.D)==null?void 0:b.parentElement)===e.g&&e.g.removeChild(e.D),e.g&&((V=e.P)==null?void 0:V.parentElement)===e.g&&(e.g.removeChild(e.P),e.g.load(),e.g.disableRemotePlayback=!1),e.g=null,e.P=null,e.D=null,e.B=null,e.i=null,e.h=null,e.ba=null,e.l.clear(),e.Ka.clear(),e.j.clear(),e.K=null,e.m.clear(),e.C=null,e.$.clear(),e.O=null,B.j()})}f.init=function(e,t,n,r){t=t===void 0?!1:t,n=n===void 0?"UNKNOWN":n,r=r===void 0?!1:r;var i=this,o,s,a,u,l,h;return G(function(g){if(g.h==1)return o=mr,g.g(i.M,2);if(g.h!=3)return!Tu(i)&&!Da(i)?g.A(3):(gn("Expected MediaSource to be open during init(); reopening the media source."),i.M=new zn,i.i=np(i,i.M),g.g(i.M,3));for(i.J=t,i.T=n,i.hb=r,i.eb=!i.J&&i.T=="HLS"&&!i.hb,i.$.clear(),i.X=null,i.ua=null,i.V=null,i.oa=null,i.ma=new zn,s=d(e.keys()),a=s.next();!a.done;a=s.next())u=a.value,l=e.get(u),If(i,u,l,l.codecs),i.o?(i.m.set(o.aa,[]),i.m.set(o.wa,[])):i.m.set(u,[]);(h=e.get(o.aa))&&h.isAudioMuxedInVideo&&(i.o=!0),g.j()})};function If(e,t,n,r){t=="audio"&&r&&(r=ze(r,n.mimeType)),t=="video"&&r&&n.mimeType=="video/mp4"&&(r=Pt(r));var i=ar(n.mimeType,r);if(t==Bt)Cf(e,i,e.J,n.external);else{var o=e.B.forceTransmux;(!Ni(i)||!e.J&&As.includes(i))&&(o=!0);var s=ou(n.mimeType,r);if(o){if(o=ti("audio",(r||"").split(",")),r=ti("video",(r||"").split(",")),o&&r){e.o=!0,If(e,"audio",n,o),If(e,"video",n,r);return}(r=ra(s))&&(i=r(),e.j.set(t,i),i=i.convertCodecs(t,s))}s=i+e.B.addExtraFeaturesToSourceBuffer(i),qn(e.H);try{var a=e.i.addSourceBuffer(s)}catch(u){throw new fe(2,3,3015,u,"The mediaSource_ status was "+e.i.readyState+" expected 'open'",null)}e.J&&(a.mode=CI),e.u.F(a,"error",function(){var u=e.m.get(t)[0];u.p.reject(new fe(2,3,3014,e.g.error?e.g.error.code:0,u.uri))}),e.u.F(a,"updateend",function(){return La(e,t)}),e.l.set(t,a),e.G.set(t,i),e.Ka.set(t,!!n.drmInfos.length)}}f.configure=function(e){this.B=e,this.h&&(this.h.C=e.modifyCueCallback)};function Py(e){return e.za&&!e.N&&!e.I}function Cf(e,t,n,r){e.h||(e.h=new Is(e.ba),e.h&&(e.h.C=e.B.modifyCueCallback));var i=e.h,o=e.Ga;e=e.T,t=="application/cea-608"||t=="application/cea-708"?i.i=null:(i.i=Pa.get(t)(),i.i.setSequenceMode?i.i.setSequenceMode(n):lt("Text parsers w/ setSequenceMode",'Text parsers should have a "setSequenceMode" method!'),i.i.setManifestType?i.i.setManifestType(e):lt("Text parsers w/ setManifestType",'Text parsers should have a "setManifestType" method!'),i.G=o,i.B=r)}function Tu(e){return e.I?!1:e.i?e.i.readyState=="ended":!0}function Da(e){return e.I?!1:e.i?e.i.readyState=="closed":!0}function rp(e,t){return e.l.size?t==Bt?e.h.g:yy(Yu(e,t)):null}function Na(e,t){return e.l.size?t==Bt?e.h.h:Ef(Yu(e,t)):null}function pI(e,t,n){return t==Bt?(e=e.h,e.h==null||e.h<n?0:e.h-Math.max(n,e.g)):(e=Yu(e,t),Sy(e,n))}f.Bc=function(){var e={total:this.I?[]:ca(this.g.buffered),audio:ca(Yu(this,"audio")),video:ca(Yu(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;t!=null&&n!=null&&e.text.push({start:t,end:n})}return e};function Yu(e,t){if(e.I||e.N||Da(e))return null;try{return e.l.get(t).buffered}catch{return e.l.has(t),null}}function gI(e,t,n,r,i,o,s){s=s===void 0?!1:s;var a=null,u=[],l=xt(n);if(As.includes(o))n=Su(l),n.length&&r&&((s=n.find(function(k){return k.description==="com.apple.streaming.transportStreamTimestamp"}))&&typeof s.data=="number"&&(a=Math.round(s.data)/1e3),e.O.onMetadata([{cueTime:r.startTime,data:l,frames:n,dts:r.startTime,pts:r.startTime}],0,r.endTime));else if(o.includes("/mp4")&&r&&r.ea){l=new Hn;var h=i.emsgSchemeIdUris!=null&&i.emsgSchemeIdUris.length>0||e.B.dispatchAllEmsgBoxes,g=[];h&&l.S("emsg",function(k){e:{var b=i.emsgSchemeIdUris;if(k.version===0)var V=k.reader.xd(),B=k.reader.xd(),Z=k.reader.W(),ae=k.reader.W(),pe=k.reader.W(),te=k.reader.W(),le=r.startTime+ae/Z;else Z=k.reader.W(),le=k.reader.yd()/Z+r.timestampOffset,ae=le-r.startTime,pe=k.reader.W(),te=k.reader.W(),V=k.reader.xd(),B=k.reader.xd();if(k=k.reader.Mb(k.reader.getLength()-k.reader.Qa(),!0),b&&b.includes(V)||e.B.dispatchAllEmsgBoxes)if(V=="urn:mpeg:dash:event:2012")e.O.Ek();else{b=le,(V!=="https://aomedia.org/emsg/ID3"||pe!==4294967295)&&(b+=pe/Z),Z={startTime:le,endTime:b,schemeIdUri:V,value:B,timescale:Z,presentationTimeDelta:ae,eventDuration:pe,id:te,messageData:k};break e}Z=null}Z&&g.push(Z)});var m=r.ea.timescale;t=m&&!isNaN(m);var S=0,A=!1;for(t&&l.S("prft",function(k){var b=k.reader,V=k.version;b.W(),k=b.W();var B=b.W();k=k*1e3+B/4294967296*1e3,V===0?b=b.W():(V=b.W(),b=b.W(),b=V*4294967296+b),k=wy(k),b=new Map().set("detail",{wallClockTime:k,programStartDate:new Date(k-b/m*1e3)}),b=new yt("prft",b),e.O.onEvent(b)}).box("moof",Wt).box("traf",Wt).S("tfdt",function(k){A||(S=yf(k.reader,k.version).baseMediaDecodeTime/m,A=!0,h||k.parser.stop())}),(h||t)&&l.parse(n,!1,s),A&&r.timestampOffset==0&&(a=S),l=d(g),n=l.next();!n.done;n=l.next())mI(e,n.value,r,a)}else o.includes("/mp4")||o.includes("/webm")||!Xu(l)||(e.$.has(t)||e.$.set(t,new er),u=e.$.get(t),u.clearData(),u.Ff(r.i),u.parse(l),l=u.getStartTime(t),l!=null&&(a=l),u=u.getMetadata());return{timestamp:a,metadata:u}}function mI(e,t,n,r){var i=zu(t.startTime,n.startTime+t.presentationTimeDelta/t.timescale);r&&e.T=="HLS"&&!i&&(n=-r+n.startTime,t.startTime+=n,t.endTime+=n),e.O.Ck(t),!t.messageData||t.schemeIdUri!="https://aomedia.org/emsg/ID3"&&t.schemeIdUri!="https://developer.apple.com/streaming/emsg-id3"||(n=Su(t.messageData),n.length&&(r=t.startTime,e.O.onMetadata([{cueTime:r,data:t.messageData,frames:n,dts:r,pts:r}],0,t.endTime)))}function Mf(e,t,n,r,i,o,s,a,u,l,h){s=s===void 0?!1:s,a=a===void 0?!1:a,u=u===void 0?!1:u,l=l===void 0?!1:l;var g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le;return G(function(Ce){switch(Ce.h){case 1:if(g=mr,t!=g.Oa){Ce.A(2);break}if(e.T!="HLS"){Ce.A(3);break}return Ce.g(e.ab,4);case 4:m=Ce.i,e.h.u=m;case 3:return Ce.g(Dh(e.h,n,r?r.startTime:null,r?r.endTime:null,r?r.R()[0]:null),5);case 5:return Ce.return();case 2:if(l||!e.o){Ce.A(6);break}return Ce.g(Mf(e,g.aa,n,r,i,o,s,a,u,!0),7);case 7:return Ce.g(Mf(e,g.wa,n,r,i,o,s,a,u,!0),8);case 8:return Ce.return();case 6:if(!e.l.has(t))return Ce.return();if(S=e.l.get(t).timestampOffset,A=e.G.get(t),e.j.has(t)&&(A=e.j.get(t).getOriginalMimeType()),r&&(k=gI(e,t,n,r,i,A,u),b=k.timestamp,V=k.metadata,b!=null&&(e.X==null&&t==g.wa&&(e.X=b,e.ua=r.startTime,e.V!=null&&(B=0,e.ua==e.oa&&(B=e.X-e.V),e.ma.resolve(B))),e.V==null&&t==g.aa&&(e.V=b,e.oa=r.startTime,e.X!=null&&(Z=0,e.ua==e.oa&&(Z=e.X-e.V),e.ma.resolve(Z))),ae=b,pe=As,!e.J&&pe.includes(e.G.get(t))&&(ae=0),te=r.startTime-ae,le=Math.abs(S-te),(le>=.001||s||a)&&(!u||te>0||!S)&&(S=te,e.eb&&(Xr(e,t,function(){return Ju(e,t)},null),Xr(e,t,function(){return Qu(e,t,S)},null))),(t==g.wa||!e.l.has(g.wa))&&e.ab.resolve(S)),V.length)&&e.O.onMetadata(V,S,r?r.endTime:null),o&&t==g.wa&&(e.h||Cf(e,"application/cea-608",e.J,!1),e.K||(ie=A.split(";",1)[0],e.K=new gi(ie)),r?(ye=Qs(e.K,n),ye.length&&Nu(e.h,ye,S)):e.K.init(n,a,h)),!e.j.has(t)){Ce.A(9);break}return Ce.g(e.j.get(t).transmux(n,i,r,e.i.duration,t),10);case 10:ce=Ce.i,ArrayBuffer.isView(ce)?n=ce:(Ee=ce,Ee.init!=null&&(Se=Ee.init,Xr(e,t,function(){e.C&&Ds(e.C,Se,S,i),e.l.get(t).appendBuffer(Se)},r?r.R()[0]:null)),n=Ee.data);case 9:if(n=EI(e,i,n,r,t),!r||!e.J||t==g.Oa){Ce.A(11);break}if(!s&&!a){Ce.A(11);break}if(Ve=r.startTime,e.T!="HLS"||e.o||t!=g.aa||!e.l.has(g.wa)){Ce.A(13);break}return Ce.g(e.ma,14);case 14:Le=Ce.i,Math.abs(Le)>.15&&(Ve-=Le);case 13:Xr(e,t,function(){return Ju(e,t)},null),Xr(e,t,function(){return Qu(e,t,Ve)},null);case 11:return Ce.g(Xr(e,t,function(){var ke=n;e.C&&Ds(e.C,ke,S,i),e.l.get(t).appendBuffer(ke)},r?r.R()[0]:null),15);case 15:Ce.j()}})}function vI(e,t){var n=Na(e,"video")||0;Ul(e.h,t,n)}function yI(e){e.h&&Ul(e.h,"",0)}f.remove=function(e,t,n,r){var i=this,o,s;return G(function(a){return a.h==1?(o=mr,e==o.wa&&i.K&&(i.K.remove(r),s=i.h.g||0,i.h.remove(s,n,!0)),e==o.Oa?a.g(i.h.remove(t,n),0):n>t?a.g(Xr(i,e,function(){return Pf(i,e,t,n)},null),5):a.A(0)):i.o?a.g(Xr(i,o.aa,function(){return Pf(i,o.aa,t,n)},null),0):a.A(0)})};function ky(e,t){var n;return G(function(r){return r.h==1?(n=mr,t==n.Oa?e.h?r.g(e.h.remove(0,1/0),0):r.return():t===n.wa&&e.K&&e.h?r.g(e.h.remove(0,1/0,!0),4):r.A(4)):r.h!=6?r.g(Xr(e,t,function(){return Pf(e,t,0,e.i.duration)},null),6):e.o?r.g(Xr(e,n.aa,function(){return Pf(e,n.aa,0,e.i.duration)},null),0):r.A(0)})}f.flush=function(e){var t=this,n;return G(function(r){return r.h==1?(n=mr,e==n.Oa?r.return():r.g(Xr(t,e,function(){t.g.currentTime-=.001,La(t,e)},null),2)):t.o?r.g(Xr(t,n.aa,function(){var i=n.aa;t.g.currentTime-=.001,La(t,i)},null),0):r.A(0)})};function by(e,t,n,r,i,o,s,a,u){var l,h,g;return G(function(m){return m.h==1?(l=mr,t==l.Oa?(o||(e.h.u=n),sf(e.h,r,i),m.return()):(h=[],m.g(AI(e,t,s,a,u),2))):(g=m.i,g||(h.push(Xr(e,t,function(){return Ju(e,t)},null)),e.o&&h.push(Xr(e,l.aa,function(){return Ju(e,l.aa)},null))),o||(h.push(Xr(e,t,function(){return Qu(e,t,n)},null)),e.o&&h.push(Xr(e,l.aa,function(){return Qu(e,l.aa,n)},null))),(r!=0||i!=1/0)&&(h.push(Xr(e,t,function(){return Oy(e,t,r,i)},null)),e.o&&h.push(Xr(e,l.aa,function(){return Oy(e,l.aa,r,i)},null))),h.length?m.g(Promise.all(h),0):m.A(0))})}function Ry(e,t,n){var r,i;return G(function(o){return o.h==1?(r=mr,t==r.Oa||(t==r.wa&&(e.ab=new zn),!e.J||(i=Na(e,t))&&Math.abs(i-n)<.15)?o.return():(Xr(e,t,function(){return Ju(e,t)},null),e.o&&Xr(e,r.aa,function(){return Ju(e,r.aa)},null),o.g(Xr(e,t,function(){return Qu(e,t,n)},null),2))):e.o?o.g(Xr(e,r.aa,function(){return Qu(e,r.aa,n)},null),0):o.A(0)})}f.endOfStream=function(e){var t=this;return G(function(n){return n.g(Ql(t,function(){Tu(t)||Da(t)||(e?t.i.endOfStream(e):t.i.endOfStream())}),0)})},f.ub=function(e){var t=this;return G(function(n){return n.g(Ql(t,function(){if(t.B.durationReductionEmitsUpdateEnd&&e<t.i.duration)for(var r=d(t.l.keys()),i=r.next();!i.done;i=r.next()){i=i.value;var o={start:function(){},p:new zn,uri:null};t.m.get(i).unshift(o)}t.i.duration=e,t.ya=e}),0)})},f.getDuration=function(){return this.i.duration};function SI(e,t,n){G(function(r){return e.H.g||e.g.error||e.N||e.I||Tu(e)||Da(e)?r.return():r.g(Ql(e,function(){Tu(e)||Da(e)||e.i.setLiveSeekableRange(t,n)}),0)})}function ip(e){G(function(t){return e.H.g||e.g.error||e.N||e.I||Tu(e)||Da(e)?t.return():t.g(Ql(e,function(){Tu(e)||Da(e)||e.i.clearLiveSeekableRange()}),0)})}function Pf(e,t,n,r){if(r<=n)La(e,t);else{if(e.C){var i=e.C;t==="video"&&i.g&&i.g.flushBuffer(n,r)}e.l.get(t).remove(n,r)}}function Ju(e,t){var n=e.l.get(t),r=n.appendWindowStart,i=n.appendWindowEnd;n.abort(),n.appendWindowStart=r,n.appendWindowEnd=i,La(e,t)}function Qu(e,t,n){n<0&&(n+=.001),e.l.get(t).timestampOffset=n,La(e,t)}function Oy(e,t,n,r){var i=e.l.get(t);(i.appendWindowEnd!==r||i.appendWindowStart!==n)&&(i.appendWindowStart=0,i.appendWindowEnd=r,i.appendWindowStart=n),La(e,t)}function La(e,t){if(e.I||e.H.g){var n=e.m.get(t);n&&n.length&&((n=n[0])&&n.p&&n.p.resolve(),e.m.set(t,[]))}else(n=e.m.get(t)[0])&&(n.p.resolve(),op(e,t))}function Xr(e,t,n,r){return qn(e.H),n={start:n,p:new zn,uri:r},e.m.get(t).push(n),e.m.get(t).length==1&&Dy(e,t),n.p}function Ql(e,t){var n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z;return G(function(ae){switch(ae.h){case 1:for(qn(e.H),n=[],r=Array.from(e.l.keys()),i=new Map,o=d(r),s=o.next(),a={};!s.done;a={ready:void 0},s=o.next())u=s.value,a.ready=new zn,l={start:function(pe){return function(){return pe.ready.resolve()}}(a),p:a.ready,uri:null},h=e.m.get(u),h.push(l),n.push(a.ready),i.set(u,l),h.length==1&&l.start();return ae.m(2),ae.g(Promise.all(n),4);case 4:ae.o(3);break;case 2:if(g=ae.l(),e.H.g){for(m=d(r),S=m.next();!S.done;S=m.next())A=S.value,k=e.m.get(A),i.has(A)&&$t(k,i.get(A));return ae.return()}throw g;case 3:return ae.m(5,6),ae.g(t(),6);case 6:for(ae.u(),b=d(r),V=b.next();!V.done;V=b.next())B=V.value,op(e,B);ae.B(0);break;case 5:throw Z=ae.l(),new fe(2,3,3015,Z,e.g.error||"No error in the media element",null)}})}function op(e,t){e.m.get(t).shift(),Dy(e,t)}function Dy(e,t){var n=e.m.get(t)[0];if(n)try{n.start()}catch(r){r.name=="QuotaExceededError"?n.p.reject(new fe(2,3,3017,t)):Py(e)?n.p.reject(new fe(2,3,3015,r,e.g.error||"No error in the media element",n.uri)):n.p.reject(new fe(2,3,3024,t)),op(e,t)}}function TI(e,t){e.ba=t,e.h&&(e.h.l=t)}function EI(e,t,n,r,i){if(Ma(e.G.get(i))!="mp4")return n;var o=r===null,s=e.Ka.get(i),a=e.O.Mj(),u=!1;r&&r.ea&&(u=r.ea.encrypted),r=r?r.R()[0]:null;var l=ct();return e.B.correctEc3Enca&&o&&i==="audio"&&(n=QA(n)),e.B.insertFakeEncryptionInInit&&s&&l.zd(a,i)&&(o?n=ZA(t,n,r):!u&&l.Ii(i)&&(n=qA(n))),o&&l.ke()&&(n=rI(n)),n}function xI(e,t,n,r){return Xr(e,t,function(){if(t!==Bt){if(e.G.get(t),ct().wb()){e.j.has(t)&&(e.j.get(t).destroy(),e.j.delete(t)),r&&e.j.set(t,r);var i=n+e.B.addExtraFeaturesToSourceBuffer(n);e.l.get(t).changeType(i),e.G.set(t,n)}La(e,t)}},null)}function wI(e,t){var n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe;return G(function(te){if(te.h==1){if(e.I||e.N)return te.return();for(n=mr,e.I=!0,e.o=!1,r=e.g.currentTime,i=e.g.autoplay,e.g.paused||(e.Ua=!0),e.ib&&(e.g.autoplay=!1),te.D(2),e.u.Ra(),o=d(e.j.values()),s=o.next();!s.done;s=o.next())a=s.value,a.destroy();for(u=d(e.l.values()),l=u.next();!l.done;l=u.next()){h=l.value;try{e.i.removeSourceBuffer(h)}catch{}}return e.j.clear(),e.l.clear(),g=e.i.duration,e.M=new zn,e.i=np(e,e.M),te.g(e.M,4)}if(te.h!=2){for(!isNaN(g)&&g?e.i.duration=g:!isNaN(e.ya)&&e.ya&&(e.i.duration=e.ya),m=new zn,S=e.i.sourceBuffers,A=t.size,k=0,b=function(){k++,k===A&&(m.resolve(),e.u.Na(S,"addsourcebuffer",b))},e.u.F(S,"addsourcebuffer",b),V=d(t.keys()),B=V.next();!B.done;B=V.next())Z=B.value,ae=t.get(Z),If(e,Z,ae,ae.codecs);return(pe=t.get(n.aa))&&pe.isAudioMuxedInVideo&&(e.o=!0),e.o&&!e.m.has(n.aa)&&e.m.set(n.aa,[]),te.g(m,2)}return te.u(),e.I=!1,qn(e.H),e.u.Aa(e.g,"loadedmetadata",function(){e.H.g||(e.g.currentTime=r)}),e.u.Aa(e.g,"canplaythrough",function(){e.H.g||(e.g.autoplay=i,e.Ua&&(e.Ua=!1,e.g.play()))}),te.B(0)})}function Ny(e,t){return Ql(e,function(){return wI(e,t)})}function Ly(e,t,n,r){var i=!1,o=ti("audio",(r||"").split(",")),s=ti("video",(r||"").split(",")),a=s;t=="audio"&&(a=o),a||(a=r);var u=ar(n,a),l=vi(e.G.get(t)),h=e.B.forceTransmux;if(!Ni(u)||!e.J&&As.includes(u)?h=!0:h||n==l||(h=!ct().If()&&As.includes(n)),h&&(e=ou(n,a),a=ra(e))){var g=a();o&&s&&(i=!0),u=g.convertCodecs(t,e)}return!g&&t==="video"&&o&&(u=ar(n,r)),t=ri(yi(u)),{dc:g,hl:i,Ph:vi(u),codec:t,mimeType:u}}function jy(e,t,n,r,i){if(t==Bt)return{type:ap,rf:n,dc:null};var o=ri(yi(e.G.get(t))),s=vi(e.G.get(t)),a=Ly(e,t,n,r),u=a.dc,l=a.hl,h=a.Ph,g=a.codec;a=a.mimeType;var m=!0;return l&&e.G.has("audio")&&(n=Ly(e,"audio",n,r),r=ri(yi(e.G.get("audio"))),m=vi(e.G.get("audio")),m=r==n.codec&&m==n.Ph,n.dc&&n.dc.destroy()),o===g&&s===h&&m?{type:ap,rf:a,dc:u}:(o=!0,(e.o&&!i.has("audio")||l&&u&&!e.j.has(t))&&(o=!1),t=ct(),o&&e.B.codecSwitchingStrategy==="smooth"&&t.wb()?{type:Fy,rf:a,dc:u}:(u&&u.destroy(),{type:up,rf:a,dc:null}))}function AI(e,t,n,r,i){var o,s,a,u,l,h;return G(function(g){return g.h==1?(o=mr,s=jy(e,t,n,r,i),a=s.type,u=s.dc,l=s.rf,(h=i.get(o.aa))&&(e.o=h.isAudioMuxedInVideo),a==ap?(e.j.has(t)&&!u?(e.j.get(t).destroy(),e.j.delete(t)):!e.j.has(t)&&u?e.j.set(t,u):u&&(e.j.has(t)&&e.j.get(t).transmux!==u.transmux?(e.j.get(t).destroy(),e.j.set(t,u)):u.destroy()),g.return(!1)):a==Fy?g.g(xI(e,t,l,u),3):a!=up?g.A(3):(u&&u.destroy(),g.g(Ny(e,i),3))):g.return(!0)})}function II(e,t,n,r,i){return e=jy(e,t,n,r,i),e.dc&&e.dc.destroy(),e.type==up}var sp=R.URL.createObjectURL,CI="sequence",ap="none",up="reset",Fy="changeType";function Lt(e,t,n){this.i=e,this.D=t,this.u=this.l=1/0,this.h=1,this.g=this.j=null,this.B=0,this.C=!0,this.J=!1,this.I=0,this.G=n===void 0?!0:n,this.H=0,this.o=!1,this.m=e}f=Lt.prototype,f.getDuration=function(){return this.l},f.Oj=function(){return this.h},f.Ri=function(e){this.i=e},f.ub=function(e){this.l=e},f.Tj=function(){return this.i},f.Qi=function(e){this.B=e},f.Uc=function(e){e&&!this.C&&(this.J=!0),this.C=e},f.Gf=function(e){this.u=e},f.Xe=function(){return this.u},f.ph=function(e){this.D=e},f.Gj=function(){return this.D},f.Ci=function(e,t){if(e.length!=0){var n=(Date.now()+this.B)/1e3;if(e=e.filter(function(i){return i.start+t<n}),e.length!=0){var r=e[e.length-1].end+t;this.tf(e[0].start+t),this.h=e.reduce(function(i,o){return Math.max(i,o.end-o.start)},this.h),this.g=Math.max(this.g,r),this.i!=null&&this.G&&!this.o&&(this.i=n-this.g-this.h)}}},f.ee=function(e){if(e.length!=0){var t=e[0].startTime,n=e[0].endTime,r=(Date.now()+this.B)/1e3;e=d(e);for(var i=e.next();!i.done;i=e.next())i=i.value,r<i.startTime||(t=Math.min(t,i.startTime),n=Math.max(n,i.endTime),this.h=Math.max(this.h,i.endTime-i.startTime));this.tf(t),this.g=Math.max(this.g,n),this.i!=null&&this.G&&!this.o&&(this.i=r-this.g-this.h)}},f.Bi=function(e,t){this.tf(e),t==1/0||this.U()||(this.g=Math.max(this.g,t))},f.Pj=function(){return this.g},f.lf=function(){this.o=!0},f.qk=function(){return this.o},f.qh=function(e){this.m=e},f.Lj=function(){return this.m},f.tf=function(e){this.j==null?this.j=e:this.J||(this.j=Math.min(this.j,e))},f.Tg=function(e){this.h=Math.max(this.h,e)},f.offset=function(e){this.j!=null&&(this.j+=e),this.g!=null&&(this.g+=e)},f.U=function(){return this.l==1/0&&!this.C},f.Oc=function(){return this.l!=1/0&&!this.C},f.Db=function(){return Math.max(this.I,this.Dc()-this.u)},f.Ui=function(e){this.I=e},f.Dc=function(){return this.U()||this.Oc()?Math.min(Math.max(0,(Date.now()+this.B)/1e3-this.h-this.i)+this.H,this.l):this.g?Math.min(this.g,this.l):this.l},f.Vd=function(e){var t=Math.max(this.j,this.I);return this.u==1/0?Math.ceil(t*1e3)/1e3:Math.max(t,Math.min(this.Dc()-this.u+e,this.Cb()))},f.Tb=function(){return this.Vd(0)},f.Cb=function(){return Math.max(0,this.Dc()-(this.U()||this.Oc()?this.D:0))},f.hj=function(){return!(this.i==null||this.g!=null&&this.G)},f.Pi=function(e){this.H=e},f.Bj=function(){return this.H},be("shaka.media.PresentationTimeline",Lt),Lt.prototype.getAvailabilityTimeOffset=Lt.prototype.Bj,Lt.prototype.setAvailabilityTimeOffset=Lt.prototype.Pi,Lt.prototype.usingPresentationStartTime=Lt.prototype.hj,Lt.prototype.getSeekRangeEnd=Lt.prototype.Cb,Lt.prototype.getSeekRangeStart=Lt.prototype.Tb,Lt.prototype.getSafeSeekRangeStart=Lt.prototype.Vd,Lt.prototype.getSegmentAvailabilityEnd=Lt.prototype.Dc,Lt.prototype.setUserSeekStart=Lt.prototype.Ui,Lt.prototype.getSegmentAvailabilityStart=Lt.prototype.Db,Lt.prototype.isInProgress=Lt.prototype.Oc,Lt.prototype.isLive=Lt.prototype.U,Lt.prototype.offset=Lt.prototype.offset,Lt.prototype.notifyMaxSegmentDuration=Lt.prototype.Tg,Lt.prototype.notifyMinSegmentStartTime=Lt.prototype.tf,Lt.prototype.getInitialProgramDateTime=Lt.prototype.Lj,Lt.prototype.setInitialProgramDateTime=Lt.prototype.qh,Lt.prototype.isStartTimeLocked=Lt.prototype.qk,Lt.prototype.lockStartTime=Lt.prototype.lf,Lt.prototype.getMaxSegmentEndTime=Lt.prototype.Pj,Lt.prototype.notifyPeriodDuration=Lt.prototype.Bi,Lt.prototype.notifySegments=Lt.prototype.ee,Lt.prototype.notifyTimeRange=Lt.prototype.Ci,Lt.prototype.getDelay=Lt.prototype.Gj,Lt.prototype.setDelay=Lt.prototype.ph,Lt.prototype.getSegmentAvailabilityDuration=Lt.prototype.Xe,Lt.prototype.setSegmentAvailabilityDuration=Lt.prototype.Gf,Lt.prototype.setStatic=Lt.prototype.Uc,Lt.prototype.setClockOffset=Lt.prototype.Qi,Lt.prototype.getPresentationStartTime=Lt.prototype.Tj,Lt.prototype.setDuration=Lt.prototype.ub,Lt.prototype.setPresentationStartTime=Lt.prototype.Ri,Lt.prototype.getMaxSegmentDuration=Lt.prototype.Oj,Lt.prototype.getDuration=Lt.prototype.getDuration;function lp(e,t,n,r){var i=this;this.u=r,this.g=e,this.D=t,this.h=n,this.j=new Et,this.m=!1,this.l=0,this.C=!1,this.H=this.G=0,this.o=PI(this),this.B=!1,this.j.F(e,"waiting",function(){return Zl(i)}),this.i=new Yt(function(){Zl(i)}).Ea(this.h.gapJumpTimerTime)}lp.prototype.release=function(){this.j&&(this.j.release(),this.j=null),this.i!=null&&(this.i.stop(),this.i=null),this.o&&(this.o.release(),this.o=null),this.g=this.D=this.u=null},lp.prototype.td=function(){this.B=!0,this.i&&this.i.Ea(this.h.gapJumpTimerTime),Zl(this)};function Zl(e){if(e.g.readyState!=0){if(e.g.seeking){if(!e.m)return}else e.m=!1;if(!e.g.paused||e.g.currentTime==e.l&&(e.g.autoplay||e.g.currentTime!=e.l)){var t;if(!(t=!e.o)){t=e.o;var n=t.h,r=Vy(n),i=n.g.currentTime,o=Date.now()/1e3;(t.g!=i||t.m!=r)&&(t.l=o,t.g=i,t.m=r,t.i=!1),i=o-t.l,(r=i>=t.o&&r&&!t.i)&&(t.j&&t.j(t.g,i),t.i=!0,t.g=n.g.currentTime),t=!r}t&&(t=e.g.currentTime,n=e.g.buffered,r=iI(n,t,e.h.gapDetectionThreshold),r==null||r==0&&!e.B||(i=n.start(r),(o=e.h.gapPadding)&&(i=Math.ceil((i+o)*100)/100),i>=e.D.Cb()||i-t<.001||(r!=0&&n.end(r-1),MI(e,i),t==e.l&&(e.l=i),e.G++,e.u(new yt("gapjumped")))))}}}function MI(e,t){e.C=!0,e.j.Aa(e.g,"seeked",function(){e.C=!1}),e.g.currentTime=t}function PI(e){if(!e.h.stallEnabled)return null;var t=e.h.stallThreshold,n=e.h.stallSkip;return new Uy(new By(e.g),t,function(){var r;return G(function(i){if(i.h==1)return r=ca(e.g.buffered),r.length?n?(e.g.currentTime+=n,i.A(2)):i.g(e.g.play(),3):i.return();if(i.h!=2){if(!e.g)return i.return();e.g.pause(),e.g.play()}e.H++,e.u(new yt("stalldetected")),i.j()})})}function Uy(e,t,n){this.h=e,this.m=Vy(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.i=!1,this.o=t,this.j=n}Uy.prototype.release=function(){this.h&&this.h.release(),this.j=this.h=null};function By(e){var t=this;this.g=e,this.h=new Et,this.i=!1,this.h.F(this.g,"audiofocuspaused",function(){t.i=!0}),this.h.F(this.g,"audiofocusgranted",function(){t.i=!1}),this.h.F(this.g,"audiofocuslost",function(){t.i=!0})}function Vy(e){if(e.g.paused||e.g.playbackRate==0||e.i||e.g.buffered.length==0)var t=!1;else e:{t=e.g.currentTime,e=d(ca(e.g.buffered));for(var n=e.next();!n.done;n=e.next())if(n=n.value,!(t<n.start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}By.prototype.release=function(){this.h&&this.h.release(),this.h=null};function Zu(e,t,n,r){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?r():(t=kI.value().get(t),n.Aa(e,t,r))}var kI=new Kt(function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])});function _y(e,t,n,r){var i=this;this.g=e,this.m=t,this.u=n,this.l=null,this.j=function(){return i.l==null&&(i.l=r()),i.l},this.o=!1,this.h=new Et,this.i=new Wy(e),Zu(this.g,HTMLMediaElement.HAVE_METADATA,this.h,function(){Gy(i,i.j())})}_y.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i!=null&&(this.i.release(),this.i=null),this.m=function(){},this.g=null};function cp(e){return e.o?e.g.currentTime:e.j()}function Hy(e,t){e.g.readyState>0?zy(e.i,t):Zu(e.g,HTMLMediaElement.HAVE_METADATA,e.h,function(){Gy(e,e.j())})}function Gy(e,t){Math.abs(e.g.currentTime-t)<.001?Ky(e):(e.h.Aa(e.g,"seeking",function(){Ky(e)}),zy(e.i,e.g.currentTime&&e.g.currentTime!=0?e.g.currentTime:t))}function Ky(e){e.o=!0,e.h.F(e.g,"seeking",function(){return e.m()}),e.u(e.g.currentTime)}function Wy(e){var t=this;this.g=e,this.m=10,this.j=this.l=this.i=0,this.h=new Yt(function(){t.i<=0||t.g.currentTime!=t.l||t.g.currentTime===t.j?t.h.stop():(t.g.currentTime=t.j,t.i--)})}Wy.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null};function zy(e,t){e.l=e.g.currentTime,e.j=t,e.i=e.m,e.g.currentTime=t,e.h.Ea(.1)}function $y(e){this.g=e,this.i=!1,this.h=null,this.j=new Et}f=$y.prototype,f.ready=function(){function e(){if(t.h==null||t.h==0&&t.g.duration!=1/0)t.i=!0;else{var n=t.g.currentTime,r=null;if(typeof t.h=="number")r=t.h;else if(t.h instanceof Date){var i=Xy(t);i!==null&&(r=t.h.getTime()/1e3-i,r=Yy(t,r))}r==null?t.i=!0:(r<0&&(r=Math.max(0,n+r)),n!=r?(t.j.Aa(t.g,"seeking",function(){t.i=!0}),t.g.currentTime=r):t.i=!0)}}var t=this;Zu(this.g,HTMLMediaElement.HAVE_FUTURE_DATA,this.j,function(){e()})},f.release=function(){this.j&&(this.j.release(),this.j=null),this.g=null},f.Uf=function(e){this.h=this.i?this.h:e},f.Kd=function(){var e=this.i?this.g.currentTime:this.h;return e instanceof Date&&(e=e.getTime()/1e3-(Xy(this)||0),e=Yy(this,e)),e||0},f.Jh=function(){return 0},f.Hh=function(){return 0},f.Ih=function(){return!1},f.Ai=function(){},f.mi=function(){var e=Ef(this.g.buffered);return e!=null&&e>=this.g.duration-1};function Xy(e){return e.g.getStartDate&&(e=e.g.getStartDate().getTime(),!isNaN(e))?e/1e3:null}function Yy(e,t){return e=e.g.seekable,e.length>0&&(t=Math.max(e.start(0),t),t=Math.min(e.end(e.length-1),t)),t}function Jy(e,t,n,r,i,o){var s=this;this.h=e,this.g=t.presentationTimeline,this.l=n,this.u=i,this.o=null,this.i=new lp(e,t.presentationTimeline,n,o),this.j=new _y(e,function(){e:{var a=s.i;a.m=!0,a.B=!1,a.i&&a.i.Ea(a.h.gapJumpTimerTime),Zl(a);var u=cp(s.j);if(a=qy(s,u),!ay()&&Math.abs(a-u)>.001){u=!1;var l=ct().Ni();if(l){var h=Date.now()/1e3;(!s.o||s.o<h-l)&&(s.o=h,u=!0)}else u=!0;if(u){Hy(s.j,a),a=void 0;break e}}s.u(),a=void 0}return a},function(a){var u=s.i;u.g.seeking&&!u.m&&(u.m=!0,u.l=a),u.i&&u.i.Ea(u.h.gapJumpTimerTime),Zl(u)},function(){return Qy(s,r)}),this.m=new Yt(function(){if(s.h.readyState!=0&&!s.h.paused){var a=cp(s.j),u=s.g.Tb(),l=s.g.Cb();l-u<3&&(u=l-3),a<u&&(a=qy(s,a),s.h.currentTime=a)}})}f=Jy.prototype,f.ready=function(){this.m.Ea(.25)},f.release=function(){this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.m&&(this.m.stop(),this.m=null),this.h=this.j=this.g=this.l=null,this.u=function(){}},f.Uf=function(e){Hy(this.j,Qy(this,e))},f.Kd=function(){var e=cp(this.j);return this.h.readyState>0&&!this.h.paused?e0(this,e):e},f.Jh=function(){return this.i.H},f.Hh=function(){return this.i.G},f.Ih=function(){return this.i.C};function Qy(e,t){return t==null?t=e.g.getDuration()<1/0?e.g.Tb():e.g.Cb():t instanceof Date?t=t.getTime()/1e3-(e.g.m||e.g.i):t<0&&(t=e.g.Cb()+t),Zy(e,e0(e,t))}f.Ai=function(){this.i.td()},f.mi=function(){if(this.g.U()){var e=this.g.Dc(),t=Ef(this.h.buffered);if(t!=null&&t>=e)return!0}return!1};function Zy(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function qy(e,t){var n=e.l.rebufferingGoal,r=e.l.safeSeekOffset,i=e.g.Tb(),o=e.g.Cb(),s=e.g.getDuration();o-i<3&&(i=o-3);var a=e.g.Vd(n),u=e.g.Vd(r);return n=e.g.Vd(n+r),t>=s?Zy(e,t):t>o?o-e.l.safeSeekEndOffset:t<i?e.g.U()&&e.l.returnToEndOfLiveWindowWhenOutside?o-e.l.safeSeekEndOffset:Yh(e.h.buffered,u)?u:n:t>=a||Yh(e.h.buffered,t)?t:n}function e0(e,t){var n=e.g.Tb();return t<n?n:(e=e.g.Cb(),t>e?e:t)}function wn(e){this.g=e,this.m=null,this.i=0,this.o=!1}f=wn.prototype,f.getNumReferences=function(){return this.g.length},f.getNumEvicted=function(){return this.i},f.release=function(){this.o||(this.g=[],this.m&&this.m.stop(),this.m=null)},f.yk=function(){this.o=!0},f.Bb=function(e){for(var t=d(this.g),n=t.next();!n.done;n=t.next())e(n.value)};function Cs(e){return e.g[0]||null}f.find=function(e){for(var t=this.g.length-1,n=t;n>=0;--n){var r=this.g[n],i=n<t?this.g[n+1].startTime:r.endTime;if(e>=r.startTime&&e<i)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},f.get=function(e){return this.g.length==0?null:(e-=this.i,e<0||e>=this.g.length?null:this.g[e])},f.offset=function(e){if(!this.o)for(var t=d(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},f.nf=function(e){if(!this.o&&e.length){var t=Math.round(e[0].startTime*1e3)/1e3;this.g=this.g.filter(function(n){return Math.round(n.startTime*1e3)/1e3<t}),this.g.push.apply(this.g,M(e))}},f.be=function(e,t){var n=this;e=e.filter(function(r){return r.endTime>t&&(n.g.length==0||r.endTime>n.g[0].startTime)}),this.nf(e),this.Ya(t)},f.Ya=function(e){if(!this.o){var t=this.g.length;this.g=this.g.filter(function(n){return n.endTime>e}),this.i+=t-this.g.length}},f.gd=function(e,t,n){if(n=n===void 0?!1:n,!this.o){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.i++;this.g.length!=0&&(e=this.g[this.g.length-1],t=new kt(e.startTime,t,e.C,e.startByte,e.endByte,e.ea,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.B,e.h,e.status,e.aesKey),t.mimeType=e.mimeType,t.codecs=e.codecs,t.i=e.i,this.g[this.g.length-1]=t)}},f.Mf=function(e,t){var n=this;this.o||(this.m&&this.m.stop(),this.m=new Yt(function(){var r=t();r?n.g.push.apply(n.g,M(r)):(n.m.stop(),n.m=null)}),this.m.Ea(e))},wn.prototype[Symbol.iterator]=function(){return this.Qb(0)},wn.prototype.Qb=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?!1:n;var r=this.find(e);if(r==null)return null;var i=this.get(r);n?r++:r--;var o=-1;if(i&&i.g.length>0)for(var s=i.g.length-1;s>=0;--s){var a=i.g[s];if(e>=a.startTime&&e<a.endTime){if(!t){for(;s&&!a.l;)s--,a=i.g[s];if(!a.l)return gn("No independent partial segment found!"),null}n?r--:r++,o=s-1;break}}return new Go(this,r,o,n)},wn.prototype.Pe=function(){return-1};function kf(e,t,n){return e=new kt(e,e+t,function(){return n},0,null,null,e,e,e+t),new wn([e])}be("shaka.media.SegmentIndex",wn),wn.forSingleSegment=kf,wn.prototype.getIteratorForTime=wn.prototype.Qb,wn.prototype.updateEvery=wn.prototype.Mf,wn.prototype.fit=wn.prototype.gd,wn.prototype.evict=wn.prototype.Ya,wn.prototype.mergeAndEvict=wn.prototype.be,wn.prototype.offset=wn.prototype.offset,wn.prototype.get=wn.prototype.get,wn.prototype.find=wn.prototype.find,wn.prototype.markImmutable=wn.prototype.yk,wn.prototype.release=wn.prototype.release,wn.prototype.getNumEvicted=wn.prototype.getNumEvicted,wn.prototype.getNumReferences=wn.prototype.getNumReferences;function Go(e,t,n,r){this.i=e,this.h=t,this.g=n,this.reverse=r}f=Go.prototype,f.Ed=function(e){this.reverse=e},f.wj=function(){return this.h},f.current=function(){var e=this.i.get(this.h);return e&&e.g.length>0&&e.m&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&e.g.length>0?e.g[this.g]:e},f.next=function(){var e=this.i.get(this.h);return this.reverse?e&&e.g.length>0?(this.g--,this.g<0&&(this.h--,this.g=(e=this.i.get(this.h))&&e.g.length>0?e.g.length-1:0)):(this.h--,this.g=0):e&&e.g.length>0?(this.g++,e.m&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),e=this.current(),{value:e,done:!e}},f.hh=function(){var e=this.current();if(e&&e.Qc&&!e.l&&(e=this.i.get(this.h))&&e.g.length>0)for(var t=e.g[this.g];t.l&&!(this.g<=0);)this.g--,t=e.g[this.g]},be("shaka.media.SegmentIterator",Go),Go.prototype.resetToLastIndependent=Go.prototype.hh,Go.prototype.next=Go.prototype.next,Go.prototype.current=Go.prototype.current,Go.prototype.currentPosition=Go.prototype.wj,Go.prototype.setReverse=Go.prototype.Ed;function Er(){wn.call(this,[]),this.h=[]}P(Er,wn),f=Er.prototype,f.clone=function(){var e=new Er;return e.h=this.h.slice(),e.i=this.i,e},f.release=function(){this.h=[]},f.Bb=function(e){for(var t=d(this.h),n=t.next();!n.done;n=t.next())n.value.Bb(e)};function bI(e,t){e=d(e.h);for(var n=e.next();!n.done;n=e.next())t(n.value)}f.find=function(e){for(var t=this.i,n=d(this.h),r=n.next();!r.done;r=n.next()){r=r.value;var i=r.find(e);if(i!=null)return i+t;t+=r.getNumEvicted()+r.getNumReferences()}return null};function RI(e,t){e=d(e.h);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.find(t)!=null)return n.Pe();return-1}f.get=function(e){for(var t=this.i,n=d(this.h),r=n.next();!r.done;r=n.next()){r=r.value;var i=r.get(e-t);if(i)return i;i=r.getNumReferences(),t+=r.getNumEvicted()+i}return null},f.offset=function(){},f.nf=function(){},f.Ya=function(e){if(this.h.length){var t=this.h[0];t.Ya(e),t.getNumReferences()==0&&(this.h.shift(),this.i+=t.getNumEvicted(),t.release(),this.Ya(e))}},f.be=function(){},f.gd=function(){},f.Mf=function(){},be("shaka.media.MetaSegmentIndex",Er),Er.prototype.updateEvery=Er.prototype.Mf,Er.prototype.fit=Er.prototype.gd,Er.prototype.mergeAndEvict=Er.prototype.be,Er.prototype.evict=Er.prototype.Ya,Er.prototype.merge=Er.prototype.nf,Er.prototype.offset=Er.prototype.offset,Er.prototype.get=Er.prototype.get,Er.prototype.find=Er.prototype.find,Er.prototype.forEachTopLevelReference=Er.prototype.Bb,Er.prototype.release=Er.prototype.release;function bf(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Gg(),this.h=new Yt(function(){t.g.isPaused()||t.g.Ak(t.i*.25)})}bf.prototype.release=function(){this.set(this.kd()),this.h&&(this.h.stop(),this.h=null),this.g=null},bf.prototype.set=function(e){this.i=e,fp(this)},bf.prototype.kd=function(){return this.g.kd()};function fp(e){e.h.stop();var t=e.j?0:e.i;if(t>=0)try{e.g.Gg()!=t&&e.g.Si(t);return}catch{}e.h.Ea(.25),e.g.Gg()!=0&&e.g.Si(0)}function dp(e){var t=this;this.j=e,this.h=new Et,this.g=new Set,this.i=new Yt(function(){t0(t,!1)}).xb(),e.paused||this.i.Ea(.25),this.h.F(e,"playing",function(){t.i.xb().Ea(.25)}),this.h.F(e,"pause",function(){t.i.stop()}),this.h.F(e,"seeked",function(){t.i.xb(),e.paused||t.i.Ea(.25)})}dp.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.i.stop();for(var e=d(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()};function t0(e,t){var n=e.j.currentTime;e=d(e.g);for(var r=e.next();!r.done;r=e.next())r.value.j(n,t)}function Rf(e){_n.call(this),this.g=new Map,this.h=e}P(Rf,_n),Rf.prototype.release=function(){this.g.clear(),_n.prototype.release.call(this)};function OI(e,t){var n=e.g.get(t);return n||(n={je:[],jg:null,contentType:t},e.g.set(t,n)),n}function DI(e,t,n){var r=OI(e,t.contentType);NI(e,r),e={rd:t,position:n},r=r.je,t=r.findIndex(function(i){return i.position>=n}),t>=0?r.splice(t,r[t].position==n?1:0,e):r.push(e)}Rf.prototype.j=function(e){for(var t=d(this.g.values()),n=t.next();!n.done;n=t.next()){n=n.value;var r=n.jg;e:{for(var i=n.je,o=i.length-1;o>=0;o--){var s=i[o];if(s.position<=e){i=s.rd;break e}}i=null}o=i&&!(r===i||r&&i&&r.bandwidth==i.bandwidth&&r.audioSamplingRate==i.audioSamplingRate&&r.codecs==i.codecs&&r.contentType==i.contentType&&r.frameRate==i.frameRate&&r.height==i.height&&r.mimeType==i.mimeType&&r.channelsCount==i.channelsCount&&r.pixelAspectRatio==i.pixelAspectRatio&&r.width==i.width),s=i&&r&&i.label&&r.label&&r.label!==i.label;var a=i&&r&&i.language&&r.language&&r.language!==i.language;r=i&&r&&i.roles&&r.roles&&!Ye(r.roles,i.roles),(s||a||r)&&n0(this,e,i.contentType)&&(n.jg=i,r=new yt("audiotrackchange",new Map([["quality",i],["position",e]])),this.dispatchEvent(r)),o&&n0(this,e,i.contentType)&&(n.jg=i,JSON.stringify(i),n=new yt("qualitychange",new Map([["quality",i],["position",e]])),this.dispatchEvent(n))}};function n0(e,t,n){return!!((e=e.h()[n])&&e.length>0&&(n=e[e.length-1].end,t>=e[0].start&&t<n))}function NI(e,t){if((e=e.h()[t.contentType])&&e.length>0){var n=e[0].start,r=e[e.length-1].end,i=t.je;t.je=i.filter(function(o,s){return!(o.position<=n&&s+1<i.length&&i[s+1].position<=n||o.position>=r)})}else t.je=[]}function Of(e){var t={bandwidth:e.bandwidth||0,audioSamplingRate:null,codecs:e.codecs,contentType:e.type,frameRate:null,height:null,mimeType:e.mimeType,channelsCount:null,pixelAspectRatio:null,width:null,label:null,roles:e.roles,language:null};return e.type=="video"&&(t.frameRate=e.frameRate||null,t.height=e.height||null,t.pixelAspectRatio=e.pixelAspectRatio||null,t.width=e.width||null),e.type=="audio"&&(t.audioSamplingRate=e.audioSamplingRate,t.channelsCount=e.channelsCount,t.label=e.label||null,t.language=e.language),t}function ql(e){_n.call(this),this.h=new Map,this.i=e,this.g=null}P(ql,_n),ql.prototype.release=function(){this.h.clear(),this.g&&(this.g.stop(),this.g=null),_n.prototype.release.call(this)};function hp(e,t){var n=t.schemeIdUri+"_"+t.id+"_"+(t.startTime.toFixed(1)+"_"+t.endTime.toFixed(1));e.h.has(n)||(e.h.set(n,t),t=new yt("regionadd",new Map([["region",t]])),e.dispatchEvent(t),LI(e))}function LI(e){e.g||(e.g=new Yt(function(){for(var t=e.i(),n=d(e.h),r=n.next();!r.done;r=n.next()){var i=d(r.value);r=i.next().value,i=i.next().value,i.endTime<t.start&&(e.h.delete(r),r=new yt("regionremove",new Map([["region",i]])),e.dispatchEvent(r))}!e.h.size&&e.g&&(e.g.stop(),e.g=null)}).Ea(2))}function Df(e,t,n,r,i){function o(s,a){return!(a.fastSwitching&&s.Qc&&s.ae)}this.m=e,this.i=t,this.l=n,this.g=new Map,this.j=new Map,this.h=null,this.o=r,this.u=i||o}function jI(e,t){e.l=t,e=d(e.g.values());for(var n=e.next();!n.done;n=e.next())n.value.g=t}function ec(e,t,n){if(n=n===void 0?!1:n,!e.i.segmentIndex||(e.h||(e.h=e.i.segmentIndex.Qb(t,!0,e.o)),!e.h))return Promise.resolve();for(n&&e.h.next(),t=[];e.g.size<e.m&&(n=e.h.next().value,!!n);){var r=!0;if(n.isPreload()&&n.endByte!=null&&(r=!1),n.Vb()==2&&(r=!1),n.Ub(!1)&&(r=!1),r&&n.ea&&t.push(r0(e,n.ea)),r&&!e.g.has(n)&&(r=new gp(e.l),t.push(s0(r,n,e.i)),e.g.set(n,r)),!e.u(n,e.i))break}return pp(e),Promise.all(t)}function r0(e,t){if(!e.i.segmentIndex||t.Ub()||Array.from(e.j.keys()).some(function(i){return Xl(i,t)}))return Promise.resolve();var n=new gp(e.l),r=s0(n,t,e.i);return e.j.set(t,n),r}function i0(e,t){t=d(t.keys());for(var n=t.next();!n.done;n=t.next())(n=n.value)&&tc(e,n)}function Ms(e){i0(e,e.g),i0(e,e.j),e.h=null}Df.prototype.Ya=function(e,t){t=t===void 0?!1:t;for(var n=d(this.g.keys()),r=n.next();!r.done;r=n.next())r=r.value,e>r.endTime&&tc(this,r);t&&pp(this)},Df.prototype.Ed=function(e){this.o=e,this.h&&this.h.Ed(e)};function pp(e){if(e.g.size)for(var t=Array.from(e.g.keys()),n=d(e.j.keys()),r=n.next(),i={};!r.done;i={Lg:void 0},r=n.next())i.Lg=r.value,t.some(function(o){return function(s){return Xl(s.ea,o.Lg)}}(i))||tc(e,i.Lg)}function o0(e,t){e.m=t;for(var n=Array.from(e.g.keys());n.length>t;){var r=n.pop();r&&tc(e,r)}pp(e)}function FI(e,t){t&&t!==e.i&&(Ms(e),e.i=t)}function tc(e,t){var n=e.g;t instanceof Zi&&(n=e.j),e=n.get(t),n.delete(t),e&&e.abort()}function gp(e){this.g=e,this.fe=this.xh=null}function s0(e,t,n){var r=new Uint8Array(0);return e.fe=e.g(t,n,function(i){return G(function(o){if(o.h==1)return r.byteLength>0?r=dr(r,i):r=i,e.xh?o.g(e.xh(r),3):o.A(0);r=new Uint8Array(0),o.j()})}),e.fe.promise.catch(function(i){return i instanceof fe&&i.code==7001?Promise.resolve():Promise.reject(i)})}gp.prototype.abort=function(){this.fe&&this.fe.abort()},be("shaka.config.CrossBoundaryStrategy",{KEEP:"keep",RESET:"reset",RESET_TO_ENCRYPTED:"reset_to_encrypted",RESET_ON_ENCRYPTION_CHANGE:"RESET_ON_ENCRYPTION_CHANGE"});function mp(e){var t=vi(e),n=t.split("/")[0];return e=yi(e),{type:n,mimeType:t,codecs:e,language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map,re:null,colorGamut:null,frameRate:null,timescale:null}}function UI(e,t,n){function r(ie){B=ie.name;var ye=ie.reader;ye.skip(24);var ce=ye.Da(),Ee=ye.Da();ye.skip(50),m=String(ce),g=String(Ee),ie.reader.La()&&Wt(ie)}function i(ie){var ye=uy(ie.reader);S=ye.channelCount,A=ye.sampleRate,o(ie.name)}function o(ie){switch(ie=ie.toLowerCase(),ie){case"avc1":case"avc3":a.push(ie+".42E01E"),l=!0;break;case"hev1":case"hvc1":a.push(ie+".1.6.L93.90"),l=!0;break;case"dvh1":case"dvhe":a.push(ie+".05.04"),l=!0;break;case"vp09":a.push(ie+".00.10.08"),l=!0;break;case"av01":a.push(ie+".0.01M.08"),l=!0;break;case"mp4a":s.push("mp4a.40.2"),u=!0;break;case"ac-3":case"ec-3":case"ac-4":case"opus":case"flac":s.push(ie),u=!0;break;case"apac":s.push("apac.31.00"),u=!0}}var s=[],a=[],u=!1,l=!1,h=null,g=null,m=null,S=null,A=null,k=null,b=null,V=null,B;if(new Hn().box("moov",Wt).box("trak",Wt).box("mdia",Wt).S("mdhd",function(ie){ie=Sf(ie.reader,ie.version),h=ie.language,V=ie.timescale}).box("minf",Wt).box("stbl",Wt).S("stsd",ua).box("mp4a",function(ie){var ye=uy(ie.reader);S=ye.channelCount,A=ye.sampleRate,ie.reader.La()?Wt(ie):o(ie.name)}).box("esds",function(ie){ie=ie.reader;for(var ye="mp4a",ce,Ee;ie.La();){ce=ie.Z();for(var Se=ie.Z();Se&128;)Se=ie.Z();if(ce==3)ie.Da(),Se=ie.Z(),Se&128&&ie.Da(),Se&64&&ie.skip(ie.Z()),Se&32&&ie.Da();else if(ce==4)Ee=ie.Z(),ie.skip(12);else if(ce==5)break}Ee&&(ye+="."+Kl(Ee),ce==5&&ie.La()&&(ce=ie.Z(),Ee=(ce&248)>>3,Ee===31&&ie.La()&&(Ee=32+((ce&7)<<3)+((ie.Z()&224)>>5)),ye+="."+Ee)),s.push(ye),u=!0}).box("ac-3",i).box("ec-3",i).box("ac-4",i).box("Opus",i).box("fLaC",i).box("apac",i).box("avc1",r).box("avc3",r).box("hev1",r).box("hvc1",r).box("dva1",r).box("dvav",r).box("dvh1",r).box("dvhe",r).box("vp09",r).box("av01",r).box("avcC",function(ie){var ye=B||"";switch(B){case"dvav":ye="avc3";break;case"dva1":ye="avc1"}ie=ie.reader,ie.skip(1),ie=ye+"."+Kl(ie.Z())+Kl(ie.Z())+Kl(ie.Z()),a.push(ie),l=!0}).box("hvcC",function(ie){var ye=B||"";switch(B){case"dvh1":ye="hvc1";break;case"dvhe":ye="hev1"}var ce=ie.reader;ce.skip(1),ie=ce.Z();var Ee=["","A","B","C"][ie>>6],Se=ie&31,Ve=ce.W(),Le=(ie&32)>>5?"H":"L";ie=[ce.Z(),ce.Z(),ce.Z(),ce.Z(),ce.Z(),ce.Z()],ce=ce.Z();for(var Ce=0,ke=0;ke<32&&(Ce|=Ve&1,ke!=31);ke++)Ce<<=1,Ve>>=1;for(ye=ye+("."+Ee+Se)+("."+Kl(Ce,!0)),ye+="."+Le+ce,Ee="",Se=ie.length;Se--;)((Le=ie[Se])||Ee)&&(Ee="."+Le.toString(16).toUpperCase()+Ee);ye+=Ee,a.push(ye),l=!0}).box("dvcC",function(ie){var ye=B||"";switch(B){case"hvc1":ye="dvh1";break;case"hev1":ye="dvhe";break;case"avc1":ye="dva1";break;case"avc3":ye="dvav";break;case"av01":ye="dav1"}var ce=ie.reader;ce.skip(2),ie=ce.Z(),ce=ce.Z(),a.push(ye+"."+fo(ie>>1&127)+"."+fo(ie<<5&32|ce>>3&31)),l=!0}).box("dvvC",function(ie){var ye=B||"";switch(B){case"hvc1":ye="dvh1";break;case"hev1":ye="dvhe";break;case"avc1":ye="dva1";break;case"avc3":ye="dvav";break;case"av01":ye="dav1"}var ce=ie.reader;ce.skip(2),ie=ce.Z(),ce=ce.Z(),a.push(ye+"."+fo(ie>>1&127)+"."+fo(ie<<5&32|ce>>3&31)),l=!0}).S("vpcC",function(ie){var ye=B||"",ce=ie.reader;ie=ce.Z();var Ee=ce.Z();ce=ce.Z()>>4&15,a.push(ye+"."+fo(ie)+"."+fo(Ee)+"."+fo(ce)),l=!0}).box("av1C",function(ie){var ye=B||"";switch(B){case"dav1":ye="av01"}var ce=ie.reader;ce.skip(1),ie=ce.Z(),ce=ce.Z();var Ee=ie>>>5,Se=(ce&64)>>6;a.push(ye+"."+Ee+"."+fo(ie&31)+(ce>>>7?"H":"M")+"."+fo(Ee===2&&Se?(ce&32)>>5?12:10:Se?10:8)+"."+((ce&16)>>4)+"."+((ce&8)>>3)+((ce&4)>>2)+(ce&3)+"."+fo(1)+"."+fo(1)+"."+fo(1)+".0"),l=!0}).box("enca",hf).box("encv",co).box("sinf",Wt).box("frma",function(ie){ie=$h(ie.reader).codec,o(ie)}).box("colr",function(ie){a=a.map(function(Ee){if(Ee.startsWith("av01.")){var Se=ie.reader,Ve=Se.Qa(),Le=Se.Mb(4,!1),Ce=String.fromCharCode(Le[0]);if(Ce+=String.fromCharCode(Le[1]),Ce+=String.fromCharCode(Le[2]),Ce+=String.fromCharCode(Le[3]),Ce==="nclx"){Le=Se.Da(),Ce=Se.Da();var ke=Se.Da(),Ge=Se.Z()>>7,Je=Ee.split(".");Je.length==10&&(Je[6]=fo(Le),Je[7]=fo(Ce),Je[8]=fo(ke),Je[9]=String(Ge),Ee=Je.join("."))}Se.seek(Ve)}return Ee});var ye=BA(ie.reader),ce=ye.colorGamut;k=ye.re,b=ce}).parse(e||t,!0,!0),!s.length&&!a.length)return null;var Z=u&&!l,ae=new Map;if(l&&!n){n=new gi("video/mp4"),e&&n.init(e);try{Qs(n,t);for(var pe=d(n.g.getStreams()),te=pe.next();!te.done;te=pe.next()){var le=te.value;ae.set(le,le)}}catch{}n.g.clear()}return{type:Z?"audio":"video",mimeType:Z?"audio/mp4":"video/mp4",codecs:vp(s.concat(a)).join(", "),language:h,height:g,width:m,channelCount:S,sampleRate:A,closedCaptions:ae,re:k,colorGamut:b,frameRate:null,timescale:V}}function vp(e){var t=new Set,n=[];e=d(e);for(var r=e.next();!r.done;r=e.next()){r=r.value;var i=Us(r);t.has(i)||(n.push(r),t.add(i))}return t=$s("audio",n),r=$s("video",n),e=$s(Bt,n),r=BI(r),t=t.concat(r).concat(e),n.length&&!t.length?n:t}function BI(e){if(e.length<=1)return e;var t=e.find(function(n){return n.startsWith("dvav.")||n.startsWith("dva1.")||n.startsWith("dvh1.")||n.startsWith("dvhe.")||n.startsWith("dav1.")||n.startsWith("dvc1.")||n.startsWith("dvi1.")});return t?Ni('video/mp4; codecs="'+t+'"')?[t]:e.filter(function(n){return n!=t}):e}function VI(e){var t=null;return new Hn().box("moov",Wt).box("trak",Wt).box("mdia",Wt).box("minf",Wt).box("stbl",Wt).S("stsd",ua).box("encv",co).box("enca",hf).box("sinf",Wt).box("schi",Wt).S("tenc",function(n){n=n.reader,n.Z(),n.Z(),n.Z(),n.Z(),n=n.Mb(16,!1),t=wo(n)}).parse(e,!0),t}function yp(e,t,n){var r,i,o,s,a;return G(function(u){if(u.h==1)return r=t,r.cryptoKey?u.A(2):u.g(r.fetchKey(),3);if(i=r.iv,!i)for(i=xt(new ArrayBuffer(16)),o=r.firstMediaSequenceNumber+n,s=i.byteLength-1;s>=0;s--)i[s]=o&255,o>>=8;return t.blockCipherMode=="CBC"?a={name:"AES-CBC",iv:i}:a={name:"AES-CTR",counter:i,length:64},u.return(R.crypto.subtle.decrypt(a,r.cryptoKey,e))})}function qu(e,t,n){var r,i,o,s,a,u,l;return G(function(h){switch(h.h){case 1:return r=el(e),(i=_I.get(r))?h.return(i):(o=0,s=jr([e],n),h.m(2),s.method="HEAD",h.g(t.request(o,s).promise,4));case 4:a=h.i,i=a.headers["content-type"],h.o(3);break;case 2:if(u=h.l(),!u||u.code!=1002&&u.code!=1001){h.A(3);break}return s.method="GET",h.g(t.request(o,s).promise,6);case 6:l=h.i,i=l.headers["content-type"];case 3:return h.return(i?i.toLowerCase().split(";").shift():"")}})}function el(e){for(var t=e.length,n=t-1;n>=0;n--){var r=e.charCodeAt(n);if(r===46){if(n+1<t)return e.slice(n+1,t).toLowerCase();break}if(r===47)break;(r===63||r===35)&&(t=n)}return""}function nc(e,t,n,r,i){return e=jr(e,r,i),(t!=0||n!=null)&&(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}var _I=new Map().set("mp4","video/mp4").set("m4v","video/mp4").set("m4a","audio/mp4").set("webm","video/webm").set("weba","audio/webm").set("mkv","video/webm").set("ts","video/mp2t").set("ogv","video/ogg").set("ogg","audio/ogg").set("mpg","video/mpeg").set("mpeg","video/mpeg").set("mov","video/quicktime").set("m3u8","application/x-mpegurl").set("mpd","application/dash+xml").set("ism","application/vnd.ms-sstr+xml").set("mp3","audio/mpeg").set("aac","audio/aac").set("flac","audio/flac").set("wav","audio/wav").set("sbv","text/x-subviewer").set("srt","text/srt").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml").set("lrc","application/x-subtitle-lrc").set("ssa","text/x-ssa").set("ass","text/x-ssa").set("jpeg","image/jpeg").set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif").set("html","text/html").set("htm","text/html");function a0(e,t){var n=this;this.g=t,this.j=e,this.i=null,this.M=new Map,this.C=1,this.B=this.o=null,this.V=0,this.h=new Map,this.N=!1,this.X=null,this.D=!1,this.l=new Bu(function(){return HI(n)}),this.P=Date.now()/1e3,this.m=new Map,this.T={projection:null,hfov:null},this.ba=0,this.$=1/0,this.H=null,this.O=[],this.u=new Yt(function(){if(n.j&&n.g)if(n.j.presentationTimeline.U()){var r=n.j.presentationTimeline.Tb(),i=n.j.presentationTimeline.Cb();i-r>1?SI(n.g.Y,r,i):ip(n.g.Y)}else ip(n.g.Y),n.u&&n.u.stop();else n.u&&n.u.stop()}),this.I=null,this.J=!1,this.K=new Yt(function(){var r=n.g.video;!r.ended&&n.I&&(n.J=!0,r.currentTime=n.I,n.I=null)}),this.G=new Et}f=a0.prototype,f.destroy=function(){return this.l.destroy()};function HI(e){var t,n,r,i,o,s,a;return G(function(u){if(u.h==1){for(e.u&&e.u.stop(),e.u=null,e.K&&e.K.stop(),e.K=null,e.G&&(e.G.release(),e.G=null),t=[],n=d(e.h.values()),r=n.next();!r.done;r=n.next())i=r.value,Vs(i),t.push(Bf(i)),i.ia&&(Ms(i.ia),i.ia=null);for(o=d(e.m.values()),s=o.next();!s.done;s=o.next())a=s.value,Ms(a);return u.g(Promise.all(t),2)}e.h.clear(),e.m.clear(),e.g=null,e.j=null,e.i=null,e.I=null,u.j()})}f.configure=function(e){if(this.i=e,this.X=new bv({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor},!0),e.disableAudioPrefetch){var t=this.h.get("audio");t&&t.ia&&(Ms(t.ia),t.ia=null),t=d(this.m.keys());for(var n=t.next();!n.done;n=t.next())n=n.value,Ms(this.m.get(n)),this.m.delete(n)}for(e.disableTextPrefetch&&(t=this.h.get(Bt))&&t.ia&&(Ms(t.ia),t.ia=null),e.disableVideoPrefetch&&(t=this.h.get("video"))&&t.ia&&(Ms(t.ia),t.ia=null),t=d(this.h.keys()),n=t.next();!n.done;n=t.next())n=this.h.get(n.value),n.ia?(o0(n.ia,e.segmentPrefetchLimit),e.segmentPrefetchLimit>0||(Ms(n.ia),n.ia=null)):e.segmentPrefetchLimit>0&&(n.ia=Tp(this,n.stream));e.disableAudioPrefetch||YI(this)};function GI(e,t,n){e.j.presentationTimeline.U()||(e.ba=t,e.$=n)}f.start=function(e){var t=this;return G(function(n){if(n.h==1)return n.g(XI(t,e||new Map),2);qn(t.l),t.N=!0,n.j()})};function KI(e,t){var n,r,i,o,s,a;G(function(u){switch(u.h){case 1:return n=mr,e.V++,r=e.V,u.m(2),u.g(ky(e.g.Y,n.Oa),4);case 4:u.o(3);break;case 2:i=u.l(),e.g&&e.g.onError(i);case 3:o=ar(t.mimeType,t.codecs),Cf(e.g.Y,o,e.j.sequenceMode,t.external),s=e.g.Y.ba,(s.isTextVisible()||e.i.alwaysStreamText)&&e.V==r&&(a=Lf(e,t),e.h.set(n.Oa,a),Ti(e,a,0)),u.j()}})}function WI(e){var t=e.h.get(Bt);t&&(Vs(t),Bf(t).catch(function(){}),e.H=e.h.get(Bt),e.h.delete(Bt),t.stream&&t.stream.closeSegmentIndex&&t.stream.closeSegmentIndex()),e.B=null}function u0(e,t){for(var n=e.g.Ib()<0,r=d(e.h.values()),i=r.next();!i.done;i=r.next())i=i.value,i.sa&&i.sa.Ed(n),i.ia&&i.ia.Ed(n);for(r=d(e.m.values()),i=r.next();!i.done;i=r.next())i.value.Ed(n);(n=e.h.get("video"))&&(r=n.stream)&&(t?(t=r.trickModeVideo)&&!n.Hc&&(tl(e,t,!1,0,!1),n.Hc=r):(t=n.Hc)&&(n.Hc=null,tl(e,t,!0,0,!1)))}function l0(e,t,n,r,i,o){n=n===void 0?!1:n,r=r===void 0?0:r,i=i===void 0?!1:i,o=o===void 0?!1:o,e.o=t,e.N&&(t.video&&tl(e,t.video,n,r,i,o),t.audio&&tl(e,t.audio,n,r,i,o))}function Nf(e,t){G(function(n){if(n.h==1)return e.H=null,e.B=t,e.N?t.segmentIndex?n.A(2):n.g(t.createSegmentIndex(),2):n.return();tl(e,t,!0,0,!1),n.j()})}function zI(e){var t=e.h.get(Bt);t&&tl(e,t.stream,!0,0,!0)}function $I(e,t){for(var n=d(e.M.entries()),r=n.next();!r.done;r=n.next()){var i=d(r.value);r=i.next().value,i=i.next().value,r.includes(t.type)&&(i(),e.M.delete(r))}}function tl(e,t,n,r,i,o){var s=e.h.get(t.type);s||t.type!=Bt?s&&(s.Hc&&(t.trickModeVideo?(s.Hc=t,t=t.trickModeVideo):s.Hc=null),s.stream!=t||i)&&(e.m.has(t)?s.ia=e.m.get(t):s.ia&&FI(s.ia,t),t.type==Bt&&s.stream!=t&&(i=ar(t.mimeType,t.codecs),Cf(e.g.Y,i,e.j.sequenceMode,t.external)),!e.m.has(s.stream)&&s.stream.closeSegmentIndex&&(s.Ja?(i="("+s.type+":"+s.stream.id+")",e.M.has(i)||e.M.set(i,s.stream.closeSegmentIndex)):s.stream.closeSegmentIndex()),i=s.stream.isAudioMuxedInVideo!=t.isAudioMuxedInVideo,s.stream=t,s.sa=null,s.$f=!!o,t.dependencyStream?s.Ac=Lf(e,t.dependencyStream):s.Ac=null,h0(e),i&&(s.jb=null,s.lc=null,s.kc=null,t.isAudioMuxedInVideo&&(t=null,s.type==="video"?t=e.h.get("audio"):s.type==="audio"&&(t=e.h.get("video")),t&&(Bf(t).catch(function(){}),t.jb=null,t.lc=null,t.kc=null,Sp(e,t),c0(e,t).catch(function(a){e.g&&e.g.onError(a)})))),n?s.Pb?s.Hd=!0:s.Ja?(s.Nb=!0,s.cd=r,s.Hd=!0):(Vs(s),wp(e,s,!0,r).catch(function(a){e.g&&e.g.onError(a)})):s.Ja||s.kb||Ti(e,s,0),c0(e,s).catch(function(a){e.g&&e.g.onError(a)})):KI(e,t)}function c0(e,t){var n,r,i;return G(function(o){if(o.h==1)return t.Va?(n=t.stream,r=t.Va,n.segmentIndex?o.A(2):o.g(n.createSegmentIndex(),2)):o.return();if(o.h!=4)return i=n.dependencyStream,!i||i.segmentIndex?o.A(4):o.g(i.createSegmentIndex(),4);if(t.Va!=r||t.stream!=n)return o.return();var s=e.g.Sb(),a=Na(e.g.Y,t.type),u=t.stream.segmentIndex.find(t.Fa?t.Fa.endTime:s),l=u==null?null:t.stream.segmentIndex.get(u);u=l?Xh(l):null,l&&!u&&(u=(l.endTime-l.getStartTime())*(t.stream.bandwidth||e.o.bandwidth)/8),u?((l=l.ea)&&(u+=(l.endByte?l.endByte+1-l.startByte:null)||0),l=e.g.getBandwidthEstimate(),s=u*8/l<(a||0)-s-e.i.rebufferingGoal||t.Va.h.g>u):s=!0,s&&t.Va.abort(),o.j()})}f.Tc=function(){if(this.g){for(var e=this.g.Sb(),t=d(this.h.keys()),n=t.next();!n.done;n=t.next()){var r=n.value;n=this.h.get(r);var i;if((i=!this.J)&&(i=this.g.Y,r==Bt?(i=i.h,i=i.g==null||i.h==null?!1:e>=i.g&&e<i.h):(i=Yu(i,r),i=Yh(i,e)),i=!i),i){if(this.P=0,n.ia&&(n.ia.h=null),n.type==="audio"){i=d(this.m.values());for(var o=i.next();!o.done;o=i.next())o.value.h=null}n.sa=null,(Na(this.g.Y,r)!=null||n.Ja)&&Sp(this,n),n.Va&&(n.Va.abort(),n.Va=null),r===Bt&&(r=this.g.Y,r.K&&r.K.g.clear()),n.Tc=!0}!this.J||n.Pb||n.Ja||n.kb||Ti(this,n,0)}ic(this)&&Cp(this)}};function Sp(e,t){t.Pb||t.Nb||(t.Ja?(t.Nb=!0,t.cd=0):rp(e.g.Y,t.type)==null?t.kb==null&&Ti(e,t,0):(Vs(t),wp(e,t,!1,0).catch(function(n){e.g&&e.g.onError(n)})))}function XI(e,t){var n,r,i,o,s,a,u,l;return G(function(h){if(h.h==1){if(!e.o)throw new fe(2,5,5006);return n=_f(e,!0),r=e.g.Y,h.g(r.init(n,e.j.sequenceMode,e.j.type,e.j.ignoreManifestTimestampsInSegmentsMode),2)}for(qn(e.l),e.updateDuration(),i=d(n.keys()),o=i.next();!o.done;o=i.next())s=o.value,a=n.get(s),e.h.has(s)||(u=Lf(e,a),t.has(a.id)&&(l=t.get(a.id),jI(l,function(g,m,S){return Uf(g,m,S||null,e.i.retryParameters,e.g.nc)}),u.ia=l),e.h.set(s,u),Ti(e,u,0));h0(e),h.j()})}function Lf(e,t){var n={stream:t,type:t.type,sa:null,ia:Tp(e,t),Fa:null,jb:null,kf:null,lc:null,kc:null,hf:null,jf:null,Hc:null,endOfStream:!1,Ja:!1,kb:null,Nb:!1,cd:0,Hd:!1,Pb:!1,Tc:!0,$f:!1,bh:!1,od:!1,Va:null,Ac:null};return t.dependencyStream&&(n.Ac=Lf(e,t.dependencyStream)),n}function Tp(e,t){if(t.type==="video"&&e.i.disableVideoPrefetch||t.type==="audio"&&e.i.disableAudioPrefetch||t.type===Bt&&(t.mimeType=="application/cea-608"||t.mimeType=="application/cea-708")||t.type===Bt&&e.i.disableTextPrefetch)return null;if(e.m.has(t))return e.m.get(t);var n=e.h.get(t.type);return(n=n&&n.ia)&&t===n.i?n:e.i.segmentPrefetchLimit>0?new Df(e.i.segmentPrefetchLimit,t,function(r,i,o){return Uf(r,i,o||null,e.i.retryParameters,e.g.nc)},e.g.Ib()<0,e.g.cl):null}function YI(e){for(var t=e.i.segmentPrefetchLimit,n=e.i.prefetchAudioLanguages,r=d(e.j.variants),i=r.next(),o={};!i.done;o={Gb:void 0},i=r.next())if(o.Gb=i.value,o.Gb.audio)if(e.m.has(o.Gb.audio)){if(i=e.m.get(o.Gb.audio),o0(i,t),!(t>0&&n.some(function(a){return function(u){return ka(a.Gb.audio.language,u)}}(o)))){var s=e.h.get(o.Gb.audio.type);i!==(s&&s.ia)&&Ms(i),e.m.delete(o.Gb.audio)}}else t<=0||!n.some(function(a){return function(u){return ka(a.Gb.audio.language,u)}}(o))||!(i=Tp(e,o.Gb.audio))||(o.Gb.audio.segmentIndex||o.Gb.audio.createSegmentIndex(),e.m.set(o.Gb.audio,i))}f.updateDuration=function(){var e=ay(),t=this.j.presentationTimeline.getDuration();t<1/0?(e&&(this.u&&this.u.stop(),ip(this.g.Y)),this.g.Y.ub(t)):e?(this.u&&this.u.Ea(.5),this.g.Y.ub(1/0)):this.g.Y.ub(4294967296)};function JI(e,t){var n,r,i,o,s,a,u,l,h;return G(function(g){switch(g.h){case 1:if(qn(e.l),n=mr,t.Ja||t.kb==null||t.Pb)return g.return();if(t.kb=null,!t.Nb){g.A(2);break}return g.g(wp(e,t,t.Hd,t.cd),3);case 3:return g.return();case 2:if($I(e,t),t.stream.segmentIndex){g.A(4);break}return r=t.stream,g.m(5),g.g(t.stream.createSegmentIndex(),7);case 7:g.o(6);break;case 5:return i=g.l(),g.g(Ap(e,t,i),8);case 8:return g.return();case 6:if(r!=t.stream)return r.closeSegmentIndex&&r.closeSegmentIndex(),t.Ja||t.kb||Ti(e,t,0),g.return();case 4:if(!t.Ac){g.A(9);break}if(t.Ac.stream.segmentIndex){g.A(9);break}return g.m(11),g.g(t.Ac.stream.createSegmentIndex(),13);case 13:g.o(9);break;case 11:g.l();case 9:g.m(14),o=QI(e,t),o!=null&&(Ti(e,t,o),t.od=!1),g.o(15);break;case 14:return s=g.l(),g.g(Ap(e,t,s),16);case 16:return g.return();case 15:if(t.type===n.Oa)return g.return();if(a=[],t.stream&&!t.stream.isAudioMuxedInVideo&&a.push(t),u=t.type===n.aa?n.wa:n.aa,(l=e.h.get(u))&&l.stream&&!l.stream.isAudioMuxedInVideo&&a.push(l),!e.N||!a.every(function(m){return m.endOfStream})){g.A(0);break}return g.g(e.g.Y.endOfStream(),18);case 18:qn(e.l),h=e.g.Y.getDuration(),h!=0&&h<e.j.presentationTimeline.getDuration()&&e.j.presentationTimeline.ub(h),g.j()}})}function QI(e,t){if(xp(t))return vI(e.g.Y,t.stream.originalId||""),null;if(t.type==Bt&&yI(e.g.Y),t.stream.isAudioMuxedInVideo&&t.type=="audio")return null;if(t.type!=Bt&&Da(e.g.Y))return Vf(e,!0),null;var n=e.i.updateIntervalSeconds/Math.max(1,Math.abs(e.g.Ib()));if(!Py(e.g.Y)&&t.type!=Bt)return n/2;var r=e.g.Sb();if(t.type==="audio")for(var i=d(e.m.keys()),o=i.next();!o.done;o=i.next())o=e.m.get(o.value),o.Ya(r,!0),ec(o,r);i=t.Fa?t.Fa.endTime:r;var s=pI(e.g.Y,t.type,r);o=Math.max(1,Math.max(e.i.rebufferingGoal,e.i.bufferingGoal)*e.C);var a=e.j.presentationTimeline.getDuration()-i,u=Na(e.g.Y,t.type);if(a<1e-6&&u)return t.endOfStream=!0,t.type=="video"&&((n=e.h.get(Bt))&&xp(n)&&(n.endOfStream=!0),(n=e.h.get("audio"))&&n.stream.isAudioMuxedInVideo&&(n.endOfStream=!0)),null;if(t.endOfStream=!1,s>=o)return n/2;if(a=!t.sa,u=jf(e,t,r,u),!u)return e=1/0,(t=t.Fa)&&(e=t.endTime-t.startTime),Math.min(e/2,n);s=t.jb;var l=u.ea;s&&l&&Xl(l,s)&&(s.g=l.g),s=!1,a&&t.$f&&(s=!0,t.$f=!1),a=1/0,l=Array.from(e.h.values()),l=d(l);for(var h=l.next();!h.done;h=l.next())h=h.value,xp(h)||h.stream.isAudioMuxedInVideo||h.sa&&!h.sa.current()||(a=Math.min(a,h.Fa?h.Fa.endTime:r));return i>=a+e.j.presentationTimeline.h?n:(t.ia&&t.sa&&!e.m.has(t.stream)&&(t.ia.Ya(u.startTime+.001),ec(t.ia,u.startTime).catch(function(){})),ic(e)&&nC(e,t,u)||(ZI(e,t,r,u,s).catch(function(){}),t.Ac&&f0(e,t.Ac,r,o)),null)}function jf(e,t,n,r){if(t.sa){var i=t.sa.current();return i&&t.Fa&&(n=t.Fa.endTime,zu(t.Fa.startTime,i.startTime,.002)&&zu(n,i.endTime,.002)&&(i=t.sa.next().value)),i}if(t.Fa||r)return i=t.Fa?t.Fa.endTime:r,n=e.g.Ib()<0,t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Qb(i,!1,n)),t.sa&&t.sa.next().value;r=e.j.sequenceMode||ic(e)?0:e.i.inaccurateManifestTolerance;var o=Math.max(n-r,0),s=e.g.Y.getDuration();for(Math.abs(o-s)<1&&(r=1,o=Math.max(n-r,0)),s=e.g.Ib()<0,e=null,r&&(t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Qb(o,!1,s)),e=t.sa&&t.sa.next().value),e||(t.stream.segmentIndex&&(t.sa=t.stream.segmentIndex.Qb(n,!1,s)),e=t.sa&&t.sa.next().value);((i=e)==null?void 0:i.Vb())===2;)r=n=void 0,e=(r=(n=t.sa)==null?void 0:n.next().value)!=null?r:null;return e}function ZI(e,t,n,r,i){var o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe;return G(function(te){switch(te.h){case 1:if(o=mr,s=t.stream,a=t.sa,t.Ja=!0,te.m(2),r.Vb()==2)throw new fe(1,1,1011);return te.g(eC(e,t,r,i),4);case 4:return qn(e.l),e.D?te.return():(u=s.mimeType=="video/mp4"||s.mimeType=="audio/mp4",l=R.ReadableStream,e.i.lowLatencyMode&&e.j.isLowLatency&&l&&u&&(e.j.type!="HLS"||r.o)?(m=new Uint8Array(0),A=S=!1,b=function(le){var ie,ye,ce;return G(function(Ee){switch(Ee.h){case 1:if(S||(A=!0,qn(e.l),e.D))return Ee.return();if(Ee.m(2),m=dr(m,le),ie=!1,ye=0,new Hn().box("mdat",function(Se){ye=Se.size+Se.start,ie=!0}).parse(m,!1,!0),!ie){Ee.A(4);break}return ce=m.subarray(0,ye),m=m.subarray(ye),Ee.g(Ep(e,t,n,s,r,ce,!0,i),5);case 5:t.ia&&t.sa&&ec(t.ia,r.startTime,!0);case 4:Ee.o(0);break;case 2:k=Ee.l(),Ee.j()}})},te.g(rc(e,t,r,b),9)):(h=rc(e,t,r),te.g(h,7)));case 7:return g=te.i,qn(e.l),e.D?te.return():(qn(e.l),t.Nb?(t.Ja=!1,Ti(e,t,0),te.return()):te.g(Ep(e,t,n,s,r,g,!1,i),6));case 9:if(V=te.i,k)throw k;if(A){te.A(10);break}return S=!0,qn(e.l),e.D?te.return():t.Nb?(t.Ja=!1,Ti(e,t,0),te.return()):te.g(Ep(e,t,n,s,r,V,!1,i),10);case 10:t.ia&&t.sa&&ec(t.ia,r.startTime,!0);case 6:if(qn(e.l),e.D)return te.return();t.Fa=r,a.next(),t.Ja=!1,t.bh=!1,B=e.g.Y.Bc(),Z=B[t.type],JSON.stringify(Z),t.Nb||(ae=null,t.type===o.wa?ae=e.h.get(o.aa):t.type===o.aa&&(ae=e.h.get(o.wa)),ae&&ae.type==o.aa?e.g.td(r,t.stream,ae.stream.isAudioMuxedInVideo,!1):e.g.td(r,t.stream,t.stream.codecs.includes(","),!1)),Vs(t),Ti(e,t,0),te.o(0);break;case 2:if(pe=te.l(),qn(e.l,pe),e.D)return te.return();if(t.Ja=!1,pe.code==7001)t.Ja=!1,Vs(t),Ti(e,t,0),te.A(0);else if(t.type==o.Oa&&e.i.ignoreTextStreamFailures)e.h.delete(o.Oa),te.A(0);else return pe.code==3017?te.g(qI(e,t,pe),0):(t.od=!0,pe.category==1&&t.ia&&tc(t.ia,r),pe.severity=2,te.g(Ap(e,t,pe),0))}})}function f0(e,t,n,r){var i,o,s,a,u,l,h,g,m,S,A,k,b;return G(function(V){switch(V.h){case 1:for(i=mr,o=t.stream,u=(a=(s=o.segmentIndex)&&s.Qb(n))&&a.next().value;u&&e.O.includes(u.startTime);)u=a&&a.next().value;if(!u){V.A(0);break}if(l=u.ea,!l||Xl(l,t.jb)){V.A(3);break}return t.jb=l,V.m(4),V.g(rc(e,t,l),6);case 6:if(h=V.i,!e.g)return V.return();var B=e.g.Y;B.C&&Ds(B.C,h,0,o),e.O=[],V.o(3);break;case 4:throw g=V.l(),t.jb=null,g;case 3:if(t.Fa&&t.Fa==u){V.A(0);break}return t.Fa=u,V.m(8),V.g(rc(e,t,u),10);case 10:if(m=V.i,!e.g)return V.return();B=e.g.Y,B.C&&Ds(B.C,m,0,o),e.O.push(u.startTime),V.o(9);break;case 8:throw S=V.l(),t.Fa=null,S;case 9:if(!e.g)return V.return();if(t.Nb||(A=null,t.type===i.wa?A=e.h.get(i.aa):t.type===i.aa&&(A=e.h.get(i.wa)),A&&A.type==i.aa?e.g.td(u,t.stream,A.stream.isAudioMuxedInVideo,!0):e.g.td(u,t.stream,t.stream.codecs.includes(","),!0)),k=Math.max.apply(Math,[0].concat(M(e.O))),b=e.g.Sb(),b+r>k)return V.g(f0(e,t,u.startTime,r),0);V.A(0)}})}function qI(e,t,n){var r,i,o,s,a,u,l;return G(function(h){switch(h.h){case 1:if(r=Array.from(e.h.values()),r.some(function(g){return g!=t&&g.bh})){h.A(2);break}if(e.i.avoidEvictionOnQuotaExceededError)return i=Ip(e,n),e.g.disableStream(t.stream,i)||Ti(e,t,4),h.return();if(o=Math.round(100*e.C),o>20){e.C-=.2,h.A(3);break}if(o>4){e.C-=.04,h.A(3);break}if(s=Ip(e,n),a=e.g.disableStream(t.stream,s),!a){t.od=!0,e.D=!0,e.g.onError(n),h.A(5);break}return e.C=1,u=e.g.Sb(),h.g(Ff(e,t,u),5);case 5:return h.return();case 3:return t.bh=!0,l=e.g.Sb(),h.g(Ff(e,t,l),2);case 2:Ti(e,t,4),h.j()}})}function eC(e,t,n,r){var i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z;return G(function(ae){switch(ae.h){case 1:if(i=mr,o=t.Fa==null,s=[],a=Math.max(0,Math.max(n.appendWindowStart,e.ba)-.1),u=Math.min(n.appendWindowEnd,e.$)+.1,l=n.codecs||t.stream.codecs,h=Us(l),g=vi(n.mimeType||t.stream.mimeType),m=n.timestampOffset,m==t.kf&&a==t.lc&&u==t.kc&&h==t.hf&&g==t.jf){ae.A(2);break}if(S=t.hf&&t.jf&&II(e.g.Y,t.type,g,l,_f(e)),!S){ae.A(3);break}if(A=null,t.type===i.wa?A=e.h.get(i.aa):t.type===i.aa&&(A=e.h.get(i.wa)),!A){ae.A(3);break}return ae.g(Bf(A).catch(function(){}),5);case 5:A.jb=null,A.lc=null,A.kc=null,Sp(e,A);case 3:return ae.g(d0(e,t,m,a,u,n,h,g),2);case 2:return Xl(n.ea,t.jb)||(t.jb=n.ea,n.l&&n.ea&&(k=rc(e,t,n.ea),b=function(){var pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce;return G(function(ke){switch(ke.h){case 1:return ke.m(2),ke.g(k,4);case 4:return pe=ke.i,qn(e.l),te=null,le=new Map,ie={projection:null,hfov:null},t.stream&&(ye=t.stream.videoLayout)&&(ce=ye.split("/"),ce.includes("PROJ-RECT")?ie.projection="rect":ce.includes("PROJ-EQUI")?ie.projection="equi":ce.includes("PROJ-HEQU")?ie.projection="hequ":ce.includes("PROJ-PRIM")?ie.projection="prim":ce.includes("PROJ-AIV")&&(ie.projection="hequ")),Ee=new Hn,Ee.box("moov",Wt).box("trak",Wt).box("mdia",Wt).S("mdhd",function(Ge){te=Sf(Ge.reader,Ge.version).timescale}).S("hdlr",function(Ge){switch(Ge=Ge.reader,Ge.skip(4),Ge=Ge.Mb(4,!1),String.fromCharCode(Ge[0],Ge[1],Ge[2],Ge[3])){case"soun":le.set(i.aa,te);break;case"vide":le.set(i.wa,te)}te=null}),t.type!==i.wa||ie.projection||Ee.box("minf",Wt).box("stbl",Wt).S("stsd",ua).box("encv",co).box("avc1",co).box("avc3",co).box("hev1",co).box("hvc1",co).box("dvav",co).box("dva1",co).box("dvh1",co).box("dvhe",co).box("dvc1",co).box("dvi1",co).box("vexu",Wt).box("proj",Wt).S("prji",function(Ge){Ge=Ge.reader.xd(),ie.projection=Ge}).box("hfov",function(Ge){Ge=Ge.reader.W()/1e3,ie.hfov=Ge}),Ee.parse(pe,!0,!0),t.type===i.wa&&tC(e,ie),le.has(t.type)?n.ea.timescale=le.get(t.type):te!=null&&(n.ea.timescale=te),Se=t.stream.segmentIndex,Se instanceof Er&&(Ve=RI(Se,n.startTime)),Le=t.stream.closedCaptions&&t.stream.closedCaptions.size>0,ke.g(e.g.Qh(t.type,pe),5);case 5:return ke.g(Mf(e.g.Y,t.type,pe,null,t.stream,Le,t.Tc,r,!1,!1,Ve),6);case 6:ke.o(0);break;case 2:throw Ce=ke.l(),t.jb=null,Ce}})},V=n.startTime,o&&(B=Na(e.g.Y,t.type),B!=null&&(V=B)),e.g.Dk(V,n.ea),s.push(b()))),Z=t.Fa?t.Fa.i:-1,n.i!=Z&&s.push(Ry(e.g.Y,t.type,n.startTime)),ae.g(Promise.all(s),0)}})}function d0(e,t,n,r,i,o,s,a){var u,l,h,g,m;return G(function(S){switch(S.h){case 1:if(u=mr,l=_f(e),S.m(2),t.lc=r,t.kc=i,s&&(t.hf=s),a&&(t.jf=a),t.kf=n,h=e.j.sequenceMode||e.j.type=="HLS",g=null,t.type===u.wa?g=e.h.get(u.aa):t.type===u.aa&&(g=e.h.get(u.wa)),!(g&&g.stream&&g.stream.isAudioMuxedInVideo)){S.A(4);break}return S.g(by(e.g.Y,g.type,n,r,i,h,g.stream.mimeType,g.stream.codecs,l),4);case 4:return S.g(by(e.g.Y,t.type,n,r,i,h,o.mimeType||t.stream.mimeType,o.codecs||t.stream.codecs,l),6);case 6:S.o(0);break;case 2:throw m=S.l(),t.lc=null,t.kc=null,t.hf=null,t.jf=null,t.kf=null,m}})}function Ep(e,t,n,r,i,o,s,a){s=s===void 0?!1:s,a=a===void 0?!1:a;var u,l,h,g;return G(function(m){switch(m.h){case 1:return u=r.closedCaptions&&r.closedCaptions.size>0,e.i.shouldFixTimestampOffset&&(l=r.mimeType=="video/mp4"||r.mimeType=="audio/mp4",h=null,i.ea&&(h=i.ea.timescale),l&&h&&r.type==="video"&&e.j.type=="DASH"&&new Hn().box("moof",Wt).box("traf",Wt).S("tfdt",function(S){var A,k,b,V,B,Z;return G(function(ae){return A=yf(S.reader,S.version),k=A.baseMediaDecodeTime,k?(b=-k/h,V=Number(t.kf)||0,V<b?(B=t.lc,Z=t.kc,ae.g(d0(e,t,b,B,Z,i),0)):ae.A(0)):ae.return()})}).parse(o,!1,s)),m.g(Ff(e,t,n),2);case 2:return qn(e.l),g=t.Tc,t.Tc=!1,m.g(e.g.Qh(t.type,o),3);case 3:return m.g(Mf(e.g.Y,t.type,o,i,r,u,g,a,s),4);case 4:qn(e.l),m.j()}})}function Ff(e,t,n){var r,i,o,s,a,u,l,h,g;return G(function(m){if(m.h==1)return e.H==t&&(e.H=null),r=t.stream.segmentIndex,r instanceof Er&&(r.Ya(e.j.presentationTimeline.Db()),i=[],bI(r,function(S){i.push(S.Pe())})),o=Math.max(e.i.bufferBehind*e.C,e.j.presentationTimeline.h),s=rp(e.g.Y,t.type),s==null?m.return():(a=n-s,u=e.i.evictionGoal,l=e.j.presentationTimeline.Tb(),h=e.j.presentationTimeline.Cb(),g=a-o,h-l>u&&(g=Math.max(a-o,l-u-s)),g<=u?m.return():m.g(e.g.Y.remove(t.type,s,s+g,i),2));if(m.h!=4)return qn(e.l),e.H?m.g(Ff(e,e.H,n),4):m.A(0);qn(e.l),m.j()})}function xp(e){return e&&e.type==Bt&&(e.stream.mimeType=="application/cea-608"||e.stream.mimeType=="application/cea-708")}function rc(e,t,n,r){var i,o,s,a,u;return G(function(l){switch(l.h){case 1:if(i=n.Ub())return l.return(i);if(o=null,t.ia){var h=t.ia,g=h.g;n instanceof Zi&&(g=h.j),g.has(n)?(h=g.get(n),r&&(h.xh=r),o=h.fe):o=null}return o||(o=Uf(n,t.stream,r||null,e.i.retryParameters,e.g.nc)),s=0,t.sa&&(s=t.sa.h),t.Va=o,l.g(o.promise,2);case 2:if(a=l.i,t.Va=null,u=a.data,!n.aesKey){l.A(3);break}return l.g(yp(u,n.aesKey,s),4);case 4:u=l.i;case 3:return l.return(u)}})}function Uf(e,t,n,r,i,o){o=o===void 0?!1:o;var s=e instanceof kt?e:void 0,a=s?1:0;return e=nc(e.R(),e.startByte,e.endByte,r,n),e.contentType=t.type,i.request(Ho,e,{type:a,stream:t,segment:s,isPreload:o})}function wp(e,t,n,r){var i,o;return G(function(s){if(s.h==1)return t.Nb=!1,t.Hd=!1,t.cd=0,t.Pb=!0,t.Fa=null,t.sa=null,t.ia&&!e.m.has(t.stream)&&Ms(t.ia),r?(i=e.g.Sb(),o=e.g.Y.getDuration(),s.g(e.g.Y.remove(t.type,i+r,o),3)):s.g(ky(e.g.Y,t.type),4);if(s.h!=3)return qn(e.l),n?s.g(e.g.Y.flush(t.type),3):s.A(3);qn(e.l),t.Pb=!1,t.endOfStream=!1,t.Ja||t.kb||Ti(e,t,0),s.j()})}function Ti(e,t,n){var r=t.type;(r!=Bt||e.h.has(r))&&(t.kb=new ia(function(){var i;return G(function(o){if(o.h==1)return o.m(2),o.g(JI(e,t),4);if(o.h!=2)return o.o(0);i=o.l(),e.g&&e.g.onError(i),o.j()})}).ka(n))}function Vs(e){e.kb!=null&&(e.kb.stop(),e.kb=null)}function Bf(e){return G(function(t){return e.Va?t.g(e.Va.abort(),0):t.A(0)})}function Ap(e,t,n){var r,i,o,s,a;return G(function(u){switch(u.h){case 1:return n.code==3024?(t.Ja=!1,Vs(t),Ti(e,t,0),u.return()):u.g(Rv(e.X),2);case 2:if(qn(e.l),n.category===1&&n.code!=1003){if(t.Hc)return u0(e,!1),u.return();r=Ip(e,n),n.handled=e.g.disableStream(t.stream,r),n.handled&&(n.severity=1)}if(n.handled||n.code!=1011){u.A(3);break}for(i=e.g.Sb(),o=Na(e.g.Y,t.type),s=jf(e,t,i,o);((a=s)==null?void 0:a.Vb())===2;)t.Fa=s,s=jf(e,t,i,o);if(!s){u.A(3);break}return u.g(Ry(e.g.Y,t.type,s.startTime),5);case 5:return t.Ja=!1,t.od=!1,Vs(t),Ti(e,t,0),u.return();case 3:(!n.handled||n.code!=1011)&&e.g.onError(n),n.handled||e.i.failureCallback(n),u.j()}})}function Ip(e,t){return e.i.maxDisabledTime===0&&t.code==1011?1:e.i.maxDisabledTime}function Vf(e,t){t=t===void 0?!1:t;var n,r,i,o,s,a;return G(function(u){return u.h==1?(n=Date.now()/1e3,r=e.i.minTimeBetweenRecoveries,!t&&(!e.i.allowMediaSourceRecoveries||n-e.P<r)?u.return(!1):(e.P=n,i=mr,(o=e.h.get(i.aa))&&(Vs(o),o.Va&&(o.Va.abort(),o.Va=null),o.jb=null,o.lc=null,o.kc=null,o.Ja=!1,o.Nb=!1,o.cd=0,o.Hd=!1,o.Pb=!1,o.sa&&o.sa.hh()),(s=e.h.get(i.wa))&&(Vs(s),s.Va&&(s.Va.abort(),s.Va=null),s.jb=null,s.lc=null,s.kc=null,s.Ja=!1,s.Nb=!1,s.cd=0,s.Hd=!1,s.Pb=!1,s.sa&&s.sa.hh()),a=e.g.video.paused,u.g(Ny(e.g.Y,_f(e)),2))):(!s||s.Pb||s.Ja||s.kb||Ti(e,s,0),!o||o.Pb||o.Ja||o.kb||Ti(e,o,0),a||e.g.video.play(),u.return(!0))})}function tC(e,t){if(e.T.projection!=t.projection||e.T.hfov!=t.hfov){if(t.projection!=null||t.hfov!=null){var n=new Map().set("detail",t);n=new yt("spatialvideoinfo",n)}else n=new yt("nospatialvideoinfo");n.cancelable=!0,e.g.onEvent(n),e.T=t}}function ic(e){if(e.i.crossBoundaryStrategy!=="keep")return!0;var t=ct();if(t.wb()){if(!t.If()){for(t=d(e.h.keys()),n=t.next();!n.done;n=t.next())if(n=e.h.get(n.value),n.type!==mr.Oa&&(n=n.stream)&&n.fullMimeTypes&&n.fullMimeTypes.size>1){for(e=new Set,t=d(n.fullMimeTypes),n=t.next();!n.done;n=t.next())e.add(Ma(n.value));return e.size>1}}}else{t=d(e.h.keys());for(var n=t.next();!n.done;n=t.next())if(n=e.h.get(n.value),n.type!==mr.Oa&&(n=n.stream)&&n.fullMimeTypes&&n.fullMimeTypes.size>1)return!0}return!1}function h0(e){e.G.Ra(),ic(e)&&(e.G.F(e.g.video,"waiting",function(){return Cp(e)}),e.G.F(e.g.video,"timeupdate",function(){return Cp(e)}))}function Cp(e){if(ic(e)){e.K.stop();var t=e.g.Sb(),n=e.h.get("video")||e.h.get("audio");n&&(n=n.jb)&&n.g!==null&&(t=n.g-t,t<0||t>1||(e.I=n.g+.1,e.K.ka(t)))}}function nC(e,t,n){if(t.type===Bt)return!1;var r=t.jb;if(!r)return!1;var i=n.ea;if(n=r.g!==i.g,e.i.crossBoundaryStrategy==="reset_to_encrypted"&&(r.encrypted||i.encrypted||(n=!1),r.encrypted&&(e.i.crossBoundaryStrategy="keep")),e.i.crossBoundaryStrategy==="RESET_ON_ENCRYPTION_CHANGE"&&r.encrypted==i.encrypted&&(n=!1),e.i.crossBoundaryStrategy==="keep"&&r.mimeType&&i.mimeType){var o=ri(yi(r.mimeType)),s=ri(yi(r.mimeType));r.mimeType==i.mimeType&&o==s&&(n=!1)}return(e.h.get("video")||e.h.get("audio"))===t&&n&&(e.J||t.Tc)&&(e.J=!1,Vf(e,!0).then(function(){var a=new Map().set("oldEncrypted",r.encrypted).set("newEncrypted",i.encrypted);e.g.onEvent(new yt("boundarycrossed",a))})),n}function _f(e,t){function n(o){if(o.fullMimeTypes&&o.fullMimeTypes.size>1&&e.h.has(o.type)){var s=e.h.get(o.type),a=Na(e.g.Y,s.type),u=e.g.Sb();(s=jf(e,s,u,a))&&s.codecs&&s.mimeType&&(o.codecs=s.codecs,o.mimeType=s.mimeType)}}t=t===void 0?!1:t;var r=new Map,i=e.o.audio;return i&&(n(i),r.set("audio",i)),(i=e.o.video)&&(n(i),r.set("video",i)),t&&e.B&&r.set(Bt,e.B),r}function Hf(){}function Mp(e,t,n,r,i){var o=i in r,s=o?n.constructor==Object&&Object.keys(r).length==0:n.constructor==Object&&Object.keys(n).length==0,a=o||s,u=!0,l;for(l in t){var h=i+"."+l,g=o?r[i]:n[l];a||l in n?t[l]===void 0?g===void 0||a?delete e[l]:e[l]=Hi(g):s?e[l]=t[l]:g.constructor==Object&&t[l]&&t[l].constructor==Object?(e[l]||(e[l]=Hi(g)),h=Mp(e[l],t[l],g,r,h),u=u&&h):typeof t[l]!=typeof g||t[l]==null||typeof t[l]!="function"&&t[l].constructor!=g.constructor?(gn("Invalid config, wrong type for "+h),u=!1):typeof n[l]=="function"&&n[l].length!=t[l].length?(ut("Unexpected number of arguments for "+h),e[l]=t[l]):e[l]=Array.isArray(e[l])?t[l].slice():t[l]:(gn("Invalid config, unrecognized key "+h),u=!1)}return u}function Gf(e,t){for(var n={},r=n,i=0,o=0;i=e.indexOf(".",i),!(i<0);)(i==0||e[i-1]!="\\")&&(o=e.substring(o,i).replace(/\\\./g,"."),r[o]={},r=r[o],o=i+1),i+=1;return r[e.substring(o).replace(/\\\./g,".")]=t,n}function nl(e,t){return e&&t}function p0(e,t){function n(o){for(var s=d(Object.keys(o)),a=s.next();!a.done;a=s.next())if(a=a.value,!(o[a]instanceof HTMLElement))if(i(o[a])&&Object.keys(o[a]).length===0)delete o[a];else{var u=o[a];Array.isArray(u)&&u.length===0||typeof o[a]=="function"?delete o[a]:i(o[a])&&(n(o[a]),Object.keys(o[a]).length===0&&delete o[a])}}function r(o,s){return Object.keys(o).reduce(function(a,u){var l=o[u];return s.hasOwnProperty(u)?l instanceof HTMLElement&&s[u]instanceof HTMLElement?l.isEqualNode(s[u])||(a[u]=l):i(l)&&i(s[u])?(l=r(l,s[u]),(Object.keys(l).length>0||!i(l))&&(a[u]=l)):Array.isArray(l)&&Array.isArray(s[u])?Sn(l,s[u])||(a[u]=l):Number.isNaN(l)&&Number.isNaN(s[u])||l!==s[u]&&(a[u]=l):a[u]=l,a},{})}function i(o){return o&&typeof o=="object"&&!Array.isArray(o)}return e=r(e,t),n(e),e}be("shaka.util.ConfigUtils",Hf),Hf.getDifferenceFromConfigObjects=p0,Hf.convertToConfigObject=Gf,Hf.mergeConfigObjects=Mp,be("shaka.config.RepeatMode",{OFF:0,ALL:1,SINGLE:2});function qi(){}function g0(e){return e=ci(e),new It(e).Ab}function oc(e,t,n){function r(a){gr(o).setUint32(s,a.byteLength,!0),s+=4,o.set(xt(a),s),s+=a.byteLength}if(!n||!n.byteLength)throw new fe(2,6,6015);var i;typeof t=="string"?i=Bi(t,!0):i=t,e=ci(e),e=Bi(e,!0);var o=new Uint8Array(12+e.byteLength+i.byteLength+n.byteLength),s=0;return r(e),r(i),r(n),o}function Pp(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=ci(e).split("skd://").pop(),oc(e,n,t))}function Kf(e,t){e===2&&(e=t.drmInfo)&&Eo(e.keySystem)&&(t.headers["Content-Type"]="application/octet-stream")}be("shaka.drm.FairPlay",qi),qi.commonFairPlayResponse=function(e,t){if(e===2&&(e=t.originalRequest.drmInfo)&&Eo(e.keySystem)){try{var n=Un(t.data)}catch{return}if(e=!1,n=n.trim(),n.substr(0,5)==="<ckc>"&&n.substr(-6)==="</ckc>"&&(n=n.slice(5,-6),e=!0),!e)try{var r=JSON.parse(n);r.ckc&&(n=r.ckc,e=!0),r.CkcMessage&&(n=r.CkcMessage,e=!0),r.License&&(n=r.License,e=!0)}catch{}e&&(t.data=Kr(ki(n)))}},qi.muxFairPlayRequest=function(e,t){Kf(e,t)},qi.expressplayFairPlayRequest=function(e,t){if(e===2){var n=t.drmInfo;n&&Eo(n.keySystem)&&Kf(e,t)}},qi.conaxFairPlayRequest=function(e,t){Kf(e,t)},qi.ezdrmFairPlayRequest=function(e,t){Kf(e,t)},qi.verimatrixFairPlayRequest=function(e,t){e===2&&(e=t.drmInfo)&&Eo(e.keySystem)&&(e=xt(t.body),e=Pi(e),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=Ui("spc="+e))},qi.muxInitDataTransform=function(e,t,n){return Pp(e,t,n)},qi.expressplayInitDataTransform=function(e,t,n){return Pp(e,t,n)},qi.conaxInitDataTransform=function(e,t,n){if(t!=="skd")return e;t=n.serverCertificate,n=ci(e).split("skd://").pop().split("?").shift(),n=R.atob(n);var r=new ArrayBuffer(n.length*2);r=Ji(r);for(var i=0,o=n.length;i<o;i++)r[i]=n.charCodeAt(i);return oc(e,r,t)},qi.ezdrmInitDataTransform=function(e,t,n){return t!=="skd"?e:(t=n.serverCertificate,n=ci(e).split(";").pop(),oc(e,n,t))},qi.verimatrixInitDataTransform=function(e,t,n){return Pp(e,t,n)},qi.initDataTransform=oc,qi.defaultGetContentId=g0,qi.isFairPlaySupported=function(){var e;return G(function(t){return t.h==1?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},t.m(2),t.g(navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):t.h!=2?t.return(!0):(t.l(),t.return(!1))})};function Wf(e,t,n){for(n=n===void 0?!0:n,this.h=e,this.g=new Set([e]),t=t||[],e=d(t),t=e.next();!t.done;t=e.next())this.add(t.value,n)}Wf.prototype.add=function(e,t){var n=this.h;t=t===void 0?!0:t;var r;if(!(r=!!n.audio!=!!e.audio||!!n.video!=!!e.video||n.language!=e.language)&&(r=n.audio&&e.audio)){r=n.audio;var i=e.audio;r=!(!((!r.channelsCount||!i.channelsCount||r.channelsCount>2||i.channelsCount>2)&&r.channelsCount!=i.channelsCount||r.spatialAudio!==i.spatialAudio||t&&!m0(r,i))&&Sn(r.roles,i.roles)&&r.groupId===i.groupId)}return!r&&(r=n.video&&e.video)&&(n=n.video,r=e.video,r=!((!t||m0(n,r))&&Sn(n.roles,r.roles))),r?!1:(this.g.add(e),!0)},Wf.prototype.values=function(){return this.g.values()};function m0(e,t){return e.mimeType!=t.mimeType?!1:(e=e.codecs.split(",").map(function(n){return Us(n)}),t=t.codecs.split(",").map(function(n){return Us(n)}),Sn(e,t))}be("shaka.media.AdaptationSet",Wf);function sc(){this.h=this.g=null}sc.prototype.configure=function(e){this.g=e},sc.prototype.getConfiguration=function(){return this.g},sc.prototype.create=function(e){var t;if(this.g.language){var n=rC(e,this.g.language);n.length&&(t=n)}t||(t=e.filter(function(o){return o.primary}),t=t.length?t:e),e=iC(t,this.g.role),e.length&&(t=e),e=oC(t,this.g.videoRole),e.length&&(t=e),this.g.videoLayout&&(e=cC(t,this.g.videoLayout),e.length&&(t=e)),this.g.hdrLevel&&(e=lC(t,this.g.hdrLevel),e.length&&(t=e));var r=[this.g.channelCount,this.g.preferredAudioChannelCount];if(e=r.filter(function(o,s){return o&&r.indexOf(o)===s}),e.length){for(e=d(e),n=e.next();!n.done;n=e.next())if(n=uC(t,n.value),n.length){t=n;break}}this.g.audioLabel&&(e=sC(t,this.g.audioLabel),e.length&&(t=e)),this.g.videoLabel&&(e=aC(t,this.g.videoLabel),e.length&&(t=e)),e=fC(t,this.g.spatialAudio),e.length&&(t=e);var i=[this.g.audioCodec,this.g.activeAudioCodec].concat(M(this.g.preferredAudioCodecs));if(e=i.filter(function(o,s){return o&&i.indexOf(o)===s}),e.length){for(e=d(e),n=e.next();!n.done;n=e.next())if(n=dC(t,n.value),n.length){t=n;break}}return e=ct(),e=this.g.codecSwitchingStrategy=="smooth"&&e.wb(),this.h=new Wf(t[0],t,!e)},sc.prototype.getLastAdaptationSet=function(){return this.h};function rC(e,t){t=Rn(t);var n=w(t,e.map(function(r){return y(r)}));return n?e.filter(function(r){return n==y(r)}):[]}function iC(e,t){return e.filter(function(n){return n.audio?t?n.audio.roles.includes(t):n.audio.roles.length==0:!1})}function oC(e,t){return e.filter(function(n){return n.video?t?n.video.roles.includes(t):n.video.roles.length==0:!1})}function sC(e,t){return e.filter(function(n){return n.audio&&n.audio.label?n.audio.label.toLowerCase()==t.toLowerCase():!1})}function aC(e,t){return e.filter(function(n){return n.video&&n.video.label?n.video.label.toLowerCase()==t.toLowerCase():!1})}function uC(e,t){return e.filter(function(n){return!(n.audio&&n.audio.channelsCount&&n.audio.channelsCount>t)}).sort(function(n,r){return n.audio||r.audio?n.audio?r.audio?(r.audio.channelsCount||0)-(n.audio.channelsCount||0):1:-1:0})}function lC(e,t){if(t=="AUTO"){var n=e.some(function(r){return!!(r.video&&r.video.hdr&&r.video.hdr=="HLG")});t=ct().ld(n)}return e.filter(function(r){return!(r.video&&r.video.hdr&&r.video.hdr!=t)})}function cC(e,t){return e.filter(function(n){return!(n.video&&n.video.videoLayout&&n.video.videoLayout!=t)})}function fC(e,t){return e.filter(function(n){return!(n.audio&&n.audio.spatialAudio!=t)})}function dC(e,t){return e.filter(function(n){return!(n.audio&&n.audio.codecs!=t)})}function zf(){}function rl(){var e=1/0,t=ct();navigator.connection&&navigator.connection.saveData&&(e=360);var n={retryParameters:as(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(a,u,l){return R.shakaMediaKeysPolyfill==="apple"&&u=="skd"&&(u=l.serverCertificate,l=g0(a),a=oc(a,l,u)),a},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:!1,minHdcpVersion:"",ignoreDuplicateInitData:!0,defaultAudioRobustnessForWidevine:"SW_SECURE_CRYPTO",defaultVideoRobustnessForWidevine:"SW_SECURE_DECODE"},r="reload";t.wb()&&(r="smooth");var i={retryParameters:as(),availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,disableIFrames:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,continueLoadingWhenPaused:!0,ignoreSupplementalCodecs:!1,updatePeriod:-1,ignoreDrmInfo:!1,enableAudioGroups:!0,dash:{clockSyncUri:"",disableXlinkProcessing:!0,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:94ce86fb-07ff-4f43-adb8-93d2fa968ca2":"com.apple.fps","urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c":"com.huawei.wiseplay"},manifestPreprocessor:$f,manifestPreprocessorTXml:Xf,sequenceMode:!1,useStreamOnceInPeriodFlattening:!1,enableFastSwitching:!0},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,ignoreManifestProgramDateTimeForTypes:[],mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',liveSegmentsDelay:3,sequenceMode:t.Xc(),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,disableClosedCaptionsDetection:!1,allowLowLatencyByteRangeOptimization:!0,allowRangeRequestsToGuessMimeType:!1},mss:{manifestPreprocessor:$f,manifestPreprocessorTXml:Xf,sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}},o={trackSelectionCallback:function(a){return G(function(u){return u.return(a)})},downloadSizeCallback:function(a){var u;return G(function(l){return l.h==1?navigator.storage&&navigator.storage.estimate?l.g(navigator.storage.estimate(),3):l.return(!0):(u=l.i,l.return(u.usage+a<u.quota*.95))})},progressCallback:function(a,u){return nl([a,u])},usePersistentLicense:!0,numberOfParallelDownloads:5},s={drm:n,manifest:i,streaming:{retryParameters:as(),failureCallback:function(a){return nl([a])},rebufferingGoal:0,bufferingGoal:10,bufferBehind:30,evictionGoal:1,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapPadding:0,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,safeSeekEndOffset:0,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsForFairPlay:!0,inaccurateManifestTolerance:2,lowLatencyMode:!0,preferNativeDash:!1,preferNativeHls:!1,updateIntervalSeconds:1,observeQualityChanges:!1,maxDisabledTime:30,segmentPrefetchLimit:1,prefetchAudioLanguages:[],disableAudioPrefetch:!1,disableTextPrefetch:!1,disableVideoPrefetch:!1,liveSync:{enabled:!1,targetLatency:.5,targetLatencyTolerance:.5,maxPlaybackRate:1.1,minPlaybackRate:.95,panicMode:!1,panicThreshold:60,dynamicTargetLatency:{enabled:!1,stabilityThreshold:60,rebufferIncrement:.5,maxAttempts:10,maxLatency:4,minLatency:1}},allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5,vodDynamicPlaybackRate:!1,vodDynamicPlaybackRateLowBufferRate:.95,vodDynamicPlaybackRateBufferRatio:.5,preloadNextUrlWindow:30,loadTimeout:30,clearDecodingCache:!1,dontChooseCodecs:!1,shouldFixTimestampOffset:!1,avoidEvictionOnQuotaExceededError:!1,crossBoundaryStrategy:"keep",returnToEndOfLiveWindowWhenOutside:!1},networking:{forceHTTP:!1,forceHTTPS:!1,minBytesForProgressEvents:16e3},mediaSource:{codecSwitchingStrategy:r,addExtraFeaturesToSourceBuffer:function(a){return nl([a],"")},forceTransmux:!1,insertFakeEncryptionInInit:!0,correctEc3Enca:!1,modifyCueCallback:function(a,u,l){return nl([a,u,l])},dispatchAllEmsgBoxes:!1,useSourceElements:!0,durationReductionEmitsUpdateEnd:!0},offline:o,abrFactory:function(){return new Tr},adaptationSetCriteriaFactory:function(){return new(Function.prototype.bind.apply(sc,[null].concat(M(we.apply(0,arguments)))))},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0,cacheLoadThreshold:5,minTimeToSwitch:0,preferNetworkInformationBandwidth:!1,removeLatencyFromFirstPacketTime:!1},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredAudioRole:"",preferredVideoRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferredTextFormats:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0,minChannelsCount:0,maxChannelsCount:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayer:{captionsUpdatePeriod:.25,fontScaleFactor:1},textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",rtpSafetyFactor:5,useHeaders:!1,includeKeys:[],version:1,targets:[]},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1,poster:!0},ads:{customPlayheadTracker:!1,skipPlayDetection:!1,supportsMultipleMediaElements:!0,disableHLSInterstitial:!1,disableDASHInterstitial:!1,allowPreloadOnDomElements:!0,allowStartInMiddleOfInterstitial:!0},ignoreHardwareResolution:!1,queue:{preloadNextUrlWindow:1/0,preloadPrevItem:!0,repeatMode:0}};return o.trackSelectionCallback=function(a){return G(function(u){return u.return(hC(a,s.preferredAudioLanguage,s.preferredVideoHdrLevel))})},t.Wa(s)}function v0(){return{streaming:{inaccurateManifestTolerance:0,segmentPrefetchLimit:2,updateIntervalSeconds:.1,maxDisabledTime:1,retryParameters:{baseDelay:100}},manifest:{dash:{autoCorrectDrift:!1},retryParameters:{baseDelay:100}},drm:{retryParameters:{baseDelay:100}}}}function da(e,t,n){var r={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:[],audioRobustness:[],sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:"",headers:{}}};return Mp(e,t,n||rl(),r,"")}function hC(e,t,n){var r=n;r=="AUTO"&&(n=e.some(function(a){return!!(a.hdr&&a.hdr=="HLG")}),r=ct().ld(n));var i=e.filter(function(a){return!(a.type!="variant"||a.hdr&&a.hdr!=r)});n=[];var o=w(t,i.map(function(a){return a.language}));o&&(n=i.filter(function(a){return Rn(a.language)==o})),n.length==0&&(n=i.filter(function(a){return a.primary})),n.length==0&&(i.map(function(a){return a.language}),n=i);var s=n.filter(function(a){return a.height&&a.height<=480});for(s.length&&(s.sort(function(a,u){return u.height-a.height}),n=s.filter(function(a){return a.height==s[0].height})),t=[],n.length&&(i=Math.floor(n.length/2),n.sort(function(a,u){return a.bandwidth-u.bandwidth}),t.push(n[i])),e=d(e),n=e.next();!n.done;n=e.next())n=n.value,n.type!=Bt&&n.type!="image"||t.push(n);return t}function $f(e){return nl([e],e)}function Xf(e){return nl([e],e)}be("shaka.util.PlayerConfiguration",zf),zf.mergeConfigObjects=da,zf.createDefaultForLL=v0,zf.createDefault=rl;function pC(){this.g=null,this.h=[]}function kp(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration),e=d(e.h);for(var r=e.next();!r.done;r=e.next())r=r.value,n+=r.state==t?r.duration:0;return n}function gC(e){function t(o){return{timestamp:o.timestamp,state:o.state,duration:o.duration}}for(var n=[],r=d(e.h),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.g&&n.push(t(e.g)),n}function mC(){this.i=this.h=null,this.g=[]}function bp(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function Yf(){this.C=this.X=NaN,this.l="",this.j=this.ri=this.u=this.B=this.K=this.D=this.o=this.m=this.J=this.G=this.i=this.T=this.V=this.N=this.O=this.P=NaN,this.M=0,this.H=this.I=NaN,this.g=new pC,this.h=new mC}function vC(e,t,n){e.P=t,e.O=n}function y0(e,t,n){e.X=t,e.C=n}function yC(e,t){e.i=isNaN(e.i)?t:Math.max(e.i,t)}function SC(e,t){t>=0&&(e.o=t)}function TC(e,t){t>=0&&(e.D=t)}function EC(e,t){t>=0&&(e.K=t)}function S0(e,t){e.j=isNaN(e.j)?t:e.j+t}function xC(e){var t=e.X,n=e.C,r=e.l,i=e.B,o=e.O,s=e.P,a=e.N,u=e.V,l=e.T,h=e.u,g=e.i,m=e.G,S=e.J,A=e.m,k=kp(e.g,"playing"),b=kp(e.g,"paused"),V=kp(e.g,"buffering"),B=e.o,Z=e.D,ae=e.K,pe=e.ri,te=e.j,le=e.M,ie=e.I,ye=e.H,ce=gC(e.g),Ee=[];e=d(e.h.g);for(var Se=e.next();!Se.done;Se=e.next())Se=Se.value,Ee.push({timestamp:Se.timestamp,id:Se.id,type:Se.type,fromAdaptation:Se.fromAdaptation,bandwidth:Se.bandwidth});return{width:t,height:n,currentCodecs:r,streamBandwidth:i,decodedFrames:o,droppedFrames:s,corruptedFrames:a,stallsDetected:u,gapsJumped:l,estimatedBandwidth:h,completionPercent:g,loadLatency:m,manifestTimeSeconds:S,drmTimeSeconds:A,playTime:k,pauseTime:b,bufferingTime:V,licenseTime:B,liveLatency:Z,maxSegmentDuration:ae,manifestSizeBytes:pe,bytesDownloaded:te,nonFatalErrorCount:le,manifestPeriodCount:ie,manifestGapCount:ye,stateHistory:ce,switchHistory:Ee}}function Ko(e,t,n,r){_n.call(this),this.N=e,this.V=t,this.Ba=r.networkingEngine,this.o=n,this.C=null,this.za=0,this.Ka=r.dd,this.G=r.vk,this.Ua=r.wk,this.g=r.config,this.m=this.H=this.h=null,this.oa=!1,this.I=r.Ik,this.ua=!1,this.j=null,this.ba=!1,this.u=null,this.M=new Map,this.ya=!1,this.Ga=r.Hk,this.X=new Yf,this.ma=new zn,this.B=new zn,this.O=null,this.l=!1,this.$=r.mj,this.T=this.i=null,this.P=!1,this.K=[],this.J=[],this.D=!0}P(Ko,_n);function ac(e,t,n){(e=t?e.J:e.K)?e.push(n):n()}function wC(e){if(e.J)for(var t=d(e.J),n=t.next();!n.done;n=t.next())n=n.value,n();e.J=null}function T0(e,t){if(e.O=t,e.P=!0,e.K){t=d(e.K);for(var n=t.next();!n.done;n=t.next())n=n.value,n()}e.K=null}f=Ko.prototype,f.getStartTime=function(){return this.o},f.jd=function(){return this.N},f.Fg=function(){return this.h};function AC(e){return e.ua=!0,e.I}f.getStats=function(){return this.X};function IC(e){return e.ba=!0,e.j}f.Sj=function(){return this.i?mt(this.i):null},f.Rj=function(){return this.T?ur(this.T):null};function CC(e){return e.ya=!0,e.M}f.start=function(){var e=this;(function(){var t;return G(function(n){switch(n.h){case 1:return n.g(Promise.resolve(),2);case 2:return n.m(3),n.g(MC(e),5);case 5:if(ja(e),R.shakaMediaKeysPolyfill==="webkit"){n.A(6);break}return n.g(E0(e),7);case 7:ja(e);case 6:return n.g(kC(e),8);case 8:if(ja(e),!e.$){n.A(9);break}return n.g(bC(e),10);case 10:ja(e);case 9:if(!e.$||!e.j){n.A(11);break}return n.g(MA(e.j),12);case 12:ja(e);case 11:e.B.resolve(),n.o(0);break;case 3:t=n.l(),t instanceof fe&&(t.code==7001||t.code==7003)||e.B.reject(t),n.j()}})})()},f.dispatchEvent=function(e){return this.O?this.O.dispatchEvent(e):_n.prototype.dispatchEvent.call(this,e)},f.onError=function(e){e.severity===2&&(this.B.reject(e),this.destroy());var t=new Map().set("detail",e);t=new yt("error",t),this.dispatchEvent(t),t.defaultPrevented&&(e.handled=!0)};function ja(e){if(e.l)throw new fe(2,7,7003)}function Rp(e,t){e.dispatchEvent(new yt("onstatechange",new Map().set("state",t)))}function MC(e){var t,n,r,i,o,s;return G(function(a){switch(a.h){case 1:if(Rp(e,"manifest-parser"),e.m||(e.H=Aa(e.N,e.V),e.m=e.H(),e.m.configure(e.g.manifest,function(){return e.D})),t=Date.now()/1e3,Rp(e,"manifest"),e.h){a.A(2);break}return a.g(e.m.start(e.N,e.Ua),3);case 3:return e.h=a.i,w0(e.h),a.g(PC(e),2);case 2:return e.ma.resolve(),n=new yt("manifestparsed",void 0),a.g(Promise.resolve(),5);case 5:if(e.dispatchEvent(n),e.h.variants.length==0)throw new fe(2,4,4036);if(w0(e.h),r=ny(e.G,e.h),!r){a.A(6);break}return i=new yt("trackschanged",void 0),a.g(Promise.resolve(),7);case 7:ja(e),e.dispatchEvent(i);case 6:o=Date.now()/1e3,s=o-t,s>=0&&(e.X.J=s),a.j()}})}function E0(e,t){var n,r,i,o;return G(function(s){switch(s.h){case 1:return!e.h||e.j?s.return():(Rp(e,"drm-engine"),e.za=Date.now()/1e3,e.j=e.Ka(),e.G.g=e.j,e.j.configure(e.g.drm,function(){return e.D}),n=ju(e.h.variants),r=!0,e.h&&e.h.presentationTimeline&&(r=e.h.presentationTimeline.U()),s.g(Gv(e.j,n,e.h.offlineSessionIds,r),2));case 2:if(ja(e),!t){s.A(3);break}return s.g(e.j.Ob(t),4);case 4:ja(e);case 3:return s.g(ty(e.G,e.h),5);case 5:if(i=s.i,!i){s.A(0);break}return o=new yt("trackschanged",void 0),s.g(Promise.resolve(),7);case 7:e.dispatchEvent(o),s.j()}})}f.configure=function(e,t){e=Gf(e,t),da(this.g,e)},f.getConfiguration=function(){return Hi(this.g)};function PC(e){return G(function(t){return e.C||(e.C=e.g.adaptationSetCriteriaFactory(),e.C.configure({language:e.g.preferredAudioLanguage,role:e.g.preferredAudioRole,videoRole:e.g.preferredVideoRole,channelCount:0,hdrLevel:e.g.preferredVideoHdrLevel,spatialAudio:e.g.preferSpatialAudio,videoLayout:e.g.preferredVideoLayout,audioLabel:e.g.preferredAudioLabel,videoLabel:e.g.preferredVideoLabel,codecSwitchingStrategy:e.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:e.g.preferredAudioCodecs,preferredAudioChannelCount:e.g.preferredAudioChannelCount})),e.i||!e.h.variants.length||e.h.variants.length!=1&&e.h.type!="HLS"?t.A(0):(e.i=Op(e),e.i?t.g(x0(e.i),0):t.A(0))})}function kC(e){return G(function(t){return t.h==1?!e.i||e.h.variants.includes(e.i)?t.A(0):t.g(RC(e.i),3):(e.i=Op(e),e.i?t.g(x0(e.i),0):t.A(0))})}function bC(e){var t,n,r,i,o;return G(function(s){return!e.i&&(t=Op(e))&&(e.i=t),e.i?(n=e.h.presentationTimeline.U(),r=[],i=e.i,i.video&&r.push(Dp(e,i.video,n)),i.audio&&r.push(Dp(e,i.audio,n)),(o=_e(e.h.textStreams,e.g.preferredTextLanguage,e.g.preferredTextRole,e.g.preferForcedSubs)[0]||null)&&Di(i.audio,o,e.g)&&(r.push(Dp(e,o,n)),e.T=o),s.g(Promise.all(r),0)):s.A(0)})}function Op(e){if(!e.u){var t=e.g.abrFactory;e.u=t(),e.u.configure(e.g.abr)}return t=ju(e.h.variants),t=e.C.create(t),e.u.setVariants(Array.from(t.values())),e.u.chooseVariant(!0)}function Dp(e,t,n){var r,i,o,s,a;return G(function(u){return u.h==1?(r=e.g.streaming.segmentPrefetchLimit||2,i=new Df(r,t,function(l,h,g){return Uf(l,h,g||null,e.g.streaming.retryParameters,e.Ba,e.D)},!1),e.M.set(t.id,i),t.segmentIndex?u.A(2):u.g(t.createSegmentIndex(),2)):(o=typeof e.o=="number"?e.o:0,s=t.segmentIndex.Qb(o),a=null,s&&(a=s.current(),a||(a=s.next().value)),a||(a=Cs(t.segmentIndex)),a?n?a.ea?u.g(r0(i,a.ea),0):u.A(0):u.g(ec(i,a.startTime),0):u.A(0))})}function x0(e){var t,n,r,i;return G(function(o){for(t=[],n=d([e.video,e.audio]),r=n.next();!r.done;r=n.next())(i=r.value)&&!i.segmentIndex&&t.push(i.createSegmentIndex());return t.length>0?o.g(Promise.all(t),0):o.A(0)})}function RC(e){var t,n,r,i;return G(function(o){for(t=[],n=d([e.video,e.audio]),r=n.next();!r.done;r=n.next())(i=r.value)&&i.segmentIndex&&i.closeSegmentIndex&&t.push(i.closeSegmentIndex());return t.length>0?o.g(Promise.all(t),0):o.A(0)})}f.ol=function(){return this.B},f.destroy=function(){var e=this,t,n,r;return G(function(i){if(i.h==1)return e.l=!0,!e.m||e.oa?i.A(2):i.g(e.m.stop(),2);if(i.h!=4)return e.u&&e.u.release(),e.I&&!e.ua&&e.I.release(),!e.j||e.ba?i.A(4):i.g(e.j.destroy(),4);if(e.M.size>0&&!e.ya)for(t=d(e.M.values()),n=t.next();!n.done;n=t.next())r=n.value,Ms(r);i.j()})};function w0(e){function t(n){return n.video&&n.audio||n.video&&n.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}be("shaka.media.PreloadManager",Ko),Ko.prototype.destroy=Ko.prototype.destroy,Ko.prototype.waitForFinish=Ko.prototype.ol,Ko.prototype.getPrefetchedTextTrack=Ko.prototype.Rj,Ko.prototype.getPrefetchedVariantTrack=Ko.prototype.Sj;function Eu(e,t){_n.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{bd:null,$c:il,Nc:function(r,i){return ha(n,"enter",r,i)}},{bd:uc,$c:il,Nc:function(r,i){return ha(n,"enter",r,i)}},{bd:lc,$c:il,Nc:function(r,i){return ha(n,"enter",r,i)}},{bd:il,$c:uc,Nc:function(r,i){return ha(n,"exit",r,i)}},{bd:il,$c:lc,Nc:function(r,i){return ha(n,"exit",r,i)}},{bd:uc,$c:lc,Nc:function(r,i){i?ha(n,"skip",r,i):(ha(n,"enter",r,i),ha(n,"exit",r,i))}},{bd:lc,$c:uc,Nc:function(r,i){return ha(n,"skip",r,i)}}],this.h=new Et,this.h.F(this.i,"regionremove",function(r){n.g.delete(r.region)})}P(Eu,_n),Eu.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,_n.prototype.release.call(this)},Eu.prototype.j=function(e,t){if(!this.l||e!=0){this.l=!1;for(var n=d(this.i.h.values()),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.g.get(r),o=e<r.startTime?uc:e>r.endTime?lc:il;this.g.set(r,o);for(var s=d(this.m),a=s.next();!a.done;a=s.next())a=a.value,a.bd==i&&a.$c==o&&a.Nc(r,t)}}};function ha(e,t,n,r){t=new yt(t,new Map([["region",n],["seeking",r]])),e.dispatchEvent(t)}var uc=1,il=2,lc=3;/*
43
- @license
44
- Copyright 2013 Ali Al Dallal
45
-
46
- Licensed under the MIT license.
47
-
48
- Permission is hereby granted, free of charge, to any person obtaining a copy
49
- of this software and associated documentation files (the "Software"), to deal
50
- in the Software without restriction, including without limitation the rights
51
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52
- copies of the Software, and to permit persons to whom the Software is
53
- furnished to do so, subject to the following conditions:
54
-
55
- The above copyright notice and this permission notice shall be included in
56
- all copies or substantial portions of the Software.
57
-
58
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
59
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
61
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
62
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
63
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
64
- SOFTWARE.
65
- */for(var Fa={ach:"Lwo",ady:"Адыгэбзэ",af:"Afrikaans","af-NA":"Afrikaans (Namibia)","af-ZA":"Afrikaans (South Africa)",ak:"Tɕɥi",ar:"العربية","ar-AR":"العربية","ar-MA":"العربية","ar-SA":"العربية (السعودية)","ay-BO":"Aymar aru",az:"Azərbaycan dili","az-AZ":"Azərbaycan dili","be-BY":"Беларуская",bg:"Български","bg-BG":"Български",bn:"বাংলা","bn-IN":"বাংলা (ভারত)","bn-BD":"বাংলা(বাংলাদেশ)","bs-BA":"Bosanski",ca:"Català","ca-ES":"Català",cak:"Maya Kaqchikel","ck-US":"ᏣᎳᎩ (tsalagi)",cs:"Čeština","cs-CZ":"Čeština",cy:"Cymraeg","cy-GB":"Cymraeg",da:"Dansk","da-DK":"Dansk",de:"Deutsch","de-AT":"Deutsch (Österreich)","de-DE":"Deutsch (Deutschland)","de-CH":"Deutsch (Schweiz)",dsb:"Dolnoserbšćina",el:"Ελληνικά","el-GR":"Ελληνικά",en:"English","en-GB":"English (UK)","en-AU":"English (Australia)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-IN":"English (India)","en-PI":"English (Pirate)","en-UD":"English (Upside Down)","en-US":"English (US)","en-ZA":"English (South Africa)","en@pirate":"English (Pirate)",eo:"Esperanto","eo-EO":"Esperanto",es:"Español","es-AR":"Español (Argentine)","es-419":"Español (Latinoamérica)","es-CL":"Español (Chile)","es-CO":"Español (Colombia)","es-EC":"Español (Ecuador)","es-ES":"Español (España)","es-LA":"Español (Latinoamérica)","es-NI":"Español (Nicaragua)","es-MX":"Español (México)","es-US":"Español (Estados Unidos)","es-VE":"Español (Venezuela)",et:"eesti keel","et-EE":"Eesti (Estonia)",eu:"Euskara","eu-ES":"Euskara",fa:"فارسی","fa-IR":"فارسی","fb-LT":"Leet Speak",ff:"Fulah",fi:"Suomi","fi-FI":"Suomi","fo-FO":"Føroyskt",fr:"Français","fr-CA":"Français (Canada)","fr-FR":"Français (France)","fr-BE":"Français (Belgique)","fr-CH":"Français (Suisse)","fy-NL":"Frysk",ga:"Gaeilge","ga-IE":"Gaeilge (Gaelic)",gl:"Galego","gl-ES":"Galego","gn-PY":"Avañe'ẽ","gu-IN":"ગુજરાતી","gx-GR":"Ἑλληνική ἀρχαία",he:"עברית‏","he-IL":"עברית‏",hi:"हिन्दी","hi-IN":"हिन्दी",hr:"Hrvatski","hr-HR":"Hrvatski",hsb:"Hornjoserbšćina",ht:"Kreyòl",hu:"Magyar","hu-HU":"Magyar","hy-AM":"Հայերեն",id:"Bahasa Indonesia","id-ID":"Bahasa Indonesia",is:"Íslenska","is-IS":"Íslenska (Iceland)",it:"Italiano","it-IT":"Italiano",ja:"日本語","ja-JP":"日本語","jv-ID":"Basa Jawa","ka-GE":"ქართული","kk-KZ":"Қазақша",km:"ភាសាខ្មែរ","km-KH":"ភាសាខ្មែរ",kab:"Taqbaylit",kn:"ಕನ್ನಡ","kn-IN":"ಕನ್ನಡ (India)",ko:"한국어","ko-KR":"한국어 (韩国)",ku:"Kurdî","ku-TR":"Kurdî",la:"Latin","la-VA":"Latin",lb:"Lëtzebuergesch","li-NL":"Lèmbörgs",lt:"Lietuvių","lt-LT":"Lietuvių",lv:"Latviešu","lv-LV":"Latviešu",mai:"मैथिली, মৈথিলী","mg-MG":"Malagasy",mk:"Македонски","mk-MK":"Македонски (Македонски)",ml:"മലയാളം","ml-IN":"മലയാളം","mn-MN":"Монгол",mr:"मराठी","mr-IN":"मराठी",ms:"Bahasa Melayu","ms-MY":"Bahasa Melayu",mt:"Malti","mt-MT":"Malti",my:"ဗမာစကာ",nb:"Norsk (bokmål)","nb-NO":"Norsk (bokmål)",ne:"नेपाली","ne-NP":"नेपाली",nl:"Nederlands","nl-BE":"Nederlands (België)","nl-NL":"Nederlands (Nederland)","nn-NO":"Norsk (nynorsk)",no:"Norsk",oc:"Occitan","or-IN":"ଓଡ଼ିଆ",pa:"ਪੰਜਾਬੀ","pa-IN":"ਪੰਜਾਬੀ (ਭਾਰਤ ਨੂੰ)",pl:"Polski","pl-PL":"Polski","ps-AF":"پښتو",pt:"Português","pt-BR":"Português (Brasil)","pt-PT":"Português (Portugal)","qu-PE":"Qhichwa","rm-CH":"Rumantsch",ro:"Română","ro-RO":"Română",ru:"Русский","ru-RU":"Русский","sa-IN":"संस्कृतम्","se-NO":"Davvisámegiella","si-LK":"පළාත",sk:"Slovenčina","sk-SK":"Slovenčina (Slovakia)",sl:"Slovenščina","sl-SI":"Slovenščina","so-SO":"Soomaaliga",sq:"Shqip","sq-AL":"Shqip",sr:"Српски","sr-RS":"Српски (Serbia)",su:"Basa Sunda",sv:"Svenska","sv-SE":"Svenska",sw:"Kiswahili","sw-KE":"Kiswahili",ta:"தமிழ்","ta-IN":"தமிழ்",te:"తెలుగు","te-IN":"తెలుగు",tg:"забо́ни тоҷикӣ́","tg-TJ":"тоҷикӣ",th:"ภาษาไทย","th-TH":"ภาษาไทย (ประเทศไทย)",tl:"Filipino","tl-PH":"Filipino",tlh:"tlhIngan-Hol",tr:"Türkçe","tr-TR":"Türkçe","tt-RU":"татарча",uk:"Українська","uk-UA":"Українська",ur:"اردو","ur-PK":"اردو",uz:"O'zbek","uz-UZ":"O'zbek",vi:"Tiếng Việt","vi-VN":"Tiếng Việt","xh-ZA":"isiXhosa",yi:"ייִדיש","yi-DE":"ייִדיש (German)",zh:"中文","zh-HANS":"中文简体","zh-HANT":"中文繁體","zh-CN":"中文(中国)","zh-HK":"中文(香港)","zh-SG":"中文(新加坡)","zh-TW":"中文(台灣)","zu-ZA":"isiZulu"},A0=d(Object.keys(Fa)),Np=A0.next();!Np.done;Np=A0.next()){var I0=Np.value;Fa[I0.toLowerCase()]=Fa[I0]}function C0(e,t){if(e.lineBreak)return`
66
- `;if(e.nestedCues.length)return e.nestedCues.map(function(s){return C0(s,e)}).join("");if(!e.payload)return e.payload;var n=[],r=e.fontWeight>=na,i=e.fontStyle==Ca,o=e.textDecoration.includes(xs);return r&&n.push(["b"]),i&&n.push(["i"]),o&&n.push(["u"]),i=e.color,i==""&&t&&(i=t.color),r="",(i=M0(i))&&(r+="."+i),i=e.backgroundColor,i==""&&t&&(i=t.backgroundColor),(t=M0(i))&&(r+=".bg_"+t),r&&n.push(["c",r]),n.reduceRight(function(s,a){var u=d(a);return a=u.next().value,u=u.next().value,"<"+a+(u===void 0?"":u)+">"+s+"</"+a+">"},e.payload)}function M0(e){e=e.toLowerCase();var t=e.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(parseInt(t[1],10)|256).toString(16).slice(1)+(parseInt(t[2],10)|256).toString(16).slice(1)+(parseInt(t[3],10)|256).toString(16).slice(1):e.startsWith("#")&&e.length>7&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function Lp(e,t){var n=[];e=d(P0(e));for(var r=e.next();!r.done;r=e.next())if(r=r.value,r.isContainer)n.push.apply(n,M(Lp(r.nestedCues,r)));else{var i=r.clone();i.nestedCues=[],i.payload=C0(r,t),n.push(i)}return n}function P0(e){var t=[];e=d(e);for(var n=e.next(),r={};!n.done;r={gg:void 0},n=e.next())r.gg=n.value,t.some(function(i){return function(o){return Wn(i.gg,o)}}(r))||t.push(r.gg);return t}function OC(e){function t(r){for(var i=5381,o=r.length;o;)i=i*33^r.charCodeAt(--o);return(i>>>0).toString()}if(e.startTime>=e.endTime)return null;var n=new VTTCue(e.startTime,e.endTime,e.payload);n.id=t(e.startTime.toString())+t(e.endTime.toString())+t(e.payload),n.lineAlign=e.lineAlign,n.positionAlign=e.positionAlign,e.size&&(n.size=e.size);try{n.align=e.textAlign}catch{}return e.textAlign=="center"&&n.align!="center"&&(n.align="middle"),e.writingMode=="vertical-lr"?n.vertical="lr":e.writingMode=="vertical-rl"&&(n.vertical="rl"),e.lineInterpretation==1&&(n.snapToLines=!1),e.line!=null&&(n.line=e.line),e.position!=null&&(n.position=e.position),n}function k0(e,t){var n=Lp(t),r=[];t=e.cues?Array.from(e.cues):[],n=d(n);for(var i=n.next(),o={};!i.done;o={pd:void 0},i=n.next())o.pd=i.value,!t.some(function(s){return function(a){return a.startTime==s.pd.startTime&&a.endTime==s.pd.endTime&&a.text==s.pd.payload}}(o))&&o.pd.payload&&(i=OC(o.pd))&&r.push(i);for(t=r.slice().sort(function(s,a){return s.startTime!=a.startTime?s.startTime-a.startTime:s.endTime!=a.endTime?s.endTime-a.startTime:"line"in VTTCue.prototype?r.indexOf(a)-r.indexOf(s):r.indexOf(s)-r.indexOf(a)}),t=d(t),n=t.next();!n.done;n=t.next())e.addCue(n.value)}function jp(e,t){var n=!1;e.mode==="disabled"&&(n=!0,e.mode="hidden");for(var r=0;r<e.cues.length;){var i=e.cues[r];t(i)?e.removeCue(i):r++}n&&(e.mode="disabled")}function Yr(e){var t=this;this.i=e,this.l=new Et,this.j=null,this.h=new Map,this.g=-1,this.u=!1,this.m=null,this.C=function(){var n;(n=t.m)==null||n.stop(),t.m=null,t.l.Na(t.i,"textchanged",t.o),t.l.Na(t.j.textTracks,"change",t.B),n=d(t.h.values());for(var r=n.next();!r.done;r=n.next())r.value.remove();t.h.clear(),t.g=-1,t.j=null},this.o=function(){var n=new Map,r=t.i.Fc();r=d(r);for(var i=r.next();!i.done;i=r.next()){if(i=i.value,t.h.has(i.id)){var o=t.h.get(i.id);i.active||o.track.mode==="disabled"||(o.track.mode="disabled"),t.h.delete(i.id)}else{var s=o=t.j.ownerDocument.createElement("track"),a=ct();if(a=i.forced&&a.Ia()==="WEBKIT"?"forced":i.kind==="caption"?"captions":"subtitles",s.kind=a,s=o,a=void 0,i.label)a=i.label;else if(i.language)if(i.language in Fa)a=Fa[i.language];else{var u=fu(i.language);u in Fa&&(a=Fa[u]+" ("+i.language+")")}a||(a=i.originalTextId,i.language&&i.language!==i.originalTextId&&(a+=" ("+i.language+")")),s.label=a,i.language?i.language in Fa?o.srclang=i.language:(s=fu(i.language),a=void 0,o.srclang=(a=s)!=null?a:"und"):o.srclang="und",o.src="data:,WEBVTT",o.track.mode="disabled",t.j.appendChild(o)}n.set(i.id,o),i.active&&(t.g=i.id)}for(r=d(t.h.values()),i=r.next();!i.done;i=r.next())i.value.remove();t.g>-1&&(n.has(t.g)?(r=n.get(t.g).track,r.mode==="disabled"&&(r.mode=t.u?"showing":"hidden")):t.g=-1),t.h=n},this.B=function(){if(!t.m){var n=t.j;t.m=new Yt(function(){if(t.m=null,t.j===n){var r=-1,i=!1;if(t.h.has(t.g)){var o=t.h.get(t.g);o.track.mode==="showing"?(r=t.g,i=!0):o.track.mode==="hidden"&&(r=t.g)}if(!i)for(i=d(t.h),o=i.next();!o.done;o=i.next()){var s=d(o.value);if(o=s.next().value,s=s.next().value,s.track.mode==="showing"){r=o;break}else r<0&&s.track.mode==="hidden"&&(r=o)}for(i=d(t.h),o=i.next();!o.done;o=i.next())s=d(o.value),o=s.next().value,s=s.next().value,o!==r&&s.track.mode!=="disabled"&&(s.track.mode="disabled");t.g!==r&&(t.g=r,r>-1&&t.i.nh({id:r})),t.i.rh(r>-1&&t.h.get(r).track.mode==="showing")}}).ka(0)}},this.l.F(e,"loaded",function(){return t.enableTextDisplayer()}),this.enableTextDisplayer()}f=Yr.prototype,f.configure=function(){},f.remove=function(e,t){if(this.i)this.h.has(this.g)&&jp(this.h.get(this.g).track,function(n){return n.startTime<t&&n.endTime>e});else return!1;return!0},f.append=function(e){this.h.has(this.g)&&k0(this.h.get(this.g).track,e)},f.destroy=function(){this.i&&(this.j&&this.C(),this.i=null);var e;(e=this.m)==null||e.stop(),this.m=null;var t;return(t=this.l)==null||t.release(),this.l=null,Promise.resolve()},f.isTextVisible=function(){return this.u},f.setTextVisibility=function(e){if(this.u=e,this.h.has(this.g)){var t=this.h.get(this.g).track;t.mode!=="disabled"&&(e=e?"showing":"hidden",t.mode!==e&&(t.mode=e))}else if(this.i&&this.i.Ud()===3)if(t=Array.from(this.i.We().textTracks).filter(function(r){return["captions","subtitles","forced"].includes(r.kind)}),e){e=null,t=d(t);for(var n=t.next();!n.done;n=t.next())if(n=n.value,n.mode==="showing"){e=null;break}else e||n.mode!=="hidden"||(e=n);e&&(e.mode="showing")}else for(e=d(t),t=e.next();!t.done;t=e.next())t=t.value,t.mode==="showing"&&(t.mode="hidden")},f.setTextLanguage=function(){},f.enableTextDisplayer=function(){!this.j&&this.i&&this.i.Ud()===2&&(this.j=this.i.We(),this.l.Aa(this.i,"unloading",this.C),this.l.F(this.i,"textchanged",this.o),this.l.F(this.j.textTracks,"change",this.B),this.o())},be("shaka.text.NativeTextDisplayer",Yr),Yr.prototype.enableTextDisplayer=Yr.prototype.enableTextDisplayer,Yr.prototype.setTextLanguage=Yr.prototype.setTextLanguage,Yr.prototype.setTextVisibility=Yr.prototype.setTextVisibility,Yr.prototype.isTextVisible=Yr.prototype.isTextVisible,Yr.prototype.destroy=Yr.prototype.destroy,Yr.prototype.append=Yr.prototype.append,Yr.prototype.remove=Yr.prototype.remove,Yr.prototype.configure=Yr.prototype.configure;function Ei(e,t){for(lt("SimpleTextDisplayer","Please migrate to NativeTextDisplayer"),this.h=e,this.i=t,this.g=null,e=d(Array.from(this.h.textTracks)),t=e.next();!t.done;t=e.next())t=t.value,t.kind!=="metadata"&&t.kind!=="chapters"&&(t.mode="disabled",t.label==this.i&&(this.g=t));this.g&&(this.g.mode="hidden")}f=Ei.prototype,f.configure=function(){},f.remove=function(e,t){return this.g?(jp(this.g,function(n){return n.startTime<t&&n.endTime>e}),!0):!1},f.append=function(e){this.g&&k0(this.g,e)},f.destroy=function(){return this.g&&(jp(this.g,function(){return!0}),this.g.mode="disabled"),this.g=this.h=null,Promise.resolve()},f.isTextVisible=function(){return this.g?this.g.mode=="showing":!1},f.setTextVisibility=function(e){e&&!this.g&&b0(this),this.g&&(this.g.mode=e?"showing":"hidden")},f.setTextLanguage=function(){},f.enableTextDisplayer=function(){b0(this)};function b0(e){e.h&&!e.g&&(e.g=e.h.addTextTrack("subtitles",e.i),e.g.mode="hidden")}be("shaka.text.SimpleTextDisplayer",Ei),Ei.prototype.enableTextDisplayer=Ei.prototype.enableTextDisplayer,Ei.prototype.setTextLanguage=Ei.prototype.setTextLanguage,Ei.prototype.setTextVisibility=Ei.prototype.setTextVisibility,Ei.prototype.isTextVisible=Ei.prototype.isTextVisible,Ei.prototype.destroy=Ei.prototype.destroy,Ei.prototype.append=Ei.prototype.append,Ei.prototype.remove=Ei.prototype.remove,Ei.prototype.configure=Ei.prototype.configure;function xi(){}f=xi.prototype,f.configure=function(){},f.remove=function(){},f.append=function(){},f.destroy=function(){},f.isTextVisible=function(){return!1},f.setTextVisibility=function(){},f.setTextLanguage=function(){},f.enableTextDisplayer=function(){},be("shaka.text.StubTextDisplayer",xi),xi.prototype.enableTextDisplayer=xi.prototype.enableTextDisplayer,xi.prototype.setTextLanguage=xi.prototype.setTextLanguage,xi.prototype.setTextVisibility=xi.prototype.setTextVisibility,xi.prototype.isTextVisible=xi.prototype.isTextVisible,xi.prototype.destroy=xi.prototype.destroy,xi.prototype.append=xi.prototype.append,xi.prototype.remove=xi.prototype.remove,xi.prototype.configure=xi.prototype.configure;function wi(e,t){var n=this;this.j=!1,this.h=[],this.m=e,this.l=t,this.C=this.u=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.B=new Yt(function(){n.m.paused||Ua(n)}),cc(this),this.o=new Map,this.i=new Et,this.i.F(document,"fullscreenchange",function(){Ua(n,!0)}),this.i.F(this.m,"seeking",function(){Ua(n,!0)}),this.i.F(this.m,"ratechange",function(){cc(n)}),this.i.F(this.m,"resize",function(){var r=n.m,i=r.videoWidth;r=r.videoHeight,i&&r?n.u=i/r:n.u=null}),this.H=!1,this.D=null,"ResizeObserver"in R&&(this.D=new ResizeObserver(function(){n.H||(n.H=!0,requestAnimationFrame(function(){n.H=!1,n.g&&n.g.parentElement&&n.j&&Ua(n,!0)}))}),this.D.observe(this.l)),this.G=new Map}f=wi.prototype,f.configure=function(e){this.C=e,cc(this),Ua(this,!0)},f.append=function(e){var t=[].concat(M(this.h));e=d(P0(e));for(var n=e.next(),r={};!n.done;r={hg:void 0},n=e.next())r.hg=n.value,t.some(function(i){return function(o){return Wn(o,i.hg)}}(r))||this.h.push(r.hg);this.h.length&&cc(this),Ua(this)},f.destroy=function(){return this.g&&(this.g.parentElement&&this.l.removeChild(this.g),this.g=null,this.j=!1,this.h=[],this.B&&(this.B.stop(),this.B=null),this.o.clear(),this.i&&(this.i.release(),this.i=null),this.D&&(this.D.disconnect(),this.D=null)),Promise.resolve()},f.remove=function(e,t){if(!this.g)return!1;var n=this.h.length;return this.h=this.h.filter(function(r){return r.startTime<e||r.endTime>=t}),Ua(this,n>this.h.length),this.h.length||cc(this),!0},f.isTextVisible=function(){return this.j},f.setTextVisibility=function(e){(this.j=e)?(this.g.parentElement||this.l.appendChild(this.g),Ua(this,!0)):this.g.parentElement&&this.l.removeChild(this.g)},f.setTextLanguage=function(e){e&&e!="und"?this.g.setAttribute("lang",e):this.g.setAttribute("lang","")},f.enableTextDisplayer=function(){};function cc(e){e.B&&(e.h.length?e.B.Ea((e.C?e.C.captionsUpdatePeriod:.25)/Math.max(1,Math.abs(e.m.playbackRate))):e.B.stop())}function DC(e,t){for(;t!=null;){if(t==e.g)return!0;t=t.parentElement}return!1}function R0(e,t,n,r,i){var o=!1,s=[],a=[];t=d(t);for(var u=t.next();!u.done;u=t.next()){u=u.value,i.push(u);var l=e.o.get(u),h=u.startTime<=r&&u.endTime>r,g=l?l.kj:null;l&&(s.push(l.ig),l.Sc&&s.push(l.Sc),h||(o=!0,e.o.delete(u),l=null)),h&&(a.push(u),l?DC(e,g)||(o=!0):(NC(e,u,i),l=e.o.get(u),g=l.kj,o=!0)),u.nestedCues.length>0&&g&&R0(e,u.nestedCues,g,r,i),i.pop()}if(o){for(r=d(s),i=r.next();!i.done;i=r.next())i=i.value,i.parentElement&&i.parentElement.removeChild(i);for(a.sort(function(m,S){return m.startTime!=S.startTime?m.startTime-S.startTime:m.endTime-S.endTime}),a=d(a),r=a.next();!r.done;r=a.next())r=e.o.get(r.value),r.Sc?(r.Sc.contains(n)&&r.Sc.removeChild(n),n.appendChild(r.Sc),r.Sc.appendChild(r.ig)):n.appendChild(r.ig)}}function Ua(e,t){if(e.g){var n=e.m.currentTime;if(!e.j||t!==void 0&&t){t=d(e.G.values());for(var r=t.next();!r.done;r=t.next())Jl(r.value);Jl(e.g),e.o.clear(),e.G.clear()}e.j&&R0(e,e.h,e.g,n,[])}}function NC(e,t,n){var r=n.length>1,i=r?"span":"div";t.lineBreak&&(i="br"),t.rubyTag&&(i=t.rubyTag),r=!r&&t.nestedCues.length>0;var o=document.createElement(i);if(i!="br"&&jC(e,o,t,n,r),n=null,t.region&&t.region.id){var s=t.region,a=e.u===4/3?2.5:1.9;if(n=s.id+"_"+s.width+"x"+s.height+(s.heightUnits==Vr?"%":"px")+"-"+s.viewportAnchorX+"x"+s.viewportAnchorY+(s.viewportAnchorUnits==Vr?"%":"px"),e.G.has(n))n=e.G.get(n);else{i=document.createElement("span");var u=s.heightUnits==Vr?"%":"px",l=s.widthUnits==Vr?"%":"px",h=s.viewportAnchorUnits==Vr?"%":"px";i.id="shaka-text-region---"+n,i.classList.add("shaka-text-region"),i.style.position="absolute";var g=s.height,m=s.width;s.heightUnits===2&&(g=s.height*5.33,u="%"),s.widthUnits===2&&(m=s.width*a,l="%"),i.style.height=g+u,i.style.width=m+l,s.viewportAnchorUnits===2?(a=s.viewportAnchorY/75*100,u=s.viewportAnchorX/(e.u===4/3?160:210)*100,a-=s.regionAnchorY*g/100,u-=s.regionAnchorX*m/100,i.style.top=a+"%",i.style.left=u+"%"):(i.style.top=s.viewportAnchorY-s.regionAnchorY*g/100+h,i.style.left=s.viewportAnchorX-s.regionAnchorX*m/100+h),s.heightUnits!==0&&s.widthUnits!==0&&s.viewportAnchorUnits!==0&&(s=Math.max(0,Math.min(100-(parseInt(i.style.width.slice(0,-1),10)||0),parseInt(i.style.left.slice(0,-1),10)||0)),i.style.top=Math.max(0,Math.min(100-(parseInt(i.style.height.slice(0,-1),10)||0),parseInt(i.style.top.slice(0,-1),10)||0))+"%",i.style.left=s+"%"),i.style.display="flex",i.style.flexDirection="column",i.style.alignItems="center",i.style.justifyContent=t.displayAlign=="before"?"flex-start":t.displayAlign=="center"?"center":"flex-end",e.G.set(n,i),n=i}}i=o,r&&(i=document.createElement("span"),i.classList.add("shaka-text-wrapper"),i.style.backgroundColor=t.backgroundColor,i.style.lineHeight="normal",o.appendChild(i)),e.o.set(t,{ig:o,kj:i,Sc:n})}function LC(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==ni?n:e==="left"||e==="start"&&t===Zn||e==="end"&&t==="rtl"?"line-left":e==="right"||e==="start"&&t==="rtl"||e==="end"&&t===Zn?"line-right":"center"}function jC(e,t,n,r,i){var o=t.style,s=n.nestedCues.length==0,a=r.length>1;o.whiteSpace="pre-wrap";var u=n.payload.replace(/\s+$/g,function(h){return" ".repeat(h.length)});if(o.webkitTextStrokeColor=n.textStrokeColor,o.webkitTextStrokeWidth=n.textStrokeWidth,o.color=n.color,o.direction=n.direction,o.opacity=n.opacity,o.paddingLeft=Fp(n.linePadding,n,e.l),o.paddingRight=Fp(n.linePadding,n,e.l),o.textCombineUpright=n.textCombineUpright,o.textShadow=n.textShadow,n.backgroundImage)o.backgroundImage="url('"+n.backgroundImage+"')",o.backgroundRepeat="no-repeat",o.backgroundSize="contain",o.backgroundPosition="center",n.backgroundColor&&(o.backgroundColor=n.backgroundColor),o.width="100%",o.height="100%";else{if(n.nestedCues.length)var l=t;else l=document.createElement("span"),t.appendChild(l);n.border&&(l.style.border=n.border),i||((t=FC(r,function(h){return h.backgroundColor}))?l.style.backgroundColor=t:u&&(l.style.backgroundColor="rgba(0, 0, 0, 0.8)")),u&&(l.setAttribute("translate","no"),l.textContent=u)}a&&!r[r.length-1].isContainer?o.display="inline":(o.display="flex",o.flexDirection="column",o.alignItems="center",n.textAlign=="left"||n.textAlign=="start"?(o.width="100%",o.alignItems="flex-start"):(n.textAlign=="right"||n.textAlign=="end")&&(o.width="100%",o.alignItems="flex-end"),o.justifyContent=n.displayAlign=="before"?"flex-start":n.displayAlign=="center"?"center":"flex-end"),s||(o.margin="0"),o.fontFamily=n.fontFamily,o.fontWeight=n.fontWeight.toString(),o.fontStyle=n.fontStyle,o.letterSpacing=n.letterSpacing,r=e.C?e.C.fontScaleFactor:1,(r!==1||n.fontSize)&&(o.fontSize=Fp(n.fontSize||"1em",n,e.l,r)),r=n.line,r!=null&&(s=n.lineInterpretation,s==xn&&(s=1,a=16,e.u&&e.u<1&&(a=32),r=r<0?100+r/a*100:r/a*100),s==1&&(o.position="absolute",n.writingMode==sr?(o.width="100%",n.lineAlign==Ar?o.top=r+"%":n.lineAlign=="end"&&(o.bottom=100-r+"%")):n.writingMode=="vertical-lr"?(o.height="100%",n.lineAlign==Ar?o.left=r+"%":n.lineAlign=="end"&&(o.right=100-r+"%")):(o.height="100%",n.lineAlign==Ar?o.right=r+"%":n.lineAlign=="end"&&(o.left=100-r+"%")))),o.lineHeight=n.lineHeight,e=LC(n),e=="line-left"?(o.cssFloat="left",n.position!==null&&(o.position="absolute",n.writingMode==sr?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%")):e=="line-right"?(o.cssFloat="right",n.position!==null&&(o.position="absolute",n.writingMode==sr?(o.right=100-n.position+"%",o.width="auto"):o.bottom=n.position+"%")):n.position!==null&&n.position!=50&&(o.position="absolute",n.writingMode==sr?(o.left=n.position+"%",o.width="auto"):o.top=n.position+"%",n.size&&(o.transform="translateX(-50%)")),o.textAlign=n.textAlign,o.textDecoration=n.textDecoration.join(" "),o.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&o.writingMode==n.writingMode||(o.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==sr?o.width=n.size+"%":o.height=n.size+"%")}function Fp(e,t,n,r){r=r===void 0?1:r;var i=(i=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(i[1]),unit:i[2]}:null;if(!i)return e;switch(e=i.unit,r*=i.value,e){case"%":return r/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*r/t.cellResolution.rows+"px";default:return r+e}}function FC(e,t){for(var n=e.length-1;n>=0;n--){var r=t(e[n]);if(r||r===0)return r}return null}be("shaka.text.UITextDisplayer",wi),wi.prototype.enableTextDisplayer=wi.prototype.enableTextDisplayer,wi.prototype.setTextLanguage=wi.prototype.setTextLanguage,wi.prototype.setTextVisibility=wi.prototype.setTextVisibility,wi.prototype.isTextVisible=wi.prototype.isTextVisible,wi.prototype.remove=wi.prototype.remove,wi.prototype.destroy=wi.prototype.destroy,wi.prototype.append=wi.prototype.append,wi.prototype.configure=wi.prototype.configure;function UC(e,t){function n(o){for(var s=o,a=d(t),u=a.next();!u.done;u=a.next())u=u.value,u.end&&u.start<o&&(s+=u.end-u.start);return o=Math.floor(s/3600),a=Math.floor(s/60%60),u=Math.floor(s%60),s=Math.floor(s*1e3%1e3),(o<10?"0":"")+o+":"+(a<10?"0":"")+a+":"+(u<10?"0":"")+u+"."+(s<100?s<10?"00":"0":"")+s}var r=Lp(e);e=`WEBVTT
67
-
68
- `,r=d(r);for(var i=r.next();!i.done;i=r.next())i=i.value,e+=n(i.startTime)+" --> "+n(i.endTime)+function(o){var s=[];switch(o.textAlign){case"left":s.push("align:left");break;case"right":s.push("align:right");break;case Jt:s.push("align:middle");break;case"start":s.push("align:start");break;case"end":s.push("align:end")}switch(o.writingMode){case"vertical-lr":s.push("vertical:lr");break;case"vertical-rl":s.push("vertical:rl")}return s.length?" "+s.join(" "):""}(i)+`
69
- `,e+=i.payload+`
70
-
71
- `;return e}be("shaka.text.WebVttGenerator",function(){});function Up(e,t){this.g=t,this.j=e,this.m=new Map,this.l=void 0,this.D=!1,this.J=!0,this.u=this.I=!1,this.C=this.B=void 0,this.H=0,this.K={request:!1,response:!1,event:!1},this.o={},this.i=new Et,this.G=[],this.h=null}Up.prototype.setMediaElement=function(e){this.h=e,GC(this)},Up.prototype.configure=function(e){this.g=e,KC(this)};function BC(e){e.m.clear(),e.D=!1,e.J=!0,e.I=!1,e.u=!1,e.B=0,e.C=0,e.H=0,e.K={request:!1,response:!1,event:!1},O0(e),e.o={},e.h=null,e.i.Ra()}function VC(e,t){e.u=t,e.u?e.l==td?e.l=nd:e.l==rd&&(e.l=id):e.l==nd?e.l=td:e.l==id&&(e.l=rd)}function _C(e,t){if(e.g&&e.g.enabled&&(Ai(e,"ps",{Vc:"d"}),e.h&&e.h.autoplay)){var n=e.h.play();n&&n.then(function(){e.H=t}).catch(function(){e.H=0})}}function HC(e,t,n){try{if(!e.g.enabled)return t;var r=Vp(e);e:{switch(n.toLowerCase()){case"audio/mp4":case"audio/webm":case"audio/ogg":case"audio/mpeg":case"audio/aac":case"audio/flac":case"audio/wav":var i=Qf;break e;case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":i=qf;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":case"application/vnd.ms-sstr+xml":i=B0;break e}i=void 0}r.ot=i,r.su=!0;var o=fc(r);return Jf(t,o)}catch(s){return In("CMCD_SRC_ERROR","Could not generate src CMCD data.",s),t}}function GC(e){e.i.F(e.h,"playing",function(){e.C||(e.C=Date.now()),Ai(e,"ps",{Vc:"p"})}),e.i.F(e.h,"volumechange",function(){Ai(e,e.h.muted?"m":"um")}),e.i.F(e.h,"play",function(){e.B||(e.B=Date.now(),Ai(e,"ps",{Vc:"s"}))}),e.i.F(e.h,"pause",function(){Ai(e,"ps",{Vc:"a"})}),e.i.F(e.j,"buffering",function(){Ai(e,"ps",{Vc:"w"})}),e.i.F(e.h,"seeking",function(){return Ai(e,"ps",{Vc:"k"})}),e.i.F(document,"fullscreenchange",function(){Ai(e,document.fullscreenElement?"pe":"pc")});var t=e.h;(t.webkitPresentationMode||t.webkitSupportsFullscreen)&&e.i.F(t,"webkitpresentationmodechanged",function(){t.webkitPresentationMode?Ai(e,t.webkitPresentationMode!=="inline"?"pe":"pc"):t.webkitSupportsFullscreen&&Ai(e,t.webkitDisplayingFullscreen?"pe":"pc")}),e.i.F(e.h,"enterpictureinpicture",function(){Ai(e,"pe")}),e.i.F(e.h,"leavepictureinpicture",function(){Ai(e,"pc")}),"documentPictureInPicture"in R&&e.i.F(R.documentPictureInPicture,"enter",function(n){Ai(e,"pe"),e.i.Aa(n.window,"pagehide",function(){Ai(e,"pc")})}),e.i.F(document,"visibilitychange",function(){document.hidden?Ai(e,"b",{bg:!0}):Ai(e,"b")}),e.i.F(e.j,"complete",function(){Ai(e,"ps",{Vc:"e"})})}function KC(e){O0(e);var t=D0(e);t=d(t);for(var n=t.next();!n.done;n=t.next())if(n=n.value.timeInterval,n===void 0&&(n=r2),n>=1){var r=new Yt(function(){return Ai(e,i2)});r.Ea(n),e.G.push(r)}}function O0(e){if(e.G)for(var t=d(e.G),n=t.next();!n.done;n=t.next())n.value.stop();e.G=[]}function D0(e){return(e=e.g.targets)?e.filter(function(t){return t.mode===K0&&t.enabled}):[]}function Bp(e){return(e=e.g.targets)?e.filter(function(t){return t.mode===G0&&t.enabled===!0}):[]}function Vp(e){return e.g.sessionId||(e.g.sessionId=R.crypto.randomUUID()),{v:e.g.version,sf:e.l,sid:e.g.sessionId,cid:e.g.contentId,mtp:e.j.getBandwidthEstimate()/1e3}}function Ai(e,t,n){if(n=n===void 0?{}:n,t=Object.assign({e:t,ts:Date.now()},n),t=Gp(e,t,K0),n=e.g.targets,!(e.g.version<Wp)&&n){var r=D0(e);n=Array.from(new Set([].concat(M(zp),M(e2)))),r=d(r);for(var i=r.next();!i.done;i=r.next()){i=i.value;var o=_p(i.includeKeys||[],n);o.includes(_0)||o.push(_0),o=Hp(t,o);var s=i.events||[],a=o.e,u=o.sta;a&&(!t2.includes(a)||!(a!=="ps"||u&&n2.includes(u))||s&&s.length>0&&!s.includes(a))||N0(e,o,i)}}}function ol(e,t,n){if(e.g.enabled){n=Gp(e,n,H0);var r=L0({mode:H0,useHeaders:e.g.useHeaders,includeKeys:e.g.includeKeys||[]});e.o[r]||(e.o[r]={request:1,response:1}),n.sn=e.o[r].request++,r=e.g.includeKeys||[];var i=e.g.version==Wp?Array.from(new Set([].concat(M(zp),M(ZC)))):V0;r=_p(r,i),n=Hp(n,r),WC(e,n,t,e.g.useHeaders)}}function N0(e,t,n,r){var i=as(),o=n.url;if(n.useHeaders){if(t=U0(t),!Object.keys(t).length)return;r&&Object.assign(r.headers,t),r=jr([o],i),Object.assign(r.headers,t)}else{if(t=fc(t),!t)return;o=Jf(o,t),r&&(r.uri=o),r=jr([o],i)}e.j.Rb().request(9,r)}function WC(e,t,n,r){if(r){if(t=U0(t),!Object.keys(t).length)return;Object.assign(n.headers,t)}else{var i=fc(t);if(!i)return;n.uris=n.uris.map(function(o){return Jf(o,i)})}Bp(e).length>0||!e.m.has(n)||e.m.delete(n)}function _p(e,t){if(!e||e.length===0)return t;for(var n=d(e),r=n.next();!r.done;r=n.next())t.includes(r.value);return e=e.filter(function(i){return t.includes(i)})}function Hp(e,t){return Object.keys(e).reduce(function(n,r){return t.includes(r)&&(n[r]=e[r]),n},{})}function zC(e){if(e.type===0)return YC;if(e=e.stream){var t=e.type;if(t=="video")return e.codecs&&e.codecs.includes(",")?qf:Zf;if(t=="audio")return Qf;if(t=="text")return e.mimeType==="application/mp4"?ed:Kp}}function L0(e){var t=Object.keys(e).sort().reduce(function(n,r){return r!=="enabled"&&(n[r]=e[r]),n},{});return JSON.stringify(t)}function $C(e,t){if(t=e.j.Bc()[t],!t.length)return NaN;var n=e.h?e.h.currentTime:0;return(e=t.find(function(r){return r.start<=n&&r.end>=n}))?(e.end-n)*1e3:NaN}function j0(e,t){if(t=e.j.Bc()[t],!t.length)return 0;var n=e.h?e.h.currentTime:0;return(e=t.find(function(r){return r.start<=n&&r.end>=n}))?(e.end-n)*1e3:0}function XC(e,t){var n=e.j.jc();if(!n.length)return NaN;e=n[0],n=d(n);for(var r=n.next();!r.done;r=n.next())r=r.value,r.type==="variant"&&r.bandwidth>e.bandwidth&&(e=r);switch(t){case Zf:return e.videoBandwidth||NaN;case Qf:return e.audioBandwidth||NaN;default:return e.bandwidth}}function F0(e,t,n){var r=t.segment,i=0;r&&(i=r.endTime-r.startTime),i={d:i*1e3,st:e.j.U()?QC:JC},i.ot=zC(t);var o=i.ot===Zf||i.ot===Qf||i.ot===qf||i.ot===ed;if(t=t.stream){var s=e.j.Ib();if(o&&(i.bl=$C(e,t.type),i.ot!==ed)){var a=j0(e,t.type);i.dl=s?a/Math.abs(s):a}if(t.bandwidth&&(i.br=t.bandwidth/1e3),t.segmentIndex&&r){if((s=t.segmentIndex.Qb(r.endTime,!0,s<0))&&(s=s.next().value)&&s!=r){if(n&&!Ye(r.R(),s.R())){var u=s.R()[0];a=new URL(u);var l=new URL(n);if(a.origin!==l.origin)n=u;else{n=a.pathname.split("/").slice(1),u=l.pathname.split("/").slice(1,-1),l=Math.min(n.length,u.length);for(var h=0;h<l&&n[h]===u[h];h++)n.shift(),u.shift();for(;u.length;)u.shift(),n.unshift("..");n=n.join("/")+a.search+a.hash}i.nor=n}!s.startByte&&!s.endByte||r.startByte==s.startByte&&r.endByte==s.endByte||(n=s.startByte+"-",s.endByte&&(n+=s.endByte),i.nrr=n)}s=e.j.Ib()||1,n=j0(e,t.type)||500,r=(t=t.bandwidth)?t*(r.endTime-r.startTime)/1e3/(n/s/1e3)*e.g.rtpSafetyFactor:NaN,isNaN(r)||(i.rtp=r)}}return o&&i.ot!==ed&&(i.tb=XC(e,i.ot)/1e3),i}function Gp(e,t,n){Object.assign(t,Vp(e)),t.pr=e.j.Ib();var r=t.ot===Zf||t.ot===qf;return e.I&&r&&(t.bs=!0,t.su=!0,e.I=!1),t.su==null&&(t.su=e.J),e.j.U()&&(r=d1(e.j),t.ltc=r||void 0),document.hidden&&(t.bg=!0),r=e.C&&e.B?e.C-(e.H||e.B):void 0,r==null||e.K[n]||(t.msd=r,e.K[n]=!0),t}function fc(e){function t(g){return n(g/100)*100}function n(g){return Math.round(g)}function r(g){return!Number.isNaN(g)&&g!=null&&g!==""&&g!==!1}var i=[],o={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(g){return encodeURIComponent(g)},rtp:t,tb:n,ttfb:n,ttlb:n},s=Object.keys(e||{}).sort();s=d(s);for(var a=s.next();!a.done;a=s.next()){a=a.value;var u=e[a];if(r(u)&&(a!=="v"||u!==1)&&(a!="pr"||u!==1)){var l=o[a];l&&(u=l(u)),l=typeof u;var h=void 0;h=l==="string"&&a!=="ot"&&a!=="sf"&&a!=="st"?a+"="+JSON.stringify(u):l==="boolean"?a:l==="symbol"?a+"="+u.description:a+"="+u,i.push(h)}}return i.join(",")}function U0(e){var t=Object.keys(e),n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],o={br:0,d:0,ot:0,tb:0,url:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,ltc:1,ttfb:1,ttlb:1,ts:1,rc:1,cmsdd:1,cmsds:1,sn:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,msd:2,bs:3,rtp:3,bg:3};t=d(t);for(var s=t.next();!s.done;s=t.next())s=s.value,i[o[s]!=null?o[s]:1][s]=e[s];for(e=0;e<i.length;e++)(o=fc(i[e]))&&(n["CMCD-"+r[e]]=o);return n}function Jf(e,t){return!t||e.includes("offline:")?e:(e=new It(e),e.g.set("CMCD",t),e.toString())}var B0="m",Qf="a",Zf="v",qf="av",YC="i",Kp="c",ed="tt",Wp=2,JC="v",QC="l",td="d",nd="ld",rd="h",id="lh";be("shaka.util.CmcdManager.StreamingFormat",{DASH:td,Ql:nd,HLS:rd,Rl:id,gm:"s",OTHER:"o"});var V0="br bl bs cid d dl mtp nor nrr ot pr rtp sf sid st su tb v".split(" "),zp="br ab bl tbl bs cdn cid ltc mtp pr sf sid bg sta st ts tpb tb lb tab lab pt ec msd v sn".split(" "),ZC="ab bl tbl bs cdn cid d dl ltc mtp nor ot pr rtp sf sid bg sta st su ts tpb tb lb tab lab pt ec msd v".split(" "),qC="d dl nor ot rtp rc su ttfb ttfbb ttlb url cmsdd cmsds".split(" "),e2=["e","sta"],t2="ps e t c b m um pe pc".split(" "),n2="spawkrfeqd".split(""),r2=10,_0="ts",i2="t",H0="request",G0="response",K0="event";function Wo(e){this.h=e,this.g=null}f=Wo.prototype,f.configure=function(e){this.h=e},f.di=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has($0)?this.g.get($0)*1e3:null},f.bi=function(){return this.h.enabled&&this.g&&this.g.has(z0)?this.g.get(z0)*1e3:null},f.Uj=function(){return this.h.enabled&&this.g&&this.g.has(X0)?this.g.get(X0):null},f.Vj=function(){return this.h.enabled&&this.g&&this.g.has(Y0)?this.g.get(Y0):null},f.getBandwidthEstimate=function(e){var t=this.bi();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return n>0&&n<=1?e*(1-n)+t*n:e};function W0(e){return e?e.toLowerCase()==="false"?!1:/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""):!0}be("shaka.util.CmsdManager",Wo),Wo.prototype.getBandwidthEstimate=Wo.prototype.getBandwidthEstimate,Wo.prototype.getRoundTripTime=Wo.prototype.Vj,Wo.prototype.getResponseDelay=Wo.prototype.Uj,Wo.prototype.getEstimatedThroughput=Wo.prototype.bi,Wo.prototype.getMaxBitrate=Wo.prototype.di;var z0="etp",$0="mb",X0="rd",Y0="rtt";function J0(){this.g=null,this.h=[]}function $p(e,t){return G(function(n){if(n.h==1)return e.g?n.g(new Promise(function(r){return e.h.push(r)}),2):n.A(2);e.g=t,n.j()})}J0.prototype.release=function(){this.h.length>0?this.h.shift()():this.g=null};function Re(e,t,n){t=t===void 0?null:t,_n.call(this);var r=this;this.m=fd,this.h=null,this.ue=t,this.$=!1,this.Ee=new Et,this.ve=new Et,this.j=new Et,this.Zb=new Et,this.Bd=new Et,this.G=this.H=this.D=this.N=null,this.Fe=0,this.ba=new J0,this.O=this.Ga=this.X=this.i=this.uc=this.I=this.l=this.qe=this.T=this.Lh=this.ua=this.K=this.hb=this.za=this.se=this.P=this.Ka=this.M=this.Wb=null,this.Ua=!1,this.ze=this.o=null,this.ye=1e9,this.De=[],this.tc=new Map,this.ib=[],this.Vf=-1,this.g=Ps(this),this.Xf=v0(),this.V=null,this.Ge=-1,this.Yb=null,this.ya={width:1/0,height:1/0},this.xe=new Wh(this.g,this.ya,null),this.Be=[],this.B=null,this.J=this.g.adaptationSetCriteriaFactory(),this.J.configure({language:this.g.preferredAudioLanguage,role:this.g.preferredAudioRole,videoRole:this.g.preferredVideoRole,channelCount:0,hdrLevel:this.g.preferredVideoHdrLevel,spatialAudio:this.g.preferSpatialAudio,videoLayout:this.g.preferredVideoLayout,audioLabel:this.g.preferredAudioLabel,videoLabel:this.g.preferredVideoLabel,codecSwitchingStrategy:this.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:this.g.preferredAudioCodecs,preferredAudioChannelCount:this.g.preferredAudioChannelCount}),this.Fd=this.g.preferredTextLanguage,this.Jd=this.g.preferredTextRole,this.Id=this.g.preferForcedSubs,this.we=[],n&&n(this),this.K=new Up(this,this.g.cmcd),this.ua=new Wo(this.g.cmsd),this.N=i1(this),this.ma=this.oa=this.Ba=this.C=null,this.Zf=!1,this.Wf=[],this.Yf=new Yt(function(){return G(function(i){if(i.h==1)return r.oa?i.g(r.Ob(r.ma,!0),3):i.A(0);if(i.h!=4)return i.g(r.load(r.oa),4);r.Zf?r.ma.pause():r.ma.play(),r.oa=null,r.Zf=!1,i.j()})}),dd&&(this.C=dd(),this.C.configure(this.g.ads),this.Bd.F(this.C,"ad-content-pause-requested",function(i){var o,s;return G(function(a){if(a.h==1)return r.Yf.stop(),r.oa?a.A(0):(r.ma=r.h,r.Zf=r.Zd(),o=i.saveLivePosition||!1,s=!0,r.U()&&(s=o),a.g(r.Wh(!0,s),3));r.oa=a.i,a.j()})}),this.Bd.F(this.C,"ad-content-resume-requested",function(i){if(i=i.offset||0,r.oa){var o=r.oa;o.o&&i&&(typeof o.o=="number"?o.o+=i:o.o.setTime(o.o.getTime()+i*1e3))}r.Yf.ka(.1)}),this.Bd.F(this.C,"ad-content-attach-requested",function(){return G(function(i){if(i.h==1)return r.h||!r.ma?i.A(0):i.g(r.Ob(r.ma,!0),3);r.ma=null,i.j()})})),hd&&(this.Ba=hd(this),this.Ba.configure(this.g.queue)),this.Ee.F(R,"online",function(){eg(r),r.ih()}),this.Ae=new Yt(function(){for(var i=Date.now()/1e3,o=!1,s=!0,a=d(r.i.variants),u=a.next();!u.done;u=a.next())u=u.value,u.disabledUntilTime>0&&u.disabledUntilTime<=i&&(u.disabledUntilTime=0,o=!0),u.disabledUntilTime>0&&(s=!1);s&&r.Ae.stop(),o&&Va(r,!1,void 0,!1,!1)}),this.eb=null,e&&(lt("Player w/ mediaElement","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Ob(e,!0)),this.u=null}P(Re,_n);function od(e){e.T!=null&&(Qa(e.T),e.T.release(),e.T=null)}function o2(e,t,n){n||t.lcevc.enabled?(od(e),e.T==null&&(e.T=new vs(e.h,e.Lh,t.lcevc,n),e.H&&(e.H.C=e.T))):od(e)}function Yn(e,t){return new yt(e,t)}f=Re.prototype,f.destroy=function(){var e=this,t;return G(function(n){switch(n.h){case 1:return e.m==us?n.return():(od(e),t=e.detach(),e.m=us,n.g(t,2));case 2:return n.g(e.lg(),3);case 3:if(e.Ee&&(e.Ee.release(),e.Ee=null),e.ve&&(e.ve.release(),e.ve=null),e.j&&(e.j.release(),e.j=null),e.Zb&&(e.Zb.release(),e.Zb=null),e.Bd&&(e.Bd.release(),e.Bd=null),e.ze=null,e.g=null,e.B=null,e.ue=null,e.K=null,e.ua=null,!e.N){n.A(4);break}return n.g(e.N.destroy(),5);case 5:e.N=null;case 4:e.o&&(e.o.release(),e.o=null),e.Ba&&(e.Ba.destroy(),e.Ba=null),_n.prototype.release.call(e),n.j()}})};function Q0(e,t){M1.set(e,t)}function sl(e,t){e.dispatchEvent(Yn("onstatechange",new Map().set("state",t)))}f.Ob=function(e,t){t=t===void 0?!0:t;var n=this,r,i,o;return G(function(s){switch(s.h){case 1:if(n.m==us)throw new fe(2,7,7e3);if(r=n.h&&n.h==e,!n.h||n.h==e){s.A(2);break}return s.g(n.detach(),2);case 2:return s.g(Xp(n,"attach"),4);case 4:if(s.i)return s.return();if(s.m(5,6),r||(sl(n,"attach"),i=function(){var a=tg(n,!1);a&&al(n,a)},n.ve.F(e,"error",i),n.h=e,n.K&&n.K.setMediaElement(e)),ct(),!t||!Hs()||n.H){s.A(6);break}return s.g(Yp(n),6);case 6:s.u(),n.ba.release(),s.B(0);break;case 5:return o=s.l(),s.g(n.detach(),10);case 10:throw o}})},f.nj=function(e){this.Lh=e},f.detach=function(e){e=e===void 0?!1:e;var t=this;return G(function(n){if(n.h==1){if(t.m==us)throw new fe(2,7,7e3);return n.g(t.xc(!1,e),2)}if(n.h!=3)return n.g(Xp(t,"detach"),3);if(n.i)return n.return();try{t.h&&(t.ve.Ra(),t.h=null),sl(t,"detach"),t.C&&!e&&t.C.release()}finally{t.ba.release()}n.j()})};function Xp(e,t){var n;return G(function(r){return r.h==1?(n=++e.Fe,r.g($p(e.ba,t),2)):n!=e.Fe?(e.ba.release(),r.return(!0)):r.return(!1)})}f.xc=function(e,t){e=e===void 0?!0:e,t=t===void 0?!1:t;var n=this,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B;return G(function(Z){switch(Z.h){case 1:return n.m!=us&&(n.m=fd),Z.g(Xp(n,"unload"),2);case 2:return Z.i?Z.return():(Z.D(3),n.Ua=!1,sl(n,"unload"),od(n),r=n.we.map(function(ae){return ae()}),n.we=[],Z.g(Promise.all(r),5));case 5:if(n.dispatchEvent(Yn("unloading")),n.se&&(n.se.release(),n.se=null),n.za&&(n.za.release(),n.za=null),n.hb&&(n.hb.release(),n.hb=null),n.h&&(n.j.Ra(),n.Zb.Ra()),n.Ae.stop(),n.Wb&&(n.Wb.release(),n.Wb=null),n.Ka&&(n.Ka.stop(),n.Ka=null),!n.I){Z.A(6);break}return Z.g(n.I.stop(),7);case 7:n.I=null,n.uc=null;case 6:if(n.o&&n.o.stop(),!n.l){Z.A(8);break}return Z.g(n.l.destroy(),9);case 9:n.l=null;case 8:if(n.M&&(n.M.release(),n.M=null),n.G&&(n.G.release(),n.G=null),R.shakaMediaKeysPolyfill!=="webkit"||!n.D){Z.A(10);break}return Z.g(n.D.destroy(),11);case 11:n.D=null;case 10:if(!n.H){Z.A(12);break}return Z.g(n.H.destroy(),13);case 13:n.H=null;case 12:if(n.C&&!t&&n.C.onAssetUnload(),n.oa&&!t&&(n.oa.destroy(),n.oa=null),t||n.Yf.stop(),n.K&&BC(n.K),n.ua&&(n.ua.g=null),!n.u){Z.A(14);break}return Z.g(n.u.destroy(),15);case 15:n.u=null;case 14:if(n.$=!1,n.h){for(i=d(n.Wf),o=i.next();!o.done;o=i.next())s=o.value,s.src.startsWith("blob:")&&URL.revokeObjectURL(s.src),s.remove();n.Wf=[],xf(n.h)&&n.h.load()}if(!n.D){Z.A(16);break}return Z.g(n.D.destroy(),17);case 17:n.D=null;case 16:if(n.eb&&n.X!=n.eb.jd()&&(n.eb.l||n.eb.destroy(),n.eb=null),n.X=null,n.Ga=null,n.P=null,n.i){for(a=d(n.i.variants),u=a.next();!u.done;u=a.next())for(l=u.value,h=d([l.audio,l.video]),g=h.next();!g.done;g=h.next())(m=g.value)&&m.segmentIndex&&m.segmentIndex.release();for(S=d(n.i.textStreams),A=S.next();!A.done;A=S.next())k=A.value,k.segmentIndex&&k.segmentIndex.release()}for(n.g&&n.g.streaming.clearDecodingCache&&(uf.clear(),xo.clear()),n.i=null,n.B=new Yf,n.Kh=null,n.Yb=null,n.V=null,n.Ge=-1,n.De=[],b=d(n.tc.values()),V=b.next();!V.done;V=b.next())B=V.value,B.stop();n.tc.clear(),n.ib=[],n.Vf=-1,n.N&&n.N.Sh(),dc(n);case 3:Z.u(),n.ba.release(),Z.B(4);break;case 4:if(ct(),e&&Hs()&&!n.H&&n.h)return Z.g(Yp(n),0);Z.A(0)}})},f.ll=function(e){this.O=e},f.load=function(e,t,n){t=t===void 0?null:t;var r=this,i,o,s,a,u,l,h,g,m,S,A,k,b,V;return G(function(B){switch(B.h){case 1:if(r.m==us)throw new fe(2,7,7e3);if(r.h||!r.ma){B.A(2);break}return B.g(r.Ob(r.ma,!0),3);case 3:r.ma=null;case 2:if(i=null,o="",e instanceof Ko){if(e.l)throw new fe(2,7,7006);i=e,o=i.jd()||""}else o=e||"";return B.g($p(r.ba,"load"),4);case 4:if(r.ba.release(),!r.h)throw new fe(2,7,7002);if(!r.X){B.A(5);break}return r.X=o,B.g(r.xc(!1),5);case 5:if(s=++r.Fe,a=function(){return G(function(Z){if(Z.h==1)return r.Fe==s?Z.A(0):i?Z.g(i.destroy(),3):Z.A(3);throw new fe(2,7,7e3)})},u=function(Z,ae){return G(function(pe){switch(pe.h){case 1:return pe.D(2),pe.g($p(r.ba,ae),4);case 4:return pe.g(a(),5);case 5:return pe.g(Z(),6);case 6:return pe.g(a(),7);case 7:i&&r.g&&(i.g=r.g);case 2:pe.u(),r.ba.release(),pe.B(0)}})},B.m(7,8),t==null&&i&&(t=i.getStartTime()),r.O=t,r.Ua=!1,r.dispatchEvent(Yn("loading")),i){n=i.V,B.A(10);break}if(n){B.A(10);break}return B.g(u(function(){return G(function(Z){if(Z.h==1)return Z.g(t1(r,o),2);n=Z.i,Z.j()})},"guessMimeType_"),10);case 10:if(l=!!i,i){T0(i,r),r.B=i.getStats(),B.A(13);break}return B.g(q0(r,o,t,n,!0,r.g),14);case 14:(i=B.i)?(i.D=!1,T0(i,r),r.B=i.getStats(),i.start(),i.B.catch(function(){})):r.B=new Yf;case 13:return h=!i,g=Date.now()/1e3,r.B=i?i.getStats():new Yf,r.X=o,r.Ga=n||null,dc(r),m=function(){var Z=r.h?r.h.buffered:null;return{start:yy(Z)||0,end:Ef(Z)||0}},r.za=new ql(m),r.za.addEventListener("regionadd",function(Z){Jp(r,Z.region,"metadataadded")}),h?B.g(u(function(){return G(function(Z){return Z.g(l2(r,n),0)})},"initializeSrcEqualsDrmInner_"),25):(r.hb=new ql(m),B.g(u(function(){return G(function(Z){if(Z.h==1)return Z.g(Promise.race([i.ma,i.B]),2);r.uc=i.H;var ae=i;ae.oa=!0,r.I=ae.m,r.i=i.Fg(),Z.j()})},"waitForFinish"),17));case 17:if(r.H){B.A(18);break}return B.g(u(function(){return G(function(Z){return Z.g(Yp(r),0)})},"initializeMediaSourceEngineInner_"),18);case 18:return r.i&&r.i.textStreams.length&&(r.u.enableTextDisplayer?r.u.enableTextDisplayer():lt("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method!')),B.g(u(function(){return G(function(Z){return Z.g(i.B,0)})},"waitForFinish"),20);case 20:if(r.g=i.getConfiguration(),r.xe=i.G,r.I&&r.I.setMediaElement&&r.h&&r.I.setMediaElement(r.h),r.se=AC(i),r.qe=i.Ga,(S=i.C)&&(r.J=S),l&&r.h&&r.h.nodeName==="AUDIO"&&(s2(r),r.configure("manifest.disableVideo",!0)),i.j){B.A(21);break}return B.g(u(function(){return G(function(Z){return Z.g(E0(i,r.h),0)})},"drmEngine_.init"),21);case 21:return r.D=IC(i),B.g(u(function(){return G(function(Z){return Z.g(r.D.Ob(r.h),0)})},"drmEngine_.attach"),23);case 23:return A=r.g.abrFactory,r.o&&r.ze==A||(r.ze=A,r.o&&r.o.release(),r.o=A(),typeof r.o.setMediaElement!="function"&&(lt("AbrManager w/o setMediaElement","Please use an AbrManager with setMediaElement function."),r.o.setMediaElement=function(){}),typeof r.o.setCmsdManager!="function"&&(lt("AbrManager w/o setCmsdManager","Please use an AbrManager with setCmsdManager function."),r.o.setCmsdManager=function(){}),typeof r.o.trySuggestStreams!="function"&&(lt("AbrManager w/o trySuggestStreams","Please use an AbrManager with trySuggestStreams function."),r.o.trySuggestStreams=function(){}),r.o.configure(r.g.abr)),k=CC(i),b=i.i,B.g(u(function(){return G(function(Z){return Z.g(u2(r,g,b,k),0)})},"loadInner_"),24);case 24:wC(i),r.Ga&&ct().cj()&&su(r.Ga)&&fI(r.H,r.X,r.Ga),B.A(16);break;case 25:return B.g(u(function(){return G(function(Z){return Z.g(c2(r,g,n),0)})},"srcEqualsInner_"),16);case 16:r.dispatchEvent(Yn("loaded"));case 8:if(B.u(),!i){B.A(27);break}return B.g(i.destroy(),27);case 27:r.eb=null,B.B(0);break;case 7:if(V=B.l(),!V||V.code==7e3){B.A(29);break}return B.g(r.xc(!1),29);case 29:throw V}})};function s2(e){for(var t=d(e.i.variants),n=t.next();!n.done;n=t.next())n=n.value,n.video&&(n.video.closeSegmentIndex(),n.video=null),n.bandwidth=n.audio&&n.audio.bandwidth?n.audio.bandwidth:0;e.i.variants=e.i.variants.filter(function(r){return r.audio})}f.gj=function(e,t,n){e=e===void 0?!0:e,t=t===void 0?!1:t,n=n===void 0?!1:n;var r=this,i;return G(function(o){return o.h==1?o.g(Z0(r,n),2):o.h!=3?(i=o.i,o.g(r.xc(e,t),3)):o.return(i)})},f.Wh=function(e,t){e=e===void 0?!1:e,t=t===void 0?!1:t;var n=this,r;return G(function(i){return i.h==1?i.g(Z0(n,t),2):i.h!=3?(r=i.i,i.g(n.detach(e),3)):i.return(r)})};function Z0(e,t){t=t===void 0?!1:t;var n,r,i;return G(function(o){if(o.h==1)return n=null,e.i&&e.I&&e.uc&&e.X&&e.g?(r=e.h.currentTime,t||(r=null),o.g(e1(e,e.X,r,e.Ga,e.g,!0,!1),3)):o.A(2);if(o.h!=2){n=o.i,e.Be.push(n),e.I&&e.I.setMediaElement&&e.I.setMediaElement(null),(i=e.l?e.l.o:null)&&(n.i=i);var s=n,a=e.I,u=e.uc;s.h=e.i,s.m=a,s.H=u,n.C=e.J,n.start(),e.i=null,e.I=null,e.uc=null,e.o=null,e.ze=null}return o.return(n)})}f.preload=function(e,t,n,r){t=t===void 0?null:t;var i=this,o,s;return G(function(a){return a.h==1?(o=Ps(i),da(o,r||i.g,Ps(i)),a.g(q0(i,e,t,n,!1,o),2)):((s=a.i)?s.start():al(i,new fe(2,7,7005)),a.return(s))})},f.lg=function(){var e=this,t,n,r,i;return G(function(o){for(t=[],n=d(e.Be),r=n.next();!r.done;r=n.next())i=r.value,i.l||t.push(i.destroy());return e.Be=[],o.g(Promise.all(t),0)})};function q0(e,t,n,r,i,o){i=i===void 0?!1:i;var s,a,u;return G(function(l){return l.h==1?r?l.A(2):l.g(t1(e,t),3):(l.h!=2&&(r=l.i),a2(e,r)?l.return(null):(s=o||e.g,a=!1,i&&e.h&&e.h.nodeName==="AUDIO"&&(a=!0),u=e1(e,t,n,r||null,s,!i,a),u=i?u.then(function(h){return h.D=!1,h}):u.then(function(h){return e.Be.push(h),h}),l.return(u)))})}function e1(e,t,n,r,i,o,s){o=o===void 0?!0:o,s=s===void 0?!1:s;var a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe;return G(function(te){return te.h==1?(a=null,u=Hi(i),s&&(u.manifest.disableVideo=!0),l=function(){return a.P&&a.l?null:a},h=function(){return l()?l().getConfiguration():e.g},e.ya.width!=1/0||e.ya.height!=1/0||e.g.ignoreHardwareResolution?te.A(2):(g=ct(),te.g(g.fc(),3))):(te.h!=2&&(m=te.i,e.ya.width=m.width,e.ya.height=m.height),S=new Wh(u,e.ya,null),A={networkingEngine:e.N,filter:function(le){var ie,ye;return G(function(ce){if(ce.h==1)return ce.g(ty(S,le),2);if(ce.h!=4)return ie=ce.i,ie?(ye=Yn("trackschanged"),ce.g(Promise.resolve(),4)):ce.A(0);a.dispatchEvent(ye),ce.j()})},makeTextStreamsForClosedCaptions:function(le){return w2(e,le)},onTimelineRegionAdded:function(le){hp(a.I,le)},onEvent:function(le){return a.dispatchEvent(le)},onError:function(le){return a.onError(le)},isLowLatencyMode:function(){return h().streaming.lowLatencyMode},updateDuration:function(){e.l&&a.P&&e.l.updateDuration()},newDrmInfo:function(le){var ie=a.j,ye=ie?ie.g:null;ye&&ie.B&&iy(S,ye.keySystem,le)},onManifestUpdated:function(){var le=new Map().set("isLive",e.U());a.dispatchEvent(Yn("manifestupdated",le)),ac(a,!1,function(){e.C&&e.C.onManifestUpdated(e.U())})},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},onMetadata:function(le,ie,ye,ce){var Ee=le;(le=="com.apple.hls.interstitial"||le=="com.apple.hls.overlay")&&(Ee="com.apple.quicktime.HLS",le={startTime:ie,endTime:ye,values:ce},e.C&&e.C.onHLSInterstitialMetadata(e,e.h,le)),ce=d(ce),le=ce.next();for(var Se={};!le.done;Se={Zg:void 0},le=ce.next())Se.Zg=le.value,Se.Zg.name!="ID"&&ac(a,!1,function(Ve){return function(){Qp(e,ie,ye,Ee,Ve.Zg)}}(Se))},disableStream:function(le){return e.disableStream(le,e.g.streaming.maxDisabledTime)},addFont:function(le,ie){return e.addFont(le,ie)}},k=new ql(function(){return e.Sa()}),k.addEventListener("regionadd",function(le){var ie=le.region;mc(e,"timelineregionadded",ie,a),ac(a,!1,function(){e.C&&(e.C.onDashTimedMetadata(ie),e.C.onDASHInterstitialMetadata(e,e.h,ie))})}),b=null,u.streaming.observeQualityChanges&&(b=new Rf(function(){return e.Bc()}),b.addEventListener("qualitychange",function(le){w1(e,le.quality,le.position)}),b.addEventListener("audiotrackchange",function(le){w1(e,le.quality,le.position,!0)})),V=!0,B={nc:e.N,onError:function(le){return a.onError(le)},vf:function(le){ac(a,!0,function(){e.D&&I2(e,le)})},onExpirationUpdated:function(le,ie){var ye=Yn("expirationupdated");a.dispatchEvent(ye),(ye=a.m)&&ye.onExpirationUpdated&&ye.onExpirationUpdated(le,ie)},onEvent:function(le){if(a.dispatchEvent(le),le.type=="drmsessionupdate"&&V){V=!1,le=Date.now()/1e3-a.za;var ie=e.B||a.getStats();le>=0&&(ie.m=le),e.T&&Qa(e.T)}}},Z=i1(e,l),Lv(e.N,Z),ae=function(){return e.dd(B)},pe={config:u,wk:A,Ik:k,Hk:b,dd:ae,vk:S,networkingEngine:Z,mj:o},a=new Ko(t,r,n,pe),te.return(a))})}function t1(e,t){var n,r,i,o;return G(function(s){return s.h==1?(n=e.g.manifest.retryParameters,s.g(qu(t,e.N,n),2)):(r=s.i,r=="application/x-mpegurl"&&(i=ct(),i.Ia()==="WEBKIT"&&(r="application/vnd.apple.mpegurl")),r=="video/quicktime"&&(o=ct(),o.Ia()==="CHROMIUM"&&(r="video/mp4")),s.return(r))})}function a2(e,t){if(!Hs(ct()))return!0;if(t){if((e.h||yu()).canPlayType(t)=="")return!1;if(!Hs(ct())||!Uo.has(t.toLowerCase()))return!0;if(su(t))return ct().Ia()==="WEBKIT"&&(e.g.drm.servers["com.apple.fps"]||e.g.drm.servers["com.apple.fps.1_0"])?e.g.streaming.useNativeHlsForFairPlay:e.g.streaming.preferNativeHls;if(t==="application/dash+xml"||t==="video/vnd.mpeg.dash.mpd")return e.g.streaming.preferNativeDash}return!1}function sd(e,t){var n=e.g.textDisplayFactory;e.Kh!==n||t!==void 0&&t?(t=e.u,e.u=n(),e.u.configure?e.u.configure(e.g.textDisplayer):lt("Text displayer w/ configure",'Text displayer should have a "configure" method!'),e.u.setTextLanguage||lt("Text displayer w/ setTextLanguage",'Text displayer should have a "setTextLanguage" method!'),t?(e.u.setTextVisibility(t.isTextVisible()),t.destroy().catch(function(){})):e.u.setTextVisibility(e.$),e.H&&TI(e.H,e.u),e.Kh=n,e.l&&zI(e.l)):e.u&&e.u.configure&&e.u.configure(e.g.textDisplayer)}function Yp(e){var t,n,r;return G(function(i){if(i.h==1)return ct(),sl(e,"media-source"),e.g.mediaSource.useSourceElements&&xf(e.h),sd(e),t=y2(e.h,e.u,{Mj:function(){return e.keySystem()},onMetadata:function(o,s,a){o=d(o);for(var u=o.next();!u.done;u=o.next())if(u=u.value,u.data&&typeof u.cueTime=="number"&&u.frames){var l=u.cueTime+s,h=a;h&&l>h&&(h=l);for(var g=d(u.frames),m=g.next();!m.done;m=g.next())Qp(e,l,h,"org.id3",m.value);e.C&&e.C.onHlsTimedMetadata(u,l)}},Ck:function(o){e.hb&&hp(e.hb,{schemeIdUri:o.schemeIdUri,startTime:o.startTime,endTime:o.endTime,id:String(o.id),emsg:o})},onEvent:function(o){return e.dispatchEvent(o)},Ek:function(){e.I&&e.I.update&&e.I.update()}},e.T,e.g.mediaSource),n=e.g.manifest,r=n.segmentRelativeVttTiming,t.Ga=r,i.g(t.M,2);e.H=t,i.j()})}function n1(e,t){e.M=new bf({Gg:function(){return t.playbackRate},kd:function(){return t.defaultPlaybackRate},Si:function(n){t.playbackRate=n},Ak:function(n){t.currentTime+=n},isPaused:function(){return t.paused}})}function r1(e,t,n){function r(){return Zp(e)}if(e.j.F(t,"playing",r),e.j.F(t,"pause",r),e.j.F(t,"ended",r),e.j.F(t,"ratechange",function(){var o=e.h.playbackRate;o!=0&&(e.M&&(e.M.set(o),e.m==hi&&e.o.playbackRateChanged(o),p1(e,o)),o=Yn("ratechange"),e.dispatchEvent(o))}),t.remote&&(e.j.F(t.remote,"connect",function(){e.l&&t.remote.state=="connected"&&pa(e),Gi(e)}),e.j.F(t.remote,"connecting",function(){return Gi(e)}),e.j.F(t.remote,"disconnect",function(){return G(function(o){if(o.h==1)return e.l&&t.remote.state=="disconnected"?o.g(Vf(e.l),3):o.A(2);o.h!=2&&pa(e),Gi(e),o.j()})})),t.audioTracks&&(e.j.F(t.audioTracks,"addtrack",function(){return Gi(e)}),e.j.F(t.audioTracks,"removetrack",function(){return Gi(e)}),e.j.F(t.audioTracks,"change",function(){return Gi(e)})),t.videoTracks&&(e.j.F(t.videoTracks,"addtrack",function(){return Gi(e)}),e.j.F(t.videoTracks,"removetrack",function(){return Gi(e)}),e.j.F(t.videoTracks,"change",function(){return Gi(e)})),(t.webkitPresentationMode||t.webkitSupportsFullscreen)&&e.j.F(t,"webkitpresentationmodechanged",function(){e.ue&&sd(e,!0)}),t.textTracks){var i=function(){e.m===po&&e.u instanceof Yr&&pa(e),Gi(e)};e.j.F(t.textTracks,"addtrack",function(o){if(o.track)switch(o=o.track,o.kind){case"metadata":h2(e,o);break;case"chapters":p2(e,o);break;default:i()}}),e.j.F(t.textTracks,"removetrack",i),e.j.F(t.textTracks,"change",i)}t.preload!="none"&&e.j.Aa(t,"loadedmetadata",function(){var o=e.B,s=Date.now()/1e3-n;s>=0&&(o.G=s)})}function u2(e,t,n,r){var i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce;return G(function(ke){switch(ke.h){case 1:for(sl(e,"load"),i=e.h,n1(e,i),r1(e,i,t),("onchange"in R.screen)&&e.j.F(R.screen,"change",function(){if(e.J.getConfiguration){var Ge=e.J.getConfiguration();Ge.hdrLevel=="AUTO"?Ba(e):e.g.preferredVideoHdrLevel=="AUTO"&&e.g.abr.enabled&&(Ge.hdrLevel="AUTO",e.J.configure(Ge),Ba(e))}}),o=!1,s=d(e.i.variants),a=s.next();!a.done;a=s.next())u=a.value,(l=u.video&&u.video.dependencyStream)&&(o=Za(l));o2(e,e.g,o),e.Fd=e.g.preferredTextLanguage,e.Jd=e.g.preferredTextRole,e.Id=e.g.preferForcedSubs,ng(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.o.init(function(Ge,Je,Ft){e.i&&e.l&&Ge!=e.l.o&&pc(e,Ge,!0,Je===void 0?!1:Je,Ft===void 0?0:Ft)}),e.o.setMediaElement(i),e.o.setCmsdManager(e.ua),e.l=S2(e),e.l.configure(e.g.streaming),e.m=hi,e.dispatchEvent(Yn("streaming")),h=n;case 2:for((m=e.l.o)||h||(h=m1(e,!0)),S=[],g=m||h,A=d([g.video,g.audio]),k=A.next();!k.done;k=A.next())(b=k.value)&&!b.segmentIndex&&(S.push(b.createSegmentIndex()),b.dependencyStream&&S.push(b.dependencyStream.createSegmentIndex()));if(!(S.length>0)){ke.A(4);break}return ke.g(Promise.all(S),4);case 4:if(!g||g.disabledUntilTime!=0){ke.A(2);break}if(Ba(e),e.I&&e.I.onInitialVariantChosen&&e.I.onInitialVariantChosen(g),e.i.isLowLatency&&(e.g.streaming.lowLatencyMode?e.configure(e.Xf):ut("Low-latency live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.")),e.K&&(VC(e.K,e.i.isLowLatency&&e.g.streaming.lowLatencyMode),_C(e.K,t*1e3)),ng(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),GI(e.l,e.g.playRangeStart,e.g.playRangeEnd),e.Ua=!0,e.dispatchEvent(Yn("canupdatestarttime")),V=function(Ge){e.G=g2(e,Ge),e.Wb=m2(e,Ge),o1(e,i,!1)},e.g.streaming.startAtSegmentBoundary||(B=e.O,B==null&&e.i.startTime&&(B=e.i.startTime),V(B)),m){ke.A(7);break}if(!e.g.streaming.startAtSegmentBoundary){ke.A(8);break}return Z=e.i.presentationTimeline,e.O instanceof Date&&(pe=Z.m||Z.i,te=e.O.getTime()/1e3-pe,te!=null&&(ae=te)),ae==null&&(ae=typeof e.O=="number"?e.O:e.U()?1/0:e.h.currentTime),e.O==null&&e.i.startTime&&(ae=e.i.startTime),le=Z.Tb(),ie=Z.Cb(),ae<le?ae=le:ae>ie&&(ae=ie),ke.g(A2(h,ae),9);case 9:ye=ke.i,V(ye);case 8:pc(e,h,!0,!1,0);case 7:return e.G.ready(),ce=e.Fc().find(function(Ge){return Ge.active}),ce||((Ee=_e(e.i.textStreams,e.Fd,e.Jd,e.Id)[0]||null)&&bp(e.B.h,Ee,!0),h&&(Ee?(Di(h.audio,Ee,e.g)&&(e.$=!0),e.$&&e.u.setTextVisibility(!0)):(e.$=!1,e.u.setTextVisibility(!1)),E1(e)),Ee&&(e.g.streaming.alwaysStreamText||e.Pg())&&(Nf(e.l,Ee),gc(e))),ke.g(e.l.start(r),10);case 10:e.g.abr.enabled&&(e.o.enable(),x1(e)),Gi(e),e.i.variants.some(function(Ge){return Ge.primary}),((Se=e.U())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.i.serviceDescription||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(Ve=function(){return g1(e)},e.j.F(i,"timeupdate",Ve)),Se||(Le=function(){return cd(e)},e.j.F(i,"timeupdate",Le),cd(e),e.i.nextUrl&&(e.g.streaming.preloadNextUrlWindow>0&&(Ce=function(){var Ge;return G(function(Je){if(Je.h==1)return Ge=e.Sa().end-e.h.currentTime,isNaN(Ge)||!(Ge<=e.g.streaming.preloadNextUrlWindow)?Je.A(0):(e.j.Na(i,"timeupdate",Ce),Je.g(e.preload(e.i.nextUrl),4));e.eb=Je.i,Je.j()})},e.j.F(i,"timeupdate",Ce)),e.j.F(i,"ended",function(){e.load(e.eb||e.i.nextUrl)}))),e.C&&e.C.onManifestUpdated(Se),ke.j()}})}function l2(e,t){var n,r,i;return G(function(o){return o.h==1?(n=Date.now()/1e3,r=!0,e.D=e.dd({nc:e.N,onError:function(s){al(e,s)},vf:function(){},onExpirationUpdated:function(){var s=Yn("expirationupdated");e.dispatchEvent(s)},onEvent:function(s){if(e.dispatchEvent(s),s.type=="drmsessionupdate"&&r){r=!1,s=e.B;var a=Date.now()/1e3-n;a>=0&&(s.m=a)}}}),e.D.configure(e.g.drm),i=Pv([t]),e.D.O=!0,o.g(Gv(e.D,[i],[]),2)):o.g(e.D.Ob(e.h),0)})}function c2(e,t,n){var r,i,o,s,a,u,l,h,g,m,S,A;return G(function(k){switch(k.h){case 1:if(sl(e,"src-equals"),r=e.h,e.G=new $y(r),i=!1,e.we.push(function(){i=!0}),e.dispatchEvent(Yn("canupdatestarttime")),e.O!=null&&e.G.Uf(e.O),e.Wb=v2(e,e.O||0),n1(e,r),o1(e,r,!0),r.textTracks&&(sd(e),o=function(b){if(!(e.u instanceof Yr)){var V=ad(e).find(function(B){return B.mode!=="disabled"});V&&(V.mode=b?"showing":"hidden"),e.u instanceof Ei&&(V=T2(e))&&(V.mode=!b&&e.u.isTextVisible()?"showing":"hidden")}},e.j.F(r,"enterpictureinpicture",function(){return o(!0)}),e.j.F(r,"leavepictureinpicture",function(){return o(!1)}),r.remote?(e.j.F(r.remote,"connect",function(){return o(!1)}),e.j.F(r.remote,"connecting",function(){return o(!1)}),e.j.F(r.remote,"disconnect",function(){return o(!1)})):"webkitCurrentPlaybackTargetIsWireless"in r&&e.j.F(r,"webkitcurrentplaybacktargetiswirelesschanged",function(){return o(!1)}),s=r,(s.webkitPresentationMode||s.webkitSupportsFullscreen)&&e.j.F(s,"webkitpresentationmodechanged",function(){s.webkitPresentationMode?o(s.webkitPresentationMode!=="inline"):s.webkitSupportsFullscreen&&o(s.webkitDisplayingFullscreen)})),r1(e,r,t),a=HC(e.K,e.X,n),!a.includes("#t=")&&(e.g.playRangeStart>0||isFinite(e.g.playRangeEnd))&&(a+="#t=",e.g.playRangeStart>0&&(a+=e.g.playRangeStart),isFinite(e.g.playRangeEnd)&&(a+=","+e.g.playRangeEnd)),!e.H){k.A(2);break}return k.g(e.H.destroy(),3);case 3:e.H=null;case 2:return xf(r),r.src=a,u=ct(),u.Pa()=="TV"&&r.load(),r.preload!="none"&&!r.autoplay&&su(n)&&u.Ia()==="WEBKIT"&&r.load(),e.m=po,e.dispatchEvent(Yn("streaming")),l=function(){return new Promise(function(b){var V=new Yt(b);e.j.F(r.textTracks,"change",function(){return V.ka(.5)}),V.ka(.5)})},h=new zn,Zu(r,HTMLMediaElement.HAVE_METADATA,e.j,function(){return G(function(b){if(b.h==1)return e.G.ready(),e.Ga&&su(e.Ga)?b.g(l(),3):(h.resolve(),b.A(0));h.resolve(),b.j()})}),Zu(r,HTMLMediaElement.HAVE_CURRENT_DATA,e.j,function(){var b,V,B,Z,ae;return G(function(pe){if(pe.h==1)return pe.g(l(),2);if(i)return pe.return();if(f2(e),b=ad(e),b.some(function(te){return te.mode==="showing"})&&(e.$=!0,e.u.setTextVisibility(!0)),!(e.u instanceof Yr))for(b.length&&(e.u.enableTextDisplayer?e.u.enableTextDisplayer():lt("Text displayer w/ enableTextDisplayer",'Text displayer should have a "enableTextDisplayer" method')),V=!1,B=d(b),Z=B.next();!Z.done;Z=B.next())ae=Z.value,ae.mode!=="disabled"&&(V?(ae.mode="disabled",ut("Found more than one enabled text track, disabling it",ae)):(f1(e,ae),V=!0));d2(e),pe.j()})}),r.error?h.reject(tg(e)):r.preload=="none"&&(ut('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),h.resolve()),e.j.Aa(r,"error",function(){h.reject(tg(e))}),k.g(Lu(e.g.streaming.loadTimeout,h),4);case 4:((g=e.U())&&(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled||e.g.streaming.liveSync.panicMode)||e.g.streaming.vodDynamicPlaybackRate)&&(m=function(){return g1(e)},e.j.F(r,"timeupdate",m)),g||(S=function(){return cd(e)},e.j.F(r,"timeupdate",S),cd(e)),e.C&&(e.C.onManifestUpdated(g),g&&(A=e.Sa().end,e.j.F(r,"progress",function(){var b=e.Sa().end;A!=b&&(e.C.onManifestUpdated(e.U()),A=b)}))),e.Ua=!0,k.j()}})}function f2(e){var t=e.g.preferredAudioLanguage;t!=""&&e.Oi(t,e.g.preferredAudioRole)}function d2(e){var t=e.g.preferredTextLanguage;t!=""&&e.mh(t,e.g.preferredTextRole,e.g.preferForcedSubs)}function h2(e,t){if(t.kind=="metadata"){t.mode="hidden",e.j.F(t,"cuechange",function(){if(t.activeCues)for(var r=d(t.activeCues),i=r.next();!i.done;i=r.next())i=i.value,Qp(e,i.startTime,i.endTime,i.type,i.value),e.C&&e.C.onCueMetadataChange(i.value);if(t.cues){r=[],i=d(t.cues);for(var o=i.next(),s={};!o.done;s={zc:void 0},o=i.next())s.zc=o.value,s.zc.type=="com.apple.quicktime.HLS"&&s.zc.startTime!=null&&(o=r.find(function(a){return function(u){return u.startTime==a.zc.startTime&&u.endTime==a.zc.endTime}}(s)),o||(o={startTime:s.zc.startTime,endTime:s.zc.endTime,values:[]},r.push(o)),o.values.push(s.zc.value));for(r=d(r),i=r.next();!i.done;i=r.next())i=i.value,i.values.some(function(a){return a.key=="X-ASSET-URI"||a.key=="X-ASSET-LIST"})&&e.C&&(i.values.push({key:"CUE",description:"",data:i.startTime!=0||e.U()?"ONCE":"ONCE,PRE",mimeType:null,pictureType:null}),e.C.onHLSInterstitialMetadata(e,e.h,i))}});var n=new Yt(function(){var r=E2(e);r=d(r);for(var i=r.next();!i.done;i=r.next())i.value.mode="hidden"}).xb().ka(.5);e.we.push(function(){n.stop()})}}function Jp(e,t,n){t=new Map().set("startTime",t.startTime).set("endTime",t.endTime).set("metadataType",t.schemeIdUri).set("payload",t.payload),e.dispatchEvent(Yn(n,t))}function Qp(e,t,n,r,i){e.za&&(t={schemeIdUri:r,startTime:t,endTime:n||1/0,id:"",payload:i},t.id=JSON.stringify(t),hp(e.za,t))}function p2(e,t){if(t&&t.kind=="chapters"){t.mode="hidden";var n=new Yt(function(){t.mode="hidden"}).xb().ka(.5);e.we.push(function(){n.stop()})}}f.Mk=function(){for(var e=this.ba;e.g;)e.release()},f.dd=function(e){return new mf(e)};function i1(e,t){function n(o){t()?t().dispatchEvent(o):e.dispatchEvent(o)}function r(o){t()?ac(t(),!0,o):o()}t||(t=function(){return null});var i=new lr(function(o,s,a,u,l){r(function(){e.o&&e.o.segmentDownloaded(o,s,a,u,l)})},function(o,s,a){s=new Map().set("headers",o).set("request",s).set("requestType",a),n(Yn("downloadheadersreceived",s)),r(function(){if(e.ua){var u=e.ua;if(u.h.enabled){var l=o["cmsd-static"];if(l)try{var h=new Map,g=l.split(",");for(l=0;l<g.length;l++){var m=g[l].split("=");h.set(m[0],W0(m[1]))}}catch{}if(h=o["cmsd-dynamic"]){e:{try{var S=new Map,A=h.split(";");for(h=1;h<A.length;h++){var k=A[h].split("=");S.set(k[0],W0(k[1]))}var b=S;break e}catch{b=null;break e}b=void 0}b&&(u.g=b)}}}})},function(o,s){o=new Map().set("request",o).set("response",s),n(Yn("downloadcompleted",o))},function(o,s,a,u){o=new Map().set("request",o).set("error",s).set("httpResponseCode",a).set("aborted",u),n(Yn("downloadfailed",o))},function(o,s,a){r(function(){if(e.K){var u=e.K,l=a;if(l=l===void 0?{}:l,u.g.enabled)if(s.method==="HEAD")ol(u,s,{});else switch(o){case 0:try{if(u.g.enabled){if(l.type){e:{switch(l.type){case 4:var h=u.u?nd:td;break e;case 3:case 2:h=u.u?id:rd;break e;case 5:h="s";break e}h=void 0}u.l=h}ol(u,s,{ot:B0,su:!u.D})}}catch(m){In("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",m)}break;case Ho:try{if(u.g.enabled){var g=F0(u,l,s.uris[0]);g.ts=Date.now(),u.m.has(s)&&u.m.delete(s),u.m.set(s,g.ts),ol(u,s,g)}}catch(m){In("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",m)}break;case 2:case 5:case 6:ol(u,s,{ot:"k"});break;case 4:ol(u,s,{ot:"o"})}}})},function(o,s,a,u){(o=t()?t().m:e.I)&&o.banLocation&&o.banLocation(u)},function(o,s,a){if(s.data){var u=s.data.byteLength,l=t()?t().getStats():e.B;if(l&&(S0(l,u),o===0&&(l.ri=u)),u=e.K,a=a===void 0?{}:a,Bp(u).length!==0)switch(o){case Ho:try{var h=F0(u,a,s.uri);s.originalRequest&&s.originalRequest.timeToFirstByte!=null&&(h.ttfb=s.originalRequest.timeToFirstByte),s.timeMs!=null&&(h.ttlb=s.timeMs);var g=s.originalUri||s.uri;if(g.includes("CMCD="))try{var m=new URL(g);m.searchParams.delete("CMCD");var S=m.toString()}catch{S=g}else S=g;h.url=S,u.m.has(s.originalRequest)?(h.ts=u.m.get(s.originalRequest),u.m.delete(s.originalRequest)):h.ts||(h.ts=Date.now());var A=Bp(u);if(A.length!==0){var k=u.g.version==Wp?Array.from(new Set([].concat(M(zp),M(qC)))):V0;h.rc=s.status||0;var b=Gp(u,h,G0);s.headers&&s.headers["CMSD-Static"]&&(b.cmsds=btoa(s.headers["CMSD-Static"])),s.headers&&s.headers["CMSD-Dynamic"]&&(b.cmsdd=btoa(s.headers["CMSD-Dynamic"]));for(var V=d(A),B=V.next();!B.done;B=V.next()){var Z=B.value,ae=_p(Z.includeKeys||[],k),pe=L0(Z);u.o[pe]||(u.o[pe]={request:1,response:1}),b.sn=u.o[pe].response++;var te=Hp(b,ae);N0(u,te,Z,s)}}}catch(le){In("CMCD_SEGMENT_ERROR","Could not generate response segment CMCD data.",le)}}}});return i.configure(e.g.networking),i}function g2(e,t){return new Jy(e.h,e.i,e.g.streaming,t,function(){e.Wb&&t0(e.Wb,!e.G.Ih()),e.l&&e.l.Tc(),e.P&&_s(e,"seeking")},function(n){return e.dispatchEvent(n)})}function m2(e,t){var n=e.U()||typeof t=="number"&&t>0;t=new Eu(e.se,n),t.addEventListener("enter",function(o){mc(e,"timelineregionenter",o.region)}),t.addEventListener("exit",function(o){mc(e,"timelineregionexit",o.region)}),t.addEventListener("skip",function(o){var s=o.region;o.seeking||(mc(e,"timelineregionenter",s),mc(e,"timelineregionexit",s))});var r=new Eu(e.za,n);r.addEventListener("enter",function(o){Jp(e,o.region,"metadata")}),n=new Eu(e.hb,n),n.addEventListener("enter",function(o){o=new Map().set("detail",o.region.emsg),e.dispatchEvent(Yn("emsg",o))});var i=new dp(e.h);return i.g.add(t),i.g.add(r),i.g.add(n),e.qe&&i.g.add(e.qe),i}function v2(e,t){t=new Eu(e.za,t instanceof Date||t>0),t.addEventListener("enter",function(r){Jp(e,r.region,"metadata")});var n=new dp(e.h);return n.g.add(t),n}function o1(e,t,n){e.P=new UA,Kh(e.P,pu),s1(e),dc(e),e.Ka=new Yt(function(){_s(e)}),e.g.streaming.rebufferingGoal&&e.Ka.Ea(.25),e.j.F(t,"waiting",function(){return _s(e,"waiting")}),e.j.F(t,"canplaythrough",function(){return _s(e,"canplaythrough")}),e.j.F(t,"playing",function(){return _s(e,"playing")}),e.j.F(t,"seeked",function(){return _s(e,"seeked")}),e.j.F(t,"timeupdate",function(){return _s(e,"timeupdate")}),n&&(e.j.F(t,"progress",function(){return _s(e,"progress")}),e.j.F(t,"stalled",function(){return _s(e,"stalled")}))}function s1(e){var t=e.g.streaming.rebufferingGoal;e.P.j.set(gu,Math.min(.5,t/2)).set(pu,t)}function _s(e,t){if(e.g.streaming.rebufferingGoal){t=e.H?Tu(e.H):!1,t=e.Zd()||t||e.G.mi();var n=Sy(e.h.buffered,e.h.currentTime),r=e.P,i=r.j.get(r.g);Kh(r,t||n>=i&&n>0?gu:pu)&&dc(e)}else if(t){n=e.P,r=e.h.currentTime,i=n.h,n.h=r;var o=void 0;switch(t){case"seeking":case"waiting":n.h=-1,o=pu;break;case"canplaythrough":case"playing":case"seeked":o=gu;break;case"timeupdate":i>=0&&r-i>.01&&(o=gu)}o!==void 0&&Kh(n,o)&&dc(e)}}function y2(e,t,n,r,i){return new My(e,t,n,i,r)}function S2(e){return new a0(e.i,{Sb:function(){return e.G?e.G.Kd():0},getBandwidthEstimate:function(){return e.o.getBandwidthEstimate()},Ib:function(){return e.Ib()},video:e.h,Y:e.H,nc:e.N,onError:function(t){return al(e,t)},onEvent:function(t){return e.dispatchEvent(t)},td:function(t,n,r,i){var o=t.startTime,s=t.endTime,a=n.type;if(a!=Bt){if(e.G){e.G.Ai();var u=rp(e.H,a);!e.U()&&e.h.paused&&!e.h.seeking&&u!=null&&u>0&&e.G.Kd()<u&&!zu(e.G.Kd(),u,.001)&&e.G.Uf(u)}_s(e)}r=new Map().set("start",o).set("end",s).set("contentType",a).set("isMuxed",r).set("isDependency",i),e.dispatchEvent(Yn("segmentappended",r)),e.o&&n.fastSwitching&&t.Qc&&t.ae&&e.o.trySuggestStreams()},Dk:function(t,n){(n=n.rd)&&e.qe&&DI(e.qe,n,t)},Qh:function(t,n){var r=e.D;if(r.h.parseInbandPsshEnabled&&!r.H&&["audio","video"].includes(t)){t=new Vh(xt(n)),n=0;for(var i=d(t.data),o=i.next();!o.done;o=i.next())n+=o.value.length;if(n==0)r=Promise.resolve();else{for(n=new Uint8Array(n),i=0,t=d(t.data),o=t.next();!o.done;o=t.next())o=o.value,n.set(o,i),i+=o.length;_l(r,"cenc",n),r=r.m}}else r=Promise.resolve();return r},disableStream:function(t,n){return e.disableStream(t,n)},cl:function(t,n){return!(e.g.abr.enabled&&n.fastSwitching&&t.Qc&&t.ae)}})}f.configure=function(e,t){var n=this.getConfiguration();if(arguments.length==2&&typeof e=="string"&&(e=Gf(e,t)),"preferredVariantRole"in e&&(lt("preferredVariantRole configuration","Please Use preferredAudioRole instead."),e.preferredAudioRole=e.preferredVariantRole,delete e.preferredVariantRole),e.streaming&&"forceTransmuxTS"in e.streaming&&(lt("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(lt("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&"useNativeHlsOnSafari"in e.streaming){lt("streaming.useNativeHlsOnSafari configuration","Please Use streaming.useNativeHlsForFairPlay or streaming.preferNativeHls instead.");var r=ct();e.streaming.preferNativeHls=e.streaming.useNativeHlsOnSafari&&r.Ia()==="WEBKIT",delete e.streaming.useNativeHlsOnSafari}if(e.streaming&&typeof e.streaming.liveSync=="boolean"&&(lt("streaming.liveSync","Please Use streaming.liveSync.enabled instead."),r=e.streaming.liveSync,e.streaming.liveSync={},e.streaming.liveSync.enabled=r),e.streaming&&!(e.streaming.liveSync&&"targetLatency"in e.streaming.liveSync)&&("liveSyncMinLatency"in e.streaming||"liveSyncMaxLatency"in e.streaming)){r=e.streaming.liveSyncMinLatency||0;var i=Math.abs((e.streaming.liveSyncMaxLatency||1)-r)/2;e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=r+i,e.streaming.liveSync.targetLatencyTolerance=i}if(e.streaming&&"liveSyncMaxLatency"in e.streaming&&(lt("streaming.liveSyncMaxLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMaxLatency),e.streaming&&"liveSyncMinLatency"in e.streaming&&(lt("streaming.liveSyncMinLatency","Please Use streaming.liveSync.targetLatency and streaming.liveSync.targetLatencyTolerance instead. Or, set the values in your DASH manifest"),delete e.streaming.liveSyncMinLatency),e.streaming&&"liveSyncTargetLatency"in e.streaming&&(lt("streaming.liveSyncTargetLatency","Please Use streaming.liveSync.targetLatency instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatency=e.streaming.liveSyncTargetLatency,delete e.streaming.liveSyncTargetLatency),e.streaming&&"liveSyncTargetLatencyTolerance"in e.streaming&&(lt("streaming.liveSyncTargetLatencyTolerance","Please Use streaming.liveSync.targetLatencyTolerance instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.targetLatencyTolerance=e.streaming.liveSyncTargetLatencyTolerance,delete e.streaming.liveSyncTargetLatencyTolerance),e.streaming&&"liveSyncPlaybackRate"in e.streaming&&(lt("streaming.liveSyncPlaybackRate","Please Use streaming.liveSync.maxPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.maxPlaybackRate=e.streaming.liveSyncPlaybackRate,delete e.streaming.liveSyncPlaybackRate),e.streaming&&"liveSyncMinPlaybackRate"in e.streaming&&(lt("streaming.liveSyncMinPlaybackRate","Please Use streaming.liveSync.minPlaybackRate instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.minPlaybackRate=e.streaming.liveSyncMinPlaybackRate,delete e.streaming.liveSyncMinPlaybackRate),e.streaming&&"liveSyncPanicMode"in e.streaming&&(lt("streaming.liveSyncPanicMode","Please Use streaming.liveSync.panicMode instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicMode=e.streaming.liveSyncPanicMode,delete e.streaming.liveSyncPanicMode),e.streaming&&"liveSyncPanicThreshold"in e.streaming&&(lt("streaming.liveSyncPanicThreshold","Please Use streaming.liveSync.panicThreshold instead."),e.streaming.liveSync=e.streaming.liveSync||{},e.streaming.liveSync.panicThreshold=e.streaming.liveSyncPanicThreshold,delete e.streaming.liveSyncPanicThreshold),e.mediaSource&&"sourceBufferExtraFeatures"in e.mediaSource){lt("mediaSource.sourceBufferExtraFeatures configuration","Please Use mediaSource.addExtraFeaturesToSourceBuffer() instead.");var o=e.mediaSource.sourceBufferExtraFeatures;e.mediaSource.addExtraFeaturesToSourceBuffer=function(){return o},delete e.mediaSource.sourceBufferExtraFeatures}if(e.manifest&&e.manifest.hls&&"useSafariBehaviorForLive"in e.manifest.hls&&(lt("manifest.hls.useSafariBehaviorForLive configuration","Please Use liveSync config to keep on live Edge instead."),delete e.manifest.hls.useSafariBehaviorForLive),e.streaming&&"parsePrftBox"in e.streaming&&(lt("streaming.parsePrftBox configuration","Now fired without needing a configuration."),delete e.streaming.parsePrftBox),e.manifest&&e.manifest.dash&&"enableAudioGroups"in e.manifest.dash&&(lt("manifest.dash.enableAudioGroups configuration","Please Use manifest.enableAudioGroups instead."),e.manifest.enableAudioGroups=e.manifest.dash.enableAudioGroups,delete e.manifest.dash.enableAudioGroups),e.streaming&&"dispatchAllEmsgBoxes"in e.streaming&&(lt("streaming.dispatchAllEmsgBoxes configuration","Please Use mediaSource.dispatchAllEmsgBoxes instead."),e.mediaSource=e.mediaSource||{},e.mediaSource.dispatchAllEmsgBoxes=e.streaming.dispatchAllEmsgBoxes,delete e.streaming.dispatchAllEmsgBoxes),e.streaming&&"autoLowLatencyMode"in e.streaming&&(lt("streaming.autoLowLatencyMode configuration","Please Use streaming.lowLatencyMode instead."),e.streaming.lowLatencyMode=e.streaming.autoLowLatencyMode,delete e.streaming.autoLowLatencyMode),e.manifest&&e.manifest.dash&&"ignoreSupplementalCodecs"in e.manifest.dash&&(lt("manifest.dash.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.dash.ignoreSupplementalCodecs,delete e.manifest.dash.ignoreSupplementalCodecs),e.manifest&&e.manifest.hls&&"ignoreSupplementalCodecs"in e.manifest.hls&&(lt("manifest.hls.ignoreSupplementalCodecs configuration","Please Use manifest.ignoreSupplementalCodecs instead."),e.manifest.ignoreSupplementalCodecs=e.manifest.hls.ignoreSupplementalCodecs,delete e.manifest.hls.ignoreSupplementalCodecs),e.manifest&&e.manifest.dash&&"updatePeriod"in e.manifest.dash&&(lt("manifest.dash.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.dash.updatePeriod,delete e.manifest.dash.updatePeriod),e.manifest&&e.manifest.hls&&"updatePeriod"in e.manifest.hls&&(lt("manifest.hls.updatePeriod configuration","Please Use manifest.updatePeriod instead."),e.manifest.updatePeriod=e.manifest.hls.updatePeriod,delete e.manifest.hls.updatePeriod),e.manifest&&e.manifest.dash&&"ignoreDrmInfo"in e.manifest.dash&&(lt("manifest.dash.ignoreDrmInfo configuration","Please Use manifest.ignoreDrmInfo instead."),e.manifest.ignoreDrmInfo=e.manifest.dash.ignoreDrmInfo,delete e.manifest.dash.ignoreDrmInfo),e.drm&&e.drm.advanced){r=!1;for(var s in e.drm.advanced){var a=e.drm.advanced[s];i=a.videoRobustness,a=a.audioRobustness,"videoRobustness"in e.drm.advanced[s]&&!Array.isArray(e.drm.advanced[s].videoRobustness)&&(e.drm.advanced[s].videoRobustness=[i],r=!0),"audioRobustness"in e.drm.advanced[s]&&!Array.isArray(e.drm.advanced[s].audioRobustness)&&(e.drm.advanced[s].audioRobustness=[a],r=!0)}r&&lt("AdvancedDrmConfiguration's videoRobustness and audioRobustness","These properties are no longer strings but array of strings, please update your usage of these properties.")}return e.streaming&&"forceHTTP"in e.streaming&&(lt("streaming.forceHTTP configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTP=e.streaming.forceHTTP,delete e.streaming.forceHTTP),e.streaming&&"forceHTTPS"in e.streaming&&(lt("streaming.forceHTTPS configuration","Please Use networking.forceHTTP instead."),e.networking=e.networking||{},e.networking.forceHTTPS=e.streaming.forceHTTPS,delete e.streaming.forceHTTPS),e.streaming&&"minBytesForProgressEvents"in e.streaming&&(lt("streaming.minBytesForProgressEvents configuration","Please Use networking.minBytesForProgressEvents instead."),e.networking=e.networking||{},e.networking.minBytesForProgressEvents=e.streaming.minBytesForProgressEvents,delete e.streaming.minBytesForProgressEvents),s=da(this.g,e,Ps(this)),a1(this,n),s},f.vj=function(e){this.Xf=e};function a1(e,t){if(e.xe=new Wh(e.g,e.ya,e.D),e.I){var n=Hi(e.g.manifest);e.h&&e.h.nodeName==="AUDIO"&&(n.disableVideo=!0),e.I.configure(n)}if(e.D&&e.D.configure(e.g.drm),e.l){e.l.configure(e.g.streaming);try{e.m!=us&&ry(e.xe,e.i)&&Gi(e)}catch(i){al(e,i)}e.o&&Ba(e),n=e.l.o,!n||n.allowedByApplication&&n.allowedByKeySystem||Va(e)}if(e.N&&e.N.configure(e.g.networking),e.H&&(e.H.configure(e.g.mediaSource),e.H.Ga=e.g.manifest.segmentRelativeVttTiming),e.u&&sd(e),e.o&&(e.o.configure(e.g.abr),e.g.abr.enabled?e.o.enable():e.o.disable(),x1(e)),e.P&&s1(e),e.Ka&&(e.g.streaming.rebufferingGoal?e.Ka.Ea(.25):e.Ka.stop()),e.i&&ng(e.i.presentationTimeline,e.g.playRangeStart,e.g.playRangeEnd),e.C&&e.C.configure(e.g.ads),e.K&&e.K.configure(e.g.cmcd),e.ua&&e.ua.configure(e.g.cmsd),e.Ba&&e.Ba.configure(e.g.queue),e.m==hi&&e.J.getConfiguration){n=e.J.getConfiguration();var r=!1;t.preferredVideoHdrLevel!=e.g.preferredVideoHdrLevel&&n.hdrLevel!=e.g.preferredVideoHdrLevel&&(n.hdrLevel=e.g.preferredVideoHdrLevel,r=!0),t.preferredVideoLayout!=e.g.preferredVideoLayout&&n.videoLayout!=e.g.preferredVideoLayout&&(n.videoLayout=e.g.preferredVideoLayout,r=!0),t.preferSpatialAudio!=e.g.preferSpatialAudio&&n.spatialAudio!=e.g.preferSpatialAudio&&(n.spatialAudio=e.g.preferSpatialAudio,r=!0),t.preferredVideoRole!=e.g.preferredVideoRole&&n.videoRole!=e.g.preferredVideoRole&&(n.videoRole=e.g.preferredVideoRole,r=!0),r&&(e.J.configure(n),Va(e))}}f.getConfiguration=function(){var e=Ps(this);return da(e,this.g,Ps(this)),e},f.Fj=function(){return this.Xf},f.ei=function(){var e=Ps(this);return da(e,this.g,Ps(this)),p0(this.g,Ps(this))},f.ai=function(){if(this.h){var e=this.h.buffered.length;e=e?this.h.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(t=Math.min(this.h.currentTime+t,this.Sa().end),e>=t)return 1;if(!(e<=this.h.currentTime)&&e<t)return(e-this.h.currentTime)/(t-this.h.currentTime)}return 0},f.Ji=function(){var e=this.getConfiguration(),t;for(t in this.g)delete this.g[t];da(this.g,Ps(this),Ps(this)),a1(this,e)},f.Ud=function(){return this.m},f.ci=function(){return this.i?this.i.type:null},f.We=function(){return this.h},f.Rb=function(){return this.N},f.jd=function(){return this.X},f.$h=function(){return this.C?this.C:null},f.ii=function(){return this.Ba?this.Ba:null},f.U=function(){return this.i&&!this.xa()?this.i.presentationTimeline.U():this.h&&(this.h.src||this.xa())?this.h.duration==1/0:!1},f.Oc=function(){return this.i?this.i.presentationTimeline.Oc():!1},f.ik=function(){if(this.i&&!this.xa()){var e=this.i.variants;return e.length?!e[0].video:!1}return this.h&&(this.h.src||this.xa())?this.h.videoTracks?this.h.videoTracks.length==0:this.h.videoHeight==0:!1},f.oi=function(){if(this.i&&!this.xa()){var e=this.i.variants;return e.length?(e=e[0],e.audio||!e.video?!1:!e.video.codecs.includes(",")):!1}return this.h&&(this.h.src||this.xa())&&this.h.audioTracks?this.h.audioTracks.length==0:!1},f.Sa=function(){if(this.i&&!this.xa()){if(!this.Ua&&this.i.type=="HLS")return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.Tb(),end:e.Cb()}}if(this.h&&(this.h.src||this.xa())&&(e=this.h.seekable)&&e.length){var t=this.g?this.g.playRangeStart:0;t=Math.max(e.start(0),t);var n=this.g?this.g.playRangeEnd:1/0;return e=Math.min(e.end(e.length-1),n),{start:t,end:e}}return{start:0,end:0}},f.fk=function(){this.U()&&(this.h.currentTime=this.Sa().end)},f.jk=function(){return this.Ua},f.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},f.drmInfo=function(){return this.D?this.D.g:null},f.Td=function(){return this.D?this.D.Td():1/0},f.Eg=function(){return this.D?this.D.Eg():[]},f.Ve=function(){return this.D?this.D.Ve():{}},f.Mg=function(){return this.P?this.P.g==pu:!!this.X},f.Ib=function(){return this.h?this.M?this.M.i:1:0},f.Gh=function(e){this.m==hi&&this.l&&u0(this.l,e)},f.pe=function(e,t){t=t===void 0?!0:t,e==0?ut("A trick play rate of 0 is unsupported!"):(this.M.set(e),this.m==hi&&(this.o.playbackRateChanged(e),this.Gh(t&&e!=1)),p1(this,e))},f.Md=function(){var e=this.M.kd();this.m==po&&this.M.set(e),this.m==hi&&(this.M.set(e),this.o.playbackRateChanged(e),this.Gh(!1)),this.Zb.Ra()},f.jc=function(){if(this.i&&!this.xa()){for(var e=this.l?this.l.o:null,t=[],n=0,r=d(this.i.variants),i=r.next();!i.done;i=r.next())if(i=i.value,oa(i)){var o=mt(i);o.active=i==e,o.active||n==1||e==null||i.video!=e.video||i.audio!=e.audio||(o.active=!0),o.active&&n++,t.push(o)}return t}if(this.h&&this.h.audioTracks){var s=v1(this);return e=Array.from(this.h.audioTracks),e.length?e.map(function(a){return Bs(a,s)}):s?[Bs(null,s)]:[]}return[]},f.Fc=function(){if(this.i){if(this.xa())return[];for(var e=this.l?this.l.B:null,t=[],n=d(this.i.textStreams),r=n.next();!r.done;r=n.next()){r=r.value;var i=ur(r);i.active=r==e,t.push(i)}return t}return this.h&&this.h.src&&this.h.textTracks?ad(this).map(function(o){return du(o)}):[]},f.Kj=function(){var e=this.De;return this.i&&(e=this.i.imageStreams),e.map(function(t){return oi(t)})},f.yj=function(e){var t=this,n,r;return G(function(i){return i.h==1?i.g(l1(t,e),2):(n=i.i,n?(r=[],n.segmentIndex.Bb(function(o){var s=u1(o.tilesLayout||n.tilesLayout);if(s)for(var a=s.rows*s.columns,u=(o.j-o.startTime)/a,l=0;l<a;l++){var h=c1(o,n,o.startTime+l*u,s);if(!h)break;r.push(h)}}),n.closeSegmentIndex&&n.closeSegmentIndex(),i.return(r)):i.return(null))})};function u1(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{columns:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}f.Zj=function(e,t){var n=this,r,i,o,s,a,u;return G(function(l){return l.h==1?l.g(l1(n,e),2):(r=l.i,!r||(r.closeSegmentIndex&&(n.tc.has(r)||(i=new Yt(function(){r.closeSegmentIndex(),n.tc.delete(r)}),n.tc.set(r,i)),o=n.tc.get(r),o.ka(5)),s=r.segmentIndex.find(t),s==null)?l.return(null):(a=r.segmentIndex.get(s),(u=u1(a.tilesLayout||r.tilesLayout))?l.return(c1(a,r,t,u)):l.return(null)))})};function l1(e,t){var n,r;return G(function(i){return i.h==1?e.m!=hi&&e.m!=po||(n=e.De,e.i&&(n=e.i.imageStreams),r=n[0],!r)?i.return(null):(t!=null&&(r=n.find(function(o){return o.id==t})),r?r.segmentIndex?i.A(2):i.g(r.createSegmentIndex(),2):i.return(null)):i.return(r)})}function c1(e,t,n,r){var i=t.width||0,o=t.height||0,s=i/r.columns,a=o/r.rows,u=r.columns*r.rows,l=e.j-e.startTime;l=e.B||l/u;var h=e.startTime,g=0,m=0;return u>1&&(m=Math.floor((n-e.startTime)/l+1e-4),h=e.startTime+m*l,g=m%r.columns*s,m=Math.floor(m/r.columns)*a),h>=e.endTime||zu(h,e.endTime,1e-4)?null:(r=!1,(n=e.thumbnailSprite)&&(r=!0,a=n.height,g=n.positionX,m=n.positionY,s=n.width),{segment:e,imageHeight:o,imageWidth:i,height:a,positionX:g,positionY:m,startTime:h,duration:l,uris:e.R(),startByte:e.Ec(),endByte:e.Cc(),width:s,sprite:r,mimeType:e.mimeType||t.mimeType,codecs:e.codecs||t.codecs})}f.nh=function(e){function t(){var r=n.i.textStreams.find(function(i){return i.id==e.id});r&&r!=n.l.B&&(bp(n.B.h,r,!1),Nf(n.l,r),pa(n),gc(n),n.Fd=r.language)}var n=this;this.i&&this.G&&(t(),!this.xa())||function(){if(n.h&&n.h.textTracks){var r=ad(n),i=r.find(function(a){return Si(a)===e.id});if(i){if(n.u instanceof Yr){r=d(r);for(var o=r.next();!o.done;o=r.next()){o=o.value;var s=o===i?n.$?"showing":"hidden":"disabled";o.mode!==s&&(o.mode=s)}}else r=r.find(function(a){return a.mode!=="disabled"}),r!==i&&(r&&(r.mode="disabled",n.j.Na(r,"cuechange"),n.u.remove(0,1/0)),i&&f1(n,i));pa(n),gc(n)}}}()};function f1(e,t){e.j.F(t,"cuechange",function(){e.u.remove(0,Math.max(0,e.h.currentTime-e.g.streaming.bufferBehind));var n={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},r=[],i=Array.from(t.activeCues||[]);i=d(i);for(var o=i.next();!o.done;o=i.next()){if(o=o.value,o.endTime===1/0||o.endTime<o.startTime)o=null;else{var s=new At(o.startTime,o.endTime,o.text);s.line=typeof o.line=="number"?o.line:null,o.lineAlign&&(s.lineAlign=o.lineAlign),s.lineInterpretation=o.snapToLines?xn:1,s.position=typeof o.position=="number"?o.position:null,o.positionAlign&&(s.positionAlign=o.positionAlign),s.size=o.size,s.textAlign=o.align,o.vertical==="lr"?s.writingMode="vertical-lr":o.vertical==="rl"&&(s.writingMode="vertical-rl"),o.region&&(s.region.id=o.region.id,s.region.height=o.region.lines,s.region.heightUnits=2,s.region.regionAnchorX=o.region.regionAnchorX,s.region.regionAnchorY=o.region.regionAnchorY,s.region.scroll=o.region.scroll,s.region.viewportAnchorX=o.region.viewportAnchorX,s.region.viewportAnchorY=o.region.viewportAnchorY,s.region.viewportAnchorUnits=Vr,s.region.width=o.region.width,s.region.widthUnits=Vr),zr(s),o=s}o&&((s=e.g.mediaSource.modifyCueCallback)&&s(o,null,n),r.push(o))}e.u.append(r)}),t.mode=document.pictureInPictureElement?"showing":"hidden"}f.Ef=function(e,t,n){function r(){var o=i.i.variants.find(function(a){return a.id==e.id});if(o&&oa(o)){var s=i.l.o;i.g.abr.enabled&&(s.video!=o.video||s.audio&&o.audio&&s.audio.language==o.audio.language&&s.audio.channelsCount==o.audio.channelsCount&&s.audio.label==o.audio.label)&&ut("Changing tracks while abr manager is enabled will likely result in the selected track being overridden. Consider disabling abr before calling selectVariantTrack()."),i.xa()?pc(i,o,!1,!1,0):pc(i,o,!1,t||!1,n||0),i.J.configure({language:o.language,role:o.audio&&o.audio.roles&&o.audio.roles[0]||"",videoRole:o.video&&o.video.roles&&o.video.roles[0]||"",channelCount:o.audio&&o.audio.channelsCount?o.audio.channelsCount:0,hdrLevel:o.video&&o.video.hdr?o.video.hdr:"",spatialAudio:o.audio&&o.audio.spatialAudio?o.audio.spatialAudio:!1,videoLayout:o.video&&o.video.videoLayout?o.video.videoLayout:"",audioLabel:o.audio&&o.audio.label?o.audio.label:"",videoLabel:o.video&&o.video.label?o.video.label:"",codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:o.audio&&o.audio.codecs?o.audio.codecs:"",activeAudioCodec:s.audio&&s.audio.codecs?s.audio.codecs:"",activeAudioChannelCount:s.audio&&s.audio.channelsCount?s.audio.channelsCount:0,preferredAudioCodecs:i.g.preferredAudioCodecs,preferredAudioChannelCount:i.g.preferredAudioChannelCount}),Ba(i)}}var i=this;t=t===void 0?!1:t,n=n===void 0?0:n,!(this.i&&this.G&&(r(),!this.xa()))&&function(){if(e.originalAudioId&&i.h&&i.h.audioTracks){var o=Array.from(i.h.audioTracks);o=d(o);for(var s=o.next();!s.done;s=o.next())if(s=s.value,Si(s)==e.id){qp(i,s);break}}}()},f.Uk=function(e,t){function n(){var i=r.J.getConfiguration();i.audioCodec=e.codecs||"",i.audioLabel=e.label||"",i.channelCount=e.channelsCount||0,i.language=e.language,i.role=e.roles[0]||"",i.spatialAudio=e.spatialAudio;var o=r.l.o;(o=o&&o.audio)&&(i.activeAudioCodec=o.codecs||"",i.activeAudioChannelCount=o.channelsCount||0),r.J.configure(i),Va(r,!0,t,!1,!1)}var r=this;t=t===void 0?0:t,!(this.i&&this.G&&(n(),!this.xa()))&&function(){if(r.h&&r.h.audioTracks){var i=Rn(e.language),o=Array.from(r.h.audioTracks),s=null;o=d(o);for(var a=o.next();!a.done;a=o.next()){a=a.value;var u=a.language||"und";if(a.label==e.label&&Rn(u)==i&&a.kind==e.roles[0]){s=a;break}}s&&qp(r,s)}}()},f.getAudioTracks=function(){if(this.i&&!this.xa()){var e=this.jc();if(!e.length)return[];var t=e.find(function(o){return o.active});if(!t)return[];var n=e;if(this.m!=hi||this.xa()||(n=e.filter(function(o){return o.originalVideoId===t.originalVideoId&&(o.audioCodec||As.includes(o.audioMimeType||""))})),!n.length)return[];e=new Map,n=d(n);for(var r=n.next();!r.done;r=n.next()){var i=r.value;r=[i.language,i.originalLanguage,i.label||"",(i.audioRoles||[]).join(","),i.channelsCount,i.spatialAudio,i.audioCodec||"",i.accessibilityPurpose||""].join("_"),i={active:i.active,language:i.language,label:i.label,mimeType:i.audioMimeType,codecs:i.audioCodec,primary:i.primary,roles:i.audioRoles||[],accessibilityPurpose:i.accessibilityPurpose,channelsCount:i.channelsCount,audioSamplingRate:i.audioSamplingRate,spatialAudio:i.spatialAudio,originalLanguage:i.originalLanguage},e.has(r)?!e.get(r).active&&i.active&&e.set(r,i):e.set(r,i)}return Array.from(e.values())}return this.h&&this.h.audioTracks?Array.from(this.h.audioTracks).map(function(o){var s=o.language;return s={active:o.enabled,language:Rn(s||"und"),label:o.label,mimeType:null,codecs:null,primary:o.kind=="main",roles:[],accessibilityPurpose:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,originalLanguage:s},o.kind&&(o.kind=="description"&&(s.accessibilityPurpose="visually impaired"),s.roles.push(o.kind)),o.configuration&&(o.configuration.codec&&(s.codecs=o.configuration.codec),o.configuration.sampleRate&&(s.audioSamplingRate=o.configuration.sampleRate),o.configuration.numberOfChannels&&(s.channelsCount=o.configuration.numberOfChannels)),s}):[]},f.Wk=function(e,t,n){t=t===void 0?!1:t,n=n===void 0?0:n;var r=this.jc();if(r.length){var i=r.find(function(s){return s.active});if(i){r=r.filter(function(s){return(s.videoBandwidth||s.bandwidth)==e.bandwidth&&s.width==e.width&&s.height==e.height&&s.frameRate==e.frameRate&&s.pixelAspectRatio==e.pixelAspectRatio&&s.hdr==e.hdr&&s.colorGamut==e.colorGamut&&s.videoLayout==e.videoLayout&&s.videoMimeType==e.mimeType&&s.videoCodec==e.codecs&&Ye(s.videoRoles,e.roles)&&s.videoLabel==e.label});var o;r.length==1?o=r[0]:o=r.find(function(s){return s.audioId===i.audioId}),o||(o=r.find(function(s){return s.language==i.language&&s.label===i.label&&s.channelsCount===i.channelsCount&&s.spatialAudio===i.spatialAudio&&s.audioMimeType===i.audioMimeType&&ri(s.audioCodec||"")===ri(i.audioCodec||"")&&Ye(s.audioRoles,i.audioRoles)})),o&&!o.active&&this.Ef(o,t,n)}}},f.getVideoTracks=function(){if(this.m==po||this.xa())return[];var e=this.jc();if(!e.length)return[];var t=e.find(function(o){return o.active});if(!t)return[];var n=e;if(this.oi()||(n=e.filter(function(o){return o.videoCodec&&o.audioGroupId===t.audioGroupId&&o.originalAudioId===t.originalAudioId?o.audioId===t.audioId?!0:o.language===t.language&&o.label===t.label&&o.channelsCount===t.channelsCount&&o.spatialAudio===t.spatialAudio&&o.audioMimeType===t.audioMimeType&&ri(o.audioCodec||"")===ri(t.audioCodec||"")&&Ye(o.audioRoles,t.audioRoles):!1})),!n.length)return[];e=new Map,n=d(n);for(var r=n.next();!r.done;r=n.next()){r=r.value;var i=r.originalVideoId;i||r.videoId==null||(i=String(r.videoId)),i&&e.set(i,{active:r.active,bandwidth:r.videoBandwidth||r.bandwidth,width:r.width,height:r.height,frameRate:r.frameRate,pixelAspectRatio:r.pixelAspectRatio,hdr:r.hdr,colorGamut:r.colorGamut,videoLayout:r.videoLayout,mimeType:r.videoMimeType,codecs:r.videoCodec,roles:r.videoRoles||[],label:r.videoLabel})}return Array.from(e.values())},f.Aj=function(){return I1(this.jc())},f.Xj=function(){return I1(this.Fc())},f.zj=function(){return Array.from(A1(this.jc()))},f.Wj=function(){return Array.from(A1(this.Fc()))},f.Oi=function(e,t,n,r,i,o,s){function a(){function l(A,k){return A.video||k.video?A.video&&k.video?Math.abs((A.video.height||0)-(k.video.height||0))+Math.abs((A.video.width||0)-(k.video.width||0)):1/0:0}var h=u.l.o;u.J=u.g.adaptationSetCriteriaFactory(),u.J.configure({language:e,role:t||"",videoRole:h.video&&h.video.roles&&h.video.roles[0]||"",channelCount:n||0,hdrLevel:"",spatialAudio:o||!1,videoLayout:"",audioLabel:s||"",videoLabel:"",codecSwitchingStrategy:u.g.mediaSource.codecSwitchingStrategy,audioCodec:i||"",activeAudioCodec:h.audio&&h.audio.codecs?h.audio.codecs:"",activeAudioChannelCount:h.audio&&h.audio.channelsCount?h.audio.channelsCount:0,preferredAudioCodecs:u.g.preferredAudioCodecs,preferredAudioChannelCount:u.g.preferredAudioChannelCount});var g=u.J.create(u.i.variants),m=null;g=d(g.values());for(var S=g.next();!S.done;S=g.next())S=S.value,oa(S)&&(!m||l(m,h)>l(S,h))&&(m=S);m!=h&&(m?(h=mt(m),u.Ef(h,!0,r||0)):Va(u))}var u=this;n=n===void 0?0:n,r=r===void 0?0:r,i=i===void 0?"":i,o=o===void 0?!1:o,s=s===void 0?"":s,!(this.i&&this.G&&(a(),!this.xa()))&&function(){if(u.h&&u.h.audioTracks){var l=_e(u.jc(),e,t||"",!1)[0];l&&u.Ef(l)}}()},f.mh=function(e,t,n){function r(){i.Fd=e,i.Jd=t||"",i.Id=n||!1;var o=_e(i.i.textStreams,i.Fd,i.Jd,i.Id)[0]||null;o&&o!=i.l.B&&(bp(i.B.h,o,!1),i.g.streaming.alwaysStreamText||i.Pg())&&(Nf(i.l,o),pa(i),gc(i))}var i=this;n=n===void 0?!1:n,!(this.i&&this.G&&(r(),!this.xa()))&&function(){var o=_e(i.Fc(),e,t||"",n||!1)[0];o&&i.nh(o)}()},f.Vk=function(e,t,n){function r(){for(var o=null,s=d(i.i.variants),a=s.next();!a.done;a=s.next())if(a=a.value,a.audio.label==e){o=a;break}o!=null&&(i.J=i.g.adaptationSetCriteriaFactory(),i.J.configure({language:o.language,role:"",videoRole:"",channelCount:0,hdrLevel:"",spatialAudio:!1,videoLayout:"",videoLabel:"",audioLabel:e,codecSwitchingStrategy:i.g.mediaSource.codecSwitchingStrategy,audioCodec:"",activeAudioCodec:"",activeAudioChannelCount:0,preferredAudioCodecs:i.g.preferredAudioCodecs,preferredAudioChannelCount:i.g.preferredAudioChannelCount}),Va(i,t,n))}var i=this;t=t===void 0?!0:t,n=n===void 0?0:n,!(this.i&&this.G&&(r(),!this.xa()))&&function(){if(i.h&&i.h.audioTracks){var o=Array.from(i.h.audioTracks),s=null;o=d(o);for(var a=o.next();!a.done;a=o.next())a=a.value,a.label==e&&(s=a);s&&qp(i,s)}}()},f.Pg=function(){var e=this.$;return this.u?this.u.isTextVisible():e},f.Ej=function(){return this.ib.map(function(e){return ur(e)})},f.Cj=function(e){if(lt("getChapters","Please use an getChaptersAsync."),!this.ib.length)return[];var t=Rn(e);if(e=this.ib.filter(function(o){return Rn(o.language)==t}),!e.length)return[];var n=[],r=new Set;e=d(e);for(var i=e.next();!i.done;i=e.next())i=i.value,i.segmentIndex&&i.segmentIndex.Bb(function(o){var s=o.R()[0],a=o.startTime+"-"+o.endTime+"-"+s;o={id:a,title:s,startTime:o.startTime,endTime:o.endTime},r.has(a)||(n.push(o),r.add(a))});return n},f.Dj=function(e){var t=this,n,r,i,o,s,a,u;return G(function(l){switch(l.h){case 1:if(!t.ib.length)return l.return([]);if(n=Rn(e),r=t.ib.filter(function(h){return Rn(h.language)==n}),!r.length)return l.return([]);i=[],o=new Set,s=d(r),a=s.next();case 2:if(a.done){l.A(4);break}if(u=a.value,u.segmentIndex){l.A(5);break}return l.g(u.createSegmentIndex(),5);case 5:u.segmentIndex.Bb(function(h){var g=h.R()[0],m=h.startTime+"-"+h.endTime+"-"+g;h={id:m,title:g,startTime:h.startTime,endTime:h.endTime},o.has(m)||(i.push(h),o.add(m))}),a=s.next(),l.A(2);break;case 4:return l.return(i)}})};function ad(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind!="metadata"&&t.kind!="chapters"&&t.label!="Shaka Player TextTrack"})}function T2(e){return Array.from(e.h.textTracks).find(function(t){return t.label=="Shaka Player TextTrack"})}function E2(e){return Array.from(e.h.textTracks).filter(function(t){return t.kind=="metadata"})}f.rh=function(e){e=!!e,this.$!=e&&(this.$=e,this.m==hi?(this.u.setTextVisibility(e),this.g.streaming.alwaysStreamText||(e?this.l.B||(e=_e(this.i.textStreams,this.Fd,this.Jd,this.Id),e.length>0&&(Nf(this.l,e[0]),pa(this),gc(this))):WI(this.l))):this.h&&this.h.src&&this.h.textTracks&&this.u.setTextVisibility(e),E1(this))},f.Qj=function(){if(this.G)var e=this.G.Kd();else{if(this.O==null)return new Date;if(this.O instanceof Date)return this.O;e=this.O}if(this.i&&!this.xa()){var t=this.i.presentationTimeline;return new Date(((t.m||t.i)+e)*1e3)}return this.h&&this.h.getStartDate?(t=this.h.getStartDate(),t instanceof Date&&!isNaN(t.getTime())?new Date(t.getTime()+e*1e3):null):null},f.gi=function(){if(this.i&&!this.xa()){var e=this.i.presentationTimeline;return e=e.m||e.i,e===null?null:new Date(e*1e3)}return this.h&&this.h.getStartDate?(e=this.h.getStartDate(),e instanceof Date&&!isNaN(e.getTime())?e:null):null},f.Xe=function(){return this.U()&&this.i?this.i.presentationTimeline.Xe():null},f.Bc=function(){if(this.m==hi)return this.H.Bc();var e={total:[],audio:[],video:[],text:[]};return this.m==po&&(e.total=ca(this.h.buffered)),e};function d1(e){if(!e.h||!e.h.currentTime)return null;var t=e.gi();return t?Math.floor(Date.now()-(t.getTime()+e.h.currentTime*1e3)):null}f.getBandwidthEstimate=function(){return this.o?this.o.getBandwidthEstimate():NaN},f.getStats=function(){if(this.m!=hi&&this.m!=po)return{width:NaN,height:NaN,currentCodecs:"",streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,manifestSizeBytes:NaN,bytesDownloaded:NaN,nonFatalErrorCount:NaN,manifestPeriodCount:NaN,manifestGapCount:NaN,switchHistory:[],stateHistory:[]};Zp(this);var e=this.h,t=e.currentTime/e.duration;if(isNaN(t)||this.U()||yC(this.B,Math.round(100*t)),this.G&&(this.B.T=this.G.Hh(),this.B.V=this.G.Jh()),e.getVideoPlaybackQuality&&(t=e.getVideoPlaybackQuality(),vC(this.B,Number(t.droppedVideoFrames),Number(t.totalVideoFrames)),this.B.N=Number(t.corruptedVideoFrames)),SC(this.B,this.D?AA(this.D):NaN),y0(this.B,e.videoWidth||NaN,e.videoHeight||NaN),this.B.l="",this.U()&&(e=d1(this),e!=null&&TC(this.B,e/1e3)),t=this.jc().find(function(i){return i.active}),e=this.Fc().find(function(i){return i.active}),t){if(t.bandwidth){var n=this.M?this.M.i:1,r=n*t.bandwidth;e&&e.bandwidth&&(r+=n*e.bandwidth),this.B.B=r}t.width&&t.height&&y0(this.B,t.width||NaN,t.height||NaN),t=t.codecs,e&&(t+=","+(e.codecs||e.mimeType)),t&&(this.B.l=t)}return this.m!=hi||this.xa()||(this.i&&(this.B.I=this.i.periodCount,this.B.H=this.i.gapCount,this.i.presentationTimeline&&EC(this.B,this.i.presentationTimeline.h)),e=this.o.getBandwidthEstimate(),this.B.u=e),this.m==po&&S0(this.B,NaN),xC(this.B)},f.Ld=function(e,t,n,r,i,o,s){s=s===void 0?!1:s;var a=this,u,l,h,g,m,S,A,k,b,V,B,Z;return G(function(ae){switch(ae.h){case 1:if(a.m!=hi&&a.m!=po)throw new fe(1,7,7004);if(n!="subtitles"&&n!="captions"&&ut("Using a kind value different of `subtitles` or `captions` can cause unwanted issues."),r){ae.A(2);break}return ae.g(ud(a,e),3);case 3:r=ae.i;case 2:if(u=[],a.C&&(u=a.C.getCuePoints()),a.m!=po){ae.A(4);break}return l=ct(),s&&l.Ia()==="WEBKIT"&&(n="forced"),ae.g(x2(a,e,t,n,r,o||"",u),5);case 5:if(h=ae.i,h.track)return Gi(a),pa(a),ae.return(du(h.track));throw new fe(1,2,2012);case 4:if(g=mr,m=a.Sa(),S=m.end-m.start,a.i&&(S=a.i.presentationTimeline.getDuration()),S==1/0)throw new fe(1,4,4033);if(!u.length){ae.A(6);break}return ae.g(ld(a,e),7);case 7:A=ae.i,k=h1(a,A,r,u),b=new Blob([k],{type:"text/vtt"}),e=sp(b),r="text/vtt";case 6:if(V={id:a.ye++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:kf(0,S,[e]),mimeType:r||"",codecs:i||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:o||null,type:g.Oa,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!!s,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ar(r||"",i||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},B=ar(V.mimeType,V.codecs),Z=uu(B),!Z)throw new fe(2,2,2014,r);return a.i.textStreams.push(V),Gi(a),pa(a),ae.return(ur(V))}})},f.Ie=function(e,t){var n=this,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae;return G(function(pe){switch(pe.h){case 1:if(n.m!=hi&&n.m!=po)throw new fe(1,7,7004);if(t){pe.A(2);break}return pe.g(ud(n,e),3);case 3:t=pe.i;case 2:if(t!="text/vtt")throw new fe(1,2,2017,e);if(r=mr,i=n.Sa(),o=i.end-i.start,n.i&&(o=n.i.presentationTimeline.getDuration()),o==1/0)throw new fe(1,4,4045);return pe.g(ld(n,e),4);case 4:if(s=pe.i,a=au(t),!a)throw new fe(2,2,2014,t);for(u=a(),l={periodStart:0,segmentStart:0,segmentEnd:o,vttOffset:0},h=xt(s),g=u.parseMedia(h,l,e,[]),m=[],S=d(g),A=S.next(),k={};!A.done;k={Rf:void 0,ed:void 0},A=S.next())k.ed=A.value,k.Rf=null,b=function(te){return function(){return te.Rf==null&&(te.Rf=kr([e],[te.ed.payload])),te.Rf||[]}}(k),V=new kt(k.ed.startTime,k.ed.endTime,b,0,null,null,0,0,1/0),k.ed.payload.includes("#xywh")&&(B=k.ed.payload.split("#xywh=")[1].split(","),B.length===4&&V.Hf({height:parseInt(B[3],10),positionX:parseInt(B[0],10),positionY:parseInt(B[1],10),width:parseInt(B[2],10)})),m.push(V);if(Z=t,!m.length){pe.A(5);break}return pe.g(ud(n,m[0].R()[0]),6);case 6:Z=pe.i;case 5:return ae={id:n.ye++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new wn(m),mimeType:Z||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:r.Tf,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ar(Z||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},n.m==po?n.De.push(ae):n.i.imageStreams.push(ae),Gi(n),pe.return(oi(ae))}})},f.He=function(e,t,n){var r=this,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B;return G(function(Z){switch(Z.h){case 1:if(r.m!=hi&&r.m!=po)throw new fe(1,7,7004);if(n){Z.A(2);break}return Z.g(ud(r,e),3);case 3:n=Z.i;case 2:if(i=mr,o=r.Sa(),s=o.end-o.start,r.i&&(s=r.i.presentationTimeline.getDuration()),s==1/0)throw new fe(1,4,4055);if(a=au(n),!a)throw new fe(2,2,2014,n);return Z.g(ld(r,e),4);case 4:for(u=Z.i,l=a(),h={periodStart:0,segmentStart:0,segmentEnd:s,vttOffset:0},g=xt(u),m=l.parseMedia(g,h,e,[]),S=[],A=d(m),k=A.next(),b={};!k.done;b={Qe:void 0},k=A.next())b.Qe=k.value,V=new kt(b.Qe.startTime,b.Qe.endTime,function(ae){return function(){return[ae.Qe.payload]}}(b),0,null,null,0,0,1/0),S.push(V);return B={id:r.ye++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new wn(S),mimeType:"text/plain",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:null,type:i.Oa,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ar("text/plain","")]),isAudioMuxedInVideo:!1,baseOriginalId:null},r.ib.push(B),Gi(r),Z.return(ur(B))}})};function ud(e,t){var n;return G(function(r){switch(r.h){case 1:return r.m(2),r.g(qu(t,e.N,e.g.streaming.retryParameters),4);case 4:n=r.i,r.o(3);break;case 2:r.l();case 3:if(n)return r.return(n);throw new fe(1,2,2011,t)}})}function x2(e,t,n,r,i,o,s){var a,u,l,h;return G(function(g){if(g.h==1)return i!="text/vtt"||s.length?g.g(ld(e,t),3):g.A(2);g.h!=2&&(a=g.i,u=h1(e,a,i,s),l=new Blob([u],{type:"text/vtt"}),t=sp(l),i="text/vtt"),h=document.createElement("track");e:{var m=e.K,S=t;try{if(!m.g.enabled){var A=S;break e}var k=Vp(m);k.ot=Kp,k.su=!0;var b=fc(k);A=Jf(S,b);break e}catch(V){In("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",V),A=S;break e}A=void 0}return h.src=A,h.label=o,h.kind=r,h.srclang=n,e.h.getAttribute("crossorigin")||e.h.setAttribute("crossorigin","anonymous"),e.h.appendChild(h),e.Wf.push(h),g.return(h)})}function ld(e,t){var n,r,i,o;return G(function(s){if(s.h==1){n=Ho,r=e.g.streaming.retryParameters,i=jr([t],r),i.method="GET";var a=e.K;try{a.g.enabled&&ol(a,i,{ot:Kp,su:!0})}catch(u){In("CMCD_TEXT_ERROR","Could not generate text CMCD data.",u)}return s.g(e.N.request(n,i).promise,2)}return o=s.i,s.return(o.data)})}function h1(e,t,n,r){var i=au(n);if(i)return n=i(),e={periodStart:0,segmentStart:0,segmentEnd:e.h.duration,vttOffset:0},t=xt(t),t=n.parseMedia(t,e,null,[]),UC(t,r);throw new fe(2,2,2014,n)}f.al=function(e,t){this.ya.width=e,this.ya.height=t},f.ih=function(e){if(this.m==hi){var t=this.l;if(e=e===void 0?.1:e,t.l.g)t=!1;else if(t.D)t=!1;else{for(var n=d(t.h.values()),r=n.next();!r.done;r=n.next())r=r.value,!r.od||r.Ja||r.kb||(r.od=!1,Ti(t,r,e));t=!0}}else t=!1;return t},f.Fg=function(){return ut("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for."),this.i},f.Nj=function(){return this.uc},f.Ij=function(){var e={video:null,audio:null,text:null};if(this.m!=hi)return e;var t=this.l.o,n=this.h.currentTime;t=d([t.video,t.audio,this.l.B]);for(var r=t.next();!r.done;r=t.next())if((r=r.value)&&r.segmentIndex){var i=r.segmentIndex.find(n);i=r.segmentIndex.get(i),i={codecs:i.codecs||r.codecs,mimeType:i.mimeType||r.mimeType,bandwidth:i.bandwidth||r.bandwidth},r.type=="video"?(i.width=r.width,i.height=r.height,e.video=i):r.type=="audio"?e.audio=i:r.type==Bt&&(e.text=i)}return e};function Ps(e){var t=rl();return t.streaming.failureCallback=function(n){if(e.U()){var r=null;n.code==1001||n.code==1002?(r=1,e.g.streaming.lowLatencyMode&&(r=.1)):n.code==1003&&(r=.1),r!=null&&(n.severity=1,e.ih(r))}},t.textDisplayFactory=function(){if(e.ue){var n=e.h;n=!(n.webkitDisplayingFullscreen||n.webkitPresentationMode&&n.webkitPresentationMode!="inline")}else n=!1;return n?new wi(e.h,e.ue):"track"in document.createElement("track")?new Yr(e):new xi},t}f.Vi=function(e){this.ue=e};function w2(e,t){for(var n=new Set,r=d(t.textStreams),i=r.next();!i.done;i=r.next())i=i.value,i.mimeType!="application/cea-608"&&i.mimeType!="application/cea-708"||n.add(i.originalId);for(r=d(t.variants),i=r.next();!i.done;i=r.next())if((i=i.value.video)&&i.closedCaptions){for(var o=d(i.closedCaptions.keys()),s=o.next();!s.done;s=o.next())if(s=s.value,!n.has(s)){var a=s.startsWith("CC")?"application/cea-608":"application/cea-708",u=new Er,l=i.closedCaptions.get(s);a={id:e.ye++,originalId:s,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:a,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:l,originalLanguage:l,label:null,type:Bt,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:i.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set([ar(a,"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},t.textStreams.push(a),n.add(s)}}}function A2(e,t){var n,r,i,o,s;return G(function(a){return a.h==1?(n=e.audio,r=e.video,i=function(u,l){var h,g,m;return G(function(S){return S.h==1?u?u.segmentIndex?S.A(2):S.g(u.createSegmentIndex(),2):S.return(null):(g=(h=u.segmentIndex.Qb(l))?h.next().value:null,g?(m=g.startTime,S.return(m)):S.return(null))})},a.g(i(n,t),2)):a.h!=3?(o=a.i,a.g(i(r,t),3)):(s=a.i,s!=null&&o!=null?a.return(Math.max(s,o)):s!=null?a.return(s):o!=null?a.return(o):a.return(t))})}function dc(e){var t=e.Mg();if(e.B&&e.P&&e.G){if(e.g.streaming.rebufferingGoal==0){var n=e.M;n.j=!1,fp(n)}else n=e.M,n.j=t,fp(n);if(e.K&&(n=e.K,t||n.D||(n.D=!0),n.D&&t&&(n.I=!0,Ai(n,"ps",{Vc:"r"})),n.J=t),Zp(e),n=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts,e.g.streaming.liveSync.dynamicTargetLatency.enabled&&t&&e.Ge<n){n=e.g.streaming.liveSync.dynamicTargetLatency.maxLatency;var r=e.g.streaming.liveSync.targetLatencyTolerance,i=e.g.streaming.liveSync.dynamicTargetLatency.rebufferIncrement;e.V&&(e.V=Math.min(e.V+ ++e.Ge*i,n-r))}}t=new Map().set("buffering",t),e.dispatchEvent(Yn("buffering",t))}function p1(e,t){e.Zb.Ra(),e.Zb.F(e.h,"timeupdate",function(){var n=e.h.currentTime,r=e.Sa(),i=e.U(),o=i?e.g.streaming.safeSeekOffset:0;t>0?i&&t>1&&Math.floor(n)>=Math.floor(r.end)&&e.Md():Math.floor(n)<=Math.floor(r.start+o)&&e.Md()})}function Zp(e){if(e.B&&e.P){var t=e.B.g,n="playing";e.P.g==pu?n="buffering":e.Zd()?n="ended":e.h.paused&&(n="paused");var r=n;if(t.g==null)t.g={timestamp:Date.now()/1e3,state:r,duration:0},t=!0;else{var i=Date.now()/1e3;t.g.duration=i-t.g.timestamp,t.g.state==r?t=!1:(t.h.push(t.g),t.g={timestamp:i,state:r,duration:0},t=!0)}t&&(n=new Map().set("newstate",n),e.dispatchEvent(Yn("statechanged",n)))}}function g1(e){var t=e.h.playbackRate,n=e.U();if(e.g.streaming.vodDynamicPlaybackRate&&!n){var r=e.g.streaming.vodDynamicPlaybackRateLowBufferRate,i=e.ai();i<=e.g.streaming.vodDynamicPlaybackRateBufferRatio?t!=r&&e.pe(r,!1):i==1&&t!==e.M.kd()&&e.Md()}if(n&&(n=e.Sa(),Number.isFinite(n.end)&&!(e.h.currentTime<n.start||e.h.paused))){r=e.g.streaming.liveSync.targetLatencyTolerance,i=e.g.streaming.liveSync.dynamicTargetLatency.enabled;var o=e.g.streaming.liveSync.dynamicTargetLatency.stabilityThreshold;if(e.g.streaming.liveSync&&e.g.streaming.liveSync.enabled)var s=e.g.streaming.liveSync.targetLatency,a=s+r,u=Math.max(0,s-r),l=e.g.streaming.liveSync.maxPlaybackRate,h=e.g.streaming.liveSync.minPlaybackRate;else e.i&&e.i.serviceDescription&&(s=e.i.serviceDescription.targetLatency,e.i.serviceDescription.targetLatency!=null?a=e.i.serviceDescription.targetLatency+r:e.i.serviceDescription.maxLatency!=null&&(a=e.i.serviceDescription.maxLatency),e.i.serviceDescription.targetLatency!=null?u=Math.max(0,e.i.serviceDescription.targetLatency-r):e.i.serviceDescription.minLatency!=null&&(u=e.i.serviceDescription.minLatency),l=e.i.serviceDescription.maxPlaybackRate||e.g.streaming.liveSync.maxPlaybackRate,h=e.i.serviceDescription.minPlaybackRate||e.g.streaming.liveSync.minPlaybackRate);e.V||typeof s!="number"||(e.V=s);var g=e.g.streaming.liveSync.dynamicTargetLatency.maxAttempts;i&&e.Yb&&e.V!==null&&typeof s=="number"&&e.Ge<g&&Date.now()-e.Yb>o*1e3&&(o=e.g.streaming.liveSync.dynamicTargetLatency.minLatency,e.V=Math.max(e.V-(s-o)/2,o+r),e.Yb=Date.now()),i&&e.V!==null&&(a=e.V+r,u=e.V-r),s=n.end-e.h.currentTime,r=0,e.m==po&&(i=e.h.buffered,i.length>0&&(r=i.end(i.length-1),r=Math.max(l,r-n.end))),n=e.g.streaming.liveSync.panicMode,i=e.g.streaming.liveSync.panicThreshold*1e3,o=Date.now()-e.P.i,n&&!h&&(h=e.g.streaming.liveSync.minPlaybackRate),n&&h&&o<=i?t!=h&&e.pe(h,!1):a!=null&&l&&s-r>a?(t!=l&&e.pe(l,!1),e.Yb=null):u!=null&&h&&s-r<u?(t!=h&&e.pe(h,!1),e.Yb=null):t!==e.M.kd()&&(e.Md(),e.Yb=Date.now())}}function hc(e,t,n){return(zu(t,n,.01)||n>t)&&e.Vf<t?(e.Vf=t,!0):!1}function cd(e){if(e.h){var t=e.Sa();if(t=t.end-t.start,t=t>0?e.h.currentTime/t:0,!isNaN(t)){if(t*=100,hc(e,0,t))var n=Yn("started");else hc(e,25,t)?n=Yn("firstquartile"):hc(e,50,t)?n=Yn("midpoint"):hc(e,75,t)?n=Yn("thirdquartile"):((hc(e,100,t)||t>100)&&(n=Yn("complete")),e.g&&e.g.playRangeEnd!=1/0&&e.Zd()&&e.h.pause());n&&e.dispatchEvent(n)}}}function Ba(e){try{oy(e.xe,e.i)}catch(n){return al(e,n),!1}var t=ju(e.i.variants);return t=e.J.create(t),e=e.o.setVariants(Array.from(t.values())),typeof e=="boolean"?e:!0}function m1(e,t){if(t=t===void 0?!1:t,Ba(e)){if(!e.g.abr.enabled){var n=e.J;if(typeof n.getLastAdaptationSet!="function"&&(lt("AdaptationSetCriteria w/o getLastAdaptationSet","Please use an AdaptationSetCriteria with getLastAdaptationSet."),n.getLastAdaptationSet=function(){return null}),(n=n.getLastAdaptationSet())&&(n=Array.from(n.values()),n.length)){var r=e.l.o;if(r&&r.video&&(n=n.find(function(i){return i.video==r.video})))return n}}return e.o.chooseVariant(t)}return null}function Va(e,t,n,r,i){t=t===void 0?!0:t,n=n===void 0?0:n,r=r===void 0?!1:r,i=i===void 0?!0:i;var o=m1(e);o&&pc(e,o,i,t,n,r)}function pc(e,t,n,r,i,o){o=o===void 0?!1:o;var s=e.l.o;if(t==s)r&&l0(e.l,t,r,i,!0);else{var a=e.B.h;if(a.h!=t&&(a.h=t,a.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),l0(e.l,t,r,i,o,n),r=null,s&&(r=mt(s)),s=mt(t),s.active=!0,e.T&&(i=e.T,t=t.video)){switch(t.dependencyStream&&(t=t.dependencyStream),o=0,a=-1,t.mimeType){case"video/webm":o=1;break;case"video/mp4":o=2}switch(e.ci()){case"DASH":a=1;break;case"HLS":a=0}i.g&&(i.g.setLevelSwitching(t.id,!0),i.g.setContainerFormat(o),i.j||i.g.setStreamingFormat(a))}n?(n=new Map().set("oldTrack",r).set("newTrack",s),n=Yn("adaptation",n),xu(e,n)):y1(e,r,s),S1(e,r,s)}}function qp(e,t){var n=Array.from(e.h.audioTracks).find(function(i){return i.enabled});if(t.enabled=!0,n){t.id!==n.id&&(n.enabled=!1);var r=v1(e);n=Bs(n,r),t=Bs(t,r),y1(e,n,t),S1(e,n,t)}}function v1(e){return e.h&&e.h.videoTracks?Array.from(e.h.videoTracks).find(function(t){return t.selected}):null}function Gi(e){var t=Yn("trackschanged");xu(e,t),T1(e)}function y1(e,t,n){t=new Map().set("oldTrack",t).set("newTrack",n),t=Yn("variantchanged",t),xu(e,t)}function S1(e,t,n){var r=!1;t&&t.audioId==n.audioId&&t.audioGroupId==n.audioGroupId||(r=!0),r&&T1(e)}function T1(e){var t=Yn("audiotrackschanged");xu(e,t)}function pa(e){var t=Yn("textchanged");xu(e,t)}function E1(e){var t=Yn("texttrackvisibility");xu(e,t)}function x1(e){e.g.abr.enabled||eg(e);var t=new Map().set("newStatus",e.g.abr.enabled);xu(e,Yn("abrstatuschanged",t))}function gc(e){var t=e.Fc().find(function(n){return n.active});t&&e.u&&e.u.setTextLanguage&&e.u.setTextLanguage(t.language)}function eg(e,t){if(t=t===void 0?!0:t,e.m==hi){e.Ae.stop();for(var n=d(e.i.variants),r=n.next();!r.done;r=n.next())r.value.disabledUntilTime=0;t&&Ba(e)}}f.disableStream=function(e,t){if(!this.g.abr.enabled||this.m===us||!navigator.onLine||t==0||!this.i)return!1;if(this.i.variants.some(function(a){var u=a[e.type];return u&&u.id!==e.id&&!a.disabledUntilTime?e.type=="audio"?e.language===u.language:!0:!1})){for(var n=!1,r=!1,i=d(this.i.variants),o=i.next();!o.done;o=i.next()){o=o.value;var s=o[e.type];s&&(s.id===e.id?(o.disabledUntilTime=Date.now()/1e3+t,n=!0):s.trickModeVideo&&s.trickModeVideo.id==e.id&&(r=!0))}return!n&&r?!1:(this.Ae.Ea(1),t=this.Bc().video.reduce(function(a,u){return a+u.end-u.start},0),Va(this,!1,t,!0,!1),!0)}return!1};function al(e,t){var n,r,i,o,s;return G(function(a){switch(a.h){case 1:if(e.m==us)return a.return();if(t.severity===1&&e.B.M++,n=!0,!(e.Ua&&e.i&&e.l)||t.code!=3016&&t.code!=3014&&t.code!=3015&&t.code!=3024&&t.code!=3018){a.A(2);break}return r=ct(),r.Ia()==="WEBKIT"&&t.code==3016?a.return():(a.m(3),a.g(Vf(e.l),5));case 5:i=a.i,n=!i,i&&(o=Yn("mediasourcerecovered"),e.dispatchEvent(o)),a.o(2);break;case 3:a.l(),n=!0;case 2:if(!n)return a.return();t.severity===2&&eg(e,!1),s=Yn("error",new Map().set("detail",t)),e.dispatchEvent(s),s.defaultPrevented&&(t.handled=!0),a.j()}})}f.addFont=function(e,t){return oI(e,t)};function mc(e,t,n,r){r=r===void 0?e:r,e=new Map().set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,timescale:n.timescale,eventElement:n.eventElement,eventNode:n.eventNode}),r.dispatchEvent(Yn(t,e))}function w1(e,t,n,r){r=r===void 0?!1:r,t=new Map().set("mediaQuality",{bandwidth:t.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate,height:t.height,mimeType:t.mimeType,channelsCount:t.channelsCount,pixelAspectRatio:t.pixelAspectRatio,width:t.width,label:t.label,roles:t.roles,language:t.language}).set("position",n),e.dispatchEvent(Yn(r?"audiotrackchanged":"mediaqualitychanged",t))}function tg(e,t){if(t=t===void 0?!0:t,!e.h.error)return t?new fe(2,3,3016):null;var n=e.h.error.code;return!t&&n==1?null:((t=e.h.error.msExtendedCode)&&(t<0&&(t+=4294967296),t=t.toString(16)),new fe(2,3,3016,n,t,e.h.error.message))}function I2(e,t){var n=Yn("keystatuschanged");e.dispatchEvent(n);var r=Object.keys(t);r.length==1&&r[0]==""&&(r=["00"],t={"00":t[""]});var i=r.length==1&&r[0]=="00";if(n=!1,r.length){r=e.keySystem();for(var o=Vu(e.g.drm.clearKeys),s=function(A,k){A.allowedByKeySystem=!0,k=d(k);for(var b=k.next();!b.done;b=k.next())b=b.value,((b=t[i?"00":b])||e.D.H)&&(A.allowedByKeySystem=A.allowedByKeySystem&&!!b&&!sy.includes(b))},a=d(e.i.variants),u=a.next();!u.done;u=a.next()){u=u.value;var l=gt(u);l=d(l);for(var h=l.next();!h.done;h=l.next()){h=h.value;var g=u.allowedByKeySystem;if(h.keyIds.size)if(h.drmInfos.length&&!o.size&&e.i.type=="HLS")for(var m=d(h.drmInfos),S=m.next();!S.done;S=m.next())S=S.value,S.keySystem==r&&(S.keyIds.size?s(u,S.keyIds):s(u,h.keyIds));else s(u,h.keyIds);g!=u.allowedByKeySystem&&(n=!0)}}}n&&(Gi(e),(n=e.l.o)&&!n.allowedByKeySystem?Va(e):Ba(e))}function ng(e,t,n){t>0&&(e.U()||e.Ui(t)),t=e.getDuration(),n<t&&(e.U()||e.ub(n))}function xu(e,t){G(function(n){if(n.h==1)return n.g(Promise.resolve(),2);e.m!=us&&e.dispatchEvent(t),n.j()})}function A1(e){var t=new Set;e=d(e);for(var n=e.next();!n.done;n=e.next())n=n.value,n.language?t.add(Rn(n.language)):t.add("und");return t}function I1(e){for(var t=new Map,n=new Map,r=0;r<e.length;r++){var i=e[r],o="und",s=[];i.language&&(o=Rn(i.language)),i.type=="variant"?s=i.audioRoles:s=i.roles,s&&s.length||(s=[""]),t.has(o)||t.set(o,new Set),s=d(s);for(var a=s.next();!a.done;a=s.next())a=a.value,t.get(o).add(a),i.label&&(n.has(o)||n.set(o,new Map),n.get(o).set(a,i.label))}var u=[];return t.forEach(function(l,h){l=d(l);for(var g=l.next();!g.done;g=l.next()){g=g.value;var m=null;n.has(h)&&n.get(h).has(g)&&(m=n.get(h).get(g)),u.push({language:h,role:g,label:m})}}),u}f.xa=function(){return this.h&&this.h.remote?this.h.remote.state!="disconnected":!1},f.Zd=function(){return!this.h||this.h.ended?!0:this.Ua&&!this.U()&&this.h.currentTime>=this.Sa().end},be("shaka.Player",Re),Re.prototype.isEnded=Re.prototype.Zd,Re.prototype.isRemotePlayback=Re.prototype.xa,Re.prototype.addFont=Re.prototype.addFont,Re.prototype.setVideoContainer=Re.prototype.Vi,Re.prototype.getFetchedPlaybackInfo=Re.prototype.Ij,Re.prototype.getManifestParserFactory=Re.prototype.Nj,Re.prototype.getManifest=Re.prototype.Fg,Re.prototype.retryStreaming=Re.prototype.ih,Re.prototype.setMaxHardwareResolution=Re.prototype.al,Re.prototype.addChaptersTrack=Re.prototype.He,Re.prototype.addThumbnailsTrack=Re.prototype.Ie,Re.prototype.addTextTrackAsync=Re.prototype.Ld,Re.prototype.getStats=Re.prototype.getStats,Re.prototype.getBufferedInfo=Re.prototype.Bc,Re.prototype.getSegmentAvailabilityDuration=Re.prototype.Xe,Re.prototype.getPresentationStartTimeAsDate=Re.prototype.gi,Re.prototype.getPlayheadTimeAsDate=Re.prototype.Qj,Re.prototype.setTextTrackVisibility=Re.prototype.rh,Re.prototype.getChaptersAsync=Re.prototype.Dj,Re.prototype.getChapters=Re.prototype.Cj,Re.prototype.getChaptersTracks=Re.prototype.Ej,Re.prototype.isTextTrackVisible=Re.prototype.Pg,Re.prototype.selectVariantsByLabel=Re.prototype.Vk,Re.prototype.selectTextLanguage=Re.prototype.mh,Re.prototype.selectAudioLanguage=Re.prototype.Oi,Re.prototype.getTextLanguages=Re.prototype.Wj,Re.prototype.getAudioLanguages=Re.prototype.zj,Re.prototype.getTextLanguagesAndRoles=Re.prototype.Xj,Re.prototype.getAudioLanguagesAndRoles=Re.prototype.Aj,Re.prototype.getVideoTracks=Re.prototype.getVideoTracks,Re.prototype.selectVideoTrack=Re.prototype.Wk,Re.prototype.getAudioTracks=Re.prototype.getAudioTracks,Re.prototype.selectAudioTrack=Re.prototype.Uk,Re.prototype.selectVariantTrack=Re.prototype.Ef,Re.prototype.selectTextTrack=Re.prototype.nh,Re.prototype.getThumbnails=Re.prototype.Zj,Re.prototype.getAllThumbnails=Re.prototype.yj,Re.prototype.getImageTracks=Re.prototype.Kj,Re.prototype.getTextTracks=Re.prototype.Fc,Re.prototype.getVariantTracks=Re.prototype.jc,Re.prototype.cancelTrickPlay=Re.prototype.Md,Re.prototype.trickPlay=Re.prototype.pe,Re.prototype.useTrickPlayTrackIfAvailable=Re.prototype.Gh,Re.prototype.getPlaybackRate=Re.prototype.Ib,Re.prototype.isBuffering=Re.prototype.Mg,Re.prototype.getKeyStatuses=Re.prototype.Ve,Re.prototype.getActiveSessionsMetadata=Re.prototype.Eg,Re.prototype.getExpiration=Re.prototype.Td,Re.prototype.drmInfo=Re.prototype.drmInfo,Re.prototype.keySystem=Re.prototype.keySystem,Re.prototype.isFullyLoaded=Re.prototype.jk,Re.prototype.goToLive=Re.prototype.fk,Re.prototype.seekRange=Re.prototype.Sa,Re.prototype.isVideoOnly=Re.prototype.oi,Re.prototype.isAudioOnly=Re.prototype.ik,Re.prototype.isInProgress=Re.prototype.Oc,Re.prototype.isLive=Re.prototype.U,Re.prototype.getQueueManager=Re.prototype.ii,Re.prototype.getAdManager=Re.prototype.$h,Re.prototype.getAssetUri=Re.prototype.jd,Re.prototype.getNetworkingEngine=Re.prototype.Rb,Re.prototype.getMediaElement=Re.prototype.We,Re.prototype.getManifestType=Re.prototype.ci,Re.prototype.getLoadMode=Re.prototype.Ud,Re.prototype.resetConfiguration=Re.prototype.Ji,Re.prototype.getBufferFullness=Re.prototype.ai,Re.prototype.getNonDefaultConfiguration=Re.prototype.ei,Re.prototype.getConfigurationForLowLatency=Re.prototype.Fj,Re.prototype.getConfiguration=Re.prototype.getConfiguration,Re.prototype.configurationForLowLatency=Re.prototype.vj,Re.prototype.configure=Re.prototype.configure,Re.prototype.releaseAllMutexes=Re.prototype.Mk,Re.prototype.destroyAllPreloads=Re.prototype.lg,Re.prototype.preload=Re.prototype.preload,Re.prototype.detachAndSavePreload=Re.prototype.Wh,Re.prototype.unloadAndSavePreload=Re.prototype.gj,Re.prototype.load=Re.prototype.load,Re.prototype.updateStartTime=Re.prototype.ll,Re.prototype.unload=Re.prototype.xc,Re.prototype.detach=Re.prototype.detach,Re.prototype.attachCanvas=Re.prototype.nj,Re.prototype.attach=Re.prototype.Ob,Re.probeSupport=function(e){e=e===void 0?!0:e;var t,n,r,i,o,s,a;return G(function(u){switch(u.h){case 1:if(t={},!e){u.A(2);break}return u.g(kA(),3);case 3:t=u.i;case 2:return n=Js(),r=dI(),i=ct(),u.g(i.fc(),4);case 4:return o=u.i,s={manifest:n,media:r,drm:t,hardwareResolution:o},a=M1,a.forEach(function(l,h){s[h]=l()}),u.return(s)}})},Re.isBrowserSupported=function(){return R.Promise||ut("A Promise implementation or polyfill is required"),!(R.Promise&&R.Uint8Array&&Array.prototype.forEach)||(navigator.userAgent||"").includes("Trident/")?!1:(ct(),Hs()?!0:yu().canPlayType("application/x-mpegurl")!="")},Re.setQueueManagerFactory=function(e){hd=e},Re.setAdManagerFactory=function(e){dd=e},Re.registerSupportPlugin=Q0,Re.prototype.destroy=Re.prototype.destroy;var us=0,fd=1,hi=2,po=3;Re.LoadMode={DESTROYED:us,NOT_LOADED:fd,MEDIA_SOURCE:hi,SRC_EQUALS:po},Re.version="v4.16.24";var C1=["4","16"];Cr=new function(e){this.g=e,this.i=un,this.h=Ur}(new Dn(Number(C1[0]),Number(C1[1])));var M1=new Map,dd=null,hd=null;function P1(){this.g=[],this.i=this.m=this.l=this.j=this.h=0}function C2(e){return e.g.length?e.g.reduce(function(t,n){return t+n},0)/e.g.length:0}function bt(e,t,n){var r=this;this.g=e,this.h=t,this.m=n,this.i=!1,this.j=this.h.getVolume(),this.l=new Et,this.l.F(this.h,google.ima.AdEvent.Type.PAUSED,function(){r.i=!0}),this.l.F(this.h,google.ima.AdEvent.Type.RESUMED,function(){r.i=!1})}f=bt.prototype,f.needsSkipUI=function(){return!1},f.isClientRendering=function(){return!0},f.hasCustomClick=function(){return!0},f.isUsingAnotherMediaElement=function(){return!0},f.getDuration=function(){return this.g.getDuration()},f.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},f.getRemainingTime=function(){return this.h.getRemainingTime()},f.isPaused=function(){return this.i},f.isSkippable=function(){return this.g.getSkipTimeOffset()>=0},f.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},f.canSkipNow=function(){return this.h.getAdSkippableState()},f.skip=function(){return this.h.skip()},f.pause=function(){return this.h.pause()},f.play=function(){return this.h.resume()},f.getVolume=function(){return this.h.getVolume()},f.setVolume=function(e){return this.m.volume=e,this.h.setVolume(e)},f.isMuted=function(){return this.h.getVolume()==0},f.isLinear=function(){return this.g.isLinear()},f.resize=function(e,t){this.h.resize(e,t)},f.setMuted=function(e){(this.m.muted=e)?(this.j=this.getVolume(),this.h.setVolume(0)):this.h.setVolume(this.j)},f.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},f.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},f.getTitle=function(){return this.g.getTitle()},f.getDescription=function(){return this.g.getDescription()},f.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},f.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},f.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},f.getVastAdId=function(){return""},f.getAdId=function(){return this.g.getAdId()},f.getCreativeAdId=function(){return this.g.getCreativeAdId()},f.getAdvertiserName=function(){return this.g.getAdvertiserName()},f.getMediaUrl=function(){return this.g.getMediaUrl()},f.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},f.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},f.release=function(){this.h=this.g=null},be("shaka.ads.ClientSideAd",bt),bt.prototype.release=bt.prototype.release,bt.prototype.getPodIndex=bt.prototype.getPodIndex,bt.prototype.getTimeOffset=bt.prototype.getTimeOffset,bt.prototype.getMediaUrl=bt.prototype.getMediaUrl,bt.prototype.getAdvertiserName=bt.prototype.getAdvertiserName,bt.prototype.getCreativeAdId=bt.prototype.getCreativeAdId,bt.prototype.getAdId=bt.prototype.getAdId,bt.prototype.getVastAdId=bt.prototype.getVastAdId,bt.prototype.getVastMediaWidth=bt.prototype.getVastMediaWidth,bt.prototype.getVastMediaHeight=bt.prototype.getVastMediaHeight,bt.prototype.getVastMediaBitrate=bt.prototype.getVastMediaBitrate,bt.prototype.getDescription=bt.prototype.getDescription,bt.prototype.getTitle=bt.prototype.getTitle,bt.prototype.getPositionInSequence=bt.prototype.getPositionInSequence,bt.prototype.getSequenceLength=bt.prototype.getSequenceLength,bt.prototype.setMuted=bt.prototype.setMuted,bt.prototype.resize=bt.prototype.resize,bt.prototype.isLinear=bt.prototype.isLinear,bt.prototype.isMuted=bt.prototype.isMuted,bt.prototype.setVolume=bt.prototype.setVolume,bt.prototype.getVolume=bt.prototype.getVolume,bt.prototype.play=bt.prototype.play,bt.prototype.pause=bt.prototype.pause,bt.prototype.skip=bt.prototype.skip,bt.prototype.canSkipNow=bt.prototype.canSkipNow,bt.prototype.getTimeUntilSkippable=bt.prototype.getTimeUntilSkippable,bt.prototype.isSkippable=bt.prototype.isSkippable,bt.prototype.isPaused=bt.prototype.isPaused,bt.prototype.getRemainingTime=bt.prototype.getRemainingTime,bt.prototype.getMinSuggestedDuration=bt.prototype.getMinSuggestedDuration,bt.prototype.getDuration=bt.prototype.getDuration,bt.prototype.isUsingAnotherMediaElement=bt.prototype.isUsingAnotherMediaElement,bt.prototype.hasCustomClick=bt.prototype.hasCustomClick,bt.prototype.isClientRendering=bt.prototype.isClientRendering,bt.prototype.needsSkipUI=bt.prototype.needsSkipUI;function fr(){}function k1(e,t){var n=[];e=d(Mn(e,"Ad"));for(var r=e.next();!r.done;r=e.next())if((r=Pn(r.value,"InLine"))&&(r=Pn(r,"Creatives"))){r=d(Mn(r,"Creative"));for(var i=r.next();!i.done;i=r.next()){i=i.value;var o=Pn(i,"Linear");if(o&&M2(n,t,o),i=Pn(i,"NonLinearAds")){i=Mn(i,"NonLinear"),i=d(i);for(var s=i.next();!s.done;s=i.next())e:{o=n;var a=t,u=s.value,l=Pn(u,"StaticResource");if(l)s=l.attributes.creativeType;else{if(l=Pn(u,"HTMLResource"),!l)break e;s="text/html"}if(l=_r(l)){s==="text/html"&&(l="data:text/html;charset=UTF-8,"+encodeURIComponent(l));var h=wt(u,"width",ne)||wt(u,"expandedWidth",ne),g=wt(u,"height",ne)||wt(u,"expandedHeight",ne);if(h||g){var m=null,S=Pn(u,"NonLinearClickThrough");S&&(S=_r(S))&&(m=S),S=null,(u=u.attributes.minSuggestedDuration)&&(S=Ts(u)),u=0,a!=null&&(u=a),o.push({id:null,groupId:null,startTime:u,endTime:null,uri:l,mimeType:s,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:S,once:!0,pre:a==null,post:a==1/0,timelineRange:!1,loop:!1,overlay:{viewport:{x:0,y:0},topLeft:{x:0,y:0},size:{x:h||0,y:g||0}},displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:m})}}}}}}return n}function M2(e,t,n){var r=0;t!=null&&(r=t);var i=null;n.attributes.skipoffset&&(i=Ts(n.attributes.skipoffset),isNaN(i)&&(i=null));var o=Pn(n,"MediaFiles");if(o){var s=null;for((n=Pn(n,"VideoClicks"))&&(n=Pn(n,"ClickThrough"))&&(n=_r(n))&&(s=n),o=n=Mn(o,"MediaFile"),n=n.filter(function(u){return u.attributes.delivery=="streaming"}),n.length&&(o=n),o=o.sort(function(u,l){return(parseInt(l.attributes.height,10)||0)-(parseInt(u.attributes.height,10)||0)}),o=d(o),n=o.next();!n.done;n=o.next())if(n=n.value,!n.attributes.apiFramework){var a=_r(n);if(a){e.push({id:null,groupId:null,startTime:r,endTime:null,uri:a,mimeType:n.attributes.type||null,isSkippable:i!=null,skipOffset:i,skipFor:null,canJump:!1,resumeOffset:0,playoutLimit:null,once:!0,pre:t==null,post:t==1/0,timelineRange:!1,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:s});break}}}}function P2(e){var t=[];e=d(Mn(e,"vmap:AdBreak"));for(var n=e.next();!n.done;n=e.next()){var r=n.value,i=r.attributes.timeOffset;i&&(n=null,i=="start"?n=null:i=="end"?n=1/0:n=Ts(i),(r=Pn(r,"vmap:AdSource"))&&(r=Pn(r,"vmap:AdTagURI"))&&(r=vr(r))&&t.push({time:n,uri:r}))}return t}be("shaka.ads.Utils",fr),fr.ADS_LOADED="ads-loaded",fr.AD_STARTED="ad-started",fr.AD_FIRST_QUARTILE="ad-first-quartile",fr.AD_MIDPOINT="ad-midpoint",fr.AD_THIRD_QUARTILE="ad-third-quartile",fr.AD_COMPLETE="ad-complete",fr.AD_STOPPED="ad-stopped",fr.AD_SKIPPED="ad-skipped",fr.AD_VOLUME_CHANGED="ad-volume-changed",fr.AD_MUTED="ad-muted",fr.AD_PAUSED="ad-paused",fr.AD_RESUMED="ad-resumed",fr.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",fr.CUEPOINTS_CHANGED="ad-cue-points-changed",fr.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",fr.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",fr.AD_CLICKED="ad-clicked",fr.AD_PROGRESS="ad-progress",fr.AD_BUFFERING="ad-buffering",fr.AD_IMPRESSION="ad-impression",fr.AD_DURATION_CHANGED="ad-duration-changed",fr.AD_CLOSED="ad-closed",fr.AD_LOADED="ad-loaded",fr.ALL_ADS_COMPLETED="all-ads-completed",fr.AD_LINEAR_CHANGED="ad-linear-changed",fr.AD_METADATA="ad-metadata",fr.AD_RECOVERABLE_ERROR="ad-recoverable-error",fr.AD_ERROR="ad-error",fr.AD_BREAK_READY="ad-break-ready",fr.AD_INTERACTION="ad-interaction",fr.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",fr.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",fr.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested";function pd(e,t,n,r,i){var o=this;this.u=e,this.i=t,this.G=!1,this.B=this.o=null,this.H=NaN,this.l=i,this.j=null,this.h=new Et,google.ima.settings.setLocale(n),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),this.D=new google.ima.AdDisplayContainer(this.u,this.i),this.D.initialize(),this.m=new google.ima.AdsLoader(this.D),this.m.getSettings().setPlayerType("shaka-player"),this.m.getSettings().setPlayerVersion("v4.16.24"),this.g=null,this.C=r||new google.ima.AdsRenderingSettings,this.h.F(this.m,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,function(s){k2(o,s)}),this.h.F(this.m,google.ima.AdErrorEvent.Type.AD_ERROR,function(s){b1(o,s)}),this.h.F(this.i,"ended",function(){o.m.contentComplete()}),this.h.Aa(this.i,"play",function(){o.G=!0})}pd.prototype.configure=function(e){this.o=e},pd.prototype.stop=function(){this.g&&this.g.stop(),this.u&&Jl(this.u)},pd.prototype.release=function(){this.stop(),this.B&&this.B.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.m.destroy(),this.D.destroy()};function b1(e,t){t.getError(),t=new Map().set("originalEvent",t),e.l(new yt("ad-error",t)),gd(e,null),e.l(new yt("ad-cue-points-changed",new Map().set("cuepoints",[])))}function k2(e,t){if(e.l(new yt("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.H))),e.o.customPlayheadTracker){var n={currentTime:e.i.currentTime};e.g=t.getAdsManager(n,e.C),e.i.muted?e.g.setVolume(0):e.g.setVolume(e.i.volume),e.h.F(e.i,"timeupdate",function(){e.i.duration&&(n.currentTime=e.i.currentTime)}),e.h.F(e.i,"volumechange",function(){e.j&&(e.j.setVolume(e.i.volume),e.i.muted&&e.j.setMuted(!0))})}else e.g=t.getAdsManager(e.i,e.C);e.l(new yt("ima-ad-manager-loaded",new Map().set("imaAdManager",e.g)));var r=e.g.getCuePoints();if(r.length){t=[],r=d(r);for(var i=r.next();!i.done;i=r.next())t.push({start:i.value,end:null});e.l(new yt("ad-cue-points-changed",new Map().set("cuepoints",t)))}b2(e);try{e.g.init(e.i.offsetWidth,e.i.offsetHeight),e.h.F(e.i,"loadeddata",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),"ResizeObserver"in R?(e.B=new ResizeObserver(function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),e.B.observe(e.i)):e.h.F(document,"fullscreenchange",function(){e.g.resize(e.i.offsetWidth,e.i.offsetHeight)}),e.G||e.o.skipPlayDetection?e.g.start():e.h.Aa(e.i,"play",function(){e.G=!0,e.g.start()})}catch{gd(e,null)}}function b2(e){function t(n,r){n=new Map().set("originalEvent",n),e.l(new yt(r,n))}e.h.F(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,function(n){b1(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,function(n){R1(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.STARTED,function(n){R1(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,function(n){t(n,"ad-first-quartile")}),e.h.F(e.g,google.ima.AdEvent.Type.MIDPOINT,function(n){t(n,"ad-midpoint")}),e.h.F(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,function(n){t(n,"ad-third-quartile")}),e.h.F(e.g,google.ima.AdEvent.Type.COMPLETE,function(n){t(n,"ad-complete")}),e.h.F(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,function(n){gd(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,function(n){t(n,"all-ads-completed"),gd(e,n)}),e.h.F(e.g,google.ima.AdEvent.Type.SKIPPED,function(n){t(n,"ad-skipped")}),e.h.F(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,function(n){t(n,"ad-volume-changed")}),e.h.F(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,function(n){t(n,"ad-muted")}),e.h.F(e.g,google.ima.AdEvent.Type.PAUSED,function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))}),e.h.F(e.g,google.ima.AdEvent.Type.RESUMED,function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))}),e.h.F(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,function(n){e.j&&t(n,"ad-skip-state-changed")}),e.h.F(e.g,google.ima.AdEvent.Type.CLICK,function(n){t(n,"ad-clicked")}),e.h.F(e.g,google.ima.AdEvent.Type.AD_PROGRESS,function(n){t(n,"ad-progress")}),e.h.F(e.g,google.ima.AdEvent.Type.AD_BUFFERING,function(n){t(n,"ad-buffering")}),e.h.F(e.g,google.ima.AdEvent.Type.IMPRESSION,function(n){t(n,"ad-impression")}),e.h.F(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,function(n){t(n,"ad-duration-changed")}),e.h.F(e.g,google.ima.AdEvent.Type.USER_CLOSE,function(n){t(n,"ad-closed")}),e.h.F(e.g,google.ima.AdEvent.Type.LOADED,function(n){t(n,"ad-loaded")}),e.h.F(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,function(n){t(n,"ad-linear-changed")}),e.h.F(e.g,google.ima.AdEvent.Type.AD_METADATA,function(n){t(n,"ad-metadata")}),e.h.F(e.g,google.ima.AdEvent.Type.LOG,function(n){t(n,"ad-recoverable-error")}),e.h.F(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,function(n){t(n,"ad-break-ready")}),e.h.F(e.g,google.ima.AdEvent.Type.INTERACTION,function(n){t(n,"ad-interaction")})}function R1(e,t){var n=t.getAd();n?(e.j=new bt(n,e.g,e.i),t.type!=google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED||e.o.supportsMultipleMediaElements||e.l(new yt("ad-content-pause-requested")),t=new Map().set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.l(new yt("ad-started",t)),e.j.isLinear()&&(e.u.setAttribute("ad-active","true"),e.o.customPlayheadTracker||e.i.pause(),e.i.muted?(t=e.j,t.j=e.i.volume,t.h.setVolume(0)):e.j.setVolume(e.i.volume))):ut("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function gd(e,t){t&&t.type==google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED&&!e.o.supportsMultipleMediaElements&&e.l(new yt("ad-content-resume-requested")),e.l(new yt("ad-stopped",new Map().set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.u.removeAttribute("ad-active"),e.o.customPlayheadTracker||e.i.ended||e.i.play())}function Rt(e,t,n,r,i,o){this.g=e,this.h=t,this.j=(this.i=t.isSkippable)?t.skipOffset||0:t.skipOffset,this.l=t.skipFor,this.B=n,this.o=r,this.m=i,this.u=o,this.C=t.overlay}f=Rt.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!0},f.hasCustomClick=function(){return this.h.clickThroughUrl!=null},f.isUsingAnotherMediaElement=function(){return this.u},f.getDuration=function(){var e=this.g.duration;return isNaN(e)?-1:e},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){var e=this.g.duration;return isNaN(e)?-1:e-this.g.currentTime},f.isPaused=function(){return this.g.paused},f.isSkippable=function(){return this.i&&this.l!=null?this.getDuration()-this.getRemainingTime()<this.j+this.l:this.i},f.getTimeUntilSkippable=function(){if(this.isSkippable()){var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)}return Math.max(this.getRemainingTime(),0)},f.canSkipNow=function(){return this.i&&this.getTimeUntilSkippable()==0},f.skip=function(){this.canSkipNow()&&this.B()},f.pause=function(){return this.g.pause()},f.play=function(){return this.g.play()},f.getVolume=function(){return this.g.volume},f.setVolume=function(e){this.g.volume=e},f.isMuted=function(){return this.g.muted},f.isLinear=function(){return this.C==null},f.resize=function(){},f.setMuted=function(e){this.g.muted=e},f.getSequenceLength=function(){return this.o},f.getPositionInSequence=function(){return this.m},f.getTitle=function(){return""},f.getDescription=function(){return""},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return 0},f.getVastMediaWidth=function(){return 0},f.getVastAdId=function(){return""},f.getAdId=function(){return this.h.id||""},f.getCreativeAdId=function(){return""},f.getAdvertiserName=function(){return""},f.getMediaUrl=function(){return this.h.uri},f.getTimeOffset=function(){return this.h.pre?0:this.h.post?-1:this.h.startTime},f.getPodIndex=function(){return 0},f.release=function(){this.g=null},be("shaka.ads.InterstitialAd",Rt),Rt.prototype.release=Rt.prototype.release,Rt.prototype.getPodIndex=Rt.prototype.getPodIndex,Rt.prototype.getTimeOffset=Rt.prototype.getTimeOffset,Rt.prototype.getMediaUrl=Rt.prototype.getMediaUrl,Rt.prototype.getAdvertiserName=Rt.prototype.getAdvertiserName,Rt.prototype.getCreativeAdId=Rt.prototype.getCreativeAdId,Rt.prototype.getAdId=Rt.prototype.getAdId,Rt.prototype.getVastAdId=Rt.prototype.getVastAdId,Rt.prototype.getVastMediaWidth=Rt.prototype.getVastMediaWidth,Rt.prototype.getVastMediaHeight=Rt.prototype.getVastMediaHeight,Rt.prototype.getVastMediaBitrate=Rt.prototype.getVastMediaBitrate,Rt.prototype.getDescription=Rt.prototype.getDescription,Rt.prototype.getTitle=Rt.prototype.getTitle,Rt.prototype.getPositionInSequence=Rt.prototype.getPositionInSequence,Rt.prototype.getSequenceLength=Rt.prototype.getSequenceLength,Rt.prototype.setMuted=Rt.prototype.setMuted,Rt.prototype.resize=Rt.prototype.resize,Rt.prototype.isLinear=Rt.prototype.isLinear,Rt.prototype.isMuted=Rt.prototype.isMuted,Rt.prototype.setVolume=Rt.prototype.setVolume,Rt.prototype.getVolume=Rt.prototype.getVolume,Rt.prototype.play=Rt.prototype.play,Rt.prototype.pause=Rt.prototype.pause,Rt.prototype.skip=Rt.prototype.skip,Rt.prototype.canSkipNow=Rt.prototype.canSkipNow,Rt.prototype.getTimeUntilSkippable=Rt.prototype.getTimeUntilSkippable,Rt.prototype.isSkippable=Rt.prototype.isSkippable,Rt.prototype.isPaused=Rt.prototype.isPaused,Rt.prototype.getRemainingTime=Rt.prototype.getRemainingTime,Rt.prototype.getMinSuggestedDuration=Rt.prototype.getMinSuggestedDuration,Rt.prototype.getDuration=Rt.prototype.getDuration,Rt.prototype.isUsingAnotherMediaElement=Rt.prototype.isUsingAnotherMediaElement,Rt.prototype.hasCustomClick=Rt.prototype.hasCustomClick,Rt.prototype.isClientRendering=Rt.prototype.isClientRendering,Rt.prototype.needsSkipUI=Rt.prototype.needsSkipUI;function Ot(e,t,n){this.g=e,this.j=t,this.h=n,this.i=e.overlay==null}f=Ot.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!0},f.hasCustomClick=function(){return this.g.clickThroughUrl!=null},f.isUsingAnotherMediaElement=function(){return!1},f.getDuration=function(){return-1},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){return-1},f.isPaused=function(){return!1},f.isSkippable=function(){return!1},f.getTimeUntilSkippable=function(){return 0},f.canSkipNow=function(){return!1},f.skip=function(){},f.pause=function(){},f.play=function(){},f.getVolume=function(){return 1},f.setVolume=function(){},f.isMuted=function(){return!1},f.isLinear=function(){return this.i},f.resize=function(){},f.setMuted=function(){},f.getSequenceLength=function(){return this.j},f.getPositionInSequence=function(){return this.h},f.getTitle=function(){return""},f.getDescription=function(){return""},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return 0},f.getVastMediaWidth=function(){return 0},f.getVastAdId=function(){return""},f.getAdId=function(){return this.g.id||""},f.getCreativeAdId=function(){return""},f.getAdvertiserName=function(){return""},f.getMediaUrl=function(){return this.g.uri},f.getTimeOffset=function(){return this.g.pre?0:this.g.post?-1:this.g.startTime},f.getPodIndex=function(){return 0},f.release=function(){},be("shaka.ads.InterstitialStaticAd",Ot),Ot.prototype.release=Ot.prototype.release,Ot.prototype.getPodIndex=Ot.prototype.getPodIndex,Ot.prototype.getTimeOffset=Ot.prototype.getTimeOffset,Ot.prototype.getMediaUrl=Ot.prototype.getMediaUrl,Ot.prototype.getAdvertiserName=Ot.prototype.getAdvertiserName,Ot.prototype.getCreativeAdId=Ot.prototype.getCreativeAdId,Ot.prototype.getAdId=Ot.prototype.getAdId,Ot.prototype.getVastAdId=Ot.prototype.getVastAdId,Ot.prototype.getVastMediaWidth=Ot.prototype.getVastMediaWidth,Ot.prototype.getVastMediaHeight=Ot.prototype.getVastMediaHeight,Ot.prototype.getVastMediaBitrate=Ot.prototype.getVastMediaBitrate,Ot.prototype.getDescription=Ot.prototype.getDescription,Ot.prototype.getTitle=Ot.prototype.getTitle,Ot.prototype.getPositionInSequence=Ot.prototype.getPositionInSequence,Ot.prototype.getSequenceLength=Ot.prototype.getSequenceLength,Ot.prototype.setMuted=Ot.prototype.setMuted,Ot.prototype.resize=Ot.prototype.resize,Ot.prototype.isLinear=Ot.prototype.isLinear,Ot.prototype.isMuted=Ot.prototype.isMuted,Ot.prototype.setVolume=Ot.prototype.setVolume,Ot.prototype.getVolume=Ot.prototype.getVolume,Ot.prototype.play=Ot.prototype.play,Ot.prototype.pause=Ot.prototype.pause,Ot.prototype.skip=Ot.prototype.skip,Ot.prototype.canSkipNow=Ot.prototype.canSkipNow,Ot.prototype.getTimeUntilSkippable=Ot.prototype.getTimeUntilSkippable,Ot.prototype.isSkippable=Ot.prototype.isSkippable,Ot.prototype.isPaused=Ot.prototype.isPaused,Ot.prototype.getRemainingTime=Ot.prototype.getRemainingTime,Ot.prototype.getMinSuggestedDuration=Ot.prototype.getMinSuggestedDuration,Ot.prototype.getDuration=Ot.prototype.getDuration,Ot.prototype.isUsingAnotherMediaElement=Ot.prototype.isUsingAnotherMediaElement,Ot.prototype.hasCustomClick=Ot.prototype.hasCustomClick,Ot.prototype.isClientRendering=Ot.prototype.isClientRendering,Ot.prototype.needsSkipUI=Ot.prototype.needsSkipUI;function O1(e,t,n,r){function i(s){return s?s.overlay?!0:o.g.ended?s.post:!o.g.paused:!1}var o=this;this.M=null,this.m=e,this.C=t,this.g=n,this.G=null,this.u=!0,this.h=this.g,this.ua=r,this.ma=new Set,this.T=new Set,this.H=new Set,this.D=new Map,this.K=new Map,this.i=new Re,sg(this),this.I=new Et,this.j=new Et,this.J=!1,this.$=this.o=this.B=this.l=null,this.ba=!1,this.O=-1,this.X=function(){if(!o.J&&o.l&&!o.C.xa()){o.l=o.g.currentTime;var s=ul(o);s&&i(s)&&md(o,s,1,1,Date.now())}},this.V=function(){if(!(o.J||o.l||o.C.xa())){o.g.paused||(o.l=o.g.currentTime);var s=ul(o,!0);s||(s=ul(o)),s&&i(s)&&md(o,s,1,1,Date.now())}},this.oa=function(){if(!o.J&&o.l&&!o.C.xa()){var s=o.g.currentTime;o.B&&!o.B.pre&&!o.B.post&&s<(o.B.endTime||o.B.startTime)&&(o.B=null)}},this.P=new Yt(this.X),this.N=new Yt(function(){var s,a,u,l,h,g,m,S,A,k,b;return G(function(V){switch(V.h){case 1:if(!o.H.size||o.l==null){V.A(0);break}if(s=o.C.Ud(),s==us||s==fd)return V.return();a=!1,u=Array.from(o.H),l=o.C.Sa(),h=d(u),g=h.next();case 3:if(g.done){V.A(5);break}if(m=g.value,m==o.B){V.A(4);break}if(S=m.endTime||m.startTime,!(l.start-S>=1)){A=m.startTime-o.l,A>0&&A<=10&&(!o.D.has(m)&&N1(m)&&o.D.set(m,o.i.preload(m.uri,null,m.mimeType||void 0)),j1(o,m)),V.A(4);break}if(!o.D.has(m)){V.A(7);break}return V.g(o.D.get(m),8);case 8:(k=V.i)&&k.destroy(),o.D.delete(m);case 7:F1(o,m),b=m.id||JSON.stringify(m),o.T.has(b)&&o.T.delete(b),o.H.delete(m),rg(o),m.overlay||(a=!0);case 4:g=h.next(),V.A(3);break;case 5:a&&vd(o),V.j()}})}),this.configure(this.C.getConfiguration().ads)}f=O1.prototype,f.configure=function(e){this.M=e,this.J||ig(this)};function R2(e){if(!e.ba&&e.H.size){if(e.I.F(e.g,"playing",e.V),e.I.F(e.g,"timeupdate",e.V),e.I.F(e.g,"seeked",e.oa),e.I.F(e.g,"ended",e.X),"requestVideoFrameCallback"in e.g&&!L1()){var t=e.g,n=function(){e.O!=-1&&(e.X(),e.O!=-1&&(e.O=t.requestVideoFrameCallback(n)))};e.O=t.requestVideoFrameCallback(n)}else e.P.Ea(.025);e.N&&e.N.Ea(1),e.ba=!0}}function rg(e){e.ba&&!e.H.size&&(e.I.Na(e.g,"playing",e.V),e.I.Na(e.g,"timeupdate",e.V),e.I.Na(e.g,"seeked",e.oa),e.I.Na(e.g,"ended",e.X),e.O!=-1&&(e.g.cancelVideoFrameCallback(e.O),e.O=-1),e.P&&e.P.stop(),e.N&&e.N.stop(),e.ba=!1)}function ig(e){if(e.m&&e.M){var t=e.M.supportsMultipleMediaElements,n=e.g;(n.controls||n.webkitPresentationMode&&n.webkitPresentationMode!=="inline"||n.webkitDisplayingFullscreen)&&(t=!1),e.u==t&&(e.u=!t,e.u?(e.h=e.g,e.G&&(e.G.parentElement&&e.m.removeChild(e.G),e.G=null)):(e.G||(t=document.createElement(e.g.tagName),t.autoplay=!0,t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.display="none",t.setAttribute("playsinline",""),e.G=t),e.h=e.G))}else e.u=!0}f.stop=function(){if(this.j&&this.j.Ra(),this.ma.clear(),this.T.clear(),this.H.clear(),this.i.lg(),this.D.size){var e=Array.from(this.D.values());e=d(e);for(var t=e.next();!t.done;t=e.next())(t=t.value)&&t.then(function(n){n&&n.destroy()})}if(this.D.clear(),this.K.size)for(e=Array.from(this.K.keys()),e=d(e),t=e.next();!t.done;t=e.next())F1(this,t.value);this.K.clear(),this.i.detach(),this.J=!1,this.B=this.l=null,this.u=!0,this.h=this.g,this.G=null,og(this),rg(this),this.m&&Jl(this.m),this.o&&(this.o.stop(),this.o=null)},f.release=function(){this.stop(),this.I&&this.I.release(),this.j&&this.j.release(),this.P&&(this.P.stop(),this.P=null),this.N&&(this.N.stop(),this.N=null),this.i.destroy()},f.md=function(){return this.i};function O2(e,t){var n,r,i;G(function(o){if(o.h==1){if(n=null,(r=t.values.find(function(s){return s.key=="ID"}))&&(n=r.data),n){if(e.ma.has(n))return o.return();e.ma.add(n)}return sg(e),i=[],t&&t.values.find(function(s){return s.key=="X-OVERLAY-ID"})?(i=F2(t),o.A(2)):o.g(j2(e,t),3)}o.h!=2&&(i=o.i),i.length?vc(e,i):ut("Unsupported HLS interstitial",t),o.j()})}function D2(e,t){var n=Pn(t.eventNode,"OverlayEvent"),r=n.attributes.uri,i=n.attributes.mimeType,o=n.attributes.loop=="true",s=wt(n,"z",ne);if(r&&s!=0){var a=null,u=Pn(n,"Background");if(u){var l=u.attributes.uri;l?a="center / contain no-repeat url('"+l+"')":a=_r(u)}u=1920,l=1080;var h=Pn(n,"Viewport");if(h&&(u=wt(h,"x",ne),u==null||(l=wt(h,"y",ne),l==null)))return;var g={viewport:{x:u,y:l},topLeft:{x:0,y:0},size:{x:u,y:l}},m=Pn(n,"Overlay");if(h&&m){var S=Pn(m,"TopLeft"),A=Pn(m,"Size");if(S&&A){if(m=wt(S,"x",ne),m==null||(S=wt(S,"y",ne),S==null))return;var k=wt(A,"x",ne);if(k==null||(A=wt(A,"y",ne),A==null))return;g.topLeft.x=m,g.topLeft.y=S,g.size.x=k,g.size.y=A}}if(m=null,n=Pn(n,"Squeeze"),h&&n&&(A=Pn(n,"TopLeft"),n=Pn(n,"Size"),A&&n)){if(h=wt(A,"x",ne),h==null||(m=wt(A,"y",ne),m==null)||(A=wt(n,"x",ne),A==null)||(n=wt(n,"y",ne),n==null))return;m={viewport:{x:u,y:l},topLeft:{x:h,y:m},size:{x:A,y:n}}}vc(e,[{id:t.id,groupId:null,startTime:t.startTime,endTime:t.endTime,uri:r,mimeType:i,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:!1,pre:!1,post:!1,timelineRange:!0,loop:o,overlay:g,displayOnBackground:s==-1,currentVideo:m,background:a,clickThroughUrl:null}])}}f.addAdUrlInterstitial=function(e){var t=this,n,r,i,o,s,a,u,l,h;return G(function(g){if(g.h==1)return n={type:12},g.g(ag(t,e,n),2);if(g.h!=3){if(r=g.i,i=ea(r,"VAST,vmap:VMAP"),!i)throw new fe(2,10,10007);if(o=[],i.tagName=="VAST")return o=k1(i,t.l),g.A(3);if(i.tagName!="vmap:VMAP")return g.A(3);for(s=function(m){var S,A;return G(function(k){if(k.h==1)return k.g(ag(t,m.uri,n),2);if(S=k.i,A=ea(S,"VAST"),!A)throw new fe(2,10,10007);o.push.apply(o,M(k1(A,m.time))),k.j()})},a=[],u=d(P2(i)),l=u.next();!l.done;l=u.next())h=l.value,a.push(s(h));return a.length?g.g(Promise.all(a),3):g.A(3)}vc(t,o),g.j()})};function vc(e,t){var n,r,i,o,s,a,u,l;G(function(h){switch(h.h){case 1:n=!1,r=d(t),i=r.next();case 2:if(i.done){h.A(4);break}if(o=i.value,!o.uri){ut("Missing URL in interstitial",o),h.A(3);break}if(o.mimeType){h.A(5);break}return h.m(6),s=e.i.Rb(),h.g(qu(o.uri,s,e.C.getConfiguration().streaming.retryParameters),8);case 8:o.mimeType=h.i,h.o(5);break;case 6:h.l();case 5:if(a=o.id||JSON.stringify(o),e.T.has(a)){h.A(3);break}o.loop&&!o.overlay&&ut("Loop is only supported in overlay interstitials",o),o.overlay||(n=!0),e.T.add(a),e.H.add(o),u=!1,o.pre&&e.l==null?u=!0:o.startTime!=0||o.canJump?e.l!=null&&(l=o.startTime-e.l,l>0&&l<=10&&(u=!0)):u=!0,u&&(!e.D.has(o)&&N1(o)&&e.D.set(o,e.i.preload(o.uri,null,o.mimeType||void 0)),j1(e,o));case 3:i=r.next(),h.A(2);break;case 4:n&&vd(e),R2(e),h.j()}})}function ul(e,t,n){t=t===void 0?!1:t,n=n===void 0?null:n;var r=0,i=null;if(e.H.size&&e.l!=null){var o=e.g.ended,s=Array.from(e.H).sort(function(g,m){return m.startTime-g.startTime}),a=s;for(a=t?s.filter(function(g){return g.pre}):o?s.filter(function(g){return g.post}):s.filter(function(g){return!g.pre&&!g.post}),s=d(a),a=s.next();!a.done;a=s.next()){a=a.value;var u=!1;if(t)u=a.pre;else if(o)u=a.post;else if(!a.pre&&!a.post){var l=e.l-Math.round(a.startTime*1e3)/1e3,h=1;e.M.allowStartInMiddleOfInterstitial&&a.endTime&&a.endTime!=1/0&&(h=a.endTime-a.startTime),(l>0||l==0&&e.l==0)&&(l<=h||!a.canJump)&&(u=!(n==null&&e.B&&!e.B.pre&&!e.B.post&&e.B.startTime>=a.startTime))}u&&(!e.B||a.startTime>=e.B.startTime)&&(r==(n||0)?i=a:i&&!a.canJump&&Math.round(a.startTime*1e3)/1e3-Math.round(i.startTime*1e3)/1e3>.001&&(i=a,r=0),r++)}}return i}function md(e,t,n,r,i,o){o=o===void 0?0:o,e.B=t,ig(e),e.u||!e.m||e.h.parentElement||e.m.appendChild(e.h),r==1&&n==1&&(n=Array.from(e.H).filter(function(s){return t.pre?s.pre==t.pre:t.post?s.post==t.post:Math.abs(s.startTime-t.startTime)<.001}).length),t.once&&(o++,e.H.delete(t),rg(e),t.overlay||vd(e)),t.mimeType&&(t.mimeType.startsWith("image/")||t.mimeType==="text/html")?t.overlay?N2(e,t,n,r,o):ut("Unsupported interstitial",t):e.u&&t.overlay?ut("Unsupported interstitial",t):L2(e,t,n,r,i,o)}function N2(e,t,n,r,i){function o(){e.o&&(e.o.stop(),e.o=null),e.m.removeChild(u),og(e,t),Rr(e,"ad-stopped"),e.j.Ra();var m=ul(e,t.pre,r-i);m?md(e,m,n,++r,Date.now(),i):e.J=!1}e.J=!0;var s=t.overlay,a=t.mimeType=="text/html"?"iframe":"img",u=document.createElement(a);u.style.objectFit="contain",u.style.position="absolute",u.style.border="none",D1(e,t);var l=new Ot(t,n,r);Rr(e,"ad-impression"),Rr(e,"ad-started",new Map().set("ad",l)),a=="iframe"?u.src=t.uri:(u.src=t.uri,u.onerror=function(m){Rr(e,"ad-error",new Map().set("originalEvent",m)),o()}),l=s.viewport;var h=s.topLeft;s=s.size,l.x==0&&l.y==0?(u.width=t.overlay.size.x,u.height=t.overlay.size.y,u.style.bottom="10%",u.style.left="0",u.style.right="0",u.style.width="100%",t.overlay.size.y||a!="iframe"||(u.style.height="auto")):(u.style.height=s.y/l.y*100+"%",u.style.left=h.x/l.x*100+"%",u.style.top=h.y/l.y*100+"%",u.style.width=s.x/l.x*100+"%"),e.m.appendChild(u);var g=Date.now();e.o&&e.o.stop(),e.o=new Yt(function(){t.playoutLimit&&(Date.now()-g)/1e3>t.playoutLimit||t.endTime&&e.g.currentTime>t.endTime?(Rr(e,"ad-complete"),o()):e.g.currentTime<t.startTime&&(Rr(e,"ad-skipped"),o())}),t.playoutLimit&&!t.endTime?e.o.ka(t.playoutLimit):t.endTime&&e.o.Ea(.025),e.j.F(e.g,"seeked",function(){var m=e.g.currentTime;(m<t.startTime||t.endTime&&m>t.endTime)&&(e.o&&e.o.stop(),Rr(e,"ad-skipped"),o())}),t.clickThroughUrl&&e.j.F(u,"click",function(){t.clickThroughUrl&&R.open(t.clickThroughUrl,"_blank")})}function L2(e,t,n,r,i,o){var s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce;G(function(Ee){switch(Ee.h){case 1:if(s=Date.now(),e.J=!0,a=!1,u=function(){if(!e.u&&!t.overlay&&t.resumeOffset==null)if(t.timelineRange&&t.endTime&&t.endTime!=1/0)e.g.currentTime!=t.endTime&&(e.g.currentTime=t.endTime);else{var Se=Date.now();e.g.currentTime+=(Se-i)/1e3,i=Se}},l=function(Se){var Ve,Le;return G(function(Ce){if(Ce.h==1){if(u(),Ve=ul(e,t.pre,r-o),Se&&t.groupId)for(;Ve&&Ve.groupId==t.groupId;)r++,Ve=ul(e,t.pre,r-o);return e.o&&(!t.groupId||Ve&&Ve.groupId!=t.groupId)&&(e.o.stop(),e.o=null),og(e,t),Ve&&!Ve.overlay?Ce.A(2):(t.post&&(e.l=null,e.B=null),e.u?Ce.g(e.i.detach(),4):Ce.g(e.i.xc(),4))}Ce.h!=2&&(e.u&&(Le=t.resumeOffset,Le==null&&(Le=t.timelineRange&&t.endTime&&t.endTime!=1/0?t.endTime-(e.l||0):(Date.now()-i)/1e3),Rr(e,"ad-content-resume-requested",new Map().set("offset",Le))),Rr(e,"ad-stopped"),e.j.Ra(),e.J=!1,e.u?vd(e):(e.h.style.display="none",u(),e.g.ended||e.g.play())),ig(e),Ve&&(Rr(e,"ad-stopped"),e.j.Ra(),md(e,Ve,n,++r,i,o)),Ce.j()})},h=function(Se){return G(function(Ve){return a?Ve.return():(a=!0,Rr(e,"ad-error",new Map().set("originalEvent",Se)),Ve.g(l(!1),0))})},g=function(){return G(function(Se){if(Se.h==1)return a?Se.return():(a=!0,Se.g(l(!1),2));Rr(e,"ad-complete"),Se.j()})},e.$=function(){return G(function(Se){return a?Se.return():(a=!0,Rr(e,"ad-skipped"),Se.g(l(!0),0))})},m=new Rt(e.h,t,e.$,n,r,!e.u),e.u||(m.setMuted(e.g.muted),m.setVolume(e.g.volume)),Rr(e,"ad-started",new Map().set("ad",m)),(S=m.canSkipNow())&&Rr(e,"ad-skip-state-changed"),e.j.Aa(e.i,"error",h),e.j.F(e.h,"timeupdate",function(){if(e.h.duration){var Se=m.canSkipNow();S!=Se&&m.getRemainingTime()>0&&m.getDuration()>0&&Rr(e,"ad-skip-state-changed"),S=Se,!e.u&&!t.overlay&&t.resumeOffset==null&&t.timelineRange&&t.endTime&&t.endTime!=1/0&&e.g.currentTime!=t.endTime&&e.C.Sa().end>=t.endTime&&(e.g.currentTime=t.endTime)}}),e.j.Aa(e.i,"firstquartile",function(){u(),Rr(e,"ad-first-quartile")}),e.j.Aa(e.i,"midpoint",function(){u(),Rr(e,"ad-midpoint")}),e.j.Aa(e.i,"thirdquartile",function(){u(),Rr(e,"ad-third-quartile")}),e.j.Aa(e.i,"complete",g),e.j.F(e.h,"play",function(){Rr(e,"ad-resumed")}),e.j.F(e.h,"pause",function(){var Se=e.i.getConfiguration();e.h.currentTime>=Se.playRangeEnd?g():Rr(e,"ad-paused")}),e.j.F(e.h,"volumechange",function(){e.h.muted?Rr(e,"ad-muted"):Rr(e,"ad-volume-changed"),e.u||(e.g.volume=e.h.volume,e.g.muted=e.h.muted)}),t.clickThroughUrl&&(A=e.m||e.h,e.j.F(A,"click",function(){t.clickThroughUrl&&(m.isPaused()||m.pause(),R.open(t.clickThroughUrl,"_blank"))})),!e.u||r!=1){Ee.A(2);break}return Rr(e,"ad-content-pause-requested",new Map().set("saveLivePosition",!0)),k=new zn,b=function(Se){return G(function(Ve){if(Ve.h==1)return Se.state!="detach"?Ve.A(0):L1()?Ve.g(new Promise(function(Le){return new Yt(Le).ka(.1)}),3):Ve.A(3);k.resolve(),e.j.Na(e.C,"onstatechange",b),Ve.j()})},e.j.F(e.C,"onstatechange",b),Ee.g(k,2);case 2:return D1(e,t),e.u||(e.h.style.display="",t.overlay?(e.h.loop=t.loop,V=t.overlay.viewport,B=t.overlay.topLeft,Z=t.overlay.size,e.h.style.height=Z.y/V.y*100+"%",e.h.style.left=B.x/V.x*100+"%",e.h.style.top=B.y/V.y*100+"%",e.h.style.width=Z.x/V.x*100+"%"):(e.g.pause(),t.resumeOffset!=null&&t.resumeOffset!=0&&(e.g.currentTime+=t.resumeOffset),e.h.loop=!1,e.h.style.height="100%",e.h.style.left="0",e.h.style.top="0",e.h.style.width="100%")),Ee.m(4),sg(e),t.startTime&&t.endTime&&t.endTime!=1/0&&t.startTime!=t.endTime&&(ae=t.endTime-t.startTime,ae>0&&e.i.configure("playRangeEnd",ae)),t.playoutLimit&&!e.o&&(e.o=new Yt(function(){e.$()}).ka(t.playoutLimit),e.i.configure("playRangeEnd",t.playoutLimit)),Ee.g(e.i.Ob(e.h),6);case 6:return pe=null,t.pre||t.post||!e.M.allowStartInMiddleOfInterstitial||e.l==null||(te=e.l-t.startTime,Math.abs(te)>.25&&(pe=te)),e.D.has(t)?Ee.g(e.D.get(t),10):Ee.g(e.i.load(t.uri,pe,t.mimeType||void 0),8);case 10:return le=Ee.i,e.D.delete(t),le?Ee.g(e.i.load(le),8):Ee.g(e.i.load(t.uri,pe,t.mimeType||void 0),8);case 8:t.overlay&&e.g.paused?e.h.pause():e.h.play(),ie=(Date.now()-s)/1e3,Rr(e,"ads-loaded",new Map().set("loadTime",ie)),e.u&&e.g.play(),t.overlay&&(t.pre||t.post||e.C.U()&&!(t.startTime>0)||(ye=function(){var Se=e.g.currentTime-t.startTime;Math.abs(Se-e.h.currentTime)>.1&&(e.h.currentTime=Se)},e.j.Aa(e.h,"playing",ye),e.j.F(e.g,"seeking",ye)),e.j.F(e.g,"seeked",function(){var Se=e.g.currentTime;(Se<t.startTime||t.endTime&&Se>t.endTime)&&e.$()})),Ee.o(0);break;case 4:if(ce=Ee.l(),!e.J)return Ee.return();h(ce),Ee.j()}})}function D1(e,t){if(t.displayOnBackground&&(e.g.style.zIndex="1"),t.currentVideo!=null){var n=t.currentVideo;e.g.style.transformOrigin="top left";var r=!0,i=[],o=n.topLeft.x/n.viewport.x*100;o>0&&o<=100&&(i.push("translateX("+o+"%)"),r=!1),o=n.topLeft.y/n.viewport.y*100,o>0&&o<=100&&(i.push("translateY("+o+"%)"),r=!1),o=n.size.x/n.viewport.x,o<1&&i.push("scaleX("+o+")"),n=n.size.y/n.viewport.y,o<1&&i.push("scaleY("+n+")"),i.length&&(e.g.style.transform=i.join(" ")),r&&(e.g.style.transition="transform 250ms")}e.m&&(t.clickThroughUrl?(e.m.setAttribute("ad-active","true"),e.m.style.pointerEvents=""):e.m.style.pointerEvents="none",t.background&&(e.m.style.background=t.background)),e.G&&(e.G.style.background=t.overlay?"":"rgb(0, 0, 0)")}function og(e,t){(!t||t.displayOnBackground)&&(e.g.style.zIndex=""),t&&t.currentVideo==null||(e.g.style.transformOrigin="",e.g.style.transition="",e.g.style.transform=""),e.m&&(e.m.removeAttribute("ad-active"),e.m.style.pointerEvents="",!t||t.background)&&(e.m.style.background=""),e.G&&(e.G.style.background="")}function j2(e,t){var n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn,Ut,Gn,sn,Qt,hn,An;return G(function(pn){switch(pn.h){case 1:if(n=[],!t||(r=t.values.find(function(Zt){return Zt.key=="X-ASSET-URI"}),i=t.values.find(function(Zt){return Zt.key=="X-ASSET-LIST"}),!r&&!i))return pn.return(n);if(o=null,(s=t.values.find(function(Zt){return Zt.key=="ID"}))&&(o=s.data),a=o==null?Math.floor(t.startTime*10)/10:t.startTime,(u=t.endTime)&&t.endTime!=1/0&&typeof t.endTime=="number"&&(u=o==null?Math.floor(t.endTime*10)/10:t.endTime),l=t.values.find(function(Zt){return Zt.key=="X-RESTRICT"}),g=h=!0,l&&l.data&&(m=l.data,h=!m.includes("SKIP"),g=!m.includes("JUMP")),S=h?0:null,(A=t.values.find(function(Zt){return Zt.key=="X-ENABLE-SKIP-AFTER"}))&&(k=A.data,S=parseFloat(k),isNaN(S)&&(S=h?0:null)),b=null,(V=t.values.find(function(Zt){return Zt.key=="X-ENABLE-SKIP-FOR"}))&&(B=V.data,b=parseFloat(B),isNaN(S)&&(b=null)),Z=null,(ae=t.values.find(function(Zt){return Zt.key=="X-RESUME-OFFSET"}))&&(pe=ae.data,Z=parseFloat(pe),isNaN(Z)&&(Z=null)),te=null,(le=t.values.find(function(Zt){return Zt.key=="X-PLAYOUT-LIMIT"}))&&(ie=le.data,te=parseFloat(ie),isNaN(te)&&(te=null)),Ee=ce=ye=!1,(Se=t.values.find(function(Zt){return Zt.key=="CUE"}))&&(Ve=Se.data,ye=Ve.includes("ONCE"),ce=Ve.includes("PRE"),Ee=Ve.includes("POST")),Le=!1,(Ce=t.values.find(function(Zt){return Zt.key=="X-TIMELINE-OCCUPIES"}))?(ke=Ce.data,Le=ke.includes("RANGE")):!ae&&e.C.U()&&(Le=!ce&&!Ee),r){if(Ge=r.data,!Ge)return pn.return(n);n.push({id:o,groupId:null,startTime:a,endTime:u,uri:Ge,mimeType:null,isSkippable:h,skipOffset:S,skipFor:b,canJump:g,resumeOffset:Z,playoutLimit:te,once:ye,pre:ce,post:Ee,timelineRange:Le,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null}),pn.A(2);break}if(!i){pn.A(2);break}return Je=i.data,Je?(pn.m(4),Ft={type:11},pn.g(ag(e,Je,Ft),6)):pn.return(n);case 6:for(dt=pn.i,kn=Un(dt),Ut=JSON.parse(kn),(Gn=Ut["SKIP-CONTROL"])&&(sn=Gn["ENABLE-SKIP-AFTER"],typeof sn=="number"&&(S=parseFloat(sn),isNaN(sn)&&(S=h?0:null)),Qt=Gn["ENABLE-SKIP-FOR"],typeof Qt=="number"&&(b=parseFloat(Qt),isNaN(Qt)&&(b=null))),hn=0;hn<Ut.ASSETS.length;hn++)An=Ut.ASSETS[hn],An.URI&&n.push({id:o+"_shaka_asset_"+hn,groupId:o,startTime:a,endTime:u,uri:An.URI,mimeType:null,isSkippable:h,skipOffset:S,skipFor:b,canJump:g,resumeOffset:Z,playoutLimit:te,once:ye,pre:ce,post:Ee,timelineRange:Le,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null});pn.o(2);break;case 4:pn.l();case 2:return pn.return(n)}})}function F2(e){var t=[];if(!e)return t;var n=e.values.find(function(b){return b.key=="X-ASSET-URI"});if(!n||(n=n.data,!n))return t;var r=null,i=e.values.find(function(b){return b.key=="X-OVERLAY-ID"});i&&(r=i.data),i=r==null?Math.floor(e.startTime*10)/10:e.startTime;var o=e.endTime;e.endTime&&e.endTime!=1/0&&typeof e.endTime=="number"&&(o=r==null?Math.floor(e.endTime*10)/10:e.endTime);var s=!1,a=!1,u=!1,l=e.values.find(function(b){return b.key=="CUE"});l&&(u=l.data,s=u.includes("ONCE"),a=u.includes("PRE"),u=u.includes("POST")),l=null;var h=e.values.find(function(b){return b.key=="X-ASSET-MIMETYPE"});h&&(l=h.data),h=!1;var g=e.values.find(function(b){return b.key=="X-LOOP"});g&&(h=g.data=="YES"),g=1;var m=e.values.find(function(b){return b.key=="X-DEPTH"});m&&(g=parseFloat(m.data),isNaN(g)&&(g=1)),m=null;var S=e.values.find(function(b){return b.key=="X-BACKGROUND"});S&&(m=S.data),S=1920;var A=1080,k=e.values.find(function(b){return b.key=="X-VIEWPORT"});if(k){if(A=k.data.split("x"),A.length!=2)return t;S=parseFloat(A[0]),A=parseFloat(A[1])}if(S={viewport:{x:S,y:A},topLeft:{x:0,y:0},size:{x:S,y:A}},A=e.values.find(function(b){return b.key=="X-OVERLAY-POSITION"})){if(A=A.data.split("x"),A.length!=2)return t;S.topLeft.x=parseFloat(A[0]),S.topLeft.y=parseFloat(A[1])}if(A=e.values.find(function(b){return b.key=="X-OVERLAY-SIZE"})){if(A=A.data.split("x"),A.length!=2)return t;S.size.x=parseFloat(A[0]),S.size.y=parseFloat(A[1])}if(A=null,(k=e.values.find(function(b){return b.key=="X-SQUEEZECURRENT"}))&&(A=parseFloat(k.data),isNaN(A)&&(A=1),A={viewport:{x:1920,y:1080},topLeft:{x:0,y:0},size:{x:1920*A,y:1080*A}},e=e.values.find(function(b){return b.key=="X-SQUEEZECURRENT-POSITION"}))){if(e=e.data.split("x"),e.length!=2)return t;A.topLeft.x=parseFloat(e[0]),A.topLeft.y=parseFloat(e[1])}return t.push({id:r,groupId:null,startTime:i,endTime:o,uri:n,mimeType:l,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:null,playoutLimit:null,once:s,pre:a,post:u,timelineRange:!0,loop:h,overlay:S,displayOnBackground:g==-1,currentVideo:A,background:m,clickThroughUrl:null}),t}function vd(e){for(var t=[],n=d(e.H),r=n.next(),i={};!r.done;i={wc:void 0},r=n.next())r=r.value,r.overlay||(i.wc={start:r.startTime,end:null},r.pre?(i.wc.start=0,i.wc.end=null):r.post?(i.wc.start=-1,i.wc.end=null):r.timelineRange&&(i.wc.end=r.endTime),t.find(function(o){return function(s){return o.wc.start==s.start&&o.wc.end==s.end}}(i))||t.push(i.wc));Rr(e,"ad-cue-points-changed",new Map().set("cuepoints",t))}function sg(e){e.i.configure(e.C.ei()),e.i.configure("ads.disableHLSInterstitial",!0),e.i.configure("ads.disableDASHInterstitial",!0),e.i.configure("playRangeEnd",1/0),Lv(e.C.Rb(),e.i.Rb())}function ag(e,t,n){var r,i,o;return G(function(s){return s.h==1?(r=jr([t],as()),i=e.C.Rb().request(7,r,n),s.g(i.promise,2)):(o=s.i,s.return(o.data))})}function N1(e){return(e=e.mimeType)?!e.startsWith("image/")&&e!=="text/html":!0}function L1(){var e=ct().Pa();return e=="TV"||e=="CONSOLE"||e=="CAST"}function j1(e,t){if(!(e.K.has(t)||e.M&&!e.M.allowPreloadOnDomElements)){var n=function(o){var s=document.createElement("link");return s.rel="preload",s.href=o,s.as="image",document.head.appendChild(s),s},r=[];if(t.background){var i=t.background.match(/url\(('|")?([^'"()]+)('|")\)?/);i&&r.push(n(i[2]))}t.mimeType&&t.mimeType.startsWith("image/")&&r.push(n(t.uri)),e.K.set(t,r)}}function F1(e,t){if(e.K.has(t)){var n=e.K.get(t);n=d(n);for(var r=n.next();!r.done;r=n.next())r=r.value,r.parentNode.removeChild(r);e.K.delete(t)}}function Rr(e,t,n){e.ua(new yt(t,n))}function Mt(e,t,n,r,i){this.h=e,this.j=Ts(this.h.skipOffset),this.g=i,this.i=t,this.l=n,this.o=r,this.m=!1}f=Mt.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!1},f.hasCustomClick=function(){return!1},f.isUsingAnotherMediaElement=function(){return!1},f.getDuration=function(){return this.h.durationInSeconds},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},f.isPaused=function(){return this.g.paused},f.isSkippable=function(){return typeof this.j=="number"},f.getTimeUntilSkippable=function(){if(typeof this.j!="number")return this.getRemainingTime();var e=this.getRemainingTime()+this.j-this.getDuration();return Math.max(e,0)},f.canSkipNow=function(){return this.getTimeUntilSkippable()==0},f.skip=function(){this.m=!0,this.g.currentTime+=this.getRemainingTime()},f.pause=function(){return this.g.pause()},f.play=function(){return this.g.play()},f.getVolume=function(){return this.g.volume},f.setVolume=function(e){this.g.volume=e},f.isMuted=function(){return this.g.muted},f.isLinear=function(){return this.o},f.resize=function(){},f.setMuted=function(e){this.g.muted=e},f.getSequenceLength=function(){return this.l?this.l:1},f.getPositionInSequence=function(){return this.i?this.i:1},f.getTitle=function(){return this.h.adTitle},f.getDescription=function(){return""},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return 0},f.getVastMediaWidth=function(){return 0},f.getVastAdId=function(){return this.h.vastAdId||""},f.getAdId=function(){return this.h.adId},f.getCreativeAdId=function(){return this.h.creativeId},f.getAdvertiserName=function(){return""},f.getMediaUrl=function(){return null},f.getTimeOffset=function(){return 0},f.getPodIndex=function(){return 0},f.release=function(){this.l=this.i=this.g=this.h=null},be("shaka.ads.MediaTailorAd",Mt),Mt.prototype.release=Mt.prototype.release,Mt.prototype.getPodIndex=Mt.prototype.getPodIndex,Mt.prototype.getTimeOffset=Mt.prototype.getTimeOffset,Mt.prototype.getMediaUrl=Mt.prototype.getMediaUrl,Mt.prototype.getAdvertiserName=Mt.prototype.getAdvertiserName,Mt.prototype.getCreativeAdId=Mt.prototype.getCreativeAdId,Mt.prototype.getAdId=Mt.prototype.getAdId,Mt.prototype.getVastAdId=Mt.prototype.getVastAdId,Mt.prototype.getVastMediaWidth=Mt.prototype.getVastMediaWidth,Mt.prototype.getVastMediaHeight=Mt.prototype.getVastMediaHeight,Mt.prototype.getVastMediaBitrate=Mt.prototype.getVastMediaBitrate,Mt.prototype.getDescription=Mt.prototype.getDescription,Mt.prototype.getTitle=Mt.prototype.getTitle,Mt.prototype.getPositionInSequence=Mt.prototype.getPositionInSequence,Mt.prototype.getSequenceLength=Mt.prototype.getSequenceLength,Mt.prototype.setMuted=Mt.prototype.setMuted,Mt.prototype.resize=Mt.prototype.resize,Mt.prototype.isLinear=Mt.prototype.isLinear,Mt.prototype.isMuted=Mt.prototype.isMuted,Mt.prototype.setVolume=Mt.prototype.setVolume,Mt.prototype.getVolume=Mt.prototype.getVolume,Mt.prototype.play=Mt.prototype.play,Mt.prototype.pause=Mt.prototype.pause,Mt.prototype.skip=Mt.prototype.skip,Mt.prototype.canSkipNow=Mt.prototype.canSkipNow,Mt.prototype.getTimeUntilSkippable=Mt.prototype.getTimeUntilSkippable,Mt.prototype.isSkippable=Mt.prototype.isSkippable,Mt.prototype.isPaused=Mt.prototype.isPaused,Mt.prototype.getRemainingTime=Mt.prototype.getRemainingTime,Mt.prototype.getMinSuggestedDuration=Mt.prototype.getMinSuggestedDuration,Mt.prototype.getDuration=Mt.prototype.getDuration,Mt.prototype.isUsingAnotherMediaElement=Mt.prototype.isUsingAnotherMediaElement,Mt.prototype.hasCustomClick=Mt.prototype.hasCustomClick,Mt.prototype.isClientRendering=Mt.prototype.isClientRendering,Mt.prototype.needsSkipUI=Mt.prototype.needsSkipUI;function yc(e,t,n,r){this.C=e,this.K=t,this.h=n,this.l=null,this.P=NaN,this.i=r,this.J=!1,this.B=null,this.j=[],this.N=[],this.M=this.D=this.g=null,this.G=new Map,this.m=[],this.u=[],this.H="",this.O=!0,this.I="",this.o=new Et}yc.prototype.stop=function(){for(var e=d(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Na(t.target,t.type,t.listener);ll(this),this.m=[],this.u=[],this.H="",this.O=!0,this.I="",this.B=null,this.j=[],this.N=[],this.G.clear()},yc.prototype.release=function(){this.stop(),this.o&&this.o.release()},yc.prototype.onManifestUpdated=function(e){this.J=e,this.H!=""&&(B2(this,this.H,this.O),this.O=!1)},yc.prototype.getCuePoints=function(){for(var e=[],t=d(this.j),n=t.next();!n.done;n=t.next()){n=d(n.value.ads);for(var r=n.next();!r.done;r=n.next())r=r.value,e.push({start:r.startTimeInSeconds,end:r.startTimeInSeconds+r.durationInSeconds})}return e};function U2(e,t,n){var r,i,o,s,a,u,l,h,g,m,S,A;G(function(k){if(k.h==1)return r={type:7},i=jr([t],as()),i.method="POST",n&&(o=JSON.stringify(n),i.body=Ui(o)),s=e.K.request(7,i,r),k.m(2),k.g(s.promise,4);if(k.h!=2){if(a=k.i,u=Un(a.data),l=JSON.parse(u),l.manifestUrl&&l.trackingUrl)h=new It(t),g=new It(l.trackingUrl),e.H=h.resolve(g).toString(),m=Date.now()/1e3,S=m-e.P,e.i(new yt("ads-loaded",new Map().set("loadTime",S))),A=new It(l.manifestUrl),e.l.resolve(h.resolve(A).toString()),e.l=null;else throw Error("Insufficient data from MediaTailor.");return k.o(0)}if(k.l(),!e.I.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,k.return();e.l.resolve(e.I),e.l=null,k.j()})}function B2(e,t,n){var r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B;G(function(Z){if(Z.h==1)return r={type:8},i=jr([t],as()),o=e.K.request(7,i,r),Z.m(2),Z.g(o.promise,4);if(Z.h!=2){if(s=Z.i,a=[],u=Un(s.data),l=JSON.parse(u),l.avails.length>0){if(JSON.stringify(e.j)!=JSON.stringify(l.avails)){for(e.j=l.avails,h=d(e.j),g=h.next();!g.done;g=h.next())for(m=g.value,S=d(m.nonLinearAdsList),A=S.next();!A.done;A=S.next())for(k=A.value,b=d(k.nonLinearAdList),V=b.next();!V.done;V=b.next())B=V.value,V2(e,B);a=e.getCuePoints(),e.i(new yt("ad-cue-points-changed",new Map().set("cuepoints",a)))}}else e.j.length&&e.i(new yt("ad-cue-points-changed",new Map().set("cuepoints",a))),ll(e),e.j=[];return n&&(e.J||a.length>0)&&_2(e),Z.o(0)}Z.l(),Z.j()})}function V2(e,t){var n,r,i,o,s,a,u,l;G(function(h){if(h.h==1)return!t.staticResource||(n=U1(t),e.G.get(n))?h.return():(r={type:9},i=jr([t.staticResource],as()),o=e.K.request(7,i,r),h.m(2),e.G.set(n,[]),h.g(o.promise,4));if(h.h!=2)return s=h.i,a=Un(s.data),u=JSON.parse(a),l=u.apps,e.G.set(n,l),h.o(0);h.l(),e.G.delete(n),h.j()})}function U1(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function _2(e){V1(e),e.J||(B1(e),e.o.F(e.h,"seeked",function(){B1(e)}),e.o.F(e.h,"ended",function(){ll(e)})),e.o.F(e.h,"timeupdate",function(){V1(e)})}function B1(e){var t=e.h.currentTime;if(t!=0&&e.B==null){for(var n,r,i=d(e.j),o=i.next();!o.done;o=i.next()){o=o.value;for(var s=d(o.ads),a=s.next();!a.done;a=s.next())if(a=a.value,!r)a.startTimeInSeconds<t&&(r=a,n=o);else if(a.startTimeInSeconds<t&&a.startTimeInSeconds>r.startTimeInSeconds+r.durationInSeconds){r=a,n=o;break}}n&&r&&!e.N.includes(r.adId)&&(e.B=t,e.h.currentTime=n.startTimeInSeconds)}}function V1(e){if(e.h.duration&&(e.g||e.j.length)){var t=e.h.currentTime,n=!1;if(e.g){n=!0;var r=e.D,i=r.startTimeInSeconds+.5*r.durationInSeconds,o=r.startTimeInSeconds+.75*r.durationInSeconds;t>=r.startTimeInSeconds+.25*r.durationInSeconds&&!e.u.includes("firstQuartile")?(e.u.push("firstQuartile"),Ki(e,"firstQuartile")):t>=i&&!e.u.includes("midpoint")?(e.u.push("midpoint"),Ki(e,"midpoint")):t>=o&&!e.u.includes("thirdQuartile")&&(e.u.push("thirdQuartile"),Ki(e,"thirdQuartile")),r=e.g.getRemainingTime(),i=e.g.getDuration(),e.g.canSkipNow()&&r>0&&i>0&&Ki(e,"skipStateChanged"),i>0&&(r<=0||r>i)&&ll(e)}if(!e.g||!e.g.isLinear()){e:for(r=d(e.j),i=r.next();!i.done&&(i=i.value,!(e.g&&e.g.isLinear()));i=r.next())for(o=0;o<i.ads.length;o++){var s=i.ads[o],a=s.startTimeInSeconds+s.durationInSeconds;if(s.startTimeInSeconds<=t&&a>t){if(e.N.includes(s.adId)){if(e.h.ended)continue;e.h.currentTime=a;break e}ll(e),e.M=i,e.g=new Mt(s,o+1,i.ads.length,!0,e.h),e.D=s,o===0&&Ki(e,"breakStart"),_1(e);break}}if(!e.g){for(r=d(e.j),i=r.next();!i.done&&(i=i.value,!e.g);i=r.next())for(o=0;o<i.nonLinearAdsList.length;o++)if(s=i.nonLinearAdsList[o],s.nonLinearAdList.length){a=i.startTimeInSeconds;var u=e.G.get(U1(s.nonLinearAdList[0]));if(a<=t&&u&&u.length){ll(e),a=e,u=d(u);for(var l=u.next();!l.done;l=u.next())if(l=l.value,l.data.source.length){var h=document.createElement("img");h.src=l.data.source[0].url,h.style.top=(l.placeholder.top||0)+"%",h.style.height=100-(l.placeholder.top||0)+"%",h.style.left=(l.placeholder.left||0)+"%",h.style.maxWidth=100-(l.placeholder.left||0)+"%",h.style.objectFit="contain",h.style.position="absolute",a.C.appendChild(h)}e.M=i,e.g=new Mt(s,o+1,i.ads.length,!1,e.h),e.D=s,o===0&&Ki(e,"breakStart"),_1(e);break}}}n&&!e.g&&(t=e.h.currentTime,e.B&&e.B>t&&(e.h.currentTime=e.B),e.B=null)}}}function ll(e){if(e.g){for(;e.C.lastChild;)e.C.removeChild(e.C.firstChild);e.J||e.N.push(e.D.adId);var t=e.g.m;t!==void 0&&t?Ki(e,"skip"):Ki(e,"complete"),t=d(e.m);for(var n=t.next();!n.done;n=t.next())n=n.value,e.o.Na(n.target,n.type,n.listener);e.m=[],e.u=[],t=e.g.getPositionInSequence(),n=e.g.getSequenceLength(),t===n&&Ki(e,"breakEnd"),e.g=null,e.D=null,e.M=null}}function _1(e){var t=!1;e.h.paused?t=!0:(Ki(e,"impression"),Ki(e,"start")),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted&&Ki(e,"mute")}}),e.m.push({target:e.h,type:"volumechange",listener:function(){e.h.muted||Ki(e,"unmute")}}),e.m.push({target:e.h,type:"play",listener:function(){t?(Ki(e,"impression"),Ki(e,"start"),t=!1):Ki(e,"resume")}}),e.m.push({target:e.h,type:"pause",listener:function(){Ki(e,"pause")}});for(var n=d(e.m),r=n.next();!r.done;r=n.next())r=r.value,e.o.F(r.target,r.type,r.listener)}function Ki(e,t){var n=e.D.trackingEvents.find(function(o){return o.eventType==t});if(n||(n=e.M.adBreakTrackingEvents.find(function(o){return o.eventType==t})),n){var r={type:10};n=d(n.beaconUrls);for(var i=n.next();!i.done;i=n.next())(i=i.value)&&i!=""&&(i=jr([i],as()),i.method="POST",e.K.request(7,i,r))}switch(t){case"impression":e.i(new yt("ad-impression"));break;case"start":e.i(new yt("ad-started",new Map().set("ad",e.g)));break;case"mute":e.i(new yt("ad-muted"));break;case"unmute":e.i(new yt("ad-volume-changed"));break;case"resume":e.i(new yt("ad-resumed"));break;case"pause":e.i(new yt("ad-paused"));break;case"firstQuartile":e.i(new yt("ad-first-quartile"));break;case"midpoint":e.i(new yt("ad-midpoint"));break;case"thirdQuartile":e.i(new yt("ad-third-quartile"));break;case"complete":e.i(new yt("ad-complete")),e.i(new yt("ad-stopped"));break;case"skip":e.i(new yt("ad-skipped")),e.i(new yt("ad-stopped"));break;case"breakStart":e.C.setAttribute("ad-active","true");break;case"breakEnd":e.C.removeAttribute("ad-active");break;case"skipStateChanged":e.i(new yt("ad-skip-state-changed"))}}function Dt(e,t){this.g=e,this.i=null,this.h=t}f=Dt.prototype,f.needsSkipUI=function(){return!0},f.isClientRendering=function(){return!1},f.hasCustomClick=function(){return!0},f.isUsingAnotherMediaElement=function(){return!1},f.getDuration=function(){return this.i?this.i.duration:-1},f.getMinSuggestedDuration=function(){return this.getDuration()},f.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},f.isPaused=function(){return this.h.paused},f.isSkippable=function(){return this.g.isSkippable()},f.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},f.canSkipNow=function(){return this.getTimeUntilSkippable()==0},f.skip=function(){this.h.currentTime+=this.getRemainingTime()},f.pause=function(){return this.h.pause()},f.play=function(){return this.h.play()},f.getVolume=function(){return this.h.volume},f.setVolume=function(e){this.h.volume=e},f.isMuted=function(){return this.h.muted},f.isLinear=function(){return!0},f.resize=function(){},f.setMuted=function(e){this.h.muted=e},f.getSequenceLength=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getTotalAds()},f.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return e==null?1:e.getAdPosition()},f.getTitle=function(){return this.g.getTitle()},f.getDescription=function(){return this.g.getDescription()},f.getVastMediaBitrate=function(){return 0},f.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},f.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},f.getVastAdId=function(){return""},f.getAdId=function(){return this.g.getAdId()},f.getCreativeAdId=function(){return this.g.getCreativeAdId()},f.getAdvertiserName=function(){return this.g.getAdvertiserName()},f.getMediaUrl=function(){return null},f.getTimeOffset=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getTimeOffset()},f.getPodIndex=function(){var e=this.g.getAdPodInfo();return e==null?0:e.getPodIndex()},f.release=function(){this.h=this.i=this.g=null},be("shaka.ads.ServerSideAd",Dt),Dt.prototype.release=Dt.prototype.release,Dt.prototype.getPodIndex=Dt.prototype.getPodIndex,Dt.prototype.getTimeOffset=Dt.prototype.getTimeOffset,Dt.prototype.getMediaUrl=Dt.prototype.getMediaUrl,Dt.prototype.getAdvertiserName=Dt.prototype.getAdvertiserName,Dt.prototype.getCreativeAdId=Dt.prototype.getCreativeAdId,Dt.prototype.getAdId=Dt.prototype.getAdId,Dt.prototype.getVastAdId=Dt.prototype.getVastAdId,Dt.prototype.getVastMediaWidth=Dt.prototype.getVastMediaWidth,Dt.prototype.getVastMediaHeight=Dt.prototype.getVastMediaHeight,Dt.prototype.getVastMediaBitrate=Dt.prototype.getVastMediaBitrate,Dt.prototype.getDescription=Dt.prototype.getDescription,Dt.prototype.getTitle=Dt.prototype.getTitle,Dt.prototype.getPositionInSequence=Dt.prototype.getPositionInSequence,Dt.prototype.getSequenceLength=Dt.prototype.getSequenceLength,Dt.prototype.setMuted=Dt.prototype.setMuted,Dt.prototype.resize=Dt.prototype.resize,Dt.prototype.isLinear=Dt.prototype.isLinear,Dt.prototype.isMuted=Dt.prototype.isMuted,Dt.prototype.setVolume=Dt.prototype.setVolume,Dt.prototype.getVolume=Dt.prototype.getVolume,Dt.prototype.play=Dt.prototype.play,Dt.prototype.pause=Dt.prototype.pause,Dt.prototype.skip=Dt.prototype.skip,Dt.prototype.canSkipNow=Dt.prototype.canSkipNow,Dt.prototype.getTimeUntilSkippable=Dt.prototype.getTimeUntilSkippable,Dt.prototype.isSkippable=Dt.prototype.isSkippable,Dt.prototype.isPaused=Dt.prototype.isPaused,Dt.prototype.getRemainingTime=Dt.prototype.getRemainingTime,Dt.prototype.getMinSuggestedDuration=Dt.prototype.getMinSuggestedDuration,Dt.prototype.getDuration=Dt.prototype.getDuration,Dt.prototype.isUsingAnotherMediaElement=Dt.prototype.isUsingAnotherMediaElement,Dt.prototype.hasCustomClick=Dt.prototype.hasCustomClick,Dt.prototype.isClientRendering=Dt.prototype.isClientRendering,Dt.prototype.needsSkipUI=Dt.prototype.needsSkipUI;function H1(e,t,n,r){var i=this;this.u=e,this.l=t,this.j=null,this.G=NaN,this.i=r,this.H=!1,this.B=this.m=this.o=null,this.C="",this.D=[],this.h=new Et,e=new google.ima.dai.api.UiSettings,e.setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.u,e),this.i(new yt("ima-stream-manager-loaded",new Map().set("imaStreamManager",this.g))),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,function(o){H2(i,o)}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,function(){i.C.length?i.j.resolve(i.C):i.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),i.j=null}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,function(){}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,function(o){o=o.getAd(),i.m=new Dt(o,i.l),i.B&&(i.m.i=i.B),i.i(new yt("ad-started",new Map().set("ad",i.m))),i.u.setAttribute("ad-active","true")}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,function(){i.u.removeAttribute("ad-active");var o=i.l.currentTime;i.o&&i.o>o&&(i.l.currentTime=i.o,i.o=null)}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,function(o){i.B=o.getStreamData().adProgressData,i.m&&(i.m.i=i.B)}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,function(){i.i(new yt("ad-first-quartile"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,function(){i.i(new yt("ad-midpoint"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,function(){i.i(new yt("ad-third-quartile"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,function(){i.i(new yt("ad-complete")),i.i(new yt("ad-stopped")),i.u.removeAttribute("ad-active"),i.m=null}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,function(){i.i(new yt("ad-skipped")),i.i(new yt("ad-stopped"))}),this.h.F(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,function(o){var s=o.getStreamData();o=[],s=d(s.cuepoints);for(var a=s.next();!a.done;a=s.next())a=a.value,o.push({start:a.start,end:a.end});i.D=o,i.i(new yt("ad-cue-points-changed",new Map().set("cuepoints",o)))})}f=H1.prototype,f.configure=function(){},f.stop=function(){this.C="",this.o=null,this.D=[]},f.release=function(){this.stop(),this.h&&this.h.release()},f.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},f.getCuePoints=function(){return this.D};function H2(e,t){e.i(new yt("ads-loaded",new Map().set("loadTime",Date.now()/1e3-e.G))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.H||e.h.F(e.l,"seeked",function(){var n=e.l.currentTime;if(n!=0){e.g.streamTimeForContentTime(n);var r=e.g.previousCuePointForStreamTime(n);r&&!r.played&&(e.o=n,e.l.currentTime=r.start)}})}function ft(){_n.call(this),this.h=this.i=this.j=this.g=null,this.m=new P1,this.o=navigator.language,this.l=null}P(ft,_n),f=ft.prototype,f.setLocale=function(e){this.o=e},f.configure=function(e){this.l=e,this.g&&this.g.configure(this.l),this.j&&this.j.configure(this.l),this.h&&this.h.configure(this.l)},f.initInterstitial=function(e,t,n){var r=this;this.g&&this.g.release(),this.g=new O1(e,t,n,function(i){return yd(r,i)}),this.g.configure(this.l)},f.initClientSide=function(e,t,n){var r=this;if(!R.google||!google.ima||!google.ima.AdsLoader)throw new fe(2,10,1e4);this.j&&this.j.release(),this.j=new pd(e,t,this.o,n,function(i){return yd(r,i)}),this.j.configure(this.l)},f.release=function(){this.g&&(this.g.release(),this.g=null),this.j&&(this.j.release(),this.j=null),this.i&&(this.i.release(),this.i=null),this.h&&(this.h.release(),this.h=null),_n.prototype.release.call(this)},f.onAssetUnload=function(){this.g&&this.g.stop(),this.j&&this.j.stop(),this.i&&this.i.stop(),this.h&&this.h.stop(),this.dispatchEvent(new yt("ad-stopped")),this.dispatchEvent(new yt("ad-content-attach-requested")),this.m=new P1},f.requestClientSideAds=function(e){if(!this.j)throw new fe(1,10,10001);var t=this.j;t.g&&t.g.destroy(),t.m&&t.m.contentComplete(),t.H=Date.now()/1e3,t.m.requestAds(e)},f.updateClientSideAdsRenderingSettings=function(e){if(!this.j)throw new fe(1,10,10001);var t=this.j;t.C=e,t.g&&t.g.updateAdsRenderingSettings(t.C)},f.initMediaTailor=function(e,t,n){var r=this;this.i&&this.i.release(),this.i=new yc(e,t,n,function(i){return yd(r,i)})},f.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new fe(1,10,10005);var r=this.i;return n=n===void 0?"":n,r.l?e=Promise.reject(new fe(1,10,10004)):(r.l=new zn,U2(r,e,t),r.I=n||"",r.P=Date.now()/1e3,e=r.l),e},f.addMediaTailorTrackingUrl=function(e){if(!this.i)throw new fe(1,10,10005);var t=this.i;t.H=e,t.i(new yt("ads-loaded",new Map().set("loadTime",0)))},f.initServerSide=function(e,t){var n=this;if(!R.google||!google.ima||!google.ima.dai)throw new fe(2,10,10002);this.h&&this.h.release(),this.h=new H1(e,t,this.o,function(r){return yd(n,r)}),this.h.configure(this.l)},f.requestServerSideStream=function(e,t){if(t=t===void 0?"":t,!this.h)throw new fe(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&ut('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.16.24",n=this.h,n.j?e=Promise.reject(new fe(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.H=!0),n.j=new zn,n.g.requestStream(e),n.C=t||"",n.G=Date.now()/1e3,e=n.j),e},f.replaceServerSideAdTagParameters=function(e){if(!this.h)throw new fe(1,10,10003);(e.mpt||e.mpv)&&ut('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overridden.'),e.mpt="Shaka Player",e.mpv="v4.16.24",this.h.g.replaceAdTagParameters(e)},f.getServerSideCuePoints=function(){return lt("AdManager.getServerSideCuePoints","Please use getCuePoints function."),this.getCuePoints()},f.getCuePoints=function(){var e=[];return this.h&&(e=e.concat(this.h.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},f.getStats=function(){var e=this.m;return{loadTimes:e.g,averageLoadTime:C2(e),started:e.h,overlayAds:e.j,playedCompletely:e.l,skipped:e.m,errors:e.i}},f.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},f.onDashTimedMetadata=function(e){this.h&&e.schemeIdUri=="urn:google:dai:2018"&&this.h.g.processMetadata(e.schemeIdUri,e.eventNode?e.eventNode.attributes.messageData:null,e.startTime)},f.onHlsTimedMetadata=function(e,t){this.h&&this.h.g.processMetadata("ID3",e.data,t)},f.onCueMetadataChange=function(e){this.h&&this.h.onCueMetadataChange(e)},f.onHLSInterstitialMetadata=function(e,t,n){this.l&&this.l.disableHLSInterstitial||(this.g||this.initInterstitial(null,e,t),this.g&&O2(this.g,n))},f.onDASHInterstitialMetadata=function(e,t,n){if(!this.l||!this.l.disableDASHInterstitial){var r=n.schemeIdUri;if(r=="urn:mpeg:dash:event:alternativeMPD:insert:2025"||r=="urn:mpeg:dash:event:alternativeMPD:replace:2025"){if(this.g||this.initInterstitial(null,e,t),this.g&&(e=this.g,t=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:replace:2025",r=n.schemeIdUri=="urn:mpeg:dash:event:alternativeMPD:insert:2025",t||r)){for(var i=n.startTime,o=n.endTime,s=null,a=0,u,l=d(n.eventNode.children),h=l.next();!h.done;h=l.next())if(h=h.value,h.tagName=="AlternativeMPD"){if(h=h.attributes.uri){u=h;break}}else if(h.tagName=="InsertPresentation"||h.tagName=="ReplacePresentation"){var g=h.attributes.uri||h.attributes.url;if(g){u=Wr(g),(l=wt(h,"maxDuration",ne))&&(s=l/n.timescale),(l=wt(h,"returnOffset",ne))&&(a=l/n.timescale),t&&a&&(o=i+a);break}}u&&vc(e,[{id:n.id,groupId:null,startTime:i,endTime:o,uri:u,mimeType:null,isSkippable:!1,skipOffset:null,skipFor:null,canJump:!0,resumeOffset:r?a:null,playoutLimit:s,once:!1,pre:!1,post:!1,timelineRange:t&&!r,loop:!1,overlay:null,displayOnBackground:!1,currentVideo:null,background:null,clickThroughUrl:null}])}}else(r=="urn:mpeg:dash:event:2012"||r=="urn:scte:dash:scte214-events")&&n.eventNode&&Pn(n.eventNode,"OverlayEvent")&&(this.g||this.initInterstitial(null,e,t),this.g&&D2(this.g,n))}},f.addCustomInterstitial=function(e){if(!this.g)throw new fe(1,10,10006);vc(this.g,[e])},f.addAdUrlInterstitial=function(e){if(!this.g)throw new fe(1,10,10006);return this.g.addAdUrlInterstitial(e)},f.getInterstitialPlayer=function(){if(!this.g)throw new fe(1,10,10006);return this.g.md()};function yd(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.m.g.push(t.loadTime);break;case"ad-started":e.m.h++;var n=t.ad;n&&!n.isLinear()&&e.m.j++;break;case"ad-complete":e.m.l++;break;case"ad-skipped":e.m.m++;break;case"ad-error":e.m.i++}e.dispatchEvent(t)}be("shaka.ads.AdManager",ft),ft.prototype.getInterstitialPlayer=ft.prototype.getInterstitialPlayer,ft.prototype.addAdUrlInterstitial=ft.prototype.addAdUrlInterstitial,ft.prototype.addCustomInterstitial=ft.prototype.addCustomInterstitial,ft.prototype.onDASHInterstitialMetadata=ft.prototype.onDASHInterstitialMetadata,ft.prototype.onHLSInterstitialMetadata=ft.prototype.onHLSInterstitialMetadata,ft.prototype.onCueMetadataChange=ft.prototype.onCueMetadataChange,ft.prototype.onHlsTimedMetadata=ft.prototype.onHlsTimedMetadata,ft.prototype.onDashTimedMetadata=ft.prototype.onDashTimedMetadata,ft.prototype.onManifestUpdated=ft.prototype.onManifestUpdated,ft.prototype.getStats=ft.prototype.getStats,ft.prototype.getCuePoints=ft.prototype.getCuePoints,ft.prototype.getServerSideCuePoints=ft.prototype.getServerSideCuePoints,ft.prototype.replaceServerSideAdTagParameters=ft.prototype.replaceServerSideAdTagParameters,ft.prototype.requestServerSideStream=ft.prototype.requestServerSideStream,ft.prototype.initServerSide=ft.prototype.initServerSide,ft.prototype.addMediaTailorTrackingUrl=ft.prototype.addMediaTailorTrackingUrl,ft.prototype.requestMediaTailorStream=ft.prototype.requestMediaTailorStream,ft.prototype.initMediaTailor=ft.prototype.initMediaTailor,ft.prototype.updateClientSideAdsRenderingSettings=ft.prototype.updateClientSideAdsRenderingSettings,ft.prototype.requestClientSideAds=ft.prototype.requestClientSideAds,ft.prototype.onAssetUnload=ft.prototype.onAssetUnload,ft.prototype.release=ft.prototype.release,ft.prototype.initClientSide=ft.prototype.initClientSide,ft.prototype.initInterstitial=ft.prototype.initInterstitial,ft.prototype.configure=ft.prototype.configure,ft.prototype.setLocale=ft.prototype.setLocale,ft.ADS_LOADED="ads-loaded",ft.AD_STARTED="ad-started",ft.AD_FIRST_QUARTILE="ad-first-quartile",ft.AD_MIDPOINT="ad-midpoint",ft.AD_THIRD_QUARTILE="ad-third-quartile",ft.AD_COMPLETE="ad-complete",ft.AD_STOPPED="ad-stopped",ft.AD_SKIPPED="ad-skipped",ft.AD_VOLUME_CHANGED="ad-volume-changed",ft.AD_MUTED="ad-muted",ft.AD_PAUSED="ad-paused",ft.AD_RESUMED="ad-resumed",ft.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",ft.CUEPOINTS_CHANGED="ad-cue-points-changed",ft.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",ft.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",ft.AD_CLICKED="ad-clicked",ft.AD_PROGRESS="ad-progress",ft.AD_BUFFERING="ad-buffering",ft.AD_IMPRESSION="ad-impression",ft.AD_DURATION_CHANGED="ad-duration-changed",ft.AD_CLOSED="ad-closed",ft.AD_LOADED="ad-loaded",ft.ALL_ADS_COMPLETED="all-ads-completed",ft.AD_LINEAR_CHANGED="ad-linear-changed",ft.AD_METADATA="ad-metadata",ft.AD_RECOVERABLE_ERROR="ad-recoverable-error",ft.AD_ERROR="ad-error",ft.AD_BREAK_READY="ad-break-ready",ft.AD_INTERACTION="ad-interaction",ft.AD_CONTENT_PAUSE_REQUESTED="ad-content-pause-requested",ft.AD_CONTENT_RESUME_REQUESTED="ad-content-resume-requested",ft.AD_CONTENT_ATTACH_REQUESTED="ad-content-attach-requested",dd=function(){return new ft};function ug(e){return JSON.stringify(e,function(t,n){if(typeof n!="function"){if(t=n instanceof yt,n instanceof Event||t){var r={};for(o in n){var i=n[o];i&&typeof i=="object"?o=="detail"?r[o]=i:i instanceof Event||i instanceof yt?r[o]={__type__:"Event",event:ug(i)}:t&&Array.isArray(i)&&(r[o]=i):o in Event||(r[o]=i)}return r}if(n instanceof Error){var o=new Set(["name","message","stack"]);for(r in n)o.add(r);for(t=d(Object.getOwnPropertyNames(n)),r=t.next();!r.done;r=t.next())o.add(r.value);for(t={},o=d(o),r=o.next();!r.done;r=o.next())r=r.value,t[r]=n[r];n={__type__:"Error",contents:t}}else if(n instanceof TimeRanges){for(o={__type__:"TimeRanges",length:n.length,start:[],end:[]},n=d(ca(n)),t=n.next();!t.done;t=n.next())t=t.value,r=t.end,o.start.push(t.start),o.end.push(r);n=o}else n=ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT===1?{__type__:"Uint8Array",entries:Array.from(n)}:typeof n=="number"?isNaN(n)?"NaN":isFinite(n)?n:n<0?"-Infinity":"Infinity":n;return n}})}function Sd(e){return JSON.parse(e,function(t,n){if(n=="NaN")var r=NaN;else if(n=="-Infinity")r=-1/0;else if(n=="Infinity")r=1/0;else if(n&&typeof n=="object"&&n.__type__=="TimeRanges")r=G2(n);else if(n&&typeof n=="object"&&n.__type__=="Uint8Array")r=new Uint8Array(n.entries);else if(n&&typeof n=="object"&&n.__type__=="Error"){t=n.contents,n=Error(t.message);for(r in t)n[r]=t[r];r=n}else r=n&&typeof n=="object"&&n.__type__=="Event"?Sd(n.event):n;return r})}function G2(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}var G1="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),K2="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),lg=["loop","playbackRate"],W2=["pause","play"],cg=new Map().set("getAssetUri",2).set("getAudioLanguages",4).set("getAudioLanguagesAndRoles",4).set("getBufferFullness",1).set("getBufferedInfo",2).set("getExpiration",2).set("getKeyStatuses",2).set("getPlaybackRate",2).set("getTextLanguages",4).set("getTextLanguagesAndRoles",4).set("isAudioOnly",10).set("isBuffering",1).set("isInProgress",1).set("isLive",10).set("isTextTrackVisible",1).set("isVideoOnly",10).set("keySystem",10).set("seekRange",1).set("getLoadMode",10).set("getManifestType",10).set("isFullyLoaded",1).set("isEnded",1).set("getBandwidthEstimate",1).set("isRemotePlayback",1),fg=new Map().set("getConfiguration",4).set("getConfigurationForLowLatency",4).set("getStats",5).set("getAudioTracks",2).set("getChaptersTracks",2).set("getImageTracks",2).set("getVideoTracks",2).set("getTextTracks",2).set("getVariantTracks",2),K1=new Map().set("getPlayheadTimeAsDate",1).set("getPresentationStartTimeAsDate",20).set("getSegmentAvailabilityDuration",20),W1=[["getConfiguration","configure","getConfigurationForLowLatency","configurationForLowLatency"]],z1=[["isTextTrackVisible","setTextTrackVisibility"]],z2="cancelTrickPlay configure configurationForLowLatency getChapters resetConfiguration retryStreaming selectAudioLanguage selectAudioTrack selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel selectVideoTrack setTextTrackVisibility trickPlay updateStartTime goToLive useTrickPlayTrackIfAvailable".split(" "),$2="addChaptersTrack addTextTrackAsync addThumbnailsTrack getAllThumbnails getChaptersAsync getThumbnails attach attachCanvas detach load unload".split(" ");function dg(e,t,n,r,i,o,s){var a=this;this.H=e,this.K=s,this.l=new Yt(t),this.M=n,this.u=!1,this.B=r,this.G=i,this.N=o,this.i=this.m=!1,this.J="",this.o=null,this.C=function(){return hg(a)},this.D=function(u,l){switch(u=Sd(l),u.type){case"event":var h=u.targetName,g=Nv(u.event);a.B(h,g);break;case"update":h=u.update;for(g in h){u=a.g[g]||{};for(var m in h[g])u[m]=h[g][m]}a.u&&(a.M(),a.u=!1);break;case"asyncComplete":if(m=u.id,g=u.error,l=u.res,u=a.h.get(m),a.h.delete(m),u)if(g){m=new fe(g.severity,g.category,g.code);for(h in g)m[h]=g[h];u.reject(m)}else u.resolve(l)}},this.g={video:{},player:{}},this.I=0,this.h=new Map,this.j=null,Tc.add(this)}f=dg.prototype,f.destroy=function(){return Tc.delete(this),pg(this),ls&&X1(this),this.l&&(this.l.stop(),this.l=null),this.G=this.B=null,this.i=this.m=!1,this.D=this.C=this.j=this.h=this.g=this.o=null,Promise.resolve()},f.rb=function(){return this.i},f.ah=function(){return this.J},f.init=function(){if(this.H.length)if(R.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.l.xb();var e=new chrome.cast.SessionRequest(this.H,[],null,this.K,null);e=new chrome.cast.ApiConfig(e,function(t){for(var n=d(Tc),r=n.next();!r.done;r=n.next()){r=r.value;var i=t;r.j=new zn,r.u=!0,Td(r,i)}},function(t){for(var n=d(Tc),r=n.next();!r.done;r=n.next())r=r.value,Ed=t=="available",r.l.xb()},"origin_scoped"),chrome.cast.initialize(e,function(){},function(){}),Ed&&this.l.ka(Y2),(e=ls)&&e.status!=chrome.cast.SessionStatus.STOPPED?(this.j=new zn,this.u=!0,Td(this,e)):ls=null}else R.__onGCastApiAvailable!==Y1&&(xd=R.__onGCastApiAvailable||null,R.__onGCastApiAvailable=Y1)},f.oh=function(e){this.o=e,this.i&&Sc(this,{type:"appData",appData:this.o})},f.cast=function(){var e=this;return G(function(t){if(!e.m)throw new fe(1,8,8e3);if(!Ed)throw new fe(1,8,8001);if(e.i)throw new fe(1,8,8002);return e.j=new zn,chrome.cast.requestSession(function(n){return Td(e,n)},function(n){return $1(e,n)}),t.g(e.j,0)})};function X2(e){e.i&&chrome.cast.requestSession(function(t){return Td(e,t)},function(t){return $1(e,t)})}f.hd=function(){if(this.i){if(pg(this),ls){X1(this);try{ls.stop(function(){},function(){})}catch{}ls=null}hg(this)}},f.get=function(e,t){var n=this;if(e=="video"){if(W2.includes(t))return function(){return n.Hi.apply(n,[e,t].concat(M(we.apply(0,arguments))))}}else if(e=="player"){if(K1.has(t)&&!this.get("player","isLive")())return function(){};if(z2.includes(t))return function(){return n.Hi.apply(n,[e,t].concat(M(we.apply(0,arguments))))};if($2.includes(t))return function(){return n.Nk.apply(n,[e,t].concat(M(we.apply(0,arguments))))};if(cg.has(t)||fg.has(t))return function(){return n.g[e][t]}}return this.g[e][t]},f.set=function(e,t,n){this.g[e][t]=n,Sc(this,{type:"set",targetName:e,property:t,value:n})};function Td(e,t){var n=e.N();ls=t,t.addUpdateListener(e.C),t.addMessageListener("urn:x-cast:com.google.shaka.v2",e.D),hg(e),Sc(e,{type:"init",initState:n,appData:e.o}),e.j.resolve()}function $1(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.j.reject(new fe(2,8,n,t))}f.Hi=function(e,t){Sc(this,{type:"call",targetName:e,methodName:t,args:we.apply(2,arguments)})},f.Nk=function(e,t){var n=we.apply(2,arguments),r=new zn,i=this.I.toString();this.I++,this.h.set(i,r);try{Sc(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:i})}catch(o){r.reject(o)}return r};function X1(e){var t=ls;t.removeUpdateListener(e.C),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.D)}function hg(e){var t=ls?ls.status=="connected":!1;if(e.i&&!t){e.G();for(var n in e.g)e.g[n]={};pg(e)}e.i=t,e.J=t?ls.receiver.friendlyName:"",e.l.xb()}function pg(e){if(e.h)for(var t=d(e.h.keys()),n=t.next();!n.done;n=t.next()){n=n.value;var r=e.h.get(n);e.h.delete(n),r.reject(new fe(1,7,7e3))}}function Sc(e,t){t=ug(t);var n=ls;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,function(){},Fn)}catch(r){throw t=new fe(2,8,8005,r),n=new yt("error",new Map().set("detail",t)),e.B("player",n),e.hd(),t}}var Y2=.02,Ed=!1,ls=null,xd=null,Tc=new Set;function Y1(e){if(xd?R.__onGCastApiAvailable=xd:delete R.__onGCastApiAvailable,xd=null,e)for(var t=d(Tc),n=t.next();!n.done;n=t.next())n.value.init();typeof R.__onGCastApiAvailable=="function"&&R.__onGCastApiAvailable(e)}function Fr(e,t,n,r){r=r===void 0?!1:r,_n.call(this);var i=this;this.i=e,this.h=t,this.l=this.o=this.m=this.u=this.j=null,this.I=n,this.H=r,this.D=[],this.C=[],this.B=[],this.G=new Map,this.g=null,R.chrome&&ct().Pa()!="CAST"?(this.g=new dg(n,function(){return Z1(i)},function(){return q1(i)},function(o,s){return tS(i,o,s)},function(){return eS(i)},function(){return Q1(i)},r),J2(this)):(this.j=this.i,this.u=this.h)}P(Fr,_n),f=Fr.prototype,f.destroy=function(e){return this.g&&(e!==void 0&&e)&&this.g.hd(),this.l&&(this.l.release(),this.l=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.j=this.i=null,_n.prototype.release.call(this),Promise.all(e)},f.dk=function(){return this.j},f.md=function(){return this.u},f.pj=function(){return this.g?this.g.m&&Ed:!1},f.rb=function(){return this.g?this.g.rb():!1},f.ah=function(){return this.g?this.g.ah():""},f.cast=function(){var e=this;return G(function(t){return t.h==1?e.g?t.g(e.g.cast(),2):t.return():e.h?t.g(e.h.xc(),0):t.return()})},f.oh=function(e){this.g&&this.g.oh(e)},f.fl=function(){this.g&&X2(this.g)},f.hd=function(){this.g&&this.g.hd()},f.qj=function(e,t){t=t===void 0?!1:t;var n=this;return G(function(r){if(r.h==1)return e==n.I&&t==n.H||(n.I=e,n.H=t,!n.g)?r.return():(n.g.hd(),r.g(n.g.destroy(),2));n.g=null,n.g=new dg(e,function(){return Z1(n)},function(){return q1(n)},function(i,o){return tS(n,i,o)},function(){return eS(n)},function(){return Q1(n)},t),n.g.init(),r.j()})};function J2(e){e.g.init(),e.l=new Et;for(var t=d(G1),n=t.next();!n.done;n=t.next())e.l.F(e.i,n.value,function(o){e.g.rb()||(o=Nv(o),e.m.dispatchEvent(o))});for(var r in cf)e.l.F(e.h,cf[r],function(o){e.g.rb()||e.o.dispatchEvent(o)});e.j={},t={};for(var i in e.i)t={$d:t.$d},t.$d=i,Object.defineProperty(e.j,t.$d,{configurable:!1,enumerable:!0,get:function(o){return function(){return Z2(e,o.$d)}}(t),set:function(o){return function(s){var a=o.$d;e.g.rb()?e.g.set("video",a,s):e.i[a]=s}}(t)});e.u={},J1(e,function(o){Object.defineProperty(e.u,o,{configurable:!1,enumerable:!0,get:function(){return wd(e,o)}})}),Q2(e),e.m=new _n,e.m.Ce=e.j,e.o=new _n,e.o.Ce=e.u,e.l.F(e.h,"unloading",function(){e.g&&e.g.rb()||gg(e)})}function Q2(e){var t=new Map;J1(e,function(n,r){t.has(r)?(r=t.get(r),n.length<r.length?e.G.set(n,r):e.G.set(r,n)):t.set(r,n)})}function J1(e,t){function n(u){return u=="constructor"||typeof r[u]!="function"?!1:!i.has(u)}var r=e.h,i=new Set,o;for(o in r)n(o)&&(i.add(o),t(o,r[o]));for(e=Object.getPrototypeOf(r),o=Object.getPrototypeOf({});e&&e!=o;){for(var s=d(Object.getOwnPropertyNames(e)),a=s.next();!a.done;a=s.next())a=a.value,n(a)&&(i.add(a),t(a,r[a]));e=Object.getPrototypeOf(e)}}function Q1(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.jd(),startTime:null,addThumbnailsTrackCalls:e.D,addTextTrackAsyncCalls:e.C,addChaptersTrackCalls:e.B};e.i.pause();for(var n=d(lg),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.i[r];for(e.i.ended||(t.startTime=e.i.currentTime),n=d(W1),r=n.next();!r.done;r=n.next()){var i=r.value;r=i[1],i=e.h[i[0]](),t.player[r]=i}for(n=d(z1),r=n.next();!r.done;r=n.next())i=r.value,r=i[1],i=e.h[i[0]](),t.playerAfterLoad[r]=i;return t}function Z1(e){var t=new yt("caststatuschanged");e.dispatchEvent(t)}function q1(e){var t=new yt(e.j.paused?"pause":"play");e.m.dispatchEvent(t)}function eS(e){for(var t=d(W1),n=t.next();!n.done;n=t.next()){var r=n.value;n=r[1],r=e.g.get("player",r[0])(),e.h[n](r)}var i=e.D,o=e.C,s=e.B;gg(e);var a=e.g.get("player","getAssetUri")();r=e.g.get("video","ended"),t=Promise.resolve();var u=e.i.autoplay;n=null,r||(n=e.g.get("video","currentTime"));var l;(r=e.g.get("player","getTextTracks")())&&r.length&&(l=r.find(function(m){return m.active}));var h=e.g.get("player","isTextTrackVisible")();a&&(e.i.autoplay=!1,t=e.h.load(a,n));var g={};for(n=d(lg),r=n.next();!r.done;r=n.next())r=r.value,g[r]=e.g.get("video",r);t.then(function(){if(e.i){for(var m=d(i),S=m.next();!S.done;S=m.next()){S=S.value;var A;(A=e.md()).Ie.apply(A,M(S))}for(m=d(o),A=m.next();!A.done;A=m.next()){A=A.value;var k;(k=e.md()).Ld.apply(k,M(A))}for(k=d(s),m=k.next();!m.done;m=k.next()){m=m.value;var b;(b=e.md()).He.apply(b,M(m))}for(b=d(lg),k=b.next();!k.done;k=b.next())k=k.value,e.i[k]=g[k];for(b=d(z1),k=b.next();!k.done;k=b.next())m=k.value,k=m[1],m=e.g.get("player",m[0])(),e.h[k](m);e.h.rh(h),l&&e.h.mh(l.language,l.roles,l.forced),e.i.autoplay=u,a&&e.i.play()}},function(m){m=new Map().set("detail",m),m=new yt("error",m),e.h.dispatchEvent(m)})}function Z2(e,t){if(t=="addEventListener")return function(r,i,o){return e.m.addEventListener(r,i,o)};if(t=="removeEventListener")return function(r,i,o){return e.m.removeEventListener(r,i,o)};if(e.g.rb()&&Object.keys(e.g.g.video).length==0){var n=e.i[t];if(typeof n!="function")return n}return e.g.rb()?e.g.get("video",t):(t=e.i[t],typeof t=="function"&&(t=t.bind(e.i)),t)}function wd(e,t,n){if(n=n===void 0?!1:n,e.G.has(t)&&(t=e.G.get(t)),t=="addEventListener")return function(r,i,o){return e.o.addEventListener(r,i,o)};if(t=="removeEventListener")return function(r,i,o){return e.o.removeEventListener(r,i,o)};if(t=="getMediaElement")return function(){return e.j};if(t=="getSharedConfiguration")return e.g.get("player","getConfiguration");if(t=="getNetworkingEngine")return function(){return e.h.Rb()};if(t=="getDrmEngine")return function(){return e.h.D};if(t=="getAdManager")return function(){return e.h.$h()};if(t=="getQueueManager")return function(){return e.h.ii()};if(t=="setVideoContainer")return function(r){return e.h.Vi(r)};if(!n){if(t=="addThumbnailsTrack")return function(){var r=we.apply(0,arguments);return e.D.push(r),wd(e,t,!0).apply(null,M(r))};if(t=="addTextTrackAsync")return function(){var r=we.apply(0,arguments);return e.C.push(r),wd(e,t,!0).apply(null,M(r))};if(t=="addChaptersTrack")return function(){var r=we.apply(0,arguments);return e.B.push(r),wd(e,t,!0).apply(null,M(r))}}if(e.g.rb()){if(t=="getManifest"||t=="drmInfo")return function(){return ut(t+"() does not work while casting!"),null};if(t=="attach"||t=="detach")return function(){return ut(t+"() does not work while casting!"),Promise.resolve()};if(t=="getChapters")return function(){return ut(t+"() does not work while casting!"),[]}}return e.g.rb()&&Object.keys(e.g.g.video).length==0&&(cg.has(t)||fg.has(t))||!e.g.rb()?e.h[t].bind(e.h):e.g.get("player",t)}function tS(e,t,n){e.g.rb()&&(t=="video"?e.m.dispatchEvent(n):t=="player"&&(n.type=="unloading"&&gg(e),e.o.dispatchEvent(n)))}function gg(e){e.D=[],e.C=[],e.B=[]}be("shaka.cast.CastProxy",Fr),Fr.prototype.changeReceiverId=Fr.prototype.qj,Fr.prototype.forceDisconnect=Fr.prototype.hd,Fr.prototype.suggestDisconnect=Fr.prototype.fl,Fr.prototype.setAppData=Fr.prototype.oh,Fr.prototype.cast=Fr.prototype.cast,Fr.prototype.receiverName=Fr.prototype.ah,Fr.prototype.isCasting=Fr.prototype.rb,Fr.prototype.canCast=Fr.prototype.pj,Fr.prototype.getPlayer=Fr.prototype.md,Fr.prototype.getVideo=Fr.prototype.dk,Fr.prototype.destroy=Fr.prototype.destroy;function Ii(e,t,n,r){_n.call(this);var i=this;this.h=e,this.g=t,this.j=new Et,this.I={video:e,player:t},this.G=n||function(){},this.J=r||function(o){return o},this.i=null,this.H=!1,this.o=!0,this.m=0,this.C=!1,this.B=!0,this.u=this.l=null,this.D=new Yt(function(){mg(i)}),q2(this)}P(Ii,_n),f=Ii.prototype,f.isConnected=function(){return this.H},f.kk=function(){return this.o},f.Zk=function(e){this.i=e},f.uj=function(){this.i=null},f.$k=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},f.Yk=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},f.Xk=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},f.destroy=function(){var e=this,t,n;return G(function(r){if(r.h==1)return e.j&&(e.j.release(),e.j=null),t=[],e.g&&(t.push(e.g.destroy()),e.g=null),e.D&&(e.D.stop(),e.D=null),e.h=null,e.I=null,e.G=null,e.H=!1,e.o=!0,e.l=null,e.u=null,_n.prototype.release.call(e),r.g(Promise.all(t),2);n=cast.receiver.CastReceiverManager.getInstance(),n.stop(),r.j()})};function q2(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return nS(e)},t.onSenderDisconnected=function(){return nS(e)},t.onSystemVolumeChanged=function(){var i=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();i&&ga(e,{type:"update",update:{video:{volume:i.level,muted:i.muted}}},e.l),ga(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.u=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.u.onMessage=function(i){return nM(e,i)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(i){return tM(e,i)},t.start(),t=d(G1);for(var n=t.next();!n.done;n=t.next())e.j.F(e.h,n.value,function(i){return rS(e,"video",i)});for(var r in cf)e.j.F(e.g,cf[r],function(i){return rS(e,"player",i)});e.j.F(e.h,"loadeddata",function(){e.C=!0}),e.j.F(e.g,"loading",function(){e.o=!1,cl(e)}),e.j.F(e.h,"playing",function(){e.o=!1,cl(e)}),e.j.F(e.h,"pause",function(){cl(e)}),e.j.F(e.g,"unloading",function(){e.o=!0,cl(e)}),e.j.F(e.h,"ended",function(){new Yt(function(){e.h&&e.h.ended&&(e.o=!0,cl(e))}).ka(iM)})}function nS(e){e.m=0,e.B=!0,e.H=cast.receiver.CastReceiverManager.getInstance().getSenders().length!=0,cl(e)}function cl(e){var t;G(function(n){if(n.h==1)return n.g(Promise.resolve(),2);if(!e.g)return n.return();t=new yt("caststatuschanged"),e.dispatchEvent(t),iS(e)||ma(e),n.j()})}function eM(e,t,n){var r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe;G(function(te){switch(te.h){case 1:for(r in t.player)i=t.player[r],e.g[r](i);return e.G(n),o=e.h.autoplay,t.manifest?(e.h.autoplay=!1,te.m(5),te.g(e.g.load(t.manifest,t.startTime),7)):te.g(Promise.resolve(),3);case 7:if(t.addThumbnailsTrackCalls)for(s=d(t.addThumbnailsTrackCalls),a=s.next();!a.done;a=s.next())u=a.value,e.g.Ie.apply(e.g,M(u));if(t.addTextTrackAsyncCalls)for(l=d(t.addTextTrackAsyncCalls),h=l.next();!h.done;h=l.next())g=h.value,e.g.Ld.apply(e.g,M(g));if(t.addChaptersTrackCalls)for(m=d(t.addChaptersTrackCalls),S=m.next();!S.done;S=m.next())A=S.value,e.g.He.apply(e.g,M(A));te.o(3);break;case 5:return k=te.l(),b=new Map().set("detail",k),V=new yt("error",b),e.g&&e.g.dispatchEvent(V),te.return();case 3:if(!e.g)return te.return();for(B in t.video)Z=t.video[B],e.h[B]=Z;for(ae in t.playerAfterLoad)pe=t.playerAfterLoad[ae],e.g[ae](pe);e.h.autoplay=o,t.manifest&&(e.h.play(),ma(e)),te.j()}})}function rS(e,t,n){e.g&&(mg(e),ga(e,{type:"event",targetName:t,event:n},e.l))}function mg(e){e.D.ka(rM);for(var t={video:{},player:{}},n=d(K2),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.h[r];e.g.U()&&K1.forEach(function(i,o){e.m%i==0&&(t.player[o]=e.g[o]())}),cg.forEach(function(i,o){e.m%i==0&&(t.player[o]=e.g[o]())}),(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),ga(e,{type:"update",update:t},e.l),fg.forEach(function(i,o){e.m%i==0&&(i={player:{}},i.player[o]=e.g[o](),ga(e,{type:"update",update:i},e.l))}),e.C&&(e.m+=1),iS(e)}function iS(e){return e.B&&(e.h.duration||e.g.U())?(vg(e),e.B=!1,!0):!1}function vg(e,t){var n={contentId:e.g.jd(),streamType:e.g.U()?"LIVE":"BUFFERED",contentType:""};e.g.U()||(n.duration=e.h.duration),e.i&&(n.metadata=e.i),ma(e,t===void 0?0:t,n)}function tM(e,t){var n=Sd(t.data);switch(n.type){case"init":e.m=0,e.C=!1,e.B=!0,eM(e,n.initState,n.appData),mg(e);break;case"appData":e.G(n.appData);break;case"set":var r=n.targetName,i=n.property;if(n=n.value,r=="video"){if(t=cast.receiver.CastReceiverManager.getInstance(),i=="volume"){t.setSystemVolumeLevel(n);break}else if(i=="muted"){t.setSystemVolumeMuted(n);break}}e.I[r][i]=n;break;case"call":r=e.I[n.targetName],r[n.methodName].apply(r,n.args);break;case"asyncCall":r=n.targetName,i=n.methodName,r=="player"&&i=="load"&&(e.m=0,e.C=!1);var o=n.id,s=t.senderId;t=e.I[r],n=t[i].apply(t,n.args),r=="player"&&i=="load"&&(n=n.then(function(){e.B=!0})),n.then(function(a){return oS(e,s,o,null,a)},function(a){return oS(e,s,o,a,null)})}}function nM(e,t){var n=Sd(t.data);switch(n.type){case"PLAY":e.h.play(),ma(e);break;case"PAUSE":e.h.pause(),ma(e);break;case"SEEK":t=n.currentTime;var r=n.resumeState;t!=null&&(e.h.currentTime=Number(t)),r&&r=="PLAYBACK_START"?(e.h.play(),ma(e)):r&&r=="PLAYBACK_PAUSE"&&(e.h.pause(),ma(e));break;case"STOP":e.g.xc().then(function(){e.g&&ma(e)});break;case"GET_STATUS":vg(e,Number(n.requestId));break;case"VOLUME":r=n.volume,t=r.level,r=r.muted;var i=e.h.volume,o=e.h.muted;t!=null&&(e.h.volume=Number(t)),r!=null&&(e.h.muted=r),i==e.h.volume&&o==e.h.muted||ma(e);break;case"LOAD":e.m=0,e.C=!1,e.B=!1,t=n.media,r=n.currentTime,i=e.J(t.contentId),o=n.autoplay||!0,e.G(t.customData),o&&(e.h.autoplay=!0),e.g.load(i,r).then(function(){e.g&&vg(e)}).catch(function(s){var a="LOAD_FAILED";s.category==7&&s.code==7e3&&(a="LOAD_CANCELLED"),ga(e,{requestId:Number(n.requestId),type:a},e.u)});break;default:ga(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.u)}}function oS(e,t,n,r,i){e.g&&ga(e,{type:"asyncComplete",id:n,error:r,res:i},e.l,t)}function ga(e,t,n,r){e.H&&(e=ug(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function ma(e,t,n){n=n===void 0?null:n;var r={mediaSessionId:0,playbackRate:e.h.playbackRate,playerState:e.o?oM:e.g.Mg()?aM:e.h.paused?uM:sM,currentTime:e.h.currentTime,supportedMediaCommands:63,volume:{level:e.h.volume,muted:e.h.muted}};n&&(r.media=n),ga(e,{requestId:t===void 0?0:t,type:"MEDIA_STATUS",status:[r]},e.u)}be("shaka.cast.CastReceiver",Ii),Ii.prototype.destroy=Ii.prototype.destroy,Ii.prototype.setContentArtist=Ii.prototype.Xk,Ii.prototype.setContentImage=Ii.prototype.Yk,Ii.prototype.setContentTitle=Ii.prototype.$k,Ii.prototype.clearContentMetadata=Ii.prototype.uj,Ii.prototype.setContentMetadata=Ii.prototype.Zk,Ii.prototype.isIdle=Ii.prototype.kk,Ii.prototype.isConnected=Ii.prototype.isConnected;var rM=.5,iM=5,oM="IDLE",sM="PLAYING",aM="BUFFERING",uM="PAUSED";function sS(e,t,n,r,i){if(r>=i)return null;for(var o=-1,s=-1,a=0;a<n.length;a++)if(n[a].some(function(ae){return ae!=null&&ae.g.trim()!=""})){o=a;break}for(a=n.length-1;a>=0;a--)if(n[a].some(function(ae){return ae!=null&&ae.g.trim()!=""})){s=a;break}if(o===-1||s===-1)return null;for(var u=a=!1,l="white",h="black",g=yg(r,i,a,u,l,h);o<=s;o++){for(var m=n[o],S=-1,A=-1,k=0;k<m.length;k++)if(m[k]!=null&&m[k].g.trim()!==""){S=k;break}for(k=m.length-1;k>=0;k--)if(m[k]!=null&&m[k].g.trim()!==""){A=k;break}if(S===-1||A===-1)m=aS(r,i),e.nestedCues.push(m);else{for(;S<=A;S++)if(k=m[S]){var b=k.l,V=k.i,B=k.j,Z=k.h;(b!=a||V!=u||B!=l||Z!=h)&&(g.payload&&e.nestedCues.push(g),g=yg(r,i,b,V,B,Z),a=b,u=V,l=B,h=Z),g.payload+=k.g}else g.payload+=" ";g.payload&&e.nestedCues.push(g),o!==s&&(g=aS(r,i),e.nestedCues.push(g)),g=yg(r,i,a,u,l,h)}}return e.nestedCues.length?{cue:e,stream:t}:null}function yg(e,t,n,r,i,o){return e=new At(e,t,""),n&&e.textDecoration.push(xs),r&&(e.fontStyle=Ca),e.color=i,e.backgroundColor=o,e}function aS(e,t){return e=new At(e,t,""),e.lineBreak=!0,e}function uS(e,t,n,r,i){this.g=e,this.l=t,this.i=n,this.h=r,this.j=i}function Sg(e,t){this.i=[],this.g=1,this.h=0,this.D=e,this.C=t,this.j=this.m=!1,this.l="white",this.o="black",this.u=this.B=null,Ec(this)}function Ad(e,t,n){var r="CC"+((e.D<<1|e.C)+1),i=new At(t,n,"");i.lineInterpretation=1;var o=fS.get(e.g);return o&&(i.line=o),e.u!=null&&e.B!=null&&(i.position=10+Math.min(70,e.u*10)+e.B*2.5),(t=sS(i,r,e.i,t,n))&&e.g+t.cue.nestedCues.length-3>15&&(o=fS.get(e.g+3-t.cue.nestedCues.length))&&(i.line=o),t}function Ec(e){va(e,0,15),e.g=1}function fl(e,t,n){if(!(n<32||n>127)){var r="";switch(t){case 0:r=cS.has(n)?cS.get(n):String.fromCharCode(n);break;case 1:r=lM.get(n);break;case 2:e.i[e.g].pop(),r=cM.get(n);break;case 3:e.i[e.g].pop(),r=fM.get(n)}r&&e.i[e.g].push(new uS(r,e.m,e.j,e.o,e.l))}}function lS(e,t,n,r){if(!(n<0||t<0))if(t>=n)for(--r;r>=0;r--)e.i[t+r]=e.i[n+r].map(function(o){return o});else for(var i=0;i<r;i++)e.i[t+i]=e.i[n+i].map(function(o){return o})}function va(e,t,n){for(var r=0;r<=n;r++)e.i[t+r]=[]}var cS=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),lM=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57," "],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),cM=new Map([[32,"Á"],[33,"É"],[34,"Ó"],[35,"Ú"],[36,"Ü"],[37,"ü"],[38,"‘"],[39,"¡"],[40,"*"],[41,"'"],[42,"─"],[43,"©"],[44,"℠"],[45,"·"],[46,"“"],[47,"”"],[48,"À"],[49,"Â"],[50,"Ç"],[51,"È"],[52,"Ê"],[53,"Ë"],[54,"ë"],[55,"Î"],[56,"Ï"],[57,"ï"],[58,"Ô"],[59,"Ù"],[60,"ù"],[61,"Û"],[62,"«"],[63,"»"]]),fM=new Map([[32,"Ã"],[33,"ã"],[34,"Í"],[35,"Ì"],[36,"ì"],[37,"Ò"],[38,"ò"],[39,"Õ"],[40,"õ"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"Ä"],[49,"ä"],[50,"Ö"],[51,"ö"],[52,"ß"],[53,"¥"],[54,"¤"],[55,"│"],[56,"Å"],[57,"å"],[58,"Ø"],[59,"ø"],[60,"┌"],[61,"┐"],[62,"└"],[63,"┘"]]),fS=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function Id(e,t){this.h=0,this.o=new Sg(e,t),this.i=new Sg(e,t),this.g=this.j=new Sg(e,t),this.l=0,this.m=null}function Tg(e,t,n){e.g=e.i;var r=e.g,i=null;return e.h!==3&&e.h!==4&&(i=Ad(r,e.l,n),n=e.i,n.g=n.h>0?n.h:0,va(n,0,15),n=e.j,n.g=n.h>0?n.h:0,va(n,0,15),r.g=15),e.h=3,r.h=t,i}function dS(e){e.h=1,e.g=e.j,e.g.h=0}function hS(e){In("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=4}var dM="black green blue cyan red yellow magenta black".split(" "),pS="white green blue cyan red yellow magenta white_italics".split(" ");function Eg(e,t){this.J=t,this.N=e,this.K=this.l=!1,this.m=this.o=this.H=this.M=this.I=0,this.G=2,this.i=[],this.g=this.h=this.j=0,this.D=this.B=!1,this.C="white",this.u="black",xg(this)}function xg(e){e.i=[];for(var t=0;t<16;t++)e.i.push(wg())}function wg(){for(var e=[],t=0;t<42;t++)e.push(null);return e}function _a(e,t){gS(e)&&(e.i[e.h][e.g]=new uS(t,e.D,e.B,e.u,e.C),e.g++)}function gS(e){var t=e.g<e.m&&e.g>=0;return e.h<e.o&&e.h>=0&&t}Eg.prototype.isVisible=function(){return this.l};function hM(e){for(var t=0,n=1;n<16;n++,t++)e.i[t]=e.i[n];for(n=0;n<1;n++,t++)e.i[t]=wg()}function wu(e,t,n){var r=new At(e.j,t,"");r.textAlign=e.G===0?"left":e.G===1?"right":Jt;var i=r.region;switch(e.J&&(i.id+="svc"+e.J),i.id+="win"+e.N,i.height=e.o,i.width=e.m,i.heightUnits=2,i.widthUnits=2,i.viewportAnchorX=e.I,i.viewportAnchorY=e.M,i.viewportAnchorUnits=e.K?Vr:2,e.H){case 0:i.regionAnchorX=0,i.regionAnchorY=0;break;case 1:i.regionAnchorX=50,i.regionAnchorY=0;break;case 2:i.regionAnchorX=100,i.regionAnchorY=0;break;case 3:i.regionAnchorX=0,i.regionAnchorY=50;break;case 4:i.regionAnchorX=50,i.regionAnchorY=50;break;case 5:i.regionAnchorX=100,i.regionAnchorY=50;break;case 6:i.regionAnchorX=0,i.regionAnchorY=100;break;case 7:i.regionAnchorX=50,i.regionAnchorY=100;break;case 8:i.regionAnchorX=100,i.regionAnchorY=100}return(n=sS(r,"svc"+n,e.i,e.j,t))&&(e.j=t),n}Eg.prototype.display=function(){this.l=!0};function pM(){this.i=[],this.h=null,this.g=0}function gM(e,t){t.type===3?(e.g=(t.value&63)*2-1,e.h=[]):e.h&&(e.g>0&&(e.h.push(t),e.g--),e.g===0&&(e.i.push(new xc(e.h)),e.h=null,e.g=0))}function xc(e){this.g=0,this.h=e}xc.prototype.La=function(){return this.g<this.h.length},xc.prototype.Qa=function(){return this.g};function Jr(e){if(!e.La())throw new fe(2,2,3e3);return e.h[e.g++]}xc.prototype.skip=function(e){if(this.g+e>this.h.length)throw new fe(2,2,3e3);this.g+=e},xc.prototype.Li=function(e){if(this.g-e<0)throw new fe(2,2,3e3);this.g-=e};function mM(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function vM(e,t,n,r){if(!e.g)return[];if(n==24)return n=Jr(t).value,r=Jr(t).value,n=function(o){return o.map(function(s){return("0"+(s&255).toString(16)).slice(-2)}).join("")}([n,r]),_a(e.g,String.fromCharCode(parseInt(n,16))),[];t=e.g;var i=null;switch(n){case 8:!gS(t)||t.g<=0&&t.h<=0||(t.g<=0?(t.g=t.m-1,t.h--):t.g--,t.i[t.h][t.g]=null);break;case 13:t.isVisible()&&(i=wu(t,r,e.i)),t.h+1>=t.o?hM(t):t.h++,t.g=0;break;case 14:t.isVisible()&&(i=wu(t,r,e.i)),t.i[t.h]=wg(),t.g=0;break;case 12:t.isVisible()&&(i=wu(t,r,e.i)),xg(t),t.h=0,t.g=0}return i?[i]:[]}function yM(e,t,n,r){if(n>=128&&n<=135)r=n&7,e.h[r]&&(e.g=e.h[r]);else{if(n===136){n=Jr(t).value,t=[],n=d(wc(e,n));for(var i=n.next();!i.done;i=n.next()){if(i=e.h[i.value],i.isVisible()){var o=wu(i,r,e.i);o&&t.push(o)}xg(i)}return t}if(n===137)for(t=Jr(t).value,t=d(wc(e,t)),n=t.next();!n.done;n=t.next())n=e.h[n.value],n.isVisible()||(n.j=r),n.display();else{if(n===138){for(n=Jr(t).value,t=null,n=d(wc(e,n)),i=n.next();!i.done;i=n.next())i=e.h[i.value],i.isVisible()&&(t=wu(i,r,e.i)),i.l=!1;return t?[t]:[]}if(n===139){for(n=Jr(t).value,t=null,n=d(wc(e,n)),i=n.next();!i.done;i=n.next())i=e.h[i.value],i.isVisible()?t=wu(i,r,e.i):i.j=r,i.l=!i.l;return t?[t]:[]}if(n===140)return t=Jr(t).value,mS(e,t,r);if(n===143)return r=mS(e,255,r),vS(e),r;if(n===144)t.skip(1),r=Jr(t).value,e.g&&(e.g.B=(r&128)>0,e.g.D=(r&64)>0);else if(n===145)r=Jr(t).value,n=Jr(t).value,t.skip(1),e.g&&(t=yS((n&48)>>4,(n&12)>>2,n&3),e.g.C=yS((r&48)>>4,(r&12)>>2,r&3),e.g.u=t);else if(n===146)r=Jr(t).value,t=Jr(t).value,e.g&&(e=e.g,e.h=r&15,e.g=t&63);else if(n===151)t.skip(1),t.skip(1),r=Jr(t).value,t.skip(1),e.g&&(e.g.G=r&3);else if(n>=152&&n<=159){n=(n&15)-8,i=e.h[n]!==null,i||(o=new Eg(n,e.i),o.j=r,e.h[n]=o),r=Jr(t).value,o=Jr(t).value;var s=Jr(t).value,a=Jr(t).value,u=Jr(t).value;t=Jr(t).value,i&&!(t&7)||(t=e.h[n],t.h=0,t.g=0,t.D=!1,t.B=!1,t.C="white",t.u="black"),t=e.h[n],t.l=(r&32)>0,t.M=o&127,t.I=s,t.H=(a&240)>>4,t.K=(o&128)>0,t.o=(a&15)+1,t.m=(u&63)+1,e.g=e.h[n]}}}return[]}function wc(e,t){for(var n=[],r=0;r<8;r++)(t&1)===1&&e.h[r]&&n.push(r),t>>=1;return n}function mS(e,t,n){var r=[];t=d(wc(e,t));for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=e.h[i];o.isVisible()&&(o=wu(o,n,e.i))&&r.push(o),e.h[i]=null}return r}function vS(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function yS(e,t,n){var r={0:0,1:0,2:1,3:1};return e=r[e],t=r[t],n=r[n],SM[e<<2|t<<1|n]}var SS=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),SM="black blue green cyan red magenta yellow white".split(" ");function dl(){this.h=[],this.g=[],this.i=new pM,this.l=0,this.m=new Map([["CC1",new Id(0,0)],["CC2",new Id(0,1)],["CC3",new Id(1,0)],["CC4",new Id(1,1)]]),this.u=this.o=0,this.j=new Map,this.C=!0,this.B=new Set,Ag(this)}dl.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,Ag(this),e=d(this.j.values());for(var t=e.next();!t.done;t=e.next())vS(t.value)};function Ag(e){e.o=0,e.u=0;for(var t=d(e.m.values()),n=t.next();!n.done;n=t.next())n=n.value,n.h=0,n.g=n.j,n.m=null,Ec(n.i),Ec(n.j),Ec(n.o);e.C=!0}dl.prototype.extract=function(e,t){if(this.C){for(var n=d(this.m.values()),r=n.next();!r.done;r=n.next())r.value.l=t;this.C=!1}if(e=new cr(e,0),!(e.getLength()<8)&&e.Z()===181&&e.Da()===49&&e.W()===1195456820&&e.Z()===3&&(n=e.Z(),(n&64)!==0))for(n&=31,e.skip(1),r=0;r<n;r++){var i=e.Z(),o=(i&4)>>2,s=e.Z(),a=e.Z();o&&(i&=3,i===0||i===1?this.h.push({pts:t,type:i,zb:s,ec:a,order:this.h.length}):(this.g.push({pts:t,type:i,value:s,order:this.g.length}),this.g.push({pts:t,type:2,value:a,order:this.g.length})))}},dl.prototype.decode=function(){function e(i,o){return i.pts-o.pts||i.order-o.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n=d(this.h),r=n.next();!r.done;r=n.next())(r=TM(this,r.value))&&t.push(r);for(n=d(this.g),r=n.next();!r.done;r=n.next())gM(this.i,r.value);for(n=d(this.i.i),r=n.next();!r.done;r=n.next())r=EM(this,r.value),t.push.apply(t,M(r));return this.i.i=[],this.h=[],this.g=[],t};function TM(e,t){var n=t.type;if((t.zb&112)===16){var r=t.zb>>3&1;n===0?e.o=r:e.u=r}if(r="CC"+((n<<1|(n?e.u:e.o))+1),n=e.m.get(r),t.zb===255&&t.ec===255||!t.zb&&!t.ec||!TS(t.zb)||!TS(t.ec))return++e.l>=45&&Ag(e),null;e.l=0,t.zb&=127,t.ec&=127;var i=t.zb;if(i>=1&&i<=15||!t.zb&&!t.ec)return null;if(i=null,(t.zb&112)===16)e:{if(e.B.add(r),r=t.zb,e=t.ec,n.m===(r<<8|e))n.m=null;else if(n.m=r<<8|e,(r&240)===16&&(e&192)===64){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(r&7)<<1|e>>5&1],r="white",i=!1;var o=null,s=e>95?e-96:e-64;s<=13?r=pS[Math.floor(s/2)]:s<=15?i=!0:o=Math.floor((s-16)/2),e=(e&1)===1,n.h!==4&&(s=n.g,n.h===3&&t!==s.g&&(n=1+t-s.h,lS(s,n,1+s.g-s.h,s.h),va(s,0,n-1),va(s,t+1,15-t)),s.g=t,s.m=e,s.j=i,s.l=r,s.u=o,s.o="black")}else if((r&247)===17&&(e&240)===32)n.g.m=!1,n.g.j=!1,n.g.l="white",fl(n.g,0,32),r=!1,t=pS[(e&14)>>1],t==="white_italics"&&(t="white",r=!0),n.g.m=(e&1)===1,n.g.j=r,n.g.l=t;else if((r&247)===16&&(e&240)===32||(r&247)===23&&(e&255)===45)t="black",!(r&7)&&(t=dM[(e&14)>>1]),n.g.o=t;else if((r&247)===17&&(e&240)===48)fl(n.g,1,e);else if((r&246)===18&&(e&224)===32)fl(n.g,r&1?3:2,e);else{if((r&246)===20&&(e&240)===32){switch(e=t.pts,r=null,t.ec){case 32:dS(n);break;case 33:n=n.g,n.i[n.g].pop();break;case 37:r=Tg(n,2,e);break;case 38:r=Tg(n,3,e);break;case 39:r=Tg(n,4,e);break;case 40:fl(n.g,0,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:Ec(n.o),hS(n);break;case 43:hS(n);break;case 44:t=n.i,r=null,n.h!==4&&(r=Ad(t,n.l,e)),va(t,0,15);break;case 45:t=n.g,n.h!==3?r=null:(r=Ad(t,n.l,e),i=t.g-t.h+1,lS(t,i-1,i,t.h),va(t,0,i-1),va(t,t.g,15-t.g),n.l=e);break;case 46:va(n.j,0,15);break;case 47:t=null,n.h!==4&&(t=Ad(n.i,n.l,e)),r=n.j,n.j=n.i,n.i=r,dS(n),n.l=e,r=t}i=r;break e}(r==23||r==31)&&e>=33&&e<=35&&(n.g.B=e-32)}i=null}else e=t.ec,fl(n.g,0,t.zb),fl(n.g,0,e);return i}function EM(e,t){var n=[];try{for(;t.La();){var r=Jr(t).value,i=(r&224)>>5,o=r&31;if(i===7&&o!=0&&(i=Jr(t).value&63),i!=0){e.B.add("svc"+i),e.j.has(i)||e.j.set(i,new mM(i));for(var s=e.j.get(i),a=t.Qa();t.Qa()-a<o;){i=s;var u=t,l=Jr(u),h=l.value,g=l.pts;if(h===16){var m=Jr(u);h=h<<16|m.value}if(h>=0&&h<=31)var S=vM(i,u,h,g);else if(h>=128&&h<=159)S=yM(i,u,h,g);else{if(h>=4096&&h<=4127)i=u,u=h&255,u>=8&&u<=15?i.skip(1):u>=16&&u<=23?i.skip(2):u>=24&&u<=31&&i.skip(3);else if(h>=4224&&h<=4255)i=u,u=h&255,u>=128&&u<=135?i.skip(4):u>=136&&u<=143&&i.skip(5);else if(h>=32&&h<=127)u=h,i.g&&(u===127?_a(i.g,"♪"):_a(i.g,String.fromCharCode(u)));else if(h>=160&&h<=255)i.g&&_a(i.g,String.fromCharCode(h));else if(h>=4128&&h<=4223){if(u=h&255,i.g)if(SS.has(u)){var A=SS.get(u);_a(i.g,A)}else _a(i.g,"_")}else h>=4256&&h<=4351&&i.g&&((h&255)!=160?_a(i.g,"_"):_a(i.g,"[CC]"));S=[]}n.push.apply(n,M(S))}}}}catch(k){if(k instanceof fe&&k.code===3e3)In("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.");else throw k}return n}function TS(e){for(var t=0;e;)t^=e&1,e>>=1;return t===1}dl.prototype.getStreams=function(){return Array.from(this.B)},be("shaka.cea.CeaDecoder",dl),Vn=function(){return new dl};function ES(e){for(var t=[],n=e,r=e=0;r<n.length;)e==2&&n[r]==3?(e=0,n=[].concat(M(n)),n.splice(r,1),n=new Uint8Array(n)):n[r]==0?e++:e=0,r++;for(e=n,r=0;r<e.length;){for(n=0;e[r]==255;)n+=255,r++;n+=e[r++];for(var i=0;e[r]==255;)i+=255,r++;i+=e[r++],n==4&&t.push(e.subarray(r,r+i)),r+=i}return t}function Cd(){this.j=new Map,this.i=this.h=0,this.g=Ig}Cd.prototype.init=function(e){function t(o){o=o.name,Md.has(o)&&(n.g=Md.get(o))}var n=this,r=[],i=[];if(new Hn().box("moov",Wt).box("mvex",Wt).S("trex",function(o){var s=o.reader;s.skip(4),s.skip(4),o=s.W(),s=s.W(),n.h=o,n.i=s}).box("trak",Wt).S("tkhd",function(o){var s=o.reader;o=o.version,o==1?(s.skip(8),s.skip(8)):(s.skip(4),s.skip(4));var a=s.W();o==1?s.skip(8):s.skip(4),s.skip(4),s.skip(8),s.skip(2),s.skip(2),s.skip(2),s.skip(2),s.skip(36),s.Da(),s.Da(),s.Da(),s.Da(),r.push(a)}).box("mdia",Wt).S("mdhd",function(o){o=Sf(o.reader,o.version),i.push(o.timescale)}).box("minf",Wt).box("stbl",Wt).S("stsd",ua).box("avc1",t).box("avc3",t).box("dvav",t).box("dva1",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("vvc1",t).box("vvi1",t).box("dvc1",t).box("dvi1",t).box("encv",co).box("sinf",Wt).box("frma",function(o){o=$h(o.reader).codec,Md.has(o)&&(n.g=Md.get(o))}).parse(e,!0,!0),!r.length||!i.length||r.length!=i.length)throw new fe(2,2,2010);this.g==Ig&&ut("Unable to determine bitstream format for CEA parsing!"),r.forEach(function(o,s){n.j.set(o,i[s])})},Cd.prototype.parse=function(e){var t=this;if(this.g==Ig)return[];var n=[],r=0,i=[];return new Hn().box("moof",function(o){r=o.start,i=[],Wt(o)}).box("traf",function(o){i.push({baseMediaDecodeTime:null,Qd:t.h,Rd:t.i,Di:[],timescale:9e4}),Wt(o)}).S("trun",function(o){var s=i[i.length-1];o=Tf(o.reader,o.version,o.flags),s.Di.push(o)}).S("tfhd",function(o){var s=i[i.length-1];o=vf(o.reader,o.flags),s.Qd=o.Qd||t.h,s.Rd=o.Rd||t.i,o=o.trackId,t.j.has(o)&&(s.timescale=t.j.get(o))}).S("tfdt",function(o){var s=i[i.length-1];o=yf(o.reader,o.version),s.baseMediaDecodeTime=o.baseMediaDecodeTime}).box("mdat",function(o){for(var s=r-o.start-8,a=o.reader.Qa(),u=d(i),l=u.next();!l.done;l=u.next())l=l.value,l.baseMediaDecodeTime===null?ut("Unable to find base media decode time for CEA captions!"):(o.reader.seek(a),xM(t,o.reader,l.baseMediaDecodeTime,l.timescale,l.Qd,l.Rd,s,l.Di,n))}).parse(e,!1,!0),n};function xM(e,t,n,r,i,o,s,a,u){var l=0,h=o,g=a.map(function(A){return A.jh});for(g=[].concat.apply([],M(g)),g.length&&(h=g[0].sampleSize||o),t.skip(s+a[0].kg);t.La();){s=t.W();var m=t.Z(),S=null;switch(S=!1,a=1,e.g){case Ac:S=m&31,S=S==6;break;case Ic:a=2,t.skip(1),S=m>>1&63,S=S==39||S==40;break;case Cc:a=2,t.skip(1),S=m>>1&63,S=S==23||S==24;break;default:return}if(S)for(m=0,l<g.length&&(m=g[l].Bf||0),m=(n+m)/r,a=t.Mb(s-a,!1),a=d(ES(a)),S=a.next();!S.done;S=a.next())u.push({packet:S.value,pts:m});else try{t.skip(s-a)}catch{break}h-=s+4,h==0&&(n=l<g.length?n+(g[l].kh||i):n+i,l++,l<g.length?h=g[l].sampleSize||o:h=o)}}be("shaka.cea.Mp4CeaParser",Cd);var Ig=0,Ac=1,Ic=2,Cc=3,Md=new Map().set("avc1",Ac).set("avc3",Ac).set("dvav",Ac).set("dva1",Ac).set("hev1",Ic).set("hvc1",Ic).set("dvh1",Ic).set("dvhe",Ic).set("vvc1",Cc).set("vvi1",Cc).set("dvc1",Cc).set("dvi1",Cc);eu("video/mp4",function(){return new Cd});function Pd(){this.g=null}Pd.prototype.init=function(){},Pd.prototype.parse=function(e){this.g?this.g.clearData():this.g=new er;var t=[];if(e=xt(e),!Xu(e))return t;e=this.g.parse(e);var n=e.Sd(),r=e.Ye();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(n=d(r),r=n.next();!r.done;r=n.next())if(r=r.value,e.includes(r.type)&&r.time!=null)for(var i=d(ES(r.data)),o=i.next();!o.done;o=i.next())t.push({packet:o.value,pts:r.time});return t},be("shaka.cea.TsCeaParser",Pd),eu("video/mp2t",function(){return new Pd});function wM(e){var t=0,n=gr(e),r=n.getUint32(t,!0);if(r!=e.byteLength)return[];e:{for(e=t+4+2,t=[];e<n.byteLength-1;){r=n.getUint16(e,!0),e+=2;var i=n.getUint16(e,!0);if(e+=2,i&1||i+e>n.byteLength){n=[];break e}var o=xt(n,e,i);t.push({type:r,value:o}),e+=i}n=t}return n}function xS(e){return e=ki(vr(e)),e=wM(e).filter(function(t){return t.type===AM})[0],e?(e=Qi(e.value,!0),(e=Es(e,"WRMHEADER"))?e:null):null}function kd(e){try{var t=xS(e);if(t)e:{for(var n=d(fi(t,"DATA")),r=n.next();!r.done;r=n.next()){var i=r.value;if(i.children)for(var o=d(i.children),s=o.next();!s.done;s=o.next()){var a=s.value;if(a.tagName=="LA_URL"){var u=vr(a);break e}}}u=""}else u="";return u}catch{return""}}var AM=1;function wS(){this.g=new Map}wS.prototype.release=function(){this.g.clear()};function AS(e,t,n,r){var i=MM(e,t),o=null;e=[];var s=[];t=null;var a=new Set(i.map(function(l){return l.keyId}));a.delete(null);var u="cenc";if(a.size>1)throw new fe(2,4,4010);if(!n){if(s=i.filter(function(l){return l.Cd=="urn:mpeg:dash:sea:2012"}),s.length>1)throw new fe(2,4,4050);s.length&&(t=kM(s[0])),(s=i.find(function(l){return l.Cd=="urn:mpeg:dash:mp4protection:2011"}))&&s.encryptionScheme&&(u=s.encryptionScheme),s=i.filter(function(l){return l.Cd=="urn:mpeg:dash:mp4protection:2011"?(o=l.init||o,!1):l.Cd!="urn:mpeg:dash:sea:2012"}),s.length&&(e=CM(o,u,s,r,a),e.length==0&&(e=[Ao("",u,o)]))}if(i.length&&!t&&(n||!s.length))for(e=[],n=d(Object.values(r)),r=n.next();!r.done;r=n.next())r=r.value,r!="org.w3.clearkey"&&(r=Ao(r,u,o),e.push(r));if(a=Array.from(a)[0]||null)for(u=d(e),n=u.next();!n.done;n=u.next())for(n=d(n.value.initData),r=n.next();!r.done;r=n.next())r.value.keyId=a;return{Uh:a,Cm:o,drmInfos:e,ag:t,Zh:!0}}function IM(e,t,n,r,i){var o=AS(e,t,r,i);if(n.Zh)e=n.drmInfos.length==1&&!n.drmInfos[0].keySystem,t=o.drmInfos.length==0,(n.drmInfos.length==0||e&&!t)&&(n.drmInfos=o.drmInfos),n.Zh=!1;else if(o.drmInfos.length>0&&(n.drmInfos=n.drmInfos.filter(function(s){return o.drmInfos.some(function(a){return a.keySystem==s.keySystem})}),n.drmInfos.length==0))throw new fe(2,4,4008);return o.Uh||n.Uh}function bd(e){var t=Ri(e.node,"https://dashif.org/CPS","Laurl");if(t&&(t=vr(t)))return t;if((t=Ri(e.node,"urn:microsoft:playready","pro"))&&vr(t))return kd(t);if((e=Ri(e.node,"urn:mpeg:cenc:2013","pssh"))&&(e=vr(e))){t=ki(e),e=8,t=gr(t);var n=t.getUint8(e);return e+=20,n>0&&(e+=4+16*t.getUint32(e)),e=xt(t,e+4),e=Fo(e),e=Es("<pro>"+e+"</pro>"),kd(e)}return""}function CM(e,t,n,r,i){var o=[];n=d(n);for(var s=n.next();!s.done;s=n.next()){s=s.value;var a=r[s.Cd];if(a){var u;if((u=Ri(s.node,"urn:microsoft:playready","pro"))&&vr(u)){u=vr(u),u=ki(u);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);u=[{initData:gf(u,l,new Set,0),initDataType:"cenc",keyId:s.keyId}]}else u=null;if(l=null,s.Cd==="urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"){l=s;var h=i;if(h.size==0)l=null;else{var g=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]),m=new Uint8Array([]);l=[{initData:gf(m,g,h,1),initDataType:"cenc",keyId:l.keyId}]}}u=Ao(a,t,s.init||e||u||l),(a=bM.get(a))&&(u.licenseServerUri=a(s));e:{if((s=Ri(s.node,"https://dashif.org/CPS","Certurl"))&&(s=vr(s)))break e;s=""}u.serverCertificateUri=s,o.push(u)}}return o}function MM(e,t){var n=[];t=d(t);for(var r=t.next();!r.done;r=t.next())(r=PM(e,r.value))&&n.push(r);return n}function PM(e,t){var n=t.attributes.schemeIdUri,r=Io(t,"urn:mpeg:cenc:2013","default_KID"),i=nu(t,"urn:mpeg:cenc:2013","pssh").map(_r),o=t.attributes.value;if(!n)return null;if(n=n.toLowerCase(),r&&(r=r.replace(/-/g,"").toLowerCase(),r.includes(" ")))throw new fe(2,4,4009);var s=[];try{s=i.map(function(a){if(!e.g.has(a)){var u=ki(a);e.g.set(a,u)}return{initDataType:"cenc",initData:e.g.get(a),keyId:null}})}catch{throw new fe(2,4,4007)}return{node:t,Cd:n,keyId:r,init:s.length>0?s:null,encryptionScheme:o}}function kM(e){if(!R.crypto||!R.crypto.subtle)throw ut("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new fe(2,4,4042);var t=Ri(e.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!t)throw new fe(2,4,4051);if(t.attributes.schemeIdUri!="urn:mpeg:dash:sea:aes128-cbc:2013")throw new fe(2,4,4051);if(t=Ri(e.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod"),!t)throw new fe(2,4,4051);if(e=t.attributes.IV,t=Wr(t.attributes.keyUriTemplate),!e||!t)throw new fe(2,4,4051);if(e=ts(e.substr(2)),e.byteLength!=16)throw new fe(2,4,4048);return{rk:t,iv:e}}var bM=new Map().set("com.apple.fps",function(e){if(R.shakaMediaKeysPolyfill==="apple")throw new fe(2,4,4054);return(e=Ri(e.node,"https://dashif.org/CPS","Laurl"))&&(e=vr(e))?e:""}).set("com.widevine.alpha",function(e){var t=Ri(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=vr(t))?t:(e=Ri(e.node,"urn:microsoft","laurl"))&&Wr(e.attributes.licenseUrl)||""}).set("com.microsoft.playready",bd).set("com.microsoft.playready.recommendation",bd).set("com.microsoft.playready.software",bd).set("com.microsoft.playready.hardware",bd).set("org.w3.clearkey",function(e){var t=Ri(e.node,"https://dashif.org/CPS","Laurl");return t&&(t=vr(t))?t:(e=Ri(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&e.attributes.Lic_type==="EME-1.0"&&e&&(e=vr(e))?e:""});function Mc(e,t,n,r,i,o){var s=new Map().set("RepresentationID",t).set("Number",n).set("SubNumber",r).set("Bandwidth",i).set("Time",o);return e.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(a,u,l,h){if(a=="$$")return"$";var g=s.get(u);if(g==null)return a;switch(u=="RepresentationID"&&l&&(l=void 0),u=="Time"&&typeof g!="bigint"&&(Math.abs(g-Math.round(g))>=.2&&ut("Calculated $Time$ values must be close to integers"),g=Math.round(g)),h){case void 0:case"d":case"i":case"u":a=g.toString();break;case"o":a=g.toString(8);break;case"x":a=g.toString(16);break;case"X":a=g.toString(16).toUpperCase();break;default:a=g.toString()}return l=R.parseInt(l,10)||1,Array(Math.max(0,l-a.length)+1).join("0")+a})}function IS(e,t){var n=cs(e,t,"timescale"),r=1;n&&(r=ge(n)||1),n=cs(e,t,"duration");var i=(n=ge(n||""))?n/r:null,o=cs(e,t,"startNumber"),s=Number(cs(e,t,"presentationTimeOffset"))||0,a=je(o||"");if((o==null||a==null)&&(a=1),o=null,t=hl(e,t,"SegmentTimeline")){t=Mn(t,"S"),o=r,e=e.na.duration||1/0;for(var u=a,l=[],h=-s,g=0;g<t.length;++g){var m=t[g],S=t[g+1],A=wt(m,"t",je),k=wt(m,"d",je),b=wt(m,"r",ne);if(m=wt(m,"k",ne)||0,A!=null&&(A-=s),k){if(A=A??h,b=b||0,b<0)if(S){if(S=wt(S,"t",je),S==null)break;if(A>=S)break;b=Math.ceil((S-A)/k)-1}else{if(e==1/0)break;if(A/o>=e)break;b=Math.ceil((e*o-A)/k)-1}for(l.length>0&&A!=h&&(l[l.length-1].end=A/o),S=0;S<=b;++S)h=A+k,l.push({start:A/o,Gd:A,end:h/o,Fh:h,qc:m,Tk:l.length+u}),A=h}}o=l}return{timescale:r,Lf:n,gb:i,me:a,ac:s/r||0,Yc:s,timeline:o}}function CS(e,t){return[t(e.L),t(e.qa),t(e.va)].filter(ss)}function cs(e,t,n){t=CS(e,t),e=null,t=d(t);for(var r=t.next();!r.done&&!(e=r.value.attributes[n]);r=t.next());return e}function hl(e,t,n){t=CS(e,t),e=null,t=d(t);for(var r=t.next();!r.done&&!(e=Pn(r.value,n));r=t.next());return e}function RM(e,t,n,r,i,o){for(var s=Io(e,"http://www.w3.org/1999/xlink","href"),a=Io(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",u=d(Object.keys(e.attributes)),l=u.next();!l.done;l=u.next()){l=l.value;var h=l.split(":"),g=ta("http://www.w3.org/1999/xlink");h[0]==g&&delete e.attributes[l]}if(o>=5)return ba(new fe(2,4,4028));if(a!="onLoad")return ba(new fe(2,4,4027));var m=kr([r],[s]);return i.request(0,jr(m,t)).Xa(function(S){if(S=ea(S.data,e.tagName),!S)return ba(new fe(2,4,4001,s));for(e.children=[];S.children.length;){var A=S.children.shift();e.children.push(A)}A=d(Object.keys(S.attributes));for(var k=A.next();!k.done;k=A.next())k=k.value,e.attributes[k]=S.attributes[k];return Rd(e,t,n,m[0],i,o+1)})}function Rd(e,t,n,r,i,o){if(o=o===void 0?0:o,Io(e,"http://www.w3.org/1999/xlink","href")){var s=RM(e,t,n,r,i,o);return n&&(s=s.Xa(void 0,function(){return Rd(e,t,n,r,i,o)})),s}s=[];for(var a=d(ku(e)),u=a.next(),l={};!u.done;l={Nd:void 0},u=a.next())l.Nd=u.value,Io(l.Nd,"http://www.w3.org/1999/xlink","href")=="urn:mpeg:dash:resolve-to-zero:2013"?e.children=e.children.filter(function(h){return function(g){return g!==h.Nd}}(l)):l.Nd.tagName!="SegmentTimeline"&&s.push(Rd(l.Nd,t,n,r,i,o));return Dv(s).Xa(function(){return e})}function OM(e,t,n,r,i,o,s,a){var u,l=new Hn().S("sidx",function(h){u=DM(t,r,i,o,s,n,h,a)});if(e&&l.parse(e),u)return u;throw new fe(2,3,3004)}function DM(e,t,n,r,i,o,s,a){a=a===void 0?!1:a;var u=[];s.reader.skip(4);var l=s.reader.W();if(l==0)throw new fe(2,3,3005);if(s.version==0)var h=s.reader.W(),g=s.reader.W();else h=s.reader.yd(),g=s.reader.yd();s.reader.skip(2);var m=s.reader.Da();for(e=(a?-s.size:e)+s.size+g,a=0;a<m;a++){var S=s.reader.W();g=(S&2147483648)>>>31,S&=2147483647;var A=s.reader.W();if(s.reader.skip(4),g==1)throw new fe(2,3,3006);u.push(new kt(h/l+n,(h+A)/l+n,function(){return o},e,e+S-1,t,n,r,i)),h+=A,e+=S}return s.parser.stop(),u}function Ha(e){this.h=gr(e),this.g=new cr(this.h,0)}Ha.prototype.La=function(){return this.g.La()};function ya(e){var t=MS(e);if(t.length>7)throw new fe(2,3,3002);var n=0;t=d(t);for(var r=t.next();!r.done;r=t.next())n=256*n+r.value;t=MS(e);e:{r=d(NM);for(var i=r.next();!i.done;i=r.next())if(Pr(t,new Uint8Array(i.value))){r=!0;break e}r=!1}if(r)t=e.h.byteLength-e.g.Qa();else{if(t.length==8&&t[1]&224)throw new fe(2,3,3001);for(i=r=0;i<t.length;i++){var o=t[i];r=i==0?o&(1<<8-t.length)-1:256*r+o}t=r}return t=e.g.Qa()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Qa(),r=gr(e.h,e.g.Qa(),t),e.g.skip(t),new LM(n,r)}function MS(e){var t=e.g.Qa(),n=e.g.Z();if(n==0)throw new fe(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),xt(e.h,t,n)}var NM=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function LM(e,t){this.id=e,this.g=t}function Cg(e){if(e.g.byteLength>8)throw new fe(2,3,3002);if(e.g.byteLength==8&&e.g.getUint8(0)&224)throw new fe(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++){var r=e.g.getUint8(n);t=256*t+r}return t}function jM(e,t,n,r,i,o,s){if(t=new Ha(t),ya(t).id!=440786851)throw new fe(2,3,3008);var a=ya(t);if(a.id!=408125543)throw new fe(2,3,3009);t=a.g.byteOffset,a=new Ha(a.g);for(var u=null;a.La();){var l=ya(a);if(l.id==357149030){u=l;break}}if(!u)throw new fe(2,3,3010);for(u=new Ha(u.g),l=1e6,a=null;u.La();){var h=ya(u);if(h.id==2807729)l=Cg(h);else if(h.id==17545)if(h.g.byteLength==4)a=h.g.getFloat32(0);else if(h.g.byteLength==8)a=h.g.getFloat64(0);else throw new fe(2,3,3003)}if(a==null)throw new fe(2,3,3011);if(u=l/1e9,a*=u,e=ya(new Ha(e)),e.id!=475249515)throw new fe(2,3,3007);return FM(e,t,u,a,n,r,i,o,s)}function FM(e,t,n,r,i,o,s,a,u){function l(){return i}var h=[];e=new Ha(e.g);for(var g=null,m=null;e.La();){var S=ya(e);if(S.id==187){var A=UM(S);A&&(S=n*A.kl,A=t+A.Lk,g!=null&&h.push(new kt(g+s,S+s,l,m,A-1,o,s,a,u)),g=S,m=A)}}return g!=null&&h.push(new kt(g+s,r+s,l,m,null,o,s,a,u)),h}function UM(e){var t=new Ha(e.g);if(e=ya(t),e.id!=179)throw new fe(2,3,3013);if(e=Cg(e),t=ya(t),t.id!=183)throw new fe(2,3,3012);t=new Ha(t.g);for(var n=0;t.La();){var r=ya(t);if(r.id==241){n=Cg(r);break}}return{kl:e,Lk:n}}function PS(e,t,n){if(t=hl(e,t,"Initialization"),!t)return null;var r=e.L.bb(),i=t.attributes.sourceURL;i&&(r=kr(r,[Wr(i)],e.Fb())),i=0;var o=null;return(t=wt(t,"range",O))&&(i=t.start,o=t.end),n=new Zi(function(){return r},i,o,OS(e),null,null,n,e.qa.encrypted),n.codecs=e.L.codecs,n.mimeType=e.L.mimeType,e.na&&!e.na.ef&&(n.g=e.na.start+e.na.duration),n}function BM(e,t,n){var r=Number(cs(e,pl,"presentationTimeOffset"))||0,i=cs(e,pl,"timescale"),o=1;i&&(o=ge(i)||1);var s=r/o||0,a=PS(e,pl,n);VM(e,a);var u=Vo(e);return{endTime:-1,timeline:-1,Mc:function(){var l=hl(u,pl,"RepresentationIndex"),h=u.L.bb();return l&&(l=Wr(l.attributes.sourceURL))&&(h=kr(h,[l],u.Fb())),l=bS(u),kS(u,t,a,h,l.start,l.end,s)},timescale:o}}function kS(e,t,n,r,i,o,s){var a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce;return G(function(Ee){if(Ee.h==1)return a=e.presentationTimeline,u=!e.pb||!e.na.ef,l=e.na.start,h=e.na.duration,g=e.L.mimeType.split("/")[1],m=t,S=null,A=[m(r,i,o,!1),g=="webm"?m(n.R(),n.startByte,n.endByte,!0):null],m=null,Ee.g(Promise.all(A),2);for(k=Ee.i,b=k[0],V=k[1]||null,B=null,Z=l-s,ae=l,pe=h?l+h:1/0,te=e.L.bb(),le=te.length!=r.length||te.some(function(Se,Ve){return Se!=r[Ve]}),B=g=="mp4"?OM(b,i,te,n,Z,ae,pe,le):jM(b,V,te,n,Z,ae,pe),ie=d(B),ye=ie.next();!ye.done;ye=ie.next())ce=ye.value,ce.codecs=e.L.codecs,ce.mimeType=e.L.mimeType,ce.bandwidth=e.bandwidth;return a.ee(B),S=new wn(B),u&&S.gd(ae,pe,!0),Ee.return(S)})}function pl(e){return e.Dd}function bS(e){var t=hl(e,pl,"RepresentationIndex");return e=cs(e,pl,"indexRange"),e=O(e||""),t&&(e=wt(t,"range",O,e)),e}function VM(e,t){if(RS(e,t),!bS(e))throw new fe(2,4,4002)}function RS(e,t){var n=e.L.mimeType.split("/")[1];if(e.L.contentType!=Bt&&n!="mp4"&&n!="webm")throw new fe(2,4,4006);if(n=="webm"&&!t)throw new fe(2,4,4005)}function OS(e){var t=e.L;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.uf,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null,label:e.qa.label||null,roles:e.roles||null,language:e.qa.language||null}}function _M(e,t,n){var r=PS(e,DS,n),i=HM(e);if(!i.gb&&!i.timeline&&i.sd.length>1)throw new fe(2,4,4002);if(!i.gb&&!e.na.duration&&!i.timeline&&i.sd.length==1)throw new fe(2,4,4002);if(i.timeline&&i.timeline.length==0)throw new fe(2,4,4002);var o=null,s=null;e.va.id&&e.L.id&&(s=t.get(e.va.id+","+e.L.id))&&(o=s.segmentIndex);var a=GM(e.na.start,e.na.duration,e.L.bb,i,r,n,e.L.mimeType,e.L.codecs,e.bandwidth,e.Fb);return t=!o,o?o.be(a,e.presentationTimeline.Db()):o=new wn(a),e.presentationTimeline.ee(a),e.pb&&e.na.ef||o.gd(e.na.start,e.na.duration?e.na.start+e.na.duration:1/0,t),s&&(s.segmentIndex=o),{endTime:-1,timeline:-1,Mc:function(){return o&&o.getNumReferences()!=0||o.nf(a),Promise.resolve(o)},timescale:i.timescale}}function DS(e){return e.vc}function HM(e){var t=KM(e);e=IS(e,DS);var n=e.me;n==0&&(n=1);var r=0;return e.gb?r=e.gb*(n-1):e.timeline&&e.timeline.length>0&&(r=e.timeline[0].start),{gb:e.gb,startTime:r,me:n,ac:e.ac,timescale:e.timescale,timeline:e.timeline,sd:t}}function GM(e,t,n,r,i,o,s,a,u,l){var h=r.sd.length;r.timeline&&r.timeline.length!=r.sd.length&&(h=Math.min(r.timeline.length,r.sd.length));for(var g=e-r.ac,m=t?e+t:1/0,S=[],A=r.startTime,k={},b=0;b<h;k={Nf:void 0,Cf:void 0},b++){k.Cf=r.sd[b];var V=A;A=void 0,A=r.gb!=null?V+r.gb:r.timeline?r.timeline[b].end:V+t,k.Nf=null,k=new kt(e+V,e+A,function(B){return function(){return B.Nf==null&&(B.Nf=kr(n(),[B.Cf.zk],l())),B.Nf}}(k),k.Cf.start,k.Cf.end,i,g,e,m,[],"",null,null,la,o),k.codecs=a,k.mimeType=s,k.bandwidth=u,S.push(k)}return S}function KM(e){return[e.L.vc,e.qa.vc,e.va.vc].filter(ss).map(function(t){return Mn(t,"SegmentURL")}).reduce(function(t,n){return t.length>0?t:n}).map(function(t){t.attributes.indexRange&&!e.Jg&&(e.Jg=!0);var n=Wr(t.attributes.media);return t=wt(t,"mediaRange",O,{start:0,end:null}),{zk:n,start:t.start,end:t.end}})}function NS(e,t,n,r,i,o,s,a,u,l){u||e.L.bf||(e.L.bf=cs(e,Ga,"initialization"));var h=e.L.bf?XM(e,s):null,g=WM(e);zM(g);var m=Vo(e);if(g.Yd)return RS(e,h),{endTime:-1,timeline:-1,Mc:function(){var V=Mc(g.Yd,m.L.originalId,null,null,m.bandwidth||null,null);return V=kr(m.L.bb(),[V]),kS(m,t,h,V,0,null,g.ac)},timescale:g.timescale};if(g.gb)return r||e.qa.contentType==="image"||e.qa.contentType==="text"||(r=e.na.start,l=e.va.id,n=e.na.duration,l=(l=l!=null&&o.get(l)||n)?r+l:1/0,e.presentationTimeline.Tg(g.gb),e.presentationTimeline.Bi(r,l)),{endTime:-1,timeline:-1,Mc:function(){return $M(m,g,i,h,o,s,a,e.L.Df)},timescale:g.timescale};var S=null;r=r=null,e.va.id&&e.L.id&&(r=e.va.id+","+e.L.id,r=n.get(r))&&(S=r.segmentIndex);var A=e.na.start,k=e.na.duration?A+e.na.duration:1/0;if(S)l=S,LS(l,g,A,k,h,e.pb),l.Ya(e.presentationTimeline.Db());else{if(n=0,u=-1,e.va.id!=null&&e.L.id!=null){var b=l.get(e.va.id);if(b)u=b.timeline;else for(l=d(l.values()),b=l.next();!b.done;b=l.next())if(b=b.value,Math.abs(g.ac-b.endTime)<=Xs&&b.eh.includes(e.L.id)){u=b.timeline;break}else b.timeline>=n&&(n=b.timeline+1)}u==-1&&(u=n),S=new Pc(e.pb,g,e.L.originalId,e.bandwidth,e.L.bb,e.Fb,A,k,h,s,e.L.Df,u)}return g.timeline&&e.qa.contentType!=="image"&&e.qa.contentType!=="text"&&e.presentationTimeline.Ci(S.h?S.h.timeline:[],A),r&&e.pb&&(r.segmentIndex=S),r=(r=(r=g.timeline)&&r[r.length-1])?r.end+g.ac:-1,l=-1,S instanceof Pc&&(l=S.Pe()),{endTime:r,timeline:l,Mc:function(){return S instanceof Pc&&S.getNumReferences()==0&&LS(S,g,A,k,h,e.pb),Promise.resolve(S)},timescale:g.timescale}}function Ga(e){return e.Ic}function WM(e){var t=IS(e,Ga),n=cs(e,Ga,"media"),r=cs(e,Ga,"index"),i=cs(e,Ga,"k"),o=0;return i&&(o=parseInt(i,10)),{Lf:t.Lf,gb:t.gb,timescale:t.timescale,me:t.me,ac:t.ac,Yc:t.Yc,timeline:t.timeline,Xb:n&&Wr(n),Yd:r,mimeType:e.L.mimeType,codecs:e.L.codecs,bandwidth:e.bandwidth,Bk:o}}function zM(e){var t=e.Yd?1:0;if(t+=e.timeline?1:0,t+=e.gb?1:0,t==0)throw new fe(2,4,4002);if(t!=1&&(e.Yd&&(e.timeline=null),e.Lf=null,e.gb=null),!e.Yd&&!e.Xb)throw new fe(2,4,4002)}function $M(e,t,n,r,i,o,s,a){function u(Se){var Ve=Se-b,Le=Ve*k,Ce=t.Lf,ke=Ve*Ce;"BigInt"in R&&ke>Number.MAX_SAFE_INTEGER&&(ke=BigInt(Ve)*BigInt(Ce)),Le+=m,Ve=Le+k,Ce=Math.min(Ve,h());var Ge=[],Je=t.Bk;if(Je)for(var Ft=(Ce-Le)/Je,dt={},kn=0;kn<Je;dt={Yi:void 0},kn++){var Ut=Le+Ft*kn,Gn=Ut+Ft;dt.Yi=kn,dt=new kt(Ut,Gn,function(sn){return function(){var Qt=Mc(V,Z,Se,sn.Yi,B,ke);return kr(ae(),[Qt],pe())}}(dt),0,null,r,te,m,h(),[],"",null,null,la,o),dt.codecs=e.L.codecs,dt.mimeType=e.L.mimeType,a==0?kn>0&&dt.qd():kn%a!=0&&dt.qd(),Ge.push(dt)}return Le=new kt(Le,Ce,function(){if(Je)return[];var sn=Mc(V,Z,Se,null,B,ke);return kr(ae(),[sn],pe())},0,null,r,te,m,h(),Ge,"",null,null,la,o,Ge.length>0),Le.codecs=e.L.codecs,Le.mimeType=e.L.mimeType,Le.bandwidth=e.bandwidth,Le.j=Ve,Le}function l(){var Se=[Math.max(g.Db(),m),Math.min(g.Dc(),h())].map(function(Ve){return Ve-m});return Se=[Math.ceil(Se[0]/k),Math.ceil(Se[1]/k)-1],e.L.mb&&Se[1]++,Se.map(function(Ve){return Ve+b})}function h(){var Se=S!=null&&i.get(S)||A;return Se?m+Se:1/0}var g=e.presentationTimeline,m=e.na.start,S=e.va.id,A=e.na.duration,k=t.gb,b=t.me,V=t.Xb,B=e.bandwidth||null,Z=e.L.originalId,ae=e.L.bb,pe=e.Fb,te=m-t.ac,le=l();n=e.pb?Math.max(le[0],le[1]-n+1):le[0],s=s||le[1],le=[];for(var ie=n;ie<=s;++ie){var ye=u(ie);le.push(ye)}var ce=new wn(le);if(le=g.Dc()<h(),ie=g.U(),le||ie){var Ee=Math.max(n,s+1);n=k,e.L.mb&&(n=.1),ce.Mf(n,function(){var Se=g.Db();ce.Ya(Se);var Ve=d(l());Ve.next(),Ve=Ve.next().value;for(var Le=[];Ee<=Ve;){var Ce=u(Ee);Le.push(Ce),Ee++}return Se>h()&&!Le.length?null:Le})}return Promise.resolve(ce)}function XM(e,t){var n=e.L.bf;if(n||(n=cs(e,Ga,"initialization")),!n)return null;n=Wr(n);var r=e.L.originalId,i=e.bandwidth||null,o=e.L.bb,s=e.Fb;return t=new Zi(function(){var a=Mc(n,r,null,null,i,null);return kr(o(),[a],s())},0,null,OS(e),null,null,t,e.qa.encrypted),t.codecs=e.L.codecs,t.mimeType=e.L.mimeType,e.na&&!e.na.ef&&(t.g=e.na.start+e.na.duration),t}function Pc(e,t,n,r,i,o,s,a,u,l,h,g){wn.call(this,[]),this.D=e,this.h=t,this.H=n,this.C=r,this.G=i,this.J=o,this.j=s,this.l=a,this.u=u,this.B=l,this.I=h,this.K=g,Mg(this)}P(Pc,wn),f=Pc.prototype,f.getNumReferences=function(){return this.h?this.h.timeline.length:0},f.release=function(){wn.prototype.release.call(this),this.h=null},f.Ya=function(e){if(this.h){for(var t=0,n=this.h.timeline,r=0;r<n.length&&n[r].end+this.j<=e;r+=1)t+=1;t>0&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.i+=t,this.getNumReferences()===0&&this.release())}};function LS(e,t,n,r,i,o){if(YM(e,i),e.D=o,e.h){if(e.h.Yc!==t.Yc)for(n=t.Yc-e.h.Yc,i=0;i<t.timeline.length;i++)o=t.timeline[i],o.Gd+=n,o.Fh+=n,o.start=(o.Gd+n)/t.timescale,o.end=(o.Fh+n)/t.timescale;if(e.h.Xb!==t.Xb&&(e.h.Xb=t.Xb),n=e.h.timeline,n.length){var s=n[n.length-1];t=t.timeline.filter(function(a){return a.end>s.end})}else t=t.timeline.slice();t.length>0&&e.h.timeline.push.apply(e.h.timeline,M(t)),e.l!==r&&(e.l=r)}else e.h=t,e.j=n,e.l=r;Mg(e)}function YM(e,t){if(e.u!==t){e.u=t,e=d(e.g);for(var n=e.next();!n.done;n=e.next())(n=n.value)&&my(n,t)}}function Mg(e){if(e.h&&!e.o){for(var t=[],n=d(e.h.timeline),r=n.next();!r.done;r=n.next())r=r.value,r.start>=e.l||r.end<=0||t.push(r);e.h.timeline=t,e.Ya(e.j)}}f.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.j)return this.i;if(!this.h)return null;var t=this.h.timeline;if(e<this.j||e>=this.l)return null;for(var n=t.length-1,r=0;r<t.length;r++){var i=t[r],o=i.start+this.j;if(i=r<n?t[r+1].start+this.j:this.l===1/0?i.end+this.j:this.l,e>=o&&e<i)return r+this.i}return null},f.get=function(e){var t=this;if(e-=this.i,e<0||e>=this.getNumReferences()||!this.h)return null;var n=this.g[e];if(!n){n=this.h.timeline[e];var r=n.Tk,i=n.Gd+this.h.Yc,o=this.j-this.h.ac,s=this.j+n.end,a=s;e===this.getNumReferences()-1&&this.l!==1/0&&(a=this.D&&Math.abs(a-this.l)>.1?Math.min(a,this.l):this.l);var u=this.h.codecs,l=this.h.mimeType,h=this.h.bandwidth,g=[],m=!1;if(n.qc&&this.h&&this.h.Xb&&(m=this.h.Xb.includes("$SubNumber$")),m){m=(n.end-n.start)/n.qc;for(var S={},A=0;A<n.qc;S={Of:void 0,Zi:void 0},A++){var k=n.start+m*A,b=k+m;S.Zi=A,S.Of=null,S=new kt(this.j+k,this.j+b,function(V){return function(){return t.h?(V.Of==null&&(V.Of=jS(t.h.Xb,t.H,r,t.C,i,V.Zi,t.G,t.J)),V.Of):[]}}(S),0,null,this.u,o,this.j,this.l,[],"",null,null,la,this.B),S.codecs=u,S.mimeType=l,S.bandwidth=h,this.I==0?A>0&&S.qd():A%this.I!=0&&S.qd(),g.push(S)}}n=new kt(this.j+n.start,a,function(){return g.length>0||!t.h?[]:jS(t.h.Xb,t.H,r,t.C,i,null,t.G,t.J)},0,null,this.u,o,this.j,this.l,g,"",null,null,la,this.B,g.length>0),n.codecs=u,n.mimeType=l,n.j=s,n.bandwidth=h,this.g[e]=n}return n},f.Bb=function(e){Mg(this);for(var t=0;t<this.getNumReferences();t++){var n=this.get(t+this.i);n&&e(n)}};function jS(e,t,n,r,i,o,s,a){return e=Mc(e,t,n,o,r||null,i),kr(s(),[e],a()).map(function(u){return u.toString()})}f.Pe=function(){return this.K};function gl(e){this.o=null,this.B=e,this.H=new Uu,this.i=[],this.h=null,this.m=[],this.C=null,this.G=[],this.D=300,this.l=new Map,this.j=new Map,this.g=null,this.u="UNKNOWN"}gl.prototype.configure=function(e){this.o=e},gl.prototype.destroy=function(){return this.B=this.o=null,this.i=[],this.h=null,this.m=[],this.G=[],this.l.clear(),this.g!=null&&(this.g.stop(),this.g=null),this.H.destroy()},gl.prototype.setManifestType=function(e){this.u=e};function kc(e,t){var n,r,i,o,s,a,u;return G(function(l){if(l.h==1)return n=kr(e.i,[JM(e,t)]),r=jr(n,e.o.retryParameters),i=e.B.networkingEngine.request(8,r),hu(e.H,i),l.m(2),l.g(i.promise,4);if(l.h!=2)return o=l.i,s=Un(o.data),a=JSON.parse(s),a.VERSION==1&&QM(e,a,o.uri),l.o(0);if((u=l.l())&&u.code==7001)return l.return();e.g!=null&&(e.g.stop(),e.g=null),e.g=new Yt(function(){kc(e,t)}),e.g.ka(e.D),l.j()})}function JM(e,t){if(!e.m.length)return t;t=new It(t);var n=e.C||e.m[0],r=Math.round(e.B.getBandwidthEstimate()),i=t.g;return e.u=="DASH"?(i.add("_DASH_pathway",n),i.add("_DASH_throughput",String(r))):e.u=="HLS"&&(i.add("_HLS_pathway",n),i.add("_HLS_throughput",String(r))),So(i),i.Pd&&Pe(t,i),t.toString()}function QM(e,t,n){e.g!=null&&(e.g.stop(),e.g=null);var r=t["RELOAD-URI"]||n;e.g=new Yt(function(){kc(e,r)}),(n=t.TTL)&&(e.D=n),e.g.ka(e.D),e.m=t["PATHWAY-PRIORITY"]||[],e.G=t["PATHWAY-CLONES"]||[]}function ml(e,t,n,r){var i=e.l.get(t);i||(i=new Map),i.set(n,r),e.l.set(t,i)}gl.prototype.banLocation=function(e){this.j.set(e,Date.now()+6e4)};function bc(e,t,n){n=n===void 0?!1:n,t=e.l.get(t)||new Map;for(var r=[],i=d(e.m),o=i.next(),s={};!o.done;s={vd:void 0},o=i.next())if(s.vd=o.value,o=t.get(s.vd))r.push({Yg:s.vd,location:o});else if(o=e.G.find(function(u){return function(l){return l.Ml==u.vd}}(s))){var a=t.get(o["BASE-ID"]);a&&(o["URI-REPLACEMENT"].lj?(a=new It(a),tn(a,o["URI-REPLACEMENT"].lj),r.push({Yg:s.vd,location:a.toString()})):r.push({Yg:s.vd,location:a}))}for(i=Date.now(),s=d(e.j.keys()),o=s.next();!o.done;o=s.next())o=o.value,a=e.j.get(o),i>a&&e.j.delete(o);if(r=r.filter(function(u){for(var l=d(e.j.keys()),h=l.next();!h.done;h=l.next())if(h.value.includes(new It(u.location).Ab))return!1;return!0}),r.length&&(e.C=r[0].Yg),r=r.map(function(u){return u.location}),!r.length&&e.h)for(i=d(e.h.split(",")),s=i.next();!s.done;s=i.next())(s=t.get(s.value))&&(e.C=e.h,r.push(s));if(!r.length)for(t=d(t.values()),i=t.next();!i.done;i=t.next())r.push(i.value);return n?r:kr(e.i,r)}function eo(){this.l=[],this.h=[],this.g=[],this.j=[],this.i=[],this.o=!1,this.m=new Set}f=eo.prototype,f.release=function(){for(var e=d(this.h.concat(this.g,this.j,this.i)),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.j=[],this.i=[],this.l=[],this.o=!1,this.m.clear()},f.ck=function(){return this.l},f.Hg=function(){return this.j.slice()},f.Jj=function(){return this.i},f.Vh=function(e,t){if(e){if(e.type=="audio")for(var n=d(this.h),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e});else if(e.type=="video")for(n=d(this.g),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e}),r.trickModeVideo&&(r.trickModeVideo.matchedStreams=r.trickModeVideo.matchedStreams.filter(function(i){return i!==e})),r.dependencyStream&&(r.dependencyStream.matchedStreams=r.dependencyStream.matchedStreams.filter(function(i){return i!==e}));else if(e.type==Bt)for(n=d(this.j),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e});else if(e.type=="image")for(n=d(this.i),r=n.next();!r.done;r=n.next())r=r.value,r.matchedStreams=r.matchedStreams.filter(function(i){return i!==e});e.segmentIndex&&e.closeSegmentIndex(),this.m.delete(t)}};function FS(e,t){var n=[],r=[],i=[],o=[];e=d(e);for(var s=e.next();!s.done;s=e.next()){var a=s.value;s=new Map(a.audioStreams.map(function(g){return[Rg(g),g]}));var u=new Map(a.videoStreams.map(function(g){return[bg(g),g]})),l=new Map(a.textStreams.map(function(g){return[Oc(g),g]}));if(a=new Map(a.imageStreams.map(function(g){return[Dc(g),g]})),t){var h=KS(Bt);l.set(Oc(h),h),h=KS("image"),a.set(Dc(h),h)}n.push(s),r.push(u),i.push(l),o.push(a)}return{Oh:n,jj:r,dj:i,li:o}}f.fg=function(e,t,n){n=n===void 0?!1:n;var r=this,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce,ke,Ge,Je,Ft;return G(function(dt){if(dt.h==1){if(i=mr,!t&&e.length==1)return o=FS(e,!1),s=o.Oh,a=o.jj,u=o.dj,l=o.li,r.h=Array.from(s[0].values()),r.g=Array.from(a[0].values()),r.j=Array.from(u[0].values()),r.i=Array.from(l[0].values()),dt.A(2);for(h=n?r.m.size:0,g=-1,m=0;m<e.length;m++)S=e[m],r.m.has(S.id)||(r.m.add(S.id),g==-1&&(g=m));return g==-1?dt.return():(A=FS(e,!0),k=A.Oh,b=A.jj,V=A.dj,B=A.li,dt.g(Promise.all([Ka(r,r.h,k,g,vl,Wa,h),Ka(r,r.g,b,g,vl,Wa,h),Ka(r,r.j,V,g,vl,Wa,h),Ka(r,r.i,B,g,vl,Wa,h)]),2))}if(Z=0,ae=[],r.g.length&&r.h.length)for(Ee=d(r.h),Se=Ee.next();!Se.done;Se=Ee.next())for(Ve=Se.value,Le=d(r.g),Ce=Le.next();!Ce.done;Ce=Le.next())ke=Ce.value,Ge=oo(Ve.drmInfos,ke.drmInfos),Ve.drmInfos.length&&ke.drmInfos.length&&!Ge.length||(Je=(Ve.bandwidth||0)+(ke.bandwidth||0),Ve.dependencyStream&&(Je+=Ve.dependencyStream.bandwidth||0),ke.dependencyStream&&(Je+=ke.dependencyStream.bandwidth||0),Ft=Z++,ae.push({id:Ft,language:Ve.language,disabledUntilTime:0,primary:Ve.primary,audio:Ve,video:ke,bandwidth:Je,drmInfos:Ge,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(pe=r.g.length?r.g:r.h,te=d(pe),le=te.next();!le.done;le=te.next())ie=le.value,ye=Z++,ce=ie.bandwidth||0,ie.dependencyStream&&(ce+=ie.dependencyStream.bandwidth||0),ae.push({id:ye,language:ie.language,disabledUntilTime:0,primary:ie.primary,audio:ie.type==i.aa?ie:null,video:ie.type==i.wa?ie:null,bandwidth:ce,drmInfos:ie.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});r.l=ae,dt.j()})};function US(e){var t,n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le;return G(function(Ce){switch(Ce.h){case 1:if(t=mr,e.length==1)return Ce.return(e[0]);for(n=e.map(function(ke){return new Map(ke.filter(function(Ge){return Ge.type===t.aa}).map(function(Ge){return[Rg(Ge),Ge]}))}),r=e.map(function(ke){return new Map(ke.filter(function(Ge){return Ge.type===t.wa}).map(function(Ge){return[bg(Ge),Ge]}))}),i=e.map(function(ke){return new Map(ke.filter(function(Ge){return Ge.type===t.Oa}).map(function(Ge){return[Oc(Ge),Ge]}))}),o=e.map(function(ke){return new Map(ke.filter(function(Ge){return Ge.type===t.Tf}).map(function(Ge){return[Dc(Ge),Ge]}))}),s=d(i),a=s.next();!a.done;a=s.next())u=a.value,l=GS(t.Oa),u.set(Oc(l),l);for(h=d(o),g=h.next();!g.done;g=h.next())m=g.value,S=GS(t.Tf),m.set(Dc(S),S);return A=new eo,Ce.g(Ka(A,[],n,0,Od,Dd,0),2);case 2:return k=Ce.i,Ce.g(Ka(A,[],r,0,Od,Dd,0),3);case 3:return b=Ce.i,Ce.g(Ka(A,[],i,0,Od,Dd,0),4);case 4:return V=Ce.i,Ce.g(Ka(A,[],o,0,Od,Dd,0),5);case 5:if(B=Ce.i,Z=0,b.length&&k.length)for(ie=d(k),ye=ie.next();!ye.done;ye=ie.next())for(ce=ye.value,Ee=d(b),Se=Ee.next();!Se.done;Se=Ee.next())Ve=Se.value,Le=Z++,Ve.variantIds.push(Le),ce.variantIds.push(Le);else for(ae=b.concat(k),pe=d(ae),te=pe.next();!te.done;te=pe.next())le=te.value,le.variantIds=[Z++];return Ce.return(b.concat(k).concat(V).concat(B))}})}function Ka(e,t,n,r,i,o,s){var a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye;return G(function(ce){switch(ce.h){case 1:for(a=[],u=0;u<n.length;u++)u>=r?a.push(new Set(n[u].values())):a.push(new Set);l=d(t),h=l.next();case 2:if(h.done){ce.A(4);break}return g=h.value,ce.g(ZM(e,g,n,r,o,a,s),5);case 5:if(m=ce.i,!m)throw new fe(2,4,4037);h=l.next(),ce.A(2);break;case 4:for(S=d(a),A=S.next();!A.done;A=S.next())for(k=A.value,b=d(k),V=b.next();!V.done;V=b.next())B=V.value,(Z=qM(e,t,B,n,i,o,a))&&t.push(Z);for(ae=d(a),pe=ae.next();!pe.done;pe=ae.next())for(te=pe.value,le=d(te),ie=le.next(),ye={};!ie.done;ye={uh:void 0},ie=le.next())if(ye.uh=ie.value,!kg(ye.uh)&&t.some(function(Ee){return function(Se){return Pg(Ee.uh,Se)}}(ye)))throw new fe(2,4,4037);return ce.return(t)}})}function ZM(e,t,n,r,i,o,s){return G(function(a){return a.h==1?(_S(e,n,t,s>0),t.matchedStreams?t.segmentIndex?a.g(BS(t,r+s),2):a.A(2):a.return(!1)):(VS(t,r,i,o,s),a.return(!0))})}function BS(e,t){var n,r,i,o,s,a;return G(function(u){if(u.h==1){for(n=[],r=e.matchedStreams,i=t;i<r.length;i++)o=r[i],n.push(o.createSegmentIndex()),o.trickModeVideo&&!o.trickModeVideo.segmentIndex&&n.push(o.trickModeVideo.createSegmentIndex()),o.dependencyStream&&!o.dependencyStream.segmentIndex&&n.push(o.dependencyStream.createSegmentIndex());return u.g(Promise.all(n),2)}if(e.segmentIndex instanceof Er)for(s=t;s<r.length;s++)a=r[s],a.segmentIndex&&e.segmentIndex.h.push(a.segmentIndex);u.j()})}function qM(e,t,n,r,i,o,s){if(kg(n))return null;var a=i(n);return _S(e,r,a),a.createSegmentIndex&&(a.createSegmentIndex=function(){return G(function(u){return a.segmentIndex?u.A(0):(a.segmentIndex=new Er,u.g(BS(a,0),0))})},a.closeSegmentIndex=function(){if(a.segmentIndex&&(a.segmentIndex.release(),a.segmentIndex=null),a.matchedStreams)for(var u=d(a.matchedStreams),l=u.next();!l.done;l=u.next()){l=l.value;var h;if(h=l.segmentIndex){e:{h=d(t);for(var g=h.next();!g.done;g=h.next())if(g=g.value,g!==a&&g.segmentIndex&&g.matchedStreams&&g.matchedStreams.includes(l)){h=!0;break e}h=!1}h=!h}h&&(l.segmentIndex.release(),l.segmentIndex=null)}}),!a.matchedStreams||!a.matchedStreams.length?null:(VS(a,0,o,s,0),a)}function VS(e,t,n,r,i){var o=e.matchedStreams;for(t+=i;t<o.length;t++){var s=o[t];n(e,s);var a=!0;if(e.type=="audio"&&$r(e.language,s.language)==0&&(a=!1),a&&((a=r[t-i])&&a.delete(s),s.fullMimeTypes))for(s=d(s.fullMimeTypes.values()),a=s.next();!a.done;a=s.next())e.fullMimeTypes.add(a.value)}}function vl(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){},t.roles=t.roles.slice(),t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set(e.keyIds),t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t.trickModeVideo=null,t.dependencyStream=null,t}function Od(e){var t=Object.assign({},e);return t.roles=t.roles.slice(),t.keyIds=new Set(e.keyIds),t.segments=[],t.variantIds=[],t.closedCaptions=e.closedCaptions?new Map(e.closedCaptions):null,t}function Wa(e,t){function n(s,a){s||(s=[]),a=d(a);for(var u=a.next();!u.done;u=a.next())u=u.value,s.includes(u)||s.push(u);return s}e.roles=n(e.roles,t.roles),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=n(e.emsgSchemeIdUris,t.emsgSchemeIdUris));for(var r=d(t.keyIds),i=r.next();!i.done;i=r.next())e.keyIds.add(i.value);if(e.originalId==null?e.originalId=t.originalId:(r=t.originalId||"")&&!e.originalId.endsWith(r)&&(e.originalId+=","+r),r=oo(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!r.length)throw new fe(2,4,4038);if(e.drmInfos=r,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),r=d(t.closedCaptions),i=r.next();!i.done;i=r.next()){var o=d(i.value);i=o.next().value,o=o.next().value,e.closedCaptions.set(i,o)}e.bandwidth&&t.bandwidth&&(e.bandwidth=Math.max(e.bandwidth,t.bandwidth)),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=vl(t.trickModeVideo),e.trickModeVideo.matchedStreams=[],e.trickModeVideo.createSegmentIndex=function(){if(e.trickModeVideo.segmentIndex)return Promise.resolve();for(var s=new Er,a=d(e.trickModeVideo.matchedStreams),u=a.next();!u.done;u=a.next())s.h.push(u.value.segmentIndex);return e.trickModeVideo.segmentIndex=s,Promise.resolve()}),e.trickModeVideo.matchedStreams.push(t.trickModeVideo),Wa(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&(e.trickModeVideo.matchedStreams.push(t),Wa(e.trickModeVideo,t)),t.dependencyStream?(e.dependencyStream||(e.dependencyStream=vl(t.dependencyStream),e.dependencyStream.matchedStreams=[],e.dependencyStream.createSegmentIndex=function(){if(e.dependencyStream.segmentIndex)return Promise.resolve();for(var s=new Er,a=d(e.dependencyStream.matchedStreams),u=a.next();!u.done;u=a.next())s.h.push(u.value.segmentIndex);return e.dependencyStream.segmentIndex=s,Promise.resolve()}),e.dependencyStream.matchedStreams.push(t.dependencyStream),Wa(e.dependencyStream,t.dependencyStream)):e.dependencyStream&&(e.dependencyStream.matchedStreams.push(t),Wa(e.dependencyStream,t))}function Dd(e,t){var n=e.roles;n||(n=[]);for(var r=d(t.roles),i=r.next();!i.done;i=r.next())i=i.value,n.includes(i)||n.push(i);for(e.roles=n,n=d(t.keyIds),r=n.next();!r.done;r=n.next())e.keyIds.add(r.value);if(e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,M(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),t=d(t.closedCaptions),n=t.next();!n.done;n=t.next())r=d(n.value),n=r.next().value,r=r.next().value,e.closedCaptions.set(n,r)}function _S(e,t,n,r){r=r!==void 0&&r?n.matchedStreams:[],t=d(t);for(var i=t.next();!i.done;i=t.next()){if(i=eP(e,i.value,n),!i)return;r.push(i)}n.matchedStreams=r}function eP(e,t,n){var r={audio:Rg,video:bg,text:Oc,image:Dc}[n.type],i=null,o=r(n);if(t.has(o))i=t.get(o);else{o={audio:function(l,h){return Pg(l,h)},video:function(l,h){return Pg(l,h)},text:tP,image:nP}[n.type];for(var s={audio:rP,video:iP,text:oP,image:sP}[n.type],a=d(t.values()),u=a.next();!u.done;u=a.next())u=u.value,!o(n,u)||n.fastSwitching!=u.fastSwitching||i&&!s(n,i,u)||(i=u)}return e.o&&!kg(i)&&t.delete(r(i)),i}function HS(e,t){return e.mimeType!=t.mimeType?!1:$S(e.codecs)===$S(t.codecs)}f.Ti=function(e){this.o=e};function Pg(e,t){return!(e.drmInfos&&!qo(e.drmInfos,t.drmInfos))}function tP(e,t){return t.language?!(e.forced!==t.forced||$r(e.language,t.language)==0||t.kind!=e.kind):!0}function nP(){return!0}function rP(e,t,n){var r=WS(e,t,n);if(r===go)return!0;if(r===zo)return!1;r=$r(e.language,t.language);var i=$r(e.language,n.language);if(i>r)return!0;if(i<r)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(r=t.roles.filter(function(o){return e.roles.includes(o)}),i=n.roles.filter(function(o){return e.roles.includes(o)}),i.length>r.length)return!0;if(i.length<r.length)return!1;if(n.roles.length!==t.roles.length)return n.roles.length<t.roles.length}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!t.primary&&n.primary?!0:t.primary&&!n.primary?!1:(r=Rc(e.channelsCount,t.channelsCount,n.channelsCount),r==go?!0:r==zo?!1:(r=Rc(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate),r==go?!0:r==zo?!1:!!(e.bandwidth&&zS(e.bandwidth,t.bandwidth,n.bandwidth)==go)))}function iP(e,t,n){var r=WS(e,t,n);if(r===go)return!0;if(r===zo)return!1;if(r=Rc(e.width*e.height,t.width*t.height,n.width*n.height),r==go)return!0;if(r==zo)return!1;if(e.frameRate){if(r=Rc(e.frameRate,t.frameRate,n.frameRate),r==go)return!0;if(r==zo)return!1}return!!(e.bandwidth&&zS(e.bandwidth,t.bandwidth,n.bandwidth)==go)}function oP(e,t,n){var r=$r(e.language,t.language),i=$r(e.language,n.language);if(i>r)return!0;if(i<r)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(t.label!==n.label){if(e.label===t.label)return!1;if(e.label===n.label)return!0}if(e.roles.length){if(r=t.roles.filter(function(o){return e.roles.includes(o)}),i=n.roles.filter(function(o){return e.roles.includes(o)}),i.length>r.length)return!0;if(i.length<r.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return!(n.mimeType!=e.mimeType||n.codecs!=e.codecs||t.mimeType==e.mimeType&&t.codecs==e.codecs)}function sP(e,t,n){return Rc(e.width*e.height,t.width*t.height,n.width*n.height)==go}function GS(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1,baseOriginalId:null}}function KS(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new wn([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null}}function Rc(e,t,n){if(t==e&&e!=n)return zo;if(n==e&&e!=t)return go;if(t>e){if(n<=e||n-e<t-e)return go;if(n-e>t-e)return zo}else{if(n>e)return zo;if(e-n<e-t)return go;if(e-n>e-t)return zo}return Og}function WS(e,t,n){var r=e.mimeType===t.mimeType&&e.codecs===t.codecs,i=e.mimeType===n.mimeType&&e.codecs===n.codecs;return r&&!i?zo:!r&&i?go:(t=HS(e,t),e=HS(e,n),t&&!e?zo:!t&&e?go:Og)}function zS(e,t,n){return t=Math.abs(e-t),e=Math.abs(e-n),e<t?go:t<e?zo:Og}function kg(e){switch(e.type){case Bt:return!e.language;case"image":return!e.tilesLayout;default:return!1}}function bg(e){return Nd([e.fastSwitching,e.width,e.frameRate,e.codecs,e.mimeType,e.label,e.roles,e.closedCaptions?Array.from(e.closedCaptions.entries()):null,e.bandwidth,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function Rg(e){return Nd([e.fastSwitching,e.channelsCount,e.language,e.bandwidth,e.label,e.codecs,e.mimeType,e.roles,e.audioSamplingRate,e.primary,e.dependencyStream?e.dependencyStream.baseOriginalId:null,Array.from(e.keyIds)])}function Oc(e){return Nd([e.language,e.label,e.codecs,e.mimeType,e.bandwidth,e.roles])}function Dc(e){return Nd([e.width,e.codecs,e.mimeType])}function Nd(e){return JSON.stringify(e)}function $S(e){if(!Dg.has(e)){var t=ri(e);Dg.set(e,t)}return Dg.get(e)}be("shaka.util.PeriodCombiner",eo),eo.prototype.setUseStreamOnce=eo.prototype.Ti,eo.prototype.combinePeriods=eo.prototype.fg,eo.prototype.deleteStream=eo.prototype.Vh,eo.prototype.getImageStreams=eo.prototype.Jj,eo.prototype.getTextStreams=eo.prototype.Hg,eo.prototype.getVariants=eo.prototype.ck;var go=1,Og=0,zo=-1,Dg=new Map;function aP(e,t){var n=new DOMParser,r=uP.value()(e);e=null;try{e=n.parseFromString(r,"text/xml")}catch{return null}if(n=e.documentElement,!n||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;if(!("createNodeIterator"in document))return n;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}function XS(e,t){try{var n=ci(e);return aP(n,t)}catch{return null}}var uP=new Kt(function(){if(typeof trustedTypes<"u"){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(t){return t}});return function(t){return e.createHTML(t)}}return function(t){return t}});function Nc(){var e=this;this.j=this.g=null,this.B=[],this.h=null,this.Ka=1,this.I=[],this.l={qf:"",type:"",profiles:[],mc:null,mb:0,bb:null,ie:0},this.u=new Map,this.C=new Map,this.H=new Map,this.o=new Map,this.G=new Map,this.Ba=new Map,this.m=new eo,this.M=0,this.Ga=new Qe(5),this.N=new Yt(function(){if(e.K&&!e.g.continueLoadingWhenPaused&&(e.J.Na(e.K,"timeupdate"),e.K.paused)){e.J.Aa(e.K,"timeupdate",function(){return tT(e)});return}tT(e)}),this.T=new Uu,this.P=null,this.D=[],this.ma=1/0,this.ya=!1,this.i=null,this.O=0,this.V=!1,this.J=new Et,this.K=null,this.X=!1,this.ba="",this.ua=function(){return!1},this.$=[],this.oa=new Set,this.za=new wS}f=Nc.prototype,f.configure=function(e,t){var n=this.j&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.ua=t),n&&this.h&&this.h.presentationTimeline.U()&&this.N.xb(),this.i&&this.i.configure(this.g),this.m&&this.m.Ti(this.g.dash.useStreamOnceInPeriodFlattening)},f.start=function(e,t){var n=this,r;return G(function(i){if(i.h==1)return n.ya=t.isLowLatencyMode(),n.B=[e],n.j=t,i.g(Ng(n),2);if(r=i.i,n.j&&Lg(n,r),!n.j)throw new fe(2,7,7001);return i.return(n.h)})},f.stop=function(){for(var e=d(this.o.values()),t=e.next();!t.done;t=e.next())t=t.value,t.segmentIndex&&t.segmentIndex.release();return this.m&&this.m.release(),this.g=this.j=null,this.B=[],this.h=null,this.o.clear(),this.G.clear(),this.u.clear(),this.C.clear(),this.H.clear(),this.l={qf:"",type:"",profiles:[],mc:null,mb:0,bb:null,ie:0},this.m=null,this.N!=null&&(this.N.stop(),this.N=null),this.i&&this.i.destroy(),this.J&&(this.J.release(),this.J=null),this.oa.clear(),this.za.release(),this.T.destroy()},f.update=function(){var e=this,t;return G(function(n){if(n.h==1)return n.m(2),n.g(Ng(e),4);if(n.h!=2)return n.o(0);if(t=n.l(),!e.j||!t)return n.return();e.j.onError(t),n.j()})},f.onExpirationUpdated=function(){},f.onInitialVariantChosen=function(e){if(this.h&&this.h.presentationTimeline.U()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.h.presentationTimeline.Dc();var n=t.segmentIndex.find(e);n!=null&&(t=t.segmentIndex.get(n))&&(this.M=t.endTime-e,Lg(this,0))}}},f.banLocation=function(e){this.i&&this.i.banLocation(e)},f.setMediaElement=function(e){this.K=e};function Ng(e){var t,n,r,i,o,s,a,u,l,h,g;return G(function(m){return m.h==1?(t=4,n="MPD",r=AP(e),i=e.B,r.length?(i=r,n="Patch",t=6):e.B.length>1&&e.i&&(o=bc(e.i,"Location",!0),o.length&&(i=o)),s=jr(i,e.g.retryParameters),a=Date.now(),m.g(Fg(e,s,0,{type:t}),2)):m.h!=3?(u=m.i,e.j?(u.uri&&u.uri!=u.originalUri&&!e.B.includes(u.uri)&&e.B.unshift(u.uri),l=new It(u.uri),e.ba=l.g.toString(),m.g(lP(e,u.data,u.uri,n),3)):m.return(0)):(h=Date.now(),g=(h-a)/1e3,e.Ga.sample(1,g),e.oa.clear(),m.return(g))})}function lP(e,t,n,r){var i,o,s,a,u,l,h,g,m,S;return G(function(A){if(A.h==1){if(i=t,o=e.g.dash.manifestPreprocessor,s=$f,o!=s){if(lt("manifest.dash.manifestPreprocessor configuration","Please Use manifest.dash.manifestPreprocessorTXml instead."),a=XS(i,r),!a)throw new fe(2,4,4001,n);o(a),i=Ui(a.outerHTML)}if(u=ea(i,r),!u)throw new fe(2,4,4001,n);return l=e.g.dash.manifestPreprocessorTXml,h=Xf,l!=h&&l(u),r==="Patch"?A.return(cP(e,u)):e.g.dash.disableXlinkProcessing?A.return(YS(e,u,n)):(g=e.g.dash.xlinkFailGracefully,m=Rd(u,e.g.retryParameters,g,n,e.j.networkingEngine),hu(e.T,m),A.g(m.promise,2))}return S=A.i,A.return(YS(e,S,n))})}function YS(e,t,n){var r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn,Ut,Gn,sn,Qt,hn,An,pn,Zt,an,Zr,Hr,Lo,ro,zi,Cu,Ta,fs,Al,Il,ph;return G(function(ds){switch(ds.h){case 1:for(e.i&&e.i.l.clear(),r=[n],i=[],o=new Map,s=Mn(t,"Location"),a=d(s),u=a.next();!u.done;u=a.next())l=u.value,h=l.attributes.serviceLocation,(g=_r(l))&&(m=kr(r,[g])[0],h&&(e.i?ml(e.i,"Location",h,m):o.set(h,m)),i.push(m));if(e.i?(S=bc(e.i,"Location",!0),S.length>0&&(r=e.B=S)):i.length&&(r=e.B=i),e.l.qf=t.attributes.id||"",e.l.ie=wt(t,"publishTime",W)||0,e.I=Mn(t,"PatchLocation"),A=Promise.resolve(),(k=Pn(t,"ContentSteering"))&&e.j)for(b=k.attributes.defaultServiceLocation,e.i?(e.i.i=r,e.i.h=b):(e.i=new gl(e.j),e.i.configure(e.g),e.i.setManifestType("DASH"),e.i.i=r,e.i.h=b,(V=_r(k))&&(wt(k,"queryBeforeStart",tt,!1)?A=kc(e.i,V):kc(e.i,V))),B=d(o.keys()),Z=B.next();!Z.done;Z=B.next())ae=Z.value,pe=o.get(ae),ml(e.i,"Location",ae,pe);if(te=Mn(t,"BaseURL"),le=!1,e.i)for(ie=d(te),ye=ie.next();!ye.done;ye=ie.next())ce=ye.value,Ee=ce.attributes.serviceLocation,Se=_r(ce),Ee&&Se&&(ml(e.i,"BaseURL",Ee,Se),le=!0);if(e.$.splice(0),le&&e.i||(Ve=te.map(_r),e.$.push.apply(e.$,M(kr(r,Ve)))),Le=e.i,Ce=e.$,ke=IP,Ge=ke.call(Nc,Le,le,Ce),e.l.bb=Ge,Je=0,te&&te.length&&(Je=wt(te[0],"availabilityTimeOffset",qe)||0),e.l.mb=Je,e.M=wt(t,"minimumUpdatePeriod",Q,-1),Ft=wt(t,"availabilityStartTime",W),dt=wt(t,"timeShiftBufferDepth",Q),kn=e.g.dash.ignoreSuggestedPresentationDelay,Ut=null,kn||(Ut=wt(t,"suggestedPresentationDelay",Q)),Gn=e.g.dash.ignoreMaxSegmentDuration,sn=null,Gn||(sn=wt(t,"maxSegmentDuration",Q)),Qt=t.attributes.type||"static",e.h&&e.h.presentationTimeline&&(e.X=e.h.presentationTimeline.U()&&Qt=="static"),e.l.type=Qt,e.h)for(hn=e.h.presentationTimeline,An=hn.Db(),pn=d(e.o.values()),Zt=pn.next();!Zt.done;Zt=pn.next())an=Zt.value,an.segmentIndex&&an.segmentIndex.Ya(An);else Zr=e.g.dash.ignoreMinBufferTime,Hr=0,Zr||(Hr=wt(t,"minBufferTime",Q)||0),Lo=0,Lo=Ut!=null?Math.min(Ut,dt||1/0):e.g.defaultPresentationDelay>0?e.g.defaultPresentationDelay:Math.min(Hr*1.5,dt||1/0),hn=new Lt(Ft,Lo,e.g.dash.autoCorrectDrift);return hn.Uc(Qt=="static"),hn.U()&&!isNaN(e.g.availabilityWindowOverride)&&(dt=e.g.availabilityWindowOverride),dt==null&&(dt=1/0),hn.Gf(dt),ro=t.attributes.profiles||"",e.l.profiles=ro.split(","),zi={pb:Qt!="static",presentationTimeline:hn,va:null,na:null,qa:null,L:null,bandwidth:0,Jg:!1,mb:Je,mc:null,profiles:ro.split(","),roles:null,Fb:oT},ds.g(A,2);case 2:return e.O=0,Cu=qS(e,zi,Ge,t,!1),Ta=Cu.duration,fs=Cu.periods,(Qt!="static"||e.X)&&Cu.Xh||hn.ub(Ta||1/0),e.V&&e.ya&&hn.Pi(e.ma),hn.Tg(sn||1),e.V&&e.ya&&(Al=Ut??e.g.defaultPresentationDelay,hn.ph(Al)),e.h?(e.h.periodCount=fs.length,e.h.gapCount=e.O,ds.g(JS(e,fs,!1),4)):ds.g(e.m.fg(fs,zi.pb),6);case 6:var gh=hn,Gm=e.m.l,mh=e.m.Hg(),Cl=e.m.i,zc=e.g.dash.sequenceMode,Gr=Pn(t,"ServiceDescription");if(Gr){var vo=Pn(Gr,"Latency");if(Gr=Pn(Gr,"PlaybackRate"),vo||Gr){var $i={};vo&&("target"in vo.attributes&&($i.targetLatency=parseInt(vo.attributes.target,10)/1e3),"max"in vo.attributes&&($i.maxLatency=parseInt(vo.attributes.max,10)/1e3),"min"in vo.attributes&&($i.minLatency=parseInt(vo.attributes.min,10)/1e3)),Gr&&("max"in Gr.attributes&&($i.maxPlaybackRate=parseFloat(Gr.attributes.max)),"min"in Gr.attributes&&($i.minPlaybackRate=parseFloat(Gr.attributes.min))),vo=$i}else vo=null}else vo=null;e:{if(Gr=Mn(t,"SupplementalProperty"),Gr.length){for(Gr=d(Gr),$i=Gr.next();!$i.done;$i=Gr.next())if($i=$i.value,$i.attributes.schemeIdUri=="urn:mpeg:dash:chaining:2016"){Gr=$i.attributes.value;break e}}Gr=null}if(e.h={presentationTimeline:gh,variants:Gm,textStreams:mh,imageStreams:Cl,offlineSessionIds:[],sequenceMode:zc,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:vo,nextUrl:Gr,periodCount:fs.length,gapCount:e.O,isLowLatency:e.V,startTime:null},!hn.hj()){ds.A(7);break}return Il=Mn(t,"UTCTiming"),ds.g(xP(e,Ge,Il),8);case 8:if(ph=ds.i,!e.j)return ds.return();hn.Qi(ph);case 7:hn.lf(),e.m&&!e.h.presentationTimeline.U()&&e.m.release();case 4:e.j.makeTextStreamsForClosedCaptions(e.h),hP(e),pP(e,fs),ds.j()}})}function JS(e,t,n){var r;return G(function(i){if(i.h==1)return i.g(e.m.fg(t,!0,n),2);e.h.variants=e.m.l,r=e.m.Hg(),r.length>0&&(e.h.textStreams=r),e.h.imageStreams=e.m.i,e.j.filter(e.h),i.j()})}function cP(e,t){var n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se;return G(function(Ve){if(Ve.h==1){if(n=t.attributes.mpdId,r=wt(t,"originalPublishTime",W),!n||n!==e.l.qf||r!==e.l.ie)throw e.I=[],new fe(1,4,4052);for(i=[],o=[],s=new Set,a=d(ku(t)),u=a.next();!u.done;u=a.next())if(l=u.value,h=vt(l.attributes.sel||""),g=h[h.length-1],m=_r(l)||"",g.name==="MPD")if(g.yc==="mediaPresentationDuration"){S=_r(l)||"";var Le=Q(S);if(Le!=null){e.l.mc=Le;for(var Ce=d(e.u.values()),ke=Ce.next();!ke.done;ke=Ce.next())ke.value.mc=Le}}else if(g.yc==="type"){for(e.h.presentationTimeline.Uc(m=="static"),e.l.type=m,Le=d(e.u.values()),Ce=Le.next();!Ce.done;Ce=Le.next())Ce.value.pb=m=="dynamic";m=="static"&&(e.M=-1)}else g.yc==="publishTime"?e.l.ie=W(m)||0:g.yc===null&&l.tagName==="add"&&o.push(l);else if(g.name==="PatchLocation")En(e.I,l);else if(g.name==="Period")l.tagName==="add"?o.push(l):l.tagName==="remove"&&g.id&&fP(e,g.id);else if(g.name==="SegmentTemplate"){if(Ce=vt(l.attributes.sel||""),Le=Ce[Ce.length-1],Le.yc){Ce=QS(e,Ce),ke=_r(l)||"";for(var Ge=d(Ce),Je=Ge.next();!Je.done;Je=Ge.next())Je=e.u.get(Je.value),Qn(Je.L.Ic,l.tagName,Le.yc,ke);Le=Ce}else Le=[];for(A=Le,k=d(A),b=k.next();!b.done;b=k.next())V=b.value,s.add(V)}else if(g.name==="SegmentTimeline"||g.name==="S"){for(Le=vt(l.attributes.sel||""),Le=QS(e,Le),Ce=d(Le),ke=Ce.next();!ke.done;ke=Ce.next())ke=e.u.get(ke.value),ke=hl(ke,Ga,"SegmentTimeline"),Ge=Mn(ke,"S"),En(Ge,l),ke.children=Ge;for(B=Le,Z=d(B),ae=Z.next();!ae.done;ae=Z.next())pe=ae.value,s.add(pe)}for(te=d(s),le=te.next();!le.done;le=te.next())ie=le.value,ZS(e,ie);for(ye=d(o),ce=ye.next();!ce.done;ce=ye.next())Ee=ce.value,i.push.apply(i,M(qS(e,{pb:e.l.type=="dynamic",presentationTimeline:e.h.presentationTimeline,va:null,na:null,qa:null,L:null,bandwidth:0,Jg:!1,mb:e.l.mb,profiles:e.l.profiles,mc:e.l.mc,roles:null,Fb:oT},e.l.bb,Ee,!0).periods));return i.length?(e.h.periodCount+=i.length,e.h.gapCount=e.O,Ve.g(JS(e,i,!0),2)):Ve.A(2)}e.l.type=="static"&&(Se=e.l.mc,e.h.presentationTimeline.ub(Se||1/0)),Ve.j()})}function fP(e,t){e.h.periodCount--;for(var n=d(e.u.keys()),r=n.next();!r.done;r=n.next())if(r=r.value,r.startsWith(t)){var i=e.u.get(r);hl(i,Ga,"SegmentTimeline").children=[],ZS(e,r),e.u.delete(r)}e.D=e.D.filter(function(o){return o!==t}),e.H.delete(t)}function QS(e,t){var n="",r="",i=-1,o="";t=d(t);for(var s=t.next();!s.done;s=t.next())s=s.value,s.name==="Period"?n=s.id:s.name==="AdaptationSet"?(r=s.id,s.position!==null&&(i=s.position)):s.name==="Representation"&&(o=s.id);if(t=[],o)t.push(n+","+o);else if(r)for(i=d(e.u.values()),e=i.next();!e.done;e=i.next())e=e.value,e.va.id===n&&e.qa.id===r&&e.L.id&&t.push(n+","+e.L.id);else if(i>-1)for(r=d(e.u.values()),e=r.next();!e.done;e=r.next())e=e.value,e.va.id===n&&e.qa.position===i&&e.L.id&&t.push(n+","+e.L.id);return t}function ZS(e,t){var n=e.u.get(t),r=e.o.get(t);r.segmentIndex&&r.segmentIndex.Ya(e.h.presentationTimeline.Db());try{var i=NS(n,function(o,s,a,u){return rT(e,o,s,a,u)},e.o,!0,e.g.dash.initialSegmentLimit,e.Ba,n.L.aesKey,null,!0,e.C);r.createSegmentIndex=function(){return G(function(o){if(o.h==1)return r.segmentIndex?o.A(0):o.g(i.Mc(),3);r.segmentIndex=o.i,o.j()})}}catch(o){if(t=n.L.contentType,t!=Bt&&t!="application"&&t!="image"||o.code!=4002)throw o}}function qS(e,t,n,r,i){var o=t.mc;o||(o=wt(r,"mediaPresentationDuration",Q),e.l.mc=o);var s=0;e.h&&e.h.presentationTimeline&&e.X&&(s=e.h.presentationTimeline.Tb());var a=[],u=s;r=Mn(r,"Period");var l=t.pb;l||e.H.clear();for(var h=l&&!i?new Set(e.D.slice(1,-1)):null,g=0;g<r.length;g++){var m=r[g],S=r[g+1],A=wt(m,"start",Q,u),k=m.attributes.id,b=wt(m,"duration",Q);A=g==0&&A==0&&e.X?s:A;var V=null;if(S){var B=wt(S,"start",Q);B!=null&&(V=B-A+s)}else o!=null&&(V=o-A+s);if(B=Xs,V&&b&&Math.abs(V-b)>B&&V>b&&e.O++,V==null&&(V=b),!(e.P!==null&&k!=null&&A!==null&&A<e.P)||e.D.includes(k)||g+1==r.length){if(A!==null&&(e.P===null||A>e.P)&&(e.P=A),u={start:A,duration:V,node:m,ef:V==null||!S},m=null,S=g>0&&g<r.length-1,l&&h&&S&&!i&&(k!=null||(k="__shaka_period_"+A),h.has(k)&&(k=e.H.get(k))&&(m=k)),m||(m=gP(e,t,n,u),l&&m.id&&e.H.set(m.id,m)),a.push(m),m.id&&V&&e.Ba.set(m.id,V),V==null){u=null;break}u=A+V}}if(l&&!i&&dP(e,a),i)for(t=d(a),n=t.next();!n.done;n=t.next())n=n.value.id,e.D.includes(n)||e.D.push(n);else e.D=a.map(function(Z){return Z.id});return o!=null?{periods:a,duration:o+s,Xh:!1}:{periods:a,duration:u,Xh:!0}}function dP(e,t){t=new Set(t.map(function(i){return i.id}));for(var n=d(Array.from(e.H.keys())),r=n.next();!r.done;r=n.next())r=r.value,t.has(r)||e.H.delete(r)}function hP(e){var t=Array.from(e.G.keys()).filter(function(a){return!e.D.includes(a)});t=d(t);for(var n=t.next();!n.done;n=t.next()){n=n.value;for(var r=!0,i=d(e.G.get(n)),o=i.next();!o.done;o=i.next()){o=o.value;var s=e.o.get(o);s&&(s.segmentIndex&&s.segmentIndex.getNumReferences()!=0?r=!1:(e.m&&e.m.Vh(s,n),e.o.delete(o)))}r&&e.G.delete(n)}}function pP(e,t){t=new Set(t.map(function(i){return i.id}));for(var n=d(e.C.keys()),r=n.next();!r.done;r=n.next())r=r.value,t.has(r)||e.C.delete(r)}function gP(e,t,n,r){t.va=jg(e,r.node,null,n),t.na=r,t.va.mb=t.mb,t.va.id||(t.va.id="__shaka_period_"+r.start);var i=Mn(r.node,"EventStream");n=t.presentationTimeline.Db(),i=d(i);for(var o=i.next();!o.done;o=i.next())wP(e,r.start,r.duration,o.value,n);for(n=Mn(r.node,"SupplementalProperty"),n=d(n),i=n.next();!i.done;i=n.next())i=i.value,i.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"&&(i=Lc(e,i))&&(t.Fb=i);if(n=Mn(r.node,"AdaptationSet").map(function(S,A){return eT(e,t,A,S)}).filter(ss),t.pb){i=[],o=d(n);for(var s=o.next();!s.done;s=o.next()){s=d(s.value.Pk);for(var a=s.next();!a.done;a=s.next())i.push(a.value)}if(i.length!=new Set(i).size)throw new fe(2,4,4018)}for(i=new Map,o=d(n),s=o.next();!s.done;s=o.next())for(s=d(s.value.xj),a=s.next();!a.done;a=s.next()){var u=d(a.value);a=u.next().value,u=u.next().value,i.set(a,u)}if(i.size)for(o=null,s=d(n),a=s.next();!a.done;a=s.next()){a=a.value,u=[];for(var l=d(a.streams),h=l.next(),g={};!h.done;g={wh:void 0},h=l.next())if(g.wh=h.value,i.has(g.wh.originalId)){o||(o=Mn(r.node,"AdaptationSet").map(function(S,A){return eT(e,t,A,S)}).filter(ss)),h=d(o);for(var m=h.next();!m.done;m=h.next())(m=m.value.streams.find(function(S){return function(A){return A.originalId==S.wh.originalId}}(g)))&&(m.dependencyStream=i.get(m.originalId),m.originalId+=m.dependencyStream.originalId,u.push(m))}u.length&&a.streams.push.apply(a.streams,M(u))}if(r=d(bn(n,function(S){return!!S.fj})),n=r.next().value,r=r.next().value,!e.g.disableIFrames){for(n=d(n),i=n.next();!i.done;i=n.next())for(i=i.value,o=i.fj.split(" "),s=d(r),a=s.next();!a.done;a=s.next())if(a=a.value,o.includes(a.id))for(a=d(a.streams),u=a.next();!u.done;u=a.next())rn(u.value,i.streams)}if(n=Ld(e.g.disableAudio,r,"audio"),i=Ld(e.g.disableVideo,r,"video"),o=Ld(e.g.disableText,r,Bt),r=Ld(e.g.disableThumbnails,r,"image"),i.length===0&&n.length===0)throw new fe(2,4,4004);return{id:t.va.id,audioStreams:n,videoStreams:i,textStreams:o,imageStreams:r}}function Ld(e,t,n){return e||!t.length?[]:t.reduce(function(r,i){return i.contentType!=n||r.push.apply(r,M(i.streams)),r},[])}function eT(e,t,n,r){function i(Se){var Ve=Se.attributes["dvb:fontFamily"];Se=Se.attributes["dvb:url"],Ve&&Se&&(Se=kr(t.qa.bb(),[Se],t.Fb()),e.j.addFont(Ve,Se[0]))}function o(Se){switch(Se){case 1:case 5:case 6:case 7:return"srgb";case 9:return"rec2020";case 11:case 12:return"p3"}}function s(Se){switch(Se){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}t.qa=jg(e,r,t.va,null),t.qa.position=n;var a=!1;n=Mn(r,"Role");var u=n.map(function(Se){return Se.attributes.value}).filter(ss),l=void 0,h=t.qa.contentType==Bt;h&&(l="subtitle"),n=d(n);for(var g=n.next();!g.done;g=n.next()){g=g.value;var m=g.attributes.schemeIdUri;if(m==null||m=="urn:mpeg:dash:role:2011")switch(g=g.attributes.value,g){case"main":a=!0;break;case"caption":case"subtitle":l=g}}var S=Mn(r,"EssentialProperty");n=null;var A=!1;g=null,m=!1,S=d(S);for(var k=S.next();!k.done;k=S.next()){k=k.value;var b=k.attributes.schemeIdUri;if(b=="http://dashif.org/guidelines/trickmode")n=k.attributes.value;else if(b=="urn:mpeg:mpegB:cicp:TransferCharacteristics")var V=s(parseInt(k.attributes.value,10));else if(b=="urn:mpeg:mpegB:cicp:ColourPrimaries")var B=o(parseInt(k.attributes.value,10));else b!="urn:mpeg:mpegB:cicp:MatrixCoefficients"&&(b=="urn:mpeg:dash:ssr:2023"&&e.g.dash.enableFastSwitching?A=!0:b=="urn:dvb:dash:fontdownload:2014"?i(k):b=="urn:mpeg:dash:urlparam:2014"&&(g=Lc(e,k))||(m=!0))}if(m)return null;var Z=null;for(m=Mn(r,"SupplementalProperty"),m=d(m),S=m.next();!S.done;S=m.next())S=S.value,k=S.attributes.schemeIdUri,k=="http://dashif.org/guidelines/last-segment-number"?Z=parseInt(S.attributes.value,10)-1:k=="urn:mpeg:mpegB:cicp:TransferCharacteristics"?V=s(parseInt(S.attributes.value,10)):k=="urn:mpeg:mpegB:cicp:ColourPrimaries"?B=o(parseInt(S.attributes.value,10)):k=="urn:dvb:dash:fontdownload:2014"?i(S):k=="urn:mpeg:dash:urlparam:2014"&&(g=Lc(e,S));g&&(t.Fb=g),g=Mn(r,"Accessibility");var ae=new Map,pe;for(g=d(g),m=g.next();!m.done;m=g.next())if(S=m.value,m=S.attributes.schemeIdUri,S=S.attributes.value,m!="urn:scte:dash:cc:cea-608:2015"||e.g.disableText)if(m!="urn:scte:dash:cc:cea-708:2015"||e.g.disableText)m=="urn:mpeg:dash:role:2011"?S!=null&&(u.push(S),S=="captions"&&(l="caption")):m=="urn:tva:metadata:cs:AudioPurposeCS:2007"&&(S=="1"?pe="visually impaired":S=="2"?pe="hard of hearing":S=="9"&&(pe="spoken subtitles"));else if(m=1,S!=null)for(S=d(S.split(";")),k=S.next();!k.done;k=S.next()){b=k.value;var te=k=void 0;b.includes("=")?(b=b.split("="),k="svc"+b[0],te=b[1].split(",")[0].split(":").pop()):(k="svc"+m,m++,te=b),ae.set(k,Rn(te))}else ae.set("svc1","und");else if(m=1,S!=null)for(S=S.split(";"),k=d(S),b=k.next();!b.done;b=k.next()){te=b.value;var le=b=void 0;te.includes("=")?(te=te.split("="),b=te[0].startsWith("CC")?te[0]:"CC"+te[0],le=te[1]||"und"):(b="CC"+m,S.length==2?m+=2:m++,le=te),ae.set(b,Rn(le))}else ae.set("CC1","und");g=Mn(r,"ContentProtection");var ie=AS(e.za,g,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI);t.qa.encrypted=g.length>0;var ye=Rn(t.qa.language||"und"),ce=t.qa.label,Ee=new Map;if(r=Mn(r,"Representation"),!e.g.ignoreSupplementalCodecs){for(g=[],m=d(r),S=m.next();!S.done;S=m.next())k=S.value,(S=Io(k,"urn:scte:dash:scte214-extensions","supplementalCodecs"))&&(k=Hi(k),k.attributes.codecs=S.split(" ").join(","),k.attributes.id&&(k.attributes.supplementalId=k.attributes.id+"_supplementalCodecs"),g.push(k));r.push.apply(r,M(g))}if(g=r.map(function(Se){var Ve=mP(e,t,ie,l,ye,ce,a,u,ae,Se,pe,Z);return Ve&&(Ve.hdr=Ve.hdr||V,Ve.colorGamut=Ve.colorGamut||B,Ve.fastSwitching=A,Se=Se.attributes.dependencyId)?(Ve.baseOriginalId=Se,Ee.set(Se,Ve),null):Ve}).filter(function(Se){return!!Se}),g.length==0&&Ee.size==0){if(n=t.qa.contentType=="image",e.g.dash.ignoreEmptyAdaptationSet||h||n)return null;throw new fe(2,4,4003)}if(!t.qa.contentType||t.qa.contentType=="application")for(t.qa.contentType=iT(g[0].mimeType,g[0].codecs),h=d(g),m=h.next();!m.done;m=h.next())m.value.type=t.qa.contentType;for(h=t.qa.id||"__fake__"+e.Ka++,m=d(g),S=m.next();!S.done;S=m.next()){for(S=S.value,k=d(ie.drmInfos),b=k.next();!b.done;b=k.next())b=b.value,b.keyIds=b.keyIds&&S.keyIds?new Set([].concat(M(b.keyIds),M(S.keyIds))):b.keyIds||S.keyIds;e.g.enableAudioGroups&&(S.groupId=h)}return r=r.map(function(Se){return Se.attributes.supplementalId||Se.attributes.id}).filter(ss),{id:h,contentType:t.qa.contentType,language:ye,Dm:a,streams:g,drmInfos:ie.drmInfos,fj:n,Pk:r,xj:Ee}}function Lc(e,t){if((t=Ri(t,"urn:mpeg:dash:schema:urlparam:2014","UrlQueryInfo"))&&wt(t,"useMPDUrlQuery",tt,!1)){var n=t.attributes.queryTemplate;if(n)return function(){return n=="$querypart$"?e.ba:n.split("&").map(function(r){if(r=="$querypart$")return e.ba;var i=/\$query:(.*?)\$/g.exec(r);if(i&&i.length==2){i=i[1];var o=new Mr(e.ba).get(i);if(o.length)return i+"="+o[0]}return r}).join("&")}}return null}function mP(e,t,n,r,i,o,s,a,u,l,h,g){t.L=jg(e,l,t.qa,null);var m=t.L.id;if(e.ma=Math.min(e.ma,t.L.mb),e.V=e.ma>0,!EP(t.L))return null;var S=t.na.start;t.bandwidth=wt(l,"bandwidth",ge)||0,t.roles=a;var A=Mn(l,"SupplementalProperty"),k=Mn(l,"EssentialProperty"),b=Mn(l,"ContentProtection");l=null;var V=k.find(function(Ce){return Ce.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"});(V||(V=A.find(function(Ce){return Ce.attributes.schemeIdUri=="urn:mpeg:dash:urlparam:2014"})))&&(l=Lc(e,V)),l&&(t.Fb=l),V=t.L.contentType,l=V==Bt||V=="application",V=V=="image",b.length&&(t.qa.encrypted=!0);try{var B=void 0;if(n.ag){var Z=t.L.bb,ae=t.Fb,pe=kr(Z(),[n.ag.rk],ae()),te=jr(pe,e.g.retryParameters);B={bitsKey:128,blockCipherMode:"CBC",iv:n.ag.iv,firstMediaSequenceNumber:0,fetchKey:function(){var Ce,ke,Ge;return G(function(Je){if(Je.h==1)return Je.g(Fg(e,te,6),2);if(Je.h!=3){if(Ce=Je.i,!Ce.data||Ce.data.byteLength!=16)throw new fe(2,4,4049);return ke={name:"AES-CBC"},Ge=B,Je.g(R.crypto.subtle.importKey("raw",Ce.data,ke,!0,["decrypt"]),3)}Ge.cryptoKey=Je.i,B.fetchKey=void 0,Je.j()})}}}if(t.L.aesKey=B,Z=function(Ce,ke,Ge,Je){return rT(e,Ce,ke,Ge,Je)},t.L.Dd)var le=BM(t,Z,B);else if(t.L.vc)le=_M(t,e.o,B);else if(t.L.Ic)le=NS(t,Z,e.o,!!e.h,e.g.dash.initialSegmentLimit,e.Ba,B,g,!1,e.C);else{var ie=t.na.duration||0,ye=t.L.bb,ce=t.L.mimeType,Ee=t.L.codecs;le={endTime:-1,timeline:-1,Mc:function(){var Ce=kf(S,ie,ye());return Ce.Bb(function(ke){ke.mimeType=ce,ke.codecs=Ee}),Promise.resolve(Ce)},timescale:1}}}catch(Ce){if((l||V)&&Ce.code==4002)return null;throw Ce}g=IM(e.za,b,n,e.g.ignoreDrmInfo,e.g.dash.keySystemsByURI),g=new Set(g?[g]:[]),b=!1,A.some(function(Ce){return Ce.attributes.schemeIdUri=="tag:dolby.com,2018:dash:EC3_ExtensionType:2018"&&Ce.attributes.value=="JOC"})&&(b=!0),A=!1,l&&(A=a.includes("forced_subtitle")||a.includes("forced-subtitle"));var Se;if(V&&((k=k.find(function(Ce){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(Ce.attributes.schemeIdUri)}))&&(Se=k.attributes.value),!Se))return null;var Ve;l=t.L.codecs,t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(Ve="PQ"),k=t.L.id?t.va.id+","+t.L.id:"",e.I.length&&m&&e.u.set(t.va.id+","+m,yP(t)),t.L.xf&&vP(e,t.L.xf,le,t.presentationTimeline),le.endTime!=-1&&t.va.id!=null&&t.L.id!=null&&((m=e.C.get(t.va.id))?(m.endTime=le.endTime,m.eh.includes(t.L.id)||m.eh.push(t.L.id),e.C.set(t.va.id,m)):e.C.set(t.va.id,{endTime:le.endTime,timeline:le.timeline,eh:[t.L.id]}));var Le=k&&e.o.has(k)?e.o.get(k):{id:e.Ka++,originalId:t.L.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){Le.segmentIndex&&(Le.segmentIndex.release(),Le.segmentIndex=null)},segmentIndex:null,mimeType:t.L.mimeType,codecs:l,frameRate:t.L.frameRate,pixelAspectRatio:t.L.pixelAspectRatio,bandwidth:t.bandwidth,width:t.L.width,height:t.L.height,kind:r,encrypted:n.drmInfos.length>0,drmInfos:n.drmInfos,keyIds:g,language:i,originalLanguage:t.qa.language,label:o,type:t.qa.contentType,primary:s,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:t.L.emsgSchemeIdUris,roles:a,forced:A,channelsCount:t.L.uf,audioSamplingRate:t.L.audioSamplingRate,spatialAudio:b,closedCaptions:u,hdr:Ve,colorGamut:void 0,videoLayout:void 0,tilesLayout:Se,accessibilityPurpose:h,external:!1,fastSwitching:!1,fullMimeTypes:new Set([ar(t.L.mimeType,t.L.codecs)]),isAudioMuxedInVideo:!1,baseOriginalId:null};return Le.createSegmentIndex=function(){var Ce;return G(function(ke){if(ke.h==1)return Le.segmentIndex?ke.A(0):(Ce=Le,ke.g(le.Mc(),3));Ce.segmentIndex=ke.i,ke.j()})},k&&t.pb&&!e.o.has(k)&&(t=t.va.id||"",e.G.has(t)||e.G.set(t,[]),e.o.set(k,Le),e.G.get(t).push(k)),Le}function vP(e,t,n,r){if(!e.oa.has(t)){e.oa.add(t);var i=wt(t,"presentationTime",je)||0,o=Pn(t,"UTCTiming"),s;(s=o&&o.attributes.schemeIdUri)&&(o=o.attributes.schemeIdUri,s=!(o==="urn:mpeg:dash:utc:http-ntp:2014"||o==="urn:mpeg:dash:utc:ntp:2014"||o==="urn:mpeg:dash:utc:sntp:2014")),s?t=(wt(t,"wallClockTime",W)||0)*1e3:(t=wt(t,"wallClockTime",je)||0,t=wy(t)),n=new Date(t-i/n.timescale*1e3),i=n.getTime()/1e3,isNaN(i)||(r.o||r.qh(i),r=new Map().set("detail",{wallClockTime:t,programStartDate:n}),r=new yt("prft",r),e.j.onEvent(r))}}function yP(e){function t(n){return n?(n=Vo(n),n.Dd=null,n.vc=null,n.Ic=_t(n.Ic),n.xf=null,n):null}return e=Vo(e),e.va=t(e.va),e.qa=t(e.qa),e.L=t(e.L),e.na&&(e.na=Vo(e.na),e.na.node=null),e}function tT(e){var t,n;return G(function(r){switch(r.h){case 1:return t=0,r.m(2),r.g(Ng(e),4);case 4:t=r.i,r.o(3);break;case 2:if(n=r.l(),e.j){if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.j.onError(n),r.return();n.severity=1,e.j.onError(n)}case 3:if(!e.j)return r.return();e.j.onManifestUpdated(),Lg(e,t),r.j()}})}function Lg(e,t){if(!(e.M<0)){var n=e.M;e.g.updatePeriod>=0&&(n=e.g.updatePeriod),e.N.ka(Math.max(n-t,st(e.Ga)))}}function jg(e,t,n,r){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,uf:null,audioSamplingRate:null,mb:0,Df:1,encrypted:!1},r=r||n.bb;var i=t.attributes.id,o=t.attributes.supplementalId,s=Mn(t,"BaseURL"),a,u=!1;if(e.i)for(var l=d(s),h=l.next();!h.done;h=l.next()){var g=h.value;h=g.attributes.serviceLocation,g=_r(g),h&&g&&(ml(e.i,i,h,g),u=!0)}u&&e.i||(a=s.map(_r));var m=e.i;e=t.attributes.contentType||n.contentType,l=t.attributes.mimeType||n.mimeType,h=vp([t.attributes.codecs||n.codecs]).join(","),g=wt(t,"frameRate",rt)||n.frameRate;var S=t.attributes.sar||n.pixelAspectRatio,A=SP(Mn(t,"InbandEventStream"),n.emsgSchemeIdUris),k=Mn(t,"AudioChannelConfiguration");k=TP(k)||n.uf;var b=wt(t,"audioSamplingRate",je)||n.audioSamplingRate;e||(e=iT(l,h));var V=Pn(t,"SegmentBase"),B=Pn(t,"SegmentTemplate"),Z=V&&wt(V,"availabilityTimeOffset",qe)||0,ae=B&&wt(B,"availabilityTimeOffset",qe)||0,pe=s&&s.length&&wt(s[0],"availabilityTimeOffset",qe)||0;Z=n.mb+pe+Z+ae,ae=null,(pe=Pn(t,"SegmentSequenceProperties"))&&(pe=wt(pe,"cadence",ge))&&(ae=pe),pe=t.attributes.label;var te=Mn(t,"Label");return te&&te.length&&(te=te[0],vr(te)&&(pe=vr(te))),{bb:function(){return kr(r(),s.length?m&&u?bc(m,i):a||[]:[])},Dd:V||n.Dd,vc:Pn(t,"SegmentList")||n.vc,Ic:B||n.Ic,xf:Pn(t,"ProducerReferenceTime")||n.xf,width:wt(t,"width",je)||n.width,height:wt(t,"height",je)||n.height,contentType:e,mimeType:l,codecs:h,frameRate:g,pixelAspectRatio:S,emsgSchemeIdUris:A,id:o||i,originalId:i,language:t.attributes.lang,uf:k,audioSamplingRate:b,mb:Z,bf:null,Df:ae||n.Df,label:pe||null,encrypted:!1}}function SP(e,t){t=t.slice(),e=d(e);for(var n=e.next();!n.done;n=e.next())n=n.value.attributes.schemeIdUri,t.includes(n)||t.push(n);return t}function TP(e){e=d(e);for(var t=e.next();!t.done;t=e.next()){t=t.value;var n=t.attributes.schemeIdUri;if(n&&(t=t.attributes.value))switch(n){case"urn:mpeg:dash:outputChannelPositionList:2012":return t.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(t=parseInt(t,10),!t)continue;return t;case"tag:dolby.com,2015:dash:audio_channel_configuration:2015":if(n=[2,1,2,2,2,2,1,2,2,1,1,1,1,2,1,1,2,2],t=parseInt(t,16),!t)continue;for(var r=0,i=0;i<n.length;i++)t&1<<i&&(r+=n[i]);if(r)return r;continue;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(n=[1,1,1,1,1,2,2,1,1,2,2,2,1,2,1,1].reverse(),t=parseInt(t,16),!t)continue;for(i=r=0;i<n.length;i++)t&1<<i&&(r+=n[i]);if(r)return r;continue;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(n=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(t=parseInt(t,10))&&t>0&&t<n.length)return n[t]}}return null}function EP(e){var t=e.Dd?1:0;return t+=e.vc?1:0,t+=e.Ic?1:0,t==0?e.contentType==Bt||e.contentType=="application":(t!=1&&(e.Dd&&(e.vc=null),e.Ic=null),!0)}function nT(e,t,n,r){var i,o,s,a,u,l,h;return G(function(g){if(g.h==1)return i=[Wr(n)],o=kr(t(),i),s=jr(o,e.g.retryParameters),s.method=r,a=e.j.networkingEngine.request(4,s,{isPreload:e.ua()}),hu(e.T,a),g.g(a.promise,2);if(u=g.i,r=="HEAD"){if(!u.headers||!u.headers.date)return g.return(0);l=u.headers.date}else l=Un(u.data);return h=Date.parse(l),isNaN(h)?g.return(0):g.return(h-Date.now())})}function xP(e,t,n){var r,i,o,s,a,u,l,h;return G(function(g){switch(g.h){case 1:r=n.map(function(m){return{scheme:m.attributes.schemeIdUri,value:m.attributes.value}}),i=e.g.dash.clockSyncUri,!r.length&&i&&r.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),o=d(r),s=o.next();case 2:if(s.done){g.A(4);break}switch(a=s.value,g.m(5),u=a.scheme,l=a.value,u){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return g.A(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return g.A(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return h=Date.parse(l),g.return(isNaN(h)?0:h-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":ut("NTP UTCTiming scheme is not supported");break;default:ut("Unrecognized scheme in UTCTiming element",u)}g.A(9);break;case 7:return g.g(nT(e,t,l,"HEAD"),10);case 10:return g.return(g.i);case 8:return g.g(nT(e,t,l,"GET"),11);case 11:return g.return(g.i);case 9:g.o(3);break;case 5:g.l();case 3:s=o.next(),g.A(2);break;case 4:return ut("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),g.return(0)}})}function wP(e,t,n,r,i){var o=r.attributes.schemeIdUri||"",s=r.attributes.value||"",a=wt(r,"timescale",je)||1,u=wt(r,"presentationTimeOffset",je)||0;r=d(Mn(r,"Event"));for(var l=r.next();!l.done;l=r.next()){l=l.value;var h=wt(l,"presentationTime",je)||0,g=wt(l,"duration",je)||0;h=Math.max((h-u)/a+t,t),g=h+g/a,n!=null&&(h=Math.min(h,t+n),g=Math.min(g,t+n)),g<i||(l={schemeIdUri:o,value:s,startTime:h,endTime:g,id:l.attributes.id||"",timescale:a,eventElement:Xn(l),eventNode:_t(l)},e.j.onTimelineRegionAdded(l))}}function rT(e,t,n,r,i){var o,s,a,u;return G(function(l){return l.h==1?(o=Ho,s=i?0:1,a=nc(t,n,r,e.g.retryParameters),l.g(Fg(e,a,o,{type:s}),2)):(u=l.i,l.return(u.data))})}function iT(e,t){return t=ar(e,t),uu(t)?Bt:e.split("/")[0]}function Fg(e,t,n,r){return r||(r={}),r.isPreload=e.ua(),t=e.j.networkingEngine.request(n,t,r),hu(e.T,t),t.promise}function AP(e){var t=e.l.ie;if(!e.l.qf||!t||!e.I.length)return[];var n=Date.now()/1e3,r=e.I.filter(function(i){return i=je(i.attributes.ttl),!i||t+i>n}).map(_r).filter(ss);return r.length?kr(e.B,r):[]}function oT(){return""}function IP(e,t,n){return function(){return e&&t?bc(e,"BaseURL"):n.slice()}}be("shaka.dash.DashParser",Nc),Vi("application/dash+xml",function(){return new Nc}),Vi("video/vnd.mpeg.dash.mpd",function(){return new Nc});function jd(){}be("shaka.dependencies",jd),jd.has=function(e){return Ug.has(e)},jd.add=function(e,t){if(!aT[e])throw Error(e+" is not supported");e==sT?lt("mux.js","mux.js is no longer used in Shaka Player."):Ug.set(e,function(){return t})};var sT="muxjs",aT={Em:sT,ISOBoxer:"ISOBoxer"};jd.Allowed=aT;var Ug=new Map([["ISOBoxer",function(){return R.ISOBoxer}]]);function jn(){this.j=new Kt(function(){for(var e=navigator.userAgent.toLowerCase(),t=d([{type:"VR",dh:/oculus|quest/},{type:"TV",dh:/smart[ _]?tv|android ?tv/},{type:"MOBILE",dh:/iphone|ipad|ipod|android/}]),n=t.next();!n.done;n=t.next())if(n=n.value,n.dh.test(e))return n.type;e=navigator.userAgentData;var r;if(t=(e==null||(r=e.platform)==null?void 0:r.toLowerCase())||"",e){if(e.mobile)return"MOBILE";if(t.includes("android"))return"TV"}return"DESKTOP"}),this.l=new Kt(function(){var e=navigator.userAgent;return navigator.vendor.includes("Apple")&&(e.includes("Version/")||e.includes("OS/"))?"WEBKIT":e.includes("Edge/")?"EDGE":e.includes("Chrome/")?"CHROMIUM":e.includes("Firefox/")?"GECKO":"UNKNOWN"})}function Hs(){var e=R.ManagedMediaSource||R.MediaSource;return!!(e&&e.isTypeSupported)}f=jn.prototype,f.cc=function(){return!!navigator.mediaCapabilities},f.Pa=function(){return this.j.value()},f.Ia=function(){return this.l.value()},f.zd=function(){return!1},f.gh=function(){return!1},f.cf=function(){return!1},f.Ii=function(){return!1},f.ke=function(){return!1},f.Xc=function(){return!0},f.wb=function(){var e=R.ManagedSourceBuffer||R.SourceBuffer;return!!e&&!!e.prototype&&!!e.prototype.changeType},f.oe=function(){return!0},f.Ni=function(){return 0},f.fc=function(){return Promise.resolve({width:1/0,height:1/0})},f.Wi=function(){return!1},f.sh=function(){return!1},f.Wa=function(e){var t=this.Pa();return(t==="TV"||t==="CONSOLE"||t==="CAST")&&(e.ads.customPlayheadTracker=!0,e.ads.skipPlayDetection=!0,e.ads.supportsMultipleMediaElements=!1),e},f.yh=function(){return!!R.indexedDB},f.Gi=function(){return[]},f.ld=function(e){return R.matchMedia!==void 0&&R.matchMedia("(color-gamut: p3)").matches?e?"HLG":"PQ":"SDR"},f.cj=function(){return!1},f.wi=function(){return!1},f.Af=function(){return!1},f.Jf=function(){return!0},f.xi=function(){return!1},f.bj=function(){return!0},f.Wc=function(){return!1},f.Sg=function(e){return e==="com.apple.fps"},f.If=function(){return!0},f.toString=function(){return"Device: "+this.Hb()+" v"+this.Ca()+"; Type: "+this.Pa()};function Bg(){jn.call(this),this.g=new Kt(function(){var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}),this.h=new Kt(function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1?"xr"in navigator?"APPLE_VR":"MOBILE":"xr"in navigator?"APPLE_VR":"DESKTOP"})}P(Bg,jn),f=Bg.prototype,f.Ca=function(){return this.g.value()},f.Hb=function(){return"Apple Browser"},f.Pa=function(){return this.h.value()},f.Ia=function(){return"WEBKIT"},f.cc=function(){return!1},f.zd=function(e,t){return t==="audio"},f.cf=function(){return!0},f.Ii=function(e){return e==="audio"},f.Wa=function(e){return jn.prototype.Wa.call(this,e),e.abr.minTimeToSwitch=.5,e},f.cj=function(){return!0},f.If=function(){return!1},(navigator.vendor||"").includes("Apple")&&(/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac"))&&(Nn=function(){return new Bg});function Vg(){if(!uT())throw Error("Not a Chromecast device!");jn.call(this),this.h=new Kt(function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);return e?parseInt(e[1],10):null}),this.g=new Kt(function(){var e=navigator.userAgentData&&navigator.userAgentData.platform||navigator.userAgent;return e=e.toLowerCase(),e.includes("android")?lT:e.includes("fuchsia")?cT:_g})}P(Vg,jn),f=Vg.prototype,f.Ca=function(){return this.h.value()},f.Hb=function(){return"Chromecast with "+this.g.value()},f.Pa=function(){return"CAST"},f.Ia=function(){return"CHROMIUM"},f.cc=function(){return jn.prototype.cc.call(this)&&this.g.value()!==_g},f.wb=function(){return jn.prototype.wb.call(this)&&this.g.value()!==_g},f.Ni=function(){switch(this.g.value()){case lT:return 0;case cT:return 3;default:return 1}},f.fc=function(){var e,t,n,r,i;return G(function(o){switch(o.h){case 1:if(e=R.cast&&cast.__platform__&&cast.__platform__.canDisplayType,t={width:1280,height:720},o.m(2),!(n=e)){o.A(4);break}return o.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160'),5);case 5:n=o.i;case 4:if(n){t.width=3840,t.height=2160,o.A(6);break}if(!(r=e)){o.A(7);break}return o.g(cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=1920; height=1080'),8);case 8:r=o.i;case 7:r&&(t.width=1920,t.height=1080);case 6:o.o(3);break;case 2:i=o.l(),gn("Failed to check canDisplayType:",i);case 3:return o.return(t)}})},f.Wa=function(e){return jn.prototype.Wa.call(this,e),e.streaming.stallSkip=0,e},f.yh=function(){return!1},f.Wc=function(){return!0};function uT(){return navigator.userAgent.includes("CrKey")&&!navigator.userAgent.includes("VIZIO SmartCast")}var lT="Android",cT="Fuchsia",_g="Linux";uT()&&(Nn=function(){return new Vg});function Hg(){jn.call(this);var e=this;this.i=new Kt(function(){var t=navigator.userAgent.match(/(Chrome|Firefox)\/(\d+)/);return t?parseInt(t[2],10):null}),this.g=new Kt(function(){return navigator.userAgent.match(/Edge?\//)?"Edge":navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":"Unknown"}),this.h=new Kt(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="windows":navigator.platform?navigator.platform.toLowerCase().includes("win32"):!1}),this.u=new Kt(function(){return jn.prototype.wb.call(e)?navigator.userAgent.match(/Edge?\//)?!e.h.value():!0:!1}),this.o=new Kt(function(){return navigator.userAgent.includes("sony.hbbtv.tv")}),this.m=new Kt(function(){return navigator.userAgentData&&navigator.userAgentData.platform?navigator.userAgentData.platform.toLowerCase()=="android":!!navigator.userAgent.includes("Android")})}P(Hg,jn),f=Hg.prototype,f.Ca=function(){return this.i.value()},f.Hb=function(){return this.g.value()},f.zd=function(e){return To(e)?this.g.value()==="Edge"&&this.h.value():!1},f.gh=function(){return this.g.value()==="Edge"&&this.h.value()},f.cf=function(){return this.g.value()==="Edge"&&this.h.value()},f.wb=function(){return this.u.value()},f.Wa=function(e){if(jn.prototype.Wa.call(this,e),this.h.value())switch(this.g.value()){case"Firefox":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation"};break;case"Chrome":e.drm.keySystemsMapping={"com.microsoft.playready":"com.microsoft.playready.recommendation.3000","com.microsoft.playready.recommendation":"com.microsoft.playready.recommendation.3000"}}return this.m.value()&&(e.drm.defaultAudioRobustnessForWidevine="",e.drm.defaultVideoRobustnessForWidevine=""),e},f.Af=function(){return this.g.value()==="Edge"||this.o.value()},f.Wc=function(){if(this.Ia()==="GECKO"){var e=this.Ca();return e!==null?e>=100:jn.prototype.Wc.call(this)}return jn.prototype.Wc.call(this)},f.Sg=function(e){return this.Ia()==="GECKO"?e.startsWith("com.microsoft.playready.recommendation"):jn.prototype.Sg.call(this,e)},at=function(){return new Hg};function Gg(){jn.apply(this,arguments)}P(Gg,jn),f=Gg.prototype,f.Ca=function(){return null},f.Hb=function(){return"Hisense"},f.Pa=function(){return"TV"},f.cc=function(){return!1},f.wb=function(){return!1},f.fc=function(){var e={width:1920,height:1080},t=null;if(R.Hisense_Get4KSupportState)try{t=R.Hisense_Get4KSupportState()}catch{}return t==null&&(t=navigator.userAgent.includes("UHD")),t&&(e.width=3840,e.height=2160),Promise.resolve(e)},f.Wa=function(e){return jn.prototype.Wa.call(this,e),e.streaming.stallSkip=0,e},(navigator.userAgent.includes("Hisense")||navigator.userAgent.includes("VIDAA"))&&(Nn=function(){return new Gg});function Kg(){jn.call(this),this.g=new Kt(function(){var e=navigator.userAgent.match(/PlayStation (\d+)/);return e?parseInt(e[1],10):null})}P(Kg,jn),f=Kg.prototype,f.Hb=function(){return"PlayStation"},f.Pa=function(){return"CONSOLE"},f.Ia=function(){return"WEBKIT"},f.Ca=function(){return this.g.value()},f.cc=function(){return!1},f.Xc=function(){return!1},f.wb=function(){return!1},f.sh=function(){return this.Ca()===4},f.fc=function(){var e,t,n,r,i;return G(function(o){switch(o.h){case 1:return e={width:1920,height:1080},t=!1,o.m(2),o.g(R.msdk.device.getDisplayInfo(),4);case 4:n=o.i,t=n.resolution==="4K",o.o(3);break;case 2:return o.l(),o.m(5),o.g(R.msdk.device.getDisplayInfoImmediate(),7);case 7:r=o.i,t=r.resolution==="4K",o.o(3);break;case 5:i=o.l(),ut("PlayStation: Failed to get the display info:",i);case 3:return t&&(e.width=3840,e.height=2160),o.return(e)}})},f.Wa=function(e){return jn.prototype.Wa.call(this,e),this.Ca()===4&&e.drm.preferredKeySystems.push("com.microsoft.playready"),e.streaming.clearDecodingCache=!0,e},f.Af=function(){return this.Ca()===4},f.Jf=function(){return this.Ca()!==4},navigator.userAgent.includes("PlayStation")&&(Nn=function(){return new Kg});function Wg(){jn.call(this);var e=navigator.userAgent.match(/Tizen (\d+).(\d+)/);this.g=e?parseInt(e[1],10):null,this.h=e?parseInt(e[2],10):null}P(Wg,jn),f=Wg.prototype,f.Ca=function(){return this.g},f.Hb=function(){return"Tizen"},f.Ia=function(){return"CHROMIUM"},f.Pa=function(){return"TV"},f.zd=function(){return!0},f.ke=function(){return this.Ca()===3},f.cc=function(){return!1},f.Xc=function(){var e=this.Ca();return e!==null?e>=4:jn.prototype.Xc.call(this)},f.wb=function(){return!1},f.oe=function(){return this.g&&this.h?this.g===5?this.h>=5:this.g>5:jn.prototype.oe.call(this)},f.fc=function(){var e=R.devicePixelRatio;e={width:R.screen.width*e>1920?3840:1920,height:R.screen.height*e>1080?2160:1080};try{if(webapis.systeminfo&&webapis.systeminfo.getMaxVideoResolution){var t=webapis.systeminfo.getMaxVideoResolution();e.width=t.width,e.height=t.height}else webapis.productinfo.is8KPanelSupported&&webapis.productinfo.is8KPanelSupported()?(e.width=7680,e.height=4320):webapis.productinfo.isUdPanelSupported&&webapis.productinfo.isUdPanelSupported()&&(e.width=3840,e.height=2160)}catch{ut("Tizen: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},f.Wa=function(e){return jn.prototype.Wa.call(this,e),e.drm.ignoreDuplicateInitData=this.Ca()!==2,this.Ca()===3&&(e.streaming.crossBoundaryStrategy="reset_to_encrypted"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e.streaming.gapPadding=2,e},f.Gi=function(){var e=[];return this.g!==null&&this.g<5&&e.push("opus"),e},f.ld=function(e){try{if(webapis.avinfo.isHdrTvSupport())return e?"HLG":"PQ"}catch{return jn.prototype.ld.call(this,e)}return"SDR"},f.wi=function(){return!0},f.xi=function(){return this.Ca()===3},navigator.userAgent.includes("Tizen")&&(Nn=function(){return new Wg});function yl(){jn.apply(this,arguments)}P(yl,jn),yl.prototype.Ca=function(){return null},yl.prototype.Hb=function(){return"Vizio"},yl.prototype.Pa=function(){return"TV"},yl.prototype.cc=function(){return!1},navigator.userAgent.includes("VIZIO SmartCast")&&(Nn=function(){return new yl});function zg(){jn.call(this),this.i=new Kt(function(){return navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")}),this.h=new Kt(function(){return navigator.userAgent.includes("SOPOpenBrowser")}),this.g=new Kt(function(){if(navigator.userAgent.includes("DT_STB_BCM"))return 11;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null})}P(zg,jn),f=zg.prototype,f.Ca=function(){return this.g.value()},f.Hb=function(){return"WebKit STB"},f.Pa=function(){return"TV"},f.Ia=function(){return"WEBKIT"},f.cc=function(){return!1},f.Xc=function(){var e=this.g.value();return e!==null?e>=15:!0},f.zd=function(){return this.h.value()},f.fc=function(){return Promise.resolve({width:R.screen.width*R.devicePixelRatio,height:R.screen.height*R.devicePixelRatio})},f.Jf=function(){return!this.i.value()},f.If=function(){return!1},(navigator.userAgent.includes("SOPOpenBrowser")||navigator.userAgent.includes("DT_STB_BCM")||navigator.userAgent.includes("Sky_STB")||!(!(navigator.vendor||"").includes("Apple")||/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)||navigator.maxTouchPoints>1||navigator.userAgentData&&navigator.userAgentData.platform&&navigator.userAgentData.platform.toLowerCase()=="macos"||navigator.platform&&navigator.platform.toLowerCase().includes("mac")))&&(Nn=function(){return new zg});function $g(){jn.call(this);var e=this;this.h=CP(),this.g=null;try{var t=new PalmServiceBridge;t.onservicecallback=function(n){n=JSON.parse(n);var r,i,o,s;e.g=(s=(o=(r=n.configs)==null?void 0:r["tv.model.supportHDR"])!=null?o:(i=n.configs)==null?void 0:i["tv.config.supportDolbyHDRContents"])!=null?s:!1},t.call("luna://com.webos.service.config/getConfigs",JSON.stringify({configNames:["tv.model.supportHDR","tv.config.supportDolbyHDRContents"]}))}catch(n){ut("WebOS: getConfigs call failed",n)}}P($g,jn),f=$g.prototype,f.Ca=function(){return this.h},f.Hb=function(){return"WebOS"},f.Pa=function(){return"TV"},f.Ia=function(){return"CHROMIUM"},f.cc=function(){return!1},f.Xc=function(){var e=this.Ca();return e!==null?e>3:jn.prototype.Xc.call(this)},f.wb=function(){return!1},f.oe=function(){var e=this.Ca();return e!==null?e>3:jn.prototype.oe.call(this)},f.fc=function(){var e={width:1920,height:1080};try{var t=JSON.parse(R.PalmSystem.deviceInfo);e.width=Math.max(1920,t.screenWidth),e.height=Math.max(1080,t.screenHeight)}catch{ut("WebOS: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},f.Wa=function(e){return jn.prototype.Wa.call(this,e),this.Ca()===3&&(e.streaming.crossBoundaryStrategy="reset"),e.streaming.shouldFixTimestampOffset=!0,e.streaming.stallSkip=0,e},f.ld=function(e){return this.g==null?(ut("WebOS: getConfigs call haven't finished"),jn.prototype.ld.call(this,e)):this.g?e?"HLG":"PQ":"SDR"};function CP(){var e=null,t=navigator.userAgent.match(/Chrome\/(\d+)/);switch(t&&(e=parseInt(t[1],10)),e){case 38:return 3;case 53:return 4;case 68:return 5;case 79:return 6;case 87:return 22;case 94:return 23;case 108:return 24;case 120:return 25;default:return null}}if(f.bj=function(){return!1},f.Wc=function(){var e=this.Ca();return e!==null?e>=6:jn.prototype.Wc.call(this)},navigator.userAgent.includes("Web0S")){var MP=new $g;Nn=function(){return MP}}function Xg(){jn.call(this),this.g=navigator.userAgent.includes("Edge/");var e=navigator.userAgent.match(/Edge?\/(\d+)/);this.h=e?parseInt(e[1],10):null}P(Xg,jn),f=Xg.prototype,f.Ca=function(){return this.h},f.Hb=function(){return"Xbox"},f.Pa=function(){return"CONSOLE"},f.Ia=function(){return this.g?"EDGE":"CHROMIUM"},f.zd=function(){return!0},f.gh=function(){return!0},f.cf=function(){return!0},f.Wi=function(){return this.g},f.fc=function(){var e={width:1920,height:1080},t=fT();if(t)try{var n=new t.Media.Protection.ProtectionCapabilities,r=t.Media.Protection.ProtectionCapabilityResult;t=null;do t=n.isTypeSupported('video/mp4;codecs="hvc1,mp4a";features="decode-res-x=3840,decode-res-y=2160,decode-bitrate=20000,decode-fps=30,decode-bpc=10,display-res-x=3840,display-res-y=2160,display-bpc=8"',"com.microsoft.playready.recommendation");while(t===r.maybe);t===r.probably&&(e.width=3840,e.height=2160)}catch{ut("Xbox: Error detecting screen size, default screen size 1920x1080.")}return Promise.resolve(e)},f.Wa=function(e){return jn.prototype.Wa.call(this,e),e.drm.parseInbandPsshEnabled=this.g,e.drm.preferredKeySystems.push("com.microsoft.playready"),this.g&&(e.streaming.gapPadding=.01),e},f.Af=function(){return!0},f.yh=function(){return!1};function fT(){var e=null;try{e=typeof Windows<"u"?Windows:chrome.webview.hostObjects.sync.Windows}catch{}return e}(navigator.userAgent.includes("Xbox One")||fT()!==null)&&(Nn=function(){return new Xg});function dT(e,t,n){this.type=e,this.ha=t,this.segments=n||null}function Sl(e,t,n,r){this.id=e,this.name=t,this.attributes=n,this.value=r===void 0?null:r}Sl.prototype.toString=function(e){function t(i){return i.name+"="+(isNaN(Number(i.value))?'"'+i.value+'"':i.value)}var n="#"+this.name,r=this.attributes?this.attributes.filter(function(i){return e?!e.has(i.name):!0}).map(t):[];return this.value&&r.unshift(this.value),r.length>0&&(n+=":"+r.join(",")),n};function Yg(e,t){return t?e.toString():(t=new Set().add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI"),e.toString(t))}function Tl(e,t){return e.attributes.find(function(n){return n.name===t})||null}function St(e,t,n){return(e=Tl(e,t))?e.value:n||null}function $n(e,t){if(e=Tl(e,t),!e)throw new fe(2,4,4023,t);return e.value}function hT(e,t,n){n=n===void 0?[]:n,this.ha=t,this.g=e,this.qc=n}function Fd(e,t){this.name=e,this.value=t}function $o(e,t){return e.filter(function(n){return n.name==t})}function pT(e,t){return e.filter(function(n){return $n(n,"TYPE")==t})}function si(e,t){e=d(e);for(var n=e.next();!n.done;n=e.next())if(n=n.value,n.name===t)return n;return null}function El(e,t,n){return n=n===void 0?0:n,(e=si(e,t))?Number(e.value):n}function za(e,t,n){return t?gT(e,[t],n):[]}function gT(e,t,n){if(!t.length)return[];var r=t;return n&&n.size&&(r=t.map(function(i){return mT(i,n)})),kr(e,r)}function mT(e,t){if(!t||!t.size)return e;e=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}");var n=e.match(/{\$\w*}/g);if(n){n=d(n);for(var r=n.next();!r.done;r=n.next()){r=r.value;var i=r.slice(2,r.length-1),o=t.get(i);if(o)e=e.replace(r,o);else throw new fe(2,4,4039,i)}}return e}function Jg(e){e=e.value;var t=e.indexOf(",");return Number(t===-1?e:e.substring(0,t))}function PP(){this.g=0}function Qg(e,t){var n=Un(t).trim().split(/[\r\n]+/);if(!kP.test(n[0]))throw new fe(2,4,4015);t=0;for(var r=!1,i=[],o=!0,s=0;s<n.length;s++){var a=n[s],u=n[s+1];if(a.startsWith("#")&&!a.startsWith("#EXT")||o)o=!1;else{if(a=vT(e,a),r||(yT.has(a.name)?(t=1,r=!0):a.name=="EXT-X-STREAM-INF"||a.name=="EXT-X-MEDIA"?r=!0:ST.has(a.name)&&(t=1,r=!0)),ST.has(a.name)){if(t!=1)throw new fe(2,4,4017);o=e,e=Array(Math.max(100,Math.floor((n.length-s)/2))),r=0,a=[];var l=[];for(u=null;s<n.length;s++){var h=n[s];h.startsWith("#EXT")?(h=vT(o,h),yT.has(h.name)?i.push(h):h.name=="EXT-X-MAP"?u=h:h.name=="EXT-X-PART"?l.push(h):h.name=="EXT-X-PRELOAD-HINT"?St(h,"TYPE")=="PART"?l.push(h):St(h,"TYPE")=="MAP"&&(h.name="EXT-X-MAP",u=h):a.push(h)):(!h.startsWith("#")||h.startsWith("#EXT"))&&(h=h.trim(),u&&a.push(u),a=new hT(h,a,l),r<e.length?e[r++]=a:(e.push(a),r++),a=[],l=[])}return l.length&&(u&&a.push(u),n=new hT("",a,l),r<e.length?e[r++]=n:(e.push(n),r++)),new dT(t,i,r<e.length?e.slice(0,r):e)}i.push(a),a.name=="EXT-X-STREAM-INF"&&(a.attributes.push(new Fd("URI",u)),o=!0)}}return new dT(t,i)}function vT(e,t){e=e.g++;var n=t.indexOf(":"),r=n===-1?t.substring(1):t.substring(1,n);if(!r.startsWith("EXT"))throw new fe(2,4,4016,t);if(t=n===-1?null:t.substring(n+1),t===null)e=new Sl(e,r,[]);else if(t.indexOf("=")===-1)e=new Sl(e,r,[],t);else{n=[];var i=null,o=0,s=t.indexOf(","),a=t.indexOf("=");for(s!==-1&&s<a&&(i=t.substring(0,s),o=s+1);o<t.length;){for(;t[o]===" ";)o++;if(a=t.indexOf("=",o),a===-1)break;if(s=t.substring(o,a),o=a+1,t[o]==='"'){o++;var u=t.indexOf('"',o);a=u===-1?t.substring(o):t.substring(o,u),o=u===-1?t.length:u+1}else u=t.indexOf(",",o),a=u===-1?t.substring(o):t.substring(o,u),o=u===-1?t.length:u;o<t.length&&t[o]===","&&o++,n.push(new Fd(s,a))}e=new Sl(e,r,n,i)}return e}var kP=/^#EXTM3U($|[ \t\n])/m,yT=new Set("EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" ")),ST=new Set("EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP EXT-X-TILES".split(" "));function TT(){}function ET(e,t){try{var n=Ud(e);return Fu({uri:e,originalUri:e,data:n.data,headers:{"content-type":n.contentType},originalRequest:t})}catch(r){return ba(r)}}function Ud(e){if(!e.startsWith("data:"))throw new fe(2,1,1004,e);var t=e.substring(5),n=t.indexOf(",");if(n<0)throw new fe(2,1,1004,e);e=t.substring(0,n),t=decodeURIComponent(t.substring(n+1)),n=e.split(";"),e=n[0];var r=!1;n.length>1&&n[n.length-1].toLowerCase()=="base64"&&(r=!0,n.pop());var i;return r?i=ki(t):i=Ui(t),{data:i,contentType:e,Eh:n}}be("shaka.net.DataUriPlugin",TT),TT.parse=ET,sa("data",ET);function Bd(){var e=this;this.g=this.h=null,this.G=1,this.C=new Map,this.M=new Map,this.D=new Map,this.D.set("video",new Map),this.D.set("audio",new Map),this.D.set(Bt,new Map),this.D.set("image",new Map),this.Zb=new Map().set("com.apple.streamingkeydelivery",function(t,n,r){return r3(e,t,n,r)}).set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",function(t){var n=$n(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var r="cenc";n=="SAMPLE-AES"&&(r="cbcs");var i=$n(t,"URI");if(n=Ud(i.split("?")[0]),i=i.split("?")[0],!e.I.has(i)){var o=xt(n.data);e.I.set(i,o)}r=Ao("com.widevine.alpha",r,[{initDataType:"cenc",initData:e.I.get(i)}],void 0,n.Eh),(t=St(t,"KEYID"))&&r.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(r)}else t=Promise.resolve(null);return t}).set("com.microsoft.playready",function(t){var n=$n(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var r="cenc";n=="SAMPLE-AES"&&(r="cbcs"),t=$n(t,"URI"),n=Ud(t.split("?")[0]),t=xt(n.data);var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);i=gf(t,i,new Set,0),r=Ao("com.microsoft.playready",r,[{initDataType:"cenc",initData:i}],void 0,n.Eh),(t=Es(["<PLAYREADY>",Pi(t),"</PLAYREADY>"].join(`
72
- `)))&&(r.licenseServerUri=kd(t)),r=Promise.resolve(r)}else r=Promise.resolve(null);return r}).set("urn:uuid:3d5e6d35-9b9a-41e8-b843-dd3c6e72c42c",function(t){var n=$n(t,"METHOD");if(["SAMPLE-AES","SAMPLE-AES-CTR"].includes(n)){var r="cenc";n=="SAMPLE-AES"&&(r="cbcs");var i=$n(t,"URI");if(n=Ud(i.split("?")[0]),i=i.split("?")[0],!e.I.has(i)){var o=xt(n.data);e.I.set(i,o)}r=Ao("com.huawei.wiseplay",r,[{initDataType:"cenc",initData:e.I.get(i)}],void 0,n.Eh),(t=St(t,"KEYID"))&&r.keyIds.add(t.toLowerCase().substr(2)),t=Promise.resolve(r)}else t=Promise.resolve(null);return t}),this.ib=new Set,this.j=new Map,this.m=null,this.H="",this.ab=new PP,this.N=-1,this.ma=1/0,this.ba=this.uc=this.hb=!1,this.B=new Yt(function(){if(e.X&&!e.g.continueLoadingWhenPaused&&(e.V.Na(e.X,"timeupdate"),e.X.paused)){e.V.Aa(e.X,"timeupdate",function(){return HT(e)});return}HT(e)}),this.Ga=zd,this.i=null,this.eb=0,this.u=1/0,this.Ua=this.Ka=this.T=0,this.$=new Uu,this.J=new Map,this.K=new Map,this.Ba=new Map,this.ua=new Map,this.O=new Map,this.ya=new Map,this.za=new Map,this.tc=this.oa=!1,this.Wb=new Qe(5),this.l=null,this.P=!0,this.V=new Et,this.o=this.X=null,this.Yb=function(){return!1},this.I=new Map}f=Bd.prototype,f.configure=function(e,t){var n=this.h&&e.updatePeriod!=this.g.updatePeriod&&e.updatePeriod>=0;this.g=e,t&&(this.Yb=t),this.l&&this.l.configure(this.g),n&&this.i&&this.i.presentationTimeline.U()&&this.B.xb()},f.start=function(e,t){var n=this,r;return G(function(i){return i.h==1?(n.h=t,n.oa=t.isLowLatencyMode(),i.g(im(n,[e]).promise,2)):i.h!=3?(r=i.i,n.H=r.uri,i.g(OP(n,r.data),3)):i.return(n.i)})},f.stop=function(){this.B&&(this.B.stop(),this.B=null);var e=[];return this.$&&(e.push(this.$.destroy()),this.$=null),this.g=this.h=null,this.ib.clear(),this.i=null,this.j.clear(),this.M.clear(),this.K.clear(),this.C.clear(),this.Ba.clear(),this.ua.clear(),this.O.clear(),this.ya.clear(),this.za.clear(),this.I.clear(),this.l&&this.l.destroy(),this.V&&(this.V.release(),this.V=null),Promise.all(e)},f.update=function(){var e=this,t,n,r,i,o,s,a,u,l,h;return G(function(g){if(g.h==1){if(!Li(e)||(t=[],n=Array.from(e.j.values()),r=n.filter(function(m){return!m.stream.isAudioMuxedInVideo&&m.stream.segmentIndex}),r.length===0))return g.return();for(e.u=1/0,e.i.gapCount=0,i=d(r),o=i.next();!o.done;o=i.next())s=o.value,t.push(bP(e,s));return g.g(Promise.all(t),2)}for(kT(e,r.map(function(m){return m.stream})),a=r.some(function(m){return m.Wd==0}),r.length&&!a&&(Gd(e,zd),Vd(e)),a&&Vd(e),u=d(r),l=u.next();!l.done;l=u.next())h=l.value,h.stream.isAudioMuxedInVideo||!h.stream.segmentIndex||Cs(h.stream.segmentIndex)||e.h.disableStream(h.stream);g.j()})};function Zg(e,t){return Li(e)?e.D.get(t.type):t.mf}function bP(e,t){var n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn;return G(function(Ut){switch(Ut.h){case 1:if(t.stream.isAudioMuxedInVideo)return Ut.return();for(n=[],r=d(t.R()),i=r.next();!i.done;i=r.next())o=i.value,s=new It(o),a=s.g,t.Ne&&(t.Kb>=0&&a.add("_HLS_msn",String(t.Kb)),t.Lb>=0&&a.add("_HLS_part",String(t.Lb))),t.Oe&&a.add("_HLS_skip","YES"),n.push(s.toString());return Ut.m(2),Ut.g(im(e,n,!0).promise,4);case 4:u=Ut.i,Ut.o(3);break;case 2:throw l=Ut.l(),e.h&&e.h.disableStream(t.stream),l;case 3:if(!t.stream.segmentIndex)return Ut.return();if(h=Qg(e.ab,u.data),h.type!=1)throw new fe(2,4,4017);return g=u.uri,g==u.originalUri||t.R().includes(g)||t.yf.push(g),m=$o(h.ha,"EXT-X-DEFINE"),S=qg(e,m,g),A=t.stream,k=Zg(e,t),Ut.g(DT(e,h,A.mimeType,t.R,S),5);case 5:for(b=Ut.i,V=b.keyIds,B=b.drmInfos,Z=b.encrypted,ae=b.Mh,A.encrypted||!Z||ae||(A.encrypted=!0),pe=function(Gn,sn){return Gn.size===sn.size&&[].concat(M(Gn)).every(function(Qt){return sn.has(Qt)})},pe(A.keyIds,V)||(A.keyIds=V,A.drmInfos=B,e.h.newDrmInfo(A)),te=BT(e,h,k,S,t.R,t.type),le=te.segments,(ie=te.bandwidth)&&(A.bandwidth=ie),ye=Of(A),ce=d(le),Ee=ce.next();!Ee.done;Ee=ce.next())Se=Ee.value,Se.ea&&(Se.ea.rd=ye);A.segmentIndex.be(le,e.m.Db()),le.length&&(Ve=El(h.ha,"EXT-X-MEDIA-SEQUENCE",0),Ce=(Le=si(h.ha,"EXT-X-SKIP"))?Number(St(Le,"SKIPPED-SEGMENTS")):0,ke=RT(Ve,le),Ge=ke.Kb,Je=ke.Lb,t.Kb=Ge+Ce,t.Lb=Je,Ft=k.get(Ve),A.segmentIndex.Ya(Ft)),(dt=Cs(A.segmentIndex))&&(t.Pc=dt.startTime,kn=le[le.length-1],t.Gc=kn.endTime),si(h.ha,"EXT-X-ENDLIST")&&(t.Wd=!0),tm(e,h),nm(e,h.ha,A.type,S,t.R),Ut.j()}})}f.onExpirationUpdated=function(){},f.onInitialVariantChosen=function(){},f.banLocation=function(e){this.l&&this.l.banLocation(e)},f.setMediaElement=function(e){this.X=e};function xT(e,t,n){n=n===void 0?!1:n;for(var r=e.N==-1,i=d(t),o=i.next();!o.done;o=i.next()){o=o.value;var s=o.stream.segmentIndex,a=Zg(e,o);if(s=Cs(s)){a=d(a);for(var u=a.next();!u.done;u=a.next()){u=d(u.value);var l=u.next().value;if(u.next().value==s.startTime){r&&(e.N=Math.max(e.N,l)),o.mg=l;break}}}}if(!(e.N<0))for(t=d(t),r=t.next();!r.done;r=t.next())r=r.value,(jc(e,r.type)||n)&&(i=r.stream.segmentIndex)&&(o=e.N-r.mg,o>0&&(i.g.splice(0,o),i=Cs(i))&&(i=-i.startTime,r.stream.segmentIndex.offset(i),wT(e,r,i)))}function RP(e,t){if(e.ma==1/0){t=d(t);for(var n=t.next();!n.done;n=t.next())n=Cs(n.value.stream.segmentIndex),n!=null&&n.h!=null&&(e.ma=Math.min(e.ma,n.h))}if(t=e.ma,t!=1/0){n=d(e.j.values());for(var r=n.next();!r.done;r=n.next())if(r=r.value,!jc(e,r.type)){var i=r.stream.segmentIndex;if(i!=null){var o=Cs(i);if(o)if(o.h==null)gn("Missing EXT-X-PROGRAM-DATE-TIME for stream",r.R(),"Expect AV sync issues!");else for(wT(e,r,o.h-t-o.startTime),r=d(i),i=r.next();!i.done;i=r.next())i.value.Ah(t)}}}}function wT(e,t,n){if(!(Math.abs(n)<.001)){t.Pc+=n,t.Gc+=n,e=Zg(e,t);for(var r=d(e),i=r.next();!i.done;i=r.next()){var o=d(i.value);i=o.next().value,o=o.next().value,e.set(i,o+n)}t.R()}}function OP(e,t){var n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn,Ut,Gn,sn,Qt,hn,An,pn;return G(function(Zt){switch(Zt.h){case 1:return n=mr,r=Qg(e.ab,t),i=$o(r.ha,"EXT-X-DEFINE"),o=[],s=[],a=[],e.m=new Lt(null,0),e.m.Uc(!0),u=function(){return[e.H]},l=null,h=new Map,e.i={presentationTimeline:e.m,variants:o,textStreams:s,imageStreams:a,offlineSessionIds:[],sequenceMode:e.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:e.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:e.o},r.type==1?(e.P=!1,Ge=$o(r.ha,"EXT-X-DEFINE"),h=qg(e,Ge,e.H),l=n.wa,Je="",Ft=new Map,Zt.g(bT(e,e.G++,h,r,u,"",l,Je,!0,"Media Playlist",null,Ft,null,!1,null,!1),7)):(NP(e,i),g=$o(r.ha,"EXT-X-MEDIA"),m=$o(r.ha,"EXT-X-STREAM-INF"),S=$o(r.ha,"EXT-X-IMAGE-STREAM-INF"),A=$o(r.ha,"EXT-X-I-FRAME-STREAM-INF"),k=$o(r.ha,"EXT-X-SESSION-KEY"),b=$o(r.ha,"EXT-X-SESSION-DATA"),V=$o(r.ha,"EXT-X-CONTENT-STEERING"),jP(e,b),Zt.g(FP(e,V),4));case 4:if(!e.g.ignoreSupplementalCodecs){for(B=[],Z=d(m),ae=Z.next(),pe={};!ae.done;pe={$i:void 0},ae=Z.next())te=ae.value,(le=St(te,"SUPPLEMENTAL-CODECS"))&&(pe.$i=le.split(/\s*,\s*/).map(function(an){return an.split("/")[0]}),ie=te.attributes.map(function(an){return function(Zr){var Hr=Zr.name,Lo=Zr.value;return Hr=="CODECS"&&(Lo=an.$i.join(","),Zr=Zr.value.split(","),Zr.length>1&&(Zr=ti("audio",Zr))&&(Lo+=","+Zr)),new Fd(Hr,Lo)}}(pe)),B.push(new Sl(te.id,te.name,ie,null)));for(m.push.apply(m,M(B)),ye=[],ce=d(A),Ee=ce.next(),Se={};!Ee.done;Se={aj:void 0},Ee=ce.next())Ve=Ee.value,(Le=St(Ve,"SUPPLEMENTAL-CODECS"))&&(Se.aj=Le.split(/\s*,\s*/).map(function(an){return an.split("/")[0]}),Ce=Ve.attributes.map(function(an){return function(Zr){var Hr=Zr.name;return Zr=Zr.value,Hr=="CODECS"&&(Zr=an.aj.join(",")),new Fd(Hr,Zr)}}(Se)),ye.push(new Sl(Ve.id,Ve.name,Ce,null)));A.push.apply(A,M(ye))}return LP(e,m),YP(e,g),ke=_P(e,A),Zt.g(HP(e,m,k,g,u,e.C,ke),5);case 5:return o=Zt.i,s=UP(e,g),Zt.g(BP(e,S,A),6);case 6:a=Zt.i,Zt.A(3);break;case 7:dt=Zt.i,e.j.set(e.H,dt),dt.stream&&(kn=Of(dt.stream),dt.stream.segmentIndex.Bb(function(an){an.ea&&(an.ea.rd=kn)})),l=dt.stream.type,Ut=!0,(e.g.disableAudio&&dt.type=="audio"||e.g.disableVideo&&dt.type=="video"&&!dt.stream.codecs.includes(","))&&(Ut=!1),Ut&&o.push({id:0,language:Rn(Je||"und"),disabledUntilTime:0,primary:!0,audio:dt.type=="audio"?dt.stream:null,video:dt.type=="video"?dt.stream:null,bandwidth:dt.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.h)throw new fe(2,7,7001);if(LT(e,r),r.type==1&&(Li(e)&&(jT(e,r),Gn=e.u,e.B.ka(Gn)),sn=Array.from(e.j.values()),em(e,sn),Vd(e),nm(e,r.ha,l,h,u)),e.i.variants=o,e.i.textStreams=s,e.i.imageStreams=a,e.i.startTime=e.o,e.ba||!e.g.hls.disableCodecGuessing){Zt.A(8);break}for(Qt=[],hn=d(e.i.variants),An=hn.next();!An.done;An=hn.next())pn=An.value,pn.audio&&pn.audio.codecs===""&&Qt.push(pn.audio.createSegmentIndex()),pn.video&&pn.video.codecs===""&&Qt.push(pn.video.createSegmentIndex());return Zt.g(Promise.all(Qt),8);case 8:e.h.makeTextStreamsForClosedCaptions(e.i),Zt.j()}})}function DP(e,t){var n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V;return G(function(B){if(B.h==1)return n=mp(e.g.hls.mediaPlaylistFullMimeType),t.length?(r=VT(e,t),i=r.segment,o=r.segmentIndex,s=i.R(),(a=el(s[0]))&&(u=om.get(a))?B.return(mp(u)):B.g(Promise.all([AT(e,i.ea,0),AT(e,i,o)]),2)):B.return(n);if(l=B.i,h=l[1].mimeType,g=l[0].data,m=l[1].data,S="mp4 mp4a m4s m4i m4a m4f cmfa mp4v m4v cmfv fmp4".split(" "),A=["audio/mp4","video/mp4","video/iso.segment"],k=i.ea||A.includes(h),!k&&Xu(xt(m))){var Z=m,ae=e.g.disableAudio,pe=e.g.disableVideo,te=e.g.disableText,le=xt(Z),ie=new er().parse(le),ye=ie.Sd();le=ie.Ig();var ce=[],Ee=!1,Se=!1;if(!ae)switch(ye.audio){case"aac":case"aac-loas":ie.qb().length&&(ce.push("mp4a.40.2"),Ee=!0);break;case"mp3":ie.qb().length&&(ce.push("mp4a.40.34"),Ee=!0);break;case"ac3":ie.qb().length&&(ce.push("ac-3"),Ee=!0);break;case"ec3":ie.qb().length&&(ce.push("ec-3"),Ee=!0);break;case"opus":ie.qb().length&&(ce.push("opus"),Ee=!0)}if(!pe)switch(ye.video){case"avc":le.codec?ce.push(le.codec):ce.push("avc1.42E01E"),Se=!0;break;case"hvc":le.codec?ce.push(le.codec):ce.push("hvc1.1.6.L93.90"),Se=!0;break;case"av1":ce.push("av01.0.01M.08"),Se=!0}if(ce.length){if(ae=Ee&&!Se,pe=new Map,Se&&!te){for(te=new gi("video/mp2t"),Qs(te,Z),Z=d(te.g.getStreams()),Se=Z.next();!Se.done;Se=Z.next())Se=Se.value,pe.set(Se,Se);te.g.clear()}le={type:ae?"audio":"video",mimeType:"video/mp2t",codecs:ce.join(", "),language:null,height:le.height,width:le.width,channelCount:null,sampleRate:null,closedCaptions:pe,re:null,colorGamut:null,frameRate:le.frameRate,timescale:null}}else le=null;if(b=le)return B.return(b)}else if((k||S.includes(a))&&(V=UI(g,m,e.g.disableText)))return B.return(V);return h?B.return(mp(h)):B.return(n)})}function AT(e,t,n){var r,i,o,s,a,u;return G(function(l){switch(l.h){case 1:return t?(r=Ho,i=nc(t.R(),t.Ec(),t.Cc(),e.g.retryParameters),o=t instanceof kt?1:0,l.g(Sa(e,i,r,{type:o}).promise,2)):l.return({mimeType:null,data:null});case 2:if(s=l.i,a=s.data,!t.aesKey){l.A(3);break}return l.g(yp(a,t.aesKey,n),4);case 4:a=l.i;case 3:return t instanceof kt?t.le(a,!0):t.le(a),(u=s.headers["content-type"])&&(u=u.split(";")[0].toLowerCase()),l.return({mimeType:u,data:a})}})}function Vd(e){if(Li(e)){if(e.Ga==sm){for(var t=1/0,n=1/0,r=d(e.j.values()),i=r.next();!i.done;i=r.next())i=i.value,i.stream.segmentIndex&&i.stream.type!="text"&&!i.stream.isAudioMuxedInVideo&&(t=Math.min(t,i.Gc),n=Math.min(n,i.Pc));t=t-n||0,isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.m.Gf(t)}}else e.m.ub(PT(e));if(!e.m.o)for(t=d(e.j.values()),n=t.next();!n.done;n=t.next())n=n.value,!n.stream.segmentIndex||n.type!="audio"&&n.type!="video"||(n=Cs(n.stream.segmentIndex))&&n.h!=null&&e.m.qh(n.h);e.m.lf()}function NP(e,t){var n=new It(e.H).g;t=d(t);for(var r=t.next();!r.done;r=t.next()){var i=r.value;r=St(i,"NAME");var o=St(i,"VALUE");i=St(i,"QUERYPARAM"),r&&o&&(e.C.has(r)||e.C.set(r,o)),i&&(r=n.get(i)[0])&&!e.C.has(r)&&e.C.set(i,r)}}function qg(e,t,n){n=new It(n).g;var r=new Map;t=d(t);for(var i=t.next();!i.done;i=t.next()){var o=i.value,s=St(o,"NAME"),a=St(o,"VALUE");i=St(o,"QUERYPARAM"),o=St(o,"IMPORT"),s&&a&&(r.has(s)||r.set(s,a)),i&&(s=n.get(i)[0])&&!r.has(s)&&r.set(i,s),o&&(i=e.C.get(o))&&r.set(o,i)}return r}function LP(e,t){t=d(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=St(r,"AUDIO");n=St(r,"VIDEO");var o=St(r,"SUBTITLES");if(r=IT(e,r),o){var s=ti(Bt,r);e.K.set(o,s),$t(r,s)}i&&(o=ti("audio",r),o||(o=e.g.hls.defaultAudioCodec),e.K.set(i,o)),n&&(i=ti("video",r),i||(i=e.g.hls.defaultVideoCodec),e.K.set(n,i))}}function jP(e,t){t=d(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=St(r,"DATA-ID");n=St(r,"URI");var o=St(r,"LANGUAGE");r=St(r,"VALUE"),i=new Map().set("id",i),n&&i.set("uri",za([e.H],n,e.C)[0]),o&&i.set("language",o),r&&i.set("value",r),n=new yt("sessiondata",i),e.h&&e.h.onEvent(n)}}function FP(e,t){var n,r,i,o,s,a;return G(function(u){if(!e.h||!e.g)return u.return();for(r=d(t),i=r.next();!i.done;i=r.next())if(o=i.value,s=St(o,"PATHWAY-ID"),a=St(o,"SERVER-URI"),s&&a){e.l=new gl(e.h),e.l.configure(e.g),e.l.i=[e.H],e.l.setManifestType("HLS"),e.l.h=s,n=kc(e.l,a);break}return u.g(n,0)})}function UP(e,t){var n=pT(t,"SUBTITLES"),r={};t=d(n);for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=Yg(i,!e.l);r[o]?r[o].push(i):r[o]=[i]}if(t=[],!e.g.disableText)for(var s in r)try{t.push(CT(e,r[s],new Map).stream)}catch(a){if(!e.g.hls.ignoreTextStreamFailures)throw a}for(s=d(n),n=s.next();!n.done;n=s.next())if(r=$n(n.value,"GROUP-ID"),(n=e.K.get(r))&&(r=e.M.get(r)))for(r=d(r),i=r.next();!i.done;i=r.next())i=i.value,i.stream.codecs=n,i.stream.mimeType=rm(Bt,n)||Hd(Bt),xl(i.stream);return t.filter(function(a){return a})}function xl(e){var t=new Set([ar(e.mimeType,e.codecs)]);e.segmentIndex&&e.segmentIndex.Bb(function(n){n.mimeType&&t.add(ar(n.mimeType,e.codecs))}),e.fullMimeTypes=t}function BP(e,t,n){var r,i;return G(function(o){return o.h==1?(r=t.map(function(s){var a,u;return G(function(l){if(l.h==1)return e.g.disableThumbnails?l.return(null):(l.m(2),l.g(JP(e,s),4));if(l.h!=2)return a=l.i,l.return(a.stream);if(u=l.l(),e.g.hls.ignoreImageStreamFailures)return l.return(null);throw u})}).concat(n.map(function(s){if(e.g.disableThumbnails)return null;try{var a=MT(e,s);return a.stream.type!=="image"?null:a.stream}catch(u){if(e.g.hls.ignoreImageStreamFailures)return null;throw u}})),o.g(Promise.all(r),2)):(i=o.i,o.return(i.filter(function(s){return s})))})}function VP(e,t,n){t=t.filter(function(a){var u=St(a,"URI")||"";return a=St(a,"TYPE"),a!="SUBTITLES"&&(u!=""||a=="AUDIO")});var r={};t=d(t);for(var i=t.next();!i.done;i=t.next()){i=i.value;var o=Yg(i,!e.l);r[o]?r[o].push(i):r[o]=[i]}for(var s in r)CT(e,r[s],n,!1)}function _P(e,t){return t.map(function(n){return n=MT(e,n),n.stream.type!=="video"?null:n.stream}).filter(function(n){return n})}function HP(e,t,n,r,i,o,s){var a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn,Ut,Gn,sn,Qt,hn;return G(function(An){switch(An.h){case 1:if(a=[],u=new Set,e.g.ignoreDrmInfo||!(n.length>0)){An.A(2);break}l=d(n),h=l.next();case 3:if(h.done){An.A(2);break}if(g=h.value,m=$n(g,"METHOD"),S=St(g,"KEYFORMAT")||"identity",A=null,m=="NONE"){An.A(4);break}if(Kd(m)){k=za(i(),$n(g,"URI"),o),b=k.sort().join(""),e.O.has(b)||(V=jr(k,e.g.retryParameters),B=Sa(e,V,6).promise,e.O.set(b,B)),An.A(4);break}if(S=="identity")return An.g(GT(e,g,"",i,null,o),12);if(Z=e.Zb.get(S),!Z){ae=null,An.A(10);break}return An.g(Z(g,"",null),11);case 11:ae=An.i;case 10:A=ae,An.A(6);break;case 12:A=An.i;case 6:if(A){if(A.keyIds)for(pe=d(A.keyIds),te=pe.next();!te.done;te=pe.next())le=te.value,u.add(le);a.push(A)}case 4:h=l.next(),An.A(3);break;case 2:for(ie={},ye=d(t),ce=ye.next();!ce.done;ce=ye.next())Ee=ce.value,Se=Yg(Ee,!e.l),ie[Se]?ie[Se].push(Ee):ie[Se]=[Ee];Ve=[];for(Le in ie)Ce=ie[Le],ke=Ce[0],Ge=St(ke,"FRAME-RATE"),Je=Number($n(ke,"BANDWIDTH"))||Number(St(ke,"AVERAGE-BANDWIDTH")),Ft=St(ke,"RESOLUTION"),dt=d(Ft?Ft.split("x"):[null,null]),kn=dt.next().value,Ut=dt.next().value,Gn=St(ke,"VIDEO-RANGE"),(sn=St(ke,"REQ-VIDEO-LAYOUT"))&&sn.includes(",")&&(Qt=sn.split(",").filter(function(pn){return pn=="CH-STEREO"||pn=="CH-MONO"}),sn=Qt[0]),sn=sn||"CH-MONO",hn=GP(e,Ce,r),Ve.push.apply(Ve,M(XP(e,hn.audio,hn.video,Je,kn,Ut,Ge,Gn,sn,a,u,s)));return An.return(Ve.filter(function(pn){return pn!=null}))}})}function GP(e,t,n){for(var r={audio:[],video:[]},i=new Map,o=[],s=!1,a=!1,u=d(t),l=u.next();!l.done;l=u.next()){var h=l.value;l=St(h,"AUDIO");var g=St(h,"VIDEO"),m=l||g;m&&(o.includes(m)||o.push(m),(h=St(h,"PATHWAY-ID"))&&i.set(m,h),l?s=!0:g&&(a=!0))}o.length&&n.length&&(n=n.filter(function(A){return o.includes($n(A,"GROUP-ID"))}),VP(e,n,i)),n=(i=o.sort().join(","))&&e.M.has(i)?e.M.get(i):[],s?r.audio.push.apply(r.audio,M(n)):a&&r.video.push.apply(r.video,M(n)),a=!1;var S=t.map(function(A){return $n(A,"URI")});return s=r.audio.find(function(A){return A&&A.R().find(function(k){return S.includes(k)})}),n=IT(e,t[0]),u=ti("video",n),(l=ti("audio",n))&&!u?(s="audio",a=r.audio.length>0&&!r.audio.some(function(A){return A.stream.isAudioMuxedInVideo})):!r.audio.length&&!r.video.length&&l&&u?(s="video",n=[[u,l].join()]):r.audio.length&&s?(s="audio",a=!0):s=r.video.length&&!r.audio.length?"audio":"video",a||(t=QP(e,t,n,s),i&&e.g.enableAudioGroups&&(t.stream.groupId=i),t.stream.type=="audio"&&s==="audio"&&r.audio.some(function(A){return A.stream.isAudioMuxedInVideo})&&(e=r.audio[0].stream,t.stream.language=e.language,t.stream.channelsCount=e.channelsCount,t.stream.label=e.label,t.stream.audioSamplingRate=e.audioSamplingRate,t.stream.originalId=e.originalId,t.stream.originalLanguage=e.originalLanguage),r[t.stream.type]=[t]),r}function IT(e,t){return t=St(t,"CODECS")||"",e.ba=t.length>0,e.ba||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),t=t.join(",")),vp(t.split(/\s*,\s*/))}function KP(e){return(e=St(e,"CHANNELS"))?parseInt(e.split("/")[0],10):null}function WP(e){return(e=St(e,"SAMPLE-RATE"))?parseInt(e,10):null}function zP(e){return e=St(e,"CHANNELS"),e?(e=e.split("/"),e.length!=2?!1:e[1]==="JOC"||e[1].includes("ATMOS")):!1}function $P(e){return e=$n(e,"TYPE").toLowerCase(),e=="subtitles"&&(e=Bt),e}function XP(e,t,n,r,i,o,s,a,u,l,h,g){for(var m=d(n),S=m.next();!S.done;S=m.next())_T(S.value.stream,i,o,s,a,u,null);for(i=e.g.disableVideo,(!n.length||i)&&(n=[null]),i&&(t=t.filter(function(V){return!V.stream.isAudioMuxedInVideo})),i=e.g.disableAudio,(!t.length||i)&&(t=[null]),i=[],t=d(t),o=t.next();!o.done;o=t.next())for(o=o.value,s=d(n),a=s.next();!a.done;a=s.next()){var A=a.value;(a=o?o.stream:null)&&(a.drmInfos=l,a.keyIds=h),(u=A?A.stream:null)&&(u.drmInfos=l,u.keyIds=h,e.g.disableIFrames||rn(u,g)),u&&!a&&(u.bandwidth=r),!u&&a&&(a.bandwidth=r),m=o?o.stream.drmInfos:null,S=A?A.stream.drmInfos:null,A=A?A.R().sort().join(","):"";var k=o?o.R().sort().join(","):"",b=[];a&&a.codecs&&b.push(a.codecs),u&&u.codecs&&b.push(u.codecs),A=[A,k,b.sort()].join("-"),a&&u&&!qo(m,S)||e.ib.has(A)||(a={id:e.G++,language:a?a.language:"und",disabledUntilTime:0,primary:!!a&&a.primary||!!u&&u.primary,audio:a,video:u,bandwidth:r,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},i.push(a),e.ib.add(A))}return i}function YP(e,t){t=pT(t,"CLOSED-CAPTIONS"),e.P=t.length==0,t=d(t);for(var n=t.next();!n.done;n=t.next()){var r=n.value,i=St(r,"LANGUAGE");n=Rn(i||"und"),i||(i=St(r,"NAME"))&&(n=i),i=$n(r,"GROUP-ID"),r=$n(r,"INSTREAM-ID").replace("SERVICE","svc"),e.J.get(i)||e.J.set(i,new Map),e.J.get(i).set(r,n)}}function CT(e,t,n,r){r=r===void 0?!0:r;for(var i=[],o=[],s=new Map,a=d(t),u=a.next(),l={};!u.done;l={ki:void 0},u=a.next()){u=u.value,l.ki=++e.G,l=function(k){return function(){return"shaka://hls-muxed"+k.ki}}(l);var h=r?$n(u,"URI"):St(u,"URI")||l();l=$n(u,"GROUP-ID"),i.push(h),o.push(l),s.set(l,h),(u=St(u,"PATHWAY-ID"))&&n.set(l,u)}if(r=o.sort().join(","),u=t[0],t="",a=$P(u),a==Bt)t=St(u,"CODECS")||"";else for(o=d(o),l=o.next();!l.done;l=o.next())if(l=l.value,e.K.has(l)){t=e.K.get(l);break}if(o=i.sort().join(","),a=="audio"&&r&&(o+=r),e.j.has(o))return e.j.get(o);if(l=e.G++,e.l)for(s=d(s),h=s.next();!h.done;h=s.next()){var g=d(h.value);h=g.next().value,g=g.next().value,(h=n.get(h))&&ml(e.l,l,h,g)}n=St(u,"LANGUAGE"),s=St(u,"NAME"),h=St(u,"DEFAULT")=="YES",g=a=="audio"?KP(u):null;var m=a=="audio"?zP(u):!1,S=St(u,"CHARACTERISTICS"),A=St(u,"FORCED")=="YES";return u=a=="audio"?WP(u):null,i=_d(e,l,i,t,a,n,h,s,g,null,S,A,u,m),i.stream&&e.g.enableAudioGroups&&(i.stream.groupId=r),e.M.has(r)?e.M.get(r).push(i):e.M.set(r,[i]),e.j.set(o,i),i}function JP(e,t){var n,r,i,o,s,a,u,l,h,g;return G(function(m){return m.h==1?(n=$n(t,"URI"),r=St(t,"CODECS","jpeg")||"",e.j.has(n)?m.return(e.j.get(n)):(i=St(t,"LANGUAGE"),o=St(t,"NAME"),s=St(t,"CHARACTERISTICS"),a=_d(e,e.G++,[n],r,"image",i,!1,o,null,null,s,!1,null,!1),(u=St(t,"RESOLUTION"))?m.g(a.stream.createSegmentIndex(),3):m.A(2))):(m.h!=2&&(l=Cs(a.stream.segmentIndex),(h=l.tilesLayout)&&(a.stream.width=Number(u.split("x")[0])*Number(h.split("x")[0]),a.stream.height=Number(u.split("x")[1])*Number(h.split("x")[1])),a.stream.closeSegmentIndex()),(g=St(t,"BANDWIDTH"))&&(a.stream.bandwidth=Number(g)),e.j.set(n,a),m.return(a))})}function MT(e,t){var n="video",r=$n(t,"URI"),i=St(t,"CODECS")||"";if(i=="mjpg"&&(n="image"),e.j.has(r))return e.j.get(r);var o=St(t,"LANGUAGE"),s=St(t,"NAME"),a=St(t,"CHARACTERISTICS");return n=_d(e,e.G++,[r],i,n,o,!1,s,null,null,a,!1,null,!1),i=St(t,"RESOLUTION"),o=d(i?i.split("x"):[null,null]),i=o.next().value,o=o.next().value,n.stream.width=Number(i)||void 0,n.stream.height=Number(o)||void 0,(t=St(t,"BANDWIDTH"))&&(n.stream.bandwidth=Number(t)),e.j.set(r,n),n}function QP(e,t,n,r){for(var i=e.G++,o=[],s=d(t),a=s.next();!a.done;a=s.next()){var u=a.value;a=$n(u,"URI"),u=St(u,"PATHWAY-ID"),e.l&&u&&ml(e.l,i,u,a),o.push(a)}if(s=o.sort().join(",")+n.sort().join(","),e.j.has(s))return e.j.get(s);a=o.join(",");e:{if(t=St(t[0],"CLOSED-CAPTIONS"),r=="video"){if(e.g.disableText){e.P=!1,t=null;break e}if(t){if(t!="NONE"){t=e.J.get(t);break e}e.P=!1}else if(!t&&e.J.size)for(t=d(e.J.keys()),t=t.next();!t.done;t=t.next()){t=e.J.get(t.value);break e}}t=null}return n=ms(r,n),r=_d(e,i,o,n,r,null,!1,a,null,t,null,!1,null,!1),e.j.set(s,r),r}function _d(e,t,n,r,i,o,s,a,u,l,h,g,m,S){function A(ae){var pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn,Ut,Gn,sn;return G(function(Qt){switch(Qt.h){case 1:return pe=mr,Qt.m(2),Qt.g(ae.promise,4);case 4:if(te=Qt.i,ae.aborted)return Qt.return();if(le=te.uri,le!=te.originalUri&&(ie=V.R(),ie.includes(le)||V.yf.push(le)),ye=Qg(e.ab,te.data),ye.type!=1)throw new fe(2,4,4017);return ce=$o(ye.ha,"EXT-X-DEFINE"),Ee=qg(e,ce,le),Se=!1,(!e.ba&&e.g.hls.disableCodecGuessing||e.P&&i==pe.wa&&!e.g.hls.disableClosedCaptionsDetection)&&ye.segments.length>0&&(e.P=!1,Se=!0),Ve=!e.ba&&e.g.hls.disableCodecGuessing,Le=Li(e),Qt.g(bT(e,0,Ee,ye,k,r,i,o,s,a,u,l,h,g,m,S,void 0,Se,Ve),5);case 5:if(Ce=Qt.i,ae.aborted)return Qt.return();ke=Ce.stream,LT(e,ye),Li(e)&&!Le&&jT(e,ye),V.Pc=Ce.Pc,V.Gc=Ce.Gc,V.Oe=Ce.Oe,V.Ne=Ce.Ne,V.Wd=Ce.Wd,V.mf=Ce.mf,V.Kb=Ce.Kb,V.Lb=Ce.Lb,b.segmentIndex=ke.segmentIndex,b.encrypted=ke.encrypted,b.drmInfos=ke.drmInfos,b.keyIds=ke.keyIds,b.mimeType=ke.mimeType,b.bandwidth=b.bandwidth||ke.bandwidth,b.codecs=b.codecs||ke.codecs,b.closedCaptions=b.closedCaptions||ke.closedCaptions,b.width=b.width||ke.width,b.height=b.height||ke.height,b.hdr=b.hdr||ke.hdr,b.colorGamut=b.colorGamut||ke.colorGamut,b.frameRate=b.frameRate||ke.frameRate,b.language=="und"&&ke.language!="und"&&(b.language=ke.language),b.language=b.language||ke.language,b.channelsCount=b.channelsCount||ke.channelsCount,b.audioSamplingRate=b.audioSamplingRate||ke.audioSamplingRate,xl(b),b.drmInfos.length&&e.h.newDrmInfo(b),Ge=!1,(!l&&b.closedCaptions||l&&b.closedCaptions&&l.size!=b.closedCaptions.size)&&(Ge=!0),e.i&&Ge&&e.h.makeTextStreamsForClosedCaptions(e.i),i==pe.Oa&&(Je=Cs(ke.segmentIndex))&&Je.ea&&(b.mimeType="application/mp4",xl(b)),Ft=Of(b),b.segmentIndex.Bb(function(hn){hn.ea&&(hn.ea.rd=Ft)}),ZP(e)&&(e.uc?em(e,[V]):(e.uc=!0,dt=Array.from(e.j.values()),kn=dt.filter(function(hn){return hn.stream.segmentIndex}),em(e,kn),Vd(e),Ut=e.u,Ut>0&&e.B.ka(Ut))),nm(e,ye.ha,b.type,Ee,k),e.i&&(e.i.startTime=e.o),Qt.o(0);break;case 2:if(Gn=Qt.l(),b.closeSegmentIndex(),Gn.code===7001)return Qt.return();if(sn=e.h.disableStream(b),!sn)throw Gn;Qt.j()}})}function k(){return e.l&&n.length>1?bc(e.l,t):V.yf.concat(gT([e.H],n,e.C))}var b=OT(e,r,i,o,s,a,u,l,h,g,m,S);n.some(function(ae){return ae.startsWith("shaka://hls-muxed")})&&(b.isAudioMuxedInVideo=!0,b.mimeType="video/mp2t",xl(b));var V={stream:b,type:i,yf:[],Pc:0,Gc:0,mf:new Map,Oe:!1,Ne:!1,Wd:!1,mg:-1,Kb:-1,Lb:-1,R:k},B=null,Z;return b.createSegmentIndex=function(){return B||(b.isAudioMuxedInVideo?(b.segmentIndex=new wn([]),Promise.resolve()):(Z=im(e,V.R(),!0),B=new Promise(function(ae){ae(A(Z))})))},b.closeSegmentIndex=function(){B&&!b.segmentIndex&&Z.abort(),b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null),B=null},V}function PT(e){var t=1/0;e=d(e.j.values());for(var n=e.next();!n.done;n=e.next())n=n.value,n.stream.segmentIndex&&n.stream.type!="text"&&!n.stream.isAudioMuxedInVideo&&(t=Math.min(t,n.Gc));return t}function kT(e,t){var n=[];t=d(t);for(var r=t.next();!r.done;r=t.next())r=r.value,r.segmentIndex&&r.segmentIndex.Bb(function(i){n.push(i)});e.m.ee(n)}function em(e,t){if(!Li(e))for(var n=PT(e),r=d(t),i=r.next();!i.done;i=r.next())i.value.stream.segmentIndex.gd(0,n);kT(e,t.map(function(o){return o.stream})),r=Array.from(e.j.values()).filter(function(o){return o.stream.segmentIndex}),n=r.some(function(o){return o.stream.type=="audio"}),i=r.some(function(o){return o.stream.type=="video"}),r=Li(e)&&!e.hb,n=!Li(e)&&e.hb&&!(n&&i),e.g.hls.ignoreManifestProgramDateTime||r||n?xT(e,t,r):(RP(e,t),e.g.hls.ignoreManifestProgramDateTimeForTypes.length>0&&xT(e,t))}function jc(e,t){return e.g.hls.ignoreManifestProgramDateTime?!0:e.g.hls.ignoreManifestProgramDateTimeForTypes.includes(t)}function ZP(e){if(!e.i||!e.i.variants.length)return!1;var t=[],n=[];e=d(e.i.variants);for(var r=e.next();!r.done;r=e.next())r=r.value,r.video&&t.push(r.video),r.audio&&n.push(r.audio);return!(t.length>0&&!t.some(function(i){return i.segmentIndex})||n.length>0&&!n.some(function(i){return i.segmentIndex}))}function bT(e,t,n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B){V=V===void 0?!0:V,B=B===void 0?!0:B;var Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce,ke,Ge,Je,Ft,dt,kn,Ut,Gn,sn,Qt,hn,An,pn,Zt,an,Zr;return G(function(Hr){switch(Hr.h){case 1:if(Z=r.segments||[],ae=Z.every(function(Lo){return!!si(Lo.ha,"EXT-X-GAP")}),!Z.length||ae)throw new fe(2,4,4053);if(qP(e,r),Li(e)&&tm(e,r),pe=Li(e)?e.D.get(s):new Map,te=BT(e,r,pe,n,i,s),le=te.segments,ie=te.bandwidth,Ve=Se=Ee=ce=ye=null,!(le.length>0&&V)){Hr.A(2);break}return Hr.g(DP(e,le),3);case 3:Le=Hr.i,s!=Le.type&&Li(e)&&(e.D.set(Le.type,e.D.get(s)),e.D.set(s,new Map)),s=Le.type,a=Le.language,h=Le.channelCount,A=Le.sampleRate,e.g.disableText||(g=Le.closedCaptions),ce=Le.height,ye=Le.width,Ee=Le.re,Se=Le.colorGamut,Ve=Le.frameRate,B&&(b=Le.mimeType,o=Le.codecs);case 2:if(b){Hr.A(4);break}return Hr.g(n3(e,s,o,le),5);case 5:b=Hr.i,s!=Bt||o||b!="application/mp4"||!le[0]||le[0].ea||(b="text/vtt");case 4:return Hr.g(DT(e,r,b,i,n),6);case 6:if(Ce=Hr.i,ke=Ce.drmInfos,Ge=Ce.keyIds,Je=Ce.encrypted,Ft=Ce.Mh,Je&&!ke.length&&!Ft)throw new fe(2,4,4026);return dt=OT(e,o,s,a,u,l,h,g,m,S,A,k),dt.encrypted=Je&&!Ft,dt.drmInfos=ke,dt.keyIds=Ge,dt.mimeType=b,ie&&(dt.bandwidth=ie),xl(dt),s=="video"&&(ye||ce||Ee||Se)&&_T(dt,ye,ce,Ve,Ee,null,Se),Li(e)&&tm(e,r),kn=le[0].startTime,Ut=le[le.length-1],Gn=Ut.endTime,sn=new wn(le),dt.segmentIndex=sn,hn=(Qt=si(r.ha,"EXT-X-SERVER-CONTROL"))?Tl(Qt,"CAN-SKIP-UNTIL")!=null:!1,An=Qt?Tl(Qt,"CAN-BLOCK-RELOAD")!=null:!1,pn=El(r.ha,"EXT-X-MEDIA-SEQUENCE",0),Zt=RT(pn,le),an=Zt.Kb,Zr=Zt.Lb,Hr.return({stream:dt,type:s,yf:[],R:i,Pc:kn,Gc:Gn,Oe:hn,Ne:An,Wd:!1,mg:-1,Kb:an,Lb:Zr,mf:pe})}})}function RT(e,t){e=e+t.length-1;var n=-1;if(!t.length)return e++,{Kb:e,Lb:n};t=t[t.length-1];var r=t.g;return t.g.length?(n=r.length-1,r[r.length-1].isPreload()||(e++,n=0),{Kb:e,Lb:n}):(e++,t.o&&(n=0),{Kb:e,Lb:n})}function OT(e,t,n,r,i,o,s,a,u,l,h,g){var m=rm(n,t)||Hd(n),S=[];if(u){u=d(u.split(","));for(var A=u.next();!A.done;A=u.next())S.push(A.value)}return A=void 0,u=null,n==Bt?A=S.includes("public.accessibility.transcribes-spoken-dialog")&&S.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":S.includes("public.accessibility.describes-video")&&(u="visually impaired"),S.length||A!=="subtitle"||S.push("subtitle"),A=null,n!="video"&&(A=o),e={id:e.G++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:m,codecs:t,kind:n==Bt?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:Rn(r||"und"),originalLanguage:r,label:A,type:n,primary:i,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:S,forced:l,channelsCount:s,audioSamplingRate:h,spatialAudio:g,closedCaptions:a,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:u,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null},xl(e),e}function DT(e,t,n,r,i){var o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce,ke,Ge;return G(function(Je){switch(Je.h){case 1:if(o=new Map,!e.g.ignoreDrmInfo&&t.segments){for(s=d(t.segments),a=s.next();!a.done;a=s.next())if(u=a.value,l=$o(u.ha,"EXT-X-KEY"),h=null,l.length)for(h=FT(e,t,u.ha,r,i),g=d(l),m=g.next();!m.done;m=g.next())S=m.value,o.set(S,h)}k=A=!1,b=[],V=new Set,B=d(o),Z=B.next();case 2:if(Z.done){Je.A(4);break}if(ae=Z.value,pe=d(ae),te=pe.next().value,le=pe.next().value,ie=te,ye=le,ce=$n(ie,"METHOD"),ce=="NONE"){Je.A(3);break}if(A=!0,Ee=St(ie,"KEYFORMAT")||"identity",Se=null,Kd(ce)){k=!0,Je.A(3);break}if(Ee=="identity")return Je.g(GT(e,ie,n,r,ye,i),11);if(Ve=e.Zb.get(Ee),!Ve){Le=null,Je.A(9);break}return Je.g(Ve(ie,n,ye),10);case 10:Le=Je.i;case 9:Se=Le,Je.A(6);break;case 11:Se=Je.i;case 6:if(Se){if(Se.keyIds)for(Ce=d(Se.keyIds),ke=Ce.next();!ke.done;ke=Ce.next())Ge=ke.value,V.add(Ge);b.push(Se)}case 3:Z=B.next(),Je.A(2);break;case 4:return Je.return({drmInfos:b,keyIds:V,encrypted:A,Mh:k})}})}function NT(e,t,n,r,i){if(!R.crypto||!R.crypto.subtle)throw ut("Web Crypto API is not available to decrypt AES. (Web Crypto only exists in secure origins like https)"),new fe(2,4,4042);var o=0,s=St(t,"IV","");if(s){var a=ts(s.substr(2));if(a.byteLength!=16)throw new fe(2,4,4048)}else o=El(n.ha,"EXT-X-MEDIA-SEQUENCE",0);var u=za(r(),$n(t,"URI"),i),l=u.sort().join("");if(n=t.toString()+"-"+o+"-"+l,!e.ua.has(n)){var h={bitsKey:128,blockCipherMode:"CBC",iv:a,firstMediaSequenceNumber:o};switch($n(t,"METHOD")){case"AES-256":h.bitsKey=256;break;case"AES-256-CTR":h.bitsKey=256,h.blockCipherMode="CTR"}h.fetchKey=function(){var g,m,S,A;return G(function(k){if(k.h==1)return e.O.has(l)||(g=jr(u,e.g.retryParameters),m=Sa(e,g,6).promise,e.O.set(l,m)),k.g(e.O.get(l),2);if(k.h!=3){if(S=k.i,!S.data||S.data.byteLength!=h.bitsKey/8)throw new fe(2,4,4049);return A={name:h.blockCipherMode=="CTR"?"AES-CTR":"AES-CBC",length:h.bitsKey},k.g(R.crypto.subtle.importKey("raw",S.data,A,!0,["decrypt"]),3)}h.cryptoKey=k.i,h.fetchKey=void 0,k.j()})},e.ua.set(n,h)}return e.ua.get(n)}function LT(e,t){e.o==null&&(t=si(t.ha,"EXT-X-START"))&&(e.o=Number($n(t,"TIME-OFFSET")))}function qP(e,t){var n=si(t.ha,"EXT-X-PLAYLIST-TYPE");t=si(t.ha,"EXT-X-ENDLIST"),t=n&&n.value=="VOD"||t,n=n&&n.value=="EVENT"&&!t,n=!t&&!n,t?Gd(e,zd):n?Gd(e,sm):Gd(e,u3)}function tm(e,t){var n=1/0,r=t.segments;if(r.length)for(var i=r.length-1;i>=0;){var o=si(r[i].ha,"EXTINF");if(o){n=Jg(o);break}i--}if(r=si(t.ha,"EXT-X-TARGETDURATION"),!r)throw new fe(2,4,4024,"EXT-X-TARGETDURATION");r=Number(r.value),(i=si(t.ha,"EXT-X-PART-INF"))&&(e.T=Number($n(i,"PART-TARGET"))),t=si(t.ha,"EXT-X-SERVER-CONTROL"),e.oa&&e.T?(e.u=e.tc?e.T*5<=n?Math.min(e.T,e.u):Math.min(n,e.u):Math.min(e.T,e.u),e.Ua=t?Number($n(t,"PART-HOLD-BACK")):0):(e.u=Math.min(n,e.u),n=t?Tl(t,"HOLD-BACK"):null,e.Ka=n?Number(n.value):0),e.eb=Math.max(r,e.eb)}function jT(e,t){var n=0;if(e.g.defaultPresentationDelay)n=e.g.defaultPresentationDelay;else if(e.Ua)n=e.Ua;else if(e.Ka)n=e.Ka;else for(var r=t.segments.length,i=r-Math.min(r,e.g.hls.liveSegmentsDelay);i<r;i++){var o=si(t.segments[i].ha,"EXTINF");n=o?n+Jg(o):n+e.eb}e.o&&e.o<0&&(n=Math.min(-e.o,n),e.o+=n),e.m.Ri(0),e.m.ph(n),e.m.Uc(!1)}function FT(e,t,n,r,i){var o=si(n,"EXT-X-MAP");if(!o)return null;var s=$n(o,"URI"),a=za(r(),s,i);if(s=[a.toString(),St(o,"BYTERANGE","")].join("-"),!e.Ba.has(s)){var u=void 0,l=null,h=!1;n=d(n);for(var g=n.next();!g.done;g=n.next())g=g.value,g.name=="EXT-X-KEY"?(h=$n(g,"METHOD"),Kd(h)&&g.id<o.id?(h=!1,u=NT(e,g,t,r,i)):h=h!="NONE"):g.name=="EXT-X-BYTERANGE"&&g.id<o.id&&(l=g);t=e3(a,o,l,u,h),e.Ba.set(s,t)}return e.Ba.get(s)}function e3(e,t,n,r,i){var o=0,s=null;return t=St(t,"BYTERANGE"),!t&&n&&(t=n.value),t&&(o=t.split("@"),s=Number(o[0]),o=Number(o[1]),s=o+s-1,r&&(n=s+1-o,n%16&&(s+=16-n%16))),new Zi(function(){return e},o,s,null,null,null,r,i)}function t3(e,t,n,r,i,o,s,a,u,l){var h=r.ha,g=si(h,"EXTINF"),m=0,S=0,A=null;r.qc.length&&(e.i.isLowLatency=!0);var k=null;if(!e.g.hls.ignoreManifestProgramDateTime){var b=si(h,"EXT-X-PROGRAM-DATE-TIME");b&&b.value&&(k=W(b.value),e.hb=!0)}var V=la;if(si(h,"EXT-X-GAP")&&(e.i.gapCount++,V=2),!g){if(r.qc.length==0)throw new fe(2,4,4024,"EXTINF");if(!e.oa)return null}var B=[];b=!1;var Z=null,ae=!1,pe=!1;if(e.oa&&r.qc.length){m=t&&R.ReadableStream&&e.g.hls.allowLowLatencyByteRangeOptimization;for(var te=k,le={},ie=0;ie<r.qc.length;le={Pf:void 0,ge:void 0},ie++){var ye=r.qc[ie],ce=ie==0?n:B[B.length-1],Ee=ie==0?i:ce.endTime,Se=Number(St(ye,"DURATION"))||e.T;if(Se){var Ve=Ee+Se,Le=0,Ce=null;if(ye.name=="EXT-X-PRELOAD-HINT"?(Le=(Le=St(ye,"BYTERANGE-START"))?Number(Le):0,(ce=St(ye,"BYTERANGE-LENGTH"))?Ce=Le+Number(ce)-1:Le&&(Ce=Number.MAX_SAFE_INTEGER)):(Le=St(ye,"BYTERANGE"),Ce=d(UT(ce,Le)),Le=Ce.next().value,Ce=Ce.next().value),le.ge=St(ye,"URI"),le.ge){ce=la,St(ye,"GAP")=="YES"&&(e.i.gapCount++,ce=2,ae=!0),le.Pf=null;var ke=function(Je){return function(){return Je.Pf==null&&(Je.Pf=za(a(),Je.ge,o)),Je.Pf}}(le);m&&Le>=0&&Ce!=null&&(Z=ke,b=!0),Ee=new kt(Ee,Ve,ke,Le,Ce,t,0,0,1/0,[],"",null,te,ce,l),ye.name=="EXT-X-PRELOAD-HINT"&&(Ee.Rg(),pe=!0),St(ye,"INDEPENDENT")!="YES"&&ie>0&&Ee.qd(),ye=u,ye||(B.length&&B[0].mimeType?ye=B[0].mimeType:le.ge&&(le=el(le.ge),ye=Wd.get(s).get(le)||null)),ye&&(Ee.mimeType=ye,WT.has(ye)&&(Ee.ea=null)),B.push(Ee),te&&(te+=Se)}}}}if(g){if(g=Jg(g),g==0)return null;m=i+g}else if(B.length)m=B[B.length-1].endTime;else return null;b&&(ae||B[0].startByte!=0?(b=!1,Z=null):B=[]),(g=si(h,"EXT-X-BYTERANGE"))?(A=d(UT(n,g.value)),S=A.next().value,A=A.next().value):B.length&&(S=B[0].startByte,A=B[B.length-1].endByte),n="",g=null,s=="image"&&(n="1x1",s=si(h,"EXT-X-TILES"))&&(n=$n(s,"LAYOUT"),(s=St(s,"DURATION"))&&(g=Number(s)));var Ge=null;return t=new kt(i,m,function(){return Z?Z():(Ge==null&&(Ge=za(a(),r.g,o)),Ge||[])},S,A,t,0,0,1/0,B,n,g,k,V,l,B.length>0&&!!r.g),u&&(t.mimeType=u,WT.has(u)&&(t.ea=null)),b&&(e.tc=!0,t.si(),pe&&t.Rg()),t}function UT(e,t){var n=0,r=null;return t&&(n=t.split("@"),t=Number(n[0]),n=n[1]?Number(n[1]):e.endByte+1,r=n+t-1),[n,r]}function nm(e,t,n,r,i){if(n=="video"||n=="audio"){var o=e.m.m;if(o!=null&&!jc(e,n))for(t=$o(t,"EXT-X-DATERANGE"),t=t.filter(function(ce){return Tl(ce,"START-DATE")!=null}).sort(function(ce,Ee){return ce=$n(ce,"START-DATE"),Ee=$n(Ee,"START-DATE"),ce<Ee?-1:ce>Ee?1:0}),n=0;n<t.length;n++){var s=t[n];try{var a=$n(s,"START-DATE"),u=W(a);if(!isNaN(u)){var l=Math.max(0,u-o),h=null,g=St(s,"END-DATE");if(g){var m=W(g);if(!isNaN(m)&&(h=m-o,h<0))continue}if(h==null){var S=St(s,"DURATION")||St(s,"PLANNED-DURATION");if(S){var A=parseFloat(S);if(isNaN(A)||(h=l+A),u-o+A<0)continue}}var k=St(s,"CLASS")||"com.apple.quicktime.HLS",b=St(s,"END-ON-NEXT")=="YES";if(h==null&&b){for(var V=n+1;V<t.length;V++){var B=St(t[V],"CLASS")||"com.apple.quicktime.HLS";if(k==B){var Z=$n(t[V],"START-DATE"),ae=W(Z);if(!isNaN(ae)&&ae&&ae>u){h=Math.max(0,ae-o);break}}}if(h==null)continue}V=["CLASS","START-DATE","END-DATE","DURATION","END-ON-NEXT"];for(var pe=[],te=d(s.attributes),le=te.next();!le.done;le=te.next()){var ie=le.value;if(!V.includes(ie.name)){var ye=mT(ie.value,r);(ie.name=="X-ASSET-URI"||ie.name=="X-ASSET-LIST")&&(ye=za(i(),ie.value,r)[0]),pe.push({key:ie.name,description:"",data:ye,mimeType:null,pictureType:null})}}pe.length>1&&e.h.onMetadata(k,l,h,pe)}}catch{}}}}function BT(e,t,n,r,i,o){function s(ce){if(ce=el(ce),!ce)return null;var Ee=Wd.get(o).get(ce);return Ee||(Ee=om.get(ce)),Ee}var a=t.segments,u=null,l=null,h=null,g=null,m=void 0,S=El(t.ha,"EXT-X-DISCONTINUITY-SEQUENCE",-1),A=El(t.ha,"EXT-X-MEDIA-SEQUENCE",0),k=si(t.ha,"EXT-X-SKIP"),b=k?Number(St(k,"SKIPPED-SEGMENTS")):0,V=A+b,B=0;Li(e)&&n.has(V)&&(B=n.get(V)),B===0&&e.Ga==sm&&n.size>0&&!n.has(V)&&e.m.i!=null&&(B=e.m.Db());var Z=[],ae=null;k=[];for(var pe=0;pe<a.length;pe++){var te=a[pe];(V=si(te.ha,"EXT-X-MAP"))&&V.id!==l&&(u=FT(e,t,te.ha,i,r),l=V.id),V=te.g;var le="";V&&(le=el(V)),le!==g&&(h=s(V),g=le),le=pe==0?B:ae.endTime,V=A+b+pe,si(te.ha,"EXT-X-DISCONTINUITY")&&(S++,ae&&ae.ea&&(ae.ea.g=le));for(var ie=d(te.ha),ye=ie.next();!ye.done;ye=ie.next())ye=ye.value,ye.name=="EXT-X-KEY"&&(Kd($n(ye,"METHOD"))?m=NT(e,ye,t,i,r):m=void 0);if(n.set(V,le),le=t3(e,u,ae,te,le,r,o,i,h,m)){if((ae=El(te.ha,"EXT-X-BITRATE"))?(k.push({bitrate:ae,duration:le.endTime-le.startTime}),le.bandwidth=ae):le.endByte?(te=Xh(le))&&(ae=le.endTime-le.startTime,te=te*8/ae/1e3,k.push({bitrate:te,duration:ae}),le.bandwidth=te):k.length&&(ae=k.pop(),ae.duration+=le.endTime-le.startTime,k.push(ae),le.bandwidth=ae.bitrate),le.bandwidth)for(ae=d(le.g),te=ae.next();!te.done;te=ae.next())te.value.bandwidth=le.bandwidth;ae=le,le.i=S,jc(e,o)&&e.N!=null&&V<e.N||Z.push(le)}}if(t=void 0,k.length&&(t=k.reduce(function(ce,Ee){return ce+Ee.duration},0),t=Math.round(k.reduce(function(ce,Ee){return ce+Ee.bitrate*Ee.duration},0)/t*1e3)),k=Z.some(function(ce){return ce.h!=null})){for(n={},r=0;r<Z.length;n={Ue:void 0,Te:void 0,Ke:void 0,Rc:void 0,Je:void 0},r++)if(n.Rc=Z[r],n.Rc.h==null)for(n.Te=0,n.Ue=r,i=function(ce){return function(){var Ee=Z[ce.Ue];if(Ee){if(Ee.h!=null)return Ee.h+ce.Te;ce.Te-=Ee.endTime-Ee.startTime,ce.Ue+=1}return null}}(n),n.Je=0,n.Ke=r,a=function(ce){return function(){var Ee=Z[ce.Ke];if(Ee){if(Ee!=ce.Rc&&(ce.Je+=Ee.endTime-Ee.startTime),Ee.h!=null)return Ee.h+ce.Je;--ce.Ke}return null}}(n);n.Rc.h==null;)n.Rc.h=a(),n.Rc.h==null&&(n.Rc.h=i())}if(k)for(n=d(Z),r=n.next();!r.done;r=n.next())for(i=r.value,r=i.h,i=d(i.g),a=i.next();!a.done;a=i.next())a=a.value,a.h=r,r+=a.endTime-a.startTime;if(n=e.ma,k&&n!=1/0&&!jc(e,o))for(e=d(Z),k=e.next();!k.done;k=e.next())k.value.Ah(n);return{segments:Z,bandwidth:t}}function rm(e,t){if(e==Bt){if(t=="vtt"||t=="wvtt")return"text/vtt";if(t&&t!=="")return"application/mp4"}return e!="image"||t&&t!="jpeg"?e=="audio"&&t=="mp4a.40.34"?"audio/mpeg":t=="mjpg"?"application/mp4":null:"image/jpeg"}function Hd(e){return e==Bt?"text/vtt":Wd.get(e).get("mp4")}function VT(e,t){e=Li(e)?Math.trunc((t.length-1)/2):0;for(var n=t[e];n.Vb()==2&&e+1<t.length;)e++,n=t[e];return{segment:n,segmentIndex:e}}function n3(e,t,n,r){var i,o,s,a,u,l,h,g,m,S,A,k,b;return G(function(V){switch(V.h){case 1:return i=Ho,o=VT(e,r),s=o.segment,s.status==2?V.return(Hd(t)):(u=s.R(),(l=el(u[0]))&&(h=Wd.get(t),(g=h.get(l))||(g=om.get(l)))?V.return(g):(a=rm(t,n))?V.return(a):(S=1,A=jr(u,e.g.retryParameters),V.m(2),A.method="HEAD",V.g(Sa(e,A,i,{type:S}).promise,4)));case 4:k=V.i,m=k.headers["content-type"],V.o(3);break;case 2:if(b=V.l(),!b||b.code!=1002&&b.code!=1001){V.A(3);break}return A.method="GET",e.g.hls.allowRangeRequestsToGuessMimeType&&(A.headers.Range="bytes=0-0"),V.g(Sa(e,A,i,{type:S}).promise,6);case 6:k=V.i,m=k.headers["content-type"];case 3:if(!m){V.A(7);break}if(a=m.toLowerCase().split(";")[0],a!="application/octet-stream"){V.A(8);break}if(k.data.byteLength){V.A(9);break}return A.method="GET",V.g(Sa(e,A,i,{type:S}).promise,10);case 10:k=V.i;case 9:Xu(xt(k.data))&&(a="video/mp2t");case 8:if(a!="application/octet-stream")return V.return(a);case 7:return V.return(Hd(t))}})}function _T(e,t,n,r,i,o,s){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(r)||void 0,e.hdr=i||void 0,e.videoLayout=o||void 0,e.colorGamut=s||void 0)}function im(e,t,n){return Sa(e,jr(t,e.g.retryParameters),0,{type:n?2:3})}function HT(e){var t,n,r,i,o,s;return G(function(a){switch(a.h){case 1:return e.h?(a.m(2),t=Date.now(),a.g(e.update(),4)):a.return();case 4:n=Date.now(),Li(e)&&(r=(n-t)/1e3,e.Wb.sample(1,r),i=e.g.updatePeriod>0?e.g.updatePeriod:e.u,o=Math.max(0,i-st(e.Wb)),isFinite(o)?e.B.ka(o):e.B.ka(1)),a.o(3);break;case 2:if(s=a.l(),!e.h)return a.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(s),a.return();s.severity=1,e.h.onError(s),e.B.ka(.1);case 3:if(!e.h)return a.return();e.h.onManifestUpdated(),a.j()}})}function Li(e){return e.Ga!=zd}function Gd(e,t){e.Ga=t,e.m&&e.m.Uc(!Li(e)),Li(e)||e.B.stop()}function Sa(e,t,n,r){if(!e.$)throw new fe(2,7,7001);return r||(r={}),r.isPreload=e.Yb(),t=e.h.networkingEngine.request(n,t,r),hu(e.$,t),t}function Kd(e){return e=="AES-128"||e=="AES-256"||e=="AES-256-CTR"}function r3(e,t,n,r){var i,o,s,a,u,l;return G(function(h){if(h.h==1){if(n=="video/mp2t")throw new fe(2,4,4040);if(R.shakaMediaKeysPolyfill==="apple")throw new fe(2,4,4041);if(i=$n(t,"METHOD"),o=["SAMPLE-AES","SAMPLE-AES-CTR"],!o.includes(i))return h.return(null);s="cenc",i=="SAMPLE-AES"&&(s="cbcs"),a=$n(t,"URI"),u=Ao("com.apple.fps",s,null,a);var g=new It(a).Ab.replace(/-/g,"").toLowerCase();return(l=g.length===32&&/^[0-9a-f]+$/.test(g)?g:null)||!r?h.A(2):h.g(KT(e,r),3)}return h.h!=2&&(l=h.i),l&&u.keyIds.add(l),h.return(u)})}function GT(e,t,n,r,i,o){var s,a,u,l,h,g,m,S,A,k,b,V;return G(function(B){switch(B.h){case 1:if(n=="video/mp2t")throw new fe(2,4,4040);if(R.shakaMediaKeysPolyfill==="apple")throw new fe(2,4,4041);if(s=$n(t,"METHOD"),a=["SAMPLE-AES","SAMPLE-AES-CTR"],!a.includes(s))return B.return(null);if(u=za(r(),$n(t,"URI"),o),u[0].startsWith("data:text/plain;base64,")){l=wo(ki(u[0].split("data:text/plain;base64,").pop())),B.A(2);break}return h=u.sort().join(""),e.ya.has(h)||(g=jr(u,e.g.retryParameters),m=Sa(e,g,6).promise,e.ya.set(h,m)),B.g(e.ya.get(h),3);case 3:S=B.i,l=wo(S.data);case 2:if(A="00000000000000000000000000000000",!i){B.A(4);break}return B.g(KT(e,i),5);case 5:(k=B.i)&&(A=k);case 4:return b=new Map,b.set(A,l),V="cenc",s=="SAMPLE-AES"&&(V="cbcs"),B.return(wa(b,V))}})}function KT(e,t){var n,r,i,o;return G(function(s){return s.h==1?(n=null,e.za.has(t)?(n=e.za.get(t),s.A(2)):(r=nc(t.R(),t.Ec(),t.Cc(),e.g.retryParameters),i=Ho,s.g(Sa(e,r,i,{type:0}).promise,3))):(s.h!=2&&(o=s.i,t.le(o.data),n=VI(o.data),e.za.set(t,n)),s.return(n))})}be("shaka.hls.HlsParser",Bd);var om=new Map().set("aac","audio/aac").set("ac3","audio/ac3").set("ec3","audio/ec3").set("mp3","audio/mpeg"),i3=new Map().set("mp4","audio/mp4").set("mp4a","audio/mp4").set("m4s","audio/mp4").set("m4i","audio/mp4").set("m4a","audio/mp4").set("m4f","audio/mp4").set("cmfa","audio/mp4").set("ts","video/mp2t").set("tsa","video/mp2t"),o3=new Map().set("mp4","video/mp4").set("mp4v","video/mp4").set("m4s","video/mp4").set("m4i","video/mp4").set("m4v","video/mp4").set("m4f","video/mp4").set("cmfv","video/mp4").set("ts","video/mp2t").set("tsv","video/mp2t"),s3=new Map().set("mp4","application/mp4").set("m4s","application/mp4").set("m4i","application/mp4").set("m4f","application/mp4").set("cmft","application/mp4").set("vtt","text/vtt").set("webvtt","text/vtt").set("ttml","application/ttml+xml"),a3=new Map().set("jpg","image/jpeg").set("png","image/png").set("svg","image/svg+xml").set("webp","image/webp").set("avif","image/avif"),Wd=new Map().set("audio",i3).set("video",o3).set("text",s3).set("image",a3),WT=new Set(["video/mp2t"].concat(M(As))),zd="VOD",u3="EVENT",sm="LIVE";Vi("application/x-mpegurl",function(){return new Bd}),Vi("application/vnd.apple.mpegurl",function(){return new Bd});function $d(e){return kd(e)}var l3=new Map().set("com.microsoft.playready",$d).set("com.microsoft.playready.recommendation",$d).set("com.microsoft.playready.software",$d).set("com.microsoft.playready.hardware",$d);function am(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.u=1,this.i=null,this.D=new Qe(5),this.o=new Yt(function(){c3(e)}),this.C=new Uu,this.m=new Map,this.B=function(){return!1}}f=am.prototype,f.configure=function(e,t){this.g=e,t&&(this.B=t)},f.start=function(e,t){var n=this;return G(function(r){if(r.h==1)return n.l=[e],n.h=t,r.g(um(n),2);if(!n.h)throw new fe(2,7,7001);return r.return(n.j)})};function c3(e){var t;G(function(n){switch(n.h){case 1:return n.m(2),n.g(um(e),4);case 4:n.o(3);break;case 2:t=n.l(),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();n.j()}})}f.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,this.o!=null&&(this.o.stop(),this.o=null),this.m.clear(),this.C.destroy()},f.update=function(){var e=this,t;return G(function(n){if(n.h==1)return n.m(2),n.g(um(e),4);if(n.h!=2)return n.o(0);if(t=n.l(),!e.h||!t)return n.return();e.h.onError(t),n.j()})},f.onExpirationUpdated=function(){},f.onInitialVariantChosen=function(){},f.banLocation=function(){},f.setMediaElement=function(){};function um(e){var t,n,r,i,o,s,a;return G(function(u){if(u.h==1)return t=jr(e.l,e.g.retryParameters),n=e.h.networkingEngine,r=Date.now(),i=n.request(0,t,{type:5,isPreload:e.B()}),hu(e.C,i),u.g(i.promise,2);if(o=u.i,!e.h)return u.return();o.uri&&!e.l.includes(o.uri)&&e.l.unshift(o.uri);var l=o.uri,h=o.data,g=e.g.mss.manifestPreprocessor;if(g!=$f){if(lt("manifest.mss.manifestPreprocessor configuration","Please Use manifest.mss.manifestPreprocessorTXml instead."),h=XS(h,"SmoothStreamingMedia"),!h)throw new fe(2,4,4046,l);g(h),h=Ui(h.outerHTML)}var m=ea(h,"SmoothStreamingMedia");if(!m)throw new fe(2,4,4046,l);if(l=e.g.mss.manifestPreprocessorTXml,l!=Xf&&l(m),e.i||(e.i=new Lt(null,0)),l=wt(m,"IsLive",tt,!1))throw new fe(2,4,4047);e.i.Uc(!l),g=wt(m,"TimeScale",je,1e7),h=wt(m,"DVRWindowLength",je),l&&(h===0||isNaN(h))&&(h=1/0);var S=wt(m,"CanSeek",tt,!1);h===0&&S&&(h=1/0),S=null,h&&h>0&&(S=h/g),l&&!isNaN(e.g.availabilityWindowOverride)&&(S=e.g.availabilityWindowOverride),S==null&&(S=1/0),e.i.Gf(S),h=wt(m,"Duration",je,1/0),l||e.i.ub(h/g),l={variants:[],textStreams:[],timescale:g,duration:h/g};var A;for(S=Mn(m,"Protection"),g=e.g.mss.keySystemsBySystemId,h=[],S=d(S),A=S.next();!A.done;A=S.next())h=h.concat(Mn(A.value,"ProtectionHeader"));if(h.length){for(S=[],A=0;A<h.length;A++){var k=h[A],b=k.attributes.SystemID.toLowerCase(),V=g[b];if(V){var B;e:{if(B=xS(k)){B=d(fi(B,"DATA"));for(var Z=B.next();!Z.done;Z=B.next())if(Z=Pn(Z.value,"KID")){B=ki(vr(Z)),B=new Uint8Array([B[3],B[2],B[1],B[0],B[5],B[4],B[7],B[6]].concat(M(B.slice(8)))),B=wo(B);break e}}B=null}Z=ki(vr(k)),b=ts(b.replace(/-/g,"")),b=[{initData:gf(Z,b,new Set,0),initDataType:"cenc",keyId:B}],b=Ao(V,"cenc",b),B&&b.keyIds.add(B),(V=l3.get(V))&&(b.licenseServerUri=V(k)),S.push(b)}}g=S}else g=[];for(A=g,S=[],g=[],h=[],m=Mn(m,"StreamIndex"),m=d(m),k=m.next();!k.done;k=m.next()){k=k.value,V=Mn(k,"QualityLevel"),b=l.timescale,B=l.duration,Z=Mn(k,"c");for(var ae=[],pe=0,te=0;te<Z.length;++te){var le=Z[te],ie=Z[te+1],ye=wt(le,"t",je),ce=wt(le,"d",je);if(le=wt(le,"r",ne),!ce)break;if(ye=ye??pe,(le=le||0)&&le--,le<0)if(ie){if(ie=wt(ie,"t",je),ie==null)break;if(ye>=ie)break;le=Math.ceil((ie-ye)/ce)-1}else{if(B==1/0)break;if(ye/b>=B)break;le=Math.ceil((B*b-ye)/ce)-1}for(ie=0;ie<=le;++ie)pe=ye+ce,ae.push({start:ye/b,end:pe/b,Gd:ye}),ye=pe}for(b=ae,V=d(V),B=V.next();!B.done;B=V.next())(B=f3(e,k,B.value,b,A,l))&&(B.type!="audio"||e.g.disableAudio?B.type!="video"||e.g.disableVideo?B.type!=Bt||e.g.disableText||h.push(B):g.push(B):S.push(B))}for(m=[],S=d(S.length>0?S:[null]),A=S.next();!A.done;A=S.next())for(A=A.value,k=d(g.length>0?g:[null]),ae=k.next();!ae.done;ae=k.next())V=m,b=V.push,B=e,Z=A,ae=ae.value,te=0,Z&&Z.bandwidth&&Z.bandwidth>0&&(te+=Z.bandwidth),ae&&ae.bandwidth&&ae.bandwidth>0&&(te+=ae.bandwidth),B={id:B.u++,language:Z?Z.language:"und",disabledUntilTime:0,primary:!!Z&&Z.primary||!!ae&&ae.primary,audio:Z,video:ae,bandwidth:te,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},b.call(V,B);l.variants=m,l.textStreams=h,e.j?(e.j.variants=l.variants,e.j.textStreams=l.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:l.variants,textStreams:l.textStreams,imageStreams:[],offlineSessionIds:[],sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null},e.i.lf()),Promise.resolve(),s=Date.now(),a=(s-r)/1e3,e.D.sample(1,a),u.j()})}function f3(e,t,n,r,i,o){var s=t.attributes.Type;if(s!=="audio"&&s!=="video"&&s!=="text")return ut("Ignoring unrecognized type:",s),null;var a=t.attributes.Language,u=e.u++,l=wt(n,"Bitrate",ge),h=wt(n,"MaxWidth",ge),g=wt(n,"MaxHeight",ge),m=wt(n,"Channels",ge),S=wt(n,"SamplingRate",ge),A=o.duration;r.length&&(A=r[r.length-1].end-r[0].start);var k=e.i.getDuration();e.i.ub(Math.min(A,k)),(k=t.attributes.Name)&&(k+=n.attributes.Index),k||(k=String(u));var b={id:u,originalId:k,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:l||0,width:h||void 0,height:g||void 0,kind:"",encrypted:i.length>0,drmInfos:i,keyIds:new Set,language:Rn(a||"und"),originalLanguage:a,label:"",type:"",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:m,audioSamplingRate:S,spatialAudio:!1,closedCaptions:null,hdr:void 0,colorGamut:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:A,timescale:o.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1,fullMimeTypes:new Set,isAudioMuxedInVideo:!1,baseOriginalId:null};if((i=t.attributes.Subtype)&&((i=v3.get(i))&&b.roles.push(i),i==="main"&&(b.primary=!0)),i=n.attributes.FourCC,(i===null||i==="")&&(i=t.attributes.FourCC),!i){if(s==="audio")i="AAC";else if(s==="video")return ut('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null}if(!m3.includes(i.toUpperCase()))return ut("Codec not supported:",i),null;switch(n=d3(n,s,i,b),b.mssPrivateData.codecPrivateData=n,s){case"audio":if(!n)return ut("Quality unsupported without CodecPrivateData",s),null;b.type="audio",b.mimeType="mss/audio/mp4",b.codecs=h3(i,n);break;case"video":if(!n)return ut("Quality unsupported without CodecPrivateData",s),null;b.type="video",b.mimeType="mss/video/mp4",b.codecs=p3(n);break;case"text":b.type=Bt,b.mimeType="application/mp4",(i==="TTML"||i==="DFXP")&&(b.codecs="stpp")}return b.fullMimeTypes.add(ar(b.mimeType,b.codecs)),b.createSegmentIndex=function(){if(b.segmentIndex)return Promise.resolve();if(e.m.has(b.id))var V=e.m.get(b.id);else V=[],b.type=="video"&&(V=b.mssPrivateData.codecPrivateData.split("00000001").slice(1)),V={id:b.id,type:b.type,codecs:b.codecs,encrypted:b.encrypted,timescale:b.mssPrivateData.timescale,duration:b.mssPrivateData.duration,yb:V,Ha:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:null,stream:b},V=Gu(new Hu([V])),e.m.set(b.id,V);return V=g3(e,new Zi(function(){return[]},0,null,Of(b),b.mssPrivateData.timescale,V,null,b.encrypted),b,t,r),b.segmentIndex=new wn(V),Promise.resolve()},b.closeSegmentIndex=function(){b.segmentIndex&&(b.segmentIndex.release(),b.segmentIndex=null)},b}function d3(e,t,n,r){if(e=e.attributes.CodecPrivateData)return e;if(t!=="audio")return null;t=r.channelsCount||2,e=r.audioSamplingRate||44100;var i={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12};return r=i[e],n==="AACH"?(n=new Uint8Array(4),e=i[e*2],n[0]=40|r>>1,n[1]=r<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,t=new Uint16Array(2),t[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):(n=new Uint8Array(2),n[0]=16|r>>1,n[1]=r<<7|t<<3,t=new Uint16Array(1),t[0]=(n[0]<<8)+n[1],t[0].toString(16))}function h3(e,t){var n=0;return e==="AACH"&&(n=5),t?n===0&&(n=(parseInt(t.substr(0,2),16)&248)>>3):(n=2,e==="AACH"&&(n=5)),"mp4a.40."+n}function p3(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}function g3(e,t,n,r,i){var o=r.attributes.Url.replace("{bitrate}",String(n.bandwidth));r=[],i=d(i);for(var s=i.next(),a={};!s.done;a={Kf:void 0},s=i.next())a.Kf=s.value,r.push(new kt(a.Kf.start,a.Kf.end,function(u){return function(){return kr(e.l,[o.replace("{start time}",String(u.Kf.Gd))])}}(a),0,null,t,0,0,n.mssPrivateData.duration));return r}be("shaka.mss.MssParser",am);var m3="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),v3=new Map().set("CAPT","main").set("SUBT","alternate").set("DESC","main");Vi("application/vnd.ms-sstr+xml",function(){return new am});function zT(e,t,n,r,i,o,s){if(n>=200&&n<=299&&n!=202||n==304)return{uri:i||r,originalUri:r,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"],originalRequest:o};o=null;try{o=ci(t)}catch{}throw new fe(n==401||n==403?2:1,1,1001,r,n,o,e,s,i||r)}function lm(){}function Xd(e,t,n,r,i,o){var s=new w3;try{Vu(t.headers).forEach(function(h,g){s.append(g,h)})}catch(h){return ba(new fe(1,1,1002,e,h,n))}var a=new E3,u={Rh:!1,ej:!1};if(e=y3(e,t,n,{body:t.body||void 0,headers:s,method:t.method,signal:a.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},u,r,i,t.streamDataCallback,o.minBytesForProgressEvents||0),e=new br(e,function(){return u.Rh=!0,a.abort(),Promise.resolve()}),t=t.retryParameters.timeout){var l=new Yt(function(){u.ej=!0,a.abort()});l.ka(t/1e3),e.finally(function(){l.stop()})}return e}function y3(e,t,n,r,i,o,s,a,u){var l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le;return G(function(ie){switch(ie.h){case 1:return l=T3,h=x3,m=new ArrayBuffer(0),A=S=0,k={},b=Date.now(),ie.m(2),ie.g(l(e,r),4);case 4:if(g=ie.i,k=S3(g.headers),s(k),r.method=="HEAD"){ie.A(5);break}return B=(V=g.headers.get("Content-Length"))?parseInt(V,10):0,g.body?(Z=g.clone().body.getReader(),ae=function(ye){function ce(){var Ee,Se,Ve,Le;return G(function(Ce){switch(Ce.h){case 1:return Ce.m(2),Ce.g(Z.read(),4);case 4:Ee=Ce.i,Ce.o(3);break;case 2:return Ce.l(),Ce.return();case 3:if(Ee.done){Ce.A(5);break}if(S+=Ee.value.byteLength,!a){Ce.A(5);break}return Ce.g(a(Ee.value),5);case 5:Se=Date.now(),Ve=S-A,(Se-b>100&&Ve>=u||Ee.done)&&(Le=Ee.done?0:B-S,o(Se-b,Ve,Le),A=S,b=Se),Ee.done?ye.close():(ye.enqueue(Ee.value),ce()),Ce.j()}})}ce()},new h({start:ae}),ie.g(g.arrayBuffer(),8)):ie.g(g.arrayBuffer(),9);case 8:m=ie.i,ie.A(5);break;case 9:m=ie.i,pe=Date.now(),o(pe-b,m.byteLength,0);case 5:t.headers.Range&&(te=t.headers.Range.replace("bytes=","").split("-").filter(function(ye){return ye}).map(function(ye){return parseInt(ye,10)}),te.length==2&&m.byteLength!=te[1]-te[0]+1&&ut("Payload length does not match range requested bytes",t,g)),ie.o(3);break;case 2:throw le=ie.l(),i.Rh?new fe(1,1,7001,e,n):i.ej?new fe(1,1,1003,e,n):new fe(1,1,1002,e,le,n);case 3:return ie.return(zT(k,m,g.status,e,g.url,t,n))}})}function S3(e){var t={};return e.forEach(function(n,r){t[r.trim()]=n}),t}function $T(){if(R.ReadableStream)try{new ReadableStream({})}catch{return!1}else return!1;if(R.Response){if(!new Response("").body)return!1}else return!1;return!(!R.fetch||"polyfill"in R.fetch||!R.AbortController)}be("shaka.net.HttpFetchPlugin",lm),lm.isSupported=$T,lm.parse=Xd;var T3=R.fetch,E3=R.AbortController,x3=R.ReadableStream,w3=R.Headers;$T()&&(sa("http",Xd,2,!0),sa("https",Xd,2,!0),sa("blob",Xd,2,!0));function XT(){}function Yd(e,t,n,r,i,o){var s=new A3,a=Date.now(),u=0,l=new Promise(function(h,g){s.open(t.method,e,!0),s.responseType="arraybuffer",s.timeout=t.retryParameters.timeout,s.withCredentials=t.allowCrossSiteCredentials;var m={};s.onabort=function(){g(new fe(1,1,7001,e,n))},s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.HEADERS_RECEIVED){var A=s.getAllResponseHeaders().trim().split(`\r
73
- `),k={};A=d(A);for(var b=A.next();!b.done;b=A.next()){b=b.value;var V=b.indexOf(": ");V!==-1&&(k[b.slice(0,V).toLowerCase()]=b.slice(V+2))}m=k,i(m)}},s.onload=function(){var A=s.response;try{var k=zT(m,A,s.status,e,s.responseURL,t,n);h(k)}catch(b){g(b)}},s.onerror=function(A){g(new fe(1,1,1002,e,A,n))},s.ontimeout=function(){g(new fe(1,1,1003,e,n))},s.onprogress=function(A){var k=Date.now(),b=o.minBytesForProgressEvents||0,V=A.loaded-u;(k-a>100&&V>=b||A.lengthComputable&&A.loaded==A.total)&&(r(k-a,V,s.readyState==4?0:A.total-A.loaded),u=A.loaded,a=k)};for(var S in t.headers)try{s.setRequestHeader(S.toLowerCase(),t.headers[S])}catch(A){throw new fe(1,1,1002,e,A,n)}s.send(t.body)});return new br(l,function(){return s.abort(),Promise.resolve()})}be("shaka.net.HttpXHRPlugin",XT),XT.parse=Yd;var A3=R.XMLHttpRequest;sa("http",Yd,1,!0),sa("https",Yd,1,!0),sa("blob",Yd,1,!0);function YT(e,t,n,r,i){this.g=e,this.i=t,this.groupId=n,this.h=r,this.j=i}function cm(e){var t=e.Ub(!1);return t?Pi(t):e.R().map(function(n){return"{"+encodeURI(n.split("#xywh=")[0])+"}"}).join("")+":"+e.startByte+":"+e.endByte}function I3(e,t){return nc(e.g.R(),e.g.startByte,e.g.endByte,t.streaming.retryParameters)}function JT(){this.g=this.j=this.i=0,this.h=new Map,this.l=0}function QT(e,t){e.i+=t;var n=e.l;return e.l++,e.h.set(n,t),n}JT.prototype.close=function(e,t){if(this.h.has(e)){var n=this.h.get(e);this.h.delete(e),this.j+=n,this.g+=t}};function ZT(e){return e.i==0?0:e.j/e.i}function fm(e){var t=this;this.u=e,this.i=new Map,this.h=new Bu(function(){return dm(t).catch(function(){})}),this.j=[],this.o=function(){},this.m=function(){},this.g=new JT,this.l=!1}fm.prototype.destroy=function(){return this.h.destroy()};function C3(e,t,n){e.o=t,e.m=n}function dm(e){e.l=!0;var t=e.j.map(function(n){return n()});return e.j=[],Promise.all(t)}fm.prototype.queue=function(e,t,n,r,i){var o=this;qn(this.h);var s=(this.i.get(e)||Promise.resolve()).then(function(){var a,u,l,h,g,m,S;return G(function(A){if(A.h==1)return A.g(k3(o,t),2);if(a=A.i,o.h.g)throw new fe(2,9,7001);if(r)for(h in u=xt(a),l=new Vh(u),l.data)g=Number(h),m=l.data[g],S=l.g[g],o.m(m,S);return o.g.close(n,a.byteLength),o.o(ZT(o.g),o.g.g),A.return(i(a))})});return this.i.set(e,s),s};function M3(e,t,n,r,i,o){qn(e.h);var s=(e.i.get(t)||Promise.resolve()).then(function(){if(e.h.g)throw new fe(2,9,7001);if(i){var a=xt(n);a=new Vh(a);for(var u in a.data){var l=Number(u);e.m(a.data[l],a.g[l])}}return e.g.close(r,n.byteLength),e.o(ZT(e.g),e.g.g),o(n)});e.i.set(t,s)}function P3(e){return G(function(t){return t.h==1?t.g(Promise.all(e.i.values()),2):t.return(e.g.g)})}function k3(e,t){var n,r,i,o;return G(function(s){return s.h==1?(n=Ho,r=e.u.request(n,t),i=function(){return r.abort()},e.j.push(i),s.g(r.promise,2)):(o=s.i,$t(e.j,i),s.return(o.data))})}function Jd(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new zn,e.onabort=function(r){r.preventDefault(),n.g.reject()},e.onerror=function(r){r.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}Jd.prototype.abort=function(){var e=this;return G(function(t){if(t.h==1){try{e.i.abort()}catch{}return t.m(2),t.g(e.g,4)}if(t.h!=2)return t.o(0);t.l(),t.j()})};function hm(e,t){return new Promise(function(n,r){var i=e.h.openCursor();i.onerror=r,i.onsuccess=function(){var o;return G(function(s){if(s.h==1)return i.result==null?(n(),s.return()):(o=i.result,s.g(t(o.key,o.value,o),2));o.continue(),s.j()})}})}Jd.prototype.store=function(){return this.h},Jd.prototype.promise=function(){return this.g};function pm(e){this.h=e,this.g=[]}pm.prototype.destroy=function(){return Promise.all(this.g.map(function(e){return e.abort()}))};function Au(e,t){return Qd(e,t,"readwrite")}function Qd(e,t,n){n=e.h.transaction([t],n);var r=new Jd(n,t);return e.g.push(r),r.promise().then(function(){$t(e.g,r)},function(){$t(e.g,r)}),r}function Iu(e,t,n){this.h=new pm(e),this.i=t,this.g=n}f=Iu.prototype,f.destroy=function(){return this.h.destroy()},f.hasFixedKeySpace=function(){return!0},f.addSegments=function(){return qT(this.i)},f.removeSegments=function(e,t){return eE(this,this.i,e,t)},f.getSegments=function(e){var t=this,n;return G(function(r){return r.h==1?r.g(tE(t,t.i,e),2):(n=r.i,r.return(n.map(function(i){return t.Th(i)})))})},f.addManifests=function(){return qT(this.g)},f.updateManifest=function(){return Promise.reject(new fe(2,9,9016,"Cannot modify values in "+this.g))};function b3(e,t,n){e=Au(e.h,e.g);var r=e.store();return r.get(t).onsuccess=function(){r.put(n,t)},e.promise()}f.updateManifestExpiration=function(e,t){var n=Au(this.h,this.g),r=n.store();return r.get(e).onsuccess=function(i){(i=i.target.result)&&(i.expiration=t,r.put(i,e))},n.promise()},f.removeManifests=function(e,t){return eE(this,this.g,e,t)},f.getManifests=function(e){var t=this,n;return G(function(r){return r.h==1?r.g(tE(t,t.g,e),2):(n=r.i,r.return(Promise.all(n.map(function(i){return t.Od(i)}))))})},f.getAllManifests=function(){var e=this,t,n;return G(function(r){return r.h==1?(t=Qd(e.h,e.g,"readonly"),n=new Map,r.g(hm(t,function(i,o){var s;return G(function(a){if(a.h==1)return a.g(e.Od(o),2);s=a.i,n.set(i,s),a.j()})}),2)):r.h!=3?r.g(t.promise(),3):r.return(n)})},f.Th=function(e){return e},f.Od=function(e){return Promise.resolve(e)};function qT(e){return Promise.reject(new fe(2,9,9011,"Cannot add new value to "+e))}f.add=function(e,t){var n=this,r,i,o,s,a,u,l;return G(function(h){if(h.h==1){for(r=Au(n.h,e),i=r.store(),o=[],s=d(t),a=s.next(),u={};!a.done;u={fh:void 0},a=s.next())l=a.value,u.fh=i.add(l),u.fh.onsuccess=function(g){return function(){o.push(g.fh.result)}}(u);return h.g(r.promise(),2)}return h.return(o)})};function eE(e,t,n,r){e=Au(e.h,t),t=e.store(),n=d(n);for(var i=n.next(),o={};!i.done;o={Qg:void 0},i=n.next())o.Qg=i.value,t.delete(o.Qg).onsuccess=function(s){return function(){return r(s.Qg)}}(o);return e.promise()}function tE(e,t,n){var r,i,o,s,a,u,l;return G(function(h){if(h.h==1){for(r=Qd(e.h,t,"readonly"),i=r.store(),o={},s=[],a=d(n),u=a.next(),l={};!u.done;l={zf:void 0,gf:void 0},u=a.next())l.gf=u.value,l.zf=i.get(l.gf),l.zf.onsuccess=function(g){return function(){g.zf.result==null&&s.push(g.gf),o[g.gf]=g.zf.result}}(l);return h.g(r.promise(),2)}if(s.length)throw new fe(2,9,9012,"Could not find values for "+s);return h.return(n.map(function(g){return o[g]}))})}function Fc(e){this.g=new pm(e)}Fc.prototype.destroy=function(){return this.g.destroy()},Fc.prototype.getAll=function(){var e=this,t,n;return G(function(r){return r.h==1?(t=Qd(e.g,"session-ids","readonly"),n=[],r.g(hm(t,function(i,o){n.push(o)}),2)):r.h!=3?r.g(t.promise(),3):r.return(n)})},Fc.prototype.add=function(e){var t=Au(this.g,"session-ids"),n=t.store();e=d(e);for(var r=e.next();!r.done;r=e.next())n.add(r.value);return t.promise()},Fc.prototype.remove=function(e){var t=this,n;return G(function(r){return r.h==1?(n=Au(t.g,"session-ids"),r.g(hm(n,function(i,o,s){e.includes(o.sessionId)&&s.delete()}),2)):r.g(n.promise(),0)})};function to(){this.g=new Map}to.prototype.destroy=function(){for(var e=[],t=d(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},to.prototype.init=function(){var e=this;Uc.forEach(function(i,o){(i=i())&&e.g.set(o,i)});for(var t=[],n=d(this.g.values()),r=n.next();!r.done;r=n.next())t.push(r.value.init());return Promise.all(t)};function nE(e){var t=null;if(e.g.forEach(function(n,r){n.getCells().forEach(function(i,o){i.hasFixedKeySpace()||t||(t={path:{Jb:r,cb:o},cb:i})})}),t)return t;throw new fe(2,9,9013,"Could not find a cell that supports add-operations")}function R3(e,t){e.g.forEach(function(n,r){n.getCells().forEach(function(i,o){t({Jb:r,cb:o},i)})})}function Zd(e,t,n){if(e=e.g.get(t),!e)throw new fe(2,9,9013,"Could not find mechanism with name "+t);if(t=e.getCells().get(n),!t)throw new fe(2,9,9013,"Could not find cell with name "+n);return t}function O3(e,t){e.g.forEach(function(n){t(n.getEmeSessionCell())})}function D3(e){var t=Array.from(e.g.keys());if(!t.length)throw new fe(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}function N3(e){var t,n,r;return G(function(i){return i.h==1?(t=Array.from(e.g.values()),n=t.length>0,n||(r=Uc,r.forEach(function(o){(o=o())&&t.push(o)})),i.g(Promise.all(t.map(function(o){return o.erase()})),2)):n?i.A(0):i.g(Promise.all(t.map(function(o){return o.destroy()})),0)})}function rE(e,t){Uc.set(e,t)}be("shaka.offline.StorageMuxer",to),to.unregister=function(e){Uc.delete(e)},to.register=rE,to.prototype.destroy=to.prototype.destroy;var Uc=new Map;function Bc(){Iu.apply(this,arguments)}P(Bc,Iu),Bc.prototype.updateManifestExpiration=function(e,t){var n=this,r,i,o;return G(function(s){return r=Au(n.h,n.g),i=r.store(),o=new zn,i.get(e).onsuccess=function(a){(a=a.target.result)?(a.expiration=t,i.put(a),o.resolve()):o.reject(new fe(2,9,9012,"Could not find values for "+e))},s.g(Promise.all([r.promise(),o]),0)})},Bc.prototype.Od=function(e){var t,n,r,i,o,s;return G(function(a){if(a.h==1){for(t=[],n=0;n<e.periods.length;++n)r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime,o=L3(e.periods[n],i),t.push(o);return a.g(US(t),2)}return s=a.i,a.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:e.expiration==null?1/0:e.expiration,streams:s,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})})};function L3(e,t){F3(e);for(var n=d(e.streams),r=n.next();!r.done;r=n.next());return e.streams.map(function(i){return j3(i,e.startTime,t)})}function j3(e,t,n){var r=e.initSegmentUri?iE(e.initSegmentUri):null,i=t+e.presentationTimeOffset,o=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:r,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(s){var a=iE(s.uri);return{startTime:t+s.startTime,endTime:t+s.endTime,dataKey:a,initSegmentKey:r,appendWindowStart:t,appendWindowEnd:o,timestampOffset:i,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}Bc.prototype.Th=function(e){return{data:e.data}};function iE(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new fe(2,9,9004,"Could not parse uri "+e)}function F3(e){var t=e.streams.filter(function(a){return a.contentType=="audio"});if(e=e.streams.filter(function(a){return a.contentType=="video"}),!t.every(function(a){return a.variantIds})||!e.every(function(a){return a.variantIds})){for(var n=d(t),r=n.next();!r.done;r=n.next())r.value.variantIds=[];for(n=d(e),r=n.next();!r.done;r=n.next())r.value.variantIds=[];if(n=0,e.length&&!t.length){r=n++;for(var i=d(e),o=i.next();!o.done;o=i.next())o.value.variantIds.push(r)}if(!e.length&&t.length)for(r=n++,i=d(t),o=i.next();!o.done;o=i.next())o.value.variantIds.push(r);if(e.length&&t.length)for(t=d(t),r=t.next();!r.done;r=t.next())for(r=r.value,i=d(e),o=i.next();!o.done;o=i.next()){o=o.value;var s=n++;r.variantIds.push(s),o.variantIds.push(s)}}}function qd(){Iu.apply(this,arguments)}P(qd,Iu),qd.prototype.Od=function(e){var t,n,r,i,o,s;return G(function(a){if(a.h==1){for(t=[],n=0;n<e.periods.length;++n){r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime;for(var u=e.periods[n],l=[],h=d(u.streams),g=h.next();!g.done;g=h.next())g=g.value,g.variantIds.length!=0&&l.push(U3(g,u.startTime,u.startTime+i));o=l,t.push(o)}return a.g(US(t),2)}return s=a.i,a.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:e.expiration==null?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:s,sequenceMode:!1})})};function U3(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,colorGamut:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map(function(r){return{startTime:t+r.startTime,endTime:t+r.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:r.dataKey,tilesLayout:"",mimeType:null,codecs:null,thumbnailSprite:null}}),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1,isAudioMuxedInVideo:!1}}function gm(){Iu.apply(this,arguments)}P(gm,Iu),f=gm.prototype,f.hasFixedKeySpace=function(){return!1},f.addSegments=function(e){return this.add(this.i,e)},f.addManifests=function(e){return this.add(this.g,e)},f.updateManifest=function(e,t){return b3(this,e,t)},f.Od=function(e){return e.expiration==null&&(e.expiration=1/0),Promise.resolve(e)};function oE(){this.m=this.j=this.i=this.h=this.g=this.l=null}f=oE.prototype,f.init=function(){var e=this,t=new zn,n=!1,r=new Yt(function(){n=!0,t.reject(new fe(2,9,9017))});typeof eh=="number"&&eh>0&&r.ka(eh);var i=R.indexedDB.open("shaka_offline_db",5);return i.onsuccess=function(){if(!n){r.stop();var o=i.result;e.l=o;var s=o.objectStoreNames;s=s.contains("manifest")&&s.contains("segment")?new Bc(o,"segment","manifest"):null,e.g=s,s=o.objectStoreNames,s=s.contains("manifest-v2")&&s.contains("segment-v2")?new qd(o,"segment-v2","manifest-v2"):null,e.h=s,s=o.objectStoreNames,s=s.contains("manifest-v3")&&s.contains("segment-v3")?new qd(o,"segment-v3","manifest-v3"):null,e.i=s,s=o.objectStoreNames,s=s.contains("manifest-v5")&&s.contains("segment-v5")?new gm(o,"segment-v5","manifest-v5"):null,e.j=s,o=o.objectStoreNames.contains("session-ids")?new Fc(o):null,e.m=o,t.resolve()}},i.onupgradeneeded=function(){for(var o=i.result,s=d(["segment-v5","manifest-v5","session-ids"]),a=s.next();!a.done;a=s.next())a=a.value,o.objectStoreNames.contains(a)||o.createObjectStore(a,{autoIncrement:!0})},i.onerror=function(o){n||(r.stop(),t.reject(new fe(2,9,9001,i.error)),o.preventDefault())},t},f.destroy=function(){var e=this;return G(function(t){switch(t.h){case 1:if(!e.g){t.A(2);break}return t.g(e.g.destroy(),2);case 2:if(!e.h){t.A(4);break}return t.g(e.h.destroy(),4);case 4:if(!e.i){t.A(6);break}return t.g(e.i.destroy(),6);case 6:if(!e.j){t.A(8);break}return t.g(e.j.destroy(),8);case 8:if(!e.m){t.A(10);break}return t.g(e.m.destroy(),10);case 10:e.l&&e.l.close(),t.j()}})},f.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},f.getEmeSessionCell=function(){return this.m},f.erase=function(){var e=this;return G(function(t){switch(t.h){case 1:if(!e.g){t.A(2);break}return t.g(e.g.destroy(),2);case 2:if(!e.h){t.A(4);break}return t.g(e.h.destroy(),4);case 4:if(!e.i){t.A(6);break}return t.g(e.i.destroy(),6);case 6:if(!e.j){t.A(8);break}return t.g(e.j.destroy(),8);case 8:return e.l&&e.l.close(),t.g(B3(),10);case 10:return e.l=null,e.g=null,e.h=null,e.i=null,e.j=null,t.g(e.init(),0)}})};function B3(){var e=new zn,t=R.indexedDB.deleteDatabase("shaka_offline_db");return t.onblocked=function(){},t.onsuccess=function(){e.resolve()},t.onerror=function(n){e.reject(new fe(2,9,9001,t.error)),n.preventDefault()},e}var eh=5;be("shaka.offline.indexeddb.StorageMechanismOpenTimeout",eh),rE("idb",function(){return ct().yh()?new oE:null});function Gs(e,t,n,r){this.g=e,this.i=t,this.h=n,this.l=r,this.j=["offline:",e,"/",t,"/",n,"/",r].join("")}Gs.prototype.Jb=function(){return this.i},Gs.prototype.cb=function(){return this.h},Gs.prototype.key=function(){return this.l},Gs.prototype.toString=function(){return this.j};function mm(e){if(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e),e==null)return null;var t=e[1];if(t!="manifest"&&t!="segment")return null;var n=e[2];if(!n)return null;var r=e[3];return r&&t!=null?new Gs(t,n,r,Number(e[4])):null}function sE(e,t){this.h=e,this.g=t}function aE(e,t){var n=new Lt(null,0);n.ub(t.duration);var r=t.streams.filter(function(l){return l.type=="audio"}),i=t.streams.filter(function(l){return l.type=="video"});r=V3(e,r,i,n),i=t.streams.filter(function(l){return l.type==Bt}).map(function(l){return th(e,l,n)});var o=t.streams.filter(function(l){return l.type=="image"}).map(function(l){return th(e,l,n)}),s=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var a=d(r.values()),u=a.next();!u.done;u=a.next())u=u.value,u.audio&&u.audio.encrypted&&(u.audio.drmInfos=s),u.video&&u.video.encrypted&&(u.video.drmInfos=s);return{presentationTimeline:n,offlineSessionIds:t.sessionIds,variants:Array.from(r.values()),textStreams:i,imageStreams:o,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null,nextUrl:null,periodCount:1,gapCount:0,isLowLatency:!1,startTime:null}}function V3(e,t,n,r){for(var i=new Set,o=d(t),s=o.next();!s.done;s=o.next()){s=d(s.value.variantIds);for(var a=s.next();!a.done;a=s.next())i.add(a.value)}for(o=d(n),s=o.next();!s.done;s=o.next())for(s=d(s.value.variantIds),a=s.next();!a.done;a=s.next())i.add(a.value);for(o=new Map,i=d(i),s=i.next();!s.done;s=i.next())s=s.value,o.set(s,{id:s,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=d(t),i=t.next();!i.done;i=t.next())for(s=i.value,i=th(e,s,r),s=d(s.variantIds),a=s.next();!a.done;a=s.next())a=o.get(a.value),a.language=i.language,a.primary=a.primary||i.primary,a.audio=i;for(n=d(n),t=n.next();!t.done;t=n.next())for(i=t.value,t=th(e,i,r),i=d(i.variantIds),s=i.next();!s.done;s=i.next())s=o.get(s.value),s.primary=s.primary||t.primary,s.video=t;return o}function th(e,t,n){var r=t.segments.map(function(i){return _3(e,i,t)});return n.ee(r),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new wn(r),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,colorGamut:t.colorGamut,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,mssPrivateData:t.mssPrivateData,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching,fullMimeTypes:new Set([ar(t.mimeType,t.codecs)]),isAudioMuxedInVideo:t.isAudioMuxedInVideo||!1,baseOriginalId:null}}function _3(e,t,n){var r=new Gs("segment",e.h,e.g,t.dataKey);return e=new kt(t.startTime,t.endTime,function(){return[r.toString()]},0,null,t.initSegmentKey!=null?H3(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||""),e.mimeType=t.mimeType||n.mimeType||"",e.codecs=t.codecs||n.codecs||"",t.thumbnailSprite&&e.Hf(t.thumbnailSprite),e}function H3(e,t){var n=new Gs("segment",e.h,e.g,t);return new Zi(function(){return[n.toString()]},0,null)}function uE(){this.g=null}f=uE.prototype,f.configure=function(){},f.start=function(e,t){var n=this,r,i,o,s,a,u,l;return G(function(h){switch(h.h){case 1:if(r=mm(e),n.g=r,r==null||r.g!="manifest")throw new fe(2,1,9004,e);return i=new to,h.D(2),h.g(i.init(),4);case 4:return h.g(Zd(i,r.Jb(),r.cb()),5);case 5:return o=h.i,h.g(o.getManifests([r.key()]),6);case 6:return s=h.i,a=s[0],u=new sE(r.Jb(),r.cb()),l=aE(u,a),t.makeTextStreamsForClosedCaptions(l),h.return(l);case 2:return h.u(),h.g(i.destroy(),7);case 7:h.B(0)}})},f.stop=function(){return Promise.resolve()},f.update=function(){},f.onExpirationUpdated=function(e,t){var n=this,r,i,o,s,a,u,l;return G(function(h){switch(h.h){case 1:return r=n.g,i=new to,h.m(2,3),h.g(i.init(),5);case 5:return h.g(Zd(i,r.Jb(),r.cb()),6);case 6:return o=h.i,h.g(o.getManifests([r.key()]),7);case 7:if(s=h.i,a=s[0],u=a.sessionIds.includes(e),l=a.expiration==null||a.expiration>t,!u||!l){h.A(3);break}return h.g(o.updateManifestExpiration(r.key(),t),3);case 3:return h.u(),h.g(i.destroy(),10);case 10:h.B(0);break;case 2:h.l(),h.A(3)}})},f.onInitialVariantChosen=function(){},f.banLocation=function(){},f.setMediaElement=function(){},Vi("application/x-offline-manifest",function(){return new uE});function lE(){}function cE(e,t){var n=mm(e);return n&&n.g=="manifest"?(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"},originalRequest:t},e=Fu(e)):e=n&&n.g=="segment"?G3(n.key(),n,t):ba(new fe(2,1,9004,e)),e}function G3(e,t,n){var r=new to;return Fu(void 0).Xa(function(){return r.init()}).Xa(function(){return Zd(r,t.Jb(),t.cb())}).Xa(function(i){return i.getSegments([t.key()])}).Xa(function(i){return{uri:t,data:i[0].data,headers:{},originalRequest:n}}).finally(function(){return r.destroy()})}be("shaka.offline.OfflineScheme",lE),lE.plugin=cE,sa("offline",cE);function fE(e,t,n){var r,i,o,s,a,u;return G(function(l){switch(l.h){case 1:r=[];for(var h=[],g=d(n),m=g.next();!m.done;m=g.next()){m=m.value;for(var S=!1,A=d(h),k=A.next();!k.done;k=A.next())if(k=k.value,W3(k.info,m)){k.sessionIds.push(m.sessionId),S=!0;break}S||h.push({info:m,sessionIds:[m.sessionId]})}i=d(h),o=i.next();case 2:if(o.done){l.A(4);break}return s=o.value,a=K3(e,t,s),l.g(a,5);case 5:u=l.i,r=r.concat(u),o=i.next(),l.A(2);break;case 4:return l.return(r)}})}function K3(e,t,n){var r,i;return G(function(o){switch(o.h){case 1:return r=new mf({nc:t,onError:function(){},vf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o.m(2),r.configure(e),o.g(TA(r,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:o.o(3);break;case 2:return o.l(),o.g(r.destroy(),5);case 5:return o.return([]);case 3:return i=[],o.g(Promise.all(n.sessionIds.map(function(s){return G(function(a){if(a.h==1)return a.m(2),a.g(wA(r,s),4);if(a.h!=2)return i.push(s),a.o(0);a.l(),a.j()})})),6);case 6:return o.g(r.destroy(),7);case 7:return o.return(i)}})}function W3(e,t){function n(r,i){return r.robustness==i.robustness&&r.contentType==i.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&Sn(e.audioCapabilities,t.audioCapabilities,n)&&Sn(e.videoCapabilities,t.videoCapabilities,n)}function z3(e,t,n){var r=t.presentationTimeline.getDuration();return t=dE(t),{offlineUri:null,originalManifestUri:e,duration:r,size:0,expiration:1/0,tracks:t,appMetadata:n,isIncomplete:!1}}function vm(e,t){var n=aE(new sE(e.Jb(),e.cb()),t),r=t.appMetadata||{};return n=dE(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r,isIncomplete:t.isIncomplete||!1}}function dE(e){var t=[],n=ju(e.variants);n=d(n);for(var r=n.next();!r.done;r=n.next())t.push(mt(r.value));for(e=d(e.textStreams),n=e.next();!n.done;n=e.next())t.push(ur(n.value));return t}function $3(){this.g=new Map}function X3(e,t){var n=t.audio,r=t.video;if(n&&!r&&e.g.set(n.id,n.bandwidth||t.bandwidth),!n&&r&&e.g.set(r.id,r.bandwidth||t.bandwidth),n&&r){var i=n.bandwidth||393216,o=r.bandwidth||t.bandwidth-i;o<=0&&(o=t.bandwidth),e.g.set(n.id,i),e.g.set(r.id,o)}}function Y3(e,t){e.g.set(t.id,t.bandwidth||2048)}function hE(e,t){return e=e.g.get(t),e==null&&(e=0),e}function ui(e){var t=this;if(e&&e.constructor!=Re)throw new fe(2,9,9008);this.g=this.h=null,e?(this.h=e.g,this.g=e.Rb()):(this.h=rl(),this.g=new lr,this.g.configure(this.h.networking)),this.i=[],this.l=[];var n=!e;this.j=new Bu(function(){var r,i,o,s,a;return G(function(u){switch(u.h){case 1:return u.g(Promise.all(t.l.map(function(l){return dm(l)})),2);case 2:for(r=function(){},i=[],o=d(t.i),s=o.next();!s.done;s=o.next())a=s.value,i.push(a.then(r,r));return u.g(Promise.all(i),3);case 3:if(!n){u.A(4);break}return u.g(t.g.destroy(),4);case 4:t.h=null,t.g=null,u.j()}})}),this.m=1e9}function ym(){if(Hs(ct()))e:{for(var e=d(Uc.values()),t=e.next();!t.done;t=e.next())if(t=t.value,t=t()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}f=ui.prototype,f.destroy=function(){return this.j.destroy()},f.configure=function(e,t){return arguments.length==2&&typeof e=="string"&&(e=Gf(e,t)),da(this.h,e)},f.getConfiguration=function(){var e=rl();return da(e,this.h,rl()),e},f.Rb=function(){return this.g},f.store=function(e,t,n,r,i){var o=this,s=this.getConfiguration(),a=new fm(this.g);return this.l.push(a),t=J3(this,e,t||{},r||[],i||[],function(){var u;return G(function(l){return l.h==1?n?l.A(2):l.g(qu(e,o.g,s.manifest.retryParameters),3):(l.h!=2&&(n=l.i),u=Aa(e,n||null),l.return(u()))})},s,a),t=new br(t,function(){return dm(a)}),t.finally(function(){$t(o.l,a)}),dk(this,t)};function J3(e,t,n,r,i,o,s,a){var u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce;return G(function(ke){switch(ke.h){case 1:return nh(),l=u=null,h=new to,S=m=g=null,ke.m(2,3),ke.g(o(),5);case 5:return u=ke.i,ke.g(ok(e,t,u,s),6);case 6:if(A=ke.i,Co(e),k=!A.presentationTimeline.U()&&!A.presentationTimeline.Oc(),!k)throw new fe(2,9,9005,t);b=d(r),V=b.next();case 7:if(V.done){ke.A(9);break}return B=V.value,ke.g(sk(e,B,A),10);case 10:Z=ke.i,A.imageStreams.push(Z),Co(e),V=b.next(),ke.A(7);break;case 9:ae=d(i),pe=ae.next();case 11:return pe.done?(ey(s.drm.clearKeys,A.variants),ie=A.variants.some(function(Ge){if(Ge.audio){for(var Je=d(Ge.audio.drmInfos),Ft=Je.next();!Ft.done;Ft=Je.next())if(Ft.value.licenseServerUri.startsWith("data:"))return!0}if(Ge.video){for(Ge=d(Ge.video.drmInfos),Je=Ge.next();!Je.done;Je=Ge.next())if(Je.value.licenseServerUri.startsWith("data:"))return!0}return!1}),ye=s.offline.usePersistentLicense,ie&&(ye=!1),ke.g(e.dd(A,function(Ge){S=S||Ge},s,ye),15)):(te=pe.value,ke.g(ak(e,A,te.uri,te.language,te.kind,te.mime,te.codecs),14));case 14:le=ke.i,A.textStreams.push(le),Co(e),pe=ae.next(),ke.A(11);break;case 15:if(l=ke.i,Co(e),S)throw S;return ke.g(Z3(A,l,s,ye),16);case 16:return ke.g(h.init(),17);case 17:return Co(e),ke.g(nE(h),18);case 18:return g=ke.i,Co(e),ce=q3(l,A,t,n,s,a,ye),Ee=ce.tk,Se=ce.Dh,ke.g(g.cb.addManifests([Ee]),19);case 19:if(Ve=ke.i,Co(e),m=Ve[0],Co(e),S)throw S;return ke.g(Q3(e,Se,m,Ee,a,s,g.cb,A,l,ye),20);case 20:return Co(e),vE(A,Ee,l,ye),ke.g(g.cb.updateManifest(m,Ee),21);case 21:return Co(e),Le=new Gs("manifest",g.path.Jb,g.path.cb,m),ke.return(vm(Le,Ee));case 3:return ke.u(),ke.g(h.destroy(),22);case 22:if(!u){ke.A(23);break}return ke.g(u.stop(),23);case 23:if(!l){ke.A(25);break}return ke.g(l.destroy(),25);case 25:ke.B(0);break;case 2:if(Ce=ke.l(),m==null){ke.A(27);break}return ke.g(pE(m),27);case 27:throw S||Ce}})}function Q3(e,t,n,r,i,o,s,a,u,l){var h,g,m,S,A,k,b,V,B,Z,ae;return G(function(pe){switch(pe.h){case 1:if(h={},g=0,m=function(){if(e.j.g||i.l)throw new fe(2,9,7001)},S=function(te,le){var ie,ye,ce,Ee,Se,Ve,Le,Ce,ke;return G(function(Ge){if(Ge.h==1){for(ie=d(te),ye=ie.next(),ce={};!ye.done;ce={hc:void 0},ye=ie.next())ce.hc=ye.value,m(),Ee=I3(ce.hc,o),Se=ce.hc.i,Ve=ce.hc.h,Le=function(Je){return function(Ft){var dt,kn,Ut,Gn;return G(function(sn){switch(sn.h){case 1:if(dt=Je.hc.g,kn=dt.Ub(!1),!dt.aesKey||kn){sn.A(2);break}return sn.g(yp(Ft,dt.aesKey,Je.hc.j),3);case 3:Ft=sn.i;case 2:return Ut=cm(dt),sn.g(s.addSegments([{data:Ft}]),4);case 4:Gn=sn.i,m(),h[Ut]=Gn[0],g+=Ft.byteLength,sn.j()}})}}(ce),Ce=ce.hc.g,(ke=Ce.Ub(!1))?M3(i,ce.hc.groupId,ke,Se,Ve,Le):i.queue(ce.hc.groupId,Ee,Se,Ve,Le);return Ge.g(P3(i),2)}return m(),!le||i.l?Ge.A(0):(vE(a,r,u,l),Ge.g(s.updateManifest(n,r),0))})},A=!1,pe.m(2),!Sm(a)||!A||mE(a)){pe.A(4);break}return pe.g(S(t.filter(function(te){return te.h}),!0),5);case 5:return m(),t=t.filter(function(te){return!te.h}),k=h,b=g,h={},g=0,pe.g(gE(s,n,r,k,b,function(){return Co(e)}),6);case 6:m();case 4:if(A){pe.A(7);break}return pe.g(S(t,!1),8);case 8:return m(),V=h,B=g,h={},g=0,pe.g(gE(s,n,r,V,B,function(){return m()}),9);case 9:m();case 7:pe.o(0);break;case 2:return Z=pe.l(),ae=Object.values(h),pe.g(s.removeSegments(ae,function(){}),10);case 10:throw Z}})}function pE(e){var t,n,r,i;return G(function(o){switch(o.h){case 1:return t=new to,o.g(t.init(),2);case 2:return o.g(nE(t),3);case 3:return n=o.i,r=new Gs("manifest",n.path.Jb,n.path.cb,e),o.g(t.destroy(),4);case 4:return i=new ui,o.g(i.remove(r.toString()),0)}})}function gE(e,t,n,r,i,o){var s,a,u,l,h,g,m,S,A,k,b;return G(function(V){switch(V.h){case 1:for(s=!1,V.m(2),a=!0,u=d(n.streams),l=u.next();!l.done;l=u.next())for(h=l.value,g=d(h.segments),m=g.next();!m.done;m=g.next())S=m.value,A=S.pendingSegmentRefId?r[S.pendingSegmentRefId]:null,A!=null&&(S.dataKey=A,S.pendingSegmentRefId=void 0),A=S.pendingInitSegmentRefId?r[S.pendingInitSegmentRefId]:null,A!=null&&(S.initSegmentKey=A,S.pendingInitSegmentRefId=void 0),S.pendingSegmentRefId&&(a=!1),S.pendingInitSegmentRefId&&(a=!1);return n.size+=i,a&&(n.isIncomplete=!1),V.g(e.updateManifest(t,n),4);case 4:s=!0,o(),V.o(0);break;case 2:return k=V.l(),V.g(pE(t),5);case 5:if(s){V.A(6);break}return b=Object.values(r),V.g(e.removeSegments(b,function(){}),6);case 6:throw k}})}function Z3(e,t,n,r){var i,o,s,a,u,l,h,g,m,S,A,k,b,V,B,Z,ae,pe,te,le,ie,ye,ce,Ee,Se,Ve,Le,Ce,ke,Ge;return G(function(Je){switch(Je.h){case 1:return i={width:1/0,height:1/0},ve(e,n.restrictions,i),Je.g(Ke(t,e,r,n.drm.preferredKeySystems,n.drm.keySystemsMapping),2);case 2:for(o=[],s=n.preferredDecodingAttributes,a=n.preferredVideoCodecs,u=n.preferredAudioCodecs,l=n.preferredTextFormats,X(e,a,u,s,l),h=d(e.variants),g=h.next();!g.done;g=h.next())m=g.value,o.push(mt(m));for(S=d(e.textStreams),A=S.next();!A.done;A=S.next())k=A.value,o.push(ur(k));for(b=d(e.imageStreams),V=b.next();!V.done;V=b.next())B=V.value,o.push(oi(B));return Je.g(n.offline.trackSelectionCallback(o),3);case 3:for(Z=Je.i,ae=e.presentationTimeline.getDuration(),pe=0,te=d(Z),le=te.next();!le.done;le=te.next())ie=le.value,ye=ie.bandwidth*ae/8,pe+=ye;return Je.m(4),Je.g(n.offline.downloadSizeCallback(pe),6);case 6:if(ce=Je.i,!ce)throw new fe(2,9,9014);Je.o(5);break;case 4:throw Ee=Je.l(),Ee instanceof fe?Ee:new fe(2,9,9015);case 5:for(Se=new Set,Ve=new Set,Le=new Set,Ce=d(Z),ke=Ce.next();!ke.done;ke=Ce.next())Ge=ke.value,Ge.type=="variant"&&Se.add(Ge.id),Ge.type=="text"&&Ve.add(Ge.id),Ge.type=="image"&&Le.add(Ge.id);e.variants=e.variants.filter(function(Ft){return Se.has(Ft.id)}),e.textStreams=e.textStreams.filter(function(Ft){return Ve.has(Ft.id)}),e.imageStreams=e.imageStreams.filter(function(Ft){return Le.has(Ft.id)}),gk(e),Je.j()}})}function q3(e,t,n,r,i,o,s){var a=z3(n,t,r),u=i.offline.progressCallback;C3(o,function(A,k){a.size=k,u(a,A)},function(A,k){l&&s&&h==k&&_l(e,"cenc",A)});var l=Sm(t)&&!mE(t),h=null;l&&(h=mk.get(e.g.keySystem));for(var g=new $3,m=d(t.textStreams),S=m.next();!S.done;S=m.next())g.g.set(S.value.id,52);for(m=d(t.imageStreams),S=m.next();!S.done;S=m.next())Y3(g,S.value);for(m=d(t.variants),S=m.next();!S.done;S=m.next())X3(g,S.value);return o=lk(o,g,t,i),i=o.streams,o=o.Dh,(g=e.g)&&s&&(g.initData=[]),{tk:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.Td(),streams:i,sessionIds:s?$v(e):[],drmInfo:g,appMetadata:r,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},Dh:o}}function Sm(e){return e.variants.some(function(t){var n=t.audio&&t.audio.encrypted;return t.video&&t.video.encrypted||n})}function mE(e){return e.variants.some(function(t){return(t.video?t.video.drmInfos:[]).concat(t.audio?t.audio.drmInfos:[]).some(function(n){return n.initData&&n.initData.length})})}function vE(e,t,n,r){if(t.expiration=n.Td(),n=$v(n),t.sessionIds=r?n:[],Sm(e)&&r&&!n.length)throw new fe(2,9,9007)}f.remove=function(e){return Tm(this,ek(this,e))};function ek(e,t){var n,r,i,o,s,a;return G(function(u){switch(u.h){case 1:if(nh(),n=mm(t),n==null||n.g!="manifest")throw new fe(2,9,9004,t);return r=n,i=new to,u.D(2),u.g(i.init(),4);case 4:return u.g(Zd(i,r.Jb(),r.cb()),5);case 5:return o=u.i,u.g(o.getManifests([r.key()]),6);case 6:return s=u.i,a=s[0],u.g(Promise.all([tk(e,a,i),nk(o,r,a)]),2);case 2:return u.u(),u.g(i.destroy(),8);case 8:u.B(0)}})}function yE(e,t){for(var n=[],r=d(e.streams),i=r.next();!i.done;i=r.next())i=i.value,t&&i.type=="video"?n.push({contentType:ar(i.mimeType,i.codecs),robustness:e.drmInfo.videoRobustness}):t||i.type!="audio"||n.push({contentType:ar(i.mimeType,i.codecs),robustness:e.drmInfo.audioRobustness});return n}function tk(e,t,n){return G(function(r){return r.g(pk(e.g,e.h.drm,n,t),0)})}function nk(e,t,n){function r(){}var i=hk(n);return vm(t,n),Promise.all([e.removeSegments(i,r),e.removeManifests([t.key()],r)])}f.Ok=function(){return Tm(this,rk(this))};function rk(e){var t,n,r,i,o,s,a,u,l,h;return G(function(g){switch(g.h){case 1:return nh(),t=e.g,n=e.h.drm,r=new to,i=!1,g.D(2),g.g(r.init(),4);case 4:o=[],O3(r,function(m){return o.push(m)}),s=d(o),a=s.next();case 5:if(a.done){g.A(2);break}return u=a.value,g.g(u.getAll(),8);case 8:return l=g.i,g.g(fE(n,t,l),9);case 9:return h=g.i,g.g(u.remove(h),10);case 10:h.length!=l.length&&(i=!0),a=s.next(),g.A(5);break;case 2:return g.u(),g.g(r.destroy(),11);case 11:g.B(3);break;case 3:return g.return(!i)}})}f.list=function(){return Tm(this,ik())};function ik(){var e,t,n;return G(function(r){switch(r.h){case 1:return nh(),e=[],t=new to,r.D(2),r.g(t.init(),4);case 4:return n=Promise.resolve(),R3(t,function(i,o){n=n.then(function(){var s;return G(function(a){if(a.h==1)return a.g(o.getAllManifests(),2);s=a.i,s.forEach(function(u,l){u=vm(new Gs("manifest",i.Jb,i.cb,l),u),e.push(u)}),a.j()})})}),r.g(n,2);case 2:return r.u(),r.g(t.destroy(),6);case 6:r.B(3);break;case 3:return r.return(e)}})}function ok(e,t,n,r){var i,o,s,a,u;return G(function(l){if(l.h==1)return i=null,o=e.g,s={networkingEngine:o,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(h){i=h},isLowLatencyMode:function(){return!1},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return r.abr.defaultBandwidthEstimate},onMetadata:function(){},disableStream:function(){},addFont:function(){}},n.configure(r.manifest),Co(e),l.g(n.start(t,s),2);if(l.h!=3)return a=l.i,Co(e),u=TE(a),l.g(Promise.all(Uh(u,function(h){return h.createSegmentIndex()})),3);if(Co(e),i)throw i;return l.return(a)})}function sk(e,t,n){var r,i,o,s,a,u,l,h,g,m,S,A,k,b,V;return G(function(B){switch(B.h){case 1:return B.g(SE(e,t),2);case 2:if(r=B.i,r!="text/vtt")throw new fe(1,2,2017,t);return B.g(uk(t,e.g,e.h.streaming.retryParameters),3);case 3:if(i=B.i,o=au(r),!o)throw new fe(2,2,2014,r);for(s=o(),a={periodStart:0,segmentStart:0,segmentEnd:n.presentationTimeline.getDuration(),vttOffset:0},u=xt(i),l=s.parseMedia(u,a,t,[]),h=[],g=d(l),m=g.next(),S={};!m.done;S={Qf:void 0,fd:void 0},m=g.next())S.fd=m.value,S.Qf=null,A=function(Z){return function(){return Z.Qf==null&&(Z.Qf=kr([t],[Z.fd.payload])),Z.Qf||[]}}(S),k=new kt(S.fd.startTime,S.fd.endTime,A,0,null,null,0,0,1/0),S.fd.payload.includes("#xywh")&&(b=S.fd.payload.split("#xywh=")[1].split(","),b.length===4&&k.Hf({height:parseInt(b[3],10),positionX:parseInt(b[0],10),positionY:parseInt(b[1],10),width:parseInt(b[2],10)})),h.push(k);if(V=r,!h.length){B.A(4);break}return B.g(qu(h[0].R()[0],e.g,e.h.manifest.retryParameters),5);case 5:V=B.i;case 4:return B.return({id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new wn(h),mimeType:V||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:"image",primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ar(V||"","")]),isAudioMuxedInVideo:!1,baseOriginalId:null})}})}function ak(e,t,n,r,i,o,s){var a,u,l;return G(function(h){if(h.h==1)return o?h.A(2):h.g(SE(e,n),3);if(h.h!=2&&(o=h.i),a={id:e.m++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:kf(0,t.presentationTimeline.getDuration(),[n]),mimeType:o||"",codecs:s||"",kind:i,encrypted:!1,drmInfos:[],keyIds:new Set,language:r,originalLanguage:r,label:null,type:Bt,primary:!1,trickModeVideo:null,dependencyStream:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1,fullMimeTypes:new Set([ar(o||"",s||"")]),isAudioMuxedInVideo:!1,baseOriginalId:null},u=ar(a.mimeType,a.codecs),l=uu(u),!l)throw new fe(2,2,2014,o);return h.return(a)})}function SE(e,t){var n;return G(function(r){switch(r.h){case 1:return r.m(2),r.g(qu(t,e.g,e.h.streaming.retryParameters),4);case 4:n=r.i,r.o(3);break;case 2:r.l();case 3:if(n)return r.return(n);throw new fe(1,2,2011,t)}})}function uk(e,t,n){var r,i,o;return G(function(s){return s.h==1?(r=Ho,i=jr([e],n),i.method="GET",s.g(t.request(r,i).promise,2)):(o=s.i,s.return(o.data))})}f.dd=function(e,t,n,r){var i=this,o;return G(function(s){return s.h==1?(o=new mf({nc:i.g,onError:t,vf:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),o.configure(n.drm),s.g(SA(o,e.variants,r),2)):s.h!=3?s.g(zv(o),3):s.return(o)})};function lk(e,t,n,r){var i=new Map,o=TE(n),s=new Map;o=d(o);for(var a=o.next();!a.done;a=o.next()){a=a.value;var u=ck(e,t,n,a,r,i);s.set(a.id,u)}for(e=d(n.variants),t=e.next();!t.done;t=e.next())t=t.value,t.audio&&s.get(t.audio.id).variantIds.push(t.id),t.video&&s.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(s.values()),Dh:Array.from(i.values())}}function ck(e,t,n,r,i,o){var s={id:r.id,originalId:r.originalId,groupId:r.groupId,primary:r.primary,type:r.type,mimeType:r.mimeType,codecs:r.codecs,frameRate:r.frameRate,pixelAspectRatio:r.pixelAspectRatio,hdr:r.hdr,colorGamut:r.colorGamut,videoLayout:r.videoLayout,kind:r.kind,language:r.language,originalLanguage:r.originalLanguage,label:r.label,width:r.width||null,height:r.height||null,encrypted:r.encrypted,keyIds:r.keyIds,segments:[],variantIds:[],roles:r.roles,forced:r.forced,channelsCount:r.channelsCount,audioSamplingRate:r.audioSamplingRate,spatialAudio:r.spatialAudio,closedCaptions:r.closedCaptions,tilesLayout:r.tilesLayout,mssPrivateData:r.mssPrivateData,external:r.external,fastSwitching:r.fastSwitching,isAudioMuxedInVideo:r.isAudioMuxedInVideo},a=i.offline.numberOfParallelDownloads,u=a===0?r.id:0;return fk(r,n.presentationTimeline.Db(),function(l,h){var g=cm(l),m=void 0;if(!o.has(g)){var S=l.endTime-l.startTime;S=hE(t,r.id)*S,S=QT(e.g,S),o.set(g,new YT(l,S,u,!1,h))}l.ea&&(m=cm(l.ea),o.has(m)||(S=hE(t,r.id)*.5,S=QT(e.g,S),o.set(m,new YT(l.ea,S,u,!0,h)))),s.segments.push({pendingInitSegmentRefId:m,initSegmentKey:m?0:null,startTime:l.startTime,endTime:l.endTime,appendWindowStart:l.appendWindowStart,appendWindowEnd:l.appendWindowEnd,timestampOffset:l.timestampOffset,tilesLayout:l.tilesLayout,pendingSegmentRefId:g,dataKey:0,mimeType:l.mimeType,codecs:l.codecs,thumbnailSprite:l.thumbnailSprite}),a!==0&&(u=(u+1)%a)}),s}function fk(e,t,n){if(t=e.segmentIndex.find(t),t!=null)for(var r=e.segmentIndex.get(t);r;)n(r,t),r=e.segmentIndex.get(++t)}function Co(e){if(e.j.g)throw new fe(2,9,7001)}function nh(){if(!ym())throw new fe(2,9,9e3)}function Tm(e,t){return G(function(n){return n.h==1?(e.i.push(t),n.D(2),n.g(t,4)):n.h!=2?n.return(n.i):(n.u(),$t(e.i,t),n.B(0))})}function dk(e,t){var n=t.promise;return e.i.push(n),t.finally(function(){$t(e.i,n)})}function hk(e){var t=new Set;e=d(e.streams);for(var n=e.next();!n.done;n=e.next()){n=d(n.value.segments);for(var r=n.next();!r.done;r=n.next())r=r.value,r.initSegmentKey!=null&&t.add(r.initSegmentKey),t.add(r.dataKey)}return Array.from(t)}function pk(e,t,n,r){var i,o,s;return G(function(a){return a.h==1?r.drmInfo?(i=D3(n),o=r.sessionIds.map(function(u){return{sessionId:u,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:yE(r,!1),videoCapabilities:yE(r,!0)}}),a.g(fE(t,e,o),2)):a.return():a.h!=3?(s=a.i,a.g(i.remove(s),3)):a.g(i.add(o.filter(function(u){return!s.includes(u.sessionId)})),0)})}function TE(e){for(var t=new Set,n=d(e.variants),r=n.next();!r.done;r=n.next())r=r.value,r.audio&&t.add(r.audio),r.video&&t.add(r.video);for(n=d(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(e=d(e.imageStreams),n=e.next();!n.done;n=e.next())t.add(n.value);return t}function gk(e){e.variants.map(function(o){return o.video});var t=new Set(e.variants.map(function(o){return o.audio}));e=e.textStreams;for(var n=d(t),r=n.next();!r.done;r=n.next()){r=d(t);for(var i=r.next();!i.done;i=r.next());}for(t=d(e),n=t.next();!n.done;n=t.next())for(n=d(e),r=n.next();!r.done;r=n.next());}be("shaka.offline.Storage",ui),ui.deleteAll=function(){var e;return G(function(t){return t.h==1?(e=new to,t.D(2),t.g(N3(e),2)):t.h!=5?(t.u(),t.g(e.destroy(),5)):t.B(0)})},ui.prototype.list=ui.prototype.list,ui.prototype.removeEmeSessions=ui.prototype.Ok,ui.prototype.remove=ui.prototype.remove,ui.prototype.store=ui.prototype.store,ui.prototype.getNetworkingEngine=ui.prototype.Rb,ui.prototype.getConfiguration=ui.prototype.getConfiguration,ui.prototype.configure=ui.prototype.configure,ui.prototype.destroy=ui.prototype.destroy,ui.support=ym;var mk=new Map().set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.huawei.wiseplay","3d5e6d359b9a41e8b843dd3c6e72c42c");Q0("offline",ym);function no(){}function Mo(e,t){for(e={priority:t||0,callback:e},t=0;t<Vc.length;t++)if(Vc[t].priority<e.priority){Vc.splice(t,0,e);return}Vc.push(e)}be("shaka.polyfill",no),no.register=Mo,no.installAll=function(){for(var e=d(Vc),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(n){ut("Error installing polyfill!",n)}}};var Vc=[];function rh(e,t,n){this.g=e,this.i=t||null,this.h=n||null,this.keySystem=e.keySystem}rh.prototype.getConfiguration=function(){var e=this.g.getConfiguration();if(e.videoCapabilities)for(var t=d(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.i;if(e.audioCapabilities)for(t=d(e.audioCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.h;return e},rh.prototype.createMediaKeys=function(){return this.g.createMediaKeys()};function EE(e){return Eo(e)?"cbcs":Os(e)||To(e)||Fi(e)||e==="com.huawei.wiseplay"?"cenc":(ut("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function xE(e){if(!e)return!1;e=e.getConfiguration();var t=e.audioCapabilities&&e.audioCapabilities[0];return!!((e=e.videoCapabilities&&e.videoCapabilities[0]||t)&&e.encryptionScheme!==void 0)}function Em(e,t){return!!(!e||e==t||(e=="cbcs"||e=="cbcs-1-9")&&ct().Wc())}function wE(){}var _c;function AE(){ct().Jf()&&!_c&&!navigator.emeEncryptionSchemePolyfilled&&navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration&&(_c=navigator.requestMediaKeySystemAccess,navigator.requestMediaKeySystemAccess=vk,navigator.emeEncryptionSchemePolyfilled=!0)}function vk(e,t){var n=this,r;return G(function(i){return i.h==1?i.g(_c.call(n,e,t),2):(r=i.i,xE(r)?(navigator.requestMediaKeySystemAccess=_c,i.return(r)):(navigator.requestMediaKeySystemAccess=IE,i.return(IE.call(n,e,t))))})}function IE(e,t){var n=this,r,i,o,s,a,u,l,h,g,m,S,A;return G(function(k){if(k.h==1){for(r=EE(e),i=[],o=d(t),s=o.next();!s.done;s=o.next())a=s.value,u=CE(a.videoCapabilities,r),l=CE(a.audioCapabilities,r),a.videoCapabilities&&a.videoCapabilities.length&&!u.length||a.audioCapabilities&&a.audioCapabilities.length&&!l.length||(h=Object.assign({},a),h.videoCapabilities=u,h.audioCapabilities=l,i.push(h));if(!i.length)throw g=Error("Unsupported keySystem or supportedConfigurations."),g.name="NotSupportedError",g.code=DOMException.NOT_SUPPORTED_ERR,g;return k.g(_c.call(n,e,i),2)}return m=k.i,A=S=null,i[0]&&(i[0].videoCapabilities&&(S=i[0].videoCapabilities[0].encryptionScheme),i[0].audioCapabilities&&(A=i[0].audioCapabilities[0].encryptionScheme)),k.return(new rh(m,S,A))})}function CE(e,t){return e&&e.filter(function(n){return Em(n.encryptionScheme,t)})}no.EmeEncryptionScheme=wE,wE.install=AE,Mo(AE);function ME(){}var Hc;function PE(){ct().Jf()&&!Hc&&!navigator.mediaCapabilitiesEncryptionSchemePolyfilled&&navigator.mediaCapabilities&&(Hc=navigator.mediaCapabilities.decodingInfo,navigator.mediaCapabilities.decodingInfo=yk,navigator.mediaCapabilitiesEncryptionSchemePolyfilled=!0)}function yk(e){var t=this,n,r;return G(function(i){switch(i.h){case 1:return i.g(Hc.call(t,e),2);case 2:if(n=i.i,!n.supported||!e.keySystemConfiguration)return i.return(n);if(r=n.keySystemAccess,xE(r))return navigator.mediaCapabilities.decodingInfo=Hc,i.return(n);if(navigator.mediaCapabilities.decodingInfo=kE,r){i.A(3);break}return i.g(bE(e),4);case 4:return n.keySystemAccess=i.i,i.return(n);case 3:return i.return(kE.call(t,e))}})}function kE(e){var t=this,n,r,i,o,s,a,u;return G(function(l){switch(l.h){case 1:return r=n=null,!e.keySystemConfiguration||(i=e.keySystemConfiguration,o=i.keySystem,r=i.audio&&i.audio.encryptionScheme,n=i.video&&i.video.encryptionScheme,s=EE(o),a={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},Em(r,s)&&Em(n,s))?l.g(Hc.call(t,e),2):l.return(a);case 2:if(u=l.i,u.keySystemAccess){u.keySystemAccess=new rh(u.keySystemAccess,n,r),l.A(3);break}if(!e.keySystemConfiguration){l.A(3);break}return l.g(bE(e),5);case 5:u.keySystemAccess=l.i;case 3:return l.return(u)}})}function bE(e){var t,n;return G(function(r){if(r.h==1){var i=e.keySystemConfiguration,o=[],s=[];return i.audio&&o.push({robustness:i.audio.robustness||"",contentType:e.audio.contentType,encryptionScheme:i.audio.encryptionScheme}),i.video&&s.push({robustness:i.video.robustness||"",contentType:e.video.contentType,encryptionScheme:i.video.encryptionScheme}),i={initDataTypes:i.initDataType?[i.initDataType]:[],distinctiveIdentifier:i.distinctiveIdentifier,persistentState:i.persistentState,sessionTypes:i.sessionTypes},o.length&&(i.audioCapabilities=o),s.length&&(i.videoCapabilities=s),t=i,r.g(navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=r.i,r.return(n)})}no.MCapEncryptionScheme=ME,ME.install=PE,Mo(PE,-2);function ih(){}function RE(){ct().cc()||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),ih.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Sk)}function Sk(e){var t,n,r,i,o,s,a,u,l,h,g;return G(function(m){switch(m.h){case 1:if(t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},ct(),n=e.video,r=e.audio,e.type!="media-source"){if(e.type=="file"){if(n&&(i=n.contentType,o=yu().canPlayType(i)!="",!o)||r&&(s=r.contentType,a=yu().canPlayType(s)!="",!a))return m.return(t)}else return m.return(t);m.A(2);break}if(!Hs())return m.return(t);if(!n){m.A(3);break}return m.g(Tk(n),4);case 4:if(u=m.i,!u)return m.return(t);case 3:if(r){var S=ct().Pa(),A=r.contentType;if(S==="CAST"&&r.spatialRendering&&(A+="; spatialRendering=true"),l=Ni(A),!l)return m.return(t)}case 2:return e.keySystemConfiguration?(h=e.keySystemConfiguration,m.g(Ek(n,r,h),6)):(t.supported=!0,m.return(t));case 6:(g=m.i)&&(t.supported=!0,t.keySystemAccess=g);case 5:return m.return(t)}})}function Tk(e){var t,n,r;return G(function(i){return i.h==1?(t=ct(),n=t.Pa(),n!=="CAST"?i.A(2):i.g(xk(e),3)):i.h!=2?(r=i.i,i.return(r)):i.return(Ni(e.contentType))})}function Ek(e,t,n){var r,i,o,s,a,u,l,h,g,m,S,A;return G(function(k){switch(k.h){case 1:r=[],i=[],o=[],n.audio&&(s={robustness:n.audio.robustness||"",contentType:t.contentType},ct().wi()&&t.contentType.includes('codecs="ac-3"')&&(s.contentType='audio/mp4; codecs="ec-3"'),n.audio.encryptionScheme&&(s.encryptionScheme=n.audio.encryptionScheme,o.push(n.audio.encryptionScheme)),r.push(s)),n.video&&(a={robustness:n.video.robustness||"",contentType:e.contentType},n.video.encryptionScheme&&(a.encryptionScheme=n.video.encryptionScheme,o.push(n.video.encryptionScheme)),i.push(a)),u={initDataTypes:[n.initDataType],distinctiveIdentifier:n.distinctiveIdentifier,persistentState:n.persistentState,sessionTypes:n.sessionTypes},r.length&&(u.audioCapabilities=r),i.length&&(u.videoCapabilities=i),l=e?e.contentType:"",h=t?t.contentType:"",g=vi(l)+";"+Us(l),m=vi(h)+";"+Us(h),S=n.keySystem,A=null,k.m(2);var b=es(g,m,S,o);if(xo.has(b)){b=es(g,m,S,o),A=xo.get(b)||null,k.A(4);break}return k.g(navigator.requestMediaKeySystemAccess(n.keySystem,[u]),5);case 5:b=A=k.i;var V=es(g,m,S,o);xo.set(V,b);case 4:k.o(3);break;case 2:k.l();case 3:return k.return(A)}})}function xk(e){var t,n,r,i,o;return G(function(s){if(s.h==1){if(!(R.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return s.return(Ni(e.contentType));switch(t=e.contentType,e.width&&e.height&&e.width>1280&&e.height>720&&(t+="; width="+e.width+"; height="+e.height),e.framerate&&(n=Math.round(e.framerate),n<24||n>30)&&(t+="; framerate="+e.framerate),r=e.transferFunction||"",r){case"":case"srgb":break;case"pq":t+="; eotf=smpte2084";break;case"hlg":t+="; eotf=arib-std-b67";break;default:return s.return(!1)}return i=!1,o=wk,o.has(t)?(i=o.get(t),s.A(2)):s.g(cast.__platform__.canDisplayType(t),3)}return s.h!=2&&(i=s.i,o.set(t,i)),s.return(i)})}no.MediaCapabilities=ih,ih.install=RE,ih.originalMcap=null;var wk=new Map;Mo(RE,-1);function OE(){}function DE(){var e=ct(),t=e.Ia()==="WEBKIT"?e.Ca():null;for((R.MediaSource||R.ManagedMediaSource)&&t&&R.MediaSource&&(t<=12?(NE(),Ak()):t<=15&&NE()),e=d(e.Gi()),t=e.next();!t.done;t=e.next())Ck(t.value);(R.MediaSource||R.ManagedMediaSource)&&Ik(),R.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&Mk()}function NE(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,we.apply(0,arguments));return t.abort=function(){},t}}function Ak(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}function Ik(){if(R.MediaSource){var e=MediaSource.isTypeSupported.bind(MediaSource);MediaSource.isTypeSupported=function(n){return Ma(n)!="mp2t"&&e(n)}}if(R.ManagedMediaSource){var t=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);R.ManagedMediaSource.isTypeSupported=function(n){return Ma(n)!="mp2t"&&t(n)}}}function Ck(e){var t=MediaSource.isTypeSupported.bind(MediaSource);if(MediaSource.isTypeSupported=function(r){return Us(r)!=e&&t(r)},R.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported.bind(ManagedMediaSource);R.ManagedMediaSource.isTypeSupported=function(r){return Us(r)!=e&&n(r)}}}function Mk(){var e=MediaSource.isTypeSupported;ct().bj()&&(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),r=n.findIndex(function(s){return s.startsWith("codecs=")});if(r<0)return e(t);var i=n[r].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),o=i.findIndex(function(s){return s.startsWith("vp09")});return o>=0&&(i[o]="vp9",n[r]='codecs="'+i.join(",")+'"',t=n.join("; ")),e(t)})}no.MediaSource=OE,OE.install=DE,Mo(DE);function xm(){}var wm,Am,Im,Cm,Mm,Pm;function LE(e){R.HTMLVideoElement&&R.WebKitMediaKeys&&R.shakaMediaKeysPolyfill!=bm&&(e!==void 0&&e&&(wm=!0,Am=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Im=HTMLMediaElement.prototype.setMediaKeys,Cm=R.MediaKeys,Mm=R.MediaKeySystemAccess,Pm=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=kk,R.MediaKeys=Gc,R.MediaKeySystemAccess=oh,navigator.requestMediaKeySystemAccess=Pk,R.shakaMediaKeysPolyfill=bm,uf.clear(),xo.clear())}function Pk(e,t){try{var n=new oh(e,t);return Promise.resolve(n)}catch(r){return Promise.reject(r)}}function kk(e){var t=this.mediaKeys;return t&&t!=e&&jE(t,null),delete this.mediaKeys,(this.mediaKeys=e)?jE(e,this):Promise.resolve()}function bk(e){if(e=xt(e.initData),gr(e).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=Qi(e.subarray(4),!0),e=Ui(e);var t=new Event("encrypted");t.initDataType="skd",t.initData=Kr(e),this.dispatchEvent(t)}no.PatchedMediaKeysApple=xm,xm.uninstall=function(){R.shakaMediaKeysPolyfill==bm&&wm&&(wm=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Am),HTMLMediaElement.prototype.setMediaKeys=Im,R.MediaKeys=Cm,R.MediaKeySystemAccess=Mm,navigator.requestMediaKeySystemAccess=Pm,Am=Pm=Im=Mm=Cm=null,R.shakaMediaKeysPolyfill="",uf.clear(),xo.clear())},xm.install=LE;function oh(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(e=d(t),t=e.next();!t.done;t=e.next()){var n=t.value;if(n.persistentState=="required")t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var r=!1,i=!1;if(n.audioCapabilities)for(var o=d(n.audioCapabilities),s=o.next();!s.done;s=o.next())s=s.value,s.contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,s.contentType.split(";")[0])&&(t.audioCapabilities.push(s),i=!0));if(n.videoCapabilities)for(n=d(n.videoCapabilities),o=n.next();!o.done;o=n.next())o=o.value,o.contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.videoCapabilities.push(o),i=!0));r||(i=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=i?t:null}if(t){this.g=t;return}}throw e=Error("Unsupported keySystem"),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}oh.prototype.createMediaKeys=function(){var e=new Gc(this.keySystem);return Promise.resolve(e)},oh.prototype.getConfiguration=function(){return this.g};function Gc(e){this.h=new WebKitMediaKeys(e),this.g=new Et}Gc.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary")throw new TypeError("Session type "+e+" is unsupported on this platform.");return new km(this.h)},Gc.prototype.setServerCertificate=function(){return Promise.resolve(!1)};function jE(e,t){if(e.g.Ra(),!t)return Promise.resolve();e.g.F(t,"webkitneedkey",bk);try{return Zu(t,HTMLMediaElement.HAVE_METADATA,e.g,function(){t.webkitSetMediaKeys(e.h)}),Promise.resolve()}catch(n){return Promise.reject(n)}}Gc.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function km(e){_n.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new Et,this.sessionId="",this.expiration=NaN,this.closed=new zn,this.keyStatuses=new FE,this.onkeystatuseschange=null}P(km,_n),f=km.prototype,f.generateRequest=function(e,t){var n=this;this.h=new zn;try{var r=this.l.createSession("video/mp4",xt(t));this.i=r,this.sessionId=r.sessionId||"",this.j.F(this.i,"webkitkeymessage",function(i){n.h&&(n.h.resolve(),n.h=null),i=new Map().set("messageType",n.keyStatuses.Vb()==null?"license-request":"license-renewal").set("message",Kr(i.message)),i=new yt("message",i),n.dispatchEvent(i)}),this.j.F(r,"webkitkeyadded",function(){n.g&&(sh(n,"usable"),n.g.resolve(),n.g=null)}),this.j.F(r,"webkitkeyerror",function(){var i=Error("EME PatchedMediaKeysApple key error");if(i.errorCode=n.i.error,n.h!=null)n.h.reject(i),n.h=null;else if(n.g!=null)n.g.reject(i),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:sh(n,"output-not-allowed");break;default:sh(n,"internal-error")}}),sh(this,"status-pending")}catch(i){this.h.reject(i)}return this.h},f.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},f.update=function(e){this.g=new zn;try{this.i.update(xt(e))}catch(t){this.g.reject(t)}return this.g},f.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Ra()}catch(e){this.closed.reject(e)}return this.closed},f.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};function sh(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new yt("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}function FE(){this.size=0,this.g=void 0}f=FE.prototype,f.Vb=function(){return this.g},f.forEach=function(e){this.g&&e(this.g,so.value())},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=so.value();return!!(this.g&&Pr(e,t))},f.entries=function(){},f.keys=function(){},f.values=function(){};var bm="apple";Mo(function(){R.HTMLVideoElement&&R.WebKitMediaKeys&&(navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||LE())});function UE(){}function BE(){if(R.MediaKeys){var e=ct();MediaKeys.prototype.setServerCertificate&&e.oe()||(MediaKeys.prototype.setServerCertificate=Rk)}}function Rk(){return Promise.resolve(!1)}no.PatchedMediaKeysCert=UE,UE.install=BE,Mo(BE);function VE(){}function _E(){if(!(!R.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Lm="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Ok,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Dk,R.MediaKeys=Kc,R.MediaKeySystemAccess=ah,R.shakaMediaKeysPolyfill=Nk}}function Rm(e){var t=Lm;return t?t+e.charAt(0).toUpperCase()+e.slice(1):e}function Ok(e,t){try{var n=new ah(e,t);return Promise.resolve(n)}catch(r){return Promise.reject(r)}}function Dk(e){var t=this.mediaKeys;return t&&t!=e&&HE(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&HE(e,this),Promise.resolve()}no.PatchedMediaKeysWebkit=VE,VE.install=_E;function ah(e,t){this.g=this.keySystem=e;var n=!1;e=="org.w3.clearkey"&&(this.g="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video"),t=d(t);for(var o=t.next();!o.done;o=t.next()){o=o.value;var s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:o.initDataTypes,sessionTypes:["temporary"],label:o.label},a=!1;if(o.audioCapabilities)for(var u=d(o.audioCapabilities),l=u.next();!l.done;l=u.next())l=l.value,l.contentType&&(a=!0,i.canPlayType(l.contentType.split(";")[0],this.g)&&(s.audioCapabilities.push(l),r=!0));if(o.videoCapabilities)for(u=d(o.videoCapabilities),l=u.next();!l.done;l=u.next())l=l.value,l.contentType&&(a=!0,i.canPlayType(l.contentType,this.g)&&(s.videoCapabilities.push(l),r=!0));if(a||(r=i.canPlayType("video/mp4",this.g)||i.canPlayType("video/webm",this.g)),o.persistentState=="required"&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):r=!1),r){this.h=s;return}}throw n="Unsupported keySystem",(e=="org.w3.clearkey"||e=="com.widevine.alpha")&&(n="None of the requested configurations were supported."),e=Error(n),e.name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}ah.prototype.createMediaKeys=function(){var e=new Kc(this.g);return Promise.resolve(e)},ah.prototype.getConfiguration=function(){return this.h};function Kc(e){this.l=e,this.h=null,this.g=new Et,this.i=[],this.j=new Map}function HE(e,t){e.h=t,e.g.Ra();var n=Lm;t&&(e.g.F(t,n+"needkey",function(r){var i=new CustomEvent("encrypted");i.initDataType="cenc",i.initData=Kr(r.initData),e.h.dispatchEvent(i)}),e.g.F(t,n+"keymessage",function(r){var i=Om(e,r.sessionId);i&&(r=new Map().set("messageType",i.keyStatuses.Vb()==null?"licenserequest":"licenserenewal").set("message",r.message),r=new yt("message",r),i.h&&(i.h.resolve(),i.h=null),i.dispatchEvent(r))}),e.g.F(t,n+"keyadded",function(r){(r=Om(e,r.sessionId))&&r.ready()}),e.g.F(t,n+"keyerror",function(r){var i=Om(e,r.sessionId);if(i){var o=Error("EME v0.1b key error"),s=r.errorCode;s.systemCode=r.systemCode,o.errorCode=s,!r.sessionId&&i.h?(r.systemCode==45&&(o.message="Unsupported session type."),i.h.reject(o),i.h=null):r.sessionId&&i.g?(i.g.reject(o),i.g=null):(o=r.systemCode,r.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?uh(i,"output-restricted"):o==1?uh(i,"expired"):uh(i,"internal-error"))}}))}Kc.prototype.createSession=function(e){if(e=e||"temporary",e!="temporary"&&e!="persistent-license")throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new Dm(t,this.l,e),this.i.push(e),e},Kc.prototype.setServerCertificate=function(){return Promise.resolve(!1)},Kc.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")};function Om(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function Dm(e,t,n){_n.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new zn,this.keyStatuses=new KE,this.onkeystatuseschange=null}P(Dm,_n),f=Dm.prototype,f.ready=function(){uh(this,"usable"),this.g&&this.g.resolve(),this.g=null};function GE(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if(e.l=="persistent-license")if(n)var r=xt(Ui("LOAD_SESSION|"+n));else{var i=Ui("PERSISTENT|");r=dr(i,t)}else r=xt(t)}catch(s){return Promise.reject(s)}e.h=new zn;var o=Rm("generateKeyRequest");try{e.j[o](e.i,r)}catch(s){if(s.name!="InvalidStateError")return e.h=null,Promise.reject(s);new Yt(function(){try{e.j[o](e.i,r)}catch(a){e.h.reject(a),e.h=null}}).ka(.01)}return e.h}function Nm(e,t,n){if(e.g)e.g.then(function(){return Nm(e,t,n)}).catch(function(){return Nm(e,t,n)});else{if(e.g=t,e.i=="webkit-org.w3.clearkey"){var r=Un(n),i=JSON.parse(r);i.keys[0].kty!="oct"&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),r=ki(i.keys[0].k),i=ki(i.keys[0].kid)}else r=xt(n),i=null;var o=Rm("addKey");try{e.j[o](e.i,r,i,e.sessionId)}catch(s){e.g.reject(s),e.g=null}}}function uh(e,t){var n=e.keyStatuses;n.size=t==null?0:1,n.g=t,t=new yt("keystatuseschange"),e.dispatchEvent(t),e.onkeystatuseschange&&e.onkeystatuseschange(t)}f.generateRequest=function(e,t){return GE(this,t,null)},f.load=function(e){return this.l=="persistent-license"?GE(this,null,e):Promise.reject(Error("Not a persistent session."))},f.update=function(e){var t=new zn;return Nm(this,t,e),t},f.close=function(){if(this.l!="persistent-license"){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=Rm("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch{}}return this.closed.resolve(),this.closed},f.remove=function(){return this.l!="persistent-license"?Promise.reject(Error("Not a persistent session.")):this.close()};function KE(){this.size=0,this.g=void 0}f=KE.prototype,f.Vb=function(){return this.g},f.forEach=function(e){this.g&&e(this.g,so.value())},f.get=function(e){if(this.has(e))return this.g},f.has=function(e){var t=so.value();return!!(this.g&&Pr(e,t))},f.entries=function(){},f.keys=function(){},f.values=function(){};var Lm="",Nk="webkit";Mo(_E);function WE(){}function zE(){R.crypto&&("randomUUID"in R.crypto||(R.crypto.randomUUID=Lk))}function Lk(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}no.RandomUUID=WE,WE.install=zE,Mo(zE);function $E(){}function XE(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:jk})}function jk(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}no.Symbol=$E,$E.install=XE,Mo(XE);function YE(){}function JE(){for(var e=d([Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,Int8Array,Int16Array,Int32Array,Float32Array,Float64Array]),t=e.next();!t.done;t=e.next())t=t.value,t.prototype.indexOf||(t.prototype.indexOf=Fk),t.prototype.lastIndexOf||(t.prototype.lastIndexOf=Uk),t.prototype.includes||(t.prototype.includes=Bk)}function Fk(e,t){return Array.prototype.indexOf.call(this,e,t)}function Uk(e,t){return Array.prototype.lastIndexOf.call(this,e,t)}function Bk(e,t){return this.indexOf(e,t)!==-1}no.TypedArray=YE,YE.install=JE,Mo(JE);function QE(){}function ZE(){if(R.HTMLMediaElement){var e=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var t=e.apply(this);return t&&t.catch(function(){}),t}}}no.VideoPlayPromise=QE,QE.install=ZE,Mo(ZE);function qE(){}function ex(){if(R.HTMLVideoElement){var e=HTMLVideoElement.prototype;!e.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in e||typeof yu().webkitDroppedFrameCount=="number")&&(e.getVideoPlaybackQuality=Vk)}}function Vk(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}no.VideoPlaybackQuality=qE,qE.install=ex,Mo(ex);function tx(){}function nx(){if(!R.VTTCue&&R.TextTrackCue){var e=null,t=TextTrackCue.length;if(t==3)e=jm;else if(t==6)e=_k;else{try{var n=!!jm(1,2,"")}catch{n=!1}n&&(e=jm)}e&&(R.VTTCue=function(r,i,o){return e(r,i,o)})}}function jm(e,t,n){return new R.TextTrackCue(e,t,n)}function _k(e,t,n){return new R.TextTrackCue(e+"-"+t+"-"+n,e,t,n)}no.VTTCue=tx,tx.install=nx,Mo(nx);function ai(e){_n.call(this),this.g=e,this.m=null,this.h=[],this.j=-1,this.i=this.l=null,this.o=new Et}P(ai,_n),f=ai.prototype,f.destroy=function(){var e=this;return G(function(t){if(t.h==1)return t.g(e.removeAllItems(),2);e.g=null,e.o&&(e.o.release(),e.o=null),_n.prototype.release.call(e),t.j()})},f.configure=function(e){this.m=e},f.getConfiguration=function(){return this.m},f.getCurrentItem=function(){return this.h.length&&this.j>=0&&this.j<this.h.length?this.h[this.j]:null},f.getCurrentItemIndex=function(){return this.j},f.getItems=function(){return this.h.slice()},f.insertItems=function(e){this.h.push.apply(this.h,M(e)),this.dispatchEvent(new yt("itemsinserted"))},f.removeAllItems=function(){var e=this,t,n,r,i;return G(function(o){if(o.h==1)return e.o.Ra(),e.h.length&&e.j>=0?o.g(e.g.xc(),2):o.A(2);if(o.h!=4){for(t=[],e.i&&(e.i.preloadManager.l||t.push(e.i.preloadManager.destroy()),e.i=null),e.l&&(e.l.preloadManager.l||t.push(e.l.preloadManager.destroy()),e.l=null),n=d(e.h),r=n.next();!r.done;r=n.next())i=r.value,i.preloadManager&&!i.preloadManager.l&&t.push(i.preloadManager.destroy());return t.length?o.g(Promise.all(t),4):o.A(4)}e.h=[],e.j=-1,e.dispatchEvent(new yt("itemsremoved")),o.j()})},f.playItem=function(e){var t=this,n,r,i,o,s,a,u,l,h,g,m,S,A,k,b,V,B;return G(function(Z){switch(Z.h){case 1:if(t.o.Ra(),!t.h.length||e>=t.h.length)throw new fe(2,7,7007);if(n=t.getCurrentItem(),r=t.h[e],t.j!=e&&(t.j=e,t.dispatchEvent(new yt("currentitemchanged"))),i=t.g.We(),o=t.m?t.m.preloadNextUrlWindow:0,o>0&&(s=!1,t.o.F(i,"timeupdate",function(){var ae,pe,te,le;return G(function(ie){switch(ie.h){case 1:if(t.l||t.h.length<=1||s||t.g.U()||!i.duration)return ie.return();if(ae=t.g.Sa().end-i.currentTime,isNaN(ae)){ie.A(0);break}if(!(ae<=o)){ie.A(0);break}if(pe=t.m&&t.m.repeatMode,te=null,t.j+1<t.h.length?te=t.h[t.j+1]:pe==1&&(te=t.h[0]),!te||te.preloadManager&&!te.preloadManager.l){ie.A(0);break}return s=!0,le=null,ie.m(5),ie.g(t.g.preload(te.manifestUri,te.startTime,te.mimeType,te.config),7);case 7:le=ie.i,ie.o(6);break;case 5:ie.l(),le=null;case 6:t.l={item:te,preloadManager:le},s=!1,ie.j()}})})),t.o.F(t.g,"complete",function(){var ae=t.m&&t.m.repeatMode,pe=!1;if(ae==2)pe=!0;else{var te=t.j+1;te<t.h.length?t.playItem(te):ae==1&&(t.h.length==1?pe=!0:t.playItem(0))}pe&&(i.paused?(i.currentTime=t.g.Sa().start,i.play()):t.o.F(i,"paused",function(){i.currentTime=t.g.Sa().start,i.play()}))}),a=r.manifestUri,r.preloadManager&&!r.preloadManager.l&&(a=r.preloadManager),u=!1,t.l&&t.l.item==r&&t.l.preloadManager?a=t.l.preloadManager:t.i&&t.i.item==r&&t.i.preloadManager&&(a=t.i.preloadManager,u=!0),!t.i){Z.A(2);break}if(u||t.i.preloadManager.l){Z.A(3);break}return Z.g(t.i.preloadManager.destroy(),3);case 3:t.i=null;case 2:if(!(t.m&&t.m.preloadPrevItem&&n&&t.g.Ud()===hi)){Z.A(5);break}return l=null,Z.m(6),Z.g(t.g.gj(),8);case 8:l=Z.i,Z.o(7);break;case 6:Z.l(),l=null;case 7:t.i={item:n,preloadManager:l};case 5:return r.config&&(t.g.Ji(),t.g.configure(r.config)),Z.g(t.g.load(a,r.startTime,r.mimeType),9);case 9:if(t.l=null,r.extraText)for(h=d(r.extraText),g=h.next();!g.done;g=h.next())m=g.value,m.mime?t.g.Ld(m.uri,m.language,m.kind,m.mime,m.codecs):t.g.Ld(m.uri,m.language,m.kind);if(r.extraThumbnail)for(S=d(r.extraThumbnail),A=S.next();!A.done;A=S.next())k=A.value,t.g.Ie(k);if(r.extraChapter)for(b=d(r.extraChapter),V=b.next();!V.done;V=b.next())B=V.value,t.g.He(B.uri,B.language,B.mime);Z.j()}})},be("shaka.queue.QueueManager",ai),ai.prototype.playItem=ai.prototype.playItem,ai.prototype.removeAllItems=ai.prototype.removeAllItems,ai.prototype.insertItems=ai.prototype.insertItems,ai.prototype.getItems=ai.prototype.getItems,ai.prototype.getCurrentItemIndex=ai.prototype.getCurrentItemIndex,ai.prototype.getCurrentItem=ai.prototype.getCurrentItem,ai.prototype.getConfiguration=ai.prototype.getConfiguration,ai.prototype.configure=ai.prototype.configure,ai.prototype.destroy=ai.prototype.destroy,hd=function(e){return new ai(e)};function Po(){}Po.prototype.parseInit=function(){},Po.prototype.setSequenceMode=function(){},Po.prototype.setManifestType=function(){},Po.prototype.parseMedia=function(e,t){var n=null,r=[];e=Un(e).split(/\r?\n/),e=d(e);for(var i=e.next();!i.done;i=e.next())if((i=i.value)&&!/^\s+$/.test(i)&&(i=Hk.exec(i))){var o=Gk.exec(i[1]);o=parseInt(o[1],10)*60+parseFloat(o[2].replace(",",".")),i=new At(o,t.segmentEnd?t.segmentEnd:o+2,i[2]),n&&(n.endTime=o,r.push(n)),n=i}return n&&r.push(n),r},be("shaka.text.LrcTextParser",Po),Po.prototype.parseMedia=Po.prototype.parseMedia,Po.prototype.setManifestType=Po.prototype.setManifestType,Po.prototype.setSequenceMode=Po.prototype.setSequenceMode,Po.prototype.parseInit=Po.prototype.parseInit;var Hk=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Gk=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;ii("application/x-subtitle-lrc",function(){return new Po});function mo(){this.g="UNKNOWN"}mo.prototype.parseInit=function(){},mo.prototype.setSequenceMode=function(){},mo.prototype.setManifestType=function(e){this.g=e},mo.prototype.parseMedia=function(e,t,n,r){var i=Un(e);if(e=[],i=="")return e;var o=Es(i,"tt",!0);if(!o)throw new fe(2,2,2005,"Failed to parse TTML.");if(i=fi(o,"body")[0],!i)return[];var s=ao(o,Wc,"frameRate"),a=ao(o,Wc,"subFrameRate"),u=ao(o,Wc,"frameRateMultiplier"),l=ao(o,Wc,"tickRate"),h=ao(o,Wc,"cellResolution"),g=o.attributes["xml:space"]||"default",m=ao(o,fh,"extent");if(g!="default"&&g!="preserve")throw new fe(2,2,2005,"Invalid xml:space value: "+g);g=g=="default",s=new Xk(s,a,u,l),h=$k(h),a=fi(o,"metadata")[0],a=(a?a.children:[]).filter(function(k){return k!=`
74
- `}),u=fi(o,"style"),o=fi(o,"region"),l=[];for(var S=d(o),A=S.next();!A.done;A=S.next())(A=Kk(this,A.value,u,m))&&l.push(A);if(Mn(i,"p").length)throw new fe(2,2,2001,"<p> can only be inside <div> in TTML");for(m=d(Mn(i,"div")),S=m.next();!S.done;S=m.next())if(Mn(S.value,"span").length)throw new fe(2,2,2001,"<span> can only be inside <p> in TTML");return(t=rx(this,i,t,s,a,u,o,l,g,h,null,!1,n,r))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e};function rx(e,t,n,r,i,o,s,a,u,l,h,g,m,S){var A=h;if(Fs(t)){if(!g)return null;var k={tagName:"span",children:[vr(t)],attributes:{},parent:null}}else k=t;for(var b=null,V=d(hx),B=V.next();!B.done&&!(b=ch(k,"backgroundImage",i,"#",B.value)[0]);B=V.next());V=null,B=ao(k,hx,"backgroundImage");var Z=/^(urn:)(mpeg:[a-z0-9][a-z0-9-]{0,31}:)(subs:)([0-9]+)$/;if(B&&Z.test(B)){if(V=parseInt(B.split(":").pop(),10)-1,V>=S.length)return null;V=S[V]}else m&&B&&!B.startsWith("#")&&(Z=new It(m),B=new It(B),(B=Z.resolve(B).toString())&&(V=B));if((t.tagName=="p"||b||V)&&(g=!0),t=g,B=(k.attributes["xml:space"]||(u?"default":"preserve"))=="default",Z=k.children.every(Fs),u=[],!Z)for(var ae=d(k.children),pe=ae.next();!pe.done;pe=ae.next())(pe=rx(e,pe.value,n,r,i,o,s,a,B,l,k,g,m,S))&&u.push(pe);if(i=h!=null,m=vr(k),m=k.children.length&&m&&/\S/.test(m),ae=k.attributes.begin||k.attributes.end||k.attributes.dur,!(ae||m||k.tagName=="br"||u.length!=0||i&&!B))return null;for(S=sx(k,r),m=S.start,S=S.end;A&&A.tagName&&A.tagName!="tt";)S=zk(A,r,m,S),m=S.start,S=S.end,A=A.parent;if(m==null&&(m=0),m+=n.periodStart,S=S==null?1/0:S+n.periodStart,e.g!=="HLS"&&(m=Math.max(m,n.segmentStart),S=Math.min(S,n.segmentEnd)),!ae&&u.length>0)for(m=1/0,S=0,n=d(u),r=n.next();!r.done;r=n.next())r=r.value,m=Math.min(m,r.startTime),S=Math.max(S,r.endTime);if(k.tagName=="br")return e=new At(m,S,""),e.lineBreak=!0,e;if(n="",Z&&(n=Wr(vr(k)||""),B&&(n=n.replace(/\s+/g," "))),n=new At(m,S,n),n.nestedCues=u,g||(n.isContainer=!0),l&&(n.cellResolution=l),l=ch(k,"region",s,"")[0],k.attributes.region&&l&&l.attributes["xml:id"]){var te=l.attributes["xml:id"];n.region=a.filter(function(le){return le.id==te})[0]}return a=l,h&&i&&!k.attributes.region&&!k.attributes.style&&(a=ch(h,"region",s,"")[0]),Wk(e,n,k,a,b,V,o,t,u.length==0),n}function Kk(e,t,n,r){var i=new ns,o=t.attributes["xml:id"];if(!o)return null;i.id=o,o=null,r&&(o=_m.exec(r)||Hm.exec(r)),r=o?Number(o[1]):null,o=o?Number(o[2]):null;var s,a=lh(e,t,n,"extent");if(a){var u=(s=_m.exec(a))||Hm.exec(a);u!=null&&(i.width=Number(u[1]),i.height=Number(u[2]),s||(r!=null&&(i.width=i.width*100/r),o!=null&&(i.height=i.height*100/o)),i.widthUnits=s||r!=null?Vr:0,i.heightUnits=s||o!=null?Vr:0)}return(e=lh(e,t,n,"origin"))&&(u=(s=_m.exec(e))||Hm.exec(e),u!=null&&(i.viewportAnchorX=Number(u[1]),i.viewportAnchorY=Number(u[2]),s?a||(i.width=100-i.viewportAnchorX,i.widthUnits=Vr,i.height=100-i.viewportAnchorY,i.heightUnits=Vr):(o!=null&&(i.viewportAnchorY=i.viewportAnchorY*100/o),r!=null&&(i.viewportAnchorX=i.viewportAnchorX*100/r)),i.viewportAnchorUnits=s||r!=null?Vr:0)),i}function Fm(e){var t=e.match(/rgba\(([^)]+)\)/);return t&&(t=t[1].split(","),t.length==4)?(t[3]=String(Number(t[3])/255),"rgba("+t.join(",")+")"):e}function Wk(e,t,n,r,i,o,s,a,u){if(a=a||u,Ci(e,n,r,s,"direction",a)=="rtl"&&(t.direction="rtl"),u=Ci(e,n,r,s,"writingMode",a),u=="tb"||u=="tblr"?t.writingMode="vertical-lr":u=="tbrl"?t.writingMode="vertical-rl":u=="rltb"||u=="rl"?t.direction="rtl":u&&(t.direction=Zn),(u=Ci(e,n,r,s,"textAlign",!0))?(t.positionAlign=Qk.get(u),t.lineAlign=Jk.get(u),t.textAlign=fn[u.toUpperCase()]):t.textAlign=Jt,(u=Ci(e,n,r,s,"displayAlign",!0))&&(t.displayAlign=en[u.toUpperCase()]),(u=Ci(e,n,r,s,"color",a))&&(t.color=Fm(u)),(u=Ci(e,n,r,s,"backgroundColor",a))&&(t.backgroundColor=Fm(u)),(u=Ci(e,n,r,s,"border",a))&&(t.border=u),u=Ci(e,n,r,s,"fontFamily",a))switch(u){case"monospaceSerif":t.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":t.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":t.fontFamily="sans-serif";break;case"monospaceSansSerif":t.fontFamily="Consolas,monospace";break;case"proportionalSerif":t.fontFamily="serif";break;default:t.fontFamily=u.split(",").filter(function(l){return l!="default"}).join(",")}switch((u=Ci(e,n,r,s,"fontWeight",a))&&u=="bold"&&(t.fontWeight=na),u=Ci(e,n,r,s,"wrapOption",a),t.wrapLine=!(u&&u=="noWrap"),(u=Ci(e,n,r,s,"lineHeight",a))&&u.match(wl)&&(t.lineHeight=u),(u=Ci(e,n,r,s,"fontSize",a))&&(u.match(wl)||u.match(Yk))&&(t.fontSize=u),(u=Ci(e,n,r,s,"fontStyle",a))&&(t.fontStyle=iu[u.toUpperCase()]),i?(o=i.attributes.imageType||i.attributes.imagetype,u=i.attributes.encoding,i=vr(i).trim(),o=="PNG"&&u=="Base64"&&i&&(t.backgroundImage="data:image/png;base64,"+i)):o&&(t.backgroundImage=o),(i=Ci(e,n,r,s,"textOutline",a))&&(i=i.split(" "),i[0].match(wl)?t.textStrokeColor=t.color:(t.textStrokeColor=Fm(i[0]),i.shift()),i[0]&&i[0].match(wl)?t.textStrokeWidth=i[0]:t.textStrokeColor=""),(i=Ci(e,n,r,s,"letterSpacing",a))&&i.match(wl)&&(t.letterSpacing=i),(i=Ci(e,n,r,s,"linePadding",a))&&i.match(wl)&&(t.linePadding=i),(i=Ci(e,n,r,s,"opacity",a))&&(t.opacity=parseFloat(i)),(i=lh(e,r,s,"textDecoration"))&&ix(t,i),(i=Um(e,n,s,"textDecoration"))&&ix(t,i),(i=Ci(e,n,r,s,"textCombine",a))&&(t.textCombineUpright=i),Ci(e,n,r,s,"ruby",a)){case"container":t.rubyTag="ruby";break;case"text":t.rubyTag="rt"}}function ix(e,t){t=d(t.split(" "));for(var n=t.next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes(xs)||e.textDecoration.push(xs);break;case"noUnderline":e.textDecoration.includes(xs)&&$t(e.textDecoration,xs);break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&$t(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&$t(e.textDecoration,"overline")}}function Ci(e,t,n,r,i,o){return o=o===void 0?!0:o,(t=Um(e,t,r,i))?t:o?lh(e,n,r,i):null}function lh(e,t,n,r){if(!t)return null;var i=ao(t,fh,r);return i||ox(e,t,n,r)}function Um(e,t,n,r){var i=ao(t,fh,r);return i||ox(e,t,n,r)}function ox(e,t,n,r){t=ch(t,"style",n,"");for(var i=null,o=0;o<t.length;o++){var s=Io(t[o],"urn:ebu:tt:style",r);s||(s=ao(t[o],fh,r)),s||(s=Um(e,t[o],n,r)),s&&(i=s)}return i}function ch(e,t,n,r,i){var o=[];if(!e||n.length<1)return o;var s=e;for(e=null;!e&&!(e=i?Io(s,i,t):s.attributes[t])&&(s=s.parent,s););if(t=e){for(t=d(t.split(" ")),i=t.next();!i.done;i=t.next())for(i=i.value,e=d(n),s=e.next();!s.done;s=e.next())if(s=s.value,r+s.attributes["xml:id"]==i){o.push(s);break}}return o}function zk(e,t,n,r){return e=sx(e,t),n==null?n=e.start:e.start!=null&&(n+=e.start),r==null?r=e.end:e.start!=null&&(r+=e.start),{start:n,end:r}}function sx(e,t){var n=Bm(e.attributes.begin,t),r=Bm(e.attributes.end,t);return e=Bm(e.attributes.dur,t),r==null&&e!=null&&(r=n+e),{start:n,end:r}}function Bm(e,t){var n=null;if(ax.test(e)){e=ax.exec(e),n=Number(e[1]);var r=Number(e[2]),i=Number(e[3]),o=Number(e[4]);o+=(Number(e[5])||0)/t.h,i+=o/t.frameRate,n=i+r*60+n*3600}else if(ux.test(e))n=Vm(ux,e);else if(lx.test(e))n=Vm(lx,e);else if(cx.test(e))e=cx.exec(e),n=Number(e[1])/t.frameRate;else if(fx.test(e))e=fx.exec(e),n=Number(e[1])/t.g;else if(dx.test(e))n=Vm(dx,e);else if(e)throw new fe(2,2,2001,"Could not parse cue time range in TTML");return n}function Vm(e,t){return e=e.exec(t),e==null||e[0]==""?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+(Number(e[2])||0)*60+(Number(e[1])||0)*3600}function $k(e){return e&&(e=/^(\d+) (\d+)$/.exec(e))?{columns:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}be("shaka.text.TtmlTextParser",mo),mo.prototype.parseMedia=mo.prototype.parseMedia,mo.prototype.setManifestType=mo.prototype.setManifestType,mo.prototype.setSequenceMode=mo.prototype.setSequenceMode,mo.prototype.parseInit=mo.prototype.parseInit;function Xk(e,t,n,r){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(r),this.g==0&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}var _m=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Yk=/^(\d{1,4}(?:\.\d+)?|100)%$/,wl=/^(\d+px|\d+em|\d*\.?\d+c)$/,Hm=/^(\d+)px (\d+)px$/,ax=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ux=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,lx=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/,cx=/^(\d*(?:\.\d*)?)f$/,fx=/^(\d*(?:\.\d*)?)t$/,dx=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),Jk=new Map().set("left",Ar).set("center","center").set("right","end").set("start",Ar).set("end","end"),Qk=new Map().set("left","line-left").set("center","center").set("right","line-right").set("start","line-left").set("end","line-right"),Wc=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],fh=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],hx=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];ii("application/ttml+xml",function(){return new mo});function Qr(){this.g=new mo}Qr.prototype.parseInit=function(e){var t=!1;if(new Hn().box("moov",Wt).box("trak",Wt).box("mdia",Wt).box("minf",Wt).box("stbl",Wt).S("stsd",ua).box("stpp",function(n){t=!0,n.parser.stop()}).parse(e),!t)throw new fe(2,2,2007)},Qr.prototype.setSequenceMode=function(e){this.g.setSequenceMode(e)},Qr.prototype.setManifestType=function(e){this.g.setManifestType(e)},Qr.prototype.parseMedia=function(e,t,n){var r=[],i=null,o=[],s=new Map,a=[];if(new Hn().box("moof",Wt).box("traf",Wt).S("tfhd",function(V){i=vf(V.reader,V.flags).Rd}).S("trun",function(V){V=Tf(V.reader,V.version,V.flags),V=d(V.jh);for(var B=V.next();!B.done;B=V.next())a.push(B.value.sampleSize||i||0)}).S("subs",function(V){for(var B=V.reader,Z=B.W(),ae=-1,pe=0;pe<Z;pe++){var te=B.W();ae+=te,te=B.Da();for(var le=[],ie=0;ie<te;ie++)V.version==1?le.push(B.W()):le.push(B.Da()),B.Z(),B.Z(),B.W();s.set(ae,le)}}).box("mdat",_u(function(V){o.push(V)},!1)).parse(e,!1),o.length==0)throw new fe(2,2,2007);e=dr.apply(Sr,M(o));for(var u=0,l=0;l<a.length;l++){var h=xt(e,u,a[l]);u+=a[l];var g=s.get(l);if(g&&g.length){for(var m=xt(h,0,g[0]),S=[],A=g[0],k=1;k<g.length;k++){var b=xt(h,A,g[k]);b=Fo(b),S.push("data:image/png;base64,"+b),A+=g[k]}r=r.concat(this.g.parseMedia(m,t,n,S))}else r=r.concat(this.g.parseMedia(h,t,n,[]))}return r},be("shaka.text.Mp4TtmlParser",Qr),Qr.prototype.parseMedia=Qr.prototype.parseMedia,Qr.prototype.setManifestType=Qr.prototype.setManifestType,Qr.prototype.setSequenceMode=Qr.prototype.setSequenceMode,Qr.prototype.parseInit=Qr.prototype.parseInit,ii('application/mp4; codecs="stpp"',function(){return new Qr}),ii('application/mp4; codecs="stpp.ttml"',function(){return new Qr}),ii('application/mp4; codecs="stpp.ttml.im1i"',function(){return new Qr}),ii('application/mp4; codecs="stpp.ttml.im1t"',function(){return new Qr}),ii('application/mp4; codecs="stpp.ttml.im2i"',function(){return new Qr}),ii('application/mp4; codecs="stpp.ttml.im2t"',function(){return new Qr}),ii('application/mp4; codecs="stpp.ttml.etd1"',function(){return new Qr}),ii('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new Qr}),ii('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new Qr}),ii('application/mp4; codecs="stpp.TTML.im1t"',function(){return new Qr});function Wi(){this.g="UNKNOWN"}Wi.prototype.parseInit=function(){},Wi.prototype.setSequenceMode=function(){},Wi.prototype.setManifestType=function(e){this.g=e},Wi.prototype.parseMedia=function(e,t){e=Un(e),e=e.replace(/\r\n|\r(?=[^\n]|$)/gm,`
75
- `);var n=e.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new fe(2,2,2e3);if(e=t.vttOffset,this.g=="HLS"&&n[0].includes("X-TIMESTAMP-MAP")){var r=n[0];if(e=r.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),r=r.match(/MPEGTS:(\d+)/m),!e||!r)throw new fe(2,2,2e3);if(e=Ts(e[1]),e==null)throw new fe(2,2,2e3);r=Number(r[1]);for(var i=t.segmentStart-t.periodStart;i>=95443.7176888889;)i-=95443.7176888889,r+=8589934592;e=t.periodStart+r/9e4-e}for(t=[],r=d(n[0].split(`
76
- `)),i=r.next();!i.done;i=r.next())if(i=i.value,/^Region:/.test(i)){i=new ys(i);var o=new ns;rs(i),Ls(i);for(var s=rs(i);s;){var a=o,u=s;(s=/^id=(.*)$/.exec(u))?a.id=s[1]:(s=/^width=(\d{1,2}|100)%$/.exec(u))?a.width=Number(s[1]):(s=/^lines=(\d+)$/.exec(u))?(a.height=Number(s[1]),a.heightUnits=2):(s=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(a.regionAnchorX=Number(s[1]),a.regionAnchorY=Number(s[2])):(s=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(u))?(a.viewportAnchorX=Number(s[1]),a.viewportAnchorY=Number(s[2])):/^scroll=up$/.exec(u)&&(a.scroll="up"),Ls(i),s=rs(i)}t.push(o)}for(r=new Map,uo(r),i=[],n=d(n.slice(1)),o=n.next();!o.done;o=n.next()){if(o=o.value.split(`
77
- `),(o.length!=1||o[0])&&!gx.test(o[0])&&o[0]=="STYLE"){for(a=[],s=-1,u=1;u<o.length;u++)o[u].includes("::cue")&&(a.push([]),s=a.length-1),s!=-1&&(a[s].push(o[u]),o[u].includes("}")&&(s=-1));for(a=d(a),s=a.next();!s.done;s=a.next()){var l=s.value;s="global",(u=l[0].match(/\((.*)\)/))&&(s=u.pop()),u=l.slice(1,-1),l[0].includes("}")&&(l=/\{(.*?)\}/.exec(l[0]))&&(u=l[1].split(";")),(l=r.get(s))||(l=new At(0,0,""));for(var h=!1,g=0;g<u.length;g++){var m=/^\s*([^:]+):\s*(.*)/.exec(u[g]);if(m){var S=m[2].trim().replace(";","");switch(m[1].trim()){case"background-color":case"background":h=!0,l.backgroundColor=S;break;case"color":h=!0,l.color=S;break;case"font-family":h=!0,l.fontFamily=S;break;case"font-size":h=!0,l.fontSize=S;break;case"font-weight":(parseInt(S,10)>=700||S=="bold")&&(h=!0,l.fontWeight=na);break;case"font-style":switch(S){case"normal":h=!0,l.fontStyle=ru;break;case"italic":h=!0,l.fontStyle=Ca;break;case"oblique":h=!0,l.fontStyle="oblique"}break;case"opacity":h=!0,l.opacity=parseFloat(S);break;case"text-combine-upright":h=!0,l.textCombineUpright=S;break;case"text-shadow":h=!0,l.textShadow=S;break;case"white-space":h=!0,l.wrapLine=S!="noWrap"}}}h&&r.set(s,l)}}if(l=o,g=e,l.length==1&&!l[0]||gx.test(l[0])||l[0]=="STYLE"||l[0]=="REGION")o=null;else if(o=null,h=0,l[0].includes("-->")||(o=l[0],h=1),a=new ys(l[h]),s=Ss(a),m=js(a,/[ \t]+--\x3e[ \t]+/g),u=Ss(a),s==null||m==null||u==null)ut("Failed to parse VTT time code. Cue skipped:",o,l),o=null;else{for(s+=g,u+=g,s<0&&(s=0),g="",m=h+1;m<l.length;m++)m>h+1&&(g+=`
78
- `),g+=l[m];for(g=g.trim(),r.has("global")?(l=r.get("global").clone(),l.startTime=s,l.endTime=u,l.payload=g):l=new At(s,u,g),Ls(a),s=rs(a);s;)px(l,s,t),Ls(a),s=rs(a);zr(l,r),o!=null&&(l.id=o),o=l}o&&i.push(o)}return i};function px(e,t,n){var r;(r=qk.exec(t))?(t=r[1],t=="middle"?e.textAlign=Jt:e.textAlign=fn[t.toUpperCase()]):(r=eb.exec(t))?e.writingMode=r[1]=="lr"?"vertical-lr":"vertical-rl":(r=tb.exec(t))?e.size=Number(r[1]):(r=nb.exec(t))?(e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign=t=="line-left"||t=="start"?"line-left":t=="line-right"||t=="end"?"line-right":t=="center"||t=="middle"?"center":ni)):(r=rb.exec(t))?(t=Zk(n,r[1]))&&(e.region=t):(n=ib.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=yn[n[2].toUpperCase()])):(n=ob.exec(t))&&(e.lineInterpretation=xn,e.line=Number(n[1]),n[2]&&(e.lineAlign=yn[n[2].toUpperCase()]))}function Zk(e,t){return e=e.filter(function(n){return n.id==t}),e.length?e[0]:null}be("shaka.text.VttTextParser",Wi),Wi.prototype.parseMedia=Wi.prototype.parseMedia,Wi.prototype.setManifestType=Wi.prototype.setManifestType,Wi.prototype.setSequenceMode=Wi.prototype.setSequenceMode,Wi.prototype.parseInit=Wi.prototype.parseInit;var gx=/^NOTE($|[ \t])/,qk=/^align:(start|middle|center|end|left|right)$/,eb=/^vertical:(lr|rl)$/,tb=/^size:([\d.]+)%$/,nb=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/,rb=/^region:(.*)$/,ib=/^line:([\d.]+)%(?:,(start|end|center))?$/,ob=/^line:(-?\d+)(?:,(start|end|center))?$/;ii("text/vtt",function(){return new Wi}),ii('text/vtt; codecs="vtt"',function(){return new Wi}),ii('text/vtt; codecs="wvtt"',function(){return new Wi});function ko(){this.g=null}ko.prototype.parseInit=function(e){var t=this,n=!1;if(new Hn().box("moov",Wt).box("trak",Wt).box("mdia",Wt).S("mdhd",function(r){r=Sf(r.reader,r.version),t.g=r.timescale}).box("minf",Wt).box("stbl",Wt).S("stsd",ua).box("wvtt",function(){n=!0}).parse(e),!this.g)throw new fe(2,2,2008);if(!n)throw new fe(2,2,2008)},ko.prototype.setSequenceMode=function(){},ko.prototype.setManifestType=function(){},ko.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new fe(2,2,2008);var n=0,r=[],i,o=[],s=!1,a=!1,u=!1,l=null;if(new Hn().box("moof",Wt).box("traf",Wt).S("tfdt",function(Z){s=!0,n=yf(Z.reader,Z.version).baseMediaDecodeTime}).S("tfhd",function(Z){l=vf(Z.reader,Z.flags).Qd}).S("trun",function(Z){a=!0,r=Tf(Z.reader,Z.version,Z.flags).jh}).box("mdat",_u(function(Z){u=!0,i=Z},!1)).parse(e,!1),!u&&!s&&!a)throw new fe(2,2,2008);e=n;for(var h=new cr(i,0),g=d(r),m=g.next();!m.done;m=g.next()){m=m.value;var S=m.kh||l,A=m.Bf?n+m.Bf:e;e=A+(S||0);var k=0;do{var b=h.W();k+=b;var V=h.W(),B=null;pf(V)=="vttc"?b>8&&(B=h.Mb(b-8,!1)):h.skip(b-8),S&&B&&(b=sb(B,t.periodStart+A/this.g,t.periodStart+e/this.g),o.push(b))}while(m.sampleSize&&k<m.sampleSize)}return o.filter(ss)};function sb(e,t,n){var r,i,o;return new Hn().box("payl",_u(function(s){r=Un(s)},!1)).box("iden",_u(function(s){i=Un(s)},!1)).box("sttg",_u(function(s){o=Un(s)},!1)).parse(e),r?ab(r,i,o,t,n):null}function ab(e,t,n,r,i){if(e=new At(r,i,e),zr(e),t&&(e.id=t),n)for(t=new ys(n),n=rs(t);n;)px(e,n,[]),Ls(t),n=rs(t);return e}be("shaka.text.Mp4VttParser",ko),ko.prototype.parseMedia=ko.prototype.parseMedia,ko.prototype.setManifestType=ko.prototype.setManifestType,ko.prototype.setSequenceMode=ko.prototype.setSequenceMode,ko.prototype.parseInit=ko.prototype.parseInit,ii('application/mp4; codecs="wvtt"',function(){return new ko});function bo(){}bo.prototype.parseInit=function(){},bo.prototype.setSequenceMode=function(){},bo.prototype.setManifestType=function(){},bo.prototype.parseMedia=function(e){var t=Un(e).replace(/\r+/g,"");if(t=t.trim(),e=[],t=="")return e;t=d(t.split(`
79
-
80
- `));for(var n=t.next();!n.done;n=t.next()){n=n.value.split(`
81
- `);var r=new ys(n[0]),i=Ss(r),o=js(r,/,/g);if(r=Ss(r),i==null||o==null||r==null)throw new fe(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new At(i,r,n.slice(1).join(`
82
- `).trim()))}return e},be("shaka.text.SbvTextParser",bo),bo.prototype.parseMedia=bo.prototype.parseMedia,bo.prototype.setManifestType=bo.prototype.setManifestType,bo.prototype.setSequenceMode=bo.prototype.setSequenceMode,bo.prototype.parseInit=bo.prototype.parseInit,ii("text/x-subviewer",function(){return new bo});function Ro(){this.g=new Wi}Ro.prototype.parseInit=function(){},Ro.prototype.setSequenceMode=function(){},Ro.prototype.setManifestType=function(){},Ro.prototype.parseMedia=function(e,t,n){var r=Un(e);if(e=`WEBVTT
83
-
84
- `,r!=""){r=r.replace(/\r+/g,""),r=r.trim(),r=d(r.split(`
85
-
86
- `));for(var i=r.next();!i.done;i=r.next())i=i.value.split(/\n/),i[0].match(/\d+/)&&i.shift(),i[0]=i[0].replace(/,/g,"."),e+=i.join(`
87
- `).replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+`
88
-
89
- `}return e=xt(Ui(e)),this.g.parseMedia(e,t,n,[])},be("shaka.text.SrtTextParser",Ro),Ro.prototype.parseMedia=Ro.prototype.parseMedia,Ro.prototype.setManifestType=Ro.prototype.setManifestType,Ro.prototype.setSequenceMode=Ro.prototype.setSequenceMode,Ro.prototype.parseInit=Ro.prototype.parseInit,ii("text/srt",function(){return new Ro});function Oo(){}Oo.prototype.parseInit=function(){},Oo.prototype.setSequenceMode=function(){},Oo.prototype.setManifestType=function(){},Oo.prototype.parseMedia=function(e){var t="",n="",r=null,i=null;for(i=Un(e).split(/\r?\n\s*\r?\n/),e=d(i),i=e.next();!i.done;i=e.next()){var o=i.value;i=o,(o=lb.exec(o))&&(r=o[1],i=o[2]),r=="V4 Styles"||r=="V4+ Styles"?(t=i,t=n?t+(`
90
- `+i):i):r=="Events"&&(n=n?n+(`
91
- `+i):i)}for(r=[],i=null,t=d(t.split(/\r?\n/)),e=t.next();!e.done;e=t.next())if(e=e.value,!/^\s*;/.test(e)&&(o=yx.exec(e))){if(e=o[1].trim(),o=o[2].trim(),e=="Format")i=o.split(dh);else if(e=="Style"){e=o.split(dh),o={};for(var s=0;s<i.length&&s<e.length;s++)o[i[s]]=e[s];r.push(o)}}for(i=[],t=null,n=d(n.split(/\r?\n/)),o=n.next(),e={};!o.done;e={Xi:void 0},o=n.next())if(o=o.value,!/^\s*;/.test(o)&&(s=yx.exec(o))){if(o=s[1].trim(),s=s[2].trim(),o=="Format")t=s.split(dh);else if(o=="Dialogue"){s=s.split(dh),o={};for(var a=0;a<t.length&&a<s.length;a++)o[t[a]]=s[a];a=vx(o.Start);var u=vx(o.End);s=new At(a,u,s.slice(t.length-1).join(",").replace(/\\N/g,`
92
- `).replace(/\{[^}]+\}/g,"")),e.Xi=o.Style,(e=r.find(function(l){return function(h){return h.Name==l.Xi}}(e)))&&ub(s,e),i.push(s)}}return i};function ub(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=mx(n))&&(e.color=n),(n=t.BackColour)&&(n=mx(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=na),t.Italic&&(e.fontStyle=Ca),t.Underline&&e.textDecoration.push(xs),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=nn,e.textAlign="start";break;case 2:e.displayAlign=nn,e.textAlign=Jt;break;case 3:e.displayAlign=nn,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=Jt;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=Jt;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function mx(e){return e=parseInt(e.replace("&H",""),16),e>=0?"rgba("+(e&255)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function vx(e){return e=cb.exec(e),(e[1]?parseInt(e[1].replace(":",""),10):0)*3600+parseInt(e[2],10)*60+parseFloat(e[3])}be("shaka.text.SsaTextParser",Oo),Oo.prototype.parseMedia=Oo.prototype.parseMedia,Oo.prototype.setManifestType=Oo.prototype.setManifestType,Oo.prototype.setSequenceMode=Oo.prototype.setSequenceMode,Oo.prototype.parseInit=Oo.prototype.parseInit;var lb=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,yx=/^\s*([^:]+):\s*(.*)/,dh=/\s*,\s*/,cb=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;ii("text/x-ssa",function(){return new Oo});function Sx(e,t){var n=e[t+1]&1?7:9;return t+n<=e.length&&(e=((e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5)-n,e>0)?{Xd:n,ra:e}:null}function Tx(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=(e[t+2]&60)>>>2;if(r>n.length-1)return null;var i=((e[t+2]&192)>>>6)+1,o=(e[t+2]&1)<<2;return o|=(e[t+3]&192)>>>6,{sampleRate:n[r],channelCount:o,codec:"mp4a.40."+i}}function Ex(e,t){if(t+1<e.length&&e[t]===255&&(e[t+1]&246)===240){var n=e[t+1]&1?7:9;if(t+n>=e.length)return!1;var r=(e[t+3]&3)<<11|e[t+4]<<3|(e[t+5]&224)>>>5;return r<=n?!1:(t+=r,t===e.length||t+1<e.length&&e[t]===255&&(e[t+1]&246)===240)}return!1}function fb(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2||t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}var ks=Object.freeze({Ng:0,df:0,Ze:0,Re:0,Se:2,Og:0}),xx=Object.freeze({Ng:0,df:0,Ze:0,Re:0,Se:2,Og:0}),wx=Object.freeze({Ng:0,df:0,Ze:0,Re:0,Se:1,Og:1});function Do(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=Do.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/aac"?Ni(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/aac"?'audio/mp4; codecs="'+(yi(t)||"mp4a.40.2")+'"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,r){for(var i=xt(e),o=Wu(i),s=o.length;s<i.length&&!Ex(i,s);s++);if(e=n.endTime*1e3,o=Su(o),o.length&&n&&(o=o.find(function(h){return h.description==="com.apple.streaming.transportStreamTimestamp"}))&&(e=o.data),o=Tx(i,s),!o)return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));t.audioSamplingRate=o.sampleRate,t.channelsCount=o.channelCount;for(var a=[];s<i.length;){var u=Sx(i,s);if(!u)return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));var l=u.Xd+u.ra;s+l<=i.length&&a.push({data:i.subarray(s+u.Xd,s+l),size:u.ra,duration:1024,ob:0,flags:ks}),s+=l}return i=o.sampleRate,e=Math.floor(e*i/1e3),r={id:t.id,type:"audio",codecs:o.codec,timescale:i,duration:r,yb:[],Ha:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,sb:a},stream:t},r=new Hu([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Gu(r),this.g.set(n,t)),n=this.i!==t,r=zl(r),this.i=t,this.h++,Promise.resolve({data:r,init:n?t:null})},be("shaka.transmuxer.AacTransmuxer",Do),Do.prototype.transmux=Do.prototype.transmux,Do.prototype.getOriginalMimeType=Do.prototype.getOriginalMimeType,Do.prototype.convertCodecs=Do.prototype.convertCodecs,Do.prototype.isSupported=Do.prototype.isSupported,Do.prototype.destroy=Do.prototype.destroy,os("audio/aac",function(){return new Do("audio/aac")},ws);function Ax(e,t){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return null;var n=e[t+4]>>6;if(n>=3)return null;var r=e[t+4]&63,i=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][r*3+n]*2;if(t+i>e.length)return null;var o=e[t+6]>>5,s=0;o===2?s+=2:(o&1&&o!==1&&(s+=2),o&4&&(s+=2)),s=(e[t+6]<<8|e[t+7])>>12-s&1;var a=e[t+5]&7;return e=new Uint8Array([n<<6|e[t+5]>>3<<1|a>>2,(a&3)<<6|o<<3|s<<2|r>>4,r<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][o]+s,Ha:e,ra:i}}function db(e,t){if(e[t]===11&&e[t+1]===119){var n=0,r=5;t+=r;for(var i,o;r>0;){o=e[t];var s=Math.min(r,8),a=8-s;i=4278190080>>>24+a<<a,i=(o&i)>>a,n=n?n<<s|i:i,t+=1,r-=s}if(n<16)return!0}return!1}function Xo(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=Xo.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ac3"?Ni(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ac3"?ct().ke()?'audio/mp4; codecs="ec-3"':'audio/mp4; codecs="ac-3"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,r){e=xt(e);for(var i=Wu(e),o=i.length;o<e.length&&!db(e,o);o++);var s=n.endTime*1e3;i=Su(i),i.length&&n&&(i=i.find(function(h){return h.description==="com.apple.streaming.transportStreamTimestamp"}))&&(s=i.data),i=0;for(var a=new Uint8Array([]),u=[];o<e.length;){var l=Ax(e,o);if(!l)return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,i=l.sampleRate,a=l.Ha,u.push({data:e.subarray(o,o+l.ra),size:l.ra,duration:1536,ob:0,flags:ks}),o+=l.ra}return e=Math.floor(s*i/1e3),r={id:t.id,type:"audio",codecs:"ac-3",timescale:i,duration:r,yb:[],Ha:a,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,sb:u},stream:t},r=new Hu([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Gu(r),this.g.set(n,t)),n=this.i!==t,r=zl(r),this.i=t,this.h++,Promise.resolve({data:r,init:n?t:null})},be("shaka.transmuxer.Ac3Transmuxer",Xo),Xo.prototype.transmux=Xo.prototype.transmux,Xo.prototype.getOriginalMimeType=Xo.prototype.getOriginalMimeType,Xo.prototype.convertCodecs=Xo.prototype.convertCodecs,Xo.prototype.isSupported=Xo.prototype.isSupported,Xo.prototype.destroy=Xo.prototype.destroy,os("audio/ac3",function(){return new Xo("audio/ac3")},ws);function Ix(e,t){if(t+8>e.length||(e[t]<<8|e[t+1]<<0)!==2935)return null;var n=new fa(e.subarray(t+2));ho(n,2),ho(n,3);var r=on(n,11)+1<<1,i=on(n,2);if(i==3){i=on(n,2),i=[24e3,22060,16e3][i];var o=3}else i=[48e3,44100,32e3][i],o=on(n,2);var s=on(n,3),a=on(n,1);return n=on(n,5),t+r>e.byteLength?null:(e=Math.floor(r*i/([1,2,3,6][o]*16)),e=new Uint8Array([(e&8160)>>5,(e&31)<<3,i<<6|n<<1|0,0|s<<1|a<<0,0]),{sampleRate:i,channelCount:[2,1,2,3,3,4,4,5][s]+a,Ha:e,ra:r})}function Yo(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=Yo.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/ec3"?Ni(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/ec3"?'audio/mp4; codecs="ec-3"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,r){e=xt(e);for(var i=Wu(e),o=i.length;o<e.length&&(e[o]<<8|e[o+1]<<0)!==2935;o++);var s=n.endTime*1e3;i=Su(i),i.length&&n&&(i=i.find(function(h){return h.description==="com.apple.streaming.transportStreamTimestamp"}))&&(s=i.data),i=0;for(var a=new Uint8Array([]),u=[];o<e.length;){var l=Ix(e,o);if(!l)return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,i=l.sampleRate,a=l.Ha,u.push({data:e.subarray(o,o+l.ra),size:l.ra,duration:1536,ob:0,flags:ks}),o+=l.ra}return e=Math.floor(s*i/1e3),r={id:t.id,type:"audio",codecs:"ec-3",timescale:i,duration:r,yb:[],Ha:a,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:e,sb:u},stream:t},r=new Hu([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Gu(r),this.g.set(n,t)),n=this.i!==t,r=zl(r),this.i=t,this.h++,Promise.resolve({data:r,init:n?t:null})},be("shaka.transmuxer.Ec3Transmuxer",Yo),Yo.prototype.transmux=Yo.prototype.transmux,Yo.prototype.getOriginalMimeType=Yo.prototype.getOriginalMimeType,Yo.prototype.convertCodecs=Yo.prototype.convertCodecs,Yo.prototype.isSupported=Yo.prototype.isSupported,Yo.prototype.destroy=Yo.prototype.destroy,os("audio/ec3",function(){return new Yo("audio/ec3")},ws);function hb(e){if(!e.length)return null;var t=e.find(function(k){return k.type==7});if(e=e.find(function(k){return k.type==8}),!t||!e)return null;var n=new fa(t.data),r=Ln(n);if(Ln(n),Ln(n),di(n),gb.includes(r)&&(r=pt(n),r===3&&ho(n,1),di(n),di(n),ho(n,1),Ct(n))){r=r!==3?8:12;for(var i=0;i<r;i++)Ct(n)&&(i<6?Af(n,16):Af(n,64))}if(di(n),r=pt(n),r===0)pt(n);else if(r===1)for(ho(n,1),di(n),di(n),r=pt(n),i=0;i<r;i++)di(n);di(n),ho(n,1);var o=pt(n),s=pt(n),a=on(n,1);a===0&&ho(n,1),ho(n,1);var u=0,l=0,h=0,g=0;if(Ct(n)&&(u=pt(n),l=pt(n),h=pt(n),g=pt(n)),i=r=1,Ct(n)&&Ct(n)){var m=Ln(n),S=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],A=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];m>0&&m<=16?(r=S[m-1],i=A[m-1]):m===255&&(r=on(n,16),i=on(n,16))}return n=(2-a)*(s+1)*16-h*2-g*2,o=(o+1)*16-u*2-l*2,u=[],t=t.fullData,u.push(t.byteLength>>>8&255),u.push(t.byteLength&255),u=u.concat.apply(u,M(t)),t=[],e=e.fullData,t.push(e.byteLength>>>8&255),t.push(e.byteLength&255),t=t.concat.apply(t,M(e)),e=new Uint8Array([1,u[3],u[4],u[5],255,225].concat(u,[1],t)),{height:n,width:o,Ta:e,Za:r,$a:i}}function pb(e){function t(A){i={data:new Uint8Array([]),frame:!1,isKeyframe:!1,pts:A.pts,dts:A.dts,nalus:[]}}function n(){if(i&&i.nalus.length&&i.frame){for(var A=[],k=d(i.nalus),b=k.next();!b.done;b=k.next()){b=b.value;var V=b.fullData.byteLength,B=new Uint8Array(4);B[0]=V>>24&255,B[1]=V>>16&255,B[2]=V>>8&255,B[3]=V&255,A.push(B),A.push(b.fullData)}i.data=dr.apply(Sr,M(A)),r.push(i)}}for(var r=[],i=null,o=!1,s=0;s<e.length;s++){var a=e[s],u=a.nalus,l=!1;i&&u.length&&!o&&(n(),t(a)),u=d(a.nalus);for(var h=u.next();!h.done;h=u.next()){h=h.value;var g=!1;switch(h.type){case 1:var m=!1;g=!0;var S=h.data;l&&S.length>4&&(S=aI(new fa(S)),S===2||S===4||S===7||S===9)&&(m=!0),m&&i&&i.frame&&!i.isKeyframe&&(n(),i=null),i||t(a),i.frame=!0,i.isKeyframe=m;break;case 5:g=!0,i&&i.frame&&!i.isKeyframe&&(n(),i=null),i||t(a),i.frame=!0,i.isKeyframe=!0;break;case 6:g=!0;break;case 7:l=g=!0;break;case 8:g=!0;break;case 9:o=g=!0,i&&i.frame&&(n(),i=null),i||t(a);break;case 12:g=!0;break;default:g=!1}i&&g&&i.nalus.push(h)}}return n(),r}var gb=[100,110,122,244,44,83,86,118,128,138,139,134];function mb(e){if(!e.length)return null;var t=e.find(function(s){return s.type==32}),n=e.find(function(s){return s.type==33}),r=e.find(function(s){return s.type==34});if(!t||!n||!r)return null;var i=vb(t.fullData);e=yb(n.fullData);var o=Sb(r.fullData);return t=Tb(t.fullData,n.fullData,r.fullData,{Ug:i.Ug,Bh:i.Bh,Cg:e.Cg,Dg:e.Dg,wg:e.wg,Bg:e.Bg,xg:e.xg,yg:e.yg,zg:e.zg,Ag:e.Ag,pg:e.pg,qg:e.qg,rg:e.rg,sg:e.sg,ug:e.ug,vg:e.vg,pf:e.pf,eg:e.eg,dg:e.dg,cg:e.cg,Wg:o.Wg,og:e.og,ng:e.ng}),{height:e.height,width:e.width,Ta:t,Za:e.Sk,$a:e.Rk}}function vb(e){var t=new fa(e,!0);return Ln(t),Ln(t),on(t,4),on(t,2),on(t,6),e=on(t,3),t=Ct(t),{Ug:e+1,Bh:t}}function yb(e){e=new fa(e,!0),Ln(e),Ln(e);var t=0,n=0,r=0,i=0;on(e,4);var o=on(e,3);Ct(e);for(var s=on(e,2),a=on(e,1),u=on(e,5),l=Ln(e),h=Ln(e),g=Ln(e),m=Ln(e),S=Ln(e),A=Ln(e),k=Ln(e),b=Ln(e),V=Ln(e),B=Ln(e),Z=Ln(e),ae=[],pe=[],te=0;te<o;te++)ae.push(Ct(e)),pe.push(Ct(e));if(o>0)for(te=o;te<8;te++)on(e,2);for(te=0;te<o;te++)ae[te]&&on(e,88),pe[te]&&Ln(e);pt(e),ae=pt(e),ae==3&&on(e,1),pe=pt(e),te=pt(e),Ct(e)&&(t+=pt(e),n+=pt(e),r+=pt(e),i+=pt(e));var le=pt(e),ie=pt(e),ye=pt(e);if(Ct(e))for(var ce=0;ce<=o;ce++)pt(e),pt(e),pt(e);else pt(e),pt(e),pt(e);if(pt(e),pt(e),pt(e),pt(e),pt(e),pt(e),Ct(e)&&Ct(e))for(ce=0;ce<4;ce++)for(var Ee=0;Ee<(ce===3?2:6);Ee++)if(Ct(e)){var Se=Math.min(64,1<<4+(ce<<1));ce>1&&$u(e);for(var Ve=0;Ve<Se;Ve++)$u(e)}else pt(e);for(Ct(e),Ct(e),Ct(e)&&(Ln(e),pt(e),pt(e),Ct(e)),ce=pt(e),Se=Ee=0;Se<ce;Se++)if(Ve=!1,Se!==0&&(Ve=Ct(e)),Ve){Se===ce&&pt(e),Ct(e),pt(e);for(var Le=Ve=0;Le<=Ee;Le++){var Ce=Ct(e),ke=!1;Ce||(ke=Ct(e)),(Ce||ke)&&Ve++}Ee=Ve}else{for(Le=pt(e),Ve=pt(e),Ee=Le+Ve,Ce=0;Ce<Le;Ce++)pt(e),Ct(e);for(Le=0;Le<Ve;Le++)pt(e),Ct(e)}if(Ct(e))for(ce=pt(e),Ee=0;Ee<ce;Ee++){for(Se=0;Se<ye+4;Se++)on(e,1);on(e,1)}if(ce=ye=1,Ee=!0,Se=1,Le=Ve=0,Ct(e),Ct(e),Ct(e)){if(Ct(e)){Ce=Ln(e),ke=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2];var Ge=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Ce>0&&Ce<=16?(ye=ke[Ce-1],ce=Ge[Ce-1]):Ce===255&&(ye=on(e,16),ce=on(e,16))}if(Ct(e)&&Ct(e),Ct(e)&&(on(e,3),Ct(e),Ct(e)&&(Ln(e),Ln(e),Ln(e))),Ct(e)&&(pt(e),pt(e)),Ct(e),Ct(e),Ct(e),(Ce=Ct(e))&&(di(e),di(e),di(e),di(e)),Ct(e)&&(Se=on(e,32),Ve=on(e,32),Ct(e)&&pt(e),Ct(e))){Ge=!1,Ce=Ct(e),ke=Ct(e),(Ce||ke)&&((Ge=Ct(e))&&(Ln(e),on(e,5),Ct(e),on(e,5)),on(e,4),on(e,4),Ge&&on(e,4),on(e,5),on(e,5),on(e,5));for(var Je=0;Je<=o;Je++){Ee=Ct(e);var Ft=!0,dt=1;Ee||(Ft=Ct(e));var kn=!1;if(Ft?pt(e):kn=Ct(e),kn||(dt=pt(e)+1),Ce){for(Ft=0;Ft<dt;Ft++)pt(e),pt(e),Ge&&(pt(e),pt(e));Ct(e)}if(ke){for(Ft=0;Ft<dt;Ft++)pt(e),pt(e),Ge&&(pt(e),pt(e));Ct(e)}}}Ct(e)&&(Ct(e),Ct(e),Ct(e),Le=pt(e),pt(e),pt(e),pt(e),pt(e))}return{wg:Z,Cg:s,Dg:a,Bg:u,xg:l,yg:h,zg:g,Ag:m,pg:S,qg:A,rg:k,sg:b,ug:V,vg:B,pf:Le,eg:ae,dg:le,cg:ie,width:pe-(t+n)*(ae===1||ae===2?2:1),height:te-(r+i)*(ae===1?2:1),Sk:ye,Rk:ce,og:Ve/Se,ng:Ee}}function Sb(e){var t=new fa(e,!0);Ln(t),Ln(t),pt(t),pt(t),Ct(t),Ct(t),on(t,3),Ct(t),Ct(t),pt(t),pt(t),$u(t),Ct(t),Ct(t),Ct(t)&&pt(t),$u(t),$u(t),Ct(t),Ct(t),Ct(t),Ct(t),e=Ct(t),t=Ct(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{Wg:n}}function Tb(e,t,n,r){var i=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));for(i[0]=1,i[1]=(r.Cg&3)<<6|(r.Dg?1:0)<<5|r.Bg&31,i[2]=r.xg,i[3]=r.yg,i[4]=r.zg,i[5]=r.Ag,i[6]=r.pg,i[7]=r.qg,i[8]=r.rg,i[9]=r.sg,i[10]=r.ug,i[11]=r.vg,i[12]=r.wg,i[13]=240|(r.pf&3840)>>8,i[14]=r.pf&255,i[15]=252|r.Wg&3,i[16]=252|r.eg&3,i[17]=248|r.dg&7,i[18]=248|r.cg&7,i[19]=0,i[20]=parseInt(r.og,10),i[21]=((r.ng?1:0)&3)<<6|(r.Ug&7)<<3|(r.Bh?1:0)<<2|3,i[22]=3,e=[e,t,n],t=23,n=e.length-1,r=0;r<e.length;r+=1)i.set(new Uint8Array([32+r|(r===n?128:0),0,1]),t),t+=3,i.set(new Uint8Array([e[r].byteLength>>8,e[r].byteLength&255]),t),t+=2,i.set(e[r],t),t+=e[r].byteLength;return i}function hh(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,o=e[t+2]>>2&3;if(n!==1&&i!==0&&i!==15&&o!==3){var s=e[t+3]>>6;i=Eb[(n===3?3-r:r===3?3:4)*14+i-1]*1e3,o=xb[(n===3?0:n===2?1:2)*3+o],n=wb[n][r];var a=Ab[r],u=Math.floor(n*i/o+(e[t+2]>>1&1))*a,l=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(l=l?parseInt(l[1],10):0)&&l<=87&&r===2&&i>=224e3&&s===0&&(e[t+3]|=128),{sampleRate:o,channelCount:s===3?1:2,ra:u,Qk:n*8*a}}return null}function Cx(e,t){return e[t]===255&&(e[t+1]&224)===224&&(e[t+1]&6)!==0}function Mx(e,t){if(t+1<e.length&&Cx(e,t)){var n=hh(e,t),r=4;return n&&n.ra&&(r=n.ra),t+=r,t===e.length||t+1<e.length&&Cx(e,t)}return!1}var Eb=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],xb=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],wb=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Ab=[0,1,1,4];function Jo(e){this.j=e,this.h=0,this.g=new Map,this.i=null}f=Jo.prototype,f.destroy=function(){this.g.clear()},f.isSupported=function(e){return e.toLowerCase().split(";")[0]=="audio/mpeg"?Ni(this.convertCodecs("audio",e)):!1},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="audio/mpeg"?'audio/mp4; codecs="mp3"':t},f.getOriginalMimeType=function(){return this.j},f.transmux=function(e,t,n,r){for(var i=xt(e),o=Wu(i).length;o<i.length&&!Mx(i,o);o++);var s;for(e=[];o<i.length;){var a=hh(i,o);if(!a)return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));s||(s=a),o+a.ra<=i.length&&e.push({data:i.subarray(o,o+a.ra),size:a.ra,duration:1152,ob:0,flags:ks}),o+=a.ra}return s?(i=s.Qk*9e4/s.sampleRate*this.h,r={id:t.id,type:"audio",codecs:"mp3",timescale:s.sampleRate,duration:r,yb:[],Ha:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.h,baseMediaDecodeTime:i,sb:e},stream:t},r=new Hu([r]),n=t.id+"_"+n.i,this.g.has(n)?t=this.g.get(n):(t=Gu(r),this.g.set(n,t)),n=this.i!==t,r=zl(r),this.i=t,this.h++,Promise.resolve({data:r,init:n?t:null})):Promise.reject(new fe(2,3,3018,n?n.R()[0]:null))},be("shaka.transmuxer.Mp3Transmuxer",Jo),Jo.prototype.transmux=Jo.prototype.transmux,Jo.prototype.getOriginalMimeType=Jo.prototype.getOriginalMimeType,Jo.prototype.convertCodecs=Jo.prototype.convertCodecs,Jo.prototype.isSupported=Jo.prototype.isSupported,Jo.prototype.destroy=Jo.prototype.destroy,os("audio/mpeg",function(){return new Jo("audio/mpeg")},ws);function Qo(e){this.h=e,this.g=null}f=Qo.prototype,f.destroy=function(){},f.isSupported=function(e){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var t=yi(e).split(","),n=ti("audio",t);return t=ti("video",t),!n||t||ri(n)!="mp3"?!1:Ni(this.convertCodecs("audio",e))},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?"audio/mpeg":t},f.getOriginalMimeType=function(){return this.h},f.transmux=function(e,t,n,r,i){if(this.g?this.g.clearData():this.g=new er,this.g.Ff(n.i),e=xt(e),e=this.g.parse(e),e.Sd().audio!="mp3"||i!="audio")return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));for(n=new Uint8Array([]),i=d(e.qb()),e=i.next();!e.done;e=i.next())if(e=e.value.data)for(t=0;t<e.length;)(r=hh(e,t))?(t+r.ra<=e.length&&(n=dr(n,e.subarray(t,t+r.ra))),t+=r.ra):t++;return Promise.resolve(n)},be("shaka.transmuxer.MpegTsTransmuxer",Qo),Qo.prototype.transmux=Qo.prototype.transmux,Qo.prototype.getOriginalMimeType=Qo.prototype.getOriginalMimeType,Qo.prototype.convertCodecs=Qo.prototype.convertCodecs,Qo.prototype.isSupported=Qo.prototype.isSupported,Qo.prototype.destroy=Qo.prototype.destroy,os("video/mp2t",function(){return new Qo("video/mp2t")},Dr);/*
93
- @license
94
- MSS Transmuxer
95
- Copyright 2015 Dash Industry Forum
96
- SPDX-License-Identifier: BSD-3-Clause
97
- */function No(e){this.h=e,(this.g=Ug.get("ISOBoxer")())&&Ib(this)}function Ib(e){function t(){this._procFullBox(),this.flags&1&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,function(n){this._procEntryField(n,"InitializationVector","data",8),this.flags&2&&(this._procEntryField(n,"NumberOfEntries","uint",16),this._procSubEntries(n,"clearAndCryptedData",n.NumberOfEntries,function(r){this._procEntryField(r,"BytesOfClearData","uint",16),this._procEntryField(r,"BytesOfEncryptedData","uint",32)}))})}e.g.addBoxProcessor("saio",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",this.version===1?64:32)}),e.g.addBoxProcessor("saiz",function(){this._procFullBox(),this.flags&1&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),this.default_sample_info_size===0&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)}),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",function(){for(var n=!0,r=0;r<16;r++)this.usertype[r]!==Cb[r]&&(n=!1);n&&(this._parsing&&(this.type="sepiff"),t.call(this))})}f=No.prototype,f.destroy=function(){},f.isSupported=function(e,t){var n=e.startsWith("mss/");return!this.g||!n?!1:t?Ni(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Ni(t)||Ni(e))},f.convertCodecs=function(e,t){return t.replace("mss/","")},f.getOriginalMimeType=function(){return this.h},f.transmux=function(e,t,n){if(!n)return Promise.resolve(xt(e));if(!t.mssPrivateData)return Promise.reject(new fe(2,3,3020,n?n.R()[0]:null));try{var r,i=this.g.parseBuffer(e),o=i.fetch("tfhd");o.track_ID=t.id+1;var s=i.fetch("tfdt"),a=i.fetch("traf");s===null&&(s=this.g.createFullBox("tfdt",a,o),s.version=1,s.flags=0,s.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var u=i.fetch("trun"),l=i.fetch("tfxd");l&&l._parent.boxes.splice(l._parent.boxes.indexOf(l),1);var h=i.fetch("tfrf");h&&h._parent.boxes.splice(h._parent.boxes.indexOf(h),1);var g=i.fetch("sepiff");if(g!==null){g.type="senc",g.usertype=void 0;var m=i.fetch("saio");if(m===null){m=this.g.createFullBox("saio",a),m.version=0,m.flags=0,m.entry_count=1,m.offset=[0];var S=this.g.createFullBox("saiz",a);if(S.version=0,S.flags=0,S.sample_count=g.sample_count,S.default_sample_info_size=0,S.sample_info_size=[],g.flags&2)for(r=0;r<g.sample_count;r+=1)S.sample_info_size[r]=10+6*g.entry[r].NumberOfEntries;else S.default_sample_info_size=8}}o.flags&=16777214,o.flags|=131072,u.flags|=1;var A=i.fetch("moof");u.data_offset=A.getLength()+8;var k=i.fetch("saio");k!==null&&(k.offset[0]=Px(A,"traf")+Px(a,"senc")+16);var b=xt(i.write());return Promise.resolve(b)}catch(V){return V instanceof fe?Promise.reject(V):Promise.reject(new fe(2,3,3022,n?n.R()[0]:null))}};function Px(e,t){for(var n=8,r=0;r<e.boxes.length&&e.boxes[r].type!==t;r++)n+=e.boxes[r].size;return n}be("shaka.transmuxer.MssTransmuxer",No),No.prototype.transmux=No.prototype.transmux,No.prototype.getOriginalMimeType=No.prototype.getOriginalMimeType,No.prototype.convertCodecs=No.prototype.convertCodecs,No.prototype.isSupported=No.prototype.isSupported,No.prototype.destroy=No.prototype.destroy;var Cb=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);os("mss/audio/mp4",function(){return new No("mss/audio/mp4")},ws),os("mss/video/mp4",function(){return new No("mss/video/mp4")},ws);function Zo(e){this.m=e,this.g=0,this.j=new Map,this.l=this.i=this.h=null}f=Zo.prototype,f.destroy=function(){this.j.clear(),this.i&&this.i.destroy()},f.isSupported=function(e,t){if(e.toLowerCase().split(";")[0]!="video/mp2t")return!1;var n=e;t&&(n=this.convertCodecs(t,e));var r=yi(n).split(",");return n=ti("audio",r),r=ti("video",r),n&&(n=ri(n),!Mb.includes(n))||r&&(n=ri(r),!Pb.includes(n))?!1:t?Ni(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Ni(t)||Ni(e))},f.convertCodecs=function(e,t){return t.toLowerCase().split(";")[0]=="video/mp2t"?(t=yi(t).replace("mp4a.40.34","mp3").split(",").map(function(n){return ze(n,"audio/mp4")}).map(Pt).join(","),e=="audio"?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},f.getOriginalMimeType=function(){return this.m},f.transmux=function(e,t,n,r,i){var o=xt(e);if(i=="audio"&&!Xu(o)){for(var s=Wu(o),a=s.length;a<o.length;a++)if(Mx(o,a))return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));for(a=s.length;a<o.length;a++)if(Ex(o,a))return this.i||(this.i=new Do("audio/aac")),this.i.transmux(e,t,n,r,i);return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null))}this.h?this.h.clearData():this.h=new er,this.h.Ff(n.i);var u=this.h.parse(o),l=[],h=u.Sd();try{var g=null;if(i=="video"){switch(h.video){case"avc":var m=[],S=null,A=u.nd(),k=pb(A);if(!k.length)throw new fe(2,3,3023,n?n.R()[0]:null);for(var b=0;b<k.length;b++){var V=k[b];S==null&&(S=V.dts);var B=void 0;B=b+1<k.length?(k[b+1].dts||0)-(V.dts||0):k.length>1?(V.dts||0)-(k[b-1].dts||0):(n.endTime-n.startTime)*9e4,m.push({data:V.data,size:V.data.byteLength,duration:B,ob:Math.round((V.pts||0)-(V.dts||0)),flags:V.isKeyframe?xx:wx})}for(var Z=[],ae=d(A),pe=ae.next();!pe.done;pe=ae.next())Z.push.apply(Z,M(pe.value.nalus));var te=hb(Z);if(!te||S==null)throw new fe(2,3,3018,n?n.R()[0]:null);t.height=t.height||te.height,t.width=t.width||te.width,g={id:t.id,type:"video",codecs:"avc1",timescale:9e4,duration:r,yb:[],Ha:new Uint8Array([]),Ta:te.Ta,Za:te.Za,$a:te.$a,data:{sequenceNumber:this.g,baseMediaDecodeTime:S,sb:m},stream:t};break;case"hvc":var le=[],ie=null,ye=[],ce=u.nd();if(!ce.length)throw new fe(2,3,3023,n?n.R()[0]:null);for(var Ee=0;Ee<ce.length;Ee++){var Se=ce[Ee],Ve=Se.nalus;ye.push.apply(ye,M(Ve));for(var Le=!1,Ce=[],ke=!1,Ge=d(Ve),Je=Ge.next();!Je.done;Je=Ge.next()){var Ft=Je.value;switch(Ft.type){case 1:case 0:var dt=ke=!0;break;case 19:case 20:case 21:Le=dt=ke=!0;break;case 32:dt=!0;break;case 33:dt=!0;break;case 34:dt=!0;break;case 35:ke=dt=!0;break;case 39:case 40:dt=!0;break;default:dt=!1}if(ke&&dt){var kn=Ft.fullData.byteLength,Ut=new Uint8Array(4);Ut[0]=kn>>24&255,Ut[1]=kn>>16&255,Ut[2]=kn>>8&255,Ut[3]=kn&255,Ce.push(Ut),Ce.push(Ft.fullData)}}var Gn=Ce.length?{data:dr.apply(Sr,M(Ce)),isKeyframe:Le}:null;if(Gn){ie==null&&Se.dts!=null&&(ie=Se.dts);var sn=void 0;sn=Ee+1<ce.length?(ce[Ee+1].dts||0)-(Se.dts||0):ce.length>1?(Se.dts||0)-(ce[Ee-1].dts||0):(n.endTime-n.startTime)*9e4,le.push({data:Gn.data,size:Gn.data.byteLength,duration:sn,ob:Math.round((Se.pts||0)-(Se.dts||0)),flags:Gn.isKeyframe?xx:wx})}}var Qt=mb(ye);if(!Qt||ie==null)throw new fe(2,3,3018,n?n.R()[0]:null);t.height=t.height||Qt.height,t.width=t.width||Qt.width,g={id:t.id,type:"video",codecs:"hvc1",timescale:9e4,duration:r,yb:[],Ha:new Uint8Array([]),Ta:Qt.Ta,Za:Qt.Za,$a:Qt.$a,data:{sequenceNumber:this.g,baseMediaDecodeTime:ie,sb:le},stream:t}}g&&(l.push(g),g=null)}if(i=="audio"){switch(h.audio){case"aac":for(var hn=[],An,pn=null,Zt=null,an=null,Zr=d(u.qb()),Hr=Zr.next();!Hr.done;Hr=Zr.next()){var Lo=Hr.value,ro=Lo.data;if(ro){var zi=0;if(Zt==-1&&an)ro=dr(an,Lo.data),Zt=null;else if(Zt!=null&&an){zi=Math.max(0,Zt);var Cu=dr(an,ro.subarray(0,zi));hn.push({data:Cu,size:Cu.byteLength,duration:1024,ob:0,flags:ks}),Zt=an=null}if(An=Tx(ro,zi),!An)throw new fe(2,3,3018,n?n.R()[0]:null);for(t.audioSamplingRate=An.sampleRate,t.channelsCount=An.channelCount,pn==null&&Lo.pts!==null&&(pn=Lo.pts);zi<ro.length;){var Ta=Sx(ro,zi);if(!Ta){an=ro.subarray(zi,ro.length),Zt=-1;break}var fs=Ta.Xd+Ta.ra;Zt=Math.max(0,zi+fs-ro.length),Zt!=0?an=ro.subarray(zi+Ta.Xd,zi+fs):zi+fs<=ro.length&&hn.push({data:ro.subarray(zi+Ta.Xd,zi+fs),size:Ta.ra,duration:1024,ob:0,flags:ks}),zi+=fs}}}if(!An||pn==null){pn=n.startTime*9e4;var Al=ti("audio",t.codecs.split(","));if(!Al||!t.channelsCount||!t.audioSamplingRate)throw new fe(2,3,3018,n?n.R()[0]:null);An={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,codec:Al};var Il=fb(Al,t.channelsCount);if(!Il)throw new fe(2,3,3018,n?n.R()[0]:null);for(var ph=pn+(n.endTime-n.startTime)*9e4,ds=pn;ds<ph;)hn.push({data:Il,size:Il.byteLength,duration:1024,ob:0,flags:ks}),ds+=1024/An.sampleRate*9e4}var gh=An.sampleRate,Gm=pn/9e4*gh;g={id:t.id,type:"audio",codecs:An.codec,timescale:gh,duration:r,yb:[],Ha:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:Gm,sb:hn},stream:t};break;case"ac3":for(var mh=[],Cl=0,zc=new Uint8Array([]),Gr=null,vo=d(u.qb()),$i=vo.next();!$i.done;$i=vo.next()){var Km=$i.value,Wm=Km.data;Gr==null&&Km.pts!==null&&(Gr=Km.pts);for(var Ml=0;Ml<Wm.length;){var $a=Ax(Wm,Ml);$a?(t.audioSamplingRate=$a.sampleRate,t.channelsCount=$a.channelCount,Cl=$a.sampleRate,zc=$a.Ha,mh.push({data:Wm.subarray(Ml,Ml+$a.ra),size:$a.ra,duration:1536,ob:0,flags:ks}),Ml+=$a.ra):Ml++}}if(Cl==0||zc.byteLength==0||Gr==null)throw new fe(2,3,3018,n?n.R()[0]:null);var kb=Gr/9e4*Cl;g={id:t.id,type:"audio",codecs:"ac-3",timescale:Cl,duration:r,yb:[],Ha:zc,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:kb,sb:mh},stream:t};break;case"ec3":for(var bx=[],vh=0,zm=new Uint8Array([]),yh=null,Rx=d(u.qb()),$m=Rx.next();!$m.done;$m=Rx.next()){var Xm=$m.value,Ym=Xm.data;yh==null&&Xm.pts!==null&&(yh=Xm.pts);for(var Pl=0;Pl<Ym.length;){var Xa=Ix(Ym,Pl);Xa?(t.audioSamplingRate=Xa.sampleRate,t.channelsCount=Xa.channelCount,vh=Xa.sampleRate,zm=Xa.Ha,bx.push({data:Ym.subarray(Pl,Pl+Xa.ra),size:Xa.ra,duration:1536,ob:0,flags:ks}),Pl+=Xa.ra):Pl++}}if(vh==0||zm.byteLength==0||yh==null)throw new fe(2,3,3018,n?n.R()[0]:null);var bb=yh/9e4*vh;g={id:t.id,type:"audio",codecs:"ec-3",timescale:vh,duration:r,yb:[],Ha:zm,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:bb,sb:bx},stream:t};break;case"mp3":for(var Ox=[],Sh,Th=null,Dx=d(u.qb()),Jm=Dx.next();!Jm.done;Jm=Dx.next()){var Qm=Jm.value,$c=Qm.data;if($c){Th==null&&Qm.pts!==null&&(Th=Qm.pts);for(var Mu=0;Mu<$c.length;){var kl=hh($c,Mu);kl?(Sh||(Sh=kl),Mu+kl.ra<=$c.length&&Ox.push({data:$c.subarray(Mu,Mu+kl.ra),size:kl.ra,duration:1152,ob:0,flags:ks}),Mu+=kl.ra):Mu++}}}if(!Sh||Th==null)throw new fe(2,3,3018,n?n.R()[0]:null);var Nx=Sh.sampleRate,Rb=Th/9e4*Nx;g={id:t.id,type:"audio",codecs:"mp3",timescale:Nx,duration:r,yb:[],Ha:new Uint8Array([]),Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:Rb,sb:Ox},stream:t};break;case"opus":var Lx=[],Eh=null,Ks=u.H;if(!Ks)throw new fe(2,3,3018,n?n.R()[0]:null);var Xi=[];switch(Ks.rj){case 1:case 2:Xi=[0];break;case 0:Xi=[255,1,1,0,1];break;case 128:Xi=[255,2,0,0,1];break;case 3:Xi=[1,2,1,0,2,1];break;case 4:Xi=[1,2,2,0,1,2,3];break;case 5:Xi=[1,3,2,0,4,1,2,3];break;case 6:Xi=[1,4,2,0,4,1,2,3,5];break;case 7:Xi=[1,4,2,0,4,1,2,3,5,6];break;case 8:Xi=[1,5,3,0,6,1,2,3,4,5,7];break;case 130:Xi=[1,1,2,0,1];break;case 131:Xi=[1,1,3,0,1,2];break;case 132:Xi=[1,1,4,0,1,2,3];break;case 133:Xi=[1,1,5,0,1,2,3,4];break;case 134:Xi=[1,1,6,0,1,2,3,4,5];break;case 135:Xi=[1,1,7,0,1,2,3,4,5,6];break;case 136:Xi=[1,1,8,0,1,2,3,4,5,6,7]}for(var jx=new Uint8Array([0,Ks.channelCount,0,0,Ks.sampleRate>>>24&255,Ks.sampleRate>>>17&255,Ks.sampleRate>>>8&255,Ks.sampleRate>>>0&255,0,0].concat(M(Xi))),Fx=Ks.sampleRate,Ux=d(u.qb()),Zm=Ux.next();!Zm.done;Zm=Ux.next()){var qm=Zm.value,bl=qm.data;Eh==null&&qm.pts!==null&&(Eh=qm.pts);for(var Xc=0;Xc<bl.length;){for(var Ob=(bl[Xc+1]&16)!==0,Db=(bl[Xc+1]&8)!==0,Ea=Xc+2,xh=0;bl[Ea]===255;)xh+=255,Ea+=1;xh+=bl[Ea],Ea+=1,Ea+=Ob?2:0,Ea+=Db?2:0;var Bx=bl.slice(Ea,Ea+xh);Lx.push({data:Bx,size:Bx.byteLength,duration:960,ob:0,flags:ks}),Xc=Ea+xh}}if(jx.byteLength==0||Eh==null)throw new fe(2,3,3018,n?n.R()[0]:null);t.audioSamplingRate=Ks.sampleRate,t.channelsCount=Ks.channelCount;var Nb=Eh/9e4*Fx;g={id:t.id,type:"audio",codecs:"opus",timescale:Fx,duration:r,yb:[],Ha:jx,Ta:new Uint8Array([]),Za:0,$a:0,data:{sequenceNumber:this.g,baseMediaDecodeTime:Nb,sb:Lx},stream:t}}g&&(l.push(g),g=null)}}catch(tv){return tv&&tv.code==3023?Promise.resolve(new Uint8Array([])):Promise.reject(tv)}if(!l.length)return Promise.reject(new fe(2,3,3018,n?n.R()[0]:null));var Vx=new Hu(l),ev=t.id+"_"+n.i;if(this.j.has(ev))var Yc=this.j.get(ev);else Yc=Gu(Vx),this.j.set(ev,Yc);var Lb=this.l!==Yc,jb=zl(Vx);return this.l=Yc,this.g++,Promise.resolve({data:jb,init:Lb?Yc:null})},be("shaka.transmuxer.TsTransmuxer",Zo),Zo.prototype.transmux=Zo.prototype.transmux,Zo.prototype.getOriginalMimeType=Zo.prototype.getOriginalMimeType,Zo.prototype.convertCodecs=Zo.prototype.convertCodecs,Zo.prototype.isSupported=Zo.prototype.isSupported,Zo.prototype.destroy=Zo.prototype.destroy;var Mb=["aac","ac-3","ec-3","mp3","opus"],Pb=["avc","hevc"];os("video/mp2t",function(){return new Zo("video/mp2t")},Ou);function kx(){}P(kx,qi),be("shaka.util.FairPlayUtils",kx)}).call(T,p,p,void 0);for(var L in T.shaka)me[L]=T.shaka[L]})()})(av);const hs=Jx(av);function Qx(me,p){let T;const L=()=>{T&&(globalThis.clearTimeout(T),T=void 0)},R=f=>{p.state.mediaState!==f&&(p.state.mediaState=f,p.playerEvents.emit({eventName:jt.MediaStateChanged,value:f}))},de=f=>{if(L(),f!==li.BUFFERING){R(f);return}T=globalThis.setTimeout(()=>{R(li.BUFFERING)},Jc.BUFFER_STATE_TRIGGER_DELAY_MS)},E={playing:()=>de(li.PLAY),pause:()=>de(li.PAUSE),timeupdate:()=>{me.paused||de(li.PLAY)},loadstart:()=>de(li.BUFFERING),loadeddata:()=>de(li.READY),error:()=>de(li.ERROR),waiting:()=>uv(me)&&de(li.BUFFERING),stalled:()=>uv(me)&&de(li.BUFFERING),suspend:()=>me.readyState<2&&de(li.BUFFERING),seeked:()=>{p.state.mediaState!==li.ENDED&&de(me.paused?li.PAUSE:li.PLAY)},canplay:()=>{L(),p.state.mediaState===li.BUFFERING&&de(me.paused?li.READY:li.PLAY)},ended:()=>{var f;if((f=p.isLive)!=null&&f.call(p))return console.error("Live stream ended unexpectedly");de(li.ENDED)}};for(const[f,c]of Object.entries(E))me.addEventListener(f,c);return()=>{L();for(const[f,c]of Object.entries(E))me.removeEventListener(f,c)}}function uv(me){return me.readyState<HTMLMediaElement.HAVE_FUTURE_DATA}class zt extends Error{constructor({code:T,message:L,original:R,silent:de}){super(L);De(this,"code");De(this,"original");De(this,"silent",!1);this.code=T,this.original=R,this.silent=de??!1,Object.setPrototypeOf(this,zt.prototype)}}const jo=class jo{constructor(p){De(this,"errorListeners",[]);De(this,"resetListeners",[]);De(this,"warningListeners",[]);De(this,"npoPlayerRef");De(this,"debounceCleanup");De(this,"isDestroyed",!1);if(!p)throw new Error("Player is required for first initialization");this.npoPlayerRef=p,jo._lastInstance=this,this.attachGlobalErrorHandlers()}destroy(){this.isDestroyed=!0,this.debounceCleanup&&(this.debounceCleanup(),this.debounceCleanup=void 0),jo._lastInstance===this&&(jo._lastInstance=void 0),this.errorListeners.length=0,this.resetListeners.length=0,this.warningListeners.length=0,this.npoPlayerRef=void 0}attachGlobalErrorHandlers(){const p=globalThis.window;if(jo.globalHandlersAttached||p===void 0)return;const T=R=>{var f;const de=jo._lastInstance;if(!de)return;const E=R.error??R;if((f=R.message)!=null&&f.includes("ResizeObserver")){jo.handleSilentError(E);return}de.handleError({errorEvent:E})},L=R=>{const de=jo._lastInstance;de&&de.handleError({errorEvent:R.reason??R})};p.addEventListener("error",T),p.addEventListener("unhandledrejection",L),jo.globalHandlersAttached=!0}setNpoPlayerRef(p){this.npoPlayerRef=p}onError(p){this.errorListeners.push(p)}onReset(p){this.resetListeners.push(p)}onWarning(p){this.warningListeners.push(p)}static handleSilentError(p){const T=jo._lastInstance;p.silent=!0,T==null||T.handleError({errorEvent:p})}handleError(p){var I;const{errorEvent:T,customErrorMessageOverlayConfig:L,emitError:R}=p,de=(T==null?void 0:T.status)??(T==null?void 0:T.code)??((I=T==null?void 0:T.detail)==null?void 0:I.code)??rv,E=ov[rv],f=(L==null?void 0:L[de])||ov[de]||E;console.error(`${de} - ${T.message||f}`,T.original||T);const c=(T==null?void 0:T.silent)??!1,v={code:de,message:f,original:T,silent:c};if(c)for(const x of this.warningListeners)x(v);else for(const x of this.errorListeners)x(v);return R==null||R(v),this._logNpoTagError(v),v}_logNpoTagError(p){if(this.isDestroyed||!this.npoPlayerRef)return;const{npoTagProps:T}=this.npoPlayerRef;!(T!=null&&T.streamTracker)||!(T!=null&&T.qosMetrics)||Promise.resolve().then(()=>uA).then(({logErrorEvent:L})=>{var R,de;this.isDestroyed||!((R=this.npoPlayerRef)!=null&&R.player)||L({npoPlayer:this.npoPlayerRef,error:p,streamPosition:((de=this.npoPlayerRef.player.getMediaElement())==null?void 0:de.currentTime)??0})}).catch(L=>{console.error("Failed to log NPOTag error event:",L)})}handleErrorState(p){const{mediaElement:T,errorEvent:L,customErrorMessageOverlayConfig:R,emitError:de,setErrorState:E,resetFn:f,retryCallback:c}=p,v=this.handleError({errorEvent:L,customErrorMessageOverlayConfig:R,emitError:de});if(E==null||E(v),c&&c(T.currentTime).catch(I=>{console.error("Retry callback failed:",I)}),f||this.resetListeners.length>0){const I=()=>{f==null||f();for(const x of this.resetListeners)x();T.removeEventListener(jt.CanPlay,I)};T.addEventListener(jt.CanPlay,I)}}setupErrorDebounce(p){this.debounceCleanup&&this.debounceCleanup();const{setTimeout:T,clearTimeout:L}=globalThis;let R,de=!1,E=!1,f;const c=p.debounceTimeInMs??2e3,v=()=>{R&&L(R),R=T(()=>{de&&f&&(p.setErrorStateFn?p.setErrorStateFn(f):this.handleError({errorEvent:f}),de=!1,E=!0)},c)},I=C=>{de=!0,f=C,v()},x=()=>{var C;if(de)v();else if(E){E=!1,(C=p.resetFn)==null||C.call(p);for(const j of this.resetListeners)j()}};p.player.player.addEventListener(jt.Error,I),p.player.getMediaElement().addEventListener(jt.Error,I),p.player.on(jt.AdError,I),p.player.on(jt.Error,I),p.mediaElement.addEventListener(jt.TimeUpdate,x),this.debounceCleanup=()=>{var C;R&&L(R),p.player.player.removeEventListener(jt.Error,I),(C=p.player.getMediaElement())==null||C.removeEventListener(jt.Error,I),p.player.off(jt.AdError,I),p.player.off(jt.Error,I),p.mediaElement.removeEventListener(jt.TimeUpdate,x)}}simulateError(p=1012){const T={code:p,detail:{code:p},type:"simulated"};return this.handleError({errorEvent:T})}};De(jo,"globalHandlersAttached",!1),De(jo,"_lastInstance");let tr=jo;function lv(){return/Chrom(e|ium)/.test(navigator.userAgent)}function Rl(me){const p=navigator.userAgent,T=p.toLowerCase(),L=/chrom(e|ium)/i.test(p),R=/edge|edg/i.test(p),de=/opr|opera/i.test(p),E=/firefox/i.test(p);switch(me){case"chrome":return L&&!R;case"chromium":return T.includes("chromium");case"edge":return R;case"firefox":return E;case"safari":return T.includes("safari")&&!T.includes("chrome")&&!T.includes("chromium")&&!T.includes("android");case"opera":return de;default:return!1}}async function Zx(me,p){if(hs.polyfill.installAll(),hs.polyfill.PatchedMediaKeysApple&&hs.polyfill.PatchedMediaKeysApple.install(!0),!hs.Player.isBrowserSupported())throw new zt({code:19004,message:"Shaka Player is not supported on this browser!"});const T=me.getPlayerContainer();let L=T.querySelector(`${p}`);L||(L=document.createElement(p),T.appendChild(L)),p===bs.VIDEO&&(L.setAttribute("crossorigin","anonymous"),L.playsInline=!0);const R=new hs.Player;Rl("safari")&&R.configure({streaming:{preferNativeHls:!0}});const de=Qx(L,me);return me.mediaStateListeners=de,await R.attach(L),R}function Ah(me){return!Number.isNaN(me)&&Number.isFinite(me)}function Ol(me,p){return Number.isNaN(me)?p.min:Math.max(p.min,Math.min(me,p.max))}function qx(me){if(me!=null){if(typeof me=="string")return me.trim()===""?void 0:Number(me);if(typeof me=="number")return me}}function ew(){return Math.random().toString(36).slice(2,10)}function tw(me,p){var de,E,f;const T=me.getConfiguration(),L=((de=T.drm)==null?void 0:de.advanced)??{};if(!((E=T.drm)!=null&&E.servers)||Object.keys(T.drm.servers).length===0)return[];const R=[];for(const[c,v]of Object.entries(T.drm.servers)){const I={protectionSystem:c,licenseUrl:v};p?I.headers={Authorization:`Bearer ${p}`}:(f=L[c])!=null&&f.headers&&(I.headers=L[c].headers),T.drm.withCredentials&&(I.withCredentials=!0),R.push(I)}return R}function cv(me){return/^(?:[\w=-]+\.){2}[\w+./=-]+$/.test(me)}function nw(me,p){const T=new Image;T.addEventListener("load",()=>{p({width:T.width,height:T.height})}),T.src=me}function rw(me){const{duration:p,durationIsInMs:T}=me;return p===void 0||p===Number.POSITIVE_INFINITY?-1:T?Number(p)/1e3:Number.isFinite(+p)?Number(p):-1}function iw(me){return me!==""&&me!==void 0?me:"unknown"}function ow(me){const p={mpd:"application/dash+xml",m3u8:"application/vnd.apple.mpegurl",mp4:"video/mp4",webm:"video/webm",mp3:"audio/mpeg",m4a:"audio/mp4"};try{const L=new URL(me).pathname.toLowerCase(),R=/\.([\da-z]+)$/.exec(L);if(R){const de=R[1];return p[de]||void 0}return}catch{return}}const sw=1e4;class aw{constructor(p,T){De(this,"castInitialized",!1);De(this,"receiverApplicationId");De(this,"player");De(this,"castContext");De(this,"streamObject");De(this,"volumeBeforeCasting");De(this,"playbackRate",1);De(this,"npoTagSession");De(this,"drmConfig");De(this,"source");De(this,"boundMediaListeners",[]);De(this,"currentAvailability",!1);De(this,"checkCastAvailabilityIntervalId");this.receiverApplicationId=T,this.player=p}destroy(){this.checkCastAvailabilityIntervalId&&(globalThis.clearInterval(this.checkCastAvailabilityIntervalId),this.checkCastAvailabilityIntervalId=void 0),this.stopCastSession()}initializeCastCheckInterval(){this.checkCastAvailabilityIntervalId&&globalThis.clearInterval(this.checkCastAvailabilityIntervalId),this.checkCastAvailabilityIntervalId=globalThis.setInterval(()=>{this.checkCastAvailability()},this.getCheckCastIntervalTime())}checkCastAvailability(){const p=this.isCastAvailable();this.updateCastState({available:p,connected:this.isCastConnected()}),this.currentAvailability!==p&&(this.currentAvailability=p,this.initializeCastCheckInterval())}isCastConnected(){var T,L,R,de;const p=(L=(T=this.castContext)==null?void 0:T.getCastState)==null?void 0:L.call(T);return!!(this.castInitialized&&(cast!=null&&cast.framework)&&p!==void 0&&p===((de=(R=cast==null?void 0:cast.framework)==null?void 0:R.CastState)==null?void 0:de.CONNECTED))}getCheckCastIntervalTime(){return this.isCastAvailable()?sw:Jc.CAST_CHECK_INTERVAL_MS}loadCastSdk(){return globalThis.__castSdkLoadPromise||(globalThis.__castSdkLoadPromise=new Promise((p,T)=>{var R;if((R=globalThis.cast)!=null&&R.framework)return p();globalThis.__onGCastApiAvailable=de=>de?p():T(new zt({code:19215,message:"Load Cast SDK failed: cast SDK is not available"}));const L=document.createElement("script");L.src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",L.async=!0,L.addEventListener("error",()=>T(new zt({code:19216,message:"Failed to load Cast SDK"}))),document.head.appendChild(L),this.initializeCastCheckInterval()}).catch(p=>{throw globalThis.__castSdkLoadPromise=void 0,p})),globalThis.__castSdkLoadPromise}updateCastingData({source:p,streamObject:T,metadata:L,npoTagSession:R}){if(!lv())return;this.source=p,this.npoTagSession=R,this.streamObject={...T,metadata:{...T==null?void 0:T.metadata,...L}};const de=cv(p)?p:void 0;this.drmConfig=tw(this.player,de),this.isCastActive()&&this.loadMedia()}async initialize(){if(!(!lv()||this.castInitialized))try{await this.loadCastSdk(),this.castContext=cast.framework.CastContext.getInstance(),this.castContext.setOptions({receiverApplicationId:this.receiverApplicationId,autoJoinPolicy:chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED}),this.castContext.addEventListener(cast.framework.CastContextEventType.CAST_STATE_CHANGED,p=>{this.updateCastState({available:p.castState!==cast.framework.CastState.NO_DEVICES_AVAILABLE,connected:p.castState===cast.framework.CastState.CONNECTED})}),this.castContext.addEventListener(cast.framework.CastContextEventType.SESSION_STATE_CHANGED,p=>{if(p.sessionState===cast.framework.SessionState.SESSION_STARTED&&(this.updateCastState({connected:!0}),this.loadMedia()),p.sessionState===cast.framework.SessionState.SESSION_ENDED&&this.player.state.cast.connected&&this.updateCastState({connected:!1}),p.sessionState===cast.framework.SessionState.SESSION_RESUMED){const T=this.castContext.getCurrentSession(),L=T==null?void 0:T.getMediaSession();this.player.state.cast.connected||this.updateCastState({connected:!0}),T&&!L&&this.loadMedia()}}),this.castInitialized=!0,this.updateCastState({available:this.isCastAvailable(),connected:!1})}catch(p){let T=p;throw p instanceof zt||(T=new zt({code:19201,message:"Failed to initialize Cast",original:p})),this.player.state.cast.error=T.message,T}}isCastAvailable(){var T,L,R,de;const p=(L=(T=this.castContext)==null?void 0:T.getCastState)==null?void 0:L.call(T);return!!(this.castInitialized&&(cast!=null&&cast.framework)&&p!==void 0&&p!==((de=(R=cast==null?void 0:cast.framework)==null?void 0:R.CastState)==null?void 0:de.NO_DEVICES_AVAILABLE))}isCastActive(){return this.castInitialized?this.player.state.cast.connected:!1}startCastSession(){if(!this.castInitialized){console.warn("Start cast session failed: cast SDK is not initialized.");return}if(!this.isCastAvailable()){console.warn("No Cast devices available.");return}this.volumeBeforeCasting=this.player.getMediaElement().volume,this.castContext.getCurrentSession()?this.loadMedia().then(()=>{this.updateCastState({connected:!0})}).catch(T=>{this.updateCastState({connected:!1}),tr.handleSilentError(new zt({code:19202,message:"Error loading media on existing cast session",original:T}))}):this.castContext.requestSession().then(()=>{this.updateCastState({connected:!0})}).catch(T=>{this.updateCastState({connected:!1}),tr.handleSilentError(new zt({code:19203,message:"Error starting cast session",original:T}))})}updateMediaElementVisibility(){const p=this.player.getMediaElement();p&&p.classList.toggle("npoplayer-hidden",this.isCastActive())}stopCastSession(){if(!this.castInitialized){console.warn("Stop cast session failed: cast SDK is not initialized.");return}const p=this.castContext.getCurrentSession();if(!p){console.warn("No active cast session to stop.");return}p.endSession(!0),this.updateCastState({connected:!1});for(const{type:T,handler:L}of this.boundMediaListeners)this.player.getMediaElement().removeEventListener(T,L);this.boundMediaListeners=[],this.player.getMediaElement().volume=this.volumeBeforeCasting||.5}getCastDeviceName(){var T;const p=this.castContext.getCurrentSession();if(p)return(T=p.getCastDevice())==null?void 0:T.friendlyName}hasValidMediaUrl(){var T,L;const p=((L=(T=this.streamObject)==null?void 0:T.stream)==null?void 0:L.streamURL)||this.source;return p||tr.handleSilentError(new zt({code:19204,message:"No media URL found for casting."})),p}getSession(){const p=this.castContext.getCurrentSession();return p||tr.handleSilentError(new zt({code:19205,message:"No active cast session found."})),p}async loadMedia(){const p=this.hasValidMediaUrl();if(!p)return;const T=this.getSession();if(!T)return;this.player.getMediaElement().volume=0;const L=ow(p);L||tr.handleSilentError(new zt({code:19214,message:"MIME type is undefined, this item may not cast correctly."}));const R=new chrome.cast.media.MediaInfo(p,L);this.player.isLive()?(R.streamType=chrome.cast.media.StreamType.LIVE,R.duration=-1):(R.streamType=chrome.cast.media.StreamType.BUFFERED,R.duration=this.player.getDuration()),R.customData=await this.constructMediaMetadata();const de=new chrome.cast.media.LoadRequest(R);de.autoplay=!this.player.getMediaElement().paused,de.currentTime=this.player.getMediaElement().currentTime,de.playbackRate=this.player.getMediaElement().playbackRate||this.playbackRate,await T.loadMedia(de).then(()=>{this.updateCastState({connected:!0}),this.syncCastAndPlayer()},E=>tr.handleSilentError(new zt({code:19206,message:"Error loading media on existing cast session",original:E})))}getImageSizeAsync(p){return new Promise(T=>{nw(p,L=>T(L||{width:0,height:0}))})}async constructMediaMetadata(){var T,L;const p={};if(p.title=this.streamObject.metadata.title,p.subtitle=this.streamObject.metadata.description,p.drmType=(L=(T=this.streamObject.stream)==null?void 0:T.drm)==null?void 0:L.type,p.npoTagSession=this.npoTagSession,p.streamLinkAsJsonString=JSON.stringify(this.streamObject),cv(this.source)&&(p.jwt=this.source),p.drm=this.drmConfig.length>0?{...this.drmConfig[0]}:void 0,this.streamObject.metadata.poster){const R=await this.getImageSizeAsync(this.streamObject.metadata.poster);p.images=[{url:this.streamObject.metadata.poster,width:R.width,height:R.height}]}return p}attachMediaListeners(p){for(const{type:c,handler:v}of this.boundMediaListeners)this.player.getMediaElement().removeEventListener(c,v);this.boundMediaListeners=[];const T=new chrome.cast.media.PlayRequest,L=()=>{var c;return(c=p.getMediaSession())==null?void 0:c.play(T,()=>this.player.state.cast.error=void 0,v=>{this.player.state.cast.error=`${v.code}: ${v.description}`,tr.handleSilentError(new zt({code:19207,message:`Error playing media on cast session: ${this.player.state.cast.error}`,original:v}))})},R=new chrome.cast.media.PauseRequest,de=()=>{var c;return(c=p.getMediaSession())==null?void 0:c.pause(R,()=>this.player.state.cast.error=void 0,v=>{this.player.state.cast.error=`${v.code}: ${v.description}`,tr.handleSilentError(new zt({code:19208,message:`Error pausing media on cast session: ${this.player.state.cast.error}`,original:v}))})},E=()=>{const c=p.getMediaSession();if(c&&Math.abs(c.getEstimatedTime()-this.player.getMediaElement().currentTime)>2){const v=new chrome.cast.media.SeekRequest;v.currentTime=this.player.getMediaElement().currentTime,c.seek(v,()=>{},I=>{this.player.state.cast.error=`${I.code}: ${I.description}`,tr.handleSilentError(new zt({code:19209,message:`Error seeking media on cast session: ${this.player.state.cast.error}`,original:I}))})}},f=()=>{const c=this.player.getMediaElement().playbackRate;if(this.isCastActive()&&c>0&&c!==this.playbackRate){this.playbackRate=c;const v=p.getMediaSession();v&&(v.playbackRate=this.playbackRate)}};this.boundMediaListeners.push({type:"play",handler:L},{type:"pause",handler:de},{type:"seeked",handler:E},{type:"ratechange",handler:f});for(const{type:c,handler:v}of this.boundMediaListeners)this.player.getMediaElement().addEventListener(c,v)}updateCastState(p){Object.entries(p).some(([L,R])=>this.player.state.cast[L]!==R)&&(this.player.state.cast={...this.player.state.cast,...p},this.updateMediaElementVisibility(),this.player.reemit(jt.CastStateChanged,this.player.state.cast))}syncCastAndPlayer(){const p=this.castContext.getCurrentSession();if(!p){tr.handleSilentError(new zt({code:19210,message:"No active cast session found."}));return}((L=15e3)=>new Promise((R,de)=>{const E=Date.now(),f=()=>{const c=p.getMediaSession();if(c)return R(c);if(Date.now()-E>L)return de(new zt({code:19211,message:"Timed out waiting for media session"}));setTimeout(f,200)};f()}))().then(L=>{this.attachMediaListeners(p),L.playerState===chrome.cast.media.PlayerState.PLAYING&&this.player.getMediaElement().paused&&(this.player.getMediaElement().volume=0),L.addUpdateListener(()=>{this.player.getMediaElement()&&(L.playerState===chrome.cast.media.PlayerState.PLAYING&&this.player.getMediaElement().paused?(this.player.getMediaElement().play().catch(R=>tr.handleSilentError(new zt({code:19212,message:"Error playing media on cast session",original:R}))),this.player.getMediaElement().volume=0):L.playerState===chrome.cast.media.PlayerState.PAUSED&&!this.player.getMediaElement().paused&&this.player.getMediaElement().pause(),Math.abs(L.getEstimatedTime()-this.player.getMediaElement().currentTime)>1&&(this.player.getMediaElement().volume=0,this.player.getMediaElement().currentTime=L.getEstimatedTime()))})}).catch(L=>{tr.handleSilentError(new zt({code:19213,message:"Failed to get media session",original:L}))})}}function uw(me){const p={adActive:!1,adPaused:!1,airPlay:{available:!1,connected:!1},audioPlaybackQuality:-1,audioLanguage:iv,cast:{available:!1,connected:!1},displayMode:Yi.INLINE,forceUIVisible:!1,fullscreen:!1,language:iv,mediaState:void 0,muted:!1,videoPlaybackQuality:-1,playbackRate:1,subtitleLanguage:"",useAudioDescription:!1,volume:1};return me?{...p,audioLanguage:me.get("audioLanguage",p.audioLanguage),audioPlaybackQuality:me.get("audioPlaybackQuality",p.audioPlaybackQuality),muted:me.get("muted",p.muted),playbackRate:me.get("playbackRate",p.playbackRate),subtitleLanguage:me.get("subtitleLanguage",p.subtitleLanguage),useAudioDescription:me.get("useAudioDescription",p.useAudioDescription),videoPlaybackQuality:me.get("videoPlaybackQuality",p.videoPlaybackQuality),volume:me.get("volume",p.volume)}:p}class lw{constructor(){De(this,"listeners",Object.create(null))}addEventListener(p,T){T&&(this.listeners[p]||(this.listeners[p]=[]),this.listeners[p].some(L=>L.listener===T)||this.listeners[p].push({listener:T}))}removeEventListener(p,T){if(!T)return;const L=this.listeners[p];L&&(this.listeners[p]=L.filter(R=>R.listener!==T))}dispatchEvent(p){if(!p||typeof p.type!="string")throw new TypeError("Failed to execute 'dispatchEvent': event must have a type.");const T=this.listeners[p.type];if(!T||T.length===0)return!0;const L=[...T],R=de=>{try{Object.defineProperty(p,de,{configurable:!0,value:this})}catch{p[de]=this}};p.target==null&&R("target"),R("currentTarget");for(const de of L){const{listener:E}=de;typeof E=="function"?E(p):E&&typeof E.handleEvent=="function"&&E.handleEvent(p)}return!p.defaultPrevented}}class cw{constructor(p){De(this,"eventTarget",new lw);De(this,"_allListeners",[]);this.playerId=p}emit(p){const{eventName:T,value:L}=p;this.eventTarget.dispatchEvent(new CustomEvent(T,{detail:L}))}on(p){const T=p.eventName;this.eventTarget.addEventListener(T,p.listener),this._allListeners.push({eventName:T,listener:p.listener})}off(p){const T=p.eventName;this.eventTarget.removeEventListener(T,p.listener),this._allListeners=this._allListeners.filter(L=>!(L.eventName===T&&L.listener===p.listener))}once(p){const T=L=>{p.listener(L),this.off({eventName:p.eventName,listener:T})};this.on({eventName:p.eventName,listener:T})}addEventListener(p,T){this.eventTarget.addEventListener(p,T)}removeEventListener(p,T){this.eventTarget.removeEventListener(p,T)}dispatchEvent(p){return this.eventTarget.dispatchEvent(p)}removeAllListeners(){for(const{eventName:p,listener:T}of this._allListeners)this.eventTarget.removeEventListener(p,T);this._allListeners=[]}}function fw(me){return new cw(me)}const dw={start:0,firstQuartile:.25,midpoint:.5,thirdQuartile:.75,complete:1};class hw{async parse(p){const T=await fetch(p.toString(),{credentials:"omit"});if(!T.ok)throw new Error(`VastParser: failed to fetch ${p.toString()} (${T.status})`);const L=await T.text();return this.parseFromString(L,{baseURL:p})}parseFromString(p,T){const L=new DOMParser().parseFromString(p,"application/xml");if(L.querySelectorAll("parsererror").length>0)throw new Error("VastParser: XML parsing error.");return this.parseDocument(L,T)}parseDocument(p,T){return[...p.querySelectorAll("Ad")].map((R,de)=>this.parseAdElement(R,{idx:de,base:T==null?void 0:T.baseURL}))}parseAdElement(p,T){const{idx:L,base:R}=T,de={id:p.getAttribute("id")??void 0,title:void 0,duration:void 0,clickThrough:void 0,clickTrackingURLs:[],mediaFileURL:void 0,trackingEvents:[],indexInQueue:L},E=p.querySelectorAll("AdTitle")[0],f=this.trimText(E==null?void 0:E.textContent);f&&(de.title=f);const c=p.querySelectorAll("Duration")[0],v=this.parseVASTDuration(this.trimText(c==null?void 0:c.textContent));v!=null&&(de.duration=v);const I=p.querySelectorAll("ClickThrough")[0],x=this.makeURL(this.trimText(I==null?void 0:I.textContent),R);x&&(de.clickThrough=x);const C=new Set,j=[...p.querySelectorAll("ClickTracking")];for(const P of j){const $=this.makeURL(this.trimText(P.textContent),R);if(!$)continue;const d=$.toString();C.has(d)||(C.add(d),de.clickTrackingURLs.push($))}const z=p.querySelectorAll("MediaFile")[0],F=this.makeURL(this.trimText(z==null?void 0:z.textContent),R);F&&(de.mediaFileURL=F);const K=[...p.querySelectorAll("Tracking")],N=new Set;for(const P of K){const $=this.trimText(P.getAttribute("event"));if(!$)continue;const d=this.makeURL(this.trimText(P.textContent),R);if(!d)continue;const M=this.normalizeTrackingEventName($);if(!M)continue;const U=`${M}|${d.toString()}`;if(N.has(U))continue;N.add(U);const J=this.timeFor(M,de.duration);de.trackingEvents.push({name:M,time:J,url:d})}return de}trimText(p){return(p??"").trim()}parseVASTDuration(p){const T=this.trimText(p);if(!T)return;const L=T.replace(",",".");if(L.includes(":")){const de=L.split(":");if(de.length!==3){const C=Number(L);return Number.isFinite(C)?C:void 0}const[E,f,c]=de,v=Number(E),I=Number(f),x=Number(c);return!Number.isFinite(v)||!Number.isFinite(I)||!Number.isFinite(x)?void 0:v*3600+I*60+x}const R=Number(L);return Number.isFinite(R)?R:void 0}timeFor(p,T){if(T==null)return 0;const L=this.normalizeTrackingEventName(p);if(!L)return 0;const R=dw[L];return T*R}normalizeTrackingEventName(p){switch(p.toLowerCase()){case"start":return"start";case"firstquartile":return"firstQuartile";case"midpoint":return"midpoint";case"thirdquartile":return"thirdQuartile";case"complete":return"complete";default:return}}makeURL(p,T){const L=this.trimText(p);if(!L)return;const R=this.safeDecodeURIComponent(L);try{return T?new URL(R,T.toString()):new URL(R)}catch{return}}safeDecodeURIComponent(p){try{return decodeURIComponent(p)}catch{return p}}}function pw(me){const p=document.createElement("div");p.className="vast-ad-container",p.style.cssText=`
98
- position: absolute;
99
- inset: 0;
100
- width: 100%;
101
- height: 100%;
102
- z-index: 9;
103
- display: none;
104
- background: black;
105
- overflow: hidden;
106
- `;const T=document.createElement("video");return T.playsInline=!0,T.preload="auto",T.controls=!1,T.disablePictureInPicture=!0,T.setAttribute("disablePictureInPicture",""),T.muted=!1,T.style.cssText=`
107
- width: 100%;
108
- height: 100%;
109
- object-fit: contain;
110
- display: block;
111
- background: black;
112
- `,p.appendChild(T),me.appendChild(p),{container:p,video:T}}function gw(me){const{video:p,container:T}=me;if(p){try{p.pause(),p.src="",p.load(),p.removeAttribute("src")}catch{}p.remove()}T!=null&&T.parentNode&&T.remove()}function fv(me){if(me)try{me.pause(),me.src="",me.load(),me.removeAttribute("src")}catch{}}class mw{constructor(){De(this,"firedTracking",new Set);De(this,"mirroredEvents",new Set(["start","firstquartile","midpoint","thirdquartile","complete"]))}reset(){this.firedTracking.clear()}shouldMirror(p){return this.mirroredEvents.has(p.toLowerCase())}maybeFireTracking(p){const T=p.name.toLowerCase(),L=`${T}:${Math.round(p.time*1e3)}`;if(!this.firedTracking.has(L)){this.firedTracking.add(L);for(const R of p.events)R.name.toLowerCase()===T&&this.pingTracking(R.url)}}handleAdClick(p){if(p){if(p.clickThrough)try{window.open(p.clickThrough.toString(),"_blank","noopener,noreferrer")}catch{}for(const T of p.clickTrackingURLs)this.pingTracking(T)}}pingTracking(p){try{fetch(p.toString(),{method:"GET",mode:"no-cors",keepalive:!0})}catch{}}}class vw{constructor(p,T){De(this,"intervalId");De(this,"intervalMs");De(this,"dispatch");this.intervalMs=p,this.dispatch=T}start(p){this.stop(),this.emit(p),this.intervalId=setInterval(()=>{const T=p();if(!T||T.isPaused){this.stop();return}T.isPlaying&&this.dispatch(this.toPayload(T))},this.intervalMs)}stop(){this.intervalId!==void 0&&(clearInterval(this.intervalId),this.intervalId=void 0)}emit(p,T){const L=p();L&&this.dispatch(this.toPayload(L,T))}toPayload(p,T){const{video:L,ad:R,isPlaying:de,isPaused:E,adPosition:f,totalAds:c}=p,v=T??(Number.isFinite(L.duration)?L.duration:R.duration??0),I=L.currentTime,x=Math.max(0,v-I);return{duration:v,remainingTime:x,currentTime:I,isPlayingAd:de,isAdPaused:E,adPosition:f,totalAds:c,isLinear:!0}}}const nf=class nf{constructor(p){De(this,"player");De(this,"adVideoElement");De(this,"adContainer");De(this,"contentVideoElement");De(this,"adTracking",new mw);De(this,"uiEmitter");De(this,"adPlaylist",[]);De(this,"currentIndex",0);De(this,"currentAd");De(this,"isAdPlaying",!1);De(this,"isAdPaused",!1);De(this,"isSkippable",!1);De(this,"hasEmittedStarted",!1);De(this,"hasFiredStartTracking",!1);De(this,"onTimeUpdate",()=>{if(!this.currentAd||!this.isAdPlaying)return;const p=this.adVideoElement.currentTime,T=this.getDuration();for(const L of this.currentAd.trackingEvents){const R=L.name.toLowerCase();this.adTracking.shouldMirror(R)&&(L.time<=0||p>=L.time&&this.adTracking.maybeFireTracking({name:L.name,time:L.time,events:this.currentAd.trackingEvents}))}this.uiEmitter.emit(()=>this.getUiContext(),T)});De(this,"onPause",()=>{this.isAdPlaying&&(this.isAdPaused=!0,this.player.state.adPaused=!0,this.hasEmittedStarted&&(this.player.reemit(jt.AdPaused),this.uiEmitter.stop()))});De(this,"onPlay",()=>{this.isAdPlaying&&(this.isAdPaused=!1,this.player.state.adPaused=!1,this.adContainer.style.display="block",!this.hasEmittedStarted&&this.currentAd?(this.hasEmittedStarted=!0,this.player.reemit(jt.AdStarted,{ad:this.asPublicAdPayload(this.currentAd)})):this.player.reemit(jt.AdResumed),!this.hasFiredStartTracking&&this.currentAd&&(this.hasFiredStartTracking=!0,this.adTracking.maybeFireTracking({name:"start",time:0,events:this.currentAd.trackingEvents})),this.uiEmitter.start(()=>this.getUiContext()))});De(this,"onEnded",()=>{var T,L;const p=((T=this.currentAd)==null?void 0:T.trackingEvents)??[];this.adTracking.maybeFireTracking({name:"complete",time:((L=this.adVideoElement)==null?void 0:L.duration)??0,events:p}),this.player.reemit(jt.AdComplete),this.finishAdThenMaybeNext()});De(this,"onVideoError",()=>{const p=this.adVideoElement.error??new zt({code:19101,message:"unknown ad video error"});this.onAdError(p)});this.player=p.player,this.adVideoElement=p.adVideoElement,this.adContainer=p.adContainer,this.contentVideoElement=p.contentVideoElement,this.uiEmitter=new vw(nf.AD_UPDATE_INTERVAL_MS,T=>{this.player.reemit(jt.AdUiUpdate,T)}),this.bindAdVideoElementListeners()}async start(p){this.adPlaylist=p,this.currentIndex=0,this.currentAd=void 0,this.isSkippable=!1,this.hasEmittedStarted=!1,this.hasFiredStartTracking=!1,await this.playAd()}pause(){this.isAdPlaying&&this.adVideoElement.pause()}resume(){this.isAdPlaying&&this.adVideoElement.play().catch(()=>{})}skip(){this.isSkippable&&(this.player.reemit(jt.AdSkipped),this.finishAdThenMaybeNext())}getDuration(){var p;return Number.isFinite(this.adVideoElement.duration)?this.adVideoElement.duration:((p=this.currentAd)==null?void 0:p.duration)??0}getRemainingTime(){if(!this.isAdPlaying)return 0;const p=this.getDuration();return Math.max(0,p-this.adVideoElement.currentTime)}setVolume(p){this.adVideoElement.volume=Ol(p,{min:0,max:1})}getVolume(){return this.adVideoElement.volume}mute(){this.adVideoElement.muted=!0}unmute(){this.adVideoElement.muted=!1,this.adVideoElement.volume=Ol(this.player.getVolume(),{min:0,max:1})}isPlaying(){return this.isAdPlaying&&!!this.currentAd}isPaused(){return this.isAdPaused}handleAdClick(){this.adTracking.handleAdClick(this.currentAd),this.pause()}getCurrentTime(){return this.adVideoElement.currentTime}getTotalAds(){return this.adPlaylist.length}getAdPosition(){return this.currentIndex}destroy(){this.uiEmitter.stop(),this.unbindAdVideoElementListeners(),this.adTracking.reset(),this.adPlaylist=[],this.currentIndex=0,this.currentAd=void 0,this.isAdPlaying=!1,this.isAdPaused=!1,this.isSkippable=!1,this.hasEmittedStarted=!1,this.hasFiredStartTracking=!1,this.player.state.adActive=!1,this.player.state.adPaused=!1,fv(this.adVideoElement),this.adContainer.style.display="none";const p=this;p.player=void 0,p.adVideoElement=void 0,p.adContainer=void 0,p.contentVideoElement=void 0,p.uiEmitter=void 0}async playAd(){if(this.currentIndex>=this.adPlaylist.length){this.onAllAdsCompleted();return}this.currentAd=this.adPlaylist[this.currentIndex],this.adTracking.reset(),this.isSkippable=!1,this.hasEmittedStarted=!1,this.hasFiredStartTracking=!1,this.currentIndex===0&&this.contentVideoElement.pause(),this.adVideoElement.src=this.currentAd.mediaFileURL.toString(),this.adVideoElement.currentTime=0,await this.onAdPlaybackStarted();try{await this.adVideoElement.play()}catch(p){if(this.isAutoplayBlockedError(p)){this.isAdPaused=!0,this.player.state.adPaused=!0;return}this.onAdError(p)}}onAllAdsCompleted(){this.cleanupAfterAd(),this.player.reemit(jt.AllAdsCompleted)}bindAdVideoElementListeners(){this.adVideoElement.addEventListener(jt.TimeUpdate,this.onTimeUpdate),this.adVideoElement.addEventListener(jt.Pause,this.onPause),this.adVideoElement.addEventListener(jt.Play,this.onPlay),this.adVideoElement.addEventListener(jt.Ended,this.onEnded),this.adVideoElement.addEventListener(jt.Error,this.onVideoError)}unbindAdVideoElementListeners(){this.adVideoElement.removeEventListener(jt.TimeUpdate,this.onTimeUpdate),this.adVideoElement.removeEventListener(jt.Pause,this.onPause),this.adVideoElement.removeEventListener(jt.Play,this.onPlay),this.adVideoElement.removeEventListener(jt.Ended,this.onEnded),this.adVideoElement.removeEventListener(jt.Error,this.onVideoError)}finishAdThenMaybeNext(){this.isAdPlaying=!1,this.isAdPaused=!1,this.uiEmitter.stop(),this.currentIndex+=1,this.currentIndex<this.adPlaylist.length?this.playAd():this.onAllAdsCompleted()}onAdError(p){this.onAllAdsCompleted();const T=p instanceof zt?p:new zt({code:19100,message:"[adPlaybackSession] Ad playback error",original:p});this.player.reemit(jt.AdError,{error:T})}cleanupAfterAd(p={}){const{resumeContent:T=!0}=p;this.isAdPlaying=!1,this.isAdPaused=!1,this.player.state.adActive=!1,this.player.state.adPaused=!1,this.hasEmittedStarted=!1,this.hasFiredStartTracking=!1,this.currentAd=void 0,this.adTracking.reset(),this.uiEmitter.stop(),fv(this.adVideoElement),this.adContainer.style.display="none",T&&this.contentVideoElement.play().catch(()=>{})}async onAdPlaybackStarted(){this.currentAd&&(this.player.state.displayMode===Yi.PIP&&await this.player.exitPip().catch(()=>{}),this.isAdPlaying=!0,this.isAdPaused=!1,this.player.state.adActive=!0,this.player.state.adPaused=!1)}getUiContext(){if(!(!this.isAdPlaying||!this.currentAd))return{video:this.adVideoElement,ad:this.currentAd,isPlaying:this.isAdPlaying,isPaused:this.isAdPaused,adPosition:this.currentIndex,totalAds:this.adPlaylist.length}}asPublicAdPayload(p){var T,L;return{id:p.id,title:p.title,duration:p.duration,clickThrough:(T=p.clickThrough)==null?void 0:T.toString(),mediaFileURL:(L=p.mediaFileURL)==null?void 0:L.toString(),isLinear:!0}}isAutoplayBlockedError(p){return p instanceof Error&&p.name==="NotAllowedError"}};De(nf,"AD_UPDATE_INTERVAL_MS",50);let Ih=nf;const Zc="[AdManager]",Ya={ALREADY_INIT:`${Zc} Already initialized`,INIT_FAILED:`${Zc} Initialization failed`,NO_DOM:`${Zc} Ad video/container not available`,NO_SEEK:"Cannot seek during ad playback",REQUEST_ERROR:`${Zc} Error requesting ads`};class yw{constructor(p){De(this,"player");De(this,"vastParser",new hw);De(this,"adContainer");De(this,"adVideoElement");De(this,"clickElement");De(this,"isInitialized",!1);De(this,"session");De(this,"videoElement");De(this,"boundClickElementHandler",p=>{var T;p.preventDefault(),p.stopPropagation(),(T=this.session)==null||T.handleAdClick()});this.player=p}initialize(){if(this.isInitialized){console.warn(Ya.ALREADY_INIT);return}try{const{container:p,video:T}=pw(this.player.getPlayerContainer());this.adContainer=p,this.adVideoElement=T,this.isInitialized=!0}catch(p){throw new zt({code:19104,message:Ya.INIT_FAILED,original:p})}}async requestAds(p){var L,R;this.isInitialized||await this.initialize();const T=(L=p.assets)==null?void 0:L.preroll;if(T)try{const E=(await this.vastParser.parse(T)).filter(c=>!!c.mediaFileURL);if(E.length===0){this.player.reemit(jt.AllAdsCompleted);return}const f=this.ensureSession();f.unmute(),await f.start(E)}catch(de){(R=this.session)==null||R.destroy();const E=new zt({code:19102,message:Ya.REQUEST_ERROR,original:de});this.player.reemit(jt.AdError,{error:E})}}pauseAd(){var p;(p=this.session)==null||p.pause()}resumeAd(){var p;(p=this.session)==null||p.resume()}isPlayingAd(){var p;return((p=this.session)==null?void 0:p.isPlaying())??!1}isAdPaused(){var p;return((p=this.session)==null?void 0:p.isPaused())??!1}skipAd(){var p;(p=this.session)==null||p.skip()}getAdRemainingTime(){var p;return((p=this.session)==null?void 0:p.getRemainingTime())??0}getCurrentTime(){var p;return((p=this.session)==null?void 0:p.getCurrentTime())??0}getDuration(){var p;return((p=this.session)==null?void 0:p.getDuration())??0}getTotalAds(){var p;return(p=this.session)==null?void 0:p.getTotalAds()}getAdPosition(){var p;return(p=this.session)==null?void 0:p.getAdPosition()}setVolume(p){var T;(T=this.session)==null||T.setVolume(p)}getVolume(){var p;return((p=this.session)==null?void 0:p.getVolume())??0}mute(){var p;(p=this.session)==null||p.mute()}unmute(){var p;(p=this.session)==null||p.unmute()}destroy(){var p;try{(p=this.session)==null||p.destroy(),this.session=void 0,this.clickElement&&(this.clickElement.removeEventListener("click",this.boundClickElementHandler),this.clickElement=void 0),gw({video:this.adVideoElement,container:this.adContainer}),this.adContainer=void 0,this.adVideoElement=void 0,this.videoElement=void 0}finally{this.isInitialized=!1}}setAdClickElement(p){this.clickElement&&this.clickElement.removeEventListener("click",this.boundClickElementHandler),this.clickElement=void 0,p&&(this.clickElement=p,this.clickElement.addEventListener("click",this.boundClickElementHandler,{passive:!1}))}getContentVideo(){return this.videoElement||(this.videoElement=this.player.getMediaElement()),this.videoElement}ensureSession(){if(!this.adVideoElement||!this.adContainer)throw new Error(Ya.NO_DOM);if(!this.session){const p=this.getContentVideo();this.session=new Ih({player:this.player,adContainer:this.adContainer,adVideoElement:this.adVideoElement,contentVideoElement:p}),p.pause()}return this.session}}function Sw(me){return/^(http|https):\/\/(?:www\.)?[\dA-Za-z-]+(?:\.[A-Za-z]{2,})+(?:\/[^ "]+)?(?:\?.*)?$/.test(me)}const Tw=me=>me.endsWith("/")?me.slice(0,-1):me;async function dv(me,p){try{const T=new AbortController,{signal:L}=T,R=setTimeout(()=>{T.abort()},5e3),de=await fetch(Tw(p.baseURL)+"/stream-link",{method:"post",headers:{Accept:"*/*",Authorization:p.jwt,"Content-Type":"application/json"},body:JSON.stringify(p.data),signal:L});clearTimeout(R);const E=await de.json();if(de.ok)return E;me(E);return}catch(T){throw me(T),T instanceof Error?T:new Error(JSON.stringify(T))}}class Ew{constructor(p){De(this,"player");De(this,"mediaEl");De(this,"boundCheckConnected");De(this,"boundCheckAvailability");De(this,"isAirPlaySession",!1);De(this,"capturedAirPlayActive",!1);De(this,"apiPayload");De(this,"currentLicenseUrl");De(this,"currentFilter");this.player=p,this.mediaEl=this.player.getMediaElement(),this.boundCheckConnected=this.checkConnected.bind(this),this.boundCheckAvailability=this.checkAvailability.bind(this),this.checkAvailability(),this.addEventListeners()}destroy(){this.player.off(jt.AirPlayConnectionChanged,this.boundCheckConnected),this.player.off(jt.AirPlayAvailabilityChanged,this.boundCheckAvailability),this.unregisterCurrentFilter()}addEventListeners(){this.player.on(jt.AirPlayConnectionChanged,this.boundCheckConnected),this.player.on(jt.AirPlayAvailabilityChanged,this.boundCheckAvailability)}updateAirPlayState(p){this.player.state.airPlay={...this.player.state.airPlay,...p},this.player.reemit(jt.AirPlayStateChanged,this.player.state.airPlay)}unregisterCurrentFilter(){var p;this.currentFilter&&((p=this.player.getNetworkingEngine())==null||p.unregisterRequestFilter(this.currentFilter),this.currentFilter=void 0)}registerSimpleFilter(){const p=(T,L)=>{var R;T!==hs.net.NetworkingEngine.RequestType.LICENSE||!this.isAirPlaySession&&!this.mediaEl.webkitCurrentPlaybackTargetIsWireless||(this.currentLicenseUrl&&(L.uris=[this.currentLicenseUrl]),(R=this.apiPayload)!=null&&R.jwt&&(L.headers.Authorization=`Bearer ${this.apiPayload.jwt}`))};this.player.getNetworkingEngine().registerRequestFilter(p),this.currentFilter=p}registerRenewalFilter(){const p=async(T,L)=>{var R;if(!(T!==hs.net.NetworkingEngine.RequestType.LICENSE||!this.isAirPlaySession&&!this.mediaEl.webkitCurrentPlaybackTargetIsWireless||!this.apiPayload))try{const de=await dv(()=>{},this.apiPayload),E=de==null?void 0:de.stream.drm;E!=null&&E.licenseUrl&&(L.uris=[E.licenseUrl],E.httpHeaders&&Object.assign(L.headers,E.httpHeaders),this.currentLicenseUrl=E.licenseUrl)}catch{this.currentLicenseUrl&&(L.uris=[this.currentLicenseUrl]),(R=this.apiPayload)!=null&&R.jwt&&(L.headers.Authorization=`Bearer ${this.apiPayload.jwt}`)}};this.player.getNetworkingEngine().registerRequestFilter(p),this.currentFilter=p}checkAvailability(){const p=!!globalThis.WebKitPlaybackTargetAvailabilityEvent;return this.updateAirPlayState({available:p}),p}checkConnected(){const p=!!this.mediaEl.webkitCurrentPlaybackTargetIsWireless;return this.updateAirPlayState({connected:p}),p}showAirPlayTargetPicker(){var p,T;if(!this.player.state.airPlay.available){this.updateAirPlayState({error:"AirPlay not available"});return}this.unregisterCurrentFilter(),this.registerRenewalFilter();try{(T=(p=this.mediaEl).webkitShowPlaybackTargetPicker)==null||T.call(p)}catch(L){this.updateAirPlayState({error:L.message})}}captureContext(){this.capturedAirPlayActive=!!this.mediaEl.webkitCurrentPlaybackTargetIsWireless}waitForReconnect(p=2e3){return!this.capturedAirPlayActive||this.mediaEl.webkitCurrentPlaybackTargetIsWireless?Promise.resolve():new Promise(T=>{const L=setTimeout(T,p),R=()=>{this.mediaEl.webkitCurrentPlaybackTargetIsWireless&&(clearTimeout(L),this.mediaEl.removeEventListener(jt.AirPlayConnectionChanged,R),T())};this.mediaEl.addEventListener(jt.AirPlayConnectionChanged,R)})}clearSessionsForAirPlay(){this.capturedAirPlayActive&&setTimeout(()=>{this.mediaEl.remote?this.mediaEl.remote.dispatchEvent(new Event("connecting")):this.mediaEl.dispatchEvent(new Event(jt.AirPlayConnectionChanged))},0)}init(p,T){var L;this.apiPayload=p,this.currentLicenseUrl=(L=T.stream.drm)==null?void 0:L.licenseUrl,this.isAirPlaySession=this.capturedAirPlayActive||!!this.mediaEl.webkitCurrentPlaybackTargetIsWireless,this.unregisterCurrentFilter(),this.registerSimpleFilter()}}class xw{constructor(p){De(this,"player");De(this,"fullscreenChangeHandler",()=>{const p=!!document.fullscreenElement;this.player.state.displayMode=p?Yi.FULLSCREEN:Yi.INLINE,this.player.reemit(String(jt.DisplayModeChanged),this.player.state.displayMode)});De(this,"enterPipHandler",()=>{this.player.state.displayMode=Yi.PIP,this.player.reemit(String(jt.DisplayModeChanged),this.player.state.displayMode)});De(this,"leavePipHandler",()=>{this.player.state.displayMode=Yi.INLINE,this.player.reemit(String(jt.DisplayModeChanged),this.player.state.displayMode)});De(this,"webkitPresentationModeChangedHandler",()=>{switch(this.player.getMediaElement().webkitPresentationMode){case"picture-in-picture":{this.player.state.displayMode=Yi.PIP;break}case"inline":{this.player.state.displayMode=Yi.INLINE;break}case"fullscreen":{this.player.state.displayMode=Yi.FULLSCREEN;break}}this.player.reemit(String(jt.DisplayModeChanged),this.player.state.displayMode)});this.player=p,this.initFullScreenEventListeners(),this.initPipEventListeners()}destroy(){this.removeFullscreenEventListeners(),this.removePipEventListeners()}initPipEventListeners(){this.removePipEventListeners();const p=this.player.getMediaElement();p&&(p.addEventListener("enterpictureinpicture",this.enterPipHandler),p.addEventListener("leavepictureinpicture",this.leavePipHandler),p.addEventListener("webkitpresentationmodechanged",this.webkitPresentationModeChangedHandler))}initFullScreenEventListeners(){this.removeFullscreenEventListeners(),document.addEventListener("fullscreenchange",this.fullscreenChangeHandler)}removePipEventListeners(){const p=this.player.getMediaElement();p&&(p.removeEventListener("enterpictureinpicture",this.enterPipHandler),p.removeEventListener("leavepictureinpicture",this.leavePipHandler),p.removeEventListener("webkitpresentationmodechanged",this.webkitPresentationModeChangedHandler))}removeFullscreenEventListeners(){document.removeEventListener("fullscreenchange",this.fullscreenChangeHandler)}}const Pu=class Pu{constructor(){De(this,"cues",[]);De(this,"vttFileUrl","")}async parse(p){this.vttFileUrl=p,this.cues=[];try{const T=await fetch(p);if(!T.ok)throw new zt({code:19013,message:`Failed to fetch VTT file: ${T.statusText}`});const L=await T.text();this.parseVttText(L)}catch(T){throw T instanceof zt?T:new zt({code:19012,message:`Error parsing thumbnail VTT: ${T.message}`,original:T})}}parseVttText(p){const T=p.split(`
113
- `);let L=0;for(;L<T.length&&!T[L].includes("WEBVTT");)L++;for(L++;L<T.length;){const R=T[L].trim();if(!R||/^\d+$/.test(R)){L++;continue}const de=Pu.TIMESTAMP_REGEX.exec(R);if(de){const E=this.parseTimestamp(de[1]),f=this.parseTimestamp(de[2]);if(L++,L<T.length){const c=T[L].trim(),v=this.parseCueLine({cueDataLine:c,startTime:E,endTime:f});v&&this.cues.push(v)}}L++}}parseTimestamp(p){const[T,L,R]=p.split(":"),de=Number.parseFloat(R);return+T*3600+ +L*60+de}parseCueLine(p){const{cueDataLine:T,startTime:L,endTime:R}=p,de=Pu.SPRITE_COORDINATES_REGEX.exec(T);if(!de)return;const E=this.resolveUrl(de[1]),f=Number.parseInt(de[2],10),c=Number.parseInt(de[3],10),v=Number.parseInt(de[4],10),I=Number.parseInt(de[5],10);return{startTime:L,endTime:R,url:E,x:f,y:c,width:v,height:I}}resolveUrl(p){try{return this.vttFileUrl?new URL(p,this.vttFileUrl).href:new URL(p).href}catch{return p}}getCueAtTime(p){let T=0,L=this.cues.length-1;for(;T<=L;){const R=Math.floor((T+L)/2),de=this.cues[R];if(p<de.startTime)L=R-1;else if(p>=de.endTime)T=R+1;else return de}}getAllCues(){return this.cues}hasLoadedCues(){return this.cues.length>0}clear(){this.cues=[],this.vttFileUrl=""}};De(Pu,"TIMESTAMP_REGEX",/^(\d{2}:\d{2}:\d{2}(?:\.\d{3})?)\s+-->\s+(\d{2}:\d{2}:\d{2}(?:\.\d{3})?)/),De(Pu,"SPRITE_COORDINATES_REGEX",/^(.+?)#xywh=(\d+),(\d+),(\d+),(\d+)/);let Ch=Pu;class ww{constructor(){De(this,"vttParser");De(this,"spriteImageCache",new Map);De(this,"isInitialized",!1);this.vttParser=new Ch}async initialize(p){if(!p){this.isInitialized=!1;return}try{await this.vttParser.parse(p),this.isInitialized=this.vttParser.hasLoadedCues(),this.preloadInitialImages()}catch(T){let L=T;T instanceof zt||(L=new zt({code:19009,message:"Failed to initialize thumbnail track service",original:T})),tr.handleSilentError(L),this.isInitialized=!1}}preloadInitialImages(){const p=this.vttParser.getAllCues(),L=[...new Set(p.map(R=>typeof R.url=="string"?R.url:String(R.url)))].slice(0,3);for(const R of L)this.loadSpriteImage(R)}loadSpriteImage(p){return this.spriteImageCache.has(p)?Promise.resolve(this.spriteImageCache.get(p)):new Promise(T=>{const L=new Image;try{L.crossOrigin="anonymous"}catch{}L.addEventListener("load",()=>{this.spriteImageCache.set(p,L),T(L)}),L.addEventListener("error",()=>{tr.handleSilentError(new zt({code:19011,message:`Failed to load sprite image: ${p}`})),T(void 0)}),L.src=p})}getThumbnailAtTime(p){if(!this.isInitialized)return;const T=this.vttParser.getCueAtTime(p);if(T)return{imageUrl:typeof T.url=="string"?T.url:String(T.url),spriteX:T.x,spriteY:T.y,spriteWidth:T.width,spriteHeight:T.height}}async renderThumbnailToCanvas(p,T){const L=this.getThumbnailAtTime(p);if(L)try{const R=await this.loadSpriteImage(L.imageUrl);if(!R)return;const de=T.getContext("2d");if(!de)return;T.width=L.spriteWidth,T.height=L.spriteHeight,de.clearRect(0,0,T.width,T.height),de.drawImage(R,L.spriteX,L.spriteY,L.spriteWidth,L.spriteHeight,0,0,L.spriteWidth,L.spriteHeight)}catch(R){tr.handleSilentError(new zt({code:19010,message:`Failed to render thumbnail: ${L.imageUrl}`,original:R}))}}isAvailable(){return this.isInitialized}reset(){this.vttParser.clear(),this.spriteImageCache.clear(),this.isInitialized=!1}getParser(){return this.vttParser}}const Rs=class Rs{constructor(p){De(this,"player");De(this,"actions",new Map);De(this,"triggeredOnceActions",new Set);De(this,"currentActiveActions",new Set);De(this,"intervalId");De(this,"lastCheckTime",-1);De(this,"isInitialized",!1);De(this,"streamStartEpoch");De(this,"onSeeked",()=>{this.evaluateActions()});De(this,"isEvaluatingActions",!1);De(this,"pendingEvaluateActions",!1);this.player=p}initialize(){if(this.isInitialized)return;const p=this.player.getMediaElement();this.startIntervalCheck(),p.addEventListener(jt.Seeked,this.onSeeked),this.isInitialized=!0}destroy(){if(!this.isInitialized)return;this.stopIntervalCheck(),this.player.getMediaElement().removeEventListener(jt.Seeked,this.onSeeked),this.clearActions(),this.isInitialized=!1}registerAction(p){this.actions.has(p.id)&&console.warn(`[TimeBoundActionsService] Action with id "${p.id}" is already registered. Overwriting existing action.`),this.actions.set(p.id,p),this.detectAndSetStreamStartEpoch(p)}registerActions(p){for(const T of p)this.registerAction(T)}unregisterAction(p){this.actions.delete(p),this.triggeredOnceActions.delete(p),this.currentActiveActions.delete(p)}resetFiredActions(p){for(const T of p){const L=this.actions.get(T);L&&this.handleActionExited(L,this.player.getCurrentTime())}p.clear()}clearActions(){this.resetFiredActions(this.triggeredOnceActions),this.resetFiredActions(this.currentActiveActions),this.actions.clear(),this.lastCheckTime=-1,this.streamStartEpoch=void 0}startIntervalCheck(){this.intervalId===void 0&&(this.intervalId=setInterval(()=>{this.player.isPlaying()&&this.onTimeUpdate()},Rs.CHECK_INTERVAL_MS))}stopIntervalCheck(){this.intervalId!==void 0&&(clearInterval(this.intervalId),this.intervalId=void 0)}onTimeUpdate(){const p=this.player.getCurrentTime();Math.abs(p-this.lastCheckTime)<=Rs.TIME_TOLERANCE_SECONDS||(this.lastCheckTime=p,this.evaluateActions())}evaluateActions(){if(this.isEvaluatingActions){this.pendingEvaluateActions=!0;return}this.isEvaluatingActions=!0;try{const p=this.player.getCurrentTime(),T=this.getNowActiveActions(p);this.processNewActions(T,p),this.processExitedActions(T,p),this.currentActiveActions.clear();for(const L of T)this.currentActiveActions.add(L)}finally{this.isEvaluatingActions=!1,this.handlePendingEvaluation()}}getNowActiveActions(p){const T=new Set;for(const[L,R]of this.actions)this.isTimeInRange(p,R)&&T.add(L);return T}processNewActions(p,T){for(const L of p){if(this.currentActiveActions.has(L))continue;const R=this.actions.get(L);R&&this.handleActionEntered(R,T)}}processExitedActions(p,T){for(const L of this.currentActiveActions){if(p.has(L))continue;const R=this.actions.get(L);R&&(this.handleActionExited(R,T),R.type===xa.PLAY_NEXT&&this.triggeredOnceActions.delete(L))}}handlePendingEvaluation(){this.pendingEvaluateActions&&(this.pendingEvaluateActions=!1,this.evaluateActions())}detectAndSetStreamStartEpoch(p){if(this.streamStartEpoch===void 0&&p.startTime>Rs.EPOCH_THRESHOLD){const T=this.player.getCurrentTime(),L=Date.now()/1e3;this.streamStartEpoch=L-T}}convertToPlayerTime(p){return p>Rs.EPOCH_THRESHOLD&&this.streamStartEpoch!==void 0?p-this.streamStartEpoch:p}isPointInTimeAction(p){return p.endTime===void 0}isWithinTolerance(p,T){return Math.abs(p-T)<=Rs.TIME_TOLERANCE_SECONDS}isTimeInRange(p,T){const L=this.convertToPlayerTime(T.startTime);if(this.isPointInTimeAction(T))return this.isWithinTolerance(p,L);const R=this.convertToPlayerTime(T.endTime);return p>=L&&p<=R}handleActionEntered(p,T){const L=p.fireOnce??p.type===xa.PLAY_NEXT;if(L&&this.triggeredOnceActions.has(p.id))return;const R={currentTime:T,duration:this.player.getDuration(),action:p,player:this.player};if(L&&this.triggeredOnceActions.add(p.id),p.callback)try{p.callback(R)}catch(de){tr.handleSilentError({code:19023,message:`[TimeBoundActionsService] Callback error for action ${p.id}`,original:de})}this.player.reemit(jt.TimeBoundActionTriggered,{action:p,context:R})}handleActionExited(p,T){const L={currentTime:T,duration:this.player.getDuration(),action:p,player:this.player};this.player.reemit(jt.TimeBoundActionExited,{action:p,context:L})}reset(){this.destroy()}};De(Rs,"CHECK_INTERVAL_MS",250),De(Rs,"TIME_TOLERANCE_SECONDS",.5),De(Rs,"EPOCH_THRESHOLD",1e9);let Mh=Rs;const Aw=[];class Iw{constructor(p,T){De(this,"player");De(this,"skippableTypes");De(this,"chaptersMap",new Map);De(this,"activeChapters",new Set);De(this,"currentChapter");De(this,"isCurrentChapterSkippable",!1);De(this,"handleActionTriggered",p=>{const{action:T}=p.detail;T.type!==xa.CHAPTER||!this.chaptersMap.get(T.id)||(this.activeChapters.add(T.id),this.updateCurrentChapter())});De(this,"handleActionExited",p=>{const{action:T}=p.detail;T.type===xa.CHAPTER&&(this.activeChapters.delete(T.id),this.updateCurrentChapter())});this.player=p,this.skippableTypes=(T==null?void 0:T.skippableTypes)??Aw,this.setupEventListeners()}setSkippableTypes(p){p&&(this.skippableTypes=[...p])}registerChapters(p){if(!p||p.length===0)return;this.chaptersMap.clear();for(const L of p){const R=this.getChapterId(L);this.chaptersMap.set(R,L)}const T=this.convertChaptersToActions(p);this.player.timeBoundActionsService.registerActions(T)}skipCurrentChapter(){this.currentChapter&&this.player.seek(this.currentChapter.until/1e3)}getChapterId(p){return`chapter-${p.from}-${p.until}`}convertChaptersToActions(p){return p.map(T=>({id:this.getChapterId(T),type:xa.CHAPTER,startTime:T.from/1e3,endTime:T.until/1e3,label:T.title,fireOnce:!1}))}isChapterSkippable(p){return p.type==="IDENT"?!1:this.skippableTypes.includes(p.type)}setupEventListeners(){this.player.on(jt.TimeBoundActionTriggered,this.handleActionTriggered),this.player.on(jt.TimeBoundActionExited,this.handleActionExited)}updateCurrentChapter(){if(this.activeChapters.size===0){this.clearCurrentChapter();return}if(this.hasAnyNonSkippableChapter()){this.hideSkipButton();return}const p=this.findLongestSkippableChapter();p&&this.setCurrentChapter(p)}clearCurrentChapter(){if(!this.currentChapter)return;const p=this.currentChapter;this.currentChapter=void 0,this.isCurrentChapterSkippable=!1,this.emitChapterExitEvent(p)}hasAnyNonSkippableChapter(){for(const p of this.activeChapters){const T=this.chaptersMap.get(p);if(T&&!this.isChapterSkippable(T))return!0}return!1}hideSkipButton(){const p=this.currentChapter,T=this.isCurrentChapterSkippable;this.currentChapter=void 0,this.isCurrentChapterSkippable=!1,T&&p&&this.emitChapterExitEvent(p)}findLongestSkippableChapter(){let p,T=-1;for(const L of this.activeChapters){const R=this.chaptersMap.get(L);if(!R||!this.isChapterSkippable(R))continue;const de=R.until-R.from;(!p||de>T)&&(p=R,T=de)}return p}setCurrentChapter(p){const T=this.currentChapter;this.currentChapter=p,this.isCurrentChapterSkippable=!0,this.hasChapterChanged(T,p)&&this.player.reemit(jt.ChapterEntered,{chapter:p,isSkippable:!0})}hasChapterChanged(p,T){return(p==null?void 0:p.from)!==T.from||(p==null?void 0:p.until)!==T.until}emitChapterExitEvent(p){this.player.reemit(jt.ChapterExited,{action:{id:this.getChapterId(p),type:xa.CHAPTER,startTime:p.from/1e3,endTime:p.until/1e3}})}clearChapters(){const p=[...this.chaptersMap.values()],T=this.convertChaptersToActions(p);for(const L of T)this.player.timeBoundActionsService.unregisterAction(L.id);this.chaptersMap.clear(),this.activeChapters.clear(),this.currentChapter=void 0,this.isCurrentChapterSkippable=!1}destroy(){this.player.off(jt.TimeBoundActionTriggered,this.handleActionTriggered),this.player.off(jt.TimeBoundActionExited,this.handleActionExited),this.clearChapters()}reset(){this.clearChapters()}}class Cw{constructor(p){De(this,"player");De(this,"_isAudioOnly");this.player=p}isAudioOnly(){if(this._isAudioOnly===void 0){const p=this.player.getMediaElement();this._isAudioOnly=p instanceof HTMLAudioElement}return this._isAudioOnly}reset(){this.isAudioOnly()||this.player.removeAllTextTracks()}handleSubtitles(p){var T;this.isAudioOnly()||(this.reset(),(T=p.assets.subtitles)!=null&&T.length&&this.player.addTextTracks(p.assets.subtitles))}}class Mw{async parseManifestForTracks(p){try{if(!(p!=null&&p.includes(".m3u8")))return[];const T=await fetch(p);if(!T.ok)return console.error("Failed to fetch manifest:",T.statusText),[];const L=await T.text();return this.parseHLSManifest(L,p)}catch(T){return console.error("Failed to parse manifest:",T),[]}}parseHLSManifest(p,T){const L=p.split(`
114
- `),R=this.parseAudioGroups(L);return this.parseVariantStreams({lines:L,baseUrl:T,audioGroups:R}).sort((E,f)=>(E.bandwidth||0)-(f.bandwidth||0))}parseAudioGroups(p){const T=new Map;for(const L of p){const R=L.trim();if(R.startsWith("#EXT-X-MEDIA:TYPE=AUDIO")){const de=this.parseAudioGroup(R);de&&T.set(de.id,de)}}return T}parseVariantStreams({lines:p,baseUrl:T,audioGroups:L}){const R=[];let de=0;for(let E=0;E<p.length;E++){const f=p[E].trim();if(!(f!=null&&f.startsWith("#EXT-X-STREAM-INF:")))continue;const c=(p[E+1]||"").trim();if(!c||c.startsWith("#"))continue;const v=this.parseHLSStreamInfo({infoLine:f,playlistUrl:c,baseUrl:T,trackId:de,audioGroups:L});v&&(R.push(v),de++)}return R}parseAudioGroup(p){const T=/group-id="([^"]+)"/i.exec(p),L=/language="([^"]+)"/i.exec(p),R=/name="([^"]+)"/i.exec(p),de=/characteristics="([^"]+)"/i.exec(p);if(!T)return;const f=(de?de[1]:"").includes("public.accessibility.describes-video");return{id:T[1],language:L?L[1]:"und",name:R?R[1]:"",isAudioDescription:f}}parseHLSStreamInfo({infoLine:p,playlistUrl:T,baseUrl:L,trackId:R,audioGroups:de}){const E=/bandwidth=(\d+)/i.exec(p),f=E?Number.parseInt(E[1],10):0,c=/resolution=\d+x(\d+)/i.exec(p);let v=c?Number.parseInt(c[1],10):0;const I=/codecs="([^"]+)"/i.exec(p),x=I?I[1]:"",C=!/avc|hvc|hev|vp9/i.test(x),j=/audio="([^"]+)"/i.exec(p),z=j?j[1]:void 0,F=z?de.get(z):void 0,K=/language="([^"]+)"/i.exec(p),N=(F==null?void 0:F.language)||(K?K[1]:"und"),P=(F==null?void 0:F.isAudioDescription)||!1;v||(v=this.getHeightFromUrl(T));let $=T;try{$=new URL(T,L).href}catch{}const d=C?this.getBandwidthFromUrl(T)||Math.round(f/1e3):v||Math.round(f/1e3),M=!C&&v>0?`${v}p`:`${Math.round((this.getBandwidthFromUrl(T)||f||0)/1e3)} kbps`;return{id:R,width:0,height:v,bandwidth:f,value:d,label:M,originalTrack:void 0,streamTrackId:R,language:N,isAudioOnly:C,isAudioDescription:P,playlistUrl:$}}getHeightFromUrl(p){const T=/(\d{3,4})p|[_-](\d{3,4})[._-]/.exec(p),L=T?T[1]||T[2]:void 0;return L?Number.parseInt(L,10):0}getBandwidthFromUrl(p){const T=/=(\d{3,6})/.exec(p);return T?Number.parseInt(T[1],10):0}}const hv="description",pv="public.accessibility.describes-video";class Pw{constructor(p){De(this,"player");De(this,"hlsManifestParser");De(this,"manifestTracks",[]);De(this,"currentManifestUri","");De(this,"_currentTrack");De(this,"idAutoTrack",-1);this.player=p,this.hlsManifestParser=new Mw}get currentTrack(){return!this._currentTrack||this._currentTrack.streamTrackId===this.idAutoTrack?this.getActiveTrack():this._currentTrack}isManifestTrackAvailable(){return!1}reset(){this.manifestTracks=[],this.currentManifestUri="",this._currentTrack=void 0}getShakaPlayer(){return this.player.player}getVariantTracks(){return this.getShakaPlayer().getVariantTracks()}getAudioTracks(){return this.getShakaPlayer().getAudioTracks()}getVideoTracks(){return this.getShakaPlayer().getVideoTracks()}isAudioOnly(){return this.getShakaPlayer().isAudioOnly()}getAvailableVideoTracks(){const p=this.mapVariantTracksToStreamTracks(this.getVariantTracks()).filter(L=>!L.isAudioOnly);if(p.length<=1&&this.isManifestTrackAvailable())return this.getVideoTracksFromManifest();if(p.length===0)return[];const T=new Map;for(const L of p)L.value!==this.idAutoTrack&&!T.has(L.value)&&T.set(L.value,L);return this.addAutoRow([...T.values()])}getAudioTracksByVideoQuality(p){var L;if(this.isAudioOnly())return[];const T=this.mapVariantTracksToStreamTracks(this.getVariantTracks());if(!this.hasChoiceOfTrack(T))return[];if(T.some(R=>R.isAudioDescription)){const R=this.getActiveTrack(),de=(R==null?void 0:R.height)||((L=T.find(E=>E.height))==null?void 0:L.height);return T.filter(E=>!de||E.height===de)}return T.some(R=>R.height===p)?this.mapVariantTracksToStreamTracks(T.filter(R=>R.height===p)):[]}getAudioOnlyTracks(){if(!this.isAudioOnly())return[];const p=this.getVariantTracks();return!this.hasChoiceOfTrack(p)&&this.isManifestTrackAvailable()?this.addAutoRow(this.manifestTracks.filter(T=>T.isAudioOnly)):this.addAutoRow(this.mapVariantTracksToStreamTracks(p))}init(){const p=this.getVariantTracks();let T;if(this.isAudioOnly()){const L=p.find(R=>R.bandwidth===this.player.state.audioPlaybackQuality);L&&(T=this.mapVariantTracksToStreamTracks([L])[0])}else{let L=this.mapVariantTracksToStreamTracks(p.filter(R=>R.height===this.player.state.videoPlaybackQuality));L.length>1&&(L=L.filter(R=>R.isAudioDescription===this.player.state.useAudioDescription&&R.language===this.player.state.audioLanguage)),L.length>0&&(T=L[0])}T||(T=this.mapVariantTracksToStreamTracks(this.addAutoRow([]))[0]),this.setTrack(T,!1)}setTrack(p,T){if(this._currentTrack=p,this.isManifestTrackAvailable()){this.loadQualityDirect(p,T);return}this.setStreamTrack(p,T),this.player.reemit(jt.StreamTrackChanged)}setVideoTrackByQuality(p){const T=this.getAvailableVideoTracks().find(L=>L.value===p);T&&this.setTrack(T,!0)}getAlternateStreamURLForSafari(){var p,T;if(this.isManifestTrackAvailable()){if(this.manifestTracks.some(L=>!L.isAudioOnly)){if(this.player.state.videoPlaybackQuality>0)return(p=this.manifestTracks.find(L=>L.height===this.player.state.videoPlaybackQuality))==null?void 0:p.playlistUrl}else if(this.player.state.audioPlaybackQuality>0)return(T=this.manifestTracks.find(L=>L.bandwidth===this.player.state.audioPlaybackQuality))==null?void 0:T.playlistUrl}}async parseManifestForTracks(p){this.currentManifestUri=p,this.manifestTracks=await this.hlsManifestParser.parseManifestForTracks(p)}mapVariantTracksToStreamTracks(p){if(p.length>0&&"streamTrackId"in p[0])return p;let T=1;return p.map(L=>{var x,C;const R=L,de=!!R.videoId,E=!!R.bandwidth;let f;de?f=`${R.height}p`:E?f=`${Math.round(R.bandwidth/1e3)} kbps`:f=R.label;const c=((x=R.audioRoles)==null?void 0:x.some(j=>j===hv||j===pv))||!1,v=((C=R.roles)==null?void 0:C.some(j=>j===hv||j===pv))||!1,I=c||v;return{id:R.id,width:R.width,height:R.height,bandwidth:R.bandwidth,value:de?R.height:R.bandwidth||T,label:f,originalTrack:R,streamTrackId:T++,language:R.language,isAudioOnly:!de,isAudioDescription:I}})}addAutoRow(p){return p.some(L=>L.value===this.idAutoTrack)?p:[{id:this.idAutoTrack,value:this.idAutoTrack,label:"Auto",streamTrackId:this.idAutoTrack,isAudioOnly:this.isAudioOnly(),isAudioDescription:!1,originalTrack:void 0,playlistUrl:this.currentManifestUri},...p]}async loadQualityDirect(p,T){const L=this.manifestTracks.find(c=>{const v=c.value===p.value||c.streamTrackId===p.streamTrackId||c.bandwidth===p.bandwidth,I=!p.language||c.language===p.language,x=c.isAudioDescription===p.isAudioDescription;return v&&I&&x}),R=p.value===this.idAutoTrack?this.currentManifestUri:(L==null?void 0:L.playlistUrl)||this.currentManifestUri,de=this.player.getCurrentTime(),E=this.player.isPlaying(),f=this.getShakaPlayer().getAssetUri();if(!(!f||R===f))try{await this.loadAndResume({targetUrl:R,currentTime:de,wasPlaying:E}),this.updatePlayerState(p,T)}catch(c){console.error("Failed to load quality directly, falling back to master manifest",c),this.currentManifestUri!==R&&(await this.loadAndResume({targetUrl:this.currentManifestUri,currentTime:de,wasPlaying:E}),this.updatePlayerState(p,T))}}async loadAndResume({targetUrl:p,currentTime:T,wasPlaying:L}){if(await this.getShakaPlayer().load(p,T),L)try{await this.player.play()}catch{}}updatePlayerState(p,T){T&&(this.isAudioOnly()?(this.player.state.audioPlaybackQuality=p.bandwidth,this.player.settingsStore.set("audioPlaybackQuality",p.bandwidth)):(this.player.state.videoPlaybackQuality=p.height,this.player.state.useAudioDescription=p.isAudioDescription,this.player.settingsStore.set("videoPlaybackQuality",p.height),this.player.settingsStore.set("useAudioDescription",p.isAudioDescription)),this.player.state.audioLanguage=p.language,this.player.settingsStore.set("audioLanguage",p.language))}getVideoTracksFromManifest(){const p=this.manifestTracks.filter(T=>!T.isAudioOnly);if(p.length>0){const T=p.map((L,R)=>({...L,streamTrackId:R})).sort((L,R)=>(L.bandwidth||0)-(R.bandwidth||0));return this.addAutoRow(T)}return[]}setStreamTrack(p,T=!1){if(((p==null?void 0:p.streamTrackId)??this.idAutoTrack)===this.idAutoTrack){this.player.configure({abr:{enabled:!0}}),T&&p&&this.setPlayerQualityState(p,!0);return}const R=2;this.player.configure({abr:{enabled:!1}}),this.getShakaPlayer().selectVariantTrack(p.originalTrack,!0,R),this.setPlayerQualityState(p,T)}setPlayerQualityState(p,T){if(this.isAudioOnly()){this.player.state.audioPlaybackQuality=p.bandwidth,T&&this.player.settingsStore.set("audioPlaybackQuality",p.bandwidth);return}this.player.state.videoPlaybackQuality=p.height,this.player.state.useAudioDescription=p.isAudioDescription,this.player.state.audioLanguage=p.language,T&&(this.player.settingsStore.set("videoPlaybackQuality",p.height),this.player.settingsStore.set("useAudioDescription",p.isAudioDescription),this.player.settingsStore.set("audioLanguage",p.language))}getActiveTrack(){const p=this.getVariantTracks();if(p.length===0)return;if(p.length===1)return this.mapVariantTracksToStreamTracks(p)[0];const T=p.find(L=>L.active);if(T)return this.mapVariantTracksToStreamTracks([T])[0]}hasChoiceOfTrack(p){return p.length>1}}class kw{constructor(p,T){De(this,"airPlayService");De(this,"castService");De(this,"advertService");De(this,"playerId");De(this,"playerEvents");De(this,"state");De(this,"uiEvents");De(this,"mediaStateListeners");De(this,"thumbnailService");De(this,"timeBoundActionsService");De(this,"chapterSkipService");De(this,"subtitlesService");De(this,"streamTrackService");De(this,"playerConfig");De(this,"container");De(this,"settingsStore");De(this,"displayModeHandler");De(this,"isInitialized",!1);De(this,"_player");De(this,"currentStreamMode",Nr.NONE);De(this,"streamLoadingData",{});De(this,"mediaEventListeners",new Map);De(this,"onLoadedMetadata",()=>{const p=this.getMediaElement();this.isLive()&&this.getPlaybackRate()!==1&&p&&(p.playbackRate=1)});var L;this.playerConfig=T,this.container=p,this.settingsStore=T.settingsStore,this.playerId=ew(),this.playerEvents=fw(this.playerId),this.state=uw(T.settingsStore),this.advertService=new yw(this),this.castService=new aw(this,T.chromecastReceiverId||Hx.PRODUCTION_V2),this.thumbnailService=new ww,this.timeBoundActionsService=new Mh(this),this.chapterSkipService=new Iw(this,{skippableTypes:(L=T.options)==null?void 0:L.skippableChapters}),this.subtitlesService=new Cw(this),this.streamTrackService=new Pw(this)}get player(){return this._player}destroy(){var T,L,R,de,E,f,c,v;this.isInitialized=!1;const p=(T=this.player)==null?void 0:T.getMediaElement();if(p){for(const[I,x]of this.mediaEventListeners.entries())p.removeEventListener(I,x);this.mediaEventListeners.clear(),p.removeEventListener(jt.LoadedMetadata,this.onLoadedMetadata)}this.mediaStateListeners&&this.mediaStateListeners(),(L=this.displayModeHandler)==null||L.destroy(),(R=this.timeBoundActionsService)==null||R.destroy(),(de=this.chapterSkipService)==null||de.destroy(),(E=this.castService)==null||E.destroy(),(f=this.advertService)==null||f.destroy(),(c=this.subtitlesService)==null||c.reset(),(v=this.streamTrackService)==null||v.reset(),this.playerEvents.removeAllListeners(),this._player&&(this._player.destroy(),this._player=void 0)}async initialize(){this.isInitialized||(this._player=await Zx(this,this.playerConfig.mediaType??bs.VIDEO),this.displayModeHandler=new xw(this),this.forwardAllMediaEvents(),this.initAirPlayService(),this.setupPlaybackRateHandler(),this.castService.initialize(),this.isInitialized=!0)}getPlayerContainer(){return this.container}async load(p,T){await this.initialize();const L=this.player.load(p);this.applyPersistedSettings(),this.timeBoundActionsService.initialize(),this.streamLoadingData=T,await L,this.currentStreamMode=this.determineStreamMode()}async unload(){const p=this.player.unload();this.advertService.destroy(),this.timeBoundActionsService.reset(),this.thumbnailService.reset(),this.subtitlesService.reset(),this.chapterSkipService.reset(),this.streamTrackService.reset(),this.currentStreamMode=Nr.NONE,await p}async play(){if(this.advertService.isPlayingAd()){this.advertService.resumeAd();return}await this.getMediaElement().play()}pause(){if(this.advertService.isPlayingAd()){this.advertService.pauseAd();return}this.getMediaElement().pause()}async togglePlayPause(){if(this.advertService.isPlayingAd()){this.advertService.isAdPaused()?this.advertService.resumeAd():this.advertService.pauseAd();return}await(this.isPlaying()?this.pause():this.play())}replay(){if(this.isLive())return;const p=this.getMediaElement();p.currentTime=0,p.play()}seek(p){if(this.advertService.isPlayingAd()){console.warn(Ya.NO_SEEK);return}const T=this.getMediaElement();if(this.currentStreamMode===Nr.LIVE){const{start:R,end:de}=this.getSeekRange();T.currentTime=Ol(p,{min:R,max:de});return}const L=T.duration;if(!Ah(L)){tr.handleSilentError(new zt({code:19020,message:"Cannot seek: Media duration is not available or invalid."}));return}T.currentTime=Ol(p,{min:0,max:L}),this.state.mediaState===li.ENDED&&p<L&&this.play()}forward(p=Jc.DEFAULT_SECONDS_TO_SKIP){if(this.advertService.isPlayingAd()){console.warn(Ya.NO_SEEK);return}if(this.getMode()===Nr.LIVE_NO_DVR)return;if(!Number.isFinite(p)||p<=0){console.warn("Invalid forward time:",p);return}const T=this.getMediaElement(),L=this.getCurrentTime();if(!Ah(L)){console.warn("Cannot seek forward: Current time is not available or invalid.");return}const R=this.isLive()?this.getSeekRange().end:T.duration;if(!Ah(R)){console.warn("Cannot seek forward: Maximum seek time is not available or invalid.");return}const de=Math.min(L+p,R);T.currentTime=de}backward(p=Jc.DEFAULT_SECONDS_TO_SKIP){if(this.advertService.isPlayingAd()){console.warn(Ya.NO_SEEK);return}if(this.getMode()===Nr.LIVE_NO_DVR)return;if(p<=0){console.warn("Backward time must be a positive value.");return}const T=this.getMediaElement(),L=this.getCurrentTime();if(Number.isNaN(L)||!Number.isFinite(L)){console.warn("Cannot seek backward: Current time is not valid.");return}const R=this.isLive()?this.getSeekRange().start:0,de=Math.max(L-p,R);T.currentTime=de}getCurrentTime(){return this.getMediaElement().currentTime}getPlaybackRate(){return this.getMediaElement().playbackRate??this.state.playbackRate??1}setPlaybackRate(p){this.state.playbackRate=p,this.settingsStore.set("playbackRate",p);const T=this.getMediaElement();T.playbackRate=p}getVolume(){var T;const p=this.getMediaElement();return p?p.volume:((T=this.state)==null?void 0:T.volume)??.5}setVolume(p){const T=Ol(p,{min:0,max:1});this.state.volume=T,this.settingsStore.set("volume",T);const L=this.getMediaElement();L&&(L.volume=T),this.advertService.isPlayingAd()&&this.advertService.setVolume(T)}mute(){this.state.muted=!0,this.settingsStore.set("muted",!0);const p=this.getMediaElement();p&&(p.muted=!0),this.advertService.isPlayingAd()&&this.advertService.mute()}isMuted(){return this.getMediaElement().muted}unMute(){this.state.muted=!1,this.settingsStore.set("muted",!1);const p=this.getMediaElement();p&&(p.muted=!1),this.advertService.isPlayingAd()&&this.advertService.unmute()}toggleMute(){this.isMuted()?this.unMute():this.mute()}isPlaying(){return this.advertService.isPlayingAd()?!this.advertService.isAdPaused():this.getMediaElement().paused===!1}isLive(){return this.player.isLive()}isBuffering(){return this.player.isBuffering()}getDuration(){return this.getMediaElement().duration}seekToLiveEdge(){if(!this.isLive())return;const{end:p}=this.getSeekRange();this.seek(p)}getNetworkingEngine(){return this.player.getNetworkingEngine()}getSeekRange(){return{start:this.player.seekRange().start,end:this.player.seekRange().end}}getMediaElement(){return this.player.getMediaElement()}addTextTracks(p){for(const T of p)this.addTextTrack(T)}addTextTrack(p){const T=this.getMediaElement(),L=document.createElement("track");L.kind="subtitles",L.src=p.location,L.srclang=p.iso,L.label=p.name,T.appendChild(L)}setTextTrackVisibility({language:p,persist:T=!0}){const L=this.getTextTracks();for(const de of L)de.mode="disabled";const R=[...L].find(de=>de.language===p);R&&(R.mode="showing",this.state.subtitleLanguage=p),T&&(this.state.subtitleLanguage=p,this.settingsStore.set("subtitleLanguage",p))}getSelectedTextTrack(){const p=this.getTextTracks();for(const T of p)if(T.mode==="showing")return T}removeAllTextTracks(){const p=this.getMediaElement();for(const T of p.querySelectorAll("track"))T.remove()}getTextTracks(){return this.player.getMediaElement().textTracks}isFullscreenPossible(){return!!this.container.requestFullscreen}enterFullscreen(){this.container.requestFullscreen&&this.container.requestFullscreen().catch(p=>{tr.handleSilentError(new zt({code:19021,message:"Failed to enter fullscreen",original:p}))})}exitFullscreen(){document.fullscreenElement&&document.exitFullscreen().catch(p=>{tr.handleSilentError(new zt({code:19022,message:"Failed to exit fullscreen",original:p}))})}isDisplayModeChangeAllowed(){return this.state.displayMode!==Yi.INLINE||this.state.cast.connected===!1&&this.state.airPlay.connected===!1}isPipSupported(){var R;if(((R=this.streamLoadingData)==null?void 0:R.normalizedAvType)===bs.AUDIO)return!1;const p=this.player.getMediaElement(),T=typeof p.requestPictureInPicture=="function"&&!!document.pictureInPictureEnabled,L="webkitPresentationMode"in p;return T||L}async enterPip(){const p=this.player.getMediaElement();if(!this.isPipSupported()){console.warn("Picture-in-Picture is not supported in this browser");return}if(!this.isDisplayModeChangeAllowed()){console.warn("Picture-in-Picture is not allowed while casting or AirPlaying");return}try{await p.requestPictureInPicture(),this.state.displayMode=Yi.PIP}catch(T){tr.handleSilentError(new zt({code:19007,message:"Failed to enter Picture-in-Picture",original:T}))}}async exitPip(){try{document.pictureInPictureElement&&(typeof document.exitPictureInPicture=="function"?await document.exitPictureInPicture():await document.pictureInPictureElement.requestPictureInPicture())}catch(p){tr.handleSilentError(new zt({code:19008,message:"Failed to exit Picture-in-Picture",original:p}))}}configure(p){this.player.configure(p)}applyPersistedSettings(){const p=this.getMediaElement(),T=Math.max(0,Math.min(1,this.state.volume??1));p.volume=T,p.muted=this.state.muted,p.playbackRate=this.state.playbackRate}setupPlaybackRateHandler(){const p=this.getMediaElement();p&&p.addEventListener(jt.LoadedMetadata,this.onLoadedMetadata)}initAirPlayService(){this.airPlayService||(this.airPlayService=new Ew(this))}forwardAllMediaEvents(){const p=this.player.getMediaElement();if(!p)return;const T=Object.values(jt).filter(L=>L!==String(jt.MediaStateChanged)&&L!==String(jt.DisplayModeChanged)&&L!==String(jt.Error));for(const L of T){const R=this.toPlayerEventName(L);if(!R)continue;const de=this.createMediaEventForwardingHandler(R);this.mediaEventListeners.set(L,de),p.addEventListener(L,de)}}createMediaEventForwardingHandler(p){return(function(L){this.playerEvents.emit({eventName:p,value:L})}).bind(this)}toPlayerEventName(p){if(Object.values(jt).includes(p))return p;if(p in jt)return jt[p];console.warn(`Unknown player event name: ${p}`)}on(p,T){const L=this.toPlayerEventName(p);L&&this.playerEvents.on({eventName:L,listener:T})}off(p,T){const L=this.toPlayerEventName(p);L&&this.playerEvents.off({eventName:L,listener:T})}once(p,T){const L=this.toPlayerEventName(p);L&&this.playerEvents.once({eventName:L,listener:T})}reemit(p,T){const L=this.toPlayerEventName(p);L&&this.playerEvents.emit({eventName:L,value:T})}getConfiguration(){return this.player.getConfiguration()}onAdEvent(p,T){this.on(p,T)}offAdEvent(p,T){this.off(p,T)}isPlayingAd(){return this.advertService.isPlayingAd()}setAdClickElement(p){return this.advertService.setAdClickElement(p)}getAdUiState(){if(this.advertService.isPlayingAd())return{isPlayingAd:this.advertService.isPlayingAd(),isAdPaused:this.advertService.isAdPaused(),remainingTime:this.advertService.getAdRemainingTime(),duration:this.advertService.getDuration(),currentTime:this.advertService.getCurrentTime(),adPosition:this.advertService.getAdPosition(),totalAds:this.advertService.getTotalAds()}}getMode(){return this.currentStreamMode}determineStreamMode(){var L;if(!this.isLive())return Nr.VOD;if(((L=this.streamLoadingData)==null?void 0:L.hasDvrWindow)===!1)return Nr.LIVE_NO_DVR;const p=this.getSeekRange();return p.end===Number.POSITIVE_INFINITY||p.end-p.start<30?Nr.LIVE_NO_DVR:Nr.LIVE}}var gv={exports:{}};(function(me,p){(function(L,R){me.exports=R()})(sv,function(){return function(){var T={3144:function(E,f,c){var v=c(6743),I=c(1002),x=c(76),C=c(7119);E.exports=C||v.call(x,I)},1002:function(E){E.exports=Function.prototype.apply},76:function(E){E.exports=Function.prototype.call},3126:function(E,f,c){var v=c(6743),I=c(9675),x=c(76),C=c(3144);E.exports=function(z){if(z.length<1||typeof z[0]!="function")throw new I("a function is required");return C(v,x,z)}},7119:function(E){E.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply},6556:function(E,f,c){var v=c(453),I=c(3126),x=I([v("%String.prototype.indexOf%")]);E.exports=function(j,z){var F=v(j,!!z);return typeof F=="function"&&x(j,".prototype.")>-1?I([F]):F}},7898:function(E,f,c){f.UINT32=c(3122),f.UINT64=c(174)},3122:function(E,f){var c,v;(function(I){x(Math.pow(36,5)),x(Math.pow(16,7)),x(Math.pow(10,9)),x(Math.pow(2,30)),x(36),x(16),x(10),x(2);function x(F,K){if(!(this instanceof x))return new x(F,K);if(this._low=0,this._high=0,this.remainder=null,typeof K>"u")return j.call(this,F);if(typeof F=="string")return z.call(this,F,K);C.call(this,F,K)}function C(F,K){return this._low=F|0,this._high=K|0,this}x.prototype.fromBits=C;function j(F){return this._low=F&65535,this._high=F>>>16,this}x.prototype.fromNumber=j;function z(F,K){var N=parseInt(F,K||10);return this._low=N&65535,this._high=N>>>16,this}x.prototype.fromString=z,x.prototype.toNumber=function(){return this._high*65536+this._low},x.prototype.toString=function(F){return this.toNumber().toString(F||10)},x.prototype.add=function(F){var K=this._low+F._low,N=K>>>16;return N+=this._high+F._high,this._low=K&65535,this._high=N&65535,this},x.prototype.subtract=function(F){return this.add(F.clone().negate())},x.prototype.multiply=function(F){var K=this._high,N=this._low,P=F._high,$=F._low,d,M;return M=N*$,d=M>>>16,d+=K*$,d&=65535,d+=N*P,this._low=M&65535,this._high=d&65535,this},x.prototype.div=function(F){if(F._low==0&&F._high==0)throw Error("division by zero");if(F._high==0&&F._low==1)return this.remainder=new x(0),this;if(F.gt(this))return this.remainder=this.clone(),this._low=0,this._high=0,this;if(this.eq(F))return this.remainder=new x(0),this._low=1,this._high=0,this;for(var K=F.clone(),N=-1;!this.lt(K);)K.shiftLeft(1,!0),N++;for(this.remainder=this.clone(),this._low=0,this._high=0;N>=0;N--)K.shiftRight(1),this.remainder.lt(K)||(this.remainder.subtract(K),N>=16?this._high|=1<<N-16:this._low|=1<<N);return this},x.prototype.negate=function(){var F=(~this._low&65535)+1;return this._low=F&65535,this._high=~this._high+(F>>>16)&65535,this},x.prototype.equals=x.prototype.eq=function(F){return this._low==F._low&&this._high==F._high},x.prototype.greaterThan=x.prototype.gt=function(F){return this._high>F._high?!0:this._high<F._high?!1:this._low>F._low},x.prototype.lessThan=x.prototype.lt=function(F){return this._high<F._high?!0:this._high>F._high?!1:this._low<F._low},x.prototype.or=function(F){return this._low|=F._low,this._high|=F._high,this},x.prototype.and=function(F){return this._low&=F._low,this._high&=F._high,this},x.prototype.not=function(){return this._low=~this._low&65535,this._high=~this._high&65535,this},x.prototype.xor=function(F){return this._low^=F._low,this._high^=F._high,this},x.prototype.shiftRight=x.prototype.shiftr=function(F){return F>16?(this._low=this._high>>F-16,this._high=0):F==16?(this._low=this._high,this._high=0):(this._low=this._low>>F|this._high<<16-F&65535,this._high>>=F),this},x.prototype.shiftLeft=x.prototype.shiftl=function(F,K){return F>16?(this._high=this._low<<F-16,this._low=0,K||(this._high&=65535)):F==16?(this._high=this._low,this._low=0):(this._high=this._high<<F|this._low>>16-F,this._low=this._low<<F&65535,K||(this._high&=65535)),this},x.prototype.rotateLeft=x.prototype.rotl=function(F){var K=this._high<<16|this._low;return K=K<<F|K>>>32-F,this._low=K&65535,this._high=K>>>16,this},x.prototype.rotateRight=x.prototype.rotr=function(F){var K=this._high<<16|this._low;return K=K>>>F|K<<32-F,this._low=K&65535,this._high=K>>>16,this},x.prototype.clone=function(){return new x(this._low,this._high)},c=[],v=(function(){return x}).apply(f,c),v!==void 0&&(E.exports=v)})()},174:function(E,f){var c,v;(function(I){var x={16:j(Math.pow(16,5)),10:j(Math.pow(10,5)),2:j(Math.pow(2,5))},C={16:j(16),10:j(10),2:j(2)};function j(N,P,$,d){if(!(this instanceof j))return new j(N,P,$,d);if(this.remainder=null,typeof N=="string")return K.call(this,N,P);if(typeof P>"u")return F.call(this,N);z.apply(this,arguments)}function z(N,P,$,d){return typeof $>"u"?(this._a00=N&65535,this._a16=N>>>16,this._a32=P&65535,this._a48=P>>>16,this):(this._a00=N|0,this._a16=P|0,this._a32=$|0,this._a48=d|0,this)}j.prototype.fromBits=z;function F(N){return this._a00=N&65535,this._a16=N>>>16,this._a32=0,this._a48=0,this}j.prototype.fromNumber=F;function K(N,P){P=P||10,this._a00=0,this._a16=0,this._a32=0,this._a48=0;for(var $=x[P]||new j(Math.pow(P,5)),d=0,M=N.length;d<M;d+=5){var U=Math.min(5,M-d),J=parseInt(N.slice(d,d+U),P);this.multiply(U<5?new j(Math.pow(P,U)):$).add(new j(J))}return this}j.prototype.fromString=K,j.prototype.toNumber=function(){return this._a16*65536+this._a00},j.prototype.toString=function(N){N=N||10;var P=C[N]||new j(N);if(!this.gt(P))return this.toNumber().toString(N);for(var $=this.clone(),d=new Array(64),M=63;M>=0&&($.div(P),d[M]=$.remainder.toNumber().toString(N),!!$.gt(P));M--);return d[M-1]=$.toNumber().toString(N),d.join("")},j.prototype.add=function(N){var P=this._a00+N._a00,$=P>>>16;$+=this._a16+N._a16;var d=$>>>16;d+=this._a32+N._a32;var M=d>>>16;return M+=this._a48+N._a48,this._a00=P&65535,this._a16=$&65535,this._a32=d&65535,this._a48=M&65535,this},j.prototype.subtract=function(N){return this.add(N.clone().negate())},j.prototype.multiply=function(N){var P=this._a00,$=this._a16,d=this._a32,M=this._a48,U=N._a00,J=N._a16,H=N._a32,Y=N._a48,ee=P*U,q=ee>>>16;q+=P*J;var se=q>>>16;q&=65535,q+=$*U,se+=q>>>16,se+=P*H;var re=se>>>16;return se&=65535,se+=$*J,re+=se>>>16,se&=65535,se+=d*U,re+=se>>>16,re+=P*Y,re&=65535,re+=$*H,re&=65535,re+=d*J,re&=65535,re+=M*U,this._a00=ee&65535,this._a16=q&65535,this._a32=se&65535,this._a48=re&65535,this},j.prototype.div=function(N){if(N._a16==0&&N._a32==0&&N._a48==0){if(N._a00==0)throw Error("division by zero");if(N._a00==1)return this.remainder=new j(0),this}if(N.gt(this))return this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0,this;if(this.eq(N))return this.remainder=new j(0),this._a00=1,this._a16=0,this._a32=0,this._a48=0,this;for(var P=N.clone(),$=-1;!this.lt(P);)P.shiftLeft(1,!0),$++;for(this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0;$>=0;$--)P.shiftRight(1),this.remainder.lt(P)||(this.remainder.subtract(P),$>=48?this._a48|=1<<$-48:$>=32?this._a32|=1<<$-32:$>=16?this._a16|=1<<$-16:this._a00|=1<<$);return this},j.prototype.negate=function(){var N=(~this._a00&65535)+1;return this._a00=N&65535,N=(~this._a16&65535)+(N>>>16),this._a16=N&65535,N=(~this._a32&65535)+(N>>>16),this._a32=N&65535,this._a48=~this._a48+(N>>>16)&65535,this},j.prototype.equals=j.prototype.eq=function(N){return this._a48==N._a48&&this._a00==N._a00&&this._a32==N._a32&&this._a16==N._a16},j.prototype.greaterThan=j.prototype.gt=function(N){return this._a48>N._a48?!0:this._a48<N._a48?!1:this._a32>N._a32?!0:this._a32<N._a32?!1:this._a16>N._a16?!0:this._a16<N._a16?!1:this._a00>N._a00},j.prototype.lessThan=j.prototype.lt=function(N){return this._a48<N._a48?!0:this._a48>N._a48?!1:this._a32<N._a32?!0:this._a32>N._a32?!1:this._a16<N._a16?!0:this._a16>N._a16?!1:this._a00<N._a00},j.prototype.or=function(N){return this._a00|=N._a00,this._a16|=N._a16,this._a32|=N._a32,this._a48|=N._a48,this},j.prototype.and=function(N){return this._a00&=N._a00,this._a16&=N._a16,this._a32&=N._a32,this._a48&=N._a48,this},j.prototype.xor=function(N){return this._a00^=N._a00,this._a16^=N._a16,this._a32^=N._a32,this._a48^=N._a48,this},j.prototype.not=function(){return this._a00=~this._a00&65535,this._a16=~this._a16&65535,this._a32=~this._a32&65535,this._a48=~this._a48&65535,this},j.prototype.shiftRight=j.prototype.shiftr=function(N){return N%=64,N>=48?(this._a00=this._a48>>N-48,this._a16=0,this._a32=0,this._a48=0):N>=32?(N-=32,this._a00=(this._a32>>N|this._a48<<16-N)&65535,this._a16=this._a48>>N&65535,this._a32=0,this._a48=0):N>=16?(N-=16,this._a00=(this._a16>>N|this._a32<<16-N)&65535,this._a16=(this._a32>>N|this._a48<<16-N)&65535,this._a32=this._a48>>N&65535,this._a48=0):(this._a00=(this._a00>>N|this._a16<<16-N)&65535,this._a16=(this._a16>>N|this._a32<<16-N)&65535,this._a32=(this._a32>>N|this._a48<<16-N)&65535,this._a48=this._a48>>N&65535),this},j.prototype.shiftLeft=j.prototype.shiftl=function(N,P){return N%=64,N>=48?(this._a48=this._a00<<N-48,this._a32=0,this._a16=0,this._a00=0):N>=32?(N-=32,this._a48=this._a16<<N|this._a00>>16-N,this._a32=this._a00<<N&65535,this._a16=0,this._a00=0):N>=16?(N-=16,this._a48=this._a32<<N|this._a16>>16-N,this._a32=(this._a16<<N|this._a00>>16-N)&65535,this._a16=this._a00<<N&65535,this._a00=0):(this._a48=this._a48<<N|this._a32>>16-N,this._a32=(this._a32<<N|this._a16>>16-N)&65535,this._a16=(this._a16<<N|this._a00>>16-N)&65535,this._a00=this._a00<<N&65535),P||(this._a48&=65535),this},j.prototype.rotateLeft=j.prototype.rotl=function(N){if(N%=64,N==0)return this;if(N>=32){var P=this._a00;if(this._a00=this._a32,this._a32=P,P=this._a48,this._a48=this._a16,this._a16=P,N==32)return this;N-=32}var $=this._a48<<16|this._a32,d=this._a16<<16|this._a00,M=$<<N|d>>>32-N,U=d<<N|$>>>32-N;return this._a00=U&65535,this._a16=U>>>16,this._a32=M&65535,this._a48=M>>>16,this},j.prototype.rotateRight=j.prototype.rotr=function(N){if(N%=64,N==0)return this;if(N>=32){var P=this._a00;if(this._a00=this._a32,this._a32=P,P=this._a48,this._a48=this._a16,this._a16=P,N==32)return this;N-=32}var $=this._a48<<16|this._a32,d=this._a16<<16|this._a00,M=$>>>N|d<<32-N,U=d>>>N|$<<32-N;return this._a00=U&65535,this._a16=U>>>16,this._a32=M&65535,this._a48=M>>>16,this},j.prototype.clone=function(){return new j(this._a00,this._a16,this._a32,this._a48)},c=[],v=(function(){return j}).apply(f,c),v!==void 0&&(E.exports=v)})()},7176:function(E,f,c){var v=c(3126),I=c(5795),x;try{x=[].__proto__===Array.prototype}catch(F){if(!F||typeof F!="object"||!("code"in F)||F.code!=="ERR_PROTO_ACCESS")throw F}var C=!!x&&I&&I(Object.prototype,"__proto__"),j=Object,z=j.getPrototypeOf;E.exports=C&&typeof C.get=="function"?v([C.get]):typeof z=="function"?function(K){return z(K==null?K:j(K))}:!1},3036:function(E){var f=Object.defineProperty||!1;if(f)try{f({},"a",{value:1})}catch{f=!1}E.exports=f},1237:function(E){E.exports=EvalError},9383:function(E){E.exports=Error},9290:function(E){E.exports=RangeError},9538:function(E){E.exports=ReferenceError},8068:function(E){E.exports=SyntaxError},9675:function(E){E.exports=TypeError},5345:function(E){E.exports=URIError},9612:function(E){E.exports=Object},9353:function(E){var f="Function.prototype.bind called on incompatible ",c=Object.prototype.toString,v=Math.max,I="[object Function]",x=function(F,K){for(var N=[],P=0;P<F.length;P+=1)N[P]=F[P];for(var $=0;$<K.length;$+=1)N[$+F.length]=K[$];return N},C=function(F,K){for(var N=[],P=K,$=0;P<F.length;P+=1,$+=1)N[$]=F[P];return N},j=function(z,F){for(var K="",N=0;N<z.length;N+=1)K+=z[N],N+1<z.length&&(K+=F);return K};E.exports=function(F){var K=this;if(typeof K!="function"||c.apply(K)!==I)throw new TypeError(f+K);for(var N=C(arguments,1),P,$=function(){if(this instanceof P){var H=K.apply(this,x(N,arguments));return Object(H)===H?H:this}return K.apply(F,x(N,arguments))},d=v(0,K.length-N.length),M=[],U=0;U<d;U++)M[U]="$"+U;if(P=Function("binder","return function ("+j(M,",")+"){ return binder.apply(this,arguments); }")($),K.prototype){var J=function(){};J.prototype=K.prototype,P.prototype=new J,J.prototype=null}return P}},6743:function(E,f,c){var v=c(9353);E.exports=Function.prototype.bind||v},453:function(E,f,c){var v,I=c(9612),x=c(9383),C=c(1237),j=c(9290),z=c(9538),F=c(8068),K=c(9675),N=c(5345),P=c(1514),$=c(8968),d=c(6188),M=c(8002),U=c(5880),J=c(414),H=c(3093),Y=Function,ee=function(Kn){try{return Y('"use strict"; return ('+Kn+").constructor;")()}catch{}},q=c(5795),se=c(3036),re=function(){throw new K},ue=q?function(){try{return arguments.callee,re}catch{try{return q(arguments,"callee").get}catch{return re}}}():re,xe=c(4039)(),he=c(3628),G=c(1064),we=c(8648),Ae=c(1002),Ie=c(76),He={},nt=typeof Uint8Array>"u"||!he?v:he(Uint8Array),Xe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":xe&&he?he([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":He,"%AsyncGenerator%":He,"%AsyncGeneratorFunction%":He,"%AsyncIteratorPrototype%":He,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":x,"%eval%":eval,"%EvalError%":C,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":Y,"%GeneratorFunction%":He,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":xe&&he?he(he([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!xe||!he?v:he(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":I,"%Object.getOwnPropertyDescriptor%":q,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":j,"%ReferenceError%":z,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!xe||!he?v:he(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":xe&&he?he(""[Symbol.iterator]()):v,"%Symbol%":xe?Symbol:v,"%SyntaxError%":F,"%ThrowTypeError%":ue,"%TypedArray%":nt,"%TypeError%":K,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":N,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":Ie,"%Function.prototype.apply%":Ae,"%Object.defineProperty%":se,"%Object.getPrototypeOf%":G,"%Math.abs%":P,"%Math.floor%":$,"%Math.max%":d,"%Math.min%":M,"%Math.pow%":U,"%Math.round%":J,"%Math.sign%":H,"%Reflect.getPrototypeOf%":we};if(he)try{null.error}catch(Kn){var it=he(he(Kn));Xe["%Error.prototype%"]=it}var ht=function Kn($t){var Sn;if($t==="%AsyncFunction%")Sn=ee("async function () {}");else if($t==="%GeneratorFunction%")Sn=ee("function* () {}");else if($t==="%AsyncGeneratorFunction%")Sn=ee("async function* () {}");else if($t==="%AsyncGenerator%"){var bn=Kn("%AsyncGeneratorFunction%");bn&&(Sn=bn.prototype)}else if($t==="%AsyncIteratorPrototype%"){var Ye=Kn("%AsyncGenerator%");Ye&&he&&(Sn=he(Ye.prototype))}return Xe[$t]=Sn,Sn},be={__proto__:null,"%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"]},Qe=c(6743),st=c(9957),Xt=Qe.call(Ie,Array.prototype.concat),Gt=Qe.call(Ae,Array.prototype.splice),gn=Qe.call(Ie,String.prototype.replace),ut=Qe.call(Ie,String.prototype.slice),In=Qe.call(Ie,RegExp.prototype.exec),Fn=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,hr=/\\(\\)?/g,wr=function($t){var Sn=ut($t,0,1),bn=ut($t,-1);if(Sn==="%"&&bn!=="%")throw new F("invalid intrinsic syntax, expected closing `%`");if(bn==="%"&&Sn!=="%")throw new F("invalid intrinsic syntax, expected opening `%`");var Ye=[];return gn($t,Fn,function(Tt,Et,On,nr){Ye[Ye.length]=On?gn(nr,hr,"$1"):Et||Tt}),Ye},pr=function($t,Sn){var bn=$t,Ye;if(st(be,bn)&&(Ye=be[bn],bn="%"+Ye[0]+"%"),st(Xe,bn)){var Tt=Xe[bn];if(Tt===He&&(Tt=ht(bn)),typeof Tt>"u"&&!Sn)throw new K("intrinsic "+$t+" exists, but is not available. Please file an issue!");return{alias:Ye,name:bn,value:Tt}}throw new F("intrinsic "+$t+" does not exist!")};E.exports=function($t,Sn){if(typeof $t!="string"||$t.length===0)throw new K("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Sn!="boolean")throw new K('"allowMissing" argument must be a boolean');if(In(/^%?[^%]*%?$/,$t)===null)throw new F("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var bn=wr($t),Ye=bn.length>0?bn[0]:"",Tt=pr("%"+Ye+"%",Sn),Et=Tt.name,On=Tt.value,nr=!1,Lr=Tt.alias;Lr&&(Ye=Lr[0],Gt(bn,Xt([0,1],Lr)));for(var qr=1,Kt=!0;qr<bn.length;qr+=1){var ct=bn[qr],Nn=ut(ct,0,1),at=ut(ct,-1);if((Nn==='"'||Nn==="'"||Nn==="`"||at==='"'||at==="'"||at==="`")&&Nn!==at)throw new F("property names with quotes must have matching quotes");if((ct==="constructor"||!Kt)&&(nr=!0),Ye+="."+ct,Et="%"+Ye+"%",st(Xe,Et))On=Xe[Et];else if(On!=null){if(!(ct in On)){if(!Sn)throw new K("base intrinsic for "+$t+" exists, but the property is not available.");return}if(q&&qr+1>=bn.length){var Vt=q(On,ct);Kt=!!Vt,Kt&&"get"in Vt&&!("originalValue"in Vt.get)?On=Vt.get:On=On[ct]}else Kt=st(On,ct),On=On[ct];Kt&&!nr&&(Xe[Et]=On)}}return On}},1064:function(E,f,c){var v=c(9612);E.exports=v.getPrototypeOf||null},8648:function(E){E.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null},3628:function(E,f,c){var v=c(8648),I=c(1064),x=c(7176);E.exports=v?function(j){return v(j)}:I?function(j){if(!j||typeof j!="object"&&typeof j!="function")throw new TypeError("getProto: not an object");return I(j)}:x?function(j){return x(j)}:null},6549:function(E){E.exports=Object.getOwnPropertyDescriptor},5795:function(E,f,c){var v=c(6549);if(v)try{v([],"length")}catch{v=null}E.exports=v},4039:function(E,f,c){var v=typeof Symbol<"u"&&Symbol,I=c(1333);E.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:I()}},1333:function(E){E.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var c={},v=Symbol("test"),I=Object(v);if(typeof v=="string"||Object.prototype.toString.call(v)!=="[object Symbol]"||Object.prototype.toString.call(I)!=="[object Symbol]")return!1;var x=42;c[v]=x;for(var C in c)return!1;if(typeof Object.keys=="function"&&Object.keys(c).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(c).length!==0)return!1;var j=Object.getOwnPropertySymbols(c);if(j.length!==1||j[0]!==v||!Object.prototype.propertyIsEnumerable.call(c,v))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var z=Object.getOwnPropertyDescriptor(c,v);if(z.value!==x||z.enumerable!==!0)return!1}return!0}},9957:function(E,f,c){var v=Function.prototype.call,I=Object.prototype.hasOwnProperty,x=c(6743);E.exports=x.call(v,I)},1514:function(E){E.exports=Math.abs},8968:function(E){E.exports=Math.floor},4459:function(E){E.exports=Number.isNaN||function(c){return c!==c}},6188:function(E){E.exports=Math.max},8002:function(E){E.exports=Math.min},5880:function(E){E.exports=Math.pow},414:function(E){E.exports=Math.round},3093:function(E,f,c){var v=c(4459);E.exports=function(x){return v(x)||x===0?x:x<0?-1:1}},6769:function(E,f,c){E.exports=c(187)},187:function(E,f){(function(c,v){var I={version:"3.0.1",x86:{},x64:{}};function x(d,M){return(d&65535)*M+(((d>>>16)*M&65535)<<16)}function C(d,M){return d<<M|d>>>32-M}function j(d){return d^=d>>>16,d=x(d,2246822507),d^=d>>>13,d=x(d,3266489909),d^=d>>>16,d}function z(d,M){d=[d[0]>>>16,d[0]&65535,d[1]>>>16,d[1]&65535],M=[M[0]>>>16,M[0]&65535,M[1]>>>16,M[1]&65535];var U=[0,0,0,0];return U[3]+=d[3]+M[3],U[2]+=U[3]>>>16,U[3]&=65535,U[2]+=d[2]+M[2],U[1]+=U[2]>>>16,U[2]&=65535,U[1]+=d[1]+M[1],U[0]+=U[1]>>>16,U[1]&=65535,U[0]+=d[0]+M[0],U[0]&=65535,[U[0]<<16|U[1],U[2]<<16|U[3]]}function F(d,M){d=[d[0]>>>16,d[0]&65535,d[1]>>>16,d[1]&65535],M=[M[0]>>>16,M[0]&65535,M[1]>>>16,M[1]&65535];var U=[0,0,0,0];return U[3]+=d[3]*M[3],U[2]+=U[3]>>>16,U[3]&=65535,U[2]+=d[2]*M[3],U[1]+=U[2]>>>16,U[2]&=65535,U[2]+=d[3]*M[2],U[1]+=U[2]>>>16,U[2]&=65535,U[1]+=d[1]*M[3],U[0]+=U[1]>>>16,U[1]&=65535,U[1]+=d[2]*M[2],U[0]+=U[1]>>>16,U[1]&=65535,U[1]+=d[3]*M[1],U[0]+=U[1]>>>16,U[1]&=65535,U[0]+=d[0]*M[3]+d[1]*M[2]+d[2]*M[1]+d[3]*M[0],U[0]&=65535,[U[0]<<16|U[1],U[2]<<16|U[3]]}function K(d,M){return M%=64,M===32?[d[1],d[0]]:M<32?[d[0]<<M|d[1]>>>32-M,d[1]<<M|d[0]>>>32-M]:(M-=32,[d[1]<<M|d[0]>>>32-M,d[0]<<M|d[1]>>>32-M])}function N(d,M){return M%=64,M===0?d:M<32?[d[0]<<M|d[1]>>>32-M,d[1]<<M]:[d[1]<<M-32,0]}function P(d,M){return[d[0]^M[0],d[1]^M[1]]}function $(d){return d=P(d,[0,d[0]>>>1]),d=F(d,[4283543511,3981806797]),d=P(d,[0,d[0]>>>1]),d=F(d,[3301882366,444984403]),d=P(d,[0,d[0]>>>1]),d}I.x86.hash32=function(d,M){d=d||"",M=M||0;for(var U=d.length%4,J=d.length-U,H=M,Y=0,ee=3432918353,q=461845907,se=0;se<J;se=se+4)Y=d.charCodeAt(se)&255|(d.charCodeAt(se+1)&255)<<8|(d.charCodeAt(se+2)&255)<<16|(d.charCodeAt(se+3)&255)<<24,Y=x(Y,ee),Y=C(Y,15),Y=x(Y,q),H^=Y,H=C(H,13),H=x(H,5)+3864292196;switch(Y=0,U){case 3:Y^=(d.charCodeAt(se+2)&255)<<16;case 2:Y^=(d.charCodeAt(se+1)&255)<<8;case 1:Y^=d.charCodeAt(se)&255,Y=x(Y,ee),Y=C(Y,15),Y=x(Y,q),H^=Y}return H^=d.length,H=j(H),H>>>0},I.x86.hash128=function(d,M){d=d||"",M=M||0;for(var U=d.length%16,J=d.length-U,H=M,Y=M,ee=M,q=M,se=0,re=0,ue=0,xe=0,he=597399067,G=2869860233,we=951274213,Ae=2716044179,Ie=0;Ie<J;Ie=Ie+16)se=d.charCodeAt(Ie)&255|(d.charCodeAt(Ie+1)&255)<<8|(d.charCodeAt(Ie+2)&255)<<16|(d.charCodeAt(Ie+3)&255)<<24,re=d.charCodeAt(Ie+4)&255|(d.charCodeAt(Ie+5)&255)<<8|(d.charCodeAt(Ie+6)&255)<<16|(d.charCodeAt(Ie+7)&255)<<24,ue=d.charCodeAt(Ie+8)&255|(d.charCodeAt(Ie+9)&255)<<8|(d.charCodeAt(Ie+10)&255)<<16|(d.charCodeAt(Ie+11)&255)<<24,xe=d.charCodeAt(Ie+12)&255|(d.charCodeAt(Ie+13)&255)<<8|(d.charCodeAt(Ie+14)&255)<<16|(d.charCodeAt(Ie+15)&255)<<24,se=x(se,he),se=C(se,15),se=x(se,G),H^=se,H=C(H,19),H+=Y,H=x(H,5)+1444728091,re=x(re,G),re=C(re,16),re=x(re,we),Y^=re,Y=C(Y,17),Y+=ee,Y=x(Y,5)+197830471,ue=x(ue,we),ue=C(ue,17),ue=x(ue,Ae),ee^=ue,ee=C(ee,15),ee+=q,ee=x(ee,5)+2530024501,xe=x(xe,Ae),xe=C(xe,18),xe=x(xe,he),q^=xe,q=C(q,13),q+=H,q=x(q,5)+850148119;switch(se=0,re=0,ue=0,xe=0,U){case 15:xe^=d.charCodeAt(Ie+14)<<16;case 14:xe^=d.charCodeAt(Ie+13)<<8;case 13:xe^=d.charCodeAt(Ie+12),xe=x(xe,Ae),xe=C(xe,18),xe=x(xe,he),q^=xe;case 12:ue^=d.charCodeAt(Ie+11)<<24;case 11:ue^=d.charCodeAt(Ie+10)<<16;case 10:ue^=d.charCodeAt(Ie+9)<<8;case 9:ue^=d.charCodeAt(Ie+8),ue=x(ue,we),ue=C(ue,17),ue=x(ue,Ae),ee^=ue;case 8:re^=d.charCodeAt(Ie+7)<<24;case 7:re^=d.charCodeAt(Ie+6)<<16;case 6:re^=d.charCodeAt(Ie+5)<<8;case 5:re^=d.charCodeAt(Ie+4),re=x(re,G),re=C(re,16),re=x(re,we),Y^=re;case 4:se^=d.charCodeAt(Ie+3)<<24;case 3:se^=d.charCodeAt(Ie+2)<<16;case 2:se^=d.charCodeAt(Ie+1)<<8;case 1:se^=d.charCodeAt(Ie),se=x(se,he),se=C(se,15),se=x(se,G),H^=se}return H^=d.length,Y^=d.length,ee^=d.length,q^=d.length,H+=Y,H+=ee,H+=q,Y+=H,ee+=H,q+=H,H=j(H),Y=j(Y),ee=j(ee),q=j(q),H+=Y,H+=ee,H+=q,Y+=H,ee+=H,q+=H,("00000000"+(H>>>0).toString(16)).slice(-8)+("00000000"+(Y>>>0).toString(16)).slice(-8)+("00000000"+(ee>>>0).toString(16)).slice(-8)+("00000000"+(q>>>0).toString(16)).slice(-8)},I.x64.hash128=function(d,M){d=d||"",M=M||0;for(var U=d.length%16,J=d.length-U,H=[0,M],Y=[0,M],ee=[0,0],q=[0,0],se=[2277735313,289559509],re=[1291169091,658871167],ue=0;ue<J;ue=ue+16)ee=[d.charCodeAt(ue+4)&255|(d.charCodeAt(ue+5)&255)<<8|(d.charCodeAt(ue+6)&255)<<16|(d.charCodeAt(ue+7)&255)<<24,d.charCodeAt(ue)&255|(d.charCodeAt(ue+1)&255)<<8|(d.charCodeAt(ue+2)&255)<<16|(d.charCodeAt(ue+3)&255)<<24],q=[d.charCodeAt(ue+12)&255|(d.charCodeAt(ue+13)&255)<<8|(d.charCodeAt(ue+14)&255)<<16|(d.charCodeAt(ue+15)&255)<<24,d.charCodeAt(ue+8)&255|(d.charCodeAt(ue+9)&255)<<8|(d.charCodeAt(ue+10)&255)<<16|(d.charCodeAt(ue+11)&255)<<24],ee=F(ee,se),ee=K(ee,31),ee=F(ee,re),H=P(H,ee),H=K(H,27),H=z(H,Y),H=z(F(H,[0,5]),[0,1390208809]),q=F(q,re),q=K(q,33),q=F(q,se),Y=P(Y,q),Y=K(Y,31),Y=z(Y,H),Y=z(F(Y,[0,5]),[0,944331445]);switch(ee=[0,0],q=[0,0],U){case 15:q=P(q,N([0,d.charCodeAt(ue+14)],48));case 14:q=P(q,N([0,d.charCodeAt(ue+13)],40));case 13:q=P(q,N([0,d.charCodeAt(ue+12)],32));case 12:q=P(q,N([0,d.charCodeAt(ue+11)],24));case 11:q=P(q,N([0,d.charCodeAt(ue+10)],16));case 10:q=P(q,N([0,d.charCodeAt(ue+9)],8));case 9:q=P(q,[0,d.charCodeAt(ue+8)]),q=F(q,re),q=K(q,33),q=F(q,se),Y=P(Y,q);case 8:ee=P(ee,N([0,d.charCodeAt(ue+7)],56));case 7:ee=P(ee,N([0,d.charCodeAt(ue+6)],48));case 6:ee=P(ee,N([0,d.charCodeAt(ue+5)],40));case 5:ee=P(ee,N([0,d.charCodeAt(ue+4)],32));case 4:ee=P(ee,N([0,d.charCodeAt(ue+3)],24));case 3:ee=P(ee,N([0,d.charCodeAt(ue+2)],16));case 2:ee=P(ee,N([0,d.charCodeAt(ue+1)],8));case 1:ee=P(ee,[0,d.charCodeAt(ue)]),ee=F(ee,se),ee=K(ee,31),ee=F(ee,re),H=P(H,ee)}return H=P(H,[0,d.length]),Y=P(Y,[0,d.length]),H=z(H,Y),Y=z(Y,H),H=$(H),Y=$(Y),H=z(H,Y),Y=z(Y,H),("00000000"+(H[0]>>>0).toString(16)).slice(-8)+("00000000"+(H[1]>>>0).toString(16)).slice(-8)+("00000000"+(Y[0]>>>0).toString(16)).slice(-8)+("00000000"+(Y[1]>>>0).toString(16)).slice(-8)},E.exports&&(f=E.exports=I),f.murmurHash3=I})()},8859:function(E,f,c){var v=typeof Map=="function"&&Map.prototype,I=Object.getOwnPropertyDescriptor&&v?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,x=v&&I&&typeof I.get=="function"?I.get:null,C=v&&Map.prototype.forEach,j=typeof Set=="function"&&Set.prototype,z=Object.getOwnPropertyDescriptor&&j?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,F=j&&z&&typeof z.get=="function"?z.get:null,K=j&&Set.prototype.forEach,N=typeof WeakMap=="function"&&WeakMap.prototype,P=N?WeakMap.prototype.has:null,$=typeof WeakSet=="function"&&WeakSet.prototype,d=$?WeakSet.prototype.has:null,M=typeof WeakRef=="function"&&WeakRef.prototype,U=M?WeakRef.prototype.deref:null,J=Boolean.prototype.valueOf,H=Object.prototype.toString,Y=Function.prototype.toString,ee=String.prototype.match,q=String.prototype.slice,se=String.prototype.replace,re=String.prototype.toUpperCase,ue=String.prototype.toLowerCase,xe=RegExp.prototype.test,he=Array.prototype.concat,G=Array.prototype.join,we=Array.prototype.slice,Ae=Math.floor,Ie=typeof BigInt=="function"?BigInt.prototype.valueOf:null,He=Object.getOwnPropertySymbols,nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Xe=typeof Symbol=="function"&&typeof Symbol.iterator=="object",it=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Xe||!0)?Symbol.toStringTag:null,ht=Object.prototype.propertyIsEnumerable,be=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(Pe){return Pe.__proto__}:null);function Qe(Pe,Ne){if(Pe===1/0||Pe===-1/0||Pe!==Pe||Pe&&Pe>-1e3&&Pe<1e3||xe.call(/e/,Ne))return Ne;var Cn=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof Pe=="number"){var Bn=Pe<0?-Ae(-Pe):Ae(Pe);if(Bn!==Pe){var Jn=String(Bn),mn=q.call(Ne,Jn.length+1);return se.call(Jn,Cn,"$&_")+"."+se.call(se.call(mn,/([0-9]{3})/g,"$&_"),/_$/,"")}}return se.call(Ne,Cn,"$&_")}var st=c(2634),Xt=st.custom,Gt=Ye(Xt)?Xt:null,gn={__proto__:null,double:'"',single:"'"},ut={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};E.exports=function Pe(Ne,Cn,Bn,Jn){var mn=Cn||{};if(On(mn,"quoteStyle")&&!On(gn,mn.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(On(mn,"maxStringLength")&&(typeof mn.maxStringLength=="number"?mn.maxStringLength<0&&mn.maxStringLength!==1/0:mn.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var io=On(mn,"customInspect")?mn.customInspect:!0;if(typeof io!="boolean"&&io!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(On(mn,"indent")&&mn.indent!==null&&mn.indent!==" "&&!(parseInt(mn.indent,10)===mn.indent&&mn.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(On(mn,"numericSeparator")&&typeof mn.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var yo=mn.numericSeparator;if(typeof Ne>"u")return"undefined";if(Ne===null)return"null";if(typeof Ne=="boolean")return Ne?"true":"false";if(typeof Ne=="string")return lt(Ne,mn);if(typeof Ne=="number"){if(Ne===0)return 1/0/Ne>0?"0":"-0";var rr=String(Ne);return yo?Qe(Ne,rr):rr}if(typeof Ne=="bigint"){var Mr=String(Ne)+"n";return yo?Qe(Ne,Mr):Mr}var So=typeof mn.depth>"u"?5:mn.depth;if(typeof Bn>"u"&&(Bn=0),Bn>=So&&So>0&&typeof Ne=="object")return hr(Ne)?"[Array]":"[Object]";var ei=ln(mn,Bn);if(typeof Jn>"u")Jn=[];else if(qr(Jn,Ne)>=0)return"[Circular]";function Pr(Mi,Un,Qi){if(Un&&(Jn=we.call(Jn),Jn.push(Un)),Qi){var ci={depth:mn.depth};return On(mn,"quoteStyle")&&(ci.quoteStyle=mn.quoteStyle),Pe(Mi,ci,Bn+1,Jn)}return Pe(Mi,mn,Bn+1,Jn)}if(typeof Ne=="function"&&!pr(Ne)){var Kr=Lr(Ne),xt=cn(Ne,Pr);return"[Function"+(Kr?": "+Kr:" (anonymous)")+"]"+(xt.length>0?" { "+G.call(xt,", ")+" }":"")}if(Ye(Ne)){var Ji=Xe?se.call(String(Ne),/^(Symbol\(.*\))_[^)]*$/,"$1"):nt.call(Ne);return typeof Ne=="object"&&!Xe?Ur(Ji):Ji}if(Dn(Ne)){for(var gr="<"+ue.call(String(Ne.nodeName)),ji=Ne.attributes||[],qo=0;qo<ji.length;qo++)gr+=" "+ji[qo].name+"="+In(Fn(ji[qo].value),"double",mn);return gr+=">",Ne.childNodes&&Ne.childNodes.length&&(gr+="..."),gr+="</"+ue.call(String(Ne.nodeName))+">",gr}if(hr(Ne)){if(Ne.length===0)return"[]";var oo=cn(Ne,Pr);return ei&&!It(oo)?"["+tn(oo,ei)+"]":"[ "+G.call(oo,", ")+" ]"}if(Kn(Ne)){var Fi=cn(Ne,Pr);return!("cause"in Error.prototype)&&"cause"in Ne&&!ht.call(Ne,"cause")?"{ ["+String(Ne)+"] "+G.call(he.call("[cause]: "+Pr(Ne.cause),Fi),", ")+" }":Fi.length===0?"["+String(Ne)+"]":"{ ["+String(Ne)+"] "+G.call(Fi,", ")+" }"}if(typeof Ne=="object"&&io){if(Gt&&typeof Ne[Gt]=="function"&&st)return st(Ne,{depth:So-Bn});if(io!=="symbol"&&typeof Ne.inspect=="function")return Ne.inspect()}if(Kt(Ne)){var Os=[];return C&&C.call(Ne,function(Mi,Un){Os.push(Pr(Un,Ne,!0)+" => "+Pr(Mi,Ne))}),Br("Map",x.call(Ne),Os,ei)}if(at(Ne)){var To=[];return K&&K.call(Ne,function(Mi){To.push(Pr(Mi,Ne))}),Br("Set",F.call(Ne),To,ei)}if(ct(Ne))return Cr("WeakMap");if(Vt(Ne))return Cr("WeakSet");if(Nn(Ne))return Cr("WeakRef");if(Sn(Ne))return Ur(Pr(Number(Ne)));if(Tt(Ne))return Ur(Pr(Ie.call(Ne)));if(bn(Ne))return Ur(J.call(Ne));if($t(Ne))return Ur(Pr(String(Ne)));if(typeof window<"u"&&Ne===window)return"{ [object Window] }";if(typeof globalThis<"u"&&Ne===globalThis||typeof c.g<"u"&&Ne===c.g)return"{ [object globalThis] }";if(!wr(Ne)&&!pr(Ne)){var Eo=cn(Ne,Pr),gs=be?be(Ne)===Object.prototype:Ne instanceof Object||Ne.constructor===Object,es=Ne instanceof Object?"":"null prototype",so=!gs&&it&&Object(Ne)===Ne&&it in Ne?q.call(nr(Ne),8,-1):es?"Object":"",xo=gs||typeof Ne.constructor!="function"?"":Ne.constructor.name?Ne.constructor.name+" ":"",fe=xo+(so||es?"["+G.call(he.call([],so||[],es||[]),": ")+"] ":"");return Eo.length===0?fe+"{}":ei?fe+"{"+tn(Eo,ei)+"}":fe+"{ "+G.call(Eo,", ")+" }"}return String(Ne)};function In(Pe,Ne,Cn){var Bn=Cn.quoteStyle||Ne,Jn=gn[Bn];return Jn+Pe+Jn}function Fn(Pe){return se.call(String(Pe),/"/g,"&quot;")}function hr(Pe){return nr(Pe)==="[object Array]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function wr(Pe){return nr(Pe)==="[object Date]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function pr(Pe){return nr(Pe)==="[object RegExp]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function Kn(Pe){return nr(Pe)==="[object Error]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function $t(Pe){return nr(Pe)==="[object String]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function Sn(Pe){return nr(Pe)==="[object Number]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function bn(Pe){return nr(Pe)==="[object Boolean]"&&(!it||!(typeof Pe=="object"&&it in Pe))}function Ye(Pe){if(Xe)return Pe&&typeof Pe=="object"&&Pe instanceof Symbol;if(typeof Pe=="symbol")return!0;if(!Pe||typeof Pe!="object"||!nt)return!1;try{return nt.call(Pe),!0}catch{}return!1}function Tt(Pe){if(!Pe||typeof Pe!="object"||!Ie)return!1;try{return Ie.call(Pe),!0}catch{}return!1}var Et=Object.prototype.hasOwnProperty||function(Pe){return Pe in this};function On(Pe,Ne){return Et.call(Pe,Ne)}function nr(Pe){return H.call(Pe)}function Lr(Pe){if(Pe.name)return Pe.name;var Ne=ee.call(Y.call(Pe),/^function\s*([\w$]+)/);return Ne?Ne[1]:null}function qr(Pe,Ne){if(Pe.indexOf)return Pe.indexOf(Ne);for(var Cn=0,Bn=Pe.length;Cn<Bn;Cn++)if(Pe[Cn]===Ne)return Cn;return-1}function Kt(Pe){if(!x||!Pe||typeof Pe!="object")return!1;try{x.call(Pe);try{F.call(Pe)}catch{return!0}return Pe instanceof Map}catch{}return!1}function ct(Pe){if(!P||!Pe||typeof Pe!="object")return!1;try{P.call(Pe,P);try{d.call(Pe,d)}catch{return!0}return Pe instanceof WeakMap}catch{}return!1}function Nn(Pe){if(!U||!Pe||typeof Pe!="object")return!1;try{return U.call(Pe),!0}catch{}return!1}function at(Pe){if(!F||!Pe||typeof Pe!="object")return!1;try{F.call(Pe);try{x.call(Pe)}catch{return!0}return Pe instanceof Set}catch{}return!1}function Vt(Pe){if(!d||!Pe||typeof Pe!="object")return!1;try{d.call(Pe,d);try{P.call(Pe,P)}catch{return!0}return Pe instanceof WeakSet}catch{}return!1}function Dn(Pe){return!Pe||typeof Pe!="object"?!1:typeof HTMLElement<"u"&&Pe instanceof HTMLElement?!0:typeof Pe.nodeName=="string"&&typeof Pe.getAttribute=="function"}function lt(Pe,Ne){if(Pe.length>Ne.maxStringLength){var Cn=Pe.length-Ne.maxStringLength,Bn="... "+Cn+" more character"+(Cn>1?"s":"");return lt(q.call(Pe,0,Ne.maxStringLength),Ne)+Bn}var Jn=ut[Ne.quoteStyle||"single"];Jn.lastIndex=0;var mn=se.call(se.call(Pe,Jn,"\\$1"),/[\x00-\x1f]/g,un);return In(mn,"single",Ne)}function un(Pe){var Ne=Pe.charCodeAt(0),Cn={8:"b",9:"t",10:"n",12:"f",13:"r"}[Ne];return Cn?"\\"+Cn:"\\x"+(Ne<16?"0":"")+re.call(Ne.toString(16))}function Ur(Pe){return"Object("+Pe+")"}function Cr(Pe){return Pe+" { ? }"}function Br(Pe,Ne,Cn,Bn){var Jn=Bn?tn(Cn,Bn):G.call(Cn,", ");return Pe+" ("+Ne+") {"+Jn+"}"}function It(Pe){for(var Ne=0;Ne<Pe.length;Ne++)if(qr(Pe[Ne],`
115
- `)>=0)return!1;return!0}function ln(Pe,Ne){var Cn;if(Pe.indent===" ")Cn=" ";else if(typeof Pe.indent=="number"&&Pe.indent>0)Cn=G.call(Array(Pe.indent+1)," ");else return null;return{base:Cn,prev:G.call(Array(Ne+1),Cn)}}function tn(Pe,Ne){if(Pe.length===0)return"";var Cn=`
116
- `+Ne.prev+Ne.base;return Cn+G.call(Pe,","+Cn)+`
117
- `+Ne.prev}function cn(Pe,Ne){var Cn=hr(Pe),Bn=[];if(Cn){Bn.length=Pe.length;for(var Jn=0;Jn<Pe.length;Jn++)Bn[Jn]=On(Pe,Jn)?Ne(Pe[Jn],Pe):""}var mn=typeof He=="function"?He(Pe):[],io;if(Xe){io={};for(var yo=0;yo<mn.length;yo++)io["$"+mn[yo]]=mn[yo]}for(var rr in Pe)On(Pe,rr)&&(Cn&&String(Number(rr))===rr&&rr<Pe.length||Xe&&io["$"+rr]instanceof Symbol||(xe.call(/[^\w$]/,rr)?Bn.push(Ne(rr,Pe)+": "+Ne(Pe[rr],Pe)):Bn.push(rr+": "+Ne(Pe[rr],Pe))));if(typeof He=="function")for(var Mr=0;Mr<mn.length;Mr++)ht.call(Pe,mn[Mr])&&Bn.push("["+Ne(mn[Mr])+"]: "+Ne(Pe[mn[Mr]],Pe));return Bn}},4569:function(E,f){(function(c,v){v(f)})(this,function(c){var v={site:"",collectDomain:"",path:"event",visitorStorageMode:"fixed",storageLifetimeVisitor:395,storageLifetimeUser:395,storageLifetimePrivacy:395,privacyDefaultMode:"optin",sendEventWhenOptout:!0,isVisitorClientSide:!0,enableCallbacks:!0,cookieDomain:"",cookieSecure:!0,cookiePath:"/",cookieSameSite:"lax",encodeStorageBase64:!1,addEventURL:"withoutQS",clickAutoManagement:!0,enableUTMTracking:!0,campaignPrefix:["at_"],storageVisitor:"pa_vid",storageUser:"pa_user",version:"6.12.2",minHeartbeat:5,minBufferingHeartbeat:1,queueVarName:"_paq",globalVarName:"pa",enableAutomaticPageRefresh:!0,allowHighEntropyClientHints:!0,sendEmptyProperties:!0,privacy:{storageKey:"pa_privacy",legacyKeys:{pa_vid:!0,pa_privacy:!0,atuserid:!0},storageKeys:{pa_user:!0},modes:{optin:{name:"optin",properties:{include:{visitor_privacy_consent:!0,visitor_privacy_mode:"optin"},allowed:{"*":{"*":!0}},forbidden:{"*":{}}},storage:{allowed:{"*":!0},forbidden:{}},events:{allowed:{"*":!0},forbidden:{}}},optout:{name:"optout",visitorId:"OPT-OUT",properties:{include:{visitor_privacy_consent:!1,visitor_privacy_mode:"optout"},allowed:{"*":{}},forbidden:{"*":{}}},storage:{allowed:{pa_vid:!0,pa_privacy:!0},forbidden:{}},events:{allowed:{"*":!0},forbidden:{}}},"no-consent":{name:"no-consent",visitorId:"no-consent",properties:{include:{visitor_privacy_consent:!1,visitor_privacy_mode:"no-consent"},allowed:{"*":{}},forbidden:{"*":{}}},storage:{allowed:{},forbidden:{"*":!0}},events:{allowed:{"*":!0},forbidden:{}}},"no-storage":{name:"no-storage",visitorId:"no-storage",properties:{include:{visitor_privacy_consent:!1,visitor_privacy_mode:"no-storage"},allowed:{"*":{"*":!0}},forbidden:{"*":{}}},storage:{allowed:{},forbidden:{"*":!0}},events:{allowed:{"*":!0},forbidden:{}}},exempt:{name:"exempt",properties:{include:{visitor_privacy_consent:!1,visitor_privacy_mode:"exempt"},allowed:{"*":{app_crash:!0,app_crash_class:!0,app_crash_screen:!0,app_version:!0,browser:!0,browser_cookie_acceptance:!0,browser_group:!0,browser_version:!0,click:!0,click_chapter1:!0,click_chapter2:!0,click_chapter3:!0,click_full_name:!0,connection_monitor:!0,connection_organisation:!0,cookie_creation_date:!0,date:!0,date_day:!0,date_daynumber:!0,date_month:!0,date_monthnumber:!0,date_week:!0,date_year:!0,date_yearofweek:!0,device_brand:!0,device_display_height:!0,device_display_width:!0,device_name:!0,device_name_tech:!0,device_screen_diagonal:!0,device_screen_height:!0,device_screen_width:!0,device_type:!0,event_collection_platform:!0,event_collection_version:!0,event_hour:!0,event_id:!0,event_minute:!0,event_position:!0,event_second:!0,event_time:!0,event_time_utc:!0,event_url:!0,event_url_domain:!0,event_url_full:!0,exclusion_cause:!0,exclusion_type:!0,geo_city:!0,geo_continent:!0,geo_country:!0,geo_metro:!0,geo_region:!0,goal_type:!0,hit_time_utc:!0,os:!0,os_group:!0,os_version:!0,os_version_name:!0,page:!0,page_chapter1:!0,page_chapter2:!0,page_chapter3:!0,page_duration:!0,page_full_name:!0,page_position:!0,page_title_html:!0,page_url:!0,pageview_id:!0,previous_url:!0,privacy_status:!0,site:!0,site_env:!0,site_id:!0,site_platform:!0,src:!0,src_detail:!0,src_direct_access:!0,src_organic:!0,src_organic_detail:!0,src_portal_domain:!0,src_portal_site:!0,src_portal_site_id:!0,src_portal_url:!0,src_referrer_site_domain:!0,src_referrer_site_url:!0,src_referrer_url:!0,src_se:!0,src_se_category:!0,src_se_country:!0,src_type:!0,src_url:!0,src_url_domain:!0,src_webmail:!0}},forbidden:{"*":{}}},storage:{allowed:{pa_vid:!0,pa_privacy:!0,atuserid:!0},forbidden:{}},events:{allowed:{"click.exit":!0,"click.navigation":!0,"click.download":!0,"click.action":!0,"page.display":!0},forbidden:{}}},"*":{properties:{allowed:{"*":{connection_type:!0,device_timestamp_utc:!0,visitor_privacy_consent:!0,visitor_privacy_mode:!0,"ch_ua*":!0}},forbidden:{"*":{}}},storage:{allowed:{},forbidden:{}},events:{allowed:{},forbidden:{}}}}}};function I(y){return(I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w})(y)}function x(y,w){(w==null||w>y.length)&&(w=y.length);for(var D=0,_=new Array(w);D<w;D++)_[D]=y[D];return _}function C(y,w){var D,_,X,oe,ve=typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(ve)return _=!(D=!0),{s:function(){ve=ve.call(y)},n:function(){var Oe=ve.next();return D=Oe.done,Oe},e:function(Oe){_=!0,X=Oe},f:function(){try{D||ve.return==null||ve.return()}finally{if(_)throw X}}};if(Array.isArray(y)||(ve=function(Oe,Ue){var Ke;if(Oe)return typeof Oe=="string"?x(Oe,Ue):(Ke=(Ke=Object.prototype.toString.call(Oe).slice(8,-1))==="Object"&&Oe.constructor?Oe.constructor.name:Ke)==="Map"||Ke==="Set"?Array.from(Oe):Ke==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ke)?x(Oe,Ue):void 0}(y))||w&&y&&typeof y.length=="number")return ve&&(y=ve),oe=0,{s:w=function(){},n:function(){return oe>=y.length?{done:!0}:{done:!1,value:y[oe++]}},e:function(Oe){throw Oe},f:w};throw new TypeError(`Invalid attempt to iterate non-iterable instance.
118
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var j=function y(w,D){if(I(w)!=="object"||w===null||w instanceof Date)return w;var _,X=new w.constructor;for(_ in w)!Object.prototype.hasOwnProperty.call(w,_)||_===void 0||D||(X[_]=y(w[_]));return X},z,F={post:function(y,w){var D=!1;!(D=window.navigator&&typeof window.navigator.sendBeacon=="function"?window.navigator.sendBeacon(y,w):D)&&window.fetch&&window.fetch(y,{method:"POST",body:w,headers:{"Content-Type":"text/plain;charset=UTF-8"}})}},K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",N={utf8:{encode:function(y){y=y.replace(/\r\n/g,`
119
- `);for(var w="",D=0;D<y.length;D++){var _=y.charCodeAt(D);_<128?w+=String.fromCharCode(_):w=127<_&&_<2048?(w+=String.fromCharCode(_>>6|192))+String.fromCharCode(63&_|128):(w=(w+=String.fromCharCode(_>>12|224))+String.fromCharCode(_>>6&63|128))+String.fromCharCode(63&_|128)}return w},decode:function(y){var w,D,_,X="",oe=0;for(w=0;oe<y.length;)(_=y.charCodeAt(oe))<128?(X+=String.fromCharCode(_),oe++):191<_&&_<224?(w=y.charCodeAt(oe+1),X+=String.fromCharCode((31&_)<<6|63&w),oe+=2):(w=y.charCodeAt(oe+1),D=y.charCodeAt(oe+2),X+=String.fromCharCode((15&_)<<12|(63&w)<<6|63&D),oe+=3);return X}},base64:{encode:function(y){var w,D,_,X,oe,ve,Oe="",Ue=0;for(y=N.utf8.encode(y);Ue<y.length;)_=(w=y.charCodeAt(Ue++))>>2,X=(3&w)<<4|(w=y.charCodeAt(Ue++))>>4,oe=(15&w)<<2|(D=y.charCodeAt(Ue++))>>6,ve=63&D,isNaN(w)?oe=ve=64:isNaN(D)&&(ve=64),Oe=Oe+K.charAt(_)+K.charAt(X)+K.charAt(oe)+K.charAt(ve);return Oe},decode:function(y){var w,D,_,X,oe,ve,Oe="",Ue=0;for(y=y.replace(/[^A-Za-z0-9\+\/\=]/g,"");Ue<y.length;)_=K.indexOf(y.charAt(Ue++)),w=(15&(X=K.indexOf(y.charAt(Ue++))))<<4|(oe=K.indexOf(y.charAt(Ue++)))>>2,D=(3&oe)<<6|(ve=K.indexOf(y.charAt(Ue++))),Oe+=String.fromCharCode(_<<2|X>>4),oe!=64&&(Oe+=String.fromCharCode(w)),ve!=64&&(Oe+=String.fromCharCode(D));return Oe=N.utf8.decode(Oe)}}},P=(z=window.crypto||window.msCrypto,{v4:function(){try{if(z!==null&&I(z)==="object")return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,function(y){return(y^z.getRandomValues(new Uint32Array(1))[0]&15>>y/4).toString(16)})}catch(y){console.error(y)}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(y){var w=16*Math.random()|0;return(y==="x"?w:3&w|8).toString(16)})}});function $(y){var w=y;function D(_,X){X!==null&&X!==""&&X!==void 0&&(w[_]=X)}return{setConfiguration:D,setConfigurations:function(_){for(var X in _)Object.prototype.hasOwnProperty.call(_,X)&&D(X,_[X])},getConfiguration:function(_){return w[_]!==void 0?j(w[_]):null},cloneData:function(){return j(w)},deleteProperty:function(_){delete w[_]}}}function d(y){var w=[];return{push:function(D){w.push(D),w.length===1&&y[D[0]].apply(y,D.slice(1))},next:function(){var D;w.shift(),0<w.length&&y[(D=w[0])[0]].apply(y,D.slice(1))}}}function M(y,w,D){this.properties=j(y._properties),this.setProperty=function(_,X,oe){y._privacy.call("isPropAllowed",_)&&(this.properties[_]={value:X,options:oe||{}})},this.hasProperty=function(_){return Object.prototype.hasOwnProperty.call(this.properties,_)},this.getConfiguration=D.getConfiguration,this.setConfiguration=D.setConfiguration,this.options=w.options||{},this.visitorId=null,this.build={url:"",data:{}},this.events=w.events||[]}function U(y,w,D,_){_!==!1&&0<D.length&&typeof D[0]=="function"?D[0](y,w,D.slice(1)):y._queue.next()}function J(y,w,D){var X=w.getConfiguration("collectDomain"),_=X.startsWith("https://")||X.startsWith("http://")?"":"https://",_="".concat(_).concat(X,"/").concat(w.getConfiguration("path")),X="?s=".concat(w.getConfiguration("site")).concat(w.visitorId?"&idclient="+w.visitorId:"");w.build.url=_+X,w.build.data={events:w.events},U(y,w,D)}function H(y,w,D,_,X){var oe,ve=function(Ue,Ke,Te){for(var Me={},Be=new RegExp("[&#?]{1}([^&=#?]*)=([^&#]*)?","g"),Fe=Be.exec(Ke);Fe!==null;)Fe[1].indexOf(Ue)===0&&(Me[Te+Fe[1].substring(Ue.length)]=window.decodeURIComponent(Fe[2])),Fe=Be.exec(Ke);return Me}(_,D,X),Oe=!1;for(oe in ve)Object.prototype.hasOwnProperty.call(ve,oe)&&!w.properties[oe]&&w.setProperty(oe,ve[oe],{persistent:!0}),Oe=!0;return Oe}function Y(y,w,D){var _,X=document.location.href,oe=C(w.getConfiguration("campaignPrefix"));try{for(oe.s();!(_=oe.n()).done&&!H(0,w,X,_.value,"src_"););}catch(ve){oe.e(ve)}finally{oe.f()}w.getConfiguration("enableUTMTracking")&&H(0,w,X,"utm_","utm_"),U(y,w,D)}function ee(y){return y.indexOf('"')===0&&(y=y.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")),re(y)}var q,se=function(y){function w(X){X&&_.setDate(_.getDate()+X)}var D,_=new Date;return y instanceof Date?_=y:typeof y=="number"?w(y):(D=y.days,y=y.minutes,w(D),y&&_.setMinutes(_.getMinutes()+y)),_},re=function(y){y=y.replace(/\+/g," ").replace(/^\s+|\s+$/g,"");try{return decodeURIComponent(y)}catch{return y}},ue=(q="_cookie_test",{set:he,get:we,getNames:function(){var y=[];return G(function(w){y.push(w)}),y},remove:Ae,getTopLevelDomain:function(y){y===void 0&&(y=[]);var w=window.location.hostname.split("."),D=new Date().getTime().toString(36)+Math.round(2147483647*Math.random()).toString(36),_=new Date;_.setSeconds(_.getSeconds()+30);for(var X=0;X<w.length;X++)try{var oe=w.slice(-(X+1)).join(".");if(!y.includes(oe)){he(q,D,{expires:_,path:"/",domain:oe});var ve=we(q)===D;if(Ae(q,{path:"/",domain:oe}),ve)return oe}}catch{}},__private__:{_generateCookieString:xe}});function xe(y,w,D){var _=(D=D===void 0?{}:D).path,X=D.domain,oe=D.expires,ve=D.secure,Oe=D.samesite;return((D=D.raw)?y:encodeURIComponent(y))+"="+(D?w:encodeURIComponent(w))+(oe?"; expires=".concat(se(oe).toUTCString()):"")+(_?"; path=".concat(_):"")+(X?"; domain=".concat(X):"")+(ve?"; secure":"")+(Oe?typeof Oe=="boolean"?"; sameSite":"; sameSite=".concat(Oe):"")}function he(y,w,D,_){w===void 0||_!==void 0&&encodeURI(w).split(/%(?:u[\dA-F]{2})?[\dA-F]{2}|./).length-1>_||(document.cookie=xe(y,w,D))}function G(y){for(var w=document.cookie.split(";"),D=0;D<w.length;D++){var _=w[D].split("=");if(y(re(_[0]),_[1]||""))return}}function we(y){var w=null,D={};return G(function(_,X){if(y)return _===y&&(w=ee(X),1);D[_]=ee(X)}),y?w:D}function Ae(y,w){he(y,"",Object.assign({},w,{expires:-1}))}Ie="_ls_ttl",He=function(){try{var y=window.localStorage.getItem(Ie);return y?JSON.parse(y):null}catch{return null}},nt=function(y){try{Object.keys(y).length?window.localStorage.setItem(Ie,JSON.stringify(y)):window.localStorage.removeItem(Ie)}catch{}},it();var Ie,He,nt,Xe={get:function(y){var w;it();try{return(w=window.localStorage.getItem(y))!=null?w:null}catch{return null}},set:function(y,w,D){if(_=y,D=(D=D===void 0?{}:D).expires,X=He(),D===void 0?(X!=null&&X[_]&&(delete X[_],nt(X)),!0):(D=se(D).getTime())>Date.now()&&((X=X||{})[_]=D.toString(36),nt(X),!0))try{window.localStorage.setItem(y,w)}catch{}var _,X},getNames:ht,remove:function(y){try{window.localStorage.removeItem(y)}catch{}it()},expires:it,__protected__:{get ttlName(){return Ie}}};function it(){var y=ht(),w=He(),D={};w&&(Object.keys(w).forEach(function(_){if(y.includes(_)){var X=w[_]?parseInt(w[_],36):null;if(!(X=X)||X>Date.now())D[_]=w[_];else try{window.localStorage.removeItem(_)}catch{}}}),JSON.stringify(w)!==JSON.stringify(D))&&nt(D)}function ht(){try{return Object.keys(window.localStorage)}catch{return[]}}function be(y,w){return{cookieName:w=w===void 0?"_pctx":w,readonly:!1,init:function(D){return(D=D??y)!=null?D:null},refresh:function(D){return D},update:function(D){return D},set:function(D){return D},get:function(D){return D}}}function Qe(y){return Ye(Ye({},be(y)),{cookieName:null})}function st(y){return y==null}function Xt(){var y={};return{add:function(w){y[w]=!0},values:function(){return Tt(y)}}}function Gt(y,w){var D,_=NaN,X=NaN;return function(oe){var ve=w==null?void 0:w();return oe===X&&_===ve||(_=ve,D=y(X=oe)),D}}function gn(y){var w;return function(D){var _=y();_!==w&&D(w=_)}}function ut(y){return Kt(y,function(w){return(w==null?void 0:w.type)!=="CX"})}function In(y,w){return w({protect:!0}),qr()}function Fn(y,w,D){var _=tn().reduce(function(X,oe){return oe=oe.id,X[oe]=D(y==null?void 0:y[oe],w==null?void 0:w[oe],oe),X},{});return lt(_,w)?w:_}function hr(y,w){return Fn(y,w,function(D,_,X){return D||_||Ji()[X]})}function wr(){return Cr().consent_modifiers||null}function pr(){return!!Cr().requireConsent}function Kn(y,w,D){return"".concat(y.join(", ")," ").concat(1<y.length?D:w)}var $t,Sn,bn={get:function(y){try{return window.sessionStorage.getItem(y)}catch{return null}},set:function(y,w){try{window.sessionStorage.setItem(y,w)}catch{}},getNames:function(){try{return Object.keys(window.sessionStorage)}catch{return[]}},remove:function(y){try{window.sessionStorage.removeItem(y)}catch{}}},Ye=function(){return(Ye=Object.assign||function(y){for(var w,D=1,_=arguments.length;D<_;D++)for(var X in w=arguments[D])Object.prototype.hasOwnProperty.call(w,X)&&(y[X]=w[X]);return y}).apply(this,arguments)},en=be("anon"),Tt=function(y){return y?Object.keys(y):[]},Et=function(y){return Array.isArray(y)},On=function(y){return!st(y)},nr=function(y){return I(y)==="object"},Lr=function(y){return typeof y=="string"},qr=function(){for(var y=new Date().getTime().toString(36);y.length<16;)y+=Math.round(2147483647*Math.random()).toString(36);return y.substr(0,16)},Kt=function(y,w){return y&&Tt(y).filter(function(D){return w(y[D])}).reduce(function(D,_){return Ye(Ye({},D),((D={})[_]=y[_],D))},{})},ct=function(y,w){return nr(y)?Tt(y).reduce(function(D,_){var X=y[_],oe=w[_],oe=oe&&oe(X);return oe!==void 0&&(D[_]=oe),D},{}):y},Nn=function(y){return y==="true"||y===!0},at=function y(w,D){try{return w()}catch{return D?y(D):null}},Vt=function(y,w){return w===void 0&&(w=!1),at(function(){return JSON.parse(y)},function(){return w?JSON.parse(window.atob(y)):null})||null},Dn=function(y,w){w===void 0&&(w=!1);var D=JSON.stringify(y);return at(function(){return w?window.btoa(D):D})||D},lt=function(y,w){var D,_;return y===w||(y&&w?(D=Tt(y),_=Tt(w),D.length===_.length&&!D.some(function(X){return y[X]!==w[X]})):null)},un=Ye(Ye({},be(null)),{init:function(y){return ut(y||null)},refresh:ut,set:function(y,w){return y===null?null:Kt(Ye(Ye({},w),y),function(D){return D!==null})}}),Ur="pdl",Cr=function(){return window[Ur]||{}},Fs=Ye(Ye({},Qe()),{init:function(y,w){return w({protect:!0}),Cr().pageViewId||qr()},refresh:In,update:In,set:function(y,w,D){return D({protect:!0}),y}}),fn=Ye(Ye({},be(null,"_pcid")),{init:function(y,w){return w({protect:!0}),y||qr()},update:function(y,w){return w({protect:!0}),qr()},set:function(y,w,D){return D({protect:!0}),y}}),Br=["PA","DMP","COMPOSER","ID","VX","ESP","SOCIAL_FLOW","DL"].map(function(y,w){return{name:y,id:w}}),It=Br.reduce(function(y,w,D){return w=w.name,Ye(Ye({},y),((y={})[w]=D,y[w.toLowerCase()]=D,y))},{}),ln=(It["social flow"]=It.SOCIAL_FLOW,It["Social Flow"]=It.SOCIAL_FLOW,gn(function(){var y;return(y=wa(Cr().consent))==null?void 0:y.products})),tn=($t=Br,function(){return ln(function(y){$t=y?Br.filter(function(w){return y.includes(w.name)||w.name==="DL"}):Br}),$t}),cn=function(y){var w=Number(y);return Number.isNaN(w)?(y=It[y.toLowerCase()])!=null?y:null:w<Br.length?w:null},Pe=function(y,w){return Tt(y).reduce(function(D,oe){var X=Br[Number(oe)].name,oe=y[oe];return D[X]=w?w(oe,X):oe,D},{})},Ne="opt-in",Cn="essential",Bn="opt-out",Jn="custom",mn=[Ne,Cn,Bn],io=mn.concat(Jn),yo=io.reduce(function(y,w,D){return Ye(Ye({},y),((y={})[D]=w,y))},{}),rr=[Ne,Jn,Cn,Bn],Mr=function(y,w){return y=rr.indexOf(y),w=rr.indexOf(w),rr[Math.max(y,w)]},So=function(y){return io.includes(y)},ei=function(y){return mn.includes(y)},Pr={AD:["DMP","SOCIAL_FLOW"],CP:["COMPOSER"],AM:["PA"],PR:["ESP","VX","ID"],DL:["DL"]},Kr=Tt(Pr).reduce(function(y,w){return Pr[w].forEach(function(D){D=It[D],y[D]=w}),y},{}),xt=gn(function(){var y;return(y=wa(Cr().consent))==null?void 0:y.defaultPurposes}),Ji=(Sn=Ye({},Kr),function(){return xt(function(y){Sn=Ye({},Kr),y&&Tt(y).forEach(function(w){var D=It[w];Sn[D]=(D=y[w])==null?void 0:D.substring(0,32)})}),Sn}),gr=Ye(Ye({},be(null,"_pprv")),{init:function(y){return ji()?hr(y||null,null):null},set:function(y,w){return ji()?y==null?w:hr(Tt(D=y).reduce(function(_,ve){var oe=cn(ve),ve=To(D[ve]);return oe!==null&&ve!==oo&&oe!==It.DL&&ve&&(_[oe]=ve),_},{}),w):null;var D}}),ji=function(){return Cr().requireConsent==="v2"},qo=function(y,w){return y===Jn&&!((y=wr())!=null&&y[w])},oo="DL",Fi=["AD","AM","CP","PR",oo].reduce(function(y,w){return Ye(Ye({},y),((y={})[w]=w,y[w.toLowerCase()]=w,y))},{}),Os=function(y){return Fi[(y==null?void 0:y.toLowerCase())||""]||null},To=function(y){return Os(y)||(y==null?void 0:y.substring(0,32))},Eo="Consent v2 is disabled",gs='the "DL" purpose is reserved',es=function(y){return'"'.concat(y,'" can not be applied for the dl product')},so=function(y){return"".concat(y," is unknown consent mode")},xo=function(y){return Kn(y,"does","do")+"n't have modifier in the pdl. Custom mode can't be applied"},fe="Unknown purpose. Provide a product or define within pdl config",Mi=function(y){return"Custom purpose: "+Kn(y,"is","are")+" unknown"};function Un(y,w,D,_,X){function oe(Fe,Ze){return Ze=To(Ze),Fi[Ze]||Object.values(y||{}).includes(Ze)?Be(Fe,Ze):Me(fe)}var ve,Oe,Ue,Ke,Te,Me=function(Fe){return{error:Fe}},Be=function(Fe,Ze,$e){var ze,Pt=[];return So(Fe)?(ze=tn().reduce(function(ot,mt){var We=mt.id,mt=mt.name;return(!Ze||(y==null?void 0:y[We])===Ze||$e!=null&&$e.includes(We))&&(qo(Fe,mt)?Pt.push(mt):ot[We]={mode:Fe}),ot},{}),Pt.length?Me(xo(Pt)):Object.keys(ze).length?{consent:ze}:null):Me(so(Fe))};return ji()?X?(ve=_,X=X,Ke=To(Oe=D),X=Et(X)?X:[X],(Te=X.map(cn).filter(On)).length?Ke!==oo&&Te.includes(It.DL)?{error:es(Ke)}:Ke===oo&&Te.some(function(Fe){return Fe!==It.DL})?Me(gs):(Ue=Be(ve,Ke,Te))!=null&&Ue.error?Ue:(Te=Te.reduce(function(Fe,Ze){return Fe[Ze]=Ke,Fe},{}),{consent:(Ue==null?void 0:Ue.consent)||null,purposes:Te}):Os(Oe)?oe(ve,Oe):Me(Mi(X))):_?oe(_,D):Be(D):Me(Eo)}function Qi(y,w){return function(D){return w(y+D)}}function ci(y,w){w===void 0&&(w=dr);var D=It[y.toLowerCase()];return D!==void 0?Br[D].name:(w('"'.concat(y,'" is not found')),null)}function Ui(y,w){var D,_;return w===void 0&&(w=dr),y?(D={},y.products&&(Et(y.products)?D.products=y.products.reduce(function(X,oe){return oe=ci(oe,Qi("consent.products: ",w)),oe&&X.push(oe),X},[]):w("consent.products: should be an array")),y.defaultPreset&&(D.defaultPreset=Tt(y.defaultPreset).reduce(function(X,oe){var ve=ci(oe,Qi("consent.defaultPreset: ",w)),Oe=kr(y.defaultPreset[oe]);return Oe||w("consent.defaultPreset: "+wo(oe,mn)),ve&&Oe&&(X[ve]=Oe),X},{})),(_=y.defaultPurposes)&&(D.defaultPurposes=Tt(_).reduce(function(X,oe){var ve=Qi("consent.defaultPurposes: ",w),Oe=ci(oe,ve),Ue=_[oe],Ke=To(Ue);return Ke===oo||Oe==="DL"?ve('"'.concat(oe,": ").concat(Ue,'" - invalid config')):Oe&&Ke&&(X[Oe]=Ke),X},{})),D):null}function Bi(y){return y.reduce(function(w,D,_){return Ye(Ye({},w),((w={})[_]={mode:yo[D]},w))},{})}function Wr(y,w){return Fn(y,w,function(D,_,X){return D=(D==null?void 0:D.mode)||(_==null?void 0:_.mode)||mr()[0].preset[X].mode,D!==(_==null?void 0:_.mode)?{mode:D}:_})}function zs(y){var w=Number(y);return Number.isNaN(w)?String(y):w}function Sr(y){return Et(y)?y:y.split(",").map(function(w){return w.trim().replace(/^['"](.+)['"]$/,"$1")})}function Fo(y){return y}var Pi,ki=function(y,w){var D;return y?(D=Pe(w||Kr),tn().reduce(function(_,oe){var oe=oe.name,ve=D[oe],Oe=((Oe=y[oe])==null?void 0:Oe.mode)||Ne;return _[ve]?(_[ve].mode=Mr(_[ve].mode,Oe),_[ve].products.push(oe)):_[ve]={mode:Oe,products:[oe]},_},{})):null},ts=["include","exclude","obfuscate"],wo=function(y,w){return'"'.concat(y,'" should be one of ').concat(w.join(", "))},dr=function(){},kr=function(y){return ei(y)?y:null},Ao=function(_,w){w===void 0&&(w=dr);var D=_.source,_=_.patches||[];return kr(D)||(w(wo("source",mn)),D=Ne),Et(_)||(w('"patches" should be an array'),_=[]),{source:D,patches:_=_.reduce(function(X,oe,ve){var Oe,Ue;return!nr(oe)||Et(oe)?w("patch[".concat(ve,"]: should be type of {action, item, with?}")):(Oe=oe.action,Ue=oe.item,ts.includes(Oe)?Ue&&nr(Ue)&&Ue.key&&Ue.type?X.push(oe):w("patch[".concat(ve,']: "item" should be type of {key, type}')):w("patch[".concat(ve,"]: ")+wo("action",ts))),X},[])}},wa=Gt(Ui),ms=function(y,w){return w===void 0&&(w=dr),Tt(y||{}).reduce(function(D,_){var X=y==null?void 0:y[_],oe=ci((X==null?void 0:X.source)||"",w);return D[_]=Ye(Ye({},X),{source:oe}),D},{})},ti=[[0,0,0,0,0,0,0,0],[0,0,2,2,2,2,2,0],[1,2,2,2,2,2,2,1],[0,2,0,2,2,2,0,0],[1,2,2,2,2,2,1,1],[2,0,0,2,2,2,2,0],[2,0,2,2,2,2,2,0],[2,2,2,2,2,2,0,2],[2,2,0,0,0,0,2,0],[2,2,1,2,1,2,2,1],[2,2,1,1,2,2,2,1]],$s=ti.map(function(y,w){return{id:w,preset:Bi(y)}}),Bt=gn(function(){var y;return(y=wa(Cr().consent))==null?void 0:y.defaultPreset}),mr=(Pi=$s,function(){return Bt(function(y){Pi=$s.slice(),y&&(Pi[0]={id:0,preset:Ye({},Pi[0].preset)},Tt(y).forEach(function(_){var D=y[_],_=It[_];Pi[0].preset[_]={mode:D}}))}),Pi}),ru=Ye(Ye({},be(null,"_pprv")),{init:function(y){return pr()&&y?Wr(y,null):null},set:function(y,w){var D,_,X;return pr()?y!=null&&(D=typeof y=="number"?((D=mr()[y])==null?void 0:D.preset)||null:Et(y)?(X=null,y.forEach(function(oe){var ve=ti[oe];!X&&ve?X=ve:X&&ve&&(X=X.map(function(Oe,Ue){return Math.min(Oe,ve[Ue])}))}),X&&Bi(X)):Tt(_=y).reduce(function(oe,Ue){var Oe=_[Ue],Ue=cn(Ue);return Ue!==null&&(Oe=So(Oe.mode)?Oe.mode:null)&&((oe=oe||{})[Ue]={mode:Oe}),oe},null))?Wr(D,w):w:null},get:Gt(function(y){return y&&Pe(y,function(X,D){var _,X=Ye({},X);return X.mode===Jn&&(X.modifier=((_=wr())==null?void 0:_[D])||null),X})},wr)}),iu=Ye(Ye({},Qe()),{init:mr,set:mr}),_o=Ye(Ye({},Qe()),{init:tn,set:tn}),Xs=Ye(Ye({},Qe(null)),{readonly:!0,set:function(){return null},get:wr}),Ys={id:Fo,type:Fo,zone:Fo,createdAt:zs,modifiedAt:zs,authors:Sr,section:Fo,tags:Sr,keywords:Sr,title:Fo,description:Fo,isNative:Nn},vs=function(y){return y==="first"},Ds=function(y){return y==="last"};function Qa(y,w){return y===void 0&&(y="meta"),vs(w)?document.querySelector(y):(y=document.querySelectorAll(y),Ds(w)?y[y.length-1]:Array.from(y))}function Za(y){var w=y.getContent||function(Ke){return Ke.content};if(y.selector)return(_=Qa(y.selector,y.take||"first"))&&w(_)||null;var D=Aa.find(y.attr||["name"],y.hasContent),_=y.names||[],X=y.take!=="all",oe=Ds(y.take);if(D)for(var ve=0,Oe=_;ve<Oe.length;ve++){var Ue=function(Be){var Te,Me=[],Be=D[Be];if(Be){if(X)return Te=Be[oe?Be.length-1:0],{value:w(Te)||""};Be.forEach(function(Fe){Me=Me.concat(w(Fe)||"")})}if(Me.length)return{value:Me}}(Oe[ve]);if(I(Ue)==="object")return Ue.value}return null}function Ns(D){var w=D.replace(/DAY/g,"(0?[1-9]|[12][0-9]|3[01])").replace(/MONTHLONG/g,"("+Tt(Qs).join("|")+")").replace(/MONTH/g,"(0?[1-9]|1[012])").replace(/YEAR2/g,"([0-9][0-9])").replace(/YEAR/g,"(197[1-9]|19[8-9][0-9]|20[0-9][0-9])").replace(/TIME/g,"([0-9][0-9]):([0-9][0-9]):([0-9][0-9])(?:\\.[0-9][0-9][0-9])?([zZ]|[+-][0-9][0-9](?::?[0-9][0-9])?)?"),D=D.replace(/.*?([YMD])(EAR|ONTH|AY).*?/g,"$1").substring(0,3);return[new RegExp(w),D]}function Vi(y){return y&&parseInt(y,10)||0}Js=null;var Js,Aa={refresh:function(){(Js=Qa()||null)&&setTimeout(function(){Js=null},0)},find:function(y,w){return w===void 0&&(w=!1),Js?Js.reduce(function(D,_){for(var X=0,oe=y;X<oe.length;X++){var ve=oe[X],ve=((ve==="name"?_.name:_.getAttribute(ve))||"").trim().toLowerCase(),Oe=_.content;if(ve&&(!w||Oe)){D[ve]||(D[ve]=[]),D[ve].push(_);break}}return D},{}):null}},Uo=function(y){for(var w=0,D=y;w<D.length;w++){var _=D[w],_=Za(_);if(_)return _}},bi=function(y,w,D){var _,X=Ys[w];!y[w]&&X&&(X=(_=(typeof D=="function"?D:function(){return(Et(D)?Uo:Za)(D)})())&&X(_))&&(y[w]=X)},qa=function(y){return{attr:["property"],names:[y]}},gi=function(y){return{names:[y]}},Qs={januar:"01",january:"01",jan:"01",februar:"02",february:"02",feb:"02",mars:"03",march:"03",mar:"03",april:"04",apr:"04",mai:"05",may:"05",juni:"06",june:"06",jun:"06",juli:"07",july:"07",jul:"07",august:"08",aug:"08",september:"09",sept:"09",sep:"09",oktober:"10",october:"10",okt:"10",oct:"10",november:"11",nov:"11",desember:"12",december:"12",dec:"12",des:"12"},eu=["\\bDAY\\.MONTH\\.YEAR\\b","\\bDAY\\.?\\s{0,3}MONTHLONG\\.?\\s{1,3}YEAR\\b","\\bYEAR-MONTH-DAY(?:[tT]|\\b)","\\bMONTHLONG\\.?\\s{0,3}DAY(?:st|nd|rd|th)?,?\\s{1,3}YEAR\\b","\\bDAY(?:st|nd|rd|th|\\.)?\\s{0,3}MONTHLONG\\.?,?\\s{1,3}YEAR\\b","\\bYEAR[/年]MONTH[/月]DAY(?=\\b|日)","\\bDAY\\.MONTH\\.YEAR2\\b","\\bDAY/MONTH/YEAR\\b"].map(Ns),tu=Ns("YEAR-MONTH-DAY[tT]TIME")[0];function _i(y,w,D,_,X,oe,ve){return y=new Date(Date.UTC(Vi(y),Vi(w)-1,Vi(D),Vi(_),Vi(X),Vi(oe))),w=(ve||"").match(/^([+-][0-9][0-9])(?::?([0-9][0-9])?)$/),w&&(y=new Date(y.getTime()-36e5*Number(w[1])-6e4*(Number(w[2])||0))),D=Date.now()-y.getTime(),0<D||-D<1728e5?y.toISOString():null}var Vn=function(y){return y.replace(/<\/?[^>?]*\/?>/g," ").replace(/\s+/g," ").trim()};function ns(y){return Vn((y=y===void 0?"":y).replace(/,(?=\s*(jr|sr)(\.?)\b)/g," "))}function Vr(y){return Ye(Ye({},y),{take:"last"})}function Bo(y){return Ye(Ye({},y),{take:"last",hasContent:!0,getContent:function(w){return Vn(w.content||"")}})}function ys(y){bi(y,"createdAt",function(){var D=Uo(Zs);if(!D)return null;var w=D.toLowerCase(),D=(w=w.toLowerCase()).match(tu);if(D)return _i(D[1],D[2],D[3],D[4],D[5],D[6],D[7]);for(var _=0,X=eu;_<X.length;_++){var oe=X[_],ve=w.match(oe[0]);if(ve)return _i((ve=oe[1]==="DMY"?["",ve[3],ve[2],ve[1]]:oe[1]==="MDY"?["",ve[3],ve[1],ve[2]]:ve)[1].length===2?(Vi(ve[1])<60?"20":"19")+ve[1]:ve[1],ve[2].length<=2?ve[2]:Qs[ve[2]],ve[3])}}),bi(y,"modifiedAt",Hi),bi(y,"authors",Vo),bi(y,"keywords",function(){var w=Uo(qs);return w&&w.length<=1024?w:null}),bi(y,"title",Es),bi(y,"description",ea)}function Ls(){var y,w=Array.from(document.querySelectorAll("meta[property^=content]")).reduce(function(D,_){var X=(X=_==null?void 0:_.getAttribute("property"))==null?void 0:X.split(":").pop(),oe=Ys[X];return oe&&_&&(D[X]=oe((_==null?void 0:_.getAttribute("content"))||"")),D},{});return Aa.refresh(),bi(y=w,"type",qa("og:type")),bi(y,"section",gi("section")),bi(y,"id",gi("id")),bi(y,"authors",gi("author")),ys(w),w}function js(y){return y.getTime().toString(36)}function rs(y){return y?at(function(){return new Date(parseInt(y,36))}):null}function Ss(y,w,D){return D===void 0&&(D=!1),{cookieName:y,consent:w=w===void 0?_r:w,encode:function(_){return Dn(_,D)},decode:function(_){return Vt(_,!0)}}}function Ts(y){function w(Pt){return Ye(Ye({},Be),Kt(Pt||{},On))}function D(Pt,ot){var Ht=Pt&&ot;!Ze()&&Ht&&$e(),Ze()&&!Ht&&ze(),Ze()&&Ht&&!Ke&&$e(),ve=Pt,Te=ot}var _=y.cookieName,X=y.consent,oe=ue.get(_),ve=!!oe,Oe=ve,Ue=Mn(oe,y),Ke=!!Ue.fixedAt,Te=ve,Me=null,Be=Ye({},ku),Fe=null,Ze=function(){return ve&&Te},$e=function(Ht){var ot,Ht=w(Ht),We=Me||(Fe?Ue.encode(Fe,Ht):"");We||(ot=ue.get(_),We=(ot=Ue.decode(ot||""))?Ue.encode(ot,Ht):""),We&&(Ke=!0,ue.set(_,We,Ue.bindOptions(Ht)),Oe=!0)},ze=function(Pt){Ze()&&(Oe&&ue.remove(_,w(Pt)),Oe=!1)};return Ue.onChange(function(){Ze()&&(Ke=!1,$e())}),{get cookieName(){return _},get cookieEnabled(){return Ze()},get fixedAt(){return Ue.fixedAt},get consent(){return X},set:function(Pt,ot){Fe=Pt,Ze()&&$e(ot)},get:function(){return Ue.decode(ue.get(_)||"")},remove:ze,setCookieOptions:function(Pt){Be=w(Pt),Ze()&&$e()},setCookieEnabled:function(Pt,ot){ot===void 0&&(ot=null),Me=Pt?ot:null,D(Pt,Te)},lazyActive:function(){D(ve,!0)},setFixedMode:function(Pt){Ue.setMode(Pt)}}}var Ia,Zs=[Vr({attr:["name","property","itemprop"],names:["cxenseparse:publishtime","cxenseparse:recs:publishtime","article:published_time","date","dc.date","dc.date.created","dc.terms.issued","pub_date","article.published","datepublished","og:article:published_time"]}),Vr({selector:"time.published[datetime],time[pubdate][datetime]",getContent:function(y){return y.getAttribute("datetime")}}),Vr({selector:"time[datetime]",getContent:function(y){return y.getAttribute("datetime")}})],Hi={selector:'meta[property="article:modified_time"]'},Vo=[{attr:["property","name"],names:["cxenseparse:author","og:article:author","article:author","og:book:author","book:author","author","dc.creator","article.author"],take:"all",getContent:function(D){var w=D.getAttribute("data-separator"),D=D.content;return w?ns(D).split(w):ns((w=(w=D)===void 0?"":w).replace(/\n+/,";").replace(/(\<|&lt;)br(\>|&gt;)/,";").replace(/\b(and|und|og)\b/g,";")).split(/[,;]/)}}],qs=[Bo({names:["cxenseparse:keywords"]}),Bo({attr:["property","name"],names:["news_keywords"]}),Bo({names:["keywords"]})],ea=[Bo({names:["cxenseparse:description"]}),Bo({attr:["property"],names:["og:description"]}),Bo({names:["description"]})],Es=[{names:["cxenseparse:title"]},Vr({attr:["property","name"],names:["og:title"]})],ta=Ye(Ye({},Qe(null)),{init:Ls,refresh:function(y){var w=Ls();return y!=null&&y._fixed_&&y!=null&&y._fixed_.forEach(function(D){delete w[D]}),Ye(Ye({},y),w)},set:function(y,w){var D,_;return y===null?{}:(D=new Set(w&&w._fixed_),(_=function(X,oe){Tt(Kt(y,X)).forEach(oe)})(On,function(X){D.add(X)}),_(st,function(X){D.delete(X)}),Kt(Ye(Ye(Ye({},w),y),{_fixed_:Array.from(D.values())}),On))},get:Gt(function(y){var w=Ye({},y);return delete w._fixed_,y&&w})}),Nl=Ye(Ye({},be(null,"_pcus")),{init:function(y){return(y=y===void 0?null:y)&&Kt(y,function(w){return nr(w)&&Array.isArray(w.segments)})}}),Fs={pageViewId:Fs,browserId:fn,users:un,userStatus:en,siteId:be(),consent:ru,consentPresets:iu,products:_o,consentModifiers:Xs,purposes:gr,content:ta,userSegments:Nl},ku={path:"/",expires:395,samesite:"lax",secure:window.location.protocol==="https:",domain:ue.getTopLevelDomain(["pantheon.io","go-vip.net","go-vip.co"])},Mn=function(y,w){function D(Ke){return ve=ve||function(Te){var Me=new Date;if(Te instanceof Date)Me=Te;else{if(typeof Te!="number")return null;Me.setDate(Me.getDate()+Te)}return Me}(Ke.expires)}var _=w.encode,X=w.decode,oe=!1,ve=null,Oe=null,Ue=null;return(w=(w=X(y||""))==null?void 0:w._t)&&(w=w.split("|"),ve=rs(w[0]),Oe=rs(w[1]),oe=!!ve),{get fixedAt(){return oe?[Oe,ve]:null},onChange:function(Ke){Ue=Ke},setMode:function(Ke){var Te=oe;(oe=Ke)!==Te&&(Oe=ve=null)!=Ue&&Ue(oe)},bindOptions:function(Ke){return oe&&(ve=D(Ke))?Ye(Ye({},Ke),{expires:ve}):Ke},decode:function(Ke){return Ke=X(Ke),Ke!=null&&Ke._t&&delete Ke._t,Ke},encode:function(Ke,Te){return oe?(ve=D(Te))&&(Ke._t=js(ve)+"|"+js(Oe=Oe||new Date)):delete Ke._t,_(Ke)}}},vr="essential",_r="optional",fi="mandatory",Pn=String.fromCharCode,Ri="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",wt={};(Ia=Ia||{}).URI="URI";function Io(){function y(Oe,Ue,Ke){Ke===void 0&&(Ke=!1);var Te=[];return Tt(Ue).forEach(function(Me){var Be=Ue[Me],Fe=!oe.has(Me)||oe.get(Me)===Oe||Ke;Be&&Fe?oe.set(Me,Oe):!Be&&Fe?oe.delete(Me):Te.push(Me)}),0<Te.length?Te:null}var w=Zn(),D={},_=null,X=new Map,oe=new Map,ve=[];return function(Oe,Ue){var Ke=qr();return X.set(Ke,Oe),Ue&&w.register(Ue),D=Ye(Ye({},w.get()),D),{getInitCookieData:function(){return D},getCachedData:function(){return _||Ar},setProtectionData:function(Te){return y(Ke,Te)},setProtectionDataUnsafe:function(Te){return y(Ke,Te,!0)},updateData:function(Te){return Be={},Fe={},Tt(Me=Te).forEach(function($e){oe.has($e)?Be[$e]=(_==null?void 0:_[$e])||null:Fe[$e]=Me[$e]}),Te=_||D,Ze=Ye(Ye({},_),Fe),lt(Ze,Te)||(w.set(Ze,Te),_=Ze,ve.forEach(function($e){return(0,$e[1])(Fe)})),0<Tt(Be).length?Be:null;var Me,Be,Fe,Ze},onUpdateData:function(Te){ve.push([Ke,Te])},terminate:function(){var Te;Te=Ke,ve=ve.filter(function(Me){return Me[0]!==Te}),X.delete(Ke)},setCookieOptions:function(){return null},setCookieEnabled:function(){return null},get registeredCookiesWrapper(){return w.wrappers}}}}function nu(y){return Tt(y).filter(Ir).map(function(w){return bu(w,y[w])})}function ao(y,w){switch(y){case Ne:return!0;case Cn:return w===vr||w===fi;case Bn:return w===fi;default:return!0}}function W(y){function w(X){return at(function(){return window.localStorage.getItem(X)})}var D=w(y),_=at(function(){return parseInt(Vt(w("_ls_ttl"))[y],36)});return _&&_<=Date.now()?null:D}function Q(y){var w=y&&y.length;return w===16||w===36?y:null}function O(y){var w,D=Ye(Ye({},rf),ms((w=Cr())==null?void 0:w.migration));Tt(D).forEach(function(_){var X=y.params.get(_),oe=D[_]===rf[_],ve=(ve=D[_])==null?void 0:ve.source,ve=ve&&((ve=xs[ve])==null?void 0:ve[_])||[];X&&ve.length&&(ve=Ca(ve))&&(X.readonly=!1,y.updateValues(_,ve,!0),X.readonly=!oe)})}function ne(){function y(D){return ct(D,{path:String,domain:String,secure:Nn,expires:function(_){return _ instanceof Date?_:Number(_)},samesite:function(_){return Lr(_)?_:Nn(_)}})}var w=Ye({},window[Ur]);return w!=null&&w.cookies&&(w.cookies=Tt(w.cookies).reduce(function(D,_){return D[_]=y(w.cookies[_]),D},{})),w!=null&&w.cookieDefault&&(w.cookieDefault=y(w.cookieDefault)),w}function ge(y){function w(ve){return ve||((ve=y.get("consent"))==null?void 0:ve.DL)||null}function D(ve){var Oe,Ue=Ll(),Ke=(Oe=y.getConnection())==null?void 0:Oe.registeredCookiesWrapper;Ke&&(Oe=Tt(Ke).map(function(Te){return Ke[Te].cookieName}),X(Oe,ve).forEach(function(Be){var Me=Be.name,Fe=Be.allowed,Be=Be.data,Fe=Fe&&!Ue[Me];Ke[Me].setCookieEnabled(Fe,Be||null)}))}var _=Tt(nn).reduce(function(ve,Oe){return ve[Oe]=nn[Oe].consent,ve},{}),X=na({items:_,type:"cookie",getConsent:w}),oe=w();y.addChangeListener("consent",function(ve){ve=(ve==null?void 0:ve.DL)||null,(oe==null?void 0:oe.mode)!==(ve===null?void 0:ve.mode)&&D(oe=ve)}),D(oe)}function je(y){function w(X){var oe,ve,Oe=ki(X,y.get("purposes"));Oe&&X&&(oe=!1,ve=Tt(Oe).reduce(function(Ue,Ke){var Te=Oe[Ke].mode;return Oe[Ke].products.forEach(function(Me){var Be;Te!==((Be=X[Me])==null?void 0:Be.mode)&&(qo(Te,Me)?_[Me]||(_[Me]=!0,ws(Me,Te,1)):(Ue[Me]={mode:Te},oe=!0,ws(Me,Te,2)))}),Ue},{}),oe)&&y.updateValues({consent:ve})}var D=null,_={};y.addChangeListener("consent",function(X){ji()&&(D&&(clearTimeout(D),D=null),D=setTimeout(function(){w(X),D=null},200))}),ji()&&w(y.get("consent"))}var qe,tt,rt,vt,En,or,Qn,Xn,_t,qt,vn,At,Tn,Wn,zr,uo,is,Oi,mi,ni={URI:{prefix:"{u}",compress:function(y){if(y==null)return"";var w=y,D=6,_=function(ot){return Ri.charAt(ot)};if(w==null)return"";for(var X,oe,ve,Oe,Ue={},Ke={},Te="",Me=2,Be=3,Fe=2,Ze=[],$e=0,ze=0,Pt=0;Pt<w.length;Pt+=1)if(ve=w.charAt(Pt),Object.prototype.hasOwnProperty.call(Ue,ve)||(Ue[ve]=Be++,Ke[ve]=!0),Oe=Te+ve,Object.prototype.hasOwnProperty.call(Ue,Oe))Te=Oe;else{if(Object.prototype.hasOwnProperty.call(Ke,Te)){if(Te.charCodeAt(0)<256){for(X=0;X<Fe;X++)$e<<=1,ze==D-1?(ze=0,Ze.push(_($e)),$e=0):ze++;for(oe=Te.charCodeAt(0),X=0;X<8;X++)$e=$e<<1|1&oe,ze==D-1?(ze=0,Ze.push(_($e)),$e=0):ze++,oe>>=1}else{for(oe=1,X=0;X<Fe;X++)$e=$e<<1|oe,ze==D-1?(ze=0,Ze.push(_($e)),$e=0):ze++,oe=0;for(oe=Te.charCodeAt(0),X=0;X<16;X++)$e=$e<<1|1&oe,ze==D-1?(ze=0,Ze.push(_($e)),$e=0):ze++,oe>>=1}--Me==0&&(Me=Math.pow(2,Fe),Fe++),delete Ke[Te]}else for(oe=Ue[Te],X=0;X<Fe;X++)$e=$e<<1|1&oe,ze==D-1?(ze=0,Ze.push(_($e)),$e=0):ze++,oe>>=1;--Me==0&&(Me=Math.pow(2,Fe),Fe++),Ue[Oe]=Be++,Te=String(ve)}if(Te!==""){if(Object.prototype.hasOwnProperty.call(Ke,Te)){if(Te.charCodeAt(0)<256){for(X=0;X<Fe;X++)$e<<=1,ze==D-1?(ze=0,Ze.push(_($e)),$e=0):ze++;for(oe=Te.charCodeAt(0),X=0;X<8;X++)$e=$e<<1|1&oe,ze==D-1?(ze=0,Ze.push(_($e)),$e=0):ze++,oe>>=1}else{for(oe=1,X=0;X<Fe;X++)$e=$e<<1|oe,ze==D-1?(ze=0,Ze.push(_($e)),$e=0):ze++,oe=0;for(oe=Te.charCodeAt(0),X=0;X<16;X++)$e=$e<<1|1&oe,ze==D-1?(ze=0,Ze.push(_($e)),$e=0):ze++,oe>>=1}--Me==0&&(Me=Math.pow(2,Fe),Fe++),delete Ke[Te]}else for(oe=Ue[Te],X=0;X<Fe;X++)$e=$e<<1|1&oe,ze==D-1?(ze=0,Ze.push(_($e)),$e=0):ze++,oe>>=1;--Me==0&&(Me=Math.pow(2,Fe),Fe++)}for(oe=2,X=0;X<Fe;X++)$e=$e<<1|1&oe,ze==D-1?(ze=0,Ze.push(_($e)),$e=0):ze++,oe>>=1;for(;;){if($e<<=1,ze==D-1){Ze.push(_($e));break}ze++}return Ze.join("")},decompress:function(y){if(y==null)return"";if(y=="")return null;for(var w,D,_,X,oe,ve,Oe=(y=y.replace(/ /g,"+")).length,Ue=32,Ke=function(We){var Ht=Ri,We=y.charAt(We);if(!wt[Ht]){wt[Ht]={};for(var mt=0;mt<Ht.length;mt++)wt[Ht][Ht.charAt(mt)]=mt}return wt[Ht][We]},Te=[],Me=4,Be=4,Fe=3,Ze="",$e=[],ze={val:Ke(0),position:Ue,index:1},Pt=0;Pt<3;Pt+=1)Te[Pt]=Pt;for(D=0,X=Math.pow(2,2),oe=1;oe!=X;)_=ze.val&ze.position,ze.position>>=1,ze.position==0&&(ze.position=Ue,ze.val=Ke(ze.index++)),D|=(0<_?1:0)*oe,oe<<=1;switch(D){case 0:for(D=0,X=Math.pow(2,8),oe=1;oe!=X;)_=ze.val&ze.position,ze.position>>=1,ze.position==0&&(ze.position=Ue,ze.val=Ke(ze.index++)),D|=(0<_?1:0)*oe,oe<<=1;ve=Pn(D);break;case 1:for(D=0,X=Math.pow(2,16),oe=1;oe!=X;)_=ze.val&ze.position,ze.position>>=1,ze.position==0&&(ze.position=Ue,ze.val=Ke(ze.index++)),D|=(0<_?1:0)*oe,oe<<=1;ve=Pn(D);break;case 2:return""}for(w=Te[3]=ve,$e.push(ve);;){if(Oe<ze.index)return"";for(D=0,X=Math.pow(2,Fe),oe=1;oe!=X;)_=ze.val&ze.position,ze.position>>=1,ze.position==0&&(ze.position=Ue,ze.val=Ke(ze.index++)),D|=(0<_?1:0)*oe,oe<<=1;switch(ve=D){case 0:for(D=0,X=Math.pow(2,8),oe=1;oe!=X;)_=ze.val&ze.position,ze.position>>=1,ze.position==0&&(ze.position=Ue,ze.val=Ke(ze.index++)),D|=(0<_?1:0)*oe,oe<<=1;Te[Be++]=Pn(D),ve=Be-1,Me--;break;case 1:for(D=0,X=Math.pow(2,16),oe=1;oe!=X;)_=ze.val&ze.position,ze.position>>=1,ze.position==0&&(ze.position=Ue,ze.val=Ke(ze.index++)),D|=(0<_?1:0)*oe,oe<<=1;Te[Be++]=Pn(D),ve=Be-1,Me--;break;case 2:return $e.join("")}if(Me==0&&(Me=Math.pow(2,Fe),Fe++),Te[ve])Ze=Te[ve];else{if(ve!==Be)return null;Ze=w+w.charAt(0)}$e.push(Ze),Te[Be++]=w+Ze.charAt(0),w=Ze,--Me==0&&(Me=Math.pow(2,Fe),Fe++)}}}},Jt=Tt(ni).reduce(function(y,w){return y[ni[w].prefix]=ni[w],y},{}),fn={cookieName:"_pctx",consent:fi,encode:function(y,w){return w===void 0&&(w=Ia.URI),y=JSON.stringify(y),y=ni[w].compress(y),ni[w].prefix+y},decode:function(y){return y=function(_){var D=_.slice(0,3),_=_.slice(3);if(!Jt[D]||(D=Jt[D].decompress(_),!D))return null;try{return JSON.parse(D)}catch{return null}}(y||""),nr(y)?y:null}},nn={_pprv:Ss("_pprv",fi,(un=(un=Cr().cookies)==null?void 0:un._pprv)==null||!un.jsonOnly),_pcid:Ss("_pcid",vr),_pcus:Ss("_pcus",_r,!0),_pctx:fn},en=Tt(qe=nn).reduce(function(y,w){return y[w]=Ts(qe[w]),y},{}),Zn=function(){var y=null,w=null;return{register:function(D){return y=Ye(Ye({},D.fields),y),w=Ye(Ye({},D.cookieByName),w)},get wrappers(){return w},get:function(){var D={};return w&&Tt(w).forEach(function(_){D=Ye(Ye({},D),w[_].get())}),D},set:function(D,_){_===void 0&&(_=null);var X={};Tt(D).forEach(function(oe){var ve=D[oe],Oe=y==null?void 0:y[oe];Oe&&(X[Oe]||(X[Oe]={wrapper:w==null?void 0:w[Oe],data:{},update:!1,remove:!0}),X[Oe].data[oe]=ve,X[Oe].remove=X[Oe].remove&&ve===null,_&&(X[Oe].update||ve===_[oe])||(X[Oe].update=!0))}),Tt(X).forEach(function(oe){var Ue=X[oe],ve=Ue.wrapper,Oe=Ue.update,Ue=Ue.remove;Ue&&ve.remove(),Oe&&!Ue&&ve.set(X[oe].data)})}}},sr="__pctx_connection__",xn="uvm42pas28m",Ar={},yn=(tt===void 0&&(tt=!1),function(y,w){var D=Io();try{Object.defineProperty(window,sr,{configurable:tt,set:function(_){var X=_();X===xn?_(D):X==="mrlqf5trgho"&&(D=Io())}})}catch{}return window[sr]=function(_){return _&&(D=_),xn},D(y,w)}),Ir=function(y){return y.includes("*")},bu=function(y,w){return[new RegExp("^"+y.replace(/\*/g,".*")+"$"),w]},Ru=function(y,w){for(var D=0,_=w;D<_.length;D++){var X=_[D];if(X[0].test(y))return X[1]}return null},na=function(y){function w(X){return D[X]||Ru(X,_)||_r}var D=Object.assign({},y.items),_=nu(D);return function(Be,oe){var ve,Oe,Ue,Ke=Cr().requireConsent,Te=!Et(Be),Me=Te?[Be]:Be,Be=(Ue=oe||y.getConsent())?Ue.mode===Jn?(ve=function(Ze,$e,ze){if($e=$e&&Ao($e,ze),!$e)return null;for(var Pt=[],ot={},Ht=0,We=$e.patches;Ht<We.length;Ht++){var oi=We[Ht],mt=oi.action,ur=oi.with,oi=oi.item;oi.type===Ze&&(ot[oi.key]=mt={action:mt,data:ur===void 0?null:ur},Ir(oi.key))&&Pt.push(bu(oi.key,mt))}return{source:$e.source,getModifier:function(Si){return ot[Si]||Ru(Si,Pt)}}}(y.type,Ue.modifier,y.log))?(Oe=ve.source,Me.map(function(Ze){var $e=ve.getModifier(Ze),ze=(ze=$e==null?void 0:$e.action,Pt=$e==null?void 0:$e.data,ze==="obfuscate"?Pt:null),Pt={name:Ze,allowed:$e!=null&&$e.action?function(ot){switch(ot){case"include":return!0;case"exclude":return!1;case"obfuscate":return!0}}($e.action):ao(Oe,w(Ze))};return ze!==null&&(Pt.data=ze),Pt})):Fe():Me.map(function(Ze){return{name:Ze,allowed:ao(Ue.mode,w(Ze))}}):Fe();function Fe(){return Me.map(function(Ze){return{name:Ze,allowed:!Ke}})}return Te?Be[0]:Be}},ru=Object.freeze({__proto__:null,createCheckConsentWrapper:na,createMask:bu,getByMask:Ru,isMask:Ir,itemsToMask:nu}),Ca=(rt={pa_vid:function(y){return Q(Vt(y||"",!0)||y)},atuserid:function(y){return Q(((y=Vt(y||"",!0))==null?void 0:y.val)||"")}},function(y){for(var w=0,D=y;w<D.length;w++){var _=function(X){try{var oe=X.ls?W(X.ls)||null:(ve=ue.get(X),rt[X]&&ve?rt[X](ve):ve);if(oe)return{value:oe}}catch{}var ve}(D[w]);if(I(_)==="object")return _.value}return null}),iu=[{ls:"_cX_P"},"cX_P"],xs={PA:{browserId:["pa_vid","atuserid"].concat(iu)},DMP:{browserId:iu}},rf={browserId:{source:"DMP"}},_o="@@Data-layer/",os=_o+"update_value",ra=_o+"refresh_value",Ll=function(){return{_pprv:!Cr().requireConsent}},ws=function(y,w,D){D=D===1?"can not be":"was",console.warn('[DL]: Consent v2: the "'.concat(y,'" has a conflicted consent mode, ')+"mode ".concat(D,' changed to "').concat(w,'"'))},Dr=(En=function(y){ge(y),O(y),je(y)},Xs=Xs=en,Xn={fields:Tt(or=vt=Fs).reduce(function(y,w){var D=or[w].cookieName;return D!==null&&(y[w]=D),y},{}),cookieByName:Xs},_t=yn("data-layer",Xn),qt=!1,vn=new Map,At=new Set,Tn=new Map,Wn=function(){if(_t)return _t;throw new Error("DataLayer can't be connected")},zr=function(y){var w=Wn().registeredCookiesWrapper;w&&y(w)},uo=function(y){zr(function(w){y.forEach(function(D){D=w[D],D&&D.lazyActive()})})},is=function(){function y(D){return Tt(w).reduce(function(_,X){var oe=w[X];return oe[D]!==void 0&&(_[X]=oe[D]),_},{})}var w={};return{add:function(D,_){w[D]=_},call:function(){var D;D=y("protect"),0<Tt(D).length&&Wn().setProtectionData(D),D=y("protectUnsafe"),0<Tt(D).length&&Wn().setProtectionDataUnsafe(D)}}},Oi=function(y,w){return Tt(y).reduce(function(D,_){var X=Tn.get(_),oe=y[_];return X&&(D[_]=w?w(X,oe):X.get(oe)),D},{})},mi=function(Ue,w,D){D===void 0&&(D=!1);var _,Oe=Ue,X=Xt(),oe=(Lr(Ue)&&((_={})[Ue]=w,Oe=_),is()),ve=is(),Oe=Tt(Oe).reduce(function(Ke,Te){var Me=Oe[Te],Be=Tn.get(Te),Fe=Te;return Be!=null&&Be.readonly||(Be&&Be.cookieName&&X.add(Be.cookieName),Be&&Me!==Qn[Te]&&(Me===ra?(Ke[Te]=Be.refresh(Qn[Te],function(Ze){ve.add(Fe,Ze)}),Ke[Te]!==Qn[Te]&&oe.add(Fe,{protectUnsafe:!1})):Ke[Te]=Me===os?Be.update(Qn[Te],function(Ze){ve.add(Fe,Ze)}):Be.set(Me,Qn[Te],function(Ze){ve.add(Fe,Ze)}))),Ke},{}),Ue=(uo(X.values()),oe.call(),Wn().updateData(Oe));return Ue&&D&&(w=Tt(Ue).reduce(function(Ke,Te){return Ye(Ye({},Ke),((Ke={})[Te]=!1,Ke))},{}),Wn().setProtectionDataUnsafe(w),Wn().updateData(Oe)),ve.call(),Ue&&Oi(Ue)},{init:function(y){var w,D,_,X,oe,ve;y===void 0&&(y={}),qt||(_t=_t||yn("data-layer",Xn),w=Ye(Ye({},y),ne()),D=w.cookieDefault,zr(function(Oe){Tt(Oe).forEach(function(Ue){var Ke,Te,Be=Oe[Ue].cookieName,Me=(Me=w.cookies)==null?void 0:Me[Be],Be=((Be=w.cookies)==null?void 0:Be.storageMode)==="fixed";(Te=(Ke=Oe[Ue]).setFixedMode)!=null&&Te.call(Ke,Be),(D||Me)&&Oe[Ue].setCookieOptions(Ye(Ye({},D),Me))})}),qt=!0,Tt(vt).forEach(function(Oe){var Ue=vt[Oe];vn.set(Oe,new Set),Tn.set(Oe,Ue)}),_=!1,X=Wn().getInitCookieData(),oe=Wn().getCachedData(),ve=is(),y=Tt(vt).reduce(function(Oe,Ue){var Ke=Ue,Te=vt[Ue];return Oe[Ue]=(oe==null?void 0:oe[Ke])||Te.init(X==null?void 0:X[Ke],function(Me){ve.add(Ke,Me)}),oe!=null&&oe[Ke]||(_=!0),Oe},{}),Qn=y,_&&Wn().updateData(y),ve.call(),Wn().onUpdateData(Fl),En!=null&&En(jl()))},set:ou,get:ar,update:function(y){return Du(y)},refresh:function(){var y,w;return!Wn().setProtectionData(((w={})["@@Data-layer/refresh_locked_key"]=!0,w))&&(y=[],Tn.forEach(function(D,_){return y.push(_)}),w=y.reduce(function(D,_){return D[_]=ra,D},{}),mi(w),!0)},protect:function(y,w){return Ma(y,w)},addChangeListener:ri,removeChangeListener:function(y){At.delete(y),vn.forEach(function(w){return w.delete(y)})},terminate:function(){_t!=null&&_t.terminate(),vn.clear(),At.clear(),_t=null,qt=!1,Qn={}},updateMigration:function(){qt&&O(jl())},get isReady(){return qt},utils:{validateModifier:Ao,validateConsent:Ui,checkConsent:ru,setConsent:function(y,w,D){if(ar("consent"),y=Un(ar("purposes"),0,y,w,D)){if(y.error)return y.error;ou({consent:y.consent,purposes:y.purposes})}return null},getConsent:function(){var w=ar(["consent","purposes"]),y=w.consent,w=w.purposes;return ki(y,w)},notAcquiredConsent:ji()?Tt(Pr).reduce(function(y,w){return y[w]={mode:"not-acquired",products:Pr[w]},y},{}):null},get cookies(){return Ou()},get cookieEnabled(){return Ou()},setUnsafe:function(y,w){mi(y,w,!0)},protectUnsafe:function(y,w){return Ma(y,w,!0)},updateUnsafe:function(y){return Du(y,!0)},setCookieEnabled:function(y){zr(function(w){var D=Tt(y);D.length?D.forEach(function(_){var X=w[_];X&&X.setCookieEnabled(y[_])}):Tt(w).forEach(function(_){w[_].setCookieEnabled(y)})})}});function Ou(){var y=null;return zr(function(w){y=Tt(w).reduce(function(D,_){var X=w[_].cookieEnabled,oe=w[_].fixedAt||null;return D[w[_].cookieName]=X?{enabled:X,fixedAt:oe}:null,D},{})}),y}function jl(){return{params:Tn,getConnection:Wn,addChangeListener:ri,get:ar,updateValues:mi}}function Fl(y){var w=!1;Tt(y).forEach(function(D){var _,X=Tn.get(D);X&&(_=y[D],Qn[D]!==_)&&(Qn[D]=_,w=!0,(D=vn.get(D))!=null)&&D.forEach(function(oe){return oe(X.get(_))})}),w&&At.forEach(function(D){return D(Oi(Qn))})}function ar(y){var w=Xt(),D=Lr(y),_=y===void 0?Qn:D?((_={})[y]=Qn[y],_):y.reduce(function(X,oe){return Tn.has(oe)&&(X[oe]=Qn[oe]),X},{});return _=Oi(_,function(X,oe){return X.cookieName&&w.add(X.cookieName),X.get(oe)}),uo(w.values()),D?_[y]:_}function ou(y,w){return mi(y,w,!1)}function Du(y,w){w===void 0&&(w=!1);var D=y;return Et(y)||(D=[y]),mi(D.reduce(function(_,X){return _[X]=os,_},{}),void 0,w)}function Ma(y,w,X){var _,X=(X=X===void 0?!1:X)?Wn().setProtectionDataUnsafe:Wn().setProtectionData,oe=y;return Lr(y)&&((_={})[y]=w,oe=_),X(oe)}function ri(y,w){var D;Lr(y)?(D=vn.get(y))!=null&&D.add(w):At.add(y)}function Us(y,w,D){w.setProperty("event_collection_platform","js"),w.setProperty("event_collection_version",w.getConfiguration("version"));var _,We=new Date,X=(w.setProperty("device_timestamp_utc",We.getTime()),w.setProperty("device_local_hour",We.getTime()),w.setProperty("device_hour",We.getHours()),"isManualPageRefresh"),oe="pageview_id",ve="_isNotFirstPageView",Oe=C(w.events);try{for(Oe.s();!(_=Oe.n()).done;){var Ue=_.value;Ue.name==="page.display"&&(y.getConfiguration(X)===null&&y.getConfiguration(ve)&&y.setConfiguration(X,!1),y.getConfiguration("enableAutomaticPageRefresh")&&y.getConfiguration(X)===!1&&y.getConfiguration(ve)&&Dr.refresh(),y.getConfiguration(ve)||y.setConfiguration(ve,!0)),vi(oe,w,Ue)&&y._privacy.call("isPropAllowed",oe)&&(Ue.data[oe]=Dr.get("pageViewId"))}}catch(mt){Oe.e(mt)}finally{Oe.f()}try{var Ke,Te=new Date(new Date(Dr.cookies._pcid.fixedAt[0]).setUTCHours(0,0,0,0)).toISOString(),Me=C(w.events);try{for(Me.s();!(Ke=Me.n()).done;){var Be=Ke.value;vi("cookie_creation_date",w,Be)&&w.setProperty("cookie_creation_date",Te)}}catch(mt){Me.e(mt)}finally{Me.f()}}catch{}var Fe,Ze=Dr.get("content");for(Fe in Ze)if(Object.prototype.hasOwnProperty.call(Ze,Fe)){var $e,ze=Fe==="createdAt"||Fe==="tags"?{createdAt:"content_publication_date",tags:"tags_array"}[Fe]:"content_".concat(Fe).replace(/[\w]([A-Z])/g,function(mt){return mt[0]+"_"+mt[1]}).toLowerCase(),Pt=C(w.events);try{for(Pt.s();!($e=Pt.n()).done;){var ot=$e.value;vi(ze,w,ot)&&y._privacy.call("isPropAllowed",ze)&&(ot.data[ze]=Ze[Fe])}}catch(mt){Pt.e(mt)}finally{Pt.f()}}w.setProperty("has_access",Dr.get("userStatus")),w.setProperty("device_screen_width",window.screen.width),w.setProperty("device_screen_height",window.screen.height),w.setProperty("device_display_width",window.innerWidth||document.documentElement&&document.documentElement.clientWidth?document.documentElement.clientWidth:""),w.setProperty("device_display_height",window.innerHeight||document.documentElement&&document.documentElement.clientHeight?document.documentElement.clientHeight:"");var Ht,We=function(mt,ur){var oi,Si=C(ur);try{for(Si.s();!(oi=Si.n()).done;){var du,Bs=oi.value;if(-1<mt.indexOf(Bs))return[(du=mt.split(Bs))[0],du.slice(1).join(Bs)]}}catch(oa){Si.e(oa)}finally{Si.f()}return["",""]}(window.navigator?window.navigator.language||window.navigator.userLanguage:"",["-","_"]),We=(w.setProperty("browser_language",We[0]),w.setProperty("browser_language_local",We[1]),w.setProperty("previous_url",document.referrer||""),document.title&&w.setProperty("page_title_html",document.title),w.getConfiguration("addEventURL").toString()==="true");!We&&w.getConfiguration("addEventURL")!=="withoutQS"||w.setProperty("event_url_full",We?window.location.href.split("#")[0]:"".concat(window.location.protocol,"//").concat(window.location.host).concat(window.location.pathname));try{y.getConfiguration("allowHighEntropyClientHints")?window.navigator.userAgentData.getHighEntropyValues(["architecture","bitness","brands","mobile","model","platform","platformVersion","uaFullVersion","fullVersionList"]).then(function(mt){su(w,mt)}).finally(function(){U(y,w,D)}):(Ht={brands:window.navigator.userAgentData.brands,platform:window.navigator.userAgentData.platform,mobile:window.navigator.userAgentData.mobile},su(w,Ht),U(y,w,D))}catch{U(y,w,D)}}function vi(y,w,D){if(w.hasProperty(y)&&w.properties[y].options.events){if(w=w.properties[y].options.events,-1<w.indexOf(D.name))return;var _,X=C(w);try{for(X.s();!(_=X.n()).done;){var oe=_.value;if(oe.charAt(oe.length-1)==="*"&&D.name.indexOf(oe.substring(0,oe.length-1))===0)return}}catch(ve){X.e(ve)}finally{X.f()}}return D.data[y]===void 0}function yi(y){return y!==void 0}function su(y,w){var D=[{metric:"brands",property:"ch_ua"},{metric:"architecture",property:"ch_ua_arch"},{metric:"bitness",property:"ch_ua_bitness"},{metric:"fullVersionList",property:"ch_ua_full_version_list"},{metric:"mobile",property:"ch_ua_mobile"},{metric:"model",property:"ch_ua_model"},{metric:"platform",property:"ch_ua_platform"},{metric:"platformVersion",property:"ch_ua_platform_version"},{metric:"uaFullVersion",property:"ch_ua_full_version"}];if(yi(w))for(var _=0;_<D.length;_++)yi(w[D[_].metric])&&y.setProperty(D[_].property,w[D[_].metric])}function of(y,w,D){function _(X){U(y,w,D,X)}w.options&&w.options.onBeforeBuild?w.options.onBeforeBuild(y,w,_):_()}function As(y,w,D){function _(X){U(y,w,D,X)}w.options&&w.options.onBeforeSend?w.options.onBeforeSend(y,w,_):_()}function Is(y,w,D){y._privacy.call("filterEvents",w.events),y._privacy.call("filterProps",w.properties);for(var _=w.events,X=0;X<_.length;X++){y._privacy.call("filterProps",_[X].data,_[X].name);var oe,ve=y._privacy.call("getModeMetadata")||{};for(oe in ve)Object.prototype.hasOwnProperty.call(ve,oe)&&w.setProperty(oe,ve[oe])}U(y,w,D)}function ii(y,w,D){var _,X=[];for(_ in w.properties)if(Object.prototype.hasOwnProperty.call(w.properties,_)){var oe,ve=!1,Oe=C(w.events);try{for(Oe.s();!(oe=Oe.n()).done;){var Ue=oe.value,Ke=!1,Te=w.properties[_].options.events;if(Te)if(-1<Te.indexOf(Ue.name))Ke=!0;else{var Me,Be=C(Te);try{for(Be.s();!(Me=Be.n()).done;){var Fe=Me.value;if(Fe.charAt(Fe.length-1)==="*"&&Ue.name.indexOf(Fe.substring(0,Fe.length-1))===0){Ke=!0;break}}}catch(We){Be.e(We)}finally{Be.f()}}else Ke=!0;Ke&&(Ue.data[_]=w.properties[_].value,ve=!0)}}catch(We){Oe.e(We)}finally{Oe.f()}ve&&!w.properties[_].options.persistent&&X.push(_)}for(var Ze=0,$e=X;Ze<$e.length;Ze++)delete y._properties[$e[Ze]];if(!w.getConfiguration("sendEmptyProperties")){var ze,Pt=C(w.events);try{for(Pt.s();!(ze=Pt.n()).done;){var ot,Ht=ze.value;for(ot in Ht.data)!Object.prototype.hasOwnProperty.call(Ht.data,ot)||Ht.data[ot]!==""&&Ht.data[ot]!==void 0||delete Ht.data[ot]}}catch(We){Pt.e(We)}finally{Pt.f()}}U(y,w,D)}function au(y,w,D){(y._privacy.call("getMode")!==y._privacy.modeEnum.OPTOUT||y._privacy.call("getMode")===y._privacy.modeEnum.OPTOUT&&w.getConfiguration("sendEventWhenOptout"))&&0<w.build.data.events.length&&F.post(w.build.url,JSON.stringify(w.build.data)),U(y,w,D)}function uu(y,w,D){w.properties.user_id!==void 0?U(y,w,D):y.getUser(function(_){var X;_!==null&&(w.setProperty("user_id",_.id,X={persistent:!0}),w.setProperty("user_category",_.category,X),w.setProperty("user_recognition",!0,X)),U(y,w,D)})}function Dh(y,w,D){y._storage.getItem(w.getConfiguration("storageVisitor"),function(_){var X;w.getConfiguration("isVisitorClientSide")&&(w.visitorId=w.getConfiguration("visitorId")||Dr.get("browserId"),w.getConfiguration("isLegacyPrivacy")||y.consent.getMode()!=="opt-out"||(w.visitorId="OPT-OUT"),X=w.visitorId!=="OPT-OUT"&&w.visitorId!=="no-consent"&&w.visitorId!=="no-storage"&&w.visitorId!==w.getConfiguration("visitorId"),w.visitorId!==Dr.get("browserId"))&&X&&(w.visitorId=w.visitorId+"-NO"),U(y,w,D)})}function sf(y,w,D){function _(ve){(ve=oe(Pa(D.dataLayer,D.items,y.getNames),ve))!=null&&ve.forEach(function(Oe){Oe.allowed?Oe.data&&y.set(Oe.name,Oe.data):y.remove(Oe.name)})}var X=Nu(D),oe=lu(D.dataLayer,{items:D.items,type:w,getConsent:X});return w=D.checkConsentOnInit===void 0&&D.enableAutoRemove,D.enableAutoRemove&&Bl(D,_),w&&_(X()),Object.assign({},y,{set:function(ve,Oe,Ue){var Ke=oe(ve);Ke!=null&&Ke.allowed&&(Ke=(Ke=Ke.data)!=null?Ke:Oe,y.set.apply(null,Ue?[ve,Ke,Ue]:[ve,Ke]))},check:oe})}function Ul(y,w){return{check:lu(w.dataLayer,{items:w.items,type:y,getConsent:Nu(w)})}}var af=function(y){this.setItem=function(w,D,_,X){w="".concat(w,"=").concat(y.getConfiguration("encodeStorageBase64")?N.base64.encode(JSON.stringify(D)):encodeURIComponent(JSON.stringify(D))),w=(w=(w=(w=(w+=";path=".concat(y.getConfiguration("cookiePath")))+";domain=".concat(y.getConfiguration("cookieDomain")))+(y.getConfiguration("cookieSecure")?";secure":""))+";samesite=".concat(y.getConfiguration("cookieSameSite")))+(_?";expires=".concat(_.toUTCString()):""),document.cookie=w,X&&X()},this.getItem=function(X,D){var _=null,X=new RegExp("(?:^| )".concat(X,"=([^;]+)")).exec(document.cookie)||null;if(X)try{_=JSON.parse(decodeURIComponent(X[1]))}catch{_=JSON.parse(N.base64.decode(X[1]))}D&&D(_)},this.deleteItem=function(w,D){var _=new Date;_.setTime(_.getTime()-1e3),this.setItem(w,"",_,D)}},Nu=function(y){return function(){var w=y.dataLayer.get("consent");return w&&w[y.productName]||null}},Bl=function(y,w){function D(X){(X=(X==null?void 0:X[y.productName])||null)!==_&&w(_=X)}var _=null;return y.dataLayer.addChangeListener("consent",D),function(){y.dataLayer.removeChangeListener(D)}},lu=function(y,w){return y.utils.checkConsent.createCheckConsentWrapper(w)},Pa=function(y,w,D){var _=y.utils.checkConsent,X=_.itemsToMask(w),oe=Object.keys(w).filter(function(ve){return!_.isMask(ve)});return D().filter(function(ve){return oe.includes(ve)||_.getByMask(ve,X)})},ia={createLocalStorage:function(y){w=y.dataLayer,X=Xe.__protected__.ttlName,_=lu((w={dataLayer:w,productName:"DL"}).dataLayer,{items:((D={})[X]="mandatory",D),type:"localStorage",getConsent:Nu(w)}),oe=function(){var Te=_(X);return Te.allowed&&!Te.data},ve=!0,Bl(w,Ue),Ue();var w,D,_,X,oe,ve,Oe=function(){return ve};function Ue(){(ve=oe())||Xe.remove(X)}var Ke=sf(Xe,"localStorage",y);return Object.assign({},Ke,{set:function(Te,Me,Be){var Fe=Be;return Be!=null&&Be.expires&&!Oe()&&delete(Fe=Object.assign({},Be)).expires,Ke.set(Te,Me,Fe)}})},createProperty:function(y){return Ul("property",y)},createCookie:function(y){function w(Te){(Te=Ke(Pa(y.dataLayer,Oe,ue.getNames),Te))!=null&&Te.forEach(function(Me){function Be(){return oe[Me.name]||_.getByMask(Me.name,ve)||Ue}Me.allowed?Me.data&&ue.set(Me.name,Me.data,Be()):ue.remove(Me.name,Be())})}var D,_=y.dataLayer.utils.checkConsent,X=Nu(y),oe={},ve=[],Oe={},Ue={},Ke=(Object.keys(y.items).forEach(function(Te){var Me,Be,Fe,Ze,$e=y.items[Te];$e.type?(Me=$e.type,Be=$e.domain,Fe=$e.path,Ze={},Oe[Te]=Me,Be&&(Ze.domain=Be),Fe&&(Ze.path=Fe),_.isMask(Te)?ve.push(_.createMask(Te,Ze)):oe[Te]=Ze):Oe[Te]=$e}),lu(y.dataLayer,{items:Oe,type:"cookie",getConsent:X}));return D=!(y.checkConsentOnInit!==void 0||!y.enableAutoRemove),y.enableAutoRemove&&(Ue=y.enableAutoRemove,Bl(y,w)),D&&w(X()),Object.assign({},ue,{check:Ke,set:function(Te,Me,Be,Fe){var Ze=Ke(Te);Ze!=null&&Ze.allowed&&ue.set(Te,(Te=Ze.data)!=null?Te:Me,Be,Fe)}})},createSessionStorage:function(y){return sf(bn,"sessionStorage",y)},createEvent:function(y){return Ul("event",y)}},Yt={"*":"optional",pa_vid:"mandatory",pa_privacy:"mandatory",atuserid:"essential"},Nh={"click.exit":"mandatory","click.navigation":"mandatory","click.download":"mandatory","click.action":"mandatory","page.display":"mandatory"},Lh={"*":"optional",connection_type:"mandatory",device_timestamp_utc:"mandatory",visitor_privacy_consent:"mandatory",visitor_privacy_mode:"mandatory",ch_ua:"mandatory",ch_ua_arch:"mandatory",ch_ua_bitness:"mandatory",ch_ua_full_version:"mandatory",ch_ua_full_version_list:"mandatory",ch_ua_mobile:"mandatory",ch_ua_model:"mandatory",ch_ua_platform:"mandatory",ch_ua_platform_version:"mandatory",app_crash:"essential",app_crash_class:"essential",app_crash_screen:"essential",app_version:"essential",browser:"essential",browser_cookie_acceptance:"essential",browser_group:"essential",browser_version:"essential",click:"essential",click_chapter1:"essential",click_chapter2:"essential",click_chapter3:"essential",click_full_name:"essential",connection_monitor:"essential",connection_organisation:"essential",cookie_creation_date:"essential",date:"essential",date_day:"essential",date_daynumber:"essential",date_month:"essential",date_monthnumber:"essential",date_week:"essential",date_year:"essential",date_yearofweek:"essential",device_brand:"essential",device_display_height:"essential",device_display_width:"essential",device_name:"essential",device_name_tech:"essential",device_screen_diagonal:"essential",device_screen_height:"essential",device_screen_width:"essential",device_type:"essential",event_collection_platform:"essential",event_collection_version:"essential",event_hour:"essential",event_id:"essential",event_minute:"essential",event_position:"essential",event_second:"essential",event_time:"essential",event_time_utc:"essential",event_url:"essential",event_url_domain:"essential",event_url_full:"essential",exclusion_cause:"essential",exclusion_type:"essential",geo_city:"essential",geo_continent:"essential",geo_country:"essential",geo_metro:"essential",geo_region:"essential",goal_type:"essential",hit_time_utc:"essential",os:"essential",os_group:"essential",os_version:"essential",os_version_name:"essential",page:"essential",page_chapter1:"essential",page_chapter2:"essential",page_chapter3:"essential",page_duration:"essential",page_full_name:"essential",page_position:"essential",page_title_html:"essential",page_url:"essential",pageview_id:"essential",previous_url:"essential",privacy_status:"essential",site:"essential",site_env:"essential",site_id:"essential",site_platform:"essential",src:"essential",src_detail:"essential",src_direct_access:"essential",src_organic:"essential",src_organic_detail:"essential",src_portal_domain:"essential",src_portal_site:"essential",src_portal_site_id:"essential",src_portal_url:"essential",src_referrer_site_domain:"essential",src_referrer_site_url:"essential",src_referrer_url:"essential",src_se:"essential",src_se_category:"essential",src_se_country:"essential",src_type:"essential",src_url:"essential",src_url_domain:"essential",src_webmail:"essential"};function ss(y,w){var D;return D=w,window.pdl&&window.pdl.consent_items&&window.pdl.consent_items.PA&&window.pdl.consent_items.PA[D]&&Object.assign(y,window.pdl.consent_items.PA[w]),y}function Lu(y){this.storageKeys=["pa_vid","pa_user","pa_privacy","atuserid"],this.propertyConsent={},this.eventConsent={},this.storageConsent={},this.consentItems={propertyItems:{},eventItems:{},cookieItems:{}},this.modeMetadata={"opt-in":{visitor_privacy_consent:!0,visitor_privacy_mode:"optin"},"opt-out":{visitor_privacy_consent:!1,visitor_privacy_mode:"optout"},essential:{visitor_privacy_consent:!1,visitor_privacy_mode:"exempt"},custom:{visitor_privacy_consent:!1,visitor_privacy_mode:"custom"}},this.init=function(){this.consentItems={propertyItems:ss(Lh,"properties"),eventItems:ss(Nh,"events"),cookieItems:ss(Yt,"storages")},this.propertyConsent=ia.createProperty({dataLayer:Dr,productName:"PA",items:this.consentItems.propertyItems}),this.eventConsent=ia.createEvent({dataLayer:Dr,productName:"PA",items:this.consentItems.eventItems}),this.storageConsent=ia.createCookie({dataLayer:Dr,productName:"PA",items:this.consentItems.cookieItems}),y.getConfiguration("isLegacyPrivacy")||(this.initMode(),this.filterKeys())},this.initMode=function(){Dr.get("consent")===null&&(window.pdl.consent&&window.pdl.consent.defaultPreset?Dr.set("consent",0):this.setMode("opt-in"))},this.setMode=function(w){Dr.set("consent",{PA:{mode:w}}),this.filterKeys()},this.setPresets=function(w){Dr.set("consent",w),this.filterKeys()},this.getMode=function(){var w="opt-in",D=Dr.get("consent");return w=D&&D.PA&&D.PA.mode?Dr.get("consent").PA.mode:w},this.setCustomModeMetadata=function(w,D){this.modeMetadata.custom.visitor_privacy_mode=D||"custom",this.modeMetadata.custom.visitor_privacy_consent=w},this.getModeMetadata=function(){return this.modeMetadata[this.getMode()]||{}},this.getConsentItems=function(){return this.consentItems},this.isPropAllowed=(function(w){return this.propertyConsent.check(w).allowed}).bind(this),this.isEventAllowed=(function(w){return this.eventConsent.check(w).allowed}).bind(this),this.isKeyAllowed=(function(w){return this.storageConsent.check(w).allowed}).bind(this),this.filterProps=function(w){for(var D in w)Object.prototype.hasOwnProperty.call(w,D)&&!this.isPropAllowed(D)&&delete w[D]},this.filterEvents=function(w){for(var D=w.length-1;0<=D;D--)this.isEventAllowed(w[D].name)||w.splice(D,1)},this.filterKeys=function(){var w,D=C(this.storageKeys);try{for(D.s();!(w=D.n()).done;){var _=w.value;this.isKeyAllowed(_)||y._storage.deleteItem(_)}}catch(X){D.e(X)}finally{D.f()}},this.setItem=function(w,D,_,X){this.isKeyAllowed(w)?y._storage.setItem(w,D,_,X):X&&X()},this.dl=Dr,this.init()}function lo(y,w,D,_){var X,oe=D?null:y,ve=w||[],Oe=!1,Ue=!1,Ke=!1;if(0<ve.length){for(var Te=0;Te<ve.length;Te++)Me(ve[Te],oe);Be()}function Me(Fe,Ze){try{(function $e(ze,Pt,ot,Ht){var We=ze[Pt[0]];return We===void 0||(Pt.length===1?(We.apply(Ht||ze,ot),!1):$e(We,Pt.slice(1),ot,Ht))})(y,Fe[0].split("."),Fe.slice(1),Ze)?Ue=!0:Oe=!0}catch{Ue=!0}}function Be(){Ue&&Oe&&!Ke&&(console.error("Piano Analytics SDK - window.".concat(_,' is used for Piano Analytics integration and somewhere else. Please check "queueVarName" configuration if needed.')),Ke=!0)}D&&(X=window[_].push.bind(window[_]),window[_].push=function(Fe){Me(Fe),Be(),X(Fe)})}function ka(y){function w(Te,Me,Be,Fe){return Be=ve(Me[Be].events[Te],Fe),Me=ve(Me["*"].events[Te],Fe),Be||Me}function D(Te,Me,Be,Fe,ze){var $e,ze=ze?($e=Oe(Me[Be].properties,Te,Fe,ze),Oe(Me["*"].properties,Te,Fe,ze)):($e=Ue(Me[Be].properties,Te,Fe),Ue(Me["*"].properties,Te,Fe));return $e||ze}function _(Te,Me,Be,Fe){return Be=Ke(Me[Be].storage,Te,Fe),Me=Ke(Me["*"].storage,Te,Fe),Be||Me}var X=y.getConfiguration("privacy"),oe=(this.currentMode="",this.modes=X.modes,this._storageKeys=Object.assign(X.legacyKeys,X.storageKeys),this.init=function(){y.getConfiguration("isLegacyPrivacy")&&(window._pac=window._pac||{privacy:[]},lo(this,window._pac.privacy),y._storage.getItem(X.storageKey,(function(Te){this.setMode(Te&&this.modes[Te]?Te:y.getConfiguration("privacyDefaultMode"))}).bind(this)))},this.setMode=function(Te){Te!==this.currentMode&&this.modes[Te]&&(this.currentMode=Te,y._storage.getItem(X.storageKey,(function(Me){Te==="optout"||Te==="no-consent"||Te==="no-storage"?y.setConfiguration("visitorId",this.modes[Te].visitorId):y.getConfiguration("visitorId")!=="OPT-OUT"&&y.getConfiguration("visitorId")!=="no-consent"&&y.getConfiguration("visitorId")!=="no-storage"||y.cfg.deleteProperty("visitorId"),this.filterProps(y._properties),this.filterKeys(),Me!==Te&&((Me=new Date).setTime(Me.getTime()+24*y.getConfiguration("storageLifetimePrivacy")*60*60*1e3),this.setItem(X.storageKey,Te,Me))}).bind(this)))},this.createMode=function(Te,Me){var Be;this.modes[Te]||((Be=j(this.modes.exempt)).name=Te,Be.properties.include.visitor_privacy_mode=Te,Be.properties.include.visitor_privacy_consent=Me,this.modes[Te]=Be)},this.getMode=function(){return this.currentMode},(function(Te,Me,Be,Fe,Ze,$e){var ze=["*"],Pt=["*"],ot="properties",Ht=Fe?"forbidden":"allowed";Me&&(ze=typeof Me=="string"?[Me]:Me),Be&&(Pt=typeof Be=="string"?[Be]:Be),Ze&&(ot="storage"),$e&&(ot="events");for(var We=0;We<ze.length;We++)if(this.modes[ze[We]]!==void 0)for(var mt=this.modes[ze[We]],ur=0;ur<Pt.length;ur++){var oi=mt[ot][Ht];oi[Pt[ur]]!==void 0||Ze||$e||(oi[Pt[ur]]={});for(var Si=0;Si<Te.length;Si++)Ze||$e?oi[Te[Si]]=!0:oi[Pt[ur]][Te[Si]]=!0}}).bind(this)),ve=(this.include={properties:function(Te,Me,Be){oe(Te,Me,Be)},property:function(Te,Me,Be){oe([Te],Me,Be)},storageKeys:function(Te,Me){oe(Te,Me,null,!1,!0)},storageKey:function(Te,Me){oe([Te],Me,null,!1,!0)},events:function(Te,Me){oe(Te,Me,null,!1,!1,!0)},event:function(Te,Me){oe([Te],Me,null,!1,!1,!0)}},this.exclude={properties:function(Te,Me,Be){oe(Te,Me,Be,!0)},property:function(Te,Me,Be){oe([Te],Me,Be,!0)},storageKeys:function(Te,Me){oe(Te,Me,null,!0,!0)},storageKey:function(Te,Me){oe([Te],Me,null,!0,!0)},events:function(Te,Me){oe(Te,Me,null,!0,!1,!0)},event:function(Te,Me){oe([Te],Me,null,!0,!1,!0)}},function(Te,Me){if(Te[Me])return!0;for(var Be in Te)if(Object.prototype.hasOwnProperty.call(Te,Be)&&Be.charAt(Be.length-1)==="*"&&Me.indexOf(Be.substring(0,Be.length-1))===0)return!0;return!1}),Oe=(this.isEventAllowed=function(Be){var Me=w("forbidden",this.modes,this.currentMode,Be),Be=w("allowed",this.modes,this.currentMode,Be);return!Me&&Be},function(Te,Me,Be,Fe){var Ze,$e=Te[Me];if($e[Fe]&&$e[Fe][Be]||$e["*"][Be])return!0;for(Ze in $e)if(Object.prototype.hasOwnProperty.call($e,Ze)&&Ze.charAt(Ze.length-1)==="*"&&Fe.indexOf(Ze.substring(0,Ze.length-1))===0||Ze===Fe){for(var ze in $e[Ze])if(Object.prototype.hasOwnProperty.call($e[Ze],ze)&&(ze.charAt(ze.length-1)==="*"&&Be.indexOf(ze.substring(0,ze.length-1))===0||Be===ze))return!0}return!1}),Ue=function(Te,Me,Be){if(Me==="forbidden"&&Te[Me]["*"][Be])return!0;for(var Fe in Te[Me])if(Object.prototype.hasOwnProperty.call(Te[Me],Fe)){if(Te[Me][Fe][Be])return!0;for(var Ze in Te[Me][Fe])if(Ze.charAt(Ze.length-1)==="*"&&Be.indexOf(Ze.substring(0,Ze.length-1))===0)return!0}return!1},Ke=(this.isPropAllowed=function(Fe,Me){var Be=D("forbidden",this.modes,this.currentMode,Fe,Me),Fe=D("allowed",this.modes,this.currentMode,Fe,Me);return!Be&&Fe},function(Te,Me,Be){var Fe,Ze=Te[Me];if(Ze[Be])return!0;for(Fe in Ze)if(Object.prototype.hasOwnProperty.call(Ze,Fe)&&Fe.charAt(Fe.length-1)==="*"&&Be.indexOf(Fe.substring(0,Fe.length-1))===0)return!0;return!1});this.isKeyAllowed=function(Be){var Me=_("forbidden",this.modes,this.currentMode,Be),Be=_("allowed",this.modes,this.currentMode,Be);return!Me&&Be},this.setItem=function(Te,Me,Be,Fe){this.isKeyAllowed(Te)?y._storage.setItem(Te,Me,Be,Fe):Fe&&Fe()},this.filterProps=function(Te,Me){for(var Be in Te)Object.prototype.hasOwnProperty.call(Te,Be)&&!this.isPropAllowed(Be,Me||void 0)&&delete Te[Be]},this.filterKeys=function(){for(var Te in this._storageKeys)Object.prototype.hasOwnProperty.call(this._storageKeys,Te)&&!this.isKeyAllowed(Te)&&y._storage.deleteItem(Te)},this.filterEvents=function(Te){for(var Me=Te.length-1;0<=Me;Me--)this.isEventAllowed(Te[Me].name)||Te.splice(Me,1)},this.getModeMetadata=function(){return this.modes[this.getMode()].properties.include},this.init()}function cu(y){this.modeEnum={OPTOUT:y.getConfiguration("isLegacyPrivacy")?"optout":"opt-out"},this.call=function(w){for(var D=y.getConfiguration("isLegacyPrivacy")?"privacy":"consent",_=arguments.length,X=new Array(1<_?_-1:0),oe=1;oe<_;oe++)X[oe-1]=arguments[oe];return y[D][w].apply(y[D],X)}}function Vl(y){var w=y.getConfiguration("storageUser");this.setUser=function(D,_,X){var oe={id:D,category:_};y.setProperties({user_id:D,user_category:_,user_recognition:!1},{persistent:!0}),X!==!1&&((D=new Date).setTime(D.getTime()+24*y.getConfiguration("storageLifetimeUser")*60*60*1e3),y._privacy.call("setItem",w,oe,D))},this.getUser=function(D){y._storage.getItem(w,function(_){var X=_;!_&&y._properties.user_id&&(X={id:y._properties.user_id.value,category:y._properties.user_category.value}),D&&D(X)})},this.deleteUser=function(D){y.deleteProperty("user_id"),y.deleteProperty("user_category"),y.deleteProperty("user_recognition"),y._storage.deleteItem(w,function(){D&&D()})}}function Rn(y){function w(){this.debugError={trigger:"AvInsights:Media:setContentValues:Error",level:"ERROR",messageObject:"Not an object"},this.processHeartbeatValue=function(Ue,Ke){return Ue=parseInt(Ue,10),Ue?Math.max(Ue,Ke):0},this.value2Number=function(Ue){var Ke=0;return isNaN(Number(Ue))||(Ke=Number(Ue)),Math.max(Ke,0)}}var D={minHeartbeat:y.getConfiguration("minHeartbeat"),minBufferingHeartbeat:y.getConfiguration("minBufferingHeartbeat")},_="_ATVALUE",X="_ATPREFIX";function oe(Me,Ke){var Te,Me=Me.length<2||Me[1]!==":"?(Te="",Me):Me.length<4||Me[3]!==":"?(Te=Me.substring(0,1),Me.substring(2,Me.length)):(Te=Me.substring(0,3),Me.substring(4,Me.length));return Te=Te.toLowerCase(),Me=Me.toLowerCase(),{prefix:Te,key:Me}}function ve(Ue){return Ue!==null&&I(Ue)==="object"&&!(Ue instanceof Array)}function Oe(Ue,Ke,Te,Me,Be){var Fe,Ze,$e,ze="",Pt="",ot="",Ht=0;for($e in Ue)if(Object.prototype.hasOwnProperty.call(Ue,$e))if(ze=(Fe=oe($e)).prefix||Me||"",Pt=(Ke?Ke+"_":"")+Fe.key,ve(Ue[$e]))Oe(Ue[$e],Pt,Te,ze);else{for(Ze=Pt.split("_"),ot="",Ht=0;Ht<Ze.length;Ht++)ze=(Fe=oe(Ze[Ht])).prefix||ze,ot+=Fe.key+(Ht<Ze.length-1?"_":"");Te[Pt=ot||Pt]=Te[Pt]||{},Te[Pt][_]=Ue[$e],Te[Pt][X]=ze}}y.avInsights={},y.avInsights.Media=function(Ue,Ke,Te){function Me(_e){_e?We.delayBufferingConfiguration=j(We.delayBufferingConfigurationBackup):We.delayConfiguration=j(We.delayConfigurationBackup)}function Be(_e,et){if(et){Si(_e);var gt,rn={};for(gt in ve(et)?rn=et:isNaN(et)?rn=JSON.parse(et):rn[0]=et,rn)Object.prototype.hasOwnProperty.call(rn,gt)&&(_e?We.delayBufferingConfiguration.push({delay:Ht.processHeartbeatValue(gt,0),number:0,timeout:-1,refresh:Ht.processHeartbeatValue(rn[gt],D.minBufferingHeartbeat)}):We.delayConfiguration.push({delay:Ht.processHeartbeatValue(gt,0),number:0,timeout:-1,refresh:Ht.processHeartbeatValue(rn[gt],D.minHeartbeat)}));du(_e),oi(_e)}}function Fe(_e,Di,gt,rn){var ir=j(ur),Di=(ir.av_session_id={},ir.av_session_id[_]=We.sessionId,ir.av_session_id[X]="",Di&&(oa(ir),We.previousEvent=_e),ve(rn)&&Oe(rn,null,ir,null),ju(ir));y.sendEvent(_e,Di,gt)}function Ze(){var _e=this,et=0,gt=0;_e.getEventDuration=function(){var rn=new Date().getTime()-et-gt;return gt+=rn,rn},_e.initBaseTime=function(){et===0&&(et=new Date().getTime())},_e.resetProperties=function(){gt=et=0},_e.initHeartbeatTimer=function(rn,ir){var Di=ir?We.delayBufferingConfiguration:We.delayConfiguration;0<Di.length&&(Bs(ir),clearTimeout(Di[0].timeout),Di[0].timeout=setTimeout(function(){Di[0].number===0&&Di.splice(0,1),rn&&rn()},1e3*Di[0].refresh))},_e.stopHeartbeatTimer=function(rn){for(var ir=rn?We.delayBufferingConfiguration:We.delayConfiguration,Di=0;Di<ir.length;Di++)clearTimeout(ir[Di].timeout),ir[Di].timeout=-1}}function $e(_e,et,gt,rn,ir){mt.initBaseTime(),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=We.currentCursorPosition,We.currentCursorPosition=_e?We.previousCursorPosition+Math.floor(We.playbackSpeed*We.eventDuration):gt,et&&mt.initHeartbeatTimer(function(){$e(!0,!0)},!1),Fe("av.heartbeat",!0,rn,ir)}function ze(_e,et,gt){mt.initBaseTime(),We.eventDuration=mt.getEventDuration(),_e&&mt.initHeartbeatTimer(function(){ze(!0)},!0),Fe("av.buffer.heartbeat",!0,et,gt)}function Pt(_e,et,gt){mt.initBaseTime(),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=We.currentCursorPosition,_e&&mt.initHeartbeatTimer(function(){Pt(!0)},!0),Fe("av.rebuffer.heartbeat",!0,et,gt)}var ot=this,Ht=new w,We=null,mt=null,ur=null,oi=function(_e){_e?We.delayBufferingConfigurationBackup=j(We.delayBufferingConfiguration):We.delayConfigurationBackup=j(We.delayConfiguration)},Si=function(_e){_e?(We.delayBufferingConfiguration=[],We.delayBufferingConfigurationBackup=[]):(We.delayConfiguration=[],We.delayConfigurationBackup=[])},du=function(_e){(_e?We.delayBufferingConfiguration:We.delayConfiguration).sort(function(et,gt){return et.delay<gt.delay?-1:et.delay>gt.delay?1:0})},Bs=function(gt){var et,gt=gt?We.delayBufferingConfiguration:We.delayConfiguration;(et=gt[1]!==void 0?gt[1].delay:et)===void 0?gt[0].number=1:0<gt[0].number?gt[0].number--:typeof et=="number"&&(gt[0].number=Math.floor(60*(et-gt[0].delay)/gt[0].refresh)-1)},oa=function(_e){_e.av_previous_position={},_e.av_previous_position[_]=We.previousCursorPosition,_e.av_previous_position[X]="",_e.av_position={},_e.av_position[_]=We.currentCursorPosition,_e.av_position[X]="",_e.av_duration={},_e.av_duration[_]=We.eventDuration,_e.av_duration[X]="",_e.av_previous_event={},_e.av_previous_event[_]=We.previousEvent,_e.av_previous_event[X]=""},ju=function(_e){var et,gt={};for(et in _e)Object.prototype.hasOwnProperty.call(_e,et)&&(Object.prototype.hasOwnProperty.call(_e[et],_)?gt[_e[et][X]?"".concat(_e[et][X],":").concat(et):et]=_e[et][_]:gt[et]=_e[et]);return gt};ot.set=function(_e,et){_e=oe(_e),ur[_e.key]=ur[_e.key]||{},ur[_e.key][_]=et,ur[_e.key][X]=_e.prefix},ot.get=function(gt){var et=null,gt=oe(gt);return et=ur[gt.key]!==void 0?ur[gt.key][_]:et},ot.del=function(_e){_e=oe(_e),ur[_e.key]!==void 0&&delete ur[_e.key]},ot.setProps=function(_e){ve(_e)&&Oe(_e,null,ur,null)},ot.getProps=function(){var _e,et=null;for(_e in ur)Object.prototype.hasOwnProperty.call(ur,_e)&&((et=et||{})[_e]=ur[_e][_]);return et},ot.delProps=function(){ur={}},ot.setPlaybackSpeed=function(_e){_e=Ht.value2Number(_e)||We.playbackSpeed,_e!==We.playbackSpeed&&(mt.stopHeartbeatTimer(!1),We.isPlaying&&($e(!0,!1),mt.initHeartbeatTimer(function(){$e(!0,!0)},!1)),We.playbackSpeed=_e)},ot.getSessionID=function(){return We.sessionId},ot.track=function(_e,et,gt,rn){var ir=et||{};switch(_e){case"av.heartbeat":ot.heartbeat(ir.av_position,gt,rn);break;case"av.buffer.heartbeat":ot.bufferHeartbeat(gt,rn);break;case"av.rebuffer.heartbeat":ot.rebufferHeartbeat(gt,rn);break;case"av.play":ot.play(ir.av_position,gt,rn);break;case"av.buffer.start":ot.bufferStart(ir.av_position,gt,rn);break;case"av.start":ot.playbackStart(ir.av_position,gt,rn);break;case"av.resume":ot.playbackResumed(ir.av_position,gt,rn);break;case"av.pause":ot.playbackPaused(ir.av_position,gt,rn);break;case"av.stop":ot.playbackStopped(ir.av_position,gt,rn);break;case"av.backward":ot.seekBackward(ir.av_previous_position,ir.av_position,gt,rn);break;case"av.forward":ot.seekForward(ir.av_previous_position,ir.av_position,gt,rn);break;case"av.seek.start":ot.seekStart(ir.av_previous_position,gt,rn);break;case"av.error":ot.error(ir.av_player_error,gt,rn);break;default:Fe(_e,!1,gt,rn)}},ot.heartbeat=function(_e,et,gt){var rn,ir=!0;_e!=null&&0<=_e&&(ir=!1,rn=Ht.value2Number(_e)),$e(ir,!1,rn,et,gt)},ot.bufferHeartbeat=function(_e,et){ze(!1,_e,et)},ot.rebufferHeartbeat=function(_e,et){Pt(!1,_e,et)},ot.play=function(_e,et,gt){mt.initBaseTime(),_e=Ht.value2Number(_e),We.eventDuration=0,We.previousCursorPosition=_e,We.currentCursorPosition=_e,We.isPlaying=!1,We.isPlaybackActivated=!1,mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0),Fe("av.play",!0,et,gt)},ot.bufferStart=function(_e,et,gt){mt.initBaseTime(),_e=Ht.value2Number(_e),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=We.currentCursorPosition,We.currentCursorPosition=_e,mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0),We.isPlaybackActivated?(mt.initHeartbeatTimer(function(){Pt(!0)},!0),Fe("av.rebuffer.start",!0,et,gt)):(mt.initHeartbeatTimer(function(){ze(!0)},!0),Fe("av.buffer.start",!0,et,gt))},ot.playbackStart=function(_e,et,gt){mt.initBaseTime(),_e=Ht.value2Number(_e),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=_e,We.currentCursorPosition=_e,We.isPlaying=!0,We.isPlaybackActivated=!0,mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0),mt.initHeartbeatTimer(function(){$e(!0,!0)},!1),Fe("av.start",!0,et,gt)},ot.playbackResumed=function(_e,et,gt){mt.initBaseTime(),_e=Ht.value2Number(_e),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=We.currentCursorPosition,We.currentCursorPosition=_e,We.isPlaying=!0,We.isPlaybackActivated=!0,mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0),mt.initHeartbeatTimer(function(){$e(!0,!0)},!1),Fe("av.resume",!0,et,gt)},ot.playbackPaused=function(_e,et,gt){mt.initBaseTime(),_e=Ht.value2Number(_e),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=We.currentCursorPosition,We.currentCursorPosition=_e,We.isPlaying=!1,We.isPlaybackActivated=!0,mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0),Fe("av.pause",!0,et,gt)},ot.playbackStopped=function(_e,et,gt){mt.initBaseTime(),_e=Ht.value2Number(_e),We.eventDuration=mt.getEventDuration(),We.previousCursorPosition=We.currentCursorPosition,We.currentCursorPosition=_e,We.isPlaying=!1,We.isPlaybackActivated=!1,mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0),mt.resetProperties(),Me(!1),Me(!0),Fe("av.stop",!0,et,gt),We.previousCursorPosition=0,We.currentCursorPosition=0,We.eventDuration=0,We.previousEvent="",We.sessionId=P.v4()},ot.seek=function(_e,et,gt,rn){_e=Ht.value2Number(_e),et=Ht.value2Number(et),et<_e?ot.seekBackward(_e,et,gt,rn):ot.seekForward(_e,et,gt,rn)},ot.seekBackward=function(_e,et,gt,rn){ot.seekStart(_e,null,rn),We.eventDuration=0,We.previousCursorPosition=Ht.value2Number(_e),We.currentCursorPosition=Ht.value2Number(et),Fe("av.backward",!0,gt,rn)},ot.seekForward=function(_e,et,gt,rn){ot.seekStart(_e,null,rn),We.eventDuration=0,We.previousCursorPosition=Ht.value2Number(_e),We.currentCursorPosition=Ht.value2Number(et),Fe("av.forward",!0,gt,rn)},ot.seekStart=function(_e,et,gt){_e=Ht.value2Number(_e),We.previousCursorPosition=We.currentCursorPosition,We.currentCursorPosition=_e,We.isPlaying?We.eventDuration=mt.getEventDuration():We.eventDuration=0,Fe("av.seek.start",!0,et,gt)},ot.adClick=function(_e,et){Fe("av.ad.click",!1,_e,et)},ot.adSkip=function(_e,et){Fe("av.ad.skip",!1,_e,et)},ot.error=function(_e,et,gt){var rn={};(rn=ve(gt)?gt:rn).av_player_error=String(_e),Fe("av.error",!1,et,rn)},ot.display=function(_e,et){Fe("av.display",!1,_e,et)},ot.close=function(_e,et){Fe("av.close",!1,_e,et)},ot.volume=function(_e,et){Fe("av.volume",!1,_e,et)},ot.subtitleOn=function(_e,et){Fe("av.subtitle.on",!1,_e,et)},ot.subtitleOff=function(_e,et){Fe("av.subtitle.off",!1,_e,et)},ot.fullscreenOn=function(_e,et){Fe("av.fullscreen.on",!1,_e,et)},ot.fullscreenOff=function(_e,et){Fe("av.fullscreen.off",!1,_e,et)},ot.quality=function(_e,et){Fe("av.quality",!1,_e,et)},ot.speed=function(_e,et){Fe("av.speed",!1,_e,et)},ot.share=function(_e,et){Fe("av.share",!1,_e,et)},Be(!(We={previousCursorPosition:0,currentCursorPosition:0,eventDuration:0,playbackSpeed:1,previousEvent:"",isPlaybackActivated:!1,isPlaying:!1,sessionId:"",delayConfiguration:[],delayConfigurationBackup:[],delayBufferingConfiguration:[],delayBufferingConfigurationBackup:[]}),Ue),Be(!0,Ke),We.sessionId=Te||P.v4(),mt=new Ze,Ue=window,Ke="pagehide",Te=function(){mt.stopHeartbeatTimer(!1),mt.stopHeartbeatTimer(!0)},Ue.addEventListener?Ue.addEventListener(Ke,Te,!1):Ue.attachEvent&&Ue.attachEvent("on"+Ke,Te),ur={}}}function $r(X){var w,D=this;for(w in D.cfg=new $(j(X)||v),D.setConfiguration=D.cfg.setConfiguration,D.setConfigurations=D.cfg.setConfigurations,D.getConfiguration=D.cfg.getConfiguration,window._pac=window._pac||{privacy:[]},window._pac)Object.prototype.hasOwnProperty.call(window._pac,w)&&w!=="privacy"&&D.setConfiguration(w,window._pac[w]);this._storage=new af(this),this._queue=new d(this),this._properties={},this._sendEvent=fu;var _,X=this;X.setConfiguration("isLegacyPrivacy",!0),window.pdl===void 0?window.pdl={migration:{browserId:{source:"PA"}},cookies:{storageMode:"fixed"}}:(window.pdl.requireConsent&&X.setConfiguration("isLegacyPrivacy",!1),window.pdl.cookies===void 0?window.pdl.cookies={storageMode:"fixed"}:window.pdl.cookies&&window.pdl.cookies.storageMode===void 0&&(window.pdl.cookies.storageMode="fixed")),Dr.init({cookieDefault:{domain:X.getConfiguration("cookieDomain"),secure:X.getConfiguration("cookieSecure"),path:X.getConfiguration("cookiePath"),samesite:X.getConfiguration("cookieSameSite")},cookies:{_pcid:{expires:X.getConfiguration("storageLifetimeVisitor")}}}),X.privacy=new ka(X),X.consent=new Lu(X),X._privacy=new cu(X),this.user=new Vl(this),Rn(this),_=(X=this).getConfiguration("queueVarName"),window[_]=window[_]||[],lo(X,window[_],!0,_)}function fu(y,ve){for(var D=[Is,Dh,uu,Y,Us,ii,of,J,As,au],_=0;_<y.length;_++){var X={name:"",data:{}};if(typeof y[_]=="string")X.name=y[_];else{if(y[_].data!==void 0)continue;X.name=y[_].name}y[_]=X}var oe,ve={events:y,options:ve};0<D.length&&typeof D[0]=="function"&&(oe=new $(this.cfg.cloneData()),D[0](this,new M(this,ve,oe),D.slice(1)))}$r.prototype.setProperty=function(y,w,D){this._privacy.call("isPropAllowed",y)&&(this._properties[y]={value:w,options:D||{}})},$r.prototype.setProperties=function(y,w){for(var D in y)Object.prototype.hasOwnProperty.call(y,D)&&this.setProperty(D,y[D],w)},$r.prototype.deleteProperty=function(y){delete this._properties[y]},$r.prototype.sendEvent=function(y,w,D){this._queue.push(["_sendEvent",[{name:y,data:w}],D])},$r.prototype.sendEvents=function(y,w){this._queue.push(["_sendEvent",y,w])},$r.prototype.getVisitorId=function(y){var w,D=this.getConfiguration("visitorId")||null;if(D=D||Dr.get("browserId"),(w=y)&&w(D),y===void 0)return D},$r.prototype.setVisitorId=function(y){this.setConfiguration("visitorId",y);var w=new Date;w.setTime(w.getTime()+24*this.getConfiguration("storageLifetimeVisitor")*60*60*1e3),this._privacy.call("setItem",this.getConfiguration("storageVisitor"),y,w,function(){Dr.updateMigration()})},$r.prototype.setUser=function(y,w,D){this.user.setUser(y,w,D)},$r.prototype.getUser=function(y){this.user.getUser(y)},$r.prototype.deleteUser=function(){this.user.deleteUser()},($r.prototype.PA=$r).prototype.refresh=function(){this.getConfiguration("isManualPageRefresh")===null&&this.setConfiguration("isManualPageRefresh",!0),this.getConfiguration("isManualPageRefresh")&&Dr.refresh()},$r.prototype.setContentProperty=function(y,w){var D={};y==="content_publication_date"||y==="tags_array"?D[{content_publication_date:"createdAt",tags_array:"tags"}[y]]=w:D[y]=w,Dr.set("content",D)},$r.prototype.setContentProperties=function(y){for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&this.setContentProperty(w,y[w])},gr=new $r(v),window&&!window[gr.getConfiguration("globalVarName")]&&(window[gr.getConfiguration("globalVarName")]=gr),ta=gr,c.pianoAnalytics=ta,Object.defineProperty(c,"__esModule",{value:!0})})},4765:function(E){var f=String.prototype.replace,c=/%20/g,v={RFC1738:"RFC1738",RFC3986:"RFC3986"};E.exports={default:v.RFC3986,formatters:{RFC1738:function(I){return f.call(I,c,"+")},RFC3986:function(I){return String(I)}},RFC1738:v.RFC1738,RFC3986:v.RFC3986}},5373:function(E,f,c){var v=c(8636),I=c(2642),x=c(4765);E.exports={formats:x,parse:I,stringify:v}},2642:function(E,f,c){var v=c(7720),I=Object.prototype.hasOwnProperty,x=Array.isArray,C={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:v.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},j=function(M){return M.replace(/&#(\d+);/g,function(U,J){return String.fromCharCode(parseInt(J,10))})},z=function(M,U){return M&&typeof M=="string"&&U.comma&&M.indexOf(",")>-1?M.split(","):M},F="utf8=%26%2310003%3B",K="utf8=%E2%9C%93",N=function(U,J){var H={__proto__:null},Y=J.ignoreQueryPrefix?U.replace(/^\?/,""):U;Y=Y.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var ee=J.parameterLimit===1/0?void 0:J.parameterLimit,q=Y.split(J.delimiter,ee),se=-1,re,ue=J.charset;if(J.charsetSentinel)for(re=0;re<q.length;++re)q[re].indexOf("utf8=")===0&&(q[re]===K?ue="utf-8":q[re]===F&&(ue="iso-8859-1"),se=re,re=q.length);for(re=0;re<q.length;++re)if(re!==se){var xe=q[re],he=xe.indexOf("]="),G=he===-1?xe.indexOf("="):he+1,we,Ae;G===-1?(we=J.decoder(xe,C.decoder,ue,"key"),Ae=J.strictNullHandling?null:""):(we=J.decoder(xe.slice(0,G),C.decoder,ue,"key"),Ae=v.maybeMap(z(xe.slice(G+1),J),function(He){return J.decoder(He,C.decoder,ue,"value")})),Ae&&J.interpretNumericEntities&&ue==="iso-8859-1"&&(Ae=j(Ae)),xe.indexOf("[]=")>-1&&(Ae=x(Ae)?[Ae]:Ae);var Ie=I.call(H,we);Ie&&J.duplicates==="combine"?H[we]=v.combine(H[we],Ae):(!Ie||J.duplicates==="last")&&(H[we]=Ae)}return H},P=function(M,U,J,H){for(var Y=H?U:z(U,J),ee=M.length-1;ee>=0;--ee){var q,se=M[ee];if(se==="[]"&&J.parseArrays)q=J.allowEmptyArrays&&(Y===""||J.strictNullHandling&&Y===null)?[]:[].concat(Y);else{q=J.plainObjects?Object.create(null):{};var re=se.charAt(0)==="["&&se.charAt(se.length-1)==="]"?se.slice(1,-1):se,ue=J.decodeDotInKeys?re.replace(/%2E/g,"."):re,xe=parseInt(ue,10);!J.parseArrays&&ue===""?q={0:Y}:!isNaN(xe)&&se!==ue&&String(xe)===ue&&xe>=0&&J.parseArrays&&xe<=J.arrayLimit?(q=[],q[xe]=Y):ue!=="__proto__"&&(q[ue]=Y)}Y=q}return Y},$=function(U,J,H,Y){if(U){var ee=H.allowDots?U.replace(/\.([^.[]+)/g,"[$1]"):U,q=/(\[[^[\]]*])/,se=/(\[[^[\]]*])/g,re=H.depth>0&&q.exec(ee),ue=re?ee.slice(0,re.index):ee,xe=[];if(ue){if(!H.plainObjects&&I.call(Object.prototype,ue)&&!H.allowPrototypes)return;xe.push(ue)}for(var he=0;H.depth>0&&(re=se.exec(ee))!==null&&he<H.depth;){if(he+=1,!H.plainObjects&&I.call(Object.prototype,re[1].slice(1,-1))&&!H.allowPrototypes)return;xe.push(re[1])}if(re){if(H.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+H.depth+" and strictDepth is true");xe.push("["+ee.slice(re.index)+"]")}return P(xe,J,H,Y)}},d=function(U){if(!U)return C;if(typeof U.allowEmptyArrays<"u"&&typeof U.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof U.decodeDotInKeys<"u"&&typeof U.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(U.decoder!==null&&typeof U.decoder<"u"&&typeof U.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof U.charset<"u"&&U.charset!=="utf-8"&&U.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var J=typeof U.charset>"u"?C.charset:U.charset,H=typeof U.duplicates>"u"?C.duplicates:U.duplicates;if(H!=="combine"&&H!=="first"&&H!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var Y=typeof U.allowDots>"u"?U.decodeDotInKeys===!0?!0:C.allowDots:!!U.allowDots;return{allowDots:Y,allowEmptyArrays:typeof U.allowEmptyArrays=="boolean"?!!U.allowEmptyArrays:C.allowEmptyArrays,allowPrototypes:typeof U.allowPrototypes=="boolean"?U.allowPrototypes:C.allowPrototypes,allowSparse:typeof U.allowSparse=="boolean"?U.allowSparse:C.allowSparse,arrayLimit:typeof U.arrayLimit=="number"?U.arrayLimit:C.arrayLimit,charset:J,charsetSentinel:typeof U.charsetSentinel=="boolean"?U.charsetSentinel:C.charsetSentinel,comma:typeof U.comma=="boolean"?U.comma:C.comma,decodeDotInKeys:typeof U.decodeDotInKeys=="boolean"?U.decodeDotInKeys:C.decodeDotInKeys,decoder:typeof U.decoder=="function"?U.decoder:C.decoder,delimiter:typeof U.delimiter=="string"||v.isRegExp(U.delimiter)?U.delimiter:C.delimiter,depth:typeof U.depth=="number"||U.depth===!1?+U.depth:C.depth,duplicates:H,ignoreQueryPrefix:U.ignoreQueryPrefix===!0,interpretNumericEntities:typeof U.interpretNumericEntities=="boolean"?U.interpretNumericEntities:C.interpretNumericEntities,parameterLimit:typeof U.parameterLimit=="number"?U.parameterLimit:C.parameterLimit,parseArrays:U.parseArrays!==!1,plainObjects:typeof U.plainObjects=="boolean"?U.plainObjects:C.plainObjects,strictDepth:typeof U.strictDepth=="boolean"?!!U.strictDepth:C.strictDepth,strictNullHandling:typeof U.strictNullHandling=="boolean"?U.strictNullHandling:C.strictNullHandling}};E.exports=function(M,U){var J=d(U);if(M===""||M===null||typeof M>"u")return J.plainObjects?Object.create(null):{};for(var H=typeof M=="string"?N(M,J):M,Y=J.plainObjects?Object.create(null):{},ee=Object.keys(H),q=0;q<ee.length;++q){var se=ee[q],re=$(se,H[se],J,typeof M=="string");Y=v.merge(Y,re,J)}return J.allowSparse===!0?Y:v.compact(Y)}},8636:function(E,f,c){var v=c(920),I=c(7720),x=c(4765),C=Object.prototype.hasOwnProperty,j={brackets:function(Y){return Y+"[]"},comma:"comma",indices:function(Y,ee){return Y+"["+ee+"]"},repeat:function(Y){return Y}},z=Array.isArray,F=Array.prototype.push,K=function(H,Y){F.apply(H,z(Y)?Y:[Y])},N=Date.prototype.toISOString,P=x.default,$={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:I.encode,encodeValuesOnly:!1,format:P,formatter:x.formatters[P],indices:!1,serializeDate:function(Y){return N.call(Y)},skipNulls:!1,strictNullHandling:!1},d=function(Y){return typeof Y=="string"||typeof Y=="number"||typeof Y=="boolean"||typeof Y=="symbol"||typeof Y=="bigint"},M={},U=function H(Y,ee,q,se,re,ue,xe,he,G,we,Ae,Ie,He,nt,Xe,it,ht,be){for(var Qe=Y,st=be,Xt=0,Gt=!1;(st=st.get(M))!==void 0&&!Gt;){var gn=st.get(Y);if(Xt+=1,typeof gn<"u"){if(gn===Xt)throw new RangeError("Cyclic object value");Gt=!0}typeof st.get(M)>"u"&&(Xt=0)}if(typeof we=="function"?Qe=we(ee,Qe):Qe instanceof Date?Qe=He(Qe):q==="comma"&&z(Qe)&&(Qe=I.maybeMap(Qe,function(Et){return Et instanceof Date?He(Et):Et})),Qe===null){if(ue)return G&&!it?G(ee,$.encoder,ht,"key",nt):ee;Qe=""}if(d(Qe)||I.isBuffer(Qe)){if(G){var ut=it?ee:G(ee,$.encoder,ht,"key",nt);return[Xe(ut)+"="+Xe(G(Qe,$.encoder,ht,"value",nt))]}return[Xe(ee)+"="+Xe(String(Qe))]}var In=[];if(typeof Qe>"u")return In;var Fn;if(q==="comma"&&z(Qe))it&&G&&(Qe=I.maybeMap(Qe,G)),Fn=[{value:Qe.length>0?Qe.join(",")||null:void 0}];else if(z(we))Fn=we;else{var hr=Object.keys(Qe);Fn=Ae?hr.sort(Ae):hr}var wr=he?ee.replace(/\./g,"%2E"):ee,pr=se&&z(Qe)&&Qe.length===1?wr+"[]":wr;if(re&&z(Qe)&&Qe.length===0)return pr+"[]";for(var Kn=0;Kn<Fn.length;++Kn){var $t=Fn[Kn],Sn=typeof $t=="object"&&typeof $t.value<"u"?$t.value:Qe[$t];if(!(xe&&Sn===null)){var bn=Ie&&he?$t.replace(/\./g,"%2E"):$t,Ye=z(Qe)?typeof q=="function"?q(pr,bn):pr:pr+(Ie?"."+bn:"["+bn+"]");be.set(Y,Xt);var Tt=v();Tt.set(M,be),K(In,H(Sn,Ye,q,se,re,ue,xe,he,q==="comma"&&it&&z(Qe)?null:G,we,Ae,Ie,He,nt,Xe,it,ht,Tt))}}return In},J=function(Y){if(!Y)return $;if(typeof Y.allowEmptyArrays<"u"&&typeof Y.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof Y.encodeDotInKeys<"u"&&typeof Y.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(Y.encoder!==null&&typeof Y.encoder<"u"&&typeof Y.encoder!="function")throw new TypeError("Encoder has to be a function.");var ee=Y.charset||$.charset;if(typeof Y.charset<"u"&&Y.charset!=="utf-8"&&Y.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var q=x.default;if(typeof Y.format<"u"){if(!C.call(x.formatters,Y.format))throw new TypeError("Unknown format option provided.");q=Y.format}var se=x.formatters[q],re=$.filter;(typeof Y.filter=="function"||z(Y.filter))&&(re=Y.filter);var ue;if(Y.arrayFormat in j?ue=Y.arrayFormat:"indices"in Y?ue=Y.indices?"indices":"repeat":ue=$.arrayFormat,"commaRoundTrip"in Y&&typeof Y.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var xe=typeof Y.allowDots>"u"?Y.encodeDotInKeys===!0?!0:$.allowDots:!!Y.allowDots;return{addQueryPrefix:typeof Y.addQueryPrefix=="boolean"?Y.addQueryPrefix:$.addQueryPrefix,allowDots:xe,allowEmptyArrays:typeof Y.allowEmptyArrays=="boolean"?!!Y.allowEmptyArrays:$.allowEmptyArrays,arrayFormat:ue,charset:ee,charsetSentinel:typeof Y.charsetSentinel=="boolean"?Y.charsetSentinel:$.charsetSentinel,commaRoundTrip:Y.commaRoundTrip,delimiter:typeof Y.delimiter>"u"?$.delimiter:Y.delimiter,encode:typeof Y.encode=="boolean"?Y.encode:$.encode,encodeDotInKeys:typeof Y.encodeDotInKeys=="boolean"?Y.encodeDotInKeys:$.encodeDotInKeys,encoder:typeof Y.encoder=="function"?Y.encoder:$.encoder,encodeValuesOnly:typeof Y.encodeValuesOnly=="boolean"?Y.encodeValuesOnly:$.encodeValuesOnly,filter:re,format:q,formatter:se,serializeDate:typeof Y.serializeDate=="function"?Y.serializeDate:$.serializeDate,skipNulls:typeof Y.skipNulls=="boolean"?Y.skipNulls:$.skipNulls,sort:typeof Y.sort=="function"?Y.sort:null,strictNullHandling:typeof Y.strictNullHandling=="boolean"?Y.strictNullHandling:$.strictNullHandling}};E.exports=function(H,Y){var ee=H,q=J(Y),se,re;typeof q.filter=="function"?(re=q.filter,ee=re("",ee)):z(q.filter)&&(re=q.filter,se=re);var ue=[];if(typeof ee!="object"||ee===null)return"";var xe=j[q.arrayFormat],he=xe==="comma"&&q.commaRoundTrip;se||(se=Object.keys(ee)),q.sort&&se.sort(q.sort);for(var G=v(),we=0;we<se.length;++we){var Ae=se[we];q.skipNulls&&ee[Ae]===null||K(ue,U(ee[Ae],Ae,xe,he,q.allowEmptyArrays,q.strictNullHandling,q.skipNulls,q.encodeDotInKeys,q.encode?q.encoder:null,q.filter,q.sort,q.allowDots,q.serializeDate,q.format,q.formatter,q.encodeValuesOnly,q.charset,G))}var Ie=ue.join(q.delimiter),He=q.addQueryPrefix===!0?"?":"";return q.charsetSentinel&&(q.charset==="iso-8859-1"?He+="utf8=%26%2310003%3B&":He+="utf8=%E2%9C%93&"),Ie.length>0?He+Ie:""}},7720:function(E,f,c){var v=c(4765),I=Object.prototype.hasOwnProperty,x=Array.isArray,C=function(){for(var Y=[],ee=0;ee<256;++ee)Y.push("%"+((ee<16?"0":"")+ee.toString(16)).toUpperCase());return Y}(),j=function(ee){for(;ee.length>1;){var q=ee.pop(),se=q.obj[q.prop];if(x(se)){for(var re=[],ue=0;ue<se.length;++ue)typeof se[ue]<"u"&&re.push(se[ue]);q.obj[q.prop]=re}}},z=function(ee,q){for(var se=q&&q.plainObjects?Object.create(null):{},re=0;re<ee.length;++re)typeof ee[re]<"u"&&(se[re]=ee[re]);return se},F=function Y(ee,q,se){if(!q)return ee;if(typeof q!="object"){if(x(ee))ee.push(q);else if(ee&&typeof ee=="object")(se&&(se.plainObjects||se.allowPrototypes)||!I.call(Object.prototype,q))&&(ee[q]=!0);else return[ee,q];return ee}if(!ee||typeof ee!="object")return[ee].concat(q);var re=ee;return x(ee)&&!x(q)&&(re=z(ee,se)),x(ee)&&x(q)?(q.forEach(function(ue,xe){if(I.call(ee,xe)){var he=ee[xe];he&&typeof he=="object"&&ue&&typeof ue=="object"?ee[xe]=Y(he,ue,se):ee.push(ue)}else ee[xe]=ue}),ee):Object.keys(q).reduce(function(ue,xe){var he=q[xe];return I.call(ue,xe)?ue[xe]=Y(ue[xe],he,se):ue[xe]=he,ue},re)},K=function(ee,q){return Object.keys(q).reduce(function(se,re){return se[re]=q[re],se},ee)},N=function(Y,ee,q){var se=Y.replace(/\+/g," ");if(q==="iso-8859-1")return se.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(se)}catch{return se}},P=1024,$=function(ee,q,se,re,ue){if(ee.length===0)return ee;var xe=ee;if(typeof ee=="symbol"?xe=Symbol.prototype.toString.call(ee):typeof ee!="string"&&(xe=String(ee)),se==="iso-8859-1")return escape(xe).replace(/%u[0-9a-f]{4}/gi,function(nt){return"%26%23"+parseInt(nt.slice(2),16)+"%3B"});for(var he="",G=0;G<xe.length;G+=P){for(var we=xe.length>=P?xe.slice(G,G+P):xe,Ae=[],Ie=0;Ie<we.length;++Ie){var He=we.charCodeAt(Ie);if(He===45||He===46||He===95||He===126||He>=48&&He<=57||He>=65&&He<=90||He>=97&&He<=122||ue===v.RFC1738&&(He===40||He===41)){Ae[Ae.length]=we.charAt(Ie);continue}if(He<128){Ae[Ae.length]=C[He];continue}if(He<2048){Ae[Ae.length]=C[192|He>>6]+C[128|He&63];continue}if(He<55296||He>=57344){Ae[Ae.length]=C[224|He>>12]+C[128|He>>6&63]+C[128|He&63];continue}Ie+=1,He=65536+((He&1023)<<10|we.charCodeAt(Ie)&1023),Ae[Ae.length]=C[240|He>>18]+C[128|He>>12&63]+C[128|He>>6&63]+C[128|He&63]}he+=Ae.join("")}return he},d=function(ee){for(var q=[{obj:{o:ee},prop:"o"}],se=[],re=0;re<q.length;++re)for(var ue=q[re],xe=ue.obj[ue.prop],he=Object.keys(xe),G=0;G<he.length;++G){var we=he[G],Ae=xe[we];typeof Ae=="object"&&Ae!==null&&se.indexOf(Ae)===-1&&(q.push({obj:xe,prop:we}),se.push(Ae))}return j(q),ee},M=function(ee){return Object.prototype.toString.call(ee)==="[object RegExp]"},U=function(ee){return!ee||typeof ee!="object"?!1:!!(ee.constructor&&ee.constructor.isBuffer&&ee.constructor.isBuffer(ee))},J=function(ee,q){return[].concat(ee,q)},H=function(ee,q){if(x(ee)){for(var se=[],re=0;re<ee.length;re+=1)se.push(q(ee[re]));return se}return q(ee)};E.exports={arrayToObject:z,assign:K,combine:J,compact:d,decode:N,encode:$,isBuffer:U,isRegExp:M,maybeMap:H,merge:F}},4803:function(E,f,c){var v=c(8859),I=c(9675),x=function(K,N,P){for(var $=K,d;(d=$.next)!=null;$=d)if(d.key===N)return $.next=d.next,P||(d.next=K.next,K.next=d),d},C=function(K,N){if(K){var P=x(K,N);return P&&P.value}},j=function(K,N,P){var $=x(K,N);$?$.value=P:K.next={key:N,next:K.next,value:P}},z=function(K,N){return K?!!x(K,N):!1},F=function(K,N){if(K)return x(K,N,!0)};E.exports=function(){var N,P={assert:function($){if(!P.has($))throw new I("Side channel does not contain "+v($))},delete:function($){var d=N&&N.next,M=F(N,$);return M&&d&&d===M&&(N=void 0),!!M},get:function($){return C(N,$)},has:function($){return z(N,$)},set:function($,d){N||(N={next:void 0}),j(N,$,d)}};return P}},507:function(E,f,c){var v=c(453),I=c(6556),x=c(8859),C=c(9675),j=v("%Map%",!0),z=I("Map.prototype.get",!0),F=I("Map.prototype.set",!0),K=I("Map.prototype.has",!0),N=I("Map.prototype.delete",!0),P=I("Map.prototype.size",!0);E.exports=!!j&&function(){var d,M={assert:function(U){if(!M.has(U))throw new C("Side channel does not contain "+x(U))},delete:function(U){if(d){var J=N(d,U);return P(d)===0&&(d=void 0),J}return!1},get:function(U){if(d)return z(d,U)},has:function(U){return d?K(d,U):!1},set:function(U,J){d||(d=new j),F(d,U,J)}};return M}},2271:function(E,f,c){var v=c(453),I=c(6556),x=c(8859),C=c(507),j=c(9675),z=v("%WeakMap%",!0),F=I("WeakMap.prototype.get",!0),K=I("WeakMap.prototype.set",!0),N=I("WeakMap.prototype.has",!0),P=I("WeakMap.prototype.delete",!0);E.exports=z?function(){var d,M,U={assert:function(J){if(!U.has(J))throw new j("Side channel does not contain "+x(J))},delete:function(J){if(z&&J&&(typeof J=="object"||typeof J=="function")){if(d)return P(d,J)}else if(C&&M)return M.delete(J);return!1},get:function(J){return z&&J&&(typeof J=="object"||typeof J=="function")&&d?F(d,J):M&&M.get(J)},has:function(J){return z&&J&&(typeof J=="object"||typeof J=="function")&&d?N(d,J):!!M&&M.has(J)},set:function(J,H){z&&J&&(typeof J=="object"||typeof J=="function")?(d||(d=new z),K(d,J,H)):C&&(M||(M=C()),M.set(J,H))}};return U}:C},920:function(E,f,c){var v=c(9675),I=c(8859),x=c(4803),C=c(507),j=c(2271),z=j||C||x;E.exports=function(){var K,N={assert:function(P){if(!N.has(P))throw new v("Side channel does not contain "+I(P))},delete:function(P){return!!K&&K.delete(P)},get:function(P){return K&&K.get(P)},has:function(P){return!!K&&K.has(P)},set:function(P,$){K||(K=z()),K.set(P,$)}};return N}},9134:function(E,f,c){E.exports={h32:c(2492),h64:c(7470)}},2492:function(E,f,c){var v=c(7898).UINT32;v.prototype.xxh_update=function(P,$){var d=x._low,M=x._high,U,J;J=P*d,U=J>>>16,U+=$*d,U&=65535,U+=P*M;var H=this._low+(J&65535),Y=H>>>16;Y+=this._high+(U&65535);var ee=Y<<16|H&65535;ee=ee<<13|ee>>>19,H=ee&65535,Y=ee>>>16,d=I._low,M=I._high,J=H*d,U=J>>>16,U+=Y*d,U&=65535,U+=H*M,this._low=J&65535,this._high=U&65535};var I=v("2654435761"),x=v("2246822519"),C=v("3266489917"),j=v("668265263"),z=v("374761393");function F(P){for(var $=[],d=0,M=P.length;d<M;d++){var U=P.charCodeAt(d);U<128?$.push(U):U<2048?$.push(192|U>>6,128|U&63):U<55296||U>=57344?$.push(224|U>>12,128|U>>6&63,128|U&63):(d++,U=65536+((U&1023)<<10|P.charCodeAt(d)&1023),$.push(240|U>>18,128|U>>12&63,128|U>>6&63,128|U&63))}return new Uint8Array($)}function K(){if(arguments.length==2)return new K(arguments[1]).update(arguments[0]).digest();if(!(this instanceof K))return new K(arguments[0]);N.call(this,arguments[0])}function N(P){return this.seed=P instanceof v?P.clone():v(P),this.v1=this.seed.clone().add(I).add(x),this.v2=this.seed.clone().add(x),this.v3=this.seed.clone(),this.v4=this.seed.clone().subtract(I),this.total_len=0,this.memsize=0,this.memory=null,this}K.prototype.init=N,K.prototype.update=function(P){var $=typeof P=="string",d;$&&(P=F(P),$=!1,d=!0),typeof ArrayBuffer<"u"&&P instanceof ArrayBuffer&&(d=!0,P=new Uint8Array(P));var M=0,U=P.length,J=M+U;if(U==0)return this;if(this.total_len+=U,this.memsize==0&&($?this.memory="":d?this.memory=new Uint8Array(16):this.memory=new Buffer(16)),this.memsize+U<16)return $?this.memory+=P:d?this.memory.set(P.subarray(0,U),this.memsize):P.copy(this.memory,this.memsize,0,U),this.memsize+=U,this;if(this.memsize>0){$?this.memory+=P.slice(0,16-this.memsize):d?this.memory.set(P.subarray(0,16-this.memsize),this.memsize):P.copy(this.memory,this.memsize,0,16-this.memsize);var H=0;$?(this.v1.xxh_update(this.memory.charCodeAt(H+1)<<8|this.memory.charCodeAt(H),this.memory.charCodeAt(H+3)<<8|this.memory.charCodeAt(H+2)),H+=4,this.v2.xxh_update(this.memory.charCodeAt(H+1)<<8|this.memory.charCodeAt(H),this.memory.charCodeAt(H+3)<<8|this.memory.charCodeAt(H+2)),H+=4,this.v3.xxh_update(this.memory.charCodeAt(H+1)<<8|this.memory.charCodeAt(H),this.memory.charCodeAt(H+3)<<8|this.memory.charCodeAt(H+2)),H+=4,this.v4.xxh_update(this.memory.charCodeAt(H+1)<<8|this.memory.charCodeAt(H),this.memory.charCodeAt(H+3)<<8|this.memory.charCodeAt(H+2))):(this.v1.xxh_update(this.memory[H+1]<<8|this.memory[H],this.memory[H+3]<<8|this.memory[H+2]),H+=4,this.v2.xxh_update(this.memory[H+1]<<8|this.memory[H],this.memory[H+3]<<8|this.memory[H+2]),H+=4,this.v3.xxh_update(this.memory[H+1]<<8|this.memory[H],this.memory[H+3]<<8|this.memory[H+2]),H+=4,this.v4.xxh_update(this.memory[H+1]<<8|this.memory[H],this.memory[H+3]<<8|this.memory[H+2])),M+=16-this.memsize,this.memsize=0,$&&(this.memory="")}if(M<=J-16){var Y=J-16;do $?(this.v1.xxh_update(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2)),M+=4,this.v2.xxh_update(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2)),M+=4,this.v3.xxh_update(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2)),M+=4,this.v4.xxh_update(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2))):(this.v1.xxh_update(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2]),M+=4,this.v2.xxh_update(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2]),M+=4,this.v3.xxh_update(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2]),M+=4,this.v4.xxh_update(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2])),M+=4;while(M<=Y)}return M<J&&($?this.memory+=P.slice(M):d?this.memory.set(P.subarray(M,J),this.memsize):P.copy(this.memory,this.memsize,M,J),this.memsize=J-M),this},K.prototype.digest=function(){var P=this.memory,$=typeof P=="string",d=0,M=this.memsize,U,J,H=new v;for(this.total_len>=16?U=this.v1.rotl(1).add(this.v2.rotl(7).add(this.v3.rotl(12).add(this.v4.rotl(18)))):U=this.seed.clone().add(z),U.add(H.fromNumber(this.total_len));d<=M-4;)$?H.fromBits(P.charCodeAt(d+1)<<8|P.charCodeAt(d),P.charCodeAt(d+3)<<8|P.charCodeAt(d+2)):H.fromBits(P[d+1]<<8|P[d],P[d+3]<<8|P[d+2]),U.add(H.multiply(C)).rotl(17).multiply(j),d+=4;for(;d<M;)H.fromBits($?P.charCodeAt(d++):P[d++],0),U.add(H.multiply(z)).rotl(11).multiply(I);return J=U.clone().shiftRight(15),U.xor(J).multiply(x),J=U.clone().shiftRight(13),U.xor(J).multiply(C),J=U.clone().shiftRight(16),U.xor(J),this.init(this.seed),U},E.exports=K},7470:function(E,f,c){var v=c(7898).UINT64,I=v("11400714785074694791"),x=v("14029467366897019727"),C=v("1609587929392839161"),j=v("9650029242287828579"),z=v("2870177450012600261");function F(P){for(var $=[],d=0,M=P.length;d<M;d++){var U=P.charCodeAt(d);U<128?$.push(U):U<2048?$.push(192|U>>6,128|U&63):U<55296||U>=57344?$.push(224|U>>12,128|U>>6&63,128|U&63):(d++,U=65536+((U&1023)<<10|P.charCodeAt(d)&1023),$.push(240|U>>18,128|U>>12&63,128|U>>6&63,128|U&63))}return new Uint8Array($)}function K(){if(arguments.length==2)return new K(arguments[1]).update(arguments[0]).digest();if(!(this instanceof K))return new K(arguments[0]);N.call(this,arguments[0])}function N(P){return this.seed=P instanceof v?P.clone():v(P),this.v1=this.seed.clone().add(I).add(x),this.v2=this.seed.clone().add(x),this.v3=this.seed.clone(),this.v4=this.seed.clone().subtract(I),this.total_len=0,this.memsize=0,this.memory=null,this}K.prototype.init=N,K.prototype.update=function(P){var $=typeof P=="string",d;$&&(P=F(P),$=!1,d=!0),typeof ArrayBuffer<"u"&&P instanceof ArrayBuffer&&(d=!0,P=new Uint8Array(P));var M=0,U=P.length,J=M+U;if(U==0)return this;if(this.total_len+=U,this.memsize==0&&($?this.memory="":d?this.memory=new Uint8Array(32):this.memory=new Buffer(32)),this.memsize+U<32)return $?this.memory+=P:d?this.memory.set(P.subarray(0,U),this.memsize):P.copy(this.memory,this.memsize,0,U),this.memsize+=U,this;if(this.memsize>0){$?this.memory+=P.slice(0,32-this.memsize):d?this.memory.set(P.subarray(0,32-this.memsize),this.memsize):P.copy(this.memory,this.memsize,0,32-this.memsize);var H=0;if($){var Y;Y=v(this.memory.charCodeAt(H+1)<<8|this.memory.charCodeAt(H),this.memory.charCodeAt(H+3)<<8|this.memory.charCodeAt(H+2),this.memory.charCodeAt(H+5)<<8|this.memory.charCodeAt(H+4),this.memory.charCodeAt(H+7)<<8|this.memory.charCodeAt(H+6)),this.v1.add(Y.multiply(x)).rotl(31).multiply(I),H+=8,Y=v(this.memory.charCodeAt(H+1)<<8|this.memory.charCodeAt(H),this.memory.charCodeAt(H+3)<<8|this.memory.charCodeAt(H+2),this.memory.charCodeAt(H+5)<<8|this.memory.charCodeAt(H+4),this.memory.charCodeAt(H+7)<<8|this.memory.charCodeAt(H+6)),this.v2.add(Y.multiply(x)).rotl(31).multiply(I),H+=8,Y=v(this.memory.charCodeAt(H+1)<<8|this.memory.charCodeAt(H),this.memory.charCodeAt(H+3)<<8|this.memory.charCodeAt(H+2),this.memory.charCodeAt(H+5)<<8|this.memory.charCodeAt(H+4),this.memory.charCodeAt(H+7)<<8|this.memory.charCodeAt(H+6)),this.v3.add(Y.multiply(x)).rotl(31).multiply(I),H+=8,Y=v(this.memory.charCodeAt(H+1)<<8|this.memory.charCodeAt(H),this.memory.charCodeAt(H+3)<<8|this.memory.charCodeAt(H+2),this.memory.charCodeAt(H+5)<<8|this.memory.charCodeAt(H+4),this.memory.charCodeAt(H+7)<<8|this.memory.charCodeAt(H+6)),this.v4.add(Y.multiply(x)).rotl(31).multiply(I)}else{var Y;Y=v(this.memory[H+1]<<8|this.memory[H],this.memory[H+3]<<8|this.memory[H+2],this.memory[H+5]<<8|this.memory[H+4],this.memory[H+7]<<8|this.memory[H+6]),this.v1.add(Y.multiply(x)).rotl(31).multiply(I),H+=8,Y=v(this.memory[H+1]<<8|this.memory[H],this.memory[H+3]<<8|this.memory[H+2],this.memory[H+5]<<8|this.memory[H+4],this.memory[H+7]<<8|this.memory[H+6]),this.v2.add(Y.multiply(x)).rotl(31).multiply(I),H+=8,Y=v(this.memory[H+1]<<8|this.memory[H],this.memory[H+3]<<8|this.memory[H+2],this.memory[H+5]<<8|this.memory[H+4],this.memory[H+7]<<8|this.memory[H+6]),this.v3.add(Y.multiply(x)).rotl(31).multiply(I),H+=8,Y=v(this.memory[H+1]<<8|this.memory[H],this.memory[H+3]<<8|this.memory[H+2],this.memory[H+5]<<8|this.memory[H+4],this.memory[H+7]<<8|this.memory[H+6]),this.v4.add(Y.multiply(x)).rotl(31).multiply(I)}M+=32-this.memsize,this.memsize=0,$&&(this.memory="")}if(M<=J-32){var ee=J-32;do{if($){var Y;Y=v(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2),P.charCodeAt(M+5)<<8|P.charCodeAt(M+4),P.charCodeAt(M+7)<<8|P.charCodeAt(M+6)),this.v1.add(Y.multiply(x)).rotl(31).multiply(I),M+=8,Y=v(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2),P.charCodeAt(M+5)<<8|P.charCodeAt(M+4),P.charCodeAt(M+7)<<8|P.charCodeAt(M+6)),this.v2.add(Y.multiply(x)).rotl(31).multiply(I),M+=8,Y=v(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2),P.charCodeAt(M+5)<<8|P.charCodeAt(M+4),P.charCodeAt(M+7)<<8|P.charCodeAt(M+6)),this.v3.add(Y.multiply(x)).rotl(31).multiply(I),M+=8,Y=v(P.charCodeAt(M+1)<<8|P.charCodeAt(M),P.charCodeAt(M+3)<<8|P.charCodeAt(M+2),P.charCodeAt(M+5)<<8|P.charCodeAt(M+4),P.charCodeAt(M+7)<<8|P.charCodeAt(M+6)),this.v4.add(Y.multiply(x)).rotl(31).multiply(I)}else{var Y;Y=v(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2],P[M+5]<<8|P[M+4],P[M+7]<<8|P[M+6]),this.v1.add(Y.multiply(x)).rotl(31).multiply(I),M+=8,Y=v(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2],P[M+5]<<8|P[M+4],P[M+7]<<8|P[M+6]),this.v2.add(Y.multiply(x)).rotl(31).multiply(I),M+=8,Y=v(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2],P[M+5]<<8|P[M+4],P[M+7]<<8|P[M+6]),this.v3.add(Y.multiply(x)).rotl(31).multiply(I),M+=8,Y=v(P[M+1]<<8|P[M],P[M+3]<<8|P[M+2],P[M+5]<<8|P[M+4],P[M+7]<<8|P[M+6]),this.v4.add(Y.multiply(x)).rotl(31).multiply(I)}M+=8}while(M<=ee)}return M<J&&($?this.memory+=P.slice(M):d?this.memory.set(P.subarray(M,J),this.memsize):P.copy(this.memory,this.memsize,M,J),this.memsize=J-M),this},K.prototype.digest=function(){var P=this.memory,$=typeof P=="string",d=0,M=this.memsize,U,J,H=new v;for(this.total_len>=32?(U=this.v1.clone().rotl(1),U.add(this.v2.clone().rotl(7)),U.add(this.v3.clone().rotl(12)),U.add(this.v4.clone().rotl(18)),U.xor(this.v1.multiply(x).rotl(31).multiply(I)),U.multiply(I).add(j),U.xor(this.v2.multiply(x).rotl(31).multiply(I)),U.multiply(I).add(j),U.xor(this.v3.multiply(x).rotl(31).multiply(I)),U.multiply(I).add(j),U.xor(this.v4.multiply(x).rotl(31).multiply(I)),U.multiply(I).add(j)):U=this.seed.clone().add(z),U.add(H.fromNumber(this.total_len));d<=M-8;)$?H.fromBits(P.charCodeAt(d+1)<<8|P.charCodeAt(d),P.charCodeAt(d+3)<<8|P.charCodeAt(d+2),P.charCodeAt(d+5)<<8|P.charCodeAt(d+4),P.charCodeAt(d+7)<<8|P.charCodeAt(d+6)):H.fromBits(P[d+1]<<8|P[d],P[d+3]<<8|P[d+2],P[d+5]<<8|P[d+4],P[d+7]<<8|P[d+6]),H.multiply(x).rotl(31).multiply(I),U.xor(H).rotl(27).multiply(I).add(j),d+=8;for(d+4<=M&&($?H.fromBits(P.charCodeAt(d+1)<<8|P.charCodeAt(d),P.charCodeAt(d+3)<<8|P.charCodeAt(d+2),0,0):H.fromBits(P[d+1]<<8|P[d],P[d+3]<<8|P[d+2],0,0),U.xor(H.multiply(I)).rotl(23).multiply(x).add(C),d+=4);d<M;)H.fromBits($?P.charCodeAt(d++):P[d++],0,0,0),U.xor(H.multiply(z)).rotl(11).multiply(I);return J=U.clone().shiftRight(33),U.xor(J).multiply(x),J=U.clone().shiftRight(29),U.xor(J).multiply(C),J=U.clone().shiftRight(32),U.xor(J),this.init(this.seed),U},E.exports=K},2634:function(){},5172:function(E){function f(c,v){this.v=c,this.k=v}E.exports=f,E.exports.__esModule=!0,E.exports.default=E.exports},6993:function(E,f,c){var v=c(5546);function I(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var x,C,j=typeof Symbol=="function"?Symbol:{},z=j.iterator||"@@iterator",F=j.toStringTag||"@@toStringTag";function K(H,Y,ee,q){var se=Y&&Y.prototype instanceof P?Y:P,re=Object.create(se.prototype);return v(re,"_invoke",function(ue,xe,he){var G,we,Ae,Ie=0,He=he||[],nt=!1,Xe={p:0,n:0,v:x,a:it,f:it.bind(x,4),d:function(be,Qe){return G=be,we=0,Ae=x,Xe.n=Qe,N}};function it(ht,be){for(we=ht,Ae=be,C=0;!nt&&Ie&&!Qe&&C<He.length;C++){var Qe,st=He[C],Xt=Xe.p,Gt=st[2];ht>3?(Qe=Gt===be)&&(we=st[4]||3,Ae=st[5]===x?st[3]:st[5],st[4]=3,st[5]=x):st[0]<=Xt&&((Qe=ht<2&&Xt<st[1])?(we=0,Xe.v=be,Xe.n=st[1]):Xt<Gt&&(Qe=ht<3||st[0]>be||be>Gt)&&(st[4]=ht,st[5]=be,Xe.n=Gt,we=0))}if(Qe||ht>1)return N;throw nt=!0,be}return function(ht,be,Qe){if(Ie>1)throw TypeError("Generator is already running");for(nt&&be===1&&it(be,Qe),we=be,Ae=Qe;(C=we<2?x:Ae)||!nt;){G||(we?we<3?(we>1&&(Xe.n=-1),it(we,Ae)):Xe.n=Ae:Xe.v=Ae);try{if(Ie=2,G){if(we||(ht="next"),C=G[ht]){if(!(C=C.call(G,Ae)))throw TypeError("iterator result is not an object");if(!C.done)return C;Ae=C.value,we<2&&(we=0)}else we===1&&(C=G.return)&&C.call(G),we<2&&(Ae=TypeError("The iterator does not provide a '"+ht+"' method"),we=1);G=x}else if((C=(nt=Xe.n<0)?Ae:ue.call(xe,Xe))!==N)break}catch(st){G=x,we=1,Ae=st}finally{Ie=1}}return{value:C,done:nt}}}(H,ee,q),!0),re}var N={};function P(){}function $(){}function d(){}C=Object.getPrototypeOf;var M=[][z]?C(C([][z]())):(v(C={},z,function(){return this}),C),U=d.prototype=P.prototype=Object.create(M);function J(H){return Object.setPrototypeOf?Object.setPrototypeOf(H,d):(H.__proto__=d,v(H,F,"GeneratorFunction")),H.prototype=Object.create(U),H}return $.prototype=d,v(U,"constructor",d),v(d,"constructor",$),$.displayName="GeneratorFunction",v(d,F,"GeneratorFunction"),v(U),v(U,F,"Generator"),v(U,z,function(){return this}),v(U,"toString",function(){return"[object Generator]"}),(E.exports=I=function(){return{w:K,m:J}},E.exports.__esModule=!0,E.exports.default=E.exports)()}E.exports=I,E.exports.__esModule=!0,E.exports.default=E.exports},5869:function(E,f,c){var v=c(887);function I(x,C,j,z,F){var K=v(x,C,j,z,F);return K.next().then(function(N){return N.done?N.value:K.next()})}E.exports=I,E.exports.__esModule=!0,E.exports.default=E.exports},887:function(E,f,c){var v=c(6993),I=c(1791);function x(C,j,z,F,K){return new I(v().w(C,j,z,F),K||Promise)}E.exports=x,E.exports.__esModule=!0,E.exports.default=E.exports},1791:function(E,f,c){var v=c(5172),I=c(5546);function x(C,j){function z(K,N,P,$){try{var d=C[K](N),M=d.value;return M instanceof v?j.resolve(M.v).then(function(U){z("next",U,P,$)},function(U){z("throw",U,P,$)}):j.resolve(M).then(function(U){d.value=U,P(d)},function(U){return z("throw",U,P,$)})}catch(U){$(U)}}var F;this.next||(I(x.prototype),I(x.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),I(this,"_invoke",function(K,N,P){function $(){return new j(function(d,M){z(K,P,d,M)})}return F=F?F.then($,$):$()},!0)}E.exports=x,E.exports.__esModule=!0,E.exports.default=E.exports},5546:function(E){function f(c,v,I,x){var C=Object.defineProperty;try{C({},"",{})}catch{C=0}E.exports=f=function(z,F,K,N){if(F)C?C(z,F,{value:K,enumerable:!N,configurable:!N,writable:!N}):z[F]=K;else{var P=function(d,M){f(z,d,function(U){return this._invoke(d,M,U)})};P("next",0),P("throw",1),P("return",2)}},E.exports.__esModule=!0,E.exports.default=E.exports,f(c,v,I,x)}E.exports=f,E.exports.__esModule=!0,E.exports.default=E.exports},4373:function(E){function f(c){var v=Object(c),I=[];for(var x in v)I.unshift(x);return function C(){for(;I.length;)if((x=I.pop())in v)return C.value=x,C.done=!1,C;return C.done=!0,C}}E.exports=f,E.exports.__esModule=!0,E.exports.default=E.exports},4633:function(E,f,c){var v=c(5172),I=c(6993),x=c(5869),C=c(887),j=c(1791),z=c(4373),F=c(579);function K(){var N=I(),P=N.m(K),$=(Object.getPrototypeOf?Object.getPrototypeOf(P):P.__proto__).constructor;function d(J){var H=typeof J=="function"&&J.constructor;return!!H&&(H===$||(H.displayName||H.name)==="GeneratorFunction")}var M={throw:1,return:2,break:3,continue:3};function U(J){var H,Y;return function(ee){H||(H={stop:function(){return Y(ee.a,2)},catch:function(){return ee.v},abrupt:function(se,re){return Y(ee.a,M[se],re)},delegateYield:function(se,re,ue){return H.resultName=re,Y(ee.d,F(se),ue)},finish:function(se){return Y(ee.f,se)}},Y=function(se,re,ue){ee.p=H.prev,ee.n=H.next;try{return se(re,ue)}finally{H.next=ee.n}}),H.resultName&&(H[H.resultName]=ee.v,H.resultName=void 0),H.sent=ee.v,H.next=ee.n;try{return J.call(this,H)}finally{ee.p=H.prev,ee.n=H.next}}}return(E.exports=K=function(){return{wrap:function(Y,ee,q,se){return N.w(U(Y),ee,q,se&&se.reverse())},isGeneratorFunction:d,mark:N.m,awrap:function(Y,ee){return new v(Y,ee)},AsyncIterator:j,async:function(Y,ee,q,se,re){return(d(ee)?C:x)(U(Y),ee,q,se,re)},keys:z,values:F}},E.exports.__esModule=!0,E.exports.default=E.exports)()}E.exports=K,E.exports.__esModule=!0,E.exports.default=E.exports},579:function(E,f,c){var v=c(3738).default;function I(x){if(x!=null){var C=x[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],j=0;if(C)return C.call(x);if(typeof x.next=="function")return x;if(!isNaN(x.length))return{next:function(){return x&&j>=x.length&&(x=void 0),{value:x&&x[j++],done:!x}}}}throw new TypeError(v(x)+" is not iterable")}E.exports=I,E.exports.__esModule=!0,E.exports.default=E.exports},3738:function(E){function f(c){"@babel/helpers - typeof";return E.exports=f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},E.exports.__esModule=!0,E.exports.default=E.exports,f(c)}E.exports=f,E.exports.__esModule=!0,E.exports.default=E.exports},4756:function(E,f,c){var v=c(4633)();E.exports=v;try{regeneratorRuntime=v}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=v:Function("r","regeneratorRuntime = r")(v)}},9306:function(E,f,c){var v=c(4901),I=c(6823),x=TypeError;E.exports=function(C){if(v(C))return C;throw new x(I(C)+" is not a function")}},5548:function(E,f,c){var v=c(3517),I=c(6823),x=TypeError;E.exports=function(C){if(v(C))return C;throw new x(I(C)+" is not a constructor")}},3506:function(E,f,c){var v=c(3925),I=String,x=TypeError;E.exports=function(C){if(v(C))return C;throw new x("Can't set "+I(C)+" as a prototype")}},6469:function(E,f,c){var v=c(8227),I=c(2360),x=c(4913).f,C=v("unscopables"),j=Array.prototype;j[C]===void 0&&x(j,C,{configurable:!0,value:I(null)}),E.exports=function(z){j[C][z]=!0}},7829:function(E,f,c){var v=c(8183).charAt;E.exports=function(I,x,C){return x+(C?v(I,x).length:1)}},679:function(E,f,c){var v=c(1625),I=TypeError;E.exports=function(x,C){if(v(C,x))return x;throw new I("Incorrect invocation")}},8551:function(E,f,c){var v=c(34),I=String,x=TypeError;E.exports=function(C){if(v(C))return C;throw new x(I(C)+" is not an object")}},5652:function(E,f,c){var v=c(9039);E.exports=v(function(){if(typeof ArrayBuffer=="function"){var I=new ArrayBuffer(8);Object.isExtensible(I)&&Object.defineProperty(I,"a",{value:8})}})},235:function(E,f,c){var v=c(9213).forEach,I=c(4598),x=I("forEach");E.exports=x?[].forEach:function(j){return v(this,j,arguments.length>1?arguments[1]:void 0)}},7916:function(E,f,c){var v=c(6080),I=c(9565),x=c(8981),C=c(6319),j=c(4209),z=c(3517),F=c(6198),K=c(4659),N=c(81),P=c(851),$=Array;E.exports=function(M){var U=x(M),J=z(this),H=arguments.length,Y=H>1?arguments[1]:void 0,ee=Y!==void 0;ee&&(Y=v(Y,H>2?arguments[2]:void 0));var q=P(U),se=0,re,ue,xe,he,G,we;if(q&&!(this===$&&j(q)))for(ue=J?new this:[],he=N(U,q),G=he.next;!(xe=I(G,he)).done;se++)we=ee?C(he,Y,[xe.value,se],!0):xe.value,K(ue,se,we);else for(re=F(U),ue=J?new this(re):$(re);re>se;se++)we=ee?Y(U[se],se):U[se],K(ue,se,we);return ue.length=se,ue}},9617:function(E,f,c){var v=c(5397),I=c(5610),x=c(6198),C=function(j){return function(z,F,K){var N=v(z),P=x(N);if(P===0)return!j&&-1;var $=I(K,P),d;if(j&&F!==F){for(;P>$;)if(d=N[$++],d!==d)return!0}else for(;P>$;$++)if((j||$ in N)&&N[$]===F)return j||$||0;return!j&&-1}};E.exports={includes:C(!0),indexOf:C(!1)}},9213:function(E,f,c){var v=c(6080),I=c(9504),x=c(7055),C=c(8981),j=c(6198),z=c(1469),F=I([].push),K=function(N){var P=N===1,$=N===2,d=N===3,M=N===4,U=N===6,J=N===7,H=N===5||U;return function(Y,ee,q,se){for(var re=C(Y),ue=x(re),xe=j(ue),he=v(ee,q),G=0,we=se||z,Ae=P?we(Y,xe):$||J?we(Y,0):void 0,Ie,He;xe>G;G++)if((H||G in ue)&&(Ie=ue[G],He=he(Ie,G,re),N))if(P)Ae[G]=He;else if(He)switch(N){case 3:return!0;case 5:return Ie;case 6:return G;case 2:F(Ae,Ie)}else switch(N){case 4:return!1;case 7:F(Ae,Ie)}return U?-1:d||M?M:Ae}};E.exports={forEach:K(0),map:K(1),filter:K(2),some:K(3),every:K(4),find:K(5),findIndex:K(6),filterReject:K(7)}},597:function(E,f,c){var v=c(9039),I=c(8227),x=c(9519),C=I("species");E.exports=function(j){return x>=51||!v(function(){var z=[],F=z.constructor={};return F[C]=function(){return{foo:1}},z[j](Boolean).foo!==1})}},4598:function(E,f,c){var v=c(9039);E.exports=function(I,x){var C=[][I];return!!C&&v(function(){C.call(null,x||function(){return 1},1)})}},4527:function(E,f,c){var v=c(3724),I=c(4376),x=TypeError,C=Object.getOwnPropertyDescriptor,j=v&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(z){return z instanceof TypeError}}();E.exports=j?function(z,F){if(I(z)&&!C(z,"length").writable)throw new x("Cannot set read only .length");return z.length=F}:function(z,F){return z.length=F}},7680:function(E,f,c){var v=c(9504);E.exports=v([].slice)},4488:function(E,f,c){var v=c(7680),I=Math.floor,x=function(C,j){var z=C.length;if(z<8)for(var F=1,K,N;F<z;){for(N=F,K=C[F];N&&j(C[N-1],K)>0;)C[N]=C[--N];N!==F++&&(C[N]=K)}else for(var P=I(z/2),$=x(v(C,0,P),j),d=x(v(C,P),j),M=$.length,U=d.length,J=0,H=0;J<M||H<U;)C[J+H]=J<M&&H<U?j($[J],d[H])<=0?$[J++]:d[H++]:J<M?$[J++]:d[H++];return C};E.exports=x},7433:function(E,f,c){var v=c(4376),I=c(3517),x=c(34),C=c(8227),j=C("species"),z=Array;E.exports=function(F){var K;return v(F)&&(K=F.constructor,I(K)&&(K===z||v(K.prototype))?K=void 0:x(K)&&(K=K[j],K===null&&(K=void 0))),K===void 0?z:K}},1469:function(E,f,c){var v=c(7433);E.exports=function(I,x){return new(v(I))(x===0?0:x)}},6319:function(E,f,c){var v=c(8551),I=c(9539);E.exports=function(x,C,j,z){try{return z?C(v(j)[0],j[1]):C(j)}catch(F){I(x,"throw",F)}}},4428:function(E,f,c){var v=c(8227),I=v("iterator"),x=!1;try{var C=0,j={next:function(){return{done:!!C++}},return:function(){x=!0}};j[I]=function(){return this},Array.from(j,function(){throw 2})}catch{}E.exports=function(z,F){try{if(!F&&!x)return!1}catch{return!1}var K=!1;try{var N={};N[I]=function(){return{next:function(){return{done:K=!0}}}},z(N)}catch{}return K}},2195:function(E,f,c){var v=c(9504),I=v({}.toString),x=v("".slice);E.exports=function(C){return x(I(C),8,-1)}},6955:function(E,f,c){var v=c(2140),I=c(4901),x=c(2195),C=c(8227),j=C("toStringTag"),z=Object,F=x(function(){return arguments}())==="Arguments",K=function(N,P){try{return N[P]}catch{}};E.exports=v?x:function(N){var P,$,d;return N===void 0?"Undefined":N===null?"Null":typeof($=K(P=z(N),j))=="string"?$:F?x(P):(d=x(P))==="Object"&&I(P.callee)?"Arguments":d}},6938:function(E,f,c){var v=c(2360),I=c(2106),x=c(6279),C=c(6080),j=c(679),z=c(4117),F=c(2652),K=c(1088),N=c(2529),P=c(7633),$=c(3724),d=c(3451).fastKey,M=c(1181),U=M.set,J=M.getterFor;E.exports={getConstructor:function(H,Y,ee,q){var se=H(function(G,we){j(G,re),U(G,{type:Y,index:v(null),first:null,last:null,size:0}),$||(G.size=0),z(we)||F(we,G[q],{that:G,AS_ENTRIES:ee})}),re=se.prototype,ue=J(Y),xe=function(G,we,Ae){var Ie=ue(G),He=he(G,we),nt,Xe;return He?He.value=Ae:(Ie.last=He={index:Xe=d(we,!0),key:we,value:Ae,previous:nt=Ie.last,next:null,removed:!1},Ie.first||(Ie.first=He),nt&&(nt.next=He),$?Ie.size++:G.size++,Xe!=="F"&&(Ie.index[Xe]=He)),G},he=function(G,we){var Ae=ue(G),Ie=d(we),He;if(Ie!=="F")return Ae.index[Ie];for(He=Ae.first;He;He=He.next)if(He.key===we)return He};return x(re,{clear:function(){for(var we=this,Ae=ue(we),Ie=Ae.first;Ie;)Ie.removed=!0,Ie.previous&&(Ie.previous=Ie.previous.next=null),Ie=Ie.next;Ae.first=Ae.last=null,Ae.index=v(null),$?Ae.size=0:we.size=0},delete:function(G){var we=this,Ae=ue(we),Ie=he(we,G);if(Ie){var He=Ie.next,nt=Ie.previous;delete Ae.index[Ie.index],Ie.removed=!0,nt&&(nt.next=He),He&&(He.previous=nt),Ae.first===Ie&&(Ae.first=He),Ae.last===Ie&&(Ae.last=nt),$?Ae.size--:we.size--}return!!Ie},forEach:function(we){for(var Ae=ue(this),Ie=C(we,arguments.length>1?arguments[1]:void 0),He;He=He?He.next:Ae.first;)for(Ie(He.value,He.key,this);He&&He.removed;)He=He.previous},has:function(we){return!!he(this,we)}}),x(re,ee?{get:function(we){var Ae=he(this,we);return Ae&&Ae.value},set:function(we,Ae){return xe(this,we===0?0:we,Ae)}}:{add:function(we){return xe(this,we=we===0?0:we,we)}}),$&&I(re,"size",{configurable:!0,get:function(){return ue(this).size}}),se},setStrong:function(H,Y,ee){var q=Y+" Iterator",se=J(Y),re=J(q);K(H,Y,function(ue,xe){U(this,{type:q,target:ue,state:se(ue),kind:xe,last:null})},function(){for(var ue=re(this),xe=ue.kind,he=ue.last;he&&he.removed;)he=he.previous;return!ue.target||!(ue.last=he=he?he.next:ue.state.first)?(ue.target=null,N(void 0,!0)):N(xe==="keys"?he.key:xe==="values"?he.value:[he.key,he.value],!1)},ee?"entries":"values",!ee,!0),P(Y)}}},6468:function(E,f,c){var v=c(6518),I=c(4576),x=c(9504),C=c(2796),j=c(6840),z=c(3451),F=c(2652),K=c(679),N=c(4901),P=c(4117),$=c(34),d=c(9039),M=c(4428),U=c(687),J=c(3167);E.exports=function(H,Y,ee){var q=H.indexOf("Map")!==-1,se=H.indexOf("Weak")!==-1,re=q?"set":"add",ue=I[H],xe=ue&&ue.prototype,he=ue,G={},we=function(ht){var be=x(xe[ht]);j(xe,ht,ht==="add"?function(st){return be(this,st===0?0:st),this}:ht==="delete"?function(Qe){return se&&!$(Qe)?!1:be(this,Qe===0?0:Qe)}:ht==="get"?function(st){return se&&!$(st)?void 0:be(this,st===0?0:st)}:ht==="has"?function(st){return se&&!$(st)?!1:be(this,st===0?0:st)}:function(st,Xt){return be(this,st===0?0:st,Xt),this})},Ae=C(H,!N(ue)||!(se||xe.forEach&&!d(function(){new ue().entries().next()})));if(Ae)he=ee.getConstructor(Y,H,q,re),z.enable();else if(C(H,!0)){var Ie=new he,He=Ie[re](se?{}:-0,1)!==Ie,nt=d(function(){Ie.has(1)}),Xe=M(function(ht){new ue(ht)}),it=!se&&d(function(){for(var ht=new ue,be=5;be--;)ht[re](be,be);return!ht.has(-0)});Xe||(he=Y(function(ht,be){K(ht,xe);var Qe=J(new ue,ht,he);return P(be)||F(be,Qe[re],{that:Qe,AS_ENTRIES:q}),Qe}),he.prototype=xe,xe.constructor=he),(nt||it)&&(we("delete"),we("has"),q&&we("get")),(it||He)&&we(re),se&&xe.clear&&delete xe.clear}return G[H]=he,v({global:!0,constructor:!0,forced:he!==ue},G),U(he,H),se||ee.setStrong(he,H,q),he}},7740:function(E,f,c){var v=c(9297),I=c(5031),x=c(7347),C=c(4913);E.exports=function(j,z,F){for(var K=I(z),N=C.f,P=x.f,$=0;$<K.length;$++){var d=K[$];!v(j,d)&&!(F&&v(F,d))&&N(j,d,P(z,d))}}},2211:function(E,f,c){var v=c(9039);E.exports=!v(function(){function I(){}return I.prototype.constructor=null,Object.getPrototypeOf(new I)!==I.prototype})},2529:function(E){E.exports=function(f,c){return{value:f,done:c}}},6699:function(E,f,c){var v=c(3724),I=c(4913),x=c(6980);E.exports=v?function(C,j,z){return I.f(C,j,x(1,z))}:function(C,j,z){return C[j]=z,C}},6980:function(E){E.exports=function(f,c){return{enumerable:!(f&1),configurable:!(f&2),writable:!(f&4),value:c}}},4659:function(E,f,c){var v=c(3724),I=c(4913),x=c(6980);E.exports=function(C,j,z){v?I.f(C,j,x(0,z)):C[j]=z}},2106:function(E,f,c){var v=c(283),I=c(4913);E.exports=function(x,C,j){return j.get&&v(j.get,C,{getter:!0}),j.set&&v(j.set,C,{setter:!0}),I.f(x,C,j)}},6840:function(E,f,c){var v=c(4901),I=c(4913),x=c(283),C=c(9433);E.exports=function(j,z,F,K){K||(K={});var N=K.enumerable,P=K.name!==void 0?K.name:z;if(v(F)&&x(F,P,K),K.global)N?j[z]=F:C(z,F);else{try{K.unsafe?j[z]&&(N=!0):delete j[z]}catch{}N?j[z]=F:I.f(j,z,{value:F,enumerable:!1,configurable:!K.nonConfigurable,writable:!K.nonWritable})}return j}},6279:function(E,f,c){var v=c(6840);E.exports=function(I,x,C){for(var j in x)v(I,j,x[j],C);return I}},9433:function(E,f,c){var v=c(4576),I=Object.defineProperty;E.exports=function(x,C){try{I(v,x,{value:C,configurable:!0,writable:!0})}catch{v[x]=C}return C}},4606:function(E,f,c){var v=c(6823),I=TypeError;E.exports=function(x,C){if(!delete x[C])throw new I("Cannot delete property "+v(C)+" of "+v(x))}},3724:function(E,f,c){var v=c(9039);E.exports=!v(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4055:function(E,f,c){var v=c(4576),I=c(34),x=v.document,C=I(x)&&I(x.createElement);E.exports=function(j){return C?x.createElement(j):{}}},6837:function(E){var f=TypeError,c=9007199254740991;E.exports=function(v){if(v>c)throw f("Maximum allowed index exceeded");return v}},7400:function(E){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}},9296:function(E,f,c){var v=c(4055),I=v("span").classList,x=I&&I.constructor&&I.constructor.prototype;E.exports=x===Object.prototype?void 0:x},8727:function(E){E.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},3709:function(E,f,c){var v=c(2839),I=v.match(/firefox\/(\d+)/i);E.exports=!!I&&+I[1]},3763:function(E,f,c){var v=c(2839);E.exports=/MSIE|Trident/.test(v)},4265:function(E,f,c){var v=c(2839);E.exports=/ipad|iphone|ipod/i.test(v)&&typeof Pebble<"u"},9544:function(E,f,c){var v=c(2839);E.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(v)},8574:function(E,f,c){var v=c(4215);E.exports=v==="NODE"},7860:function(E,f,c){var v=c(2839);E.exports=/web0s(?!.*chrome)/i.test(v)},2839:function(E,f,c){var v=c(4576),I=v.navigator,x=I&&I.userAgent;E.exports=x?String(x):""},9519:function(E,f,c){var v=c(4576),I=c(2839),x=v.process,C=v.Deno,j=x&&x.versions||C&&C.version,z=j&&j.v8,F,K;z&&(F=z.split("."),K=F[0]>0&&F[0]<4?1:+(F[0]+F[1])),!K&&I&&(F=I.match(/Edge\/(\d+)/),(!F||F[1]>=74)&&(F=I.match(/Chrome\/(\d+)/),F&&(K=+F[1]))),E.exports=K},3607:function(E,f,c){var v=c(2839),I=v.match(/AppleWebKit\/(\d+)\./);E.exports=!!I&&+I[1]},4215:function(E,f,c){var v=c(4576),I=c(2839),x=c(2195),C=function(j){return I.slice(0,j.length)===j};E.exports=function(){return C("Bun/")?"BUN":C("Cloudflare-Workers")?"CLOUDFLARE":C("Deno/")?"DENO":C("Node.js/")?"NODE":v.Bun&&typeof Bun.version=="string"?"BUN":v.Deno&&typeof Deno.version=="object"?"DENO":x(v.process)==="process"?"NODE":v.window&&v.document?"BROWSER":"REST"}()},6193:function(E,f,c){var v=c(9504),I=Error,x=v("".replace),C=function(F){return String(new I(F).stack)}("zxcasd"),j=/\n\s*at [^:]*:[^\n]*/,z=j.test(C);E.exports=function(F,K){if(z&&typeof F=="string"&&!I.prepareStackTrace)for(;K--;)F=x(F,j,"");return F}},747:function(E,f,c){var v=c(6699),I=c(6193),x=c(6249),C=Error.captureStackTrace;E.exports=function(j,z,F,K){x&&(C?C(j,z):v(j,"stack",I(F,K)))}},6249:function(E,f,c){var v=c(9039),I=c(6980);E.exports=!v(function(){var x=new Error("a");return"stack"in x?(Object.defineProperty(x,"stack",I(1,7)),x.stack!==7):!0})},6518:function(E,f,c){var v=c(4576),I=c(7347).f,x=c(6699),C=c(6840),j=c(9433),z=c(7740),F=c(2796);E.exports=function(K,N){var P=K.target,$=K.global,d=K.stat,M,U,J,H,Y,ee;if($?U=v:d?U=v[P]||j(P,{}):U=v[P]&&v[P].prototype,U)for(J in N){if(Y=N[J],K.dontCallGetSet?(ee=I(U,J),H=ee&&ee.value):H=U[J],M=F($?J:P+(d?".":"#")+J,K.forced),!M&&H!==void 0){if(typeof Y==typeof H)continue;z(Y,H)}(K.sham||H&&H.sham)&&x(Y,"sham",!0),C(U,J,Y,K)}}},9039:function(E){E.exports=function(f){try{return!!f()}catch{return!0}}},9228:function(E,f,c){c(7495);var v=c(9565),I=c(6840),x=c(7323),C=c(9039),j=c(8227),z=c(6699),F=j("species"),K=RegExp.prototype;E.exports=function(N,P,$,d){var M=j(N),U=!C(function(){var ee={};return ee[M]=function(){return 7},""[N](ee)!==7}),J=U&&!C(function(){var ee=!1,q=/a/;return N==="split"&&(q={},q.constructor={},q.constructor[F]=function(){return q},q.flags="",q[M]=/./[M]),q.exec=function(){return ee=!0,null},q[M](""),!ee});if(!U||!J||$){var H=/./[M],Y=P(M,""[N],function(ee,q,se,re,ue){var xe=q.exec;return xe===x||xe===K.exec?U&&!ue?{done:!0,value:v(H,q,se,re)}:{done:!0,value:v(ee,se,q,re)}:{done:!1}});I(String.prototype,N,Y[0]),I(K,M,Y[1])}d&&z(K[M],"sham",!0)}},2744:function(E,f,c){var v=c(9039);E.exports=!v(function(){return Object.isExtensible(Object.preventExtensions({}))})},8745:function(E,f,c){var v=c(616),I=Function.prototype,x=I.apply,C=I.call;E.exports=typeof Reflect=="object"&&Reflect.apply||(v?C.bind(x):function(){return C.apply(x,arguments)})},6080:function(E,f,c){var v=c(7476),I=c(9306),x=c(616),C=v(v.bind);E.exports=function(j,z){return I(j),z===void 0?j:x?C(j,z):function(){return j.apply(z,arguments)}}},616:function(E,f,c){var v=c(9039);E.exports=!v(function(){var I=(function(){}).bind();return typeof I!="function"||I.hasOwnProperty("prototype")})},566:function(E,f,c){var v=c(9504),I=c(9306),x=c(34),C=c(9297),j=c(7680),z=c(616),F=Function,K=v([].concat),N=v([].join),P={},$=function(d,M,U){if(!C(P,M)){for(var J=[],H=0;H<M;H++)J[H]="a["+H+"]";P[M]=F("C,a","return new C("+N(J,",")+")")}return P[M](d,U)};E.exports=z?F.bind:function(M){var U=I(this),J=U.prototype,H=j(arguments,1),Y=function(){var q=K(H,j(arguments));return this instanceof Y?$(U,q.length,q):U.apply(M,q)};return x(J)&&(Y.prototype=J),Y}},9565:function(E,f,c){var v=c(616),I=Function.prototype.call;E.exports=v?I.bind(I):function(){return I.apply(I,arguments)}},350:function(E,f,c){var v=c(3724),I=c(9297),x=Function.prototype,C=v&&Object.getOwnPropertyDescriptor,j=I(x,"name"),z=j&&(function(){}).name==="something",F=j&&(!v||v&&C(x,"name").configurable);E.exports={EXISTS:j,PROPER:z,CONFIGURABLE:F}},6706:function(E,f,c){var v=c(9504),I=c(9306);E.exports=function(x,C,j){try{return v(I(Object.getOwnPropertyDescriptor(x,C)[j]))}catch{}}},7476:function(E,f,c){var v=c(2195),I=c(9504);E.exports=function(x){if(v(x)==="Function")return I(x)}},9504:function(E,f,c){var v=c(616),I=Function.prototype,x=I.call,C=v&&I.bind.bind(x,x);E.exports=v?C:function(j){return function(){return x.apply(j,arguments)}}},7751:function(E,f,c){var v=c(4576),I=c(4901),x=function(C){return I(C)?C:void 0};E.exports=function(C,j){return arguments.length<2?x(v[C]):v[C]&&v[C][j]}},851:function(E,f,c){var v=c(6955),I=c(5966),x=c(4117),C=c(6269),j=c(8227),z=j("iterator");E.exports=function(F){if(!x(F))return I(F,z)||I(F,"@@iterator")||C[v(F)]}},81:function(E,f,c){var v=c(9565),I=c(9306),x=c(8551),C=c(6823),j=c(851),z=TypeError;E.exports=function(F,K){var N=arguments.length<2?j(F):K;if(I(N))return x(v(N,F));throw new z(C(F)+" is not iterable")}},6933:function(E,f,c){var v=c(9504),I=c(4376),x=c(4901),C=c(2195),j=c(655),z=v([].push);E.exports=function(F){if(x(F))return F;if(I(F)){for(var K=F.length,N=[],P=0;P<K;P++){var $=F[P];typeof $=="string"?z(N,$):(typeof $=="number"||C($)==="Number"||C($)==="String")&&z(N,j($))}var d=N.length,M=!0;return function(U,J){if(M)return M=!1,J;if(I(this))return J;for(var H=0;H<d;H++)if(N[H]===U)return J}}}},5966:function(E,f,c){var v=c(9306),I=c(4117);E.exports=function(x,C){var j=x[C];return I(j)?void 0:v(j)}},2478:function(E,f,c){var v=c(9504),I=c(8981),x=Math.floor,C=v("".charAt),j=v("".replace),z=v("".slice),F=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,K=/\$([$&'`]|\d{1,2})/g;E.exports=function(N,P,$,d,M,U){var J=$+N.length,H=d.length,Y=K;return M!==void 0&&(M=I(M),Y=F),j(U,Y,function(ee,q){var se;switch(C(q,0)){case"$":return"$";case"&":return N;case"`":return z(P,0,$);case"'":return z(P,J);case"<":se=M[z(q,1,-1)];break;default:var re=+q;if(re===0)return ee;if(re>H){var ue=x(re/10);return ue===0?ee:ue<=H?d[ue-1]===void 0?C(q,1):d[ue-1]+C(q,1):ee}se=d[re-1]}return se===void 0?"":se})}},4576:function(E,f,c){var v=function(I){return I&&I.Math===Math&&I};E.exports=v(typeof globalThis=="object"&&globalThis)||v(typeof window=="object"&&window)||v(typeof self=="object"&&self)||v(typeof c.g=="object"&&c.g)||v(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:function(E,f,c){var v=c(9504),I=c(8981),x=v({}.hasOwnProperty);E.exports=Object.hasOwn||function(j,z){return x(I(j),z)}},421:function(E){E.exports={}},3138:function(E){E.exports=function(f,c){try{arguments.length===1?console.error(f):console.error(f,c)}catch{}}},397:function(E,f,c){var v=c(7751);E.exports=v("document","documentElement")},5917:function(E,f,c){var v=c(3724),I=c(9039),x=c(4055);E.exports=!v&&!I(function(){return Object.defineProperty(x("div"),"a",{get:function(){return 7}}).a!==7})},7055:function(E,f,c){var v=c(9504),I=c(9039),x=c(2195),C=Object,j=v("".split);E.exports=I(function(){return!C("z").propertyIsEnumerable(0)})?function(z){return x(z)==="String"?j(z,""):C(z)}:C},3167:function(E,f,c){var v=c(4901),I=c(34),x=c(2967);E.exports=function(C,j,z){var F,K;return x&&v(F=j.constructor)&&F!==z&&I(K=F.prototype)&&K!==z.prototype&&x(C,K),C}},3706:function(E,f,c){var v=c(9504),I=c(4901),x=c(7629),C=v(Function.toString);I(x.inspectSource)||(x.inspectSource=function(j){return C(j)}),E.exports=x.inspectSource},7584:function(E,f,c){var v=c(34),I=c(6699);E.exports=function(x,C){v(C)&&"cause"in C&&I(x,"cause",C.cause)}},3451:function(E,f,c){var v=c(6518),I=c(9504),x=c(421),C=c(34),j=c(9297),z=c(4913).f,F=c(8480),K=c(298),N=c(4124),P=c(3392),$=c(2744),d=!1,M=P("meta"),U=0,J=function(re){z(re,M,{value:{objectID:"O"+U++,weakData:{}}})},H=function(re,ue){if(!C(re))return typeof re=="symbol"?re:(typeof re=="string"?"S":"P")+re;if(!j(re,M)){if(!N(re))return"F";if(!ue)return"E";J(re)}return re[M].objectID},Y=function(re,ue){if(!j(re,M)){if(!N(re))return!0;if(!ue)return!1;J(re)}return re[M].weakData},ee=function(re){return $&&d&&N(re)&&!j(re,M)&&J(re),re},q=function(){se.enable=function(){},d=!0;var re=F.f,ue=I([].splice),xe={};xe[M]=1,re(xe).length&&(F.f=function(he){for(var G=re(he),we=0,Ae=G.length;we<Ae;we++)if(G[we]===M){ue(G,we,1);break}return G},v({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:K.f}))},se=E.exports={enable:q,fastKey:H,getWeakData:Y,onFreeze:ee};x[M]=!0},1181:function(E,f,c){var v=c(8622),I=c(4576),x=c(34),C=c(6699),j=c(9297),z=c(7629),F=c(6119),K=c(421),N="Object already initialized",P=I.TypeError,$=I.WeakMap,d,M,U,J=function(q){return U(q)?M(q):d(q,{})},H=function(q){return function(se){var re;if(!x(se)||(re=M(se)).type!==q)throw new P("Incompatible receiver, "+q+" required");return re}};if(v||z.state){var Y=z.state||(z.state=new $);Y.get=Y.get,Y.has=Y.has,Y.set=Y.set,d=function(q,se){if(Y.has(q))throw new P(N);return se.facade=q,Y.set(q,se),se},M=function(q){return Y.get(q)||{}},U=function(q){return Y.has(q)}}else{var ee=F("state");K[ee]=!0,d=function(q,se){if(j(q,ee))throw new P(N);return se.facade=q,C(q,ee,se),se},M=function(q){return j(q,ee)?q[ee]:{}},U=function(q){return j(q,ee)}}E.exports={set:d,get:M,has:U,enforce:J,getterFor:H}},4209:function(E,f,c){var v=c(8227),I=c(6269),x=v("iterator"),C=Array.prototype;E.exports=function(j){return j!==void 0&&(I.Array===j||C[x]===j)}},4376:function(E,f,c){var v=c(2195);E.exports=Array.isArray||function(x){return v(x)==="Array"}},4901:function(E){var f=typeof document=="object"&&document.all;E.exports=typeof f>"u"&&f!==void 0?function(c){return typeof c=="function"||c===f}:function(c){return typeof c=="function"}},3517:function(E,f,c){var v=c(9504),I=c(9039),x=c(4901),C=c(6955),j=c(7751),z=c(3706),F=function(){},K=j("Reflect","construct"),N=/^\s*(?:class|function)\b/,P=v(N.exec),$=!N.test(F),d=function(J){if(!x(J))return!1;try{return K(F,[],J),!0}catch{return!1}},M=function(J){if(!x(J))return!1;switch(C(J)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return $||!!P(N,z(J))}catch{return!0}};M.sham=!0,E.exports=!K||I(function(){var U;return d(d.call)||!d(Object)||!d(function(){U=!0})||U})?M:d},2796:function(E,f,c){var v=c(9039),I=c(4901),x=/#|\.prototype\./,C=function(N,P){var $=z[j(N)];return $===K?!0:$===F?!1:I(P)?v(P):!!P},j=C.normalize=function(N){return String(N).replace(x,".").toLowerCase()},z=C.data={},F=C.NATIVE="N",K=C.POLYFILL="P";E.exports=C},4117:function(E){E.exports=function(f){return f==null}},34:function(E,f,c){var v=c(4901);E.exports=function(I){return typeof I=="object"?I!==null:v(I)}},3925:function(E,f,c){var v=c(34);E.exports=function(I){return v(I)||I===null}},6395:function(E){E.exports=!1},757:function(E,f,c){var v=c(7751),I=c(4901),x=c(1625),C=c(7040),j=Object;E.exports=C?function(z){return typeof z=="symbol"}:function(z){var F=v("Symbol");return I(F)&&x(F.prototype,j(z))}},2652:function(E,f,c){var v=c(6080),I=c(9565),x=c(8551),C=c(6823),j=c(4209),z=c(6198),F=c(1625),K=c(81),N=c(851),P=c(9539),$=TypeError,d=function(U,J){this.stopped=U,this.result=J},M=d.prototype;E.exports=function(U,J,H){var Y=H&&H.that,ee=!!(H&&H.AS_ENTRIES),q=!!(H&&H.IS_RECORD),se=!!(H&&H.IS_ITERATOR),re=!!(H&&H.INTERRUPTED),ue=v(J,Y),xe,he,G,we,Ae,Ie,He,nt=function(it){return xe&&P(xe,"normal",it),new d(!0,it)},Xe=function(it){return ee?(x(it),re?ue(it[0],it[1],nt):ue(it[0],it[1])):re?ue(it,nt):ue(it)};if(q)xe=U.iterator;else if(se)xe=U;else{if(he=N(U),!he)throw new $(C(U)+" is not iterable");if(j(he)){for(G=0,we=z(U);we>G;G++)if(Ae=Xe(U[G]),Ae&&F(M,Ae))return Ae;return new d(!1)}xe=K(U,he)}for(Ie=q?U.next:xe.next;!(He=I(Ie,xe)).done;){try{Ae=Xe(He.value)}catch(it){P(xe,"throw",it)}if(typeof Ae=="object"&&Ae&&F(M,Ae))return Ae}return new d(!1)}},9539:function(E,f,c){var v=c(9565),I=c(8551),x=c(5966);E.exports=function(C,j,z){var F,K;I(C);try{if(F=x(C,"return"),!F){if(j==="throw")throw z;return z}F=v(F,C)}catch(N){K=!0,F=N}if(j==="throw")throw z;if(K)throw F;return I(F),z}},3994:function(E,f,c){var v=c(7657).IteratorPrototype,I=c(2360),x=c(6980),C=c(687),j=c(6269),z=function(){return this};E.exports=function(F,K,N,P){var $=K+" Iterator";return F.prototype=I(v,{next:x(+!P,N)}),C(F,$,!1,!0),j[$]=z,F}},1088:function(E,f,c){var v=c(6518),I=c(9565),x=c(6395),C=c(350),j=c(4901),z=c(3994),F=c(2787),K=c(2967),N=c(687),P=c(6699),$=c(6840),d=c(8227),M=c(6269),U=c(7657),J=C.PROPER,H=C.CONFIGURABLE,Y=U.IteratorPrototype,ee=U.BUGGY_SAFARI_ITERATORS,q=d("iterator"),se="keys",re="values",ue="entries",xe=function(){return this};E.exports=function(he,G,we,Ae,Ie,He,nt){z(we,G,Ae);var Xe=function(In){if(In===Ie&&st)return st;if(!ee&&In&&In in be)return be[In];switch(In){case se:return function(){return new we(this,In)};case re:return function(){return new we(this,In)};case ue:return function(){return new we(this,In)}}return function(){return new we(this)}},it=G+" Iterator",ht=!1,be=he.prototype,Qe=be[q]||be["@@iterator"]||Ie&&be[Ie],st=!ee&&Qe||Xe(Ie),Xt=G==="Array"&&be.entries||Qe,Gt,gn,ut;if(Xt&&(Gt=F(Xt.call(new he)),Gt!==Object.prototype&&Gt.next&&(!x&&F(Gt)!==Y&&(K?K(Gt,Y):j(Gt[q])||$(Gt,q,xe)),N(Gt,it,!0,!0),x&&(M[it]=xe))),J&&Ie===re&&Qe&&Qe.name!==re&&(!x&&H?P(be,"name",re):(ht=!0,st=function(){return I(Qe,this)})),Ie)if(gn={values:Xe(re),keys:He?st:Xe(se),entries:Xe(ue)},nt)for(ut in gn)(ee||ht||!(ut in be))&&$(be,ut,gn[ut]);else v({target:G,proto:!0,forced:ee||ht},gn);return(!x||nt)&&be[q]!==st&&$(be,q,st,{name:Ie}),M[G]=st,gn}},7657:function(E,f,c){var v=c(9039),I=c(4901),x=c(34),C=c(2360),j=c(2787),z=c(6840),F=c(8227),K=c(6395),N=F("iterator"),P=!1,$,d,M;[].keys&&(M=[].keys(),"next"in M?(d=j(j(M)),d!==Object.prototype&&($=d)):P=!0);var U=!x($)||v(function(){var J={};return $[N].call(J)!==J});U?$={}:K&&($=C($)),I($[N])||z($,N,function(){return this}),E.exports={IteratorPrototype:$,BUGGY_SAFARI_ITERATORS:P}},6269:function(E){E.exports={}},6198:function(E,f,c){var v=c(8014);E.exports=function(I){return v(I.length)}},283:function(E,f,c){var v=c(9504),I=c(9039),x=c(4901),C=c(9297),j=c(3724),z=c(350).CONFIGURABLE,F=c(3706),K=c(1181),N=K.enforce,P=K.get,$=String,d=Object.defineProperty,M=v("".slice),U=v("".replace),J=v([].join),H=j&&!I(function(){return d(function(){},"length",{value:8}).length!==8}),Y=String(String).split("String"),ee=E.exports=function(q,se,re){M($(se),0,7)==="Symbol("&&(se="["+U($(se),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),re&&re.getter&&(se="get "+se),re&&re.setter&&(se="set "+se),(!C(q,"name")||z&&q.name!==se)&&(j?d(q,"name",{value:se,configurable:!0}):q.name=se),H&&re&&C(re,"arity")&&q.length!==re.arity&&d(q,"length",{value:re.arity});try{re&&C(re,"constructor")&&re.constructor?j&&d(q,"prototype",{writable:!1}):q.prototype&&(q.prototype=void 0)}catch{}var ue=N(q);return C(ue,"source")||(ue.source=J(Y,typeof se=="string"?se:"")),q};Function.prototype.toString=ee(function(){return x(this)&&P(this).source||F(this)},"toString")},9340:function(E){var f=Math.log,c=Math.LOG10E;E.exports=Math.log10||function(I){return f(I)*c}},741:function(E){var f=Math.ceil,c=Math.floor;E.exports=Math.trunc||function(I){var x=+I;return(x>0?c:f)(x)}},1955:function(E,f,c){var v=c(4576),I=c(3389),x=c(6080),C=c(9225).set,j=c(8265),z=c(9544),F=c(4265),K=c(7860),N=c(8574),P=v.MutationObserver||v.WebKitMutationObserver,$=v.document,d=v.process,M=v.Promise,U=I("queueMicrotask"),J,H,Y,ee,q;if(!U){var se=new j,re=function(){var ue,xe;for(N&&(ue=d.domain)&&ue.exit();xe=se.get();)try{xe()}catch(he){throw se.head&&J(),he}ue&&ue.enter()};!z&&!N&&!K&&P&&$?(H=!0,Y=$.createTextNode(""),new P(re).observe(Y,{characterData:!0}),J=function(){Y.data=H=!H}):!F&&M&&M.resolve?(ee=M.resolve(void 0),ee.constructor=M,q=x(ee.then,ee),J=function(){q(re)}):N?J=function(){d.nextTick(re)}:(C=x(C,v),J=function(){C(re)}),U=function(ue){se.head||J(),se.add(ue)}}E.exports=U},6043:function(E,f,c){var v=c(9306),I=TypeError,x=function(C){var j,z;this.promise=new C(function(F,K){if(j!==void 0||z!==void 0)throw new I("Bad Promise constructor");j=F,z=K}),this.resolve=v(j),this.reject=v(z)};E.exports.f=function(C){return new x(C)}},2603:function(E,f,c){var v=c(655);E.exports=function(I,x){return I===void 0?arguments.length<2?"":x:v(I)}},2703:function(E,f,c){var v=c(4576),I=c(9039),x=c(9504),C=c(655),j=c(3802).trim,z=c(7452),F=v.parseInt,K=v.Symbol,N=K&&K.iterator,P=/^[+-]?0x/i,$=x(P.exec),d=F(z+"08")!==8||F(z+"0x16")!==22||N&&!I(function(){F(Object(N))});E.exports=d?function(U,J){var H=j(C(U));return F(H,J>>>0||($(P,H)?16:10))}:F},2360:function(E,f,c){var v=c(8551),I=c(6801),x=c(8727),C=c(421),j=c(397),z=c(4055),F=c(6119),K=">",N="<",P="prototype",$="script",d=F("IE_PROTO"),M=function(){},U=function(q){return N+$+K+q+N+"/"+$+K},J=function(q){q.write(U("")),q.close();var se=q.parentWindow.Object;return q=null,se},H=function(){var q=z("iframe"),se="java"+$+":",re;return q.style.display="none",j.appendChild(q),q.src=String(se),re=q.contentWindow.document,re.open(),re.write(U("document.F=Object")),re.close(),re.F},Y,ee=function(){try{Y=new ActiveXObject("htmlfile")}catch{}ee=typeof document<"u"?document.domain&&Y?J(Y):H():J(Y);for(var q=x.length;q--;)delete ee[P][x[q]];return ee()};C[d]=!0,E.exports=Object.create||function(se,re){var ue;return se!==null?(M[P]=v(se),ue=new M,M[P]=null,ue[d]=se):ue=ee(),re===void 0?ue:I.f(ue,re)}},6801:function(E,f,c){var v=c(3724),I=c(8686),x=c(4913),C=c(8551),j=c(5397),z=c(1072);f.f=v&&!I?Object.defineProperties:function(K,N){C(K);for(var P=j(N),$=z(N),d=$.length,M=0,U;d>M;)x.f(K,U=$[M++],P[U]);return K}},4913:function(E,f,c){var v=c(3724),I=c(5917),x=c(8686),C=c(8551),j=c(6969),z=TypeError,F=Object.defineProperty,K=Object.getOwnPropertyDescriptor,N="enumerable",P="configurable",$="writable";f.f=v?x?function(M,U,J){if(C(M),U=j(U),C(J),typeof M=="function"&&U==="prototype"&&"value"in J&&$ in J&&!J[$]){var H=K(M,U);H&&H[$]&&(M[U]=J.value,J={configurable:P in J?J[P]:H[P],enumerable:N in J?J[N]:H[N],writable:!1})}return F(M,U,J)}:F:function(M,U,J){if(C(M),U=j(U),C(J),I)try{return F(M,U,J)}catch{}if("get"in J||"set"in J)throw new z("Accessors not supported");return"value"in J&&(M[U]=J.value),M}},7347:function(E,f,c){var v=c(3724),I=c(9565),x=c(8773),C=c(6980),j=c(5397),z=c(6969),F=c(9297),K=c(5917),N=Object.getOwnPropertyDescriptor;f.f=v?N:function($,d){if($=j($),d=z(d),K)try{return N($,d)}catch{}if(F($,d))return C(!I(x.f,$,d),$[d])}},298:function(E,f,c){var v=c(2195),I=c(5397),x=c(8480).f,C=c(7680),j=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],z=function(F){try{return x(F)}catch{return C(j)}};E.exports.f=function(K){return j&&v(K)==="Window"?z(K):x(I(K))}},8480:function(E,f,c){var v=c(1828),I=c(8727),x=I.concat("length","prototype");f.f=Object.getOwnPropertyNames||function(j){return v(j,x)}},3717:function(E,f){f.f=Object.getOwnPropertySymbols},2787:function(E,f,c){var v=c(9297),I=c(4901),x=c(8981),C=c(6119),j=c(2211),z=C("IE_PROTO"),F=Object,K=F.prototype;E.exports=j?F.getPrototypeOf:function(N){var P=x(N);if(v(P,z))return P[z];var $=P.constructor;return I($)&&P instanceof $?$.prototype:P instanceof F?K:null}},4124:function(E,f,c){var v=c(9039),I=c(34),x=c(2195),C=c(5652),j=Object.isExtensible,z=v(function(){});E.exports=z||C?function(K){return!I(K)||C&&x(K)==="ArrayBuffer"?!1:j?j(K):!0}:j},1625:function(E,f,c){var v=c(9504);E.exports=v({}.isPrototypeOf)},1828:function(E,f,c){var v=c(9504),I=c(9297),x=c(5397),C=c(9617).indexOf,j=c(421),z=v([].push);E.exports=function(F,K){var N=x(F),P=0,$=[],d;for(d in N)!I(j,d)&&I(N,d)&&z($,d);for(;K.length>P;)I(N,d=K[P++])&&(~C($,d)||z($,d));return $}},1072:function(E,f,c){var v=c(1828),I=c(8727);E.exports=Object.keys||function(C){return v(C,I)}},8773:function(E,f){var c={}.propertyIsEnumerable,v=Object.getOwnPropertyDescriptor,I=v&&!c.call({1:2},1);f.f=I?function(C){var j=v(this,C);return!!j&&j.enumerable}:c},2967:function(E,f,c){var v=c(6706),I=c(34),x=c(7750),C=c(3506);E.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var j=!1,z={},F;try{F=v(Object.prototype,"__proto__","set"),F(z,[]),j=z instanceof Array}catch{}return function(N,P){return x(N),C(P),I(N)&&(j?F(N,P):N.__proto__=P),N}}():void 0)},2357:function(E,f,c){var v=c(3724),I=c(9039),x=c(9504),C=c(2787),j=c(1072),z=c(5397),F=c(8773).f,K=x(F),N=x([].push),P=v&&I(function(){var d=Object.create(null);return d[2]=2,!K(d,2)}),$=function(d){return function(M){for(var U=z(M),J=j(U),H=P&&C(U)===null,Y=J.length,ee=0,q=[],se;Y>ee;)se=J[ee++],(!v||(H?se in U:K(U,se)))&&N(q,d?[se,U[se]]:U[se]);return q}};E.exports={entries:$(!0),values:$(!1)}},3179:function(E,f,c){var v=c(2140),I=c(6955);E.exports=v?{}.toString:function(){return"[object "+I(this)+"]"}},4270:function(E,f,c){var v=c(9565),I=c(4901),x=c(34),C=TypeError;E.exports=function(j,z){var F,K;if(z==="string"&&I(F=j.toString)&&!x(K=v(F,j))||I(F=j.valueOf)&&!x(K=v(F,j))||z!=="string"&&I(F=j.toString)&&!x(K=v(F,j)))return K;throw new C("Can't convert object to primitive value")}},5031:function(E,f,c){var v=c(7751),I=c(9504),x=c(8480),C=c(3717),j=c(8551),z=I([].concat);E.exports=v("Reflect","ownKeys")||function(K){var N=x.f(j(K)),P=C.f;return P?z(N,P(K)):N}},9167:function(E,f,c){var v=c(4576);E.exports=v},1103:function(E){E.exports=function(f){try{return{error:!1,value:f()}}catch(c){return{error:!0,value:c}}}},916:function(E,f,c){var v=c(4576),I=c(550),x=c(4901),C=c(2796),j=c(3706),z=c(8227),F=c(4215),K=c(6395),N=c(9519),P=I&&I.prototype,$=z("species"),d=!1,M=x(v.PromiseRejectionEvent),U=C("Promise",function(){var J=j(I),H=J!==String(I);if(!H&&N===66||K&&!(P.catch&&P.finally))return!0;if(!N||N<51||!/native code/.test(J)){var Y=new I(function(se){se(1)}),ee=function(se){se(function(){},function(){})},q=Y.constructor={};if(q[$]=ee,d=Y.then(function(){})instanceof ee,!d)return!0}return!H&&(F==="BROWSER"||F==="DENO")&&!M});E.exports={CONSTRUCTOR:U,REJECTION_EVENT:M,SUBCLASSING:d}},550:function(E,f,c){var v=c(4576);E.exports=v.Promise},3438:function(E,f,c){var v=c(8551),I=c(34),x=c(6043);E.exports=function(C,j){if(v(C),I(j)&&j.constructor===C)return j;var z=x.f(C),F=z.resolve;return F(j),z.promise}},537:function(E,f,c){var v=c(550),I=c(4428),x=c(916).CONSTRUCTOR;E.exports=x||!I(function(C){v.all(C).then(void 0,function(){})})},1056:function(E,f,c){var v=c(4913).f;E.exports=function(I,x,C){C in I||v(I,C,{configurable:!0,get:function(){return x[C]},set:function(j){x[C]=j}})}},8265:function(E){var f=function(){this.head=null,this.tail=null};f.prototype={add:function(c){var v={item:c,next:null},I=this.tail;I?I.next=v:this.head=v,this.tail=v},get:function(){var c=this.head;if(c){var v=this.head=c.next;return v===null&&(this.tail=null),c.item}}},E.exports=f},6682:function(E,f,c){var v=c(9565),I=c(8551),x=c(4901),C=c(2195),j=c(7323),z=TypeError;E.exports=function(F,K){var N=F.exec;if(x(N)){var P=v(N,F,K);return P!==null&&I(P),P}if(C(F)==="RegExp")return v(j,F,K);throw new z("RegExp#exec called on incompatible receiver")}},7323:function(E,f,c){var v=c(9565),I=c(9504),x=c(655),C=c(7979),j=c(8429),z=c(5745),F=c(2360),K=c(1181).get,N=c(3635),P=c(8814),$=z("native-string-replace",String.prototype.replace),d=RegExp.prototype.exec,M=d,U=I("".charAt),J=I("".indexOf),H=I("".replace),Y=I("".slice),ee=function(){var ue=/a/,xe=/b*/g;return v(d,ue,"a"),v(d,xe,"a"),ue.lastIndex!==0||xe.lastIndex!==0}(),q=j.BROKEN_CARET,se=/()??/.exec("")[1]!==void 0,re=ee||se||q||N||P;re&&(M=function(xe){var he=this,G=K(he),we=x(xe),Ae=G.raw,Ie,He,nt,Xe,it,ht,be;if(Ae)return Ae.lastIndex=he.lastIndex,Ie=v(M,Ae,we),he.lastIndex=Ae.lastIndex,Ie;var Qe=G.groups,st=q&&he.sticky,Xt=v(C,he),Gt=he.source,gn=0,ut=we;if(st&&(Xt=H(Xt,"y",""),J(Xt,"g")===-1&&(Xt+="g"),ut=Y(we,he.lastIndex),he.lastIndex>0&&(!he.multiline||he.multiline&&U(we,he.lastIndex-1)!==`
120
- `)&&(Gt="(?: "+Gt+")",ut=" "+ut,gn++),He=new RegExp("^(?:"+Gt+")",Xt)),se&&(He=new RegExp("^"+Gt+"$(?!\\s)",Xt)),ee&&(nt=he.lastIndex),Xe=v(d,st?He:he,ut),st?Xe?(Xe.input=Y(Xe.input,gn),Xe[0]=Y(Xe[0],gn),Xe.index=he.lastIndex,he.lastIndex+=Xe[0].length):he.lastIndex=0:ee&&Xe&&(he.lastIndex=he.global?Xe.index+Xe[0].length:nt),se&&Xe&&Xe.length>1&&v($,Xe[0],He,function(){for(it=1;it<arguments.length-2;it++)arguments[it]===void 0&&(Xe[it]=void 0)}),Xe&&Qe)for(Xe.groups=ht=F(null),it=0;it<Qe.length;it++)be=Qe[it],ht[be[0]]=Xe[be[1]];return Xe}),E.exports=M},7979:function(E,f,c){var v=c(8551);E.exports=function(){var I=v(this),x="";return I.hasIndices&&(x+="d"),I.global&&(x+="g"),I.ignoreCase&&(x+="i"),I.multiline&&(x+="m"),I.dotAll&&(x+="s"),I.unicode&&(x+="u"),I.unicodeSets&&(x+="v"),I.sticky&&(x+="y"),x}},1034:function(E,f,c){var v=c(9565),I=c(9297),x=c(1625),C=c(7979),j=RegExp.prototype;E.exports=function(z){var F=z.flags;return F===void 0&&!("flags"in j)&&!I(z,"flags")&&x(j,z)?v(C,z):F}},8429:function(E,f,c){var v=c(9039),I=c(4576),x=I.RegExp,C=v(function(){var F=x("a","y");return F.lastIndex=2,F.exec("abcd")!==null}),j=C||v(function(){return!x("a","y").sticky}),z=C||v(function(){var F=x("^r","gy");return F.lastIndex=2,F.exec("str")!==null});E.exports={BROKEN_CARET:z,MISSED_STICKY:j,UNSUPPORTED_Y:C}},3635:function(E,f,c){var v=c(9039),I=c(4576),x=I.RegExp;E.exports=v(function(){var C=x(".","s");return!(C.dotAll&&C.test(`
121
- `)&&C.flags==="s")})},8814:function(E,f,c){var v=c(9039),I=c(4576),x=I.RegExp;E.exports=v(function(){var C=x("(?<a>b)","g");return C.exec("b").groups.a!=="b"||"b".replace(C,"$<a>c")!=="bc"})},7750:function(E,f,c){var v=c(4117),I=TypeError;E.exports=function(x){if(v(x))throw new I("Can't call method on "+x);return x}},3389:function(E,f,c){var v=c(4576),I=c(3724),x=Object.getOwnPropertyDescriptor;E.exports=function(C){if(!I)return v[C];var j=x(v,C);return j&&j.value}},9472:function(E,f,c){var v=c(4576),I=c(8745),x=c(4901),C=c(4215),j=c(2839),z=c(7680),F=c(2812),K=v.Function,N=/MSIE .\./.test(j)||C==="BUN"&&function(){var P=v.Bun.version.split(".");return P.length<3||P[0]==="0"&&(P[1]<3||P[1]==="3"&&P[2]==="0")}();E.exports=function(P,$){var d=$?2:1;return N?function(M,U){var J=F(arguments.length,1)>d,H=x(M)?M:K(M),Y=J?z(arguments,d):[],ee=J?function(){I(H,this,Y)}:H;return $?P(ee,U):P(ee)}:P}},7633:function(E,f,c){var v=c(7751),I=c(2106),x=c(8227),C=c(3724),j=x("species");E.exports=function(z){var F=v(z);C&&F&&!F[j]&&I(F,j,{configurable:!0,get:function(){return this}})}},687:function(E,f,c){var v=c(4913).f,I=c(9297),x=c(8227),C=x("toStringTag");E.exports=function(j,z,F){j&&!F&&(j=j.prototype),j&&!I(j,C)&&v(j,C,{configurable:!0,value:z})}},6119:function(E,f,c){var v=c(5745),I=c(3392),x=v("keys");E.exports=function(C){return x[C]||(x[C]=I(C))}},7629:function(E,f,c){var v=c(6395),I=c(4576),x=c(9433),C="__core-js_shared__",j=E.exports=I[C]||x(C,{});(j.versions||(j.versions=[])).push({version:"3.42.0",mode:v?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.42.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(E,f,c){var v=c(7629);E.exports=function(I,x){return v[I]||(v[I]=x||{})}},2293:function(E,f,c){var v=c(8551),I=c(5548),x=c(4117),C=c(8227),j=C("species");E.exports=function(z,F){var K=v(z).constructor,N;return K===void 0||x(N=v(K)[j])?F:I(N)}},8183:function(E,f,c){var v=c(9504),I=c(1291),x=c(655),C=c(7750),j=v("".charAt),z=v("".charCodeAt),F=v("".slice),K=function(N){return function(P,$){var d=x(C(P)),M=I($),U=d.length,J,H;return M<0||M>=U?N?"":void 0:(J=z(d,M),J<55296||J>56319||M+1===U||(H=z(d,M+1))<56320||H>57343?N?j(d,M):J:N?F(d,M,M+2):(J-55296<<10)+(H-56320)+65536)}};E.exports={codeAt:K(!1),charAt:K(!0)}},2333:function(E,f,c){var v=c(1291),I=c(655),x=c(7750),C=RangeError;E.exports=function(z){var F=I(x(this)),K="",N=v(z);if(N<0||N===1/0)throw new C("Wrong number of repetitions");for(;N>0;(N>>>=1)&&(F+=F))N&1&&(K+=F);return K}},3802:function(E,f,c){var v=c(9504),I=c(7750),x=c(655),C=c(7452),j=v("".replace),z=RegExp("^["+C+"]+"),F=RegExp("(^|[^"+C+"])["+C+"]+$"),K=function(N){return function(P){var $=x(I(P));return N&1&&($=j($,z,"")),N&2&&($=j($,F,"$1")),$}};E.exports={start:K(1),end:K(2),trim:K(3)}},4495:function(E,f,c){var v=c(9519),I=c(9039),x=c(4576),C=x.String;E.exports=!!Object.getOwnPropertySymbols&&!I(function(){var j=Symbol("symbol detection");return!C(j)||!(Object(j)instanceof Symbol)||!Symbol.sham&&v&&v<41})},8242:function(E,f,c){var v=c(9565),I=c(7751),x=c(8227),C=c(6840);E.exports=function(){var j=I("Symbol"),z=j&&j.prototype,F=z&&z.valueOf,K=x("toPrimitive");z&&!z[K]&&C(z,K,function(N){return v(F,this)},{arity:1})}},1296:function(E,f,c){var v=c(4495);E.exports=v&&!!Symbol.for&&!!Symbol.keyFor},9225:function(E,f,c){var v=c(4576),I=c(8745),x=c(6080),C=c(4901),j=c(9297),z=c(9039),F=c(397),K=c(7680),N=c(4055),P=c(2812),$=c(9544),d=c(8574),M=v.setImmediate,U=v.clearImmediate,J=v.process,H=v.Dispatch,Y=v.Function,ee=v.MessageChannel,q=v.String,se=0,re={},ue="onreadystatechange",xe,he,G,we;z(function(){xe=v.location});var Ae=function(Xe){if(j(re,Xe)){var it=re[Xe];delete re[Xe],it()}},Ie=function(Xe){return function(){Ae(Xe)}},He=function(Xe){Ae(Xe.data)},nt=function(Xe){v.postMessage(q(Xe),xe.protocol+"//"+xe.host)};(!M||!U)&&(M=function(it){P(arguments.length,1);var ht=C(it)?it:Y(it),be=K(arguments,1);return re[++se]=function(){I(ht,void 0,be)},he(se),se},U=function(it){delete re[it]},d?he=function(Xe){J.nextTick(Ie(Xe))}:H&&H.now?he=function(Xe){H.now(Ie(Xe))}:ee&&!$?(G=new ee,we=G.port2,G.port1.onmessage=He,he=x(we.postMessage,we)):v.addEventListener&&C(v.postMessage)&&!v.importScripts&&xe&&xe.protocol!=="file:"&&!z(nt)?(he=nt,v.addEventListener("message",He,!1)):ue in N("script")?he=function(Xe){F.appendChild(N("script"))[ue]=function(){F.removeChild(this),Ae(Xe)}}:he=function(Xe){setTimeout(Ie(Xe),0)}),E.exports={set:M,clear:U}},1240:function(E,f,c){var v=c(9504);E.exports=v(1 .valueOf)},5610:function(E,f,c){var v=c(1291),I=Math.max,x=Math.min;E.exports=function(C,j){var z=v(C);return z<0?I(z+j,0):x(z,j)}},5397:function(E,f,c){var v=c(7055),I=c(7750);E.exports=function(x){return v(I(x))}},1291:function(E,f,c){var v=c(741);E.exports=function(I){var x=+I;return x!==x||x===0?0:v(x)}},8014:function(E,f,c){var v=c(1291),I=Math.min;E.exports=function(x){var C=v(x);return C>0?I(C,9007199254740991):0}},8981:function(E,f,c){var v=c(7750),I=Object;E.exports=function(x){return I(v(x))}},2777:function(E,f,c){var v=c(9565),I=c(34),x=c(757),C=c(5966),j=c(4270),z=c(8227),F=TypeError,K=z("toPrimitive");E.exports=function(N,P){if(!I(N)||x(N))return N;var $=C(N,K),d;if($){if(P===void 0&&(P="default"),d=v($,N,P),!I(d)||x(d))return d;throw new F("Can't convert object to primitive value")}return P===void 0&&(P="number"),j(N,P)}},6969:function(E,f,c){var v=c(2777),I=c(757);E.exports=function(x){var C=v(x,"string");return I(C)?C:C+""}},2140:function(E,f,c){var v=c(8227),I=v("toStringTag"),x={};x[I]="z",E.exports=String(x)==="[object z]"},655:function(E,f,c){var v=c(6955),I=String;E.exports=function(x){if(v(x)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return I(x)}},6823:function(E){var f=String;E.exports=function(c){try{return f(c)}catch{return"Object"}}},3392:function(E,f,c){var v=c(9504),I=0,x=Math.random(),C=v(1 .toString);E.exports=function(j){return"Symbol("+(j===void 0?"":j)+")_"+C(++I+x,36)}},7040:function(E,f,c){var v=c(4495);E.exports=v&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:function(E,f,c){var v=c(3724),I=c(9039);E.exports=v&&I(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},2812:function(E){var f=TypeError;E.exports=function(c,v){if(c<v)throw new f("Not enough arguments");return c}},8622:function(E,f,c){var v=c(4576),I=c(4901),x=v.WeakMap;E.exports=I(x)&&/native code/.test(String(x))},511:function(E,f,c){var v=c(9167),I=c(9297),x=c(1951),C=c(4913).f;E.exports=function(j){var z=v.Symbol||(v.Symbol={});I(z,j)||C(z,j,{value:x.f(j)})}},1951:function(E,f,c){var v=c(8227);f.f=v},8227:function(E,f,c){var v=c(4576),I=c(5745),x=c(9297),C=c(3392),j=c(4495),z=c(7040),F=v.Symbol,K=I("wks"),N=z?F.for||F:F&&F.withoutSetter||C;E.exports=function(P){return x(K,P)||(K[P]=j&&x(F,P)?F[P]:N("Symbol."+P)),K[P]}},7452:function(E){E.exports=`
122
- \v\f\r                 \u2028\u2029\uFEFF`},4601:function(E,f,c){var v=c(7751),I=c(9297),x=c(6699),C=c(1625),j=c(2967),z=c(7740),F=c(1056),K=c(3167),N=c(2603),P=c(7584),$=c(747),d=c(3724),M=c(6395);E.exports=function(U,J,H,Y){var ee="stackTraceLimit",q=Y?2:1,se=U.split("."),re=se[se.length-1],ue=v.apply(null,se);if(ue){var xe=ue.prototype;if(!M&&I(xe,"cause")&&delete xe.cause,!H)return ue;var he=v("Error"),G=J(function(we,Ae){var Ie=N(Y?Ae:we,void 0),He=Y?new ue(we):new ue;return Ie!==void 0&&x(He,"message",Ie),$(He,G,He.stack,2),this&&C(xe,this)&&K(He,this,G),arguments.length>q&&P(He,arguments[q]),He});if(G.prototype=xe,re!=="Error"?j?j(G,he):z(G,he,{name:!0}):d&&ee in ue&&(F(G,ue,ee),F(G,ue,"prepareStackTrace")),z(G,ue),!M)try{xe.name!==re&&x(xe,"name",re),xe.constructor=G}catch{}return G}}},8706:function(E,f,c){var v=c(6518),I=c(9039),x=c(4376),C=c(34),j=c(8981),z=c(6198),F=c(6837),K=c(4659),N=c(1469),P=c(597),$=c(8227),d=c(9519),M=$("isConcatSpreadable"),U=d>=51||!I(function(){var Y=[];return Y[M]=!1,Y.concat()[0]!==Y}),J=function(Y){if(!C(Y))return!1;var ee=Y[M];return ee!==void 0?!!ee:x(Y)},H=!U||!P("concat");v({target:"Array",proto:!0,arity:1,forced:H},{concat:function(ee){var q=j(this),se=N(q,0),re=0,ue,xe,he,G,we;for(ue=-1,he=arguments.length;ue<he;ue++)if(we=ue===-1?q:arguments[ue],J(we))for(G=z(we),F(re+G),xe=0;xe<G;xe++,re++)xe in we&&K(se,re,we[xe]);else F(re+1),K(se,re++,we);return se.length=re,se}})},2008:function(E,f,c){var v=c(6518),I=c(9213).filter,x=c(597),C=x("filter");v({target:"Array",proto:!0,forced:!C},{filter:function(z){return I(this,z,arguments.length>1?arguments[1]:void 0)}})},113:function(E,f,c){var v=c(6518),I=c(9213).find,x=c(6469),C="find",j=!0;C in[]&&Array(1)[C](function(){j=!1}),v({target:"Array",proto:!0,forced:j},{find:function(F){return I(this,F,arguments.length>1?arguments[1]:void 0)}}),x(C)},3418:function(E,f,c){var v=c(6518),I=c(7916),x=c(4428),C=!x(function(j){Array.from(j)});v({target:"Array",stat:!0,forced:C},{from:I})},4423:function(E,f,c){var v=c(6518),I=c(9617).includes,x=c(9039),C=c(6469),j=x(function(){return!Array(1).includes()});v({target:"Array",proto:!0,forced:j},{includes:function(F){return I(this,F,arguments.length>1?arguments[1]:void 0)}}),C("includes")},3792:function(E,f,c){var v=c(5397),I=c(6469),x=c(6269),C=c(1181),j=c(4913).f,z=c(1088),F=c(2529),K=c(6395),N=c(3724),P="Array Iterator",$=C.set,d=C.getterFor(P);E.exports=z(Array,"Array",function(U,J){$(this,{type:P,target:v(U),index:0,kind:J})},function(){var U=d(this),J=U.target,H=U.index++;if(!J||H>=J.length)return U.target=null,F(void 0,!0);switch(U.kind){case"keys":return F(H,!1);case"values":return F(J[H],!1)}return F([H,J[H]],!1)},"values");var M=x.Arguments=x.Array;if(I("keys"),I("values"),I("entries"),!K&&N&&M.name!=="values")try{j(M,"name",{value:"values"})}catch{}},8598:function(E,f,c){var v=c(6518),I=c(9504),x=c(7055),C=c(5397),j=c(4598),z=I([].join),F=x!==Object,K=F||!j("join",",");v({target:"Array",proto:!0,forced:K},{join:function(P){return z(C(this),P===void 0?",":P)}})},2062:function(E,f,c){var v=c(6518),I=c(9213).map,x=c(597),C=x("map");v({target:"Array",proto:!0,forced:!C},{map:function(z){return I(this,z,arguments.length>1?arguments[1]:void 0)}})},4114:function(E,f,c){var v=c(6518),I=c(8981),x=c(6198),C=c(4527),j=c(6837),z=c(9039),F=z(function(){return[].push.call({length:4294967296},1)!==4294967297}),K=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(P){return P instanceof TypeError}},N=F||!K();v({target:"Array",proto:!0,arity:1,forced:N},{push:function($){var d=I(this),M=x(d),U=arguments.length;j(M+U);for(var J=0;J<U;J++)d[M]=arguments[J],M++;return C(d,M),M}})},4782:function(E,f,c){var v=c(6518),I=c(4376),x=c(3517),C=c(34),j=c(5610),z=c(6198),F=c(5397),K=c(4659),N=c(8227),P=c(597),$=c(7680),d=P("slice"),M=N("species"),U=Array,J=Math.max;v({target:"Array",proto:!0,forced:!d},{slice:function(Y,ee){var q=F(this),se=z(q),re=j(Y,se),ue=j(ee===void 0?se:ee,se),xe,he,G;if(I(q)&&(xe=q.constructor,x(xe)&&(xe===U||I(xe.prototype))?xe=void 0:C(xe)&&(xe=xe[M],xe===null&&(xe=void 0)),xe===U||xe===void 0))return $(q,re,ue);for(he=new(xe===void 0?U:xe)(J(ue-re,0)),G=0;re<ue;re++,G++)re in q&&K(he,G,q[re]);return he.length=G,he}})},6910:function(E,f,c){var v=c(6518),I=c(9504),x=c(9306),C=c(8981),j=c(6198),z=c(4606),F=c(655),K=c(9039),N=c(4488),P=c(4598),$=c(3709),d=c(3763),M=c(9519),U=c(3607),J=[],H=I(J.sort),Y=I(J.push),ee=K(function(){J.sort(void 0)}),q=K(function(){J.sort(null)}),se=P("sort"),re=!K(function(){if(M)return M<70;if(!($&&$>3)){if(d)return!0;if(U)return U<603;var he="",G,we,Ae,Ie;for(G=65;G<76;G++){switch(we=String.fromCharCode(G),G){case 66:case 69:case 70:case 72:Ae=3;break;case 68:case 71:Ae=4;break;default:Ae=2}for(Ie=0;Ie<47;Ie++)J.push({k:we+Ie,v:Ae})}for(J.sort(function(He,nt){return nt.v-He.v}),Ie=0;Ie<J.length;Ie++)we=J[Ie].k.charAt(0),he.charAt(he.length-1)!==we&&(he+=we);return he!=="DGBEFHACIJK"}}),ue=ee||!q||!se||!re,xe=function(he){return function(G,we){return we===void 0?-1:G===void 0?1:he!==void 0?+he(G,we)||0:F(G)>F(we)?1:-1}};v({target:"Array",proto:!0,forced:ue},{sort:function(G){G!==void 0&&x(G);var we=C(this);if(re)return G===void 0?H(we):H(we,G);var Ae=[],Ie=j(we),He,nt;for(nt=0;nt<Ie;nt++)nt in we&&Y(Ae,we[nt]);for(N(Ae,xe(G)),He=j(Ae),nt=0;nt<He;)we[nt]=Ae[nt++];for(;nt<Ie;)z(we,nt++);return we}})},739:function(E,f,c){var v=c(6518),I=c(9039),x=c(8981),C=c(2777),j=I(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});v({target:"Date",proto:!0,arity:1,forced:j},{toJSON:function(F){var K=x(this),N=C(K,"number");return typeof N=="number"&&!isFinite(N)?null:K.toISOString()}})},6280:function(E,f,c){var v=c(6518),I=c(4576),x=c(8745),C=c(4601),j="WebAssembly",z=I[j],F=new Error("e",{cause:7}).cause!==7,K=function(P,$){var d={};d[P]=C(P,$,F),v({global:!0,constructor:!0,arity:1,forced:F},d)},N=function(P,$){if(z&&z[P]){var d={};d[P]=C(j+"."+P,$,F),v({target:j,stat:!0,constructor:!0,arity:1,forced:F},d)}};K("Error",function(P){return function(d){return x(P,this,arguments)}}),K("EvalError",function(P){return function(d){return x(P,this,arguments)}}),K("RangeError",function(P){return function(d){return x(P,this,arguments)}}),K("ReferenceError",function(P){return function(d){return x(P,this,arguments)}}),K("SyntaxError",function(P){return function(d){return x(P,this,arguments)}}),K("TypeError",function(P){return function(d){return x(P,this,arguments)}}),K("URIError",function(P){return function(d){return x(P,this,arguments)}}),N("CompileError",function(P){return function(d){return x(P,this,arguments)}}),N("LinkError",function(P){return function(d){return x(P,this,arguments)}}),N("RuntimeError",function(P){return function(d){return x(P,this,arguments)}})},2010:function(E,f,c){var v=c(3724),I=c(350).EXISTS,x=c(9504),C=c(2106),j=Function.prototype,z=x(j.toString),F=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,K=x(F.exec),N="name";v&&!I&&C(j,N,{configurable:!0,get:function(){try{return K(F,z(this))[1]}catch{return""}}})},3110:function(E,f,c){var v=c(6518),I=c(7751),x=c(8745),C=c(9565),j=c(9504),z=c(9039),F=c(4901),K=c(757),N=c(7680),P=c(6933),$=c(4495),d=String,M=I("JSON","stringify"),U=j(/./.exec),J=j("".charAt),H=j("".charCodeAt),Y=j("".replace),ee=j(1 .toString),q=/[\uD800-\uDFFF]/g,se=/^[\uD800-\uDBFF]$/,re=/^[\uDC00-\uDFFF]$/,ue=!$||z(function(){var we=I("Symbol")("stringify detection");return M([we])!=="[null]"||M({a:we})!=="{}"||M(Object(we))!=="{}"}),xe=z(function(){return M("\uDF06\uD834")!=='"\\udf06\\ud834"'||M("\uDEAD")!=='"\\udead"'}),he=function(we,Ae){var Ie=N(arguments),He=P(Ae);if(!(!F(He)&&(we===void 0||K(we))))return Ie[1]=function(nt,Xe){if(F(He)&&(Xe=C(He,this,d(nt),Xe)),!K(Xe))return Xe},x(M,null,Ie)},G=function(we,Ae,Ie){var He=J(Ie,Ae-1),nt=J(Ie,Ae+1);return U(se,we)&&!U(re,nt)||U(re,we)&&!U(se,He)?"\\u"+ee(H(we,0),16):we};M&&v({target:"JSON",stat:!0,arity:3,forced:ue||xe},{stringify:function(Ae,Ie,He){var nt=N(arguments),Xe=x(ue?he:M,null,nt);return xe&&typeof Xe=="string"?Y(Xe,q,G):Xe}})},8523:function(E,f,c){var v=c(6468),I=c(6938);v("Map",function(x){return function(){return x(this,arguments.length?arguments[0]:void 0)}},I)},6033:function(E,f,c){c(8523)},761:function(E,f,c){var v=c(6518),I=c(741);v({target:"Math",stat:!0},{trunc:I})},2892:function(E,f,c){var v=c(6518),I=c(6395),x=c(3724),C=c(4576),j=c(9167),z=c(9504),F=c(2796),K=c(9297),N=c(3167),P=c(1625),$=c(757),d=c(2777),M=c(9039),U=c(8480).f,J=c(7347).f,H=c(4913).f,Y=c(1240),ee=c(3802).trim,q="Number",se=C[q],re=j[q],ue=se.prototype,xe=C.TypeError,he=z("".slice),G=z("".charCodeAt),we=function(it){var ht=d(it,"number");return typeof ht=="bigint"?ht:Ae(ht)},Ae=function(it){var ht=d(it,"number"),be,Qe,st,Xt,Gt,gn,ut,In;if($(ht))throw new xe("Cannot convert a Symbol value to a number");if(typeof ht=="string"&&ht.length>2){if(ht=ee(ht),be=G(ht,0),be===43||be===45){if(Qe=G(ht,2),Qe===88||Qe===120)return NaN}else if(be===48){switch(G(ht,1)){case 66:case 98:st=2,Xt=49;break;case 79:case 111:st=8,Xt=55;break;default:return+ht}for(Gt=he(ht,2),gn=Gt.length,ut=0;ut<gn;ut++)if(In=G(Gt,ut),In<48||In>Xt)return NaN;return parseInt(Gt,st)}}return+ht},Ie=F(q,!se(" 0o1")||!se("0b1")||se("+0x1")),He=function(it){return P(ue,it)&&M(function(){Y(it)})},nt=function(ht){var be=arguments.length<1?0:se(we(ht));return He(this)?N(Object(be),this,nt):be};nt.prototype=ue,Ie&&!I&&(ue.constructor=nt),v({global:!0,constructor:!0,wrap:!0,forced:Ie},{Number:nt});var Xe=function(it,ht){for(var be=x?U(ht):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Qe=0,st;be.length>Qe;Qe++)K(ht,st=be[Qe])&&!K(it,st)&&H(it,st,J(ht,st))};I&&re&&Xe(j[q],re),(Ie||I)&&Xe(j[q],se)},5374:function(E,f,c){var v=c(6518);v({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},2337:function(E,f,c){var v=c(6518),I=c(9504),x=c(1291),C=c(1240),j=c(2333),z=c(9340),F=c(9039),K=RangeError,N=String,P=isFinite,$=Math.abs,d=Math.floor,M=Math.pow,U=Math.round,J=I(1 .toExponential),H=I(j),Y=I("".slice),ee=J(-69e-12,4)==="-6.9000e-11"&&J(1.255,2)==="1.25e+0"&&J(12345,3)==="1.235e+4"&&J(25,0)==="3e+1",q=function(){return F(function(){J(1,1/0)})&&F(function(){J(1,-1/0)})},se=function(){return!F(function(){J(1/0,1/0),J(NaN,1/0)})},re=!ee||!q()||!se();v({target:"Number",proto:!0,forced:re},{toExponential:function(xe){var he=C(this);if(xe===void 0)return J(he);var G=x(xe);if(!P(he))return String(he);if(G<0||G>20)throw new K("Incorrect fraction digits");if(ee)return J(he,G);var we="",Ae,Ie,He,nt;if(he<0&&(we="-",he=-he),he===0)Ie=0,Ae=H("0",G+1);else{var Xe=z(he);Ie=d(Xe);var it=M(10,Ie-G),ht=U(he/it);2*he>=(2*ht+1)*it&&(ht+=1),ht>=M(10,G+1)&&(ht/=10,Ie+=1),Ae=N(ht)}return G!==0&&(Ae=Y(Ae,0,1)+"."+Y(Ae,1)),Ie===0?(He="+",nt="0"):(He=Ie>0?"+":"-",nt=N($(Ie))),Ae+="e"+He+nt,we+Ae}})},9868:function(E,f,c){var v=c(6518),I=c(9504),x=c(1291),C=c(1240),j=c(2333),z=c(9039),F=RangeError,K=String,N=Math.floor,P=I(j),$=I("".slice),d=I(1 .toFixed),M=function(q,se,re){return se===0?re:se%2===1?M(q,se-1,re*q):M(q*q,se/2,re)},U=function(q){for(var se=0,re=q;re>=4096;)se+=12,re/=4096;for(;re>=2;)se+=1,re/=2;return se},J=function(q,se,re){for(var ue=-1,xe=re;++ue<6;)xe+=se*q[ue],q[ue]=xe%1e7,xe=N(xe/1e7)},H=function(q,se){for(var re=6,ue=0;--re>=0;)ue+=q[re],q[re]=N(ue/se),ue=ue%se*1e7},Y=function(q){for(var se=6,re="";--se>=0;)if(re!==""||se===0||q[se]!==0){var ue=K(q[se]);re=re===""?ue:re+P("0",7-ue.length)+ue}return re},ee=z(function(){return d(8e-5,3)!=="0.000"||d(.9,0)!=="1"||d(1.255,2)!=="1.25"||d(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!z(function(){d({})});v({target:"Number",proto:!0,forced:ee},{toFixed:function(se){var re=C(this),ue=x(se),xe=[0,0,0,0,0,0],he="",G="0",we,Ae,Ie,He;if(ue<0||ue>20)throw new F("Incorrect fraction digits");if(re!==re)return"NaN";if(re<=-1e21||re>=1e21)return K(re);if(re<0&&(he="-",re=-re),re>1e-21)if(we=U(re*M(2,69,1))-69,Ae=we<0?re*M(2,-we,1):re/M(2,we,1),Ae*=4503599627370496,we=52-we,we>0){for(J(xe,0,Ae),Ie=ue;Ie>=7;)J(xe,1e7,0),Ie-=7;for(J(xe,M(10,Ie,1),0),Ie=we-1;Ie>=23;)H(xe,8388608),Ie-=23;H(xe,1<<Ie),J(xe,1,1),H(xe,2),G=Y(xe)}else J(xe,0,Ae),J(xe,1<<-we,0),G=Y(xe)+P("0",ue);return ue>0?(He=G.length,G=he+(He<=ue?"0."+P("0",ue-He)+G:$(G,0,He-ue)+"."+$(G,He-ue))):G=he+G,G}})},3851:function(E,f,c){var v=c(6518),I=c(9039),x=c(5397),C=c(7347).f,j=c(3724),z=!j||I(function(){C(1)});v({target:"Object",stat:!0,forced:z,sham:!j},{getOwnPropertyDescriptor:function(K,N){return C(x(K),N)}})},1278:function(E,f,c){var v=c(6518),I=c(3724),x=c(5031),C=c(5397),j=c(7347),z=c(4659);v({target:"Object",stat:!0,sham:!I},{getOwnPropertyDescriptors:function(K){for(var N=C(K),P=j.f,$=x(N),d={},M=0,U,J;$.length>M;)J=P(N,U=$[M++]),J!==void 0&&z(d,U,J);return d}})},9773:function(E,f,c){var v=c(6518),I=c(4495),x=c(9039),C=c(3717),j=c(8981),z=!I||x(function(){C.f(1)});v({target:"Object",stat:!0,forced:z},{getOwnPropertySymbols:function(K){var N=C.f;return N?N(j(K)):[]}})},9432:function(E,f,c){var v=c(6518),I=c(8981),x=c(1072),C=c(9039),j=C(function(){x(1)});v({target:"Object",stat:!0,forced:j},{keys:function(F){return x(I(F))}})},6099:function(E,f,c){var v=c(2140),I=c(6840),x=c(3179);v||I(Object.prototype,"toString",x,{unsafe:!0})},6034:function(E,f,c){var v=c(6518),I=c(2357).values;v({target:"Object",stat:!0},{values:function(C){return I(C)}})},8940:function(E,f,c){var v=c(6518),I=c(2703);v({global:!0,forced:parseInt!==I},{parseInt:I})},6499:function(E,f,c){var v=c(6518),I=c(9565),x=c(9306),C=c(6043),j=c(1103),z=c(2652),F=c(537);v({target:"Promise",stat:!0,forced:F},{all:function(N){var P=this,$=C.f(P),d=$.resolve,M=$.reject,U=j(function(){var J=x(P.resolve),H=[],Y=0,ee=1;z(N,function(q){var se=Y++,re=!1;ee++,I(J,P,q).then(function(ue){re||(re=!0,H[se]=ue,--ee||d(H))},M)}),--ee||d(H)});return U.error&&M(U.value),$.promise}})},2003:function(E,f,c){var v=c(6518),I=c(6395),x=c(916).CONSTRUCTOR,C=c(550),j=c(7751),z=c(4901),F=c(6840),K=C&&C.prototype;if(v({target:"Promise",proto:!0,forced:x,real:!0},{catch:function(P){return this.then(void 0,P)}}),!I&&z(C)){var N=j("Promise").prototype.catch;K.catch!==N&&F(K,"catch",N,{unsafe:!0})}},436:function(E,f,c){var v=c(6518),I=c(6395),x=c(8574),C=c(4576),j=c(9565),z=c(6840),F=c(2967),K=c(687),N=c(7633),P=c(9306),$=c(4901),d=c(34),M=c(679),U=c(2293),J=c(9225).set,H=c(1955),Y=c(3138),ee=c(1103),q=c(8265),se=c(1181),re=c(550),ue=c(916),xe=c(6043),he="Promise",G=ue.CONSTRUCTOR,we=ue.REJECTION_EVENT,Ae=ue.SUBCLASSING,Ie=se.getterFor(he),He=se.set,nt=re&&re.prototype,Xe=re,it=nt,ht=C.TypeError,be=C.document,Qe=C.process,st=xe.f,Xt=st,Gt=!!(be&&be.createEvent&&C.dispatchEvent),gn="unhandledrejection",ut="rejectionhandled",In=0,Fn=1,hr=2,wr=1,pr=2,Kn,$t,Sn,bn,Ye=function(at){var Vt;return d(at)&&$(Vt=at.then)?Vt:!1},Tt=function(at,Vt){var Dn=Vt.value,lt=Vt.state===Fn,un=lt?at.ok:at.fail,Ur=at.resolve,Cr=at.reject,Br=at.domain,It,ln,tn;try{un?(lt||(Vt.rejection===pr&&qr(Vt),Vt.rejection=wr),un===!0?It=Dn:(Br&&Br.enter(),It=un(Dn),Br&&(Br.exit(),tn=!0)),It===at.promise?Cr(new ht("Promise-chain cycle")):(ln=Ye(It))?j(ln,It,Ur,Cr):Ur(It)):Cr(Dn)}catch(cn){Br&&!tn&&Br.exit(),Cr(cn)}},Et=function(at,Vt){at.notified||(at.notified=!0,H(function(){for(var Dn=at.reactions,lt;lt=Dn.get();)Tt(lt,at);at.notified=!1,Vt&&!at.rejection&&nr(at)}))},On=function(at,Vt,Dn){var lt,un;Gt?(lt=be.createEvent("Event"),lt.promise=Vt,lt.reason=Dn,lt.initEvent(at,!1,!0),C.dispatchEvent(lt)):lt={promise:Vt,reason:Dn},!we&&(un=C["on"+at])?un(lt):at===gn&&Y("Unhandled promise rejection",Dn)},nr=function(at){j(J,C,function(){var Vt=at.facade,Dn=at.value,lt=Lr(at),un;if(lt&&(un=ee(function(){x?Qe.emit("unhandledRejection",Dn,Vt):On(gn,Vt,Dn)}),at.rejection=x||Lr(at)?pr:wr,un.error))throw un.value})},Lr=function(at){return at.rejection!==wr&&!at.parent},qr=function(at){j(J,C,function(){var Vt=at.facade;x?Qe.emit("rejectionHandled",Vt):On(ut,Vt,at.value)})},Kt=function(at,Vt,Dn){return function(lt){at(Vt,lt,Dn)}},ct=function(at,Vt,Dn){at.done||(at.done=!0,Dn&&(at=Dn),at.value=Vt,at.state=hr,Et(at,!0))},Nn=function(at,Vt,Dn){if(!at.done){at.done=!0,Dn&&(at=Dn);try{if(at.facade===Vt)throw new ht("Promise can't be resolved itself");var lt=Ye(Vt);lt?H(function(){var un={done:!1};try{j(lt,Vt,Kt(Nn,un,at),Kt(ct,un,at))}catch(Ur){ct(un,Ur,at)}}):(at.value=Vt,at.state=Fn,Et(at,!1))}catch(un){ct({done:!1},un,at)}}};if(G&&(Xe=function(Vt){M(this,it),P(Vt),j(Kn,this);var Dn=Ie(this);try{Vt(Kt(Nn,Dn),Kt(ct,Dn))}catch(lt){ct(Dn,lt)}},it=Xe.prototype,Kn=function(Vt){He(this,{type:he,done:!1,notified:!1,parent:!1,reactions:new q,rejection:!1,state:In,value:null})},Kn.prototype=z(it,"then",function(Vt,Dn){var lt=Ie(this),un=st(U(this,Xe));return lt.parent=!0,un.ok=$(Vt)?Vt:!0,un.fail=$(Dn)&&Dn,un.domain=x?Qe.domain:void 0,lt.state===In?lt.reactions.add(un):H(function(){Tt(un,lt)}),un.promise}),$t=function(){var at=new Kn,Vt=Ie(at);this.promise=at,this.resolve=Kt(Nn,Vt),this.reject=Kt(ct,Vt)},xe.f=st=function(at){return at===Xe||at===Sn?new $t(at):Xt(at)},!I&&$(re)&&nt!==Object.prototype)){bn=nt.then,Ae||z(nt,"then",function(Vt,Dn){var lt=this;return new Xe(function(un,Ur){j(bn,lt,un,Ur)}).then(Vt,Dn)},{unsafe:!0});try{delete nt.constructor}catch{}F&&F(nt,it)}v({global:!0,constructor:!0,wrap:!0,forced:G},{Promise:Xe}),K(Xe,he,!1,!0),N(he)},3362:function(E,f,c){c(436),c(6499),c(2003),c(7743),c(1481),c(280)},7743:function(E,f,c){var v=c(6518),I=c(9565),x=c(9306),C=c(6043),j=c(1103),z=c(2652),F=c(537);v({target:"Promise",stat:!0,forced:F},{race:function(N){var P=this,$=C.f(P),d=$.reject,M=j(function(){var U=x(P.resolve);z(N,function(J){I(U,P,J).then($.resolve,d)})});return M.error&&d(M.value),$.promise}})},1481:function(E,f,c){var v=c(6518),I=c(6043),x=c(916).CONSTRUCTOR;v({target:"Promise",stat:!0,forced:x},{reject:function(j){var z=I.f(this),F=z.reject;return F(j),z.promise}})},280:function(E,f,c){var v=c(6518),I=c(7751),x=c(6395),C=c(550),j=c(916).CONSTRUCTOR,z=c(3438),F=I("Promise"),K=x&&!j;v({target:"Promise",stat:!0,forced:x||j},{resolve:function(P){return z(K&&this===F?C:this,P)}})},825:function(E,f,c){var v=c(6518),I=c(7751),x=c(8745),C=c(566),j=c(5548),z=c(8551),F=c(34),K=c(2360),N=c(9039),P=I("Reflect","construct"),$=Object.prototype,d=[].push,M=N(function(){function H(){}return!(P(function(){},[],H)instanceof H)}),U=!N(function(){P(function(){})}),J=M||U;v({target:"Reflect",stat:!0,forced:J,sham:J},{construct:function(Y,ee){j(Y),z(ee);var q=arguments.length<3?Y:j(arguments[2]);if(U&&!M)return P(Y,ee,q);if(Y===q){switch(ee.length){case 0:return new Y;case 1:return new Y(ee[0]);case 2:return new Y(ee[0],ee[1]);case 3:return new Y(ee[0],ee[1],ee[2]);case 4:return new Y(ee[0],ee[1],ee[2],ee[3])}var se=[null];return x(d,se,ee),new(x(C,Y,se))}var re=q.prototype,ue=K(F(re)?re:$),xe=x(Y,ue,ee);return F(xe)?xe:ue}})},5472:function(E,f,c){var v=c(6518),I=c(4576),x=c(687);v({global:!0},{Reflect:{}}),x(I.Reflect,"Reflect",!0)},7495:function(E,f,c){var v=c(6518),I=c(7323);v({target:"RegExp",proto:!0,forced:/./.exec!==I},{exec:I})},906:function(E,f,c){c(7495);var v=c(6518),I=c(9565),x=c(4901),C=c(8551),j=c(655),z=function(){var K=!1,N=/[ac]/;return N.exec=function(){return K=!0,/./.exec.apply(this,arguments)},N.test("abc")===!0&&K}(),F=/./.test;v({target:"RegExp",proto:!0,forced:!z},{test:function(K){var N=C(this),P=j(K),$=N.exec;if(!x($))return I(F,N,P);var d=I($,N,P);return d===null?!1:(C(d),!0)}})},8781:function(E,f,c){var v=c(350).PROPER,I=c(6840),x=c(8551),C=c(655),j=c(9039),z=c(1034),F="toString",K=RegExp.prototype,N=K[F],P=j(function(){return N.call({source:"a",flags:"b"})!=="/a/b"}),$=v&&N.name!==F;(P||$)&&I(K,F,function(){var M=x(this),U=C(M.source),J=C(z(M));return"/"+U+"/"+J},{unsafe:!0})},2405:function(E,f,c){var v=c(6468),I=c(6938);v("Set",function(x){return function(){return x(this,arguments.length?arguments[0]:void 0)}},I)},1415:function(E,f,c){c(2405)},7764:function(E,f,c){var v=c(8183).charAt,I=c(655),x=c(1181),C=c(1088),j=c(2529),z="String Iterator",F=x.set,K=x.getterFor(z);C(String,"String",function(N){F(this,{type:z,string:I(N),index:0})},function(){var P=K(this),$=P.string,d=P.index,M;return d>=$.length?j(void 0,!0):(M=v($,d),P.index+=M.length,j(M,!1))})},5440:function(E,f,c){var v=c(8745),I=c(9565),x=c(9504),C=c(9228),j=c(9039),z=c(8551),F=c(4901),K=c(34),N=c(1291),P=c(8014),$=c(655),d=c(7750),M=c(7829),U=c(5966),J=c(2478),H=c(6682),Y=c(8227),ee=Y("replace"),q=Math.max,se=Math.min,re=x([].concat),ue=x([].push),xe=x("".indexOf),he=x("".slice),G=function(He){return He===void 0?He:String(He)},we=function(){return"a".replace(/./,"$0")==="$0"}(),Ae=function(){return/./[ee]?/./[ee]("a","$0")==="":!1}(),Ie=!j(function(){var He=/./;return He.exec=function(){var nt=[];return nt.groups={a:"7"},nt},"".replace(He,"$<a>")!=="7"});C("replace",function(He,nt,Xe){var it=Ae?"$":"$0";return[function(be,Qe){var st=d(this),Xt=K(be)?U(be,ee):void 0;return Xt?I(Xt,be,st,Qe):I(nt,$(st),be,Qe)},function(ht,be){var Qe=z(this),st=$(ht);if(typeof be=="string"&&xe(be,it)===-1&&xe(be,"$<")===-1){var Xt=Xe(nt,Qe,st,be);if(Xt.done)return Xt.value}var Gt=F(be);Gt||(be=$(be));var gn=Qe.global,ut;gn&&(ut=Qe.unicode,Qe.lastIndex=0);for(var In=[],Fn;Fn=H(Qe,st),!(Fn===null||(ue(In,Fn),!gn));){var hr=$(Fn[0]);hr===""&&(Qe.lastIndex=M(st,P(Qe.lastIndex),ut))}for(var wr="",pr=0,Kn=0;Kn<In.length;Kn++){Fn=In[Kn];for(var $t=$(Fn[0]),Sn=q(se(N(Fn.index),st.length),0),bn=[],Ye,Tt=1;Tt<Fn.length;Tt++)ue(bn,G(Fn[Tt]));var Et=Fn.groups;if(Gt){var On=re([$t],bn,Sn,st);Et!==void 0&&ue(On,Et),Ye=$(v(be,void 0,On))}else Ye=J($t,st,Sn,bn,Et,be);Sn>=pr&&(wr+=he(st,pr,Sn)+Ye,pr=Sn+$t.length)}return wr+he(st,pr)}]},!Ie||!we||Ae)},6761:function(E,f,c){var v=c(6518),I=c(4576),x=c(9565),C=c(9504),j=c(6395),z=c(3724),F=c(4495),K=c(9039),N=c(9297),P=c(1625),$=c(8551),d=c(5397),M=c(6969),U=c(655),J=c(6980),H=c(2360),Y=c(1072),ee=c(8480),q=c(298),se=c(3717),re=c(7347),ue=c(4913),xe=c(6801),he=c(8773),G=c(6840),we=c(2106),Ae=c(5745),Ie=c(6119),He=c(421),nt=c(3392),Xe=c(8227),it=c(1951),ht=c(511),be=c(8242),Qe=c(687),st=c(1181),Xt=c(9213).forEach,Gt=Ie("hidden"),gn="Symbol",ut="prototype",In=st.set,Fn=st.getterFor(gn),hr=Object[ut],wr=I.Symbol,pr=wr&&wr[ut],Kn=I.RangeError,$t=I.TypeError,Sn=I.QObject,bn=re.f,Ye=ue.f,Tt=q.f,Et=he.f,On=C([].push),nr=Ae("symbols"),Lr=Ae("op-symbols"),qr=Ae("wks"),Kt=!Sn||!Sn[ut]||!Sn[ut].findChild,ct=function(It,ln,tn){var cn=bn(hr,ln);cn&&delete hr[ln],Ye(It,ln,tn),cn&&It!==hr&&Ye(hr,ln,cn)},Nn=z&&K(function(){return H(Ye({},"a",{get:function(){return Ye(this,"a",{value:7}).a}})).a!==7})?ct:Ye,at=function(It,ln){var tn=nr[It]=H(pr);return In(tn,{type:gn,tag:It,description:ln}),z||(tn.description=ln),tn},Vt=function(ln,tn,cn){ln===hr&&Vt(Lr,tn,cn),$(ln);var Pe=M(tn);return $(cn),N(nr,Pe)?(cn.enumerable?(N(ln,Gt)&&ln[Gt][Pe]&&(ln[Gt][Pe]=!1),cn=H(cn,{enumerable:J(0,!1)})):(N(ln,Gt)||Ye(ln,Gt,J(1,H(null))),ln[Gt][Pe]=!0),Nn(ln,Pe,cn)):Ye(ln,Pe,cn)},Dn=function(ln,tn){$(ln);var cn=d(tn),Pe=Y(cn).concat(Br(cn));return Xt(Pe,function(Ne){(!z||x(un,cn,Ne))&&Vt(ln,Ne,cn[Ne])}),ln},lt=function(ln,tn){return tn===void 0?H(ln):Dn(H(ln),tn)},un=function(ln){var tn=M(ln),cn=x(Et,this,tn);return this===hr&&N(nr,tn)&&!N(Lr,tn)?!1:cn||!N(this,tn)||!N(nr,tn)||N(this,Gt)&&this[Gt][tn]?cn:!0},Ur=function(ln,tn){var cn=d(ln),Pe=M(tn);if(!(cn===hr&&N(nr,Pe)&&!N(Lr,Pe))){var Ne=bn(cn,Pe);return Ne&&N(nr,Pe)&&!(N(cn,Gt)&&cn[Gt][Pe])&&(Ne.enumerable=!0),Ne}},Cr=function(ln){var tn=Tt(d(ln)),cn=[];return Xt(tn,function(Pe){!N(nr,Pe)&&!N(He,Pe)&&On(cn,Pe)}),cn},Br=function(It){var ln=It===hr,tn=Tt(ln?Lr:d(It)),cn=[];return Xt(tn,function(Pe){N(nr,Pe)&&(!ln||N(hr,Pe))&&On(cn,nr[Pe])}),cn};F||(wr=function(){if(P(pr,this))throw new $t("Symbol is not a constructor");var ln=!arguments.length||arguments[0]===void 0?void 0:U(arguments[0]),tn=nt(ln),cn=function(Pe){var Ne=this===void 0?I:this;Ne===hr&&x(cn,Lr,Pe),N(Ne,Gt)&&N(Ne[Gt],tn)&&(Ne[Gt][tn]=!1);var Cn=J(1,Pe);try{Nn(Ne,tn,Cn)}catch(Bn){if(!(Bn instanceof Kn))throw Bn;ct(Ne,tn,Cn)}};return z&&Kt&&Nn(hr,tn,{configurable:!0,set:cn}),at(tn,ln)},pr=wr[ut],G(pr,"toString",function(){return Fn(this).tag}),G(wr,"withoutSetter",function(It){return at(nt(It),It)}),he.f=un,ue.f=Vt,xe.f=Dn,re.f=Ur,ee.f=q.f=Cr,se.f=Br,it.f=function(It){return at(Xe(It),It)},z&&(we(pr,"description",{configurable:!0,get:function(){return Fn(this).description}}),j||G(hr,"propertyIsEnumerable",un,{unsafe:!0}))),v({global:!0,constructor:!0,wrap:!0,forced:!F,sham:!F},{Symbol:wr}),Xt(Y(qr),function(It){ht(It)}),v({target:gn,stat:!0,forced:!F},{useSetter:function(){Kt=!0},useSimple:function(){Kt=!1}}),v({target:"Object",stat:!0,forced:!F,sham:!z},{create:lt,defineProperty:Vt,defineProperties:Dn,getOwnPropertyDescriptor:Ur}),v({target:"Object",stat:!0,forced:!F},{getOwnPropertyNames:Cr}),be(),Qe(wr,gn),He[Gt]=!0},9463:function(E,f,c){var v=c(6518),I=c(3724),x=c(4576),C=c(9504),j=c(9297),z=c(4901),F=c(1625),K=c(655),N=c(2106),P=c(7740),$=x.Symbol,d=$&&$.prototype;if(I&&z($)&&(!("description"in d)||$().description!==void 0)){var M={},U=function(){var ue=arguments.length<1||arguments[0]===void 0?void 0:K(arguments[0]),xe=F(d,this)?new $(ue):ue===void 0?$():$(ue);return ue===""&&(M[xe]=!0),xe};P(U,$),U.prototype=d,d.constructor=U;var J=String($("description detection"))==="Symbol(description detection)",H=C(d.valueOf),Y=C(d.toString),ee=/^Symbol\((.*)\)[^)]+$/,q=C("".replace),se=C("".slice);N(d,"description",{configurable:!0,get:function(){var ue=H(this);if(j(M,ue))return"";var xe=Y(ue),he=J?se(xe,7,-1):q(xe,ee,"$1");return he===""?void 0:he}}),v({global:!0,constructor:!0,forced:!0},{Symbol:U})}},1510:function(E,f,c){var v=c(6518),I=c(7751),x=c(9297),C=c(655),j=c(5745),z=c(1296),F=j("string-to-symbol-registry"),K=j("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!z},{for:function(N){var P=C(N);if(x(F,P))return F[P];var $=I("Symbol")(P);return F[P]=$,K[$]=P,$}})},2259:function(E,f,c){var v=c(511);v("iterator")},2675:function(E,f,c){c(6761),c(1510),c(7812),c(3110),c(9773)},7812:function(E,f,c){var v=c(6518),I=c(9297),x=c(757),C=c(6823),j=c(5745),z=c(1296),F=j("symbol-to-string-registry");v({target:"Symbol",stat:!0,forced:!z},{keyFor:function(N){if(!x(N))throw new TypeError(C(N)+" is not a symbol");if(I(F,N))return F[N]}})},3500:function(E,f,c){var v=c(4576),I=c(7400),x=c(9296),C=c(235),j=c(6699),z=function(K){if(K&&K.forEach!==C)try{j(K,"forEach",C)}catch{K.forEach=C}};for(var F in I)I[F]&&z(v[F]&&v[F].prototype);z(x)},2953:function(E,f,c){var v=c(4576),I=c(7400),x=c(9296),C=c(3792),j=c(6699),z=c(687),F=c(8227),K=F("iterator"),N=C.values,P=function(d,M){if(d){if(d[K]!==N)try{j(d,K,N)}catch{d[K]=N}if(z(d,M,!0),I[M]){for(var U in C)if(d[U]!==C[U])try{j(d,U,C[U])}catch{d[U]=C[U]}}}};for(var $ in I)P(v[$]&&v[$].prototype,$);P(x,"DOMTokenList")},5575:function(E,f,c){var v=c(6518),I=c(4576),x=c(9472),C=x(I.setInterval,!0);v({global:!0,bind:!0,forced:I.setInterval!==C},{setInterval:C})},4599:function(E,f,c){var v=c(6518),I=c(4576),x=c(9472),C=x(I.setTimeout,!0);v({global:!0,bind:!0,forced:I.setTimeout!==C},{setTimeout:C})},6031:function(E,f,c){c(5575),c(4599)},7208:function(E,f,c){var v=c(6518),I=c(9565);v({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return I(URL.prototype.toString,this)}})}},L={};function R(E){var f=L[E];if(f!==void 0)return f.exports;var c=L[E]={exports:{}};return T[E].call(c.exports,c,c.exports,R),c.exports}(function(){R.n=function(E){var f=E&&E.__esModule?function(){return E.default}:function(){return E};return R.d(f,{a:f}),f}})(),function(){R.d=function(E,f){for(var c in f)R.o(f,c)&&!R.o(E,c)&&Object.defineProperty(E,c,{enumerable:!0,get:f[c]})}}(),function(){R.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()}(),function(){R.o=function(E,f){return Object.prototype.hasOwnProperty.call(E,f)}}(),function(){R.r=function(E){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(E,"__esModule",{value:!0})}}();var de={};return function(){R.r(de),R.d(de,{newATInternetPlugin:function(){return ao},newConsoleLoggerPlugin:function(){return To},newGovoltePlugin:function(){return Nl},newPageTracker:function(){return ln},newRecommendationTracker:function(){return Os},newStreamTracker:function(){return qo},newTag:function(){return Pr},newTagFromSession:function(){return xt}}),R(2675),R(3851),R(4114),R(1278);function E(W){"@babel/helpers - typeof";return E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Q){return typeof Q}:function(Q){return Q&&typeof Symbol=="function"&&Q.constructor===Symbol&&Q!==Symbol.prototype?"symbol":typeof Q},E(W)}function f(W,Q){if(E(W)!="object"||!W)return W;var O=W[Symbol.toPrimitive];if(O!==void 0){var ne=O.call(W,Q);if(E(ne)!="object")return ne;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Q==="string"?String:Number)(W)}function c(W){var Q=f(W,"string");return E(Q)=="symbol"?Q:Q+""}function v(W,Q,O){return(Q=c(Q))in W?Object.defineProperty(W,Q,{value:O,enumerable:!0,configurable:!0,writable:!0}):W[Q]=O,W}R(9432),R(4423),R(8598),R(2062),R(8706),R(6099),R(8781),R(8940),R(3500),R(2008),R(3110),R(7495),R(5440),R(9868);var x={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let C;const j=new Uint8Array(16);function z(){if(!C){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");C=crypto.getRandomValues.bind(crypto)}return C(j)}const F=[];for(let W=0;W<256;++W)F.push((W+256).toString(16).slice(1));function K(W,Q=0){return(F[W[Q+0]]+F[W[Q+1]]+F[W[Q+2]]+F[W[Q+3]]+"-"+F[W[Q+4]]+F[W[Q+5]]+"-"+F[W[Q+6]]+F[W[Q+7]]+"-"+F[W[Q+8]]+F[W[Q+9]]+"-"+F[W[Q+10]]+F[W[Q+11]]+F[W[Q+12]]+F[W[Q+13]]+F[W[Q+14]]+F[W[Q+15]]).toLowerCase()}function N(W,Q,O){var ge;if(x.randomUUID&&!Q&&!W)return x.randomUUID();W=W||{};const ne=W.random??((ge=W.rng)==null?void 0:ge.call(W))??z();if(ne.length<16)throw new Error("Random bytes length must be >= 16");if(ne[6]=ne[6]&15|64,ne[8]=ne[8]&63|128,Q){if(O=O||0,O<0||O+16>Q.length)throw new RangeError(`UUID byte range ${O}:${O+15} is out of buffer bounds`);for(let je=0;je<16;++je)Q[O+je]=ne[je];return Q}return K(ne)}var P=N,$=Date.now().toString(36);function d(){var W=P().replace(/-/g,"");return"1:".concat($,":").concat(W)}function M(){return[new Date().getTime(),Math.random().toFixed(8).substring(2,10)].join("_")}R(6031),R(6034);var U="_dvp",J=365*2,H="_dvs",Y=1/48,ee="cs_fpid",q=3*30,se="_dvb",re=Y,ue="_dvsl",xe=Y,he=function(W){return W.PAGE_VIEW="pageView",W.SEARCH_QUERY="searchQuery",W.CHOICE="choice",W.OFFER="offer",W.CLICK="click",W.PAGE_HEARTBEAT="pageHeartbeat",W.APP_CRASH="appCrash",W.ERROR_DISPLAYED="errorDisplayed",W.STREAM_WAYPOINT="streamWaypoint",W.STREAM_SEEK="streamSeek",W.STREAM_PAUSE="streamPause",W.STREAM_RESUME="streamResume",W.STREAM_COMPLETE="streamComplete",W.STREAM_BUFFERING="streamBuffering",W.STREAM_BUFFERING_COMPLETE="streamBufferingComplete",W.STREAM_LOAD="streamLoad",W.STREAM_LOAD_COMPLETE="streamLoadComplete",W.STREAM_START="streamStart",W.STREAM_FULLSCREEN="streamFullscreen",W.STREAM_WINDOWED="streamWindowed",W.STREAM_STOP="streamStop",W.STREAM_ERROR="streamError",W.MISSING_CLICK="missingClick",W.SCROLL="scroll",W}({}),G="npo-tag-web";function we(){return"".concat(new Date().toISOString()," ").concat(G)}function Ae(W,Q){if(!(nt>He.DEBUG)){for(var O=arguments.length,ne=new Array(O>2?O-2:0),ge=2;ge<O;ge++)ne[ge-2]=arguments[ge];console.debug("".concat(we()," ").concat(W,": ").concat(Q),ne)}}function Ie(W,Q){if(!(nt>He.WARN)){for(var O=arguments.length,ne=new Array(O>2?O-2:0),ge=2;ge<O;ge++)ne[ge-2]=arguments[ge];console.warn("".concat(we()," ").concat(W,": ").concat(Q),ne)}}var He=function(W){return W[W.DEBUG=0]="DEBUG",W[W.INFO=1]="INFO",W[W.WARN=2]="WARN",W[W.ERROR=3]="ERROR",W}({}),nt=He.DEBUG;function Xe(W){nt=W}R(2010),R(3792),R(1415),R(7764),R(2953),R(5374),R(2892);var it=R(9134),ht=function(Q,O){var ne="";O.conditions.forEach(function(vt){return ne+=vt.name+"".concat(vt.weight)});var ge=Q+O.experiment_name+ne,je=0,qe=new Set;O.conditions.forEach(function(vt){(vt.weight<0||vt.weight>1)&&console.warn(O.experiment_name+" conditions should have weights between 0.0 and 1.0"),je+=vt.weight,qe.add(vt.name)});var tt=200*Number.EPSILON,rt=Math.abs(je-1)>tt;return rt?(console.warn(O.experiment_name+" weights do not sum to one! total= "+je),"default"):qe.size!==O.conditions.length?(console.warn(O.experiment_name+" condition names are not unique!"),"default"):be(ge,O.conditions)},be=function(Q,O){var ne=(0,it.h32)().update(Q).digest(),ge=4294967295,je=Number(ne),qe=[],tt=0;O.forEach(function(vt){var En={name:vt.name,lower:tt,upper:tt+vt.weight*ge};qe.push(En),tt=En.upper});var rt="default";return qe.forEach(function(vt){vt.lower<=je&&vt.upper>=je&&(rt=vt.name)}),rt};R(6280),R(825),R(5472);function Qe(W,Q){if(!(W instanceof Q))throw new TypeError("Cannot call a class as a function")}function st(W,Q){for(var O=0;O<Q.length;O++){var ne=Q[O];ne.enumerable=ne.enumerable||!1,ne.configurable=!0,"value"in ne&&(ne.writable=!0),Object.defineProperty(W,c(ne.key),ne)}}function Xt(W,Q,O){return Q&&st(W.prototype,Q),O&&st(W,O),Object.defineProperty(W,"prototype",{writable:!1}),W}function Gt(W,Q){return Gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,ne){return O.__proto__=ne,O},Gt(W,Q)}function gn(W,Q){if(typeof Q!="function"&&Q!==null)throw new TypeError("Super expression must either be null or a function");W.prototype=Object.create(Q&&Q.prototype,{constructor:{value:W,writable:!0,configurable:!0}}),Object.defineProperty(W,"prototype",{writable:!1}),Q&&Gt(W,Q)}function ut(W){if(W===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return W}function In(W,Q){if(Q&&(E(Q)=="object"||typeof Q=="function"))return Q;if(Q!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ut(W)}function Fn(W){return Fn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Q){return Q.__proto__||Object.getPrototypeOf(Q)},Fn(W)}var hr=function(){function W(Q,O){Qe(this,W),this.clock=O||function(){return new Date},this.tag=Q}return Xt(W,[{key:"getValueFromRaw",value:function(O){var ne=JSON.parse(O),ge=this.clock();if(!(ne.expiresAt&&ne.expiresAt<ge.getTime()))return ne.value}},{key:"create",value:function(O,ne){var ge=void 0;if(ne!=null&&ne.expires){var je=864e5;ge=this.clock().getTime()+ne.expires*je}return{value:O,expiresAt:ge}}}]),W}();function wr(W){var Q=pr();return function(){var O,ne=Fn(W);if(Q){var ge=Fn(this).constructor;O=Reflect.construct(ne,arguments,ge)}else O=ne.apply(this,arguments);return In(this,O)}}function pr(){try{var W=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pr=function(){return!!W})()}var Kn="npotag_",$t="LocalStorage",Sn=function(W){gn(O,W);var Q=wr(O);function O(ne){return Qe(this,O),Q.call(this,$t,ne)}return Xt(O,[{key:"get",value:function(ge){try{var je=localStorage.getItem(Kn+ge);if(!je)return;var qe=this.getValueFromRaw(je);return typeof qe>"u"&&(Ae(this.tag,"Expiring storage item ".concat(ge)),this.remove(ge)),qe}catch(tt){Ae(this.tag,"Error retrieving item ".concat(Kn+ge," from storage: ").concat(tt));return}}},{key:"set",value:function(ge,je,qe){var tt=this.create(je,qe);localStorage.setItem(Kn+ge,JSON.stringify(tt))}},{key:"remove",value:function(ge){Ae(this.tag,"removing item ".concat(Kn+ge)),localStorage.removeItem(Kn+ge)}}]),O}(hr);/*! js-cookie v3.0.5 | MIT */function bn(W){for(var Q=1;Q<arguments.length;Q++){var O=arguments[Q];for(var ne in O)W[ne]=O[ne]}return W}var Ye={read:function(W){return W[0]==='"'&&(W=W.slice(1,-1)),W.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(W){return encodeURIComponent(W).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Tt(W,Q){function O(ge,je,qe){if(!(typeof document>"u")){qe=bn({},Q,qe),typeof qe.expires=="number"&&(qe.expires=new Date(Date.now()+qe.expires*864e5)),qe.expires&&(qe.expires=qe.expires.toUTCString()),ge=encodeURIComponent(ge).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var tt="";for(var rt in qe)qe[rt]&&(tt+="; "+rt,qe[rt]!==!0&&(tt+="="+qe[rt].split(";")[0]));return document.cookie=ge+"="+W.write(je,ge)+tt}}function ne(ge){if(!(typeof document>"u"||arguments.length&&!ge)){for(var je=document.cookie?document.cookie.split("; "):[],qe={},tt=0;tt<je.length;tt++){var rt=je[tt].split("="),vt=rt.slice(1).join("=");try{var En=decodeURIComponent(rt[0]);if(qe[En]=W.read(vt,En),ge===En)break}catch{}}return ge?qe[ge]:qe}}return Object.create({set:O,get:ne,remove:function(ge,je){O(ge,"",bn({},je,{expires:-1}))},withAttributes:function(ge){return Tt(this.converter,bn({},this.attributes,ge))},withConverter:function(ge){return Tt(bn({},this.converter,ge),this.attributes)}},{attributes:{value:Object.freeze(Q)},converter:{value:Object.freeze(W)}})}var Et=Tt(Ye,{path:"/"}),On=function(){function W(){Qe(this,W)}return Xt(W,[{key:"get",value:function(O){return Et.get(O)}},{key:"set",value:function(O,ne,ge){Et.set(O,ne,{expires:ge&&ge.expires})}},{key:"remove",value:function(O){Et.remove(O)}}]),W}();function nr(W){var Q=Lr();return function(){var O,ne=Fn(W);if(Q){var ge=Fn(this).constructor;O=Reflect.construct(ne,arguments,ge)}else O=ne.apply(this,arguments);return In(this,O)}}function Lr(){try{var W=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lr=function(){return!!W})()}var qr="MemoryStorage",Kt=function(W){gn(O,W);var Q=nr(O);function O(ne){var ge;return Qe(this,O),ge=Q.call(this,qr,ne),ge.store={},ge}return Xt(O,[{key:"get",value:function(ge){try{var je=this.store[ge];if(!je)return;var qe=this.getValueFromRaw(je);return typeof qe>"u"&&(Ae(this.tag,"Expiring storage item ".concat(ge)),this.remove(ge)),qe}catch(tt){Ae(this.tag,"Error retrieving item ".concat(ge," from storage: ").concat(tt));return}}},{key:"set",value:function(ge,je,qe){var tt=this.create(je,qe);this.store[ge]=JSON.stringify(tt)}},{key:"remove",value:function(ge){delete this.store[ge]}}]),O}(hr),ct="Storage",Nn=void 0;function at(){var W=void 0;if(Nn)return Nn;var Q="npo_tag_storage_tester",O=(Math.random()*20428572).toFixed(0);try{if(window&&window.localStorage){W=new Sn,W.set(Q,O,{expires:1});var ne=W.get(Q);if(W.remove(Q),ne!==O)throw new Error("magic value mismatch");Nn=W}}catch(je){Ie(ct,"Not using local storage because: ",je)}if(!Nn)try{Ae(ct,"Try cookie storage"),W=new On,W.set(Q,O,{expires:1});var ge=W.get(Q);if(W.remove(Q),ge!==O)throw new Error("magic value mismatch");Nn=W}catch(je){Ie(ct,"Not using cookie storage because: ",je)}return Nn||(Ae(ct,"Falling back to memory storage"),Nn=new Kt),Nn}var Vt=function(){return Nn||(Ie(ct,"Storage used before being created?"),Nn=at()),Nn},Dn=function(W){return W[W.SCROLL_25=25]="SCROLL_25",W[W.SCROLL_50=50]="SCROLL_50",W[W.SCROLL_75=75]="SCROLL_75",W[W.SCROLL_100=100]="SCROLL_100",W}({});function lt(W,Q){var O=Object.keys(W);if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(W);Q&&(ne=ne.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),O.push.apply(O,ne)}return O}function un(W){for(var Q=1;Q<arguments.length;Q++){var O=arguments[Q]!=null?arguments[Q]:{};Q%2?lt(Object(O),!0).forEach(function(ne){v(W,ne,O[ne])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(O)):lt(Object(O)).forEach(function(ne){Object.defineProperty(W,ne,Object.getOwnPropertyDescriptor(O,ne))})}return W}var Ur="PageTracker",Cr="home",Br="https://nmonpoendpoint.2cnt.net?vendor=at",It=10*1e3;function ln(W,Q){var O=un(un({},Q),{},{pageViewId:d()});if(W.getContext().disableNmoDam!==!0){var ne=tn();Cn(ne),O=un(un({},O),{},{nmoid:ne})}var ge=null,je=function(){Ji(he.PAGE_HEARTBEAT,W,O)},qe=function(){ge||(ge=window.setInterval(function(){je()},It))},tt=function(){ge!==null&&(window.clearInterval(ge),ge=null)},rt=function(){document.hidden?tt():qe()};O.heartbeat_enabled&&(document.addEventListener("visibilitychange",function(){rt()}),rt());var vt=0;return{npoTag:W,pageContext:O,abAssign:function(or){var Qn=W.getContext().user_profile||W.getContext().user_pseudoid||W.getParty(),Xn=ht(Qn,or);return this.pageContext.experiment=or.experiment_name,this.pageContext.condition=Xn,Xn},pageView:function(){return Ji(he.PAGE_VIEW,W,O)},click:function(or){return Ji(he.CLICK,W,un(un({},O),or))},errorDisplayed:function(or){Ji(he.ERROR_DISPLAYED,W,un({},O),un({},or))},sendPageHeartbeat:je,scroll:function(or){var Qn=or.scroll_percentage;if(!(Q!=null&&Q.scroll_tracking)){console.warn("You must enable scroll tracking in the pageContext to track scroll events");return}for(var Xn=Object.values(Dn),_t=0,qt=Xn;_t<qt.length;_t++){var vn=qt[_t];Qn>=vn&&vt<vn&&(vt=vn,Ji(he.SCROLL,W,un({},O),un(un({},or),{},{scroll_percentage:vt})))}}}}function tn(){var W=Vt().get(ee);if(W)return Ae(Ur,"Using nmoId: ".concat(W)),W;var Q=M();return Ae(Ur,"Generated new nmoId: ".concat(Q)),cn(Q),Q}function cn(W){Vt().set(ee,W,{expires:q})}var Pe,Ne;function Cn(W){if(Pe===void 0)try{sessionStorage.getItem(W),Pe=!0}catch{Pe=!1}if(!(Pe&&sessionStorage.getItem(W)==="sent")&&!(!Pe&&Ne)){Ae(Ur,"Sending nmoId to Kantar",W);var Q=Br+"&cs_fpid="+W;if(typeof navigator.sendBeacon>"u"||navigator.sendBeacon(Q)===!1){var O=new Image;O.src=Q}Pe&&sessionStorage.setItem(W,"sent"),Ne=!0}}var Bn=function(){var Q=function(){return document.body||document.getElementsByTagName("body").item(0)},O=function(){return window.screen.availWidth},ne=function(){return window.screen.availHeight},ge=function(){return window.innerWidth||document.documentElement.clientWidth||Q().clientWidth||document.documentElement.offsetWidth||Q().offsetWidth},je=function(){return window.innerHeight||document.documentElement.clientHeight||Q().clientHeight||document.documentElement.offsetHeight||Q().offsetHeight},qe=function(){var En,or=screen,Qn=((En=screen.orientation)===null||En===void 0?void 0:En.type)||or.mozOrientation||or.msOrientation;if(Qn)return Qn;if(window.orientation!==void 0)switch(window.orientation){case 0:return"portrait-primary";case 90:return"landscape-primary";case 180:return"portrait-secondary";case-90:return"landscape-secondary"}return ge()>je()?"landscape-primary":"portrait-primary"},tt=function(){return window.location.href},rt=function(){return document.referrer||void 0};return{getScreenWidth:O,getScreenHeight:ne,getWindowWidth:ge,getWindowHeight:je,getScreenOrientation:qe,getLocation:tt,getReferrer:rt}};R(3362),R(113);function Jn(W){return new Promise(function(Q){return setTimeout(Q,W)})}function mn(W){return new Date(W).getTime()}function io(W){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Date.now(),O=new Intl.DateTimeFormat("en-GB",{timeZone:"Europe/Amsterdam",year:"numeric",month:"2-digit",day:"2-digit"}),ne=O.formatToParts(Q),ge=ne.find(function(rt){return rt.type==="year"}).value,je=ne.find(function(rt){return rt.type==="month"}).value,qe=ne.find(function(rt){return rt.type==="day"}).value,tt=new Date("".concat(ge,"-").concat(je,"-").concat(qe,"T00:00:00.000+01:00")).getTime();return W<tt}function yo(W,Q){var O=Object.keys(W);if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(W);Q&&(ne=ne.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),O.push.apply(O,ne)}return O}function rr(W){for(var Q=1;Q<arguments.length;Q++){var O=arguments[Q]!=null?arguments[Q]:{};Q%2?yo(Object(O),!0).forEach(function(ne){v(W,ne,O[ne])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(O)):yo(Object(O)).forEach(function(ne){Object.defineProperty(W,ne,Object.getOwnPropertyDescriptor(O,ne))})}return W}var Mr="NPOTag",So=["dev","preprod","prod"],ei={user_subscription:"anonymous"};function Pr(W,Q,O){return Kr(W,Q,O)}var Kr=function(Q,O,ne){if(!(typeof window>"u")){var ge=at(),je=Q.serializedSessionInfo?JSON.parse(Q.serializedSessionInfo):void 0,qe=function(At){if(At.environment===void 0||So.includes(At.environment))return!0;var Tn=So.map(function(Wn){return"'".concat(Wn,"'")}).join(", ");return Ie(Mr,"Invalid environment type. Must be one of ".concat(Tn,". Received: '").concat(At.environment,"'. Environment will be ignored.")),!1},tt=rr(rr(rr({},ei),Q),{},{environment:qe(Q)?Q.environment:void 0});Q.debug?Xe(He.DEBUG):Xe(ne??He.ERROR),Q.disableNmoDam&&Ie(Mr,"Disabling the NMO-DAM measurement in the NPOTag risks running old/incompatible implementations that may harm representation in the NMO-DAM statistics. Doing so is at your own risk.");var rt=(je==null?void 0:je.govoltePartyId)||ge.get(U),vt=rt||d(),En=!rt;Ae(Mr,"".concat(En?"Generated new":"Using"," partyId: ").concat(vt));var or=function(){var At=(je==null?void 0:je.sessionId)||ge.get(H),Tn=ge.get(se),Wn=tt.brand_id.toString(),zr=ge.get(ue),uo=Tn&&Tn!==Wn,is=Date.now(),Oi=null;if(zr)try{var mi=JSON.parse(zr);Oi=mi.value?parseInt(mi.value,10):parseInt(zr,10)}catch{Oi=parseInt(zr,10)}var ni=Oi&&!isNaN(Oi)?io(Oi,is):!1,Jt,fn=!1;return!At||uo||ni?(Jt=d(),fn=!0,ge.set(Jt,"",{expires:Y}),uo&&Ae(Mr,"Brand ID changed from ".concat(Tn," to ").concat(Wn,", generating new sessionId: ").concat(Jt)),ni&&Ae(Mr,"Session was used before last midnight CET, generating new sessionId: ".concat(Jt))):Jt=At,ge.set(se,Wn,{expires:re}),Ae(Mr,"".concat(fn?"Generated new":"Using"," sessionId: ").concat(Jt)),Jt},Qn=or();if(ge.set(H,Qn,{expires:Y}),En&&ge.set(vt,Qn,{expires:Y}),je){je.npoUserId&&(tt.user_id=je.npoUserId,tt.user_profile=je.npoProfileId,tt.user_pseudoid=je.npoPseudoId,tt.user_subscription=je.npoSubscription),cn(je.nmoId);var Xn=je;O==null||O.forEach(function(vn){return vn.initializeFromSessionInfo(Xn)})}var _t=function(){var At=ge.get(H),Tn=At!==void 0&&ge.get(vt)===At;return Tn?ge.set(vt,At,{expires:Y}):ge.remove(vt),Tn},qt=function(){var At={brand:tt.brand,brandId:tt.brand_id,platform:tt.platform,platformVersion:tt.platform_version,govoltePartyId:vt,sessionId:Qn,nmoId:tn(),npoUserId:tt.user_id,npoProfileId:tt.user_profile,npoPseudoId:tt.user_pseudoid,npoSubscription:tt.user_subscription},Tn=rr({},At);return O&&O.forEach(function(Wn){Tn=rr(rr({},Tn),Wn.getSessionInfo())}),Object.keys(Tn).filter(function(Wn){return Tn[Wn]===void 0}).forEach(function(Wn){return delete Tn[Wn]}),JSON.stringify(Tn)};return{getContext:function(){return rr({},tt)},login:function(At){Ae(Mr,"Login with userId ".concat(At.user_id)),tt=rr(rr({},tt),At)},logout:function(){Ae(Mr,"Logout"),tt=rr(rr({},tt),{},{user_profile:ei.user_profile,user_subscription:ei.user_subscription,user_pseudoid:ei.user_pseudoid,user_id:ei.user_id,user_profile_type:ei.user_profile_type})},getPlugins:function(){return O||[]},getParty:function(){return vt},getIsNewParty:_t,getSession:or,getSerializedSessionInfo:qt}}};function xt(W,Q,O){var ne=W.serializedSessionInfo?JSON.parse(W.serializedSessionInfo):void 0;if((ne==null?void 0:ne.brand)===void 0||ne.brandId===void 0){Ie(Mr,"Unable to build tag from session, the 'brand' of 'brand_id' field is missing from export.");return}var ge={brand:ne.brand,brand_id:ne.brandId,platform:ne.platform,platform_version:ne.platformVersion,debug:W.debug,environment:W.environment,disableNmoDam:W.disableNmoDam,serializedSessionInfo:W.serializedSessionInfo};return Kr(ge,Q,O)}function Ji(W,Q,O,ne){var ge=Bn(),je=Q.getSession(),qe=Vt(),tt=rr(rr(rr(rr({},Q.getContext()),O),ne),{},{party_id:Q.getParty(),isNewParty:Q.getIsNewParty(),is_homepage:O.page===Cr,client_timestamp:new Date().toISOString(),sdk_version:"3.2.11",session_id:je,isFirstInSession:qe.get(je)!==void 0,location:ge.getLocation(),referrer:ge.getReferrer()});qe.set(U,tt.party_id,{expires:J}),qe.set(H,tt.session_id,{expires:Y}),qe.set(se,tt.brand_id.toString(),{expires:re}),qe.set(ue,Date.now().toString(),{expires:xe}),qe.remove(je),Ae(Mr,"Submitting event",W,tt),Q.getPlugins().forEach(function(rt){return rt.submitEvent(W,tt)})}function gr(W,Q){var O=Object.keys(W);if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(W);Q&&(ne=ne.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),O.push.apply(O,ne)}return O}function ji(W){for(var Q=1;Q<arguments.length;Q++){var O=arguments[Q]!=null?arguments[Q]:{};Q%2?gr(Object(O),!0).forEach(function(ne){v(W,ne,O[ne])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(O)):gr(Object(O)).forEach(function(ne){Object.defineProperty(W,ne,Object.getOwnPropertyDescriptor(O,ne))})}return W}function qo(W,Q,O){function ne(ge,je){var qe,tt=je.stream_position,rt=void 0,vt=je.seek_from,En=void 0;if(O!=null&&O.isLive){var or=Date.now()/1e3;tt=or+je.stream_position,rt=je.stream_position,je.seek_from!==void 0&&(vt=or+je.seek_from,En=je.seek_from)}Ji(ge,W.npoTag,W.pageContext,ji(ji({},Q),{},{stream_position:tt,bitrate_audio:je.bitrate_audio,bitrate_video:je.bitrate_video,startupTime:je.startupTime,drmLoadTime:je.drmLoadTime,stream_error_code:je.stream_error_code,live_offset:rt,stream_seek_from:vt,live_offset_from:En,isLiveStream:(qe=O==null?void 0:O.isLive)!==null&&qe!==void 0?qe:!1}))}return{pageTracker:W,streamContext:Q,time:function(je){ne(he.STREAM_WAYPOINT,je)},seek:function(je){ne(he.STREAM_SEEK,je)},pause:function(je){ne(he.STREAM_PAUSE,je)},resume:function(je){ne(he.STREAM_RESUME,je)},complete:function(je){ne(he.STREAM_COMPLETE,je)},buffering:function(je){ne(he.STREAM_BUFFERING,je)},buffering_complete:function(je){ne(he.STREAM_BUFFERING_COMPLETE,je)},load:function(je){ne(he.STREAM_LOAD,je)},load_complete:function(je){ne(he.STREAM_LOAD_COMPLETE,je)},start:function(je){ne(he.STREAM_START,je)},fullscreen:function(je){ne(he.STREAM_FULLSCREEN,je)},windowed:function(je){ne(he.STREAM_WINDOWED,je)},stop:function(je){ne(he.STREAM_STOP,je)},error:function(je){ne(he.STREAM_ERROR,je)}}}function oo(W,Q){var O=Object.keys(W);if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(W);Q&&(ne=ne.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),O.push.apply(O,ne)}return O}function Fi(W){for(var Q=1;Q<arguments.length;Q++){var O=arguments[Q]!=null?arguments[Q]:{};Q%2?oo(Object(O),!0).forEach(function(ne){v(W,ne,O[ne])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(O)):oo(Object(O)).forEach(function(ne){Object.defineProperty(W,ne,Object.getOwnPropertyDescriptor(O,ne))})}return W}function Os(W,Q){var O=Fi(Fi({},Q),{},{offer_id:d()});return{pageTracker:W,recommendationContext:O,offer:function(ge){return Ji(he.OFFER,W.npoTag,W.pageContext,Fi(Fi({},O),ge))},choice:function(ge){return Ji(he.CHOICE,W.npoTag,W.pageContext,Fi(Fi({},O),ge))}}}function To(){function W(Q,O){var ne={timestamp:new Date().toISOString(),eventType:Q,event:O};return JSON.stringify(ne)}return{submitEvent:function(O,ne){console.log(W(O,ne))},initializeFromSessionInfo:function(){},getSessionInfo:function(){return{}}}}function Eo(W,Q){if(W==null)return{};var O={};for(var ne in W)if({}.hasOwnProperty.call(W,ne)){if(Q.indexOf(ne)!==-1)continue;O[ne]=W[ne]}return O}function gs(W,Q){if(W==null)return{};var O,ne,ge=Eo(W,Q);if(Object.getOwnPropertySymbols){var je=Object.getOwnPropertySymbols(W);for(ne=0;ne<je.length;ne++)O=je[ne],Q.indexOf(O)===-1&&{}.propertyIsEnumerable.call(W,O)&&(ge[O]=W[O])}return ge}function es(W,Q,O,ne,ge,je,qe){try{var tt=W[je](qe),rt=tt.value}catch(vt){return void O(vt)}tt.done?Q(rt):Promise.resolve(rt).then(ne,ge)}function so(W){return function(){var Q=this,O=arguments;return new Promise(function(ne,ge){var je=W.apply(Q,O);function qe(rt){es(je,ne,ge,qe,tt,"next",rt)}function tt(rt){es(je,ne,ge,qe,tt,"throw",rt)}qe(void 0)})}}function xo(W,Q){(Q==null||Q>W.length)&&(Q=W.length);for(var O=0,ne=Array(Q);O<Q;O++)ne[O]=W[O];return ne}function fe(W){if(Array.isArray(W))return xo(W)}function Mi(W){if(typeof Symbol<"u"&&W[Symbol.iterator]!=null||W["@@iterator"]!=null)return Array.from(W)}function Un(W,Q){if(W){if(typeof W=="string")return xo(W,Q);var O={}.toString.call(W).slice(8,-1);return O==="Object"&&W.constructor&&(O=W.constructor.name),O==="Map"||O==="Set"?Array.from(W):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?xo(W,Q):void 0}}function Qi(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
123
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ci(W){return fe(W)||Mi(W)||Un(W)||Qi()}var Ui=R(4756),Bi=R.n(Ui);R(4782);var Wr=function(){function W(){Qe(this,W),v(this,"items",[]),v(this,"offset",0)}return Xt(W,[{key:"enqueue",value:function(){var O;return(O=this.items).push.apply(O,arguments)}},{key:"dequeue",value:function(){if(this.isEmpty())return null;var O=this.peek();return this.offset+=1,this.offset*2<this.items.length||(this.items=this.items.slice(this.offset),this.offset=0),O}},{key:"size",value:function(){return this.items.length-this.offset}},{key:"isEmpty",value:function(){return this.size()===0}},{key:"peek",value:function(){return this.isEmpty()?null:this.items[this.offset]}},{key:"swapTopElement",value:function(O){this.items[this.offset]=O}},{key:"getAllItems",value:function(){return this.items.slice(this.offset)}},{key:"clear",value:function(){this.items=[],this.offset=0}},{key:"getOffset",value:function(){return this.offset}}]),W}(),zs=function(){try{var Q=window.localStorage,O="__storage_test__";return Q.setItem(O,O),Q.removeItem(O),!0}catch{return!1}},Sr=function(Q){return Q.toString(36)},Fo=function(Q){return unescape(encodeURIComponent(Q))};R(2337),R(739),R(7208);var Pi=function(){function W(){Qe(this,W),v(this,"stringEscapingRegex",/[~!]/g),v(this,"buffer",""),v(this,"pendingFieldName",null),v(this,"pendingArrayFieldName",null)}return Xt(W,[{key:"startObject",value:function(){this.addRecord("(")}},{key:"endObject",value:function(){this.pendingFieldName=null,this.addRecord(")")}},{key:"startArray",value:function(){this.pendingArrayFieldName=this.pendingFieldName,this.pendingFieldName=null}},{key:"endArray",value:function(O){this.buffer.length>O?this.addRecord("."):this.pendingArrayFieldName=null}},{key:"setNextFieldName",value:function(O){this.pendingFieldName=O}},{key:"addRecord",value:function(O,ne){this.pendingArrayFieldName!==null&&(this.buffer+="a",this.buffer+=this.escapeString(this.pendingArrayFieldName),this.buffer+="!",this.pendingFieldName=null,this.pendingArrayFieldName=null),this.buffer+=O,this.pendingFieldName!==null&&(this.buffer+=this.escapeString(this.pendingFieldName),this.buffer+="!",this.pendingFieldName=null),ne&&(this.buffer+=ne)}},{key:"escapeString",value:function(O){return O.replace(this.stringEscapingRegex,"~$&")}},{key:"encodeString",value:function(O){this.addRecord("s",this.escapeString(O)+"!")}},{key:"encodeNumber",value:function(O){if(isFinite(O)){var ne=O===Math.floor(O)?O.toString(36):null,ge=O.toExponential(),je=String(O);ne!==null&&ne.length<=ge.length&&ne.length<=je.length?this.addRecord("d",ne+"!"):this.addRecord("j",(ge.length<je.length?ge:je)+"!")}else this.encode(null,!1)}},{key:"encodeBoolean",value:function(O){this.addRecord(O?"t":"f")}},{key:"encodeNull",value:function(){this.addRecord("n")}},{key:"encodeArray",value:function(O){var ne=this.buffer.length;this.startArray();for(var ge=0;ge<O.length;++ge)this.encode(O[ge],!0);this.endArray(ne)}},{key:"encodeDate",value:function(O){var ne=isFinite(O.valueOf())?O.getUTCFullYear()+"-"+this.pad(2,O.getUTCMonth()+1)+"-"+this.pad(2,O.getUTCDate())+"T"+this.pad(2,O.getUTCHours())+":"+this.pad(2,O.getUTCMinutes())+":"+this.pad(2,O.getUTCSeconds())+"."+this.pad(3,O.getUTCMilliseconds())+"Z":null;this.encode(ne,!1)}},{key:"pad",value:function(O,ne){for(var ge=ne.toString();ge.length<O;)ge="0"+ge;return ge}},{key:"encodeJavaScriptObject",value:function(O){if(!Object.values(O).every(function(ge){return typeof ge>"u"})){this.startObject();for(var ne in O)Object.prototype.hasOwnProperty.call(O,ne)&&(this.setNextFieldName(ne),this.encode(O[ne],!1));this.endObject()}}},{key:"encodeObject",value:function(O,ne){if(O===null)this.encodeNull();else if(typeof O.toJSON=="function")this.encode(O.toJSON(),ne);else switch(Object.prototype.toString.call(O)){case"[object Array]":this.encodeArray(O);break;case"[object Date]":this.encodeDate(O);break;default:this.encodeJavaScriptObject(O)}}},{key:"encode",value:function(O,ne){switch(E(O)){case"string":this.encodeString(O);break;case"number":this.encodeNumber(O);break;case"boolean":this.encodeBoolean(O);break;case"object":this.encodeObject(O,ne);break;case"undefined":ne&&this.encode(null,!1);break;default:throw"Cannot encode of type: "+E(O)}var ge=this.buffer;return ge!==""?ge:void 0}}]),W}(),ki=function(Q){return new Pi().encode(Q,!1)},ts=0,wo=function(){return ts++},dr=function(Q){return"".concat(Q,"#").concat(wo())};R(6910);var kr=R(6769),Ao=R.n(kr),wa=function(Q){var O=[];for(var ne in Q)Object.prototype.hasOwnProperty.call(Q,ne)&&O.push(ne);O.sort();for(var ge="",je=0;je<O.length;++je){var qe=O[je],tt=Q[qe];ge+=qe,ge+="=";for(var rt=0;rt<tt.length;++rt)ge+=tt[rt],ge+=",";ge+=";"}var vt=Fo(ge),En=Ao().x86.hash32(vt);return En};function ms(W,Q){var O=Object.keys(W);if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(W);Q&&(ne=ne.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),O.push.apply(O,ne)}return O}function ti(W){for(var Q=1;Q<arguments.length;Q++){var O=arguments[Q]!=null?arguments[Q]:{};Q%2?ms(Object(O),!0).forEach(function(ne){v(W,ne,O[ne])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(O)):ms(Object(O)).forEach(function(ne){Object.defineProperty(W,ne,Object.getOwnPropertyDescriptor(O,ne))})}return W}var $s=function(Q){return Q?"t":"f"},Bt=function(Q,O){var ne=mr(Q,O);return Object.keys(ne).forEach(function(ge){ne[ge]===void 0&&delete ne[ge]}),ti(ti({},ne),{},{x:Sr(Xs(ne))})},mr=function(Q,O){var ne=Bn(),ge={brand:O.brand,brandId:O.brand_id,chapters:{chapter1:O.chapter_1,chapter2:O.chapter_2,chapter3:O.chapter_3},pageName:O.page,platformType:O.platform,content_context_id:O.content_context_id,user:{npoId:O.user_id,profileId:O.user_profile,type:O.user_subscription,pseudoid:O.user_pseudoid,profileType:O.user_profile_type},query:O.query||O.query_context,experiment:O.experiment,condition:O.condition,platformVersion:O.platform_version,environment:O.environment,customLabels:{label1:O.custom_label1,label2:O.custom_label2,label3:O.custom_label3,label4:O.custom_label4,label5:O.custom_label5},error:O.error_code,program:O.program,broadcaster:O.broadcasters,screenOrientation:ne.getScreenOrientation(),nmoid:O.nmoid,position:O.stream_position,from:O.stream_seek_from,length:O.stream_length,id:O.stream_id,playerId:O.player_id,adLength:O.stream_ad_length,avType:O.av_type,avSubtype:O.av_subtype,PlayerVersion:O.player_version,SKOPlayerVersion:O.sko_player_version,liveOffset:O.live_offset,liveOffsetFrom:O.live_offset_from,isLiveStream:O.live_offset!=null,destination:{recommender:O.recommender,contentId:O.target_id,index:O.offer_index,numberDisplayed:O.total_offers},panel_format:O.panel_format,panel_position:O.panel_position,panel:O.panel_id,offerId:O.offer_id,sdk_version:O.sdk_version,click_name:O.click_name,click_type:O.click_type,click_chapter_1:O.click_chapter_1,click_chapter_2:O.click_chapter_2,click_chapter_3:O.click_chapter_3,click_position_x:O.click_position_x,click_position_y:O.click_position_y,error_message:O.error_message,scrollEnabled:O.scroll_tracking,scrollPercentage:O.scroll_percentage,errorCode:O.stream_error_code,isp:O.isp,mediaUrl:O.mediaURL,bitrateAudio:O.bitrate_audio,bitrateVideo:O.bitrate_video,startupTime:O.startupTime,drmLoadTime:O.drmLoadTime,drmType:O.drmType};return{p:O.party_id,s:O.session_id,v:O.pageViewId,e:dr(O.pageViewId),c:Sr(new Date(O.client_timestamp).getTime()),n:$s(O.isNewParty),f:$s(O.isFirstInSession),l:O.location,r:O.referrer,j:Sr(ne.getScreenHeight()),i:Sr(ne.getScreenWidth()),k:Sr(window.devicePixelRatio),h:Sr(ne.getWindowHeight()),w:Sr(ne.getWindowWidth()),t:Q,u:ki(ge)}},Xs=function(Q){var O={};return Object.keys(Q).forEach(function(ne){var ge=Q[ne];O[ne]=ge?[ge]:[]}),wa(O)},Ys=Bn(),vs=function(Q,O){var ne={event_type:Q,client_timestamp_iso:O.client_timestamp,event_id:dr(O.pageViewId),is_new_party:O.isNewParty,is_new_session:O.isFirstInSession,party_id:O.party_id,session_id:O.session_id,sdk_version:O.sdk_version};O.error_code&&(ne.error_code=O.error_code);var ge={},je=O.query||O.query_context;return(O.brand||O.brand_id||O.nmoid||O.page||O.pageViewId)&&(ge.topspin={brand:O.brand,brandId:O.brand_id,nmoid:O.nmoid,pageName:O.page,pageId:O.pageViewId,content_context_id:O.content_context_id,platformType:O.platform,platformVersion:O.platform_version,program:O.program,broadcaster:O.broadcasters,environment:O.environment,scrollEnabled:O.scroll_tracking,avType:O.av_type,avSubtype:O.av_subtype},(O.chapter_1||O.chapter_2||O.chapter_3)&&(ge.topspin.chapters={chapter1:O.chapter_1,chapter2:O.chapter_2,chapter3:O.chapter_3})),(O.user_id||O.user_profile||O.user_subscription)&&(ge.npo={userId:O.user_id,profileId:O.user_profile,subscription:O.user_subscription,pseudoId:O.user_pseudoid,userProfileType:O.user_profile_type}),(O.stream_id||O.stream_position!==void 0)&&(ge.stream={id:O.stream_id,length:O.stream_length,adLength:O.stream_ad_length,position:O.stream_position,playerId:O.player_id,playerVersion:O.player_version,skoPlayerVersion:O.sko_player_version,liveOffset:O.live_offset,liveOffsetFrom:O.live_offset_from,isLiveStream:O.live_offset!==void 0&&O.live_offset!==null,seekFrom:O.stream_seek_from,bitrateAudio:O.bitrate_audio,bitrateVideo:O.bitrate_video,startupTime:O.startupTime,drmLoadTime:O.drmLoadTime,errorCode:O.stream_error_code,isp:O.isp,mediaUrl:O.mediaURL,drmType:O.drmType}),(O.panel_id||O.panel_format||O.panel_position!==void 0||O.offer_id||je||O.recommender||O.target_id||O.offer_index!==void 0||O.total_offers!==void 0)&&(ge.recommendation={panel:O.panel_id,panel_format:O.panel_format,position:O.panel_position,offerId:O.offer_id,query:je},O.recommender&&O.target_id&&O.offer_index!==void 0&&O.total_offers!==void 0&&(ge.recommendation.destinations=[{recommender:O.recommender,contentId:O.target_id,index:O.offer_index,numberDisplayed:O.total_offers}])),O.experiment&&(ge.experiment=O.experiment),ge.screen={height:Ys.getWindowHeight(),width:Ys.getWindowWidth(),orientation:Ys.getScreenOrientation(),pixelRatio:window.devicePixelRatio},(O.click_name||O.click_type)&&(ge.click={name:O.click_name,type:O.click_type,position_x:O.click_position_x,position_y:O.click_position_y,chapter_1:O.click_chapter_1,chapter_2:O.click_chapter_2,chapter_3:O.click_chapter_3}),O.error_message&&(ge.error={message:O.error_message}),O.scroll_percentage!==void 0&&(ge.scroll={percentage:O.scroll_percentage}),Object.keys(ge).length>0&&(ne.parameters=ge),ne},Ds=function(Q,O){var ne=Bn(),ge={t:Q.event_type,c:Q.client_timestamp_iso,e:Q.event_id,n:Q.is_new_party,f:Q.is_new_session,p:Q.party_id,s:Q.session_id};O.condition&&(ge.condition=O.condition),Q.error_code&&(ge.error_code=Q.error_code),O.location&&(ge.l=O.location),O.referrer&&(ge.r=O.referrer),ge.j=ne.getScreenHeight(),ge.i=ne.getScreenWidth(),ge.k=window.devicePixelRatio,ge.screen_orientation=ne.getScreenOrientation(),Q.sdk_version&&(ge.sdk_version=Q.sdk_version);var je=[O.custom_label1,O.custom_label2,O.custom_label3,O.custom_label4,O.custom_label5];return je.some(Boolean)&&(ge.customLabels={label1:O.custom_label1,label2:O.custom_label2,label3:O.custom_label3,label4:O.custom_label4,label5:O.custom_label5}),Q.parameters&&(ge.parameters=Q.parameters),ge},Qa=R(5373),Za=R.n(Qa);R(6033),R(761),R(3418),R(906),R(9463),R(2259);function Ns(){var W,Q=0;return{start:function(ne){W||(W=mn(ne))},stop:function(ne){if(W){var ge=mn(ne)-W;Q+=ge,W=void 0}},elapsedTime:function(ne){return W?mn(ne)-W+Q:Q}}}function Vi(W,Q){var O=typeof Symbol<"u"&&W[Symbol.iterator]||W["@@iterator"];if(!O){if(Array.isArray(W)||(O=Js(W))||Q){O&&(W=O);var ne=0,ge=function(){};return{s:ge,n:function(){return ne>=W.length?{done:!0}:{done:!1,value:W[ne++]}},e:function(vt){throw vt},f:ge}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
124
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,qe=!0,tt=!1;return{s:function(){O=O.call(W)},n:function(){var vt=O.next();return qe=vt.done,vt},e:function(vt){tt=!0,je=vt},f:function(){try{qe||O.return==null||O.return()}finally{if(tt)throw je}}}}function Js(W,Q){if(W){if(typeof W=="string")return Aa(W,Q);var O={}.toString.call(W).slice(8,-1);return O==="Object"&&W.constructor&&(O=W.constructor.name),O==="Map"||O==="Set"?Array.from(W):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?Aa(W,Q):void 0}}function Aa(W,Q){(Q==null||Q>W.length)&&(Q=W.length);for(var O=0,ne=Array(Q);O<Q;O++)ne[O]=W[O];return ne}function Uo(W){var Q=new Map,O=new Map;function ne(qe){var tt=Q.get(qe);if(tt)return tt;var rt=Ns();return Q.set(qe,rt),rt}function ge(qe,tt){if(E(W)!=="object")return qe-tt<W;var rt=Object.keys(W).map(function(_t){return parseInt(_t)}).sort(function(_t,qt){return _t-qt}),vt=0,En=Math.trunc(tt/1e3),or=Vi(rt),Qn;try{for(or.s();!(Qn=or.n()).done;){var Xn=Qn.value;if(En<Xn)break;vt=Xn}}catch(_t){or.e(_t)}finally{or.f()}return qe-tt<W[vt]}function je(qe,tt,rt){var vt=rt||0,En=tt.elapsedTime(qe);return ge(En,vt)}return{shouldThrottleEvent:function(tt,rt){return tt!==he.STREAM_WAYPOINT?!1:je(rt.client_timestamp,ne(rt.stream_id),O.get(rt.stream_id))},onSendEvent:function(tt,rt){switch(tt){case he.STREAM_START:case he.STREAM_BUFFERING_COMPLETE:case he.STREAM_RESUME:ne(rt.stream_id).start(rt.client_timestamp);break;case he.STREAM_BUFFERING:case he.STREAM_PAUSE:ne(rt.stream_id).stop(rt.client_timestamp);break;case he.STREAM_WAYPOINT:O.set(rt.stream_id,ne(rt.stream_id).elapsedTime(rt.client_timestamp));break;case he.STREAM_COMPLETE:case he.STREAM_STOP:Q.delete(rt.stream_id),O.delete(rt.stream_id);break}}}}function bi(W,Q){var O=typeof Symbol<"u"&&W[Symbol.iterator]||W["@@iterator"];if(!O){if(Array.isArray(W)||(O=qa(W))||Q){O&&(W=O);var ne=0,ge=function(){};return{s:ge,n:function(){return ne>=W.length?{done:!0}:{done:!1,value:W[ne++]}},e:function(vt){throw vt},f:ge}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
125
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var je,qe=!0,tt=!1;return{s:function(){O=O.call(W)},n:function(){var vt=O.next();return qe=vt.done,vt},e:function(vt){tt=!0,je=vt},f:function(){try{qe||O.return==null||O.return()}finally{if(tt)throw je}}}}function qa(W,Q){if(W){if(typeof W=="string")return gi(W,Q);var O={}.toString.call(W).slice(8,-1);return O==="Object"&&W.constructor&&(O=W.constructor.name),O==="Map"||O==="Set"?Array.from(W):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?gi(W,Q):void 0}}function gi(W,Q){(Q==null||Q>W.length)&&(Q=W.length);for(var O=0,ne=Array(Q);O<Q;O++)ne[O]=W[O];return ne}function Qs(W,Q,O){var ne=bi(O),ge;try{for(ne.s();!(ge=ne.n()).done;){var je=ge.value;if(je.shouldThrottleEvent(W,Q))return!0}}catch(qe){ne.e(qe)}finally{ne.f()}return O.forEach(function(qe){return qe.onSendEvent(W,Q)}),!1}var eu=["trialCount"];function tu(W,Q){var O=Object.keys(W);if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(W);Q&&(ne=ne.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),O.push.apply(O,ne)}return O}function _i(W){for(var Q=1;Q<arguments.length;Q++){var O=arguments[Q]!=null?arguments[Q]:{};Q%2?tu(Object(O),!0).forEach(function(ne){v(W,ne,O[ne])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(O)):tu(Object(O)).forEach(function(ne){Object.defineProperty(W,ne,Object.getOwnPropertyDescriptor(O,ne))})}return W}var Vn="GovoltePlugin",ns="https://topspin.npo.nl",Vr={submitEvent:"web-event"},Bo="Govolte_queue",ys=1e3,Ls=5e3,js=5e3,rs=3,Ss=3e4,Ts=3e4,Ia=0,Zs=10,Hi=0,Vo=3e4,qs=0,ea=20,Es=3e4,ta={maxRetryCount:rs,delayBetweenRetriesInMs:js,delayBetweenStreamWaypointsInMs:Ss,baseUrl:ns,is_batch:!1,batch_size:ea,max_batch_age:Es};function Nl(W){var Q=_i(_i({},ta),W),O=[Uo(Q.delayBetweenStreamWaypointsInMs)],ne=Q.maxRetryCount;if(ne<Hi)throw Error("Invalid maxRetryCount(".concat(ne,"). Minimum maxRetryCount is ").concat(Hi,"."));if(ne>Zs)throw Error("Invalid maxRetryCount(".concat(ne,"). Maximum maxRetryCount is ").concat(Zs,"."));var ge=Q.delayBetweenRetriesInMs;if(ge<Ia)throw Error("Invalid delayBetweenRetriesInMs(".concat(ge,"). Minimum delayBetweenRetriesInMs is ").concat(Ia,"."));if(ge>Ts)throw Error("Invalid delayBetweenRetriesInMs(".concat(ge,"). Maximum delayBetweenRetriesInMs is ").concat(Ts,"."));var je=Q.delayBetweenStreamWaypointsInMs;if(je<qs)throw Error("Invalid delayBetweenStreamTimeEventsInMs(".concat(je,"). Minimum delayBetweenStreamTimeEventsInMs is ").concat(qs,"."));if(je>Vo)throw Error("Invalid delayBetweenStreamTimeEventsInMs(".concat(je,"). Maximum delayBetweenStreamTimeEventsInMs is ").concat(Vo,"."));var qe=new Wr,tt=!1,rt=new Wr,vt=null,En=!1;function or(){if(!zs()){Ie(Vn,"Local storage is unavailable. Event queue won't be saved to local storage.");return}var Jt=localStorage.getItem(Bo);if(Jt){var fn=JSON.parse(Jt),nn=fn.filter(function(en){return en.t!==he.STREAM_STOP});Q.is_batch?(Ae(Vn,"Converting ".concat(nn.length," old individual events to batch format")),nn.forEach(function(en){if(en.originalEventType&&en.originalEvent)try{var Zn=vs(en.originalEventType,en.originalEvent),sr={eventType:en.originalEventType,event:en.originalEvent,jsonEvent:Zn,trialCount:en.trialCount||0,timestamp:Date.now()};rt.enqueue(sr),Ae(Vn,"Converted event ".concat(en.originalEventType," to batch format"))}catch(xn){Ie(Vn,"Failed to convert event ".concat(en.originalEventType," to batch format"),xn),qe.enqueue(en)}else Ae(Vn,"Event ".concat(en.t," missing original data, keeping in individual queue")),qe.enqueue(en)}),localStorage.removeItem(Bo),rt.isEmpty()||(Ae(Vn,"Starting batch timer for converted events"),uo())):qe.enqueue.apply(qe,ci(nn))}}function Qn(Jt){zs()&&(Q.is_batch||(Jt.length>ys&&(Ie("Hit storage limit. Can't save all events to local storage. Keeping last",ys),Jt=Jt.slice(Jt.length-ys)),localStorage.setItem(Bo,JSON.stringify(Jt))))}function Xn(Jt){return _t.apply(this,arguments)}function _t(){return _t=so(Bi().mark(function Jt(fn){return Bi().wrap(function(en){for(;;)switch(en.prev=en.next){case 0:return en.abrupt("return",new Promise(function(Zn,sr){var xn=setTimeout(function(){yn=!0,sr("Sending event took too long.")},Ls),Ar=new Image(1,1),yn=!1;Ar.onload=function(){yn||(clearTimeout(xn),Zn())},Ar.onerror=function(Ir){return sr(Ir)},Ar.src=fn}));case 1:case"end":return en.stop()}},Jt)})),_t.apply(this,arguments)}function qt(Jt,fn,nn){return vn.apply(this,arguments)}function vn(){return vn=so(Bi().mark(function Jt(fn,nn,en){var Zn,sr,xn,Ar;return Bi().wrap(function(Ir){for(;;)switch(Ir.prev=Ir.next){case 0:if(!(typeof fetch>"u")){Ir.next=2;break}throw new Error("fetch is not available");case 2:return Zn="".concat(Q.baseUrl,"/").concat(Vr.submitEvent,"?p=").concat(encodeURIComponent(en)),sr=Ds(fn,nn),Ae(Vn,"Sending individual JSON POST request",{url:Zn,partyId:en,jsonEvent:fn,originalEvent:nn,payload:sr}),Ir.prev=5,Ir.next=8,fetch(Zn,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(sr)});case 8:return xn=Ir.sent,Ar=xn.ok||xn.status===204,Ae(Vn,"Individual JSON POST response: ".concat(xn.status," ").concat(xn.statusText),{success:Ar,status:xn.status,statusText:xn.statusText}),Ir.abrupt("return",Ar);case 14:return Ir.prev=14,Ir.t0=Ir.catch(5),Ie("Error delivering JSON event",Ir.t0),Ir.abrupt("return",!1);case 18:case"end":return Ir.stop()}},Jt,null,[[5,14]])})),vn.apply(this,arguments)}function At(Jt,fn){return Tn.apply(this,arguments)}function Tn(){return Tn=so(Bi().mark(function Jt(fn,nn){var en,Zn,sr,xn;return Bi().wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:if(!(typeof fetch>"u")){yn.next=2;break}throw new Error("fetch is not available");case 2:return en="".concat(Q.baseUrl,"/").concat(Vr.submitEvent,"?p=").concat(encodeURIComponent(nn)),Zn=fn.map(function(Ir){return Ds(Ir.jsonEvent,Ir.event)}),Ae(Vn,"Sending batch POST request",{url:en,partyId:nn,batchSize:fn.length,payload:Zn}),yn.prev=5,yn.next=8,fetch(en,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Zn)});case 8:return sr=yn.sent,xn=sr.ok||sr.status===204,Ae(Vn,"Batch POST response: ".concat(sr.status," ").concat(sr.statusText),{success:xn,status:sr.status,statusText:sr.statusText}),yn.abrupt("return",xn);case 14:return yn.prev=14,yn.t0=yn.catch(5),Ie("Error delivering JSON event batch",yn.t0),yn.abrupt("return",!1);case 18:case"end":return yn.stop()}},Jt,null,[[5,14]])})),Tn.apply(this,arguments)}function Wn(Jt){return zr.apply(this,arguments)}function zr(){return zr=so(Bi().mark(function Jt(fn){var nn,en,Zn,sr,xn;return Bi().wrap(function(yn){for(;;)switch(yn.prev=yn.next){case 0:if(nn=fn,Ae(Vn,"Sending individual event: ".concat(nn.t),{govolteEvent:fn,originalEventType:nn.originalEventType,originalEvent:nn.originalEvent}),!(nn.originalEventType&&nn.originalEvent)){yn.next=16;break}return yn.prev=3,en=vs(nn.originalEventType,nn.originalEvent),Ae(Vn,"Sending as JSON POST",{jsonEvent:en}),yn.next=8,qt(en,nn.originalEvent,nn.originalEvent.party_id);case 8:return Zn=yn.sent,Ae(Vn,Zn?"JSON POST successful":"JSON POST failed"),yn.abrupt("return",Zn);case 13:yn.prev=13,yn.t0=yn.catch(3),Ie("Error sending JSON event, falling back to GET",yn.t0);case 16:return sr=Za().stringify(fn),xn="".concat(Q.baseUrl,"/").concat(Vr.submitEvent,"?").concat(sr),Ae(Vn,"Sending as GET request",{url:xn}),yn.prev=19,yn.next=22,Xn(xn);case 22:return Ae(Vn,"GET request successful"),yn.abrupt("return",!0);case 26:return yn.prev=26,yn.t1=yn.catch(19),Ie("Error delivering event",yn.t1),yn.abrupt("return",!1);case 30:case"end":return yn.stop()}},Jt,null,[[3,13],[19,26]])})),zr.apply(this,arguments)}function uo(){vt&&window.clearTimeout(vt),vt=window.setTimeout(function(){is()},Q.max_batch_age)}function is(){return Oi.apply(this,arguments)}function Oi(){return Oi=so(Bi().mark(function Jt(){var fn,nn,en,Zn;return Bi().wrap(function(xn){for(;;)switch(xn.prev=xn.next){case 0:if(!(En||rt.isEmpty())){xn.next=2;break}return xn.abrupt("return");case 2:if(En=!0,vt&&(window.clearTimeout(vt),vt=null),nn=rt.getAllItems(),en=(fn=nn[0])===null||fn===void 0?void 0:fn.event.party_id,en){xn.next=9;break}return En=!1,xn.abrupt("return");case 9:return Ae(Vn,"Sending batch of ".concat(nn.length," events"),{eventsToSend:nn.map(function(Ar){return{eventType:Ar.eventType,event:Ar.event,jsonEvent:Ar.jsonEvent}}),partyId:en}),xn.prev=10,xn.next=13,At(nn,en);case 13:Zn=xn.sent,Zn?(Ae(Vn,"Successfully sent batch of ".concat(nn.length," events")),rt.clear()):(Ae(Vn,"Failed to send batch, will retry individual events"),nn.forEach(function(Ar){var yn=Bt(Ar.eventType,Ar.event),Ir=_i(_i({},yn),{},{trialCount:0});qe.enqueue(Ir)}),rt.clear(),ni()),xn.next=23;break;case 17:xn.prev=17,xn.t0=xn.catch(10),Ie("Error sending batch",xn.t0),nn.forEach(function(Ar){var yn=Bt(Ar.eventType,Ar.event),Ir=_i(_i({},yn),{},{trialCount:0});qe.enqueue(Ir)}),rt.clear(),ni();case 23:En=!1,rt.isEmpty()||uo();case 25:case"end":return xn.stop()}},Jt,null,[[10,17]])})),Oi.apply(this,arguments)}function mi(Jt,fn){var nn=vs(Jt,fn),en={eventType:Jt,event:fn,jsonEvent:nn,trialCount:0,timestamp:Date.now()};rt.enqueue(en),Ae(Vn,"Event added to batch queue. Size: ".concat(rt.size(),"/").concat(Q.batch_size),{eventType:Jt,event:fn,jsonEvent:nn,batchSize:rt.size(),maxBatchSize:Q.batch_size}),rt.size()===1&&(Ae(Vn,"Starting batch timer (".concat(Q.max_batch_age,"ms)")),uo()),rt.size()>=Q.batch_size&&(Ae(Vn,"Batch is full, sending immediately"),is())}function ni(){var Jt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(!(tt&&Jt)){var fn=qe.peek();if(fn){var nn=fn.trialCount,en=gs(fn,eu),Zn=isNaN(nn)?1:nn+1;qe.swapTopElement(_i(_i({},en),{},{trialCount:Zn})),Qn(qe.getAllItems()),Ae(Vn,"Sending event [attempt ".concat(Zn,"]: ").concat(en.t),en),tt=!0,Wn(en).then(function(sr){if(sr||Zn>ne)tt=!1,sr?Ae(Vn,"Successfully sent event [attempt ".concat(Zn,"]: ").concat(en.t)):Ae(Vn,"Removing event because already tried sending ".concat(Zn," times. MaxRetryCount is ").concat(ne,". Event: ").concat(en.t)),qe.dequeue(),Qn(qe.getAllItems()),ni(!1);else{var xn=ge*Zn;Ae(Vn,"Failed sending event: ".concat(en.t,". Now waiting for ").concat(xn,"ms before retry [attempt ").concat(Zn,"/").concat(ne,"].")),Jn(xn).then(function(){return ni(!1)})}})}}}return or(),ni(!1),{submitEvent:function(fn,nn){if(Ae(Vn,"Submitting event: ".concat(fn),{eventType:fn,event:nn,batchMode:Q.is_batch}),Qs(fn,nn,O)){Ae(Vn,"Event throttled: ".concat(fn));return}if(Q.is_batch)Ae(Vn,"Adding event to batch: ".concat(fn)),mi(fn,nn);else{var en=Bt(fn,nn),Zn=_i(_i({},en),{},{trialCount:0,originalEventType:fn,originalEvent:nn});Ae(Vn,"Adding event to individual queue: ".concat(fn),en),qe.enqueue(Zn),Qn(qe.getAllItems()),ni()}},queuedEvents:function(){return qe.getAllItems()},isSendingEvent:function(Jt){function fn(){return Jt.apply(this,arguments)}return fn.toString=function(){return Jt.toString()},fn}(function(){return tt||En}),delayBetweenRetriesInMs:ge,maxRetryCount:ne,delayBetweenStreamWaypointsInMs:je,is_batch:Q.is_batch,batch_size:Q.batch_size,max_batch_age:Q.max_batch_age,getSessionInfo:function(){return{}},initializeFromSessionInfo:function(){}}}var Fs={brand_id:"site",chapter_1:"page_chapter1",chapter_2:"page_chapter2",chapter_3:"page_chapter3",page:"page",platform:"platform",content_context_id:"contextID",user_subscription:"user_type",query_context:"ise_keyword",platform_version:"platform_version",custom_label1:"customlabel_1",custom_label2:"customlabel_2",custom_label3:"customlabel_3",custom_label4:"customlabel_4",custom_label5:"customlabel_5",error_code:"error_code",program:"programma",broadcasters:"omroep",is_homepage:"c_nmo_02",location:"location",referrer:"referrer",nmoid:"cs_fpid",live_offset:"live_offset_sec",live_offset_from:"live_offset_from_sec",isLiveStream:"av_broadcasting_type",stream_length:"av_content_duration",stream_id:"av_content_id",player_id:"av_player",av_type:"av_content_type",player_version:"player_version",sko_player_version:"av_player_version",sdk_version:"sdk_version",click_name:"click",click_type:"event_name",click_chapter_1:"click_chapter1",click_chapter_2:"click_chapter2",click_chapter_3:"click_chapter3"},ku=function(Q,O){switch(Q){case"is_homepage":return O?1:0;case"isLiveStream":return O?"live":"clip";case"stream_length":return+O*1e3;default:return O}},Mn=function(Q){var O={};return Object.keys(Q).forEach(function(ne){var ge=ne,je=Fs[ge],qe=Q[ge];qe!==void 0&&je!==void 0&&(O[je]=ku(ge,qe))}),O},vr=function(){function W(){Qe(this,W),v(this,"expiryTimeInDays",395),this.storage=at()}return Xt(W,[{key:"visitorId",get:function(){return this.storage.get(W.PIANO_VISITOR_ID_STORAGE_KEY)}},{key:"setVisitorId",value:function(O){this.storage.set(W.PIANO_VISITOR_ID_STORAGE_KEY,O,{expires:this.expiryTimeInDays})}}],[{key:"getInstance",value:function(){return W.instance||(W.instance=new W),W.instance}}]),W}();v(vr,"PIANO_VISITOR_ID_STORAGE_KEY","PianoVisitorID");function _r(W,Q){var O=Object.keys(W);if(Object.getOwnPropertySymbols){var ne=Object.getOwnPropertySymbols(W);Q&&(ne=ne.filter(function(ge){return Object.getOwnPropertyDescriptor(W,ge).enumerable})),O.push.apply(O,ne)}return O}function fi(W){for(var Q=1;Q<arguments.length;Q++){var O=arguments[Q]!=null?arguments[Q]:{};Q%2?_r(Object(O),!0).forEach(function(ne){v(W,ne,O[ne])}):Object.getOwnPropertyDescriptors?Object.defineProperties(W,Object.getOwnPropertyDescriptors(O)):_r(Object(O)).forEach(function(ne){Object.defineProperty(W,ne,Object.getOwnPropertyDescriptor(O,ne))})}return W}var Pn="ATInternetPlugin",Ri="https://atconnect.npo.nl",wt=1e4,Io=6e4,nu={collectDomain:Ri};function ao(W){Ie(Pn,`Piano/ATInternet functionality is being phased out.
126
- The Piano tag will be removed from the NPO tag SDK after September 30th, 2025.
127
- This ATInternetPlugin will become non-functional after that date.
128
- Please plan to migrate away from Piano analytics before the deadline.`);var Q=fi(fi({},nu),W),O=[Uo({0:wt,60:Io})],ne,ge=function(){if(!ne){var _t=R(4569).pianoAnalytics,qt=vr.getInstance(),vn=_t.setVisitorId.bind(_t);if(_t.setVisitorId=function(zr){vn(zr),qt.setVisitorId(zr)},qt.visitorId){var Wn=qt.visitorId;_t.setVisitorId(Wn)}else{var At=_t.getVisitorId();if(!At){var Tn=P();_t.setVisitorId(Tn)}}_t.setConfigurations({collectDomain:Q.collectDomain}),ne=_t}return ne};function je(Xn,_t){ge().sendEvent(Xn,Mn(_t),{onBeforeSend:function(vn,At,Tn){Ae(Pn,"Sending event",Xn,At),Tn()}})}var qe=new Map,tt=void 0;function rt(Xn){var _t=qe.get(Xn);if(_t)return _t;var qt=ge(),vn=new qt.avInsights.Media(void 0,void 0,tt);return tt=void 0,qe.set(Xn,vn),vn}function vt(Xn){return Math.trunc(Xn*1e3)}function En(Xn){return Math.trunc(Xn)}function or(Xn){var _t=ge();_t.getConfiguration("site")!==Xn&&_t.setConfiguration("site",Xn)}function Qn(Xn,_t){var qt=rt(_t.stream_id),vn=_t.isLiveStream?En(_t.stream_position):vt(_t.stream_position),At=Mn(_t),Tn=function(uo){return{onBeforeSend:function(Oi,mi,ni){Ae(Pn,"Sending stream event",uo,mi),ni()}}};switch(Xn){case he.STREAM_WAYPOINT:qt.heartbeat(vn,Tn("av.heartbeat"),At);break;case he.STREAM_SEEK:{if(_t.stream_seek_from===void 0){Ie(Pn,"A 'stream_seek_from' value is required for seek events.");return}var Wn=_t.isLiveStream?En(_t.stream_seek_from):vt(_t.stream_seek_from);qt.seek(Wn,vn,Tn(Wn>vn?"av.backward":"av.forward"),At);break}case he.STREAM_PAUSE:qt.playbackPaused(vn,Tn("av.pause"),At);break;case he.STREAM_RESUME:qt.playbackResumed(vn,Tn("av.resume"),At);break;case he.STREAM_COMPLETE:case he.STREAM_STOP:qt.playbackStopped(vn,Tn("av.stop"),At);break;case he.STREAM_BUFFERING:qt.bufferStart(vn,Tn("av.rebuffer.start"),At);break;case he.STREAM_BUFFERING_COMPLETE:qt.rebufferHeartbeat(Tn("av.rebuffer.heartbeat"),At);break;case he.STREAM_LOAD:qt.bufferStart(vn,Tn("av.buffer.start"),At);break;case he.STREAM_LOAD_COMPLETE:qt.bufferHeartbeat(Tn("av.buffer.heartbeat"),At);break;case he.STREAM_START:qt.playbackStart(vn,Tn("av.start"),At);break;case he.STREAM_FULLSCREEN:qt.fullscreenOn(Tn("av.fullscreen.on"),At);break;case he.STREAM_WINDOWED:qt.fullscreenOff(Tn("av.fullscreen.off"),At);break}}return{submitEvent:function(_t,qt){if(!Qs(_t,qt,O))switch(or(qt.brand_id),_t){case he.PAGE_VIEW:je("page.display",qt);break;case he.CLICK:switch(qt.click_type){case"navigation":case"action":case"exit":case"download":je("click.".concat(qt.click_type),qt);break;default:Ie(Pn,"Click type '".concat(qt.click_type,"' is not supported. Event will not be sent."))}break;case he.STREAM_WAYPOINT:case he.STREAM_SEEK:case he.STREAM_PAUSE:case he.STREAM_RESUME:case he.STREAM_COMPLETE:case he.STREAM_BUFFERING:case he.STREAM_BUFFERING_COMPLETE:case he.STREAM_LOAD:case he.STREAM_LOAD_COMPLETE:case he.STREAM_START:case he.STREAM_FULLSCREEN:case he.STREAM_WINDOWED:case he.STREAM_STOP:Qn(_t,qt);break}},getCollectDomain:function(){return ge().getConfiguration("collectDomain")},getSessionInfo:function(){var _t=ge(),qt=qe.values().next().value,vn={atVisitorId:_t.getVisitorId(),avSessionId:qt&&qt.getSessionID()};return fi({},vn)},initializeFromSessionInfo:function(_t){var qt=_t,vn=ge();qt.atVisitorId?vn.setVisitorId(qt.atVisitorId):Ie(Pn,"Configuration error: session info did not contain atVisitorId"),tt=qt.avSessionId}}}}(),de}()})})(gv);var qc=gv.exports;const bw=[qc.newGovoltePlugin({maxRetryCount:5,delayBetweenRetriesInMs:3e3})];function mv(me){const p=me.npoTagProps;p.npoTag===void 0&&p.initprops!==void 0&&(p.npoTag=qc.newTag(p.initprops,bw)),p.npoTag&&p.pageTracker===void 0&&(p.pageTracker=qc.newPageTracker(p.npoTag))}function ps({npoPlayer:me,event:p,data:T}){if(!me.player||me.player.castService.isCastActive())return;if(!me.npoTagProps.streamTracker){console.error("No streamTracker available, no tracking will be performed.");return}const L=me.npoTagProps.streamTracker,R=T??{stream_position:0},E={start:L.start,buffering:L.buffering,buffering_complete:L.buffering_complete,complete:L.complete,load:L.load,load_complete:L.load_complete,pause:L.pause,resume:L.resume,stop:L.stop,time:L.time,seek:()=>{L==null||L.seek(R)},error:()=>{L.error(R),me.npoTagProps.debugMode&&console.log("[NPOTag Error Event - Debug]",{event:"error",props:R,timestamp:new Date().toISOString()})}}[p];me.logEmitter.emit(wh.EVENT,p,R),E?E(R):console.warn(`No handler found for event: ${p}`)}function Rw(me){if(!me)return{};const p=me.getMetrics();return{bitrate_audio:p.bitrateAudio,bitrate_video:p.bitrateVideo,startupTime:p.startupTime,drmLoadTime:p.drmLoadTime,drmType:p.drmType,mediaURL:p.mediaURL,isp:p.isp}}function ef(me,p){return{stream_position:me,...Rw(p)}}function Ow({streamErrorCode:me,streamPosition:p,qosMetrics:T}){return{...ef(p,T),stream_error_code:me}}const Dw=()=>{};function Nw(me){const p=me.player.getMediaElement(),T=3;if(!p)return Dw;const L=me.npoTagProps.qosMetrics;let R=ef(0,L),de=!0,E=0,f=!1,c=!1,v=!1;const I=()=>{var q,se;const H=p.currentTime,Y=((q=me.player)==null?void 0:q.isLive())??!1;let ee;if(Y){const re=(se=me.player)==null?void 0:se.getSeekRange(),ue=(re==null?void 0:re.end)==null?0:H-re.end;ee=ue>=-3?0:ue}else ee=H;R=ef(+ee.toFixed(T),L)},x=H=>()=>{I(),ps({npoPlayer:me,event:H,data:R})},C=()=>{L.markStreamLoadStart(),f=!1,c=!1},j=()=>{I(),de=!0,L.markFirstFrameDisplayed(),ps({npoPlayer:me,event:"load_complete",data:R}),f=!0},z=()=>{I(),de?(ps({npoPlayer:me,event:"start",data:R}),de=!1):ps({npoPlayer:me,event:"resume",data:R}),c=!0},F=()=>{L.updateBitrates()},K=()=>{I(),ps({npoPlayer:me,event:"pause",data:R}),de=!1},N=()=>{I(),ps({npoPlayer:me,event:"time",data:R}),L.updateBitrates()},P=()=>{E=R&&"stream_position"in R&&R.stream_position||0},$=()=>{I();const H={...R,seek_from:+E.toFixed(T)};f&&c&&ps({npoPlayer:me,event:"seek",data:H})},d=x("buffering"),M=()=>{x("complete")(),x("stop")(),de=!0},U=()=>{v||(I(),ps({npoPlayer:me,event:"stop",data:R}))},J=[["loadstart",C],["loadeddata",j],["play",z],["playing",F],["pause",K],["timeupdate",N],["seeking",P],["seeked",$],["stalled",d],["ended",M]];for(const[H,Y]of J)p.addEventListener(H,Y);return window.addEventListener("beforeunload",U),()=>{if(!v){v=!0,c&&!de&&(I(),ps({npoPlayer:me,event:"stop",data:R}));for(const[H,Y]of J)p.removeEventListener(H,Y);window.removeEventListener("beforeunload",U)}}}function Lw({npoPlayer:me,duration:p,source:T,avType:L}){const{version:R,npoTagProps:de}=me,E=de.npoTag,f=de.pageTracker;if(!T)throw new Error("Could not initialize streamTracker, no source specified.");if(!E)throw new Error("No npoTagInstance available. Could not create streamtracker.");if(!f)throw new Error("No npoTagPageTracker available. Could not create streamtracker.");if(!p)throw new Error("No duration specified. Could not create streamtracker.");const c={stream_length:p,stream_id:iw(T),player_id:"npoplayer-web",av_type:L,player_version:R,sko_player_version:"1.0.0"},v=me.player.getMode(),I=v===Nr.LIVE||v===Nr.LIVE_NO_DVR;return qc.newStreamTracker(f,c,{isLive:I})}class jw{constructor(p){De(this,"metrics",{isp:void 0,mediaURL:void 0,bitrateAudio:void 0,bitrateVideo:void 0,startupTime:void 0,drmLoadTime:void 0,drmType:void 0});De(this,"startupTimeStart");De(this,"drmLoadTimeStart");De(this,"hasFirstFrameDisplayed",!1);this.npoPlayer=p}markStreamLoadStart(){this.startupTimeStart=performance.now(),this.hasFirstFrameDisplayed=!1}markFirstFrameDisplayed(){this.startupTimeStart!==void 0&&!this.hasFirstFrameDisplayed&&(this.metrics.startupTime=Math.round(performance.now()-this.startupTimeStart),this.hasFirstFrameDisplayed=!0)}markDrmLoadStart(){this.drmLoadTimeStart=performance.now()}markDrmLoadComplete(){this.drmLoadTimeStart!==void 0&&(this.metrics.drmLoadTime=Math.round(performance.now()-this.drmLoadTimeStart))}updateBitrates(){try{const p=this.npoPlayer.player;if(!(p!=null&&p.player))return;const T=p.streamTrackService.getVariantTracks();if(!T||T.length===0)return;const L=T.find(R=>R.active);if(!L)return;L.audioBandwidth&&(this.metrics.bitrateAudio=String(L.audioBandwidth)),this.metrics.bitrateVideo=L.videoBandwidth?String(L.videoBandwidth):void 0}catch(p){tr.handleSilentError({code:19014,message:"Failed to get the bitrates",original:p})}}setMediaURL(p){this.metrics.mediaURL=p}setDrmType(p){this.metrics.drmType=p||void 0}getMetrics(){return this.updateBitrates(),{...this.metrics}}reset(){this.metrics={isp:void 0,mediaURL:void 0,bitrateAudio:void 0,bitrateVideo:void 0,startupTime:void 0,drmLoadTime:void 0,drmType:void 0},this.startupTimeStart=performance.now(),this.drmLoadTimeStart=void 0,this.hasFirstFrameDisplayed=!1}}const tf=()=>{};function Fw(me){var L,R;const p=(L=me.npoTagProps)==null?void 0:L.qosMetrics;if(!p)return tf;const T=(R=me.player)==null?void 0:R.player;if(!T)return tf;try{const de=T.getNetworkingEngine();if(!de)return tf;const E=c=>{c===hs.net.NetworkingEngine.RequestType.LICENSE&&p.markDrmLoadStart()},f=c=>{c===hs.net.NetworkingEngine.RequestType.LICENSE&&p.markDrmLoadComplete()};return de.registerRequestFilter(E),de.registerResponseFilter(f),()=>{try{de.unregisterRequestFilter(E),de.unregisterResponseFilter(f)}catch(c){tr.handleSilentError(new zt({code:19024,message:"Failed to cleanup DRM tracking",original:c}))}}}catch(de){return tr.handleSilentError(new zt({code:19025,message:"Failed to setup DRM tracking",original:de})),tf}}function vv(me){if(!me)return bs.VIDEO;const p=me.trim().toLowerCase();return p==="aod"||p==="audio"?bs.AUDIO:bs.VIDEO}const yv=function({npoPlayer:me,source:p,duration:T,streamAvType:L}){me.npoTagProps.cleanup&&(me.npoTagProps.cleanup(),me.npoTagProps.cleanup=void 0);const R=me.player.getMediaElement();if(!R)throw new Error("Could not initialize streamTracker, audio element not found.");const de=T??R.duration??void 0;if(!p)throw new Error("Could not initialize streamTracker, no source specified.");const E=vv(L??me.playerConfig.mediaType??bs.VIDEO);me.npoTagProps.streamTracker=Lw({npoPlayer:me,duration:rw({duration:de}),source:p,avType:E}),me.npoTagProps.qosMetrics=new jw(me),me.npoTagProps.debugMode=!1;const f=Fw(me),c=Nw(me);me.npoTagProps.cleanup=()=>{f(),c()};const I=Number.isFinite(R.currentTime)?+R.currentTime.toFixed(3):0,x=ef(I,me.npoTagProps.qosMetrics);ps({npoPlayer:me,event:"load",data:x})},Dl="widevine",Ph="playready",kh="fairplay",bh="dash",Sv="hls";function Uw(me,p){if(!me)return tr.handleSilentError(new zt({code:19005,message:"No player detected, cannot decide the profile"})),{profileName:"",drm:""};if(p)return{profileName:p.profileName,drm:p.drmType};const T=Bw(),{bestWithDRM:L,bestDRM:R}=Vw(T),de=_w(me.streamTrackService.getVariantTracks());return L&&R?{profileName:L,drm:R}:{profileName:de,drm:R||""}}function Bw(){const me=[];return Rl("chrome")&&me.push(Dl),Rl("firefox")&&me.push(Dl),Rl("edge")&&me.push(Ph),Rl("safari")&&me.push(kh),me}function Vw(me){let p="",T="";const L={widevine:{drm:Dl,stream:bh},fairplay:{drm:kh,stream:Sv},playready:{drm:Ph,stream:bh}};for(const R of me){if(p)continue;const de=L[R];p=de.stream,T=de.drm}return{bestWithDRM:p,bestDRM:T}}function _w(me){const p=me.some(L=>L.mimeType.includes("mp4")||L.mimeType.includes("dash")),T=me.some(L=>L.mimeType.includes("m3u8"));return p?bh:T?Sv:""}function Hw(me){return me.replace(/['()*]/g,p=>{var T;return`%${(T=p.codePointAt(0))==null?void 0:T.toString(16).toUpperCase()}`})}const Gw=({playerConfig:me,streamObjectMetaData:p,streamOptions:T})=>{var R,de;let L="";return(R=T==null?void 0:T.metadata)!=null&&R.poster?L=T.metadata.poster:p.posterIsDefault&&((de=me.options)!=null&&de.customFallbackPoster)?L=me.options.customFallbackPoster:p.poster&&(L=p.poster),Hw(L)};var Tv=["SW_SECURE_CRYPTO"];const Ev={[Dl]:"com.widevine.alpha",[Ph]:"com.microsoft.playready",[kh]:"com.apple.fps"};function Kw(me){me.configure({drm:{servers:{},advanced:{},initDataTransform:void 0}})}function Ww({player:me,streamObject:p,customDRMConfig:T}){const L=zw(p);if(!L)return;const R=$w(L.type);if(!R)return;const de=Xw(L,T),E=Yw(R,L.licenseUrl);me.configure({drm:{servers:E,advanced:Jw({keySystem:R,drmConfig:L,headers:de}),initDataTransform:Qw()}})}function zw(me){return me.stream.drm}function $w(me){if(me)return Ev[me.toLowerCase()]}function Xw(me,p){const T=p!=null&&p.secure?p.headers:void 0;if(!(!me.httpHeaders&&!T))return{...me.httpHeaders,...T}}function Yw(me,p){return{[me]:p}}function Jw({keySystem:me,drmConfig:p,headers:T}){const L={};return p.certificateUrl&&(L.serverCertificateUri=p.certificateUrl),T&&Object.keys(T).length>0&&(L.headers=T),me===Ev[Dl]&&(L.videoRobustness=Tv,L.audioRobustness=Tv),{[me]:L}}function Qw(){return function(...[me,p,T]){var L;if(p==="skd"){const de=((L=hs.util.StringUtils.fromBytesAutoDetect(me).split("/").pop())==null?void 0:L.split("?")[0])||"",E=T.serverCertificate;if(!E)return console.warn("DRM: No certificate found for FairPlay transform"),me;try{return hs.util.FairPlayUtils.initDataTransform(me,de,E)}catch(f){return console.error("FairPlay transform error:",f),me}}return me}}function Zw({player:me,isLiveStream:p,startOffset:T,hasDvrWindow:L,liveOffset:R,liveProgramTime:de}){if(p)me.once(jt.Play,()=>{var I,x;if(!me.isLive()||!L)return;const E=(x=(I=me.player).seekRange)==null?void 0:x.call(I);if(!E){tr.handleSilentError({code:19006,message:"[handleOffset] Seek range not available, cannot seek"});return}const f=E.end,c=E.start;let v;if(R&&typeof de=="number"){const C=me.player.getManifest(),j=C==null?void 0:C.presentationTimeline;if(j!=null&&j.getPresentationStartTime){const F=j.getPresentationStartTime()+f-de;v=f-F}else v=f}else v=f;v=Math.max(c,Math.min(v,f)),me.seek(v)});else{const E=typeof T=="number"&&T>0?T:0;me.getMediaElement().currentTime=E}}function xv(me){return me.streamOptions.autoplay??me.playerConfig.autoplay??!1}function wv(me){xv(me)&&me.play().catch(T=>{tr.handleSilentError({code:19016,message:"Autoplay failed",original:T})})}function Rh(me){var p,T;return((p=me.metadata)==null?void 0:p.hasPreroll)==="true"&&!!((T=me.assets)!=null&&T.preroll)}async function Av(me,p){const{streamObject:T}=p;try{const L=me.getMediaElement();L instanceof HTMLVideoElement&&L.pause(),await me.advertService.requestAds(T)}catch(L){tr.handleSilentError(new zt({code:19103,message:"[PrerollService] Failed to load preroll ad",original:L}))}finally{p.autoplay&&!me.advertService.isPlayingAd()&&me.play().catch(L=>{tr.handleSilentError({code:19016,message:"Autoplay failed after ad attempt",original:L})})}}function qw(me,p){Rh(p)&&me.once(jt.Play,()=>{Av(me,{streamObject:p,autoplay:!0})})}function eA(me,p){!Rh(p)||!(me.getMediaElement()instanceof HTMLVideoElement)||Av(me,{streamObject:p,autoplay:!0})}function Iv(me,p){"mediaSession"in navigator&&(navigator.mediaSession.metadata=new MediaMetadata({title:p.title,artist:p.description,album:p.broadcaster,artwork:[{src:p.poster,type:"image/*"}]}),navigator.mediaSession.setActionHandler("play",()=>{me.play()}),navigator.mediaSession.setActionHandler("pause",()=>{me.pause()}),navigator.mediaSession.setActionHandler("seekbackward",T=>{me.backward(T.seekOffset||10)}),navigator.mediaSession.setActionHandler("seekforward",T=>{me.forward(T.seekOffset||10)}),navigator.mediaSession.setActionHandler("previoustrack",null),navigator.mediaSession.setActionHandler("nexttrack",null))}function tA({player:me,playNext:p,duration:T}){if(!(p!=null&&p.showPlayNext)||me.isLive())return;if(!Number.isFinite(T)||T<=0){console.warn("Invalid duration, cannot register play next action:",T);return}const L=p.offset??20,R=p.duration??20,de=Math.max(0,T-L),E=Math.min(T,de+R);if(de>=T){console.warn("Offset is greater than duration, skipping play next registration");return}const f={id:"play-next-action",type:xa.PLAY_NEXT,startTime:de,endTime:E,playNext:p};me.timeBoundActionsService.registerAction(f)}class nA{async loadMedia({source:p,npoPlayer:T,errorCallback:L}){const{player:R,uiFactory:de}=T;R.airPlayService.captureContext(),await R.unload(),de==null||de.resetUI(),de==null||de.setLoadingState();const E=Sw(p);let f;return E?await this.loadDirectMedia({source:p,npoPlayer:T}):f=await this.loadStreamMedia({source:p,npoPlayer:T,errorCallback:L}),de==null||de.updateModeClass(),f}async loadDirectMedia({source:p,npoPlayer:T}){var x;const{player:L,uiFactory:R,npoTagProps:de,streamOptions:E}=T,f=p,c=this.getMetadata(E),v={...c,poster:c.poster||Gx};Iv(L,v),await L.load(f);const I=L.getDuration();de&&v.prid&&(yv({npoPlayer:T,source:v.prid,duration:Number.isNaN(I)?0:I}),this.initQosMetrics({npoTagProps:de,source:p,drmType:void 0})),this.initCast({player:L,currentSource:f,parsedMetadata:v,npoTagProps:de}),this.initOffset({player:L,isLiveStream:!1,hasDvrWindow:!1,streamOptions:E}),this.initTimeBound(L,E),this.initPlayNext({player:L,streamOptions:E,duration:I}),L.streamTrackService.init(),R==null||R.setMetadata(v,(E==null?void 0:E.infoPanelHTML)||""),(x=R==null?void 0:R.setBackButtonCallback)==null||x.call(R,E==null?void 0:E.backButtonCallback),R==null||R.removeLoadingState(),wv(T)}async loadStreamMedia({source:p,npoPlayer:T,errorCallback:L}){var $,d,M,U,J,H,Y;const{player:R,uiFactory:de,playerConfig:E,npoTagProps:f,streamOptions:c}=T,v=Uw(R,c==null?void 0:c.customDRMConfig),I=this.buildApiPayload({source:p,profile:v,playerConfig:E,streamOptions:c}),x=await dv(L,I);if(!x)return;let C=x.stream.streamURL;const j=vv(x.stream.avType);if(yv({npoPlayer:T,source:x.metadata.prid,duration:qx(x.metadata.duration),streamAvType:j}),f&&this.initQosMetrics({npoTagProps:f,source:C,drmType:($=x.stream.drm)==null?void 0:$.type}),R.streamTrackService.isManifestTrackAvailable()){await R.streamTrackService.parseManifestForTracks(C);const ee=R.streamTrackService.getAlternateStreamURLForSafari();ee&&(C=ee)}R.subtitlesService.handleSubtitles(x),Kw(R),R.airPlayService.init(I,x),this.shouldConfigureDrm(x,c)&&Ww({player:R,streamObject:x,customDRMConfig:c.customDRMConfig});const z=Gw({playerConfig:E,streamObjectMetaData:x.metadata,streamOptions:c}),K={...this.getMetadata(c,x.metadata),poster:z,avType:x.stream.avType};await R.load(C,{normalizedAvType:j,avType:x.stream.avType,isLiveStream:x.stream.isLiveStream,hasDvrWindow:x.stream.hasDvrWindow,streamProfile:x.stream.streamProfile,sourceProfile:x.stream.sourceProfile}),this.shouldConfigureDrm(x,c)&&R.airPlayService.clearSessionsForAirPlay(),Iv(R,K),(d=x.assets)!=null&&d.scrubbingThumbnail?await R.thumbnailService.initialize(x.assets.scrubbingThumbnail):R.thumbnailService.reset(),this.initCast({player:R,streamObject:x,parsedMetadata:K,npoTagProps:f}),this.initOffset({player:R,isLiveStream:x.stream.isLiveStream,hasDvrWindow:x.stream.hasDvrWindow,streamOptions:c}),this.initTimeBound(R,c),this.initPlayNext({player:R,streamOptions:c,duration:R.getDuration()}),R.streamTrackService.init(),(U=(M=R.chapterSkipService)==null?void 0:M.setSkippableTypes)==null||U.call(M,c.skippableChapters),(H=(J=R.chapterSkipService)==null?void 0:J.registerChapters)==null||H.call(J,x.metadata.chapters),de==null||de.setMetadata(K,(c==null?void 0:c.infoPanelHTML)||""),(Y=de==null?void 0:de.setBackButtonCallback)==null||Y.call(de,c==null?void 0:c.backButtonCallback),de==null||de.removeLoadingState();const N=xv(T),P=Rh(x);return N&&P?eA(R,x):(qw(R,x),wv(T)),x}buildApiPayload({source:p,profile:T,playerConfig:L,streamOptions:R}){var j;const de=L.options,E="https://prod.npoplayer.nl/",f="npo-app-desktop",c=4,v="web",I=(R==null?void 0:R.endpoint)??E,x=(j=R==null?void 0:R.metadata)==null?void 0:j.ster,C=de==null?void 0:de.ster;return{baseURL:I,jwt:p,data:{profileName:T.profileName,drmType:T.drm,referrerUrl:globalThis.location.href,ster:{identifier:(x==null?void 0:x.identifier)??(C==null?void 0:C.identifier)??f,deviceType:(x==null?void 0:x.deviceType)??(C==null?void 0:C.deviceType)??c,player:v}}}}getMetadata(p,T){const L=p==null?void 0:p.metadata;return{title:(L==null?void 0:L.title)??(T==null?void 0:T.title)??"",broadcaster:(L==null?void 0:L.broadcaster)??(T==null?void 0:T.broadcaster)??"",description:(L==null?void 0:L.description)??(T==null?void 0:T.description)??"",ageRating:(L==null?void 0:L.ageRating)??(T==null?void 0:T.ageRating)??"",poster:(L==null?void 0:L.poster)??(T==null?void 0:T.poster)??"",nicam:(L==null?void 0:L.nicam)??(T==null?void 0:T.nicam)??[],prid:(L==null?void 0:L.prid)??(T==null?void 0:T.prid)??"",posterIsDefault:(L==null?void 0:L.poster)===void 0?(T==null?void 0:T.posterIsDefault)??!1:!1}}shouldConfigureDrm(p,T){var R;return!!(!!((R=p.stream.drm)!=null&&R.licenseUrl)||T!=null&&T.customDRMConfig)}initQosMetrics({npoTagProps:p,source:T,drmType:L}){p.qosMetrics&&(p.qosMetrics.reset(),p.qosMetrics.setMediaURL(T),L&&p.qosMetrics.setDrmType(L))}initCast({player:p,currentSource:T,streamObject:L,parsedMetadata:R,npoTagProps:de}){p.castService.updateCastingData({source:T,streamObject:L,metadata:R,npoTagSession:de!=null&&de.npoTag?String(de.npoTag.getSerializedSessionInfo()):void 0})}initOffset({player:p,isLiveStream:T,hasDvrWindow:L,streamOptions:R}){Zw({player:p,isLiveStream:T,hasDvrWindow:L,startOffset:R==null?void 0:R.startOffset,liveOffset:T?R==null?void 0:R.liveOffset:void 0,liveProgramTime:T?R==null?void 0:R.liveProgramTime:void 0})}initTimeBound(p,T){T!=null&&T.timeBoundActions&&p.timeBoundActionsService.registerActions(T.timeBoundActions)}initPlayNext({player:p,streamOptions:T,duration:L}){T!=null&&T.playNext&&tA({player:p,playNext:T.playNext,duration:L})}}class rA{constructor(){De(this,"listeners",new Map)}emit(p,...T){const L=this.listeners.get(p);if(!L)return!1;for(const R of L)R(...T);return!0}on(p,T){return this.listeners.has(p)||this.listeners.set(p,new Set),this.listeners.get(p).add(T),this}once(p,T){const L=(...R)=>{this.off(p,L),T(...R)};return this.on(p,L),this}off(p,T){var L;return(L=this.listeners.get(p))==null||L.delete(T),this}}const Ja=class Ja{constructor(){De(this,"trackedContainers",new Map);De(this,"containerInteractionStates",new Map);De(this,"isListening",!1);De(this,"focusHandler",p=>{const T=p.target;if(T){for(const[L,R]of this.trackedContainers.entries())if(!L.contains(T)&&T!==L){this.containerInteractionStates.set(L,!0);for(const E of R)E(!0,T)}}});De(this,"clickHandler",p=>{const T=p.target;if(T){for(const[L,R]of this.trackedContainers.entries())if(!L.contains(T)&&T!==L){this.containerInteractionStates.set(L,!0);for(const E of R)E(!0,T)}}});De(this,"containerInteractionHandler",p=>{const T=p.currentTarget;if(!T)return;this.containerInteractionStates.set(T,!1);const L=this.trackedContainers.get(T);if(L)for(const R of L)R(!1,void 0)})}static getInstance(){return Ja.instance||(Ja.instance=new Ja),Ja.instance}startListening(){this.isListening||(document.addEventListener("focusin",this.focusHandler),document.addEventListener("click",this.clickHandler,{capture:!0}),this.isListening=!0)}stopListening(){this.isListening&&(document.removeEventListener("focusin",this.focusHandler),document.removeEventListener("click",this.clickHandler,{capture:!0}),this.isListening=!1)}trackContainer(p,T){this.trackedContainers.has(p)||(this.trackedContainers.set(p,new Set),this.containerInteractionStates.set(p,!1),p.addEventListener("click",this.containerInteractionHandler),p.addEventListener("focusin",this.containerInteractionHandler)),this.trackedContainers.get(p).add(T),this.trackedContainers.size===1&&this.startListening()}untrackContainer(p,T){const L=this.trackedContainers.get(p);L&&(T?(L.delete(T),L.size===0&&this.removeContainer(p)):this.removeContainer(p))}removeContainer(p){this.trackedContainers.delete(p),this.containerInteractionStates.delete(p),p.removeEventListener("click",this.containerInteractionHandler),p.removeEventListener("focusin",this.containerInteractionHandler),this.trackedContainers.size===0&&this.stopListening()}hasUserInteractedOutside(p){return this.containerInteractionStates.get(p)??!1}resetInteractionState(p){this.containerInteractionStates.set(p,!1);const T=this.trackedContainers.get(p);if(T)for(const L of T)L(!1,void 0)}isFormElement(p){return["INPUT","TEXTAREA","SELECT","BUTTON"].includes(p.tagName)||p.contentEditable==="true"}shouldAllowGlobalInteraction(p){const T=document.activeElement;if(p.contains(T)||T===p)return!0;const L=this.hasUserInteractedOutside(p),R=T&&this.isFormElement(T);return!L&&!R}destroy(){for(const p of this.trackedContainers.keys())this.removeContainer(p);this.trackedContainers.clear(),this.containerInteractionStates.clear(),this.stopListening()}};De(Ja,"instance");let Oh=Ja;class iA{constructor(p,T){De(this,"keyMappings",[]);De(this,"player");De(this,"container");De(this,"focusManager");De(this,"isAttached",!1);De(this,"playbackRateOptions");De(this,"defaultKeyCombos",{togglePlayPause:{key:" "},exitFullscreen:{key:"Escape"},volumeUp:{key:"ArrowUp"},volumeDown:{key:"ArrowDown"},seekForward:{key:"ArrowRight"},seekBackward:{key:"ArrowLeft"},toggleMute:{key:"m"},enterFullscreen:{key:"f"},increasePlaybackRate:{key:">",shift:!0},decreasePlaybackRate:{key:"<",shift:!0}});De(this,"keydownHandler",p=>{if(this.shouldHandleKeyEvent())for(const T of this.keyMappings)this.matchesKeyCombo(p,T.combo)&&T.handler(p)});this.player=p,this.container=T,this.focusManager=Oh.getInstance(),this.setupKeyMappings()}setupKeyMappings(){this.keyMappings=[{combo:this.defaultKeyCombos.togglePlayPause,handler:p=>{p.preventDefault(),this.player.togglePlayPause()}},{combo:this.defaultKeyCombos.exitFullscreen,handler:p=>{p.preventDefault(),this.player.exitFullscreen()}},{combo:this.defaultKeyCombos.seekBackward,handler:p=>{p.preventDefault(),this.player.backward()}},{combo:this.defaultKeyCombos.seekForward,handler:p=>{p.preventDefault(),this.player.forward()}},{combo:this.defaultKeyCombos.volumeUp,handler:p=>{p.preventDefault(),this.volumeUp()}},{combo:this.defaultKeyCombos.volumeDown,handler:p=>{p.preventDefault(),this.volumeDown()}},{combo:this.defaultKeyCombos.toggleMute,handler:p=>{p.preventDefault(),this.player.toggleMute()}},{combo:this.defaultKeyCombos.enterFullscreen,handler:p=>{p.preventDefault(),this.player.enterFullscreen()}},{combo:this.defaultKeyCombos.increasePlaybackRate,handler:p=>{p.preventDefault(),this.increasePlaybackRate()}},{combo:this.defaultKeyCombos.decreasePlaybackRate,handler:p=>{p.preventDefault(),this.decreasePlaybackRate()}}]}matchesKeyCombo(p,T){return p.key.toLowerCase()===T.key.toLowerCase()&&!!T.ctrl===p.ctrlKey&&!!T.alt===p.altKey&&!!T.shift===p.shiftKey&&!!T.meta===p.metaKey}shouldHandleKeyEvent(){return this.focusManager.shouldAllowGlobalInteraction(this.container)}volumeUp(){const p=this.player.getVolume(),T=Math.min(1,p+.1);this.player.setVolume(T)}volumeDown(){const p=this.player.getVolume(),T=Math.max(0,p-.1);this.player.setVolume(T)}increasePlaybackRate(){const p=[...this.playbackRateOptions??nv],T=this.player.getPlaybackRate(),L=p.find(R=>R>T)||p[p.length-1];this.player.setPlaybackRate(L)}decreasePlaybackRate(){const p=[...this.playbackRateOptions??nv],T=this.player.getPlaybackRate(),L=p.reverse().find(R=>R<T)||p[p.length-1];this.player.setPlaybackRate(L)}attach(){this.isAttached||(this.container.hasAttribute("tabindex")||this.container.setAttribute("tabindex","0"),document.addEventListener("keydown",this.keydownHandler),this.isAttached=!0)}detach(){this.isAttached&&(document.removeEventListener("keydown",this.keydownHandler),this.isAttached=!1)}addKeyMapping(p,T){this.keyMappings.push({combo:p,handler:L=>{L.preventDefault(),T(L)}})}removeKeyMapping(p){this.keyMappings=this.keyMappings.filter(T=>!(T.combo.key.toLowerCase()===p.key.toLowerCase()&&!!T.combo.ctrl==!!p.ctrl&&!!T.combo.alt==!!p.alt&&!!T.combo.shift==!!p.shift&&!!T.combo.meta==!!p.meta))}resetInteractionState(){this.focusManager.resetInteractionState(this.container)}hasUserInteractedOutsideContainer(){return this.focusManager.hasUserInteractedOutside(this.container)}isInputHandlerAttached(){return this.isAttached}destroy(){this.detach(),this.keyMappings=[],this.focusManager.destroy()}}class oA{constructor(p,T){De(this,"cache");De(this,"storageKey");De(this,"useLocalStorage");this.storageKey=p,this.cache={...T},this.useLocalStorage=!1;try{typeof globalThis<"u"&&globalThis.localStorage&&(this.useLocalStorage=!0)}catch(L){tr.handleSilentError(new zt({code:19018,message:"localStorage unavailable, using in-memory storage",original:L}))}if(this.useLocalStorage)try{const L=globalThis.localStorage.getItem(this.storageKey);if(L){const R=JSON.parse(L);R&&typeof R=="object"&&!Array.isArray(R)&&(this.cache={...this.cache,...R})}}catch(L){tr.handleSilentError(new zt({code:19019,message:`Failed to parse settings from localStorage '${this.storageKey}', using defaults`,original:L}))}this.persist()}set(p,T){this.cache[p]=T,this.persist()}get(p,T){return p in this.cache?this.cache[p]:T}persist(){if(this.useLocalStorage)try{globalThis.localStorage.setItem(this.storageKey,JSON.stringify(this.cache))}catch(p){tr.handleSilentError(new zt({code:19017,message:`Failed to save settings to localStorage '${this.storageKey}'`,original:p}))}}}class Cv{constructor(p,T){De(this,"player");De(this,"uiFactory");De(this,"errorManager");De(this,"version","2.0.0-beta.2");De(this,"container");De(this,"npoTagProps");De(this,"logEmitter");De(this,"playerConfig");De(this,"settingsStore");De(this,"inputHandler");De(this,"playerContext");De(this,"streamOptions",{});De(this,"ready");De(this,"loadStreamService");De(this,"cast");var L;this.container=p,this.playerConfig=T,this.settingsStore=T.settingsStore||new oA("npo-player-settings",{playbackRate:1,volume:1,muted:!1}),T.settingsStore=this.settingsStore,this.player=new kw(this.container,T),this.npoTagProps=T.npoTag?{...T.npoTag,streamTracker:void 0,qosMetrics:void 0}:void 0,this.logEmitter=new rA,this.errorManager=new tr(this),this.inputHandler=new iA(this.player,this.container),this.loadStreamService=new nA,this.inputHandler.playbackRateOptions=T.playbackRateOptions,((L=T.options)==null?void 0:L.enableKeyboardControls)!==!1&&this.inputHandler.attach(),this.cast={isAvailable:()=>this.player.castService.isCastAvailable(),isActive:()=>this.player.castService.isCastActive(),startSession:()=>this.player.castService.startCastSession(),stopSession:()=>this.player.castService.stopCastSession()},this.uiFactory=T.uiFactory,this.ready=new Promise(R=>{this.player.initialize().then(()=>{var de;(de=this.uiFactory)==null||de.init({container:this.container,player:this.player,options:T.options||{},errorManager:this.errorManager,retryCallback:this.retry.bind(this),inputHandler:this.inputHandler,logClick:this.logClick.bind(this)}),this.errorManager.setupErrorDebounce({player:this.player,mediaElement:this.player.getMediaElement(),setErrorStateFn:void 0,resetFn:void 0}),R(void 0)}).catch(de=>{this.doError(new zt({code:19001,message:"Error during player initialization",original:de}))})})}doError(p){this.logEmitter.emit(wh.ERROR,p.status,p.context),this.errorManager.handleError({errorEvent:p})}async load(p,T){var L;await this.ready,this.streamOptions=T||{},this.playerContext={source:p,playerConfig:this.playerConfig,streamObject:void 0,streamOptions:this.streamOptions},(L=T==null?void 0:T.npotag)!=null&&L.pageTracker&&this.npoTagProps&&(this.npoTagProps.pageTracker=T.npotag.pageTracker);try{const R=await this.loadStreamService.loadMedia({source:p,npoPlayer:this,errorCallback:de=>{this.doError(de)}});R&&(this.playerContext.streamObject=R)}catch(R){this.doError(new zt({code:19002,message:"Error loading media",original:R}))}}async play(){await this.player.play()}pause(){this.player.pause()}async unload(){var T;(T=this.uiFactory)==null||T.resetUI();const p=this.player.getMediaElement();p&&(p.src="",p.load()),await this.player.unload()}async destroy(){var p;await this.unload(),this.uiFactory&&(this.uiFactory.destroy(),this.uiFactory=void 0),this.errorManager&&(this.errorManager.destroy(),this.errorManager=void 0),this.inputHandler&&(this.inputHandler.destroy(),this.inputHandler=void 0),this.player&&(this.player.destroy(),this.player=void 0),(p=this.npoTagProps)!=null&&p.cleanup&&(this.npoTagProps.cleanup(),this.npoTagProps.cleanup=void 0),this.container.innerHTML="",typeof globalThis<"u"&&(globalThis.NpoPlayer===this&&delete globalThis.NpoPlayer,globalThis.NpoAudioPlayer===this&&delete globalThis.NpoAudioPlayer,globalThis.NpoVideoPlayer===this&&delete globalThis.NpoVideoPlayer),this.playerContext=void 0}seek(p){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for seeking."});this.player.seek(p)}getCurrentTime(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for getting current time."});return this.player.getCurrentTime()}mute(){this.player.mute()}unmute(){this.player.unMute()}isMuted(){return this.player.isMuted()}isPlaying(){return this.player.isPlaying()}setVolume(p){this.player.setVolume(p)}getVolume(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for getting volume."});return this.player.getVolume()}getDuration(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for getting duration."});return this.player.getDuration()}isLive(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for checking live status."});return this.player.isLive()}isBuffering(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for checking buffering status."});return this.player.isBuffering()}getPlaybackRate(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for getting playback rate."});return this.player.getPlaybackRate()}setPlaybackRate(p){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for setting playback rate."});this.player.setPlaybackRate(p)}getSeekRange(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for getting seek range."});return this.player.getSeekRange()}seekToLiveEdge(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for seeking to live edge."});this.player.seekToLiveEdge()}getAvailableVideoQualities(){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for getting available video qualities."});return this.player.streamTrackService.getAvailableVideoTracks()||[]}setVideoQuality(p){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for setting video quality."});this.player.streamTrackService.setVideoTrackByQuality(p)}on(p,T){return this.player.on(p,T)}off(p,T){return this.player.off(p,T)}once(p,T){return this.player.once(p,T)}enableKeyboardControls(){this.inputHandler.attach()}disableKeyboardControls(){this.inputHandler.detach()}isKeyboardControlsEnabled(){return this.inputHandler.isInputHandlerAttached()}addKeyboardShortcut(p,T){this.inputHandler.addKeyMapping(p,T)}async retry(p){if(!this.playerContext)throw new zt({code:19e3,message:"Player context not available for retry."});return this.load(this.playerContext.source,this.streamOptions).then(()=>{typeof p=="number"&&p>0&&this.player.seek(p)}).catch(T=>{throw new zt({code:19003,message:"Error during retry.",original:T})})}logClick(p){var L,R;const T=this.container.id||"unknown";(R=(L=this.npoTagProps)==null?void 0:L.pageTracker)==null||R.click({...p,click_chapter_1:`player_${T}`})}}class sA extends Cv{constructor(p,T){T.mediaType||(T.mediaType=bs.AUDIO),super(p,T),mv(this)}}class Mv extends Cv{constructor(p,T){console.warn("Test message: The video player is currently in development and may not be fully functional. It is recommended to use the @npo/player package for video playback instead. If the video player was initialized by mistake, please import NpoAudioPlayer instead."),p.mediaType||(p.mediaType=bs.VIDEO),super(T,p),mv(this)}}function aA({npoPlayer:me,error:p,streamPosition:T}){const L=me.npoTagProps.qosMetrics;if(!L)return;const R=Ow({streamErrorCode:p.code,streamPosition:T,qosMetrics:L});me.npoTagProps.debugMode&&console.log("[NPOTag Error Event - Prepared]",{event:"error",props:R}),ps({npoPlayer:me,event:"error",data:R})}const uA=Object.freeze(Object.defineProperty({__proto__:null,logErrorEvent:aA},Symbol.toStringTag,{value:"Module"}));Or.DRM_FAIRPLAY=$x,Or.DRM_PLAYREADY=zx,Or.DRM_WIDEVINE=Wx,Or.LogEventType=wh,Or.MarkerTypes=_x,Or.MediaStates=li,Or.MediaType=bs,Or.Modes=Nr,Or.NpoAudioPlayer=sA,Or.NpoVideoPlayer=Mv,Or.PROFILE_DASH=Xx,Or.PROFILE_HLS=Yx,Or.PlayerEventNames=jt,Or.TimeBoundActionType=xa,Or.default=Mv,Object.defineProperties(Or,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});